fix(structure): format

This commit is contained in:
2022-04-14 10:38:14 +02:00
parent 5803ef597f
commit e69ca55a40
8 changed files with 22 additions and 28 deletions

View File

@ -22,8 +22,8 @@ export class Smarts3 {
this.options = optionsArg;
this.options = {
...this.options,
...optionsArg
}
...optionsArg,
};
}
public async start() {
@ -36,8 +36,8 @@ export class Smarts3 {
port: this.options.port || 3000,
address: '0.0.0.0',
silent: false,
directory: paths.bucketsDir
})
directory: paths.bucketsDir,
});
await this.s3Instance.run();
console.log('s3 server is running');
}
@ -49,7 +49,7 @@ export class Smarts3 {
endpoint: 'localhost',
port: this.options.port,
useSsl: false,
}
};
}
public async createBucket(bucketNameArg: string) {
@ -61,4 +61,4 @@ export class Smarts3 {
public async stop() {
await this.s3Instance.close();
}
}
}

View File

@ -1,6 +1,9 @@
import * as plugins from './smarts3.plugins.js';
export const packageDir = plugins.path.join(plugins.smartpath.get.dirnameFromImportMetaUrl(import.meta.url), '../');
export const packageDir = plugins.path.join(
plugins.smartpath.get.dirnameFromImportMetaUrl(import.meta.url),
'../'
);
export const nogitDir = plugins.path.join(packageDir, './.nogit');
export const bucketsDir = plugins.path.join(nogitDir, './bucketsDir');

View File

@ -1,24 +1,16 @@
// node native
import * as path from 'path';
export {
path
}
export { path };
// pushrocks scope
import * as smartbucket from '@pushrocks/smartbucket';
import * as smartfile from '@pushrocks/smartfile';
import * as smartpath from '@pushrocks/smartpath';
export {
smartbucket,
smartfile,
smartpath
}
export { smartbucket, smartfile, smartpath };
// thirdparty scope
import s3rver from 's3rver';
export {
s3rver
}
export { s3rver };