@volter/tabnode 0.2.14-volter.88 → 0.3.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/README.md +12 -5
- package/dist/assets/{runtime-worker-4MKaHFVb.js → runtime-worker-BcDCBbhG.js} +548 -218
- package/dist/code-transforms.d.ts +0 -1
- package/dist/config/cdn.d.ts +0 -1
- package/dist/create-runtime.d.ts +0 -1
- package/dist/host-globals.d.ts +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.mjs +12 -6
- package/dist/node-internals.d.ts +0 -1
- package/dist/node-lib/binding/blob.d.ts +0 -1
- package/dist/node-lib/binding/buffer.d.ts +0 -1
- package/dist/node-lib/binding/cares_wrap.d.ts +0 -1
- package/dist/node-lib/binding/fds.d.ts +0 -1
- package/dist/node-lib/binding/fs.d.ts +0 -1
- package/dist/node-lib/binding/handles.d.ts +0 -1
- package/dist/node-lib/binding/http_parser.d.ts +0 -1
- package/dist/node-lib/binding/index.d.ts +0 -1
- package/dist/node-lib/binding/llhttp-wasm.d.ts +0 -1
- package/dist/node-lib/binding/misc.d.ts +0 -1
- package/dist/node-lib/binding/pipe_wrap.d.ts +0 -1
- package/dist/node-lib/binding/process_wrap.d.ts +0 -1
- package/dist/node-lib/binding/spawn_sync.d.ts +0 -1
- package/dist/node-lib/binding/stream_wrap.d.ts +0 -1
- package/dist/node-lib/binding/stubs.d.ts +0 -1
- package/dist/node-lib/binding/tcp_wrap.d.ts +0 -1
- package/dist/node-lib/binding/tty_wrap.d.ts +0 -1
- package/dist/node-lib/binding/util.d.ts +0 -1
- package/dist/node-lib/binding/uv.d.ts +0 -1
- package/dist/node-lib/binding/zlib-pako.d.ts +0 -1
- package/dist/node-lib/binding/zlib.d.ts +0 -1
- package/dist/node-lib/buffer-module.d.ts +0 -1
- package/dist/node-lib/child-process-module.d.ts +0 -1
- package/dist/node-lib/events-module.d.ts +0 -1
- package/dist/node-lib/fs-module.d.ts +0 -1
- package/dist/node-lib/http-bridge.d.ts +0 -1
- package/dist/node-lib/http-module.d.ts +0 -1
- package/dist/node-lib/internals/addresses.d.ts +0 -1
- package/dist/node-lib/internals/buffer-and-streams.d.ts +0 -1
- package/dist/node-lib/internals/child-process.d.ts +0 -1
- package/dist/node-lib/internals/events-util.d.ts +0 -1
- package/dist/node-lib/internals/index.d.ts +0 -1
- package/dist/node-lib/internals/modules.d.ts +0 -1
- package/dist/node-lib/internals/readline-access.d.ts +0 -1
- package/dist/node-lib/internals/runtime.d.ts +0 -1
- package/dist/node-lib/internals/util.d.ts +0 -1
- package/dist/node-lib/lazy.d.ts +0 -1
- package/dist/node-lib/load.d.ts +0 -1
- package/dist/node-lib/module-hooks.d.ts +0 -1
- package/dist/node-lib/net-module.d.ts +0 -1
- package/dist/node-lib/node-versions.d.ts +0 -1
- package/dist/node-lib/public-modules.d.ts +0 -1
- package/dist/node-lib/require-hook.d.ts +0 -1
- package/dist/node-lib/small-modules.d.ts +0 -1
- package/dist/node-lib/sources.d.ts +1 -2
- package/dist/node-lib/stream-module.d.ts +0 -1
- package/dist/node-lib/timers.d.ts +0 -1
- package/dist/node-lib/util-module.d.ts +0 -1
- package/dist/node-resolution.d.ts +0 -1
- package/dist/node-resolver.d.ts +0 -1
- package/dist/npm/index.d.ts +0 -1
- package/dist/npm/registry.d.ts +0 -1
- package/dist/npm/resolver.d.ts +0 -1
- package/dist/npm/tarball.d.ts +0 -1
- package/dist/process-tokens.d.ts +0 -1
- package/dist/punycode-source.d.ts +0 -1
- package/dist/runtime-interface.d.ts +0 -1
- package/dist/runtime.d.ts +0 -1
- package/dist/server-bridge.d.ts +0 -1
- package/dist/shims/async_hooks.d.ts +0 -1
- package/dist/shims/child_process.d.ts +0 -1
- package/dist/shims/cluster.d.ts +0 -1
- package/dist/shims/command-line.d.ts +0 -1
- package/dist/shims/constants.d.ts +0 -1
- package/dist/shims/crypto-constants.d.ts +0 -1
- package/dist/shims/crypto.d.ts +0 -1
- package/dist/shims/dgram.d.ts +0 -1
- package/dist/shims/dns.d.ts +0 -1
- package/dist/shims/domain.d.ts +0 -1
- package/dist/shims/esbuild.d.ts +0 -1
- package/dist/shims/fs.d.ts +0 -1
- package/dist/shims/http2.d.ts +0 -1
- package/dist/shims/inspector.d.ts +0 -1
- package/dist/shims/module.d.ts +0 -1
- package/dist/shims/os.d.ts +0 -1
- package/dist/shims/path.d.ts +0 -1
- package/dist/shims/perf_hooks.d.ts +0 -1
- package/dist/shims/process.d.ts +0 -1
- package/dist/shims/rollup.d.ts +0 -1
- package/dist/shims/string_decoder.d.ts +0 -1
- package/dist/shims/sync-child.d.ts +0 -1
- package/dist/shims/tls.d.ts +0 -1
- package/dist/shims/url.d.ts +0 -1
- package/dist/shims/v8.d.ts +0 -1
- package/dist/shims/vfs-adapter.d.ts +0 -1
- package/dist/shims/vm.d.ts +0 -1
- package/dist/shims/wasi.d.ts +0 -1
- package/dist/shims/worker_threads.d.ts +0 -1
- package/dist/shims/zlib-constants.d.ts +0 -1
- package/dist/shims/zlib.d.ts +0 -1
- package/dist/transform.d.ts +0 -1
- package/dist/types/package-json.d.ts +0 -1
- package/dist/utils/binary-encoding.d.ts +0 -1
- package/dist/utils/glob.d.ts +0 -1
- package/dist/utils/hash.d.ts +0 -1
- package/dist/virtual-fs.d.ts +0 -1
- package/dist/vite-plugin.d.ts +0 -1
- package/dist/vite-plugin.mjs +0 -1
- package/dist/worker/runtime-worker.d.ts +0 -1
- package/dist/worker-runtime.d.ts +0 -1
- package/package.json +11 -24
- package/src/node-lib/binding/zlib.ts +1 -1
- package/src/node-lib/sources.ts +1 -1
- package/dist/assets/runtime-worker-4MKaHFVb.js.map +0 -1
- package/dist/code-transforms.d.ts.map +0 -1
- package/dist/config/cdn.d.ts.map +0 -1
- package/dist/create-runtime.d.ts.map +0 -1
- package/dist/host-globals.d.ts.map +0 -1
- package/dist/index.cjs +0 -36021
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.mjs.map +0 -1
- package/dist/node-internals.d.ts.map +0 -1
- package/dist/node-lib/binding/blob.d.ts.map +0 -1
- package/dist/node-lib/binding/buffer.d.ts.map +0 -1
- package/dist/node-lib/binding/cares_wrap.d.ts.map +0 -1
- package/dist/node-lib/binding/fds.d.ts.map +0 -1
- package/dist/node-lib/binding/fs.d.ts.map +0 -1
- package/dist/node-lib/binding/handles.d.ts.map +0 -1
- package/dist/node-lib/binding/http_parser.d.ts.map +0 -1
- package/dist/node-lib/binding/index.d.ts.map +0 -1
- package/dist/node-lib/binding/llhttp-wasm.d.ts.map +0 -1
- package/dist/node-lib/binding/misc.d.ts.map +0 -1
- package/dist/node-lib/binding/pipe_wrap.d.ts.map +0 -1
- package/dist/node-lib/binding/process_wrap.d.ts.map +0 -1
- package/dist/node-lib/binding/spawn_sync.d.ts.map +0 -1
- package/dist/node-lib/binding/stream_wrap.d.ts.map +0 -1
- package/dist/node-lib/binding/stubs.d.ts.map +0 -1
- package/dist/node-lib/binding/tcp_wrap.d.ts.map +0 -1
- package/dist/node-lib/binding/tty_wrap.d.ts.map +0 -1
- package/dist/node-lib/binding/util.d.ts.map +0 -1
- package/dist/node-lib/binding/uv.d.ts.map +0 -1
- package/dist/node-lib/binding/zlib-pako.d.ts.map +0 -1
- package/dist/node-lib/binding/zlib.d.ts.map +0 -1
- package/dist/node-lib/buffer-module.d.ts.map +0 -1
- package/dist/node-lib/child-process-module.d.ts.map +0 -1
- package/dist/node-lib/events-module.d.ts.map +0 -1
- package/dist/node-lib/fs-module.d.ts.map +0 -1
- package/dist/node-lib/http-bridge.d.ts.map +0 -1
- package/dist/node-lib/http-module.d.ts.map +0 -1
- package/dist/node-lib/internals/addresses.d.ts.map +0 -1
- package/dist/node-lib/internals/buffer-and-streams.d.ts.map +0 -1
- package/dist/node-lib/internals/child-process.d.ts.map +0 -1
- package/dist/node-lib/internals/events-util.d.ts.map +0 -1
- package/dist/node-lib/internals/index.d.ts.map +0 -1
- package/dist/node-lib/internals/modules.d.ts.map +0 -1
- package/dist/node-lib/internals/readline-access.d.ts.map +0 -1
- package/dist/node-lib/internals/runtime.d.ts.map +0 -1
- package/dist/node-lib/internals/util.d.ts.map +0 -1
- package/dist/node-lib/lazy.d.ts.map +0 -1
- package/dist/node-lib/load.d.ts.map +0 -1
- package/dist/node-lib/module-hooks.d.ts.map +0 -1
- package/dist/node-lib/net-module.d.ts.map +0 -1
- package/dist/node-lib/node-versions.d.ts.map +0 -1
- package/dist/node-lib/public-modules.d.ts.map +0 -1
- package/dist/node-lib/require-hook.d.ts.map +0 -1
- package/dist/node-lib/small-modules.d.ts.map +0 -1
- package/dist/node-lib/sources.d.ts.map +0 -1
- package/dist/node-lib/stream-module.d.ts.map +0 -1
- package/dist/node-lib/timers.d.ts.map +0 -1
- package/dist/node-lib/util-module.d.ts.map +0 -1
- package/dist/node-resolution.d.ts.map +0 -1
- package/dist/node-resolver.d.ts.map +0 -1
- package/dist/npm/index.d.ts.map +0 -1
- package/dist/npm/registry.d.ts.map +0 -1
- package/dist/npm/resolver.d.ts.map +0 -1
- package/dist/npm/tarball.d.ts.map +0 -1
- package/dist/process-tokens.d.ts.map +0 -1
- package/dist/punycode-source.d.ts.map +0 -1
- package/dist/runtime-interface.d.ts.map +0 -1
- package/dist/runtime.d.ts.map +0 -1
- package/dist/server-bridge.d.ts.map +0 -1
- package/dist/shims/async_hooks.d.ts.map +0 -1
- package/dist/shims/child_process.d.ts.map +0 -1
- package/dist/shims/cluster.d.ts.map +0 -1
- package/dist/shims/command-line.d.ts.map +0 -1
- package/dist/shims/constants.d.ts.map +0 -1
- package/dist/shims/crypto-constants.d.ts.map +0 -1
- package/dist/shims/crypto.d.ts.map +0 -1
- package/dist/shims/dgram.d.ts.map +0 -1
- package/dist/shims/dns.d.ts.map +0 -1
- package/dist/shims/domain.d.ts.map +0 -1
- package/dist/shims/esbuild.d.ts.map +0 -1
- package/dist/shims/fs.d.ts.map +0 -1
- package/dist/shims/http2.d.ts.map +0 -1
- package/dist/shims/inspector.d.ts.map +0 -1
- package/dist/shims/module.d.ts.map +0 -1
- package/dist/shims/os.d.ts.map +0 -1
- package/dist/shims/path.d.ts.map +0 -1
- package/dist/shims/perf_hooks.d.ts.map +0 -1
- package/dist/shims/process.d.ts.map +0 -1
- package/dist/shims/rollup.d.ts.map +0 -1
- package/dist/shims/string_decoder.d.ts.map +0 -1
- package/dist/shims/sync-child.d.ts.map +0 -1
- package/dist/shims/tls.d.ts.map +0 -1
- package/dist/shims/url.d.ts.map +0 -1
- package/dist/shims/v8.d.ts.map +0 -1
- package/dist/shims/vfs-adapter.d.ts.map +0 -1
- package/dist/shims/vm.d.ts.map +0 -1
- package/dist/shims/wasi.d.ts.map +0 -1
- package/dist/shims/worker_threads.d.ts.map +0 -1
- package/dist/shims/zlib-constants.d.ts.map +0 -1
- package/dist/shims/zlib.d.ts.map +0 -1
- package/dist/transform.d.ts.map +0 -1
- package/dist/types/package-json.d.ts.map +0 -1
- package/dist/utils/binary-encoding.d.ts.map +0 -1
- package/dist/utils/glob.d.ts.map +0 -1
- package/dist/utils/hash.d.ts.map +0 -1
- package/dist/virtual-fs.d.ts.map +0 -1
- package/dist/vite-plugin.cjs +0 -50
- package/dist/vite-plugin.cjs.map +0 -1
- package/dist/vite-plugin.d.ts.map +0 -1
- package/dist/vite-plugin.mjs.map +0 -1
- package/dist/worker/runtime-worker.d.ts.map +0 -1
- package/dist/worker-runtime.d.ts.map +0 -1
|
@@ -17,7 +17,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
17
17
|
return __privateGet(obj, member, getter);
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
|
-
var _a2, _b2, _asyncId, _triggerAsyncId, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j, _ptr, _type, _maxHeaderSize, _headerBytes, _headers, _field, _value, _readingValue, _url, _statusMessage, _headersSent, _paused, _buffer, _bufferPtr, _bufferSize, _connections, _HTTPParser_instances, reset_fn, copyIn_fn, pushHeader_fn, countHeaderBytes_fn, _parsers, _entries, _at, _encoding, _watcher, _timer, _previous, _strm, _writeState, _callback, _level, _strategy, _windowBits, _memLevel, _dictionary, _ended, _Zlib_instances, inflating_get, windowFor_fn, start_fn, fail_fn, report_fn, run_fn, end_fn, _root, _hasMagic, _uflag, _parts, _parent, _parentIndex, _negs, _filledNegs, _options2, _toString, _emptyExt, _AST_instances, fillNegs_fn, _AST_static, parseAST_fn, partsToRegExp_fn, parseGlob_fn, _resolveChain, _loadChain, _initializing, _initializeFailure, _RunModuleHooks_instances, run_fn2;
|
|
20
|
+
var _a2, _b2, _asyncId, _triggerAsyncId, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j, _ptr, _type, _maxHeaderSize, _headerBytes, _headers, _field, _value, _readingValue, _url, _statusMessage, _headersSent, _paused, _buffer, _bufferPtr, _bufferSize, _connections, _HTTPParser_instances, reset_fn, copyIn_fn, pushHeader_fn, countHeaderBytes_fn, _parsers, _entries, _at, _encoding, _watcher, _timer, _previous, _strm, _writeState, _callback, _level, _strategy, _windowBits, _memLevel, _dictionary, _ended, _Zlib_instances, inflating_get, windowFor_fn, start_fn, fail_fn, report_fn, run_fn, end_fn, _root, _hasMagic, _uflag, _parts, _parent, _parentIndex, _negs, _filledNegs, _options2, _toString, _emptyExt, _AST_instances, fillNegs_fn, _AST_static, parseAST_fn, canAdoptWithSpace_fn, canAdopt_fn, canAdoptType_fn, adoptWithSpace_fn, adopt_fn, canUsurpType_fn, canUsurp_fn, usurp_fn, flatten_fn, partsToRegExp_fn, parseGlob_fn, _Minimatch_instances, matchGlobstar_fn, matchGlobStarBodySections_fn, matchOne_fn, _resolveChain, _loadChain, _initializing, _initializeFailure, _RunModuleHooks_instances, run_fn2;
|
|
21
21
|
function _mergeNamespaces(n8, m) {
|
|
22
22
|
m.forEach(function(e2) {
|
|
23
23
|
e2 && typeof e2 !== "string" && !Array.isArray(e2) && Object.keys(e2).forEach(function(k10) {
|
|
@@ -16915,10 +16915,17 @@ var implementation$1 = function bind2(that) {
|
|
|
16915
16915
|
var implementation = implementation$1;
|
|
16916
16916
|
var functionBind = Function.prototype.bind || implementation;
|
|
16917
16917
|
var functionCall = Function.prototype.call;
|
|
16918
|
-
var functionApply
|
|
16918
|
+
var functionApply;
|
|
16919
|
+
var hasRequiredFunctionApply;
|
|
16920
|
+
function requireFunctionApply() {
|
|
16921
|
+
if (hasRequiredFunctionApply) return functionApply;
|
|
16922
|
+
hasRequiredFunctionApply = 1;
|
|
16923
|
+
functionApply = Function.prototype.apply;
|
|
16924
|
+
return functionApply;
|
|
16925
|
+
}
|
|
16919
16926
|
var reflectApply = typeof Reflect !== "undefined" && Reflect && Reflect.apply;
|
|
16920
16927
|
var bind$2 = functionBind;
|
|
16921
|
-
var $apply$1 =
|
|
16928
|
+
var $apply$1 = requireFunctionApply();
|
|
16922
16929
|
var $call$2 = functionCall;
|
|
16923
16930
|
var $reflectApply = reflectApply;
|
|
16924
16931
|
var actualApply = $reflectApply || bind$2.call($call$2, $apply$1);
|
|
@@ -17038,7 +17045,7 @@ var hasSymbols = requireHasSymbols()();
|
|
|
17038
17045
|
var getProto = requireGetProto();
|
|
17039
17046
|
var $ObjectGPO = requireObject_getPrototypeOf();
|
|
17040
17047
|
var $ReflectGPO = requireReflect_getPrototypeOf();
|
|
17041
|
-
var $apply =
|
|
17048
|
+
var $apply = requireFunctionApply();
|
|
17042
17049
|
var $call = functionCall;
|
|
17043
17050
|
var needsEval = {};
|
|
17044
17051
|
var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined$1 : getProto(Uint8Array);
|
|
@@ -17679,7 +17686,7 @@ function requireApplyBind() {
|
|
|
17679
17686
|
if (hasRequiredApplyBind) return applyBind;
|
|
17680
17687
|
hasRequiredApplyBind = 1;
|
|
17681
17688
|
var bind3 = functionBind;
|
|
17682
|
-
var $apply2 =
|
|
17689
|
+
var $apply2 = requireFunctionApply();
|
|
17683
17690
|
var actualApply$1 = actualApply;
|
|
17684
17691
|
applyBind = function applyBind2() {
|
|
17685
17692
|
return actualApply$1(bind3, $apply2, arguments);
|
|
@@ -27670,7 +27677,11 @@ const slashPattern = /\\\\/g;
|
|
|
27670
27677
|
const openPattern = /\\{/g;
|
|
27671
27678
|
const closePattern = /\\}/g;
|
|
27672
27679
|
const commaPattern = /\\,/g;
|
|
27673
|
-
const periodPattern =
|
|
27680
|
+
const periodPattern = /\\\./g;
|
|
27681
|
+
const EXPANSION_MAX = 1e5;
|
|
27682
|
+
const EXPANSION_MAX_LENGTH = 4e6;
|
|
27683
|
+
const EXPANSION_MAX_DEPTH = 1e3;
|
|
27684
|
+
const EXPANSION_MAX_REWRITES = 1e3;
|
|
27674
27685
|
function numeric(str) {
|
|
27675
27686
|
return !isNaN(str) ? parseInt(str, 10) : str.charCodeAt(0);
|
|
27676
27687
|
}
|
|
@@ -27680,34 +27691,44 @@ function escapeBraces(str) {
|
|
|
27680
27691
|
function unescapeBraces(str) {
|
|
27681
27692
|
return str.replace(escSlashPattern, "\\").replace(escOpenPattern, "{").replace(escClosePattern, "}").replace(escCommaPattern, ",").replace(escPeriodPattern, ".");
|
|
27682
27693
|
}
|
|
27683
|
-
function
|
|
27684
|
-
|
|
27685
|
-
|
|
27694
|
+
function pushAll(target, items) {
|
|
27695
|
+
for (let i10 = 0; i10 < items.length; i10++) {
|
|
27696
|
+
target.push(items[i10]);
|
|
27686
27697
|
}
|
|
27698
|
+
}
|
|
27699
|
+
function parseCommaParts(str) {
|
|
27687
27700
|
const parts = [];
|
|
27688
|
-
|
|
27689
|
-
|
|
27690
|
-
|
|
27691
|
-
|
|
27692
|
-
|
|
27693
|
-
|
|
27694
|
-
|
|
27695
|
-
|
|
27696
|
-
|
|
27697
|
-
|
|
27698
|
-
p.
|
|
27699
|
-
|
|
27700
|
-
|
|
27701
|
-
|
|
27702
|
-
|
|
27703
|
-
|
|
27701
|
+
let carry = "";
|
|
27702
|
+
for (; ; ) {
|
|
27703
|
+
const m = balanced("{", "}", str);
|
|
27704
|
+
if (!m) {
|
|
27705
|
+
const tail = str.split(",");
|
|
27706
|
+
tail[0] = carry + tail[0];
|
|
27707
|
+
pushAll(parts, tail);
|
|
27708
|
+
return parts;
|
|
27709
|
+
}
|
|
27710
|
+
const { pre, body, post } = m;
|
|
27711
|
+
const p = pre.split(",");
|
|
27712
|
+
p[0] = carry + p[0];
|
|
27713
|
+
p[p.length - 1] += "{" + body + "}";
|
|
27714
|
+
if (!post.length) {
|
|
27715
|
+
pushAll(parts, p);
|
|
27716
|
+
return parts;
|
|
27717
|
+
}
|
|
27718
|
+
carry = p.pop();
|
|
27719
|
+
pushAll(parts, p);
|
|
27720
|
+
str = post;
|
|
27721
|
+
}
|
|
27722
|
+
}
|
|
27723
|
+
function expand(str, options = {}) {
|
|
27704
27724
|
if (!str) {
|
|
27705
27725
|
return [];
|
|
27706
27726
|
}
|
|
27727
|
+
const { max: max2 = EXPANSION_MAX, maxLength = EXPANSION_MAX_LENGTH, maxDepth = EXPANSION_MAX_DEPTH, maxRewrites = EXPANSION_MAX_REWRITES } = options;
|
|
27707
27728
|
if (str.slice(0, 2) === "{}") {
|
|
27708
27729
|
str = "\\{\\}" + str.slice(2);
|
|
27709
27730
|
}
|
|
27710
|
-
return expand_(escapeBraces(str), true).map(unescapeBraces);
|
|
27731
|
+
return expand_(escapeBraces(str), max2, maxLength, maxDepth, 0, maxRewrites, true).map(unescapeBraces);
|
|
27711
27732
|
}
|
|
27712
27733
|
function embrace(str) {
|
|
27713
27734
|
return "{" + str + "}";
|
|
@@ -27721,95 +27742,152 @@ function lte(i10, y) {
|
|
|
27721
27742
|
function gte(i10, y) {
|
|
27722
27743
|
return i10 >= y;
|
|
27723
27744
|
}
|
|
27724
|
-
function
|
|
27725
|
-
const
|
|
27726
|
-
|
|
27727
|
-
|
|
27745
|
+
function combine(acc, pre, values, max2, maxLength, dropEmpties) {
|
|
27746
|
+
const out = [];
|
|
27747
|
+
let length = 0;
|
|
27748
|
+
for (let a = 0; a < acc.length; a++) {
|
|
27749
|
+
for (let v2 = 0; v2 < values.length; v2++) {
|
|
27750
|
+
if (out.length >= max2)
|
|
27751
|
+
return out;
|
|
27752
|
+
const expansion = acc[a] + pre + values[v2];
|
|
27753
|
+
if (dropEmpties && !expansion)
|
|
27754
|
+
continue;
|
|
27755
|
+
if (length + expansion.length > maxLength)
|
|
27756
|
+
return out;
|
|
27757
|
+
out.push(expansion);
|
|
27758
|
+
length += expansion.length;
|
|
27759
|
+
}
|
|
27760
|
+
}
|
|
27761
|
+
return out;
|
|
27762
|
+
}
|
|
27763
|
+
function expandSequence(body, isAlphaSequence, max2, maxLength) {
|
|
27764
|
+
const n8 = body.split(/\.\./);
|
|
27765
|
+
const N = [];
|
|
27766
|
+
if (n8[0] === void 0 || n8[1] === void 0) {
|
|
27767
|
+
return N;
|
|
27768
|
+
}
|
|
27769
|
+
const x = numeric(n8[0]);
|
|
27770
|
+
const y = numeric(n8[1]);
|
|
27771
|
+
const width = Math.max(n8[0].length, n8[1].length);
|
|
27772
|
+
let incr = n8.length === 3 && n8[2] !== void 0 ? Math.max(Math.abs(numeric(n8[2])), 1) : 1;
|
|
27773
|
+
let test = lte;
|
|
27774
|
+
const reverse2 = y < x;
|
|
27775
|
+
if (reverse2) {
|
|
27776
|
+
incr *= -1;
|
|
27777
|
+
test = gte;
|
|
27778
|
+
}
|
|
27779
|
+
const pad = n8.some(isPadded);
|
|
27780
|
+
let length = 0;
|
|
27781
|
+
for (let i10 = x; test(i10, y) && N.length < max2; i10 += incr) {
|
|
27782
|
+
let c;
|
|
27783
|
+
if (isAlphaSequence) {
|
|
27784
|
+
c = String.fromCharCode(i10);
|
|
27785
|
+
if (c === "\\") {
|
|
27786
|
+
c = "";
|
|
27787
|
+
}
|
|
27788
|
+
} else {
|
|
27789
|
+
c = String(i10);
|
|
27790
|
+
if (pad) {
|
|
27791
|
+
const need = width - c.length;
|
|
27792
|
+
if (need > 0) {
|
|
27793
|
+
const z10 = new Array(need + 1).join("0");
|
|
27794
|
+
if (i10 < 0) {
|
|
27795
|
+
c = "-" + z10 + c.slice(1);
|
|
27796
|
+
} else {
|
|
27797
|
+
c = z10 + c;
|
|
27798
|
+
}
|
|
27799
|
+
}
|
|
27800
|
+
}
|
|
27801
|
+
}
|
|
27802
|
+
if (length + c.length > maxLength)
|
|
27803
|
+
break;
|
|
27804
|
+
N.push(c);
|
|
27805
|
+
length += c.length;
|
|
27806
|
+
}
|
|
27807
|
+
return N;
|
|
27808
|
+
}
|
|
27809
|
+
function expand_(str, max2, maxLength, maxDepth, depth, maxRewrites, isTop) {
|
|
27810
|
+
if (depth > maxDepth) {
|
|
27728
27811
|
return [str];
|
|
27729
|
-
|
|
27730
|
-
|
|
27731
|
-
|
|
27732
|
-
|
|
27733
|
-
|
|
27734
|
-
|
|
27812
|
+
}
|
|
27813
|
+
let acc = [""];
|
|
27814
|
+
let rewrites = 0;
|
|
27815
|
+
let dropEmpties = false;
|
|
27816
|
+
let firstGroup = true;
|
|
27817
|
+
for (; ; ) {
|
|
27818
|
+
const m = balanced("{", "}", str);
|
|
27819
|
+
if (!m) {
|
|
27820
|
+
return combine(acc, str, [""], max2, maxLength, dropEmpties);
|
|
27821
|
+
}
|
|
27822
|
+
const pre = m.pre;
|
|
27823
|
+
if (/\$$/.test(pre)) {
|
|
27824
|
+
acc = combine(acc, pre + "{" + m.body + "}", [""], max2, maxLength, dropEmpties && !m.post.length);
|
|
27825
|
+
firstGroup = false;
|
|
27826
|
+
if (!m.post.length)
|
|
27827
|
+
break;
|
|
27828
|
+
str = m.post;
|
|
27829
|
+
continue;
|
|
27735
27830
|
}
|
|
27736
|
-
} else {
|
|
27737
27831
|
const isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
|
|
27738
27832
|
const isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
|
|
27739
27833
|
const isSequence = isNumericSequence || isAlphaSequence;
|
|
27740
27834
|
const isOptions = m.body.indexOf(",") >= 0;
|
|
27741
27835
|
if (!isSequence && !isOptions) {
|
|
27742
|
-
if (m.post.match(/,(?!,).*\}/)) {
|
|
27836
|
+
if (rewrites < maxRewrites && m.post.match(/,(?!,).*\}/)) {
|
|
27837
|
+
rewrites++;
|
|
27743
27838
|
str = m.pre + "{" + m.body + escClose + m.post;
|
|
27744
|
-
|
|
27839
|
+
isTop = true;
|
|
27840
|
+
continue;
|
|
27745
27841
|
}
|
|
27746
|
-
return [
|
|
27842
|
+
return combine(acc, pre + "{" + m.body + "}" + m.post, [""], max2, maxLength, dropEmpties);
|
|
27747
27843
|
}
|
|
27748
|
-
|
|
27844
|
+
if (firstGroup) {
|
|
27845
|
+
dropEmpties = isTop && !isSequence;
|
|
27846
|
+
firstGroup = false;
|
|
27847
|
+
}
|
|
27848
|
+
let values;
|
|
27749
27849
|
if (isSequence) {
|
|
27750
|
-
|
|
27850
|
+
values = expandSequence(m.body, isAlphaSequence, max2, maxLength);
|
|
27751
27851
|
} else {
|
|
27752
|
-
n8 = parseCommaParts(m.body);
|
|
27852
|
+
let n8 = parseCommaParts(m.body);
|
|
27753
27853
|
if (n8.length === 1 && n8[0] !== void 0) {
|
|
27754
|
-
n8 = expand_(n8[0], false).map(embrace);
|
|
27854
|
+
n8 = expand_(n8[0], max2, maxLength, maxDepth, depth + 1, maxRewrites, false).map(embrace);
|
|
27755
27855
|
if (n8.length === 1) {
|
|
27756
|
-
|
|
27856
|
+
acc = combine(acc, pre + n8[0], [""], max2, maxLength, dropEmpties && !m.post.length);
|
|
27857
|
+
if (!m.post.length)
|
|
27858
|
+
break;
|
|
27859
|
+
str = m.post;
|
|
27860
|
+
continue;
|
|
27757
27861
|
}
|
|
27758
27862
|
}
|
|
27759
|
-
|
|
27760
|
-
|
|
27761
|
-
|
|
27762
|
-
|
|
27763
|
-
const y = numeric(n8[1]);
|
|
27764
|
-
const width = Math.max(n8[0].length, n8[1].length);
|
|
27765
|
-
let incr = n8.length === 3 && n8[2] !== void 0 ? Math.abs(numeric(n8[2])) : 1;
|
|
27766
|
-
let test = lte;
|
|
27767
|
-
const reverse2 = y < x;
|
|
27768
|
-
if (reverse2) {
|
|
27769
|
-
incr *= -1;
|
|
27770
|
-
test = gte;
|
|
27771
|
-
}
|
|
27772
|
-
const pad = n8.some(isPadded);
|
|
27773
|
-
N = [];
|
|
27774
|
-
for (let i10 = x; test(i10, y); i10 += incr) {
|
|
27775
|
-
let c;
|
|
27776
|
-
if (isAlphaSequence) {
|
|
27777
|
-
c = String.fromCharCode(i10);
|
|
27778
|
-
if (c === "\\") {
|
|
27779
|
-
c = "";
|
|
27780
|
-
}
|
|
27781
|
-
} else {
|
|
27782
|
-
c = String(i10);
|
|
27783
|
-
if (pad) {
|
|
27784
|
-
const need = width - c.length;
|
|
27785
|
-
if (need > 0) {
|
|
27786
|
-
const z10 = new Array(need + 1).join("0");
|
|
27787
|
-
if (i10 < 0) {
|
|
27788
|
-
c = "-" + z10 + c.slice(1);
|
|
27789
|
-
} else {
|
|
27790
|
-
c = z10 + c;
|
|
27791
|
-
}
|
|
27792
|
-
}
|
|
27793
|
-
}
|
|
27863
|
+
let dropsEmpties = dropEmpties && !m.post.length && !pre;
|
|
27864
|
+
for (let d = 0; dropsEmpties && d < acc.length; d++) {
|
|
27865
|
+
if (acc[d]) {
|
|
27866
|
+
dropsEmpties = false;
|
|
27794
27867
|
}
|
|
27795
|
-
N.push(c);
|
|
27796
|
-
}
|
|
27797
|
-
} else {
|
|
27798
|
-
N = [];
|
|
27799
|
-
for (let j = 0; j < n8.length; j++) {
|
|
27800
|
-
N.push.apply(N, expand_(n8[j], false));
|
|
27801
27868
|
}
|
|
27802
|
-
|
|
27803
|
-
|
|
27804
|
-
for (let
|
|
27805
|
-
const
|
|
27806
|
-
|
|
27807
|
-
|
|
27869
|
+
values = [];
|
|
27870
|
+
let valuesLength = 0;
|
|
27871
|
+
outer: for (let j = 0; j < n8.length; j++) {
|
|
27872
|
+
const expanded = expand_(n8[j], max2, maxLength, maxDepth, depth + 1, maxRewrites, false);
|
|
27873
|
+
for (let k10 = 0; k10 < expanded.length; k10++) {
|
|
27874
|
+
const v2 = expanded[k10];
|
|
27875
|
+
if (dropsEmpties && !v2)
|
|
27876
|
+
continue;
|
|
27877
|
+
if (values.length >= max2 || valuesLength + v2.length > maxLength) {
|
|
27878
|
+
break outer;
|
|
27879
|
+
}
|
|
27880
|
+
values.push(v2);
|
|
27881
|
+
valuesLength += v2.length;
|
|
27808
27882
|
}
|
|
27809
27883
|
}
|
|
27810
27884
|
}
|
|
27885
|
+
acc = combine(acc, pre, values, max2, maxLength, dropEmpties && !m.post.length);
|
|
27886
|
+
if (!m.post.length)
|
|
27887
|
+
break;
|
|
27888
|
+
str = m.post;
|
|
27811
27889
|
}
|
|
27812
|
-
return
|
|
27890
|
+
return acc;
|
|
27813
27891
|
}
|
|
27814
27892
|
const MAX_PATTERN_LENGTH = 1024 * 64;
|
|
27815
27893
|
const assertValidPattern = (pattern) => {
|
|
@@ -27929,12 +28007,60 @@ const parseClass = (glob, position) => {
|
|
|
27929
28007
|
};
|
|
27930
28008
|
const unescape = (s10, { windowsPathsNoEscape = false, magicalBraces = true } = {}) => {
|
|
27931
28009
|
if (magicalBraces) {
|
|
27932
|
-
return windowsPathsNoEscape ? s10.replace(/\[([
|
|
28010
|
+
return windowsPathsNoEscape ? s10.replace(/\[([^/\\])\]/g, "$1") : s10.replace(/((?!\\).|^)\[([^/\\])\]/g, "$1$2").replace(/\\([^/])/g, "$1");
|
|
27933
28011
|
}
|
|
27934
|
-
return windowsPathsNoEscape ? s10.replace(/\[([
|
|
28012
|
+
return windowsPathsNoEscape ? s10.replace(/\[([^/\\{}])\]/g, "$1") : s10.replace(/((?!\\).|^)\[([^/\\{}])\]/g, "$1$2").replace(/\\([^/{}])/g, "$1");
|
|
27935
28013
|
};
|
|
28014
|
+
var _a$1;
|
|
27936
28015
|
const types = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]);
|
|
27937
28016
|
const isExtglobType = (c) => types.has(c);
|
|
28017
|
+
const isExtglobAST = (c) => isExtglobType(c.type);
|
|
28018
|
+
const adoptionMap = /* @__PURE__ */ new Map([
|
|
28019
|
+
["!", ["@"]],
|
|
28020
|
+
["?", ["?", "@"]],
|
|
28021
|
+
["@", ["@"]],
|
|
28022
|
+
["*", ["*", "+", "?", "@"]],
|
|
28023
|
+
["+", ["+", "@"]]
|
|
28024
|
+
]);
|
|
28025
|
+
const adoptionWithSpaceMap = /* @__PURE__ */ new Map([
|
|
28026
|
+
["!", ["?"]],
|
|
28027
|
+
["@", ["?"]],
|
|
28028
|
+
["+", ["?", "*"]]
|
|
28029
|
+
]);
|
|
28030
|
+
const adoptionAnyMap = /* @__PURE__ */ new Map([
|
|
28031
|
+
["!", ["?", "@"]],
|
|
28032
|
+
["?", ["?", "@"]],
|
|
28033
|
+
["@", ["?", "@"]],
|
|
28034
|
+
["*", ["*", "+", "?", "@"]],
|
|
28035
|
+
["+", ["+", "@", "?", "*"]]
|
|
28036
|
+
]);
|
|
28037
|
+
const usurpMap = /* @__PURE__ */ new Map([
|
|
28038
|
+
["!", /* @__PURE__ */ new Map([["!", "@"]])],
|
|
28039
|
+
[
|
|
28040
|
+
"?",
|
|
28041
|
+
/* @__PURE__ */ new Map([
|
|
28042
|
+
["*", "*"],
|
|
28043
|
+
["+", "*"]
|
|
28044
|
+
])
|
|
28045
|
+
],
|
|
28046
|
+
[
|
|
28047
|
+
"@",
|
|
28048
|
+
/* @__PURE__ */ new Map([
|
|
28049
|
+
["!", "!"],
|
|
28050
|
+
["?", "?"],
|
|
28051
|
+
["@", "@"],
|
|
28052
|
+
["*", "*"],
|
|
28053
|
+
["+", "+"]
|
|
28054
|
+
])
|
|
28055
|
+
],
|
|
28056
|
+
[
|
|
28057
|
+
"+",
|
|
28058
|
+
/* @__PURE__ */ new Map([
|
|
28059
|
+
["?", "*"],
|
|
28060
|
+
["*", "*"]
|
|
28061
|
+
])
|
|
28062
|
+
]
|
|
28063
|
+
]);
|
|
27938
28064
|
const startNoTraversal = "(?!(?:^|/)\\.\\.?(?:$|/))";
|
|
27939
28065
|
const startNoDot = "(?!\\.)";
|
|
27940
28066
|
const addPatternStart = /* @__PURE__ */ new Set(["[", "."]);
|
|
@@ -27944,7 +28070,8 @@ const regExpEscape$1 = (s10) => s10.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
|
27944
28070
|
const qmark$1 = "[^/]";
|
|
27945
28071
|
const star$1 = qmark$1 + "*?";
|
|
27946
28072
|
const starNoEmpty = qmark$1 + "+?";
|
|
27947
|
-
|
|
28073
|
+
let ID = 0;
|
|
28074
|
+
class AST {
|
|
27948
28075
|
constructor(type2, parent, options = {}) {
|
|
27949
28076
|
__privateAdd(this, _AST_instances);
|
|
27950
28077
|
__publicField(this, "type");
|
|
@@ -27961,6 +28088,7 @@ const _AST = class _AST {
|
|
|
27961
28088
|
// set to true if it's an extglob with no children
|
|
27962
28089
|
// (which really means one child of '')
|
|
27963
28090
|
__privateAdd(this, _emptyExt, false);
|
|
28091
|
+
__publicField(this, "id", ++ID);
|
|
27964
28092
|
this.type = type2;
|
|
27965
28093
|
if (type2)
|
|
27966
28094
|
__privateSet(this, _hasMagic, true);
|
|
@@ -27972,6 +28100,23 @@ const _AST = class _AST {
|
|
|
27972
28100
|
__privateGet(this, _negs).push(this);
|
|
27973
28101
|
__privateSet(this, _parentIndex, __privateGet(this, _parent) ? __privateGet(__privateGet(this, _parent), _parts).length : 0);
|
|
27974
28102
|
}
|
|
28103
|
+
get depth() {
|
|
28104
|
+
var _a3;
|
|
28105
|
+
return (((_a3 = __privateGet(this, _parent)) == null ? void 0 : _a3.depth) ?? -1) + 1;
|
|
28106
|
+
}
|
|
28107
|
+
[Symbol.for("nodejs.util.inspect.custom")]() {
|
|
28108
|
+
var _a3;
|
|
28109
|
+
return {
|
|
28110
|
+
"@@type": "AST",
|
|
28111
|
+
id: this.id,
|
|
28112
|
+
type: this.type,
|
|
28113
|
+
root: __privateGet(this, _root).id,
|
|
28114
|
+
parent: (_a3 = __privateGet(this, _parent)) == null ? void 0 : _a3.id,
|
|
28115
|
+
depth: this.depth,
|
|
28116
|
+
partsLength: __privateGet(this, _parts).length,
|
|
28117
|
+
parts: __privateGet(this, _parts)
|
|
28118
|
+
};
|
|
28119
|
+
}
|
|
27975
28120
|
get hasMagic() {
|
|
27976
28121
|
if (__privateGet(this, _hasMagic) !== void 0)
|
|
27977
28122
|
return __privateGet(this, _hasMagic);
|
|
@@ -27985,19 +28130,13 @@ const _AST = class _AST {
|
|
|
27985
28130
|
}
|
|
27986
28131
|
// reconstructs the pattern
|
|
27987
28132
|
toString() {
|
|
27988
|
-
|
|
27989
|
-
return __privateGet(this, _toString);
|
|
27990
|
-
if (!this.type) {
|
|
27991
|
-
return __privateSet(this, _toString, __privateGet(this, _parts).map((p) => String(p)).join(""));
|
|
27992
|
-
} else {
|
|
27993
|
-
return __privateSet(this, _toString, this.type + "(" + __privateGet(this, _parts).map((p) => String(p)).join("|") + ")");
|
|
27994
|
-
}
|
|
28133
|
+
return __privateGet(this, _toString) !== void 0 ? __privateGet(this, _toString) : !this.type ? __privateSet(this, _toString, __privateGet(this, _parts).map((p) => String(p)).join("")) : __privateSet(this, _toString, this.type + "(" + __privateGet(this, _parts).map((p) => String(p)).join("|") + ")");
|
|
27995
28134
|
}
|
|
27996
28135
|
push(...parts) {
|
|
27997
28136
|
for (const p of parts) {
|
|
27998
28137
|
if (p === "")
|
|
27999
28138
|
continue;
|
|
28000
|
-
if (typeof p !== "string" && !(p instanceof
|
|
28139
|
+
if (typeof p !== "string" && !(p instanceof _a$1 && __privateGet(p, _parent) === this)) {
|
|
28001
28140
|
throw new Error("invalid part: " + p);
|
|
28002
28141
|
}
|
|
28003
28142
|
__privateGet(this, _parts).push(p);
|
|
@@ -28024,7 +28163,7 @@ const _AST = class _AST {
|
|
|
28024
28163
|
const p = __privateGet(this, _parent);
|
|
28025
28164
|
for (let i10 = 0; i10 < __privateGet(this, _parentIndex); i10++) {
|
|
28026
28165
|
const pp2 = __privateGet(p, _parts)[i10];
|
|
28027
|
-
if (!(pp2 instanceof
|
|
28166
|
+
if (!(pp2 instanceof _a$1 && pp2.type === "!")) {
|
|
28028
28167
|
return false;
|
|
28029
28168
|
}
|
|
28030
28169
|
}
|
|
@@ -28050,7 +28189,7 @@ const _AST = class _AST {
|
|
|
28050
28189
|
this.push(part.clone(this));
|
|
28051
28190
|
}
|
|
28052
28191
|
clone(parent) {
|
|
28053
|
-
const c = new
|
|
28192
|
+
const c = new _a$1(this.type, parent);
|
|
28054
28193
|
for (const p of __privateGet(this, _parts)) {
|
|
28055
28194
|
c.copyIn(p);
|
|
28056
28195
|
}
|
|
@@ -28058,8 +28197,8 @@ const _AST = class _AST {
|
|
|
28058
28197
|
}
|
|
28059
28198
|
static fromGlob(pattern, options = {}) {
|
|
28060
28199
|
var _a3;
|
|
28061
|
-
const ast = new
|
|
28062
|
-
__privateMethod(_a3 =
|
|
28200
|
+
const ast = new _a$1(null, void 0, options);
|
|
28201
|
+
__privateMethod(_a3 = _a$1, _AST_static, parseAST_fn).call(_a3, pattern, ast, 0, options, 0);
|
|
28063
28202
|
return ast;
|
|
28064
28203
|
}
|
|
28065
28204
|
// returns the regular expression if there's magic, or the unescaped
|
|
@@ -28154,13 +28293,15 @@ const _AST = class _AST {
|
|
|
28154
28293
|
toRegExpSource(allowDot) {
|
|
28155
28294
|
var _a3;
|
|
28156
28295
|
const dot = allowDot ?? !!__privateGet(this, _options2).dot;
|
|
28157
|
-
if (__privateGet(this, _root) === this)
|
|
28296
|
+
if (__privateGet(this, _root) === this) {
|
|
28297
|
+
__privateMethod(this, _AST_instances, flatten_fn).call(this);
|
|
28158
28298
|
__privateMethod(this, _AST_instances, fillNegs_fn).call(this);
|
|
28159
|
-
|
|
28299
|
+
}
|
|
28300
|
+
if (!isExtglobAST(this)) {
|
|
28160
28301
|
const noEmpty = this.isStart() && this.isEnd() && !__privateGet(this, _parts).some((s10) => typeof s10 !== "string");
|
|
28161
28302
|
const src = __privateGet(this, _parts).map((p) => {
|
|
28162
28303
|
var _a4;
|
|
28163
|
-
const [re2, _, hasMagic, uflag] = typeof p === "string" ? __privateMethod(_a4 =
|
|
28304
|
+
const [re2, _, hasMagic, uflag] = typeof p === "string" ? __privateMethod(_a4 = _a$1, _AST_static, parseGlob_fn).call(_a4, p, __privateGet(this, _hasMagic), noEmpty) : p.toRegExpSource(allowDot);
|
|
28164
28305
|
__privateSet(this, _hasMagic, __privateGet(this, _hasMagic) || hasMagic);
|
|
28165
28306
|
__privateSet(this, _uflag, __privateGet(this, _uflag) || uflag);
|
|
28166
28307
|
return re2;
|
|
@@ -28199,9 +28340,10 @@ const _AST = class _AST {
|
|
|
28199
28340
|
let body = __privateMethod(this, _AST_instances, partsToRegExp_fn).call(this, dot);
|
|
28200
28341
|
if (this.isStart() && this.isEnd() && !body && this.type !== "!") {
|
|
28201
28342
|
const s10 = this.toString();
|
|
28202
|
-
|
|
28203
|
-
|
|
28204
|
-
|
|
28343
|
+
const me = this;
|
|
28344
|
+
__privateSet(me, _parts, [s10]);
|
|
28345
|
+
me.type = null;
|
|
28346
|
+
__privateSet(me, _hasMagic, void 0);
|
|
28205
28347
|
return [s10, unescape(this.toString()), false, false];
|
|
28206
28348
|
}
|
|
28207
28349
|
let bodyDotAllowed = !repeated || allowDot || dot || !startNoDot ? "" : __privateMethod(this, _AST_instances, partsToRegExp_fn).call(this, true);
|
|
@@ -28228,7 +28370,7 @@ const _AST = class _AST {
|
|
|
28228
28370
|
__privateGet(this, _uflag)
|
|
28229
28371
|
];
|
|
28230
28372
|
}
|
|
28231
|
-
}
|
|
28373
|
+
}
|
|
28232
28374
|
_root = new WeakMap();
|
|
28233
28375
|
_hasMagic = new WeakMap();
|
|
28234
28376
|
_uflag = new WeakMap();
|
|
@@ -28270,8 +28412,9 @@ fillNegs_fn = function() {
|
|
|
28270
28412
|
return this;
|
|
28271
28413
|
};
|
|
28272
28414
|
_AST_static = new WeakSet();
|
|
28273
|
-
parseAST_fn = function(str, ast, pos, opt) {
|
|
28274
|
-
var _a3, _b3;
|
|
28415
|
+
parseAST_fn = function(str, ast, pos, opt, extDepth) {
|
|
28416
|
+
var _a3, _b3, _c3, _d3;
|
|
28417
|
+
const maxDepth = opt.maxExtglobRecursion ?? 2;
|
|
28275
28418
|
let escaping = false;
|
|
28276
28419
|
let inBrace = false;
|
|
28277
28420
|
let braceStart = -1;
|
|
@@ -28303,11 +28446,12 @@ parseAST_fn = function(str, ast, pos, opt) {
|
|
|
28303
28446
|
acc2 += c;
|
|
28304
28447
|
continue;
|
|
28305
28448
|
}
|
|
28306
|
-
|
|
28449
|
+
const doRecurse = !opt.noext && isExtglobType(c) && str.charAt(i11) === "(" && extDepth <= maxDepth;
|
|
28450
|
+
if (doRecurse) {
|
|
28307
28451
|
ast.push(acc2);
|
|
28308
28452
|
acc2 = "";
|
|
28309
|
-
const ext2 = new
|
|
28310
|
-
i11 = __privateMethod(_a3 =
|
|
28453
|
+
const ext2 = new _a$1(c, ast);
|
|
28454
|
+
i11 = __privateMethod(_a3 = _a$1, _AST_static, parseAST_fn).call(_a3, str, ext2, i11, opt, extDepth + 1);
|
|
28311
28455
|
ast.push(ext2);
|
|
28312
28456
|
continue;
|
|
28313
28457
|
}
|
|
@@ -28317,7 +28461,7 @@ parseAST_fn = function(str, ast, pos, opt) {
|
|
|
28317
28461
|
return i11;
|
|
28318
28462
|
}
|
|
28319
28463
|
let i10 = pos + 1;
|
|
28320
|
-
let part = new
|
|
28464
|
+
let part = new _a$1(null, ast);
|
|
28321
28465
|
const parts = [];
|
|
28322
28466
|
let acc = "";
|
|
28323
28467
|
while (i10 < str.length) {
|
|
@@ -28344,19 +28488,22 @@ parseAST_fn = function(str, ast, pos, opt) {
|
|
|
28344
28488
|
acc += c;
|
|
28345
28489
|
continue;
|
|
28346
28490
|
}
|
|
28347
|
-
|
|
28491
|
+
const doRecurse = !opt.noext && isExtglobType(c) && str.charAt(i10) === "(" && /* c8 ignore start - the maxDepth is sufficient here */
|
|
28492
|
+
(extDepth <= maxDepth || ast && __privateMethod(_b3 = ast, _AST_instances, canAdoptType_fn).call(_b3, c));
|
|
28493
|
+
if (doRecurse) {
|
|
28494
|
+
const depthAdd = ast && __privateMethod(_c3 = ast, _AST_instances, canAdoptType_fn).call(_c3, c) ? 0 : 1;
|
|
28348
28495
|
part.push(acc);
|
|
28349
28496
|
acc = "";
|
|
28350
|
-
const ext2 = new
|
|
28497
|
+
const ext2 = new _a$1(c, part);
|
|
28351
28498
|
part.push(ext2);
|
|
28352
|
-
i10 = __privateMethod(
|
|
28499
|
+
i10 = __privateMethod(_d3 = _a$1, _AST_static, parseAST_fn).call(_d3, str, ext2, i10, opt, extDepth + depthAdd);
|
|
28353
28500
|
continue;
|
|
28354
28501
|
}
|
|
28355
28502
|
if (c === "|") {
|
|
28356
28503
|
part.push(acc);
|
|
28357
28504
|
acc = "";
|
|
28358
28505
|
parts.push(part);
|
|
28359
|
-
part = new
|
|
28506
|
+
part = new _a$1(null, ast);
|
|
28360
28507
|
continue;
|
|
28361
28508
|
}
|
|
28362
28509
|
if (c === ")") {
|
|
@@ -28375,6 +28522,102 @@ parseAST_fn = function(str, ast, pos, opt) {
|
|
|
28375
28522
|
__privateSet(ast, _parts, [str.substring(pos - 1)]);
|
|
28376
28523
|
return i10;
|
|
28377
28524
|
};
|
|
28525
|
+
canAdoptWithSpace_fn = function(child) {
|
|
28526
|
+
return __privateMethod(this, _AST_instances, canAdopt_fn).call(this, child, adoptionWithSpaceMap);
|
|
28527
|
+
};
|
|
28528
|
+
canAdopt_fn = function(child, map = adoptionMap) {
|
|
28529
|
+
if (!child || typeof child !== "object" || child.type !== null || __privateGet(child, _parts).length !== 1 || this.type === null) {
|
|
28530
|
+
return false;
|
|
28531
|
+
}
|
|
28532
|
+
const gc2 = __privateGet(child, _parts)[0];
|
|
28533
|
+
if (!gc2 || typeof gc2 !== "object" || gc2.type === null) {
|
|
28534
|
+
return false;
|
|
28535
|
+
}
|
|
28536
|
+
return __privateMethod(this, _AST_instances, canAdoptType_fn).call(this, gc2.type, map);
|
|
28537
|
+
};
|
|
28538
|
+
canAdoptType_fn = function(c, map = adoptionAnyMap) {
|
|
28539
|
+
var _a3;
|
|
28540
|
+
return !!((_a3 = map.get(this.type)) == null ? void 0 : _a3.includes(c));
|
|
28541
|
+
};
|
|
28542
|
+
adoptWithSpace_fn = function(child, index2) {
|
|
28543
|
+
const gc2 = __privateGet(child, _parts)[0];
|
|
28544
|
+
const blank = new _a$1(null, gc2, this.options);
|
|
28545
|
+
__privateGet(blank, _parts).push("");
|
|
28546
|
+
gc2.push(blank);
|
|
28547
|
+
__privateMethod(this, _AST_instances, adopt_fn).call(this, child, index2);
|
|
28548
|
+
};
|
|
28549
|
+
adopt_fn = function(child, index2) {
|
|
28550
|
+
const gc2 = __privateGet(child, _parts)[0];
|
|
28551
|
+
__privateGet(this, _parts).splice(index2, 1, ...__privateGet(gc2, _parts));
|
|
28552
|
+
for (const p of __privateGet(gc2, _parts)) {
|
|
28553
|
+
if (typeof p === "object")
|
|
28554
|
+
__privateSet(p, _parent, this);
|
|
28555
|
+
}
|
|
28556
|
+
__privateSet(this, _toString, void 0);
|
|
28557
|
+
};
|
|
28558
|
+
canUsurpType_fn = function(c) {
|
|
28559
|
+
const m = usurpMap.get(this.type);
|
|
28560
|
+
return !!(m == null ? void 0 : m.has(c));
|
|
28561
|
+
};
|
|
28562
|
+
canUsurp_fn = function(child) {
|
|
28563
|
+
if (!child || typeof child !== "object" || child.type !== null || __privateGet(child, _parts).length !== 1 || this.type === null || __privateGet(this, _parts).length !== 1) {
|
|
28564
|
+
return false;
|
|
28565
|
+
}
|
|
28566
|
+
const gc2 = __privateGet(child, _parts)[0];
|
|
28567
|
+
if (!gc2 || typeof gc2 !== "object" || gc2.type === null) {
|
|
28568
|
+
return false;
|
|
28569
|
+
}
|
|
28570
|
+
return __privateMethod(this, _AST_instances, canUsurpType_fn).call(this, gc2.type);
|
|
28571
|
+
};
|
|
28572
|
+
usurp_fn = function(child) {
|
|
28573
|
+
const m = usurpMap.get(this.type);
|
|
28574
|
+
const gc2 = __privateGet(child, _parts)[0];
|
|
28575
|
+
const nt2 = m == null ? void 0 : m.get(gc2.type);
|
|
28576
|
+
if (!nt2)
|
|
28577
|
+
return false;
|
|
28578
|
+
__privateSet(this, _parts, __privateGet(gc2, _parts));
|
|
28579
|
+
for (const p of __privateGet(this, _parts)) {
|
|
28580
|
+
if (typeof p === "object") {
|
|
28581
|
+
__privateSet(p, _parent, this);
|
|
28582
|
+
}
|
|
28583
|
+
}
|
|
28584
|
+
this.type = nt2;
|
|
28585
|
+
__privateSet(this, _toString, void 0);
|
|
28586
|
+
__privateSet(this, _emptyExt, false);
|
|
28587
|
+
};
|
|
28588
|
+
flatten_fn = function() {
|
|
28589
|
+
var _a3, _b3;
|
|
28590
|
+
if (!isExtglobAST(this)) {
|
|
28591
|
+
for (const p of __privateGet(this, _parts)) {
|
|
28592
|
+
if (typeof p === "object") {
|
|
28593
|
+
__privateMethod(_a3 = p, _AST_instances, flatten_fn).call(_a3);
|
|
28594
|
+
}
|
|
28595
|
+
}
|
|
28596
|
+
} else {
|
|
28597
|
+
let iterations = 0;
|
|
28598
|
+
let done = false;
|
|
28599
|
+
do {
|
|
28600
|
+
done = true;
|
|
28601
|
+
for (let i10 = 0; i10 < __privateGet(this, _parts).length; i10++) {
|
|
28602
|
+
const c = __privateGet(this, _parts)[i10];
|
|
28603
|
+
if (typeof c === "object") {
|
|
28604
|
+
__privateMethod(_b3 = c, _AST_instances, flatten_fn).call(_b3);
|
|
28605
|
+
if (__privateMethod(this, _AST_instances, canAdopt_fn).call(this, c)) {
|
|
28606
|
+
done = false;
|
|
28607
|
+
__privateMethod(this, _AST_instances, adopt_fn).call(this, c, i10);
|
|
28608
|
+
} else if (__privateMethod(this, _AST_instances, canAdoptWithSpace_fn).call(this, c)) {
|
|
28609
|
+
done = false;
|
|
28610
|
+
__privateMethod(this, _AST_instances, adoptWithSpace_fn).call(this, c, i10);
|
|
28611
|
+
} else if (__privateMethod(this, _AST_instances, canUsurp_fn).call(this, c)) {
|
|
28612
|
+
done = false;
|
|
28613
|
+
__privateMethod(this, _AST_instances, usurp_fn).call(this, c);
|
|
28614
|
+
}
|
|
28615
|
+
}
|
|
28616
|
+
}
|
|
28617
|
+
} while (!done && ++iterations < 10);
|
|
28618
|
+
}
|
|
28619
|
+
__privateSet(this, _toString, void 0);
|
|
28620
|
+
};
|
|
28378
28621
|
partsToRegExp_fn = function(dot) {
|
|
28379
28622
|
return __privateGet(this, _parts).map((p) => {
|
|
28380
28623
|
if (typeof p === "string") {
|
|
@@ -28389,6 +28632,7 @@ parseGlob_fn = function(glob, hasMagic, noEmpty = false) {
|
|
|
28389
28632
|
let escaping = false;
|
|
28390
28633
|
let re2 = "";
|
|
28391
28634
|
let uflag = false;
|
|
28635
|
+
let inStar = false;
|
|
28392
28636
|
for (let i10 = 0; i10 < glob.length; i10++) {
|
|
28393
28637
|
const c = glob.charAt(i10);
|
|
28394
28638
|
if (escaping) {
|
|
@@ -28396,6 +28640,16 @@ parseGlob_fn = function(glob, hasMagic, noEmpty = false) {
|
|
|
28396
28640
|
re2 += (reSpecials.has(c) ? "\\" : "") + c;
|
|
28397
28641
|
continue;
|
|
28398
28642
|
}
|
|
28643
|
+
if (c === "*") {
|
|
28644
|
+
if (inStar)
|
|
28645
|
+
continue;
|
|
28646
|
+
inStar = true;
|
|
28647
|
+
re2 += noEmpty && /^[*]+$/.test(glob) ? starNoEmpty : star$1;
|
|
28648
|
+
hasMagic = true;
|
|
28649
|
+
continue;
|
|
28650
|
+
} else {
|
|
28651
|
+
inStar = false;
|
|
28652
|
+
}
|
|
28399
28653
|
if (c === "\\") {
|
|
28400
28654
|
if (i10 === glob.length - 1) {
|
|
28401
28655
|
re2 += "\\\\";
|
|
@@ -28414,11 +28668,6 @@ parseGlob_fn = function(glob, hasMagic, noEmpty = false) {
|
|
|
28414
28668
|
continue;
|
|
28415
28669
|
}
|
|
28416
28670
|
}
|
|
28417
|
-
if (c === "*") {
|
|
28418
|
-
re2 += noEmpty && glob === "*" ? starNoEmpty : star$1;
|
|
28419
|
-
hasMagic = true;
|
|
28420
|
-
continue;
|
|
28421
|
-
}
|
|
28422
28671
|
if (c === "?") {
|
|
28423
28672
|
re2 += qmark$1;
|
|
28424
28673
|
hasMagic = true;
|
|
@@ -28428,8 +28677,8 @@ parseGlob_fn = function(glob, hasMagic, noEmpty = false) {
|
|
|
28428
28677
|
}
|
|
28429
28678
|
return [re2, unescape(glob), !!hasMagic, uflag];
|
|
28430
28679
|
};
|
|
28431
|
-
__privateAdd(
|
|
28432
|
-
|
|
28680
|
+
__privateAdd(AST, _AST_static);
|
|
28681
|
+
_a$1 = AST;
|
|
28433
28682
|
const escape = (s10, { windowsPathsNoEscape = false, magicalBraces = false } = {}) => {
|
|
28434
28683
|
if (magicalBraces) {
|
|
28435
28684
|
return windowsPathsNoEscape ? s10.replace(/[?*()[\]{}]/g, "[$&]") : s10.replace(/[?*()[\]\\{}]/g, "\\$&");
|
|
@@ -28444,7 +28693,7 @@ const minimatch = (p, pattern, options = {}) => {
|
|
|
28444
28693
|
}
|
|
28445
28694
|
return new Minimatch(pattern, options).match(p);
|
|
28446
28695
|
};
|
|
28447
|
-
const starDotExtRE = /^\*+([
|
|
28696
|
+
const starDotExtRE = /^\*+([^+@!?*[(]*)$/;
|
|
28448
28697
|
const starDotExtTest = (ext2) => (f10) => !f10.startsWith(".") && f10.endsWith(ext2);
|
|
28449
28698
|
const starDotExtTestDot = (ext2) => (f10) => f10.endsWith(ext2);
|
|
28450
28699
|
const starDotExtTestNocase = (ext2) => {
|
|
@@ -28463,7 +28712,7 @@ const dotStarTest = (f10) => f10 !== "." && f10 !== ".." && f10.startsWith(".");
|
|
|
28463
28712
|
const starRE = /^\*+$/;
|
|
28464
28713
|
const starTest = (f10) => f10.length !== 0 && !f10.startsWith(".");
|
|
28465
28714
|
const starTestDot = (f10) => f10.length !== 0 && f10 !== "." && f10 !== "..";
|
|
28466
|
-
const qmarksRE = /^\?+([
|
|
28715
|
+
const qmarksRE = /^\?+([^+@!?*[(]*)?$/;
|
|
28467
28716
|
const qmarksTestNocase = ([$02, ext2 = ""]) => {
|
|
28468
28717
|
const noext = qmarksTestNoExt([$02]);
|
|
28469
28718
|
if (!ext2)
|
|
@@ -28552,7 +28801,7 @@ const braceExpand = (pattern, options = {}) => {
|
|
|
28552
28801
|
if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) {
|
|
28553
28802
|
return [pattern];
|
|
28554
28803
|
}
|
|
28555
|
-
return expand(pattern);
|
|
28804
|
+
return expand(pattern, { max: options.braceExpandMax });
|
|
28556
28805
|
};
|
|
28557
28806
|
minimatch.braceExpand = braceExpand;
|
|
28558
28807
|
const makeRe = (pattern, options = {}) => new Minimatch(pattern, options).makeRe();
|
|
@@ -28570,6 +28819,7 @@ const globMagic = /[?*]|[+@!]\(.*?\)|\[|\]/;
|
|
|
28570
28819
|
const regExpEscape = (s10) => s10.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
28571
28820
|
class Minimatch {
|
|
28572
28821
|
constructor(pattern, options = {}) {
|
|
28822
|
+
__privateAdd(this, _Minimatch_instances);
|
|
28573
28823
|
__publicField(this, "options");
|
|
28574
28824
|
__publicField(this, "set");
|
|
28575
28825
|
__publicField(this, "pattern");
|
|
@@ -28586,14 +28836,17 @@ class Minimatch {
|
|
|
28586
28836
|
__publicField(this, "isWindows");
|
|
28587
28837
|
__publicField(this, "platform");
|
|
28588
28838
|
__publicField(this, "windowsNoMagicRoot");
|
|
28839
|
+
__publicField(this, "maxGlobstarRecursion");
|
|
28589
28840
|
__publicField(this, "regexp");
|
|
28590
28841
|
assertValidPattern(pattern);
|
|
28591
28842
|
options = options || {};
|
|
28592
28843
|
this.options = options;
|
|
28844
|
+
this.maxGlobstarRecursion = options.maxGlobstarRecursion ?? 200;
|
|
28593
28845
|
this.pattern = pattern;
|
|
28594
28846
|
this.platform = options.platform || defaultPlatform;
|
|
28595
28847
|
this.isWindows = this.platform === "win32";
|
|
28596
|
-
|
|
28848
|
+
const awe = "allowWindowsEscape";
|
|
28849
|
+
this.windowsPathsNoEscape = !!options.windowsPathsNoEscape || options[awe] === false;
|
|
28597
28850
|
if (this.windowsPathsNoEscape) {
|
|
28598
28851
|
this.pattern = this.pattern.replace(/\\/g, "/");
|
|
28599
28852
|
}
|
|
@@ -28650,7 +28903,10 @@ class Minimatch {
|
|
|
28650
28903
|
const isUNC = s10[0] === "" && s10[1] === "" && (s10[2] === "?" || !globMagic.test(s10[2])) && !globMagic.test(s10[3]);
|
|
28651
28904
|
const isDrive = /^[a-z]:/i.test(s10[0]);
|
|
28652
28905
|
if (isUNC) {
|
|
28653
|
-
return [
|
|
28906
|
+
return [
|
|
28907
|
+
...s10.slice(0, 4),
|
|
28908
|
+
...s10.slice(4).map((ss2) => this.parse(ss2))
|
|
28909
|
+
];
|
|
28654
28910
|
} else if (isDrive) {
|
|
28655
28911
|
return [s10[0], ...s10.slice(1).map((ss2) => this.parse(ss2))];
|
|
28656
28912
|
}
|
|
@@ -28676,10 +28932,10 @@ class Minimatch {
|
|
|
28676
28932
|
// of patterns that we have to process.
|
|
28677
28933
|
preprocess(globParts) {
|
|
28678
28934
|
if (this.options.noglobstar) {
|
|
28679
|
-
for (
|
|
28680
|
-
for (let j = 0; j <
|
|
28681
|
-
if (
|
|
28682
|
-
|
|
28935
|
+
for (const partset of globParts) {
|
|
28936
|
+
for (let j = 0; j < partset.length; j++) {
|
|
28937
|
+
if (partset[j] === "**") {
|
|
28938
|
+
partset[j] = "*";
|
|
28683
28939
|
}
|
|
28684
28940
|
}
|
|
28685
28941
|
}
|
|
@@ -28757,7 +29013,7 @@ class Minimatch {
|
|
|
28757
29013
|
let dd2 = 0;
|
|
28758
29014
|
while (-1 !== (dd2 = parts.indexOf("..", dd2 + 1))) {
|
|
28759
29015
|
const p = parts[dd2 - 1];
|
|
28760
|
-
if (p && p !== "." && p !== ".." && p !== "**") {
|
|
29016
|
+
if (p && p !== "." && p !== ".." && p !== "**" && !(this.isWindows && /^[a-z]:$/i.test(p))) {
|
|
28761
29017
|
didSomething = true;
|
|
28762
29018
|
parts.splice(dd2 - 1, 2);
|
|
28763
29019
|
dd2 -= 2;
|
|
@@ -28922,7 +29178,8 @@ class Minimatch {
|
|
|
28922
29178
|
// out of pattern, then that's fine, as long as all
|
|
28923
29179
|
// the parts match.
|
|
28924
29180
|
matchOne(file, pattern, partial = false) {
|
|
28925
|
-
|
|
29181
|
+
let fileStartIndex = 0;
|
|
29182
|
+
let patternStartIndex = 0;
|
|
28926
29183
|
if (this.isWindows) {
|
|
28927
29184
|
const fileDrive = typeof file[0] === "string" && /^[a-z]:$/i.test(file[0]);
|
|
28928
29185
|
const fileUNC = !fileDrive && file[0] === "" && file[1] === "" && file[2] === "?" && /^[a-z]:$/i.test(file[3]);
|
|
@@ -28931,14 +29188,14 @@ class Minimatch {
|
|
|
28931
29188
|
const fdi = fileUNC ? 3 : fileDrive ? 0 : void 0;
|
|
28932
29189
|
const pdi = patternUNC ? 3 : patternDrive ? 0 : void 0;
|
|
28933
29190
|
if (typeof fdi === "number" && typeof pdi === "number") {
|
|
28934
|
-
const [fd2, pd2] = [
|
|
29191
|
+
const [fd2, pd2] = [
|
|
29192
|
+
file[fdi],
|
|
29193
|
+
pattern[pdi]
|
|
29194
|
+
];
|
|
28935
29195
|
if (fd2.toLowerCase() === pd2.toLowerCase()) {
|
|
28936
29196
|
pattern[pdi] = fd2;
|
|
28937
|
-
|
|
28938
|
-
|
|
28939
|
-
} else if (fdi > pdi) {
|
|
28940
|
-
file = file.slice(fdi);
|
|
28941
|
-
}
|
|
29197
|
+
patternStartIndex = pdi;
|
|
29198
|
+
fileStartIndex = fdi;
|
|
28942
29199
|
}
|
|
28943
29200
|
}
|
|
28944
29201
|
}
|
|
@@ -28946,71 +29203,10 @@ class Minimatch {
|
|
|
28946
29203
|
if (optimizationLevel >= 2) {
|
|
28947
29204
|
file = this.levelTwoFileOptimize(file);
|
|
28948
29205
|
}
|
|
28949
|
-
|
|
28950
|
-
|
|
28951
|
-
for (var fi2 = 0, pi2 = 0, fl2 = file.length, pl2 = pattern.length; fi2 < fl2 && pi2 < pl2; fi2++, pi2++) {
|
|
28952
|
-
this.debug("matchOne loop");
|
|
28953
|
-
var p = pattern[pi2];
|
|
28954
|
-
var f10 = file[fi2];
|
|
28955
|
-
this.debug(pattern, p, f10);
|
|
28956
|
-
if (p === false) {
|
|
28957
|
-
return false;
|
|
28958
|
-
}
|
|
28959
|
-
if (p === GLOBSTAR) {
|
|
28960
|
-
this.debug("GLOBSTAR", [pattern, p, f10]);
|
|
28961
|
-
var fr2 = fi2;
|
|
28962
|
-
var pr2 = pi2 + 1;
|
|
28963
|
-
if (pr2 === pl2) {
|
|
28964
|
-
this.debug("** at the end");
|
|
28965
|
-
for (; fi2 < fl2; fi2++) {
|
|
28966
|
-
if (file[fi2] === "." || file[fi2] === ".." || !options.dot && file[fi2].charAt(0) === ".")
|
|
28967
|
-
return false;
|
|
28968
|
-
}
|
|
28969
|
-
return true;
|
|
28970
|
-
}
|
|
28971
|
-
while (fr2 < fl2) {
|
|
28972
|
-
var swallowee = file[fr2];
|
|
28973
|
-
this.debug("\nglobstar while", file, fr2, pattern, pr2, swallowee);
|
|
28974
|
-
if (this.matchOne(file.slice(fr2), pattern.slice(pr2), partial)) {
|
|
28975
|
-
this.debug("globstar found match!", fr2, fl2, swallowee);
|
|
28976
|
-
return true;
|
|
28977
|
-
} else {
|
|
28978
|
-
if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") {
|
|
28979
|
-
this.debug("dot detected!", file, fr2, pattern, pr2);
|
|
28980
|
-
break;
|
|
28981
|
-
}
|
|
28982
|
-
this.debug("globstar swallow a segment, and continue");
|
|
28983
|
-
fr2++;
|
|
28984
|
-
}
|
|
28985
|
-
}
|
|
28986
|
-
if (partial) {
|
|
28987
|
-
this.debug("\n>>> no match, partial?", file, fr2, pattern, pr2);
|
|
28988
|
-
if (fr2 === fl2) {
|
|
28989
|
-
return true;
|
|
28990
|
-
}
|
|
28991
|
-
}
|
|
28992
|
-
return false;
|
|
28993
|
-
}
|
|
28994
|
-
let hit;
|
|
28995
|
-
if (typeof p === "string") {
|
|
28996
|
-
hit = f10 === p;
|
|
28997
|
-
this.debug("string match", p, f10, hit);
|
|
28998
|
-
} else {
|
|
28999
|
-
hit = p.test(f10);
|
|
29000
|
-
this.debug("pattern match", p, f10, hit);
|
|
29001
|
-
}
|
|
29002
|
-
if (!hit)
|
|
29003
|
-
return false;
|
|
29004
|
-
}
|
|
29005
|
-
if (fi2 === fl2 && pi2 === pl2) {
|
|
29006
|
-
return true;
|
|
29007
|
-
} else if (fi2 === fl2) {
|
|
29008
|
-
return partial;
|
|
29009
|
-
} else if (pi2 === pl2) {
|
|
29010
|
-
return fi2 === fl2 - 1 && file[fi2] === "";
|
|
29011
|
-
} else {
|
|
29012
|
-
throw new Error("wtf?");
|
|
29206
|
+
if (pattern.includes(GLOBSTAR)) {
|
|
29207
|
+
return __privateMethod(this, _Minimatch_instances, matchGlobstar_fn).call(this, file, pattern, partial, fileStartIndex, patternStartIndex);
|
|
29013
29208
|
}
|
|
29209
|
+
return __privateMethod(this, _Minimatch_instances, matchOne_fn).call(this, file, pattern, partial, fileStartIndex, patternStartIndex);
|
|
29014
29210
|
}
|
|
29015
29211
|
braceExpand() {
|
|
29016
29212
|
return braceExpand(this.pattern, this.options);
|
|
@@ -29098,7 +29294,7 @@ class Minimatch {
|
|
|
29098
29294
|
re2 = "^(?!" + re2 + ").+$";
|
|
29099
29295
|
try {
|
|
29100
29296
|
this.regexp = new RegExp(re2, [...flags].join(""));
|
|
29101
|
-
} catch
|
|
29297
|
+
} catch {
|
|
29102
29298
|
this.regexp = false;
|
|
29103
29299
|
}
|
|
29104
29300
|
return this.regexp;
|
|
@@ -29106,7 +29302,7 @@ class Minimatch {
|
|
|
29106
29302
|
slashSplit(p) {
|
|
29107
29303
|
if (this.preserveMultipleSlashes) {
|
|
29108
29304
|
return p.split("/");
|
|
29109
|
-
} else if (this.isWindows && /^\/\/[
|
|
29305
|
+
} else if (this.isWindows && /^\/\/[^/]+/.test(p)) {
|
|
29110
29306
|
return ["", ...p.split(/\/+/)];
|
|
29111
29307
|
} else {
|
|
29112
29308
|
return p.split(/\/+/);
|
|
@@ -29137,8 +29333,7 @@ class Minimatch {
|
|
|
29137
29333
|
filename = ff2[i10];
|
|
29138
29334
|
}
|
|
29139
29335
|
}
|
|
29140
|
-
for (
|
|
29141
|
-
const pattern = set[i10];
|
|
29336
|
+
for (const pattern of set) {
|
|
29142
29337
|
let file = ff2;
|
|
29143
29338
|
if (options.matchBase && pattern.length === 1) {
|
|
29144
29339
|
file = [filename];
|
|
@@ -29160,6 +29355,142 @@ class Minimatch {
|
|
|
29160
29355
|
return minimatch.defaults(def).Minimatch;
|
|
29161
29356
|
}
|
|
29162
29357
|
}
|
|
29358
|
+
_Minimatch_instances = new WeakSet();
|
|
29359
|
+
matchGlobstar_fn = function(file, pattern, partial, fileIndex, patternIndex) {
|
|
29360
|
+
const firstgs = pattern.indexOf(GLOBSTAR, patternIndex);
|
|
29361
|
+
const lastgs = pattern.lastIndexOf(GLOBSTAR);
|
|
29362
|
+
const [head, body, tail] = partial ? [
|
|
29363
|
+
pattern.slice(patternIndex, firstgs),
|
|
29364
|
+
pattern.slice(firstgs + 1),
|
|
29365
|
+
[]
|
|
29366
|
+
] : [
|
|
29367
|
+
pattern.slice(patternIndex, firstgs),
|
|
29368
|
+
pattern.slice(firstgs + 1, lastgs),
|
|
29369
|
+
pattern.slice(lastgs + 1)
|
|
29370
|
+
];
|
|
29371
|
+
if (head.length) {
|
|
29372
|
+
const fileHead = file.slice(fileIndex, fileIndex + head.length);
|
|
29373
|
+
if (!__privateMethod(this, _Minimatch_instances, matchOne_fn).call(this, fileHead, head, partial, 0, 0)) {
|
|
29374
|
+
return false;
|
|
29375
|
+
}
|
|
29376
|
+
fileIndex += head.length;
|
|
29377
|
+
patternIndex += head.length;
|
|
29378
|
+
}
|
|
29379
|
+
let fileTailMatch = 0;
|
|
29380
|
+
if (tail.length) {
|
|
29381
|
+
if (tail.length + fileIndex > file.length)
|
|
29382
|
+
return false;
|
|
29383
|
+
let tailStart = file.length - tail.length;
|
|
29384
|
+
if (__privateMethod(this, _Minimatch_instances, matchOne_fn).call(this, file, tail, partial, tailStart, 0)) {
|
|
29385
|
+
fileTailMatch = tail.length;
|
|
29386
|
+
} else {
|
|
29387
|
+
if (file[file.length - 1] !== "" || fileIndex + tail.length === file.length) {
|
|
29388
|
+
return false;
|
|
29389
|
+
}
|
|
29390
|
+
tailStart--;
|
|
29391
|
+
if (!__privateMethod(this, _Minimatch_instances, matchOne_fn).call(this, file, tail, partial, tailStart, 0)) {
|
|
29392
|
+
return false;
|
|
29393
|
+
}
|
|
29394
|
+
fileTailMatch = tail.length + 1;
|
|
29395
|
+
}
|
|
29396
|
+
}
|
|
29397
|
+
if (!body.length) {
|
|
29398
|
+
let sawSome = !!fileTailMatch;
|
|
29399
|
+
for (let i22 = fileIndex; i22 < file.length - fileTailMatch; i22++) {
|
|
29400
|
+
const f10 = String(file[i22]);
|
|
29401
|
+
sawSome = true;
|
|
29402
|
+
if (f10 === "." || f10 === ".." || !this.options.dot && f10.startsWith(".")) {
|
|
29403
|
+
return false;
|
|
29404
|
+
}
|
|
29405
|
+
}
|
|
29406
|
+
return partial || sawSome;
|
|
29407
|
+
}
|
|
29408
|
+
const bodySegments = [[[], 0]];
|
|
29409
|
+
let currentBody = bodySegments[0];
|
|
29410
|
+
let nonGsParts = 0;
|
|
29411
|
+
const nonGsPartsSums = [0];
|
|
29412
|
+
for (const b of body) {
|
|
29413
|
+
if (b === GLOBSTAR) {
|
|
29414
|
+
nonGsPartsSums.push(nonGsParts);
|
|
29415
|
+
currentBody = [[], 0];
|
|
29416
|
+
bodySegments.push(currentBody);
|
|
29417
|
+
} else {
|
|
29418
|
+
currentBody[0].push(b);
|
|
29419
|
+
nonGsParts++;
|
|
29420
|
+
}
|
|
29421
|
+
}
|
|
29422
|
+
let i10 = bodySegments.length - 1;
|
|
29423
|
+
const fileLength = file.length - fileTailMatch;
|
|
29424
|
+
for (const b of bodySegments) {
|
|
29425
|
+
b[1] = fileLength - (nonGsPartsSums[i10--] + b[0].length);
|
|
29426
|
+
}
|
|
29427
|
+
return !!__privateMethod(this, _Minimatch_instances, matchGlobStarBodySections_fn).call(this, file, bodySegments, fileIndex, 0, partial, 0, !!fileTailMatch);
|
|
29428
|
+
};
|
|
29429
|
+
// return false for "nope, not matching"
|
|
29430
|
+
// return null for "not matching, cannot keep trying"
|
|
29431
|
+
matchGlobStarBodySections_fn = function(file, bodySegments, fileIndex, bodyIndex, partial, globStarDepth, sawTail) {
|
|
29432
|
+
const bs2 = bodySegments[bodyIndex];
|
|
29433
|
+
if (!bs2) {
|
|
29434
|
+
for (let i10 = fileIndex; i10 < file.length; i10++) {
|
|
29435
|
+
sawTail = true;
|
|
29436
|
+
const f10 = file[i10];
|
|
29437
|
+
if (f10 === "." || f10 === ".." || !this.options.dot && f10.startsWith(".")) {
|
|
29438
|
+
return false;
|
|
29439
|
+
}
|
|
29440
|
+
}
|
|
29441
|
+
return sawTail;
|
|
29442
|
+
}
|
|
29443
|
+
const [body, after] = bs2;
|
|
29444
|
+
while (fileIndex <= after) {
|
|
29445
|
+
const m = __privateMethod(this, _Minimatch_instances, matchOne_fn).call(this, file.slice(0, fileIndex + body.length), body, partial, fileIndex, 0);
|
|
29446
|
+
if (m && globStarDepth < this.maxGlobstarRecursion) {
|
|
29447
|
+
const sub = __privateMethod(this, _Minimatch_instances, matchGlobStarBodySections_fn).call(this, file, bodySegments, fileIndex + body.length, bodyIndex + 1, partial, globStarDepth + 1, sawTail);
|
|
29448
|
+
if (sub !== false) {
|
|
29449
|
+
return sub;
|
|
29450
|
+
}
|
|
29451
|
+
}
|
|
29452
|
+
const f10 = file[fileIndex];
|
|
29453
|
+
if (f10 === "." || f10 === ".." || !this.options.dot && f10.startsWith(".")) {
|
|
29454
|
+
return false;
|
|
29455
|
+
}
|
|
29456
|
+
fileIndex++;
|
|
29457
|
+
}
|
|
29458
|
+
return partial || null;
|
|
29459
|
+
};
|
|
29460
|
+
matchOne_fn = function(file, pattern, partial, fileIndex, patternIndex) {
|
|
29461
|
+
let fi2;
|
|
29462
|
+
let pi2;
|
|
29463
|
+
let pl2;
|
|
29464
|
+
let fl2;
|
|
29465
|
+
for (fi2 = fileIndex, pi2 = patternIndex, fl2 = file.length, pl2 = pattern.length; fi2 < fl2 && pi2 < pl2; fi2++, pi2++) {
|
|
29466
|
+
this.debug("matchOne loop");
|
|
29467
|
+
let p = pattern[pi2];
|
|
29468
|
+
let f10 = file[fi2];
|
|
29469
|
+
this.debug(pattern, p, f10);
|
|
29470
|
+
if (p === false || p === GLOBSTAR) {
|
|
29471
|
+
return false;
|
|
29472
|
+
}
|
|
29473
|
+
let hit;
|
|
29474
|
+
if (typeof p === "string") {
|
|
29475
|
+
hit = f10 === p;
|
|
29476
|
+
this.debug("string match", p, f10, hit);
|
|
29477
|
+
} else {
|
|
29478
|
+
hit = p.test(f10);
|
|
29479
|
+
this.debug("pattern match", p, f10, hit);
|
|
29480
|
+
}
|
|
29481
|
+
if (!hit)
|
|
29482
|
+
return false;
|
|
29483
|
+
}
|
|
29484
|
+
if (fi2 === fl2 && pi2 === pl2) {
|
|
29485
|
+
return true;
|
|
29486
|
+
} else if (fi2 === fl2) {
|
|
29487
|
+
return partial;
|
|
29488
|
+
} else if (pi2 === pl2) {
|
|
29489
|
+
return fi2 === fl2 - 1 && file[fi2] === "";
|
|
29490
|
+
} else {
|
|
29491
|
+
throw new Error("wtf?");
|
|
29492
|
+
}
|
|
29493
|
+
};
|
|
29163
29494
|
minimatch.AST = AST;
|
|
29164
29495
|
minimatch.Minimatch = Minimatch;
|
|
29165
29496
|
minimatch.escape = escape;
|
|
@@ -75218,4 +75549,3 @@ var index = /* @__PURE__ */ Object.freeze({
|
|
|
75218
75549
|
Registry,
|
|
75219
75550
|
parsePackageSpec
|
|
75220
75551
|
});
|
|
75221
|
-
//# sourceMappingURL=runtime-worker-4MKaHFVb.js.map
|