@prisma/fetch-engine 6.5.0-integration-feat-get-rid-of-patches.1 → 6.5.0
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/BinaryType.js +1 -1
- package/dist/chmodPlusX.js +1 -1
- package/dist/{chunk-XSNM3AMV.js → chunk-7QDSDNVI.js} +81 -81
- package/dist/{chunk-TIRVZJHP.js → chunk-EQBIW23N.js} +44 -44
- package/dist/{chunk-4LX3XBNY.js → chunk-FXSJF4XA.js} +7 -7
- package/dist/chunk-MSGI7ABO.js +7483 -0
- package/dist/{chunk-AH6QHEOA.js → chunk-OSFPEEC6.js} +17 -3
- package/dist/{chunk-FAWNAZS6.js → chunk-PFE2F67S.js} +82 -82
- package/dist/{chunk-ORVVLJ4G.js → chunk-QWMYWBXN.js} +2728 -182
- package/dist/{chunk-ZSBPBV34.js → chunk-S3LWA4WZ.js} +40 -40
- package/dist/{chunk-I3P4GT6A.js → chunk-SXLYQ75W.js} +9 -12
- package/dist/{chunk-HACCWU3B.js → chunk-TEEFYD2G.js} +60 -60
- package/dist/cleanupCache.js +5 -5
- package/dist/download.js +15 -15
- package/dist/downloadZip.js +7 -7
- package/dist/env.js +1 -1
- package/dist/getHash.js +1 -1
- package/dist/getProxyAgent.js +3 -3
- package/dist/index.js +18 -18
- package/dist/log.js +3 -3
- package/dist/{multipart-parser-ITART6UP.js → multipart-parser-54WEFGGN.js} +7 -7
- package/dist/utils.js +6 -6
- package/package.json +5 -5
- package/dist/chunk-ZAFWMCVK.js +0 -2796
package/dist/chunk-ZAFWMCVK.js
DELETED
@@ -1,2796 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __defProp = Object.defineProperty;
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
6
|
-
var __export = (target, all) => {
|
7
|
-
for (var name in all)
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
9
|
-
};
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
12
|
-
for (let key of __getOwnPropNames(from))
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
15
|
-
}
|
16
|
-
return to;
|
17
|
-
};
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
19
|
-
var chunk_ZAFWMCVK_exports = {};
|
20
|
-
__export(chunk_ZAFWMCVK_exports, {
|
21
|
-
require_p_map: () => require_p_map,
|
22
|
-
require_rimraf: () => require_rimraf
|
23
|
-
});
|
24
|
-
module.exports = __toCommonJS(chunk_ZAFWMCVK_exports);
|
25
|
-
var import_chunk_AH6QHEOA = require("./chunk-AH6QHEOA.js");
|
26
|
-
var require_indent_string = (0, import_chunk_AH6QHEOA.__commonJS)({
|
27
|
-
"../../node_modules/.pnpm/indent-string@4.0.0/node_modules/indent-string/index.js"(exports, module2) {
|
28
|
-
"use strict";
|
29
|
-
module2.exports = (string, count = 1, options) => {
|
30
|
-
options = {
|
31
|
-
indent: " ",
|
32
|
-
includeEmptyLines: false,
|
33
|
-
...options
|
34
|
-
};
|
35
|
-
if (typeof string !== "string") {
|
36
|
-
throw new TypeError(
|
37
|
-
`Expected \`input\` to be a \`string\`, got \`${typeof string}\``
|
38
|
-
);
|
39
|
-
}
|
40
|
-
if (typeof count !== "number") {
|
41
|
-
throw new TypeError(
|
42
|
-
`Expected \`count\` to be a \`number\`, got \`${typeof count}\``
|
43
|
-
);
|
44
|
-
}
|
45
|
-
if (typeof options.indent !== "string") {
|
46
|
-
throw new TypeError(
|
47
|
-
`Expected \`options.indent\` to be a \`string\`, got \`${typeof options.indent}\``
|
48
|
-
);
|
49
|
-
}
|
50
|
-
if (count === 0) {
|
51
|
-
return string;
|
52
|
-
}
|
53
|
-
const regex = options.includeEmptyLines ? /^/gm : /^(?!\s*$)/gm;
|
54
|
-
return string.replace(regex, options.indent.repeat(count));
|
55
|
-
};
|
56
|
-
}
|
57
|
-
});
|
58
|
-
var require_clean_stack = (0, import_chunk_AH6QHEOA.__commonJS)({
|
59
|
-
"../../node_modules/.pnpm/clean-stack@2.2.0/node_modules/clean-stack/index.js"(exports, module2) {
|
60
|
-
"use strict";
|
61
|
-
var os = (0, import_chunk_AH6QHEOA.__require)("os");
|
62
|
-
var extractPathRegex = /\s+at.*(?:\(|\s)(.*)\)?/;
|
63
|
-
var pathRegex = /^(?:(?:(?:node|(?:internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)\.js:\d+:\d+)|native)/;
|
64
|
-
var homeDir = typeof os.homedir === "undefined" ? "" : os.homedir();
|
65
|
-
module2.exports = (stack, options) => {
|
66
|
-
options = Object.assign({ pretty: false }, options);
|
67
|
-
return stack.replace(/\\/g, "/").split("\n").filter((line) => {
|
68
|
-
const pathMatches = line.match(extractPathRegex);
|
69
|
-
if (pathMatches === null || !pathMatches[1]) {
|
70
|
-
return true;
|
71
|
-
}
|
72
|
-
const match = pathMatches[1];
|
73
|
-
if (match.includes(".app/Contents/Resources/electron.asar") || match.includes(".app/Contents/Resources/default_app.asar")) {
|
74
|
-
return false;
|
75
|
-
}
|
76
|
-
return !pathRegex.test(match);
|
77
|
-
}).filter((line) => line.trim() !== "").map((line) => {
|
78
|
-
if (options.pretty) {
|
79
|
-
return line.replace(extractPathRegex, (m, p1) => m.replace(p1, p1.replace(homeDir, "~")));
|
80
|
-
}
|
81
|
-
return line;
|
82
|
-
}).join("\n");
|
83
|
-
};
|
84
|
-
}
|
85
|
-
});
|
86
|
-
var require_aggregate_error = (0, import_chunk_AH6QHEOA.__commonJS)({
|
87
|
-
"../../node_modules/.pnpm/aggregate-error@3.1.0/node_modules/aggregate-error/index.js"(exports, module2) {
|
88
|
-
"use strict";
|
89
|
-
var indentString = require_indent_string();
|
90
|
-
var cleanStack = require_clean_stack();
|
91
|
-
var cleanInternalStack = (stack) => stack.replace(/\s+at .*aggregate-error\/index.js:\d+:\d+\)?/g, "");
|
92
|
-
var AggregateError = class extends Error {
|
93
|
-
constructor(errors) {
|
94
|
-
if (!Array.isArray(errors)) {
|
95
|
-
throw new TypeError(`Expected input to be an Array, got ${typeof errors}`);
|
96
|
-
}
|
97
|
-
errors = [...errors].map((error) => {
|
98
|
-
if (error instanceof Error) {
|
99
|
-
return error;
|
100
|
-
}
|
101
|
-
if (error !== null && typeof error === "object") {
|
102
|
-
return Object.assign(new Error(error.message), error);
|
103
|
-
}
|
104
|
-
return new Error(error);
|
105
|
-
});
|
106
|
-
let message = errors.map((error) => {
|
107
|
-
return typeof error.stack === "string" ? cleanInternalStack(cleanStack(error.stack)) : String(error);
|
108
|
-
}).join("\n");
|
109
|
-
message = "\n" + indentString(message, 4);
|
110
|
-
super(message);
|
111
|
-
this.name = "AggregateError";
|
112
|
-
Object.defineProperty(this, "_errors", { value: errors });
|
113
|
-
}
|
114
|
-
*[Symbol.iterator]() {
|
115
|
-
for (const error of this._errors) {
|
116
|
-
yield error;
|
117
|
-
}
|
118
|
-
}
|
119
|
-
};
|
120
|
-
module2.exports = AggregateError;
|
121
|
-
}
|
122
|
-
});
|
123
|
-
var require_p_map = (0, import_chunk_AH6QHEOA.__commonJS)({
|
124
|
-
"../../node_modules/.pnpm/p-map@4.0.0/node_modules/p-map/index.js"(exports, module2) {
|
125
|
-
"use strict";
|
126
|
-
var AggregateError = require_aggregate_error();
|
127
|
-
module2.exports = async (iterable, mapper, {
|
128
|
-
concurrency = Infinity,
|
129
|
-
stopOnError = true
|
130
|
-
} = {}) => {
|
131
|
-
return new Promise((resolve, reject) => {
|
132
|
-
if (typeof mapper !== "function") {
|
133
|
-
throw new TypeError("Mapper function is required");
|
134
|
-
}
|
135
|
-
if (!((Number.isSafeInteger(concurrency) || concurrency === Infinity) && concurrency >= 1)) {
|
136
|
-
throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${concurrency}\` (${typeof concurrency})`);
|
137
|
-
}
|
138
|
-
const result = [];
|
139
|
-
const errors = [];
|
140
|
-
const iterator = iterable[Symbol.iterator]();
|
141
|
-
let isRejected = false;
|
142
|
-
let isIterableDone = false;
|
143
|
-
let resolvingCount = 0;
|
144
|
-
let currentIndex = 0;
|
145
|
-
const next = () => {
|
146
|
-
if (isRejected) {
|
147
|
-
return;
|
148
|
-
}
|
149
|
-
const nextItem = iterator.next();
|
150
|
-
const index = currentIndex;
|
151
|
-
currentIndex++;
|
152
|
-
if (nextItem.done) {
|
153
|
-
isIterableDone = true;
|
154
|
-
if (resolvingCount === 0) {
|
155
|
-
if (!stopOnError && errors.length !== 0) {
|
156
|
-
reject(new AggregateError(errors));
|
157
|
-
} else {
|
158
|
-
resolve(result);
|
159
|
-
}
|
160
|
-
}
|
161
|
-
return;
|
162
|
-
}
|
163
|
-
resolvingCount++;
|
164
|
-
(async () => {
|
165
|
-
try {
|
166
|
-
const element = await nextItem.value;
|
167
|
-
result[index] = await mapper(element, index);
|
168
|
-
resolvingCount--;
|
169
|
-
next();
|
170
|
-
} catch (error) {
|
171
|
-
if (stopOnError) {
|
172
|
-
isRejected = true;
|
173
|
-
reject(error);
|
174
|
-
} else {
|
175
|
-
errors.push(error);
|
176
|
-
resolvingCount--;
|
177
|
-
next();
|
178
|
-
}
|
179
|
-
}
|
180
|
-
})();
|
181
|
-
};
|
182
|
-
for (let i = 0; i < concurrency; i++) {
|
183
|
-
next();
|
184
|
-
if (isIterableDone) {
|
185
|
-
break;
|
186
|
-
}
|
187
|
-
}
|
188
|
-
});
|
189
|
-
};
|
190
|
-
}
|
191
|
-
});
|
192
|
-
var require_old = (0, import_chunk_AH6QHEOA.__commonJS)({
|
193
|
-
"../../node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/old.js"(exports) {
|
194
|
-
"use strict";
|
195
|
-
var pathModule = (0, import_chunk_AH6QHEOA.__require)("path");
|
196
|
-
var isWindows = process.platform === "win32";
|
197
|
-
var fs = (0, import_chunk_AH6QHEOA.__require)("fs");
|
198
|
-
var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG);
|
199
|
-
function rethrow() {
|
200
|
-
var callback;
|
201
|
-
if (DEBUG) {
|
202
|
-
var backtrace = new Error();
|
203
|
-
callback = debugCallback;
|
204
|
-
} else
|
205
|
-
callback = missingCallback;
|
206
|
-
return callback;
|
207
|
-
function debugCallback(err) {
|
208
|
-
if (err) {
|
209
|
-
backtrace.message = err.message;
|
210
|
-
err = backtrace;
|
211
|
-
missingCallback(err);
|
212
|
-
}
|
213
|
-
}
|
214
|
-
function missingCallback(err) {
|
215
|
-
if (err) {
|
216
|
-
if (process.throwDeprecation)
|
217
|
-
throw err;
|
218
|
-
else if (!process.noDeprecation) {
|
219
|
-
var msg = "fs: missing callback " + (err.stack || err.message);
|
220
|
-
if (process.traceDeprecation)
|
221
|
-
console.trace(msg);
|
222
|
-
else
|
223
|
-
console.error(msg);
|
224
|
-
}
|
225
|
-
}
|
226
|
-
}
|
227
|
-
}
|
228
|
-
function maybeCallback(cb) {
|
229
|
-
return typeof cb === "function" ? cb : rethrow();
|
230
|
-
}
|
231
|
-
var normalize = pathModule.normalize;
|
232
|
-
if (isWindows) {
|
233
|
-
nextPartRe = /(.*?)(?:[\/\\]+|$)/g;
|
234
|
-
} else {
|
235
|
-
nextPartRe = /(.*?)(?:[\/]+|$)/g;
|
236
|
-
}
|
237
|
-
var nextPartRe;
|
238
|
-
if (isWindows) {
|
239
|
-
splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/;
|
240
|
-
} else {
|
241
|
-
splitRootRe = /^[\/]*/;
|
242
|
-
}
|
243
|
-
var splitRootRe;
|
244
|
-
exports.realpathSync = function realpathSync(p, cache) {
|
245
|
-
p = pathModule.resolve(p);
|
246
|
-
if (cache && Object.prototype.hasOwnProperty.call(cache, p)) {
|
247
|
-
return cache[p];
|
248
|
-
}
|
249
|
-
var original = p, seenLinks = {}, knownHard = {};
|
250
|
-
var pos;
|
251
|
-
var current;
|
252
|
-
var base;
|
253
|
-
var previous;
|
254
|
-
start();
|
255
|
-
function start() {
|
256
|
-
var m = splitRootRe.exec(p);
|
257
|
-
pos = m[0].length;
|
258
|
-
current = m[0];
|
259
|
-
base = m[0];
|
260
|
-
previous = "";
|
261
|
-
if (isWindows && !knownHard[base]) {
|
262
|
-
fs.lstatSync(base);
|
263
|
-
knownHard[base] = true;
|
264
|
-
}
|
265
|
-
}
|
266
|
-
while (pos < p.length) {
|
267
|
-
nextPartRe.lastIndex = pos;
|
268
|
-
var result = nextPartRe.exec(p);
|
269
|
-
previous = current;
|
270
|
-
current += result[0];
|
271
|
-
base = previous + result[1];
|
272
|
-
pos = nextPartRe.lastIndex;
|
273
|
-
if (knownHard[base] || cache && cache[base] === base) {
|
274
|
-
continue;
|
275
|
-
}
|
276
|
-
var resolvedLink;
|
277
|
-
if (cache && Object.prototype.hasOwnProperty.call(cache, base)) {
|
278
|
-
resolvedLink = cache[base];
|
279
|
-
} else {
|
280
|
-
var stat = fs.lstatSync(base);
|
281
|
-
if (!stat.isSymbolicLink()) {
|
282
|
-
knownHard[base] = true;
|
283
|
-
if (cache) cache[base] = base;
|
284
|
-
continue;
|
285
|
-
}
|
286
|
-
var linkTarget = null;
|
287
|
-
if (!isWindows) {
|
288
|
-
var id = stat.dev.toString(32) + ":" + stat.ino.toString(32);
|
289
|
-
if (seenLinks.hasOwnProperty(id)) {
|
290
|
-
linkTarget = seenLinks[id];
|
291
|
-
}
|
292
|
-
}
|
293
|
-
if (linkTarget === null) {
|
294
|
-
fs.statSync(base);
|
295
|
-
linkTarget = fs.readlinkSync(base);
|
296
|
-
}
|
297
|
-
resolvedLink = pathModule.resolve(previous, linkTarget);
|
298
|
-
if (cache) cache[base] = resolvedLink;
|
299
|
-
if (!isWindows) seenLinks[id] = linkTarget;
|
300
|
-
}
|
301
|
-
p = pathModule.resolve(resolvedLink, p.slice(pos));
|
302
|
-
start();
|
303
|
-
}
|
304
|
-
if (cache) cache[original] = p;
|
305
|
-
return p;
|
306
|
-
};
|
307
|
-
exports.realpath = function realpath(p, cache, cb) {
|
308
|
-
if (typeof cb !== "function") {
|
309
|
-
cb = maybeCallback(cache);
|
310
|
-
cache = null;
|
311
|
-
}
|
312
|
-
p = pathModule.resolve(p);
|
313
|
-
if (cache && Object.prototype.hasOwnProperty.call(cache, p)) {
|
314
|
-
return process.nextTick(cb.bind(null, null, cache[p]));
|
315
|
-
}
|
316
|
-
var original = p, seenLinks = {}, knownHard = {};
|
317
|
-
var pos;
|
318
|
-
var current;
|
319
|
-
var base;
|
320
|
-
var previous;
|
321
|
-
start();
|
322
|
-
function start() {
|
323
|
-
var m = splitRootRe.exec(p);
|
324
|
-
pos = m[0].length;
|
325
|
-
current = m[0];
|
326
|
-
base = m[0];
|
327
|
-
previous = "";
|
328
|
-
if (isWindows && !knownHard[base]) {
|
329
|
-
fs.lstat(base, function(err) {
|
330
|
-
if (err) return cb(err);
|
331
|
-
knownHard[base] = true;
|
332
|
-
LOOP();
|
333
|
-
});
|
334
|
-
} else {
|
335
|
-
process.nextTick(LOOP);
|
336
|
-
}
|
337
|
-
}
|
338
|
-
function LOOP() {
|
339
|
-
if (pos >= p.length) {
|
340
|
-
if (cache) cache[original] = p;
|
341
|
-
return cb(null, p);
|
342
|
-
}
|
343
|
-
nextPartRe.lastIndex = pos;
|
344
|
-
var result = nextPartRe.exec(p);
|
345
|
-
previous = current;
|
346
|
-
current += result[0];
|
347
|
-
base = previous + result[1];
|
348
|
-
pos = nextPartRe.lastIndex;
|
349
|
-
if (knownHard[base] || cache && cache[base] === base) {
|
350
|
-
return process.nextTick(LOOP);
|
351
|
-
}
|
352
|
-
if (cache && Object.prototype.hasOwnProperty.call(cache, base)) {
|
353
|
-
return gotResolvedLink(cache[base]);
|
354
|
-
}
|
355
|
-
return fs.lstat(base, gotStat);
|
356
|
-
}
|
357
|
-
function gotStat(err, stat) {
|
358
|
-
if (err) return cb(err);
|
359
|
-
if (!stat.isSymbolicLink()) {
|
360
|
-
knownHard[base] = true;
|
361
|
-
if (cache) cache[base] = base;
|
362
|
-
return process.nextTick(LOOP);
|
363
|
-
}
|
364
|
-
if (!isWindows) {
|
365
|
-
var id = stat.dev.toString(32) + ":" + stat.ino.toString(32);
|
366
|
-
if (seenLinks.hasOwnProperty(id)) {
|
367
|
-
return gotTarget(null, seenLinks[id], base);
|
368
|
-
}
|
369
|
-
}
|
370
|
-
fs.stat(base, function(err2) {
|
371
|
-
if (err2) return cb(err2);
|
372
|
-
fs.readlink(base, function(err3, target) {
|
373
|
-
if (!isWindows) seenLinks[id] = target;
|
374
|
-
gotTarget(err3, target);
|
375
|
-
});
|
376
|
-
});
|
377
|
-
}
|
378
|
-
function gotTarget(err, target, base2) {
|
379
|
-
if (err) return cb(err);
|
380
|
-
var resolvedLink = pathModule.resolve(previous, target);
|
381
|
-
if (cache) cache[base2] = resolvedLink;
|
382
|
-
gotResolvedLink(resolvedLink);
|
383
|
-
}
|
384
|
-
function gotResolvedLink(resolvedLink) {
|
385
|
-
p = pathModule.resolve(resolvedLink, p.slice(pos));
|
386
|
-
start();
|
387
|
-
}
|
388
|
-
};
|
389
|
-
}
|
390
|
-
});
|
391
|
-
var require_fs = (0, import_chunk_AH6QHEOA.__commonJS)({
|
392
|
-
"../../node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/index.js"(exports, module2) {
|
393
|
-
"use strict";
|
394
|
-
module2.exports = realpath;
|
395
|
-
realpath.realpath = realpath;
|
396
|
-
realpath.sync = realpathSync;
|
397
|
-
realpath.realpathSync = realpathSync;
|
398
|
-
realpath.monkeypatch = monkeypatch;
|
399
|
-
realpath.unmonkeypatch = unmonkeypatch;
|
400
|
-
var fs = (0, import_chunk_AH6QHEOA.__require)("fs");
|
401
|
-
var origRealpath = fs.realpath;
|
402
|
-
var origRealpathSync = fs.realpathSync;
|
403
|
-
var version = process.version;
|
404
|
-
var ok = /^v[0-5]\./.test(version);
|
405
|
-
var old = require_old();
|
406
|
-
function newError(er) {
|
407
|
-
return er && er.syscall === "realpath" && (er.code === "ELOOP" || er.code === "ENOMEM" || er.code === "ENAMETOOLONG");
|
408
|
-
}
|
409
|
-
function realpath(p, cache, cb) {
|
410
|
-
if (ok) {
|
411
|
-
return origRealpath(p, cache, cb);
|
412
|
-
}
|
413
|
-
if (typeof cache === "function") {
|
414
|
-
cb = cache;
|
415
|
-
cache = null;
|
416
|
-
}
|
417
|
-
origRealpath(p, cache, function(er, result) {
|
418
|
-
if (newError(er)) {
|
419
|
-
old.realpath(p, cache, cb);
|
420
|
-
} else {
|
421
|
-
cb(er, result);
|
422
|
-
}
|
423
|
-
});
|
424
|
-
}
|
425
|
-
function realpathSync(p, cache) {
|
426
|
-
if (ok) {
|
427
|
-
return origRealpathSync(p, cache);
|
428
|
-
}
|
429
|
-
try {
|
430
|
-
return origRealpathSync(p, cache);
|
431
|
-
} catch (er) {
|
432
|
-
if (newError(er)) {
|
433
|
-
return old.realpathSync(p, cache);
|
434
|
-
} else {
|
435
|
-
throw er;
|
436
|
-
}
|
437
|
-
}
|
438
|
-
}
|
439
|
-
function monkeypatch() {
|
440
|
-
fs.realpath = realpath;
|
441
|
-
fs.realpathSync = realpathSync;
|
442
|
-
}
|
443
|
-
function unmonkeypatch() {
|
444
|
-
fs.realpath = origRealpath;
|
445
|
-
fs.realpathSync = origRealpathSync;
|
446
|
-
}
|
447
|
-
}
|
448
|
-
});
|
449
|
-
var require_concat_map = (0, import_chunk_AH6QHEOA.__commonJS)({
|
450
|
-
"../../node_modules/.pnpm/concat-map@0.0.1/node_modules/concat-map/index.js"(exports, module2) {
|
451
|
-
"use strict";
|
452
|
-
module2.exports = function(xs, fn) {
|
453
|
-
var res = [];
|
454
|
-
for (var i = 0; i < xs.length; i++) {
|
455
|
-
var x = fn(xs[i], i);
|
456
|
-
if (isArray(x)) res.push.apply(res, x);
|
457
|
-
else res.push(x);
|
458
|
-
}
|
459
|
-
return res;
|
460
|
-
};
|
461
|
-
var isArray = Array.isArray || function(xs) {
|
462
|
-
return Object.prototype.toString.call(xs) === "[object Array]";
|
463
|
-
};
|
464
|
-
}
|
465
|
-
});
|
466
|
-
var require_balanced_match = (0, import_chunk_AH6QHEOA.__commonJS)({
|
467
|
-
"../../node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/index.js"(exports, module2) {
|
468
|
-
"use strict";
|
469
|
-
module2.exports = balanced;
|
470
|
-
function balanced(a, b, str) {
|
471
|
-
if (a instanceof RegExp) a = maybeMatch(a, str);
|
472
|
-
if (b instanceof RegExp) b = maybeMatch(b, str);
|
473
|
-
var r = range(a, b, str);
|
474
|
-
return r && {
|
475
|
-
start: r[0],
|
476
|
-
end: r[1],
|
477
|
-
pre: str.slice(0, r[0]),
|
478
|
-
body: str.slice(r[0] + a.length, r[1]),
|
479
|
-
post: str.slice(r[1] + b.length)
|
480
|
-
};
|
481
|
-
}
|
482
|
-
function maybeMatch(reg, str) {
|
483
|
-
var m = str.match(reg);
|
484
|
-
return m ? m[0] : null;
|
485
|
-
}
|
486
|
-
balanced.range = range;
|
487
|
-
function range(a, b, str) {
|
488
|
-
var begs, beg, left, right, result;
|
489
|
-
var ai = str.indexOf(a);
|
490
|
-
var bi = str.indexOf(b, ai + 1);
|
491
|
-
var i = ai;
|
492
|
-
if (ai >= 0 && bi > 0) {
|
493
|
-
if (a === b) {
|
494
|
-
return [ai, bi];
|
495
|
-
}
|
496
|
-
begs = [];
|
497
|
-
left = str.length;
|
498
|
-
while (i >= 0 && !result) {
|
499
|
-
if (i == ai) {
|
500
|
-
begs.push(i);
|
501
|
-
ai = str.indexOf(a, i + 1);
|
502
|
-
} else if (begs.length == 1) {
|
503
|
-
result = [begs.pop(), bi];
|
504
|
-
} else {
|
505
|
-
beg = begs.pop();
|
506
|
-
if (beg < left) {
|
507
|
-
left = beg;
|
508
|
-
right = bi;
|
509
|
-
}
|
510
|
-
bi = str.indexOf(b, i + 1);
|
511
|
-
}
|
512
|
-
i = ai < bi && ai >= 0 ? ai : bi;
|
513
|
-
}
|
514
|
-
if (begs.length) {
|
515
|
-
result = [left, right];
|
516
|
-
}
|
517
|
-
}
|
518
|
-
return result;
|
519
|
-
}
|
520
|
-
}
|
521
|
-
});
|
522
|
-
var require_brace_expansion = (0, import_chunk_AH6QHEOA.__commonJS)({
|
523
|
-
"../../node_modules/.pnpm/brace-expansion@1.1.11/node_modules/brace-expansion/index.js"(exports, module2) {
|
524
|
-
"use strict";
|
525
|
-
var concatMap = require_concat_map();
|
526
|
-
var balanced = require_balanced_match();
|
527
|
-
module2.exports = expandTop;
|
528
|
-
var escSlash = "\0SLASH" + Math.random() + "\0";
|
529
|
-
var escOpen = "\0OPEN" + Math.random() + "\0";
|
530
|
-
var escClose = "\0CLOSE" + Math.random() + "\0";
|
531
|
-
var escComma = "\0COMMA" + Math.random() + "\0";
|
532
|
-
var escPeriod = "\0PERIOD" + Math.random() + "\0";
|
533
|
-
function numeric(str) {
|
534
|
-
return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0);
|
535
|
-
}
|
536
|
-
function escapeBraces(str) {
|
537
|
-
return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod);
|
538
|
-
}
|
539
|
-
function unescapeBraces(str) {
|
540
|
-
return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join(".");
|
541
|
-
}
|
542
|
-
function parseCommaParts(str) {
|
543
|
-
if (!str)
|
544
|
-
return [""];
|
545
|
-
var parts = [];
|
546
|
-
var m = balanced("{", "}", str);
|
547
|
-
if (!m)
|
548
|
-
return str.split(",");
|
549
|
-
var pre = m.pre;
|
550
|
-
var body = m.body;
|
551
|
-
var post = m.post;
|
552
|
-
var p = pre.split(",");
|
553
|
-
p[p.length - 1] += "{" + body + "}";
|
554
|
-
var postParts = parseCommaParts(post);
|
555
|
-
if (post.length) {
|
556
|
-
p[p.length - 1] += postParts.shift();
|
557
|
-
p.push.apply(p, postParts);
|
558
|
-
}
|
559
|
-
parts.push.apply(parts, p);
|
560
|
-
return parts;
|
561
|
-
}
|
562
|
-
function expandTop(str) {
|
563
|
-
if (!str)
|
564
|
-
return [];
|
565
|
-
if (str.substr(0, 2) === "{}") {
|
566
|
-
str = "\\{\\}" + str.substr(2);
|
567
|
-
}
|
568
|
-
return expand(escapeBraces(str), true).map(unescapeBraces);
|
569
|
-
}
|
570
|
-
function embrace(str) {
|
571
|
-
return "{" + str + "}";
|
572
|
-
}
|
573
|
-
function isPadded(el) {
|
574
|
-
return /^-?0\d/.test(el);
|
575
|
-
}
|
576
|
-
function lte(i, y) {
|
577
|
-
return i <= y;
|
578
|
-
}
|
579
|
-
function gte(i, y) {
|
580
|
-
return i >= y;
|
581
|
-
}
|
582
|
-
function expand(str, isTop) {
|
583
|
-
var expansions = [];
|
584
|
-
var m = balanced("{", "}", str);
|
585
|
-
if (!m || /\$$/.test(m.pre)) return [str];
|
586
|
-
var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
|
587
|
-
var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
|
588
|
-
var isSequence = isNumericSequence || isAlphaSequence;
|
589
|
-
var isOptions = m.body.indexOf(",") >= 0;
|
590
|
-
if (!isSequence && !isOptions) {
|
591
|
-
if (m.post.match(/,.*\}/)) {
|
592
|
-
str = m.pre + "{" + m.body + escClose + m.post;
|
593
|
-
return expand(str);
|
594
|
-
}
|
595
|
-
return [str];
|
596
|
-
}
|
597
|
-
var n;
|
598
|
-
if (isSequence) {
|
599
|
-
n = m.body.split(/\.\./);
|
600
|
-
} else {
|
601
|
-
n = parseCommaParts(m.body);
|
602
|
-
if (n.length === 1) {
|
603
|
-
n = expand(n[0], false).map(embrace);
|
604
|
-
if (n.length === 1) {
|
605
|
-
var post = m.post.length ? expand(m.post, false) : [""];
|
606
|
-
return post.map(function(p) {
|
607
|
-
return m.pre + n[0] + p;
|
608
|
-
});
|
609
|
-
}
|
610
|
-
}
|
611
|
-
}
|
612
|
-
var pre = m.pre;
|
613
|
-
var post = m.post.length ? expand(m.post, false) : [""];
|
614
|
-
var N;
|
615
|
-
if (isSequence) {
|
616
|
-
var x = numeric(n[0]);
|
617
|
-
var y = numeric(n[1]);
|
618
|
-
var width = Math.max(n[0].length, n[1].length);
|
619
|
-
var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1;
|
620
|
-
var test = lte;
|
621
|
-
var reverse = y < x;
|
622
|
-
if (reverse) {
|
623
|
-
incr *= -1;
|
624
|
-
test = gte;
|
625
|
-
}
|
626
|
-
var pad = n.some(isPadded);
|
627
|
-
N = [];
|
628
|
-
for (var i = x; test(i, y); i += incr) {
|
629
|
-
var c;
|
630
|
-
if (isAlphaSequence) {
|
631
|
-
c = String.fromCharCode(i);
|
632
|
-
if (c === "\\")
|
633
|
-
c = "";
|
634
|
-
} else {
|
635
|
-
c = String(i);
|
636
|
-
if (pad) {
|
637
|
-
var need = width - c.length;
|
638
|
-
if (need > 0) {
|
639
|
-
var z = new Array(need + 1).join("0");
|
640
|
-
if (i < 0)
|
641
|
-
c = "-" + z + c.slice(1);
|
642
|
-
else
|
643
|
-
c = z + c;
|
644
|
-
}
|
645
|
-
}
|
646
|
-
}
|
647
|
-
N.push(c);
|
648
|
-
}
|
649
|
-
} else {
|
650
|
-
N = concatMap(n, function(el) {
|
651
|
-
return expand(el, false);
|
652
|
-
});
|
653
|
-
}
|
654
|
-
for (var j = 0; j < N.length; j++) {
|
655
|
-
for (var k = 0; k < post.length; k++) {
|
656
|
-
var expansion = pre + N[j] + post[k];
|
657
|
-
if (!isTop || isSequence || expansion)
|
658
|
-
expansions.push(expansion);
|
659
|
-
}
|
660
|
-
}
|
661
|
-
return expansions;
|
662
|
-
}
|
663
|
-
}
|
664
|
-
});
|
665
|
-
var require_minimatch = (0, import_chunk_AH6QHEOA.__commonJS)({
|
666
|
-
"../../node_modules/.pnpm/minimatch@3.1.2/node_modules/minimatch/minimatch.js"(exports, module2) {
|
667
|
-
"use strict";
|
668
|
-
module2.exports = minimatch;
|
669
|
-
minimatch.Minimatch = Minimatch;
|
670
|
-
var path = function() {
|
671
|
-
try {
|
672
|
-
return (0, import_chunk_AH6QHEOA.__require)("path");
|
673
|
-
} catch (e) {
|
674
|
-
}
|
675
|
-
}() || {
|
676
|
-
sep: "/"
|
677
|
-
};
|
678
|
-
minimatch.sep = path.sep;
|
679
|
-
var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {};
|
680
|
-
var expand = require_brace_expansion();
|
681
|
-
var plTypes = {
|
682
|
-
"!": { open: "(?:(?!(?:", close: "))[^/]*?)" },
|
683
|
-
"?": { open: "(?:", close: ")?" },
|
684
|
-
"+": { open: "(?:", close: ")+" },
|
685
|
-
"*": { open: "(?:", close: ")*" },
|
686
|
-
"@": { open: "(?:", close: ")" }
|
687
|
-
};
|
688
|
-
var qmark = "[^/]";
|
689
|
-
var star = qmark + "*?";
|
690
|
-
var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";
|
691
|
-
var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?";
|
692
|
-
var reSpecials = charSet("().*{}+?[]^$\\!");
|
693
|
-
function charSet(s) {
|
694
|
-
return s.split("").reduce(function(set, c) {
|
695
|
-
set[c] = true;
|
696
|
-
return set;
|
697
|
-
}, {});
|
698
|
-
}
|
699
|
-
var slashSplit = /\/+/;
|
700
|
-
minimatch.filter = filter;
|
701
|
-
function filter(pattern, options) {
|
702
|
-
options = options || {};
|
703
|
-
return function(p, i, list) {
|
704
|
-
return minimatch(p, pattern, options);
|
705
|
-
};
|
706
|
-
}
|
707
|
-
function ext(a, b) {
|
708
|
-
b = b || {};
|
709
|
-
var t = {};
|
710
|
-
Object.keys(a).forEach(function(k) {
|
711
|
-
t[k] = a[k];
|
712
|
-
});
|
713
|
-
Object.keys(b).forEach(function(k) {
|
714
|
-
t[k] = b[k];
|
715
|
-
});
|
716
|
-
return t;
|
717
|
-
}
|
718
|
-
minimatch.defaults = function(def) {
|
719
|
-
if (!def || typeof def !== "object" || !Object.keys(def).length) {
|
720
|
-
return minimatch;
|
721
|
-
}
|
722
|
-
var orig = minimatch;
|
723
|
-
var m = function minimatch2(p, pattern, options) {
|
724
|
-
return orig(p, pattern, ext(def, options));
|
725
|
-
};
|
726
|
-
m.Minimatch = function Minimatch2(pattern, options) {
|
727
|
-
return new orig.Minimatch(pattern, ext(def, options));
|
728
|
-
};
|
729
|
-
m.Minimatch.defaults = function defaults(options) {
|
730
|
-
return orig.defaults(ext(def, options)).Minimatch;
|
731
|
-
};
|
732
|
-
m.filter = function filter2(pattern, options) {
|
733
|
-
return orig.filter(pattern, ext(def, options));
|
734
|
-
};
|
735
|
-
m.defaults = function defaults(options) {
|
736
|
-
return orig.defaults(ext(def, options));
|
737
|
-
};
|
738
|
-
m.makeRe = function makeRe2(pattern, options) {
|
739
|
-
return orig.makeRe(pattern, ext(def, options));
|
740
|
-
};
|
741
|
-
m.braceExpand = function braceExpand2(pattern, options) {
|
742
|
-
return orig.braceExpand(pattern, ext(def, options));
|
743
|
-
};
|
744
|
-
m.match = function(list, pattern, options) {
|
745
|
-
return orig.match(list, pattern, ext(def, options));
|
746
|
-
};
|
747
|
-
return m;
|
748
|
-
};
|
749
|
-
Minimatch.defaults = function(def) {
|
750
|
-
return minimatch.defaults(def).Minimatch;
|
751
|
-
};
|
752
|
-
function minimatch(p, pattern, options) {
|
753
|
-
assertValidPattern(pattern);
|
754
|
-
if (!options) options = {};
|
755
|
-
if (!options.nocomment && pattern.charAt(0) === "#") {
|
756
|
-
return false;
|
757
|
-
}
|
758
|
-
return new Minimatch(pattern, options).match(p);
|
759
|
-
}
|
760
|
-
function Minimatch(pattern, options) {
|
761
|
-
if (!(this instanceof Minimatch)) {
|
762
|
-
return new Minimatch(pattern, options);
|
763
|
-
}
|
764
|
-
assertValidPattern(pattern);
|
765
|
-
if (!options) options = {};
|
766
|
-
pattern = pattern.trim();
|
767
|
-
if (!options.allowWindowsEscape && path.sep !== "/") {
|
768
|
-
pattern = pattern.split(path.sep).join("/");
|
769
|
-
}
|
770
|
-
this.options = options;
|
771
|
-
this.set = [];
|
772
|
-
this.pattern = pattern;
|
773
|
-
this.regexp = null;
|
774
|
-
this.negate = false;
|
775
|
-
this.comment = false;
|
776
|
-
this.empty = false;
|
777
|
-
this.partial = !!options.partial;
|
778
|
-
this.make();
|
779
|
-
}
|
780
|
-
Minimatch.prototype.debug = function() {
|
781
|
-
};
|
782
|
-
Minimatch.prototype.make = make;
|
783
|
-
function make() {
|
784
|
-
var pattern = this.pattern;
|
785
|
-
var options = this.options;
|
786
|
-
if (!options.nocomment && pattern.charAt(0) === "#") {
|
787
|
-
this.comment = true;
|
788
|
-
return;
|
789
|
-
}
|
790
|
-
if (!pattern) {
|
791
|
-
this.empty = true;
|
792
|
-
return;
|
793
|
-
}
|
794
|
-
this.parseNegate();
|
795
|
-
var set = this.globSet = this.braceExpand();
|
796
|
-
if (options.debug) this.debug = function debug() {
|
797
|
-
console.error.apply(console, arguments);
|
798
|
-
};
|
799
|
-
this.debug(this.pattern, set);
|
800
|
-
set = this.globParts = set.map(function(s) {
|
801
|
-
return s.split(slashSplit);
|
802
|
-
});
|
803
|
-
this.debug(this.pattern, set);
|
804
|
-
set = set.map(function(s, si, set2) {
|
805
|
-
return s.map(this.parse, this);
|
806
|
-
}, this);
|
807
|
-
this.debug(this.pattern, set);
|
808
|
-
set = set.filter(function(s) {
|
809
|
-
return s.indexOf(false) === -1;
|
810
|
-
});
|
811
|
-
this.debug(this.pattern, set);
|
812
|
-
this.set = set;
|
813
|
-
}
|
814
|
-
Minimatch.prototype.parseNegate = parseNegate;
|
815
|
-
function parseNegate() {
|
816
|
-
var pattern = this.pattern;
|
817
|
-
var negate = false;
|
818
|
-
var options = this.options;
|
819
|
-
var negateOffset = 0;
|
820
|
-
if (options.nonegate) return;
|
821
|
-
for (var i = 0, l = pattern.length; i < l && pattern.charAt(i) === "!"; i++) {
|
822
|
-
negate = !negate;
|
823
|
-
negateOffset++;
|
824
|
-
}
|
825
|
-
if (negateOffset) this.pattern = pattern.substr(negateOffset);
|
826
|
-
this.negate = negate;
|
827
|
-
}
|
828
|
-
minimatch.braceExpand = function(pattern, options) {
|
829
|
-
return braceExpand(pattern, options);
|
830
|
-
};
|
831
|
-
Minimatch.prototype.braceExpand = braceExpand;
|
832
|
-
function braceExpand(pattern, options) {
|
833
|
-
if (!options) {
|
834
|
-
if (this instanceof Minimatch) {
|
835
|
-
options = this.options;
|
836
|
-
} else {
|
837
|
-
options = {};
|
838
|
-
}
|
839
|
-
}
|
840
|
-
pattern = typeof pattern === "undefined" ? this.pattern : pattern;
|
841
|
-
assertValidPattern(pattern);
|
842
|
-
if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) {
|
843
|
-
return [pattern];
|
844
|
-
}
|
845
|
-
return expand(pattern);
|
846
|
-
}
|
847
|
-
var MAX_PATTERN_LENGTH = 1024 * 64;
|
848
|
-
var assertValidPattern = function(pattern) {
|
849
|
-
if (typeof pattern !== "string") {
|
850
|
-
throw new TypeError("invalid pattern");
|
851
|
-
}
|
852
|
-
if (pattern.length > MAX_PATTERN_LENGTH) {
|
853
|
-
throw new TypeError("pattern is too long");
|
854
|
-
}
|
855
|
-
};
|
856
|
-
Minimatch.prototype.parse = parse;
|
857
|
-
var SUBPARSE = {};
|
858
|
-
function parse(pattern, isSub) {
|
859
|
-
assertValidPattern(pattern);
|
860
|
-
var options = this.options;
|
861
|
-
if (pattern === "**") {
|
862
|
-
if (!options.noglobstar)
|
863
|
-
return GLOBSTAR;
|
864
|
-
else
|
865
|
-
pattern = "*";
|
866
|
-
}
|
867
|
-
if (pattern === "") return "";
|
868
|
-
var re = "";
|
869
|
-
var hasMagic = !!options.nocase;
|
870
|
-
var escaping = false;
|
871
|
-
var patternListStack = [];
|
872
|
-
var negativeLists = [];
|
873
|
-
var stateChar;
|
874
|
-
var inClass = false;
|
875
|
-
var reClassStart = -1;
|
876
|
-
var classStart = -1;
|
877
|
-
var patternStart = pattern.charAt(0) === "." ? "" : options.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)";
|
878
|
-
var self = this;
|
879
|
-
function clearStateChar() {
|
880
|
-
if (stateChar) {
|
881
|
-
switch (stateChar) {
|
882
|
-
case "*":
|
883
|
-
re += star;
|
884
|
-
hasMagic = true;
|
885
|
-
break;
|
886
|
-
case "?":
|
887
|
-
re += qmark;
|
888
|
-
hasMagic = true;
|
889
|
-
break;
|
890
|
-
default:
|
891
|
-
re += "\\" + stateChar;
|
892
|
-
break;
|
893
|
-
}
|
894
|
-
self.debug("clearStateChar %j %j", stateChar, re);
|
895
|
-
stateChar = false;
|
896
|
-
}
|
897
|
-
}
|
898
|
-
for (var i = 0, len = pattern.length, c; i < len && (c = pattern.charAt(i)); i++) {
|
899
|
-
this.debug("%s %s %s %j", pattern, i, re, c);
|
900
|
-
if (escaping && reSpecials[c]) {
|
901
|
-
re += "\\" + c;
|
902
|
-
escaping = false;
|
903
|
-
continue;
|
904
|
-
}
|
905
|
-
switch (c) {
|
906
|
-
/* istanbul ignore next */
|
907
|
-
case "/": {
|
908
|
-
return false;
|
909
|
-
}
|
910
|
-
case "\\":
|
911
|
-
clearStateChar();
|
912
|
-
escaping = true;
|
913
|
-
continue;
|
914
|
-
// the various stateChar values
|
915
|
-
// for the "extglob" stuff.
|
916
|
-
case "?":
|
917
|
-
case "*":
|
918
|
-
case "+":
|
919
|
-
case "@":
|
920
|
-
case "!":
|
921
|
-
this.debug("%s %s %s %j <-- stateChar", pattern, i, re, c);
|
922
|
-
if (inClass) {
|
923
|
-
this.debug(" in class");
|
924
|
-
if (c === "!" && i === classStart + 1) c = "^";
|
925
|
-
re += c;
|
926
|
-
continue;
|
927
|
-
}
|
928
|
-
self.debug("call clearStateChar %j", stateChar);
|
929
|
-
clearStateChar();
|
930
|
-
stateChar = c;
|
931
|
-
if (options.noext) clearStateChar();
|
932
|
-
continue;
|
933
|
-
case "(":
|
934
|
-
if (inClass) {
|
935
|
-
re += "(";
|
936
|
-
continue;
|
937
|
-
}
|
938
|
-
if (!stateChar) {
|
939
|
-
re += "\\(";
|
940
|
-
continue;
|
941
|
-
}
|
942
|
-
patternListStack.push({
|
943
|
-
type: stateChar,
|
944
|
-
start: i - 1,
|
945
|
-
reStart: re.length,
|
946
|
-
open: plTypes[stateChar].open,
|
947
|
-
close: plTypes[stateChar].close
|
948
|
-
});
|
949
|
-
re += stateChar === "!" ? "(?:(?!(?:" : "(?:";
|
950
|
-
this.debug("plType %j %j", stateChar, re);
|
951
|
-
stateChar = false;
|
952
|
-
continue;
|
953
|
-
case ")":
|
954
|
-
if (inClass || !patternListStack.length) {
|
955
|
-
re += "\\)";
|
956
|
-
continue;
|
957
|
-
}
|
958
|
-
clearStateChar();
|
959
|
-
hasMagic = true;
|
960
|
-
var pl = patternListStack.pop();
|
961
|
-
re += pl.close;
|
962
|
-
if (pl.type === "!") {
|
963
|
-
negativeLists.push(pl);
|
964
|
-
}
|
965
|
-
pl.reEnd = re.length;
|
966
|
-
continue;
|
967
|
-
case "|":
|
968
|
-
if (inClass || !patternListStack.length || escaping) {
|
969
|
-
re += "\\|";
|
970
|
-
escaping = false;
|
971
|
-
continue;
|
972
|
-
}
|
973
|
-
clearStateChar();
|
974
|
-
re += "|";
|
975
|
-
continue;
|
976
|
-
// these are mostly the same in regexp and glob
|
977
|
-
case "[":
|
978
|
-
clearStateChar();
|
979
|
-
if (inClass) {
|
980
|
-
re += "\\" + c;
|
981
|
-
continue;
|
982
|
-
}
|
983
|
-
inClass = true;
|
984
|
-
classStart = i;
|
985
|
-
reClassStart = re.length;
|
986
|
-
re += c;
|
987
|
-
continue;
|
988
|
-
case "]":
|
989
|
-
if (i === classStart + 1 || !inClass) {
|
990
|
-
re += "\\" + c;
|
991
|
-
escaping = false;
|
992
|
-
continue;
|
993
|
-
}
|
994
|
-
var cs = pattern.substring(classStart + 1, i);
|
995
|
-
try {
|
996
|
-
RegExp("[" + cs + "]");
|
997
|
-
} catch (er) {
|
998
|
-
var sp = this.parse(cs, SUBPARSE);
|
999
|
-
re = re.substr(0, reClassStart) + "\\[" + sp[0] + "\\]";
|
1000
|
-
hasMagic = hasMagic || sp[1];
|
1001
|
-
inClass = false;
|
1002
|
-
continue;
|
1003
|
-
}
|
1004
|
-
hasMagic = true;
|
1005
|
-
inClass = false;
|
1006
|
-
re += c;
|
1007
|
-
continue;
|
1008
|
-
default:
|
1009
|
-
clearStateChar();
|
1010
|
-
if (escaping) {
|
1011
|
-
escaping = false;
|
1012
|
-
} else if (reSpecials[c] && !(c === "^" && inClass)) {
|
1013
|
-
re += "\\";
|
1014
|
-
}
|
1015
|
-
re += c;
|
1016
|
-
}
|
1017
|
-
}
|
1018
|
-
if (inClass) {
|
1019
|
-
cs = pattern.substr(classStart + 1);
|
1020
|
-
sp = this.parse(cs, SUBPARSE);
|
1021
|
-
re = re.substr(0, reClassStart) + "\\[" + sp[0];
|
1022
|
-
hasMagic = hasMagic || sp[1];
|
1023
|
-
}
|
1024
|
-
for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) {
|
1025
|
-
var tail = re.slice(pl.reStart + pl.open.length);
|
1026
|
-
this.debug("setting tail", re, pl);
|
1027
|
-
tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function(_, $1, $2) {
|
1028
|
-
if (!$2) {
|
1029
|
-
$2 = "\\";
|
1030
|
-
}
|
1031
|
-
return $1 + $1 + $2 + "|";
|
1032
|
-
});
|
1033
|
-
this.debug("tail=%j\n %s", tail, tail, pl, re);
|
1034
|
-
var t = pl.type === "*" ? star : pl.type === "?" ? qmark : "\\" + pl.type;
|
1035
|
-
hasMagic = true;
|
1036
|
-
re = re.slice(0, pl.reStart) + t + "\\(" + tail;
|
1037
|
-
}
|
1038
|
-
clearStateChar();
|
1039
|
-
if (escaping) {
|
1040
|
-
re += "\\\\";
|
1041
|
-
}
|
1042
|
-
var addPatternStart = false;
|
1043
|
-
switch (re.charAt(0)) {
|
1044
|
-
case "[":
|
1045
|
-
case ".":
|
1046
|
-
case "(":
|
1047
|
-
addPatternStart = true;
|
1048
|
-
}
|
1049
|
-
for (var n = negativeLists.length - 1; n > -1; n--) {
|
1050
|
-
var nl = negativeLists[n];
|
1051
|
-
var nlBefore = re.slice(0, nl.reStart);
|
1052
|
-
var nlFirst = re.slice(nl.reStart, nl.reEnd - 8);
|
1053
|
-
var nlLast = re.slice(nl.reEnd - 8, nl.reEnd);
|
1054
|
-
var nlAfter = re.slice(nl.reEnd);
|
1055
|
-
nlLast += nlAfter;
|
1056
|
-
var openParensBefore = nlBefore.split("(").length - 1;
|
1057
|
-
var cleanAfter = nlAfter;
|
1058
|
-
for (i = 0; i < openParensBefore; i++) {
|
1059
|
-
cleanAfter = cleanAfter.replace(/\)[+*?]?/, "");
|
1060
|
-
}
|
1061
|
-
nlAfter = cleanAfter;
|
1062
|
-
var dollar = "";
|
1063
|
-
if (nlAfter === "" && isSub !== SUBPARSE) {
|
1064
|
-
dollar = "$";
|
1065
|
-
}
|
1066
|
-
var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast;
|
1067
|
-
re = newRe;
|
1068
|
-
}
|
1069
|
-
if (re !== "" && hasMagic) {
|
1070
|
-
re = "(?=.)" + re;
|
1071
|
-
}
|
1072
|
-
if (addPatternStart) {
|
1073
|
-
re = patternStart + re;
|
1074
|
-
}
|
1075
|
-
if (isSub === SUBPARSE) {
|
1076
|
-
return [re, hasMagic];
|
1077
|
-
}
|
1078
|
-
if (!hasMagic) {
|
1079
|
-
return globUnescape(pattern);
|
1080
|
-
}
|
1081
|
-
var flags = options.nocase ? "i" : "";
|
1082
|
-
try {
|
1083
|
-
var regExp = new RegExp("^" + re + "$", flags);
|
1084
|
-
} catch (er) {
|
1085
|
-
return new RegExp("$.");
|
1086
|
-
}
|
1087
|
-
regExp._glob = pattern;
|
1088
|
-
regExp._src = re;
|
1089
|
-
return regExp;
|
1090
|
-
}
|
1091
|
-
minimatch.makeRe = function(pattern, options) {
|
1092
|
-
return new Minimatch(pattern, options || {}).makeRe();
|
1093
|
-
};
|
1094
|
-
Minimatch.prototype.makeRe = makeRe;
|
1095
|
-
function makeRe() {
|
1096
|
-
if (this.regexp || this.regexp === false) return this.regexp;
|
1097
|
-
var set = this.set;
|
1098
|
-
if (!set.length) {
|
1099
|
-
this.regexp = false;
|
1100
|
-
return this.regexp;
|
1101
|
-
}
|
1102
|
-
var options = this.options;
|
1103
|
-
var twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot;
|
1104
|
-
var flags = options.nocase ? "i" : "";
|
1105
|
-
var re = set.map(function(pattern) {
|
1106
|
-
return pattern.map(function(p) {
|
1107
|
-
return p === GLOBSTAR ? twoStar : typeof p === "string" ? regExpEscape(p) : p._src;
|
1108
|
-
}).join("\\/");
|
1109
|
-
}).join("|");
|
1110
|
-
re = "^(?:" + re + ")$";
|
1111
|
-
if (this.negate) re = "^(?!" + re + ").*$";
|
1112
|
-
try {
|
1113
|
-
this.regexp = new RegExp(re, flags);
|
1114
|
-
} catch (ex) {
|
1115
|
-
this.regexp = false;
|
1116
|
-
}
|
1117
|
-
return this.regexp;
|
1118
|
-
}
|
1119
|
-
minimatch.match = function(list, pattern, options) {
|
1120
|
-
options = options || {};
|
1121
|
-
var mm = new Minimatch(pattern, options);
|
1122
|
-
list = list.filter(function(f) {
|
1123
|
-
return mm.match(f);
|
1124
|
-
});
|
1125
|
-
if (mm.options.nonull && !list.length) {
|
1126
|
-
list.push(pattern);
|
1127
|
-
}
|
1128
|
-
return list;
|
1129
|
-
};
|
1130
|
-
Minimatch.prototype.match = function match(f, partial) {
|
1131
|
-
if (typeof partial === "undefined") partial = this.partial;
|
1132
|
-
this.debug("match", f, this.pattern);
|
1133
|
-
if (this.comment) return false;
|
1134
|
-
if (this.empty) return f === "";
|
1135
|
-
if (f === "/" && partial) return true;
|
1136
|
-
var options = this.options;
|
1137
|
-
if (path.sep !== "/") {
|
1138
|
-
f = f.split(path.sep).join("/");
|
1139
|
-
}
|
1140
|
-
f = f.split(slashSplit);
|
1141
|
-
this.debug(this.pattern, "split", f);
|
1142
|
-
var set = this.set;
|
1143
|
-
this.debug(this.pattern, "set", set);
|
1144
|
-
var filename;
|
1145
|
-
var i;
|
1146
|
-
for (i = f.length - 1; i >= 0; i--) {
|
1147
|
-
filename = f[i];
|
1148
|
-
if (filename) break;
|
1149
|
-
}
|
1150
|
-
for (i = 0; i < set.length; i++) {
|
1151
|
-
var pattern = set[i];
|
1152
|
-
var file = f;
|
1153
|
-
if (options.matchBase && pattern.length === 1) {
|
1154
|
-
file = [filename];
|
1155
|
-
}
|
1156
|
-
var hit = this.matchOne(file, pattern, partial);
|
1157
|
-
if (hit) {
|
1158
|
-
if (options.flipNegate) return true;
|
1159
|
-
return !this.negate;
|
1160
|
-
}
|
1161
|
-
}
|
1162
|
-
if (options.flipNegate) return false;
|
1163
|
-
return this.negate;
|
1164
|
-
};
|
1165
|
-
Minimatch.prototype.matchOne = function(file, pattern, partial) {
|
1166
|
-
var options = this.options;
|
1167
|
-
this.debug(
|
1168
|
-
"matchOne",
|
1169
|
-
{ "this": this, file, pattern }
|
1170
|
-
);
|
1171
|
-
this.debug("matchOne", file.length, pattern.length);
|
1172
|
-
for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
|
1173
|
-
this.debug("matchOne loop");
|
1174
|
-
var p = pattern[pi];
|
1175
|
-
var f = file[fi];
|
1176
|
-
this.debug(pattern, p, f);
|
1177
|
-
if (p === false) return false;
|
1178
|
-
if (p === GLOBSTAR) {
|
1179
|
-
this.debug("GLOBSTAR", [pattern, p, f]);
|
1180
|
-
var fr = fi;
|
1181
|
-
var pr = pi + 1;
|
1182
|
-
if (pr === pl) {
|
1183
|
-
this.debug("** at the end");
|
1184
|
-
for (; fi < fl; fi++) {
|
1185
|
-
if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".") return false;
|
1186
|
-
}
|
1187
|
-
return true;
|
1188
|
-
}
|
1189
|
-
while (fr < fl) {
|
1190
|
-
var swallowee = file[fr];
|
1191
|
-
this.debug("\nglobstar while", file, fr, pattern, pr, swallowee);
|
1192
|
-
if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
|
1193
|
-
this.debug("globstar found match!", fr, fl, swallowee);
|
1194
|
-
return true;
|
1195
|
-
} else {
|
1196
|
-
if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") {
|
1197
|
-
this.debug("dot detected!", file, fr, pattern, pr);
|
1198
|
-
break;
|
1199
|
-
}
|
1200
|
-
this.debug("globstar swallow a segment, and continue");
|
1201
|
-
fr++;
|
1202
|
-
}
|
1203
|
-
}
|
1204
|
-
if (partial) {
|
1205
|
-
this.debug("\n>>> no match, partial?", file, fr, pattern, pr);
|
1206
|
-
if (fr === fl) return true;
|
1207
|
-
}
|
1208
|
-
return false;
|
1209
|
-
}
|
1210
|
-
var hit;
|
1211
|
-
if (typeof p === "string") {
|
1212
|
-
hit = f === p;
|
1213
|
-
this.debug("string match", p, f, hit);
|
1214
|
-
} else {
|
1215
|
-
hit = f.match(p);
|
1216
|
-
this.debug("pattern match", p, f, hit);
|
1217
|
-
}
|
1218
|
-
if (!hit) return false;
|
1219
|
-
}
|
1220
|
-
if (fi === fl && pi === pl) {
|
1221
|
-
return true;
|
1222
|
-
} else if (fi === fl) {
|
1223
|
-
return partial;
|
1224
|
-
} else if (pi === pl) {
|
1225
|
-
return fi === fl - 1 && file[fi] === "";
|
1226
|
-
}
|
1227
|
-
throw new Error("wtf?");
|
1228
|
-
};
|
1229
|
-
function globUnescape(s) {
|
1230
|
-
return s.replace(/\\(.)/g, "$1");
|
1231
|
-
}
|
1232
|
-
function regExpEscape(s) {
|
1233
|
-
return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
1234
|
-
}
|
1235
|
-
}
|
1236
|
-
});
|
1237
|
-
var require_inherits_browser = (0, import_chunk_AH6QHEOA.__commonJS)({
|
1238
|
-
"../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js"(exports, module2) {
|
1239
|
-
"use strict";
|
1240
|
-
if (typeof Object.create === "function") {
|
1241
|
-
module2.exports = function inherits(ctor, superCtor) {
|
1242
|
-
if (superCtor) {
|
1243
|
-
ctor.super_ = superCtor;
|
1244
|
-
ctor.prototype = Object.create(superCtor.prototype, {
|
1245
|
-
constructor: {
|
1246
|
-
value: ctor,
|
1247
|
-
enumerable: false,
|
1248
|
-
writable: true,
|
1249
|
-
configurable: true
|
1250
|
-
}
|
1251
|
-
});
|
1252
|
-
}
|
1253
|
-
};
|
1254
|
-
} else {
|
1255
|
-
module2.exports = function inherits(ctor, superCtor) {
|
1256
|
-
if (superCtor) {
|
1257
|
-
ctor.super_ = superCtor;
|
1258
|
-
var TempCtor = function() {
|
1259
|
-
};
|
1260
|
-
TempCtor.prototype = superCtor.prototype;
|
1261
|
-
ctor.prototype = new TempCtor();
|
1262
|
-
ctor.prototype.constructor = ctor;
|
1263
|
-
}
|
1264
|
-
};
|
1265
|
-
}
|
1266
|
-
}
|
1267
|
-
});
|
1268
|
-
var require_inherits = (0, import_chunk_AH6QHEOA.__commonJS)({
|
1269
|
-
"../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits.js"(exports, module2) {
|
1270
|
-
"use strict";
|
1271
|
-
try {
|
1272
|
-
util = (0, import_chunk_AH6QHEOA.__require)("util");
|
1273
|
-
if (typeof util.inherits !== "function") throw "";
|
1274
|
-
module2.exports = util.inherits;
|
1275
|
-
} catch (e) {
|
1276
|
-
module2.exports = require_inherits_browser();
|
1277
|
-
}
|
1278
|
-
var util;
|
1279
|
-
}
|
1280
|
-
});
|
1281
|
-
var require_path_is_absolute = (0, import_chunk_AH6QHEOA.__commonJS)({
|
1282
|
-
"../../node_modules/.pnpm/path-is-absolute@1.0.1/node_modules/path-is-absolute/index.js"(exports, module2) {
|
1283
|
-
"use strict";
|
1284
|
-
function posix(path) {
|
1285
|
-
return path.charAt(0) === "/";
|
1286
|
-
}
|
1287
|
-
function win32(path) {
|
1288
|
-
var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;
|
1289
|
-
var result = splitDeviceRe.exec(path);
|
1290
|
-
var device = result[1] || "";
|
1291
|
-
var isUnc = Boolean(device && device.charAt(1) !== ":");
|
1292
|
-
return Boolean(result[2] || isUnc);
|
1293
|
-
}
|
1294
|
-
module2.exports = process.platform === "win32" ? win32 : posix;
|
1295
|
-
module2.exports.posix = posix;
|
1296
|
-
module2.exports.win32 = win32;
|
1297
|
-
}
|
1298
|
-
});
|
1299
|
-
var require_common = (0, import_chunk_AH6QHEOA.__commonJS)({
|
1300
|
-
"../../node_modules/.pnpm/glob@7.2.3/node_modules/glob/common.js"(exports) {
|
1301
|
-
"use strict";
|
1302
|
-
exports.setopts = setopts;
|
1303
|
-
exports.ownProp = ownProp;
|
1304
|
-
exports.makeAbs = makeAbs;
|
1305
|
-
exports.finish = finish;
|
1306
|
-
exports.mark = mark;
|
1307
|
-
exports.isIgnored = isIgnored;
|
1308
|
-
exports.childrenIgnored = childrenIgnored;
|
1309
|
-
function ownProp(obj, field) {
|
1310
|
-
return Object.prototype.hasOwnProperty.call(obj, field);
|
1311
|
-
}
|
1312
|
-
var fs = (0, import_chunk_AH6QHEOA.__require)("fs");
|
1313
|
-
var path = (0, import_chunk_AH6QHEOA.__require)("path");
|
1314
|
-
var minimatch = require_minimatch();
|
1315
|
-
var isAbsolute = require_path_is_absolute();
|
1316
|
-
var Minimatch = minimatch.Minimatch;
|
1317
|
-
function alphasort(a, b) {
|
1318
|
-
return a.localeCompare(b, "en");
|
1319
|
-
}
|
1320
|
-
function setupIgnores(self, options) {
|
1321
|
-
self.ignore = options.ignore || [];
|
1322
|
-
if (!Array.isArray(self.ignore))
|
1323
|
-
self.ignore = [self.ignore];
|
1324
|
-
if (self.ignore.length) {
|
1325
|
-
self.ignore = self.ignore.map(ignoreMap);
|
1326
|
-
}
|
1327
|
-
}
|
1328
|
-
function ignoreMap(pattern) {
|
1329
|
-
var gmatcher = null;
|
1330
|
-
if (pattern.slice(-3) === "/**") {
|
1331
|
-
var gpattern = pattern.replace(/(\/\*\*)+$/, "");
|
1332
|
-
gmatcher = new Minimatch(gpattern, { dot: true });
|
1333
|
-
}
|
1334
|
-
return {
|
1335
|
-
matcher: new Minimatch(pattern, { dot: true }),
|
1336
|
-
gmatcher
|
1337
|
-
};
|
1338
|
-
}
|
1339
|
-
function setopts(self, pattern, options) {
|
1340
|
-
if (!options)
|
1341
|
-
options = {};
|
1342
|
-
if (options.matchBase && -1 === pattern.indexOf("/")) {
|
1343
|
-
if (options.noglobstar) {
|
1344
|
-
throw new Error("base matching requires globstar");
|
1345
|
-
}
|
1346
|
-
pattern = "**/" + pattern;
|
1347
|
-
}
|
1348
|
-
self.silent = !!options.silent;
|
1349
|
-
self.pattern = pattern;
|
1350
|
-
self.strict = options.strict !== false;
|
1351
|
-
self.realpath = !!options.realpath;
|
1352
|
-
self.realpathCache = options.realpathCache || /* @__PURE__ */ Object.create(null);
|
1353
|
-
self.follow = !!options.follow;
|
1354
|
-
self.dot = !!options.dot;
|
1355
|
-
self.mark = !!options.mark;
|
1356
|
-
self.nodir = !!options.nodir;
|
1357
|
-
if (self.nodir)
|
1358
|
-
self.mark = true;
|
1359
|
-
self.sync = !!options.sync;
|
1360
|
-
self.nounique = !!options.nounique;
|
1361
|
-
self.nonull = !!options.nonull;
|
1362
|
-
self.nosort = !!options.nosort;
|
1363
|
-
self.nocase = !!options.nocase;
|
1364
|
-
self.stat = !!options.stat;
|
1365
|
-
self.noprocess = !!options.noprocess;
|
1366
|
-
self.absolute = !!options.absolute;
|
1367
|
-
self.fs = options.fs || fs;
|
1368
|
-
self.maxLength = options.maxLength || Infinity;
|
1369
|
-
self.cache = options.cache || /* @__PURE__ */ Object.create(null);
|
1370
|
-
self.statCache = options.statCache || /* @__PURE__ */ Object.create(null);
|
1371
|
-
self.symlinks = options.symlinks || /* @__PURE__ */ Object.create(null);
|
1372
|
-
setupIgnores(self, options);
|
1373
|
-
self.changedCwd = false;
|
1374
|
-
var cwd = process.cwd();
|
1375
|
-
if (!ownProp(options, "cwd"))
|
1376
|
-
self.cwd = cwd;
|
1377
|
-
else {
|
1378
|
-
self.cwd = path.resolve(options.cwd);
|
1379
|
-
self.changedCwd = self.cwd !== cwd;
|
1380
|
-
}
|
1381
|
-
self.root = options.root || path.resolve(self.cwd, "/");
|
1382
|
-
self.root = path.resolve(self.root);
|
1383
|
-
if (process.platform === "win32")
|
1384
|
-
self.root = self.root.replace(/\\/g, "/");
|
1385
|
-
self.cwdAbs = isAbsolute(self.cwd) ? self.cwd : makeAbs(self, self.cwd);
|
1386
|
-
if (process.platform === "win32")
|
1387
|
-
self.cwdAbs = self.cwdAbs.replace(/\\/g, "/");
|
1388
|
-
self.nomount = !!options.nomount;
|
1389
|
-
options.nonegate = true;
|
1390
|
-
options.nocomment = true;
|
1391
|
-
options.allowWindowsEscape = false;
|
1392
|
-
self.minimatch = new Minimatch(pattern, options);
|
1393
|
-
self.options = self.minimatch.options;
|
1394
|
-
}
|
1395
|
-
function finish(self) {
|
1396
|
-
var nou = self.nounique;
|
1397
|
-
var all = nou ? [] : /* @__PURE__ */ Object.create(null);
|
1398
|
-
for (var i = 0, l = self.matches.length; i < l; i++) {
|
1399
|
-
var matches = self.matches[i];
|
1400
|
-
if (!matches || Object.keys(matches).length === 0) {
|
1401
|
-
if (self.nonull) {
|
1402
|
-
var literal = self.minimatch.globSet[i];
|
1403
|
-
if (nou)
|
1404
|
-
all.push(literal);
|
1405
|
-
else
|
1406
|
-
all[literal] = true;
|
1407
|
-
}
|
1408
|
-
} else {
|
1409
|
-
var m = Object.keys(matches);
|
1410
|
-
if (nou)
|
1411
|
-
all.push.apply(all, m);
|
1412
|
-
else
|
1413
|
-
m.forEach(function(m2) {
|
1414
|
-
all[m2] = true;
|
1415
|
-
});
|
1416
|
-
}
|
1417
|
-
}
|
1418
|
-
if (!nou)
|
1419
|
-
all = Object.keys(all);
|
1420
|
-
if (!self.nosort)
|
1421
|
-
all = all.sort(alphasort);
|
1422
|
-
if (self.mark) {
|
1423
|
-
for (var i = 0; i < all.length; i++) {
|
1424
|
-
all[i] = self._mark(all[i]);
|
1425
|
-
}
|
1426
|
-
if (self.nodir) {
|
1427
|
-
all = all.filter(function(e) {
|
1428
|
-
var notDir = !/\/$/.test(e);
|
1429
|
-
var c = self.cache[e] || self.cache[makeAbs(self, e)];
|
1430
|
-
if (notDir && c)
|
1431
|
-
notDir = c !== "DIR" && !Array.isArray(c);
|
1432
|
-
return notDir;
|
1433
|
-
});
|
1434
|
-
}
|
1435
|
-
}
|
1436
|
-
if (self.ignore.length)
|
1437
|
-
all = all.filter(function(m2) {
|
1438
|
-
return !isIgnored(self, m2);
|
1439
|
-
});
|
1440
|
-
self.found = all;
|
1441
|
-
}
|
1442
|
-
function mark(self, p) {
|
1443
|
-
var abs = makeAbs(self, p);
|
1444
|
-
var c = self.cache[abs];
|
1445
|
-
var m = p;
|
1446
|
-
if (c) {
|
1447
|
-
var isDir = c === "DIR" || Array.isArray(c);
|
1448
|
-
var slash = p.slice(-1) === "/";
|
1449
|
-
if (isDir && !slash)
|
1450
|
-
m += "/";
|
1451
|
-
else if (!isDir && slash)
|
1452
|
-
m = m.slice(0, -1);
|
1453
|
-
if (m !== p) {
|
1454
|
-
var mabs = makeAbs(self, m);
|
1455
|
-
self.statCache[mabs] = self.statCache[abs];
|
1456
|
-
self.cache[mabs] = self.cache[abs];
|
1457
|
-
}
|
1458
|
-
}
|
1459
|
-
return m;
|
1460
|
-
}
|
1461
|
-
function makeAbs(self, f) {
|
1462
|
-
var abs = f;
|
1463
|
-
if (f.charAt(0) === "/") {
|
1464
|
-
abs = path.join(self.root, f);
|
1465
|
-
} else if (isAbsolute(f) || f === "") {
|
1466
|
-
abs = f;
|
1467
|
-
} else if (self.changedCwd) {
|
1468
|
-
abs = path.resolve(self.cwd, f);
|
1469
|
-
} else {
|
1470
|
-
abs = path.resolve(f);
|
1471
|
-
}
|
1472
|
-
if (process.platform === "win32")
|
1473
|
-
abs = abs.replace(/\\/g, "/");
|
1474
|
-
return abs;
|
1475
|
-
}
|
1476
|
-
function isIgnored(self, path2) {
|
1477
|
-
if (!self.ignore.length)
|
1478
|
-
return false;
|
1479
|
-
return self.ignore.some(function(item) {
|
1480
|
-
return item.matcher.match(path2) || !!(item.gmatcher && item.gmatcher.match(path2));
|
1481
|
-
});
|
1482
|
-
}
|
1483
|
-
function childrenIgnored(self, path2) {
|
1484
|
-
if (!self.ignore.length)
|
1485
|
-
return false;
|
1486
|
-
return self.ignore.some(function(item) {
|
1487
|
-
return !!(item.gmatcher && item.gmatcher.match(path2));
|
1488
|
-
});
|
1489
|
-
}
|
1490
|
-
}
|
1491
|
-
});
|
1492
|
-
var require_sync = (0, import_chunk_AH6QHEOA.__commonJS)({
|
1493
|
-
"../../node_modules/.pnpm/glob@7.2.3/node_modules/glob/sync.js"(exports, module2) {
|
1494
|
-
"use strict";
|
1495
|
-
module2.exports = globSync;
|
1496
|
-
globSync.GlobSync = GlobSync;
|
1497
|
-
var rp = require_fs();
|
1498
|
-
var minimatch = require_minimatch();
|
1499
|
-
var Minimatch = minimatch.Minimatch;
|
1500
|
-
var Glob = require_glob().Glob;
|
1501
|
-
var util = (0, import_chunk_AH6QHEOA.__require)("util");
|
1502
|
-
var path = (0, import_chunk_AH6QHEOA.__require)("path");
|
1503
|
-
var assert = (0, import_chunk_AH6QHEOA.__require)("assert");
|
1504
|
-
var isAbsolute = require_path_is_absolute();
|
1505
|
-
var common = require_common();
|
1506
|
-
var setopts = common.setopts;
|
1507
|
-
var ownProp = common.ownProp;
|
1508
|
-
var childrenIgnored = common.childrenIgnored;
|
1509
|
-
var isIgnored = common.isIgnored;
|
1510
|
-
function globSync(pattern, options) {
|
1511
|
-
if (typeof options === "function" || arguments.length === 3)
|
1512
|
-
throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167");
|
1513
|
-
return new GlobSync(pattern, options).found;
|
1514
|
-
}
|
1515
|
-
function GlobSync(pattern, options) {
|
1516
|
-
if (!pattern)
|
1517
|
-
throw new Error("must provide pattern");
|
1518
|
-
if (typeof options === "function" || arguments.length === 3)
|
1519
|
-
throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167");
|
1520
|
-
if (!(this instanceof GlobSync))
|
1521
|
-
return new GlobSync(pattern, options);
|
1522
|
-
setopts(this, pattern, options);
|
1523
|
-
if (this.noprocess)
|
1524
|
-
return this;
|
1525
|
-
var n = this.minimatch.set.length;
|
1526
|
-
this.matches = new Array(n);
|
1527
|
-
for (var i = 0; i < n; i++) {
|
1528
|
-
this._process(this.minimatch.set[i], i, false);
|
1529
|
-
}
|
1530
|
-
this._finish();
|
1531
|
-
}
|
1532
|
-
GlobSync.prototype._finish = function() {
|
1533
|
-
assert.ok(this instanceof GlobSync);
|
1534
|
-
if (this.realpath) {
|
1535
|
-
var self = this;
|
1536
|
-
this.matches.forEach(function(matchset, index) {
|
1537
|
-
var set = self.matches[index] = /* @__PURE__ */ Object.create(null);
|
1538
|
-
for (var p in matchset) {
|
1539
|
-
try {
|
1540
|
-
p = self._makeAbs(p);
|
1541
|
-
var real = rp.realpathSync(p, self.realpathCache);
|
1542
|
-
set[real] = true;
|
1543
|
-
} catch (er) {
|
1544
|
-
if (er.syscall === "stat")
|
1545
|
-
set[self._makeAbs(p)] = true;
|
1546
|
-
else
|
1547
|
-
throw er;
|
1548
|
-
}
|
1549
|
-
}
|
1550
|
-
});
|
1551
|
-
}
|
1552
|
-
common.finish(this);
|
1553
|
-
};
|
1554
|
-
GlobSync.prototype._process = function(pattern, index, inGlobStar) {
|
1555
|
-
assert.ok(this instanceof GlobSync);
|
1556
|
-
var n = 0;
|
1557
|
-
while (typeof pattern[n] === "string") {
|
1558
|
-
n++;
|
1559
|
-
}
|
1560
|
-
var prefix;
|
1561
|
-
switch (n) {
|
1562
|
-
// if not, then this is rather simple
|
1563
|
-
case pattern.length:
|
1564
|
-
this._processSimple(pattern.join("/"), index);
|
1565
|
-
return;
|
1566
|
-
case 0:
|
1567
|
-
prefix = null;
|
1568
|
-
break;
|
1569
|
-
default:
|
1570
|
-
prefix = pattern.slice(0, n).join("/");
|
1571
|
-
break;
|
1572
|
-
}
|
1573
|
-
var remain = pattern.slice(n);
|
1574
|
-
var read;
|
1575
|
-
if (prefix === null)
|
1576
|
-
read = ".";
|
1577
|
-
else if (isAbsolute(prefix) || isAbsolute(pattern.map(function(p) {
|
1578
|
-
return typeof p === "string" ? p : "[*]";
|
1579
|
-
}).join("/"))) {
|
1580
|
-
if (!prefix || !isAbsolute(prefix))
|
1581
|
-
prefix = "/" + prefix;
|
1582
|
-
read = prefix;
|
1583
|
-
} else
|
1584
|
-
read = prefix;
|
1585
|
-
var abs = this._makeAbs(read);
|
1586
|
-
if (childrenIgnored(this, read))
|
1587
|
-
return;
|
1588
|
-
var isGlobStar = remain[0] === minimatch.GLOBSTAR;
|
1589
|
-
if (isGlobStar)
|
1590
|
-
this._processGlobStar(prefix, read, abs, remain, index, inGlobStar);
|
1591
|
-
else
|
1592
|
-
this._processReaddir(prefix, read, abs, remain, index, inGlobStar);
|
1593
|
-
};
|
1594
|
-
GlobSync.prototype._processReaddir = function(prefix, read, abs, remain, index, inGlobStar) {
|
1595
|
-
var entries = this._readdir(abs, inGlobStar);
|
1596
|
-
if (!entries)
|
1597
|
-
return;
|
1598
|
-
var pn = remain[0];
|
1599
|
-
var negate = !!this.minimatch.negate;
|
1600
|
-
var rawGlob = pn._glob;
|
1601
|
-
var dotOk = this.dot || rawGlob.charAt(0) === ".";
|
1602
|
-
var matchedEntries = [];
|
1603
|
-
for (var i = 0; i < entries.length; i++) {
|
1604
|
-
var e = entries[i];
|
1605
|
-
if (e.charAt(0) !== "." || dotOk) {
|
1606
|
-
var m;
|
1607
|
-
if (negate && !prefix) {
|
1608
|
-
m = !e.match(pn);
|
1609
|
-
} else {
|
1610
|
-
m = e.match(pn);
|
1611
|
-
}
|
1612
|
-
if (m)
|
1613
|
-
matchedEntries.push(e);
|
1614
|
-
}
|
1615
|
-
}
|
1616
|
-
var len = matchedEntries.length;
|
1617
|
-
if (len === 0)
|
1618
|
-
return;
|
1619
|
-
if (remain.length === 1 && !this.mark && !this.stat) {
|
1620
|
-
if (!this.matches[index])
|
1621
|
-
this.matches[index] = /* @__PURE__ */ Object.create(null);
|
1622
|
-
for (var i = 0; i < len; i++) {
|
1623
|
-
var e = matchedEntries[i];
|
1624
|
-
if (prefix) {
|
1625
|
-
if (prefix.slice(-1) !== "/")
|
1626
|
-
e = prefix + "/" + e;
|
1627
|
-
else
|
1628
|
-
e = prefix + e;
|
1629
|
-
}
|
1630
|
-
if (e.charAt(0) === "/" && !this.nomount) {
|
1631
|
-
e = path.join(this.root, e);
|
1632
|
-
}
|
1633
|
-
this._emitMatch(index, e);
|
1634
|
-
}
|
1635
|
-
return;
|
1636
|
-
}
|
1637
|
-
remain.shift();
|
1638
|
-
for (var i = 0; i < len; i++) {
|
1639
|
-
var e = matchedEntries[i];
|
1640
|
-
var newPattern;
|
1641
|
-
if (prefix)
|
1642
|
-
newPattern = [prefix, e];
|
1643
|
-
else
|
1644
|
-
newPattern = [e];
|
1645
|
-
this._process(newPattern.concat(remain), index, inGlobStar);
|
1646
|
-
}
|
1647
|
-
};
|
1648
|
-
GlobSync.prototype._emitMatch = function(index, e) {
|
1649
|
-
if (isIgnored(this, e))
|
1650
|
-
return;
|
1651
|
-
var abs = this._makeAbs(e);
|
1652
|
-
if (this.mark)
|
1653
|
-
e = this._mark(e);
|
1654
|
-
if (this.absolute) {
|
1655
|
-
e = abs;
|
1656
|
-
}
|
1657
|
-
if (this.matches[index][e])
|
1658
|
-
return;
|
1659
|
-
if (this.nodir) {
|
1660
|
-
var c = this.cache[abs];
|
1661
|
-
if (c === "DIR" || Array.isArray(c))
|
1662
|
-
return;
|
1663
|
-
}
|
1664
|
-
this.matches[index][e] = true;
|
1665
|
-
if (this.stat)
|
1666
|
-
this._stat(e);
|
1667
|
-
};
|
1668
|
-
GlobSync.prototype._readdirInGlobStar = function(abs) {
|
1669
|
-
if (this.follow)
|
1670
|
-
return this._readdir(abs, false);
|
1671
|
-
var entries;
|
1672
|
-
var lstat;
|
1673
|
-
var stat;
|
1674
|
-
try {
|
1675
|
-
lstat = this.fs.lstatSync(abs);
|
1676
|
-
} catch (er) {
|
1677
|
-
if (er.code === "ENOENT") {
|
1678
|
-
return null;
|
1679
|
-
}
|
1680
|
-
}
|
1681
|
-
var isSym = lstat && lstat.isSymbolicLink();
|
1682
|
-
this.symlinks[abs] = isSym;
|
1683
|
-
if (!isSym && lstat && !lstat.isDirectory())
|
1684
|
-
this.cache[abs] = "FILE";
|
1685
|
-
else
|
1686
|
-
entries = this._readdir(abs, false);
|
1687
|
-
return entries;
|
1688
|
-
};
|
1689
|
-
GlobSync.prototype._readdir = function(abs, inGlobStar) {
|
1690
|
-
var entries;
|
1691
|
-
if (inGlobStar && !ownProp(this.symlinks, abs))
|
1692
|
-
return this._readdirInGlobStar(abs);
|
1693
|
-
if (ownProp(this.cache, abs)) {
|
1694
|
-
var c = this.cache[abs];
|
1695
|
-
if (!c || c === "FILE")
|
1696
|
-
return null;
|
1697
|
-
if (Array.isArray(c))
|
1698
|
-
return c;
|
1699
|
-
}
|
1700
|
-
try {
|
1701
|
-
return this._readdirEntries(abs, this.fs.readdirSync(abs));
|
1702
|
-
} catch (er) {
|
1703
|
-
this._readdirError(abs, er);
|
1704
|
-
return null;
|
1705
|
-
}
|
1706
|
-
};
|
1707
|
-
GlobSync.prototype._readdirEntries = function(abs, entries) {
|
1708
|
-
if (!this.mark && !this.stat) {
|
1709
|
-
for (var i = 0; i < entries.length; i++) {
|
1710
|
-
var e = entries[i];
|
1711
|
-
if (abs === "/")
|
1712
|
-
e = abs + e;
|
1713
|
-
else
|
1714
|
-
e = abs + "/" + e;
|
1715
|
-
this.cache[e] = true;
|
1716
|
-
}
|
1717
|
-
}
|
1718
|
-
this.cache[abs] = entries;
|
1719
|
-
return entries;
|
1720
|
-
};
|
1721
|
-
GlobSync.prototype._readdirError = function(f, er) {
|
1722
|
-
switch (er.code) {
|
1723
|
-
case "ENOTSUP":
|
1724
|
-
// https://github.com/isaacs/node-glob/issues/205
|
1725
|
-
case "ENOTDIR":
|
1726
|
-
var abs = this._makeAbs(f);
|
1727
|
-
this.cache[abs] = "FILE";
|
1728
|
-
if (abs === this.cwdAbs) {
|
1729
|
-
var error = new Error(er.code + " invalid cwd " + this.cwd);
|
1730
|
-
error.path = this.cwd;
|
1731
|
-
error.code = er.code;
|
1732
|
-
throw error;
|
1733
|
-
}
|
1734
|
-
break;
|
1735
|
-
case "ENOENT":
|
1736
|
-
// not terribly unusual
|
1737
|
-
case "ELOOP":
|
1738
|
-
case "ENAMETOOLONG":
|
1739
|
-
case "UNKNOWN":
|
1740
|
-
this.cache[this._makeAbs(f)] = false;
|
1741
|
-
break;
|
1742
|
-
default:
|
1743
|
-
this.cache[this._makeAbs(f)] = false;
|
1744
|
-
if (this.strict)
|
1745
|
-
throw er;
|
1746
|
-
if (!this.silent)
|
1747
|
-
console.error("glob error", er);
|
1748
|
-
break;
|
1749
|
-
}
|
1750
|
-
};
|
1751
|
-
GlobSync.prototype._processGlobStar = function(prefix, read, abs, remain, index, inGlobStar) {
|
1752
|
-
var entries = this._readdir(abs, inGlobStar);
|
1753
|
-
if (!entries)
|
1754
|
-
return;
|
1755
|
-
var remainWithoutGlobStar = remain.slice(1);
|
1756
|
-
var gspref = prefix ? [prefix] : [];
|
1757
|
-
var noGlobStar = gspref.concat(remainWithoutGlobStar);
|
1758
|
-
this._process(noGlobStar, index, false);
|
1759
|
-
var len = entries.length;
|
1760
|
-
var isSym = this.symlinks[abs];
|
1761
|
-
if (isSym && inGlobStar)
|
1762
|
-
return;
|
1763
|
-
for (var i = 0; i < len; i++) {
|
1764
|
-
var e = entries[i];
|
1765
|
-
if (e.charAt(0) === "." && !this.dot)
|
1766
|
-
continue;
|
1767
|
-
var instead = gspref.concat(entries[i], remainWithoutGlobStar);
|
1768
|
-
this._process(instead, index, true);
|
1769
|
-
var below = gspref.concat(entries[i], remain);
|
1770
|
-
this._process(below, index, true);
|
1771
|
-
}
|
1772
|
-
};
|
1773
|
-
GlobSync.prototype._processSimple = function(prefix, index) {
|
1774
|
-
var exists = this._stat(prefix);
|
1775
|
-
if (!this.matches[index])
|
1776
|
-
this.matches[index] = /* @__PURE__ */ Object.create(null);
|
1777
|
-
if (!exists)
|
1778
|
-
return;
|
1779
|
-
if (prefix && isAbsolute(prefix) && !this.nomount) {
|
1780
|
-
var trail = /[\/\\]$/.test(prefix);
|
1781
|
-
if (prefix.charAt(0) === "/") {
|
1782
|
-
prefix = path.join(this.root, prefix);
|
1783
|
-
} else {
|
1784
|
-
prefix = path.resolve(this.root, prefix);
|
1785
|
-
if (trail)
|
1786
|
-
prefix += "/";
|
1787
|
-
}
|
1788
|
-
}
|
1789
|
-
if (process.platform === "win32")
|
1790
|
-
prefix = prefix.replace(/\\/g, "/");
|
1791
|
-
this._emitMatch(index, prefix);
|
1792
|
-
};
|
1793
|
-
GlobSync.prototype._stat = function(f) {
|
1794
|
-
var abs = this._makeAbs(f);
|
1795
|
-
var needDir = f.slice(-1) === "/";
|
1796
|
-
if (f.length > this.maxLength)
|
1797
|
-
return false;
|
1798
|
-
if (!this.stat && ownProp(this.cache, abs)) {
|
1799
|
-
var c = this.cache[abs];
|
1800
|
-
if (Array.isArray(c))
|
1801
|
-
c = "DIR";
|
1802
|
-
if (!needDir || c === "DIR")
|
1803
|
-
return c;
|
1804
|
-
if (needDir && c === "FILE")
|
1805
|
-
return false;
|
1806
|
-
}
|
1807
|
-
var exists;
|
1808
|
-
var stat = this.statCache[abs];
|
1809
|
-
if (!stat) {
|
1810
|
-
var lstat;
|
1811
|
-
try {
|
1812
|
-
lstat = this.fs.lstatSync(abs);
|
1813
|
-
} catch (er) {
|
1814
|
-
if (er && (er.code === "ENOENT" || er.code === "ENOTDIR")) {
|
1815
|
-
this.statCache[abs] = false;
|
1816
|
-
return false;
|
1817
|
-
}
|
1818
|
-
}
|
1819
|
-
if (lstat && lstat.isSymbolicLink()) {
|
1820
|
-
try {
|
1821
|
-
stat = this.fs.statSync(abs);
|
1822
|
-
} catch (er) {
|
1823
|
-
stat = lstat;
|
1824
|
-
}
|
1825
|
-
} else {
|
1826
|
-
stat = lstat;
|
1827
|
-
}
|
1828
|
-
}
|
1829
|
-
this.statCache[abs] = stat;
|
1830
|
-
var c = true;
|
1831
|
-
if (stat)
|
1832
|
-
c = stat.isDirectory() ? "DIR" : "FILE";
|
1833
|
-
this.cache[abs] = this.cache[abs] || c;
|
1834
|
-
if (needDir && c === "FILE")
|
1835
|
-
return false;
|
1836
|
-
return c;
|
1837
|
-
};
|
1838
|
-
GlobSync.prototype._mark = function(p) {
|
1839
|
-
return common.mark(this, p);
|
1840
|
-
};
|
1841
|
-
GlobSync.prototype._makeAbs = function(f) {
|
1842
|
-
return common.makeAbs(this, f);
|
1843
|
-
};
|
1844
|
-
}
|
1845
|
-
});
|
1846
|
-
var require_wrappy = (0, import_chunk_AH6QHEOA.__commonJS)({
|
1847
|
-
"../../node_modules/.pnpm/wrappy@1.0.2/node_modules/wrappy/wrappy.js"(exports, module2) {
|
1848
|
-
"use strict";
|
1849
|
-
module2.exports = wrappy;
|
1850
|
-
function wrappy(fn, cb) {
|
1851
|
-
if (fn && cb) return wrappy(fn)(cb);
|
1852
|
-
if (typeof fn !== "function")
|
1853
|
-
throw new TypeError("need wrapper function");
|
1854
|
-
Object.keys(fn).forEach(function(k) {
|
1855
|
-
wrapper[k] = fn[k];
|
1856
|
-
});
|
1857
|
-
return wrapper;
|
1858
|
-
function wrapper() {
|
1859
|
-
var args = new Array(arguments.length);
|
1860
|
-
for (var i = 0; i < args.length; i++) {
|
1861
|
-
args[i] = arguments[i];
|
1862
|
-
}
|
1863
|
-
var ret = fn.apply(this, args);
|
1864
|
-
var cb2 = args[args.length - 1];
|
1865
|
-
if (typeof ret === "function" && ret !== cb2) {
|
1866
|
-
Object.keys(cb2).forEach(function(k) {
|
1867
|
-
ret[k] = cb2[k];
|
1868
|
-
});
|
1869
|
-
}
|
1870
|
-
return ret;
|
1871
|
-
}
|
1872
|
-
}
|
1873
|
-
}
|
1874
|
-
});
|
1875
|
-
var require_once = (0, import_chunk_AH6QHEOA.__commonJS)({
|
1876
|
-
"../../node_modules/.pnpm/once@1.4.0/node_modules/once/once.js"(exports, module2) {
|
1877
|
-
"use strict";
|
1878
|
-
var wrappy = require_wrappy();
|
1879
|
-
module2.exports = wrappy(once);
|
1880
|
-
module2.exports.strict = wrappy(onceStrict);
|
1881
|
-
once.proto = once(function() {
|
1882
|
-
Object.defineProperty(Function.prototype, "once", {
|
1883
|
-
value: function() {
|
1884
|
-
return once(this);
|
1885
|
-
},
|
1886
|
-
configurable: true
|
1887
|
-
});
|
1888
|
-
Object.defineProperty(Function.prototype, "onceStrict", {
|
1889
|
-
value: function() {
|
1890
|
-
return onceStrict(this);
|
1891
|
-
},
|
1892
|
-
configurable: true
|
1893
|
-
});
|
1894
|
-
});
|
1895
|
-
function once(fn) {
|
1896
|
-
var f = function() {
|
1897
|
-
if (f.called) return f.value;
|
1898
|
-
f.called = true;
|
1899
|
-
return f.value = fn.apply(this, arguments);
|
1900
|
-
};
|
1901
|
-
f.called = false;
|
1902
|
-
return f;
|
1903
|
-
}
|
1904
|
-
function onceStrict(fn) {
|
1905
|
-
var f = function() {
|
1906
|
-
if (f.called)
|
1907
|
-
throw new Error(f.onceError);
|
1908
|
-
f.called = true;
|
1909
|
-
return f.value = fn.apply(this, arguments);
|
1910
|
-
};
|
1911
|
-
var name = fn.name || "Function wrapped with `once`";
|
1912
|
-
f.onceError = name + " shouldn't be called more than once";
|
1913
|
-
f.called = false;
|
1914
|
-
return f;
|
1915
|
-
}
|
1916
|
-
}
|
1917
|
-
});
|
1918
|
-
var require_inflight = (0, import_chunk_AH6QHEOA.__commonJS)({
|
1919
|
-
"../../node_modules/.pnpm/inflight@1.0.6/node_modules/inflight/inflight.js"(exports, module2) {
|
1920
|
-
"use strict";
|
1921
|
-
var wrappy = require_wrappy();
|
1922
|
-
var reqs = /* @__PURE__ */ Object.create(null);
|
1923
|
-
var once = require_once();
|
1924
|
-
module2.exports = wrappy(inflight);
|
1925
|
-
function inflight(key, cb) {
|
1926
|
-
if (reqs[key]) {
|
1927
|
-
reqs[key].push(cb);
|
1928
|
-
return null;
|
1929
|
-
} else {
|
1930
|
-
reqs[key] = [cb];
|
1931
|
-
return makeres(key);
|
1932
|
-
}
|
1933
|
-
}
|
1934
|
-
function makeres(key) {
|
1935
|
-
return once(function RES() {
|
1936
|
-
var cbs = reqs[key];
|
1937
|
-
var len = cbs.length;
|
1938
|
-
var args = slice(arguments);
|
1939
|
-
try {
|
1940
|
-
for (var i = 0; i < len; i++) {
|
1941
|
-
cbs[i].apply(null, args);
|
1942
|
-
}
|
1943
|
-
} finally {
|
1944
|
-
if (cbs.length > len) {
|
1945
|
-
cbs.splice(0, len);
|
1946
|
-
process.nextTick(function() {
|
1947
|
-
RES.apply(null, args);
|
1948
|
-
});
|
1949
|
-
} else {
|
1950
|
-
delete reqs[key];
|
1951
|
-
}
|
1952
|
-
}
|
1953
|
-
});
|
1954
|
-
}
|
1955
|
-
function slice(args) {
|
1956
|
-
var length = args.length;
|
1957
|
-
var array = [];
|
1958
|
-
for (var i = 0; i < length; i++) array[i] = args[i];
|
1959
|
-
return array;
|
1960
|
-
}
|
1961
|
-
}
|
1962
|
-
});
|
1963
|
-
var require_glob = (0, import_chunk_AH6QHEOA.__commonJS)({
|
1964
|
-
"../../node_modules/.pnpm/glob@7.2.3/node_modules/glob/glob.js"(exports, module2) {
|
1965
|
-
"use strict";
|
1966
|
-
module2.exports = glob;
|
1967
|
-
var rp = require_fs();
|
1968
|
-
var minimatch = require_minimatch();
|
1969
|
-
var Minimatch = minimatch.Minimatch;
|
1970
|
-
var inherits = require_inherits();
|
1971
|
-
var EE = (0, import_chunk_AH6QHEOA.__require)("events").EventEmitter;
|
1972
|
-
var path = (0, import_chunk_AH6QHEOA.__require)("path");
|
1973
|
-
var assert = (0, import_chunk_AH6QHEOA.__require)("assert");
|
1974
|
-
var isAbsolute = require_path_is_absolute();
|
1975
|
-
var globSync = require_sync();
|
1976
|
-
var common = require_common();
|
1977
|
-
var setopts = common.setopts;
|
1978
|
-
var ownProp = common.ownProp;
|
1979
|
-
var inflight = require_inflight();
|
1980
|
-
var util = (0, import_chunk_AH6QHEOA.__require)("util");
|
1981
|
-
var childrenIgnored = common.childrenIgnored;
|
1982
|
-
var isIgnored = common.isIgnored;
|
1983
|
-
var once = require_once();
|
1984
|
-
function glob(pattern, options, cb) {
|
1985
|
-
if (typeof options === "function") cb = options, options = {};
|
1986
|
-
if (!options) options = {};
|
1987
|
-
if (options.sync) {
|
1988
|
-
if (cb)
|
1989
|
-
throw new TypeError("callback provided to sync glob");
|
1990
|
-
return globSync(pattern, options);
|
1991
|
-
}
|
1992
|
-
return new Glob(pattern, options, cb);
|
1993
|
-
}
|
1994
|
-
glob.sync = globSync;
|
1995
|
-
var GlobSync = glob.GlobSync = globSync.GlobSync;
|
1996
|
-
glob.glob = glob;
|
1997
|
-
function extend(origin, add) {
|
1998
|
-
if (add === null || typeof add !== "object") {
|
1999
|
-
return origin;
|
2000
|
-
}
|
2001
|
-
var keys = Object.keys(add);
|
2002
|
-
var i = keys.length;
|
2003
|
-
while (i--) {
|
2004
|
-
origin[keys[i]] = add[keys[i]];
|
2005
|
-
}
|
2006
|
-
return origin;
|
2007
|
-
}
|
2008
|
-
glob.hasMagic = function(pattern, options_) {
|
2009
|
-
var options = extend({}, options_);
|
2010
|
-
options.noprocess = true;
|
2011
|
-
var g = new Glob(pattern, options);
|
2012
|
-
var set = g.minimatch.set;
|
2013
|
-
if (!pattern)
|
2014
|
-
return false;
|
2015
|
-
if (set.length > 1)
|
2016
|
-
return true;
|
2017
|
-
for (var j = 0; j < set[0].length; j++) {
|
2018
|
-
if (typeof set[0][j] !== "string")
|
2019
|
-
return true;
|
2020
|
-
}
|
2021
|
-
return false;
|
2022
|
-
};
|
2023
|
-
glob.Glob = Glob;
|
2024
|
-
inherits(Glob, EE);
|
2025
|
-
function Glob(pattern, options, cb) {
|
2026
|
-
if (typeof options === "function") {
|
2027
|
-
cb = options;
|
2028
|
-
options = null;
|
2029
|
-
}
|
2030
|
-
if (options && options.sync) {
|
2031
|
-
if (cb)
|
2032
|
-
throw new TypeError("callback provided to sync glob");
|
2033
|
-
return new GlobSync(pattern, options);
|
2034
|
-
}
|
2035
|
-
if (!(this instanceof Glob))
|
2036
|
-
return new Glob(pattern, options, cb);
|
2037
|
-
setopts(this, pattern, options);
|
2038
|
-
this._didRealPath = false;
|
2039
|
-
var n = this.minimatch.set.length;
|
2040
|
-
this.matches = new Array(n);
|
2041
|
-
if (typeof cb === "function") {
|
2042
|
-
cb = once(cb);
|
2043
|
-
this.on("error", cb);
|
2044
|
-
this.on("end", function(matches) {
|
2045
|
-
cb(null, matches);
|
2046
|
-
});
|
2047
|
-
}
|
2048
|
-
var self = this;
|
2049
|
-
this._processing = 0;
|
2050
|
-
this._emitQueue = [];
|
2051
|
-
this._processQueue = [];
|
2052
|
-
this.paused = false;
|
2053
|
-
if (this.noprocess)
|
2054
|
-
return this;
|
2055
|
-
if (n === 0)
|
2056
|
-
return done();
|
2057
|
-
var sync = true;
|
2058
|
-
for (var i = 0; i < n; i++) {
|
2059
|
-
this._process(this.minimatch.set[i], i, false, done);
|
2060
|
-
}
|
2061
|
-
sync = false;
|
2062
|
-
function done() {
|
2063
|
-
--self._processing;
|
2064
|
-
if (self._processing <= 0) {
|
2065
|
-
if (sync) {
|
2066
|
-
process.nextTick(function() {
|
2067
|
-
self._finish();
|
2068
|
-
});
|
2069
|
-
} else {
|
2070
|
-
self._finish();
|
2071
|
-
}
|
2072
|
-
}
|
2073
|
-
}
|
2074
|
-
}
|
2075
|
-
Glob.prototype._finish = function() {
|
2076
|
-
assert(this instanceof Glob);
|
2077
|
-
if (this.aborted)
|
2078
|
-
return;
|
2079
|
-
if (this.realpath && !this._didRealpath)
|
2080
|
-
return this._realpath();
|
2081
|
-
common.finish(this);
|
2082
|
-
this.emit("end", this.found);
|
2083
|
-
};
|
2084
|
-
Glob.prototype._realpath = function() {
|
2085
|
-
if (this._didRealpath)
|
2086
|
-
return;
|
2087
|
-
this._didRealpath = true;
|
2088
|
-
var n = this.matches.length;
|
2089
|
-
if (n === 0)
|
2090
|
-
return this._finish();
|
2091
|
-
var self = this;
|
2092
|
-
for (var i = 0; i < this.matches.length; i++)
|
2093
|
-
this._realpathSet(i, next);
|
2094
|
-
function next() {
|
2095
|
-
if (--n === 0)
|
2096
|
-
self._finish();
|
2097
|
-
}
|
2098
|
-
};
|
2099
|
-
Glob.prototype._realpathSet = function(index, cb) {
|
2100
|
-
var matchset = this.matches[index];
|
2101
|
-
if (!matchset)
|
2102
|
-
return cb();
|
2103
|
-
var found = Object.keys(matchset);
|
2104
|
-
var self = this;
|
2105
|
-
var n = found.length;
|
2106
|
-
if (n === 0)
|
2107
|
-
return cb();
|
2108
|
-
var set = this.matches[index] = /* @__PURE__ */ Object.create(null);
|
2109
|
-
found.forEach(function(p, i) {
|
2110
|
-
p = self._makeAbs(p);
|
2111
|
-
rp.realpath(p, self.realpathCache, function(er, real) {
|
2112
|
-
if (!er)
|
2113
|
-
set[real] = true;
|
2114
|
-
else if (er.syscall === "stat")
|
2115
|
-
set[p] = true;
|
2116
|
-
else
|
2117
|
-
self.emit("error", er);
|
2118
|
-
if (--n === 0) {
|
2119
|
-
self.matches[index] = set;
|
2120
|
-
cb();
|
2121
|
-
}
|
2122
|
-
});
|
2123
|
-
});
|
2124
|
-
};
|
2125
|
-
Glob.prototype._mark = function(p) {
|
2126
|
-
return common.mark(this, p);
|
2127
|
-
};
|
2128
|
-
Glob.prototype._makeAbs = function(f) {
|
2129
|
-
return common.makeAbs(this, f);
|
2130
|
-
};
|
2131
|
-
Glob.prototype.abort = function() {
|
2132
|
-
this.aborted = true;
|
2133
|
-
this.emit("abort");
|
2134
|
-
};
|
2135
|
-
Glob.prototype.pause = function() {
|
2136
|
-
if (!this.paused) {
|
2137
|
-
this.paused = true;
|
2138
|
-
this.emit("pause");
|
2139
|
-
}
|
2140
|
-
};
|
2141
|
-
Glob.prototype.resume = function() {
|
2142
|
-
if (this.paused) {
|
2143
|
-
this.emit("resume");
|
2144
|
-
this.paused = false;
|
2145
|
-
if (this._emitQueue.length) {
|
2146
|
-
var eq = this._emitQueue.slice(0);
|
2147
|
-
this._emitQueue.length = 0;
|
2148
|
-
for (var i = 0; i < eq.length; i++) {
|
2149
|
-
var e = eq[i];
|
2150
|
-
this._emitMatch(e[0], e[1]);
|
2151
|
-
}
|
2152
|
-
}
|
2153
|
-
if (this._processQueue.length) {
|
2154
|
-
var pq = this._processQueue.slice(0);
|
2155
|
-
this._processQueue.length = 0;
|
2156
|
-
for (var i = 0; i < pq.length; i++) {
|
2157
|
-
var p = pq[i];
|
2158
|
-
this._processing--;
|
2159
|
-
this._process(p[0], p[1], p[2], p[3]);
|
2160
|
-
}
|
2161
|
-
}
|
2162
|
-
}
|
2163
|
-
};
|
2164
|
-
Glob.prototype._process = function(pattern, index, inGlobStar, cb) {
|
2165
|
-
assert(this instanceof Glob);
|
2166
|
-
assert(typeof cb === "function");
|
2167
|
-
if (this.aborted)
|
2168
|
-
return;
|
2169
|
-
this._processing++;
|
2170
|
-
if (this.paused) {
|
2171
|
-
this._processQueue.push([pattern, index, inGlobStar, cb]);
|
2172
|
-
return;
|
2173
|
-
}
|
2174
|
-
var n = 0;
|
2175
|
-
while (typeof pattern[n] === "string") {
|
2176
|
-
n++;
|
2177
|
-
}
|
2178
|
-
var prefix;
|
2179
|
-
switch (n) {
|
2180
|
-
// if not, then this is rather simple
|
2181
|
-
case pattern.length:
|
2182
|
-
this._processSimple(pattern.join("/"), index, cb);
|
2183
|
-
return;
|
2184
|
-
case 0:
|
2185
|
-
prefix = null;
|
2186
|
-
break;
|
2187
|
-
default:
|
2188
|
-
prefix = pattern.slice(0, n).join("/");
|
2189
|
-
break;
|
2190
|
-
}
|
2191
|
-
var remain = pattern.slice(n);
|
2192
|
-
var read;
|
2193
|
-
if (prefix === null)
|
2194
|
-
read = ".";
|
2195
|
-
else if (isAbsolute(prefix) || isAbsolute(pattern.map(function(p) {
|
2196
|
-
return typeof p === "string" ? p : "[*]";
|
2197
|
-
}).join("/"))) {
|
2198
|
-
if (!prefix || !isAbsolute(prefix))
|
2199
|
-
prefix = "/" + prefix;
|
2200
|
-
read = prefix;
|
2201
|
-
} else
|
2202
|
-
read = prefix;
|
2203
|
-
var abs = this._makeAbs(read);
|
2204
|
-
if (childrenIgnored(this, read))
|
2205
|
-
return cb();
|
2206
|
-
var isGlobStar = remain[0] === minimatch.GLOBSTAR;
|
2207
|
-
if (isGlobStar)
|
2208
|
-
this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb);
|
2209
|
-
else
|
2210
|
-
this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb);
|
2211
|
-
};
|
2212
|
-
Glob.prototype._processReaddir = function(prefix, read, abs, remain, index, inGlobStar, cb) {
|
2213
|
-
var self = this;
|
2214
|
-
this._readdir(abs, inGlobStar, function(er, entries) {
|
2215
|
-
return self._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb);
|
2216
|
-
});
|
2217
|
-
};
|
2218
|
-
Glob.prototype._processReaddir2 = function(prefix, read, abs, remain, index, inGlobStar, entries, cb) {
|
2219
|
-
if (!entries)
|
2220
|
-
return cb();
|
2221
|
-
var pn = remain[0];
|
2222
|
-
var negate = !!this.minimatch.negate;
|
2223
|
-
var rawGlob = pn._glob;
|
2224
|
-
var dotOk = this.dot || rawGlob.charAt(0) === ".";
|
2225
|
-
var matchedEntries = [];
|
2226
|
-
for (var i = 0; i < entries.length; i++) {
|
2227
|
-
var e = entries[i];
|
2228
|
-
if (e.charAt(0) !== "." || dotOk) {
|
2229
|
-
var m;
|
2230
|
-
if (negate && !prefix) {
|
2231
|
-
m = !e.match(pn);
|
2232
|
-
} else {
|
2233
|
-
m = e.match(pn);
|
2234
|
-
}
|
2235
|
-
if (m)
|
2236
|
-
matchedEntries.push(e);
|
2237
|
-
}
|
2238
|
-
}
|
2239
|
-
var len = matchedEntries.length;
|
2240
|
-
if (len === 0)
|
2241
|
-
return cb();
|
2242
|
-
if (remain.length === 1 && !this.mark && !this.stat) {
|
2243
|
-
if (!this.matches[index])
|
2244
|
-
this.matches[index] = /* @__PURE__ */ Object.create(null);
|
2245
|
-
for (var i = 0; i < len; i++) {
|
2246
|
-
var e = matchedEntries[i];
|
2247
|
-
if (prefix) {
|
2248
|
-
if (prefix !== "/")
|
2249
|
-
e = prefix + "/" + e;
|
2250
|
-
else
|
2251
|
-
e = prefix + e;
|
2252
|
-
}
|
2253
|
-
if (e.charAt(0) === "/" && !this.nomount) {
|
2254
|
-
e = path.join(this.root, e);
|
2255
|
-
}
|
2256
|
-
this._emitMatch(index, e);
|
2257
|
-
}
|
2258
|
-
return cb();
|
2259
|
-
}
|
2260
|
-
remain.shift();
|
2261
|
-
for (var i = 0; i < len; i++) {
|
2262
|
-
var e = matchedEntries[i];
|
2263
|
-
var newPattern;
|
2264
|
-
if (prefix) {
|
2265
|
-
if (prefix !== "/")
|
2266
|
-
e = prefix + "/" + e;
|
2267
|
-
else
|
2268
|
-
e = prefix + e;
|
2269
|
-
}
|
2270
|
-
this._process([e].concat(remain), index, inGlobStar, cb);
|
2271
|
-
}
|
2272
|
-
cb();
|
2273
|
-
};
|
2274
|
-
Glob.prototype._emitMatch = function(index, e) {
|
2275
|
-
if (this.aborted)
|
2276
|
-
return;
|
2277
|
-
if (isIgnored(this, e))
|
2278
|
-
return;
|
2279
|
-
if (this.paused) {
|
2280
|
-
this._emitQueue.push([index, e]);
|
2281
|
-
return;
|
2282
|
-
}
|
2283
|
-
var abs = isAbsolute(e) ? e : this._makeAbs(e);
|
2284
|
-
if (this.mark)
|
2285
|
-
e = this._mark(e);
|
2286
|
-
if (this.absolute)
|
2287
|
-
e = abs;
|
2288
|
-
if (this.matches[index][e])
|
2289
|
-
return;
|
2290
|
-
if (this.nodir) {
|
2291
|
-
var c = this.cache[abs];
|
2292
|
-
if (c === "DIR" || Array.isArray(c))
|
2293
|
-
return;
|
2294
|
-
}
|
2295
|
-
this.matches[index][e] = true;
|
2296
|
-
var st = this.statCache[abs];
|
2297
|
-
if (st)
|
2298
|
-
this.emit("stat", e, st);
|
2299
|
-
this.emit("match", e);
|
2300
|
-
};
|
2301
|
-
Glob.prototype._readdirInGlobStar = function(abs, cb) {
|
2302
|
-
if (this.aborted)
|
2303
|
-
return;
|
2304
|
-
if (this.follow)
|
2305
|
-
return this._readdir(abs, false, cb);
|
2306
|
-
var lstatkey = "lstat\0" + abs;
|
2307
|
-
var self = this;
|
2308
|
-
var lstatcb = inflight(lstatkey, lstatcb_);
|
2309
|
-
if (lstatcb)
|
2310
|
-
self.fs.lstat(abs, lstatcb);
|
2311
|
-
function lstatcb_(er, lstat) {
|
2312
|
-
if (er && er.code === "ENOENT")
|
2313
|
-
return cb();
|
2314
|
-
var isSym = lstat && lstat.isSymbolicLink();
|
2315
|
-
self.symlinks[abs] = isSym;
|
2316
|
-
if (!isSym && lstat && !lstat.isDirectory()) {
|
2317
|
-
self.cache[abs] = "FILE";
|
2318
|
-
cb();
|
2319
|
-
} else
|
2320
|
-
self._readdir(abs, false, cb);
|
2321
|
-
}
|
2322
|
-
};
|
2323
|
-
Glob.prototype._readdir = function(abs, inGlobStar, cb) {
|
2324
|
-
if (this.aborted)
|
2325
|
-
return;
|
2326
|
-
cb = inflight("readdir\0" + abs + "\0" + inGlobStar, cb);
|
2327
|
-
if (!cb)
|
2328
|
-
return;
|
2329
|
-
if (inGlobStar && !ownProp(this.symlinks, abs))
|
2330
|
-
return this._readdirInGlobStar(abs, cb);
|
2331
|
-
if (ownProp(this.cache, abs)) {
|
2332
|
-
var c = this.cache[abs];
|
2333
|
-
if (!c || c === "FILE")
|
2334
|
-
return cb();
|
2335
|
-
if (Array.isArray(c))
|
2336
|
-
return cb(null, c);
|
2337
|
-
}
|
2338
|
-
var self = this;
|
2339
|
-
self.fs.readdir(abs, readdirCb(this, abs, cb));
|
2340
|
-
};
|
2341
|
-
function readdirCb(self, abs, cb) {
|
2342
|
-
return function(er, entries) {
|
2343
|
-
if (er)
|
2344
|
-
self._readdirError(abs, er, cb);
|
2345
|
-
else
|
2346
|
-
self._readdirEntries(abs, entries, cb);
|
2347
|
-
};
|
2348
|
-
}
|
2349
|
-
Glob.prototype._readdirEntries = function(abs, entries, cb) {
|
2350
|
-
if (this.aborted)
|
2351
|
-
return;
|
2352
|
-
if (!this.mark && !this.stat) {
|
2353
|
-
for (var i = 0; i < entries.length; i++) {
|
2354
|
-
var e = entries[i];
|
2355
|
-
if (abs === "/")
|
2356
|
-
e = abs + e;
|
2357
|
-
else
|
2358
|
-
e = abs + "/" + e;
|
2359
|
-
this.cache[e] = true;
|
2360
|
-
}
|
2361
|
-
}
|
2362
|
-
this.cache[abs] = entries;
|
2363
|
-
return cb(null, entries);
|
2364
|
-
};
|
2365
|
-
Glob.prototype._readdirError = function(f, er, cb) {
|
2366
|
-
if (this.aborted)
|
2367
|
-
return;
|
2368
|
-
switch (er.code) {
|
2369
|
-
case "ENOTSUP":
|
2370
|
-
// https://github.com/isaacs/node-glob/issues/205
|
2371
|
-
case "ENOTDIR":
|
2372
|
-
var abs = this._makeAbs(f);
|
2373
|
-
this.cache[abs] = "FILE";
|
2374
|
-
if (abs === this.cwdAbs) {
|
2375
|
-
var error = new Error(er.code + " invalid cwd " + this.cwd);
|
2376
|
-
error.path = this.cwd;
|
2377
|
-
error.code = er.code;
|
2378
|
-
this.emit("error", error);
|
2379
|
-
this.abort();
|
2380
|
-
}
|
2381
|
-
break;
|
2382
|
-
case "ENOENT":
|
2383
|
-
// not terribly unusual
|
2384
|
-
case "ELOOP":
|
2385
|
-
case "ENAMETOOLONG":
|
2386
|
-
case "UNKNOWN":
|
2387
|
-
this.cache[this._makeAbs(f)] = false;
|
2388
|
-
break;
|
2389
|
-
default:
|
2390
|
-
this.cache[this._makeAbs(f)] = false;
|
2391
|
-
if (this.strict) {
|
2392
|
-
this.emit("error", er);
|
2393
|
-
this.abort();
|
2394
|
-
}
|
2395
|
-
if (!this.silent)
|
2396
|
-
console.error("glob error", er);
|
2397
|
-
break;
|
2398
|
-
}
|
2399
|
-
return cb();
|
2400
|
-
};
|
2401
|
-
Glob.prototype._processGlobStar = function(prefix, read, abs, remain, index, inGlobStar, cb) {
|
2402
|
-
var self = this;
|
2403
|
-
this._readdir(abs, inGlobStar, function(er, entries) {
|
2404
|
-
self._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb);
|
2405
|
-
});
|
2406
|
-
};
|
2407
|
-
Glob.prototype._processGlobStar2 = function(prefix, read, abs, remain, index, inGlobStar, entries, cb) {
|
2408
|
-
if (!entries)
|
2409
|
-
return cb();
|
2410
|
-
var remainWithoutGlobStar = remain.slice(1);
|
2411
|
-
var gspref = prefix ? [prefix] : [];
|
2412
|
-
var noGlobStar = gspref.concat(remainWithoutGlobStar);
|
2413
|
-
this._process(noGlobStar, index, false, cb);
|
2414
|
-
var isSym = this.symlinks[abs];
|
2415
|
-
var len = entries.length;
|
2416
|
-
if (isSym && inGlobStar)
|
2417
|
-
return cb();
|
2418
|
-
for (var i = 0; i < len; i++) {
|
2419
|
-
var e = entries[i];
|
2420
|
-
if (e.charAt(0) === "." && !this.dot)
|
2421
|
-
continue;
|
2422
|
-
var instead = gspref.concat(entries[i], remainWithoutGlobStar);
|
2423
|
-
this._process(instead, index, true, cb);
|
2424
|
-
var below = gspref.concat(entries[i], remain);
|
2425
|
-
this._process(below, index, true, cb);
|
2426
|
-
}
|
2427
|
-
cb();
|
2428
|
-
};
|
2429
|
-
Glob.prototype._processSimple = function(prefix, index, cb) {
|
2430
|
-
var self = this;
|
2431
|
-
this._stat(prefix, function(er, exists) {
|
2432
|
-
self._processSimple2(prefix, index, er, exists, cb);
|
2433
|
-
});
|
2434
|
-
};
|
2435
|
-
Glob.prototype._processSimple2 = function(prefix, index, er, exists, cb) {
|
2436
|
-
if (!this.matches[index])
|
2437
|
-
this.matches[index] = /* @__PURE__ */ Object.create(null);
|
2438
|
-
if (!exists)
|
2439
|
-
return cb();
|
2440
|
-
if (prefix && isAbsolute(prefix) && !this.nomount) {
|
2441
|
-
var trail = /[\/\\]$/.test(prefix);
|
2442
|
-
if (prefix.charAt(0) === "/") {
|
2443
|
-
prefix = path.join(this.root, prefix);
|
2444
|
-
} else {
|
2445
|
-
prefix = path.resolve(this.root, prefix);
|
2446
|
-
if (trail)
|
2447
|
-
prefix += "/";
|
2448
|
-
}
|
2449
|
-
}
|
2450
|
-
if (process.platform === "win32")
|
2451
|
-
prefix = prefix.replace(/\\/g, "/");
|
2452
|
-
this._emitMatch(index, prefix);
|
2453
|
-
cb();
|
2454
|
-
};
|
2455
|
-
Glob.prototype._stat = function(f, cb) {
|
2456
|
-
var abs = this._makeAbs(f);
|
2457
|
-
var needDir = f.slice(-1) === "/";
|
2458
|
-
if (f.length > this.maxLength)
|
2459
|
-
return cb();
|
2460
|
-
if (!this.stat && ownProp(this.cache, abs)) {
|
2461
|
-
var c = this.cache[abs];
|
2462
|
-
if (Array.isArray(c))
|
2463
|
-
c = "DIR";
|
2464
|
-
if (!needDir || c === "DIR")
|
2465
|
-
return cb(null, c);
|
2466
|
-
if (needDir && c === "FILE")
|
2467
|
-
return cb();
|
2468
|
-
}
|
2469
|
-
var exists;
|
2470
|
-
var stat = this.statCache[abs];
|
2471
|
-
if (stat !== void 0) {
|
2472
|
-
if (stat === false)
|
2473
|
-
return cb(null, stat);
|
2474
|
-
else {
|
2475
|
-
var type = stat.isDirectory() ? "DIR" : "FILE";
|
2476
|
-
if (needDir && type === "FILE")
|
2477
|
-
return cb();
|
2478
|
-
else
|
2479
|
-
return cb(null, type, stat);
|
2480
|
-
}
|
2481
|
-
}
|
2482
|
-
var self = this;
|
2483
|
-
var statcb = inflight("stat\0" + abs, lstatcb_);
|
2484
|
-
if (statcb)
|
2485
|
-
self.fs.lstat(abs, statcb);
|
2486
|
-
function lstatcb_(er, lstat) {
|
2487
|
-
if (lstat && lstat.isSymbolicLink()) {
|
2488
|
-
return self.fs.stat(abs, function(er2, stat2) {
|
2489
|
-
if (er2)
|
2490
|
-
self._stat2(f, abs, null, lstat, cb);
|
2491
|
-
else
|
2492
|
-
self._stat2(f, abs, er2, stat2, cb);
|
2493
|
-
});
|
2494
|
-
} else {
|
2495
|
-
self._stat2(f, abs, er, lstat, cb);
|
2496
|
-
}
|
2497
|
-
}
|
2498
|
-
};
|
2499
|
-
Glob.prototype._stat2 = function(f, abs, er, stat, cb) {
|
2500
|
-
if (er && (er.code === "ENOENT" || er.code === "ENOTDIR")) {
|
2501
|
-
this.statCache[abs] = false;
|
2502
|
-
return cb();
|
2503
|
-
}
|
2504
|
-
var needDir = f.slice(-1) === "/";
|
2505
|
-
this.statCache[abs] = stat;
|
2506
|
-
if (abs.slice(-1) === "/" && stat && !stat.isDirectory())
|
2507
|
-
return cb(null, false, stat);
|
2508
|
-
var c = true;
|
2509
|
-
if (stat)
|
2510
|
-
c = stat.isDirectory() ? "DIR" : "FILE";
|
2511
|
-
this.cache[abs] = this.cache[abs] || c;
|
2512
|
-
if (needDir && c === "FILE")
|
2513
|
-
return cb();
|
2514
|
-
return cb(null, c, stat);
|
2515
|
-
};
|
2516
|
-
}
|
2517
|
-
});
|
2518
|
-
var require_rimraf = (0, import_chunk_AH6QHEOA.__commonJS)({
|
2519
|
-
"../../node_modules/.pnpm/rimraf@3.0.2/node_modules/rimraf/rimraf.js"(exports, module2) {
|
2520
|
-
"use strict";
|
2521
|
-
var assert = (0, import_chunk_AH6QHEOA.__require)("assert");
|
2522
|
-
var path = (0, import_chunk_AH6QHEOA.__require)("path");
|
2523
|
-
var fs = (0, import_chunk_AH6QHEOA.__require)("fs");
|
2524
|
-
var glob = void 0;
|
2525
|
-
try {
|
2526
|
-
glob = require_glob();
|
2527
|
-
} catch (_err) {
|
2528
|
-
}
|
2529
|
-
var defaultGlobOpts = {
|
2530
|
-
nosort: true,
|
2531
|
-
silent: true
|
2532
|
-
};
|
2533
|
-
var timeout = 0;
|
2534
|
-
var isWindows = process.platform === "win32";
|
2535
|
-
var defaults = (options) => {
|
2536
|
-
const methods = [
|
2537
|
-
"unlink",
|
2538
|
-
"chmod",
|
2539
|
-
"stat",
|
2540
|
-
"lstat",
|
2541
|
-
"rmdir",
|
2542
|
-
"readdir"
|
2543
|
-
];
|
2544
|
-
methods.forEach((m) => {
|
2545
|
-
options[m] = options[m] || fs[m];
|
2546
|
-
m = m + "Sync";
|
2547
|
-
options[m] = options[m] || fs[m];
|
2548
|
-
});
|
2549
|
-
options.maxBusyTries = options.maxBusyTries || 3;
|
2550
|
-
options.emfileWait = options.emfileWait || 1e3;
|
2551
|
-
if (options.glob === false) {
|
2552
|
-
options.disableGlob = true;
|
2553
|
-
}
|
2554
|
-
if (options.disableGlob !== true && glob === void 0) {
|
2555
|
-
throw Error("glob dependency not found, set `options.disableGlob = true` if intentional");
|
2556
|
-
}
|
2557
|
-
options.disableGlob = options.disableGlob || false;
|
2558
|
-
options.glob = options.glob || defaultGlobOpts;
|
2559
|
-
};
|
2560
|
-
var rimraf = (p, options, cb) => {
|
2561
|
-
if (typeof options === "function") {
|
2562
|
-
cb = options;
|
2563
|
-
options = {};
|
2564
|
-
}
|
2565
|
-
assert(p, "rimraf: missing path");
|
2566
|
-
assert.equal(typeof p, "string", "rimraf: path should be a string");
|
2567
|
-
assert.equal(typeof cb, "function", "rimraf: callback function required");
|
2568
|
-
assert(options, "rimraf: invalid options argument provided");
|
2569
|
-
assert.equal(typeof options, "object", "rimraf: options should be object");
|
2570
|
-
defaults(options);
|
2571
|
-
let busyTries = 0;
|
2572
|
-
let errState = null;
|
2573
|
-
let n = 0;
|
2574
|
-
const next = (er) => {
|
2575
|
-
errState = errState || er;
|
2576
|
-
if (--n === 0)
|
2577
|
-
cb(errState);
|
2578
|
-
};
|
2579
|
-
const afterGlob = (er, results) => {
|
2580
|
-
if (er)
|
2581
|
-
return cb(er);
|
2582
|
-
n = results.length;
|
2583
|
-
if (n === 0)
|
2584
|
-
return cb();
|
2585
|
-
results.forEach((p2) => {
|
2586
|
-
const CB = (er2) => {
|
2587
|
-
if (er2) {
|
2588
|
-
if ((er2.code === "EBUSY" || er2.code === "ENOTEMPTY" || er2.code === "EPERM") && busyTries < options.maxBusyTries) {
|
2589
|
-
busyTries++;
|
2590
|
-
return setTimeout(() => rimraf_(p2, options, CB), busyTries * 100);
|
2591
|
-
}
|
2592
|
-
if (er2.code === "EMFILE" && timeout < options.emfileWait) {
|
2593
|
-
return setTimeout(() => rimraf_(p2, options, CB), timeout++);
|
2594
|
-
}
|
2595
|
-
if (er2.code === "ENOENT") er2 = null;
|
2596
|
-
}
|
2597
|
-
timeout = 0;
|
2598
|
-
next(er2);
|
2599
|
-
};
|
2600
|
-
rimraf_(p2, options, CB);
|
2601
|
-
});
|
2602
|
-
};
|
2603
|
-
if (options.disableGlob || !glob.hasMagic(p))
|
2604
|
-
return afterGlob(null, [p]);
|
2605
|
-
options.lstat(p, (er, stat) => {
|
2606
|
-
if (!er)
|
2607
|
-
return afterGlob(null, [p]);
|
2608
|
-
glob(p, options.glob, afterGlob);
|
2609
|
-
});
|
2610
|
-
};
|
2611
|
-
var rimraf_ = (p, options, cb) => {
|
2612
|
-
assert(p);
|
2613
|
-
assert(options);
|
2614
|
-
assert(typeof cb === "function");
|
2615
|
-
options.lstat(p, (er, st) => {
|
2616
|
-
if (er && er.code === "ENOENT")
|
2617
|
-
return cb(null);
|
2618
|
-
if (er && er.code === "EPERM" && isWindows)
|
2619
|
-
fixWinEPERM(p, options, er, cb);
|
2620
|
-
if (st && st.isDirectory())
|
2621
|
-
return rmdir(p, options, er, cb);
|
2622
|
-
options.unlink(p, (er2) => {
|
2623
|
-
if (er2) {
|
2624
|
-
if (er2.code === "ENOENT")
|
2625
|
-
return cb(null);
|
2626
|
-
if (er2.code === "EPERM")
|
2627
|
-
return isWindows ? fixWinEPERM(p, options, er2, cb) : rmdir(p, options, er2, cb);
|
2628
|
-
if (er2.code === "EISDIR")
|
2629
|
-
return rmdir(p, options, er2, cb);
|
2630
|
-
}
|
2631
|
-
return cb(er2);
|
2632
|
-
});
|
2633
|
-
});
|
2634
|
-
};
|
2635
|
-
var fixWinEPERM = (p, options, er, cb) => {
|
2636
|
-
assert(p);
|
2637
|
-
assert(options);
|
2638
|
-
assert(typeof cb === "function");
|
2639
|
-
options.chmod(p, 438, (er2) => {
|
2640
|
-
if (er2)
|
2641
|
-
cb(er2.code === "ENOENT" ? null : er);
|
2642
|
-
else
|
2643
|
-
options.stat(p, (er3, stats) => {
|
2644
|
-
if (er3)
|
2645
|
-
cb(er3.code === "ENOENT" ? null : er);
|
2646
|
-
else if (stats.isDirectory())
|
2647
|
-
rmdir(p, options, er, cb);
|
2648
|
-
else
|
2649
|
-
options.unlink(p, cb);
|
2650
|
-
});
|
2651
|
-
});
|
2652
|
-
};
|
2653
|
-
var fixWinEPERMSync = (p, options, er) => {
|
2654
|
-
assert(p);
|
2655
|
-
assert(options);
|
2656
|
-
try {
|
2657
|
-
options.chmodSync(p, 438);
|
2658
|
-
} catch (er2) {
|
2659
|
-
if (er2.code === "ENOENT")
|
2660
|
-
return;
|
2661
|
-
else
|
2662
|
-
throw er;
|
2663
|
-
}
|
2664
|
-
let stats;
|
2665
|
-
try {
|
2666
|
-
stats = options.statSync(p);
|
2667
|
-
} catch (er3) {
|
2668
|
-
if (er3.code === "ENOENT")
|
2669
|
-
return;
|
2670
|
-
else
|
2671
|
-
throw er;
|
2672
|
-
}
|
2673
|
-
if (stats.isDirectory())
|
2674
|
-
rmdirSync(p, options, er);
|
2675
|
-
else
|
2676
|
-
options.unlinkSync(p);
|
2677
|
-
};
|
2678
|
-
var rmdir = (p, options, originalEr, cb) => {
|
2679
|
-
assert(p);
|
2680
|
-
assert(options);
|
2681
|
-
assert(typeof cb === "function");
|
2682
|
-
options.rmdir(p, (er) => {
|
2683
|
-
if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM"))
|
2684
|
-
rmkids(p, options, cb);
|
2685
|
-
else if (er && er.code === "ENOTDIR")
|
2686
|
-
cb(originalEr);
|
2687
|
-
else
|
2688
|
-
cb(er);
|
2689
|
-
});
|
2690
|
-
};
|
2691
|
-
var rmkids = (p, options, cb) => {
|
2692
|
-
assert(p);
|
2693
|
-
assert(options);
|
2694
|
-
assert(typeof cb === "function");
|
2695
|
-
options.readdir(p, (er, files) => {
|
2696
|
-
if (er)
|
2697
|
-
return cb(er);
|
2698
|
-
let n = files.length;
|
2699
|
-
if (n === 0)
|
2700
|
-
return options.rmdir(p, cb);
|
2701
|
-
let errState;
|
2702
|
-
files.forEach((f) => {
|
2703
|
-
rimraf(path.join(p, f), options, (er2) => {
|
2704
|
-
if (errState)
|
2705
|
-
return;
|
2706
|
-
if (er2)
|
2707
|
-
return cb(errState = er2);
|
2708
|
-
if (--n === 0)
|
2709
|
-
options.rmdir(p, cb);
|
2710
|
-
});
|
2711
|
-
});
|
2712
|
-
});
|
2713
|
-
};
|
2714
|
-
var rimrafSync = (p, options) => {
|
2715
|
-
options = options || {};
|
2716
|
-
defaults(options);
|
2717
|
-
assert(p, "rimraf: missing path");
|
2718
|
-
assert.equal(typeof p, "string", "rimraf: path should be a string");
|
2719
|
-
assert(options, "rimraf: missing options");
|
2720
|
-
assert.equal(typeof options, "object", "rimraf: options should be object");
|
2721
|
-
let results;
|
2722
|
-
if (options.disableGlob || !glob.hasMagic(p)) {
|
2723
|
-
results = [p];
|
2724
|
-
} else {
|
2725
|
-
try {
|
2726
|
-
options.lstatSync(p);
|
2727
|
-
results = [p];
|
2728
|
-
} catch (er) {
|
2729
|
-
results = glob.sync(p, options.glob);
|
2730
|
-
}
|
2731
|
-
}
|
2732
|
-
if (!results.length)
|
2733
|
-
return;
|
2734
|
-
for (let i = 0; i < results.length; i++) {
|
2735
|
-
const p2 = results[i];
|
2736
|
-
let st;
|
2737
|
-
try {
|
2738
|
-
st = options.lstatSync(p2);
|
2739
|
-
} catch (er) {
|
2740
|
-
if (er.code === "ENOENT")
|
2741
|
-
return;
|
2742
|
-
if (er.code === "EPERM" && isWindows)
|
2743
|
-
fixWinEPERMSync(p2, options, er);
|
2744
|
-
}
|
2745
|
-
try {
|
2746
|
-
if (st && st.isDirectory())
|
2747
|
-
rmdirSync(p2, options, null);
|
2748
|
-
else
|
2749
|
-
options.unlinkSync(p2);
|
2750
|
-
} catch (er) {
|
2751
|
-
if (er.code === "ENOENT")
|
2752
|
-
return;
|
2753
|
-
if (er.code === "EPERM")
|
2754
|
-
return isWindows ? fixWinEPERMSync(p2, options, er) : rmdirSync(p2, options, er);
|
2755
|
-
if (er.code !== "EISDIR")
|
2756
|
-
throw er;
|
2757
|
-
rmdirSync(p2, options, er);
|
2758
|
-
}
|
2759
|
-
}
|
2760
|
-
};
|
2761
|
-
var rmdirSync = (p, options, originalEr) => {
|
2762
|
-
assert(p);
|
2763
|
-
assert(options);
|
2764
|
-
try {
|
2765
|
-
options.rmdirSync(p);
|
2766
|
-
} catch (er) {
|
2767
|
-
if (er.code === "ENOENT")
|
2768
|
-
return;
|
2769
|
-
if (er.code === "ENOTDIR")
|
2770
|
-
throw originalEr;
|
2771
|
-
if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")
|
2772
|
-
rmkidsSync(p, options);
|
2773
|
-
}
|
2774
|
-
};
|
2775
|
-
var rmkidsSync = (p, options) => {
|
2776
|
-
assert(p);
|
2777
|
-
assert(options);
|
2778
|
-
options.readdirSync(p).forEach((f) => rimrafSync(path.join(p, f), options));
|
2779
|
-
const retries = isWindows ? 100 : 1;
|
2780
|
-
let i = 0;
|
2781
|
-
do {
|
2782
|
-
let threw = true;
|
2783
|
-
try {
|
2784
|
-
const ret = options.rmdirSync(p, options);
|
2785
|
-
threw = false;
|
2786
|
-
return ret;
|
2787
|
-
} finally {
|
2788
|
-
if (++i < retries && threw)
|
2789
|
-
continue;
|
2790
|
-
}
|
2791
|
-
} while (true);
|
2792
|
-
};
|
2793
|
-
module2.exports = rimraf;
|
2794
|
-
rimraf.sync = rimrafSync;
|
2795
|
-
}
|
2796
|
-
});
|