4 Commits

Author SHA1 Message Date
703bfe7fe8 1.0.10 2021-12-20 19:36:54 +01:00
545f5d35f5 fix(core): update 2021-12-20 19:36:54 +01:00
070eb559b9 1.0.9 2021-12-20 18:29:19 +01:00
d07e30d7fb fix(core): update 2021-12-20 18:29:18 +01:00
4 changed files with 10 additions and 10 deletions

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "@pushrocks/smarts3",
"version": "1.0.8",
"version": "1.0.10",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@pushrocks/smarts3",
"version": "1.0.8",
"version": "1.0.10",
"license": "MIT",
"dependencies": {
"@pushrocks/smartfile": "^9.0.3",

View File

@ -1,6 +1,6 @@
{
"name": "@pushrocks/smarts3",
"version": "1.0.8",
"version": "1.0.10",
"private": false,
"description": "create an s3 endpoint that maps to a local directory",
"main": "dist_ts/index.js",

View File

@ -15,13 +15,7 @@ tap.test('should create a smarts3 instance and run it', async toolsArg => {
});
tap.test('should be able to access buckets', async () => {
const smartbucketInstance = new plugins.smartbucket.SmartBucket({
endpoint: 'localhost',
port: 3000,
useSsl: false,
accessKey: 'S3RVER',
accessSecret: 'S3RVER'
});
const smartbucketInstance = new plugins.smartbucket.SmartBucket(await testSmarts3Instance.getS3Descriptor());
const bucket = await smartbucketInstance.createBucket('testbucket');
const baseDirectory = await bucket.getBaseDirectory();
await baseDirectory.fastStore('subdir/hello.txt', 'hi there!');

View File

@ -52,6 +52,12 @@ export class Smarts3 {
}
}
public async createBucket(bucketNameArg: string) {
const smartbucketInstance = new plugins.smartbucket.SmartBucket(await this.getS3Descriptor());
const bucket = await smartbucketInstance.createBucket(bucketNameArg);
return bucket;
}
public async stop() {
await this.s3Instance.close();
}