@prisma/get-platform 6.13.0-dev.1 → 6.13.0-dev.3
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/chunk-KH3ZZM2G.js +167 -0
- package/dist/{chunk-HE3NEP2U.js → chunk-QDGOOSXR.js} +774 -914
- package/dist/index.js +6 -5
- package/dist/magic-string.es-3WRPFX2A.js +1315 -0
- package/dist/test-utils/index.js +6 -5
- package/dist/test-utils/jestContext.js +6 -5
- package/dist/test-utils/vitestContext.d.ts +123 -0
- package/dist/test-utils/vitestContext.js +17621 -0
- package/package.json +7 -6
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
2
|
var __defProp = Object.defineProperty;
|
|
4
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
6
|
var __export = (target, all) => {
|
|
9
7
|
for (var name in all)
|
|
@@ -17,32 +15,22 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
15
|
}
|
|
18
16
|
return to;
|
|
19
17
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
module.exports = __toCommonJS(chunk_HE3NEP2U_exports);
|
|
19
|
+
var chunk_QDGOOSXR_exports = {};
|
|
20
|
+
__export(chunk_QDGOOSXR_exports, {
|
|
21
|
+
require_execa: () => require_execa,
|
|
22
|
+
require_main: () => require_main2,
|
|
23
|
+
require_tempy: () => require_tempy
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(chunk_QDGOOSXR_exports);
|
|
37
26
|
var import_chunk_2ESYSVXG = require("./chunk-2ESYSVXG.js");
|
|
38
|
-
var import_path = __toESM(require("path"));
|
|
39
27
|
var require_windows = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
40
28
|
"../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js"(exports, module2) {
|
|
41
29
|
"use strict";
|
|
42
30
|
module2.exports = isexe;
|
|
43
31
|
isexe.sync = sync;
|
|
44
|
-
var
|
|
45
|
-
function checkPathExt(
|
|
32
|
+
var fs = (0, import_chunk_2ESYSVXG.__require)("fs");
|
|
33
|
+
function checkPathExt(path, options) {
|
|
46
34
|
var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
|
|
47
35
|
if (!pathext) {
|
|
48
36
|
return true;
|
|
@@ -53,25 +41,25 @@ var require_windows = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
53
41
|
}
|
|
54
42
|
for (var i = 0; i < pathext.length; i++) {
|
|
55
43
|
var p = pathext[i].toLowerCase();
|
|
56
|
-
if (p &&
|
|
44
|
+
if (p && path.substr(-p.length).toLowerCase() === p) {
|
|
57
45
|
return true;
|
|
58
46
|
}
|
|
59
47
|
}
|
|
60
48
|
return false;
|
|
61
49
|
}
|
|
62
|
-
function checkStat(stat,
|
|
50
|
+
function checkStat(stat, path, options) {
|
|
63
51
|
if (!stat.isSymbolicLink() && !stat.isFile()) {
|
|
64
52
|
return false;
|
|
65
53
|
}
|
|
66
|
-
return checkPathExt(
|
|
54
|
+
return checkPathExt(path, options);
|
|
67
55
|
}
|
|
68
|
-
function isexe(
|
|
69
|
-
|
|
70
|
-
cb(er, er ? false : checkStat(stat,
|
|
56
|
+
function isexe(path, options, cb) {
|
|
57
|
+
fs.stat(path, function(er, stat) {
|
|
58
|
+
cb(er, er ? false : checkStat(stat, path, options));
|
|
71
59
|
});
|
|
72
60
|
}
|
|
73
|
-
function sync(
|
|
74
|
-
return checkStat(
|
|
61
|
+
function sync(path, options) {
|
|
62
|
+
return checkStat(fs.statSync(path), path, options);
|
|
75
63
|
}
|
|
76
64
|
}
|
|
77
65
|
});
|
|
@@ -80,14 +68,14 @@ var require_mode = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
80
68
|
"use strict";
|
|
81
69
|
module2.exports = isexe;
|
|
82
70
|
isexe.sync = sync;
|
|
83
|
-
var
|
|
84
|
-
function isexe(
|
|
85
|
-
|
|
71
|
+
var fs = (0, import_chunk_2ESYSVXG.__require)("fs");
|
|
72
|
+
function isexe(path, options, cb) {
|
|
73
|
+
fs.stat(path, function(er, stat) {
|
|
86
74
|
cb(er, er ? false : checkStat(stat, options));
|
|
87
75
|
});
|
|
88
76
|
}
|
|
89
|
-
function sync(
|
|
90
|
-
return checkStat(
|
|
77
|
+
function sync(path, options) {
|
|
78
|
+
return checkStat(fs.statSync(path), options);
|
|
91
79
|
}
|
|
92
80
|
function checkStat(stat, options) {
|
|
93
81
|
return stat.isFile() && checkMode(stat, options);
|
|
@@ -110,7 +98,7 @@ var require_mode = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
110
98
|
var require_isexe = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
111
99
|
"../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js"(exports, module2) {
|
|
112
100
|
"use strict";
|
|
113
|
-
var
|
|
101
|
+
var fs = (0, import_chunk_2ESYSVXG.__require)("fs");
|
|
114
102
|
var core;
|
|
115
103
|
if (process.platform === "win32" || global.TESTING_WINDOWS) {
|
|
116
104
|
core = require_windows();
|
|
@@ -119,7 +107,7 @@ var require_isexe = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
119
107
|
}
|
|
120
108
|
module2.exports = isexe;
|
|
121
109
|
isexe.sync = sync;
|
|
122
|
-
function isexe(
|
|
110
|
+
function isexe(path, options, cb) {
|
|
123
111
|
if (typeof options === "function") {
|
|
124
112
|
cb = options;
|
|
125
113
|
options = {};
|
|
@@ -129,7 +117,7 @@ var require_isexe = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
129
117
|
throw new TypeError("callback not provided");
|
|
130
118
|
}
|
|
131
119
|
return new Promise(function(resolve, reject) {
|
|
132
|
-
isexe(
|
|
120
|
+
isexe(path, options || {}, function(er, is) {
|
|
133
121
|
if (er) {
|
|
134
122
|
reject(er);
|
|
135
123
|
} else {
|
|
@@ -138,7 +126,7 @@ var require_isexe = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
138
126
|
});
|
|
139
127
|
});
|
|
140
128
|
}
|
|
141
|
-
core(
|
|
129
|
+
core(path, options || {}, function(er, is) {
|
|
142
130
|
if (er) {
|
|
143
131
|
if (er.code === "EACCES" || options && options.ignoreErrors) {
|
|
144
132
|
er = null;
|
|
@@ -148,9 +136,9 @@ var require_isexe = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
148
136
|
cb(er, is);
|
|
149
137
|
});
|
|
150
138
|
}
|
|
151
|
-
function sync(
|
|
139
|
+
function sync(path, options) {
|
|
152
140
|
try {
|
|
153
|
-
return core.sync(
|
|
141
|
+
return core.sync(path, options || {});
|
|
154
142
|
} catch (er) {
|
|
155
143
|
if (options && options.ignoreErrors || er.code === "EACCES") {
|
|
156
144
|
return false;
|
|
@@ -165,7 +153,7 @@ var require_which = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
165
153
|
"../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js"(exports, module2) {
|
|
166
154
|
"use strict";
|
|
167
155
|
var isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
|
|
168
|
-
var
|
|
156
|
+
var path = (0, import_chunk_2ESYSVXG.__require)("path");
|
|
169
157
|
var COLON = isWindows ? ";" : ":";
|
|
170
158
|
var isexe = require_isexe();
|
|
171
159
|
var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
|
|
@@ -203,7 +191,7 @@ var require_which = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
203
191
|
return opt.all && found.length ? resolve(found) : reject(getNotFoundError(cmd));
|
|
204
192
|
const ppRaw = pathEnv[i];
|
|
205
193
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
206
|
-
const pCmd =
|
|
194
|
+
const pCmd = path.join(pathPart, cmd);
|
|
207
195
|
const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
208
196
|
resolve(subStep(p, i, 0));
|
|
209
197
|
});
|
|
@@ -230,7 +218,7 @@ var require_which = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
230
218
|
for (let i = 0; i < pathEnv.length; i++) {
|
|
231
219
|
const ppRaw = pathEnv[i];
|
|
232
220
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
233
|
-
const pCmd =
|
|
221
|
+
const pCmd = path.join(pathPart, cmd);
|
|
234
222
|
const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
235
223
|
for (let j = 0; j < pathExt.length; j++) {
|
|
236
224
|
const cur = p + pathExt[j];
|
|
@@ -274,7 +262,7 @@ var require_path_key = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
274
262
|
var require_resolveCommand = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
275
263
|
"../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/resolveCommand.js"(exports, module2) {
|
|
276
264
|
"use strict";
|
|
277
|
-
var
|
|
265
|
+
var path = (0, import_chunk_2ESYSVXG.__require)("path");
|
|
278
266
|
var which = require_which();
|
|
279
267
|
var getPathKey = require_path_key();
|
|
280
268
|
function resolveCommandAttempt(parsed, withoutPathExt) {
|
|
@@ -292,7 +280,7 @@ var require_resolveCommand = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
292
280
|
try {
|
|
293
281
|
resolved = which.sync(parsed.command, {
|
|
294
282
|
path: env[getPathKey({ env })],
|
|
295
|
-
pathExt: withoutPathExt ?
|
|
283
|
+
pathExt: withoutPathExt ? path.delimiter : void 0
|
|
296
284
|
});
|
|
297
285
|
} catch (e) {
|
|
298
286
|
} finally {
|
|
@@ -301,7 +289,7 @@ var require_resolveCommand = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
301
289
|
}
|
|
302
290
|
}
|
|
303
291
|
if (resolved) {
|
|
304
|
-
resolved =
|
|
292
|
+
resolved = path.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
|
|
305
293
|
}
|
|
306
294
|
return resolved;
|
|
307
295
|
}
|
|
@@ -349,8 +337,8 @@ var require_shebang_command = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
349
337
|
if (!match) {
|
|
350
338
|
return null;
|
|
351
339
|
}
|
|
352
|
-
const [
|
|
353
|
-
const binary =
|
|
340
|
+
const [path, argument] = match[0].replace(/#! ?/, "").split(" ");
|
|
341
|
+
const binary = path.split("/").pop();
|
|
354
342
|
if (binary === "env") {
|
|
355
343
|
return argument;
|
|
356
344
|
}
|
|
@@ -361,16 +349,16 @@ var require_shebang_command = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
361
349
|
var require_readShebang = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
362
350
|
"../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/readShebang.js"(exports, module2) {
|
|
363
351
|
"use strict";
|
|
364
|
-
var
|
|
352
|
+
var fs = (0, import_chunk_2ESYSVXG.__require)("fs");
|
|
365
353
|
var shebangCommand = require_shebang_command();
|
|
366
354
|
function readShebang(command) {
|
|
367
355
|
const size = 150;
|
|
368
356
|
const buffer = Buffer.alloc(size);
|
|
369
357
|
let fd;
|
|
370
358
|
try {
|
|
371
|
-
fd =
|
|
372
|
-
|
|
373
|
-
|
|
359
|
+
fd = fs.openSync(command, "r");
|
|
360
|
+
fs.readSync(fd, buffer, 0, size, 0);
|
|
361
|
+
fs.closeSync(fd);
|
|
374
362
|
} catch (e) {
|
|
375
363
|
}
|
|
376
364
|
return shebangCommand(buffer.toString());
|
|
@@ -381,7 +369,7 @@ var require_readShebang = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
381
369
|
var require_parse = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
382
370
|
"../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/parse.js"(exports, module2) {
|
|
383
371
|
"use strict";
|
|
384
|
-
var
|
|
372
|
+
var path = (0, import_chunk_2ESYSVXG.__require)("path");
|
|
385
373
|
var resolveCommand = require_resolveCommand();
|
|
386
374
|
var escape = require_escape();
|
|
387
375
|
var readShebang = require_readShebang();
|
|
@@ -406,7 +394,7 @@ var require_parse = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
406
394
|
const needsShell = !isExecutableRegExp.test(commandFile);
|
|
407
395
|
if (parsed.options.forceShell || needsShell) {
|
|
408
396
|
const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
|
|
409
|
-
parsed.command =
|
|
397
|
+
parsed.command = path.normalize(parsed.command);
|
|
410
398
|
parsed.command = escape.command(parsed.command);
|
|
411
399
|
parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));
|
|
412
400
|
const shellCommand = [parsed.command].concat(parsed.args).join(" ");
|
|
@@ -530,7 +518,7 @@ var require_strip_final_newline = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
530
518
|
var require_npm_run_path = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
531
519
|
"../../node_modules/.pnpm/npm-run-path@4.0.1/node_modules/npm-run-path/index.js"(exports, module2) {
|
|
532
520
|
"use strict";
|
|
533
|
-
var
|
|
521
|
+
var path = (0, import_chunk_2ESYSVXG.__require)("path");
|
|
534
522
|
var pathKey = require_path_key();
|
|
535
523
|
var npmRunPath = (options) => {
|
|
536
524
|
options = {
|
|
@@ -540,16 +528,16 @@ var require_npm_run_path = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
540
528
|
...options
|
|
541
529
|
};
|
|
542
530
|
let previous;
|
|
543
|
-
let cwdPath =
|
|
531
|
+
let cwdPath = path.resolve(options.cwd);
|
|
544
532
|
const result = [];
|
|
545
533
|
while (previous !== cwdPath) {
|
|
546
|
-
result.push(
|
|
534
|
+
result.push(path.join(cwdPath, "node_modules/.bin"));
|
|
547
535
|
previous = cwdPath;
|
|
548
|
-
cwdPath =
|
|
536
|
+
cwdPath = path.resolve(cwdPath, "..");
|
|
549
537
|
}
|
|
550
|
-
const execPathDir =
|
|
538
|
+
const execPathDir = path.resolve(options.cwd, options.execPath, "..");
|
|
551
539
|
result.push(execPathDir);
|
|
552
|
-
return result.concat(options.path).join(
|
|
540
|
+
return result.concat(options.path).join(path.delimiter);
|
|
553
541
|
};
|
|
554
542
|
module2.exports = npmRunPath;
|
|
555
543
|
module2.exports.default = npmRunPath;
|
|
@@ -559,9 +547,9 @@ var require_npm_run_path = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
559
547
|
...options
|
|
560
548
|
};
|
|
561
549
|
const env = { ...options.env };
|
|
562
|
-
const
|
|
563
|
-
options.path = env[
|
|
564
|
-
env[
|
|
550
|
+
const path2 = pathKey({ env });
|
|
551
|
+
options.path = env[path2];
|
|
552
|
+
env[path2] = module2.exports(options);
|
|
565
553
|
return env;
|
|
566
554
|
};
|
|
567
555
|
}
|
|
@@ -1707,7 +1695,7 @@ var require_command = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
1707
1695
|
var require_execa = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
1708
1696
|
"../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/index.js"(exports, module2) {
|
|
1709
1697
|
"use strict";
|
|
1710
|
-
var
|
|
1698
|
+
var path = (0, import_chunk_2ESYSVXG.__require)("path");
|
|
1711
1699
|
var childProcess = (0, import_chunk_2ESYSVXG.__require)("child_process");
|
|
1712
1700
|
var crossSpawn = require_cross_spawn();
|
|
1713
1701
|
var stripFinalNewline = require_strip_final_newline();
|
|
@@ -1749,7 +1737,7 @@ var require_execa = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
1749
1737
|
};
|
|
1750
1738
|
options.env = getEnv(options);
|
|
1751
1739
|
options.stdio = normalizeStdio(options);
|
|
1752
|
-
if (process.platform === "win32" &&
|
|
1740
|
+
if (process.platform === "win32" && path.basename(file, ".exe") === "cmd") {
|
|
1753
1741
|
args.unshift("/q");
|
|
1754
1742
|
}
|
|
1755
1743
|
return { file, args, options, parsed };
|
|
@@ -1763,7 +1751,7 @@ var require_execa = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
1763
1751
|
}
|
|
1764
1752
|
return value;
|
|
1765
1753
|
};
|
|
1766
|
-
var
|
|
1754
|
+
var execa = (file, args, options) => {
|
|
1767
1755
|
const parsed = handleArguments(file, args, options);
|
|
1768
1756
|
const command = joinCommand(file, args);
|
|
1769
1757
|
const escapedCommand = getEscapedCommand(file, args);
|
|
@@ -1836,7 +1824,7 @@ var require_execa = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
1836
1824
|
spawned.all = makeAllStream(spawned, parsed.options);
|
|
1837
1825
|
return mergePromise(spawned, handlePromiseOnce);
|
|
1838
1826
|
};
|
|
1839
|
-
module2.exports =
|
|
1827
|
+
module2.exports = execa;
|
|
1840
1828
|
module2.exports.sync = (file, args, options) => {
|
|
1841
1829
|
const parsed = handleArguments(file, args, options);
|
|
1842
1830
|
const command = joinCommand(file, args);
|
|
@@ -1894,11 +1882,11 @@ var require_execa = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
1894
1882
|
};
|
|
1895
1883
|
module2.exports.command = (command, options) => {
|
|
1896
1884
|
const [file, ...args] = parseCommand(command);
|
|
1897
|
-
return
|
|
1885
|
+
return execa(file, args, options);
|
|
1898
1886
|
};
|
|
1899
1887
|
module2.exports.commandSync = (command, options) => {
|
|
1900
1888
|
const [file, ...args] = parseCommand(command);
|
|
1901
|
-
return
|
|
1889
|
+
return execa.sync(file, args, options);
|
|
1902
1890
|
};
|
|
1903
1891
|
module2.exports.node = (scriptPath, args, options = {}) => {
|
|
1904
1892
|
if (args && !Array.isArray(args) && typeof args === "object") {
|
|
@@ -1911,7 +1899,7 @@ var require_execa = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
1911
1899
|
nodePath = process.execPath,
|
|
1912
1900
|
nodeOptions = defaultExecArgv
|
|
1913
1901
|
} = options;
|
|
1914
|
-
return
|
|
1902
|
+
return execa(
|
|
1915
1903
|
nodePath,
|
|
1916
1904
|
[
|
|
1917
1905
|
...nodeOptions,
|
|
@@ -1957,11 +1945,11 @@ var require_promisify = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
1957
1945
|
var require_fs = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
1958
1946
|
"../../node_modules/.pnpm/fs-jetpack@5.1.0/node_modules/fs-jetpack/lib/utils/fs.js"(exports, module2) {
|
|
1959
1947
|
"use strict";
|
|
1960
|
-
var
|
|
1948
|
+
var fs = (0, import_chunk_2ESYSVXG.__require)("fs");
|
|
1961
1949
|
var promisify = require_promisify();
|
|
1962
1950
|
var isCallbackMethod = (key) => {
|
|
1963
1951
|
return [
|
|
1964
|
-
typeof
|
|
1952
|
+
typeof fs[key] === "function",
|
|
1965
1953
|
!key.match(/Sync$/),
|
|
1966
1954
|
!key.match(/^[A-Z]/),
|
|
1967
1955
|
!key.match(/^create/),
|
|
@@ -1969,12 +1957,12 @@ var require_fs = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
1969
1957
|
].every(Boolean);
|
|
1970
1958
|
};
|
|
1971
1959
|
var adaptMethod = (name) => {
|
|
1972
|
-
const original =
|
|
1960
|
+
const original = fs[name];
|
|
1973
1961
|
return promisify(original);
|
|
1974
1962
|
};
|
|
1975
1963
|
var adaptAllMethods = () => {
|
|
1976
1964
|
const adapted = {};
|
|
1977
|
-
Object.keys(
|
|
1965
|
+
Object.keys(fs).forEach((key) => {
|
|
1978
1966
|
if (isCallbackMethod(key)) {
|
|
1979
1967
|
if (key === "exists") {
|
|
1980
1968
|
adapted.exists = () => {
|
|
@@ -1984,7 +1972,7 @@ var require_fs = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
1984
1972
|
adapted[key] = adaptMethod(key);
|
|
1985
1973
|
}
|
|
1986
1974
|
} else {
|
|
1987
|
-
adapted[key] =
|
|
1975
|
+
adapted[key] = fs[key];
|
|
1988
1976
|
}
|
|
1989
1977
|
});
|
|
1990
1978
|
return adapted;
|
|
@@ -2120,21 +2108,21 @@ var require_mode2 = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
2120
2108
|
var require_remove = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
2121
2109
|
"../../node_modules/.pnpm/fs-jetpack@5.1.0/node_modules/fs-jetpack/lib/remove.js"(exports) {
|
|
2122
2110
|
"use strict";
|
|
2123
|
-
var
|
|
2111
|
+
var fs = require_fs();
|
|
2124
2112
|
var validate = require_validate();
|
|
2125
|
-
var validateInput = (methodName,
|
|
2113
|
+
var validateInput = (methodName, path) => {
|
|
2126
2114
|
const methodSignature = `${methodName}([path])`;
|
|
2127
|
-
validate.argument(methodSignature, "path",
|
|
2115
|
+
validate.argument(methodSignature, "path", path, ["string", "undefined"]);
|
|
2128
2116
|
};
|
|
2129
|
-
var removeSync = (
|
|
2130
|
-
|
|
2117
|
+
var removeSync = (path) => {
|
|
2118
|
+
fs.rmSync(path, {
|
|
2131
2119
|
recursive: true,
|
|
2132
2120
|
force: true,
|
|
2133
2121
|
maxRetries: 3
|
|
2134
2122
|
});
|
|
2135
2123
|
};
|
|
2136
|
-
var removeAsync = (
|
|
2137
|
-
return
|
|
2124
|
+
var removeAsync = (path) => {
|
|
2125
|
+
return fs.rm(path, {
|
|
2138
2126
|
recursive: true,
|
|
2139
2127
|
force: true,
|
|
2140
2128
|
maxRetries: 3
|
|
@@ -2149,13 +2137,13 @@ var require_dir = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
2149
2137
|
"../../node_modules/.pnpm/fs-jetpack@5.1.0/node_modules/fs-jetpack/lib/dir.js"(exports) {
|
|
2150
2138
|
"use strict";
|
|
2151
2139
|
var pathUtil = (0, import_chunk_2ESYSVXG.__require)("path");
|
|
2152
|
-
var
|
|
2140
|
+
var fs = require_fs();
|
|
2153
2141
|
var modeUtil = require_mode2();
|
|
2154
2142
|
var validate = require_validate();
|
|
2155
2143
|
var remove = require_remove();
|
|
2156
|
-
var validateInput = (methodName,
|
|
2144
|
+
var validateInput = (methodName, path, criteria) => {
|
|
2157
2145
|
const methodSignature = `${methodName}(path, [criteria])`;
|
|
2158
|
-
validate.argument(methodSignature, "path",
|
|
2146
|
+
validate.argument(methodSignature, "path", path, ["string"]);
|
|
2159
2147
|
validate.options(methodSignature, "criteria", criteria, {
|
|
2160
2148
|
empty: ["boolean"],
|
|
2161
2149
|
mode: ["string", "number"]
|
|
@@ -2171,73 +2159,73 @@ var require_dir = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
2171
2159
|
}
|
|
2172
2160
|
return criteria;
|
|
2173
2161
|
};
|
|
2174
|
-
var generatePathOccupiedByNotDirectoryError = (
|
|
2162
|
+
var generatePathOccupiedByNotDirectoryError = (path) => {
|
|
2175
2163
|
return new Error(
|
|
2176
|
-
`Path ${
|
|
2164
|
+
`Path ${path} exists but is not a directory. Halting jetpack.dir() call for safety reasons.`
|
|
2177
2165
|
);
|
|
2178
2166
|
};
|
|
2179
|
-
var checkWhatAlreadyOccupiesPathSync = (
|
|
2167
|
+
var checkWhatAlreadyOccupiesPathSync = (path) => {
|
|
2180
2168
|
let stat;
|
|
2181
2169
|
try {
|
|
2182
|
-
stat =
|
|
2170
|
+
stat = fs.statSync(path);
|
|
2183
2171
|
} catch (err) {
|
|
2184
2172
|
if (err.code !== "ENOENT") {
|
|
2185
2173
|
throw err;
|
|
2186
2174
|
}
|
|
2187
2175
|
}
|
|
2188
2176
|
if (stat && !stat.isDirectory()) {
|
|
2189
|
-
throw generatePathOccupiedByNotDirectoryError(
|
|
2177
|
+
throw generatePathOccupiedByNotDirectoryError(path);
|
|
2190
2178
|
}
|
|
2191
2179
|
return stat;
|
|
2192
2180
|
};
|
|
2193
|
-
var createBrandNewDirectorySync = (
|
|
2181
|
+
var createBrandNewDirectorySync = (path, opts) => {
|
|
2194
2182
|
const options = opts || {};
|
|
2195
2183
|
try {
|
|
2196
|
-
|
|
2184
|
+
fs.mkdirSync(path, options.mode);
|
|
2197
2185
|
} catch (err) {
|
|
2198
2186
|
if (err.code === "ENOENT") {
|
|
2199
|
-
createBrandNewDirectorySync(pathUtil.dirname(
|
|
2200
|
-
|
|
2187
|
+
createBrandNewDirectorySync(pathUtil.dirname(path), options);
|
|
2188
|
+
fs.mkdirSync(path, options.mode);
|
|
2201
2189
|
} else if (err.code === "EEXIST") {
|
|
2202
2190
|
} else {
|
|
2203
2191
|
throw err;
|
|
2204
2192
|
}
|
|
2205
2193
|
}
|
|
2206
2194
|
};
|
|
2207
|
-
var checkExistingDirectoryFulfillsCriteriaSync = (
|
|
2195
|
+
var checkExistingDirectoryFulfillsCriteriaSync = (path, stat, criteria) => {
|
|
2208
2196
|
const checkMode = () => {
|
|
2209
2197
|
const mode = modeUtil.normalizeFileMode(stat.mode);
|
|
2210
2198
|
if (criteria.mode !== void 0 && criteria.mode !== mode) {
|
|
2211
|
-
|
|
2199
|
+
fs.chmodSync(path, criteria.mode);
|
|
2212
2200
|
}
|
|
2213
2201
|
};
|
|
2214
2202
|
const checkEmptiness = () => {
|
|
2215
2203
|
if (criteria.empty) {
|
|
2216
|
-
const list =
|
|
2204
|
+
const list = fs.readdirSync(path);
|
|
2217
2205
|
list.forEach((filename) => {
|
|
2218
|
-
remove.sync(pathUtil.resolve(
|
|
2206
|
+
remove.sync(pathUtil.resolve(path, filename));
|
|
2219
2207
|
});
|
|
2220
2208
|
}
|
|
2221
2209
|
};
|
|
2222
2210
|
checkMode();
|
|
2223
2211
|
checkEmptiness();
|
|
2224
2212
|
};
|
|
2225
|
-
var dirSync = (
|
|
2213
|
+
var dirSync = (path, passedCriteria) => {
|
|
2226
2214
|
const criteria = getCriteriaDefaults(passedCriteria);
|
|
2227
|
-
const stat = checkWhatAlreadyOccupiesPathSync(
|
|
2215
|
+
const stat = checkWhatAlreadyOccupiesPathSync(path);
|
|
2228
2216
|
if (stat) {
|
|
2229
|
-
checkExistingDirectoryFulfillsCriteriaSync(
|
|
2217
|
+
checkExistingDirectoryFulfillsCriteriaSync(path, stat, criteria);
|
|
2230
2218
|
} else {
|
|
2231
|
-
createBrandNewDirectorySync(
|
|
2219
|
+
createBrandNewDirectorySync(path, criteria);
|
|
2232
2220
|
}
|
|
2233
2221
|
};
|
|
2234
|
-
var checkWhatAlreadyOccupiesPathAsync = (
|
|
2222
|
+
var checkWhatAlreadyOccupiesPathAsync = (path) => {
|
|
2235
2223
|
return new Promise((resolve, reject) => {
|
|
2236
|
-
|
|
2224
|
+
fs.stat(path).then((stat) => {
|
|
2237
2225
|
if (stat.isDirectory()) {
|
|
2238
2226
|
resolve(stat);
|
|
2239
2227
|
} else {
|
|
2240
|
-
reject(generatePathOccupiedByNotDirectoryError(
|
|
2228
|
+
reject(generatePathOccupiedByNotDirectoryError(path));
|
|
2241
2229
|
}
|
|
2242
2230
|
}).catch((err) => {
|
|
2243
2231
|
if (err.code === "ENOENT") {
|
|
@@ -2248,14 +2236,14 @@ var require_dir = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
2248
2236
|
});
|
|
2249
2237
|
});
|
|
2250
2238
|
};
|
|
2251
|
-
var emptyAsync = (
|
|
2239
|
+
var emptyAsync = (path) => {
|
|
2252
2240
|
return new Promise((resolve, reject) => {
|
|
2253
|
-
|
|
2241
|
+
fs.readdir(path).then((list) => {
|
|
2254
2242
|
const doOne = (index) => {
|
|
2255
2243
|
if (index === list.length) {
|
|
2256
2244
|
resolve();
|
|
2257
2245
|
} else {
|
|
2258
|
-
const subPath = pathUtil.resolve(
|
|
2246
|
+
const subPath = pathUtil.resolve(path, list[index]);
|
|
2259
2247
|
remove.async(subPath).then(() => {
|
|
2260
2248
|
doOne(index + 1);
|
|
2261
2249
|
});
|
|
@@ -2265,31 +2253,31 @@ var require_dir = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
2265
2253
|
}).catch(reject);
|
|
2266
2254
|
});
|
|
2267
2255
|
};
|
|
2268
|
-
var checkExistingDirectoryFulfillsCriteriaAsync = (
|
|
2256
|
+
var checkExistingDirectoryFulfillsCriteriaAsync = (path, stat, criteria) => {
|
|
2269
2257
|
return new Promise((resolve, reject) => {
|
|
2270
2258
|
const checkMode = () => {
|
|
2271
2259
|
const mode = modeUtil.normalizeFileMode(stat.mode);
|
|
2272
2260
|
if (criteria.mode !== void 0 && criteria.mode !== mode) {
|
|
2273
|
-
return
|
|
2261
|
+
return fs.chmod(path, criteria.mode);
|
|
2274
2262
|
}
|
|
2275
2263
|
return Promise.resolve();
|
|
2276
2264
|
};
|
|
2277
2265
|
const checkEmptiness = () => {
|
|
2278
2266
|
if (criteria.empty) {
|
|
2279
|
-
return emptyAsync(
|
|
2267
|
+
return emptyAsync(path);
|
|
2280
2268
|
}
|
|
2281
2269
|
return Promise.resolve();
|
|
2282
2270
|
};
|
|
2283
2271
|
checkMode().then(checkEmptiness).then(resolve, reject);
|
|
2284
2272
|
});
|
|
2285
2273
|
};
|
|
2286
|
-
var createBrandNewDirectoryAsync = (
|
|
2274
|
+
var createBrandNewDirectoryAsync = (path, opts) => {
|
|
2287
2275
|
const options = opts || {};
|
|
2288
2276
|
return new Promise((resolve, reject) => {
|
|
2289
|
-
|
|
2277
|
+
fs.mkdir(path, options.mode).then(resolve).catch((err) => {
|
|
2290
2278
|
if (err.code === "ENOENT") {
|
|
2291
|
-
createBrandNewDirectoryAsync(pathUtil.dirname(
|
|
2292
|
-
return
|
|
2279
|
+
createBrandNewDirectoryAsync(pathUtil.dirname(path), options).then(() => {
|
|
2280
|
+
return fs.mkdir(path, options.mode);
|
|
2293
2281
|
}).then(resolve).catch((err2) => {
|
|
2294
2282
|
if (err2.code === "EEXIST") {
|
|
2295
2283
|
resolve();
|
|
@@ -2305,18 +2293,18 @@ var require_dir = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
2305
2293
|
});
|
|
2306
2294
|
});
|
|
2307
2295
|
};
|
|
2308
|
-
var dirAsync = (
|
|
2296
|
+
var dirAsync = (path, passedCriteria) => {
|
|
2309
2297
|
return new Promise((resolve, reject) => {
|
|
2310
2298
|
const criteria = getCriteriaDefaults(passedCriteria);
|
|
2311
|
-
checkWhatAlreadyOccupiesPathAsync(
|
|
2299
|
+
checkWhatAlreadyOccupiesPathAsync(path).then((stat) => {
|
|
2312
2300
|
if (stat !== void 0) {
|
|
2313
2301
|
return checkExistingDirectoryFulfillsCriteriaAsync(
|
|
2314
|
-
|
|
2302
|
+
path,
|
|
2315
2303
|
stat,
|
|
2316
2304
|
criteria
|
|
2317
2305
|
);
|
|
2318
2306
|
}
|
|
2319
|
-
return createBrandNewDirectoryAsync(
|
|
2307
|
+
return createBrandNewDirectoryAsync(path, criteria);
|
|
2320
2308
|
}).then(resolve, reject);
|
|
2321
2309
|
});
|
|
2322
2310
|
};
|
|
@@ -2331,12 +2319,12 @@ var require_write = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
2331
2319
|
"../../node_modules/.pnpm/fs-jetpack@5.1.0/node_modules/fs-jetpack/lib/write.js"(exports) {
|
|
2332
2320
|
"use strict";
|
|
2333
2321
|
var pathUtil = (0, import_chunk_2ESYSVXG.__require)("path");
|
|
2334
|
-
var
|
|
2322
|
+
var fs = require_fs();
|
|
2335
2323
|
var validate = require_validate();
|
|
2336
2324
|
var dir = require_dir();
|
|
2337
|
-
var validateInput = (methodName,
|
|
2325
|
+
var validateInput = (methodName, path, data, options) => {
|
|
2338
2326
|
const methodSignature = `${methodName}(path, data, [options])`;
|
|
2339
|
-
validate.argument(methodSignature, "path",
|
|
2327
|
+
validate.argument(methodSignature, "path", path, ["string"]);
|
|
2340
2328
|
validate.argument(methodSignature, "data", data, [
|
|
2341
2329
|
"string",
|
|
2342
2330
|
"buffer",
|
|
@@ -2360,37 +2348,37 @@ var require_write = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
2360
2348
|
}
|
|
2361
2349
|
return data;
|
|
2362
2350
|
};
|
|
2363
|
-
var writeFileSync = (
|
|
2351
|
+
var writeFileSync = (path, data, options) => {
|
|
2364
2352
|
try {
|
|
2365
|
-
|
|
2353
|
+
fs.writeFileSync(path, data, options);
|
|
2366
2354
|
} catch (err) {
|
|
2367
2355
|
if (err.code === "ENOENT") {
|
|
2368
|
-
dir.createSync(pathUtil.dirname(
|
|
2369
|
-
|
|
2356
|
+
dir.createSync(pathUtil.dirname(path));
|
|
2357
|
+
fs.writeFileSync(path, data, options);
|
|
2370
2358
|
} else {
|
|
2371
2359
|
throw err;
|
|
2372
2360
|
}
|
|
2373
2361
|
}
|
|
2374
2362
|
};
|
|
2375
|
-
var writeAtomicSync = (
|
|
2376
|
-
writeFileSync(
|
|
2377
|
-
|
|
2363
|
+
var writeAtomicSync = (path, data, options) => {
|
|
2364
|
+
writeFileSync(path + newExt, data, options);
|
|
2365
|
+
fs.renameSync(path + newExt, path);
|
|
2378
2366
|
};
|
|
2379
|
-
var writeSync = (
|
|
2367
|
+
var writeSync = (path, data, options) => {
|
|
2380
2368
|
const opts = options || {};
|
|
2381
2369
|
const processedData = serializeToJsonMaybe(data, opts.jsonIndent);
|
|
2382
2370
|
let writeStrategy = writeFileSync;
|
|
2383
2371
|
if (opts.atomic) {
|
|
2384
2372
|
writeStrategy = writeAtomicSync;
|
|
2385
2373
|
}
|
|
2386
|
-
writeStrategy(
|
|
2374
|
+
writeStrategy(path, processedData, { mode: opts.mode });
|
|
2387
2375
|
};
|
|
2388
|
-
var writeFileAsync = (
|
|
2376
|
+
var writeFileAsync = (path, data, options) => {
|
|
2389
2377
|
return new Promise((resolve, reject) => {
|
|
2390
|
-
|
|
2378
|
+
fs.writeFile(path, data, options).then(resolve).catch((err) => {
|
|
2391
2379
|
if (err.code === "ENOENT") {
|
|
2392
|
-
dir.createAsync(pathUtil.dirname(
|
|
2393
|
-
return
|
|
2380
|
+
dir.createAsync(pathUtil.dirname(path)).then(() => {
|
|
2381
|
+
return fs.writeFile(path, data, options);
|
|
2394
2382
|
}).then(resolve, reject);
|
|
2395
2383
|
} else {
|
|
2396
2384
|
reject(err);
|
|
@@ -2398,21 +2386,21 @@ var require_write = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
2398
2386
|
});
|
|
2399
2387
|
});
|
|
2400
2388
|
};
|
|
2401
|
-
var writeAtomicAsync = (
|
|
2389
|
+
var writeAtomicAsync = (path, data, options) => {
|
|
2402
2390
|
return new Promise((resolve, reject) => {
|
|
2403
|
-
writeFileAsync(
|
|
2404
|
-
return
|
|
2391
|
+
writeFileAsync(path + newExt, data, options).then(() => {
|
|
2392
|
+
return fs.rename(path + newExt, path);
|
|
2405
2393
|
}).then(resolve, reject);
|
|
2406
2394
|
});
|
|
2407
2395
|
};
|
|
2408
|
-
var writeAsync = (
|
|
2396
|
+
var writeAsync = (path, data, options) => {
|
|
2409
2397
|
const opts = options || {};
|
|
2410
2398
|
const processedData = serializeToJsonMaybe(data, opts.jsonIndent);
|
|
2411
2399
|
let writeStrategy = writeFileAsync;
|
|
2412
2400
|
if (opts.atomic) {
|
|
2413
2401
|
writeStrategy = writeAtomicAsync;
|
|
2414
2402
|
}
|
|
2415
|
-
return writeStrategy(
|
|
2403
|
+
return writeStrategy(path, processedData, { mode: opts.mode });
|
|
2416
2404
|
};
|
|
2417
2405
|
exports.validateInput = validateInput;
|
|
2418
2406
|
exports.sync = writeSync;
|
|
@@ -2422,33 +2410,33 @@ var require_write = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
2422
2410
|
var require_append = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
2423
2411
|
"../../node_modules/.pnpm/fs-jetpack@5.1.0/node_modules/fs-jetpack/lib/append.js"(exports) {
|
|
2424
2412
|
"use strict";
|
|
2425
|
-
var
|
|
2413
|
+
var fs = require_fs();
|
|
2426
2414
|
var write = require_write();
|
|
2427
2415
|
var validate = require_validate();
|
|
2428
|
-
var validateInput = (methodName,
|
|
2416
|
+
var validateInput = (methodName, path, data, options) => {
|
|
2429
2417
|
const methodSignature = `${methodName}(path, data, [options])`;
|
|
2430
|
-
validate.argument(methodSignature, "path",
|
|
2418
|
+
validate.argument(methodSignature, "path", path, ["string"]);
|
|
2431
2419
|
validate.argument(methodSignature, "data", data, ["string", "buffer"]);
|
|
2432
2420
|
validate.options(methodSignature, "options", options, {
|
|
2433
2421
|
mode: ["string", "number"]
|
|
2434
2422
|
});
|
|
2435
2423
|
};
|
|
2436
|
-
var appendSync = (
|
|
2424
|
+
var appendSync = (path, data, options) => {
|
|
2437
2425
|
try {
|
|
2438
|
-
|
|
2426
|
+
fs.appendFileSync(path, data, options);
|
|
2439
2427
|
} catch (err) {
|
|
2440
2428
|
if (err.code === "ENOENT") {
|
|
2441
|
-
write.sync(
|
|
2429
|
+
write.sync(path, data, options);
|
|
2442
2430
|
} else {
|
|
2443
2431
|
throw err;
|
|
2444
2432
|
}
|
|
2445
2433
|
}
|
|
2446
2434
|
};
|
|
2447
|
-
var appendAsync = (
|
|
2435
|
+
var appendAsync = (path, data, options) => {
|
|
2448
2436
|
return new Promise((resolve, reject) => {
|
|
2449
|
-
|
|
2437
|
+
fs.appendFile(path, data, options).then(resolve).catch((err) => {
|
|
2450
2438
|
if (err.code === "ENOENT") {
|
|
2451
|
-
write.async(
|
|
2439
|
+
write.async(path, data, options).then(resolve, reject);
|
|
2452
2440
|
} else {
|
|
2453
2441
|
reject(err);
|
|
2454
2442
|
}
|
|
@@ -2463,13 +2451,13 @@ var require_append = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
2463
2451
|
var require_file = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
2464
2452
|
"../../node_modules/.pnpm/fs-jetpack@5.1.0/node_modules/fs-jetpack/lib/file.js"(exports) {
|
|
2465
2453
|
"use strict";
|
|
2466
|
-
var
|
|
2454
|
+
var fs = require_fs();
|
|
2467
2455
|
var modeUtil = require_mode2();
|
|
2468
2456
|
var validate = require_validate();
|
|
2469
2457
|
var write = require_write();
|
|
2470
|
-
var validateInput = (methodName,
|
|
2458
|
+
var validateInput = (methodName, path, criteria) => {
|
|
2471
2459
|
const methodSignature = `${methodName}(path, [criteria])`;
|
|
2472
|
-
validate.argument(methodSignature, "path",
|
|
2460
|
+
validate.argument(methodSignature, "path", path, ["string"]);
|
|
2473
2461
|
validate.options(methodSignature, "criteria", criteria, {
|
|
2474
2462
|
content: ["string", "buffer", "object", "array"],
|
|
2475
2463
|
jsonIndent: ["number"],
|
|
@@ -2483,30 +2471,30 @@ var require_file = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
2483
2471
|
}
|
|
2484
2472
|
return criteria;
|
|
2485
2473
|
};
|
|
2486
|
-
var generatePathOccupiedByNotFileError = (
|
|
2474
|
+
var generatePathOccupiedByNotFileError = (path) => {
|
|
2487
2475
|
return new Error(
|
|
2488
|
-
`Path ${
|
|
2476
|
+
`Path ${path} exists but is not a file. Halting jetpack.file() call for safety reasons.`
|
|
2489
2477
|
);
|
|
2490
2478
|
};
|
|
2491
|
-
var checkWhatAlreadyOccupiesPathSync = (
|
|
2479
|
+
var checkWhatAlreadyOccupiesPathSync = (path) => {
|
|
2492
2480
|
let stat;
|
|
2493
2481
|
try {
|
|
2494
|
-
stat =
|
|
2482
|
+
stat = fs.statSync(path);
|
|
2495
2483
|
} catch (err) {
|
|
2496
2484
|
if (err.code !== "ENOENT") {
|
|
2497
2485
|
throw err;
|
|
2498
2486
|
}
|
|
2499
2487
|
}
|
|
2500
2488
|
if (stat && !stat.isFile()) {
|
|
2501
|
-
throw generatePathOccupiedByNotFileError(
|
|
2489
|
+
throw generatePathOccupiedByNotFileError(path);
|
|
2502
2490
|
}
|
|
2503
2491
|
return stat;
|
|
2504
2492
|
};
|
|
2505
|
-
var checkExistingFileFulfillsCriteriaSync = (
|
|
2493
|
+
var checkExistingFileFulfillsCriteriaSync = (path, stat, criteria) => {
|
|
2506
2494
|
const mode = modeUtil.normalizeFileMode(stat.mode);
|
|
2507
2495
|
const checkContent = () => {
|
|
2508
2496
|
if (criteria.content !== void 0) {
|
|
2509
|
-
write.sync(
|
|
2497
|
+
write.sync(path, criteria.content, {
|
|
2510
2498
|
mode,
|
|
2511
2499
|
jsonIndent: criteria.jsonIndent
|
|
2512
2500
|
});
|
|
@@ -2516,7 +2504,7 @@ var require_file = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
2516
2504
|
};
|
|
2517
2505
|
const checkMode = () => {
|
|
2518
2506
|
if (criteria.mode !== void 0 && criteria.mode !== mode) {
|
|
2519
|
-
|
|
2507
|
+
fs.chmodSync(path, criteria.mode);
|
|
2520
2508
|
}
|
|
2521
2509
|
};
|
|
2522
2510
|
const contentReplaced = checkContent();
|
|
@@ -2524,32 +2512,32 @@ var require_file = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
2524
2512
|
checkMode();
|
|
2525
2513
|
}
|
|
2526
2514
|
};
|
|
2527
|
-
var createBrandNewFileSync = (
|
|
2515
|
+
var createBrandNewFileSync = (path, criteria) => {
|
|
2528
2516
|
let content = "";
|
|
2529
2517
|
if (criteria.content !== void 0) {
|
|
2530
2518
|
content = criteria.content;
|
|
2531
2519
|
}
|
|
2532
|
-
write.sync(
|
|
2520
|
+
write.sync(path, content, {
|
|
2533
2521
|
mode: criteria.mode,
|
|
2534
2522
|
jsonIndent: criteria.jsonIndent
|
|
2535
2523
|
});
|
|
2536
2524
|
};
|
|
2537
|
-
var fileSync = (
|
|
2525
|
+
var fileSync = (path, passedCriteria) => {
|
|
2538
2526
|
const criteria = getCriteriaDefaults(passedCriteria);
|
|
2539
|
-
const stat = checkWhatAlreadyOccupiesPathSync(
|
|
2527
|
+
const stat = checkWhatAlreadyOccupiesPathSync(path);
|
|
2540
2528
|
if (stat !== void 0) {
|
|
2541
|
-
checkExistingFileFulfillsCriteriaSync(
|
|
2529
|
+
checkExistingFileFulfillsCriteriaSync(path, stat, criteria);
|
|
2542
2530
|
} else {
|
|
2543
|
-
createBrandNewFileSync(
|
|
2531
|
+
createBrandNewFileSync(path, criteria);
|
|
2544
2532
|
}
|
|
2545
2533
|
};
|
|
2546
|
-
var checkWhatAlreadyOccupiesPathAsync = (
|
|
2534
|
+
var checkWhatAlreadyOccupiesPathAsync = (path) => {
|
|
2547
2535
|
return new Promise((resolve, reject) => {
|
|
2548
|
-
|
|
2536
|
+
fs.stat(path).then((stat) => {
|
|
2549
2537
|
if (stat.isFile()) {
|
|
2550
2538
|
resolve(stat);
|
|
2551
2539
|
} else {
|
|
2552
|
-
reject(generatePathOccupiedByNotFileError(
|
|
2540
|
+
reject(generatePathOccupiedByNotFileError(path));
|
|
2553
2541
|
}
|
|
2554
2542
|
}).catch((err) => {
|
|
2555
2543
|
if (err.code === "ENOENT") {
|
|
@@ -2560,12 +2548,12 @@ var require_file = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
2560
2548
|
});
|
|
2561
2549
|
});
|
|
2562
2550
|
};
|
|
2563
|
-
var checkExistingFileFulfillsCriteriaAsync = (
|
|
2551
|
+
var checkExistingFileFulfillsCriteriaAsync = (path, stat, criteria) => {
|
|
2564
2552
|
const mode = modeUtil.normalizeFileMode(stat.mode);
|
|
2565
2553
|
const checkContent = () => {
|
|
2566
2554
|
return new Promise((resolve, reject) => {
|
|
2567
2555
|
if (criteria.content !== void 0) {
|
|
2568
|
-
write.async(
|
|
2556
|
+
write.async(path, criteria.content, {
|
|
2569
2557
|
mode,
|
|
2570
2558
|
jsonIndent: criteria.jsonIndent
|
|
2571
2559
|
}).then(() => {
|
|
@@ -2578,7 +2566,7 @@ var require_file = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
2578
2566
|
};
|
|
2579
2567
|
const checkMode = () => {
|
|
2580
2568
|
if (criteria.mode !== void 0 && criteria.mode !== mode) {
|
|
2581
|
-
return
|
|
2569
|
+
return fs.chmod(path, criteria.mode);
|
|
2582
2570
|
}
|
|
2583
2571
|
return void 0;
|
|
2584
2572
|
};
|
|
@@ -2589,24 +2577,24 @@ var require_file = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
2589
2577
|
return void 0;
|
|
2590
2578
|
});
|
|
2591
2579
|
};
|
|
2592
|
-
var createBrandNewFileAsync = (
|
|
2580
|
+
var createBrandNewFileAsync = (path, criteria) => {
|
|
2593
2581
|
let content = "";
|
|
2594
2582
|
if (criteria.content !== void 0) {
|
|
2595
2583
|
content = criteria.content;
|
|
2596
2584
|
}
|
|
2597
|
-
return write.async(
|
|
2585
|
+
return write.async(path, content, {
|
|
2598
2586
|
mode: criteria.mode,
|
|
2599
2587
|
jsonIndent: criteria.jsonIndent
|
|
2600
2588
|
});
|
|
2601
2589
|
};
|
|
2602
|
-
var fileAsync = (
|
|
2590
|
+
var fileAsync = (path, passedCriteria) => {
|
|
2603
2591
|
return new Promise((resolve, reject) => {
|
|
2604
2592
|
const criteria = getCriteriaDefaults(passedCriteria);
|
|
2605
|
-
checkWhatAlreadyOccupiesPathAsync(
|
|
2593
|
+
checkWhatAlreadyOccupiesPathAsync(path).then((stat) => {
|
|
2606
2594
|
if (stat !== void 0) {
|
|
2607
|
-
return checkExistingFileFulfillsCriteriaAsync(
|
|
2595
|
+
return checkExistingFileFulfillsCriteriaAsync(path, stat, criteria);
|
|
2608
2596
|
}
|
|
2609
|
-
return createBrandNewFileAsync(
|
|
2597
|
+
return createBrandNewFileAsync(path, criteria);
|
|
2610
2598
|
}).then(resolve, reject);
|
|
2611
2599
|
});
|
|
2612
2600
|
};
|
|
@@ -2620,13 +2608,13 @@ var require_inspect = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
2620
2608
|
"use strict";
|
|
2621
2609
|
var crypto = (0, import_chunk_2ESYSVXG.__require)("crypto");
|
|
2622
2610
|
var pathUtil = (0, import_chunk_2ESYSVXG.__require)("path");
|
|
2623
|
-
var
|
|
2611
|
+
var fs = require_fs();
|
|
2624
2612
|
var validate = require_validate();
|
|
2625
2613
|
var supportedChecksumAlgorithms = ["md5", "sha1", "sha256", "sha512"];
|
|
2626
2614
|
var symlinkOptions = ["report", "follow"];
|
|
2627
|
-
var validateInput = (methodName,
|
|
2615
|
+
var validateInput = (methodName, path, options) => {
|
|
2628
2616
|
const methodSignature = `${methodName}(path, [options])`;
|
|
2629
|
-
validate.argument(methodSignature, "path",
|
|
2617
|
+
validate.argument(methodSignature, "path", path, ["string"]);
|
|
2630
2618
|
validate.options(methodSignature, "options", options, {
|
|
2631
2619
|
checksum: ["string"],
|
|
2632
2620
|
mode: ["boolean"],
|
|
@@ -2649,9 +2637,9 @@ var require_inspect = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
2649
2637
|
);
|
|
2650
2638
|
}
|
|
2651
2639
|
};
|
|
2652
|
-
var createInspectObj = (
|
|
2640
|
+
var createInspectObj = (path, options, stat) => {
|
|
2653
2641
|
const obj = {};
|
|
2654
|
-
obj.name = pathUtil.basename(
|
|
2642
|
+
obj.name = pathUtil.basename(path);
|
|
2655
2643
|
if (stat.isFile()) {
|
|
2656
2644
|
obj.type = "file";
|
|
2657
2645
|
obj.size = stat.size;
|
|
@@ -2672,46 +2660,46 @@ var require_inspect = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
2672
2660
|
obj.birthTime = stat.birthtime;
|
|
2673
2661
|
}
|
|
2674
2662
|
if (options.absolutePath) {
|
|
2675
|
-
obj.absolutePath =
|
|
2663
|
+
obj.absolutePath = path;
|
|
2676
2664
|
}
|
|
2677
2665
|
return obj;
|
|
2678
2666
|
};
|
|
2679
|
-
var fileChecksum = (
|
|
2667
|
+
var fileChecksum = (path, algo) => {
|
|
2680
2668
|
const hash = crypto.createHash(algo);
|
|
2681
|
-
const data =
|
|
2669
|
+
const data = fs.readFileSync(path);
|
|
2682
2670
|
hash.update(data);
|
|
2683
2671
|
return hash.digest("hex");
|
|
2684
2672
|
};
|
|
2685
|
-
var addExtraFieldsSync = (
|
|
2673
|
+
var addExtraFieldsSync = (path, inspectObj, options) => {
|
|
2686
2674
|
if (inspectObj.type === "file" && options.checksum) {
|
|
2687
|
-
inspectObj[options.checksum] = fileChecksum(
|
|
2675
|
+
inspectObj[options.checksum] = fileChecksum(path, options.checksum);
|
|
2688
2676
|
} else if (inspectObj.type === "symlink") {
|
|
2689
|
-
inspectObj.pointsAt =
|
|
2677
|
+
inspectObj.pointsAt = fs.readlinkSync(path);
|
|
2690
2678
|
}
|
|
2691
2679
|
};
|
|
2692
|
-
var inspectSync = (
|
|
2693
|
-
let statOperation =
|
|
2680
|
+
var inspectSync = (path, options) => {
|
|
2681
|
+
let statOperation = fs.lstatSync;
|
|
2694
2682
|
let stat;
|
|
2695
2683
|
const opts = options || {};
|
|
2696
2684
|
if (opts.symlinks === "follow") {
|
|
2697
|
-
statOperation =
|
|
2685
|
+
statOperation = fs.statSync;
|
|
2698
2686
|
}
|
|
2699
2687
|
try {
|
|
2700
|
-
stat = statOperation(
|
|
2688
|
+
stat = statOperation(path);
|
|
2701
2689
|
} catch (err) {
|
|
2702
2690
|
if (err.code === "ENOENT") {
|
|
2703
2691
|
return void 0;
|
|
2704
2692
|
}
|
|
2705
2693
|
throw err;
|
|
2706
2694
|
}
|
|
2707
|
-
const inspectObj = createInspectObj(
|
|
2708
|
-
addExtraFieldsSync(
|
|
2695
|
+
const inspectObj = createInspectObj(path, opts, stat);
|
|
2696
|
+
addExtraFieldsSync(path, inspectObj, opts);
|
|
2709
2697
|
return inspectObj;
|
|
2710
2698
|
};
|
|
2711
|
-
var fileChecksumAsync = (
|
|
2699
|
+
var fileChecksumAsync = (path, algo) => {
|
|
2712
2700
|
return new Promise((resolve, reject) => {
|
|
2713
2701
|
const hash = crypto.createHash(algo);
|
|
2714
|
-
const s =
|
|
2702
|
+
const s = fs.createReadStream(path);
|
|
2715
2703
|
s.on("data", (data) => {
|
|
2716
2704
|
hash.update(data);
|
|
2717
2705
|
});
|
|
@@ -2721,30 +2709,30 @@ var require_inspect = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
2721
2709
|
s.on("error", reject);
|
|
2722
2710
|
});
|
|
2723
2711
|
};
|
|
2724
|
-
var addExtraFieldsAsync = (
|
|
2712
|
+
var addExtraFieldsAsync = (path, inspectObj, options) => {
|
|
2725
2713
|
if (inspectObj.type === "file" && options.checksum) {
|
|
2726
|
-
return fileChecksumAsync(
|
|
2714
|
+
return fileChecksumAsync(path, options.checksum).then((checksum) => {
|
|
2727
2715
|
inspectObj[options.checksum] = checksum;
|
|
2728
2716
|
return inspectObj;
|
|
2729
2717
|
});
|
|
2730
2718
|
} else if (inspectObj.type === "symlink") {
|
|
2731
|
-
return
|
|
2719
|
+
return fs.readlink(path).then((linkPath) => {
|
|
2732
2720
|
inspectObj.pointsAt = linkPath;
|
|
2733
2721
|
return inspectObj;
|
|
2734
2722
|
});
|
|
2735
2723
|
}
|
|
2736
2724
|
return Promise.resolve(inspectObj);
|
|
2737
2725
|
};
|
|
2738
|
-
var inspectAsync = (
|
|
2726
|
+
var inspectAsync = (path, options) => {
|
|
2739
2727
|
return new Promise((resolve, reject) => {
|
|
2740
|
-
let statOperation =
|
|
2728
|
+
let statOperation = fs.lstat;
|
|
2741
2729
|
const opts = options || {};
|
|
2742
2730
|
if (opts.symlinks === "follow") {
|
|
2743
|
-
statOperation =
|
|
2731
|
+
statOperation = fs.stat;
|
|
2744
2732
|
}
|
|
2745
|
-
statOperation(
|
|
2746
|
-
const inspectObj = createInspectObj(
|
|
2747
|
-
addExtraFieldsAsync(
|
|
2733
|
+
statOperation(path).then((stat) => {
|
|
2734
|
+
const inspectObj = createInspectObj(path, opts, stat);
|
|
2735
|
+
addExtraFieldsAsync(path, inspectObj, opts).then(resolve, reject);
|
|
2748
2736
|
}).catch((err) => {
|
|
2749
2737
|
if (err.code === "ENOENT") {
|
|
2750
2738
|
resolve(void 0);
|
|
@@ -2764,15 +2752,15 @@ var require_inspect = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
2764
2752
|
var require_list = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
2765
2753
|
"../../node_modules/.pnpm/fs-jetpack@5.1.0/node_modules/fs-jetpack/lib/list.js"(exports) {
|
|
2766
2754
|
"use strict";
|
|
2767
|
-
var
|
|
2755
|
+
var fs = require_fs();
|
|
2768
2756
|
var validate = require_validate();
|
|
2769
|
-
var validateInput = (methodName,
|
|
2757
|
+
var validateInput = (methodName, path) => {
|
|
2770
2758
|
const methodSignature = `${methodName}(path)`;
|
|
2771
|
-
validate.argument(methodSignature, "path",
|
|
2759
|
+
validate.argument(methodSignature, "path", path, ["string", "undefined"]);
|
|
2772
2760
|
};
|
|
2773
|
-
var listSync = (
|
|
2761
|
+
var listSync = (path) => {
|
|
2774
2762
|
try {
|
|
2775
|
-
return
|
|
2763
|
+
return fs.readdirSync(path);
|
|
2776
2764
|
} catch (err) {
|
|
2777
2765
|
if (err.code === "ENOENT") {
|
|
2778
2766
|
return void 0;
|
|
@@ -2780,9 +2768,9 @@ var require_list = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
2780
2768
|
throw err;
|
|
2781
2769
|
}
|
|
2782
2770
|
};
|
|
2783
|
-
var listAsync = (
|
|
2771
|
+
var listAsync = (path) => {
|
|
2784
2772
|
return new Promise((resolve, reject) => {
|
|
2785
|
-
|
|
2773
|
+
fs.readdir(path).then((list) => {
|
|
2786
2774
|
resolve(list);
|
|
2787
2775
|
}).catch((err) => {
|
|
2788
2776
|
if (err.code === "ENOENT") {
|
|
@@ -2801,7 +2789,7 @@ var require_list = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
2801
2789
|
var require_tree_walker = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
2802
2790
|
"../../node_modules/.pnpm/fs-jetpack@5.1.0/node_modules/fs-jetpack/lib/utils/tree_walker.js"(exports) {
|
|
2803
2791
|
"use strict";
|
|
2804
|
-
var
|
|
2792
|
+
var fs = (0, import_chunk_2ESYSVXG.__require)("fs");
|
|
2805
2793
|
var pathUtil = (0, import_chunk_2ESYSVXG.__require)("path");
|
|
2806
2794
|
var inspect = require_inspect();
|
|
2807
2795
|
var list = require_list();
|
|
@@ -2817,7 +2805,7 @@ var require_tree_walker = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
2817
2805
|
}
|
|
2818
2806
|
return "other";
|
|
2819
2807
|
};
|
|
2820
|
-
var initialWalkSync = (
|
|
2808
|
+
var initialWalkSync = (path, options, callback) => {
|
|
2821
2809
|
if (options.maxLevelsDeep === void 0) {
|
|
2822
2810
|
options.maxLevelsDeep = Infinity;
|
|
2823
2811
|
}
|
|
@@ -2829,14 +2817,14 @@ var require_tree_walker = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
2829
2817
|
options.inspectOptions.symlinks = options.symlinks;
|
|
2830
2818
|
}
|
|
2831
2819
|
}
|
|
2832
|
-
const walkSync = (
|
|
2833
|
-
|
|
2820
|
+
const walkSync = (path2, currentLevel) => {
|
|
2821
|
+
fs.readdirSync(path2, { withFileTypes: true }).forEach((direntItem) => {
|
|
2834
2822
|
const withFileTypesNotSupported = typeof direntItem === "string";
|
|
2835
2823
|
let fileItemPath;
|
|
2836
2824
|
if (withFileTypesNotSupported) {
|
|
2837
|
-
fileItemPath = pathUtil.join(
|
|
2825
|
+
fileItemPath = pathUtil.join(path2, direntItem);
|
|
2838
2826
|
} else {
|
|
2839
|
-
fileItemPath = pathUtil.join(
|
|
2827
|
+
fileItemPath = pathUtil.join(path2, direntItem.name);
|
|
2840
2828
|
}
|
|
2841
2829
|
let fileItem;
|
|
2842
2830
|
if (performInspectOnEachNode) {
|
|
@@ -2850,7 +2838,7 @@ var require_tree_walker = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
2850
2838
|
} else {
|
|
2851
2839
|
const type = fileType(direntItem);
|
|
2852
2840
|
if (type === "symlink" && options.symlinks === "follow") {
|
|
2853
|
-
const symlinkPointsTo =
|
|
2841
|
+
const symlinkPointsTo = fs.statSync(fileItemPath);
|
|
2854
2842
|
fileItem = { name: direntItem.name, type: fileType(symlinkPointsTo) };
|
|
2855
2843
|
} else {
|
|
2856
2844
|
fileItem = { name: direntItem.name, type };
|
|
@@ -2864,22 +2852,22 @@ var require_tree_walker = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
2864
2852
|
}
|
|
2865
2853
|
});
|
|
2866
2854
|
};
|
|
2867
|
-
const item = inspect.sync(
|
|
2855
|
+
const item = inspect.sync(path, options.inspectOptions);
|
|
2868
2856
|
if (item) {
|
|
2869
2857
|
if (performInspectOnEachNode) {
|
|
2870
|
-
callback(
|
|
2858
|
+
callback(path, item);
|
|
2871
2859
|
} else {
|
|
2872
|
-
callback(
|
|
2860
|
+
callback(path, { name: item.name, type: item.type });
|
|
2873
2861
|
}
|
|
2874
2862
|
if (item.type === "dir") {
|
|
2875
|
-
walkSync(
|
|
2863
|
+
walkSync(path, 1);
|
|
2876
2864
|
}
|
|
2877
2865
|
} else {
|
|
2878
|
-
callback(
|
|
2866
|
+
callback(path, void 0);
|
|
2879
2867
|
}
|
|
2880
2868
|
};
|
|
2881
2869
|
var maxConcurrentOperations = 5;
|
|
2882
|
-
var initialWalkAsync = (
|
|
2870
|
+
var initialWalkAsync = (path, options, callback, doneCallback) => {
|
|
2883
2871
|
if (options.maxLevelsDeep === void 0) {
|
|
2884
2872
|
options.maxLevelsDeep = Infinity;
|
|
2885
2873
|
}
|
|
@@ -2910,14 +2898,14 @@ var require_tree_walker = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
2910
2898
|
nowDoingConcurrentOperations -= 1;
|
|
2911
2899
|
checkConcurrentOperations();
|
|
2912
2900
|
};
|
|
2913
|
-
const walkAsync = (
|
|
2901
|
+
const walkAsync = (path2, currentLevel) => {
|
|
2914
2902
|
const goDeeperIfDir = (fileItemPath, fileItem) => {
|
|
2915
2903
|
if (fileItem.type === "dir" && currentLevel < options.maxLevelsDeep) {
|
|
2916
2904
|
walkAsync(fileItemPath, currentLevel + 1);
|
|
2917
2905
|
}
|
|
2918
2906
|
};
|
|
2919
2907
|
whenConcurrencySlotAvailable(() => {
|
|
2920
|
-
|
|
2908
|
+
fs.readdir(path2, { withFileTypes: true }, (err, files) => {
|
|
2921
2909
|
if (err) {
|
|
2922
2910
|
doneCallback(err);
|
|
2923
2911
|
} else {
|
|
@@ -2925,9 +2913,9 @@ var require_tree_walker = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
2925
2913
|
const withFileTypesNotSupported = typeof direntItem === "string";
|
|
2926
2914
|
let fileItemPath;
|
|
2927
2915
|
if (withFileTypesNotSupported) {
|
|
2928
|
-
fileItemPath = pathUtil.join(
|
|
2916
|
+
fileItemPath = pathUtil.join(path2, direntItem);
|
|
2929
2917
|
} else {
|
|
2930
|
-
fileItemPath = pathUtil.join(
|
|
2918
|
+
fileItemPath = pathUtil.join(path2, direntItem.name);
|
|
2931
2919
|
}
|
|
2932
2920
|
if (performInspectOnEachNode || withFileTypesNotSupported) {
|
|
2933
2921
|
whenConcurrencySlotAvailable(() => {
|
|
@@ -2952,7 +2940,7 @@ var require_tree_walker = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
2952
2940
|
const type = fileType(direntItem);
|
|
2953
2941
|
if (type === "symlink" && options.symlinks === "follow") {
|
|
2954
2942
|
whenConcurrencySlotAvailable(() => {
|
|
2955
|
-
|
|
2943
|
+
fs.stat(fileItemPath, (err2, symlinkPointsTo) => {
|
|
2956
2944
|
if (err2) {
|
|
2957
2945
|
doneCallback(err2);
|
|
2958
2946
|
} else {
|
|
@@ -2978,20 +2966,20 @@ var require_tree_walker = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
2978
2966
|
});
|
|
2979
2967
|
});
|
|
2980
2968
|
};
|
|
2981
|
-
inspect.async(
|
|
2969
|
+
inspect.async(path, options.inspectOptions).then((item) => {
|
|
2982
2970
|
if (item) {
|
|
2983
2971
|
if (performInspectOnEachNode) {
|
|
2984
|
-
callback(
|
|
2972
|
+
callback(path, item);
|
|
2985
2973
|
} else {
|
|
2986
|
-
callback(
|
|
2974
|
+
callback(path, { name: item.name, type: item.type });
|
|
2987
2975
|
}
|
|
2988
2976
|
if (item.type === "dir") {
|
|
2989
|
-
walkAsync(
|
|
2977
|
+
walkAsync(path, 1);
|
|
2990
2978
|
} else {
|
|
2991
2979
|
doneCallback();
|
|
2992
2980
|
}
|
|
2993
2981
|
} else {
|
|
2994
|
-
callback(
|
|
2982
|
+
callback(path, void 0);
|
|
2995
2983
|
doneCallback();
|
|
2996
2984
|
}
|
|
2997
2985
|
}).catch((err) => {
|
|
@@ -3225,8 +3213,8 @@ var require_minimatch = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
3225
3213
|
return new Minimatch(pattern, options).match(p);
|
|
3226
3214
|
};
|
|
3227
3215
|
module2.exports = minimatch;
|
|
3228
|
-
var
|
|
3229
|
-
minimatch.sep =
|
|
3216
|
+
var path = require_path();
|
|
3217
|
+
minimatch.sep = path.sep;
|
|
3230
3218
|
var GLOBSTAR = Symbol("globstar **");
|
|
3231
3219
|
minimatch.GLOBSTAR = GLOBSTAR;
|
|
3232
3220
|
var expand = require_brace_expansion();
|
|
@@ -3711,8 +3699,8 @@ var require_minimatch = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
3711
3699
|
if (this.empty) return f === "";
|
|
3712
3700
|
if (f === "/" && partial) return true;
|
|
3713
3701
|
const options = this.options;
|
|
3714
|
-
if (
|
|
3715
|
-
f = f.split(
|
|
3702
|
+
if (path.sep !== "/") {
|
|
3703
|
+
f = f.split(path.sep).join("/");
|
|
3716
3704
|
}
|
|
3717
3705
|
f = f.split(slashSplit);
|
|
3718
3706
|
this.debug(this.pattern, "split", f);
|
|
@@ -3820,9 +3808,9 @@ var require_find = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
3820
3808
|
var inspect = require_inspect();
|
|
3821
3809
|
var matcher = require_matcher();
|
|
3822
3810
|
var validate = require_validate();
|
|
3823
|
-
var validateInput = (methodName,
|
|
3811
|
+
var validateInput = (methodName, path, options) => {
|
|
3824
3812
|
const methodSignature = `${methodName}([path], options)`;
|
|
3825
|
-
validate.argument(methodSignature, "path",
|
|
3813
|
+
validate.argument(methodSignature, "path", path, ["string"]);
|
|
3826
3814
|
validate.options(methodSignature, "options", options, {
|
|
3827
3815
|
matching: ["string", "array of string"],
|
|
3828
3816
|
filter: ["function"],
|
|
@@ -3852,26 +3840,26 @@ var require_find = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
3852
3840
|
return opts;
|
|
3853
3841
|
};
|
|
3854
3842
|
var processFoundPaths = (foundPaths, cwd) => {
|
|
3855
|
-
return foundPaths.map((
|
|
3856
|
-
return pathUtil.relative(cwd,
|
|
3843
|
+
return foundPaths.map((path) => {
|
|
3844
|
+
return pathUtil.relative(cwd, path);
|
|
3857
3845
|
});
|
|
3858
3846
|
};
|
|
3859
|
-
var generatePathDoesntExistError = (
|
|
3860
|
-
const err = new Error(`Path you want to find stuff in doesn't exist ${
|
|
3847
|
+
var generatePathDoesntExistError = (path) => {
|
|
3848
|
+
const err = new Error(`Path you want to find stuff in doesn't exist ${path}`);
|
|
3861
3849
|
err.code = "ENOENT";
|
|
3862
3850
|
return err;
|
|
3863
3851
|
};
|
|
3864
|
-
var generatePathNotDirectoryError = (
|
|
3852
|
+
var generatePathNotDirectoryError = (path) => {
|
|
3865
3853
|
const err = new Error(
|
|
3866
|
-
`Path you want to find stuff in must be a directory ${
|
|
3854
|
+
`Path you want to find stuff in must be a directory ${path}`
|
|
3867
3855
|
);
|
|
3868
3856
|
err.code = "ENOTDIR";
|
|
3869
3857
|
return err;
|
|
3870
3858
|
};
|
|
3871
|
-
var findSync = (
|
|
3859
|
+
var findSync = (path, options) => {
|
|
3872
3860
|
const foundAbsolutePaths = [];
|
|
3873
3861
|
const matchesAnyOfGlobs = matcher.create(
|
|
3874
|
-
|
|
3862
|
+
path,
|
|
3875
3863
|
options.matching,
|
|
3876
3864
|
options.ignoreCase
|
|
3877
3865
|
);
|
|
@@ -3880,14 +3868,14 @@ var require_find = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
3880
3868
|
maxLevelsDeep = 1;
|
|
3881
3869
|
}
|
|
3882
3870
|
treeWalker.sync(
|
|
3883
|
-
|
|
3871
|
+
path,
|
|
3884
3872
|
{
|
|
3885
3873
|
maxLevelsDeep,
|
|
3886
3874
|
symlinks: "follow",
|
|
3887
3875
|
inspectOptions: { times: true, absolutePath: true }
|
|
3888
3876
|
},
|
|
3889
3877
|
(itemPath, item) => {
|
|
3890
|
-
if (item && itemPath !==
|
|
3878
|
+
if (item && itemPath !== path && matchesAnyOfGlobs(itemPath)) {
|
|
3891
3879
|
const weHaveMatch = item.type === "file" && options.files === true || item.type === "dir" && options.directories === true;
|
|
3892
3880
|
if (weHaveMatch) {
|
|
3893
3881
|
if (options.filter) {
|
|
@@ -3905,20 +3893,20 @@ var require_find = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
3905
3893
|
foundAbsolutePaths.sort();
|
|
3906
3894
|
return processFoundPaths(foundAbsolutePaths, options.cwd);
|
|
3907
3895
|
};
|
|
3908
|
-
var findSyncInit = (
|
|
3909
|
-
const entryPointInspect = inspect.sync(
|
|
3896
|
+
var findSyncInit = (path, options) => {
|
|
3897
|
+
const entryPointInspect = inspect.sync(path, { symlinks: "follow" });
|
|
3910
3898
|
if (entryPointInspect === void 0) {
|
|
3911
|
-
throw generatePathDoesntExistError(
|
|
3899
|
+
throw generatePathDoesntExistError(path);
|
|
3912
3900
|
} else if (entryPointInspect.type !== "dir") {
|
|
3913
|
-
throw generatePathNotDirectoryError(
|
|
3901
|
+
throw generatePathNotDirectoryError(path);
|
|
3914
3902
|
}
|
|
3915
|
-
return findSync(
|
|
3903
|
+
return findSync(path, normalizeOptions(options));
|
|
3916
3904
|
};
|
|
3917
|
-
var findAsync = (
|
|
3905
|
+
var findAsync = (path, options) => {
|
|
3918
3906
|
return new Promise((resolve, reject) => {
|
|
3919
3907
|
const foundAbsolutePaths = [];
|
|
3920
3908
|
const matchesAnyOfGlobs = matcher.create(
|
|
3921
|
-
|
|
3909
|
+
path,
|
|
3922
3910
|
options.matching,
|
|
3923
3911
|
options.ignoreCase
|
|
3924
3912
|
);
|
|
@@ -3935,14 +3923,14 @@ var require_find = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
3935
3923
|
}
|
|
3936
3924
|
};
|
|
3937
3925
|
treeWalker.async(
|
|
3938
|
-
|
|
3926
|
+
path,
|
|
3939
3927
|
{
|
|
3940
3928
|
maxLevelsDeep,
|
|
3941
3929
|
symlinks: "follow",
|
|
3942
3930
|
inspectOptions: { times: true, absolutePath: true }
|
|
3943
3931
|
},
|
|
3944
3932
|
(itemPath, item) => {
|
|
3945
|
-
if (item && itemPath !==
|
|
3933
|
+
if (item && itemPath !== path && matchesAnyOfGlobs(itemPath)) {
|
|
3946
3934
|
const weHaveMatch = item.type === "file" && options.files === true || item.type === "dir" && options.directories === true;
|
|
3947
3935
|
if (weHaveMatch) {
|
|
3948
3936
|
if (options.filter) {
|
|
@@ -3979,14 +3967,14 @@ var require_find = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
3979
3967
|
);
|
|
3980
3968
|
});
|
|
3981
3969
|
};
|
|
3982
|
-
var findAsyncInit = (
|
|
3983
|
-
return inspect.async(
|
|
3970
|
+
var findAsyncInit = (path, options) => {
|
|
3971
|
+
return inspect.async(path, { symlinks: "follow" }).then((entryPointInspect) => {
|
|
3984
3972
|
if (entryPointInspect === void 0) {
|
|
3985
|
-
throw generatePathDoesntExistError(
|
|
3973
|
+
throw generatePathDoesntExistError(path);
|
|
3986
3974
|
} else if (entryPointInspect.type !== "dir") {
|
|
3987
|
-
throw generatePathNotDirectoryError(
|
|
3975
|
+
throw generatePathNotDirectoryError(path);
|
|
3988
3976
|
}
|
|
3989
|
-
return findAsync(
|
|
3977
|
+
return findAsync(path, normalizeOptions(options));
|
|
3990
3978
|
});
|
|
3991
3979
|
};
|
|
3992
3980
|
exports.validateInput = validateInput;
|
|
@@ -4003,9 +3991,9 @@ var require_inspect_tree = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
4003
3991
|
var list = require_list();
|
|
4004
3992
|
var validate = require_validate();
|
|
4005
3993
|
var treeWalker = require_tree_walker();
|
|
4006
|
-
var validateInput = (methodName,
|
|
3994
|
+
var validateInput = (methodName, path, options) => {
|
|
4007
3995
|
const methodSignature = `${methodName}(path, [options])`;
|
|
4008
|
-
validate.argument(methodSignature, "path",
|
|
3996
|
+
validate.argument(methodSignature, "path", path, ["string"]);
|
|
4009
3997
|
validate.options(methodSignature, "options", options, {
|
|
4010
3998
|
checksum: ["string"],
|
|
4011
3999
|
relativePath: ["boolean"],
|
|
@@ -4079,15 +4067,15 @@ var require_inspect_tree = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
4079
4067
|
}
|
|
4080
4068
|
return treeNode;
|
|
4081
4069
|
};
|
|
4082
|
-
var inspectTreeSync = (
|
|
4070
|
+
var inspectTreeSync = (path, opts) => {
|
|
4083
4071
|
const options = opts || {};
|
|
4084
4072
|
let tree;
|
|
4085
|
-
treeWalker.sync(
|
|
4073
|
+
treeWalker.sync(path, { inspectOptions: options }, (itemPath, item) => {
|
|
4086
4074
|
if (item) {
|
|
4087
4075
|
if (item.type === "dir") {
|
|
4088
4076
|
item.children = [];
|
|
4089
4077
|
}
|
|
4090
|
-
const relativePath = pathUtil.relative(
|
|
4078
|
+
const relativePath = pathUtil.relative(path, itemPath);
|
|
4091
4079
|
if (relativePath === "") {
|
|
4092
4080
|
tree = item;
|
|
4093
4081
|
} else {
|
|
@@ -4105,19 +4093,19 @@ var require_inspect_tree = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
4105
4093
|
}
|
|
4106
4094
|
return tree;
|
|
4107
4095
|
};
|
|
4108
|
-
var inspectTreeAsync = (
|
|
4096
|
+
var inspectTreeAsync = (path, opts) => {
|
|
4109
4097
|
const options = opts || {};
|
|
4110
4098
|
let tree;
|
|
4111
4099
|
return new Promise((resolve, reject) => {
|
|
4112
4100
|
treeWalker.async(
|
|
4113
|
-
|
|
4101
|
+
path,
|
|
4114
4102
|
{ inspectOptions: options },
|
|
4115
4103
|
(itemPath, item) => {
|
|
4116
4104
|
if (item) {
|
|
4117
4105
|
if (item.type === "dir") {
|
|
4118
4106
|
item.children = [];
|
|
4119
4107
|
}
|
|
4120
|
-
const relativePath = pathUtil.relative(
|
|
4108
|
+
const relativePath = pathUtil.relative(path, itemPath);
|
|
4121
4109
|
if (relativePath === "") {
|
|
4122
4110
|
tree = item;
|
|
4123
4111
|
} else {
|
|
@@ -4151,15 +4139,15 @@ var require_inspect_tree = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
4151
4139
|
var require_exists = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
4152
4140
|
"../../node_modules/.pnpm/fs-jetpack@5.1.0/node_modules/fs-jetpack/lib/exists.js"(exports) {
|
|
4153
4141
|
"use strict";
|
|
4154
|
-
var
|
|
4142
|
+
var fs = require_fs();
|
|
4155
4143
|
var validate = require_validate();
|
|
4156
|
-
var validateInput = (methodName,
|
|
4144
|
+
var validateInput = (methodName, path) => {
|
|
4157
4145
|
const methodSignature = `${methodName}(path)`;
|
|
4158
|
-
validate.argument(methodSignature, "path",
|
|
4146
|
+
validate.argument(methodSignature, "path", path, ["string"]);
|
|
4159
4147
|
};
|
|
4160
|
-
var existsSync = (
|
|
4148
|
+
var existsSync = (path) => {
|
|
4161
4149
|
try {
|
|
4162
|
-
const stat =
|
|
4150
|
+
const stat = fs.statSync(path);
|
|
4163
4151
|
if (stat.isDirectory()) {
|
|
4164
4152
|
return "dir";
|
|
4165
4153
|
} else if (stat.isFile()) {
|
|
@@ -4173,9 +4161,9 @@ var require_exists = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
4173
4161
|
}
|
|
4174
4162
|
return false;
|
|
4175
4163
|
};
|
|
4176
|
-
var existsAsync = (
|
|
4164
|
+
var existsAsync = (path) => {
|
|
4177
4165
|
return new Promise((resolve, reject) => {
|
|
4178
|
-
|
|
4166
|
+
fs.stat(path).then((stat) => {
|
|
4179
4167
|
if (stat.isDirectory()) {
|
|
4180
4168
|
resolve("dir");
|
|
4181
4169
|
} else if (stat.isFile()) {
|
|
@@ -4201,7 +4189,7 @@ var require_copy = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
4201
4189
|
"../../node_modules/.pnpm/fs-jetpack@5.1.0/node_modules/fs-jetpack/lib/copy.js"(exports) {
|
|
4202
4190
|
"use strict";
|
|
4203
4191
|
var pathUtil = (0, import_chunk_2ESYSVXG.__require)("path");
|
|
4204
|
-
var
|
|
4192
|
+
var fs = require_fs();
|
|
4205
4193
|
var dir = require_dir();
|
|
4206
4194
|
var exists = require_exists();
|
|
4207
4195
|
var inspect = require_inspect();
|
|
@@ -4240,13 +4228,13 @@ var require_copy = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
4240
4228
|
}
|
|
4241
4229
|
return parsedOptions;
|
|
4242
4230
|
};
|
|
4243
|
-
var generateNoSourceError = (
|
|
4244
|
-
const err = new Error(`Path to copy doesn't exist ${
|
|
4231
|
+
var generateNoSourceError = (path) => {
|
|
4232
|
+
const err = new Error(`Path to copy doesn't exist ${path}`);
|
|
4245
4233
|
err.code = "ENOENT";
|
|
4246
4234
|
return err;
|
|
4247
4235
|
};
|
|
4248
|
-
var generateDestinationExistsError = (
|
|
4249
|
-
const err = new Error(`Destination path already exists ${
|
|
4236
|
+
var generateDestinationExistsError = (path) => {
|
|
4237
|
+
const err = new Error(`Destination path already exists ${path}`);
|
|
4250
4238
|
err.code = "EEXIST";
|
|
4251
4239
|
return err;
|
|
4252
4240
|
};
|
|
@@ -4275,15 +4263,15 @@ var require_copy = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
4275
4263
|
return context.opts.overwrite === true;
|
|
4276
4264
|
};
|
|
4277
4265
|
var copyFileSync = (srcPath, destPath, mode, context) => {
|
|
4278
|
-
const data =
|
|
4266
|
+
const data = fs.readFileSync(srcPath);
|
|
4279
4267
|
try {
|
|
4280
|
-
|
|
4268
|
+
fs.writeFileSync(destPath, data, { mode, flag: "wx" });
|
|
4281
4269
|
} catch (err) {
|
|
4282
4270
|
if (err.code === "ENOENT") {
|
|
4283
4271
|
write.sync(destPath, data, { mode });
|
|
4284
4272
|
} else if (err.code === "EEXIST") {
|
|
4285
4273
|
if (canOverwriteItSync(context)) {
|
|
4286
|
-
|
|
4274
|
+
fs.writeFileSync(destPath, data, { mode });
|
|
4287
4275
|
} else if (shouldThrowDestinationExistsError(context)) {
|
|
4288
4276
|
throw generateDestinationExistsError(context.destPath);
|
|
4289
4277
|
}
|
|
@@ -4293,13 +4281,13 @@ var require_copy = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
4293
4281
|
}
|
|
4294
4282
|
};
|
|
4295
4283
|
var copySymlinkSync = (from, to) => {
|
|
4296
|
-
const symlinkPointsAt =
|
|
4284
|
+
const symlinkPointsAt = fs.readlinkSync(from);
|
|
4297
4285
|
try {
|
|
4298
|
-
|
|
4286
|
+
fs.symlinkSync(symlinkPointsAt, to);
|
|
4299
4287
|
} catch (err) {
|
|
4300
4288
|
if (err.code === "EEXIST") {
|
|
4301
|
-
|
|
4302
|
-
|
|
4289
|
+
fs.unlinkSync(to);
|
|
4290
|
+
fs.symlinkSync(symlinkPointsAt, to);
|
|
4303
4291
|
} else {
|
|
4304
4292
|
throw err;
|
|
4305
4293
|
}
|
|
@@ -4360,8 +4348,8 @@ var require_copy = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
4360
4348
|
if (runOpts.overwrite) {
|
|
4361
4349
|
flags = "w";
|
|
4362
4350
|
}
|
|
4363
|
-
const readStream =
|
|
4364
|
-
const writeStream =
|
|
4351
|
+
const readStream = fs.createReadStream(srcPath);
|
|
4352
|
+
const writeStream = fs.createWriteStream(destPath, { mode, flags });
|
|
4365
4353
|
readStream.on("error", reject);
|
|
4366
4354
|
writeStream.on("error", (err) => {
|
|
4367
4355
|
readStream.resume();
|
|
@@ -4393,12 +4381,12 @@ var require_copy = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
4393
4381
|
});
|
|
4394
4382
|
};
|
|
4395
4383
|
var copySymlinkAsync = (from, to) => {
|
|
4396
|
-
return
|
|
4384
|
+
return fs.readlink(from).then((symlinkPointsAt) => {
|
|
4397
4385
|
return new Promise((resolve, reject) => {
|
|
4398
|
-
|
|
4386
|
+
fs.symlink(symlinkPointsAt, to).then(resolve).catch((err) => {
|
|
4399
4387
|
if (err.code === "EEXIST") {
|
|
4400
|
-
|
|
4401
|
-
return
|
|
4388
|
+
fs.unlink(to).then(() => {
|
|
4389
|
+
return fs.symlink(symlinkPointsAt, to);
|
|
4402
4390
|
}).then(resolve, reject);
|
|
4403
4391
|
} else {
|
|
4404
4392
|
reject(err);
|
|
@@ -4466,7 +4454,7 @@ var require_move = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
4466
4454
|
"../../node_modules/.pnpm/fs-jetpack@5.1.0/node_modules/fs-jetpack/lib/move.js"(exports) {
|
|
4467
4455
|
"use strict";
|
|
4468
4456
|
var pathUtil = (0, import_chunk_2ESYSVXG.__require)("path");
|
|
4469
|
-
var
|
|
4457
|
+
var fs = require_fs();
|
|
4470
4458
|
var validate = require_validate();
|
|
4471
4459
|
var copy = require_copy();
|
|
4472
4460
|
var dir = require_dir();
|
|
@@ -4484,13 +4472,13 @@ var require_move = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
4484
4472
|
const opts = options || {};
|
|
4485
4473
|
return opts;
|
|
4486
4474
|
};
|
|
4487
|
-
var generateDestinationExistsError = (
|
|
4488
|
-
const err = new Error(`Destination path already exists ${
|
|
4475
|
+
var generateDestinationExistsError = (path) => {
|
|
4476
|
+
const err = new Error(`Destination path already exists ${path}`);
|
|
4489
4477
|
err.code = "EEXIST";
|
|
4490
4478
|
return err;
|
|
4491
4479
|
};
|
|
4492
|
-
var generateSourceDoesntExistError = (
|
|
4493
|
-
const err = new Error(`Path to move doesn't exist ${
|
|
4480
|
+
var generateSourceDoesntExistError = (path) => {
|
|
4481
|
+
const err = new Error(`Path to move doesn't exist ${path}`);
|
|
4494
4482
|
err.code = "ENOENT";
|
|
4495
4483
|
return err;
|
|
4496
4484
|
};
|
|
@@ -4500,11 +4488,11 @@ var require_move = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
4500
4488
|
throw generateDestinationExistsError(to);
|
|
4501
4489
|
}
|
|
4502
4490
|
try {
|
|
4503
|
-
|
|
4491
|
+
fs.renameSync(from, to);
|
|
4504
4492
|
} catch (err) {
|
|
4505
4493
|
if (err.code === "EISDIR" || err.code === "EPERM") {
|
|
4506
4494
|
remove.sync(to);
|
|
4507
|
-
|
|
4495
|
+
fs.renameSync(from, to);
|
|
4508
4496
|
} else if (err.code === "EXDEV") {
|
|
4509
4497
|
copy.sync(from, to, { overwrite: true });
|
|
4510
4498
|
remove.sync(from);
|
|
@@ -4513,7 +4501,7 @@ var require_move = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
4513
4501
|
throw generateSourceDoesntExistError(from);
|
|
4514
4502
|
}
|
|
4515
4503
|
dir.createSync(pathUtil.dirname(to));
|
|
4516
|
-
|
|
4504
|
+
fs.renameSync(from, to);
|
|
4517
4505
|
} else {
|
|
4518
4506
|
throw err;
|
|
4519
4507
|
}
|
|
@@ -4538,9 +4526,9 @@ var require_move = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
4538
4526
|
if (destinationExists !== false && opts.overwrite !== true) {
|
|
4539
4527
|
reject(generateDestinationExistsError(to));
|
|
4540
4528
|
} else {
|
|
4541
|
-
|
|
4529
|
+
fs.rename(from, to).then(resolve).catch((err) => {
|
|
4542
4530
|
if (err.code === "EISDIR" || err.code === "EPERM") {
|
|
4543
|
-
remove.async(to).then(() =>
|
|
4531
|
+
remove.async(to).then(() => fs.rename(from, to)).then(resolve, reject);
|
|
4544
4532
|
} else if (err.code === "EXDEV") {
|
|
4545
4533
|
copy.async(from, to, { overwrite: true }).then(() => remove.async(from)).then(resolve, reject);
|
|
4546
4534
|
} else if (err.code === "ENOENT") {
|
|
@@ -4549,7 +4537,7 @@ var require_move = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
4549
4537
|
reject(generateSourceDoesntExistError(from));
|
|
4550
4538
|
} else {
|
|
4551
4539
|
ensureDestinationPathExistsAsync(to).then(() => {
|
|
4552
|
-
return
|
|
4540
|
+
return fs.rename(from, to);
|
|
4553
4541
|
}).then(resolve, reject);
|
|
4554
4542
|
}
|
|
4555
4543
|
}).catch(reject);
|
|
@@ -4569,12 +4557,12 @@ var require_move = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
4569
4557
|
var require_read = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
4570
4558
|
"../../node_modules/.pnpm/fs-jetpack@5.1.0/node_modules/fs-jetpack/lib/read.js"(exports) {
|
|
4571
4559
|
"use strict";
|
|
4572
|
-
var
|
|
4560
|
+
var fs = require_fs();
|
|
4573
4561
|
var validate = require_validate();
|
|
4574
4562
|
var supportedReturnAs = ["utf8", "buffer", "json", "jsonWithDates"];
|
|
4575
|
-
var validateInput = (methodName,
|
|
4563
|
+
var validateInput = (methodName, path, returnAs) => {
|
|
4576
4564
|
const methodSignature = `${methodName}(path, returnAs)`;
|
|
4577
|
-
validate.argument(methodSignature, "path",
|
|
4565
|
+
validate.argument(methodSignature, "path", path, ["string"]);
|
|
4578
4566
|
validate.argument(methodSignature, "returnAs", returnAs, [
|
|
4579
4567
|
"string",
|
|
4580
4568
|
"undefined"
|
|
@@ -4596,14 +4584,14 @@ var require_read = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
4596
4584
|
}
|
|
4597
4585
|
return value;
|
|
4598
4586
|
};
|
|
4599
|
-
var makeNicerJsonParsingError = (
|
|
4587
|
+
var makeNicerJsonParsingError = (path, err) => {
|
|
4600
4588
|
const nicerError = new Error(
|
|
4601
|
-
`JSON parsing failed while reading ${
|
|
4589
|
+
`JSON parsing failed while reading ${path} [${err}]`
|
|
4602
4590
|
);
|
|
4603
4591
|
nicerError.originalError = err;
|
|
4604
4592
|
return nicerError;
|
|
4605
4593
|
};
|
|
4606
|
-
var readSync = (
|
|
4594
|
+
var readSync = (path, returnAs) => {
|
|
4607
4595
|
const retAs = returnAs || "utf8";
|
|
4608
4596
|
let data;
|
|
4609
4597
|
let encoding = "utf8";
|
|
@@ -4611,7 +4599,7 @@ var require_read = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
4611
4599
|
encoding = null;
|
|
4612
4600
|
}
|
|
4613
4601
|
try {
|
|
4614
|
-
data =
|
|
4602
|
+
data = fs.readFileSync(path, { encoding });
|
|
4615
4603
|
} catch (err) {
|
|
4616
4604
|
if (err.code === "ENOENT") {
|
|
4617
4605
|
return void 0;
|
|
@@ -4625,18 +4613,18 @@ var require_read = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
4625
4613
|
data = JSON.parse(data, jsonDateParser);
|
|
4626
4614
|
}
|
|
4627
4615
|
} catch (err) {
|
|
4628
|
-
throw makeNicerJsonParsingError(
|
|
4616
|
+
throw makeNicerJsonParsingError(path, err);
|
|
4629
4617
|
}
|
|
4630
4618
|
return data;
|
|
4631
4619
|
};
|
|
4632
|
-
var readAsync = (
|
|
4620
|
+
var readAsync = (path, returnAs) => {
|
|
4633
4621
|
return new Promise((resolve, reject) => {
|
|
4634
4622
|
const retAs = returnAs || "utf8";
|
|
4635
4623
|
let encoding = "utf8";
|
|
4636
4624
|
if (retAs === "buffer") {
|
|
4637
4625
|
encoding = null;
|
|
4638
4626
|
}
|
|
4639
|
-
|
|
4627
|
+
fs.readFile(path, { encoding }).then((data) => {
|
|
4640
4628
|
try {
|
|
4641
4629
|
if (retAs === "json") {
|
|
4642
4630
|
resolve(JSON.parse(data));
|
|
@@ -4646,7 +4634,7 @@ var require_read = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
4646
4634
|
resolve(data);
|
|
4647
4635
|
}
|
|
4648
4636
|
} catch (err) {
|
|
4649
|
-
reject(makeNicerJsonParsingError(
|
|
4637
|
+
reject(makeNicerJsonParsingError(path, err));
|
|
4650
4638
|
}
|
|
4651
4639
|
}).catch((err) => {
|
|
4652
4640
|
if (err.code === "ENOENT") {
|
|
@@ -4668,9 +4656,9 @@ var require_rename = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
4668
4656
|
var pathUtil = (0, import_chunk_2ESYSVXG.__require)("path");
|
|
4669
4657
|
var move = require_move();
|
|
4670
4658
|
var validate = require_validate();
|
|
4671
|
-
var validateInput = (methodName,
|
|
4659
|
+
var validateInput = (methodName, path, newName, options) => {
|
|
4672
4660
|
const methodSignature = `${methodName}(path, newName, [options])`;
|
|
4673
|
-
validate.argument(methodSignature, "path",
|
|
4661
|
+
validate.argument(methodSignature, "path", path, ["string"]);
|
|
4674
4662
|
validate.argument(methodSignature, "newName", newName, ["string"]);
|
|
4675
4663
|
validate.options(methodSignature, "options", options, {
|
|
4676
4664
|
overwrite: ["boolean"]
|
|
@@ -4681,13 +4669,13 @@ var require_rename = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
4681
4669
|
);
|
|
4682
4670
|
}
|
|
4683
4671
|
};
|
|
4684
|
-
var renameSync = (
|
|
4685
|
-
const newPath = pathUtil.join(pathUtil.dirname(
|
|
4686
|
-
move.sync(
|
|
4672
|
+
var renameSync = (path, newName, options) => {
|
|
4673
|
+
const newPath = pathUtil.join(pathUtil.dirname(path), newName);
|
|
4674
|
+
move.sync(path, newPath, options);
|
|
4687
4675
|
};
|
|
4688
|
-
var renameAsync = (
|
|
4689
|
-
const newPath = pathUtil.join(pathUtil.dirname(
|
|
4690
|
-
return move.async(
|
|
4676
|
+
var renameAsync = (path, newName, options) => {
|
|
4677
|
+
const newPath = pathUtil.join(pathUtil.dirname(path), newName);
|
|
4678
|
+
return move.async(path, newPath, options);
|
|
4691
4679
|
};
|
|
4692
4680
|
exports.validateInput = validateInput;
|
|
4693
4681
|
exports.sync = renameSync;
|
|
@@ -4698,32 +4686,32 @@ var require_symlink = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
4698
4686
|
"../../node_modules/.pnpm/fs-jetpack@5.1.0/node_modules/fs-jetpack/lib/symlink.js"(exports) {
|
|
4699
4687
|
"use strict";
|
|
4700
4688
|
var pathUtil = (0, import_chunk_2ESYSVXG.__require)("path");
|
|
4701
|
-
var
|
|
4689
|
+
var fs = require_fs();
|
|
4702
4690
|
var validate = require_validate();
|
|
4703
4691
|
var dir = require_dir();
|
|
4704
|
-
var validateInput = (methodName, symlinkValue,
|
|
4692
|
+
var validateInput = (methodName, symlinkValue, path) => {
|
|
4705
4693
|
const methodSignature = `${methodName}(symlinkValue, path)`;
|
|
4706
4694
|
validate.argument(methodSignature, "symlinkValue", symlinkValue, ["string"]);
|
|
4707
|
-
validate.argument(methodSignature, "path",
|
|
4695
|
+
validate.argument(methodSignature, "path", path, ["string"]);
|
|
4708
4696
|
};
|
|
4709
|
-
var symlinkSync = (symlinkValue,
|
|
4697
|
+
var symlinkSync = (symlinkValue, path) => {
|
|
4710
4698
|
try {
|
|
4711
|
-
|
|
4699
|
+
fs.symlinkSync(symlinkValue, path);
|
|
4712
4700
|
} catch (err) {
|
|
4713
4701
|
if (err.code === "ENOENT") {
|
|
4714
|
-
dir.createSync(pathUtil.dirname(
|
|
4715
|
-
|
|
4702
|
+
dir.createSync(pathUtil.dirname(path));
|
|
4703
|
+
fs.symlinkSync(symlinkValue, path);
|
|
4716
4704
|
} else {
|
|
4717
4705
|
throw err;
|
|
4718
4706
|
}
|
|
4719
4707
|
}
|
|
4720
4708
|
};
|
|
4721
|
-
var symlinkAsync = (symlinkValue,
|
|
4709
|
+
var symlinkAsync = (symlinkValue, path) => {
|
|
4722
4710
|
return new Promise((resolve, reject) => {
|
|
4723
|
-
|
|
4711
|
+
fs.symlink(symlinkValue, path).then(resolve).catch((err) => {
|
|
4724
4712
|
if (err.code === "ENOENT") {
|
|
4725
|
-
dir.createAsync(pathUtil.dirname(
|
|
4726
|
-
return
|
|
4713
|
+
dir.createAsync(pathUtil.dirname(path)).then(() => {
|
|
4714
|
+
return fs.symlink(symlinkValue, path);
|
|
4727
4715
|
}).then(resolve, reject);
|
|
4728
4716
|
} else {
|
|
4729
4717
|
reject(err);
|
|
@@ -4739,9 +4727,9 @@ var require_symlink = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
4739
4727
|
var require_streams = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
4740
4728
|
"../../node_modules/.pnpm/fs-jetpack@5.1.0/node_modules/fs-jetpack/lib/streams.js"(exports) {
|
|
4741
4729
|
"use strict";
|
|
4742
|
-
var
|
|
4743
|
-
exports.createWriteStream =
|
|
4744
|
-
exports.createReadStream =
|
|
4730
|
+
var fs = (0, import_chunk_2ESYSVXG.__require)("fs");
|
|
4731
|
+
exports.createWriteStream = fs.createWriteStream;
|
|
4732
|
+
exports.createReadStream = fs.createReadStream;
|
|
4745
4733
|
}
|
|
4746
4734
|
});
|
|
4747
4735
|
var require_tmp_dir = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
@@ -4751,7 +4739,7 @@ var require_tmp_dir = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
4751
4739
|
var os = (0, import_chunk_2ESYSVXG.__require)("os");
|
|
4752
4740
|
var crypto = (0, import_chunk_2ESYSVXG.__require)("crypto");
|
|
4753
4741
|
var dir = require_dir();
|
|
4754
|
-
var
|
|
4742
|
+
var fs = require_fs();
|
|
4755
4743
|
var validate = require_validate();
|
|
4756
4744
|
var validateInput = (methodName, options) => {
|
|
4757
4745
|
const methodSignature = `${methodName}([options])`;
|
|
@@ -4784,7 +4772,7 @@ var require_tmp_dir = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
4784
4772
|
options.prefix + randomString
|
|
4785
4773
|
);
|
|
4786
4774
|
try {
|
|
4787
|
-
|
|
4775
|
+
fs.mkdirSync(dirPath);
|
|
4788
4776
|
} catch (err) {
|
|
4789
4777
|
if (err.code === "ENOENT") {
|
|
4790
4778
|
dir.sync(dirPath);
|
|
@@ -4806,7 +4794,7 @@ var require_tmp_dir = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
4806
4794
|
options.basePath,
|
|
4807
4795
|
options.prefix + randomString
|
|
4808
4796
|
);
|
|
4809
|
-
|
|
4797
|
+
fs.mkdir(dirPath, (err2) => {
|
|
4810
4798
|
if (err2) {
|
|
4811
4799
|
if (err2.code === "ENOENT") {
|
|
4812
4800
|
dir.async(dirPath).then(() => {
|
|
@@ -4862,8 +4850,8 @@ var require_jetpack = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
4862
4850
|
const pathParts = [getCwdPath()].concat(args);
|
|
4863
4851
|
return jetpackContext(pathUtil.resolve.apply(null, pathParts));
|
|
4864
4852
|
};
|
|
4865
|
-
const resolvePath = (
|
|
4866
|
-
return pathUtil.resolve(getCwdPath(),
|
|
4853
|
+
const resolvePath = (path) => {
|
|
4854
|
+
return pathUtil.resolve(getCwdPath(), path);
|
|
4867
4855
|
};
|
|
4868
4856
|
const getPath = function() {
|
|
4869
4857
|
Array.prototype.unshift.call(arguments, getCwdPath());
|
|
@@ -4877,13 +4865,13 @@ var require_jetpack = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
4877
4865
|
const api = {
|
|
4878
4866
|
cwd,
|
|
4879
4867
|
path: getPath,
|
|
4880
|
-
append: (
|
|
4881
|
-
append.validateInput("append",
|
|
4882
|
-
append.sync(resolvePath(
|
|
4868
|
+
append: (path, data, options) => {
|
|
4869
|
+
append.validateInput("append", path, data, options);
|
|
4870
|
+
append.sync(resolvePath(path), data, options);
|
|
4883
4871
|
},
|
|
4884
|
-
appendAsync: (
|
|
4885
|
-
append.validateInput("appendAsync",
|
|
4886
|
-
return append.async(resolvePath(
|
|
4872
|
+
appendAsync: (path, data, options) => {
|
|
4873
|
+
append.validateInput("appendAsync", path, data, options);
|
|
4874
|
+
return append.async(resolvePath(path), data, options);
|
|
4887
4875
|
},
|
|
4888
4876
|
copy: (from, to, options) => {
|
|
4889
4877
|
copy.validateInput("copy", from, to, options);
|
|
@@ -4893,44 +4881,44 @@ var require_jetpack = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
4893
4881
|
copy.validateInput("copyAsync", from, to, options);
|
|
4894
4882
|
return copy.async(resolvePath(from), resolvePath(to), options);
|
|
4895
4883
|
},
|
|
4896
|
-
createWriteStream: (
|
|
4897
|
-
return streams.createWriteStream(resolvePath(
|
|
4884
|
+
createWriteStream: (path, options) => {
|
|
4885
|
+
return streams.createWriteStream(resolvePath(path), options);
|
|
4898
4886
|
},
|
|
4899
|
-
createReadStream: (
|
|
4900
|
-
return streams.createReadStream(resolvePath(
|
|
4887
|
+
createReadStream: (path, options) => {
|
|
4888
|
+
return streams.createReadStream(resolvePath(path), options);
|
|
4901
4889
|
},
|
|
4902
|
-
dir: (
|
|
4903
|
-
dir.validateInput("dir",
|
|
4904
|
-
const normalizedPath = resolvePath(
|
|
4890
|
+
dir: (path, criteria) => {
|
|
4891
|
+
dir.validateInput("dir", path, criteria);
|
|
4892
|
+
const normalizedPath = resolvePath(path);
|
|
4905
4893
|
dir.sync(normalizedPath, criteria);
|
|
4906
4894
|
return cwd(normalizedPath);
|
|
4907
4895
|
},
|
|
4908
|
-
dirAsync: (
|
|
4909
|
-
dir.validateInput("dirAsync",
|
|
4896
|
+
dirAsync: (path, criteria) => {
|
|
4897
|
+
dir.validateInput("dirAsync", path, criteria);
|
|
4910
4898
|
return new Promise((resolve, reject) => {
|
|
4911
|
-
const normalizedPath = resolvePath(
|
|
4899
|
+
const normalizedPath = resolvePath(path);
|
|
4912
4900
|
dir.async(normalizedPath, criteria).then(() => {
|
|
4913
4901
|
resolve(cwd(normalizedPath));
|
|
4914
4902
|
}, reject);
|
|
4915
4903
|
});
|
|
4916
4904
|
},
|
|
4917
|
-
exists: (
|
|
4918
|
-
exists.validateInput("exists",
|
|
4919
|
-
return exists.sync(resolvePath(
|
|
4905
|
+
exists: (path) => {
|
|
4906
|
+
exists.validateInput("exists", path);
|
|
4907
|
+
return exists.sync(resolvePath(path));
|
|
4920
4908
|
},
|
|
4921
|
-
existsAsync: (
|
|
4922
|
-
exists.validateInput("existsAsync",
|
|
4923
|
-
return exists.async(resolvePath(
|
|
4909
|
+
existsAsync: (path) => {
|
|
4910
|
+
exists.validateInput("existsAsync", path);
|
|
4911
|
+
return exists.async(resolvePath(path));
|
|
4924
4912
|
},
|
|
4925
|
-
file: (
|
|
4926
|
-
file.validateInput("file",
|
|
4927
|
-
file.sync(resolvePath(
|
|
4913
|
+
file: (path, criteria) => {
|
|
4914
|
+
file.validateInput("file", path, criteria);
|
|
4915
|
+
file.sync(resolvePath(path), criteria);
|
|
4928
4916
|
return api;
|
|
4929
4917
|
},
|
|
4930
|
-
fileAsync: (
|
|
4931
|
-
file.validateInput("fileAsync",
|
|
4918
|
+
fileAsync: (path, criteria) => {
|
|
4919
|
+
file.validateInput("fileAsync", path, criteria);
|
|
4932
4920
|
return new Promise((resolve, reject) => {
|
|
4933
|
-
file.async(resolvePath(
|
|
4921
|
+
file.async(resolvePath(path), criteria).then(() => {
|
|
4934
4922
|
resolve(api);
|
|
4935
4923
|
}, reject);
|
|
4936
4924
|
});
|
|
@@ -4951,29 +4939,29 @@ var require_jetpack = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
4951
4939
|
find.validateInput("findAsync", startPath, options);
|
|
4952
4940
|
return find.async(resolvePath(startPath), normalizeOptions(options));
|
|
4953
4941
|
},
|
|
4954
|
-
inspect: (
|
|
4955
|
-
inspect.validateInput("inspect",
|
|
4956
|
-
return inspect.sync(resolvePath(
|
|
4942
|
+
inspect: (path, fieldsToInclude) => {
|
|
4943
|
+
inspect.validateInput("inspect", path, fieldsToInclude);
|
|
4944
|
+
return inspect.sync(resolvePath(path), fieldsToInclude);
|
|
4957
4945
|
},
|
|
4958
|
-
inspectAsync: (
|
|
4959
|
-
inspect.validateInput("inspectAsync",
|
|
4960
|
-
return inspect.async(resolvePath(
|
|
4946
|
+
inspectAsync: (path, fieldsToInclude) => {
|
|
4947
|
+
inspect.validateInput("inspectAsync", path, fieldsToInclude);
|
|
4948
|
+
return inspect.async(resolvePath(path), fieldsToInclude);
|
|
4961
4949
|
},
|
|
4962
|
-
inspectTree: (
|
|
4963
|
-
inspectTree.validateInput("inspectTree",
|
|
4964
|
-
return inspectTree.sync(resolvePath(
|
|
4950
|
+
inspectTree: (path, options) => {
|
|
4951
|
+
inspectTree.validateInput("inspectTree", path, options);
|
|
4952
|
+
return inspectTree.sync(resolvePath(path), options);
|
|
4965
4953
|
},
|
|
4966
|
-
inspectTreeAsync: (
|
|
4967
|
-
inspectTree.validateInput("inspectTreeAsync",
|
|
4968
|
-
return inspectTree.async(resolvePath(
|
|
4954
|
+
inspectTreeAsync: (path, options) => {
|
|
4955
|
+
inspectTree.validateInput("inspectTreeAsync", path, options);
|
|
4956
|
+
return inspectTree.async(resolvePath(path), options);
|
|
4969
4957
|
},
|
|
4970
|
-
list: (
|
|
4971
|
-
list.validateInput("list",
|
|
4972
|
-
return list.sync(resolvePath(
|
|
4958
|
+
list: (path) => {
|
|
4959
|
+
list.validateInput("list", path);
|
|
4960
|
+
return list.sync(resolvePath(path || "."));
|
|
4973
4961
|
},
|
|
4974
|
-
listAsync: (
|
|
4975
|
-
list.validateInput("listAsync",
|
|
4976
|
-
return list.async(resolvePath(
|
|
4962
|
+
listAsync: (path) => {
|
|
4963
|
+
list.validateInput("listAsync", path);
|
|
4964
|
+
return list.async(resolvePath(path || "."));
|
|
4977
4965
|
},
|
|
4978
4966
|
move: (from, to, options) => {
|
|
4979
4967
|
move.validateInput("move", from, to, options);
|
|
@@ -4983,37 +4971,37 @@ var require_jetpack = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
4983
4971
|
move.validateInput("moveAsync", from, to, options);
|
|
4984
4972
|
return move.async(resolvePath(from), resolvePath(to), options);
|
|
4985
4973
|
},
|
|
4986
|
-
read: (
|
|
4987
|
-
read.validateInput("read",
|
|
4988
|
-
return read.sync(resolvePath(
|
|
4974
|
+
read: (path, returnAs) => {
|
|
4975
|
+
read.validateInput("read", path, returnAs);
|
|
4976
|
+
return read.sync(resolvePath(path), returnAs);
|
|
4989
4977
|
},
|
|
4990
|
-
readAsync: (
|
|
4991
|
-
read.validateInput("readAsync",
|
|
4992
|
-
return read.async(resolvePath(
|
|
4978
|
+
readAsync: (path, returnAs) => {
|
|
4979
|
+
read.validateInput("readAsync", path, returnAs);
|
|
4980
|
+
return read.async(resolvePath(path), returnAs);
|
|
4993
4981
|
},
|
|
4994
|
-
remove: (
|
|
4995
|
-
remove.validateInput("remove",
|
|
4996
|
-
remove.sync(resolvePath(
|
|
4982
|
+
remove: (path) => {
|
|
4983
|
+
remove.validateInput("remove", path);
|
|
4984
|
+
remove.sync(resolvePath(path || "."));
|
|
4997
4985
|
},
|
|
4998
|
-
removeAsync: (
|
|
4999
|
-
remove.validateInput("removeAsync",
|
|
5000
|
-
return remove.async(resolvePath(
|
|
4986
|
+
removeAsync: (path) => {
|
|
4987
|
+
remove.validateInput("removeAsync", path);
|
|
4988
|
+
return remove.async(resolvePath(path || "."));
|
|
5001
4989
|
},
|
|
5002
|
-
rename: (
|
|
5003
|
-
rename.validateInput("rename",
|
|
5004
|
-
rename.sync(resolvePath(
|
|
4990
|
+
rename: (path, newName, options) => {
|
|
4991
|
+
rename.validateInput("rename", path, newName, options);
|
|
4992
|
+
rename.sync(resolvePath(path), newName, options);
|
|
5005
4993
|
},
|
|
5006
|
-
renameAsync: (
|
|
5007
|
-
rename.validateInput("renameAsync",
|
|
5008
|
-
return rename.async(resolvePath(
|
|
4994
|
+
renameAsync: (path, newName, options) => {
|
|
4995
|
+
rename.validateInput("renameAsync", path, newName, options);
|
|
4996
|
+
return rename.async(resolvePath(path), newName, options);
|
|
5009
4997
|
},
|
|
5010
|
-
symlink: (symlinkValue,
|
|
5011
|
-
symlink.validateInput("symlink", symlinkValue,
|
|
5012
|
-
symlink.sync(symlinkValue, resolvePath(
|
|
4998
|
+
symlink: (symlinkValue, path) => {
|
|
4999
|
+
symlink.validateInput("symlink", symlinkValue, path);
|
|
5000
|
+
symlink.sync(symlinkValue, resolvePath(path));
|
|
5013
5001
|
},
|
|
5014
|
-
symlinkAsync: (symlinkValue,
|
|
5015
|
-
symlink.validateInput("symlinkAsync", symlinkValue,
|
|
5016
|
-
return symlink.async(symlinkValue, resolvePath(
|
|
5002
|
+
symlinkAsync: (symlinkValue, path) => {
|
|
5003
|
+
symlink.validateInput("symlinkAsync", symlinkValue, path);
|
|
5004
|
+
return symlink.async(symlinkValue, resolvePath(path));
|
|
5017
5005
|
},
|
|
5018
5006
|
tmpDir: (options) => {
|
|
5019
5007
|
tmpDir.validateInput("tmpDir", options);
|
|
@@ -5028,13 +5016,13 @@ var require_jetpack = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
5028
5016
|
}, reject);
|
|
5029
5017
|
});
|
|
5030
5018
|
},
|
|
5031
|
-
write: (
|
|
5032
|
-
write.validateInput("write",
|
|
5033
|
-
write.sync(resolvePath(
|
|
5019
|
+
write: (path, data, options) => {
|
|
5020
|
+
write.validateInput("write", path, data, options);
|
|
5021
|
+
write.sync(resolvePath(path), data, options);
|
|
5034
5022
|
},
|
|
5035
|
-
writeAsync: (
|
|
5036
|
-
write.validateInput("writeAsync",
|
|
5037
|
-
return write.async(resolvePath(
|
|
5023
|
+
writeAsync: (path, data, options) => {
|
|
5024
|
+
write.validateInput("writeAsync", path, data, options);
|
|
5025
|
+
return write.async(resolvePath(path), data, options);
|
|
5038
5026
|
}
|
|
5039
5027
|
};
|
|
5040
5028
|
if (util.inspect.custom !== void 0) {
|
|
@@ -5076,12 +5064,12 @@ var require_unique_string = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
5076
5064
|
var require_temp_dir = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
5077
5065
|
"../../node_modules/.pnpm/temp-dir@2.0.0/node_modules/temp-dir/index.js"(exports, module2) {
|
|
5078
5066
|
"use strict";
|
|
5079
|
-
var
|
|
5067
|
+
var fs = (0, import_chunk_2ESYSVXG.__require)("fs");
|
|
5080
5068
|
var os = (0, import_chunk_2ESYSVXG.__require)("os");
|
|
5081
5069
|
var tempDirectorySymbol = Symbol.for("__RESOLVED_TEMP_DIRECTORY__");
|
|
5082
5070
|
if (!global[tempDirectorySymbol]) {
|
|
5083
5071
|
Object.defineProperty(global, tempDirectorySymbol, {
|
|
5084
|
-
value:
|
|
5072
|
+
value: fs.realpathSync(os.tmpdir())
|
|
5085
5073
|
});
|
|
5086
5074
|
}
|
|
5087
5075
|
module2.exports = global[tempDirectorySymbol];
|
|
@@ -5277,7 +5265,7 @@ var require_path2 = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
5277
5265
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5278
5266
|
exports.convertPosixPathToPattern = exports.convertWindowsPathToPattern = exports.convertPathToPattern = exports.escapePosixPath = exports.escapeWindowsPath = exports.escape = exports.removeLeadingDotSegment = exports.makeAbsolute = exports.unixify = void 0;
|
|
5279
5267
|
var os = (0, import_chunk_2ESYSVXG.__require)("os");
|
|
5280
|
-
var
|
|
5268
|
+
var path = (0, import_chunk_2ESYSVXG.__require)("path");
|
|
5281
5269
|
var IS_WINDOWS_PLATFORM = os.platform() === "win32";
|
|
5282
5270
|
var LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2;
|
|
5283
5271
|
var POSIX_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g;
|
|
@@ -5289,7 +5277,7 @@ var require_path2 = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
5289
5277
|
}
|
|
5290
5278
|
exports.unixify = unixify;
|
|
5291
5279
|
function makeAbsolute(cwd, filepath) {
|
|
5292
|
-
return
|
|
5280
|
+
return path.resolve(cwd, filepath);
|
|
5293
5281
|
}
|
|
5294
5282
|
exports.makeAbsolute = makeAbsolute;
|
|
5295
5283
|
function removeLeadingDotSegment(entry) {
|
|
@@ -6560,7 +6548,7 @@ var require_braces = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
6560
6548
|
var require_constants2 = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
6561
6549
|
"../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/constants.js"(exports, module2) {
|
|
6562
6550
|
"use strict";
|
|
6563
|
-
var
|
|
6551
|
+
var path = (0, import_chunk_2ESYSVXG.__require)("path");
|
|
6564
6552
|
var WIN_SLASH = "\\\\/";
|
|
6565
6553
|
var WIN_NO_SLASH = `[^${WIN_SLASH}]`;
|
|
6566
6554
|
var DOT_LITERAL = "\\.";
|
|
@@ -6730,7 +6718,7 @@ var require_constants2 = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
6730
6718
|
/* | */
|
|
6731
6719
|
CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
|
|
6732
6720
|
/* \uFEFF */
|
|
6733
|
-
SEP:
|
|
6721
|
+
SEP: path.sep,
|
|
6734
6722
|
/**
|
|
6735
6723
|
* Create EXTGLOB_CHARS
|
|
6736
6724
|
*/
|
|
@@ -6755,7 +6743,7 @@ var require_constants2 = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
6755
6743
|
var require_utils2 = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
6756
6744
|
"../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/utils.js"(exports) {
|
|
6757
6745
|
"use strict";
|
|
6758
|
-
var
|
|
6746
|
+
var path = (0, import_chunk_2ESYSVXG.__require)("path");
|
|
6759
6747
|
var win32 = process.platform === "win32";
|
|
6760
6748
|
var {
|
|
6761
6749
|
REGEX_BACKSLASH,
|
|
@@ -6784,7 +6772,7 @@ var require_utils2 = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
6784
6772
|
if (options && typeof options.windows === "boolean") {
|
|
6785
6773
|
return options.windows;
|
|
6786
6774
|
}
|
|
6787
|
-
return win32 === true ||
|
|
6775
|
+
return win32 === true || path.sep === "\\";
|
|
6788
6776
|
};
|
|
6789
6777
|
exports.escapeLast = (input, char, lastIdx) => {
|
|
6790
6778
|
const idx = input.lastIndexOf(char, lastIdx);
|
|
@@ -7913,7 +7901,7 @@ var require_parse3 = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
7913
7901
|
var require_picomatch = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
7914
7902
|
"../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/picomatch.js"(exports, module2) {
|
|
7915
7903
|
"use strict";
|
|
7916
|
-
var
|
|
7904
|
+
var path = (0, import_chunk_2ESYSVXG.__require)("path");
|
|
7917
7905
|
var scan = require_scan();
|
|
7918
7906
|
var parse = require_parse3();
|
|
7919
7907
|
var utils = require_utils2();
|
|
@@ -7998,7 +7986,7 @@ var require_picomatch = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
7998
7986
|
};
|
|
7999
7987
|
picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
|
|
8000
7988
|
const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
|
|
8001
|
-
return regex.test(
|
|
7989
|
+
return regex.test(path.basename(input));
|
|
8002
7990
|
};
|
|
8003
7991
|
picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
|
|
8004
7992
|
picomatch.parse = (pattern, options) => {
|
|
@@ -8219,7 +8207,7 @@ var require_pattern = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
8219
8207
|
"use strict";
|
|
8220
8208
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8221
8209
|
exports.isAbsolute = exports.partitionAbsoluteAndRelative = exports.removeDuplicateSlashes = exports.matchAny = exports.convertPatternsToRe = exports.makeRe = exports.getPatternParts = exports.expandBraceExpansion = exports.expandPatternsWithBraceExpansion = exports.isAffectDepthOfReadingPattern = exports.endsWithSlashGlobStar = exports.hasGlobStar = exports.getBaseDirectory = exports.isPatternRelatedToParentDirectory = exports.getPatternsOutsideCurrentDirectory = exports.getPatternsInsideCurrentDirectory = exports.getPositivePatterns = exports.getNegativePatterns = exports.isPositivePattern = exports.isNegativePattern = exports.convertToNegativePattern = exports.convertToPositivePattern = exports.isDynamicPattern = exports.isStaticPattern = void 0;
|
|
8222
|
-
var
|
|
8210
|
+
var path = (0, import_chunk_2ESYSVXG.__require)("path");
|
|
8223
8211
|
var globParent = require_glob_parent();
|
|
8224
8212
|
var micromatch = require_micromatch();
|
|
8225
8213
|
var GLOBSTAR = "**";
|
|
@@ -8314,7 +8302,7 @@ var require_pattern = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
8314
8302
|
}
|
|
8315
8303
|
exports.endsWithSlashGlobStar = endsWithSlashGlobStar;
|
|
8316
8304
|
function isAffectDepthOfReadingPattern(pattern) {
|
|
8317
|
-
const basename =
|
|
8305
|
+
const basename = path.basename(pattern);
|
|
8318
8306
|
return endsWithSlashGlobStar(pattern) || isStaticPattern(basename);
|
|
8319
8307
|
}
|
|
8320
8308
|
exports.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern;
|
|
@@ -8372,7 +8360,7 @@ var require_pattern = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
8372
8360
|
}
|
|
8373
8361
|
exports.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative;
|
|
8374
8362
|
function isAbsolute(pattern) {
|
|
8375
|
-
return
|
|
8363
|
+
return path.isAbsolute(pattern);
|
|
8376
8364
|
}
|
|
8377
8365
|
exports.isAbsolute = isAbsolute;
|
|
8378
8366
|
}
|
|
@@ -8422,10 +8410,10 @@ var require_utils3 = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
8422
8410
|
exports.array = array;
|
|
8423
8411
|
var errno = require_errno();
|
|
8424
8412
|
exports.errno = errno;
|
|
8425
|
-
var
|
|
8426
|
-
exports.fs =
|
|
8427
|
-
var
|
|
8428
|
-
exports.path =
|
|
8413
|
+
var fs = require_fs2();
|
|
8414
|
+
exports.fs = fs;
|
|
8415
|
+
var path = require_path2();
|
|
8416
|
+
exports.path = path;
|
|
8429
8417
|
var pattern = require_pattern();
|
|
8430
8418
|
exports.pattern = pattern;
|
|
8431
8419
|
var stream = require_stream2();
|
|
@@ -8533,8 +8521,8 @@ var require_async = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
8533
8521
|
"use strict";
|
|
8534
8522
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8535
8523
|
exports.read = void 0;
|
|
8536
|
-
function read(
|
|
8537
|
-
settings.fs.lstat(
|
|
8524
|
+
function read(path, settings, callback) {
|
|
8525
|
+
settings.fs.lstat(path, (lstatError, lstat) => {
|
|
8538
8526
|
if (lstatError !== null) {
|
|
8539
8527
|
callFailureCallback(callback, lstatError);
|
|
8540
8528
|
return;
|
|
@@ -8543,7 +8531,7 @@ var require_async = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
8543
8531
|
callSuccessCallback(callback, lstat);
|
|
8544
8532
|
return;
|
|
8545
8533
|
}
|
|
8546
|
-
settings.fs.stat(
|
|
8534
|
+
settings.fs.stat(path, (statError, stat) => {
|
|
8547
8535
|
if (statError !== null) {
|
|
8548
8536
|
if (settings.throwErrorOnBrokenSymbolicLink) {
|
|
8549
8537
|
callFailureCallback(callback, statError);
|
|
@@ -8573,13 +8561,13 @@ var require_sync = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
8573
8561
|
"use strict";
|
|
8574
8562
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8575
8563
|
exports.read = void 0;
|
|
8576
|
-
function read(
|
|
8577
|
-
const lstat = settings.fs.lstatSync(
|
|
8564
|
+
function read(path, settings) {
|
|
8565
|
+
const lstat = settings.fs.lstatSync(path);
|
|
8578
8566
|
if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
|
|
8579
8567
|
return lstat;
|
|
8580
8568
|
}
|
|
8581
8569
|
try {
|
|
8582
|
-
const stat = settings.fs.statSync(
|
|
8570
|
+
const stat = settings.fs.statSync(path);
|
|
8583
8571
|
if (settings.markSymbolicLink) {
|
|
8584
8572
|
stat.isSymbolicLink = () => true;
|
|
8585
8573
|
}
|
|
@@ -8599,12 +8587,12 @@ var require_fs3 = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
8599
8587
|
"use strict";
|
|
8600
8588
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8601
8589
|
exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0;
|
|
8602
|
-
var
|
|
8590
|
+
var fs = (0, import_chunk_2ESYSVXG.__require)("fs");
|
|
8603
8591
|
exports.FILE_SYSTEM_ADAPTER = {
|
|
8604
|
-
lstat:
|
|
8605
|
-
stat:
|
|
8606
|
-
lstatSync:
|
|
8607
|
-
statSync:
|
|
8592
|
+
lstat: fs.lstat,
|
|
8593
|
+
stat: fs.stat,
|
|
8594
|
+
lstatSync: fs.lstatSync,
|
|
8595
|
+
statSync: fs.statSync
|
|
8608
8596
|
};
|
|
8609
8597
|
function createFileSystemAdapter(fsMethods) {
|
|
8610
8598
|
if (fsMethods === void 0) {
|
|
@@ -8619,12 +8607,12 @@ var require_settings = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
8619
8607
|
"../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/settings.js"(exports) {
|
|
8620
8608
|
"use strict";
|
|
8621
8609
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8622
|
-
var
|
|
8610
|
+
var fs = require_fs3();
|
|
8623
8611
|
var Settings = class {
|
|
8624
8612
|
constructor(_options = {}) {
|
|
8625
8613
|
this._options = _options;
|
|
8626
8614
|
this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true);
|
|
8627
|
-
this.fs =
|
|
8615
|
+
this.fs = fs.createFileSystemAdapter(this._options.fs);
|
|
8628
8616
|
this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, false);
|
|
8629
8617
|
this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
|
|
8630
8618
|
}
|
|
@@ -8644,17 +8632,17 @@ var require_out = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
8644
8632
|
var sync = require_sync();
|
|
8645
8633
|
var settings_1 = require_settings();
|
|
8646
8634
|
exports.Settings = settings_1.default;
|
|
8647
|
-
function stat(
|
|
8635
|
+
function stat(path, optionsOrSettingsOrCallback, callback) {
|
|
8648
8636
|
if (typeof optionsOrSettingsOrCallback === "function") {
|
|
8649
|
-
async.read(
|
|
8637
|
+
async.read(path, getSettings(), optionsOrSettingsOrCallback);
|
|
8650
8638
|
return;
|
|
8651
8639
|
}
|
|
8652
|
-
async.read(
|
|
8640
|
+
async.read(path, getSettings(optionsOrSettingsOrCallback), callback);
|
|
8653
8641
|
}
|
|
8654
8642
|
exports.stat = stat;
|
|
8655
|
-
function statSync(
|
|
8643
|
+
function statSync(path, optionsOrSettings) {
|
|
8656
8644
|
const settings = getSettings(optionsOrSettings);
|
|
8657
|
-
return sync.read(
|
|
8645
|
+
return sync.read(path, settings);
|
|
8658
8646
|
}
|
|
8659
8647
|
exports.statSync = statSync;
|
|
8660
8648
|
function getSettings(settingsOrOptions = {}) {
|
|
@@ -8769,8 +8757,8 @@ var require_utils4 = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
8769
8757
|
"use strict";
|
|
8770
8758
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8771
8759
|
exports.fs = void 0;
|
|
8772
|
-
var
|
|
8773
|
-
exports.fs =
|
|
8760
|
+
var fs = require_fs4();
|
|
8761
|
+
exports.fs = fs;
|
|
8774
8762
|
}
|
|
8775
8763
|
});
|
|
8776
8764
|
var require_common = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
@@ -8858,16 +8846,16 @@ var require_async2 = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
8858
8846
|
return;
|
|
8859
8847
|
}
|
|
8860
8848
|
const tasks = names.map((name) => {
|
|
8861
|
-
const
|
|
8849
|
+
const path = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
|
|
8862
8850
|
return (done) => {
|
|
8863
|
-
fsStat.stat(
|
|
8851
|
+
fsStat.stat(path, settings.fsStatSettings, (error, stats) => {
|
|
8864
8852
|
if (error !== null) {
|
|
8865
8853
|
done(error);
|
|
8866
8854
|
return;
|
|
8867
8855
|
}
|
|
8868
8856
|
const entry = {
|
|
8869
8857
|
name,
|
|
8870
|
-
path
|
|
8858
|
+
path,
|
|
8871
8859
|
dirent: utils.fs.createDirentFromStats(name, stats)
|
|
8872
8860
|
};
|
|
8873
8861
|
if (settings.stats) {
|
|
@@ -8957,14 +8945,14 @@ var require_fs5 = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
8957
8945
|
"use strict";
|
|
8958
8946
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8959
8947
|
exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0;
|
|
8960
|
-
var
|
|
8948
|
+
var fs = (0, import_chunk_2ESYSVXG.__require)("fs");
|
|
8961
8949
|
exports.FILE_SYSTEM_ADAPTER = {
|
|
8962
|
-
lstat:
|
|
8963
|
-
stat:
|
|
8964
|
-
lstatSync:
|
|
8965
|
-
statSync:
|
|
8966
|
-
readdir:
|
|
8967
|
-
readdirSync:
|
|
8950
|
+
lstat: fs.lstat,
|
|
8951
|
+
stat: fs.stat,
|
|
8952
|
+
lstatSync: fs.lstatSync,
|
|
8953
|
+
statSync: fs.statSync,
|
|
8954
|
+
readdir: fs.readdir,
|
|
8955
|
+
readdirSync: fs.readdirSync
|
|
8968
8956
|
};
|
|
8969
8957
|
function createFileSystemAdapter(fsMethods) {
|
|
8970
8958
|
if (fsMethods === void 0) {
|
|
@@ -8979,15 +8967,15 @@ var require_settings2 = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
8979
8967
|
"../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/settings.js"(exports) {
|
|
8980
8968
|
"use strict";
|
|
8981
8969
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8982
|
-
var
|
|
8970
|
+
var path = (0, import_chunk_2ESYSVXG.__require)("path");
|
|
8983
8971
|
var fsStat = require_out();
|
|
8984
|
-
var
|
|
8972
|
+
var fs = require_fs5();
|
|
8985
8973
|
var Settings = class {
|
|
8986
8974
|
constructor(_options = {}) {
|
|
8987
8975
|
this._options = _options;
|
|
8988
8976
|
this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false);
|
|
8989
|
-
this.fs =
|
|
8990
|
-
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator,
|
|
8977
|
+
this.fs = fs.createFileSystemAdapter(this._options.fs);
|
|
8978
|
+
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path.sep);
|
|
8991
8979
|
this.stats = this._getValue(this._options.stats, false);
|
|
8992
8980
|
this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
|
|
8993
8981
|
this.fsStatSettings = new fsStat.Settings({
|
|
@@ -9012,17 +9000,17 @@ var require_out2 = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
9012
9000
|
var sync = require_sync2();
|
|
9013
9001
|
var settings_1 = require_settings2();
|
|
9014
9002
|
exports.Settings = settings_1.default;
|
|
9015
|
-
function scandir(
|
|
9003
|
+
function scandir(path, optionsOrSettingsOrCallback, callback) {
|
|
9016
9004
|
if (typeof optionsOrSettingsOrCallback === "function") {
|
|
9017
|
-
async.read(
|
|
9005
|
+
async.read(path, getSettings(), optionsOrSettingsOrCallback);
|
|
9018
9006
|
return;
|
|
9019
9007
|
}
|
|
9020
|
-
async.read(
|
|
9008
|
+
async.read(path, getSettings(optionsOrSettingsOrCallback), callback);
|
|
9021
9009
|
}
|
|
9022
9010
|
exports.scandir = scandir;
|
|
9023
|
-
function scandirSync(
|
|
9011
|
+
function scandirSync(path, optionsOrSettings) {
|
|
9024
9012
|
const settings = getSettings(optionsOrSettings);
|
|
9025
|
-
return sync.read(
|
|
9013
|
+
return sync.read(path, settings);
|
|
9026
9014
|
}
|
|
9027
9015
|
exports.scandirSync = scandirSync;
|
|
9028
9016
|
function getSettings(settingsOrOptions = {}) {
|
|
@@ -9605,7 +9593,7 @@ var require_settings3 = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
9605
9593
|
"../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/settings.js"(exports) {
|
|
9606
9594
|
"use strict";
|
|
9607
9595
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9608
|
-
var
|
|
9596
|
+
var path = (0, import_chunk_2ESYSVXG.__require)("path");
|
|
9609
9597
|
var fsScandir = require_out2();
|
|
9610
9598
|
var Settings = class {
|
|
9611
9599
|
constructor(_options = {}) {
|
|
@@ -9615,7 +9603,7 @@ var require_settings3 = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
9615
9603
|
this.deepFilter = this._getValue(this._options.deepFilter, null);
|
|
9616
9604
|
this.entryFilter = this._getValue(this._options.entryFilter, null);
|
|
9617
9605
|
this.errorFilter = this._getValue(this._options.errorFilter, null);
|
|
9618
|
-
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator,
|
|
9606
|
+
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path.sep);
|
|
9619
9607
|
this.fsScandirSettings = new fsScandir.Settings({
|
|
9620
9608
|
followSymbolicLinks: this._options.followSymbolicLinks,
|
|
9621
9609
|
fs: this._options.fs,
|
|
@@ -9673,7 +9661,7 @@ var require_reader2 = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
9673
9661
|
"../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/readers/reader.js"(exports) {
|
|
9674
9662
|
"use strict";
|
|
9675
9663
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9676
|
-
var
|
|
9664
|
+
var path = (0, import_chunk_2ESYSVXG.__require)("path");
|
|
9677
9665
|
var fsStat = require_out();
|
|
9678
9666
|
var utils = require_utils3();
|
|
9679
9667
|
var Reader = class {
|
|
@@ -9686,7 +9674,7 @@ var require_reader2 = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
9686
9674
|
});
|
|
9687
9675
|
}
|
|
9688
9676
|
_getFullEntryPath(filepath) {
|
|
9689
|
-
return
|
|
9677
|
+
return path.resolve(this._settings.cwd, filepath);
|
|
9690
9678
|
}
|
|
9691
9679
|
_makeEntry(stats, pattern) {
|
|
9692
9680
|
const entry = {
|
|
@@ -10084,7 +10072,7 @@ var require_provider = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
10084
10072
|
"../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/provider.js"(exports) {
|
|
10085
10073
|
"use strict";
|
|
10086
10074
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10087
|
-
var
|
|
10075
|
+
var path = (0, import_chunk_2ESYSVXG.__require)("path");
|
|
10088
10076
|
var deep_1 = require_deep();
|
|
10089
10077
|
var entry_1 = require_entry();
|
|
10090
10078
|
var error_1 = require_error2();
|
|
@@ -10098,7 +10086,7 @@ var require_provider = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
10098
10086
|
this.entryTransformer = new entry_2.default(this._settings);
|
|
10099
10087
|
}
|
|
10100
10088
|
_getRootDirectory(task) {
|
|
10101
|
-
return
|
|
10089
|
+
return path.resolve(this._settings.cwd, task.base);
|
|
10102
10090
|
}
|
|
10103
10091
|
_getReaderOptions(task) {
|
|
10104
10092
|
const basePath = task.base === "." ? "" : task.base;
|
|
@@ -10269,16 +10257,16 @@ var require_settings4 = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
10269
10257
|
"use strict";
|
|
10270
10258
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10271
10259
|
exports.DEFAULT_FILE_SYSTEM_ADAPTER = void 0;
|
|
10272
|
-
var
|
|
10260
|
+
var fs = (0, import_chunk_2ESYSVXG.__require)("fs");
|
|
10273
10261
|
var os = (0, import_chunk_2ESYSVXG.__require)("os");
|
|
10274
10262
|
var CPU_COUNT = Math.max(os.cpus().length, 1);
|
|
10275
10263
|
exports.DEFAULT_FILE_SYSTEM_ADAPTER = {
|
|
10276
|
-
lstat:
|
|
10277
|
-
lstatSync:
|
|
10278
|
-
stat:
|
|
10279
|
-
statSync:
|
|
10280
|
-
readdir:
|
|
10281
|
-
readdirSync:
|
|
10264
|
+
lstat: fs.lstat,
|
|
10265
|
+
lstatSync: fs.lstatSync,
|
|
10266
|
+
stat: fs.stat,
|
|
10267
|
+
statSync: fs.statSync,
|
|
10268
|
+
readdir: fs.readdir,
|
|
10269
|
+
readdirSync: fs.readdirSync
|
|
10282
10270
|
};
|
|
10283
10271
|
var Settings = class {
|
|
10284
10272
|
constructor(_options = {}) {
|
|
@@ -10425,13 +10413,13 @@ var require_path_type = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
10425
10413
|
"../../node_modules/.pnpm/path-type@4.0.0/node_modules/path-type/index.js"(exports) {
|
|
10426
10414
|
"use strict";
|
|
10427
10415
|
var { promisify } = (0, import_chunk_2ESYSVXG.__require)("util");
|
|
10428
|
-
var
|
|
10416
|
+
var fs = (0, import_chunk_2ESYSVXG.__require)("fs");
|
|
10429
10417
|
async function isType(fsStatType, statsMethodName, filePath) {
|
|
10430
10418
|
if (typeof filePath !== "string") {
|
|
10431
10419
|
throw new TypeError(`Expected a string, got ${typeof filePath}`);
|
|
10432
10420
|
}
|
|
10433
10421
|
try {
|
|
10434
|
-
const stats = await promisify(
|
|
10422
|
+
const stats = await promisify(fs[fsStatType])(filePath);
|
|
10435
10423
|
return stats[statsMethodName]();
|
|
10436
10424
|
} catch (error) {
|
|
10437
10425
|
if (error.code === "ENOENT") {
|
|
@@ -10445,7 +10433,7 @@ var require_path_type = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
10445
10433
|
throw new TypeError(`Expected a string, got ${typeof filePath}`);
|
|
10446
10434
|
}
|
|
10447
10435
|
try {
|
|
10448
|
-
return
|
|
10436
|
+
return fs[fsStatType](filePath)[statsMethodName]();
|
|
10449
10437
|
} catch (error) {
|
|
10450
10438
|
if (error.code === "ENOENT") {
|
|
10451
10439
|
return false;
|
|
@@ -10464,15 +10452,15 @@ var require_path_type = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
10464
10452
|
var require_dir_glob = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
10465
10453
|
"../../node_modules/.pnpm/dir-glob@3.0.1/node_modules/dir-glob/index.js"(exports, module2) {
|
|
10466
10454
|
"use strict";
|
|
10467
|
-
var
|
|
10455
|
+
var path = (0, import_chunk_2ESYSVXG.__require)("path");
|
|
10468
10456
|
var pathType = require_path_type();
|
|
10469
10457
|
var getExtensions = (extensions) => extensions.length > 1 ? `{${extensions.join(",")}}` : extensions[0];
|
|
10470
10458
|
var getPath = (filepath, cwd) => {
|
|
10471
10459
|
const pth = filepath[0] === "!" ? filepath.slice(1) : filepath;
|
|
10472
|
-
return
|
|
10460
|
+
return path.isAbsolute(pth) ? pth : path.join(cwd, pth);
|
|
10473
10461
|
};
|
|
10474
10462
|
var addExtensions = (file, extensions) => {
|
|
10475
|
-
if (
|
|
10463
|
+
if (path.extname(file)) {
|
|
10476
10464
|
return `**/${file}`;
|
|
10477
10465
|
}
|
|
10478
10466
|
return `**/${file}.${getExtensions(extensions)}`;
|
|
@@ -10485,15 +10473,15 @@ var require_dir_glob = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
10485
10473
|
throw new TypeError(`Expected \`extensions\` to be of type \`Array\` but received type \`${typeof options.extensions}\``);
|
|
10486
10474
|
}
|
|
10487
10475
|
if (options.files && options.extensions) {
|
|
10488
|
-
return options.files.map((x) =>
|
|
10476
|
+
return options.files.map((x) => path.posix.join(directory, addExtensions(x, options.extensions)));
|
|
10489
10477
|
}
|
|
10490
10478
|
if (options.files) {
|
|
10491
|
-
return options.files.map((x) =>
|
|
10479
|
+
return options.files.map((x) => path.posix.join(directory, `**/${x}`));
|
|
10492
10480
|
}
|
|
10493
10481
|
if (options.extensions) {
|
|
10494
|
-
return [
|
|
10482
|
+
return [path.posix.join(directory, `**/*.${getExtensions(options.extensions)}`)];
|
|
10495
10483
|
}
|
|
10496
|
-
return [
|
|
10484
|
+
return [path.posix.join(directory, "**")];
|
|
10497
10485
|
};
|
|
10498
10486
|
module2.exports = async (input, options) => {
|
|
10499
10487
|
options = {
|
|
@@ -10738,17 +10726,17 @@ var require_ignore = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
10738
10726
|
var throwError = (message, Ctor) => {
|
|
10739
10727
|
throw new Ctor(message);
|
|
10740
10728
|
};
|
|
10741
|
-
var checkPath = (
|
|
10742
|
-
if (!isString(
|
|
10729
|
+
var checkPath = (path, originalPath, doThrow) => {
|
|
10730
|
+
if (!isString(path)) {
|
|
10743
10731
|
return doThrow(
|
|
10744
10732
|
`path must be a string, but got \`${originalPath}\``,
|
|
10745
10733
|
TypeError
|
|
10746
10734
|
);
|
|
10747
10735
|
}
|
|
10748
|
-
if (!
|
|
10736
|
+
if (!path) {
|
|
10749
10737
|
return doThrow(`path must not be empty`, TypeError);
|
|
10750
10738
|
}
|
|
10751
|
-
if (checkPath.isNotRelative(
|
|
10739
|
+
if (checkPath.isNotRelative(path)) {
|
|
10752
10740
|
const r = "`path.relative()`d";
|
|
10753
10741
|
return doThrow(
|
|
10754
10742
|
`path should be a ${r} string, but got "${originalPath}"`,
|
|
@@ -10757,7 +10745,7 @@ var require_ignore = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
10757
10745
|
}
|
|
10758
10746
|
return true;
|
|
10759
10747
|
};
|
|
10760
|
-
var isNotRelative = (
|
|
10748
|
+
var isNotRelative = (path) => REGEX_TEST_INVALID_PATH.test(path);
|
|
10761
10749
|
checkPath.isNotRelative = isNotRelative;
|
|
10762
10750
|
checkPath.convert = (p) => p;
|
|
10763
10751
|
var Ignore = class {
|
|
@@ -10816,7 +10804,7 @@ var require_ignore = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
10816
10804
|
// setting `checkUnignored` to `false` could reduce additional
|
|
10817
10805
|
// path matching.
|
|
10818
10806
|
// @returns {TestResult} true if a file is ignored
|
|
10819
|
-
_testOne(
|
|
10807
|
+
_testOne(path, checkUnignored) {
|
|
10820
10808
|
let ignored = false;
|
|
10821
10809
|
let unignored = false;
|
|
10822
10810
|
this._rules.forEach((rule) => {
|
|
@@ -10824,7 +10812,7 @@ var require_ignore = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
10824
10812
|
if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) {
|
|
10825
10813
|
return;
|
|
10826
10814
|
}
|
|
10827
|
-
const matched = rule.regex.test(
|
|
10815
|
+
const matched = rule.regex.test(path);
|
|
10828
10816
|
if (matched) {
|
|
10829
10817
|
ignored = !negative;
|
|
10830
10818
|
unignored = negative;
|
|
@@ -10837,24 +10825,24 @@ var require_ignore = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
10837
10825
|
}
|
|
10838
10826
|
// @returns {TestResult}
|
|
10839
10827
|
_test(originalPath, cache, checkUnignored, slices) {
|
|
10840
|
-
const
|
|
10828
|
+
const path = originalPath && checkPath.convert(originalPath);
|
|
10841
10829
|
checkPath(
|
|
10842
|
-
|
|
10830
|
+
path,
|
|
10843
10831
|
originalPath,
|
|
10844
10832
|
this._allowRelativePaths ? RETURN_FALSE : throwError
|
|
10845
10833
|
);
|
|
10846
|
-
return this._t(
|
|
10834
|
+
return this._t(path, cache, checkUnignored, slices);
|
|
10847
10835
|
}
|
|
10848
|
-
_t(
|
|
10849
|
-
if (
|
|
10850
|
-
return cache[
|
|
10836
|
+
_t(path, cache, checkUnignored, slices) {
|
|
10837
|
+
if (path in cache) {
|
|
10838
|
+
return cache[path];
|
|
10851
10839
|
}
|
|
10852
10840
|
if (!slices) {
|
|
10853
|
-
slices =
|
|
10841
|
+
slices = path.split(SLASH);
|
|
10854
10842
|
}
|
|
10855
10843
|
slices.pop();
|
|
10856
10844
|
if (!slices.length) {
|
|
10857
|
-
return cache[
|
|
10845
|
+
return cache[path] = this._testOne(path, checkUnignored);
|
|
10858
10846
|
}
|
|
10859
10847
|
const parent = this._t(
|
|
10860
10848
|
slices.join(SLASH) + SLASH,
|
|
@@ -10862,27 +10850,27 @@ var require_ignore = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
10862
10850
|
checkUnignored,
|
|
10863
10851
|
slices
|
|
10864
10852
|
);
|
|
10865
|
-
return cache[
|
|
10853
|
+
return cache[path] = parent.ignored ? parent : this._testOne(path, checkUnignored);
|
|
10866
10854
|
}
|
|
10867
|
-
ignores(
|
|
10868
|
-
return this._test(
|
|
10855
|
+
ignores(path) {
|
|
10856
|
+
return this._test(path, this._ignoreCache, false).ignored;
|
|
10869
10857
|
}
|
|
10870
10858
|
createFilter() {
|
|
10871
|
-
return (
|
|
10859
|
+
return (path) => !this.ignores(path);
|
|
10872
10860
|
}
|
|
10873
10861
|
filter(paths) {
|
|
10874
10862
|
return makeArray(paths).filter(this.createFilter());
|
|
10875
10863
|
}
|
|
10876
10864
|
// @returns {TestResult}
|
|
10877
|
-
test(
|
|
10878
|
-
return this._test(
|
|
10865
|
+
test(path) {
|
|
10866
|
+
return this._test(path, this._testCache, true);
|
|
10879
10867
|
}
|
|
10880
10868
|
};
|
|
10881
|
-
var
|
|
10882
|
-
var isPathValid = (
|
|
10883
|
-
|
|
10884
|
-
|
|
10885
|
-
module2.exports =
|
|
10869
|
+
var factory = (options) => new Ignore(options);
|
|
10870
|
+
var isPathValid = (path) => checkPath(path && checkPath.convert(path), path, RETURN_FALSE);
|
|
10871
|
+
factory.isPathValid = isPathValid;
|
|
10872
|
+
factory.default = factory;
|
|
10873
|
+
module2.exports = factory;
|
|
10886
10874
|
if (
|
|
10887
10875
|
// Detect `process` so that it can run in browsers.
|
|
10888
10876
|
typeof process !== "undefined" && (process.env && process.env.IGNORE_TEST_WIN32 || process.platform === "win32")
|
|
@@ -10890,20 +10878,20 @@ var require_ignore = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
10890
10878
|
const makePosix = (str) => /^\\\\\?\\/.test(str) || /["<>|\u0000-\u001F]+/u.test(str) ? str : str.replace(/\\/g, "/");
|
|
10891
10879
|
checkPath.convert = makePosix;
|
|
10892
10880
|
const REGIX_IS_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i;
|
|
10893
|
-
checkPath.isNotRelative = (
|
|
10881
|
+
checkPath.isNotRelative = (path) => REGIX_IS_WINDOWS_PATH_ABSOLUTE.test(path) || isNotRelative(path);
|
|
10894
10882
|
}
|
|
10895
10883
|
}
|
|
10896
10884
|
});
|
|
10897
10885
|
var require_slash = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
10898
10886
|
"../../node_modules/.pnpm/slash@3.0.0/node_modules/slash/index.js"(exports, module2) {
|
|
10899
10887
|
"use strict";
|
|
10900
|
-
module2.exports = (
|
|
10901
|
-
const isExtendedLengthPath = /^\\\\\?\\/.test(
|
|
10902
|
-
const hasNonAscii = /[^\u0000-\u0080]+/.test(
|
|
10888
|
+
module2.exports = (path) => {
|
|
10889
|
+
const isExtendedLengthPath = /^\\\\\?\\/.test(path);
|
|
10890
|
+
const hasNonAscii = /[^\u0000-\u0080]+/.test(path);
|
|
10903
10891
|
if (isExtendedLengthPath || hasNonAscii) {
|
|
10904
|
-
return
|
|
10892
|
+
return path;
|
|
10905
10893
|
}
|
|
10906
|
-
return
|
|
10894
|
+
return path.replace(/\\/g, "/");
|
|
10907
10895
|
};
|
|
10908
10896
|
}
|
|
10909
10897
|
});
|
|
@@ -10911,8 +10899,8 @@ var require_gitignore = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
10911
10899
|
"../../node_modules/.pnpm/globby@11.1.0/node_modules/globby/gitignore.js"(exports, module2) {
|
|
10912
10900
|
"use strict";
|
|
10913
10901
|
var { promisify } = (0, import_chunk_2ESYSVXG.__require)("util");
|
|
10914
|
-
var
|
|
10915
|
-
var
|
|
10902
|
+
var fs = (0, import_chunk_2ESYSVXG.__require)("fs");
|
|
10903
|
+
var path = (0, import_chunk_2ESYSVXG.__require)("path");
|
|
10916
10904
|
var fastGlob = require_out4();
|
|
10917
10905
|
var gitIgnore = require_ignore();
|
|
10918
10906
|
var slash = require_slash();
|
|
@@ -10922,15 +10910,15 @@ var require_gitignore = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
10922
10910
|
"**/coverage/**",
|
|
10923
10911
|
"**/.git"
|
|
10924
10912
|
];
|
|
10925
|
-
var readFileP = promisify(
|
|
10913
|
+
var readFileP = promisify(fs.readFile);
|
|
10926
10914
|
var mapGitIgnorePatternTo = (base) => (ignore) => {
|
|
10927
10915
|
if (ignore.startsWith("!")) {
|
|
10928
|
-
return "!" +
|
|
10916
|
+
return "!" + path.posix.join(base, ignore.slice(1));
|
|
10929
10917
|
}
|
|
10930
|
-
return
|
|
10918
|
+
return path.posix.join(base, ignore);
|
|
10931
10919
|
};
|
|
10932
10920
|
var parseGitIgnore = (content, options) => {
|
|
10933
|
-
const base = slash(
|
|
10921
|
+
const base = slash(path.relative(options.cwd, path.dirname(options.fileName)));
|
|
10934
10922
|
return content.split(/\r?\n/).filter(Boolean).filter((line) => !line.startsWith("#")).map(mapGitIgnorePatternTo(base));
|
|
10935
10923
|
};
|
|
10936
10924
|
var reduceIgnore = (files) => {
|
|
@@ -10945,19 +10933,19 @@ var require_gitignore = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
10945
10933
|
};
|
|
10946
10934
|
var ensureAbsolutePathForCwd = (cwd, p) => {
|
|
10947
10935
|
cwd = slash(cwd);
|
|
10948
|
-
if (
|
|
10936
|
+
if (path.isAbsolute(p)) {
|
|
10949
10937
|
if (slash(p).startsWith(cwd)) {
|
|
10950
10938
|
return p;
|
|
10951
10939
|
}
|
|
10952
10940
|
throw new Error(`Path ${p} is not in cwd ${cwd}`);
|
|
10953
10941
|
}
|
|
10954
|
-
return
|
|
10942
|
+
return path.join(cwd, p);
|
|
10955
10943
|
};
|
|
10956
10944
|
var getIsIgnoredPredecate = (ignores, cwd) => {
|
|
10957
|
-
return (p) => ignores.ignores(slash(
|
|
10945
|
+
return (p) => ignores.ignores(slash(path.relative(cwd, ensureAbsolutePathForCwd(cwd, p.path || p))));
|
|
10958
10946
|
};
|
|
10959
10947
|
var getFile = async (file, cwd) => {
|
|
10960
|
-
const filePath =
|
|
10948
|
+
const filePath = path.join(cwd, file);
|
|
10961
10949
|
const content = await readFileP(filePath, "utf8");
|
|
10962
10950
|
return {
|
|
10963
10951
|
cwd,
|
|
@@ -10966,8 +10954,8 @@ var require_gitignore = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
10966
10954
|
};
|
|
10967
10955
|
};
|
|
10968
10956
|
var getFileSync = (file, cwd) => {
|
|
10969
|
-
const filePath =
|
|
10970
|
-
const content =
|
|
10957
|
+
const filePath = path.join(cwd, file);
|
|
10958
|
+
const content = fs.readFileSync(filePath, "utf8");
|
|
10971
10959
|
return {
|
|
10972
10960
|
cwd,
|
|
10973
10961
|
filePath,
|
|
@@ -11047,7 +11035,7 @@ var require_stream_utils = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
11047
11035
|
var require_globby = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
11048
11036
|
"../../node_modules/.pnpm/globby@11.1.0/node_modules/globby/index.js"(exports, module2) {
|
|
11049
11037
|
"use strict";
|
|
11050
|
-
var
|
|
11038
|
+
var fs = (0, import_chunk_2ESYSVXG.__require)("fs");
|
|
11051
11039
|
var arrayUnion = require_array_union();
|
|
11052
11040
|
var merge2 = require_merge2();
|
|
11053
11041
|
var fastGlob = require_out4();
|
|
@@ -11067,7 +11055,7 @@ var require_globby = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
11067
11055
|
}
|
|
11068
11056
|
let stat;
|
|
11069
11057
|
try {
|
|
11070
|
-
stat =
|
|
11058
|
+
stat = fs.statSync(options.cwd);
|
|
11071
11059
|
} catch {
|
|
11072
11060
|
return;
|
|
11073
11061
|
}
|
|
@@ -11075,7 +11063,7 @@ var require_globby = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
11075
11063
|
throw new Error("The `cwd` option must be a path to a directory");
|
|
11076
11064
|
}
|
|
11077
11065
|
};
|
|
11078
|
-
var getPathString = (p) => p.stats instanceof
|
|
11066
|
+
var getPathString = (p) => p.stats instanceof fs.Stats ? p.path : p;
|
|
11079
11067
|
var generateGlobTasks = (patterns, taskOptions) => {
|
|
11080
11068
|
patterns = arrayUnion([].concat(patterns));
|
|
11081
11069
|
assertPatternsInput(patterns);
|
|
@@ -11204,54 +11192,54 @@ var require_polyfills = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
11204
11192
|
}
|
|
11205
11193
|
var chdir;
|
|
11206
11194
|
module2.exports = patch;
|
|
11207
|
-
function patch(
|
|
11195
|
+
function patch(fs) {
|
|
11208
11196
|
if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
|
|
11209
|
-
patchLchmod(
|
|
11210
|
-
}
|
|
11211
|
-
if (!
|
|
11212
|
-
patchLutimes(
|
|
11213
|
-
}
|
|
11214
|
-
|
|
11215
|
-
|
|
11216
|
-
|
|
11217
|
-
|
|
11218
|
-
|
|
11219
|
-
|
|
11220
|
-
|
|
11221
|
-
|
|
11222
|
-
|
|
11223
|
-
|
|
11224
|
-
|
|
11225
|
-
|
|
11226
|
-
|
|
11227
|
-
|
|
11228
|
-
|
|
11229
|
-
|
|
11230
|
-
|
|
11231
|
-
|
|
11232
|
-
if (
|
|
11233
|
-
|
|
11197
|
+
patchLchmod(fs);
|
|
11198
|
+
}
|
|
11199
|
+
if (!fs.lutimes) {
|
|
11200
|
+
patchLutimes(fs);
|
|
11201
|
+
}
|
|
11202
|
+
fs.chown = chownFix(fs.chown);
|
|
11203
|
+
fs.fchown = chownFix(fs.fchown);
|
|
11204
|
+
fs.lchown = chownFix(fs.lchown);
|
|
11205
|
+
fs.chmod = chmodFix(fs.chmod);
|
|
11206
|
+
fs.fchmod = chmodFix(fs.fchmod);
|
|
11207
|
+
fs.lchmod = chmodFix(fs.lchmod);
|
|
11208
|
+
fs.chownSync = chownFixSync(fs.chownSync);
|
|
11209
|
+
fs.fchownSync = chownFixSync(fs.fchownSync);
|
|
11210
|
+
fs.lchownSync = chownFixSync(fs.lchownSync);
|
|
11211
|
+
fs.chmodSync = chmodFixSync(fs.chmodSync);
|
|
11212
|
+
fs.fchmodSync = chmodFixSync(fs.fchmodSync);
|
|
11213
|
+
fs.lchmodSync = chmodFixSync(fs.lchmodSync);
|
|
11214
|
+
fs.stat = statFix(fs.stat);
|
|
11215
|
+
fs.fstat = statFix(fs.fstat);
|
|
11216
|
+
fs.lstat = statFix(fs.lstat);
|
|
11217
|
+
fs.statSync = statFixSync(fs.statSync);
|
|
11218
|
+
fs.fstatSync = statFixSync(fs.fstatSync);
|
|
11219
|
+
fs.lstatSync = statFixSync(fs.lstatSync);
|
|
11220
|
+
if (fs.chmod && !fs.lchmod) {
|
|
11221
|
+
fs.lchmod = function(path, mode, cb) {
|
|
11234
11222
|
if (cb) process.nextTick(cb);
|
|
11235
11223
|
};
|
|
11236
|
-
|
|
11224
|
+
fs.lchmodSync = function() {
|
|
11237
11225
|
};
|
|
11238
11226
|
}
|
|
11239
|
-
if (
|
|
11240
|
-
|
|
11227
|
+
if (fs.chown && !fs.lchown) {
|
|
11228
|
+
fs.lchown = function(path, uid, gid, cb) {
|
|
11241
11229
|
if (cb) process.nextTick(cb);
|
|
11242
11230
|
};
|
|
11243
|
-
|
|
11231
|
+
fs.lchownSync = function() {
|
|
11244
11232
|
};
|
|
11245
11233
|
}
|
|
11246
11234
|
if (platform === "win32") {
|
|
11247
|
-
|
|
11235
|
+
fs.rename = typeof fs.rename !== "function" ? fs.rename : function(fs$rename) {
|
|
11248
11236
|
function rename(from, to, cb) {
|
|
11249
11237
|
var start = Date.now();
|
|
11250
11238
|
var backoff = 0;
|
|
11251
11239
|
fs$rename(from, to, function CB(er) {
|
|
11252
11240
|
if (er && (er.code === "EACCES" || er.code === "EPERM") && Date.now() - start < 6e4) {
|
|
11253
11241
|
setTimeout(function() {
|
|
11254
|
-
|
|
11242
|
+
fs.stat(to, function(stater, st) {
|
|
11255
11243
|
if (stater && stater.code === "ENOENT")
|
|
11256
11244
|
fs$rename(from, to, CB);
|
|
11257
11245
|
else
|
|
@@ -11267,9 +11255,9 @@ var require_polyfills = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
11267
11255
|
}
|
|
11268
11256
|
if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename);
|
|
11269
11257
|
return rename;
|
|
11270
|
-
}(
|
|
11258
|
+
}(fs.rename);
|
|
11271
11259
|
}
|
|
11272
|
-
|
|
11260
|
+
fs.read = typeof fs.read !== "function" ? fs.read : function(fs$read) {
|
|
11273
11261
|
function read(fd, buffer, offset, length, position, callback_) {
|
|
11274
11262
|
var callback;
|
|
11275
11263
|
if (callback_ && typeof callback_ === "function") {
|
|
@@ -11277,22 +11265,22 @@ var require_polyfills = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
11277
11265
|
callback = function(er, _, __) {
|
|
11278
11266
|
if (er && er.code === "EAGAIN" && eagCounter < 10) {
|
|
11279
11267
|
eagCounter++;
|
|
11280
|
-
return fs$read.call(
|
|
11268
|
+
return fs$read.call(fs, fd, buffer, offset, length, position, callback);
|
|
11281
11269
|
}
|
|
11282
11270
|
callback_.apply(this, arguments);
|
|
11283
11271
|
};
|
|
11284
11272
|
}
|
|
11285
|
-
return fs$read.call(
|
|
11273
|
+
return fs$read.call(fs, fd, buffer, offset, length, position, callback);
|
|
11286
11274
|
}
|
|
11287
11275
|
if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read);
|
|
11288
11276
|
return read;
|
|
11289
|
-
}(
|
|
11290
|
-
|
|
11277
|
+
}(fs.read);
|
|
11278
|
+
fs.readSync = typeof fs.readSync !== "function" ? fs.readSync : /* @__PURE__ */ function(fs$readSync) {
|
|
11291
11279
|
return function(fd, buffer, offset, length, position) {
|
|
11292
11280
|
var eagCounter = 0;
|
|
11293
11281
|
while (true) {
|
|
11294
11282
|
try {
|
|
11295
|
-
return fs$readSync.call(
|
|
11283
|
+
return fs$readSync.call(fs, fd, buffer, offset, length, position);
|
|
11296
11284
|
} catch (er) {
|
|
11297
11285
|
if (er.code === "EAGAIN" && eagCounter < 10) {
|
|
11298
11286
|
eagCounter++;
|
|
@@ -11302,11 +11290,11 @@ var require_polyfills = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
11302
11290
|
}
|
|
11303
11291
|
}
|
|
11304
11292
|
};
|
|
11305
|
-
}(
|
|
11306
|
-
function patchLchmod(
|
|
11307
|
-
|
|
11308
|
-
|
|
11309
|
-
|
|
11293
|
+
}(fs.readSync);
|
|
11294
|
+
function patchLchmod(fs2) {
|
|
11295
|
+
fs2.lchmod = function(path, mode, callback) {
|
|
11296
|
+
fs2.open(
|
|
11297
|
+
path,
|
|
11310
11298
|
constants.O_WRONLY | constants.O_SYMLINK,
|
|
11311
11299
|
mode,
|
|
11312
11300
|
function(err, fd) {
|
|
@@ -11314,80 +11302,80 @@ var require_polyfills = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
11314
11302
|
if (callback) callback(err);
|
|
11315
11303
|
return;
|
|
11316
11304
|
}
|
|
11317
|
-
|
|
11318
|
-
|
|
11305
|
+
fs2.fchmod(fd, mode, function(err2) {
|
|
11306
|
+
fs2.close(fd, function(err22) {
|
|
11319
11307
|
if (callback) callback(err2 || err22);
|
|
11320
11308
|
});
|
|
11321
11309
|
});
|
|
11322
11310
|
}
|
|
11323
11311
|
);
|
|
11324
11312
|
};
|
|
11325
|
-
|
|
11326
|
-
var fd =
|
|
11313
|
+
fs2.lchmodSync = function(path, mode) {
|
|
11314
|
+
var fd = fs2.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode);
|
|
11327
11315
|
var threw = true;
|
|
11328
11316
|
var ret;
|
|
11329
11317
|
try {
|
|
11330
|
-
ret =
|
|
11318
|
+
ret = fs2.fchmodSync(fd, mode);
|
|
11331
11319
|
threw = false;
|
|
11332
11320
|
} finally {
|
|
11333
11321
|
if (threw) {
|
|
11334
11322
|
try {
|
|
11335
|
-
|
|
11323
|
+
fs2.closeSync(fd);
|
|
11336
11324
|
} catch (er) {
|
|
11337
11325
|
}
|
|
11338
11326
|
} else {
|
|
11339
|
-
|
|
11327
|
+
fs2.closeSync(fd);
|
|
11340
11328
|
}
|
|
11341
11329
|
}
|
|
11342
11330
|
return ret;
|
|
11343
11331
|
};
|
|
11344
11332
|
}
|
|
11345
|
-
function patchLutimes(
|
|
11346
|
-
if (constants.hasOwnProperty("O_SYMLINK") &&
|
|
11347
|
-
|
|
11348
|
-
|
|
11333
|
+
function patchLutimes(fs2) {
|
|
11334
|
+
if (constants.hasOwnProperty("O_SYMLINK") && fs2.futimes) {
|
|
11335
|
+
fs2.lutimes = function(path, at, mt, cb) {
|
|
11336
|
+
fs2.open(path, constants.O_SYMLINK, function(er, fd) {
|
|
11349
11337
|
if (er) {
|
|
11350
11338
|
if (cb) cb(er);
|
|
11351
11339
|
return;
|
|
11352
11340
|
}
|
|
11353
|
-
|
|
11354
|
-
|
|
11341
|
+
fs2.futimes(fd, at, mt, function(er2) {
|
|
11342
|
+
fs2.close(fd, function(er22) {
|
|
11355
11343
|
if (cb) cb(er2 || er22);
|
|
11356
11344
|
});
|
|
11357
11345
|
});
|
|
11358
11346
|
});
|
|
11359
11347
|
};
|
|
11360
|
-
|
|
11361
|
-
var fd =
|
|
11348
|
+
fs2.lutimesSync = function(path, at, mt) {
|
|
11349
|
+
var fd = fs2.openSync(path, constants.O_SYMLINK);
|
|
11362
11350
|
var ret;
|
|
11363
11351
|
var threw = true;
|
|
11364
11352
|
try {
|
|
11365
|
-
ret =
|
|
11353
|
+
ret = fs2.futimesSync(fd, at, mt);
|
|
11366
11354
|
threw = false;
|
|
11367
11355
|
} finally {
|
|
11368
11356
|
if (threw) {
|
|
11369
11357
|
try {
|
|
11370
|
-
|
|
11358
|
+
fs2.closeSync(fd);
|
|
11371
11359
|
} catch (er) {
|
|
11372
11360
|
}
|
|
11373
11361
|
} else {
|
|
11374
|
-
|
|
11362
|
+
fs2.closeSync(fd);
|
|
11375
11363
|
}
|
|
11376
11364
|
}
|
|
11377
11365
|
return ret;
|
|
11378
11366
|
};
|
|
11379
|
-
} else if (
|
|
11380
|
-
|
|
11367
|
+
} else if (fs2.futimes) {
|
|
11368
|
+
fs2.lutimes = function(_a, _b, _c, cb) {
|
|
11381
11369
|
if (cb) process.nextTick(cb);
|
|
11382
11370
|
};
|
|
11383
|
-
|
|
11371
|
+
fs2.lutimesSync = function() {
|
|
11384
11372
|
};
|
|
11385
11373
|
}
|
|
11386
11374
|
}
|
|
11387
11375
|
function chmodFix(orig) {
|
|
11388
11376
|
if (!orig) return orig;
|
|
11389
11377
|
return function(target, mode, cb) {
|
|
11390
|
-
return orig.call(
|
|
11378
|
+
return orig.call(fs, target, mode, function(er) {
|
|
11391
11379
|
if (chownErOk(er)) er = null;
|
|
11392
11380
|
if (cb) cb.apply(this, arguments);
|
|
11393
11381
|
});
|
|
@@ -11397,7 +11385,7 @@ var require_polyfills = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
11397
11385
|
if (!orig) return orig;
|
|
11398
11386
|
return function(target, mode) {
|
|
11399
11387
|
try {
|
|
11400
|
-
return orig.call(
|
|
11388
|
+
return orig.call(fs, target, mode);
|
|
11401
11389
|
} catch (er) {
|
|
11402
11390
|
if (!chownErOk(er)) throw er;
|
|
11403
11391
|
}
|
|
@@ -11406,7 +11394,7 @@ var require_polyfills = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
11406
11394
|
function chownFix(orig) {
|
|
11407
11395
|
if (!orig) return orig;
|
|
11408
11396
|
return function(target, uid, gid, cb) {
|
|
11409
|
-
return orig.call(
|
|
11397
|
+
return orig.call(fs, target, uid, gid, function(er) {
|
|
11410
11398
|
if (chownErOk(er)) er = null;
|
|
11411
11399
|
if (cb) cb.apply(this, arguments);
|
|
11412
11400
|
});
|
|
@@ -11416,7 +11404,7 @@ var require_polyfills = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
11416
11404
|
if (!orig) return orig;
|
|
11417
11405
|
return function(target, uid, gid) {
|
|
11418
11406
|
try {
|
|
11419
|
-
return orig.call(
|
|
11407
|
+
return orig.call(fs, target, uid, gid);
|
|
11420
11408
|
} catch (er) {
|
|
11421
11409
|
if (!chownErOk(er)) throw er;
|
|
11422
11410
|
}
|
|
@@ -11436,13 +11424,13 @@ var require_polyfills = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
11436
11424
|
}
|
|
11437
11425
|
if (cb) cb.apply(this, arguments);
|
|
11438
11426
|
}
|
|
11439
|
-
return options ? orig.call(
|
|
11427
|
+
return options ? orig.call(fs, target, options, callback) : orig.call(fs, target, callback);
|
|
11440
11428
|
};
|
|
11441
11429
|
}
|
|
11442
11430
|
function statFixSync(orig) {
|
|
11443
11431
|
if (!orig) return orig;
|
|
11444
11432
|
return function(target, options) {
|
|
11445
|
-
var stats = options ? orig.call(
|
|
11433
|
+
var stats = options ? orig.call(fs, target, options) : orig.call(fs, target);
|
|
11446
11434
|
if (stats) {
|
|
11447
11435
|
if (stats.uid < 0) stats.uid += 4294967296;
|
|
11448
11436
|
if (stats.gid < 0) stats.gid += 4294967296;
|
|
@@ -11470,16 +11458,16 @@ var require_legacy_streams = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
11470
11458
|
"use strict";
|
|
11471
11459
|
var Stream = (0, import_chunk_2ESYSVXG.__require)("stream").Stream;
|
|
11472
11460
|
module2.exports = legacy;
|
|
11473
|
-
function legacy(
|
|
11461
|
+
function legacy(fs) {
|
|
11474
11462
|
return {
|
|
11475
11463
|
ReadStream,
|
|
11476
11464
|
WriteStream
|
|
11477
11465
|
};
|
|
11478
|
-
function ReadStream(
|
|
11479
|
-
if (!(this instanceof ReadStream)) return new ReadStream(
|
|
11466
|
+
function ReadStream(path, options) {
|
|
11467
|
+
if (!(this instanceof ReadStream)) return new ReadStream(path, options);
|
|
11480
11468
|
Stream.call(this);
|
|
11481
11469
|
var self = this;
|
|
11482
|
-
this.path =
|
|
11470
|
+
this.path = path;
|
|
11483
11471
|
this.fd = null;
|
|
11484
11472
|
this.readable = true;
|
|
11485
11473
|
this.paused = false;
|
|
@@ -11513,7 +11501,7 @@ var require_legacy_streams = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
11513
11501
|
});
|
|
11514
11502
|
return;
|
|
11515
11503
|
}
|
|
11516
|
-
|
|
11504
|
+
fs.open(this.path, this.flags, this.mode, function(err, fd) {
|
|
11517
11505
|
if (err) {
|
|
11518
11506
|
self.emit("error", err);
|
|
11519
11507
|
self.readable = false;
|
|
@@ -11524,10 +11512,10 @@ var require_legacy_streams = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
11524
11512
|
self._read();
|
|
11525
11513
|
});
|
|
11526
11514
|
}
|
|
11527
|
-
function WriteStream(
|
|
11528
|
-
if (!(this instanceof WriteStream)) return new WriteStream(
|
|
11515
|
+
function WriteStream(path, options) {
|
|
11516
|
+
if (!(this instanceof WriteStream)) return new WriteStream(path, options);
|
|
11529
11517
|
Stream.call(this);
|
|
11530
|
-
this.path =
|
|
11518
|
+
this.path = path;
|
|
11531
11519
|
this.fd = null;
|
|
11532
11520
|
this.writable = true;
|
|
11533
11521
|
this.flags = "w";
|
|
@@ -11552,7 +11540,7 @@ var require_legacy_streams = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
11552
11540
|
this.busy = false;
|
|
11553
11541
|
this._queue = [];
|
|
11554
11542
|
if (this.fd === null) {
|
|
11555
|
-
this._open =
|
|
11543
|
+
this._open = fs.open;
|
|
11556
11544
|
this._queue.push([this._open, this.path, this.flags, this.mode, void 0]);
|
|
11557
11545
|
this.flush();
|
|
11558
11546
|
}
|
|
@@ -11584,7 +11572,7 @@ var require_clone = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
11584
11572
|
var require_graceful_fs = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
11585
11573
|
"../../node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/graceful-fs.js"(exports, module2) {
|
|
11586
11574
|
"use strict";
|
|
11587
|
-
var
|
|
11575
|
+
var fs = (0, import_chunk_2ESYSVXG.__require)("fs");
|
|
11588
11576
|
var polyfills = require_polyfills();
|
|
11589
11577
|
var legacy = require_legacy_streams();
|
|
11590
11578
|
var clone = require_clone();
|
|
@@ -11616,12 +11604,12 @@ var require_graceful_fs = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
11616
11604
|
m = "GFS4: " + m.split(/\n/).join("\nGFS4: ");
|
|
11617
11605
|
console.error(m);
|
|
11618
11606
|
};
|
|
11619
|
-
if (!
|
|
11607
|
+
if (!fs[gracefulQueue]) {
|
|
11620
11608
|
queue = global[gracefulQueue] || [];
|
|
11621
|
-
publishQueue(
|
|
11622
|
-
|
|
11609
|
+
publishQueue(fs, queue);
|
|
11610
|
+
fs.close = function(fs$close) {
|
|
11623
11611
|
function close(fd, cb) {
|
|
11624
|
-
return fs$close.call(
|
|
11612
|
+
return fs$close.call(fs, fd, function(err) {
|
|
11625
11613
|
if (!err) {
|
|
11626
11614
|
resetQueue();
|
|
11627
11615
|
}
|
|
@@ -11633,48 +11621,48 @@ var require_graceful_fs = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
11633
11621
|
value: fs$close
|
|
11634
11622
|
});
|
|
11635
11623
|
return close;
|
|
11636
|
-
}(
|
|
11637
|
-
|
|
11624
|
+
}(fs.close);
|
|
11625
|
+
fs.closeSync = function(fs$closeSync) {
|
|
11638
11626
|
function closeSync(fd) {
|
|
11639
|
-
fs$closeSync.apply(
|
|
11627
|
+
fs$closeSync.apply(fs, arguments);
|
|
11640
11628
|
resetQueue();
|
|
11641
11629
|
}
|
|
11642
11630
|
Object.defineProperty(closeSync, previousSymbol, {
|
|
11643
11631
|
value: fs$closeSync
|
|
11644
11632
|
});
|
|
11645
11633
|
return closeSync;
|
|
11646
|
-
}(
|
|
11634
|
+
}(fs.closeSync);
|
|
11647
11635
|
if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) {
|
|
11648
11636
|
process.on("exit", function() {
|
|
11649
|
-
debug(
|
|
11650
|
-
(0, import_chunk_2ESYSVXG.__require)("assert").equal(
|
|
11637
|
+
debug(fs[gracefulQueue]);
|
|
11638
|
+
(0, import_chunk_2ESYSVXG.__require)("assert").equal(fs[gracefulQueue].length, 0);
|
|
11651
11639
|
});
|
|
11652
11640
|
}
|
|
11653
11641
|
}
|
|
11654
11642
|
var queue;
|
|
11655
11643
|
if (!global[gracefulQueue]) {
|
|
11656
|
-
publishQueue(global,
|
|
11657
|
-
}
|
|
11658
|
-
module2.exports = patch(clone(
|
|
11659
|
-
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !
|
|
11660
|
-
module2.exports = patch(
|
|
11661
|
-
|
|
11662
|
-
}
|
|
11663
|
-
function patch(
|
|
11664
|
-
polyfills(
|
|
11665
|
-
|
|
11666
|
-
|
|
11667
|
-
|
|
11668
|
-
var fs$readFile =
|
|
11669
|
-
|
|
11670
|
-
function readFile(
|
|
11644
|
+
publishQueue(global, fs[gracefulQueue]);
|
|
11645
|
+
}
|
|
11646
|
+
module2.exports = patch(clone(fs));
|
|
11647
|
+
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs.__patched) {
|
|
11648
|
+
module2.exports = patch(fs);
|
|
11649
|
+
fs.__patched = true;
|
|
11650
|
+
}
|
|
11651
|
+
function patch(fs2) {
|
|
11652
|
+
polyfills(fs2);
|
|
11653
|
+
fs2.gracefulify = patch;
|
|
11654
|
+
fs2.createReadStream = createReadStream;
|
|
11655
|
+
fs2.createWriteStream = createWriteStream;
|
|
11656
|
+
var fs$readFile = fs2.readFile;
|
|
11657
|
+
fs2.readFile = readFile;
|
|
11658
|
+
function readFile(path, options, cb) {
|
|
11671
11659
|
if (typeof options === "function")
|
|
11672
11660
|
cb = options, options = null;
|
|
11673
|
-
return go$readFile(
|
|
11674
|
-
function go$readFile(
|
|
11675
|
-
return fs$readFile(
|
|
11661
|
+
return go$readFile(path, options, cb);
|
|
11662
|
+
function go$readFile(path2, options2, cb2, startTime) {
|
|
11663
|
+
return fs$readFile(path2, options2, function(err) {
|
|
11676
11664
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
11677
|
-
enqueue([go$readFile, [
|
|
11665
|
+
enqueue([go$readFile, [path2, options2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
11678
11666
|
else {
|
|
11679
11667
|
if (typeof cb2 === "function")
|
|
11680
11668
|
cb2.apply(this, arguments);
|
|
@@ -11682,16 +11670,16 @@ var require_graceful_fs = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
11682
11670
|
});
|
|
11683
11671
|
}
|
|
11684
11672
|
}
|
|
11685
|
-
var fs$writeFile =
|
|
11686
|
-
|
|
11687
|
-
function writeFile(
|
|
11673
|
+
var fs$writeFile = fs2.writeFile;
|
|
11674
|
+
fs2.writeFile = writeFile;
|
|
11675
|
+
function writeFile(path, data, options, cb) {
|
|
11688
11676
|
if (typeof options === "function")
|
|
11689
11677
|
cb = options, options = null;
|
|
11690
|
-
return go$writeFile(
|
|
11691
|
-
function go$writeFile(
|
|
11692
|
-
return fs$writeFile(
|
|
11678
|
+
return go$writeFile(path, data, options, cb);
|
|
11679
|
+
function go$writeFile(path2, data2, options2, cb2, startTime) {
|
|
11680
|
+
return fs$writeFile(path2, data2, options2, function(err) {
|
|
11693
11681
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
11694
|
-
enqueue([go$writeFile, [
|
|
11682
|
+
enqueue([go$writeFile, [path2, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
11695
11683
|
else {
|
|
11696
11684
|
if (typeof cb2 === "function")
|
|
11697
11685
|
cb2.apply(this, arguments);
|
|
@@ -11699,17 +11687,17 @@ var require_graceful_fs = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
11699
11687
|
});
|
|
11700
11688
|
}
|
|
11701
11689
|
}
|
|
11702
|
-
var fs$appendFile =
|
|
11690
|
+
var fs$appendFile = fs2.appendFile;
|
|
11703
11691
|
if (fs$appendFile)
|
|
11704
|
-
|
|
11705
|
-
function appendFile(
|
|
11692
|
+
fs2.appendFile = appendFile;
|
|
11693
|
+
function appendFile(path, data, options, cb) {
|
|
11706
11694
|
if (typeof options === "function")
|
|
11707
11695
|
cb = options, options = null;
|
|
11708
|
-
return go$appendFile(
|
|
11709
|
-
function go$appendFile(
|
|
11710
|
-
return fs$appendFile(
|
|
11696
|
+
return go$appendFile(path, data, options, cb);
|
|
11697
|
+
function go$appendFile(path2, data2, options2, cb2, startTime) {
|
|
11698
|
+
return fs$appendFile(path2, data2, options2, function(err) {
|
|
11711
11699
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
11712
|
-
enqueue([go$appendFile, [
|
|
11700
|
+
enqueue([go$appendFile, [path2, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
11713
11701
|
else {
|
|
11714
11702
|
if (typeof cb2 === "function")
|
|
11715
11703
|
cb2.apply(this, arguments);
|
|
@@ -11717,9 +11705,9 @@ var require_graceful_fs = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
11717
11705
|
});
|
|
11718
11706
|
}
|
|
11719
11707
|
}
|
|
11720
|
-
var fs$copyFile =
|
|
11708
|
+
var fs$copyFile = fs2.copyFile;
|
|
11721
11709
|
if (fs$copyFile)
|
|
11722
|
-
|
|
11710
|
+
fs2.copyFile = copyFile;
|
|
11723
11711
|
function copyFile(src, dest, flags, cb) {
|
|
11724
11712
|
if (typeof flags === "function") {
|
|
11725
11713
|
cb = flags;
|
|
@@ -11737,34 +11725,34 @@ var require_graceful_fs = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
11737
11725
|
});
|
|
11738
11726
|
}
|
|
11739
11727
|
}
|
|
11740
|
-
var fs$readdir =
|
|
11741
|
-
|
|
11728
|
+
var fs$readdir = fs2.readdir;
|
|
11729
|
+
fs2.readdir = readdir;
|
|
11742
11730
|
var noReaddirOptionVersions = /^v[0-5]\./;
|
|
11743
|
-
function readdir(
|
|
11731
|
+
function readdir(path, options, cb) {
|
|
11744
11732
|
if (typeof options === "function")
|
|
11745
11733
|
cb = options, options = null;
|
|
11746
|
-
var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(
|
|
11747
|
-
return fs$readdir(
|
|
11748
|
-
|
|
11734
|
+
var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path2, options2, cb2, startTime) {
|
|
11735
|
+
return fs$readdir(path2, fs$readdirCallback(
|
|
11736
|
+
path2,
|
|
11749
11737
|
options2,
|
|
11750
11738
|
cb2,
|
|
11751
11739
|
startTime
|
|
11752
11740
|
));
|
|
11753
|
-
} : function go$readdir2(
|
|
11754
|
-
return fs$readdir(
|
|
11755
|
-
|
|
11741
|
+
} : function go$readdir2(path2, options2, cb2, startTime) {
|
|
11742
|
+
return fs$readdir(path2, options2, fs$readdirCallback(
|
|
11743
|
+
path2,
|
|
11756
11744
|
options2,
|
|
11757
11745
|
cb2,
|
|
11758
11746
|
startTime
|
|
11759
11747
|
));
|
|
11760
11748
|
};
|
|
11761
|
-
return go$readdir(
|
|
11762
|
-
function fs$readdirCallback(
|
|
11749
|
+
return go$readdir(path, options, cb);
|
|
11750
|
+
function fs$readdirCallback(path2, options2, cb2, startTime) {
|
|
11763
11751
|
return function(err, files) {
|
|
11764
11752
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
11765
11753
|
enqueue([
|
|
11766
11754
|
go$readdir,
|
|
11767
|
-
[
|
|
11755
|
+
[path2, options2, cb2],
|
|
11768
11756
|
err,
|
|
11769
11757
|
startTime || Date.now(),
|
|
11770
11758
|
Date.now()
|
|
@@ -11779,21 +11767,21 @@ var require_graceful_fs = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
11779
11767
|
}
|
|
11780
11768
|
}
|
|
11781
11769
|
if (process.version.substr(0, 4) === "v0.8") {
|
|
11782
|
-
var legStreams = legacy(
|
|
11770
|
+
var legStreams = legacy(fs2);
|
|
11783
11771
|
ReadStream = legStreams.ReadStream;
|
|
11784
11772
|
WriteStream = legStreams.WriteStream;
|
|
11785
11773
|
}
|
|
11786
|
-
var fs$ReadStream =
|
|
11774
|
+
var fs$ReadStream = fs2.ReadStream;
|
|
11787
11775
|
if (fs$ReadStream) {
|
|
11788
11776
|
ReadStream.prototype = Object.create(fs$ReadStream.prototype);
|
|
11789
11777
|
ReadStream.prototype.open = ReadStream$open;
|
|
11790
11778
|
}
|
|
11791
|
-
var fs$WriteStream =
|
|
11779
|
+
var fs$WriteStream = fs2.WriteStream;
|
|
11792
11780
|
if (fs$WriteStream) {
|
|
11793
11781
|
WriteStream.prototype = Object.create(fs$WriteStream.prototype);
|
|
11794
11782
|
WriteStream.prototype.open = WriteStream$open;
|
|
11795
11783
|
}
|
|
11796
|
-
Object.defineProperty(
|
|
11784
|
+
Object.defineProperty(fs2, "ReadStream", {
|
|
11797
11785
|
get: function() {
|
|
11798
11786
|
return ReadStream;
|
|
11799
11787
|
},
|
|
@@ -11803,7 +11791,7 @@ var require_graceful_fs = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
11803
11791
|
enumerable: true,
|
|
11804
11792
|
configurable: true
|
|
11805
11793
|
});
|
|
11806
|
-
Object.defineProperty(
|
|
11794
|
+
Object.defineProperty(fs2, "WriteStream", {
|
|
11807
11795
|
get: function() {
|
|
11808
11796
|
return WriteStream;
|
|
11809
11797
|
},
|
|
@@ -11814,7 +11802,7 @@ var require_graceful_fs = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
11814
11802
|
configurable: true
|
|
11815
11803
|
});
|
|
11816
11804
|
var FileReadStream = ReadStream;
|
|
11817
|
-
Object.defineProperty(
|
|
11805
|
+
Object.defineProperty(fs2, "FileReadStream", {
|
|
11818
11806
|
get: function() {
|
|
11819
11807
|
return FileReadStream;
|
|
11820
11808
|
},
|
|
@@ -11825,7 +11813,7 @@ var require_graceful_fs = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
11825
11813
|
configurable: true
|
|
11826
11814
|
});
|
|
11827
11815
|
var FileWriteStream = WriteStream;
|
|
11828
|
-
Object.defineProperty(
|
|
11816
|
+
Object.defineProperty(fs2, "FileWriteStream", {
|
|
11829
11817
|
get: function() {
|
|
11830
11818
|
return FileWriteStream;
|
|
11831
11819
|
},
|
|
@@ -11835,7 +11823,7 @@ var require_graceful_fs = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
11835
11823
|
enumerable: true,
|
|
11836
11824
|
configurable: true
|
|
11837
11825
|
});
|
|
11838
|
-
function ReadStream(
|
|
11826
|
+
function ReadStream(path, options) {
|
|
11839
11827
|
if (this instanceof ReadStream)
|
|
11840
11828
|
return fs$ReadStream.apply(this, arguments), this;
|
|
11841
11829
|
else
|
|
@@ -11855,7 +11843,7 @@ var require_graceful_fs = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
11855
11843
|
}
|
|
11856
11844
|
});
|
|
11857
11845
|
}
|
|
11858
|
-
function WriteStream(
|
|
11846
|
+
function WriteStream(path, options) {
|
|
11859
11847
|
if (this instanceof WriteStream)
|
|
11860
11848
|
return fs$WriteStream.apply(this, arguments), this;
|
|
11861
11849
|
else
|
|
@@ -11873,22 +11861,22 @@ var require_graceful_fs = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
11873
11861
|
}
|
|
11874
11862
|
});
|
|
11875
11863
|
}
|
|
11876
|
-
function createReadStream(
|
|
11877
|
-
return new
|
|
11864
|
+
function createReadStream(path, options) {
|
|
11865
|
+
return new fs2.ReadStream(path, options);
|
|
11878
11866
|
}
|
|
11879
|
-
function createWriteStream(
|
|
11880
|
-
return new
|
|
11867
|
+
function createWriteStream(path, options) {
|
|
11868
|
+
return new fs2.WriteStream(path, options);
|
|
11881
11869
|
}
|
|
11882
|
-
var fs$open =
|
|
11883
|
-
|
|
11884
|
-
function open(
|
|
11870
|
+
var fs$open = fs2.open;
|
|
11871
|
+
fs2.open = open;
|
|
11872
|
+
function open(path, flags, mode, cb) {
|
|
11885
11873
|
if (typeof mode === "function")
|
|
11886
11874
|
cb = mode, mode = null;
|
|
11887
|
-
return go$open(
|
|
11888
|
-
function go$open(
|
|
11889
|
-
return fs$open(
|
|
11875
|
+
return go$open(path, flags, mode, cb);
|
|
11876
|
+
function go$open(path2, flags2, mode2, cb2, startTime) {
|
|
11877
|
+
return fs$open(path2, flags2, mode2, function(err, fd) {
|
|
11890
11878
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
11891
|
-
enqueue([go$open, [
|
|
11879
|
+
enqueue([go$open, [path2, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
11892
11880
|
else {
|
|
11893
11881
|
if (typeof cb2 === "function")
|
|
11894
11882
|
cb2.apply(this, arguments);
|
|
@@ -11896,20 +11884,20 @@ var require_graceful_fs = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
11896
11884
|
});
|
|
11897
11885
|
}
|
|
11898
11886
|
}
|
|
11899
|
-
return
|
|
11887
|
+
return fs2;
|
|
11900
11888
|
}
|
|
11901
11889
|
function enqueue(elem) {
|
|
11902
11890
|
debug("ENQUEUE", elem[0].name, elem[1]);
|
|
11903
|
-
|
|
11891
|
+
fs[gracefulQueue].push(elem);
|
|
11904
11892
|
retry();
|
|
11905
11893
|
}
|
|
11906
11894
|
var retryTimer;
|
|
11907
11895
|
function resetQueue() {
|
|
11908
11896
|
var now = Date.now();
|
|
11909
|
-
for (var i = 0; i <
|
|
11910
|
-
if (
|
|
11911
|
-
|
|
11912
|
-
|
|
11897
|
+
for (var i = 0; i < fs[gracefulQueue].length; ++i) {
|
|
11898
|
+
if (fs[gracefulQueue][i].length > 2) {
|
|
11899
|
+
fs[gracefulQueue][i][3] = now;
|
|
11900
|
+
fs[gracefulQueue][i][4] = now;
|
|
11913
11901
|
}
|
|
11914
11902
|
}
|
|
11915
11903
|
retry();
|
|
@@ -11917,9 +11905,9 @@ var require_graceful_fs = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
11917
11905
|
function retry() {
|
|
11918
11906
|
clearTimeout(retryTimer);
|
|
11919
11907
|
retryTimer = void 0;
|
|
11920
|
-
if (
|
|
11908
|
+
if (fs[gracefulQueue].length === 0)
|
|
11921
11909
|
return;
|
|
11922
|
-
var elem =
|
|
11910
|
+
var elem = fs[gracefulQueue].shift();
|
|
11923
11911
|
var fn = elem[0];
|
|
11924
11912
|
var args = elem[1];
|
|
11925
11913
|
var err = elem[2];
|
|
@@ -11941,7 +11929,7 @@ var require_graceful_fs = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
11941
11929
|
debug("RETRY", fn.name, args);
|
|
11942
11930
|
fn.apply(null, args.concat([startTime]));
|
|
11943
11931
|
} else {
|
|
11944
|
-
|
|
11932
|
+
fs[gracefulQueue].push(elem);
|
|
11945
11933
|
}
|
|
11946
11934
|
}
|
|
11947
11935
|
if (retryTimer === void 0) {
|
|
@@ -11953,10 +11941,10 @@ var require_graceful_fs = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
11953
11941
|
var require_is_path_cwd = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
11954
11942
|
"../../node_modules/.pnpm/is-path-cwd@2.2.0/node_modules/is-path-cwd/index.js"(exports, module2) {
|
|
11955
11943
|
"use strict";
|
|
11956
|
-
var
|
|
11944
|
+
var path = (0, import_chunk_2ESYSVXG.__require)("path");
|
|
11957
11945
|
module2.exports = (path_) => {
|
|
11958
11946
|
let cwd = process.cwd();
|
|
11959
|
-
path_ =
|
|
11947
|
+
path_ = path.resolve(path_);
|
|
11960
11948
|
if (process.platform === "win32") {
|
|
11961
11949
|
cwd = cwd.toLowerCase();
|
|
11962
11950
|
path_ = path_.toLowerCase();
|
|
@@ -11968,11 +11956,11 @@ var require_is_path_cwd = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
11968
11956
|
var require_is_path_inside = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
11969
11957
|
"../../node_modules/.pnpm/is-path-inside@3.0.3/node_modules/is-path-inside/index.js"(exports, module2) {
|
|
11970
11958
|
"use strict";
|
|
11971
|
-
var
|
|
11959
|
+
var path = (0, import_chunk_2ESYSVXG.__require)("path");
|
|
11972
11960
|
module2.exports = (childPath, parentPath) => {
|
|
11973
|
-
const relation =
|
|
11961
|
+
const relation = path.relative(parentPath, childPath);
|
|
11974
11962
|
return Boolean(
|
|
11975
|
-
relation && relation !== ".." && !relation.startsWith(`..${
|
|
11963
|
+
relation && relation !== ".." && !relation.startsWith(`..${path.sep}`) && relation !== path.resolve(childPath)
|
|
11976
11964
|
);
|
|
11977
11965
|
};
|
|
11978
11966
|
}
|
|
@@ -11982,7 +11970,7 @@ var require_old = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
11982
11970
|
"use strict";
|
|
11983
11971
|
var pathModule = (0, import_chunk_2ESYSVXG.__require)("path");
|
|
11984
11972
|
var isWindows = process.platform === "win32";
|
|
11985
|
-
var
|
|
11973
|
+
var fs = (0, import_chunk_2ESYSVXG.__require)("fs");
|
|
11986
11974
|
var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG);
|
|
11987
11975
|
function rethrow() {
|
|
11988
11976
|
var callback;
|
|
@@ -12047,7 +12035,7 @@ var require_old = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
12047
12035
|
base = m[0];
|
|
12048
12036
|
previous = "";
|
|
12049
12037
|
if (isWindows && !knownHard[base]) {
|
|
12050
|
-
|
|
12038
|
+
fs.lstatSync(base);
|
|
12051
12039
|
knownHard[base] = true;
|
|
12052
12040
|
}
|
|
12053
12041
|
}
|
|
@@ -12065,7 +12053,7 @@ var require_old = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
12065
12053
|
if (cache && Object.prototype.hasOwnProperty.call(cache, base)) {
|
|
12066
12054
|
resolvedLink = cache[base];
|
|
12067
12055
|
} else {
|
|
12068
|
-
var stat =
|
|
12056
|
+
var stat = fs.lstatSync(base);
|
|
12069
12057
|
if (!stat.isSymbolicLink()) {
|
|
12070
12058
|
knownHard[base] = true;
|
|
12071
12059
|
if (cache) cache[base] = base;
|
|
@@ -12079,8 +12067,8 @@ var require_old = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
12079
12067
|
}
|
|
12080
12068
|
}
|
|
12081
12069
|
if (linkTarget === null) {
|
|
12082
|
-
|
|
12083
|
-
linkTarget =
|
|
12070
|
+
fs.statSync(base);
|
|
12071
|
+
linkTarget = fs.readlinkSync(base);
|
|
12084
12072
|
}
|
|
12085
12073
|
resolvedLink = pathModule.resolve(previous, linkTarget);
|
|
12086
12074
|
if (cache) cache[base] = resolvedLink;
|
|
@@ -12114,7 +12102,7 @@ var require_old = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
12114
12102
|
base = m[0];
|
|
12115
12103
|
previous = "";
|
|
12116
12104
|
if (isWindows && !knownHard[base]) {
|
|
12117
|
-
|
|
12105
|
+
fs.lstat(base, function(err) {
|
|
12118
12106
|
if (err) return cb(err);
|
|
12119
12107
|
knownHard[base] = true;
|
|
12120
12108
|
LOOP();
|
|
@@ -12140,7 +12128,7 @@ var require_old = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
12140
12128
|
if (cache && Object.prototype.hasOwnProperty.call(cache, base)) {
|
|
12141
12129
|
return gotResolvedLink(cache[base]);
|
|
12142
12130
|
}
|
|
12143
|
-
return
|
|
12131
|
+
return fs.lstat(base, gotStat);
|
|
12144
12132
|
}
|
|
12145
12133
|
function gotStat(err, stat) {
|
|
12146
12134
|
if (err) return cb(err);
|
|
@@ -12155,9 +12143,9 @@ var require_old = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
12155
12143
|
return gotTarget(null, seenLinks[id], base);
|
|
12156
12144
|
}
|
|
12157
12145
|
}
|
|
12158
|
-
|
|
12146
|
+
fs.stat(base, function(err2) {
|
|
12159
12147
|
if (err2) return cb(err2);
|
|
12160
|
-
|
|
12148
|
+
fs.readlink(base, function(err3, target) {
|
|
12161
12149
|
if (!isWindows) seenLinks[id] = target;
|
|
12162
12150
|
gotTarget(err3, target);
|
|
12163
12151
|
});
|
|
@@ -12185,9 +12173,9 @@ var require_fs6 = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
12185
12173
|
realpath.realpathSync = realpathSync;
|
|
12186
12174
|
realpath.monkeypatch = monkeypatch;
|
|
12187
12175
|
realpath.unmonkeypatch = unmonkeypatch;
|
|
12188
|
-
var
|
|
12189
|
-
var origRealpath =
|
|
12190
|
-
var origRealpathSync =
|
|
12176
|
+
var fs = (0, import_chunk_2ESYSVXG.__require)("fs");
|
|
12177
|
+
var origRealpath = fs.realpath;
|
|
12178
|
+
var origRealpathSync = fs.realpathSync;
|
|
12191
12179
|
var version = process.version;
|
|
12192
12180
|
var ok = /^v[0-5]\./.test(version);
|
|
12193
12181
|
var old = require_old();
|
|
@@ -12225,12 +12213,12 @@ var require_fs6 = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
12225
12213
|
}
|
|
12226
12214
|
}
|
|
12227
12215
|
function monkeypatch() {
|
|
12228
|
-
|
|
12229
|
-
|
|
12216
|
+
fs.realpath = realpath;
|
|
12217
|
+
fs.realpathSync = realpathSync;
|
|
12230
12218
|
}
|
|
12231
12219
|
function unmonkeypatch() {
|
|
12232
|
-
|
|
12233
|
-
|
|
12220
|
+
fs.realpath = origRealpath;
|
|
12221
|
+
fs.realpathSync = origRealpathSync;
|
|
12234
12222
|
}
|
|
12235
12223
|
}
|
|
12236
12224
|
});
|
|
@@ -12399,7 +12387,7 @@ var require_minimatch2 = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
12399
12387
|
"use strict";
|
|
12400
12388
|
module2.exports = minimatch;
|
|
12401
12389
|
minimatch.Minimatch = Minimatch;
|
|
12402
|
-
var
|
|
12390
|
+
var path = function() {
|
|
12403
12391
|
try {
|
|
12404
12392
|
return (0, import_chunk_2ESYSVXG.__require)("path");
|
|
12405
12393
|
} catch (e) {
|
|
@@ -12407,7 +12395,7 @@ var require_minimatch2 = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
12407
12395
|
}() || {
|
|
12408
12396
|
sep: "/"
|
|
12409
12397
|
};
|
|
12410
|
-
minimatch.sep =
|
|
12398
|
+
minimatch.sep = path.sep;
|
|
12411
12399
|
var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {};
|
|
12412
12400
|
var expand = require_brace_expansion2();
|
|
12413
12401
|
var plTypes = {
|
|
@@ -12496,8 +12484,8 @@ var require_minimatch2 = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
12496
12484
|
assertValidPattern(pattern);
|
|
12497
12485
|
if (!options) options = {};
|
|
12498
12486
|
pattern = pattern.trim();
|
|
12499
|
-
if (!options.allowWindowsEscape &&
|
|
12500
|
-
pattern = pattern.split(
|
|
12487
|
+
if (!options.allowWindowsEscape && path.sep !== "/") {
|
|
12488
|
+
pattern = pattern.split(path.sep).join("/");
|
|
12501
12489
|
}
|
|
12502
12490
|
this.options = options;
|
|
12503
12491
|
this.set = [];
|
|
@@ -12866,8 +12854,8 @@ var require_minimatch2 = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
12866
12854
|
if (this.empty) return f === "";
|
|
12867
12855
|
if (f === "/" && partial) return true;
|
|
12868
12856
|
var options = this.options;
|
|
12869
|
-
if (
|
|
12870
|
-
f = f.split(
|
|
12857
|
+
if (path.sep !== "/") {
|
|
12858
|
+
f = f.split(path.sep).join("/");
|
|
12871
12859
|
}
|
|
12872
12860
|
f = f.split(slashSplit);
|
|
12873
12861
|
this.debug(this.pattern, "split", f);
|
|
@@ -13013,12 +13001,12 @@ var require_inherits = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
13013
13001
|
var require_path_is_absolute = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
13014
13002
|
"../../node_modules/.pnpm/path-is-absolute@1.0.1/node_modules/path-is-absolute/index.js"(exports, module2) {
|
|
13015
13003
|
"use strict";
|
|
13016
|
-
function posix(
|
|
13017
|
-
return
|
|
13004
|
+
function posix(path) {
|
|
13005
|
+
return path.charAt(0) === "/";
|
|
13018
13006
|
}
|
|
13019
|
-
function win32(
|
|
13007
|
+
function win32(path) {
|
|
13020
13008
|
var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;
|
|
13021
|
-
var result = splitDeviceRe.exec(
|
|
13009
|
+
var result = splitDeviceRe.exec(path);
|
|
13022
13010
|
var device = result[1] || "";
|
|
13023
13011
|
var isUnc = Boolean(device && device.charAt(1) !== ":");
|
|
13024
13012
|
return Boolean(result[2] || isUnc);
|
|
@@ -13041,8 +13029,8 @@ var require_common3 = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
13041
13029
|
function ownProp(obj, field) {
|
|
13042
13030
|
return Object.prototype.hasOwnProperty.call(obj, field);
|
|
13043
13031
|
}
|
|
13044
|
-
var
|
|
13045
|
-
var
|
|
13032
|
+
var fs = (0, import_chunk_2ESYSVXG.__require)("fs");
|
|
13033
|
+
var path = (0, import_chunk_2ESYSVXG.__require)("path");
|
|
13046
13034
|
var minimatch = require_minimatch2();
|
|
13047
13035
|
var isAbsolute = require_path_is_absolute();
|
|
13048
13036
|
var Minimatch = minimatch.Minimatch;
|
|
@@ -13096,7 +13084,7 @@ var require_common3 = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
13096
13084
|
self.stat = !!options.stat;
|
|
13097
13085
|
self.noprocess = !!options.noprocess;
|
|
13098
13086
|
self.absolute = !!options.absolute;
|
|
13099
|
-
self.fs = options.fs ||
|
|
13087
|
+
self.fs = options.fs || fs;
|
|
13100
13088
|
self.maxLength = options.maxLength || Infinity;
|
|
13101
13089
|
self.cache = options.cache || /* @__PURE__ */ Object.create(null);
|
|
13102
13090
|
self.statCache = options.statCache || /* @__PURE__ */ Object.create(null);
|
|
@@ -13107,11 +13095,11 @@ var require_common3 = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
13107
13095
|
if (!ownProp(options, "cwd"))
|
|
13108
13096
|
self.cwd = cwd;
|
|
13109
13097
|
else {
|
|
13110
|
-
self.cwd =
|
|
13098
|
+
self.cwd = path.resolve(options.cwd);
|
|
13111
13099
|
self.changedCwd = self.cwd !== cwd;
|
|
13112
13100
|
}
|
|
13113
|
-
self.root = options.root ||
|
|
13114
|
-
self.root =
|
|
13101
|
+
self.root = options.root || path.resolve(self.cwd, "/");
|
|
13102
|
+
self.root = path.resolve(self.root);
|
|
13115
13103
|
if (process.platform === "win32")
|
|
13116
13104
|
self.root = self.root.replace(/\\/g, "/");
|
|
13117
13105
|
self.cwdAbs = isAbsolute(self.cwd) ? self.cwd : makeAbs(self, self.cwd);
|
|
@@ -13193,30 +13181,30 @@ var require_common3 = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
13193
13181
|
function makeAbs(self, f) {
|
|
13194
13182
|
var abs = f;
|
|
13195
13183
|
if (f.charAt(0) === "/") {
|
|
13196
|
-
abs =
|
|
13184
|
+
abs = path.join(self.root, f);
|
|
13197
13185
|
} else if (isAbsolute(f) || f === "") {
|
|
13198
13186
|
abs = f;
|
|
13199
13187
|
} else if (self.changedCwd) {
|
|
13200
|
-
abs =
|
|
13188
|
+
abs = path.resolve(self.cwd, f);
|
|
13201
13189
|
} else {
|
|
13202
|
-
abs =
|
|
13190
|
+
abs = path.resolve(f);
|
|
13203
13191
|
}
|
|
13204
13192
|
if (process.platform === "win32")
|
|
13205
13193
|
abs = abs.replace(/\\/g, "/");
|
|
13206
13194
|
return abs;
|
|
13207
13195
|
}
|
|
13208
|
-
function isIgnored(self,
|
|
13196
|
+
function isIgnored(self, path2) {
|
|
13209
13197
|
if (!self.ignore.length)
|
|
13210
13198
|
return false;
|
|
13211
13199
|
return self.ignore.some(function(item) {
|
|
13212
|
-
return item.matcher.match(
|
|
13200
|
+
return item.matcher.match(path2) || !!(item.gmatcher && item.gmatcher.match(path2));
|
|
13213
13201
|
});
|
|
13214
13202
|
}
|
|
13215
|
-
function childrenIgnored(self,
|
|
13203
|
+
function childrenIgnored(self, path2) {
|
|
13216
13204
|
if (!self.ignore.length)
|
|
13217
13205
|
return false;
|
|
13218
13206
|
return self.ignore.some(function(item) {
|
|
13219
|
-
return !!(item.gmatcher && item.gmatcher.match(
|
|
13207
|
+
return !!(item.gmatcher && item.gmatcher.match(path2));
|
|
13220
13208
|
});
|
|
13221
13209
|
}
|
|
13222
13210
|
}
|
|
@@ -13231,7 +13219,7 @@ var require_sync7 = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
13231
13219
|
var Minimatch = minimatch.Minimatch;
|
|
13232
13220
|
var Glob = require_glob().Glob;
|
|
13233
13221
|
var util = (0, import_chunk_2ESYSVXG.__require)("util");
|
|
13234
|
-
var
|
|
13222
|
+
var path = (0, import_chunk_2ESYSVXG.__require)("path");
|
|
13235
13223
|
var assert = (0, import_chunk_2ESYSVXG.__require)("assert");
|
|
13236
13224
|
var isAbsolute = require_path_is_absolute();
|
|
13237
13225
|
var common = require_common3();
|
|
@@ -13360,7 +13348,7 @@ var require_sync7 = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
13360
13348
|
e = prefix + e;
|
|
13361
13349
|
}
|
|
13362
13350
|
if (e.charAt(0) === "/" && !this.nomount) {
|
|
13363
|
-
e =
|
|
13351
|
+
e = path.join(this.root, e);
|
|
13364
13352
|
}
|
|
13365
13353
|
this._emitMatch(index, e);
|
|
13366
13354
|
}
|
|
@@ -13511,9 +13499,9 @@ var require_sync7 = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
13511
13499
|
if (prefix && isAbsolute(prefix) && !this.nomount) {
|
|
13512
13500
|
var trail = /[\/\\]$/.test(prefix);
|
|
13513
13501
|
if (prefix.charAt(0) === "/") {
|
|
13514
|
-
prefix =
|
|
13502
|
+
prefix = path.join(this.root, prefix);
|
|
13515
13503
|
} else {
|
|
13516
|
-
prefix =
|
|
13504
|
+
prefix = path.resolve(this.root, prefix);
|
|
13517
13505
|
if (trail)
|
|
13518
13506
|
prefix += "/";
|
|
13519
13507
|
}
|
|
@@ -13701,7 +13689,7 @@ var require_glob = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
13701
13689
|
var Minimatch = minimatch.Minimatch;
|
|
13702
13690
|
var inherits = require_inherits();
|
|
13703
13691
|
var EE = (0, import_chunk_2ESYSVXG.__require)("events").EventEmitter;
|
|
13704
|
-
var
|
|
13692
|
+
var path = (0, import_chunk_2ESYSVXG.__require)("path");
|
|
13705
13693
|
var assert = (0, import_chunk_2ESYSVXG.__require)("assert");
|
|
13706
13694
|
var isAbsolute = require_path_is_absolute();
|
|
13707
13695
|
var globSync = require_sync7();
|
|
@@ -13983,7 +13971,7 @@ var require_glob = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
13983
13971
|
e = prefix + e;
|
|
13984
13972
|
}
|
|
13985
13973
|
if (e.charAt(0) === "/" && !this.nomount) {
|
|
13986
|
-
e =
|
|
13974
|
+
e = path.join(this.root, e);
|
|
13987
13975
|
}
|
|
13988
13976
|
this._emitMatch(index, e);
|
|
13989
13977
|
}
|
|
@@ -14172,9 +14160,9 @@ var require_glob = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
14172
14160
|
if (prefix && isAbsolute(prefix) && !this.nomount) {
|
|
14173
14161
|
var trail = /[\/\\]$/.test(prefix);
|
|
14174
14162
|
if (prefix.charAt(0) === "/") {
|
|
14175
|
-
prefix =
|
|
14163
|
+
prefix = path.join(this.root, prefix);
|
|
14176
14164
|
} else {
|
|
14177
|
-
prefix =
|
|
14165
|
+
prefix = path.resolve(this.root, prefix);
|
|
14178
14166
|
if (trail)
|
|
14179
14167
|
prefix += "/";
|
|
14180
14168
|
}
|
|
@@ -14251,8 +14239,8 @@ var require_rimraf = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
14251
14239
|
"../../node_modules/.pnpm/rimraf@3.0.2/node_modules/rimraf/rimraf.js"(exports, module2) {
|
|
14252
14240
|
"use strict";
|
|
14253
14241
|
var assert = (0, import_chunk_2ESYSVXG.__require)("assert");
|
|
14254
|
-
var
|
|
14255
|
-
var
|
|
14242
|
+
var path = (0, import_chunk_2ESYSVXG.__require)("path");
|
|
14243
|
+
var fs = (0, import_chunk_2ESYSVXG.__require)("fs");
|
|
14256
14244
|
var glob = void 0;
|
|
14257
14245
|
try {
|
|
14258
14246
|
glob = require_glob();
|
|
@@ -14274,9 +14262,9 @@ var require_rimraf = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
14274
14262
|
"readdir"
|
|
14275
14263
|
];
|
|
14276
14264
|
methods.forEach((m) => {
|
|
14277
|
-
options[m] = options[m] ||
|
|
14265
|
+
options[m] = options[m] || fs[m];
|
|
14278
14266
|
m = m + "Sync";
|
|
14279
|
-
options[m] = options[m] ||
|
|
14267
|
+
options[m] = options[m] || fs[m];
|
|
14280
14268
|
});
|
|
14281
14269
|
options.maxBusyTries = options.maxBusyTries || 3;
|
|
14282
14270
|
options.emfileWait = options.emfileWait || 1e3;
|
|
@@ -14432,7 +14420,7 @@ var require_rimraf = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
14432
14420
|
return options.rmdir(p, cb);
|
|
14433
14421
|
let errState;
|
|
14434
14422
|
files.forEach((f) => {
|
|
14435
|
-
rimraf(
|
|
14423
|
+
rimraf(path.join(p, f), options, (er2) => {
|
|
14436
14424
|
if (errState)
|
|
14437
14425
|
return;
|
|
14438
14426
|
if (er2)
|
|
@@ -14507,7 +14495,7 @@ var require_rimraf = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
14507
14495
|
var rmkidsSync = (p, options) => {
|
|
14508
14496
|
assert(p);
|
|
14509
14497
|
assert(options);
|
|
14510
|
-
options.readdirSync(p).forEach((f) => rimrafSync(
|
|
14498
|
+
options.readdirSync(p).forEach((f) => rimrafSync(path.join(p, f), options));
|
|
14511
14499
|
const retries = isWindows ? 100 : 1;
|
|
14512
14500
|
let i = 0;
|
|
14513
14501
|
do {
|
|
@@ -14696,7 +14684,7 @@ var require_del = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
14696
14684
|
"../../node_modules/.pnpm/del@6.1.1/node_modules/del/index.js"(exports, module2) {
|
|
14697
14685
|
"use strict";
|
|
14698
14686
|
var { promisify } = (0, import_chunk_2ESYSVXG.__require)("util");
|
|
14699
|
-
var
|
|
14687
|
+
var path = (0, import_chunk_2ESYSVXG.__require)("path");
|
|
14700
14688
|
var globby = require_globby();
|
|
14701
14689
|
var isGlob = require_is_glob();
|
|
14702
14690
|
var slash = require_slash();
|
|
@@ -14759,7 +14747,7 @@ var require_del = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
14759
14747
|
}
|
|
14760
14748
|
let deletedCount = 0;
|
|
14761
14749
|
const mapper = async (file) => {
|
|
14762
|
-
file =
|
|
14750
|
+
file = path.resolve(cwd, file);
|
|
14763
14751
|
if (!force) {
|
|
14764
14752
|
safeCheck(file, cwd);
|
|
14765
14753
|
}
|
|
@@ -14789,7 +14777,7 @@ var require_del = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
14789
14777
|
patterns = normalizePatterns(patterns);
|
|
14790
14778
|
const files = globby.sync(patterns, options).sort((a, b) => b.localeCompare(a));
|
|
14791
14779
|
const removedFiles = files.map((file) => {
|
|
14792
|
-
file =
|
|
14780
|
+
file = path.resolve(cwd, file);
|
|
14793
14781
|
if (!force) {
|
|
14794
14782
|
safeCheck(file, cwd);
|
|
14795
14783
|
}
|
|
@@ -14806,8 +14794,8 @@ var require_del = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
14806
14794
|
var require_tempy = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
14807
14795
|
"../../node_modules/.pnpm/tempy@1.0.1/node_modules/tempy/index.js"(exports, module2) {
|
|
14808
14796
|
"use strict";
|
|
14809
|
-
var
|
|
14810
|
-
var
|
|
14797
|
+
var fs = (0, import_chunk_2ESYSVXG.__require)("fs");
|
|
14798
|
+
var path = (0, import_chunk_2ESYSVXG.__require)("path");
|
|
14811
14799
|
var uniqueString = require_unique_string();
|
|
14812
14800
|
var tempDir = require_temp_dir();
|
|
14813
14801
|
var isStream = require_is_stream();
|
|
@@ -14815,9 +14803,9 @@ var require_tempy = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
14815
14803
|
var stream = (0, import_chunk_2ESYSVXG.__require)("stream");
|
|
14816
14804
|
var { promisify } = (0, import_chunk_2ESYSVXG.__require)("util");
|
|
14817
14805
|
var pipeline = promisify(stream.pipeline);
|
|
14818
|
-
var { writeFile } =
|
|
14819
|
-
var getPath = (prefix = "") =>
|
|
14820
|
-
var writeStream = async (filePath, data) => pipeline(data,
|
|
14806
|
+
var { writeFile } = fs.promises;
|
|
14807
|
+
var getPath = (prefix = "") => path.join(tempDir, prefix + uniqueString());
|
|
14808
|
+
var writeStream = async (filePath, data) => pipeline(data, fs.createWriteStream(filePath));
|
|
14821
14809
|
var createTask = (tempyFunction, { extraArguments = 0 } = {}) => async (...arguments_) => {
|
|
14822
14810
|
const [callback, options] = arguments_.slice(extraArguments);
|
|
14823
14811
|
const result = await tempyFunction(...arguments_.slice(0, extraArguments), options);
|
|
@@ -14835,14 +14823,14 @@ var require_tempy = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
14835
14823
|
if (options.extension !== void 0 && options.extension !== null) {
|
|
14836
14824
|
throw new Error("The `name` and `extension` options are mutually exclusive");
|
|
14837
14825
|
}
|
|
14838
|
-
return
|
|
14826
|
+
return path.join(module2.exports.directory(), options.name);
|
|
14839
14827
|
}
|
|
14840
14828
|
return getPath() + (options.extension === void 0 || options.extension === null ? "" : "." + options.extension.replace(/^\./, ""));
|
|
14841
14829
|
};
|
|
14842
14830
|
module2.exports.file.task = createTask(module2.exports.file);
|
|
14843
14831
|
module2.exports.directory = ({ prefix = "" } = {}) => {
|
|
14844
14832
|
const directory = getPath(prefix);
|
|
14845
|
-
|
|
14833
|
+
fs.mkdirSync(directory);
|
|
14846
14834
|
return directory;
|
|
14847
14835
|
};
|
|
14848
14836
|
module2.exports.directory.task = createTask(module2.exports.directory);
|
|
@@ -14855,7 +14843,7 @@ var require_tempy = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
14855
14843
|
module2.exports.write.task = createTask(module2.exports.write, { extraArguments: 1 });
|
|
14856
14844
|
module2.exports.writeSync = (data, options) => {
|
|
14857
14845
|
const filename = module2.exports.file(options);
|
|
14858
|
-
|
|
14846
|
+
fs.writeFileSync(filename, data);
|
|
14859
14847
|
return filename;
|
|
14860
14848
|
};
|
|
14861
14849
|
Object.defineProperty(module2.exports, "root", {
|
|
@@ -14865,134 +14853,6 @@ var require_tempy = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
14865
14853
|
});
|
|
14866
14854
|
}
|
|
14867
14855
|
});
|
|
14868
|
-
var import_execa = (0, import_chunk_2ESYSVXG.__toESM)(require_execa());
|
|
14869
|
-
var import_fs_jetpack = (0, import_chunk_2ESYSVXG.__toESM)(require_main2());
|
|
14870
|
-
var import_tempy = (0, import_chunk_2ESYSVXG.__toESM)(require_tempy());
|
|
14871
|
-
var jestContext = {
|
|
14872
|
-
new: function(ctx = {}) {
|
|
14873
|
-
const c = ctx;
|
|
14874
|
-
beforeEach(() => {
|
|
14875
|
-
const originalCwd = process.cwd();
|
|
14876
|
-
c.mocked = c.mocked ?? {
|
|
14877
|
-
cwd: process.cwd()
|
|
14878
|
-
};
|
|
14879
|
-
c.tmpDir = import_tempy.default.directory();
|
|
14880
|
-
c.fs = import_fs_jetpack.default.cwd(c.tmpDir);
|
|
14881
|
-
c.tree = (startFrom = c.tmpDir, indent = "") => {
|
|
14882
|
-
function* generateDirectoryTree(children2, indent2 = "") {
|
|
14883
|
-
for (const child of children2) {
|
|
14884
|
-
if (child.name === "node_modules" || child.name === ".git") {
|
|
14885
|
-
continue;
|
|
14886
|
-
}
|
|
14887
|
-
if (child.type === "dir") {
|
|
14888
|
-
yield `${indent2}\u2514\u2500\u2500 ${child.name}/`;
|
|
14889
|
-
yield* generateDirectoryTree(child.children, indent2 + " ");
|
|
14890
|
-
} else if (child.type === "symlink") {
|
|
14891
|
-
yield `${indent2} -> ${child.relativePath}`;
|
|
14892
|
-
} else {
|
|
14893
|
-
yield `${indent2}\u2514\u2500\u2500 ${child.name}`;
|
|
14894
|
-
}
|
|
14895
|
-
}
|
|
14896
|
-
}
|
|
14897
|
-
const children = c.fs.inspectTree(startFrom, { relativePath: true, symlinks: "report" })?.children || [];
|
|
14898
|
-
return `
|
|
14899
|
-
${[...generateDirectoryTree(children, indent)].join("\n")}
|
|
14900
|
-
`;
|
|
14901
|
-
};
|
|
14902
|
-
c.fixture = (name) => {
|
|
14903
|
-
c.fs.copy(import_path.default.join(originalCwd, "src", "__tests__", "fixtures", name), ".", {
|
|
14904
|
-
overwrite: true
|
|
14905
|
-
});
|
|
14906
|
-
c.fs.symlink(import_path.default.join(originalCwd, "..", "client"), import_path.default.join(c.fs.cwd(), "node_modules", "@prisma", "client"));
|
|
14907
|
-
};
|
|
14908
|
-
c.cli = (...input) => {
|
|
14909
|
-
return import_execa.default.node(import_path.default.join(originalCwd, "../cli/build/index.js"), input, {
|
|
14910
|
-
cwd: c.fs.cwd(),
|
|
14911
|
-
stdio: "pipe",
|
|
14912
|
-
all: true
|
|
14913
|
-
});
|
|
14914
|
-
};
|
|
14915
|
-
c.printDir = (dir, extensions) => {
|
|
14916
|
-
const content = c.fs.list(dir) ?? [];
|
|
14917
|
-
content.sort((a, b) => a.localeCompare(b));
|
|
14918
|
-
return content.filter((name) => extensions.includes(import_path.default.extname(name))).map((name) => `${name}:
|
|
14919
|
-
|
|
14920
|
-
${c.fs.read(import_path.default.join(dir, name))}`).join("\n\n");
|
|
14921
|
-
};
|
|
14922
|
-
process.chdir(c.tmpDir);
|
|
14923
|
-
});
|
|
14924
|
-
afterEach(() => {
|
|
14925
|
-
process.chdir(c.mocked.cwd);
|
|
14926
|
-
});
|
|
14927
|
-
return factory(ctx);
|
|
14928
|
-
}
|
|
14929
|
-
};
|
|
14930
|
-
function factory(ctx) {
|
|
14931
|
-
return {
|
|
14932
|
-
add(contextContributor) {
|
|
14933
|
-
const newCtx = contextContributor(ctx);
|
|
14934
|
-
return factory(newCtx);
|
|
14935
|
-
},
|
|
14936
|
-
assemble() {
|
|
14937
|
-
return ctx;
|
|
14938
|
-
}
|
|
14939
|
-
};
|
|
14940
|
-
}
|
|
14941
|
-
var jestConsoleContext = () => (c) => {
|
|
14942
|
-
const ctx = c;
|
|
14943
|
-
beforeEach(() => {
|
|
14944
|
-
ctx.mocked["console.error"] = jest.spyOn(console, "error").mockImplementation(() => {
|
|
14945
|
-
});
|
|
14946
|
-
ctx.mocked["console.log"] = jest.spyOn(console, "log").mockImplementation(() => {
|
|
14947
|
-
});
|
|
14948
|
-
ctx.mocked["console.info"] = jest.spyOn(console, "info").mockImplementation(() => {
|
|
14949
|
-
});
|
|
14950
|
-
ctx.mocked["console.warn"] = jest.spyOn(console, "warn").mockImplementation(() => {
|
|
14951
|
-
});
|
|
14952
|
-
});
|
|
14953
|
-
afterEach(() => {
|
|
14954
|
-
ctx.mocked["console.error"].mockRestore();
|
|
14955
|
-
ctx.mocked["console.log"].mockRestore();
|
|
14956
|
-
ctx.mocked["console.info"].mockRestore();
|
|
14957
|
-
ctx.mocked["console.warn"].mockRestore();
|
|
14958
|
-
});
|
|
14959
|
-
return ctx;
|
|
14960
|
-
};
|
|
14961
|
-
var jestStdoutContext = ({ normalizationRules } = { normalizationRules: [] }) => (c) => {
|
|
14962
|
-
const ctx = c;
|
|
14963
|
-
const normalize = (text, rules) => {
|
|
14964
|
-
for (const [pattern, replacement] of rules) {
|
|
14965
|
-
text = text.replace(pattern, replacement);
|
|
14966
|
-
}
|
|
14967
|
-
return text;
|
|
14968
|
-
};
|
|
14969
|
-
beforeEach(() => {
|
|
14970
|
-
ctx.mocked["process.stderr.write"] = jest.spyOn(process.stderr, "write").mockImplementation(() => true);
|
|
14971
|
-
ctx.mocked["process.stdout.write"] = jest.spyOn(process.stdout, "write").mockImplementation(() => true);
|
|
14972
|
-
ctx.normalizedCapturedStdout = () => normalize(ctx.mocked["process.stdout.write"].mock.calls.join(""), normalizationRules);
|
|
14973
|
-
ctx.normalizedCapturedStderr = () => normalize(ctx.mocked["process.stderr.write"].mock.calls.join(""), normalizationRules);
|
|
14974
|
-
ctx.clearCapturedStdout = () => ctx.mocked["process.stdout.write"].mockClear();
|
|
14975
|
-
ctx.clearCapturedStderr = () => ctx.mocked["process.stderr.write"].mockClear();
|
|
14976
|
-
});
|
|
14977
|
-
afterEach(() => {
|
|
14978
|
-
ctx.mocked["process.stderr.write"].mockRestore();
|
|
14979
|
-
ctx.mocked["process.stdout.write"].mockRestore();
|
|
14980
|
-
});
|
|
14981
|
-
return ctx;
|
|
14982
|
-
};
|
|
14983
|
-
var processExitContext = () => (c) => {
|
|
14984
|
-
const ctx = c;
|
|
14985
|
-
beforeEach(() => {
|
|
14986
|
-
ctx.mocked["process.exit"] = jest.spyOn(process, "exit").mockImplementation((number) => {
|
|
14987
|
-
throw new Error("process.exit: " + number);
|
|
14988
|
-
});
|
|
14989
|
-
ctx.recordedExitCode = () => ctx.mocked["process.exit"].mock.calls[0]?.[0];
|
|
14990
|
-
});
|
|
14991
|
-
afterEach(() => {
|
|
14992
|
-
ctx.mocked["process.exit"].mockRestore();
|
|
14993
|
-
});
|
|
14994
|
-
return ctx;
|
|
14995
|
-
};
|
|
14996
14856
|
/*! Bundled license information:
|
|
14997
14857
|
|
|
14998
14858
|
is-extglob/index.js:
|