@tachybase/module-backup 1.3.23 → 1.3.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/externalVersion.js +4 -4
- package/dist/node_modules/@hapi/topo/package.json +1 -1
- package/dist/node_modules/archiver/index.js +16 -11
- package/dist/node_modules/archiver/package.json +1 -1
- package/dist/node_modules/cron-parser/package.json +1 -1
- package/dist/node_modules/semver/package.json +1 -1
- package/dist/node_modules/yauzl/package.json +1 -1
- package/dist/server/dumper.js +4 -5
- package/dist/server/restorer.js +3 -3
- package/package.json +9 -10
- package/dist/node_modules/mkdirp/LICENSE +0 -21
- package/dist/node_modules/mkdirp/bin/cmd.js +0 -68
- package/dist/node_modules/mkdirp/index.js +0 -1
- package/dist/node_modules/mkdirp/lib/find-made.js +0 -29
- package/dist/node_modules/mkdirp/lib/mkdirp-manual.js +0 -64
- package/dist/node_modules/mkdirp/lib/mkdirp-native.js +0 -39
- package/dist/node_modules/mkdirp/lib/opts-arg.js +0 -23
- package/dist/node_modules/mkdirp/lib/path-arg.js +0 -29
- package/dist/node_modules/mkdirp/lib/use-native.js +0 -10
- package/dist/node_modules/mkdirp/package.json +0 -1
- package/dist/node_modules/mkdirp/readme.markdown +0 -266
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"archiver","version":"
|
|
1
|
+
{"name":"archiver","version":"7.0.1","description":"a streaming interface for archive generation","homepage":"https://github.com/archiverjs/node-archiver","author":{"name":"Chris Talkington","url":"http://christalkington.com/"},"repository":{"type":"git","url":"https://github.com/archiverjs/node-archiver.git"},"bugs":{"url":"https://github.com/archiverjs/node-archiver/issues"},"license":"MIT","main":"index.js","files":["index.js","lib"],"engines":{"node":">= 14"},"scripts":{"test":"mocha --reporter dot","bench":"node benchmark/simple/pack-zip.js"},"dependencies":{"archiver-utils":"^5.0.2","async":"^3.2.4","buffer-crc32":"^1.0.0","readable-stream":"^4.0.0","readdir-glob":"^1.1.2","tar-stream":"^3.0.0","zip-stream":"^6.0.1"},"devDependencies":{"archiver-jsdoc-theme":"1.1.3","chai":"4.4.1","jsdoc":"4.0.2","mkdirp":"3.0.1","mocha":"10.3.0","rimraf":"5.0.5","stream-bench":"0.1.2","tar":"6.2.0","yauzl":"3.1.2"},"keywords":["archive","archiver","stream","zip","tar"],"publishConfig":{"registry":"https://registry.npmjs.org/"},"_lastModified":"2025-09-02T09:52:20.484Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"cron-parser","version":"4.9.0","description":"Node.js library for parsing crontab instructions","main":"lib/parser.js","types":"types/index.d.ts","typesVersions":{"<4.1":{"*":["types/ts3/*"]}},"directories":{"test":"test"},"scripts":{"test:tsd":"tsd","test:unit":"TZ=UTC tap ./test/*.js","test:cover":"TZ=UTC tap --coverage-report=html ./test/*.js","lint":"eslint .","lint:fix":"eslint --fix .","test":"npm run lint && npm run test:unit && npm run test:tsd"},"repository":{"type":"git","url":"https://github.com/harrisiirak/cron-parser.git"},"keywords":["cron","crontab","parser"],"author":"Harri Siirak","contributors":["Nicholas Clawson","Daniel Prentis <daniel@salsitasoft.com>","Renault John Lecoultre","Richard Astbury <richard.astbury@gmail.com>","Meaglin Wasabi <Meaglin.wasabi@gmail.com>","Mike Kusold <hello@mikekusold.com>","Alex Kit <alex.kit@atmajs.com>","Santiago Gimeno <santiago.gimeno@gmail.com>","Daniel <darc.tec@gmail.com>","Christian Steininger <christian.steininger.cs@gmail.com>","Mykola Piskovyi <m.piskovyi@gmail.com>","Brian Vaughn <brian.david.vaughn@gmail.com>","Nicholas Clawson <nickclaw@gmail.com>","Yasuhiroki <yasuhiroki.duck@gmail.com>","Nicholas Clawson <nickclaw@gmail.com>","Brendan Warkentin <faazshift@gmail.com>","Charlie Fish <fishcharlie.code@gmail.com>","Ian Graves <ian+diskimage@iangrav.es>","Andy Thompson <me@andytson.com>","Regev Brody <regevbr@gmail.com>"],"license":"MIT","dependencies":{"luxon":"^3.2.1"},"devDependencies":{"eslint":"^8.27.0","sinon":"^15.0.1","tap":"^16.3.3","tsd":"^0.26.0"},"engines":{"node":">=12.0.0"},"browser":{"fs":false},"tap":{"check-coverage":false},"tsd":{"directory":"test","compilerOptions":{"lib":["es2017","dom"]}},"files":["lib","types","LICENSE","README.md"],"_lastModified":"2025-
|
|
1
|
+
{"name":"cron-parser","version":"4.9.0","description":"Node.js library for parsing crontab instructions","main":"lib/parser.js","types":"types/index.d.ts","typesVersions":{"<4.1":{"*":["types/ts3/*"]}},"directories":{"test":"test"},"scripts":{"test:tsd":"tsd","test:unit":"TZ=UTC tap ./test/*.js","test:cover":"TZ=UTC tap --coverage-report=html ./test/*.js","lint":"eslint .","lint:fix":"eslint --fix .","test":"npm run lint && npm run test:unit && npm run test:tsd"},"repository":{"type":"git","url":"https://github.com/harrisiirak/cron-parser.git"},"keywords":["cron","crontab","parser"],"author":"Harri Siirak","contributors":["Nicholas Clawson","Daniel Prentis <daniel@salsitasoft.com>","Renault John Lecoultre","Richard Astbury <richard.astbury@gmail.com>","Meaglin Wasabi <Meaglin.wasabi@gmail.com>","Mike Kusold <hello@mikekusold.com>","Alex Kit <alex.kit@atmajs.com>","Santiago Gimeno <santiago.gimeno@gmail.com>","Daniel <darc.tec@gmail.com>","Christian Steininger <christian.steininger.cs@gmail.com>","Mykola Piskovyi <m.piskovyi@gmail.com>","Brian Vaughn <brian.david.vaughn@gmail.com>","Nicholas Clawson <nickclaw@gmail.com>","Yasuhiroki <yasuhiroki.duck@gmail.com>","Nicholas Clawson <nickclaw@gmail.com>","Brendan Warkentin <faazshift@gmail.com>","Charlie Fish <fishcharlie.code@gmail.com>","Ian Graves <ian+diskimage@iangrav.es>","Andy Thompson <me@andytson.com>","Regev Brody <regevbr@gmail.com>"],"license":"MIT","dependencies":{"luxon":"^3.2.1"},"devDependencies":{"eslint":"^8.27.0","sinon":"^15.0.1","tap":"^16.3.3","tsd":"^0.26.0"},"engines":{"node":">=12.0.0"},"browser":{"fs":false},"tap":{"check-coverage":false},"tsd":{"directory":"test","compilerOptions":{"lib":["es2017","dom"]}},"files":["lib","types","LICENSE","README.md"],"_lastModified":"2025-09-02T09:52:21.473Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"semver","version":"7.7.2","description":"The semantic version parser used by npm.","main":"index.js","scripts":{"test":"tap","snap":"tap","lint":"npm run eslint","postlint":"template-oss-check","lintfix":"npm run eslint -- --fix","posttest":"npm run lint","template-oss-apply":"template-oss-apply --force","eslint":"eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\""},"devDependencies":{"@npmcli/eslint-config":"^5.0.0","@npmcli/template-oss":"4.24.3","benchmark":"^2.1.4","tap":"^16.0.0"},"license":"ISC","repository":{"type":"git","url":"git+https://github.com/npm/node-semver.git"},"bin":{"semver":"bin/semver.js"},"files":["bin/","lib/","classes/","functions/","internal/","ranges/","index.js","preload.js","range.bnf"],"tap":{"timeout":30,"coverage-map":"map.js","nyc-arg":["--exclude","tap-snapshots/**"]},"engines":{"node":">=10"},"author":"GitHub Inc.","templateOSS":{"//@npmcli/template-oss":"This file is partially managed by @npmcli/template-oss. Edits may be overwritten.","version":"4.24.3","engines":">=10","distPaths":["classes/","functions/","internal/","ranges/","index.js","preload.js","range.bnf"],"allowPaths":["/classes/","/functions/","/internal/","/ranges/","/index.js","/preload.js","/range.bnf","/benchmarks"],"publish":"true"},"_lastModified":"2025-
|
|
1
|
+
{"name":"semver","version":"7.7.2","description":"The semantic version parser used by npm.","main":"index.js","scripts":{"test":"tap","snap":"tap","lint":"npm run eslint","postlint":"template-oss-check","lintfix":"npm run eslint -- --fix","posttest":"npm run lint","template-oss-apply":"template-oss-apply --force","eslint":"eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\""},"devDependencies":{"@npmcli/eslint-config":"^5.0.0","@npmcli/template-oss":"4.24.3","benchmark":"^2.1.4","tap":"^16.0.0"},"license":"ISC","repository":{"type":"git","url":"git+https://github.com/npm/node-semver.git"},"bin":{"semver":"bin/semver.js"},"files":["bin/","lib/","classes/","functions/","internal/","ranges/","index.js","preload.js","range.bnf"],"tap":{"timeout":30,"coverage-map":"map.js","nyc-arg":["--exclude","tap-snapshots/**"]},"engines":{"node":">=10"},"author":"GitHub Inc.","templateOSS":{"//@npmcli/template-oss":"This file is partially managed by @npmcli/template-oss. Edits may be overwritten.","version":"4.24.3","engines":">=10","distPaths":["classes/","functions/","internal/","ranges/","index.js","preload.js","range.bnf"],"allowPaths":["/classes/","/functions/","/internal/","/ranges/","/index.js","/preload.js","/range.bnf","/benchmarks"],"publish":"true"},"_lastModified":"2025-09-02T09:52:20.855Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"yauzl","version":"3.2.0","description":"yet another unzip library for node","engines":{"node":">=12"},"main":"index.js","scripts":{"test":"node test/test.js"},"repository":{"type":"git","url":"git+https://github.com/thejoshwolfe/yauzl.git"},"keywords":["unzip","zip","stream","archive","file"],"author":"Josh Wolfe <thejoshwolfe@gmail.com>","license":"MIT","bugs":{"url":"https://github.com/thejoshwolfe/yauzl/issues"},"homepage":"https://github.com/thejoshwolfe/yauzl","dependencies":{"buffer-crc32":"~0.2.3","pend":"~1.2.0"},"devDependencies":{"bl":"^6.0.11"},"files":["fd-slicer.js","index.js"],"_lastModified":"2025-
|
|
1
|
+
{"name":"yauzl","version":"3.2.0","description":"yet another unzip library for node","engines":{"node":">=12"},"main":"index.js","scripts":{"test":"node test/test.js"},"repository":{"type":"git","url":"git+https://github.com/thejoshwolfe/yauzl.git"},"keywords":["unzip","zip","stream","archive","file"],"author":"Josh Wolfe <thejoshwolfe@gmail.com>","license":"MIT","bugs":{"url":"https://github.com/thejoshwolfe/yauzl/issues"},"homepage":"https://github.com/thejoshwolfe/yauzl","dependencies":{"buffer-crc32":"~0.2.3","pend":"~1.2.0"},"devDependencies":{"bl":"^6.0.11"},"files":["fd-slicer.js","index.js"],"_lastModified":"2025-09-02T09:52:21.033Z"}
|
package/dist/server/dumper.js
CHANGED
|
@@ -40,7 +40,6 @@ var import_server = require("@tego/server");
|
|
|
40
40
|
var import_archiver = __toESM(require("archiver"));
|
|
41
41
|
var import_dayjs = __toESM(require("dayjs"));
|
|
42
42
|
var import_lodash = __toESM(require("lodash"));
|
|
43
|
-
var import_mkdirp = __toESM(require("mkdirp"));
|
|
44
43
|
var import_app_migrator = require("./app-migrator");
|
|
45
44
|
var import_field_value_writer = require("./field-value-writer");
|
|
46
45
|
var import_utils = require("./utils");
|
|
@@ -143,9 +142,9 @@ const _Dumper = class _Dumper extends import_app_migrator.AppMigrator {
|
|
|
143
142
|
}
|
|
144
143
|
backUpStorageDir(appName) {
|
|
145
144
|
if (appName && appName !== "main") {
|
|
146
|
-
return import_node_path.default.resolve(process.
|
|
145
|
+
return import_node_path.default.resolve(process.env.TEGO_RUNTIME_HOME, "storage", "backups", appName);
|
|
147
146
|
}
|
|
148
|
-
return import_node_path.default.resolve(process.
|
|
147
|
+
return import_node_path.default.resolve(process.env.TEGO_RUNTIME_HOME, "storage", "backups");
|
|
149
148
|
}
|
|
150
149
|
async allBackUpFilePaths(options) {
|
|
151
150
|
const dirname = (options == null ? void 0 : options.dir) || this.backUpStorageDir(options == null ? void 0 : options.appName);
|
|
@@ -186,7 +185,7 @@ const _Dumper = class _Dumper extends import_app_migrator.AppMigrator {
|
|
|
186
185
|
}
|
|
187
186
|
async writeLockFile(fileName, appName) {
|
|
188
187
|
const dirname = this.backUpStorageDir(appName);
|
|
189
|
-
await
|
|
188
|
+
await import_promises.default.mkdir(dirname, { recursive: true });
|
|
190
189
|
const filePath = this.lockFilePath(fileName, appName);
|
|
191
190
|
await import_promises.default.writeFile(filePath, "lock", "utf8");
|
|
192
191
|
return filePath;
|
|
@@ -378,7 +377,7 @@ const _Dumper = class _Dumper extends import_app_migrator.AppMigrator {
|
|
|
378
377
|
}
|
|
379
378
|
async packDumpedDir(fileName, appName) {
|
|
380
379
|
const dirname = this.backUpStorageDir(appName);
|
|
381
|
-
await
|
|
380
|
+
await import_promises.default.mkdir(dirname, { recursive: true });
|
|
382
381
|
const filePath = import_node_path.default.resolve(dirname, fileName);
|
|
383
382
|
const output = import_node_fs.default.createWriteStream(filePath);
|
|
384
383
|
const archive = (0, import_archiver.default)("zip", {
|
package/dist/server/restorer.js
CHANGED
|
@@ -33,8 +33,8 @@ module.exports = __toCommonJS(restorer_exports);
|
|
|
33
33
|
var import_node_fs = __toESM(require("node:fs"));
|
|
34
34
|
var import_promises = __toESM(require("node:fs/promises"));
|
|
35
35
|
var import_node_path = __toESM(require("node:path"));
|
|
36
|
-
var Topo = __toESM(require("@hapi/topo"));
|
|
37
36
|
var import_server = require("@tego/server");
|
|
37
|
+
var Topo = __toESM(require("@hapi/topo"));
|
|
38
38
|
var import_lodash = __toESM(require("lodash"));
|
|
39
39
|
var import_semver = __toESM(require("semver"));
|
|
40
40
|
var import_yauzl = __toESM(require("yauzl"));
|
|
@@ -71,10 +71,10 @@ class Restorer extends import_app_migrator.AppMigrator {
|
|
|
71
71
|
if (import_node_path.default.isAbsolute(backUpFilePath)) {
|
|
72
72
|
this.backUpFilePath = backUpFilePath;
|
|
73
73
|
} else if (import_node_path.default.basename(backUpFilePath) === backUpFilePath) {
|
|
74
|
-
const dirname = import_node_path.default.resolve(process.
|
|
74
|
+
const dirname = import_node_path.default.resolve(process.env.TEGO_RUNTIME_HOME, "storage", "duplicator");
|
|
75
75
|
this.backUpFilePath = import_node_path.default.resolve(dirname, backUpFilePath);
|
|
76
76
|
} else {
|
|
77
|
-
this.backUpFilePath = import_node_path.default.resolve(process.
|
|
77
|
+
this.backUpFilePath = import_node_path.default.resolve(process.env.TEGO_RUNTIME_HOME, backUpFilePath);
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
async parseBackupFile() {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tachybase/module-backup",
|
|
3
3
|
"displayName": "App backup & restore",
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.25",
|
|
5
5
|
"description": "Backup and restore applications for scenarios such as application replication, migration, and upgrades.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"System management"
|
|
@@ -11,15 +11,15 @@
|
|
|
11
11
|
"devDependencies": {
|
|
12
12
|
"@ant-design/icons": "^5.6.1",
|
|
13
13
|
"@hapi/topo": "^6.0.2",
|
|
14
|
-
"@tachybase/schema": "
|
|
15
|
-
"@tachybase/test": "
|
|
16
|
-
"@tego/client": "
|
|
17
|
-
"@tego/server": "
|
|
14
|
+
"@tachybase/schema": "*",
|
|
15
|
+
"@tachybase/test": "*",
|
|
16
|
+
"@tego/client": "*",
|
|
17
|
+
"@tego/server": "*",
|
|
18
18
|
"@types/archiver": "^5.3.4",
|
|
19
19
|
"@types/file-saver": "^2.0.7",
|
|
20
20
|
"@types/lodash": "^4.17.20",
|
|
21
21
|
"antd": "5.22.5",
|
|
22
|
-
"archiver": "^
|
|
22
|
+
"archiver": "^7.0.1",
|
|
23
23
|
"content-disposition": "^0.5.4",
|
|
24
24
|
"cron-parser": "4.9.0",
|
|
25
25
|
"dayjs": "1.11.13",
|
|
@@ -27,16 +27,15 @@
|
|
|
27
27
|
"file-saver": "^2.0.5",
|
|
28
28
|
"koa-send": "^5.0.1",
|
|
29
29
|
"lodash": "4.17.21",
|
|
30
|
-
"mkdirp": "^1.0.4",
|
|
31
30
|
"object-path": "^0.11.8",
|
|
32
31
|
"react": "18.3.1",
|
|
33
32
|
"react-i18next": "15.2.0",
|
|
34
33
|
"react-js-cron": "^3.2.0",
|
|
35
34
|
"semver": "7.7.2",
|
|
36
|
-
"tar": "^
|
|
35
|
+
"tar": "^7.4.3",
|
|
37
36
|
"yauzl": "^3.2.0",
|
|
38
|
-
"@tachybase/client": "1.3.
|
|
39
|
-
"@tachybase/module-worker-thread": "1.3.
|
|
37
|
+
"@tachybase/client": "1.3.25",
|
|
38
|
+
"@tachybase/module-worker-thread": "1.3.25"
|
|
40
39
|
},
|
|
41
40
|
"description.zh-CN": "备份和还原应用,可用于应用的复制、迁移、升级等场景。",
|
|
42
41
|
"displayName.zh-CN": "应用的备份与还原",
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
Copyright James Halliday (mail@substack.net) and Isaac Z. Schlueter (i@izs.me)
|
|
2
|
-
|
|
3
|
-
This project is free software released under the MIT license:
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
|
13
|
-
all copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
-
THE SOFTWARE.
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
const usage = () => `
|
|
4
|
-
usage: mkdirp [DIR1,DIR2..] {OPTIONS}
|
|
5
|
-
|
|
6
|
-
Create each supplied directory including any necessary parent directories
|
|
7
|
-
that don't yet exist.
|
|
8
|
-
|
|
9
|
-
If the directory already exists, do nothing.
|
|
10
|
-
|
|
11
|
-
OPTIONS are:
|
|
12
|
-
|
|
13
|
-
-m<mode> If a directory needs to be created, set the mode as an octal
|
|
14
|
-
--mode=<mode> permission string.
|
|
15
|
-
|
|
16
|
-
-v --version Print the mkdirp version number
|
|
17
|
-
|
|
18
|
-
-h --help Print this helpful banner
|
|
19
|
-
|
|
20
|
-
-p --print Print the first directories created for each path provided
|
|
21
|
-
|
|
22
|
-
--manual Use manual implementation, even if native is available
|
|
23
|
-
`
|
|
24
|
-
|
|
25
|
-
const dirs = []
|
|
26
|
-
const opts = {}
|
|
27
|
-
let print = false
|
|
28
|
-
let dashdash = false
|
|
29
|
-
let manual = false
|
|
30
|
-
for (const arg of process.argv.slice(2)) {
|
|
31
|
-
if (dashdash)
|
|
32
|
-
dirs.push(arg)
|
|
33
|
-
else if (arg === '--')
|
|
34
|
-
dashdash = true
|
|
35
|
-
else if (arg === '--manual')
|
|
36
|
-
manual = true
|
|
37
|
-
else if (/^-h/.test(arg) || /^--help/.test(arg)) {
|
|
38
|
-
console.log(usage())
|
|
39
|
-
process.exit(0)
|
|
40
|
-
} else if (arg === '-v' || arg === '--version') {
|
|
41
|
-
console.log(require('../package.json').version)
|
|
42
|
-
process.exit(0)
|
|
43
|
-
} else if (arg === '-p' || arg === '--print') {
|
|
44
|
-
print = true
|
|
45
|
-
} else if (/^-m/.test(arg) || /^--mode=/.test(arg)) {
|
|
46
|
-
const mode = parseInt(arg.replace(/^(-m|--mode=)/, ''), 8)
|
|
47
|
-
if (isNaN(mode)) {
|
|
48
|
-
console.error(`invalid mode argument: ${arg}\nMust be an octal number.`)
|
|
49
|
-
process.exit(1)
|
|
50
|
-
}
|
|
51
|
-
opts.mode = mode
|
|
52
|
-
} else
|
|
53
|
-
dirs.push(arg)
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
const mkdirp = require('../')
|
|
57
|
-
const impl = manual ? mkdirp.manual : mkdirp
|
|
58
|
-
if (dirs.length === 0)
|
|
59
|
-
console.error(usage())
|
|
60
|
-
|
|
61
|
-
Promise.all(dirs.map(dir => impl(dir, opts)))
|
|
62
|
-
.then(made => print ? made.forEach(m => m && console.log(m)) : null)
|
|
63
|
-
.catch(er => {
|
|
64
|
-
console.error(er.message)
|
|
65
|
-
if (er.code)
|
|
66
|
-
console.error(' code: ' + er.code)
|
|
67
|
-
process.exit(1)
|
|
68
|
-
})
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(){var e={237:function(e,t,r){const n=r(10);const s=r(763);const{mkdirpNative:c,mkdirpNativeSync:i}=r(58);const{mkdirpManual:o,mkdirpManualSync:a}=r(559);const{useNative:u,useNativeSync:d}=r(764);const mkdirp=(e,t)=>{e=s(e);t=n(t);return u(t)?c(e,t):o(e,t)};const mkdirpSync=(e,t)=>{e=s(e);t=n(t);return d(t)?i(e,t):a(e,t)};mkdirp.sync=mkdirpSync;mkdirp.native=(e,t)=>c(s(e),n(t));mkdirp.manual=(e,t)=>o(s(e),n(t));mkdirp.nativeSync=(e,t)=>i(s(e),n(t));mkdirp.manualSync=(e,t)=>a(s(e),n(t));e.exports=mkdirp},874:function(e,t,r){const{dirname:n}=r(928);const findMade=(e,t,r=undefined)=>{if(r===t)return Promise.resolve();return e.statAsync(t).then((e=>e.isDirectory()?r:undefined),(r=>r.code==="ENOENT"?findMade(e,n(t),t):undefined))};const findMadeSync=(e,t,r=undefined)=>{if(r===t)return undefined;try{return e.statSync(t).isDirectory()?r:undefined}catch(r){return r.code==="ENOENT"?findMadeSync(e,n(t),t):undefined}};e.exports={findMade:findMade,findMadeSync:findMadeSync}},559:function(e,t,r){const{dirname:n}=r(928);const mkdirpManual=(e,t,r)=>{t.recursive=false;const s=n(e);if(s===e){return t.mkdirAsync(e,t).catch((e=>{if(e.code!=="EISDIR")throw e}))}return t.mkdirAsync(e,t).then((()=>r||e),(n=>{if(n.code==="ENOENT")return mkdirpManual(s,t).then((r=>mkdirpManual(e,t,r)));if(n.code!=="EEXIST"&&n.code!=="EROFS")throw n;return t.statAsync(e).then((e=>{if(e.isDirectory())return r;else throw n}),(()=>{throw n}))}))};const mkdirpManualSync=(e,t,r)=>{const s=n(e);t.recursive=false;if(s===e){try{return t.mkdirSync(e,t)}catch(e){if(e.code!=="EISDIR")throw e;else return}}try{t.mkdirSync(e,t);return r||e}catch(n){if(n.code==="ENOENT")return mkdirpManualSync(e,t,mkdirpManualSync(s,t,r));if(n.code!=="EEXIST"&&n.code!=="EROFS")throw n;try{if(!t.statSync(e).isDirectory())throw n}catch(e){throw n}}};e.exports={mkdirpManual:mkdirpManual,mkdirpManualSync:mkdirpManualSync}},58:function(e,t,r){const{dirname:n}=r(928);const{findMade:s,findMadeSync:c}=r(874);const{mkdirpManual:i,mkdirpManualSync:o}=r(559);const mkdirpNative=(e,t)=>{t.recursive=true;const r=n(e);if(r===e)return t.mkdirAsync(e,t);return s(t,e).then((r=>t.mkdirAsync(e,t).then((()=>r)).catch((r=>{if(r.code==="ENOENT")return i(e,t);else throw r}))))};const mkdirpNativeSync=(e,t)=>{t.recursive=true;const r=n(e);if(r===e)return t.mkdirSync(e,t);const s=c(t,e);try{t.mkdirSync(e,t);return s}catch(r){if(r.code==="ENOENT")return o(e,t);else throw r}};e.exports={mkdirpNative:mkdirpNative,mkdirpNativeSync:mkdirpNativeSync}},10:function(e,t,r){const{promisify:n}=r(23);const s=r(896);const optsArg=e=>{if(!e)e={mode:511,fs:s};else if(typeof e==="object")e={mode:511,fs:s,...e};else if(typeof e==="number")e={mode:e,fs:s};else if(typeof e==="string")e={mode:parseInt(e,8),fs:s};else throw new TypeError("invalid options argument");e.mkdir=e.mkdir||e.fs.mkdir||s.mkdir;e.mkdirAsync=n(e.mkdir);e.stat=e.stat||e.fs.stat||s.stat;e.statAsync=n(e.stat);e.statSync=e.statSync||e.fs.statSync||s.statSync;e.mkdirSync=e.mkdirSync||e.fs.mkdirSync||s.mkdirSync;return e};e.exports=optsArg},763:function(e,t,r){const n=process.env.__TESTING_MKDIRP_PLATFORM__||process.platform;const{resolve:s,parse:c}=r(928);const pathArg=e=>{if(/\0/.test(e)){throw Object.assign(new TypeError("path must be a string without null bytes"),{path:e,code:"ERR_INVALID_ARG_VALUE"})}e=s(e);if(n==="win32"){const t=/[*|"<>?:]/;const{root:r}=c(e);if(t.test(e.substr(r.length))){throw Object.assign(new Error("Illegal characters in path."),{path:e,code:"EINVAL"})}}return e};e.exports=pathArg},764:function(e,t,r){const n=r(896);const s=process.env.__TESTING_MKDIRP_NODE_VERSION__||process.version;const c=s.replace(/^v/,"").split(".");const i=+c[0]>10||+c[0]===10&&+c[1]>=12;const o=!i?()=>false:e=>e.mkdir===n.mkdir;const a=!i?()=>false:e=>e.mkdirSync===n.mkdirSync;e.exports={useNative:o,useNativeSync:a}},896:function(e){"use strict";e.exports=require("fs")},928:function(e){"use strict";e.exports=require("path")},23:function(e){"use strict";e.exports=require("util")}};var t={};function __nccwpck_require__(r){var n=t[r];if(n!==undefined){return n.exports}var s=t[r]={exports:{}};var c=true;try{e[r](s,s.exports,__nccwpck_require__);c=false}finally{if(c)delete t[r]}return s.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r=__nccwpck_require__(237);module.exports=r})();
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
const {dirname} = require('path')
|
|
2
|
-
|
|
3
|
-
const findMade = (opts, parent, path = undefined) => {
|
|
4
|
-
// we never want the 'made' return value to be a root directory
|
|
5
|
-
if (path === parent)
|
|
6
|
-
return Promise.resolve()
|
|
7
|
-
|
|
8
|
-
return opts.statAsync(parent).then(
|
|
9
|
-
st => st.isDirectory() ? path : undefined, // will fail later
|
|
10
|
-
er => er.code === 'ENOENT'
|
|
11
|
-
? findMade(opts, dirname(parent), parent)
|
|
12
|
-
: undefined
|
|
13
|
-
)
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
const findMadeSync = (opts, parent, path = undefined) => {
|
|
17
|
-
if (path === parent)
|
|
18
|
-
return undefined
|
|
19
|
-
|
|
20
|
-
try {
|
|
21
|
-
return opts.statSync(parent).isDirectory() ? path : undefined
|
|
22
|
-
} catch (er) {
|
|
23
|
-
return er.code === 'ENOENT'
|
|
24
|
-
? findMadeSync(opts, dirname(parent), parent)
|
|
25
|
-
: undefined
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
module.exports = {findMade, findMadeSync}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
const {dirname} = require('path')
|
|
2
|
-
|
|
3
|
-
const mkdirpManual = (path, opts, made) => {
|
|
4
|
-
opts.recursive = false
|
|
5
|
-
const parent = dirname(path)
|
|
6
|
-
if (parent === path) {
|
|
7
|
-
return opts.mkdirAsync(path, opts).catch(er => {
|
|
8
|
-
// swallowed by recursive implementation on posix systems
|
|
9
|
-
// any other error is a failure
|
|
10
|
-
if (er.code !== 'EISDIR')
|
|
11
|
-
throw er
|
|
12
|
-
})
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
return opts.mkdirAsync(path, opts).then(() => made || path, er => {
|
|
16
|
-
if (er.code === 'ENOENT')
|
|
17
|
-
return mkdirpManual(parent, opts)
|
|
18
|
-
.then(made => mkdirpManual(path, opts, made))
|
|
19
|
-
if (er.code !== 'EEXIST' && er.code !== 'EROFS')
|
|
20
|
-
throw er
|
|
21
|
-
return opts.statAsync(path).then(st => {
|
|
22
|
-
if (st.isDirectory())
|
|
23
|
-
return made
|
|
24
|
-
else
|
|
25
|
-
throw er
|
|
26
|
-
}, () => { throw er })
|
|
27
|
-
})
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
const mkdirpManualSync = (path, opts, made) => {
|
|
31
|
-
const parent = dirname(path)
|
|
32
|
-
opts.recursive = false
|
|
33
|
-
|
|
34
|
-
if (parent === path) {
|
|
35
|
-
try {
|
|
36
|
-
return opts.mkdirSync(path, opts)
|
|
37
|
-
} catch (er) {
|
|
38
|
-
// swallowed by recursive implementation on posix systems
|
|
39
|
-
// any other error is a failure
|
|
40
|
-
if (er.code !== 'EISDIR')
|
|
41
|
-
throw er
|
|
42
|
-
else
|
|
43
|
-
return
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
try {
|
|
48
|
-
opts.mkdirSync(path, opts)
|
|
49
|
-
return made || path
|
|
50
|
-
} catch (er) {
|
|
51
|
-
if (er.code === 'ENOENT')
|
|
52
|
-
return mkdirpManualSync(path, opts, mkdirpManualSync(parent, opts, made))
|
|
53
|
-
if (er.code !== 'EEXIST' && er.code !== 'EROFS')
|
|
54
|
-
throw er
|
|
55
|
-
try {
|
|
56
|
-
if (!opts.statSync(path).isDirectory())
|
|
57
|
-
throw er
|
|
58
|
-
} catch (_) {
|
|
59
|
-
throw er
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
module.exports = {mkdirpManual, mkdirpManualSync}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
const {dirname} = require('path')
|
|
2
|
-
const {findMade, findMadeSync} = require('./find-made.js')
|
|
3
|
-
const {mkdirpManual, mkdirpManualSync} = require('./mkdirp-manual.js')
|
|
4
|
-
|
|
5
|
-
const mkdirpNative = (path, opts) => {
|
|
6
|
-
opts.recursive = true
|
|
7
|
-
const parent = dirname(path)
|
|
8
|
-
if (parent === path)
|
|
9
|
-
return opts.mkdirAsync(path, opts)
|
|
10
|
-
|
|
11
|
-
return findMade(opts, path).then(made =>
|
|
12
|
-
opts.mkdirAsync(path, opts).then(() => made)
|
|
13
|
-
.catch(er => {
|
|
14
|
-
if (er.code === 'ENOENT')
|
|
15
|
-
return mkdirpManual(path, opts)
|
|
16
|
-
else
|
|
17
|
-
throw er
|
|
18
|
-
}))
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
const mkdirpNativeSync = (path, opts) => {
|
|
22
|
-
opts.recursive = true
|
|
23
|
-
const parent = dirname(path)
|
|
24
|
-
if (parent === path)
|
|
25
|
-
return opts.mkdirSync(path, opts)
|
|
26
|
-
|
|
27
|
-
const made = findMadeSync(opts, path)
|
|
28
|
-
try {
|
|
29
|
-
opts.mkdirSync(path, opts)
|
|
30
|
-
return made
|
|
31
|
-
} catch (er) {
|
|
32
|
-
if (er.code === 'ENOENT')
|
|
33
|
-
return mkdirpManualSync(path, opts)
|
|
34
|
-
else
|
|
35
|
-
throw er
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
module.exports = {mkdirpNative, mkdirpNativeSync}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
const { promisify } = require('util')
|
|
2
|
-
const fs = require('fs')
|
|
3
|
-
const optsArg = opts => {
|
|
4
|
-
if (!opts)
|
|
5
|
-
opts = { mode: 0o777, fs }
|
|
6
|
-
else if (typeof opts === 'object')
|
|
7
|
-
opts = { mode: 0o777, fs, ...opts }
|
|
8
|
-
else if (typeof opts === 'number')
|
|
9
|
-
opts = { mode: opts, fs }
|
|
10
|
-
else if (typeof opts === 'string')
|
|
11
|
-
opts = { mode: parseInt(opts, 8), fs }
|
|
12
|
-
else
|
|
13
|
-
throw new TypeError('invalid options argument')
|
|
14
|
-
|
|
15
|
-
opts.mkdir = opts.mkdir || opts.fs.mkdir || fs.mkdir
|
|
16
|
-
opts.mkdirAsync = promisify(opts.mkdir)
|
|
17
|
-
opts.stat = opts.stat || opts.fs.stat || fs.stat
|
|
18
|
-
opts.statAsync = promisify(opts.stat)
|
|
19
|
-
opts.statSync = opts.statSync || opts.fs.statSync || fs.statSync
|
|
20
|
-
opts.mkdirSync = opts.mkdirSync || opts.fs.mkdirSync || fs.mkdirSync
|
|
21
|
-
return opts
|
|
22
|
-
}
|
|
23
|
-
module.exports = optsArg
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
const platform = process.env.__TESTING_MKDIRP_PLATFORM__ || process.platform
|
|
2
|
-
const { resolve, parse } = require('path')
|
|
3
|
-
const pathArg = path => {
|
|
4
|
-
if (/\0/.test(path)) {
|
|
5
|
-
// simulate same failure that node raises
|
|
6
|
-
throw Object.assign(
|
|
7
|
-
new TypeError('path must be a string without null bytes'),
|
|
8
|
-
{
|
|
9
|
-
path,
|
|
10
|
-
code: 'ERR_INVALID_ARG_VALUE',
|
|
11
|
-
}
|
|
12
|
-
)
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
path = resolve(path)
|
|
16
|
-
if (platform === 'win32') {
|
|
17
|
-
const badWinChars = /[*|"<>?:]/
|
|
18
|
-
const {root} = parse(path)
|
|
19
|
-
if (badWinChars.test(path.substr(root.length))) {
|
|
20
|
-
throw Object.assign(new Error('Illegal characters in path.'), {
|
|
21
|
-
path,
|
|
22
|
-
code: 'EINVAL',
|
|
23
|
-
})
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
return path
|
|
28
|
-
}
|
|
29
|
-
module.exports = pathArg
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
const fs = require('fs')
|
|
2
|
-
|
|
3
|
-
const version = process.env.__TESTING_MKDIRP_NODE_VERSION__ || process.version
|
|
4
|
-
const versArr = version.replace(/^v/, '').split('.')
|
|
5
|
-
const hasNative = +versArr[0] > 10 || +versArr[0] === 10 && +versArr[1] >= 12
|
|
6
|
-
|
|
7
|
-
const useNative = !hasNative ? () => false : opts => opts.mkdir === fs.mkdir
|
|
8
|
-
const useNativeSync = !hasNative ? () => false : opts => opts.mkdirSync === fs.mkdirSync
|
|
9
|
-
|
|
10
|
-
module.exports = {useNative, useNativeSync}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"name":"mkdirp","description":"Recursively mkdir, like `mkdir -p`","version":"1.0.4","main":"index.js","keywords":["mkdir","directory","make dir","make","dir","recursive","native"],"repository":{"type":"git","url":"https://github.com/isaacs/node-mkdirp.git"},"scripts":{"test":"tap","snap":"tap","preversion":"npm test","postversion":"npm publish","postpublish":"git push origin --follow-tags"},"tap":{"check-coverage":true,"coverage-map":"map.js"},"devDependencies":{"require-inject":"^1.4.4","tap":"^14.10.7"},"bin":"bin/cmd.js","license":"MIT","engines":{"node":">=10"},"files":["bin","lib","index.js"],"_lastModified":"2025-08-02T21:25:14.794Z"}
|