feat(bucket): Enhanced SmartBucket with trash management and metadata handling

This commit is contained in:
2024-11-24 02:25:08 +01:00
parent 8d160cefb0
commit 34082c38a7
14 changed files with 847 additions and 979 deletions

View File

@@ -41,7 +41,15 @@ export class SmartBucket {
await Bucket.removeBucketByName(this, bucketName);
}
public async getBucketByName(bucketName: string) {
return Bucket.getBucketByName(this, bucketName);
public async getBucketByName(bucketNameArg: string) {
return Bucket.getBucketByName(this, bucketNameArg);
}
public async getBucketByNameStrict(...args: Parameters<SmartBucket['getBucketByName']>) {
const bucket = await this.getBucketByName(...args);
if (!bucket) {
throw new Error(`Bucket ${args[0]} does not exist.`);
}
return bucket;
}
}