feat(core): Standardize S3 storage config using @tsclass/tsclass IS3Descriptor and wire it into RegistryStorage and plugins exports; update README and package dependencies.
This commit is contained in:
@@ -18,14 +18,8 @@ export class RegistryStorage implements IStorageBackend {
|
||||
* Initialize the storage backend
|
||||
*/
|
||||
public async init(): Promise<void> {
|
||||
this.smartBucket = new plugins.smartbucket.SmartBucket({
|
||||
accessKey: this.config.accessKey,
|
||||
accessSecret: this.config.accessSecret,
|
||||
endpoint: this.config.endpoint,
|
||||
port: this.config.port || 443,
|
||||
useSsl: this.config.useSsl !== false,
|
||||
region: this.config.region || 'us-east-1',
|
||||
});
|
||||
// Pass config as IS3Descriptor to SmartBucket (bucketName is extra, SmartBucket ignores it)
|
||||
this.smartBucket = new plugins.smartbucket.SmartBucket(this.config as plugins.tsclass.storage.IS3Descriptor);
|
||||
|
||||
// Ensure bucket exists
|
||||
await this.smartBucket.createBucket(this.bucketName).catch(() => {
|
||||
|
||||
Reference in New Issue
Block a user