fix(Smarts3): Allow overriding S3 descriptor; update dependencies, test config and documentation

This commit is contained in:
2025-08-16 16:22:15 +00:00
parent bdcfcee37a
commit a3b40923a5
8 changed files with 7646 additions and 6326 deletions

View File

@@ -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.'
}

View File

@@ -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 : {})
};
}