feat(bucket): expose the underlying S3 client through getStorageClient()

This commit is contained in:
2026-04-07 16:28:01 +00:00
parent 3a0cd78dad
commit cf0402cd7a
4 changed files with 32 additions and 1 deletions
+1 -1
View File
@@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@push.rocks/smartbucket',
version: '4.5.2',
version: '4.6.0',
description: 'A TypeScript library providing a cloud-agnostic interface for managing object storage with functionalities like bucket management, file and directory operations, and advanced features such as metadata handling and file locking.'
}
+14
View File
@@ -49,6 +49,20 @@ export class Bucket {
this.name = bucketName;
}
/**
* Returns the underlying AWS SDK v3 S3Client for this bucket.
*
* Use this when you need to perform operations smartbucket doesn't
* wrap directly (e.g. lifecycle policies, bucket tagging, multipart
* upload control, object-lock, inventory config, etc.).
*
* The returned client is shared with the parent SmartBucket — do not
* call `.destroy()` on it.
*/
public getStorageClient(): plugins.s3.S3Client {
return this.smartbucketRef.storageClient;
}
/**
* gets the base directory of the bucket
*/