Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
38f001ab23 | |||
d1429c5a41 | |||
403a0f4fae | |||
91ade8a4d4 | |||
1a571bba90 | |||
bcb66b2ccf | |||
0000984e4b | |||
b391e54083 |
@ -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
24
.vscode/launch.json
vendored
@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -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"
|
||||
}
|
||||
|
307
package-lock.json
generated
307
package-lock.json
generated
@ -1,15 +1,16 @@
|
||||
{
|
||||
"name": "@pushrocks/smartfile",
|
||||
"version": "9.0.3",
|
||||
"version": "9.0.7",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@pushrocks/smartfile",
|
||||
"version": "9.0.3",
|
||||
"version": "9.0.7",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@pushrocks/lik": "^5.0.0",
|
||||
"@pushrocks/smartdelay": "^2.0.13",
|
||||
"@pushrocks/smartfile-interfaces": "^1.0.7",
|
||||
"@pushrocks/smarthash": "^2.1.10",
|
||||
"@pushrocks/smartjson": "^4.0.6",
|
||||
@ -17,6 +18,8 @@
|
||||
"@pushrocks/smartpath": "^4.0.3",
|
||||
"@pushrocks/smartpromise": "^3.1.6",
|
||||
"@pushrocks/smartrequest": "^1.1.52",
|
||||
"@pushrocks/smartstream": "^2.0.1",
|
||||
"@pushrocks/streamfunction": "^4.0.4",
|
||||
"@types/fs-extra": "^9.0.13",
|
||||
"@types/glob": "^7.2.0",
|
||||
"@types/js-yaml": "^4.0.5",
|
||||
@ -2423,15 +2426,6 @@
|
||||
"through2": "^4.0.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@pushrocks/smarthash/node_modules/@types/through2": {
|
||||
"version": "2.0.36",
|
||||
"resolved": "https://verdaccio.lossless.one/@types%2fthrough2/-/through2-2.0.36.tgz",
|
||||
"integrity": "sha512-vuifQksQHJXhV9McpVsXKuhnf3lsoX70PnhcqIAbs9dqLH2NgrGz0DzZPDY3+Yh6eaRqcE1gnCQ6QhBn1/PT5A==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@pushrocks/smarthash/node_modules/readable-stream": {
|
||||
"version": "3.6.0",
|
||||
"resolved": "https://verdaccio.lossless.one/readable-stream/-/readable-stream-3.6.0.tgz",
|
||||
@ -2590,9 +2584,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@pushrocks/smartpromise": {
|
||||
"version": "3.1.6",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartpromise/-/smartpromise-3.1.6.tgz",
|
||||
"integrity": "sha512-v+RyVpspzYuBcV/aWXqwC03TWYeFLj7aWMG3IBDFmH2ssgug+82KLW/gw2WB2aVOEvmSkfI9OVvOQz2OsLbYlA==",
|
||||
"version": "3.1.7",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartpromise/-/smartpromise-3.1.7.tgz",
|
||||
"integrity": "sha512-2gLQCeviEJwZ+cHHtK2Ks98brZatGC6dPXKIs1tVgJsiNgRFjnp90fESuJ1Pmoe7RrS+7J3mO4NtsFHAJJ/y5w==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@pushrocks/smartpuppeteer": {
|
||||
@ -2622,31 +2616,30 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@pushrocks/smartrx": {
|
||||
"version": "2.0.19",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartrx/-/smartrx-2.0.19.tgz",
|
||||
"integrity": "sha512-xKuN2qKpewq4LLwQfGRv6+hG+gFjzoKB6uij3M0NpaPcj/BbO3afnbOv+sczGThf/goMxTTKdQRPXYOp8Rt+Cw==",
|
||||
"version": "2.0.25",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartrx/-/smartrx-2.0.25.tgz",
|
||||
"integrity": "sha512-fryDJvjRdVYsH30xqR+bicp5poTdz7KYZ7Kqm+Yth0Qtk0x7NazENaTJATnWqGSiCbk9GrufVUTKWsT+uIT6kQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@pushrocks/lik": "^4.0.17",
|
||||
"@pushrocks/smartpromise": "^3.0.6",
|
||||
"rxjs": "^6.6.3"
|
||||
"@pushrocks/smartpromise": "^3.1.6",
|
||||
"rxjs": "^7.5.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@pushrocks/smartrx/node_modules/@pushrocks/lik": {
|
||||
"version": "4.0.22",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2flik/-/lik-4.0.22.tgz",
|
||||
"integrity": "sha512-dg6Du7nr/SLU80yJw7a0zk2xX9Vc8SCLZaQMmSRBlsnL1/Z7qpWDOtpRC9VlL9vTLenbvwGTvPWMpOKyyNbiiA==",
|
||||
"license": "MIT",
|
||||
"node_modules/@pushrocks/smartrx/node_modules/rxjs": {
|
||||
"version": "7.5.5",
|
||||
"resolved": "https://verdaccio.lossless.one/rxjs/-/rxjs-7.5.5.tgz",
|
||||
"integrity": "sha512-sy+H0pQofO95VDmFLzyaw9xNJU4KTRSwQIGM6+iG3SypAtCiLDzpeG8sJrNCWn2Up9km+KhkvTdbkrdy+yzZdw==",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@pushrocks/smartdelay": "^2.0.13",
|
||||
"@pushrocks/smartmatch": "^1.0.7",
|
||||
"@pushrocks/smartpromise": "^3.1.6",
|
||||
"@pushrocks/smartrx": "^2.0.19",
|
||||
"@pushrocks/smarttime": "^3.0.38",
|
||||
"@types/minimatch": "^3.0.5",
|
||||
"symbol-tree": "^3.2.4"
|
||||
"tslib": "^2.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@pushrocks/smartrx/node_modules/tslib": {
|
||||
"version": "2.4.0",
|
||||
"resolved": "https://verdaccio.lossless.one/tslib/-/tslib-2.4.0.tgz",
|
||||
"integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==",
|
||||
"license": "0BSD"
|
||||
},
|
||||
"node_modules/@pushrocks/smartshell": {
|
||||
"version": "2.0.30",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartshell/-/smartshell-2.0.30.tgz",
|
||||
@ -2730,6 +2723,40 @@
|
||||
"threads": "1.0.0-beta.4"
|
||||
}
|
||||
},
|
||||
"node_modules/@pushrocks/smartstream": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartstream/-/smartstream-2.0.1.tgz",
|
||||
"integrity": "sha512-h7jRWoBYJyKL+9U7YRGkkcEr2LpQ9MzZsDPI1m2D+VP2pT+zkjEGUEN+fIocGxATIansZzCETK30Trph+mgbig==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@pushrocks/smartpromise": "^3.1.7",
|
||||
"@types/through2": "^2.0.36",
|
||||
"through2": "^4.0.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@pushrocks/smartstream/node_modules/readable-stream": {
|
||||
"version": "3.6.0",
|
||||
"resolved": "https://verdaccio.lossless.one/readable-stream/-/readable-stream-3.6.0.tgz",
|
||||
"integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"inherits": "^2.0.3",
|
||||
"string_decoder": "^1.1.1",
|
||||
"util-deprecate": "^1.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/@pushrocks/smartstream/node_modules/through2": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://verdaccio.lossless.one/through2/-/through2-4.0.2.tgz",
|
||||
"integrity": "sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"readable-stream": "3"
|
||||
}
|
||||
},
|
||||
"node_modules/@pushrocks/smartstring": {
|
||||
"version": "3.0.24",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartstring/-/smartstring-3.0.24.tgz",
|
||||
@ -2832,6 +2859,43 @@
|
||||
"js-yaml": "bin/js-yaml.js"
|
||||
}
|
||||
},
|
||||
"node_modules/@pushrocks/streamfunction": {
|
||||
"version": "4.0.4",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fstreamfunction/-/streamfunction-4.0.4.tgz",
|
||||
"integrity": "sha512-qnGs9cNkUq7nnluQCuX4te+NeB3RoikNNs+kbSCZCSnwYQWvoHXMeobkK8GXAC1bE3kWKAd68ja8cuLvaDebBg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@pushrocks/smartpromise": "^3.1.7",
|
||||
"@pushrocks/smartrx": "^2.0.25",
|
||||
"@types/from2": "^2.3.1",
|
||||
"@types/through2": "^2.0.36",
|
||||
"from2": "^2.3.0",
|
||||
"through2": "^4.0.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@pushrocks/streamfunction/node_modules/readable-stream": {
|
||||
"version": "3.6.0",
|
||||
"resolved": "https://verdaccio.lossless.one/readable-stream/-/readable-stream-3.6.0.tgz",
|
||||
"integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"inherits": "^2.0.3",
|
||||
"string_decoder": "^1.1.1",
|
||||
"util-deprecate": "^1.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/@pushrocks/streamfunction/node_modules/through2": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://verdaccio.lossless.one/through2/-/through2-4.0.2.tgz",
|
||||
"integrity": "sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"readable-stream": "3"
|
||||
}
|
||||
},
|
||||
"node_modules/@pushrocks/tapbundle": {
|
||||
"version": "3.2.14",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2ftapbundle/-/tapbundle-3.2.14.tgz",
|
||||
@ -3221,6 +3285,15 @@
|
||||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/from2": {
|
||||
"version": "2.3.1",
|
||||
"resolved": "https://verdaccio.lossless.one/@types%2ffrom2/-/from2-2.3.1.tgz",
|
||||
"integrity": "sha512-l7kKtohAc5h0CKh6vFMv5WcWvQx40KE6dQneUg22i8c1mwxhVPbN781bYts/mYXxSBrQMhNxkhwg18QY0MfeOg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/fs-extra": {
|
||||
"version": "9.0.13",
|
||||
"resolved": "https://verdaccio.lossless.one/@types%2ffs-extra/-/fs-extra-9.0.13.tgz",
|
||||
@ -3391,10 +3464,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@types/through2": {
|
||||
"version": "2.0.33",
|
||||
"resolved": "https://registry.npmjs.org/@types/through2/-/through2-2.0.33.tgz",
|
||||
"integrity": "sha1-H/LoihAN+1sUDnu5h5HxGUQA0TE=",
|
||||
"dev": true,
|
||||
"version": "2.0.36",
|
||||
"resolved": "https://verdaccio.lossless.one/@types%2fthrough2/-/through2-2.0.36.tgz",
|
||||
"integrity": "sha512-vuifQksQHJXhV9McpVsXKuhnf3lsoX70PnhcqIAbs9dqLH2NgrGz0DzZPDY3+Yh6eaRqcE1gnCQ6QhBn1/PT5A==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/node": "*"
|
||||
@ -5365,7 +5437,6 @@
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
|
||||
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/cors": {
|
||||
@ -7410,6 +7481,16 @@
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/from2": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://verdaccio.lossless.one/from2/-/from2-2.3.0.tgz",
|
||||
"integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"inherits": "^2.0.1",
|
||||
"readable-stream": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/fs-constants": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://verdaccio.lossless.one/fs-constants/-/fs-constants-1.0.0.tgz",
|
||||
@ -8934,7 +9015,6 @@
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
|
||||
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/isexe": {
|
||||
@ -11914,7 +11994,6 @@
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz",
|
||||
"integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/progress": {
|
||||
@ -12330,7 +12409,6 @@
|
||||
"version": "2.3.6",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
|
||||
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"core-util-is": "~1.0.0",
|
||||
@ -12906,6 +12984,7 @@
|
||||
"version": "6.6.7",
|
||||
"resolved": "https://verdaccio.lossless.one/rxjs/-/rxjs-6.6.7.tgz",
|
||||
"integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"tslib": "^1.9.0"
|
||||
@ -14473,6 +14552,7 @@
|
||||
"version": "1.13.0",
|
||||
"resolved": "https://verdaccio.lossless.one/tslib/-/tslib-1.13.0.tgz",
|
||||
"integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==",
|
||||
"dev": true,
|
||||
"license": "0BSD"
|
||||
},
|
||||
"node_modules/tslint": {
|
||||
@ -17164,14 +17244,6 @@
|
||||
"through2": "^4.0.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/through2": {
|
||||
"version": "2.0.36",
|
||||
"resolved": "https://verdaccio.lossless.one/@types%2fthrough2/-/through2-2.0.36.tgz",
|
||||
"integrity": "sha512-vuifQksQHJXhV9McpVsXKuhnf3lsoX70PnhcqIAbs9dqLH2NgrGz0DzZPDY3+Yh6eaRqcE1gnCQ6QhBn1/PT5A==",
|
||||
"requires": {
|
||||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"readable-stream": {
|
||||
"version": "3.6.0",
|
||||
"resolved": "https://verdaccio.lossless.one/readable-stream/-/readable-stream-3.6.0.tgz",
|
||||
@ -17315,9 +17387,9 @@
|
||||
}
|
||||
},
|
||||
"@pushrocks/smartpromise": {
|
||||
"version": "3.1.6",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartpromise/-/smartpromise-3.1.6.tgz",
|
||||
"integrity": "sha512-v+RyVpspzYuBcV/aWXqwC03TWYeFLj7aWMG3IBDFmH2ssgug+82KLW/gw2WB2aVOEvmSkfI9OVvOQz2OsLbYlA=="
|
||||
"version": "3.1.7",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartpromise/-/smartpromise-3.1.7.tgz",
|
||||
"integrity": "sha512-2gLQCeviEJwZ+cHHtK2Ks98brZatGC6dPXKIs1tVgJsiNgRFjnp90fESuJ1Pmoe7RrS+7J3mO4NtsFHAJJ/y5w=="
|
||||
},
|
||||
"@pushrocks/smartpuppeteer": {
|
||||
"version": "1.0.36",
|
||||
@ -17344,28 +17416,26 @@
|
||||
}
|
||||
},
|
||||
"@pushrocks/smartrx": {
|
||||
"version": "2.0.19",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartrx/-/smartrx-2.0.19.tgz",
|
||||
"integrity": "sha512-xKuN2qKpewq4LLwQfGRv6+hG+gFjzoKB6uij3M0NpaPcj/BbO3afnbOv+sczGThf/goMxTTKdQRPXYOp8Rt+Cw==",
|
||||
"version": "2.0.25",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartrx/-/smartrx-2.0.25.tgz",
|
||||
"integrity": "sha512-fryDJvjRdVYsH30xqR+bicp5poTdz7KYZ7Kqm+Yth0Qtk0x7NazENaTJATnWqGSiCbk9GrufVUTKWsT+uIT6kQ==",
|
||||
"requires": {
|
||||
"@pushrocks/lik": "^4.0.17",
|
||||
"@pushrocks/smartpromise": "^3.0.6",
|
||||
"rxjs": "^6.6.3"
|
||||
"@pushrocks/smartpromise": "^3.1.6",
|
||||
"rxjs": "^7.5.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@pushrocks/lik": {
|
||||
"version": "4.0.22",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2flik/-/lik-4.0.22.tgz",
|
||||
"integrity": "sha512-dg6Du7nr/SLU80yJw7a0zk2xX9Vc8SCLZaQMmSRBlsnL1/Z7qpWDOtpRC9VlL9vTLenbvwGTvPWMpOKyyNbiiA==",
|
||||
"rxjs": {
|
||||
"version": "7.5.5",
|
||||
"resolved": "https://verdaccio.lossless.one/rxjs/-/rxjs-7.5.5.tgz",
|
||||
"integrity": "sha512-sy+H0pQofO95VDmFLzyaw9xNJU4KTRSwQIGM6+iG3SypAtCiLDzpeG8sJrNCWn2Up9km+KhkvTdbkrdy+yzZdw==",
|
||||
"requires": {
|
||||
"@pushrocks/smartdelay": "^2.0.13",
|
||||
"@pushrocks/smartmatch": "^1.0.7",
|
||||
"@pushrocks/smartpromise": "^3.1.6",
|
||||
"@pushrocks/smartrx": "^2.0.19",
|
||||
"@pushrocks/smarttime": "^3.0.38",
|
||||
"@types/minimatch": "^3.0.5",
|
||||
"symbol-tree": "^3.2.4"
|
||||
"tslib": "^2.1.0"
|
||||
}
|
||||
},
|
||||
"tslib": {
|
||||
"version": "2.4.0",
|
||||
"resolved": "https://verdaccio.lossless.one/tslib/-/tslib-2.4.0.tgz",
|
||||
"integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ=="
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -17449,6 +17519,36 @@
|
||||
"threads": "1.0.0-beta.4"
|
||||
}
|
||||
},
|
||||
"@pushrocks/smartstream": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartstream/-/smartstream-2.0.1.tgz",
|
||||
"integrity": "sha512-h7jRWoBYJyKL+9U7YRGkkcEr2LpQ9MzZsDPI1m2D+VP2pT+zkjEGUEN+fIocGxATIansZzCETK30Trph+mgbig==",
|
||||
"requires": {
|
||||
"@pushrocks/smartpromise": "^3.1.7",
|
||||
"@types/through2": "^2.0.36",
|
||||
"through2": "^4.0.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"readable-stream": {
|
||||
"version": "3.6.0",
|
||||
"resolved": "https://verdaccio.lossless.one/readable-stream/-/readable-stream-3.6.0.tgz",
|
||||
"integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
|
||||
"requires": {
|
||||
"inherits": "^2.0.3",
|
||||
"string_decoder": "^1.1.1",
|
||||
"util-deprecate": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"through2": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://verdaccio.lossless.one/through2/-/through2-4.0.2.tgz",
|
||||
"integrity": "sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw==",
|
||||
"requires": {
|
||||
"readable-stream": "3"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"@pushrocks/smartstring": {
|
||||
"version": "3.0.24",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartstring/-/smartstring-3.0.24.tgz",
|
||||
@ -17541,6 +17641,39 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"@pushrocks/streamfunction": {
|
||||
"version": "4.0.4",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fstreamfunction/-/streamfunction-4.0.4.tgz",
|
||||
"integrity": "sha512-qnGs9cNkUq7nnluQCuX4te+NeB3RoikNNs+kbSCZCSnwYQWvoHXMeobkK8GXAC1bE3kWKAd68ja8cuLvaDebBg==",
|
||||
"requires": {
|
||||
"@pushrocks/smartpromise": "^3.1.7",
|
||||
"@pushrocks/smartrx": "^2.0.25",
|
||||
"@types/from2": "^2.3.1",
|
||||
"@types/through2": "^2.0.36",
|
||||
"from2": "^2.3.0",
|
||||
"through2": "^4.0.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"readable-stream": {
|
||||
"version": "3.6.0",
|
||||
"resolved": "https://verdaccio.lossless.one/readable-stream/-/readable-stream-3.6.0.tgz",
|
||||
"integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
|
||||
"requires": {
|
||||
"inherits": "^2.0.3",
|
||||
"string_decoder": "^1.1.1",
|
||||
"util-deprecate": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"through2": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://verdaccio.lossless.one/through2/-/through2-4.0.2.tgz",
|
||||
"integrity": "sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw==",
|
||||
"requires": {
|
||||
"readable-stream": "3"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"@pushrocks/tapbundle": {
|
||||
"version": "3.2.14",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2ftapbundle/-/tapbundle-3.2.14.tgz",
|
||||
@ -17858,6 +17991,14 @@
|
||||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"@types/from2": {
|
||||
"version": "2.3.1",
|
||||
"resolved": "https://verdaccio.lossless.one/@types%2ffrom2/-/from2-2.3.1.tgz",
|
||||
"integrity": "sha512-l7kKtohAc5h0CKh6vFMv5WcWvQx40KE6dQneUg22i8c1mwxhVPbN781bYts/mYXxSBrQMhNxkhwg18QY0MfeOg==",
|
||||
"requires": {
|
||||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"@types/fs-extra": {
|
||||
"version": "9.0.13",
|
||||
"resolved": "https://verdaccio.lossless.one/@types%2ffs-extra/-/fs-extra-9.0.13.tgz",
|
||||
@ -18006,10 +18147,9 @@
|
||||
}
|
||||
},
|
||||
"@types/through2": {
|
||||
"version": "2.0.33",
|
||||
"resolved": "https://registry.npmjs.org/@types/through2/-/through2-2.0.33.tgz",
|
||||
"integrity": "sha1-H/LoihAN+1sUDnu5h5HxGUQA0TE=",
|
||||
"dev": true,
|
||||
"version": "2.0.36",
|
||||
"resolved": "https://verdaccio.lossless.one/@types%2fthrough2/-/through2-2.0.36.tgz",
|
||||
"integrity": "sha512-vuifQksQHJXhV9McpVsXKuhnf3lsoX70PnhcqIAbs9dqLH2NgrGz0DzZPDY3+Yh6eaRqcE1gnCQ6QhBn1/PT5A==",
|
||||
"requires": {
|
||||
"@types/node": "*"
|
||||
}
|
||||
@ -19499,8 +19639,7 @@
|
||||
"core-util-is": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
|
||||
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
|
||||
"dev": true
|
||||
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
|
||||
},
|
||||
"cors": {
|
||||
"version": "2.8.5",
|
||||
@ -21037,6 +21176,15 @@
|
||||
"integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=",
|
||||
"dev": true
|
||||
},
|
||||
"from2": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://verdaccio.lossless.one/from2/-/from2-2.3.0.tgz",
|
||||
"integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=",
|
||||
"requires": {
|
||||
"inherits": "^2.0.1",
|
||||
"readable-stream": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"fs-constants": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://verdaccio.lossless.one/fs-constants/-/fs-constants-1.0.0.tgz",
|
||||
@ -22096,8 +22244,7 @@
|
||||
"isarray": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
|
||||
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
|
||||
"dev": true
|
||||
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
|
||||
},
|
||||
"isexe": {
|
||||
"version": "2.0.0",
|
||||
@ -24356,8 +24503,7 @@
|
||||
"process-nextick-args": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz",
|
||||
"integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==",
|
||||
"dev": true
|
||||
"integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw=="
|
||||
},
|
||||
"progress": {
|
||||
"version": "2.0.3",
|
||||
@ -24651,7 +24797,6 @@
|
||||
"version": "2.3.6",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
|
||||
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"core-util-is": "~1.0.0",
|
||||
"inherits": "~2.0.3",
|
||||
@ -25060,6 +25205,7 @@
|
||||
"version": "6.6.7",
|
||||
"resolved": "https://verdaccio.lossless.one/rxjs/-/rxjs-6.6.7.tgz",
|
||||
"integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"tslib": "^1.9.0"
|
||||
}
|
||||
@ -26254,7 +26400,8 @@
|
||||
"tslib": {
|
||||
"version": "1.13.0",
|
||||
"resolved": "https://verdaccio.lossless.one/tslib/-/tslib-1.13.0.tgz",
|
||||
"integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q=="
|
||||
"integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==",
|
||||
"dev": true
|
||||
},
|
||||
"tslint": {
|
||||
"version": "6.1.3",
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@pushrocks/smartfile",
|
||||
"private": false,
|
||||
"version": "9.0.3",
|
||||
"version": "9.0.7",
|
||||
"description": "offers smart ways to work with files in nodejs",
|
||||
"main": "dist_ts/index.js",
|
||||
"typings": "dist_ts/index.d.ts",
|
||||
@ -25,6 +25,7 @@
|
||||
"homepage": "https://gitlab.com/pushrocks/smartfile",
|
||||
"dependencies": {
|
||||
"@pushrocks/lik": "^5.0.0",
|
||||
"@pushrocks/smartdelay": "^2.0.13",
|
||||
"@pushrocks/smartfile-interfaces": "^1.0.7",
|
||||
"@pushrocks/smarthash": "^2.1.10",
|
||||
"@pushrocks/smartjson": "^4.0.6",
|
||||
@ -32,6 +33,8 @@
|
||||
"@pushrocks/smartpath": "^4.0.3",
|
||||
"@pushrocks/smartpromise": "^3.1.6",
|
||||
"@pushrocks/smartrequest": "^1.1.52",
|
||||
"@pushrocks/smartstream": "^2.0.1",
|
||||
"@pushrocks/streamfunction": "^4.0.4",
|
||||
"@types/fs-extra": "^9.0.13",
|
||||
"@types/glob": "^7.2.0",
|
||||
"@types/js-yaml": "^4.0.5",
|
||||
|
@ -213,4 +213,8 @@ tap.test('should create, store and retrieve valid smartfiles', async () => {
|
||||
expect(retrievedString).to.equal(fileString);
|
||||
});
|
||||
|
||||
tap.test('should wait for file to be ready', async () => {
|
||||
await smartfile.fs.waitForFileToBeReady('./test/testassets/mytest.json');
|
||||
});
|
||||
|
||||
tap.start();
|
||||
|
@ -12,4 +12,4 @@ tap.test('should write to a directory', async () => {
|
||||
virtualDir.saveToDisk('./test/testassets/test');
|
||||
});
|
||||
|
||||
tap.start();
|
||||
tap.start();
|
||||
|
8
ts/00_commitinfo_data.ts
Normal file
8
ts/00_commitinfo_data.ts
Normal file
@ -0,0 +1,8 @@
|
||||
/**
|
||||
* autocreated commitinfo by @pushrocks/commitinfo
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@pushrocks/smartfile',
|
||||
version: '9.0.7',
|
||||
description: 'offers smart ways to work with files in nodejs'
|
||||
}
|
@ -1,12 +1,13 @@
|
||||
import * as plugins from './smartfile.plugins';
|
||||
import * as fsMod from './smartfile.fs';
|
||||
import * as fsStreamMod from './smartfile.fsstream';
|
||||
import * as interpreterMod from './smartfile.interpreter';
|
||||
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;
|
||||
export const fs = fsMod;
|
||||
export const fsStream = fsStreamMod;
|
||||
export const interpreter = interpreterMod;
|
||||
export const memory = memoryMod;
|
||||
|
@ -77,10 +77,10 @@ export class Smartfile extends plugins.smartjson.Smartjson {
|
||||
/**
|
||||
* a parsed path
|
||||
*/
|
||||
public get parsedPath (): plugins.path.ParsedPath {
|
||||
public get parsedPath(): plugins.path.ParsedPath {
|
||||
return plugins.path.parse(this.path);
|
||||
};
|
||||
public get absolutePath () {
|
||||
}
|
||||
public get absolutePath() {
|
||||
return plugins.path.join(this.base, this.path);
|
||||
}
|
||||
|
||||
|
@ -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()),
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -377,11 +377,25 @@ export const listFileTree = async (
|
||||
/**
|
||||
* checks wether a file is ready for processing
|
||||
*/
|
||||
export const waitForFileToBeReady = async (filePathArg: string) => {
|
||||
const limitedArray = new plugins.lik.LimitedArray<string>(3);
|
||||
if(!plugins.path.isAbsolute(filePathArg)) {
|
||||
export const waitForFileToBeReady = async (filePathArg: string): Promise<void> => {
|
||||
if (!plugins.path.isAbsolute(filePathArg)) {
|
||||
filePathArg = plugins.path.resolve(filePathArg);
|
||||
};
|
||||
const stats = await plugins.fsExtra.stat(filePathArg);
|
||||
stats.size
|
||||
}
|
||||
}
|
||||
const limitedArray = new plugins.lik.LimitedArray<number>(3);
|
||||
let fileReady = false;
|
||||
while (!fileReady) {
|
||||
const stats = await plugins.fsExtra.stat(filePathArg);
|
||||
limitedArray.addOne(stats.size);
|
||||
if (
|
||||
limitedArray.array.length < 3 ||
|
||||
!(
|
||||
limitedArray.array[0] === limitedArray.array[1] &&
|
||||
limitedArray.array[1] === limitedArray.array[2]
|
||||
)
|
||||
) {
|
||||
await plugins.smartdelay.delayFor(5000);
|
||||
} else {
|
||||
fileReady = true;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
17
ts/smartfile.fsstream.ts
Normal file
17
ts/smartfile.fsstream.ts
Normal file
@ -0,0 +1,17 @@
|
||||
/*
|
||||
This file contains logic for streaming things from and to the filesystem
|
||||
*/
|
||||
import * as plugins from './smartfile.plugins';
|
||||
|
||||
export const createReadStream = (pathArg: string) => {
|
||||
return plugins.fs.createReadStream(pathArg);
|
||||
};
|
||||
|
||||
export const createWriteStream = (pathArg: string) => {
|
||||
return plugins.fs.createWriteStream(pathArg);
|
||||
};
|
||||
|
||||
|
||||
export const streamDirectory = async (dirPathArg: string) => {
|
||||
|
||||
}
|
@ -7,14 +7,27 @@ export { fs, path };
|
||||
// @pushrocks scope
|
||||
import * as lik from '@pushrocks/lik';
|
||||
import * as smartfileInterfaces from '@pushrocks/smartfile-interfaces';
|
||||
import * as smartdelay from '@pushrocks/smartdelay';
|
||||
import * as smarthash from '@pushrocks/smarthash';
|
||||
import * as smartjson from '@pushrocks/smartjson';
|
||||
import * as smartmime from '@pushrocks/smartmime';
|
||||
import * as smartpath from '@pushrocks/smartpath';
|
||||
import * as smartpromise from '@pushrocks/smartpromise';
|
||||
import * as smartrequest from '@pushrocks/smartrequest';
|
||||
import * as smartstream from '@pushrocks/smartstream';
|
||||
|
||||
export { lik, smartfileInterfaces, smarthash, smartjson, smartmime, smartpath, smartpromise, smartrequest };
|
||||
export {
|
||||
lik,
|
||||
smartfileInterfaces,
|
||||
smartdelay,
|
||||
smarthash,
|
||||
smartjson,
|
||||
smartmime,
|
||||
smartpath,
|
||||
smartpromise,
|
||||
smartrequest,
|
||||
smartstream
|
||||
};
|
||||
|
||||
// third party scope
|
||||
import * as fsExtra from 'fs-extra';
|
||||
|
Reference in New Issue
Block a user