Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
robot9706 committed Dec 12, 2024
1 parent 9d5607c commit b7940d4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions web/crux/src/app/registry/registry-clients/hub-api-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,13 @@ export default abstract class HubApiClient {
)
}

async labels(image: string, tag: string): Promise<Record<string, string>> {
async labels(): Promise<Record<string, string>> {
// NOTE(@robot9706): Docker ratelimits us so skip this for now
// return this.createApiClient().fetchLabels(image, tag)
return {}
}

async tagInfo(image: string, tag: string): Promise<RegistryImageTag> {
async tagInfo(): Promise<RegistryImageTag> {
// NOTE(@robot9706): Docker ratelimits us so skip this for now
// return this.createApiClient().fetchTagInfo(image, tag)
return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ export const fetchInfoForTags = async (image: string, tags: string[], client: Re
},
{} as Record<string, RegistryImageTag>,
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class UncheckedApiClient implements RegistryApiClient {
return {}
}

async tagInfo(image: string, tag: string): Promise<RegistryImageTag> {
async tagInfo(): Promise<RegistryImageTag> {
return null
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ export default class V2HttpApiClient {
}

const result = await this.fetchV2<T>(endpoint, init)
this.cache.set(cacheKey, result, 0)
await this.cache.set(cacheKey, result, 0)
this.logger.debug(`Stored to cache ${cacheKey}`)

return result
Expand All @@ -274,7 +274,7 @@ export default class V2HttpApiClient {
manifest: ManifestBaseResponse,
depth: number,
): Promise<Record<string, string>> {
if (!manifest.mediaType && manifest.schemaVersion == 1) {
if (!manifest.mediaType && manifest.schemaVersion === 1) {
// NOTE(@robot9706): V1 manifests have 'v1Compatibility' history fields which have everything we need
const lastHistory = manifest.history[0]
const configBlob = JSON.parse(lastHistory.v1Compatibility) as ConfigBlobResponse
Expand Down Expand Up @@ -333,7 +333,7 @@ export default class V2HttpApiClient {
manifest: ManifestBaseResponse,
depth: number,
): Promise<ConfigBlobResponse | null> {
if (!manifest.mediaType && manifest.schemaVersion == 1) {
if (!manifest.mediaType && manifest.schemaVersion === 1) {
// NOTE(@robot9706): V1 manifests have 'v1Compatibility' history fields which have everything we need
const lastHistory = manifest.history[0]
const configBlob = JSON.parse(lastHistory.v1Compatibility) as ConfigBlobResponse
Expand Down Expand Up @@ -400,7 +400,7 @@ export default class V2HttpApiClient {
return null
}

if (manifest.schemaVersion == 1) {
if (manifest.schemaVersion === 1) {
return manifest
}
}
Expand Down

0 comments on commit b7940d4

Please sign in to comment.