From b7940d4ced074185159b562aeb833dc23118ca3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bence=20Nagygy=C3=B6rgy?= Date: Thu, 12 Dec 2024 14:00:09 +0100 Subject: [PATCH] fix: lint --- .../src/app/registry/registry-clients/hub-api-client.ts | 4 ++-- .../app/registry/registry-clients/registry-api-client.ts | 2 +- .../app/registry/registry-clients/unchecked-api-client.ts | 2 +- .../app/registry/registry-clients/v2-http-api-client.ts | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/web/crux/src/app/registry/registry-clients/hub-api-client.ts b/web/crux/src/app/registry/registry-clients/hub-api-client.ts index 361021b6e..7746339d5 100644 --- a/web/crux/src/app/registry/registry-clients/hub-api-client.ts +++ b/web/crux/src/app/registry/registry-clients/hub-api-client.ts @@ -92,13 +92,13 @@ export default abstract class HubApiClient { ) } - async labels(image: string, tag: string): Promise> { + async labels(): Promise> { // NOTE(@robot9706): Docker ratelimits us so skip this for now // return this.createApiClient().fetchLabels(image, tag) return {} } - async tagInfo(image: string, tag: string): Promise { + async tagInfo(): Promise { // NOTE(@robot9706): Docker ratelimits us so skip this for now // return this.createApiClient().fetchTagInfo(image, tag) return { diff --git a/web/crux/src/app/registry/registry-clients/registry-api-client.ts b/web/crux/src/app/registry/registry-clients/registry-api-client.ts index 8bea4553f..f14d58cbc 100644 --- a/web/crux/src/app/registry/registry-clients/registry-api-client.ts +++ b/web/crux/src/app/registry/registry-clients/registry-api-client.ts @@ -24,4 +24,4 @@ export const fetchInfoForTags = async (image: string, tags: string[], client: Re }, {} as Record, ) -} \ No newline at end of file +} diff --git a/web/crux/src/app/registry/registry-clients/unchecked-api-client.ts b/web/crux/src/app/registry/registry-clients/unchecked-api-client.ts index 34cca40da..f61d88a78 100644 --- a/web/crux/src/app/registry/registry-clients/unchecked-api-client.ts +++ b/web/crux/src/app/registry/registry-clients/unchecked-api-client.ts @@ -15,7 +15,7 @@ class UncheckedApiClient implements RegistryApiClient { return {} } - async tagInfo(image: string, tag: string): Promise { + async tagInfo(): Promise { return null } } diff --git a/web/crux/src/app/registry/registry-clients/v2-http-api-client.ts b/web/crux/src/app/registry/registry-clients/v2-http-api-client.ts index 47d1ca851..51dd40ce9 100644 --- a/web/crux/src/app/registry/registry-clients/v2-http-api-client.ts +++ b/web/crux/src/app/registry/registry-clients/v2-http-api-client.ts @@ -263,7 +263,7 @@ export default class V2HttpApiClient { } const result = await this.fetchV2(endpoint, init) - this.cache.set(cacheKey, result, 0) + await this.cache.set(cacheKey, result, 0) this.logger.debug(`Stored to cache ${cacheKey}`) return result @@ -274,7 +274,7 @@ export default class V2HttpApiClient { manifest: ManifestBaseResponse, depth: number, ): Promise> { - 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 @@ -333,7 +333,7 @@ export default class V2HttpApiClient { manifest: ManifestBaseResponse, depth: number, ): Promise { - 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 @@ -400,7 +400,7 @@ export default class V2HttpApiClient { return null } - if (manifest.schemaVersion == 1) { + if (manifest.schemaVersion === 1) { return manifest } }