@palbase/backend 25.1.0 → 27.0.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/bin/palbase-backend.cjs +2401 -1039
- package/dist/bin/palbase-backend.cjs.map +1 -1
- package/dist/bin/palbase-backend.js +87 -51
- package/dist/bin/palbase-backend.js.map +1 -1
- package/dist/chunk-CGNN2PUH.js +213 -0
- package/dist/chunk-CGNN2PUH.js.map +1 -0
- package/dist/chunk-DRZFQRJI.js +370 -0
- package/dist/chunk-DRZFQRJI.js.map +1 -0
- package/dist/chunk-GYK6QYS4.js +708 -0
- package/dist/chunk-GYK6QYS4.js.map +1 -0
- package/dist/chunk-I3C4PFIW.js +930 -0
- package/dist/chunk-I3C4PFIW.js.map +1 -0
- package/dist/{chunk-VDF2T4AS.js → chunk-OO7R25AI.js} +1213 -591
- package/dist/chunk-OO7R25AI.js.map +1 -0
- package/dist/chunk-TS4U7NBD.js +885 -0
- package/dist/chunk-TS4U7NBD.js.map +1 -0
- package/dist/{chunk-YOY5DFQS.js → chunk-TWX6JTGJ.js} +76 -34
- package/dist/{chunk-YOY5DFQS.js.map → chunk-TWX6JTGJ.js.map} +1 -1
- package/dist/{chunk-35PNTIRN.js → chunk-VVMJEVQP.js} +63 -162
- package/dist/chunk-VVMJEVQP.js.map +1 -0
- package/dist/{chunk-7D4SUZUM.js → chunk-VXPNPVAG.js} +3 -1
- package/dist/db/env.cjs.map +1 -1
- package/dist/db/env.d.cts +2 -2
- package/dist/db/env.d.ts +2 -2
- package/dist/db/index.cjs +754 -344
- package/dist/db/index.cjs.map +1 -1
- package/dist/db/index.d.cts +2 -2
- package/dist/db/index.d.ts +2 -2
- package/dist/db/index.js +7 -4
- package/dist/engine/index.cjs +2339 -1006
- package/dist/engine/index.cjs.map +1 -1
- package/dist/engine/index.d.cts +6 -6
- package/dist/engine/index.d.ts +6 -6
- package/dist/engine/index.js +7 -6
- package/dist/index-BrvvxSpn.d.ts +4844 -0
- package/dist/index-Bve7BBTL.d.cts +4844 -0
- package/dist/{index-CUomTA3e.d.ts → index-NuzRCuxe.d.ts} +171 -296
- package/dist/{index-ClpDeSos.d.cts → index-VtToZmUm.d.cts} +171 -296
- package/dist/index.cjs +2694 -1169
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +165 -19
- package/dist/index.d.ts +165 -19
- package/dist/index.js +738 -477
- package/dist/index.js.map +1 -1
- package/dist/module-Dl1KFVtc.d.cts +54 -0
- package/dist/module-Dl1KFVtc.d.ts +54 -0
- package/dist/openapi/index.cjs +1330 -484
- package/dist/openapi/index.cjs.map +1 -1
- package/dist/openapi/index.d.cts +4 -2
- package/dist/openapi/index.d.ts +4 -2
- package/dist/openapi/index.js +1264 -474
- package/dist/openapi/index.js.map +1 -1
- package/dist/{registry-dZZ5JKYg.d.ts → registry-B0eyOF9x.d.ts} +1 -1
- package/dist/{registry-CC0WBQq6.d.cts → registry-Bk9_rbNd.d.cts} +1 -1
- package/dist/stack.cjs.map +1 -1
- package/dist/test/index.cjs +705 -141
- package/dist/test/index.cjs.map +1 -1
- package/dist/test/index.d.cts +30 -4
- package/dist/test/index.d.ts +30 -4
- package/dist/test/index.js +472 -124
- package/dist/test/index.js.map +1 -1
- package/docs/README.md +33 -18
- package/docs/auth.md +1 -1
- package/docs/background.md +2 -2
- package/docs/database.md +221 -50
- package/docs/endpoints.md +3 -4
- package/docs/events.md +3 -3
- package/docs/getting-started.md +1 -1
- package/docs/llms-full.txt +401 -117
- package/docs/migrations.md +2 -2
- package/docs/schema.md +19 -10
- package/docs/services.md +116 -26
- package/package.json +8 -4
- package/stager/generics.js +205 -0
- package/stager/stage.js +39 -3
- package/template/AGENTS.md +110 -72
- package/template/db/public.ts +1 -1
- package/template/{controllers → modules/health}/health.controller.ts +1 -1
- package/template/modules/health/health.module.ts +24 -0
- package/template/modules/notes/note.service.test.ts +49 -0
- package/template/modules/notes/note.service.ts +108 -0
- package/template/{controllers → modules/notes}/notes.controller.ts +17 -11
- package/template/modules/notes/notes.module.ts +37 -0
- package/template/package.json +5 -3
- package/template/scripts/test.sh +33 -0
- package/template/tsconfig.json +29 -30
- package/dist/chunk-35PNTIRN.js.map +0 -1
- package/dist/chunk-CJSKYY76.js +0 -627
- package/dist/chunk-CJSKYY76.js.map +0 -1
- package/dist/chunk-CRQKCRGF.js +0 -276
- package/dist/chunk-CRQKCRGF.js.map +0 -1
- package/dist/chunk-G4R6BTLV.js +0 -662
- package/dist/chunk-G4R6BTLV.js.map +0 -1
- package/dist/chunk-VDF2T4AS.js.map +0 -1
- package/dist/chunk-XABBC7JP.js +0 -55
- package/dist/chunk-XABBC7JP.js.map +0 -1
- package/dist/endpoint-CTEHhb7A.d.ts +0 -2386
- package/dist/endpoint-DYHMo6cC.d.cts +0 -2386
- package/dist/index-CW21M9Z3.d.ts +0 -1222
- package/dist/index-CmBK76nx.d.cts +0 -1222
- package/template/services/note.service.test.ts +0 -45
- package/template/services/note.service.ts +0 -76
- /package/dist/{chunk-7D4SUZUM.js.map → chunk-VXPNPVAG.js.map} +0 -0
- /package/template/{models/notes → modules/notes/dto}/create.ts +0 -0
package/dist/openapi/index.cjs
CHANGED
|
@@ -5,6 +5,7 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
8
9
|
var __commonJS = (cb, mod) => function __require() {
|
|
9
10
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
10
11
|
};
|
|
@@ -34,14 +35,19 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
34
35
|
var require_array = __commonJS({
|
|
35
36
|
"../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/array.js"(exports2) {
|
|
36
37
|
"use strict";
|
|
37
|
-
Object.defineProperty(exports2, "__esModule", {
|
|
38
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
39
|
+
value: true
|
|
40
|
+
});
|
|
38
41
|
exports2.splitWhen = exports2.flatten = void 0;
|
|
39
42
|
function flatten(items) {
|
|
40
43
|
return items.reduce((collection, item) => [].concat(collection, item), []);
|
|
41
44
|
}
|
|
45
|
+
__name(flatten, "flatten");
|
|
42
46
|
exports2.flatten = flatten;
|
|
43
47
|
function splitWhen(items, predicate) {
|
|
44
|
-
const result = [
|
|
48
|
+
const result = [
|
|
49
|
+
[]
|
|
50
|
+
];
|
|
45
51
|
let groupIndex = 0;
|
|
46
52
|
for (const item of items) {
|
|
47
53
|
if (predicate(item)) {
|
|
@@ -53,6 +59,7 @@ var require_array = __commonJS({
|
|
|
53
59
|
}
|
|
54
60
|
return result;
|
|
55
61
|
}
|
|
62
|
+
__name(splitWhen, "splitWhen");
|
|
56
63
|
exports2.splitWhen = splitWhen;
|
|
57
64
|
}
|
|
58
65
|
});
|
|
@@ -61,11 +68,14 @@ var require_array = __commonJS({
|
|
|
61
68
|
var require_errno = __commonJS({
|
|
62
69
|
"../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/errno.js"(exports2) {
|
|
63
70
|
"use strict";
|
|
64
|
-
Object.defineProperty(exports2, "__esModule", {
|
|
71
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
72
|
+
value: true
|
|
73
|
+
});
|
|
65
74
|
exports2.isEnoentCodeError = void 0;
|
|
66
75
|
function isEnoentCodeError(error) {
|
|
67
76
|
return error.code === "ENOENT";
|
|
68
77
|
}
|
|
78
|
+
__name(isEnoentCodeError, "isEnoentCodeError");
|
|
69
79
|
exports2.isEnoentCodeError = isEnoentCodeError;
|
|
70
80
|
}
|
|
71
81
|
});
|
|
@@ -74,9 +84,14 @@ var require_errno = __commonJS({
|
|
|
74
84
|
var require_fs = __commonJS({
|
|
75
85
|
"../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/fs.js"(exports2) {
|
|
76
86
|
"use strict";
|
|
77
|
-
Object.defineProperty(exports2, "__esModule", {
|
|
87
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
88
|
+
value: true
|
|
89
|
+
});
|
|
78
90
|
exports2.createDirentFromStats = void 0;
|
|
79
|
-
var DirentFromStats = class {
|
|
91
|
+
var DirentFromStats = class DirentFromStats {
|
|
92
|
+
static {
|
|
93
|
+
__name(this, "DirentFromStats");
|
|
94
|
+
}
|
|
80
95
|
constructor(name, stats) {
|
|
81
96
|
this.name = name;
|
|
82
97
|
this.isBlockDevice = stats.isBlockDevice.bind(stats);
|
|
@@ -91,6 +106,7 @@ var require_fs = __commonJS({
|
|
|
91
106
|
function createDirentFromStats(name, stats) {
|
|
92
107
|
return new DirentFromStats(name, stats);
|
|
93
108
|
}
|
|
109
|
+
__name(createDirentFromStats, "createDirentFromStats");
|
|
94
110
|
exports2.createDirentFromStats = createDirentFromStats;
|
|
95
111
|
}
|
|
96
112
|
});
|
|
@@ -99,7 +115,9 @@ var require_fs = __commonJS({
|
|
|
99
115
|
var require_path = __commonJS({
|
|
100
116
|
"../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/path.js"(exports2) {
|
|
101
117
|
"use strict";
|
|
102
|
-
Object.defineProperty(exports2, "__esModule", {
|
|
118
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
119
|
+
value: true
|
|
120
|
+
});
|
|
103
121
|
exports2.convertPosixPathToPattern = exports2.convertWindowsPathToPattern = exports2.convertPathToPattern = exports2.escapePosixPath = exports2.escapeWindowsPath = exports2.escape = exports2.removeLeadingDotSegment = exports2.makeAbsolute = exports2.unixify = void 0;
|
|
104
122
|
var os = require("os");
|
|
105
123
|
var path2 = require("path");
|
|
@@ -112,10 +130,12 @@ var require_path = __commonJS({
|
|
|
112
130
|
function unixify(filepath) {
|
|
113
131
|
return filepath.replace(/\\/g, "/");
|
|
114
132
|
}
|
|
133
|
+
__name(unixify, "unixify");
|
|
115
134
|
exports2.unixify = unixify;
|
|
116
135
|
function makeAbsolute(cwd, filepath) {
|
|
117
136
|
return path2.resolve(cwd, filepath);
|
|
118
137
|
}
|
|
138
|
+
__name(makeAbsolute, "makeAbsolute");
|
|
119
139
|
exports2.makeAbsolute = makeAbsolute;
|
|
120
140
|
function removeLeadingDotSegment(entry) {
|
|
121
141
|
if (entry.charAt(0) === ".") {
|
|
@@ -126,24 +146,29 @@ var require_path = __commonJS({
|
|
|
126
146
|
}
|
|
127
147
|
return entry;
|
|
128
148
|
}
|
|
149
|
+
__name(removeLeadingDotSegment, "removeLeadingDotSegment");
|
|
129
150
|
exports2.removeLeadingDotSegment = removeLeadingDotSegment;
|
|
130
151
|
exports2.escape = IS_WINDOWS_PLATFORM ? escapeWindowsPath : escapePosixPath;
|
|
131
152
|
function escapeWindowsPath(pattern) {
|
|
132
153
|
return pattern.replace(WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE, "\\$2");
|
|
133
154
|
}
|
|
155
|
+
__name(escapeWindowsPath, "escapeWindowsPath");
|
|
134
156
|
exports2.escapeWindowsPath = escapeWindowsPath;
|
|
135
157
|
function escapePosixPath(pattern) {
|
|
136
158
|
return pattern.replace(POSIX_UNESCAPED_GLOB_SYMBOLS_RE, "\\$2");
|
|
137
159
|
}
|
|
160
|
+
__name(escapePosixPath, "escapePosixPath");
|
|
138
161
|
exports2.escapePosixPath = escapePosixPath;
|
|
139
162
|
exports2.convertPathToPattern = IS_WINDOWS_PLATFORM ? convertWindowsPathToPattern : convertPosixPathToPattern;
|
|
140
163
|
function convertWindowsPathToPattern(filepath) {
|
|
141
164
|
return escapeWindowsPath(filepath).replace(DOS_DEVICE_PATH_RE, "//$1").replace(WINDOWS_BACKSLASHES_RE, "/");
|
|
142
165
|
}
|
|
166
|
+
__name(convertWindowsPathToPattern, "convertWindowsPathToPattern");
|
|
143
167
|
exports2.convertWindowsPathToPattern = convertWindowsPathToPattern;
|
|
144
168
|
function convertPosixPathToPattern(filepath) {
|
|
145
169
|
return escapePosixPath(filepath);
|
|
146
170
|
}
|
|
171
|
+
__name(convertPosixPathToPattern, "convertPosixPathToPattern");
|
|
147
172
|
exports2.convertPosixPathToPattern = convertPosixPathToPattern;
|
|
148
173
|
}
|
|
149
174
|
});
|
|
@@ -152,7 +177,7 @@ var require_path = __commonJS({
|
|
|
152
177
|
var require_is_extglob = __commonJS({
|
|
153
178
|
"../node_modules/.pnpm/is-extglob@2.1.1/node_modules/is-extglob/index.js"(exports2, module2) {
|
|
154
179
|
"use strict";
|
|
155
|
-
module2.exports = function isExtglob(str) {
|
|
180
|
+
module2.exports = /* @__PURE__ */ __name(function isExtglob(str) {
|
|
156
181
|
if (typeof str !== "string" || str === "") {
|
|
157
182
|
return false;
|
|
158
183
|
}
|
|
@@ -162,7 +187,7 @@ var require_is_extglob = __commonJS({
|
|
|
162
187
|
str = str.slice(match.index + match[0].length);
|
|
163
188
|
}
|
|
164
189
|
return false;
|
|
165
|
-
};
|
|
190
|
+
}, "isExtglob");
|
|
166
191
|
}
|
|
167
192
|
});
|
|
168
193
|
|
|
@@ -171,8 +196,12 @@ var require_is_glob = __commonJS({
|
|
|
171
196
|
"../node_modules/.pnpm/is-glob@4.0.3/node_modules/is-glob/index.js"(exports2, module2) {
|
|
172
197
|
"use strict";
|
|
173
198
|
var isExtglob = require_is_extglob();
|
|
174
|
-
var chars = {
|
|
175
|
-
|
|
199
|
+
var chars = {
|
|
200
|
+
"{": "}",
|
|
201
|
+
"(": ")",
|
|
202
|
+
"[": "]"
|
|
203
|
+
};
|
|
204
|
+
var strictCheck = /* @__PURE__ */ __name(function(str) {
|
|
176
205
|
if (str[0] === "!") {
|
|
177
206
|
return true;
|
|
178
207
|
}
|
|
@@ -253,8 +282,8 @@ var require_is_glob = __commonJS({
|
|
|
253
282
|
}
|
|
254
283
|
}
|
|
255
284
|
return false;
|
|
256
|
-
};
|
|
257
|
-
var relaxedCheck = function(str) {
|
|
285
|
+
}, "strictCheck");
|
|
286
|
+
var relaxedCheck = /* @__PURE__ */ __name(function(str) {
|
|
258
287
|
if (str[0] === "!") {
|
|
259
288
|
return true;
|
|
260
289
|
}
|
|
@@ -281,8 +310,8 @@ var require_is_glob = __commonJS({
|
|
|
281
310
|
}
|
|
282
311
|
}
|
|
283
312
|
return false;
|
|
284
|
-
};
|
|
285
|
-
module2.exports = function isGlob(str, options) {
|
|
313
|
+
}, "relaxedCheck");
|
|
314
|
+
module2.exports = /* @__PURE__ */ __name(function isGlob(str, options) {
|
|
286
315
|
if (typeof str !== "string" || str === "") {
|
|
287
316
|
return false;
|
|
288
317
|
}
|
|
@@ -294,7 +323,7 @@ var require_is_glob = __commonJS({
|
|
|
294
323
|
check = relaxedCheck;
|
|
295
324
|
}
|
|
296
325
|
return check(str);
|
|
297
|
-
};
|
|
326
|
+
}, "isGlob");
|
|
298
327
|
}
|
|
299
328
|
});
|
|
300
329
|
|
|
@@ -310,8 +339,10 @@ var require_glob_parent = __commonJS({
|
|
|
310
339
|
var enclosure = /[\{\[].*[\}\]]$/;
|
|
311
340
|
var globby = /(^|[^\\])([\{\[]|\([^\)]+$)/;
|
|
312
341
|
var escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g;
|
|
313
|
-
module2.exports = function globParent(str, opts) {
|
|
314
|
-
var options = Object.assign({
|
|
342
|
+
module2.exports = /* @__PURE__ */ __name(function globParent(str, opts) {
|
|
343
|
+
var options = Object.assign({
|
|
344
|
+
flipBackslashes: true
|
|
345
|
+
}, opts);
|
|
315
346
|
if (options.flipBackslashes && isWin32 && str.indexOf(slash) < 0) {
|
|
316
347
|
str = str.replace(backslash, slash);
|
|
317
348
|
}
|
|
@@ -323,7 +354,7 @@ var require_glob_parent = __commonJS({
|
|
|
323
354
|
str = pathPosixDirname(str);
|
|
324
355
|
} while (isGlob(str) || globby.test(str));
|
|
325
356
|
return str.replace(escaped, "$1");
|
|
326
|
-
};
|
|
357
|
+
}, "globParent");
|
|
327
358
|
}
|
|
328
359
|
});
|
|
329
360
|
|
|
@@ -390,7 +421,7 @@ var require_utils = __commonJS({
|
|
|
390
421
|
}, []);
|
|
391
422
|
exports2.flatten = (...args) => {
|
|
392
423
|
const result = [];
|
|
393
|
-
const flat = (arr) => {
|
|
424
|
+
const flat = /* @__PURE__ */ __name((arr) => {
|
|
394
425
|
for (let i = 0; i < arr.length; i++) {
|
|
395
426
|
const ele = arr[i];
|
|
396
427
|
if (Array.isArray(ele)) {
|
|
@@ -402,7 +433,7 @@ var require_utils = __commonJS({
|
|
|
402
433
|
}
|
|
403
434
|
}
|
|
404
435
|
return result;
|
|
405
|
-
};
|
|
436
|
+
}, "flat");
|
|
406
437
|
flat(args);
|
|
407
438
|
return result;
|
|
408
439
|
};
|
|
@@ -415,7 +446,7 @@ var require_stringify = __commonJS({
|
|
|
415
446
|
"use strict";
|
|
416
447
|
var utils = require_utils();
|
|
417
448
|
module2.exports = (ast, options = {}) => {
|
|
418
|
-
const stringify = (node, parent = {}) => {
|
|
449
|
+
const stringify = /* @__PURE__ */ __name((node, parent = {}) => {
|
|
419
450
|
const invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent);
|
|
420
451
|
const invalidNode = node.invalid === true && options.escapeInvalid === true;
|
|
421
452
|
let output = "";
|
|
@@ -434,7 +465,7 @@ var require_stringify = __commonJS({
|
|
|
434
465
|
}
|
|
435
466
|
}
|
|
436
467
|
return output;
|
|
437
|
-
};
|
|
468
|
+
}, "stringify");
|
|
438
469
|
return stringify(ast);
|
|
439
470
|
};
|
|
440
471
|
}
|
|
@@ -461,7 +492,7 @@ var require_to_regex_range = __commonJS({
|
|
|
461
492
|
"../node_modules/.pnpm/to-regex-range@5.0.1/node_modules/to-regex-range/index.js"(exports2, module2) {
|
|
462
493
|
"use strict";
|
|
463
494
|
var isNumber = require_is_number();
|
|
464
|
-
var toRegexRange = (min, max, options) => {
|
|
495
|
+
var toRegexRange = /* @__PURE__ */ __name((min, max, options) => {
|
|
465
496
|
if (isNumber(min) === false) {
|
|
466
497
|
throw new TypeError("toRegexRange: expected the first argument to be a number");
|
|
467
498
|
}
|
|
@@ -471,7 +502,10 @@ var require_to_regex_range = __commonJS({
|
|
|
471
502
|
if (isNumber(max) === false) {
|
|
472
503
|
throw new TypeError("toRegexRange: expected the second argument to be a number.");
|
|
473
504
|
}
|
|
474
|
-
let opts = {
|
|
505
|
+
let opts = {
|
|
506
|
+
relaxZeros: true,
|
|
507
|
+
...options
|
|
508
|
+
};
|
|
475
509
|
if (typeof opts.strictZeros === "boolean") {
|
|
476
510
|
opts.relaxZeros = opts.strictZeros === false;
|
|
477
511
|
}
|
|
@@ -496,7 +530,12 @@ var require_to_regex_range = __commonJS({
|
|
|
496
530
|
return `(?:${result})`;
|
|
497
531
|
}
|
|
498
532
|
let isPadded = hasPadding(min) || hasPadding(max);
|
|
499
|
-
let state = {
|
|
533
|
+
let state = {
|
|
534
|
+
min,
|
|
535
|
+
max,
|
|
536
|
+
a,
|
|
537
|
+
b
|
|
538
|
+
};
|
|
500
539
|
let positives = [];
|
|
501
540
|
let negatives = [];
|
|
502
541
|
if (isPadded) {
|
|
@@ -521,7 +560,7 @@ var require_to_regex_range = __commonJS({
|
|
|
521
560
|
}
|
|
522
561
|
toRegexRange.cache[cacheKey] = state;
|
|
523
562
|
return state.result;
|
|
524
|
-
};
|
|
563
|
+
}, "toRegexRange");
|
|
525
564
|
function collatePatterns(neg, pos, options) {
|
|
526
565
|
let onlyNegative = filterPatterns(neg, pos, "-", false, options) || [];
|
|
527
566
|
let onlyPositive = filterPatterns(pos, neg, "", false, options) || [];
|
|
@@ -529,11 +568,14 @@ var require_to_regex_range = __commonJS({
|
|
|
529
568
|
let subpatterns = onlyNegative.concat(intersected).concat(onlyPositive);
|
|
530
569
|
return subpatterns.join("|");
|
|
531
570
|
}
|
|
571
|
+
__name(collatePatterns, "collatePatterns");
|
|
532
572
|
function splitToRanges(min, max) {
|
|
533
573
|
let nines = 1;
|
|
534
574
|
let zeros = 1;
|
|
535
575
|
let stop = countNines(min, nines);
|
|
536
|
-
let stops = /* @__PURE__ */ new Set([
|
|
576
|
+
let stops = /* @__PURE__ */ new Set([
|
|
577
|
+
max
|
|
578
|
+
]);
|
|
537
579
|
while (min <= stop && stop <= max) {
|
|
538
580
|
stops.add(stop);
|
|
539
581
|
nines += 1;
|
|
@@ -545,13 +587,20 @@ var require_to_regex_range = __commonJS({
|
|
|
545
587
|
zeros += 1;
|
|
546
588
|
stop = countZeros(max + 1, zeros) - 1;
|
|
547
589
|
}
|
|
548
|
-
stops = [
|
|
590
|
+
stops = [
|
|
591
|
+
...stops
|
|
592
|
+
];
|
|
549
593
|
stops.sort(compare);
|
|
550
594
|
return stops;
|
|
551
595
|
}
|
|
596
|
+
__name(splitToRanges, "splitToRanges");
|
|
552
597
|
function rangeToPattern(start, stop, options) {
|
|
553
598
|
if (start === stop) {
|
|
554
|
-
return {
|
|
599
|
+
return {
|
|
600
|
+
pattern: start,
|
|
601
|
+
count: [],
|
|
602
|
+
digits: 0
|
|
603
|
+
};
|
|
555
604
|
}
|
|
556
605
|
let zipped = zip(start, stop);
|
|
557
606
|
let digits = zipped.length;
|
|
@@ -570,8 +619,15 @@ var require_to_regex_range = __commonJS({
|
|
|
570
619
|
if (count) {
|
|
571
620
|
pattern += options.shorthand === true ? "\\d" : "[0-9]";
|
|
572
621
|
}
|
|
573
|
-
return {
|
|
622
|
+
return {
|
|
623
|
+
pattern,
|
|
624
|
+
count: [
|
|
625
|
+
count
|
|
626
|
+
],
|
|
627
|
+
digits
|
|
628
|
+
};
|
|
574
629
|
}
|
|
630
|
+
__name(rangeToPattern, "rangeToPattern");
|
|
575
631
|
function splitToPatterns(min, max, tok, options) {
|
|
576
632
|
let ranges = splitToRanges(min, max);
|
|
577
633
|
let tokens = [];
|
|
@@ -600,6 +656,7 @@ var require_to_regex_range = __commonJS({
|
|
|
600
656
|
}
|
|
601
657
|
return tokens;
|
|
602
658
|
}
|
|
659
|
+
__name(splitToPatterns, "splitToPatterns");
|
|
603
660
|
function filterPatterns(arr, comparison, prefix, intersection, options) {
|
|
604
661
|
let result = [];
|
|
605
662
|
for (let ele of arr) {
|
|
@@ -613,23 +670,32 @@ var require_to_regex_range = __commonJS({
|
|
|
613
670
|
}
|
|
614
671
|
return result;
|
|
615
672
|
}
|
|
673
|
+
__name(filterPatterns, "filterPatterns");
|
|
616
674
|
function zip(a, b) {
|
|
617
675
|
let arr = [];
|
|
618
|
-
for (let i = 0; i < a.length; i++) arr.push([
|
|
676
|
+
for (let i = 0; i < a.length; i++) arr.push([
|
|
677
|
+
a[i],
|
|
678
|
+
b[i]
|
|
679
|
+
]);
|
|
619
680
|
return arr;
|
|
620
681
|
}
|
|
682
|
+
__name(zip, "zip");
|
|
621
683
|
function compare(a, b) {
|
|
622
684
|
return a > b ? 1 : b > a ? -1 : 0;
|
|
623
685
|
}
|
|
686
|
+
__name(compare, "compare");
|
|
624
687
|
function contains(arr, key, val) {
|
|
625
688
|
return arr.some((ele) => ele[key] === val);
|
|
626
689
|
}
|
|
690
|
+
__name(contains, "contains");
|
|
627
691
|
function countNines(min, len) {
|
|
628
692
|
return Number(String(min).slice(0, -len) + "9".repeat(len));
|
|
629
693
|
}
|
|
694
|
+
__name(countNines, "countNines");
|
|
630
695
|
function countZeros(integer, zeros) {
|
|
631
696
|
return integer - integer % Math.pow(10, zeros);
|
|
632
697
|
}
|
|
698
|
+
__name(countZeros, "countZeros");
|
|
633
699
|
function toQuantifier(digits) {
|
|
634
700
|
let [start = 0, stop = ""] = digits;
|
|
635
701
|
if (stop || start > 1) {
|
|
@@ -637,12 +703,15 @@ var require_to_regex_range = __commonJS({
|
|
|
637
703
|
}
|
|
638
704
|
return "";
|
|
639
705
|
}
|
|
706
|
+
__name(toQuantifier, "toQuantifier");
|
|
640
707
|
function toCharacterClass(a, b, options) {
|
|
641
708
|
return `[${a}${b - a === 1 ? "" : "-"}${b}]`;
|
|
642
709
|
}
|
|
710
|
+
__name(toCharacterClass, "toCharacterClass");
|
|
643
711
|
function hasPadding(str) {
|
|
644
712
|
return /^-?(0+)\d/.test(str);
|
|
645
713
|
}
|
|
714
|
+
__name(hasPadding, "hasPadding");
|
|
646
715
|
function padZeros(value, tok, options) {
|
|
647
716
|
if (!tok.isPadded) {
|
|
648
717
|
return value;
|
|
@@ -661,6 +730,7 @@ var require_to_regex_range = __commonJS({
|
|
|
661
730
|
}
|
|
662
731
|
}
|
|
663
732
|
}
|
|
733
|
+
__name(padZeros, "padZeros");
|
|
664
734
|
toRegexRange.cache = {};
|
|
665
735
|
toRegexRange.clearCache = () => toRegexRange.cache = {};
|
|
666
736
|
module2.exports = toRegexRange;
|
|
@@ -673,29 +743,29 @@ var require_fill_range = __commonJS({
|
|
|
673
743
|
"use strict";
|
|
674
744
|
var util = require("util");
|
|
675
745
|
var toRegexRange = require_to_regex_range();
|
|
676
|
-
var isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val);
|
|
677
|
-
var transform = (toNumber) => {
|
|
746
|
+
var isObject = /* @__PURE__ */ __name((val) => val !== null && typeof val === "object" && !Array.isArray(val), "isObject");
|
|
747
|
+
var transform = /* @__PURE__ */ __name((toNumber) => {
|
|
678
748
|
return (value) => toNumber === true ? Number(value) : String(value);
|
|
679
|
-
};
|
|
680
|
-
var isValidValue = (value) => {
|
|
749
|
+
}, "transform");
|
|
750
|
+
var isValidValue = /* @__PURE__ */ __name((value) => {
|
|
681
751
|
return typeof value === "number" || typeof value === "string" && value !== "";
|
|
682
|
-
};
|
|
683
|
-
var isNumber = (num) => Number.isInteger(+num);
|
|
684
|
-
var zeros = (input) => {
|
|
752
|
+
}, "isValidValue");
|
|
753
|
+
var isNumber = /* @__PURE__ */ __name((num) => Number.isInteger(+num), "isNumber");
|
|
754
|
+
var zeros = /* @__PURE__ */ __name((input) => {
|
|
685
755
|
let value = `${input}`;
|
|
686
756
|
let index = -1;
|
|
687
757
|
if (value[0] === "-") value = value.slice(1);
|
|
688
758
|
if (value === "0") return false;
|
|
689
759
|
while (value[++index] === "0") ;
|
|
690
760
|
return index > 0;
|
|
691
|
-
};
|
|
692
|
-
var stringify = (start, end, options) => {
|
|
761
|
+
}, "zeros");
|
|
762
|
+
var stringify = /* @__PURE__ */ __name((start, end, options) => {
|
|
693
763
|
if (typeof start === "string" || typeof end === "string") {
|
|
694
764
|
return true;
|
|
695
765
|
}
|
|
696
766
|
return options.stringify === true;
|
|
697
|
-
};
|
|
698
|
-
var pad = (input, maxLength, toNumber) => {
|
|
767
|
+
}, "stringify");
|
|
768
|
+
var pad = /* @__PURE__ */ __name((input, maxLength, toNumber) => {
|
|
699
769
|
if (maxLength > 0) {
|
|
700
770
|
let dash = input[0] === "-" ? "-" : "";
|
|
701
771
|
if (dash) input = input.slice(1);
|
|
@@ -705,8 +775,8 @@ var require_fill_range = __commonJS({
|
|
|
705
775
|
return String(input);
|
|
706
776
|
}
|
|
707
777
|
return input;
|
|
708
|
-
};
|
|
709
|
-
var toMaxLen = (input, maxLength) => {
|
|
778
|
+
}, "pad");
|
|
779
|
+
var toMaxLen = /* @__PURE__ */ __name((input, maxLength) => {
|
|
710
780
|
let negative = input[0] === "-" ? "-" : "";
|
|
711
781
|
if (negative) {
|
|
712
782
|
input = input.slice(1);
|
|
@@ -714,8 +784,8 @@ var require_fill_range = __commonJS({
|
|
|
714
784
|
}
|
|
715
785
|
while (input.length < maxLength) input = "0" + input;
|
|
716
786
|
return negative ? "-" + input : input;
|
|
717
|
-
};
|
|
718
|
-
var toSequence = (parts, options, maxLen) => {
|
|
787
|
+
}, "toMaxLen");
|
|
788
|
+
var toSequence = /* @__PURE__ */ __name((parts, options, maxLen) => {
|
|
719
789
|
parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
|
|
720
790
|
parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
|
|
721
791
|
let prefix = options.capture ? "" : "?:";
|
|
@@ -737,42 +807,51 @@ var require_fill_range = __commonJS({
|
|
|
737
807
|
return `(${prefix}${result})`;
|
|
738
808
|
}
|
|
739
809
|
return result;
|
|
740
|
-
};
|
|
741
|
-
var toRange = (a, b, isNumbers, options) => {
|
|
810
|
+
}, "toSequence");
|
|
811
|
+
var toRange = /* @__PURE__ */ __name((a, b, isNumbers, options) => {
|
|
742
812
|
if (isNumbers) {
|
|
743
|
-
return toRegexRange(a, b, {
|
|
813
|
+
return toRegexRange(a, b, {
|
|
814
|
+
wrap: false,
|
|
815
|
+
...options
|
|
816
|
+
});
|
|
744
817
|
}
|
|
745
818
|
let start = String.fromCharCode(a);
|
|
746
819
|
if (a === b) return start;
|
|
747
820
|
let stop = String.fromCharCode(b);
|
|
748
821
|
return `[${start}-${stop}]`;
|
|
749
|
-
};
|
|
750
|
-
var toRegex = (start, end, options) => {
|
|
822
|
+
}, "toRange");
|
|
823
|
+
var toRegex = /* @__PURE__ */ __name((start, end, options) => {
|
|
751
824
|
if (Array.isArray(start)) {
|
|
752
825
|
let wrap = options.wrap === true;
|
|
753
826
|
let prefix = options.capture ? "" : "?:";
|
|
754
827
|
return wrap ? `(${prefix}${start.join("|")})` : start.join("|");
|
|
755
828
|
}
|
|
756
829
|
return toRegexRange(start, end, options);
|
|
757
|
-
};
|
|
758
|
-
var rangeError = (...args) => {
|
|
830
|
+
}, "toRegex");
|
|
831
|
+
var rangeError = /* @__PURE__ */ __name((...args) => {
|
|
759
832
|
return new RangeError("Invalid range arguments: " + util.inspect(...args));
|
|
760
|
-
};
|
|
761
|
-
var invalidRange = (start, end, options) => {
|
|
762
|
-
if (options.strictRanges === true) throw rangeError([
|
|
833
|
+
}, "rangeError");
|
|
834
|
+
var invalidRange = /* @__PURE__ */ __name((start, end, options) => {
|
|
835
|
+
if (options.strictRanges === true) throw rangeError([
|
|
836
|
+
start,
|
|
837
|
+
end
|
|
838
|
+
]);
|
|
763
839
|
return [];
|
|
764
|
-
};
|
|
765
|
-
var invalidStep = (step, options) => {
|
|
840
|
+
}, "invalidRange");
|
|
841
|
+
var invalidStep = /* @__PURE__ */ __name((step, options) => {
|
|
766
842
|
if (options.strictRanges === true) {
|
|
767
843
|
throw new TypeError(`Expected step "${step}" to be a number`);
|
|
768
844
|
}
|
|
769
845
|
return [];
|
|
770
|
-
};
|
|
771
|
-
var fillNumbers = (start, end, step = 1, options = {}) => {
|
|
846
|
+
}, "invalidStep");
|
|
847
|
+
var fillNumbers = /* @__PURE__ */ __name((start, end, step = 1, options = {}) => {
|
|
772
848
|
let a = Number(start);
|
|
773
849
|
let b = Number(end);
|
|
774
850
|
if (!Number.isInteger(a) || !Number.isInteger(b)) {
|
|
775
|
-
if (options.strictRanges === true) throw rangeError([
|
|
851
|
+
if (options.strictRanges === true) throw rangeError([
|
|
852
|
+
start,
|
|
853
|
+
end
|
|
854
|
+
]);
|
|
776
855
|
return [];
|
|
777
856
|
}
|
|
778
857
|
if (a === 0) a = 0;
|
|
@@ -789,8 +868,11 @@ var require_fill_range = __commonJS({
|
|
|
789
868
|
if (options.toRegex && step === 1) {
|
|
790
869
|
return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options);
|
|
791
870
|
}
|
|
792
|
-
let parts = {
|
|
793
|
-
|
|
871
|
+
let parts = {
|
|
872
|
+
negatives: [],
|
|
873
|
+
positives: []
|
|
874
|
+
};
|
|
875
|
+
let push = /* @__PURE__ */ __name((num) => parts[num < 0 ? "negatives" : "positives"].push(Math.abs(num)), "push");
|
|
794
876
|
let range = [];
|
|
795
877
|
let index = 0;
|
|
796
878
|
while (descending ? a >= b : a <= b) {
|
|
@@ -803,11 +885,14 @@ var require_fill_range = __commonJS({
|
|
|
803
885
|
index++;
|
|
804
886
|
}
|
|
805
887
|
if (options.toRegex === true) {
|
|
806
|
-
return step > 1 ? toSequence(parts, options, maxLen) : toRegex(range, null, {
|
|
888
|
+
return step > 1 ? toSequence(parts, options, maxLen) : toRegex(range, null, {
|
|
889
|
+
wrap: false,
|
|
890
|
+
...options
|
|
891
|
+
});
|
|
807
892
|
}
|
|
808
893
|
return range;
|
|
809
|
-
};
|
|
810
|
-
var fillLetters = (start, end, step = 1, options = {}) => {
|
|
894
|
+
}, "fillNumbers");
|
|
895
|
+
var fillLetters = /* @__PURE__ */ __name((start, end, step = 1, options = {}) => {
|
|
811
896
|
if (!isNumber(start) && start.length > 1 || !isNumber(end) && end.length > 1) {
|
|
812
897
|
return invalidRange(start, end, options);
|
|
813
898
|
}
|
|
@@ -828,24 +913,33 @@ var require_fill_range = __commonJS({
|
|
|
828
913
|
index++;
|
|
829
914
|
}
|
|
830
915
|
if (options.toRegex === true) {
|
|
831
|
-
return toRegex(range, null, {
|
|
916
|
+
return toRegex(range, null, {
|
|
917
|
+
wrap: false,
|
|
918
|
+
options
|
|
919
|
+
});
|
|
832
920
|
}
|
|
833
921
|
return range;
|
|
834
|
-
};
|
|
835
|
-
var fill = (start, end, step, options = {}) => {
|
|
922
|
+
}, "fillLetters");
|
|
923
|
+
var fill = /* @__PURE__ */ __name((start, end, step, options = {}) => {
|
|
836
924
|
if (end == null && isValidValue(start)) {
|
|
837
|
-
return [
|
|
925
|
+
return [
|
|
926
|
+
start
|
|
927
|
+
];
|
|
838
928
|
}
|
|
839
929
|
if (!isValidValue(start) || !isValidValue(end)) {
|
|
840
930
|
return invalidRange(start, end, options);
|
|
841
931
|
}
|
|
842
932
|
if (typeof step === "function") {
|
|
843
|
-
return fill(start, end, 1, {
|
|
933
|
+
return fill(start, end, 1, {
|
|
934
|
+
transform: step
|
|
935
|
+
});
|
|
844
936
|
}
|
|
845
937
|
if (isObject(step)) {
|
|
846
938
|
return fill(start, end, 0, step);
|
|
847
939
|
}
|
|
848
|
-
let opts = {
|
|
940
|
+
let opts = {
|
|
941
|
+
...options
|
|
942
|
+
};
|
|
849
943
|
if (opts.capture === true) opts.wrap = true;
|
|
850
944
|
step = step || opts.step || 1;
|
|
851
945
|
if (!isNumber(step)) {
|
|
@@ -856,7 +950,7 @@ var require_fill_range = __commonJS({
|
|
|
856
950
|
return fillNumbers(start, end, step, opts);
|
|
857
951
|
}
|
|
858
952
|
return fillLetters(start, end, Math.max(Math.abs(step), 1), opts);
|
|
859
|
-
};
|
|
953
|
+
}, "fill");
|
|
860
954
|
module2.exports = fill;
|
|
861
955
|
}
|
|
862
956
|
});
|
|
@@ -867,8 +961,8 @@ var require_compile = __commonJS({
|
|
|
867
961
|
"use strict";
|
|
868
962
|
var fill = require_fill_range();
|
|
869
963
|
var utils = require_utils();
|
|
870
|
-
var compile = (ast, options = {}) => {
|
|
871
|
-
const walk = (node, parent = {}) => {
|
|
964
|
+
var compile = /* @__PURE__ */ __name((ast, options = {}) => {
|
|
965
|
+
const walk = /* @__PURE__ */ __name((node, parent = {}) => {
|
|
872
966
|
const invalidBlock = utils.isInvalidBrace(parent);
|
|
873
967
|
const invalidNode = node.invalid === true && options.escapeInvalid === true;
|
|
874
968
|
const invalid = invalidBlock === true || invalidNode === true;
|
|
@@ -895,7 +989,12 @@ var require_compile = __commonJS({
|
|
|
895
989
|
}
|
|
896
990
|
if (node.nodes && node.ranges > 0) {
|
|
897
991
|
const args = utils.reduce(node.nodes);
|
|
898
|
-
const range = fill(...args, {
|
|
992
|
+
const range = fill(...args, {
|
|
993
|
+
...options,
|
|
994
|
+
wrap: false,
|
|
995
|
+
toRegex: true,
|
|
996
|
+
strictZeros: true
|
|
997
|
+
});
|
|
899
998
|
if (range.length !== 0) {
|
|
900
999
|
return args.length > 1 && range.length > 1 ? `(${range})` : range;
|
|
901
1000
|
}
|
|
@@ -906,9 +1005,9 @@ var require_compile = __commonJS({
|
|
|
906
1005
|
}
|
|
907
1006
|
}
|
|
908
1007
|
return output;
|
|
909
|
-
};
|
|
1008
|
+
}, "walk");
|
|
910
1009
|
return walk(ast);
|
|
911
|
-
};
|
|
1010
|
+
}, "compile");
|
|
912
1011
|
module2.exports = compile;
|
|
913
1012
|
}
|
|
914
1013
|
});
|
|
@@ -920,7 +1019,7 @@ var require_expand = __commonJS({
|
|
|
920
1019
|
var fill = require_fill_range();
|
|
921
1020
|
var stringify = require_stringify();
|
|
922
1021
|
var utils = require_utils();
|
|
923
|
-
var append = (queue = "", stash = "", enclose = false) => {
|
|
1022
|
+
var append = /* @__PURE__ */ __name((queue = "", stash = "", enclose = false) => {
|
|
924
1023
|
const result = [];
|
|
925
1024
|
queue = [].concat(queue);
|
|
926
1025
|
stash = [].concat(stash);
|
|
@@ -941,10 +1040,10 @@ var require_expand = __commonJS({
|
|
|
941
1040
|
}
|
|
942
1041
|
}
|
|
943
1042
|
return utils.flatten(result);
|
|
944
|
-
};
|
|
945
|
-
var expand = (ast, options = {}) => {
|
|
1043
|
+
}, "append");
|
|
1044
|
+
var expand = /* @__PURE__ */ __name((ast, options = {}) => {
|
|
946
1045
|
const rangeLimit = options.rangeLimit === void 0 ? 1e3 : options.rangeLimit;
|
|
947
|
-
const walk = (node, parent = {}) => {
|
|
1046
|
+
const walk = /* @__PURE__ */ __name((node, parent = {}) => {
|
|
948
1047
|
node.queue = [];
|
|
949
1048
|
let p = parent;
|
|
950
1049
|
let q = parent.queue;
|
|
@@ -957,7 +1056,9 @@ var require_expand = __commonJS({
|
|
|
957
1056
|
return;
|
|
958
1057
|
}
|
|
959
1058
|
if (node.type === "brace" && node.invalid !== true && node.nodes.length === 2) {
|
|
960
|
-
q.push(append(q.pop(), [
|
|
1059
|
+
q.push(append(q.pop(), [
|
|
1060
|
+
"{}"
|
|
1061
|
+
]));
|
|
961
1062
|
return;
|
|
962
1063
|
}
|
|
963
1064
|
if (node.nodes && node.ranges > 0) {
|
|
@@ -1000,9 +1101,9 @@ var require_expand = __commonJS({
|
|
|
1000
1101
|
}
|
|
1001
1102
|
}
|
|
1002
1103
|
return queue;
|
|
1003
|
-
};
|
|
1104
|
+
}, "walk");
|
|
1004
1105
|
return utils.flatten(walk(ast));
|
|
1005
|
-
};
|
|
1106
|
+
}, "expand");
|
|
1006
1107
|
module2.exports = expand;
|
|
1007
1108
|
}
|
|
1008
1109
|
});
|
|
@@ -1142,7 +1243,7 @@ var require_parse = __commonJS({
|
|
|
1142
1243
|
CHAR_NO_BREAK_SPACE,
|
|
1143
1244
|
CHAR_ZERO_WIDTH_NOBREAK_SPACE
|
|
1144
1245
|
} = require_constants();
|
|
1145
|
-
var parse = (input, options = {}) => {
|
|
1246
|
+
var parse = /* @__PURE__ */ __name((input, options = {}) => {
|
|
1146
1247
|
if (typeof input !== "string") {
|
|
1147
1248
|
throw new TypeError("Expected a string");
|
|
1148
1249
|
}
|
|
@@ -1151,8 +1252,14 @@ var require_parse = __commonJS({
|
|
|
1151
1252
|
if (input.length > max) {
|
|
1152
1253
|
throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`);
|
|
1153
1254
|
}
|
|
1154
|
-
const ast = {
|
|
1155
|
-
|
|
1255
|
+
const ast = {
|
|
1256
|
+
type: "root",
|
|
1257
|
+
input,
|
|
1258
|
+
nodes: []
|
|
1259
|
+
};
|
|
1260
|
+
const stack = [
|
|
1261
|
+
ast
|
|
1262
|
+
];
|
|
1156
1263
|
let block = ast;
|
|
1157
1264
|
let prev = ast;
|
|
1158
1265
|
let brackets = 0;
|
|
@@ -1160,8 +1267,8 @@ var require_parse = __commonJS({
|
|
|
1160
1267
|
let index = 0;
|
|
1161
1268
|
let depth = 0;
|
|
1162
1269
|
let value;
|
|
1163
|
-
const advance = () => input[index++];
|
|
1164
|
-
const push = (node) => {
|
|
1270
|
+
const advance = /* @__PURE__ */ __name(() => input[index++], "advance");
|
|
1271
|
+
const push = /* @__PURE__ */ __name((node) => {
|
|
1165
1272
|
if (node.type === "text" && prev.type === "dot") {
|
|
1166
1273
|
prev.type = "text";
|
|
1167
1274
|
}
|
|
@@ -1174,8 +1281,10 @@ var require_parse = __commonJS({
|
|
|
1174
1281
|
node.prev = prev;
|
|
1175
1282
|
prev = node;
|
|
1176
1283
|
return node;
|
|
1177
|
-
};
|
|
1178
|
-
push({
|
|
1284
|
+
}, "push");
|
|
1285
|
+
push({
|
|
1286
|
+
type: "bos"
|
|
1287
|
+
});
|
|
1179
1288
|
while (index < length) {
|
|
1180
1289
|
block = stack[stack.length - 1];
|
|
1181
1290
|
value = advance();
|
|
@@ -1183,11 +1292,17 @@ var require_parse = __commonJS({
|
|
|
1183
1292
|
continue;
|
|
1184
1293
|
}
|
|
1185
1294
|
if (value === CHAR_BACKSLASH) {
|
|
1186
|
-
push({
|
|
1295
|
+
push({
|
|
1296
|
+
type: "text",
|
|
1297
|
+
value: (options.keepEscaping ? value : "") + advance()
|
|
1298
|
+
});
|
|
1187
1299
|
continue;
|
|
1188
1300
|
}
|
|
1189
1301
|
if (value === CHAR_RIGHT_SQUARE_BRACKET) {
|
|
1190
|
-
push({
|
|
1302
|
+
push({
|
|
1303
|
+
type: "text",
|
|
1304
|
+
value: "\\" + value
|
|
1305
|
+
});
|
|
1191
1306
|
continue;
|
|
1192
1307
|
}
|
|
1193
1308
|
if (value === CHAR_LEFT_SQUARE_BRACKET) {
|
|
@@ -1210,22 +1325,37 @@ var require_parse = __commonJS({
|
|
|
1210
1325
|
}
|
|
1211
1326
|
}
|
|
1212
1327
|
}
|
|
1213
|
-
push({
|
|
1328
|
+
push({
|
|
1329
|
+
type: "text",
|
|
1330
|
+
value
|
|
1331
|
+
});
|
|
1214
1332
|
continue;
|
|
1215
1333
|
}
|
|
1216
1334
|
if (value === CHAR_LEFT_PARENTHESES) {
|
|
1217
|
-
block = push({
|
|
1335
|
+
block = push({
|
|
1336
|
+
type: "paren",
|
|
1337
|
+
nodes: []
|
|
1338
|
+
});
|
|
1218
1339
|
stack.push(block);
|
|
1219
|
-
push({
|
|
1340
|
+
push({
|
|
1341
|
+
type: "text",
|
|
1342
|
+
value
|
|
1343
|
+
});
|
|
1220
1344
|
continue;
|
|
1221
1345
|
}
|
|
1222
1346
|
if (value === CHAR_RIGHT_PARENTHESES) {
|
|
1223
1347
|
if (block.type !== "paren") {
|
|
1224
|
-
push({
|
|
1348
|
+
push({
|
|
1349
|
+
type: "text",
|
|
1350
|
+
value
|
|
1351
|
+
});
|
|
1225
1352
|
continue;
|
|
1226
1353
|
}
|
|
1227
1354
|
block = stack.pop();
|
|
1228
|
-
push({
|
|
1355
|
+
push({
|
|
1356
|
+
type: "text",
|
|
1357
|
+
value
|
|
1358
|
+
});
|
|
1229
1359
|
block = stack[stack.length - 1];
|
|
1230
1360
|
continue;
|
|
1231
1361
|
}
|
|
@@ -1246,7 +1376,10 @@ var require_parse = __commonJS({
|
|
|
1246
1376
|
}
|
|
1247
1377
|
value += next;
|
|
1248
1378
|
}
|
|
1249
|
-
push({
|
|
1379
|
+
push({
|
|
1380
|
+
type: "text",
|
|
1381
|
+
value
|
|
1382
|
+
});
|
|
1250
1383
|
continue;
|
|
1251
1384
|
}
|
|
1252
1385
|
if (value === CHAR_LEFT_CURLY_BRACE) {
|
|
@@ -1264,18 +1397,27 @@ var require_parse = __commonJS({
|
|
|
1264
1397
|
};
|
|
1265
1398
|
block = push(brace);
|
|
1266
1399
|
stack.push(block);
|
|
1267
|
-
push({
|
|
1400
|
+
push({
|
|
1401
|
+
type: "open",
|
|
1402
|
+
value
|
|
1403
|
+
});
|
|
1268
1404
|
continue;
|
|
1269
1405
|
}
|
|
1270
1406
|
if (value === CHAR_RIGHT_CURLY_BRACE) {
|
|
1271
1407
|
if (block.type !== "brace") {
|
|
1272
|
-
push({
|
|
1408
|
+
push({
|
|
1409
|
+
type: "text",
|
|
1410
|
+
value
|
|
1411
|
+
});
|
|
1273
1412
|
continue;
|
|
1274
1413
|
}
|
|
1275
1414
|
const type = "close";
|
|
1276
1415
|
block = stack.pop();
|
|
1277
1416
|
block.close = true;
|
|
1278
|
-
push({
|
|
1417
|
+
push({
|
|
1418
|
+
type,
|
|
1419
|
+
value
|
|
1420
|
+
});
|
|
1279
1421
|
depth--;
|
|
1280
1422
|
block = stack[stack.length - 1];
|
|
1281
1423
|
continue;
|
|
@@ -1284,16 +1426,28 @@ var require_parse = __commonJS({
|
|
|
1284
1426
|
if (block.ranges > 0) {
|
|
1285
1427
|
block.ranges = 0;
|
|
1286
1428
|
const open = block.nodes.shift();
|
|
1287
|
-
block.nodes = [
|
|
1429
|
+
block.nodes = [
|
|
1430
|
+
open,
|
|
1431
|
+
{
|
|
1432
|
+
type: "text",
|
|
1433
|
+
value: stringify(block)
|
|
1434
|
+
}
|
|
1435
|
+
];
|
|
1288
1436
|
}
|
|
1289
|
-
push({
|
|
1437
|
+
push({
|
|
1438
|
+
type: "comma",
|
|
1439
|
+
value
|
|
1440
|
+
});
|
|
1290
1441
|
block.commas++;
|
|
1291
1442
|
continue;
|
|
1292
1443
|
}
|
|
1293
1444
|
if (value === CHAR_DOT && depth > 0 && block.commas === 0) {
|
|
1294
1445
|
const siblings = block.nodes;
|
|
1295
1446
|
if (depth === 0 || siblings.length === 0) {
|
|
1296
|
-
push({
|
|
1447
|
+
push({
|
|
1448
|
+
type: "text",
|
|
1449
|
+
value
|
|
1450
|
+
});
|
|
1297
1451
|
continue;
|
|
1298
1452
|
}
|
|
1299
1453
|
if (prev.type === "dot") {
|
|
@@ -1318,10 +1472,16 @@ var require_parse = __commonJS({
|
|
|
1318
1472
|
block.ranges--;
|
|
1319
1473
|
continue;
|
|
1320
1474
|
}
|
|
1321
|
-
push({
|
|
1475
|
+
push({
|
|
1476
|
+
type: "dot",
|
|
1477
|
+
value
|
|
1478
|
+
});
|
|
1322
1479
|
continue;
|
|
1323
1480
|
}
|
|
1324
|
-
push({
|
|
1481
|
+
push({
|
|
1482
|
+
type: "text",
|
|
1483
|
+
value
|
|
1484
|
+
});
|
|
1325
1485
|
}
|
|
1326
1486
|
do {
|
|
1327
1487
|
block = stack.pop();
|
|
@@ -1339,9 +1499,11 @@ var require_parse = __commonJS({
|
|
|
1339
1499
|
parent.nodes.splice(index2, 1, ...block.nodes);
|
|
1340
1500
|
}
|
|
1341
1501
|
} while (stack.length > 0);
|
|
1342
|
-
push({
|
|
1502
|
+
push({
|
|
1503
|
+
type: "eos"
|
|
1504
|
+
});
|
|
1343
1505
|
return ast;
|
|
1344
|
-
};
|
|
1506
|
+
}, "parse");
|
|
1345
1507
|
module2.exports = parse;
|
|
1346
1508
|
}
|
|
1347
1509
|
});
|
|
@@ -1354,7 +1516,7 @@ var require_braces = __commonJS({
|
|
|
1354
1516
|
var compile = require_compile();
|
|
1355
1517
|
var expand = require_expand();
|
|
1356
1518
|
var parse = require_parse();
|
|
1357
|
-
var braces = (input, options = {}) => {
|
|
1519
|
+
var braces = /* @__PURE__ */ __name((input, options = {}) => {
|
|
1358
1520
|
let output = [];
|
|
1359
1521
|
if (Array.isArray(input)) {
|
|
1360
1522
|
for (const pattern of input) {
|
|
@@ -1369,10 +1531,12 @@ var require_braces = __commonJS({
|
|
|
1369
1531
|
output = [].concat(braces.create(input, options));
|
|
1370
1532
|
}
|
|
1371
1533
|
if (options && options.expand === true && options.nodupes === true) {
|
|
1372
|
-
output = [
|
|
1534
|
+
output = [
|
|
1535
|
+
...new Set(output)
|
|
1536
|
+
];
|
|
1373
1537
|
}
|
|
1374
1538
|
return output;
|
|
1375
|
-
};
|
|
1539
|
+
}, "braces");
|
|
1376
1540
|
braces.parse = (input, options = {}) => parse(input, options);
|
|
1377
1541
|
braces.stringify = (input, options = {}) => {
|
|
1378
1542
|
if (typeof input === "string") {
|
|
@@ -1395,13 +1559,17 @@ var require_braces = __commonJS({
|
|
|
1395
1559
|
result = result.filter(Boolean);
|
|
1396
1560
|
}
|
|
1397
1561
|
if (options.nodupes === true) {
|
|
1398
|
-
result = [
|
|
1562
|
+
result = [
|
|
1563
|
+
...new Set(result)
|
|
1564
|
+
];
|
|
1399
1565
|
}
|
|
1400
1566
|
return result;
|
|
1401
1567
|
};
|
|
1402
1568
|
braces.create = (input, options = {}) => {
|
|
1403
1569
|
if (input === "" || input.length < 3) {
|
|
1404
|
-
return [
|
|
1570
|
+
return [
|
|
1571
|
+
input
|
|
1572
|
+
];
|
|
1405
1573
|
}
|
|
1406
1574
|
return options.expand !== true ? braces.compile(input, options) : braces.expand(input, options);
|
|
1407
1575
|
};
|
|
@@ -1589,20 +1757,40 @@ var require_constants2 = __commonJS({
|
|
|
1589
1757
|
/* \uFEFF */
|
|
1590
1758
|
SEP: path2.sep,
|
|
1591
1759
|
/**
|
|
1592
|
-
|
|
1593
|
-
|
|
1760
|
+
* Create EXTGLOB_CHARS
|
|
1761
|
+
*/
|
|
1594
1762
|
extglobChars(chars) {
|
|
1595
1763
|
return {
|
|
1596
|
-
"!": {
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1764
|
+
"!": {
|
|
1765
|
+
type: "negate",
|
|
1766
|
+
open: "(?:(?!(?:",
|
|
1767
|
+
close: `))${chars.STAR})`
|
|
1768
|
+
},
|
|
1769
|
+
"?": {
|
|
1770
|
+
type: "qmark",
|
|
1771
|
+
open: "(?:",
|
|
1772
|
+
close: ")?"
|
|
1773
|
+
},
|
|
1774
|
+
"+": {
|
|
1775
|
+
type: "plus",
|
|
1776
|
+
open: "(?:",
|
|
1777
|
+
close: ")+"
|
|
1778
|
+
},
|
|
1779
|
+
"*": {
|
|
1780
|
+
type: "star",
|
|
1781
|
+
open: "(?:",
|
|
1782
|
+
close: ")*"
|
|
1783
|
+
},
|
|
1784
|
+
"@": {
|
|
1785
|
+
type: "at",
|
|
1786
|
+
open: "(?:",
|
|
1787
|
+
close: ")"
|
|
1788
|
+
}
|
|
1601
1789
|
};
|
|
1602
1790
|
},
|
|
1603
1791
|
/**
|
|
1604
|
-
|
|
1605
|
-
|
|
1792
|
+
* Create GLOB_CHARS
|
|
1793
|
+
*/
|
|
1606
1794
|
globChars(win32) {
|
|
1607
1795
|
return win32 === true ? WINDOWS_CHARS : POSIX_CHARS;
|
|
1608
1796
|
}
|
|
@@ -1616,12 +1804,7 @@ var require_utils2 = __commonJS({
|
|
|
1616
1804
|
"use strict";
|
|
1617
1805
|
var path2 = require("path");
|
|
1618
1806
|
var win32 = process.platform === "win32";
|
|
1619
|
-
var {
|
|
1620
|
-
REGEX_BACKSLASH,
|
|
1621
|
-
REGEX_REMOVE_BACKSLASH,
|
|
1622
|
-
REGEX_SPECIAL_CHARS,
|
|
1623
|
-
REGEX_SPECIAL_CHARS_GLOBAL
|
|
1624
|
-
} = require_constants2();
|
|
1807
|
+
var { REGEX_BACKSLASH, REGEX_REMOVE_BACKSLASH, REGEX_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_GLOBAL } = require_constants2();
|
|
1625
1808
|
exports2.isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val);
|
|
1626
1809
|
exports2.hasRegexChars = (str) => REGEX_SPECIAL_CHARS.test(str);
|
|
1627
1810
|
exports2.isRegexChar = (str) => str.length === 1 && exports2.hasRegexChars(str);
|
|
@@ -1708,15 +1891,15 @@ var require_scan = __commonJS({
|
|
|
1708
1891
|
CHAR_RIGHT_SQUARE_BRACKET
|
|
1709
1892
|
/* ] */
|
|
1710
1893
|
} = require_constants2();
|
|
1711
|
-
var isPathSeparator = (code) => {
|
|
1894
|
+
var isPathSeparator = /* @__PURE__ */ __name((code) => {
|
|
1712
1895
|
return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
|
|
1713
|
-
};
|
|
1714
|
-
var depth = (token) => {
|
|
1896
|
+
}, "isPathSeparator");
|
|
1897
|
+
var depth = /* @__PURE__ */ __name((token) => {
|
|
1715
1898
|
if (token.isPrefix !== true) {
|
|
1716
1899
|
token.depth = token.isGlobstar ? Infinity : 1;
|
|
1717
1900
|
}
|
|
1718
|
-
};
|
|
1719
|
-
var scan = (input, options) => {
|
|
1901
|
+
}, "depth");
|
|
1902
|
+
var scan = /* @__PURE__ */ __name((input, options) => {
|
|
1720
1903
|
const opts = options || {};
|
|
1721
1904
|
const length = input.length - 1;
|
|
1722
1905
|
const scanToEnd = opts.parts === true || opts.scanToEnd === true;
|
|
@@ -1740,13 +1923,17 @@ var require_scan = __commonJS({
|
|
|
1740
1923
|
let braces = 0;
|
|
1741
1924
|
let prev;
|
|
1742
1925
|
let code;
|
|
1743
|
-
let token = {
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1926
|
+
let token = {
|
|
1927
|
+
value: "",
|
|
1928
|
+
depth: 0,
|
|
1929
|
+
isGlob: false
|
|
1930
|
+
};
|
|
1931
|
+
const eos = /* @__PURE__ */ __name(() => index >= length, "eos");
|
|
1932
|
+
const peek = /* @__PURE__ */ __name(() => str.charCodeAt(index + 1), "peek");
|
|
1933
|
+
const advance = /* @__PURE__ */ __name(() => {
|
|
1747
1934
|
prev = code;
|
|
1748
1935
|
return str.charCodeAt(++index);
|
|
1749
|
-
};
|
|
1936
|
+
}, "advance");
|
|
1750
1937
|
while (index < length) {
|
|
1751
1938
|
code = advance();
|
|
1752
1939
|
let next;
|
|
@@ -1806,7 +1993,11 @@ var require_scan = __commonJS({
|
|
|
1806
1993
|
if (code === CHAR_FORWARD_SLASH) {
|
|
1807
1994
|
slashes.push(index);
|
|
1808
1995
|
tokens.push(token);
|
|
1809
|
-
token = {
|
|
1996
|
+
token = {
|
|
1997
|
+
value: "",
|
|
1998
|
+
depth: 0,
|
|
1999
|
+
isGlob: false
|
|
2000
|
+
};
|
|
1810
2001
|
if (finished === true) continue;
|
|
1811
2002
|
if (prev === CHAR_DOT && index === start + 1) {
|
|
1812
2003
|
start += 2;
|
|
@@ -1996,7 +2187,7 @@ var require_scan = __commonJS({
|
|
|
1996
2187
|
state.parts = parts;
|
|
1997
2188
|
}
|
|
1998
2189
|
return state;
|
|
1999
|
-
};
|
|
2190
|
+
}, "scan");
|
|
2000
2191
|
module2.exports = scan;
|
|
2001
2192
|
}
|
|
2002
2193
|
});
|
|
@@ -2007,14 +2198,8 @@ var require_parse2 = __commonJS({
|
|
|
2007
2198
|
"use strict";
|
|
2008
2199
|
var constants = require_constants2();
|
|
2009
2200
|
var utils = require_utils2();
|
|
2010
|
-
var {
|
|
2011
|
-
|
|
2012
|
-
POSIX_REGEX_SOURCE,
|
|
2013
|
-
REGEX_NON_SPECIAL_CHARS,
|
|
2014
|
-
REGEX_SPECIAL_CHARS_BACKREF,
|
|
2015
|
-
REPLACEMENTS
|
|
2016
|
-
} = constants;
|
|
2017
|
-
var expandRange = (args, options) => {
|
|
2201
|
+
var { MAX_LENGTH, POSIX_REGEX_SOURCE, REGEX_NON_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_BACKREF, REPLACEMENTS } = constants;
|
|
2202
|
+
var expandRange = /* @__PURE__ */ __name((args, options) => {
|
|
2018
2203
|
if (typeof options.expandRange === "function") {
|
|
2019
2204
|
return options.expandRange(...args, options);
|
|
2020
2205
|
}
|
|
@@ -2026,11 +2211,11 @@ var require_parse2 = __commonJS({
|
|
|
2026
2211
|
return args.map((v) => utils.escapeRegex(v)).join("..");
|
|
2027
2212
|
}
|
|
2028
2213
|
return value;
|
|
2029
|
-
};
|
|
2030
|
-
var syntaxError = (type, char) => {
|
|
2214
|
+
}, "expandRange");
|
|
2215
|
+
var syntaxError = /* @__PURE__ */ __name((type, char) => {
|
|
2031
2216
|
return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
|
|
2032
|
-
};
|
|
2033
|
-
var splitTopLevel = (input) => {
|
|
2217
|
+
}, "syntaxError");
|
|
2218
|
+
var splitTopLevel = /* @__PURE__ */ __name((input) => {
|
|
2034
2219
|
const parts = [];
|
|
2035
2220
|
let bracket = 0;
|
|
2036
2221
|
let paren = 0;
|
|
@@ -2074,8 +2259,8 @@ var require_parse2 = __commonJS({
|
|
|
2074
2259
|
}
|
|
2075
2260
|
parts.push(value);
|
|
2076
2261
|
return parts;
|
|
2077
|
-
};
|
|
2078
|
-
var isPlainBranch = (branch) => {
|
|
2262
|
+
}, "splitTopLevel");
|
|
2263
|
+
var isPlainBranch = /* @__PURE__ */ __name((branch) => {
|
|
2079
2264
|
let escaped = false;
|
|
2080
2265
|
for (const ch of branch) {
|
|
2081
2266
|
if (escaped === true) {
|
|
@@ -2091,8 +2276,8 @@ var require_parse2 = __commonJS({
|
|
|
2091
2276
|
}
|
|
2092
2277
|
}
|
|
2093
2278
|
return true;
|
|
2094
|
-
};
|
|
2095
|
-
var normalizeSimpleBranch = (branch) => {
|
|
2279
|
+
}, "isPlainBranch");
|
|
2280
|
+
var normalizeSimpleBranch = /* @__PURE__ */ __name((branch) => {
|
|
2096
2281
|
let value = branch.trim();
|
|
2097
2282
|
let changed = true;
|
|
2098
2283
|
while (changed === true) {
|
|
@@ -2106,8 +2291,8 @@ var require_parse2 = __commonJS({
|
|
|
2106
2291
|
return;
|
|
2107
2292
|
}
|
|
2108
2293
|
return value.replace(/\\(.)/g, "$1");
|
|
2109
|
-
};
|
|
2110
|
-
var hasRepeatedCharPrefixOverlap = (branches) => {
|
|
2294
|
+
}, "normalizeSimpleBranch");
|
|
2295
|
+
var hasRepeatedCharPrefixOverlap = /* @__PURE__ */ __name((branches) => {
|
|
2111
2296
|
const values = branches.map(normalizeSimpleBranch).filter(Boolean);
|
|
2112
2297
|
for (let i = 0; i < values.length; i++) {
|
|
2113
2298
|
for (let j = i + 1; j < values.length; j++) {
|
|
@@ -2123,8 +2308,8 @@ var require_parse2 = __commonJS({
|
|
|
2123
2308
|
}
|
|
2124
2309
|
}
|
|
2125
2310
|
return false;
|
|
2126
|
-
};
|
|
2127
|
-
var parseRepeatedExtglob = (pattern, requireEnd = true) => {
|
|
2311
|
+
}, "hasRepeatedCharPrefixOverlap");
|
|
2312
|
+
var parseRepeatedExtglob = /* @__PURE__ */ __name((pattern, requireEnd = true) => {
|
|
2128
2313
|
if (pattern[0] !== "+" && pattern[0] !== "*" || pattern[1] !== "(") {
|
|
2129
2314
|
return;
|
|
2130
2315
|
}
|
|
@@ -2178,8 +2363,8 @@ var require_parse2 = __commonJS({
|
|
|
2178
2363
|
}
|
|
2179
2364
|
}
|
|
2180
2365
|
}
|
|
2181
|
-
};
|
|
2182
|
-
var getStarExtglobSequenceOutput = (pattern) => {
|
|
2366
|
+
}, "parseRepeatedExtglob");
|
|
2367
|
+
var getStarExtglobSequenceOutput = /* @__PURE__ */ __name((pattern) => {
|
|
2183
2368
|
let index = 0;
|
|
2184
2369
|
const chars = [];
|
|
2185
2370
|
while (index < pattern.length) {
|
|
@@ -2203,8 +2388,8 @@ var require_parse2 = __commonJS({
|
|
|
2203
2388
|
}
|
|
2204
2389
|
const source = chars.length === 1 ? utils.escapeRegex(chars[0]) : `[${chars.map((ch) => utils.escapeRegex(ch)).join("")}]`;
|
|
2205
2390
|
return `${source}*`;
|
|
2206
|
-
};
|
|
2207
|
-
var repeatedExtglobRecursion = (pattern) => {
|
|
2391
|
+
}, "getStarExtglobSequenceOutput");
|
|
2392
|
+
var repeatedExtglobRecursion = /* @__PURE__ */ __name((pattern) => {
|
|
2208
2393
|
let depth = 0;
|
|
2209
2394
|
let value = pattern.trim();
|
|
2210
2395
|
let match = parseRepeatedExtglob(value);
|
|
@@ -2214,63 +2399,69 @@ var require_parse2 = __commonJS({
|
|
|
2214
2399
|
match = parseRepeatedExtglob(value);
|
|
2215
2400
|
}
|
|
2216
2401
|
return depth;
|
|
2217
|
-
};
|
|
2218
|
-
var analyzeRepeatedExtglob = (body, options) => {
|
|
2402
|
+
}, "repeatedExtglobRecursion");
|
|
2403
|
+
var analyzeRepeatedExtglob = /* @__PURE__ */ __name((body, options) => {
|
|
2219
2404
|
if (options.maxExtglobRecursion === false) {
|
|
2220
|
-
return {
|
|
2405
|
+
return {
|
|
2406
|
+
risky: false
|
|
2407
|
+
};
|
|
2221
2408
|
}
|
|
2222
2409
|
const max = typeof options.maxExtglobRecursion === "number" ? options.maxExtglobRecursion : constants.DEFAULT_MAX_EXTGLOB_RECURSION;
|
|
2223
2410
|
const branches = splitTopLevel(body).map((branch) => branch.trim());
|
|
2224
2411
|
if (branches.length > 1) {
|
|
2225
2412
|
if (branches.some((branch) => branch === "") || branches.some((branch) => /^[*?]+$/.test(branch)) || hasRepeatedCharPrefixOverlap(branches)) {
|
|
2226
|
-
return {
|
|
2413
|
+
return {
|
|
2414
|
+
risky: true
|
|
2415
|
+
};
|
|
2227
2416
|
}
|
|
2228
2417
|
}
|
|
2229
2418
|
for (const branch of branches) {
|
|
2230
2419
|
const safeOutput = getStarExtglobSequenceOutput(branch);
|
|
2231
2420
|
if (safeOutput) {
|
|
2232
|
-
return {
|
|
2421
|
+
return {
|
|
2422
|
+
risky: true,
|
|
2423
|
+
safeOutput
|
|
2424
|
+
};
|
|
2233
2425
|
}
|
|
2234
2426
|
if (repeatedExtglobRecursion(branch) > max) {
|
|
2235
|
-
return {
|
|
2427
|
+
return {
|
|
2428
|
+
risky: true
|
|
2429
|
+
};
|
|
2236
2430
|
}
|
|
2237
2431
|
}
|
|
2238
|
-
return {
|
|
2239
|
-
|
|
2240
|
-
|
|
2432
|
+
return {
|
|
2433
|
+
risky: false
|
|
2434
|
+
};
|
|
2435
|
+
}, "analyzeRepeatedExtglob");
|
|
2436
|
+
var parse = /* @__PURE__ */ __name((input, options) => {
|
|
2241
2437
|
if (typeof input !== "string") {
|
|
2242
2438
|
throw new TypeError("Expected a string");
|
|
2243
2439
|
}
|
|
2244
2440
|
input = REPLACEMENTS[input] || input;
|
|
2245
|
-
const opts = {
|
|
2441
|
+
const opts = {
|
|
2442
|
+
...options
|
|
2443
|
+
};
|
|
2246
2444
|
const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
|
|
2247
2445
|
let len = input.length;
|
|
2248
2446
|
if (len > max) {
|
|
2249
2447
|
throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
|
|
2250
2448
|
}
|
|
2251
|
-
const bos = {
|
|
2252
|
-
|
|
2449
|
+
const bos = {
|
|
2450
|
+
type: "bos",
|
|
2451
|
+
value: "",
|
|
2452
|
+
output: opts.prepend || ""
|
|
2453
|
+
};
|
|
2454
|
+
const tokens = [
|
|
2455
|
+
bos
|
|
2456
|
+
];
|
|
2253
2457
|
const capture = opts.capture ? "" : "?:";
|
|
2254
2458
|
const win32 = utils.isWindows(options);
|
|
2255
2459
|
const PLATFORM_CHARS = constants.globChars(win32);
|
|
2256
2460
|
const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS);
|
|
2257
|
-
const {
|
|
2258
|
-
|
|
2259
|
-
PLUS_LITERAL,
|
|
2260
|
-
SLASH_LITERAL,
|
|
2261
|
-
ONE_CHAR,
|
|
2262
|
-
DOTS_SLASH,
|
|
2263
|
-
NO_DOT,
|
|
2264
|
-
NO_DOT_SLASH,
|
|
2265
|
-
NO_DOTS_SLASH,
|
|
2266
|
-
QMARK,
|
|
2267
|
-
QMARK_NO_DOT,
|
|
2268
|
-
STAR,
|
|
2269
|
-
START_ANCHOR
|
|
2270
|
-
} = PLATFORM_CHARS;
|
|
2271
|
-
const globstar = (opts2) => {
|
|
2461
|
+
const { DOT_LITERAL, PLUS_LITERAL, SLASH_LITERAL, ONE_CHAR, DOTS_SLASH, NO_DOT, NO_DOT_SLASH, NO_DOTS_SLASH, QMARK, QMARK_NO_DOT, STAR, START_ANCHOR } = PLATFORM_CHARS;
|
|
2462
|
+
const globstar = /* @__PURE__ */ __name((opts2) => {
|
|
2272
2463
|
return `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
|
|
2273
|
-
};
|
|
2464
|
+
}, "globstar");
|
|
2274
2465
|
const nodot = opts.dot ? "" : NO_DOT;
|
|
2275
2466
|
const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT;
|
|
2276
2467
|
let star = opts.bash === true ? globstar(opts) : STAR;
|
|
@@ -2304,19 +2495,19 @@ var require_parse2 = __commonJS({
|
|
|
2304
2495
|
const stack = [];
|
|
2305
2496
|
let prev = bos;
|
|
2306
2497
|
let value;
|
|
2307
|
-
const eos = () => state.index === len - 1;
|
|
2498
|
+
const eos = /* @__PURE__ */ __name(() => state.index === len - 1, "eos");
|
|
2308
2499
|
const peek = state.peek = (n = 1) => input[state.index + n];
|
|
2309
2500
|
const advance = state.advance = () => input[++state.index] || "";
|
|
2310
|
-
const remaining = () => input.slice(state.index + 1);
|
|
2311
|
-
const consume = (value2 = "", num = 0) => {
|
|
2501
|
+
const remaining = /* @__PURE__ */ __name(() => input.slice(state.index + 1), "remaining");
|
|
2502
|
+
const consume = /* @__PURE__ */ __name((value2 = "", num = 0) => {
|
|
2312
2503
|
state.consumed += value2;
|
|
2313
2504
|
state.index += num;
|
|
2314
|
-
};
|
|
2315
|
-
const append = (token) => {
|
|
2505
|
+
}, "consume");
|
|
2506
|
+
const append = /* @__PURE__ */ __name((token) => {
|
|
2316
2507
|
state.output += token.output != null ? token.output : token.value;
|
|
2317
2508
|
consume(token.value);
|
|
2318
|
-
};
|
|
2319
|
-
const negate = () => {
|
|
2509
|
+
}, "append");
|
|
2510
|
+
const negate = /* @__PURE__ */ __name(() => {
|
|
2320
2511
|
let count = 1;
|
|
2321
2512
|
while (peek() === "!" && (peek(2) !== "(" || peek(3) === "?")) {
|
|
2322
2513
|
advance();
|
|
@@ -2329,16 +2520,16 @@ var require_parse2 = __commonJS({
|
|
|
2329
2520
|
state.negated = true;
|
|
2330
2521
|
state.start++;
|
|
2331
2522
|
return true;
|
|
2332
|
-
};
|
|
2333
|
-
const increment = (type) => {
|
|
2523
|
+
}, "negate");
|
|
2524
|
+
const increment = /* @__PURE__ */ __name((type) => {
|
|
2334
2525
|
state[type]++;
|
|
2335
2526
|
stack.push(type);
|
|
2336
|
-
};
|
|
2337
|
-
const decrement = (type) => {
|
|
2527
|
+
}, "increment");
|
|
2528
|
+
const decrement = /* @__PURE__ */ __name((type) => {
|
|
2338
2529
|
state[type]--;
|
|
2339
2530
|
stack.pop();
|
|
2340
|
-
};
|
|
2341
|
-
const push = (tok) => {
|
|
2531
|
+
}, "decrement");
|
|
2532
|
+
const push = /* @__PURE__ */ __name((tok) => {
|
|
2342
2533
|
if (prev.type === "globstar") {
|
|
2343
2534
|
const isBrace = state.braces > 0 && (tok.type === "comma" || tok.type === "brace");
|
|
2344
2535
|
const isExtglob = tok.extglob === true || extglobs.length && (tok.type === "pipe" || tok.type === "paren");
|
|
@@ -2362,9 +2553,13 @@ var require_parse2 = __commonJS({
|
|
|
2362
2553
|
tok.prev = prev;
|
|
2363
2554
|
tokens.push(tok);
|
|
2364
2555
|
prev = tok;
|
|
2365
|
-
};
|
|
2366
|
-
const extglobOpen = (type, value2) => {
|
|
2367
|
-
const token = {
|
|
2556
|
+
}, "push");
|
|
2557
|
+
const extglobOpen = /* @__PURE__ */ __name((type, value2) => {
|
|
2558
|
+
const token = {
|
|
2559
|
+
...EXTGLOB_CHARS[value2],
|
|
2560
|
+
conditions: 1,
|
|
2561
|
+
inner: ""
|
|
2562
|
+
};
|
|
2368
2563
|
token.prev = prev;
|
|
2369
2564
|
token.parens = state.parens;
|
|
2370
2565
|
token.output = state.output;
|
|
@@ -2372,11 +2567,20 @@ var require_parse2 = __commonJS({
|
|
|
2372
2567
|
token.tokensIndex = tokens.length;
|
|
2373
2568
|
const output = (opts.capture ? "(" : "") + token.open;
|
|
2374
2569
|
increment("parens");
|
|
2375
|
-
push({
|
|
2376
|
-
|
|
2570
|
+
push({
|
|
2571
|
+
type,
|
|
2572
|
+
value: value2,
|
|
2573
|
+
output: state.output ? "" : ONE_CHAR
|
|
2574
|
+
});
|
|
2575
|
+
push({
|
|
2576
|
+
type: "paren",
|
|
2577
|
+
extglob: true,
|
|
2578
|
+
value: advance(),
|
|
2579
|
+
output
|
|
2580
|
+
});
|
|
2377
2581
|
extglobs.push(token);
|
|
2378
|
-
};
|
|
2379
|
-
const extglobClose = (token) => {
|
|
2582
|
+
}, "extglobOpen");
|
|
2583
|
+
const extglobClose = /* @__PURE__ */ __name((token) => {
|
|
2380
2584
|
const literal = input.slice(token.startIndex, state.index + 1);
|
|
2381
2585
|
const body = input.slice(token.startIndex + 2, state.index);
|
|
2382
2586
|
const analysis = analyzeRepeatedExtglob(body, opts);
|
|
@@ -2393,7 +2597,12 @@ var require_parse2 = __commonJS({
|
|
|
2393
2597
|
}
|
|
2394
2598
|
state.output = token.output + open.output;
|
|
2395
2599
|
state.backtrack = true;
|
|
2396
|
-
push({
|
|
2600
|
+
push({
|
|
2601
|
+
type: "paren",
|
|
2602
|
+
extglob: true,
|
|
2603
|
+
value,
|
|
2604
|
+
output: ""
|
|
2605
|
+
});
|
|
2397
2606
|
decrement("parens");
|
|
2398
2607
|
return;
|
|
2399
2608
|
}
|
|
@@ -2408,16 +2617,24 @@ var require_parse2 = __commonJS({
|
|
|
2408
2617
|
output = token.close = `)$))${extglobStar}`;
|
|
2409
2618
|
}
|
|
2410
2619
|
if (token.inner.includes("*") && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) {
|
|
2411
|
-
const expression = parse(rest, {
|
|
2620
|
+
const expression = parse(rest, {
|
|
2621
|
+
...options,
|
|
2622
|
+
fastpaths: false
|
|
2623
|
+
}).output;
|
|
2412
2624
|
output = token.close = `)${expression})${extglobStar})`;
|
|
2413
2625
|
}
|
|
2414
2626
|
if (token.prev.type === "bos") {
|
|
2415
2627
|
state.negatedExtglob = true;
|
|
2416
2628
|
}
|
|
2417
2629
|
}
|
|
2418
|
-
push({
|
|
2630
|
+
push({
|
|
2631
|
+
type: "paren",
|
|
2632
|
+
extglob: true,
|
|
2633
|
+
value,
|
|
2634
|
+
output
|
|
2635
|
+
});
|
|
2419
2636
|
decrement("parens");
|
|
2420
|
-
};
|
|
2637
|
+
}, "extglobClose");
|
|
2421
2638
|
if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) {
|
|
2422
2639
|
let backslashes = false;
|
|
2423
2640
|
let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {
|
|
@@ -2476,7 +2693,10 @@ var require_parse2 = __commonJS({
|
|
|
2476
2693
|
}
|
|
2477
2694
|
if (!next) {
|
|
2478
2695
|
value += "\\";
|
|
2479
|
-
push({
|
|
2696
|
+
push({
|
|
2697
|
+
type: "text",
|
|
2698
|
+
value
|
|
2699
|
+
});
|
|
2480
2700
|
continue;
|
|
2481
2701
|
}
|
|
2482
2702
|
const match = /^\\+/.exec(remaining());
|
|
@@ -2494,7 +2714,10 @@ var require_parse2 = __commonJS({
|
|
|
2494
2714
|
value += advance();
|
|
2495
2715
|
}
|
|
2496
2716
|
if (state.brackets === 0) {
|
|
2497
|
-
push({
|
|
2717
|
+
push({
|
|
2718
|
+
type: "text",
|
|
2719
|
+
value
|
|
2720
|
+
});
|
|
2498
2721
|
continue;
|
|
2499
2722
|
}
|
|
2500
2723
|
}
|
|
@@ -2530,25 +2753,35 @@ var require_parse2 = __commonJS({
|
|
|
2530
2753
|
value = "^";
|
|
2531
2754
|
}
|
|
2532
2755
|
prev.value += value;
|
|
2533
|
-
append({
|
|
2756
|
+
append({
|
|
2757
|
+
value
|
|
2758
|
+
});
|
|
2534
2759
|
continue;
|
|
2535
2760
|
}
|
|
2536
2761
|
if (state.quotes === 1 && value !== '"') {
|
|
2537
2762
|
value = utils.escapeRegex(value);
|
|
2538
2763
|
prev.value += value;
|
|
2539
|
-
append({
|
|
2764
|
+
append({
|
|
2765
|
+
value
|
|
2766
|
+
});
|
|
2540
2767
|
continue;
|
|
2541
2768
|
}
|
|
2542
2769
|
if (value === '"') {
|
|
2543
2770
|
state.quotes = state.quotes === 1 ? 0 : 1;
|
|
2544
2771
|
if (opts.keepQuotes === true) {
|
|
2545
|
-
push({
|
|
2772
|
+
push({
|
|
2773
|
+
type: "text",
|
|
2774
|
+
value
|
|
2775
|
+
});
|
|
2546
2776
|
}
|
|
2547
2777
|
continue;
|
|
2548
2778
|
}
|
|
2549
2779
|
if (value === "(") {
|
|
2550
2780
|
increment("parens");
|
|
2551
|
-
push({
|
|
2781
|
+
push({
|
|
2782
|
+
type: "paren",
|
|
2783
|
+
value
|
|
2784
|
+
});
|
|
2552
2785
|
continue;
|
|
2553
2786
|
}
|
|
2554
2787
|
if (value === ")") {
|
|
@@ -2560,7 +2793,11 @@ var require_parse2 = __commonJS({
|
|
|
2560
2793
|
extglobClose(extglobs.pop());
|
|
2561
2794
|
continue;
|
|
2562
2795
|
}
|
|
2563
|
-
push({
|
|
2796
|
+
push({
|
|
2797
|
+
type: "paren",
|
|
2798
|
+
value,
|
|
2799
|
+
output: state.parens ? ")" : "\\)"
|
|
2800
|
+
});
|
|
2564
2801
|
decrement("parens");
|
|
2565
2802
|
continue;
|
|
2566
2803
|
}
|
|
@@ -2573,19 +2810,30 @@ var require_parse2 = __commonJS({
|
|
|
2573
2810
|
} else {
|
|
2574
2811
|
increment("brackets");
|
|
2575
2812
|
}
|
|
2576
|
-
push({
|
|
2813
|
+
push({
|
|
2814
|
+
type: "bracket",
|
|
2815
|
+
value
|
|
2816
|
+
});
|
|
2577
2817
|
continue;
|
|
2578
2818
|
}
|
|
2579
2819
|
if (value === "]") {
|
|
2580
2820
|
if (opts.nobracket === true || prev && prev.type === "bracket" && prev.value.length === 1) {
|
|
2581
|
-
push({
|
|
2821
|
+
push({
|
|
2822
|
+
type: "text",
|
|
2823
|
+
value,
|
|
2824
|
+
output: `\\${value}`
|
|
2825
|
+
});
|
|
2582
2826
|
continue;
|
|
2583
2827
|
}
|
|
2584
2828
|
if (state.brackets === 0) {
|
|
2585
2829
|
if (opts.strictBrackets === true) {
|
|
2586
2830
|
throw new SyntaxError(syntaxError("opening", "["));
|
|
2587
2831
|
}
|
|
2588
|
-
push({
|
|
2832
|
+
push({
|
|
2833
|
+
type: "text",
|
|
2834
|
+
value,
|
|
2835
|
+
output: `\\${value}`
|
|
2836
|
+
});
|
|
2589
2837
|
continue;
|
|
2590
2838
|
}
|
|
2591
2839
|
decrement("brackets");
|
|
@@ -2594,7 +2842,9 @@ var require_parse2 = __commonJS({
|
|
|
2594
2842
|
value = `/${value}`;
|
|
2595
2843
|
}
|
|
2596
2844
|
prev.value += value;
|
|
2597
|
-
append({
|
|
2845
|
+
append({
|
|
2846
|
+
value
|
|
2847
|
+
});
|
|
2598
2848
|
if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) {
|
|
2599
2849
|
continue;
|
|
2600
2850
|
}
|
|
@@ -2625,7 +2875,11 @@ var require_parse2 = __commonJS({
|
|
|
2625
2875
|
if (value === "}") {
|
|
2626
2876
|
const brace = braces[braces.length - 1];
|
|
2627
2877
|
if (opts.nobrace === true || !brace) {
|
|
2628
|
-
push({
|
|
2878
|
+
push({
|
|
2879
|
+
type: "text",
|
|
2880
|
+
value,
|
|
2881
|
+
output: value
|
|
2882
|
+
});
|
|
2629
2883
|
continue;
|
|
2630
2884
|
}
|
|
2631
2885
|
let output = ")";
|
|
@@ -2654,7 +2908,11 @@ var require_parse2 = __commonJS({
|
|
|
2654
2908
|
state.output += t.output || t.value;
|
|
2655
2909
|
}
|
|
2656
2910
|
}
|
|
2657
|
-
push({
|
|
2911
|
+
push({
|
|
2912
|
+
type: "brace",
|
|
2913
|
+
value,
|
|
2914
|
+
output
|
|
2915
|
+
});
|
|
2658
2916
|
decrement("braces");
|
|
2659
2917
|
braces.pop();
|
|
2660
2918
|
continue;
|
|
@@ -2663,7 +2921,10 @@ var require_parse2 = __commonJS({
|
|
|
2663
2921
|
if (extglobs.length > 0) {
|
|
2664
2922
|
extglobs[extglobs.length - 1].conditions++;
|
|
2665
2923
|
}
|
|
2666
|
-
push({
|
|
2924
|
+
push({
|
|
2925
|
+
type: "text",
|
|
2926
|
+
value
|
|
2927
|
+
});
|
|
2667
2928
|
continue;
|
|
2668
2929
|
}
|
|
2669
2930
|
if (value === ",") {
|
|
@@ -2673,7 +2934,11 @@ var require_parse2 = __commonJS({
|
|
|
2673
2934
|
brace.comma = true;
|
|
2674
2935
|
output = "|";
|
|
2675
2936
|
}
|
|
2676
|
-
push({
|
|
2937
|
+
push({
|
|
2938
|
+
type: "comma",
|
|
2939
|
+
value,
|
|
2940
|
+
output
|
|
2941
|
+
});
|
|
2677
2942
|
continue;
|
|
2678
2943
|
}
|
|
2679
2944
|
if (value === "/") {
|
|
@@ -2685,7 +2950,11 @@ var require_parse2 = __commonJS({
|
|
|
2685
2950
|
prev = bos;
|
|
2686
2951
|
continue;
|
|
2687
2952
|
}
|
|
2688
|
-
push({
|
|
2953
|
+
push({
|
|
2954
|
+
type: "slash",
|
|
2955
|
+
value,
|
|
2956
|
+
output: SLASH_LITERAL
|
|
2957
|
+
});
|
|
2689
2958
|
continue;
|
|
2690
2959
|
}
|
|
2691
2960
|
if (value === ".") {
|
|
@@ -2699,10 +2968,18 @@ var require_parse2 = __commonJS({
|
|
|
2699
2968
|
continue;
|
|
2700
2969
|
}
|
|
2701
2970
|
if (state.braces + state.parens === 0 && prev.type !== "bos" && prev.type !== "slash") {
|
|
2702
|
-
push({
|
|
2971
|
+
push({
|
|
2972
|
+
type: "text",
|
|
2973
|
+
value,
|
|
2974
|
+
output: DOT_LITERAL
|
|
2975
|
+
});
|
|
2703
2976
|
continue;
|
|
2704
2977
|
}
|
|
2705
|
-
push({
|
|
2978
|
+
push({
|
|
2979
|
+
type: "dot",
|
|
2980
|
+
value,
|
|
2981
|
+
output: DOT_LITERAL
|
|
2982
|
+
});
|
|
2706
2983
|
continue;
|
|
2707
2984
|
}
|
|
2708
2985
|
if (value === "?") {
|
|
@@ -2720,14 +2997,26 @@ var require_parse2 = __commonJS({
|
|
|
2720
2997
|
if (prev.value === "(" && !/[!=<:]/.test(next) || next === "<" && !/<([!=]|\w+>)/.test(remaining())) {
|
|
2721
2998
|
output = `\\${value}`;
|
|
2722
2999
|
}
|
|
2723
|
-
push({
|
|
3000
|
+
push({
|
|
3001
|
+
type: "text",
|
|
3002
|
+
value,
|
|
3003
|
+
output
|
|
3004
|
+
});
|
|
2724
3005
|
continue;
|
|
2725
3006
|
}
|
|
2726
3007
|
if (opts.dot !== true && (prev.type === "slash" || prev.type === "bos")) {
|
|
2727
|
-
push({
|
|
3008
|
+
push({
|
|
3009
|
+
type: "qmark",
|
|
3010
|
+
value,
|
|
3011
|
+
output: QMARK_NO_DOT
|
|
3012
|
+
});
|
|
2728
3013
|
continue;
|
|
2729
3014
|
}
|
|
2730
|
-
push({
|
|
3015
|
+
push({
|
|
3016
|
+
type: "qmark",
|
|
3017
|
+
value,
|
|
3018
|
+
output: QMARK
|
|
3019
|
+
});
|
|
2731
3020
|
continue;
|
|
2732
3021
|
}
|
|
2733
3022
|
if (value === "!") {
|
|
@@ -2748,22 +3037,40 @@ var require_parse2 = __commonJS({
|
|
|
2748
3037
|
continue;
|
|
2749
3038
|
}
|
|
2750
3039
|
if (prev && prev.value === "(" || opts.regex === false) {
|
|
2751
|
-
push({
|
|
3040
|
+
push({
|
|
3041
|
+
type: "plus",
|
|
3042
|
+
value,
|
|
3043
|
+
output: PLUS_LITERAL
|
|
3044
|
+
});
|
|
2752
3045
|
continue;
|
|
2753
3046
|
}
|
|
2754
3047
|
if (prev && (prev.type === "bracket" || prev.type === "paren" || prev.type === "brace") || state.parens > 0) {
|
|
2755
|
-
push({
|
|
3048
|
+
push({
|
|
3049
|
+
type: "plus",
|
|
3050
|
+
value
|
|
3051
|
+
});
|
|
2756
3052
|
continue;
|
|
2757
3053
|
}
|
|
2758
|
-
push({
|
|
3054
|
+
push({
|
|
3055
|
+
type: "plus",
|
|
3056
|
+
value: PLUS_LITERAL
|
|
3057
|
+
});
|
|
2759
3058
|
continue;
|
|
2760
3059
|
}
|
|
2761
3060
|
if (value === "@") {
|
|
2762
3061
|
if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") {
|
|
2763
|
-
push({
|
|
3062
|
+
push({
|
|
3063
|
+
type: "at",
|
|
3064
|
+
extglob: true,
|
|
3065
|
+
value,
|
|
3066
|
+
output: ""
|
|
3067
|
+
});
|
|
2764
3068
|
continue;
|
|
2765
3069
|
}
|
|
2766
|
-
push({
|
|
3070
|
+
push({
|
|
3071
|
+
type: "text",
|
|
3072
|
+
value
|
|
3073
|
+
});
|
|
2767
3074
|
continue;
|
|
2768
3075
|
}
|
|
2769
3076
|
if (value !== "*") {
|
|
@@ -2775,7 +3082,10 @@ var require_parse2 = __commonJS({
|
|
|
2775
3082
|
value += match[0];
|
|
2776
3083
|
state.index += match[0].length;
|
|
2777
3084
|
}
|
|
2778
|
-
push({
|
|
3085
|
+
push({
|
|
3086
|
+
type: "text",
|
|
3087
|
+
value
|
|
3088
|
+
});
|
|
2779
3089
|
continue;
|
|
2780
3090
|
}
|
|
2781
3091
|
if (prev && (prev.type === "globstar" || prev.star === true)) {
|
|
@@ -2803,13 +3113,21 @@ var require_parse2 = __commonJS({
|
|
|
2803
3113
|
const isStart = prior.type === "slash" || prior.type === "bos";
|
|
2804
3114
|
const afterStar = before && (before.type === "star" || before.type === "globstar");
|
|
2805
3115
|
if (opts.bash === true && (!isStart || rest[0] && rest[0] !== "/")) {
|
|
2806
|
-
push({
|
|
3116
|
+
push({
|
|
3117
|
+
type: "star",
|
|
3118
|
+
value,
|
|
3119
|
+
output: ""
|
|
3120
|
+
});
|
|
2807
3121
|
continue;
|
|
2808
3122
|
}
|
|
2809
3123
|
const isBrace = state.braces > 0 && (prior.type === "comma" || prior.type === "brace");
|
|
2810
3124
|
const isExtglob = extglobs.length && (prior.type === "pipe" || prior.type === "paren");
|
|
2811
3125
|
if (!isStart && prior.type !== "paren" && !isBrace && !isExtglob) {
|
|
2812
|
-
push({
|
|
3126
|
+
push({
|
|
3127
|
+
type: "star",
|
|
3128
|
+
value,
|
|
3129
|
+
output: ""
|
|
3130
|
+
});
|
|
2813
3131
|
continue;
|
|
2814
3132
|
}
|
|
2815
3133
|
while (rest.slice(0, 3) === "/**") {
|
|
@@ -2850,7 +3168,11 @@ var require_parse2 = __commonJS({
|
|
|
2850
3168
|
state.output += prior.output + prev.output;
|
|
2851
3169
|
state.globstar = true;
|
|
2852
3170
|
consume(value + advance());
|
|
2853
|
-
push({
|
|
3171
|
+
push({
|
|
3172
|
+
type: "slash",
|
|
3173
|
+
value: "/",
|
|
3174
|
+
output: ""
|
|
3175
|
+
});
|
|
2854
3176
|
continue;
|
|
2855
3177
|
}
|
|
2856
3178
|
if (prior.type === "bos" && rest[0] === "/") {
|
|
@@ -2860,7 +3182,11 @@ var require_parse2 = __commonJS({
|
|
|
2860
3182
|
state.output = prev.output;
|
|
2861
3183
|
state.globstar = true;
|
|
2862
3184
|
consume(value + advance());
|
|
2863
|
-
push({
|
|
3185
|
+
push({
|
|
3186
|
+
type: "slash",
|
|
3187
|
+
value: "/",
|
|
3188
|
+
output: ""
|
|
3189
|
+
});
|
|
2864
3190
|
continue;
|
|
2865
3191
|
}
|
|
2866
3192
|
state.output = state.output.slice(0, -prev.output.length);
|
|
@@ -2872,7 +3198,11 @@ var require_parse2 = __commonJS({
|
|
|
2872
3198
|
consume(value);
|
|
2873
3199
|
continue;
|
|
2874
3200
|
}
|
|
2875
|
-
const token = {
|
|
3201
|
+
const token = {
|
|
3202
|
+
type: "star",
|
|
3203
|
+
value,
|
|
3204
|
+
output: star
|
|
3205
|
+
};
|
|
2876
3206
|
if (opts.bash === true) {
|
|
2877
3207
|
token.output = ".*?";
|
|
2878
3208
|
if (prev.type === "bos" || prev.type === "slash") {
|
|
@@ -2920,7 +3250,11 @@ var require_parse2 = __commonJS({
|
|
|
2920
3250
|
decrement("braces");
|
|
2921
3251
|
}
|
|
2922
3252
|
if (opts.strictSlashes !== true && (prev.type === "star" || prev.type === "bracket")) {
|
|
2923
|
-
push({
|
|
3253
|
+
push({
|
|
3254
|
+
type: "maybe_slash",
|
|
3255
|
+
value: "",
|
|
3256
|
+
output: `${SLASH_LITERAL}?`
|
|
3257
|
+
});
|
|
2924
3258
|
}
|
|
2925
3259
|
if (state.backtrack === true) {
|
|
2926
3260
|
state.output = "";
|
|
@@ -2932,9 +3266,11 @@ var require_parse2 = __commonJS({
|
|
|
2932
3266
|
}
|
|
2933
3267
|
}
|
|
2934
3268
|
return state;
|
|
2935
|
-
};
|
|
3269
|
+
}, "parse");
|
|
2936
3270
|
parse.fastpaths = (input, options) => {
|
|
2937
|
-
const opts = {
|
|
3271
|
+
const opts = {
|
|
3272
|
+
...options
|
|
3273
|
+
};
|
|
2938
3274
|
const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
|
|
2939
3275
|
const len = input.length;
|
|
2940
3276
|
if (len > max) {
|
|
@@ -2942,30 +3278,23 @@ var require_parse2 = __commonJS({
|
|
|
2942
3278
|
}
|
|
2943
3279
|
input = REPLACEMENTS[input] || input;
|
|
2944
3280
|
const win32 = utils.isWindows(options);
|
|
2945
|
-
const {
|
|
2946
|
-
DOT_LITERAL,
|
|
2947
|
-
SLASH_LITERAL,
|
|
2948
|
-
ONE_CHAR,
|
|
2949
|
-
DOTS_SLASH,
|
|
2950
|
-
NO_DOT,
|
|
2951
|
-
NO_DOTS,
|
|
2952
|
-
NO_DOTS_SLASH,
|
|
2953
|
-
STAR,
|
|
2954
|
-
START_ANCHOR
|
|
2955
|
-
} = constants.globChars(win32);
|
|
3281
|
+
const { DOT_LITERAL, SLASH_LITERAL, ONE_CHAR, DOTS_SLASH, NO_DOT, NO_DOTS, NO_DOTS_SLASH, STAR, START_ANCHOR } = constants.globChars(win32);
|
|
2956
3282
|
const nodot = opts.dot ? NO_DOTS : NO_DOT;
|
|
2957
3283
|
const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;
|
|
2958
3284
|
const capture = opts.capture ? "" : "?:";
|
|
2959
|
-
const state = {
|
|
3285
|
+
const state = {
|
|
3286
|
+
negated: false,
|
|
3287
|
+
prefix: ""
|
|
3288
|
+
};
|
|
2960
3289
|
let star = opts.bash === true ? ".*?" : STAR;
|
|
2961
3290
|
if (opts.capture) {
|
|
2962
3291
|
star = `(${star})`;
|
|
2963
3292
|
}
|
|
2964
|
-
const globstar = (opts2) => {
|
|
3293
|
+
const globstar = /* @__PURE__ */ __name((opts2) => {
|
|
2965
3294
|
if (opts2.noglobstar === true) return star;
|
|
2966
3295
|
return `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
|
|
2967
|
-
};
|
|
2968
|
-
const create = (str) => {
|
|
3296
|
+
}, "globstar");
|
|
3297
|
+
const create = /* @__PURE__ */ __name((str) => {
|
|
2969
3298
|
switch (str) {
|
|
2970
3299
|
case "*":
|
|
2971
3300
|
return `${nodot}${ONE_CHAR}${star}`;
|
|
@@ -2991,7 +3320,7 @@ var require_parse2 = __commonJS({
|
|
|
2991
3320
|
return source2 + DOT_LITERAL + match[2];
|
|
2992
3321
|
}
|
|
2993
3322
|
}
|
|
2994
|
-
};
|
|
3323
|
+
}, "create");
|
|
2995
3324
|
const output = utils.removePrefix(input, state);
|
|
2996
3325
|
let source = create(output);
|
|
2997
3326
|
if (source && opts.strictSlashes !== true) {
|
|
@@ -3012,17 +3341,17 @@ var require_picomatch = __commonJS({
|
|
|
3012
3341
|
var parse = require_parse2();
|
|
3013
3342
|
var utils = require_utils2();
|
|
3014
3343
|
var constants = require_constants2();
|
|
3015
|
-
var isObject = (val) => val && typeof val === "object" && !Array.isArray(val);
|
|
3016
|
-
var picomatch = (glob, options, returnState = false) => {
|
|
3344
|
+
var isObject = /* @__PURE__ */ __name((val) => val && typeof val === "object" && !Array.isArray(val), "isObject");
|
|
3345
|
+
var picomatch = /* @__PURE__ */ __name((glob, options, returnState = false) => {
|
|
3017
3346
|
if (Array.isArray(glob)) {
|
|
3018
3347
|
const fns = glob.map((input) => picomatch(input, options, returnState));
|
|
3019
|
-
const arrayMatcher = (str) => {
|
|
3348
|
+
const arrayMatcher = /* @__PURE__ */ __name((str) => {
|
|
3020
3349
|
for (const isMatch of fns) {
|
|
3021
3350
|
const state2 = isMatch(str);
|
|
3022
3351
|
if (state2) return state2;
|
|
3023
3352
|
}
|
|
3024
3353
|
return false;
|
|
3025
|
-
};
|
|
3354
|
+
}, "arrayMatcher");
|
|
3026
3355
|
return arrayMatcher;
|
|
3027
3356
|
}
|
|
3028
3357
|
const isState = isObject(glob) && glob.tokens && glob.input;
|
|
@@ -3034,14 +3363,31 @@ var require_picomatch = __commonJS({
|
|
|
3034
3363
|
const regex = isState ? picomatch.compileRe(glob, options) : picomatch.makeRe(glob, options, false, true);
|
|
3035
3364
|
const state = regex.state;
|
|
3036
3365
|
delete regex.state;
|
|
3037
|
-
let isIgnored = () => false;
|
|
3366
|
+
let isIgnored = /* @__PURE__ */ __name(() => false, "isIgnored");
|
|
3038
3367
|
if (opts.ignore) {
|
|
3039
|
-
const ignoreOpts = {
|
|
3368
|
+
const ignoreOpts = {
|
|
3369
|
+
...options,
|
|
3370
|
+
ignore: null,
|
|
3371
|
+
onMatch: null,
|
|
3372
|
+
onResult: null
|
|
3373
|
+
};
|
|
3040
3374
|
isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);
|
|
3041
3375
|
}
|
|
3042
|
-
const matcher = (input, returnObject = false) => {
|
|
3043
|
-
const { isMatch, match, output } = picomatch.test(input, regex, options, {
|
|
3044
|
-
|
|
3376
|
+
const matcher = /* @__PURE__ */ __name((input, returnObject = false) => {
|
|
3377
|
+
const { isMatch, match, output } = picomatch.test(input, regex, options, {
|
|
3378
|
+
glob,
|
|
3379
|
+
posix
|
|
3380
|
+
});
|
|
3381
|
+
const result = {
|
|
3382
|
+
glob,
|
|
3383
|
+
state,
|
|
3384
|
+
regex,
|
|
3385
|
+
posix,
|
|
3386
|
+
input,
|
|
3387
|
+
output,
|
|
3388
|
+
match,
|
|
3389
|
+
isMatch
|
|
3390
|
+
};
|
|
3045
3391
|
if (typeof opts.onResult === "function") {
|
|
3046
3392
|
opts.onResult(result);
|
|
3047
3393
|
}
|
|
@@ -3060,18 +3406,21 @@ var require_picomatch = __commonJS({
|
|
|
3060
3406
|
opts.onMatch(result);
|
|
3061
3407
|
}
|
|
3062
3408
|
return returnObject ? result : true;
|
|
3063
|
-
};
|
|
3409
|
+
}, "matcher");
|
|
3064
3410
|
if (returnState) {
|
|
3065
3411
|
matcher.state = state;
|
|
3066
3412
|
}
|
|
3067
3413
|
return matcher;
|
|
3068
|
-
};
|
|
3414
|
+
}, "picomatch");
|
|
3069
3415
|
picomatch.test = (input, regex, options, { glob, posix } = {}) => {
|
|
3070
3416
|
if (typeof input !== "string") {
|
|
3071
3417
|
throw new TypeError("Expected input to be a string");
|
|
3072
3418
|
}
|
|
3073
3419
|
if (input === "") {
|
|
3074
|
-
return {
|
|
3420
|
+
return {
|
|
3421
|
+
isMatch: false,
|
|
3422
|
+
output: ""
|
|
3423
|
+
};
|
|
3075
3424
|
}
|
|
3076
3425
|
const opts = options || {};
|
|
3077
3426
|
const format = opts.format || (posix ? utils.toPosixSlashes : null);
|
|
@@ -3088,7 +3437,11 @@ var require_picomatch = __commonJS({
|
|
|
3088
3437
|
match = regex.exec(output);
|
|
3089
3438
|
}
|
|
3090
3439
|
}
|
|
3091
|
-
return {
|
|
3440
|
+
return {
|
|
3441
|
+
isMatch: Boolean(match),
|
|
3442
|
+
match,
|
|
3443
|
+
output
|
|
3444
|
+
};
|
|
3092
3445
|
};
|
|
3093
3446
|
picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
|
|
3094
3447
|
const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
|
|
@@ -3097,7 +3450,10 @@ var require_picomatch = __commonJS({
|
|
|
3097
3450
|
picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
|
|
3098
3451
|
picomatch.parse = (pattern, options) => {
|
|
3099
3452
|
if (Array.isArray(pattern)) return pattern.map((p) => picomatch.parse(p, options));
|
|
3100
|
-
return parse(pattern, {
|
|
3453
|
+
return parse(pattern, {
|
|
3454
|
+
...options,
|
|
3455
|
+
fastpaths: false
|
|
3456
|
+
});
|
|
3101
3457
|
};
|
|
3102
3458
|
picomatch.scan = (input, options) => scan(input, options);
|
|
3103
3459
|
picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => {
|
|
@@ -3121,7 +3477,10 @@ var require_picomatch = __commonJS({
|
|
|
3121
3477
|
if (!input || typeof input !== "string") {
|
|
3122
3478
|
throw new TypeError("Expected a non-empty string");
|
|
3123
3479
|
}
|
|
3124
|
-
let parsed = {
|
|
3480
|
+
let parsed = {
|
|
3481
|
+
negated: false,
|
|
3482
|
+
fastpaths: true
|
|
3483
|
+
};
|
|
3125
3484
|
if (options.fastpaths !== false && (input[0] === "." || input[0] === "*")) {
|
|
3126
3485
|
parsed.output = parse.fastpaths(input, options);
|
|
3127
3486
|
}
|
|
@@ -3160,26 +3519,29 @@ var require_micromatch = __commonJS({
|
|
|
3160
3519
|
var braces = require_braces();
|
|
3161
3520
|
var picomatch = require_picomatch2();
|
|
3162
3521
|
var utils = require_utils2();
|
|
3163
|
-
var isEmptyString = (v) => v === "" || v === "./";
|
|
3164
|
-
var hasBraces = (v) => {
|
|
3522
|
+
var isEmptyString = /* @__PURE__ */ __name((v) => v === "" || v === "./", "isEmptyString");
|
|
3523
|
+
var hasBraces = /* @__PURE__ */ __name((v) => {
|
|
3165
3524
|
const index = v.indexOf("{");
|
|
3166
3525
|
return index > -1 && v.indexOf("}", index) > -1;
|
|
3167
|
-
};
|
|
3168
|
-
var micromatch = (list, patterns, options) => {
|
|
3526
|
+
}, "hasBraces");
|
|
3527
|
+
var micromatch = /* @__PURE__ */ __name((list, patterns, options) => {
|
|
3169
3528
|
patterns = [].concat(patterns);
|
|
3170
3529
|
list = [].concat(list);
|
|
3171
3530
|
let omit = /* @__PURE__ */ new Set();
|
|
3172
3531
|
let keep = /* @__PURE__ */ new Set();
|
|
3173
3532
|
let items = /* @__PURE__ */ new Set();
|
|
3174
3533
|
let negatives = 0;
|
|
3175
|
-
let onResult = (state) => {
|
|
3534
|
+
let onResult = /* @__PURE__ */ __name((state) => {
|
|
3176
3535
|
items.add(state.output);
|
|
3177
3536
|
if (options && options.onResult) {
|
|
3178
3537
|
options.onResult(state);
|
|
3179
3538
|
}
|
|
3180
|
-
};
|
|
3539
|
+
}, "onResult");
|
|
3181
3540
|
for (let i = 0; i < patterns.length; i++) {
|
|
3182
|
-
let isMatch = picomatch(String(patterns[i]), {
|
|
3541
|
+
let isMatch = picomatch(String(patterns[i]), {
|
|
3542
|
+
...options,
|
|
3543
|
+
onResult
|
|
3544
|
+
}, true);
|
|
3183
3545
|
let negated = isMatch.state.negated || isMatch.state.negatedExtglob;
|
|
3184
3546
|
if (negated) negatives++;
|
|
3185
3547
|
for (let item of list) {
|
|
@@ -3194,7 +3556,11 @@ var require_micromatch = __commonJS({
|
|
|
3194
3556
|
}
|
|
3195
3557
|
}
|
|
3196
3558
|
}
|
|
3197
|
-
let result = negatives === patterns.length ? [
|
|
3559
|
+
let result = negatives === patterns.length ? [
|
|
3560
|
+
...items
|
|
3561
|
+
] : [
|
|
3562
|
+
...keep
|
|
3563
|
+
];
|
|
3198
3564
|
let matches = result.filter((item) => !omit.has(item));
|
|
3199
3565
|
if (options && matches.length === 0) {
|
|
3200
3566
|
if (options.failglob === true) {
|
|
@@ -3205,7 +3571,7 @@ var require_micromatch = __commonJS({
|
|
|
3205
3571
|
}
|
|
3206
3572
|
}
|
|
3207
3573
|
return matches;
|
|
3208
|
-
};
|
|
3574
|
+
}, "micromatch");
|
|
3209
3575
|
micromatch.match = micromatch;
|
|
3210
3576
|
micromatch.matcher = (pattern, options) => picomatch(pattern, options);
|
|
3211
3577
|
micromatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
|
|
@@ -3214,17 +3580,22 @@ var require_micromatch = __commonJS({
|
|
|
3214
3580
|
patterns = [].concat(patterns).map(String);
|
|
3215
3581
|
let result = /* @__PURE__ */ new Set();
|
|
3216
3582
|
let items = [];
|
|
3217
|
-
let onResult = (state) => {
|
|
3583
|
+
let onResult = /* @__PURE__ */ __name((state) => {
|
|
3218
3584
|
if (options.onResult) options.onResult(state);
|
|
3219
3585
|
items.push(state.output);
|
|
3220
|
-
};
|
|
3221
|
-
let matches = new Set(micromatch(list, patterns, {
|
|
3586
|
+
}, "onResult");
|
|
3587
|
+
let matches = new Set(micromatch(list, patterns, {
|
|
3588
|
+
...options,
|
|
3589
|
+
onResult
|
|
3590
|
+
}));
|
|
3222
3591
|
for (let item of items) {
|
|
3223
3592
|
if (!matches.has(item)) {
|
|
3224
3593
|
result.add(item);
|
|
3225
3594
|
}
|
|
3226
3595
|
}
|
|
3227
|
-
return [
|
|
3596
|
+
return [
|
|
3597
|
+
...result
|
|
3598
|
+
];
|
|
3228
3599
|
};
|
|
3229
3600
|
micromatch.contains = (str, pattern, options) => {
|
|
3230
3601
|
if (typeof str !== "string") {
|
|
@@ -3241,7 +3612,10 @@ var require_micromatch = __commonJS({
|
|
|
3241
3612
|
return true;
|
|
3242
3613
|
}
|
|
3243
3614
|
}
|
|
3244
|
-
return micromatch.isMatch(str, pattern, {
|
|
3615
|
+
return micromatch.isMatch(str, pattern, {
|
|
3616
|
+
...options,
|
|
3617
|
+
contains: true
|
|
3618
|
+
});
|
|
3245
3619
|
};
|
|
3246
3620
|
micromatch.matchKeys = (obj, patterns, options) => {
|
|
3247
3621
|
if (!utils.isObject(obj)) {
|
|
@@ -3280,7 +3654,10 @@ var require_micromatch = __commonJS({
|
|
|
3280
3654
|
};
|
|
3281
3655
|
micromatch.capture = (glob, input, options) => {
|
|
3282
3656
|
let posix = utils.isWindows(options);
|
|
3283
|
-
let regex = picomatch.makeRe(String(glob), {
|
|
3657
|
+
let regex = picomatch.makeRe(String(glob), {
|
|
3658
|
+
...options,
|
|
3659
|
+
capture: true
|
|
3660
|
+
});
|
|
3284
3661
|
let match = regex.exec(posix ? utils.toPosixSlashes(input) : input);
|
|
3285
3662
|
if (match) {
|
|
3286
3663
|
return match.slice(1).map((v) => v === void 0 ? "" : v);
|
|
@@ -3300,13 +3677,18 @@ var require_micromatch = __commonJS({
|
|
|
3300
3677
|
micromatch.braces = (pattern, options) => {
|
|
3301
3678
|
if (typeof pattern !== "string") throw new TypeError("Expected a string");
|
|
3302
3679
|
if (options && options.nobrace === true || !hasBraces(pattern)) {
|
|
3303
|
-
return [
|
|
3680
|
+
return [
|
|
3681
|
+
pattern
|
|
3682
|
+
];
|
|
3304
3683
|
}
|
|
3305
3684
|
return braces(pattern, options);
|
|
3306
3685
|
};
|
|
3307
3686
|
micromatch.braceExpand = (pattern, options) => {
|
|
3308
3687
|
if (typeof pattern !== "string") throw new TypeError("Expected a string");
|
|
3309
|
-
return micromatch.braces(pattern, {
|
|
3688
|
+
return micromatch.braces(pattern, {
|
|
3689
|
+
...options,
|
|
3690
|
+
expand: true
|
|
3691
|
+
});
|
|
3310
3692
|
};
|
|
3311
3693
|
micromatch.hasBraces = hasBraces;
|
|
3312
3694
|
module2.exports = micromatch;
|
|
@@ -3317,7 +3699,9 @@ var require_micromatch = __commonJS({
|
|
|
3317
3699
|
var require_pattern = __commonJS({
|
|
3318
3700
|
"../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/pattern.js"(exports2) {
|
|
3319
3701
|
"use strict";
|
|
3320
|
-
Object.defineProperty(exports2, "__esModule", {
|
|
3702
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
3703
|
+
value: true
|
|
3704
|
+
});
|
|
3321
3705
|
exports2.isAbsolute = exports2.partitionAbsoluteAndRelative = exports2.removeDuplicateSlashes = exports2.matchAny = exports2.convertPatternsToRe = exports2.makeRe = exports2.getPatternParts = exports2.expandBraceExpansion = exports2.expandPatternsWithBraceExpansion = exports2.isAffectDepthOfReadingPattern = exports2.endsWithSlashGlobStar = exports2.hasGlobStar = exports2.getBaseDirectory = exports2.isPatternRelatedToParentDirectory = exports2.getPatternsOutsideCurrentDirectory = exports2.getPatternsInsideCurrentDirectory = exports2.getPositivePatterns = exports2.getNegativePatterns = exports2.isPositivePattern = exports2.isNegativePattern = exports2.convertToNegativePattern = exports2.convertToPositivePattern = exports2.isDynamicPattern = exports2.isStaticPattern = void 0;
|
|
3322
3706
|
var path2 = require("path");
|
|
3323
3707
|
var globParent = require_glob_parent();
|
|
@@ -3333,6 +3717,7 @@ var require_pattern = __commonJS({
|
|
|
3333
3717
|
function isStaticPattern(pattern, options = {}) {
|
|
3334
3718
|
return !isDynamicPattern(pattern, options);
|
|
3335
3719
|
}
|
|
3720
|
+
__name(isStaticPattern, "isStaticPattern");
|
|
3336
3721
|
exports2.isStaticPattern = isStaticPattern;
|
|
3337
3722
|
function isDynamicPattern(pattern, options = {}) {
|
|
3338
3723
|
if (pattern === "") {
|
|
@@ -3352,6 +3737,7 @@ var require_pattern = __commonJS({
|
|
|
3352
3737
|
}
|
|
3353
3738
|
return false;
|
|
3354
3739
|
}
|
|
3740
|
+
__name(isDynamicPattern, "isDynamicPattern");
|
|
3355
3741
|
exports2.isDynamicPattern = isDynamicPattern;
|
|
3356
3742
|
function hasBraceExpansion(pattern) {
|
|
3357
3743
|
const openingBraceIndex = pattern.indexOf("{");
|
|
@@ -3365,75 +3751,101 @@ var require_pattern = __commonJS({
|
|
|
3365
3751
|
const braceContent = pattern.slice(openingBraceIndex, closingBraceIndex);
|
|
3366
3752
|
return BRACE_EXPANSION_SEPARATORS_RE.test(braceContent);
|
|
3367
3753
|
}
|
|
3754
|
+
__name(hasBraceExpansion, "hasBraceExpansion");
|
|
3368
3755
|
function convertToPositivePattern(pattern) {
|
|
3369
3756
|
return isNegativePattern(pattern) ? pattern.slice(1) : pattern;
|
|
3370
3757
|
}
|
|
3758
|
+
__name(convertToPositivePattern, "convertToPositivePattern");
|
|
3371
3759
|
exports2.convertToPositivePattern = convertToPositivePattern;
|
|
3372
3760
|
function convertToNegativePattern(pattern) {
|
|
3373
3761
|
return "!" + pattern;
|
|
3374
3762
|
}
|
|
3763
|
+
__name(convertToNegativePattern, "convertToNegativePattern");
|
|
3375
3764
|
exports2.convertToNegativePattern = convertToNegativePattern;
|
|
3376
3765
|
function isNegativePattern(pattern) {
|
|
3377
3766
|
return pattern.startsWith("!") && pattern[1] !== "(";
|
|
3378
3767
|
}
|
|
3768
|
+
__name(isNegativePattern, "isNegativePattern");
|
|
3379
3769
|
exports2.isNegativePattern = isNegativePattern;
|
|
3380
3770
|
function isPositivePattern(pattern) {
|
|
3381
3771
|
return !isNegativePattern(pattern);
|
|
3382
3772
|
}
|
|
3773
|
+
__name(isPositivePattern, "isPositivePattern");
|
|
3383
3774
|
exports2.isPositivePattern = isPositivePattern;
|
|
3384
3775
|
function getNegativePatterns(patterns) {
|
|
3385
3776
|
return patterns.filter(isNegativePattern);
|
|
3386
3777
|
}
|
|
3778
|
+
__name(getNegativePatterns, "getNegativePatterns");
|
|
3387
3779
|
exports2.getNegativePatterns = getNegativePatterns;
|
|
3388
3780
|
function getPositivePatterns(patterns) {
|
|
3389
3781
|
return patterns.filter(isPositivePattern);
|
|
3390
3782
|
}
|
|
3783
|
+
__name(getPositivePatterns, "getPositivePatterns");
|
|
3391
3784
|
exports2.getPositivePatterns = getPositivePatterns;
|
|
3392
3785
|
function getPatternsInsideCurrentDirectory(patterns) {
|
|
3393
3786
|
return patterns.filter((pattern) => !isPatternRelatedToParentDirectory(pattern));
|
|
3394
3787
|
}
|
|
3788
|
+
__name(getPatternsInsideCurrentDirectory, "getPatternsInsideCurrentDirectory");
|
|
3395
3789
|
exports2.getPatternsInsideCurrentDirectory = getPatternsInsideCurrentDirectory;
|
|
3396
3790
|
function getPatternsOutsideCurrentDirectory(patterns) {
|
|
3397
3791
|
return patterns.filter(isPatternRelatedToParentDirectory);
|
|
3398
3792
|
}
|
|
3793
|
+
__name(getPatternsOutsideCurrentDirectory, "getPatternsOutsideCurrentDirectory");
|
|
3399
3794
|
exports2.getPatternsOutsideCurrentDirectory = getPatternsOutsideCurrentDirectory;
|
|
3400
3795
|
function isPatternRelatedToParentDirectory(pattern) {
|
|
3401
3796
|
return pattern.startsWith("..") || pattern.startsWith("./..");
|
|
3402
3797
|
}
|
|
3798
|
+
__name(isPatternRelatedToParentDirectory, "isPatternRelatedToParentDirectory");
|
|
3403
3799
|
exports2.isPatternRelatedToParentDirectory = isPatternRelatedToParentDirectory;
|
|
3404
3800
|
function getBaseDirectory(pattern) {
|
|
3405
|
-
return globParent(pattern, {
|
|
3801
|
+
return globParent(pattern, {
|
|
3802
|
+
flipBackslashes: false
|
|
3803
|
+
});
|
|
3406
3804
|
}
|
|
3805
|
+
__name(getBaseDirectory, "getBaseDirectory");
|
|
3407
3806
|
exports2.getBaseDirectory = getBaseDirectory;
|
|
3408
3807
|
function hasGlobStar(pattern) {
|
|
3409
3808
|
return pattern.includes(GLOBSTAR);
|
|
3410
3809
|
}
|
|
3810
|
+
__name(hasGlobStar, "hasGlobStar");
|
|
3411
3811
|
exports2.hasGlobStar = hasGlobStar;
|
|
3412
3812
|
function endsWithSlashGlobStar(pattern) {
|
|
3413
3813
|
return pattern.endsWith("/" + GLOBSTAR);
|
|
3414
3814
|
}
|
|
3815
|
+
__name(endsWithSlashGlobStar, "endsWithSlashGlobStar");
|
|
3415
3816
|
exports2.endsWithSlashGlobStar = endsWithSlashGlobStar;
|
|
3416
3817
|
function isAffectDepthOfReadingPattern(pattern) {
|
|
3417
3818
|
const basename = path2.basename(pattern);
|
|
3418
3819
|
return endsWithSlashGlobStar(pattern) || isStaticPattern(basename);
|
|
3419
3820
|
}
|
|
3821
|
+
__name(isAffectDepthOfReadingPattern, "isAffectDepthOfReadingPattern");
|
|
3420
3822
|
exports2.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern;
|
|
3421
3823
|
function expandPatternsWithBraceExpansion(patterns) {
|
|
3422
3824
|
return patterns.reduce((collection, pattern) => {
|
|
3423
3825
|
return collection.concat(expandBraceExpansion(pattern));
|
|
3424
3826
|
}, []);
|
|
3425
3827
|
}
|
|
3828
|
+
__name(expandPatternsWithBraceExpansion, "expandPatternsWithBraceExpansion");
|
|
3426
3829
|
exports2.expandPatternsWithBraceExpansion = expandPatternsWithBraceExpansion;
|
|
3427
3830
|
function expandBraceExpansion(pattern) {
|
|
3428
|
-
const patterns = micromatch.braces(pattern, {
|
|
3831
|
+
const patterns = micromatch.braces(pattern, {
|
|
3832
|
+
expand: true,
|
|
3833
|
+
nodupes: true,
|
|
3834
|
+
keepEscaping: true
|
|
3835
|
+
});
|
|
3429
3836
|
patterns.sort((a, b) => a.length - b.length);
|
|
3430
3837
|
return patterns.filter((pattern2) => pattern2 !== "");
|
|
3431
3838
|
}
|
|
3839
|
+
__name(expandBraceExpansion, "expandBraceExpansion");
|
|
3432
3840
|
exports2.expandBraceExpansion = expandBraceExpansion;
|
|
3433
3841
|
function getPatternParts(pattern, options) {
|
|
3434
|
-
let { parts } = micromatch.scan(pattern, Object.assign(Object.assign({}, options), {
|
|
3842
|
+
let { parts } = micromatch.scan(pattern, Object.assign(Object.assign({}, options), {
|
|
3843
|
+
parts: true
|
|
3844
|
+
}));
|
|
3435
3845
|
if (parts.length === 0) {
|
|
3436
|
-
parts = [
|
|
3846
|
+
parts = [
|
|
3847
|
+
pattern
|
|
3848
|
+
];
|
|
3437
3849
|
}
|
|
3438
3850
|
if (parts[0].startsWith("/")) {
|
|
3439
3851
|
parts[0] = parts[0].slice(1);
|
|
@@ -3441,22 +3853,27 @@ var require_pattern = __commonJS({
|
|
|
3441
3853
|
}
|
|
3442
3854
|
return parts;
|
|
3443
3855
|
}
|
|
3856
|
+
__name(getPatternParts, "getPatternParts");
|
|
3444
3857
|
exports2.getPatternParts = getPatternParts;
|
|
3445
3858
|
function makeRe(pattern, options) {
|
|
3446
3859
|
return micromatch.makeRe(pattern, options);
|
|
3447
3860
|
}
|
|
3861
|
+
__name(makeRe, "makeRe");
|
|
3448
3862
|
exports2.makeRe = makeRe;
|
|
3449
3863
|
function convertPatternsToRe(patterns, options) {
|
|
3450
3864
|
return patterns.map((pattern) => makeRe(pattern, options));
|
|
3451
3865
|
}
|
|
3866
|
+
__name(convertPatternsToRe, "convertPatternsToRe");
|
|
3452
3867
|
exports2.convertPatternsToRe = convertPatternsToRe;
|
|
3453
3868
|
function matchAny(entry, patternsRe) {
|
|
3454
3869
|
return patternsRe.some((patternRe) => patternRe.test(entry));
|
|
3455
3870
|
}
|
|
3871
|
+
__name(matchAny, "matchAny");
|
|
3456
3872
|
exports2.matchAny = matchAny;
|
|
3457
3873
|
function removeDuplicateSlashes(pattern) {
|
|
3458
3874
|
return pattern.replace(DOUBLE_SLASH_RE, "/");
|
|
3459
3875
|
}
|
|
3876
|
+
__name(removeDuplicateSlashes, "removeDuplicateSlashes");
|
|
3460
3877
|
exports2.removeDuplicateSlashes = removeDuplicateSlashes;
|
|
3461
3878
|
function partitionAbsoluteAndRelative(patterns) {
|
|
3462
3879
|
const absolute = [];
|
|
@@ -3468,12 +3885,17 @@ var require_pattern = __commonJS({
|
|
|
3468
3885
|
relative.push(pattern);
|
|
3469
3886
|
}
|
|
3470
3887
|
}
|
|
3471
|
-
return [
|
|
3888
|
+
return [
|
|
3889
|
+
absolute,
|
|
3890
|
+
relative
|
|
3891
|
+
];
|
|
3472
3892
|
}
|
|
3893
|
+
__name(partitionAbsoluteAndRelative, "partitionAbsoluteAndRelative");
|
|
3473
3894
|
exports2.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative;
|
|
3474
3895
|
function isAbsolute(pattern) {
|
|
3475
3896
|
return path2.isAbsolute(pattern);
|
|
3476
3897
|
}
|
|
3898
|
+
__name(isAbsolute, "isAbsolute");
|
|
3477
3899
|
exports2.isAbsolute = isAbsolute;
|
|
3478
3900
|
}
|
|
3479
3901
|
});
|
|
@@ -3512,6 +3934,7 @@ var require_merge2 = __commonJS({
|
|
|
3512
3934
|
mergeStream();
|
|
3513
3935
|
return this;
|
|
3514
3936
|
}
|
|
3937
|
+
__name(addStream, "addStream");
|
|
3515
3938
|
function mergeStream() {
|
|
3516
3939
|
if (merging) {
|
|
3517
3940
|
return;
|
|
@@ -3523,7 +3946,9 @@ var require_merge2 = __commonJS({
|
|
|
3523
3946
|
return;
|
|
3524
3947
|
}
|
|
3525
3948
|
if (!Array.isArray(streams)) {
|
|
3526
|
-
streams = [
|
|
3949
|
+
streams = [
|
|
3950
|
+
streams
|
|
3951
|
+
];
|
|
3527
3952
|
}
|
|
3528
3953
|
let pipesCount = streams.length + 1;
|
|
3529
3954
|
function next() {
|
|
@@ -3533,6 +3958,7 @@ var require_merge2 = __commonJS({
|
|
|
3533
3958
|
merging = false;
|
|
3534
3959
|
mergeStream();
|
|
3535
3960
|
}
|
|
3961
|
+
__name(next, "next");
|
|
3536
3962
|
function pipe(stream) {
|
|
3537
3963
|
function onend() {
|
|
3538
3964
|
stream.removeListener("merge2UnpipeEnd", onend);
|
|
@@ -3542,9 +3968,11 @@ var require_merge2 = __commonJS({
|
|
|
3542
3968
|
}
|
|
3543
3969
|
next();
|
|
3544
3970
|
}
|
|
3971
|
+
__name(onend, "onend");
|
|
3545
3972
|
function onerror(err) {
|
|
3546
3973
|
mergedStream.emit("error", err);
|
|
3547
3974
|
}
|
|
3975
|
+
__name(onerror, "onerror");
|
|
3548
3976
|
if (stream._readableState.endEmitted) {
|
|
3549
3977
|
return next();
|
|
3550
3978
|
}
|
|
@@ -3553,14 +3981,18 @@ var require_merge2 = __commonJS({
|
|
|
3553
3981
|
if (doPipeError) {
|
|
3554
3982
|
stream.on("error", onerror);
|
|
3555
3983
|
}
|
|
3556
|
-
stream.pipe(mergedStream, {
|
|
3984
|
+
stream.pipe(mergedStream, {
|
|
3985
|
+
end: false
|
|
3986
|
+
});
|
|
3557
3987
|
stream.resume();
|
|
3558
3988
|
}
|
|
3989
|
+
__name(pipe, "pipe");
|
|
3559
3990
|
for (let i = 0; i < streams.length; i++) {
|
|
3560
3991
|
pipe(streams[i]);
|
|
3561
3992
|
}
|
|
3562
3993
|
next();
|
|
3563
3994
|
}
|
|
3995
|
+
__name(mergeStream, "mergeStream");
|
|
3564
3996
|
function endStream() {
|
|
3565
3997
|
merging = false;
|
|
3566
3998
|
mergedStream.emit("queueDrain");
|
|
@@ -3568,6 +4000,7 @@ var require_merge2 = __commonJS({
|
|
|
3568
4000
|
mergedStream.end();
|
|
3569
4001
|
}
|
|
3570
4002
|
}
|
|
4003
|
+
__name(endStream, "endStream");
|
|
3571
4004
|
mergedStream.setMaxListeners(0);
|
|
3572
4005
|
mergedStream.add = addStream;
|
|
3573
4006
|
mergedStream.on("unpipe", function(stream) {
|
|
@@ -3578,6 +4011,7 @@ var require_merge2 = __commonJS({
|
|
|
3578
4011
|
}
|
|
3579
4012
|
return mergedStream;
|
|
3580
4013
|
}
|
|
4014
|
+
__name(merge2, "merge2");
|
|
3581
4015
|
function pauseStreams(streams, options) {
|
|
3582
4016
|
if (!Array.isArray(streams)) {
|
|
3583
4017
|
if (!streams._readableState && streams.pipe) {
|
|
@@ -3594,6 +4028,7 @@ var require_merge2 = __commonJS({
|
|
|
3594
4028
|
}
|
|
3595
4029
|
return streams;
|
|
3596
4030
|
}
|
|
4031
|
+
__name(pauseStreams, "pauseStreams");
|
|
3597
4032
|
}
|
|
3598
4033
|
});
|
|
3599
4034
|
|
|
@@ -3601,7 +4036,9 @@ var require_merge2 = __commonJS({
|
|
|
3601
4036
|
var require_stream = __commonJS({
|
|
3602
4037
|
"../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/stream.js"(exports2) {
|
|
3603
4038
|
"use strict";
|
|
3604
|
-
Object.defineProperty(exports2, "__esModule", {
|
|
4039
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
4040
|
+
value: true
|
|
4041
|
+
});
|
|
3605
4042
|
exports2.merge = void 0;
|
|
3606
4043
|
var merge2 = require_merge2();
|
|
3607
4044
|
function merge(streams) {
|
|
@@ -3613,10 +4050,12 @@ var require_stream = __commonJS({
|
|
|
3613
4050
|
mergedStream.once("end", () => propagateCloseEventToSources(streams));
|
|
3614
4051
|
return mergedStream;
|
|
3615
4052
|
}
|
|
4053
|
+
__name(merge, "merge");
|
|
3616
4054
|
exports2.merge = merge;
|
|
3617
4055
|
function propagateCloseEventToSources(streams) {
|
|
3618
4056
|
streams.forEach((stream) => stream.emit("close"));
|
|
3619
4057
|
}
|
|
4058
|
+
__name(propagateCloseEventToSources, "propagateCloseEventToSources");
|
|
3620
4059
|
}
|
|
3621
4060
|
});
|
|
3622
4061
|
|
|
@@ -3624,15 +4063,19 @@ var require_stream = __commonJS({
|
|
|
3624
4063
|
var require_string = __commonJS({
|
|
3625
4064
|
"../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/string.js"(exports2) {
|
|
3626
4065
|
"use strict";
|
|
3627
|
-
Object.defineProperty(exports2, "__esModule", {
|
|
4066
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
4067
|
+
value: true
|
|
4068
|
+
});
|
|
3628
4069
|
exports2.isEmpty = exports2.isString = void 0;
|
|
3629
4070
|
function isString(input) {
|
|
3630
4071
|
return typeof input === "string";
|
|
3631
4072
|
}
|
|
4073
|
+
__name(isString, "isString");
|
|
3632
4074
|
exports2.isString = isString;
|
|
3633
4075
|
function isEmpty(input) {
|
|
3634
4076
|
return input === "";
|
|
3635
4077
|
}
|
|
4078
|
+
__name(isEmpty, "isEmpty");
|
|
3636
4079
|
exports2.isEmpty = isEmpty;
|
|
3637
4080
|
}
|
|
3638
4081
|
});
|
|
@@ -3641,7 +4084,9 @@ var require_string = __commonJS({
|
|
|
3641
4084
|
var require_utils3 = __commonJS({
|
|
3642
4085
|
"../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/index.js"(exports2) {
|
|
3643
4086
|
"use strict";
|
|
3644
|
-
Object.defineProperty(exports2, "__esModule", {
|
|
4087
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
4088
|
+
value: true
|
|
4089
|
+
});
|
|
3645
4090
|
exports2.string = exports2.stream = exports2.pattern = exports2.path = exports2.fs = exports2.errno = exports2.array = void 0;
|
|
3646
4091
|
var array = require_array();
|
|
3647
4092
|
exports2.array = array;
|
|
@@ -3664,7 +4109,9 @@ var require_utils3 = __commonJS({
|
|
|
3664
4109
|
var require_tasks = __commonJS({
|
|
3665
4110
|
"../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/managers/tasks.js"(exports2) {
|
|
3666
4111
|
"use strict";
|
|
3667
|
-
Object.defineProperty(exports2, "__esModule", {
|
|
4112
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
4113
|
+
value: true
|
|
4114
|
+
});
|
|
3668
4115
|
exports2.convertPatternGroupToTask = exports2.convertPatternGroupsToTasks = exports2.groupPatternsByBaseDirectory = exports2.getNegativePatternsAsPositive = exports2.getPositivePatterns = exports2.convertPatternsToTasks = exports2.generate = void 0;
|
|
3669
4116
|
var utils = require_utils3();
|
|
3670
4117
|
function generate(input, settings) {
|
|
@@ -3688,6 +4135,7 @@ var require_tasks = __commonJS({
|
|
|
3688
4135
|
);
|
|
3689
4136
|
return staticTasks.concat(dynamicTasks);
|
|
3690
4137
|
}
|
|
4138
|
+
__name(generate, "generate");
|
|
3691
4139
|
exports2.generate = generate;
|
|
3692
4140
|
function processPatterns(input, settings) {
|
|
3693
4141
|
let patterns = input;
|
|
@@ -3699,6 +4147,7 @@ var require_tasks = __commonJS({
|
|
|
3699
4147
|
}
|
|
3700
4148
|
return patterns.map((pattern) => utils.pattern.removeDuplicateSlashes(pattern));
|
|
3701
4149
|
}
|
|
4150
|
+
__name(processPatterns, "processPatterns");
|
|
3702
4151
|
function convertPatternsToTasks(positive, negative, dynamic) {
|
|
3703
4152
|
const tasks = [];
|
|
3704
4153
|
const patternsOutsideCurrentDirectory = utils.pattern.getPatternsOutsideCurrentDirectory(positive);
|
|
@@ -3713,16 +4162,19 @@ var require_tasks = __commonJS({
|
|
|
3713
4162
|
}
|
|
3714
4163
|
return tasks;
|
|
3715
4164
|
}
|
|
4165
|
+
__name(convertPatternsToTasks, "convertPatternsToTasks");
|
|
3716
4166
|
exports2.convertPatternsToTasks = convertPatternsToTasks;
|
|
3717
4167
|
function getPositivePatterns(patterns) {
|
|
3718
4168
|
return utils.pattern.getPositivePatterns(patterns);
|
|
3719
4169
|
}
|
|
4170
|
+
__name(getPositivePatterns, "getPositivePatterns");
|
|
3720
4171
|
exports2.getPositivePatterns = getPositivePatterns;
|
|
3721
4172
|
function getNegativePatternsAsPositive(patterns, ignore) {
|
|
3722
4173
|
const negative = utils.pattern.getNegativePatterns(patterns).concat(ignore);
|
|
3723
4174
|
const positive = negative.map(utils.pattern.convertToPositivePattern);
|
|
3724
4175
|
return positive;
|
|
3725
4176
|
}
|
|
4177
|
+
__name(getNegativePatternsAsPositive, "getNegativePatternsAsPositive");
|
|
3726
4178
|
exports2.getNegativePatternsAsPositive = getNegativePatternsAsPositive;
|
|
3727
4179
|
function groupPatternsByBaseDirectory(patterns) {
|
|
3728
4180
|
const group = {};
|
|
@@ -3731,17 +4183,21 @@ var require_tasks = __commonJS({
|
|
|
3731
4183
|
if (base in collection) {
|
|
3732
4184
|
collection[base].push(pattern);
|
|
3733
4185
|
} else {
|
|
3734
|
-
collection[base] = [
|
|
4186
|
+
collection[base] = [
|
|
4187
|
+
pattern
|
|
4188
|
+
];
|
|
3735
4189
|
}
|
|
3736
4190
|
return collection;
|
|
3737
4191
|
}, group);
|
|
3738
4192
|
}
|
|
4193
|
+
__name(groupPatternsByBaseDirectory, "groupPatternsByBaseDirectory");
|
|
3739
4194
|
exports2.groupPatternsByBaseDirectory = groupPatternsByBaseDirectory;
|
|
3740
4195
|
function convertPatternGroupsToTasks(positive, negative, dynamic) {
|
|
3741
4196
|
return Object.keys(positive).map((base) => {
|
|
3742
4197
|
return convertPatternGroupToTask(base, positive[base], negative, dynamic);
|
|
3743
4198
|
});
|
|
3744
4199
|
}
|
|
4200
|
+
__name(convertPatternGroupsToTasks, "convertPatternGroupsToTasks");
|
|
3745
4201
|
exports2.convertPatternGroupsToTasks = convertPatternGroupsToTasks;
|
|
3746
4202
|
function convertPatternGroupToTask(base, positive, negative, dynamic) {
|
|
3747
4203
|
return {
|
|
@@ -3752,6 +4208,7 @@ var require_tasks = __commonJS({
|
|
|
3752
4208
|
patterns: [].concat(positive, negative.map(utils.pattern.convertToNegativePattern))
|
|
3753
4209
|
};
|
|
3754
4210
|
}
|
|
4211
|
+
__name(convertPatternGroupToTask, "convertPatternGroupToTask");
|
|
3755
4212
|
exports2.convertPatternGroupToTask = convertPatternGroupToTask;
|
|
3756
4213
|
}
|
|
3757
4214
|
});
|
|
@@ -3760,7 +4217,9 @@ var require_tasks = __commonJS({
|
|
|
3760
4217
|
var require_async = __commonJS({
|
|
3761
4218
|
"../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/async.js"(exports2) {
|
|
3762
4219
|
"use strict";
|
|
3763
|
-
Object.defineProperty(exports2, "__esModule", {
|
|
4220
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
4221
|
+
value: true
|
|
4222
|
+
});
|
|
3764
4223
|
exports2.read = void 0;
|
|
3765
4224
|
function read(path2, settings, callback) {
|
|
3766
4225
|
settings.fs.lstat(path2, (lstatError, lstat) => {
|
|
@@ -3788,13 +4247,16 @@ var require_async = __commonJS({
|
|
|
3788
4247
|
});
|
|
3789
4248
|
});
|
|
3790
4249
|
}
|
|
4250
|
+
__name(read, "read");
|
|
3791
4251
|
exports2.read = read;
|
|
3792
4252
|
function callFailureCallback(callback, error) {
|
|
3793
4253
|
callback(error);
|
|
3794
4254
|
}
|
|
4255
|
+
__name(callFailureCallback, "callFailureCallback");
|
|
3795
4256
|
function callSuccessCallback(callback, result) {
|
|
3796
4257
|
callback(null, result);
|
|
3797
4258
|
}
|
|
4259
|
+
__name(callSuccessCallback, "callSuccessCallback");
|
|
3798
4260
|
}
|
|
3799
4261
|
});
|
|
3800
4262
|
|
|
@@ -3802,7 +4264,9 @@ var require_async = __commonJS({
|
|
|
3802
4264
|
var require_sync = __commonJS({
|
|
3803
4265
|
"../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/sync.js"(exports2) {
|
|
3804
4266
|
"use strict";
|
|
3805
|
-
Object.defineProperty(exports2, "__esModule", {
|
|
4267
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
4268
|
+
value: true
|
|
4269
|
+
});
|
|
3806
4270
|
exports2.read = void 0;
|
|
3807
4271
|
function read(path2, settings) {
|
|
3808
4272
|
const lstat = settings.fs.lstatSync(path2);
|
|
@@ -3822,6 +4286,7 @@ var require_sync = __commonJS({
|
|
|
3822
4286
|
throw error;
|
|
3823
4287
|
}
|
|
3824
4288
|
}
|
|
4289
|
+
__name(read, "read");
|
|
3825
4290
|
exports2.read = read;
|
|
3826
4291
|
}
|
|
3827
4292
|
});
|
|
@@ -3830,7 +4295,9 @@ var require_sync = __commonJS({
|
|
|
3830
4295
|
var require_fs2 = __commonJS({
|
|
3831
4296
|
"../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/adapters/fs.js"(exports2) {
|
|
3832
4297
|
"use strict";
|
|
3833
|
-
Object.defineProperty(exports2, "__esModule", {
|
|
4298
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
4299
|
+
value: true
|
|
4300
|
+
});
|
|
3834
4301
|
exports2.createFileSystemAdapter = exports2.FILE_SYSTEM_ADAPTER = void 0;
|
|
3835
4302
|
var fs = require("fs");
|
|
3836
4303
|
exports2.FILE_SYSTEM_ADAPTER = {
|
|
@@ -3845,6 +4312,7 @@ var require_fs2 = __commonJS({
|
|
|
3845
4312
|
}
|
|
3846
4313
|
return Object.assign(Object.assign({}, exports2.FILE_SYSTEM_ADAPTER), fsMethods);
|
|
3847
4314
|
}
|
|
4315
|
+
__name(createFileSystemAdapter, "createFileSystemAdapter");
|
|
3848
4316
|
exports2.createFileSystemAdapter = createFileSystemAdapter;
|
|
3849
4317
|
}
|
|
3850
4318
|
});
|
|
@@ -3853,9 +4321,14 @@ var require_fs2 = __commonJS({
|
|
|
3853
4321
|
var require_settings = __commonJS({
|
|
3854
4322
|
"../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/settings.js"(exports2) {
|
|
3855
4323
|
"use strict";
|
|
3856
|
-
Object.defineProperty(exports2, "__esModule", {
|
|
4324
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
4325
|
+
value: true
|
|
4326
|
+
});
|
|
3857
4327
|
var fs = require_fs2();
|
|
3858
|
-
var Settings = class {
|
|
4328
|
+
var Settings = class Settings {
|
|
4329
|
+
static {
|
|
4330
|
+
__name(this, "Settings");
|
|
4331
|
+
}
|
|
3859
4332
|
constructor(_options = {}) {
|
|
3860
4333
|
this._options = _options;
|
|
3861
4334
|
this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true);
|
|
@@ -3875,7 +4348,9 @@ var require_settings = __commonJS({
|
|
|
3875
4348
|
var require_out = __commonJS({
|
|
3876
4349
|
"../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/index.js"(exports2) {
|
|
3877
4350
|
"use strict";
|
|
3878
|
-
Object.defineProperty(exports2, "__esModule", {
|
|
4351
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
4352
|
+
value: true
|
|
4353
|
+
});
|
|
3879
4354
|
exports2.statSync = exports2.stat = exports2.Settings = void 0;
|
|
3880
4355
|
var async = require_async();
|
|
3881
4356
|
var sync = require_sync();
|
|
@@ -3888,11 +4363,13 @@ var require_out = __commonJS({
|
|
|
3888
4363
|
}
|
|
3889
4364
|
async.read(path2, getSettings(optionsOrSettingsOrCallback), callback);
|
|
3890
4365
|
}
|
|
4366
|
+
__name(stat, "stat");
|
|
3891
4367
|
exports2.stat = stat;
|
|
3892
4368
|
function statSync(path2, optionsOrSettings) {
|
|
3893
4369
|
const settings = getSettings(optionsOrSettings);
|
|
3894
4370
|
return sync.read(path2, settings);
|
|
3895
4371
|
}
|
|
4372
|
+
__name(statSync, "statSync");
|
|
3896
4373
|
exports2.statSync = statSync;
|
|
3897
4374
|
function getSettings(settingsOrOptions = {}) {
|
|
3898
4375
|
if (settingsOrOptions instanceof settings_1.default) {
|
|
@@ -3900,6 +4377,7 @@ var require_out = __commonJS({
|
|
|
3900
4377
|
}
|
|
3901
4378
|
return new settings_1.default(settingsOrOptions);
|
|
3902
4379
|
}
|
|
4380
|
+
__name(getSettings, "getSettings");
|
|
3903
4381
|
}
|
|
3904
4382
|
});
|
|
3905
4383
|
|
|
@@ -3936,15 +4414,18 @@ var require_run_parallel = __commonJS({
|
|
|
3936
4414
|
if (cb) cb(err, results);
|
|
3937
4415
|
cb = null;
|
|
3938
4416
|
}
|
|
4417
|
+
__name(end, "end");
|
|
3939
4418
|
if (isSync) queueMicrotask2(end);
|
|
3940
4419
|
else end();
|
|
3941
4420
|
}
|
|
4421
|
+
__name(done, "done");
|
|
3942
4422
|
function each(i, err, result) {
|
|
3943
4423
|
results[i] = result;
|
|
3944
4424
|
if (--pending === 0 || err) {
|
|
3945
4425
|
done(err);
|
|
3946
4426
|
}
|
|
3947
4427
|
}
|
|
4428
|
+
__name(each, "each");
|
|
3948
4429
|
if (!pending) {
|
|
3949
4430
|
done(null);
|
|
3950
4431
|
} else if (keys) {
|
|
@@ -3962,6 +4443,7 @@ var require_run_parallel = __commonJS({
|
|
|
3962
4443
|
}
|
|
3963
4444
|
isSync = false;
|
|
3964
4445
|
}
|
|
4446
|
+
__name(runParallel, "runParallel");
|
|
3965
4447
|
}
|
|
3966
4448
|
});
|
|
3967
4449
|
|
|
@@ -3969,7 +4451,9 @@ var require_run_parallel = __commonJS({
|
|
|
3969
4451
|
var require_constants3 = __commonJS({
|
|
3970
4452
|
"../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/constants.js"(exports2) {
|
|
3971
4453
|
"use strict";
|
|
3972
|
-
Object.defineProperty(exports2, "__esModule", {
|
|
4454
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
4455
|
+
value: true
|
|
4456
|
+
});
|
|
3973
4457
|
exports2.IS_SUPPORT_READDIR_WITH_FILE_TYPES = void 0;
|
|
3974
4458
|
var NODE_PROCESS_VERSION_PARTS = process.versions.node.split(".");
|
|
3975
4459
|
if (NODE_PROCESS_VERSION_PARTS[0] === void 0 || NODE_PROCESS_VERSION_PARTS[1] === void 0) {
|
|
@@ -3989,9 +4473,14 @@ var require_constants3 = __commonJS({
|
|
|
3989
4473
|
var require_fs3 = __commonJS({
|
|
3990
4474
|
"../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/utils/fs.js"(exports2) {
|
|
3991
4475
|
"use strict";
|
|
3992
|
-
Object.defineProperty(exports2, "__esModule", {
|
|
4476
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
4477
|
+
value: true
|
|
4478
|
+
});
|
|
3993
4479
|
exports2.createDirentFromStats = void 0;
|
|
3994
|
-
var DirentFromStats = class {
|
|
4480
|
+
var DirentFromStats = class DirentFromStats {
|
|
4481
|
+
static {
|
|
4482
|
+
__name(this, "DirentFromStats");
|
|
4483
|
+
}
|
|
3995
4484
|
constructor(name, stats) {
|
|
3996
4485
|
this.name = name;
|
|
3997
4486
|
this.isBlockDevice = stats.isBlockDevice.bind(stats);
|
|
@@ -4006,6 +4495,7 @@ var require_fs3 = __commonJS({
|
|
|
4006
4495
|
function createDirentFromStats(name, stats) {
|
|
4007
4496
|
return new DirentFromStats(name, stats);
|
|
4008
4497
|
}
|
|
4498
|
+
__name(createDirentFromStats, "createDirentFromStats");
|
|
4009
4499
|
exports2.createDirentFromStats = createDirentFromStats;
|
|
4010
4500
|
}
|
|
4011
4501
|
});
|
|
@@ -4014,7 +4504,9 @@ var require_fs3 = __commonJS({
|
|
|
4014
4504
|
var require_utils4 = __commonJS({
|
|
4015
4505
|
"../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/utils/index.js"(exports2) {
|
|
4016
4506
|
"use strict";
|
|
4017
|
-
Object.defineProperty(exports2, "__esModule", {
|
|
4507
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
4508
|
+
value: true
|
|
4509
|
+
});
|
|
4018
4510
|
exports2.fs = void 0;
|
|
4019
4511
|
var fs = require_fs3();
|
|
4020
4512
|
exports2.fs = fs;
|
|
@@ -4025,7 +4517,9 @@ var require_utils4 = __commonJS({
|
|
|
4025
4517
|
var require_common = __commonJS({
|
|
4026
4518
|
"../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/common.js"(exports2) {
|
|
4027
4519
|
"use strict";
|
|
4028
|
-
Object.defineProperty(exports2, "__esModule", {
|
|
4520
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
4521
|
+
value: true
|
|
4522
|
+
});
|
|
4029
4523
|
exports2.joinPathSegments = void 0;
|
|
4030
4524
|
function joinPathSegments(a, b, separator) {
|
|
4031
4525
|
if (a.endsWith(separator)) {
|
|
@@ -4033,6 +4527,7 @@ var require_common = __commonJS({
|
|
|
4033
4527
|
}
|
|
4034
4528
|
return a + separator + b;
|
|
4035
4529
|
}
|
|
4530
|
+
__name(joinPathSegments, "joinPathSegments");
|
|
4036
4531
|
exports2.joinPathSegments = joinPathSegments;
|
|
4037
4532
|
}
|
|
4038
4533
|
});
|
|
@@ -4041,7 +4536,9 @@ var require_common = __commonJS({
|
|
|
4041
4536
|
var require_async2 = __commonJS({
|
|
4042
4537
|
"../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/async.js"(exports2) {
|
|
4043
4538
|
"use strict";
|
|
4044
|
-
Object.defineProperty(exports2, "__esModule", {
|
|
4539
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
4540
|
+
value: true
|
|
4541
|
+
});
|
|
4045
4542
|
exports2.readdir = exports2.readdirWithFileTypes = exports2.read = void 0;
|
|
4046
4543
|
var fsStat = require_out();
|
|
4047
4544
|
var rpl = require_run_parallel();
|
|
@@ -4055,9 +4552,12 @@ var require_async2 = __commonJS({
|
|
|
4055
4552
|
}
|
|
4056
4553
|
readdir(directory, settings, callback);
|
|
4057
4554
|
}
|
|
4555
|
+
__name(read, "read");
|
|
4058
4556
|
exports2.read = read;
|
|
4059
4557
|
function readdirWithFileTypes(directory, settings, callback) {
|
|
4060
|
-
settings.fs.readdir(directory, {
|
|
4558
|
+
settings.fs.readdir(directory, {
|
|
4559
|
+
withFileTypes: true
|
|
4560
|
+
}, (readdirError, dirents) => {
|
|
4061
4561
|
if (readdirError !== null) {
|
|
4062
4562
|
callFailureCallback(callback, readdirError);
|
|
4063
4563
|
return;
|
|
@@ -4081,6 +4581,7 @@ var require_async2 = __commonJS({
|
|
|
4081
4581
|
});
|
|
4082
4582
|
});
|
|
4083
4583
|
}
|
|
4584
|
+
__name(readdirWithFileTypes, "readdirWithFileTypes");
|
|
4084
4585
|
exports2.readdirWithFileTypes = readdirWithFileTypes;
|
|
4085
4586
|
function makeRplTaskEntry(entry, settings) {
|
|
4086
4587
|
return (done) => {
|
|
@@ -4102,6 +4603,7 @@ var require_async2 = __commonJS({
|
|
|
4102
4603
|
});
|
|
4103
4604
|
};
|
|
4104
4605
|
}
|
|
4606
|
+
__name(makeRplTaskEntry, "makeRplTaskEntry");
|
|
4105
4607
|
function readdir(directory, settings, callback) {
|
|
4106
4608
|
settings.fs.readdir(directory, (readdirError, names) => {
|
|
4107
4609
|
if (readdirError !== null) {
|
|
@@ -4137,13 +4639,16 @@ var require_async2 = __commonJS({
|
|
|
4137
4639
|
});
|
|
4138
4640
|
});
|
|
4139
4641
|
}
|
|
4642
|
+
__name(readdir, "readdir");
|
|
4140
4643
|
exports2.readdir = readdir;
|
|
4141
4644
|
function callFailureCallback(callback, error) {
|
|
4142
4645
|
callback(error);
|
|
4143
4646
|
}
|
|
4647
|
+
__name(callFailureCallback, "callFailureCallback");
|
|
4144
4648
|
function callSuccessCallback(callback, result) {
|
|
4145
4649
|
callback(null, result);
|
|
4146
4650
|
}
|
|
4651
|
+
__name(callSuccessCallback, "callSuccessCallback");
|
|
4147
4652
|
}
|
|
4148
4653
|
});
|
|
4149
4654
|
|
|
@@ -4151,7 +4656,9 @@ var require_async2 = __commonJS({
|
|
|
4151
4656
|
var require_sync2 = __commonJS({
|
|
4152
4657
|
"../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/sync.js"(exports2) {
|
|
4153
4658
|
"use strict";
|
|
4154
|
-
Object.defineProperty(exports2, "__esModule", {
|
|
4659
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
4660
|
+
value: true
|
|
4661
|
+
});
|
|
4155
4662
|
exports2.readdir = exports2.readdirWithFileTypes = exports2.read = void 0;
|
|
4156
4663
|
var fsStat = require_out();
|
|
4157
4664
|
var constants_1 = require_constants3();
|
|
@@ -4163,9 +4670,12 @@ var require_sync2 = __commonJS({
|
|
|
4163
4670
|
}
|
|
4164
4671
|
return readdir(directory, settings);
|
|
4165
4672
|
}
|
|
4673
|
+
__name(read, "read");
|
|
4166
4674
|
exports2.read = read;
|
|
4167
4675
|
function readdirWithFileTypes(directory, settings) {
|
|
4168
|
-
const dirents = settings.fs.readdirSync(directory, {
|
|
4676
|
+
const dirents = settings.fs.readdirSync(directory, {
|
|
4677
|
+
withFileTypes: true
|
|
4678
|
+
});
|
|
4169
4679
|
return dirents.map((dirent) => {
|
|
4170
4680
|
const entry = {
|
|
4171
4681
|
dirent,
|
|
@@ -4185,6 +4695,7 @@ var require_sync2 = __commonJS({
|
|
|
4185
4695
|
return entry;
|
|
4186
4696
|
});
|
|
4187
4697
|
}
|
|
4698
|
+
__name(readdirWithFileTypes, "readdirWithFileTypes");
|
|
4188
4699
|
exports2.readdirWithFileTypes = readdirWithFileTypes;
|
|
4189
4700
|
function readdir(directory, settings) {
|
|
4190
4701
|
const names = settings.fs.readdirSync(directory);
|
|
@@ -4202,6 +4713,7 @@ var require_sync2 = __commonJS({
|
|
|
4202
4713
|
return entry;
|
|
4203
4714
|
});
|
|
4204
4715
|
}
|
|
4716
|
+
__name(readdir, "readdir");
|
|
4205
4717
|
exports2.readdir = readdir;
|
|
4206
4718
|
}
|
|
4207
4719
|
});
|
|
@@ -4210,7 +4722,9 @@ var require_sync2 = __commonJS({
|
|
|
4210
4722
|
var require_fs4 = __commonJS({
|
|
4211
4723
|
"../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/adapters/fs.js"(exports2) {
|
|
4212
4724
|
"use strict";
|
|
4213
|
-
Object.defineProperty(exports2, "__esModule", {
|
|
4725
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
4726
|
+
value: true
|
|
4727
|
+
});
|
|
4214
4728
|
exports2.createFileSystemAdapter = exports2.FILE_SYSTEM_ADAPTER = void 0;
|
|
4215
4729
|
var fs = require("fs");
|
|
4216
4730
|
exports2.FILE_SYSTEM_ADAPTER = {
|
|
@@ -4227,6 +4741,7 @@ var require_fs4 = __commonJS({
|
|
|
4227
4741
|
}
|
|
4228
4742
|
return Object.assign(Object.assign({}, exports2.FILE_SYSTEM_ADAPTER), fsMethods);
|
|
4229
4743
|
}
|
|
4744
|
+
__name(createFileSystemAdapter, "createFileSystemAdapter");
|
|
4230
4745
|
exports2.createFileSystemAdapter = createFileSystemAdapter;
|
|
4231
4746
|
}
|
|
4232
4747
|
});
|
|
@@ -4235,11 +4750,16 @@ var require_fs4 = __commonJS({
|
|
|
4235
4750
|
var require_settings2 = __commonJS({
|
|
4236
4751
|
"../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/settings.js"(exports2) {
|
|
4237
4752
|
"use strict";
|
|
4238
|
-
Object.defineProperty(exports2, "__esModule", {
|
|
4753
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
4754
|
+
value: true
|
|
4755
|
+
});
|
|
4239
4756
|
var path2 = require("path");
|
|
4240
4757
|
var fsStat = require_out();
|
|
4241
4758
|
var fs = require_fs4();
|
|
4242
|
-
var Settings = class {
|
|
4759
|
+
var Settings = class Settings {
|
|
4760
|
+
static {
|
|
4761
|
+
__name(this, "Settings");
|
|
4762
|
+
}
|
|
4243
4763
|
constructor(_options = {}) {
|
|
4244
4764
|
this._options = _options;
|
|
4245
4765
|
this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false);
|
|
@@ -4265,7 +4785,9 @@ var require_settings2 = __commonJS({
|
|
|
4265
4785
|
var require_out2 = __commonJS({
|
|
4266
4786
|
"../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/index.js"(exports2) {
|
|
4267
4787
|
"use strict";
|
|
4268
|
-
Object.defineProperty(exports2, "__esModule", {
|
|
4788
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
4789
|
+
value: true
|
|
4790
|
+
});
|
|
4269
4791
|
exports2.Settings = exports2.scandirSync = exports2.scandir = void 0;
|
|
4270
4792
|
var async = require_async2();
|
|
4271
4793
|
var sync = require_sync2();
|
|
@@ -4278,11 +4800,13 @@ var require_out2 = __commonJS({
|
|
|
4278
4800
|
}
|
|
4279
4801
|
async.read(path2, getSettings(optionsOrSettingsOrCallback), callback);
|
|
4280
4802
|
}
|
|
4803
|
+
__name(scandir, "scandir");
|
|
4281
4804
|
exports2.scandir = scandir;
|
|
4282
4805
|
function scandirSync(path2, optionsOrSettings) {
|
|
4283
4806
|
const settings = getSettings(optionsOrSettings);
|
|
4284
4807
|
return sync.read(path2, settings);
|
|
4285
4808
|
}
|
|
4809
|
+
__name(scandirSync, "scandirSync");
|
|
4286
4810
|
exports2.scandirSync = scandirSync;
|
|
4287
4811
|
function getSettings(settingsOrOptions = {}) {
|
|
4288
4812
|
if (settingsOrOptions instanceof settings_1.default) {
|
|
@@ -4290,6 +4814,7 @@ var require_out2 = __commonJS({
|
|
|
4290
4814
|
}
|
|
4291
4815
|
return new settings_1.default(settingsOrOptions);
|
|
4292
4816
|
}
|
|
4817
|
+
__name(getSettings, "getSettings");
|
|
4293
4818
|
}
|
|
4294
4819
|
});
|
|
4295
4820
|
|
|
@@ -4311,15 +4836,18 @@ var require_reusify = __commonJS({
|
|
|
4311
4836
|
current.next = null;
|
|
4312
4837
|
return current;
|
|
4313
4838
|
}
|
|
4839
|
+
__name(get, "get");
|
|
4314
4840
|
function release(obj) {
|
|
4315
4841
|
tail.next = obj;
|
|
4316
4842
|
tail = obj;
|
|
4317
4843
|
}
|
|
4844
|
+
__name(release, "release");
|
|
4318
4845
|
return {
|
|
4319
4846
|
get,
|
|
4320
4847
|
release
|
|
4321
4848
|
};
|
|
4322
4849
|
}
|
|
4850
|
+
__name(reusify, "reusify");
|
|
4323
4851
|
module2.exports = reusify;
|
|
4324
4852
|
}
|
|
4325
4853
|
});
|
|
@@ -4379,9 +4907,11 @@ var require_queue = __commonJS({
|
|
|
4379
4907
|
function running() {
|
|
4380
4908
|
return _running;
|
|
4381
4909
|
}
|
|
4910
|
+
__name(running, "running");
|
|
4382
4911
|
function pause() {
|
|
4383
4912
|
self.paused = true;
|
|
4384
4913
|
}
|
|
4914
|
+
__name(pause, "pause");
|
|
4385
4915
|
function length() {
|
|
4386
4916
|
var current = queueHead;
|
|
4387
4917
|
var counter = 0;
|
|
@@ -4391,6 +4921,7 @@ var require_queue = __commonJS({
|
|
|
4391
4921
|
}
|
|
4392
4922
|
return counter;
|
|
4393
4923
|
}
|
|
4924
|
+
__name(length, "length");
|
|
4394
4925
|
function getQueue() {
|
|
4395
4926
|
var current = queueHead;
|
|
4396
4927
|
var tasks = [];
|
|
@@ -4400,6 +4931,7 @@ var require_queue = __commonJS({
|
|
|
4400
4931
|
}
|
|
4401
4932
|
return tasks;
|
|
4402
4933
|
}
|
|
4934
|
+
__name(getQueue, "getQueue");
|
|
4403
4935
|
function resume() {
|
|
4404
4936
|
if (!self.paused) return;
|
|
4405
4937
|
self.paused = false;
|
|
@@ -4413,9 +4945,11 @@ var require_queue = __commonJS({
|
|
|
4413
4945
|
release();
|
|
4414
4946
|
}
|
|
4415
4947
|
}
|
|
4948
|
+
__name(resume, "resume");
|
|
4416
4949
|
function idle() {
|
|
4417
4950
|
return _running === 0 && self.length() === 0;
|
|
4418
4951
|
}
|
|
4952
|
+
__name(idle, "idle");
|
|
4419
4953
|
function push(value, done) {
|
|
4420
4954
|
var current = cache.get();
|
|
4421
4955
|
current.context = context;
|
|
@@ -4437,6 +4971,7 @@ var require_queue = __commonJS({
|
|
|
4437
4971
|
worker.call(context, current.value, current.worked);
|
|
4438
4972
|
}
|
|
4439
4973
|
}
|
|
4974
|
+
__name(push, "push");
|
|
4440
4975
|
function unshift(value, done) {
|
|
4441
4976
|
var current = cache.get();
|
|
4442
4977
|
current.context = context;
|
|
@@ -4458,6 +4993,7 @@ var require_queue = __commonJS({
|
|
|
4458
4993
|
worker.call(context, current.value, current.worked);
|
|
4459
4994
|
}
|
|
4460
4995
|
}
|
|
4996
|
+
__name(unshift, "unshift");
|
|
4461
4997
|
function release(holder) {
|
|
4462
4998
|
if (holder) {
|
|
4463
4999
|
cache.release(holder);
|
|
@@ -4481,17 +5017,20 @@ var require_queue = __commonJS({
|
|
|
4481
5017
|
self.drain();
|
|
4482
5018
|
}
|
|
4483
5019
|
}
|
|
5020
|
+
__name(release, "release");
|
|
4484
5021
|
function kill() {
|
|
4485
5022
|
queueHead = null;
|
|
4486
5023
|
queueTail = null;
|
|
4487
5024
|
self.drain = noop;
|
|
4488
5025
|
}
|
|
5026
|
+
__name(kill, "kill");
|
|
4489
5027
|
function killAndDrain() {
|
|
4490
5028
|
queueHead = null;
|
|
4491
5029
|
queueTail = null;
|
|
4492
5030
|
self.drain();
|
|
4493
5031
|
self.drain = noop;
|
|
4494
5032
|
}
|
|
5033
|
+
__name(killAndDrain, "killAndDrain");
|
|
4495
5034
|
function abort() {
|
|
4496
5035
|
var current = queueHead;
|
|
4497
5036
|
queueHead = null;
|
|
@@ -4514,12 +5053,16 @@ var require_queue = __commonJS({
|
|
|
4514
5053
|
}
|
|
4515
5054
|
self.drain = noop;
|
|
4516
5055
|
}
|
|
5056
|
+
__name(abort, "abort");
|
|
4517
5057
|
function error(handler) {
|
|
4518
5058
|
errorHandler = handler;
|
|
4519
5059
|
}
|
|
5060
|
+
__name(error, "error");
|
|
4520
5061
|
}
|
|
5062
|
+
__name(fastqueue, "fastqueue");
|
|
4521
5063
|
function noop() {
|
|
4522
5064
|
}
|
|
5065
|
+
__name(noop, "noop");
|
|
4523
5066
|
function Task() {
|
|
4524
5067
|
this.value = null;
|
|
4525
5068
|
this.callback = noop;
|
|
@@ -4528,7 +5071,7 @@ var require_queue = __commonJS({
|
|
|
4528
5071
|
this.context = null;
|
|
4529
5072
|
this.errorHandler = null;
|
|
4530
5073
|
var self = this;
|
|
4531
|
-
this.worked = function worked(err, result) {
|
|
5074
|
+
this.worked = /* @__PURE__ */ __name(function worked(err, result) {
|
|
4532
5075
|
var callback = self.callback;
|
|
4533
5076
|
var errorHandler = self.errorHandler;
|
|
4534
5077
|
var val = self.value;
|
|
@@ -4539,8 +5082,9 @@ var require_queue = __commonJS({
|
|
|
4539
5082
|
}
|
|
4540
5083
|
callback.call(self.context, err, result);
|
|
4541
5084
|
self.release(self);
|
|
4542
|
-
};
|
|
5085
|
+
}, "worked");
|
|
4543
5086
|
}
|
|
5087
|
+
__name(Task, "Task");
|
|
4544
5088
|
function queueAsPromised(context, worker, _concurrency) {
|
|
4545
5089
|
if (typeof context === "function") {
|
|
4546
5090
|
_concurrency = worker;
|
|
@@ -4552,6 +5096,7 @@ var require_queue = __commonJS({
|
|
|
4552
5096
|
cb(null, res);
|
|
4553
5097
|
}, cb);
|
|
4554
5098
|
}
|
|
5099
|
+
__name(asyncWrapper, "asyncWrapper");
|
|
4555
5100
|
var queue = fastqueue(context, asyncWrapper, _concurrency);
|
|
4556
5101
|
var pushCb = queue.push;
|
|
4557
5102
|
var unshiftCb = queue.unshift;
|
|
@@ -4572,6 +5117,7 @@ var require_queue = __commonJS({
|
|
|
4572
5117
|
p.catch(noop);
|
|
4573
5118
|
return p;
|
|
4574
5119
|
}
|
|
5120
|
+
__name(push, "push");
|
|
4575
5121
|
function unshift(value) {
|
|
4576
5122
|
var p = new Promise(function(resolve, reject) {
|
|
4577
5123
|
unshiftCb(value, function(err, result) {
|
|
@@ -4585,6 +5131,7 @@ var require_queue = __commonJS({
|
|
|
4585
5131
|
p.catch(noop);
|
|
4586
5132
|
return p;
|
|
4587
5133
|
}
|
|
5134
|
+
__name(unshift, "unshift");
|
|
4588
5135
|
function drained() {
|
|
4589
5136
|
var p = new Promise(function(resolve) {
|
|
4590
5137
|
process.nextTick(function() {
|
|
@@ -4602,7 +5149,9 @@ var require_queue = __commonJS({
|
|
|
4602
5149
|
});
|
|
4603
5150
|
return p;
|
|
4604
5151
|
}
|
|
5152
|
+
__name(drained, "drained");
|
|
4605
5153
|
}
|
|
5154
|
+
__name(queueAsPromised, "queueAsPromised");
|
|
4606
5155
|
module2.exports = fastqueue;
|
|
4607
5156
|
module2.exports.promise = queueAsPromised;
|
|
4608
5157
|
}
|
|
@@ -4612,7 +5161,9 @@ var require_queue = __commonJS({
|
|
|
4612
5161
|
var require_common2 = __commonJS({
|
|
4613
5162
|
"../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/common.js"(exports2) {
|
|
4614
5163
|
"use strict";
|
|
4615
|
-
Object.defineProperty(exports2, "__esModule", {
|
|
5164
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
5165
|
+
value: true
|
|
5166
|
+
});
|
|
4616
5167
|
exports2.joinPathSegments = exports2.replacePathSegmentSeparator = exports2.isAppliedFilter = exports2.isFatalError = void 0;
|
|
4617
5168
|
function isFatalError(settings, error) {
|
|
4618
5169
|
if (settings.errorFilter === null) {
|
|
@@ -4620,14 +5171,17 @@ var require_common2 = __commonJS({
|
|
|
4620
5171
|
}
|
|
4621
5172
|
return !settings.errorFilter(error);
|
|
4622
5173
|
}
|
|
5174
|
+
__name(isFatalError, "isFatalError");
|
|
4623
5175
|
exports2.isFatalError = isFatalError;
|
|
4624
5176
|
function isAppliedFilter(filter, value) {
|
|
4625
5177
|
return filter === null || filter(value);
|
|
4626
5178
|
}
|
|
5179
|
+
__name(isAppliedFilter, "isAppliedFilter");
|
|
4627
5180
|
exports2.isAppliedFilter = isAppliedFilter;
|
|
4628
5181
|
function replacePathSegmentSeparator(filepath, separator) {
|
|
4629
5182
|
return filepath.split(/[/\\]/).join(separator);
|
|
4630
5183
|
}
|
|
5184
|
+
__name(replacePathSegmentSeparator, "replacePathSegmentSeparator");
|
|
4631
5185
|
exports2.replacePathSegmentSeparator = replacePathSegmentSeparator;
|
|
4632
5186
|
function joinPathSegments(a, b, separator) {
|
|
4633
5187
|
if (a === "") {
|
|
@@ -4638,6 +5192,7 @@ var require_common2 = __commonJS({
|
|
|
4638
5192
|
}
|
|
4639
5193
|
return a + separator + b;
|
|
4640
5194
|
}
|
|
5195
|
+
__name(joinPathSegments, "joinPathSegments");
|
|
4641
5196
|
exports2.joinPathSegments = joinPathSegments;
|
|
4642
5197
|
}
|
|
4643
5198
|
});
|
|
@@ -4646,9 +5201,14 @@ var require_common2 = __commonJS({
|
|
|
4646
5201
|
var require_reader = __commonJS({
|
|
4647
5202
|
"../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/reader.js"(exports2) {
|
|
4648
5203
|
"use strict";
|
|
4649
|
-
Object.defineProperty(exports2, "__esModule", {
|
|
5204
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
5205
|
+
value: true
|
|
5206
|
+
});
|
|
4650
5207
|
var common = require_common2();
|
|
4651
|
-
var Reader = class {
|
|
5208
|
+
var Reader = class Reader {
|
|
5209
|
+
static {
|
|
5210
|
+
__name(this, "Reader");
|
|
5211
|
+
}
|
|
4652
5212
|
constructor(_root, _settings) {
|
|
4653
5213
|
this._root = _root;
|
|
4654
5214
|
this._settings = _settings;
|
|
@@ -4663,13 +5223,18 @@ var require_reader = __commonJS({
|
|
|
4663
5223
|
var require_async3 = __commonJS({
|
|
4664
5224
|
"../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/async.js"(exports2) {
|
|
4665
5225
|
"use strict";
|
|
4666
|
-
Object.defineProperty(exports2, "__esModule", {
|
|
5226
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
5227
|
+
value: true
|
|
5228
|
+
});
|
|
4667
5229
|
var events_1 = require("events");
|
|
4668
5230
|
var fsScandir = require_out2();
|
|
4669
5231
|
var fastq = require_queue();
|
|
4670
5232
|
var common = require_common2();
|
|
4671
5233
|
var reader_1 = require_reader();
|
|
4672
|
-
var AsyncReader = class extends reader_1.default {
|
|
5234
|
+
var AsyncReader = class AsyncReader extends reader_1.default {
|
|
5235
|
+
static {
|
|
5236
|
+
__name(this, "AsyncReader");
|
|
5237
|
+
}
|
|
4673
5238
|
constructor(_root, _settings) {
|
|
4674
5239
|
super(_root, _settings);
|
|
4675
5240
|
this._settings = _settings;
|
|
@@ -4712,7 +5277,10 @@ var require_async3 = __commonJS({
|
|
|
4712
5277
|
this._emitter.once("end", callback);
|
|
4713
5278
|
}
|
|
4714
5279
|
_pushToQueue(directory, base) {
|
|
4715
|
-
const queueItem = {
|
|
5280
|
+
const queueItem = {
|
|
5281
|
+
directory,
|
|
5282
|
+
base
|
|
5283
|
+
};
|
|
4716
5284
|
this._queue.push(queueItem, (error) => {
|
|
4717
5285
|
if (error !== null) {
|
|
4718
5286
|
this._handleError(error);
|
|
@@ -4766,9 +5334,14 @@ var require_async3 = __commonJS({
|
|
|
4766
5334
|
var require_async4 = __commonJS({
|
|
4767
5335
|
"../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/async.js"(exports2) {
|
|
4768
5336
|
"use strict";
|
|
4769
|
-
Object.defineProperty(exports2, "__esModule", {
|
|
5337
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
5338
|
+
value: true
|
|
5339
|
+
});
|
|
4770
5340
|
var async_1 = require_async3();
|
|
4771
|
-
var AsyncProvider = class {
|
|
5341
|
+
var AsyncProvider = class AsyncProvider {
|
|
5342
|
+
static {
|
|
5343
|
+
__name(this, "AsyncProvider");
|
|
5344
|
+
}
|
|
4772
5345
|
constructor(_root, _settings) {
|
|
4773
5346
|
this._root = _root;
|
|
4774
5347
|
this._settings = _settings;
|
|
@@ -4792,9 +5365,11 @@ var require_async4 = __commonJS({
|
|
|
4792
5365
|
function callFailureCallback(callback, error) {
|
|
4793
5366
|
callback(error);
|
|
4794
5367
|
}
|
|
5368
|
+
__name(callFailureCallback, "callFailureCallback");
|
|
4795
5369
|
function callSuccessCallback(callback, entries) {
|
|
4796
5370
|
callback(null, entries);
|
|
4797
5371
|
}
|
|
5372
|
+
__name(callSuccessCallback, "callSuccessCallback");
|
|
4798
5373
|
}
|
|
4799
5374
|
});
|
|
4800
5375
|
|
|
@@ -4802,23 +5377,28 @@ var require_async4 = __commonJS({
|
|
|
4802
5377
|
var require_stream2 = __commonJS({
|
|
4803
5378
|
"../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/stream.js"(exports2) {
|
|
4804
5379
|
"use strict";
|
|
4805
|
-
Object.defineProperty(exports2, "__esModule", {
|
|
5380
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
5381
|
+
value: true
|
|
5382
|
+
});
|
|
4806
5383
|
var stream_1 = require("stream");
|
|
4807
5384
|
var async_1 = require_async3();
|
|
4808
|
-
var StreamProvider = class {
|
|
5385
|
+
var StreamProvider = class StreamProvider {
|
|
5386
|
+
static {
|
|
5387
|
+
__name(this, "StreamProvider");
|
|
5388
|
+
}
|
|
4809
5389
|
constructor(_root, _settings) {
|
|
4810
5390
|
this._root = _root;
|
|
4811
5391
|
this._settings = _settings;
|
|
4812
5392
|
this._reader = new async_1.default(this._root, this._settings);
|
|
4813
5393
|
this._stream = new stream_1.Readable({
|
|
4814
5394
|
objectMode: true,
|
|
4815
|
-
read: () => {
|
|
4816
|
-
},
|
|
4817
|
-
destroy: () => {
|
|
5395
|
+
read: /* @__PURE__ */ __name(() => {
|
|
5396
|
+
}, "read"),
|
|
5397
|
+
destroy: /* @__PURE__ */ __name(() => {
|
|
4818
5398
|
if (!this._reader.isDestroyed) {
|
|
4819
5399
|
this._reader.destroy();
|
|
4820
5400
|
}
|
|
4821
|
-
}
|
|
5401
|
+
}, "destroy")
|
|
4822
5402
|
});
|
|
4823
5403
|
}
|
|
4824
5404
|
read() {
|
|
@@ -4843,11 +5423,16 @@ var require_stream2 = __commonJS({
|
|
|
4843
5423
|
var require_sync3 = __commonJS({
|
|
4844
5424
|
"../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/sync.js"(exports2) {
|
|
4845
5425
|
"use strict";
|
|
4846
|
-
Object.defineProperty(exports2, "__esModule", {
|
|
5426
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
5427
|
+
value: true
|
|
5428
|
+
});
|
|
4847
5429
|
var fsScandir = require_out2();
|
|
4848
5430
|
var common = require_common2();
|
|
4849
5431
|
var reader_1 = require_reader();
|
|
4850
|
-
var SyncReader = class extends reader_1.default {
|
|
5432
|
+
var SyncReader = class SyncReader extends reader_1.default {
|
|
5433
|
+
static {
|
|
5434
|
+
__name(this, "SyncReader");
|
|
5435
|
+
}
|
|
4851
5436
|
constructor() {
|
|
4852
5437
|
super(...arguments);
|
|
4853
5438
|
this._scandir = fsScandir.scandirSync;
|
|
@@ -4860,7 +5445,10 @@ var require_sync3 = __commonJS({
|
|
|
4860
5445
|
return this._storage;
|
|
4861
5446
|
}
|
|
4862
5447
|
_pushToQueue(directory, base) {
|
|
4863
|
-
this._queue.add({
|
|
5448
|
+
this._queue.add({
|
|
5449
|
+
directory,
|
|
5450
|
+
base
|
|
5451
|
+
});
|
|
4864
5452
|
}
|
|
4865
5453
|
_handleQueue() {
|
|
4866
5454
|
for (const item of this._queue.values()) {
|
|
@@ -4907,9 +5495,14 @@ var require_sync3 = __commonJS({
|
|
|
4907
5495
|
var require_sync4 = __commonJS({
|
|
4908
5496
|
"../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/sync.js"(exports2) {
|
|
4909
5497
|
"use strict";
|
|
4910
|
-
Object.defineProperty(exports2, "__esModule", {
|
|
5498
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
5499
|
+
value: true
|
|
5500
|
+
});
|
|
4911
5501
|
var sync_1 = require_sync3();
|
|
4912
|
-
var SyncProvider = class {
|
|
5502
|
+
var SyncProvider = class SyncProvider {
|
|
5503
|
+
static {
|
|
5504
|
+
__name(this, "SyncProvider");
|
|
5505
|
+
}
|
|
4913
5506
|
constructor(_root, _settings) {
|
|
4914
5507
|
this._root = _root;
|
|
4915
5508
|
this._settings = _settings;
|
|
@@ -4927,10 +5520,15 @@ var require_sync4 = __commonJS({
|
|
|
4927
5520
|
var require_settings3 = __commonJS({
|
|
4928
5521
|
"../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/settings.js"(exports2) {
|
|
4929
5522
|
"use strict";
|
|
4930
|
-
Object.defineProperty(exports2, "__esModule", {
|
|
5523
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
5524
|
+
value: true
|
|
5525
|
+
});
|
|
4931
5526
|
var path2 = require("path");
|
|
4932
5527
|
var fsScandir = require_out2();
|
|
4933
|
-
var Settings = class {
|
|
5528
|
+
var Settings = class Settings {
|
|
5529
|
+
static {
|
|
5530
|
+
__name(this, "Settings");
|
|
5531
|
+
}
|
|
4934
5532
|
constructor(_options = {}) {
|
|
4935
5533
|
this._options = _options;
|
|
4936
5534
|
this.basePath = this._getValue(this._options.basePath, void 0);
|
|
@@ -4959,7 +5557,9 @@ var require_settings3 = __commonJS({
|
|
|
4959
5557
|
var require_out3 = __commonJS({
|
|
4960
5558
|
"../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/index.js"(exports2) {
|
|
4961
5559
|
"use strict";
|
|
4962
|
-
Object.defineProperty(exports2, "__esModule", {
|
|
5560
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
5561
|
+
value: true
|
|
5562
|
+
});
|
|
4963
5563
|
exports2.Settings = exports2.walkStream = exports2.walkSync = exports2.walk = void 0;
|
|
4964
5564
|
var async_1 = require_async4();
|
|
4965
5565
|
var stream_1 = require_stream2();
|
|
@@ -4973,18 +5573,21 @@ var require_out3 = __commonJS({
|
|
|
4973
5573
|
}
|
|
4974
5574
|
new async_1.default(directory, getSettings(optionsOrSettingsOrCallback)).read(callback);
|
|
4975
5575
|
}
|
|
5576
|
+
__name(walk, "walk");
|
|
4976
5577
|
exports2.walk = walk;
|
|
4977
5578
|
function walkSync(directory, optionsOrSettings) {
|
|
4978
5579
|
const settings = getSettings(optionsOrSettings);
|
|
4979
5580
|
const provider = new sync_1.default(directory, settings);
|
|
4980
5581
|
return provider.read();
|
|
4981
5582
|
}
|
|
5583
|
+
__name(walkSync, "walkSync");
|
|
4982
5584
|
exports2.walkSync = walkSync;
|
|
4983
5585
|
function walkStream(directory, optionsOrSettings) {
|
|
4984
5586
|
const settings = getSettings(optionsOrSettings);
|
|
4985
5587
|
const provider = new stream_1.default(directory, settings);
|
|
4986
5588
|
return provider.read();
|
|
4987
5589
|
}
|
|
5590
|
+
__name(walkStream, "walkStream");
|
|
4988
5591
|
exports2.walkStream = walkStream;
|
|
4989
5592
|
function getSettings(settingsOrOptions = {}) {
|
|
4990
5593
|
if (settingsOrOptions instanceof settings_1.default) {
|
|
@@ -4992,6 +5595,7 @@ var require_out3 = __commonJS({
|
|
|
4992
5595
|
}
|
|
4993
5596
|
return new settings_1.default(settingsOrOptions);
|
|
4994
5597
|
}
|
|
5598
|
+
__name(getSettings, "getSettings");
|
|
4995
5599
|
}
|
|
4996
5600
|
});
|
|
4997
5601
|
|
|
@@ -4999,11 +5603,16 @@ var require_out3 = __commonJS({
|
|
|
4999
5603
|
var require_reader2 = __commonJS({
|
|
5000
5604
|
"../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/readers/reader.js"(exports2) {
|
|
5001
5605
|
"use strict";
|
|
5002
|
-
Object.defineProperty(exports2, "__esModule", {
|
|
5606
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
5607
|
+
value: true
|
|
5608
|
+
});
|
|
5003
5609
|
var path2 = require("path");
|
|
5004
5610
|
var fsStat = require_out();
|
|
5005
5611
|
var utils = require_utils3();
|
|
5006
|
-
var Reader = class {
|
|
5612
|
+
var Reader = class Reader {
|
|
5613
|
+
static {
|
|
5614
|
+
__name(this, "Reader");
|
|
5615
|
+
}
|
|
5007
5616
|
constructor(_settings) {
|
|
5008
5617
|
this._settings = _settings;
|
|
5009
5618
|
this._fsStatSettings = new fsStat.Settings({
|
|
@@ -5038,12 +5647,17 @@ var require_reader2 = __commonJS({
|
|
|
5038
5647
|
var require_stream3 = __commonJS({
|
|
5039
5648
|
"../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/readers/stream.js"(exports2) {
|
|
5040
5649
|
"use strict";
|
|
5041
|
-
Object.defineProperty(exports2, "__esModule", {
|
|
5650
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
5651
|
+
value: true
|
|
5652
|
+
});
|
|
5042
5653
|
var stream_1 = require("stream");
|
|
5043
5654
|
var fsStat = require_out();
|
|
5044
5655
|
var fsWalk = require_out3();
|
|
5045
5656
|
var reader_1 = require_reader2();
|
|
5046
|
-
var ReaderStream = class extends reader_1.default {
|
|
5657
|
+
var ReaderStream = class ReaderStream extends reader_1.default {
|
|
5658
|
+
static {
|
|
5659
|
+
__name(this, "ReaderStream");
|
|
5660
|
+
}
|
|
5047
5661
|
constructor() {
|
|
5048
5662
|
super(...arguments);
|
|
5049
5663
|
this._walkStream = fsWalk.walkStream;
|
|
@@ -5054,7 +5668,9 @@ var require_stream3 = __commonJS({
|
|
|
5054
5668
|
}
|
|
5055
5669
|
static(patterns, options) {
|
|
5056
5670
|
const filepaths = patterns.map(this._getFullEntryPath, this);
|
|
5057
|
-
const stream = new stream_1.PassThrough({
|
|
5671
|
+
const stream = new stream_1.PassThrough({
|
|
5672
|
+
objectMode: true
|
|
5673
|
+
});
|
|
5058
5674
|
stream._write = (index, _enc, done) => {
|
|
5059
5675
|
return this._getEntry(filepaths[index], patterns[index], options).then((entry) => {
|
|
5060
5676
|
if (entry !== null && options.entryFilter(entry)) {
|
|
@@ -5095,11 +5711,16 @@ var require_stream3 = __commonJS({
|
|
|
5095
5711
|
var require_async5 = __commonJS({
|
|
5096
5712
|
"../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/readers/async.js"(exports2) {
|
|
5097
5713
|
"use strict";
|
|
5098
|
-
Object.defineProperty(exports2, "__esModule", {
|
|
5714
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
5715
|
+
value: true
|
|
5716
|
+
});
|
|
5099
5717
|
var fsWalk = require_out3();
|
|
5100
5718
|
var reader_1 = require_reader2();
|
|
5101
5719
|
var stream_1 = require_stream3();
|
|
5102
|
-
var ReaderAsync = class extends reader_1.default {
|
|
5720
|
+
var ReaderAsync = class ReaderAsync extends reader_1.default {
|
|
5721
|
+
static {
|
|
5722
|
+
__name(this, "ReaderAsync");
|
|
5723
|
+
}
|
|
5103
5724
|
constructor() {
|
|
5104
5725
|
super(...arguments);
|
|
5105
5726
|
this._walkAsync = fsWalk.walk;
|
|
@@ -5134,9 +5755,14 @@ var require_async5 = __commonJS({
|
|
|
5134
5755
|
var require_matcher = __commonJS({
|
|
5135
5756
|
"../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/matchers/matcher.js"(exports2) {
|
|
5136
5757
|
"use strict";
|
|
5137
|
-
Object.defineProperty(exports2, "__esModule", {
|
|
5758
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
5759
|
+
value: true
|
|
5760
|
+
});
|
|
5138
5761
|
var utils = require_utils3();
|
|
5139
|
-
var Matcher = class {
|
|
5762
|
+
var Matcher = class Matcher {
|
|
5763
|
+
static {
|
|
5764
|
+
__name(this, "Matcher");
|
|
5765
|
+
}
|
|
5140
5766
|
constructor(_patterns, _settings, _micromatchOptions) {
|
|
5141
5767
|
this._patterns = _patterns;
|
|
5142
5768
|
this._settings = _settings;
|
|
@@ -5185,9 +5811,14 @@ var require_matcher = __commonJS({
|
|
|
5185
5811
|
var require_partial = __commonJS({
|
|
5186
5812
|
"../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/matchers/partial.js"(exports2) {
|
|
5187
5813
|
"use strict";
|
|
5188
|
-
Object.defineProperty(exports2, "__esModule", {
|
|
5814
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
5815
|
+
value: true
|
|
5816
|
+
});
|
|
5189
5817
|
var matcher_1 = require_matcher();
|
|
5190
|
-
var PartialMatcher = class extends matcher_1.default {
|
|
5818
|
+
var PartialMatcher = class PartialMatcher extends matcher_1.default {
|
|
5819
|
+
static {
|
|
5820
|
+
__name(this, "PartialMatcher");
|
|
5821
|
+
}
|
|
5191
5822
|
match(filepath) {
|
|
5192
5823
|
const parts = filepath.split("/");
|
|
5193
5824
|
const levels = parts.length;
|
|
@@ -5222,10 +5853,15 @@ var require_partial = __commonJS({
|
|
|
5222
5853
|
var require_deep = __commonJS({
|
|
5223
5854
|
"../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/filters/deep.js"(exports2) {
|
|
5224
5855
|
"use strict";
|
|
5225
|
-
Object.defineProperty(exports2, "__esModule", {
|
|
5856
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
5857
|
+
value: true
|
|
5858
|
+
});
|
|
5226
5859
|
var utils = require_utils3();
|
|
5227
5860
|
var partial_1 = require_partial();
|
|
5228
|
-
var DeepFilter = class {
|
|
5861
|
+
var DeepFilter = class DeepFilter {
|
|
5862
|
+
static {
|
|
5863
|
+
__name(this, "DeepFilter");
|
|
5864
|
+
}
|
|
5229
5865
|
constructor(_settings, _micromatchOptions) {
|
|
5230
5866
|
this._settings = _settings;
|
|
5231
5867
|
this._micromatchOptions = _micromatchOptions;
|
|
@@ -5287,9 +5923,14 @@ var require_deep = __commonJS({
|
|
|
5287
5923
|
var require_entry = __commonJS({
|
|
5288
5924
|
"../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/filters/entry.js"(exports2) {
|
|
5289
5925
|
"use strict";
|
|
5290
|
-
Object.defineProperty(exports2, "__esModule", {
|
|
5926
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
5927
|
+
value: true
|
|
5928
|
+
});
|
|
5291
5929
|
var utils = require_utils3();
|
|
5292
|
-
var EntryFilter = class {
|
|
5930
|
+
var EntryFilter = class EntryFilter {
|
|
5931
|
+
static {
|
|
5932
|
+
__name(this, "EntryFilter");
|
|
5933
|
+
}
|
|
5293
5934
|
constructor(_settings, _micromatchOptions) {
|
|
5294
5935
|
this._settings = _settings;
|
|
5295
5936
|
this._micromatchOptions = _micromatchOptions;
|
|
@@ -5302,8 +5943,12 @@ var require_entry = __commonJS({
|
|
|
5302
5943
|
all: utils.pattern.convertPatternsToRe(positive, this._micromatchOptions)
|
|
5303
5944
|
},
|
|
5304
5945
|
negative: {
|
|
5305
|
-
absolute: utils.pattern.convertPatternsToRe(absoluteNegative, Object.assign(Object.assign({}, this._micromatchOptions), {
|
|
5306
|
-
|
|
5946
|
+
absolute: utils.pattern.convertPatternsToRe(absoluteNegative, Object.assign(Object.assign({}, this._micromatchOptions), {
|
|
5947
|
+
dot: true
|
|
5948
|
+
})),
|
|
5949
|
+
relative: utils.pattern.convertPatternsToRe(relativeNegative, Object.assign(Object.assign({}, this._micromatchOptions), {
|
|
5950
|
+
dot: true
|
|
5951
|
+
}))
|
|
5307
5952
|
}
|
|
5308
5953
|
};
|
|
5309
5954
|
return (entry) => this._filter(entry, patterns);
|
|
@@ -5375,9 +6020,14 @@ var require_entry = __commonJS({
|
|
|
5375
6020
|
var require_error = __commonJS({
|
|
5376
6021
|
"../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/filters/error.js"(exports2) {
|
|
5377
6022
|
"use strict";
|
|
5378
|
-
Object.defineProperty(exports2, "__esModule", {
|
|
6023
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
6024
|
+
value: true
|
|
6025
|
+
});
|
|
5379
6026
|
var utils = require_utils3();
|
|
5380
|
-
var ErrorFilter = class {
|
|
6027
|
+
var ErrorFilter = class ErrorFilter {
|
|
6028
|
+
static {
|
|
6029
|
+
__name(this, "ErrorFilter");
|
|
6030
|
+
}
|
|
5381
6031
|
constructor(_settings) {
|
|
5382
6032
|
this._settings = _settings;
|
|
5383
6033
|
}
|
|
@@ -5396,9 +6046,14 @@ var require_error = __commonJS({
|
|
|
5396
6046
|
var require_entry2 = __commonJS({
|
|
5397
6047
|
"../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/transformers/entry.js"(exports2) {
|
|
5398
6048
|
"use strict";
|
|
5399
|
-
Object.defineProperty(exports2, "__esModule", {
|
|
6049
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
6050
|
+
value: true
|
|
6051
|
+
});
|
|
5400
6052
|
var utils = require_utils3();
|
|
5401
|
-
var EntryTransformer = class {
|
|
6053
|
+
var EntryTransformer = class EntryTransformer {
|
|
6054
|
+
static {
|
|
6055
|
+
__name(this, "EntryTransformer");
|
|
6056
|
+
}
|
|
5402
6057
|
constructor(_settings) {
|
|
5403
6058
|
this._settings = _settings;
|
|
5404
6059
|
}
|
|
@@ -5417,7 +6072,9 @@ var require_entry2 = __commonJS({
|
|
|
5417
6072
|
if (!this._settings.objectMode) {
|
|
5418
6073
|
return filepath;
|
|
5419
6074
|
}
|
|
5420
|
-
return Object.assign(Object.assign({}, entry), {
|
|
6075
|
+
return Object.assign(Object.assign({}, entry), {
|
|
6076
|
+
path: filepath
|
|
6077
|
+
});
|
|
5421
6078
|
}
|
|
5422
6079
|
};
|
|
5423
6080
|
exports2.default = EntryTransformer;
|
|
@@ -5428,13 +6085,18 @@ var require_entry2 = __commonJS({
|
|
|
5428
6085
|
var require_provider = __commonJS({
|
|
5429
6086
|
"../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/provider.js"(exports2) {
|
|
5430
6087
|
"use strict";
|
|
5431
|
-
Object.defineProperty(exports2, "__esModule", {
|
|
6088
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
6089
|
+
value: true
|
|
6090
|
+
});
|
|
5432
6091
|
var path2 = require("path");
|
|
5433
6092
|
var deep_1 = require_deep();
|
|
5434
6093
|
var entry_1 = require_entry();
|
|
5435
6094
|
var error_1 = require_error();
|
|
5436
6095
|
var entry_2 = require_entry2();
|
|
5437
|
-
var Provider = class {
|
|
6096
|
+
var Provider = class Provider {
|
|
6097
|
+
static {
|
|
6098
|
+
__name(this, "Provider");
|
|
6099
|
+
}
|
|
5438
6100
|
constructor(_settings) {
|
|
5439
6101
|
this._settings = _settings;
|
|
5440
6102
|
this.errorFilter = new error_1.default(this._settings);
|
|
@@ -5482,10 +6144,15 @@ var require_provider = __commonJS({
|
|
|
5482
6144
|
var require_async6 = __commonJS({
|
|
5483
6145
|
"../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/async.js"(exports2) {
|
|
5484
6146
|
"use strict";
|
|
5485
|
-
Object.defineProperty(exports2, "__esModule", {
|
|
6147
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
6148
|
+
value: true
|
|
6149
|
+
});
|
|
5486
6150
|
var async_1 = require_async5();
|
|
5487
6151
|
var provider_1 = require_provider();
|
|
5488
|
-
var ProviderAsync = class extends provider_1.default {
|
|
6152
|
+
var ProviderAsync = class ProviderAsync extends provider_1.default {
|
|
6153
|
+
static {
|
|
6154
|
+
__name(this, "ProviderAsync");
|
|
6155
|
+
}
|
|
5489
6156
|
constructor() {
|
|
5490
6157
|
super(...arguments);
|
|
5491
6158
|
this._reader = new async_1.default(this._settings);
|
|
@@ -5511,11 +6178,16 @@ var require_async6 = __commonJS({
|
|
|
5511
6178
|
var require_stream4 = __commonJS({
|
|
5512
6179
|
"../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/stream.js"(exports2) {
|
|
5513
6180
|
"use strict";
|
|
5514
|
-
Object.defineProperty(exports2, "__esModule", {
|
|
6181
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
6182
|
+
value: true
|
|
6183
|
+
});
|
|
5515
6184
|
var stream_1 = require("stream");
|
|
5516
6185
|
var stream_2 = require_stream3();
|
|
5517
6186
|
var provider_1 = require_provider();
|
|
5518
|
-
var ProviderStream = class extends provider_1.default {
|
|
6187
|
+
var ProviderStream = class ProviderStream extends provider_1.default {
|
|
6188
|
+
static {
|
|
6189
|
+
__name(this, "ProviderStream");
|
|
6190
|
+
}
|
|
5519
6191
|
constructor() {
|
|
5520
6192
|
super(...arguments);
|
|
5521
6193
|
this._reader = new stream_2.default(this._settings);
|
|
@@ -5524,8 +6196,11 @@ var require_stream4 = __commonJS({
|
|
|
5524
6196
|
const root = this._getRootDirectory(task);
|
|
5525
6197
|
const options = this._getReaderOptions(task);
|
|
5526
6198
|
const source = this.api(root, task, options);
|
|
5527
|
-
const destination = new stream_1.Readable({
|
|
5528
|
-
|
|
6199
|
+
const destination = new stream_1.Readable({
|
|
6200
|
+
objectMode: true,
|
|
6201
|
+
read: /* @__PURE__ */ __name(() => {
|
|
6202
|
+
}, "read")
|
|
6203
|
+
});
|
|
5529
6204
|
source.once("error", (error) => destination.emit("error", error)).on("data", (entry) => destination.emit("data", options.transform(entry))).once("end", () => destination.emit("end"));
|
|
5530
6205
|
destination.once("close", () => source.destroy());
|
|
5531
6206
|
return destination;
|
|
@@ -5545,11 +6220,16 @@ var require_stream4 = __commonJS({
|
|
|
5545
6220
|
var require_sync5 = __commonJS({
|
|
5546
6221
|
"../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/readers/sync.js"(exports2) {
|
|
5547
6222
|
"use strict";
|
|
5548
|
-
Object.defineProperty(exports2, "__esModule", {
|
|
6223
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
6224
|
+
value: true
|
|
6225
|
+
});
|
|
5549
6226
|
var fsStat = require_out();
|
|
5550
6227
|
var fsWalk = require_out3();
|
|
5551
6228
|
var reader_1 = require_reader2();
|
|
5552
|
-
var ReaderSync = class extends reader_1.default {
|
|
6229
|
+
var ReaderSync = class ReaderSync extends reader_1.default {
|
|
6230
|
+
static {
|
|
6231
|
+
__name(this, "ReaderSync");
|
|
6232
|
+
}
|
|
5553
6233
|
constructor() {
|
|
5554
6234
|
super(...arguments);
|
|
5555
6235
|
this._walkSync = fsWalk.walkSync;
|
|
@@ -5593,10 +6273,15 @@ var require_sync5 = __commonJS({
|
|
|
5593
6273
|
var require_sync6 = __commonJS({
|
|
5594
6274
|
"../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/sync.js"(exports2) {
|
|
5595
6275
|
"use strict";
|
|
5596
|
-
Object.defineProperty(exports2, "__esModule", {
|
|
6276
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
6277
|
+
value: true
|
|
6278
|
+
});
|
|
5597
6279
|
var sync_1 = require_sync5();
|
|
5598
6280
|
var provider_1 = require_provider();
|
|
5599
|
-
var ProviderSync = class extends provider_1.default {
|
|
6281
|
+
var ProviderSync = class ProviderSync extends provider_1.default {
|
|
6282
|
+
static {
|
|
6283
|
+
__name(this, "ProviderSync");
|
|
6284
|
+
}
|
|
5600
6285
|
constructor() {
|
|
5601
6286
|
super(...arguments);
|
|
5602
6287
|
this._reader = new sync_1.default(this._settings);
|
|
@@ -5622,7 +6307,9 @@ var require_sync6 = __commonJS({
|
|
|
5622
6307
|
var require_settings4 = __commonJS({
|
|
5623
6308
|
"../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/settings.js"(exports2) {
|
|
5624
6309
|
"use strict";
|
|
5625
|
-
Object.defineProperty(exports2, "__esModule", {
|
|
6310
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
6311
|
+
value: true
|
|
6312
|
+
});
|
|
5626
6313
|
exports2.DEFAULT_FILE_SYSTEM_ADAPTER = void 0;
|
|
5627
6314
|
var fs = require("fs");
|
|
5628
6315
|
var os = require("os");
|
|
@@ -5635,7 +6322,10 @@ var require_settings4 = __commonJS({
|
|
|
5635
6322
|
readdir: fs.readdir,
|
|
5636
6323
|
readdirSync: fs.readdirSync
|
|
5637
6324
|
};
|
|
5638
|
-
var Settings = class {
|
|
6325
|
+
var Settings = class Settings {
|
|
6326
|
+
static {
|
|
6327
|
+
__name(this, "Settings");
|
|
6328
|
+
}
|
|
5639
6329
|
constructor(_options = {}) {
|
|
5640
6330
|
this._options = _options;
|
|
5641
6331
|
this.absolute = this._getValue(this._options.absolute, false);
|
|
@@ -5694,6 +6384,7 @@ var require_out4 = __commonJS({
|
|
|
5694
6384
|
const result = await Promise.all(works);
|
|
5695
6385
|
return utils.array.flatten(result);
|
|
5696
6386
|
}
|
|
6387
|
+
__name(FastGlob, "FastGlob");
|
|
5697
6388
|
(function(FastGlob2) {
|
|
5698
6389
|
FastGlob2.glob = FastGlob2;
|
|
5699
6390
|
FastGlob2.globSync = sync;
|
|
@@ -5704,12 +6395,14 @@ var require_out4 = __commonJS({
|
|
|
5704
6395
|
const works = getWorks(source, sync_1.default, options);
|
|
5705
6396
|
return utils.array.flatten(works);
|
|
5706
6397
|
}
|
|
6398
|
+
__name(sync, "sync");
|
|
5707
6399
|
FastGlob2.sync = sync;
|
|
5708
6400
|
function stream(source, options) {
|
|
5709
6401
|
assertPatternsInput(source);
|
|
5710
6402
|
const works = getWorks(source, stream_1.default, options);
|
|
5711
6403
|
return utils.stream.merge(works);
|
|
5712
6404
|
}
|
|
6405
|
+
__name(stream, "stream");
|
|
5713
6406
|
FastGlob2.stream = stream;
|
|
5714
6407
|
function generateTasks(source, options) {
|
|
5715
6408
|
assertPatternsInput(source);
|
|
@@ -5717,22 +6410,26 @@ var require_out4 = __commonJS({
|
|
|
5717
6410
|
const settings = new settings_1.default(options);
|
|
5718
6411
|
return taskManager.generate(patterns, settings);
|
|
5719
6412
|
}
|
|
6413
|
+
__name(generateTasks, "generateTasks");
|
|
5720
6414
|
FastGlob2.generateTasks = generateTasks;
|
|
5721
6415
|
function isDynamicPattern(source, options) {
|
|
5722
6416
|
assertPatternsInput(source);
|
|
5723
6417
|
const settings = new settings_1.default(options);
|
|
5724
6418
|
return utils.pattern.isDynamicPattern(source, settings);
|
|
5725
6419
|
}
|
|
6420
|
+
__name(isDynamicPattern, "isDynamicPattern");
|
|
5726
6421
|
FastGlob2.isDynamicPattern = isDynamicPattern;
|
|
5727
6422
|
function escapePath(source) {
|
|
5728
6423
|
assertPatternsInput(source);
|
|
5729
6424
|
return utils.path.escape(source);
|
|
5730
6425
|
}
|
|
6426
|
+
__name(escapePath, "escapePath");
|
|
5731
6427
|
FastGlob2.escapePath = escapePath;
|
|
5732
6428
|
function convertPathToPattern(source) {
|
|
5733
6429
|
assertPatternsInput(source);
|
|
5734
6430
|
return utils.path.convertPathToPattern(source);
|
|
5735
6431
|
}
|
|
6432
|
+
__name(convertPathToPattern, "convertPathToPattern");
|
|
5736
6433
|
FastGlob2.convertPathToPattern = convertPathToPattern;
|
|
5737
6434
|
let posix;
|
|
5738
6435
|
(function(posix2) {
|
|
@@ -5740,11 +6437,13 @@ var require_out4 = __commonJS({
|
|
|
5740
6437
|
assertPatternsInput(source);
|
|
5741
6438
|
return utils.path.escapePosixPath(source);
|
|
5742
6439
|
}
|
|
6440
|
+
__name(escapePath2, "escapePath");
|
|
5743
6441
|
posix2.escapePath = escapePath2;
|
|
5744
6442
|
function convertPathToPattern2(source) {
|
|
5745
6443
|
assertPatternsInput(source);
|
|
5746
6444
|
return utils.path.convertPosixPathToPattern(source);
|
|
5747
6445
|
}
|
|
6446
|
+
__name(convertPathToPattern2, "convertPathToPattern");
|
|
5748
6447
|
posix2.convertPathToPattern = convertPathToPattern2;
|
|
5749
6448
|
})(posix = FastGlob2.posix || (FastGlob2.posix = {}));
|
|
5750
6449
|
let win32;
|
|
@@ -5753,11 +6452,13 @@ var require_out4 = __commonJS({
|
|
|
5753
6452
|
assertPatternsInput(source);
|
|
5754
6453
|
return utils.path.escapeWindowsPath(source);
|
|
5755
6454
|
}
|
|
6455
|
+
__name(escapePath2, "escapePath");
|
|
5756
6456
|
win322.escapePath = escapePath2;
|
|
5757
6457
|
function convertPathToPattern2(source) {
|
|
5758
6458
|
assertPatternsInput(source);
|
|
5759
6459
|
return utils.path.convertWindowsPathToPattern(source);
|
|
5760
6460
|
}
|
|
6461
|
+
__name(convertPathToPattern2, "convertPathToPattern");
|
|
5761
6462
|
win322.convertPathToPattern = convertPathToPattern2;
|
|
5762
6463
|
})(win32 = FastGlob2.win32 || (FastGlob2.win32 = {}));
|
|
5763
6464
|
})(FastGlob || (FastGlob = {}));
|
|
@@ -5768,6 +6469,7 @@ var require_out4 = __commonJS({
|
|
|
5768
6469
|
const provider = new _Provider(settings);
|
|
5769
6470
|
return tasks.map(provider.read, provider);
|
|
5770
6471
|
}
|
|
6472
|
+
__name(getWorks, "getWorks");
|
|
5771
6473
|
function assertPatternsInput(input) {
|
|
5772
6474
|
const source = [].concat(input);
|
|
5773
6475
|
const isValidSource = source.every((item) => utils.string.isString(item) && !utils.string.isEmpty(item));
|
|
@@ -5775,6 +6477,7 @@ var require_out4 = __commonJS({
|
|
|
5775
6477
|
throw new TypeError("Patterns must be a string (non empty) or an array of strings");
|
|
5776
6478
|
}
|
|
5777
6479
|
}
|
|
6480
|
+
__name(assertPatternsInput, "assertPatternsInput");
|
|
5778
6481
|
module2.exports = FastGlob;
|
|
5779
6482
|
}
|
|
5780
6483
|
});
|
|
@@ -5809,6 +6512,7 @@ function carrierOf(target) {
|
|
|
5809
6512
|
const ctor = typeof target === "function" ? target : target.constructor ?? target;
|
|
5810
6513
|
return ctor;
|
|
5811
6514
|
}
|
|
6515
|
+
__name(carrierOf, "carrierOf");
|
|
5812
6516
|
function getRoutes(ctor) {
|
|
5813
6517
|
const carrier = carrierOf(ctor);
|
|
5814
6518
|
const routes = carrier[ROUTES] ?? [];
|
|
@@ -5833,14 +6537,18 @@ function getRoutes(ctor) {
|
|
|
5833
6537
|
return routes.map((r) => ({
|
|
5834
6538
|
...r,
|
|
5835
6539
|
params: r.params.slice(),
|
|
5836
|
-
...r.throws !== void 0 ? {
|
|
6540
|
+
...r.throws !== void 0 ? {
|
|
6541
|
+
throws: r.throws.slice()
|
|
6542
|
+
} : {}
|
|
5837
6543
|
}));
|
|
5838
6544
|
}
|
|
6545
|
+
__name(getRoutes, "getRoutes");
|
|
5839
6546
|
function getRoom(ctor) {
|
|
5840
6547
|
const carrier = carrierOf(ctor);
|
|
5841
6548
|
if (!Object.prototype.hasOwnProperty.call(carrier, ROOM)) return void 0;
|
|
5842
6549
|
return carrier[ROOM];
|
|
5843
6550
|
}
|
|
6551
|
+
__name(getRoom, "getRoom");
|
|
5844
6552
|
|
|
5845
6553
|
// src/openapi/aggregate.ts
|
|
5846
6554
|
var import_zod3 = require("zod");
|
|
@@ -5856,6 +6564,9 @@ var import_zod = require("zod");
|
|
|
5856
6564
|
// src/errors.ts
|
|
5857
6565
|
var HTTP_ERROR_BRAND = /* @__PURE__ */ Symbol.for("palbase.backend.httpError");
|
|
5858
6566
|
var HttpError = class extends Error {
|
|
6567
|
+
static {
|
|
6568
|
+
__name(this, "HttpError");
|
|
6569
|
+
}
|
|
5859
6570
|
status;
|
|
5860
6571
|
error;
|
|
5861
6572
|
errorDescription;
|
|
@@ -5873,11 +6584,11 @@ var HttpError = class extends Error {
|
|
|
5873
6584
|
}
|
|
5874
6585
|
}
|
|
5875
6586
|
/**
|
|
5876
|
-
|
|
5877
|
-
|
|
5878
|
-
|
|
5879
|
-
|
|
5880
|
-
|
|
6587
|
+
* Serialize to the standard Palbase error response format.
|
|
6588
|
+
* The `requestId` is injected by the runtime layer from the request context.
|
|
6589
|
+
* When called without arguments (e.g. JSON.stringify), request_id is omitted.
|
|
6590
|
+
* When `data` is set, it is appended as a strict-superset field.
|
|
6591
|
+
*/
|
|
5881
6592
|
toJSON(requestId) {
|
|
5882
6593
|
const result = {
|
|
5883
6594
|
error: this.error,
|
|
@@ -5899,26 +6610,59 @@ var HttpError = class extends Error {
|
|
|
5899
6610
|
var ERROR_REGISTRY = /* @__PURE__ */ Symbol.for("palbase.backend.errorRegistry");
|
|
5900
6611
|
var BUILTIN_DATA_SCHEMAS = {
|
|
5901
6612
|
bad_request: import_zod.z.object({
|
|
5902
|
-
fields: import_zod.z.array(import_zod.z.object({
|
|
6613
|
+
fields: import_zod.z.array(import_zod.z.object({
|
|
6614
|
+
field: import_zod.z.string(),
|
|
6615
|
+
message: import_zod.z.string()
|
|
6616
|
+
}))
|
|
5903
6617
|
}),
|
|
5904
|
-
too_many_requests: import_zod.z.object({
|
|
6618
|
+
too_many_requests: import_zod.z.object({
|
|
6619
|
+
retryAfter: import_zod.z.number().int()
|
|
6620
|
+
})
|
|
5905
6621
|
};
|
|
5906
6622
|
function getErrorRegistry() {
|
|
5907
6623
|
const g = globalThis;
|
|
5908
6624
|
if (!g[ERROR_REGISTRY]) {
|
|
5909
6625
|
const m = /* @__PURE__ */ new Map();
|
|
5910
6626
|
for (const [code, status, className] of [
|
|
5911
|
-
[
|
|
5912
|
-
|
|
5913
|
-
|
|
5914
|
-
|
|
5915
|
-
|
|
6627
|
+
[
|
|
6628
|
+
"bad_request",
|
|
6629
|
+
400,
|
|
6630
|
+
"BadRequest"
|
|
6631
|
+
],
|
|
6632
|
+
[
|
|
6633
|
+
"unauthorized",
|
|
6634
|
+
401,
|
|
6635
|
+
"Unauthorized"
|
|
6636
|
+
],
|
|
6637
|
+
[
|
|
6638
|
+
"forbidden",
|
|
6639
|
+
403,
|
|
6640
|
+
"Forbidden"
|
|
6641
|
+
],
|
|
6642
|
+
[
|
|
6643
|
+
"not_found",
|
|
6644
|
+
404,
|
|
6645
|
+
"NotFound"
|
|
6646
|
+
],
|
|
6647
|
+
[
|
|
6648
|
+
"conflict",
|
|
6649
|
+
409,
|
|
6650
|
+
"Conflict"
|
|
6651
|
+
],
|
|
5916
6652
|
// The engine's own 23505 conversion (engine/db.ts) throws this, and an
|
|
5917
6653
|
// author may too. Registered like every other built-in so the spec
|
|
5918
6654
|
// emitter resolves it — an unregistered code is SKIPPED silently there
|
|
5919
6655
|
// (openapi/convert.ts) and would degrade to the client's `.other` case.
|
|
5920
|
-
[
|
|
5921
|
-
|
|
6656
|
+
[
|
|
6657
|
+
"unique_violation",
|
|
6658
|
+
409,
|
|
6659
|
+
"UniqueViolation"
|
|
6660
|
+
],
|
|
6661
|
+
[
|
|
6662
|
+
"too_many_requests",
|
|
6663
|
+
429,
|
|
6664
|
+
"TooManyRequests"
|
|
6665
|
+
]
|
|
5922
6666
|
]) {
|
|
5923
6667
|
const dataSchema = BUILTIN_DATA_SCHEMAS[code];
|
|
5924
6668
|
m.set(code, {
|
|
@@ -5926,33 +6670,39 @@ function getErrorRegistry() {
|
|
|
5926
6670
|
status,
|
|
5927
6671
|
className,
|
|
5928
6672
|
builtin: true,
|
|
5929
|
-
...dataSchema ? {
|
|
6673
|
+
...dataSchema ? {
|
|
6674
|
+
dataSchema,
|
|
6675
|
+
dataDigest: digestOf(code, dataSchema)
|
|
6676
|
+
} : {}
|
|
5930
6677
|
});
|
|
5931
6678
|
}
|
|
5932
6679
|
g[ERROR_REGISTRY] = m;
|
|
5933
6680
|
}
|
|
5934
6681
|
return g[ERROR_REGISTRY];
|
|
5935
6682
|
}
|
|
6683
|
+
__name(getErrorRegistry, "getErrorRegistry");
|
|
5936
6684
|
function digestOf(code, dataSchema) {
|
|
5937
6685
|
const TMP_REF = "__PalbaseErrorDataDigest";
|
|
5938
6686
|
const tmpRegistry = new import_zod_to_openapi.OpenAPIRegistry();
|
|
5939
|
-
tmpRegistry.register(TMP_REF, import_zod.z.object({
|
|
6687
|
+
tmpRegistry.register(TMP_REF, import_zod.z.object({
|
|
6688
|
+
data: dataSchema
|
|
6689
|
+
}).openapi(TMP_REF));
|
|
5940
6690
|
const generated = new import_zod_to_openapi.OpenApiGeneratorV31(tmpRegistry.definitions).generateComponents();
|
|
5941
6691
|
const out = generated.components?.schemas?.[TMP_REF];
|
|
5942
6692
|
const digest = JSON.stringify(out ?? null);
|
|
5943
6693
|
if (digest.includes('"$ref"')) {
|
|
5944
|
-
throw new Error(
|
|
5945
|
-
`defineError: dataSchema for "${code}" carries .openapi(refId) metadata \u2014 it would emit dangling $ref pointers in the project spec. Use a plain zod schema (z.object({...})) without .openapi(...).`
|
|
5946
|
-
);
|
|
6694
|
+
throw new Error(`defineError: dataSchema for "${code}" carries .openapi(refId) metadata \u2014 it would emit dangling $ref pointers in the project spec. Use a plain zod schema (z.object({...})) without .openapi(...).`);
|
|
5947
6695
|
}
|
|
5948
6696
|
return digest;
|
|
5949
6697
|
}
|
|
6698
|
+
__name(digestOf, "digestOf");
|
|
5950
6699
|
|
|
5951
6700
|
// src/openapi/auth.ts
|
|
5952
6701
|
function isAuthEffectivelyRequired(auth) {
|
|
5953
6702
|
if (typeof auth === "boolean") return auth;
|
|
5954
6703
|
return auth.required !== false;
|
|
5955
6704
|
}
|
|
6705
|
+
__name(isAuthEffectivelyRequired, "isAuthEffectivelyRequired");
|
|
5956
6706
|
|
|
5957
6707
|
// src/openapi/controllers.ts
|
|
5958
6708
|
var import_fast_glob = __toESM(require_out4(), 1);
|
|
@@ -5965,12 +6715,15 @@ var APP_DEFAULT_AUTH = /* @__PURE__ */ Symbol.for("palbase.backend.appDefaultAut
|
|
|
5965
6715
|
function appAuthSlot() {
|
|
5966
6716
|
return globalThis;
|
|
5967
6717
|
}
|
|
6718
|
+
__name(appAuthSlot, "appAuthSlot");
|
|
5968
6719
|
function getDefaultAuth() {
|
|
5969
6720
|
return appAuthSlot()[APP_DEFAULT_AUTH];
|
|
5970
6721
|
}
|
|
6722
|
+
__name(getDefaultAuth, "getDefaultAuth");
|
|
5971
6723
|
function resolveEffectiveAuth(routeAuth, controllerAuth) {
|
|
5972
6724
|
return routeAuth ?? controllerAuth ?? getDefaultAuth() ?? true;
|
|
5973
6725
|
}
|
|
6726
|
+
__name(resolveEffectiveAuth, "resolveEffectiveAuth");
|
|
5974
6727
|
function isController(value) {
|
|
5975
6728
|
if (typeof value !== "function" && (typeof value !== "object" || value === null)) {
|
|
5976
6729
|
return false;
|
|
@@ -5978,30 +6731,32 @@ function isController(value) {
|
|
|
5978
6731
|
const carrier = value;
|
|
5979
6732
|
return carrier.__palbase === "controller" && carrier[CONTROLLER_META] !== void 0;
|
|
5980
6733
|
}
|
|
6734
|
+
__name(isController, "isController");
|
|
5981
6735
|
function resolveController(ctor) {
|
|
5982
6736
|
if (typeof ctor !== "function" && (typeof ctor !== "object" || ctor === null)) {
|
|
5983
6737
|
throw new TypeError("resolveController: value is not a class");
|
|
5984
6738
|
}
|
|
5985
6739
|
const meta = ctor[CONTROLLER_META];
|
|
5986
6740
|
if (!meta) {
|
|
5987
|
-
throw new TypeError(
|
|
5988
|
-
"resolveController: class is not a @Controller \u2014 every controller file must `export default` a @Controller-decorated class"
|
|
5989
|
-
);
|
|
6741
|
+
throw new TypeError("resolveController: class is not a @Controller \u2014 every controller file must `export default` a @Controller-decorated class");
|
|
5990
6742
|
}
|
|
5991
6743
|
return meta;
|
|
5992
6744
|
}
|
|
6745
|
+
__name(resolveController, "resolveController");
|
|
5993
6746
|
|
|
5994
6747
|
// src/openapi/discover.ts
|
|
5995
6748
|
function capitalizeSegment(s) {
|
|
5996
6749
|
if (s.length === 0) return s;
|
|
5997
6750
|
return s.charAt(0).toUpperCase() + s.slice(1);
|
|
5998
6751
|
}
|
|
6752
|
+
__name(capitalizeSegment, "capitalizeSegment");
|
|
5999
6753
|
function deriveControllerName(className) {
|
|
6000
6754
|
let name = className;
|
|
6001
6755
|
if (name.endsWith("Controller")) name = name.slice(0, -"Controller".length);
|
|
6002
6756
|
if (name === "") return "";
|
|
6003
6757
|
return name.charAt(0).toLowerCase() + name.slice(1);
|
|
6004
6758
|
}
|
|
6759
|
+
__name(deriveControllerName, "deriveControllerName");
|
|
6005
6760
|
function deriveControllerOperationId(method, fullPath) {
|
|
6006
6761
|
const trimmed = fullPath.replace(/^\//, "");
|
|
6007
6762
|
const parts = trimmed.split("/");
|
|
@@ -6017,6 +6772,7 @@ function deriveControllerOperationId(method, fullPath) {
|
|
|
6017
6772
|
}
|
|
6018
6773
|
return result;
|
|
6019
6774
|
}
|
|
6775
|
+
__name(deriveControllerOperationId, "deriveControllerOperationId");
|
|
6020
6776
|
function joinControllerPath(basePath, subpath) {
|
|
6021
6777
|
const combined = `${basePath}/${subpath}`.replace(/\/{2,}/g, "/");
|
|
6022
6778
|
if (combined.length > 1 && combined.endsWith("/")) {
|
|
@@ -6024,6 +6780,7 @@ function joinControllerPath(basePath, subpath) {
|
|
|
6024
6780
|
}
|
|
6025
6781
|
return combined;
|
|
6026
6782
|
}
|
|
6783
|
+
__name(joinControllerPath, "joinControllerPath");
|
|
6027
6784
|
|
|
6028
6785
|
// src/openapi/controllers.ts
|
|
6029
6786
|
var CONTROLLER_GLOB = "controllers/**/*.ts";
|
|
@@ -6042,16 +6799,17 @@ function flattenController(controller) {
|
|
|
6042
6799
|
const routes = getRoutes(controller);
|
|
6043
6800
|
const kindsByMethod = /* @__PURE__ */ new Map();
|
|
6044
6801
|
for (const route of routes) {
|
|
6045
|
-
const seen = kindsByMethod.get(route.fnName) ?? {
|
|
6802
|
+
const seen = kindsByMethod.get(route.fnName) ?? {
|
|
6803
|
+
sse: false,
|
|
6804
|
+
upload: false
|
|
6805
|
+
};
|
|
6046
6806
|
if (route.options.sseConfig !== void 0) seen.sse = true;
|
|
6047
6807
|
if (route.options.uploadConfig !== void 0) seen.upload = true;
|
|
6048
6808
|
kindsByMethod.set(route.fnName, seen);
|
|
6049
6809
|
}
|
|
6050
6810
|
for (const [fnName, seen] of kindsByMethod) {
|
|
6051
6811
|
if (seen.sse && seen.upload) {
|
|
6052
|
-
throw new Error(
|
|
6053
|
-
`${controller.name}.${fnName} declares BOTH @Sse and @Upload. One method cannot be both a streaming response and an upload completion handler \u2014 the two describe the same handler twice and the second one read silently wins. Split them into two methods.`
|
|
6054
|
-
);
|
|
6812
|
+
throw new Error(`${controller.name}.${fnName} declares BOTH @Sse and @Upload. One method cannot be both a streaming response and an upload completion handler \u2014 the two describe the same handler twice and the second one read silently wins. Split them into two methods.`);
|
|
6055
6813
|
}
|
|
6056
6814
|
}
|
|
6057
6815
|
const out = [];
|
|
@@ -6091,21 +6849,33 @@ function flattenController(controller) {
|
|
|
6091
6849
|
params: route.params,
|
|
6092
6850
|
inputSchemas,
|
|
6093
6851
|
pathParams,
|
|
6094
|
-
...route.returnSchema !== void 0 ? {
|
|
6095
|
-
|
|
6096
|
-
|
|
6097
|
-
...route.options.
|
|
6098
|
-
|
|
6852
|
+
...route.returnSchema !== void 0 ? {
|
|
6853
|
+
returnSchema: route.returnSchema
|
|
6854
|
+
} : {},
|
|
6855
|
+
...route.options.rateLimit !== void 0 ? {
|
|
6856
|
+
rateLimit: route.options.rateLimit
|
|
6857
|
+
} : {},
|
|
6858
|
+
...allThrows.length > 0 ? {
|
|
6859
|
+
throws: allThrows
|
|
6860
|
+
} : {},
|
|
6861
|
+
...route.options.uploadConfig !== void 0 ? {
|
|
6862
|
+
uploadConfig: route.options.uploadConfig
|
|
6863
|
+
} : {},
|
|
6864
|
+
...route.options.sseConfig !== void 0 ? {
|
|
6865
|
+
sseConfig: route.options.sseConfig
|
|
6866
|
+
} : {}
|
|
6099
6867
|
});
|
|
6100
6868
|
}
|
|
6101
6869
|
return out;
|
|
6102
6870
|
}
|
|
6871
|
+
__name(flattenController, "flattenController");
|
|
6103
6872
|
function operationIdFor(route) {
|
|
6104
6873
|
if (route.controllerName !== "" && route.fnName !== "") {
|
|
6105
6874
|
return `${route.controllerName}.${route.fnName}`;
|
|
6106
6875
|
}
|
|
6107
6876
|
return deriveControllerOperationId(route.method, route.fullPath);
|
|
6108
6877
|
}
|
|
6878
|
+
__name(operationIdFor, "operationIdFor");
|
|
6109
6879
|
async function discoverControllerFiles(projectRoot) {
|
|
6110
6880
|
const matches = await (0, import_fast_glob.default)(CONTROLLER_GLOB, {
|
|
6111
6881
|
cwd: projectRoot,
|
|
@@ -6114,19 +6884,24 @@ async function discoverControllerFiles(projectRoot) {
|
|
|
6114
6884
|
onlyFiles: true,
|
|
6115
6885
|
dot: false
|
|
6116
6886
|
});
|
|
6117
|
-
const collator = new Intl.Collator("en", {
|
|
6887
|
+
const collator = new Intl.Collator("en", {
|
|
6888
|
+
numeric: true,
|
|
6889
|
+
sensitivity: "base"
|
|
6890
|
+
});
|
|
6118
6891
|
matches.sort(collator.compare);
|
|
6119
6892
|
return matches;
|
|
6120
6893
|
}
|
|
6894
|
+
__name(discoverControllerFiles, "discoverControllerFiles");
|
|
6121
6895
|
var ControllerLoadError = class extends Error {
|
|
6122
|
-
|
|
6123
|
-
|
|
6124
|
-
this.relativePath = relativePath;
|
|
6125
|
-
this.cause = cause;
|
|
6126
|
-
this.name = "ControllerLoadError";
|
|
6896
|
+
static {
|
|
6897
|
+
__name(this, "ControllerLoadError");
|
|
6127
6898
|
}
|
|
6128
6899
|
relativePath;
|
|
6129
6900
|
cause;
|
|
6901
|
+
constructor(relativePath, message, cause) {
|
|
6902
|
+
super(`${message} (file: ${relativePath})`), this.relativePath = relativePath, this.cause = cause;
|
|
6903
|
+
this.name = "ControllerLoadError";
|
|
6904
|
+
}
|
|
6130
6905
|
};
|
|
6131
6906
|
async function loadControllers(absolutePaths, projectRoot, options = {}) {
|
|
6132
6907
|
const timeoutMs = options.timeoutMs ?? 5e3;
|
|
@@ -6135,24 +6910,21 @@ async function loadControllers(absolutePaths, projectRoot, options = {}) {
|
|
|
6135
6910
|
const relativePath = import_node_path.default.relative(projectRoot, absolutePath).split(import_node_path.default.sep).join("/");
|
|
6136
6911
|
let mod;
|
|
6137
6912
|
try {
|
|
6138
|
-
mod = await withTimeout(
|
|
6139
|
-
() => import((0, import_node_url.pathToFileURL)(absolutePath).href),
|
|
6140
|
-
timeoutMs,
|
|
6141
|
-
`import timed out after ${timeoutMs}ms`
|
|
6142
|
-
);
|
|
6913
|
+
mod = await withTimeout(() => import((0, import_node_url.pathToFileURL)(absolutePath).href), timeoutMs, `import timed out after ${timeoutMs}ms`);
|
|
6143
6914
|
} catch (cause) {
|
|
6144
6915
|
throw new ControllerLoadError(relativePath, "failed to import controller module", cause);
|
|
6145
6916
|
}
|
|
6146
6917
|
if (!isController(mod.default)) {
|
|
6147
|
-
throw new ControllerLoadError(
|
|
6148
|
-
relativePath,
|
|
6149
|
-
"module has no default-exported @Controller class \u2014 every controller file must `export default` a @Controller-decorated class"
|
|
6150
|
-
);
|
|
6918
|
+
throw new ControllerLoadError(relativePath, "module has no default-exported @Controller class \u2014 every controller file must `export default` a @Controller-decorated class");
|
|
6151
6919
|
}
|
|
6152
|
-
out.push({
|
|
6920
|
+
out.push({
|
|
6921
|
+
relativePath,
|
|
6922
|
+
controller: mod.default
|
|
6923
|
+
});
|
|
6153
6924
|
}
|
|
6154
6925
|
return out;
|
|
6155
6926
|
}
|
|
6927
|
+
__name(loadControllers, "loadControllers");
|
|
6156
6928
|
function withTimeout(fn, ms, message) {
|
|
6157
6929
|
return new Promise((resolve, reject) => {
|
|
6158
6930
|
const t = setTimeout(() => reject(new Error(message)), ms);
|
|
@@ -6165,6 +6937,7 @@ function withTimeout(fn, ms, message) {
|
|
|
6165
6937
|
});
|
|
6166
6938
|
});
|
|
6167
6939
|
}
|
|
6940
|
+
__name(withTimeout, "withTimeout");
|
|
6168
6941
|
|
|
6169
6942
|
// src/openapi/convert.ts
|
|
6170
6943
|
(0, import_zod_to_openapi2.extendZodWithOpenApi)(import_zod2.z);
|
|
@@ -6181,6 +6954,7 @@ function registerErrorEnvelope(registry) {
|
|
|
6181
6954
|
});
|
|
6182
6955
|
registry.register(ERROR_ENVELOPE_REF, envelope);
|
|
6183
6956
|
}
|
|
6957
|
+
__name(registerErrorEnvelope, "registerErrorEnvelope");
|
|
6184
6958
|
function registerControllerRoute(registry, route) {
|
|
6185
6959
|
registerOperation(registry, {
|
|
6186
6960
|
method: route.method,
|
|
@@ -6193,21 +6967,44 @@ function registerControllerRoute(registry, route) {
|
|
|
6193
6967
|
returnSchema: route.returnSchema,
|
|
6194
6968
|
effectiveAuth: route.effectiveAuth,
|
|
6195
6969
|
throws: route.throws,
|
|
6196
|
-
...route.uploadConfig !== void 0 ? {
|
|
6197
|
-
|
|
6970
|
+
...route.uploadConfig !== void 0 ? {
|
|
6971
|
+
uploadConfig: route.uploadConfig
|
|
6972
|
+
} : {},
|
|
6973
|
+
...route.sseConfig !== void 0 ? {
|
|
6974
|
+
sseConfig: route.sseConfig
|
|
6975
|
+
} : {}
|
|
6198
6976
|
});
|
|
6199
6977
|
}
|
|
6978
|
+
__name(registerControllerRoute, "registerControllerRoute");
|
|
6200
6979
|
function registerOperation(registry, op) {
|
|
6201
6980
|
const endpointPath = op.path;
|
|
6202
6981
|
const method = op.method.toLowerCase();
|
|
6203
6982
|
const refined = isRefinedSchema(op.body) || isRefinedSchema(op.query) || isRefinedSchema(op.returnSchema);
|
|
6204
|
-
const requestBody = op.body !== void 0 ? {
|
|
6205
|
-
|
|
6983
|
+
const requestBody = op.body !== void 0 ? {
|
|
6984
|
+
required: true,
|
|
6985
|
+
content: {
|
|
6986
|
+
"application/json": {
|
|
6987
|
+
schema: op.body
|
|
6988
|
+
}
|
|
6989
|
+
}
|
|
6990
|
+
} : void 0;
|
|
6991
|
+
const paramsSchema = op.pathParams.length > 0 ? import_zod2.z.object(Object.fromEntries(op.pathParams.map((n) => [
|
|
6992
|
+
n,
|
|
6993
|
+
import_zod2.z.string()
|
|
6994
|
+
]))) : void 0;
|
|
6206
6995
|
const request = {
|
|
6207
|
-
...requestBody ? {
|
|
6208
|
-
|
|
6209
|
-
|
|
6210
|
-
...
|
|
6996
|
+
...requestBody ? {
|
|
6997
|
+
body: requestBody
|
|
6998
|
+
} : {},
|
|
6999
|
+
...paramsSchema ? {
|
|
7000
|
+
params: paramsSchema
|
|
7001
|
+
} : {},
|
|
7002
|
+
...op.query ? {
|
|
7003
|
+
query: op.query
|
|
7004
|
+
} : {},
|
|
7005
|
+
...op.headers ? {
|
|
7006
|
+
headers: op.headers
|
|
7007
|
+
} : {}
|
|
6211
7008
|
};
|
|
6212
7009
|
const resolvedThrows = resolveThrows(op.throws);
|
|
6213
7010
|
const responses = {
|
|
@@ -6230,7 +7027,11 @@ function registerOperation(registry, op) {
|
|
|
6230
7027
|
500: errorResponse("Internal error"),
|
|
6231
7028
|
...typedErrorResponses(resolvedThrows)
|
|
6232
7029
|
};
|
|
6233
|
-
const security = isAuthEffectivelyRequired(op.effectiveAuth) ? [
|
|
7030
|
+
const security = isAuthEffectivelyRequired(op.effectiveAuth) ? [
|
|
7031
|
+
{
|
|
7032
|
+
[BEARER_SCHEME]: []
|
|
7033
|
+
}
|
|
7034
|
+
] : void 0;
|
|
6234
7035
|
registry.registerPath({
|
|
6235
7036
|
// zod-to-openapi@7.3.4's `Method` union predates RFC 10008 and lacks
|
|
6236
7037
|
// "query"; the union is type-only (the lib never validates the method at
|
|
@@ -6239,14 +7040,24 @@ function registerOperation(registry, op) {
|
|
|
6239
7040
|
method,
|
|
6240
7041
|
path: endpointPath,
|
|
6241
7042
|
operationId: op.operationId,
|
|
6242
|
-
tags: [
|
|
7043
|
+
tags: [
|
|
7044
|
+
"backend"
|
|
7045
|
+
],
|
|
6243
7046
|
summary: `Invoke the ${op.operationId} backend endpoint.`,
|
|
6244
7047
|
description: `Runtime path: ${endpointPath}`,
|
|
6245
|
-
...Object.keys(request).length > 0 ? {
|
|
6246
|
-
|
|
7048
|
+
...Object.keys(request).length > 0 ? {
|
|
7049
|
+
request
|
|
7050
|
+
} : {},
|
|
7051
|
+
...security ? {
|
|
7052
|
+
security
|
|
7053
|
+
} : {},
|
|
6247
7054
|
responses,
|
|
6248
|
-
...refined ? {
|
|
6249
|
-
|
|
7055
|
+
...refined ? {
|
|
7056
|
+
"x-palbase-refined": true
|
|
7057
|
+
} : {},
|
|
7058
|
+
...resolvedThrows.length > 0 ? {
|
|
7059
|
+
"x-palbase-errors": errorExtension(resolvedThrows)
|
|
7060
|
+
} : {},
|
|
6250
7061
|
// WHAT MAKES AN UPLOAD ROUTE AN UPLOAD ROUTE, to every generator.
|
|
6251
7062
|
//
|
|
6252
7063
|
// An `@Upload` route's bytes never pass through the backend: the client
|
|
@@ -6271,9 +7082,12 @@ function registerOperation(registry, op) {
|
|
|
6271
7082
|
// plain POST, and every client generated from it reads the body ONCE
|
|
6272
7083
|
// instead of iterating frames — a generated client that compiles, runs and
|
|
6273
7084
|
// is simply wrong. Same failure class as the upload extension above.
|
|
6274
|
-
...op.sseConfig !== void 0 ? {
|
|
7085
|
+
...op.sseConfig !== void 0 ? {
|
|
7086
|
+
"x-palbase-sse": {}
|
|
7087
|
+
} : {}
|
|
6275
7088
|
});
|
|
6276
7089
|
}
|
|
7090
|
+
__name(registerOperation, "registerOperation");
|
|
6277
7091
|
function resolveThrows(throws) {
|
|
6278
7092
|
if (!throws || throws.length === 0) return [];
|
|
6279
7093
|
const registry = getErrorRegistry();
|
|
@@ -6288,11 +7102,14 @@ function resolveThrows(throws) {
|
|
|
6288
7102
|
name: t.name,
|
|
6289
7103
|
code: t.code,
|
|
6290
7104
|
status: entry.status,
|
|
6291
|
-
...entry.dataSchema ? {
|
|
7105
|
+
...entry.dataSchema ? {
|
|
7106
|
+
dataSchema: entry.dataSchema
|
|
7107
|
+
} : {}
|
|
6292
7108
|
});
|
|
6293
7109
|
}
|
|
6294
7110
|
return out;
|
|
6295
7111
|
}
|
|
7112
|
+
__name(resolveThrows, "resolveThrows");
|
|
6296
7113
|
function errorExtension(resolved) {
|
|
6297
7114
|
const out = {};
|
|
6298
7115
|
for (const t of resolved) {
|
|
@@ -6305,42 +7122,61 @@ function errorExtension(resolved) {
|
|
|
6305
7122
|
}
|
|
6306
7123
|
return out;
|
|
6307
7124
|
}
|
|
7125
|
+
__name(errorExtension, "errorExtension");
|
|
6308
7126
|
function lowerCamel(name) {
|
|
6309
7127
|
return name.charAt(0).toLowerCase() + name.slice(1);
|
|
6310
7128
|
}
|
|
7129
|
+
__name(lowerCamel, "lowerCamel");
|
|
6311
7130
|
function typedErrorResponses(resolved) {
|
|
6312
7131
|
const byStatus = /* @__PURE__ */ new Map();
|
|
6313
7132
|
for (const t of resolved) {
|
|
6314
7133
|
const group = byStatus.get(t.status);
|
|
6315
7134
|
if (group) group.push(t);
|
|
6316
|
-
else byStatus.set(t.status, [
|
|
7135
|
+
else byStatus.set(t.status, [
|
|
7136
|
+
t
|
|
7137
|
+
]);
|
|
6317
7138
|
}
|
|
6318
7139
|
const out = {};
|
|
6319
|
-
for (const status of [
|
|
7140
|
+
for (const status of [
|
|
7141
|
+
...byStatus.keys()
|
|
7142
|
+
].sort((a, b) => a - b)) {
|
|
6320
7143
|
const group = byStatus.get(status) ?? [];
|
|
6321
7144
|
const schemas = group.map((t) => envelopeSchemaObject(t));
|
|
6322
|
-
const schema = schemas.length === 1 && schemas[0] ? schemas[0] : {
|
|
7145
|
+
const schema = schemas.length === 1 && schemas[0] ? schemas[0] : {
|
|
7146
|
+
oneOf: schemas
|
|
7147
|
+
};
|
|
6323
7148
|
out[String(status)] = {
|
|
6324
7149
|
description: group.map((t) => t.code).join(" | "),
|
|
6325
|
-
content: {
|
|
7150
|
+
content: {
|
|
7151
|
+
"application/json": {
|
|
7152
|
+
schema
|
|
7153
|
+
}
|
|
7154
|
+
}
|
|
6326
7155
|
};
|
|
6327
7156
|
}
|
|
6328
7157
|
return out;
|
|
6329
7158
|
}
|
|
7159
|
+
__name(typedErrorResponses, "typedErrorResponses");
|
|
6330
7160
|
function envelopeSchemaObject(t) {
|
|
6331
7161
|
const envelope = import_zod2.z.object({
|
|
6332
7162
|
error: import_zod2.z.literal(t.code),
|
|
6333
7163
|
error_description: import_zod2.z.string(),
|
|
6334
7164
|
status: import_zod2.z.number().int(),
|
|
6335
7165
|
request_id: import_zod2.z.string(),
|
|
6336
|
-
...t.dataSchema ? {
|
|
7166
|
+
...t.dataSchema ? {
|
|
7167
|
+
data: t.dataSchema
|
|
7168
|
+
} : {}
|
|
6337
7169
|
});
|
|
6338
7170
|
const obj = toSchemaObject(envelope);
|
|
6339
7171
|
if (obj.properties) {
|
|
6340
|
-
obj.properties["error"] = {
|
|
7172
|
+
obj.properties["error"] = {
|
|
7173
|
+
type: "string",
|
|
7174
|
+
const: t.code
|
|
7175
|
+
};
|
|
6341
7176
|
}
|
|
6342
7177
|
return obj;
|
|
6343
7178
|
}
|
|
7179
|
+
__name(envelopeSchemaObject, "envelopeSchemaObject");
|
|
6344
7180
|
function toSchemaObject(schema) {
|
|
6345
7181
|
const TMP_REF = "__PalbaseTypedErrorEnvelope";
|
|
6346
7182
|
const tmpRegistry = new import_zod_to_openapi2.OpenAPIRegistry();
|
|
@@ -6352,20 +7188,27 @@ function toSchemaObject(schema) {
|
|
|
6352
7188
|
}
|
|
6353
7189
|
return out;
|
|
6354
7190
|
}
|
|
7191
|
+
__name(toSchemaObject, "toSchemaObject");
|
|
6355
7192
|
function errorResponse(description) {
|
|
6356
7193
|
return {
|
|
6357
7194
|
description,
|
|
6358
7195
|
content: {
|
|
6359
|
-
"application/json": {
|
|
7196
|
+
"application/json": {
|
|
7197
|
+
schema: {
|
|
7198
|
+
$ref: `#/components/schemas/${ERROR_ENVELOPE_REF}`
|
|
7199
|
+
}
|
|
7200
|
+
}
|
|
6360
7201
|
}
|
|
6361
7202
|
};
|
|
6362
7203
|
}
|
|
7204
|
+
__name(errorResponse, "errorResponse");
|
|
6363
7205
|
function isRefinedSchema(schema) {
|
|
6364
7206
|
if (!schema) return false;
|
|
6365
7207
|
const typeName = schema._def?.typeName;
|
|
6366
7208
|
if (!typeName) return false;
|
|
6367
7209
|
return typeName === "ZodEffects" || typeName === "ZodPreprocess" || typeName === "ZodTransform";
|
|
6368
7210
|
}
|
|
7211
|
+
__name(isRefinedSchema, "isRefinedSchema");
|
|
6369
7212
|
function firstUntypedField(schema) {
|
|
6370
7213
|
const shape = schema?.shape;
|
|
6371
7214
|
if (!shape) return void 0;
|
|
@@ -6375,47 +7218,50 @@ function firstUntypedField(schema) {
|
|
|
6375
7218
|
}
|
|
6376
7219
|
return void 0;
|
|
6377
7220
|
}
|
|
7221
|
+
__name(firstUntypedField, "firstUntypedField");
|
|
6378
7222
|
function assertRoomFieldsTyped(pattern, room) {
|
|
6379
7223
|
for (const [event, schema] of Object.entries(room.events)) {
|
|
6380
7224
|
const field = firstUntypedField(schema);
|
|
6381
7225
|
if (field !== void 0) {
|
|
6382
|
-
throw new Error(
|
|
6383
|
-
`@Room("${pattern}") event "${event}" has an untyped field "${field}". An untyped payload makes every generated client opaque \u2014 declare its shape.`
|
|
6384
|
-
);
|
|
7226
|
+
throw new Error(`@Room("${pattern}") event "${event}" has an untyped field "${field}". An untyped payload makes every generated client opaque \u2014 declare its shape.`);
|
|
6385
7227
|
}
|
|
6386
7228
|
}
|
|
6387
7229
|
for (const [message, meta] of Object.entries(room.messages)) {
|
|
6388
7230
|
const field = firstUntypedField(meta.schema);
|
|
6389
7231
|
if (field !== void 0) {
|
|
6390
|
-
throw new Error(
|
|
6391
|
-
`@Room("${pattern}") message "${message}" has an untyped field "${field}". Inbound payloads reach the server \u2014 declare the shape so it can be validated.`
|
|
6392
|
-
);
|
|
7232
|
+
throw new Error(`@Room("${pattern}") message "${message}" has an untyped field "${field}". Inbound payloads reach the server \u2014 declare the shape so it can be validated.`);
|
|
6393
7233
|
}
|
|
6394
7234
|
}
|
|
6395
7235
|
}
|
|
7236
|
+
__name(assertRoomFieldsTyped, "assertRoomFieldsTyped");
|
|
6396
7237
|
function roomExtension(room, register) {
|
|
6397
7238
|
const events = {};
|
|
6398
7239
|
for (const [name, schema] of Object.entries(room.events)) {
|
|
6399
|
-
events[name] = {
|
|
7240
|
+
events[name] = {
|
|
7241
|
+
$ref: register(name, schema)
|
|
7242
|
+
};
|
|
6400
7243
|
}
|
|
6401
7244
|
const messages = {};
|
|
6402
7245
|
for (const [name, meta] of Object.entries(room.messages)) {
|
|
6403
|
-
messages[name] = {
|
|
7246
|
+
messages[name] = {
|
|
7247
|
+
$ref: register(name, meta.schema)
|
|
7248
|
+
};
|
|
6404
7249
|
}
|
|
6405
|
-
return {
|
|
7250
|
+
return {
|
|
7251
|
+
events,
|
|
7252
|
+
messages,
|
|
7253
|
+
graceMs: room.graceMs
|
|
7254
|
+
};
|
|
6406
7255
|
}
|
|
7256
|
+
__name(roomExtension, "roomExtension");
|
|
6407
7257
|
|
|
6408
7258
|
// src/openapi/aggregate.ts
|
|
6409
7259
|
(0, import_zod_to_openapi3.extendZodWithOpenApi)(import_zod3.z);
|
|
6410
7260
|
async function aggregateOpenAPI(projectRoot, options = {}) {
|
|
6411
|
-
const loadedControllers = options.loadedControllers ?? await loadControllers(
|
|
6412
|
-
|
|
6413
|
-
|
|
6414
|
-
|
|
6415
|
-
);
|
|
6416
|
-
const controllerRoutes = loadedControllers.flatMap(
|
|
6417
|
-
(lc) => flattenController(lc.controller)
|
|
6418
|
-
);
|
|
7261
|
+
const loadedControllers = options.loadedControllers ?? await loadControllers(await discoverControllerFiles(projectRoot), projectRoot, {
|
|
7262
|
+
timeoutMs: options.timeoutMs
|
|
7263
|
+
});
|
|
7264
|
+
const controllerRoutes = loadedControllers.flatMap((lc) => flattenController(lc.controller));
|
|
6419
7265
|
const allOperationIds = controllerRoutes.map((r) => operationIdFor(r));
|
|
6420
7266
|
detectDuplicateOperationIds(allOperationIds);
|
|
6421
7267
|
const registry = new import_zod_to_openapi3.OpenAPIRegistry();
|
|
@@ -6458,17 +7304,17 @@ async function aggregateOpenAPI(projectRoot, options = {}) {
|
|
|
6458
7304
|
operationIds: allOperationIds
|
|
6459
7305
|
};
|
|
6460
7306
|
}
|
|
7307
|
+
__name(aggregateOpenAPI, "aggregateOpenAPI");
|
|
6461
7308
|
function detectDuplicateOperationIds(operationIds) {
|
|
6462
7309
|
const seen = /* @__PURE__ */ new Set();
|
|
6463
7310
|
for (const id of operationIds) {
|
|
6464
7311
|
if (seen.has(id)) {
|
|
6465
|
-
throw new Error(
|
|
6466
|
-
`operationId collision for "${id}": two routes derive the same operationId. Rename the controller class or method so the derived operationId is unique.`
|
|
6467
|
-
);
|
|
7312
|
+
throw new Error(`operationId collision for "${id}": two routes derive the same operationId. Rename the controller class or method so the derived operationId is unique.`);
|
|
6468
7313
|
}
|
|
6469
7314
|
seen.add(id);
|
|
6470
7315
|
}
|
|
6471
7316
|
}
|
|
7317
|
+
__name(detectDuplicateOperationIds, "detectDuplicateOperationIds");
|
|
6472
7318
|
// Annotate the CommonJS export names for ESM import in node:
|
|
6473
7319
|
0 && (module.exports = {
|
|
6474
7320
|
BEARER_SCHEME,
|