fix(updated repo structure): update

This commit is contained in:
Philipp Kunz 2022-03-11 09:46:54 +01:00
parent 1a571bba90
commit 91ade8a4d4
11 changed files with 31 additions and 33 deletions

View File

@ -12,6 +12,9 @@ stages:
- release
- metadata
before_script:
- npm install -g @shipzone/npmci
# ====================
# security stage
# ====================
@ -36,6 +39,7 @@ auditProductionDependencies:
- npmci command npm audit --audit-level=high --only=prod --production
tags:
- docker
allow_failure: true
auditDevDependencies:
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci

24
.vscode/launch.json vendored
View File

@ -2,28 +2,10 @@
"version": "0.2.0",
"configurations": [
{
"name": "current file",
"type": "node",
"command": "npm test",
"name": "Run npm test",
"request": "launch",
"args": [
"${relativeFile}"
],
"runtimeArgs": ["-r", "@gitzone/tsrun"],
"cwd": "${workspaceRoot}",
"protocol": "inspector",
"internalConsoleOptions": "openOnSessionStart"
},
{
"name": "test.ts",
"type": "node",
"request": "launch",
"args": [
"test/test.ts"
],
"runtimeArgs": ["-r", "@gitzone/tsrun"],
"cwd": "${workspaceRoot}",
"protocol": "inspector",
"internalConsoleOptions": "openOnSessionStart"
"type": "node-terminal"
}
]
}

View File

@ -14,7 +14,7 @@
"githost": "gitlab.com",
"gitscope": "pushrocks",
"gitrepo": "smartfile",
"shortDescription": "smart ways to work with files in nodejs",
"description": "smart ways to work with files in nodejs",
"npmPackagename": "@pushrocks/smartfile",
"license": "MIT"
}

View File

@ -214,7 +214,7 @@ tap.test('should create, store and retrieve valid smartfiles', async () => {
});
tap.test('should wait for file to be ready', async () => {
await smartfile.fs.waitForFileToBeReady('./test/testassets/mytest.json')
})
await smartfile.fs.waitForFileToBeReady('./test/testassets/mytest.json');
});
tap.start();

View File

@ -6,7 +6,6 @@ import * as memoryMod from './smartfile.memory';
export { Smartfile, ISmartfileConstructorOptions } from './smartfile.classes.smartfile';
export { VirtualDirectory } from './smartfile.classes.virtualdirectory';
export let fs = fsMod;
export let interpreter = interpreterMod;
export let memory = memoryMod;

View File

@ -79,7 +79,7 @@ export class Smartfile extends plugins.smartjson.Smartjson {
*/
public get parsedPath(): plugins.path.ParsedPath {
return plugins.path.parse(this.path);
};
}
public get absolutePath() {
return plugins.path.join(this.base, this.path);
}

View File

@ -42,7 +42,7 @@ export class VirtualDirectory {
public async toVirtualDirTransferableObject(): Promise<plugins.smartfileInterfaces.VirtualDirTransferableObject> {
return {
files: this.smartfileArray.map(smartfileArg => smartfileArg.foldToJson())
files: this.smartfileArray.map((smartfileArg) => smartfileArg.foldToJson()),
};
}

View File

@ -388,7 +388,10 @@ export const waitForFileToBeReady = async (filePathArg: string): Promise<void> =
limitedArray.addOne(stats.size);
if (
limitedArray.array.length < 3 ||
!(limitedArray.array[0] === limitedArray.array[1] && limitedArray.array[1] === limitedArray.array[2])
!(
limitedArray.array[0] === limitedArray.array[1] &&
limitedArray.array[1] === limitedArray.array[2]
)
) {
await plugins.smartdelay.delayFor(5000);
} else {

View File

@ -15,7 +15,17 @@ import * as smartpath from '@pushrocks/smartpath';
import * as smartpromise from '@pushrocks/smartpromise';
import * as smartrequest from '@pushrocks/smartrequest';
export { lik, smartfileInterfaces, smartdelay, smarthash, smartjson, smartmime, smartpath, smartpromise, smartrequest };
export {
lik,
smartfileInterfaces,
smartdelay,
smarthash,
smartjson,
smartmime,
smartpath,
smartpromise,
smartrequest,
};
// third party scope
import * as fsExtra from 'fs-extra';