fix(core): update
This commit is contained in:
parent
365eea59bd
commit
77e69171e2
9977
package-lock.json
generated
9977
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
14
package.json
14
package.json
@ -12,19 +12,19 @@
|
|||||||
"build": "(tsbuild --web)"
|
"build": "(tsbuild --web)"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@gitzone/tsbuild": "^2.1.24",
|
"@gitzone/tsbuild": "^2.1.25",
|
||||||
"@gitzone/tstest": "^1.0.33",
|
"@gitzone/tstest": "^1.0.52",
|
||||||
"@pushrocks/tapbundle": "^3.2.1",
|
"@pushrocks/tapbundle": "^3.2.9",
|
||||||
"tslint": "^6.1.2",
|
"tslint": "^6.1.3",
|
||||||
"tslint-config-prettier": "^1.18.0"
|
"tslint-config-prettier": "^1.18.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@pushrocks/qenv": "^4.0.10",
|
"@pushrocks/qenv": "^4.0.10",
|
||||||
"@pushrocks/smartpath": "^4.0.3",
|
"@pushrocks/smartpath": "^4.0.3",
|
||||||
"@pushrocks/smartpromise": "^3.0.6",
|
"@pushrocks/smartpromise": "^3.0.6",
|
||||||
"@pushrocks/smartrx": "^2.0.15",
|
"@pushrocks/smartrx": "^2.0.19",
|
||||||
"@pushrocks/streamfunction": "^1.0.24",
|
"@pushrocks/streamfunction": "^2.0.1",
|
||||||
"@types/minio": "^7.0.5",
|
"@types/minio": "^7.0.6",
|
||||||
"minio": "^7.0.16"
|
"minio": "^7.0.16"
|
||||||
},
|
},
|
||||||
"private": false,
|
"private": false,
|
||||||
|
@ -79,9 +79,11 @@ tap.test('should correctly build paths for sub directories', async () => {
|
|||||||
tap.test('should list huge file directory', async () => {
|
tap.test('should list huge file directory', async () => {
|
||||||
const servezoneBucket = await smartbucket.Bucket.getBucketByName(testSmartbucket, 'servezone');
|
const servezoneBucket = await smartbucket.Bucket.getBucketByName(testSmartbucket, 'servezone');
|
||||||
const servezoneBaseDirectory = await servezoneBucket.getBaseDirectory();
|
const servezoneBaseDirectory = await servezoneBucket.getBaseDirectory();
|
||||||
this.brandfileDirectory = await servezoneBaseDirectory.getSubDirectoryByName('brandfiles');
|
const brandfileDirectory = await servezoneBaseDirectory.getSubDirectoryByName('public/brandfiles');
|
||||||
const files = servezoneBaseDirectory.listFiles();
|
const files = await brandfileDirectory.listFiles();
|
||||||
|
const directories = await brandfileDirectory.listDirectories();
|
||||||
console.log(files);
|
console.log(files);
|
||||||
|
console.log(directories);
|
||||||
});
|
});
|
||||||
|
|
||||||
tap.test('clean up directory style tests', async () => {
|
tap.test('clean up directory style tests', async () => {
|
||||||
|
@ -43,12 +43,20 @@ export class Directory {
|
|||||||
const parentDirectories = this.getParentDirectories();
|
const parentDirectories = this.getParentDirectories();
|
||||||
let basePath = '';
|
let basePath = '';
|
||||||
for (const parentDir of parentDirectories) {
|
for (const parentDir of parentDirectories) {
|
||||||
if (parentDir.name === '') {
|
if (!parentDir.name && !basePath) {
|
||||||
basePath = this.name + '/';
|
basePath = this.name + '/';
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
basePath = parentDir.name + '/' + this.name;
|
if (parentDir.name && !basePath) {
|
||||||
|
basePath = parentDir.name + '/' + this.name + '/';
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (parentDir.name && basePath) {
|
||||||
|
basePath = parentDir.name + '/' + basePath;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
console.log(basePath);
|
||||||
return basePath;
|
return basePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user