fix(Smarts3): Allow overriding S3 descriptor; update dependencies, test config and documentation
This commit is contained in:
@@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@push.rocks/smarts3',
|
||||
version: '2.2.5',
|
||||
version: '2.2.6',
|
||||
description: 'A Node.js TypeScript package to create a local S3 endpoint for simulating AWS S3 operations using mapped local directories for development and testing purposes.'
|
||||
}
|
||||
|
17
ts/index.ts
17
ts/index.ts
@@ -42,13 +42,18 @@ export class Smarts3 {
|
||||
console.log('s3 server is running');
|
||||
}
|
||||
|
||||
public async getS3Descriptor(): Promise<plugins.tsclass.storage.IS3Descriptor> {
|
||||
public async getS3Descriptor(
|
||||
optionsArg?: Partial<plugins.tsclass.storage.IS3Descriptor>
|
||||
): Promise<plugins.tsclass.storage.IS3Descriptor> {
|
||||
return {
|
||||
accessKey: 'S3RVER',
|
||||
accessSecret: 'S3RVER',
|
||||
endpoint: '127.0.0.1',
|
||||
port: this.options.port,
|
||||
useSsl: false,
|
||||
...{
|
||||
accessKey: 'S3RVER',
|
||||
accessSecret: 'S3RVER',
|
||||
endpoint: '127.0.0.1',
|
||||
port: this.options.port,
|
||||
useSsl: false,
|
||||
},
|
||||
...(optionsArg? optionsArg : {})
|
||||
};
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user