fix(core): update
This commit is contained in:
parent
cca3ade103
commit
ec8f320317
8247
package-lock.json
generated
8247
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
10
package.json
10
package.json
@ -12,9 +12,9 @@
|
||||
"build": "(tsbuild --web)"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@gitzone/tsbuild": "^2.1.25",
|
||||
"@gitzone/tstest": "^1.0.54",
|
||||
"@pushrocks/tapbundle": "^3.2.14",
|
||||
"@gitzone/tsbuild": "^2.1.28",
|
||||
"@gitzone/tstest": "^1.0.60",
|
||||
"@pushrocks/tapbundle": "^3.2.15",
|
||||
"tslint": "^6.1.3",
|
||||
"tslint-config-prettier": "^1.18.0"
|
||||
},
|
||||
@ -24,8 +24,8 @@
|
||||
"@pushrocks/smartpromise": "^3.1.6",
|
||||
"@pushrocks/smartrx": "^2.0.19",
|
||||
"@pushrocks/streamfunction": "^2.0.1",
|
||||
"@types/minio": "^7.0.7",
|
||||
"minio": "^7.0.18"
|
||||
"@types/minio": "^7.0.11",
|
||||
"minio": "^7.0.25"
|
||||
},
|
||||
"private": false,
|
||||
"files": [
|
||||
|
18
test/test.ts
18
test/test.ts
@ -13,16 +13,16 @@ tap.test('should create a valid smartbucket', async () => {
|
||||
testSmartbucket = new smartbucket.SmartBucket({
|
||||
accessKey: testQenv.getEnvVarOnDemand('S3_KEY'),
|
||||
accessSecret: testQenv.getEnvVarOnDemand('S3_SECRET'),
|
||||
endpoint: 'fra1.digitaloceanspaces.com',
|
||||
endpoint: 's3.eu-central-1.wasabisys.com',
|
||||
});
|
||||
});
|
||||
|
||||
tap.skip.test('should create testbucket', async () => {
|
||||
await testSmartbucket.createBucket('testzone');
|
||||
// await testSmartbucket.createBucket('testzone');
|
||||
});
|
||||
|
||||
tap.skip.test('should remove testbucket', async () => {
|
||||
await testSmartbucket.removeBucket('testzone');
|
||||
// await testSmartbucket.removeBucket('testzone');
|
||||
});
|
||||
|
||||
tap.test('should get a bucket', async () => {
|
||||
@ -76,18 +76,6 @@ tap.test('should correctly build paths for sub directories', async () => {
|
||||
console.log(dir4BasePath);
|
||||
});
|
||||
|
||||
tap.test('should list huge file directory', async () => {
|
||||
const servezoneBucket = await smartbucket.Bucket.getBucketByName(testSmartbucket, 'servezone');
|
||||
const servezoneBaseDirectory = await servezoneBucket.getBaseDirectory();
|
||||
const brandfileDirectory = await servezoneBaseDirectory.getSubDirectoryByName(
|
||||
'public/brandfiles'
|
||||
);
|
||||
const files = await brandfileDirectory.listFiles();
|
||||
const directories = await brandfileDirectory.listDirectories();
|
||||
console.log(files);
|
||||
console.log(directories);
|
||||
});
|
||||
|
||||
tap.test('clean up directory style tests', async () => {
|
||||
await myBucket.fastRemove('dir1/file1.txt');
|
||||
await myBucket.fastRemove('dir1/file2.txt');
|
||||
|
@ -3,6 +3,7 @@ import { Bucket } from './smartbucket.classes.bucket';
|
||||
|
||||
export interface ISmartBucketConfig {
|
||||
endpoint: string;
|
||||
port?: number;
|
||||
accessKey: string;
|
||||
accessSecret: string;
|
||||
}
|
||||
@ -19,7 +20,7 @@ export class SmartBucket {
|
||||
this.config = configArg;
|
||||
this.minioClient = new plugins.minio.Client({
|
||||
endPoint: this.config.endpoint,
|
||||
port: 443,
|
||||
port: configArg.port || 443,
|
||||
useSSL: true,
|
||||
accessKey: this.config.accessKey,
|
||||
secretKey: this.config.accessSecret,
|
||||
|
Loading…
Reference in New Issue
Block a user