From 31ca59ae524cf975de62efc0a6f2844eada8def4 Mon Sep 17 00:00:00 2001 From: pbio <10051819+paulbalaji@users.noreply.github.com> Date: Tue, 19 Nov 2024 17:38:01 +0000 Subject: [PATCH] remove unused listItems function --- typescript/sdk/src/gcp/storage.ts | 21 --------------------- typescript/sdk/src/gcp/validator.ts | 4 ---- 2 files changed, 25 deletions(-) diff --git a/typescript/sdk/src/gcp/storage.ts b/typescript/sdk/src/gcp/storage.ts index 6d3411e00..7b832974d 100644 --- a/typescript/sdk/src/gcp/storage.ts +++ b/typescript/sdk/src/gcp/storage.ts @@ -42,27 +42,6 @@ export class GcpStorageWrapper { } } - // List items in the bucket with optional folder prefix - async listItems(): Promise { - const bucket = this.client.bucket(this.bucket); - const options = this.config.folder - ? { prefix: this.config.folder + '/' } - : {}; - - try { - const [files] = await bucket.getFiles(options); - return files.map((file) => { - const fullPath = file.name; - // If there's a folder prefix, remove it from the returned paths - return this.config.folder - ? fullPath.slice(this.config.folder.length + 1) - : fullPath; - }); - } catch (e) { - throw new Error(`Failed to list items in bucket: ${e}`); - } - } - formatKey(key: string): string { return this.config.folder ? `${this.config.folder}/${key}` : key; } diff --git a/typescript/sdk/src/gcp/validator.ts b/typescript/sdk/src/gcp/validator.ts index f6c06c94f..7943abb0f 100644 --- a/typescript/sdk/src/gcp/validator.ts +++ b/typescript/sdk/src/gcp/validator.ts @@ -71,10 +71,6 @@ export class GcpValidator extends BaseValidator { throw new Error(`Unable to parse location ${storageLocation}`); } - async listItems(): Promise { - return this.storage.listItems(); - } - async getAnnouncement(): Promise { const { value } = await this.getSignedAnnouncement(); return value;