feat(bucket): expose the underlying S3 client through getStorageClient()
This commit is contained in:
@@ -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.'
|
||||
}
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user