+ if (!this.preserveMultipleSlashes) {
+ for (let i = 1; i < parts.length - 1; i++) {
+ const p = parts[i];
+ // don't squeeze out UNC patterns
+ if (i === 1 && p === '' && parts[0] === '')
+ continue;
+ if (p === '.' || p === '') {
+ didSomething = true;
+ parts.splice(i, 1);
+ i--;
+ }
+ }
+ if (parts[0] === '.' &&
+ parts.length === 2 &&
+ (parts[1] === '.' || parts[1] === '')) {
+ didSomething = true;
+ parts.pop();
+ }
+ }
+ // //../ -> /
+ let dd = 0;
+ while (-1 !== (dd = parts.indexOf('..', dd + 1))) {
+ const p = parts[dd - 1];
+ if (p && p !== '.' && p !== '..' && p !== '**') {
+ didSomething = true;
+ parts.splice(dd - 1, 2);
+ dd -= 2;
+ }
+ }
+ } while (didSomething);
+ return parts.length === 0 ? [''] : parts;
+ }
+ // First phase: single-pattern processing
+ // is 1 or more portions
+ // is 1 or more portions
+ // is any portion other than ., .., '', or **
+ // is . or ''
+ //
+ // **/.. is *brutal* for filesystem walking performance, because
+ // it effectively resets the recursive walk each time it occurs,
+ // and ** cannot be reduced out by a .. pattern part like a regexp
+ // or most strings (other than .., ., and '') can be.
+ //
+ // /**/..//
/ -> {/..//
/,/**//
/}
+ // // -> /
+ // //../ -> /
+ // **/**/ -> **/
+ //
+ // **/*/ -> */**/ <== not valid because ** doesn't follow
+ // this WOULD be allowed if ** did follow symlinks, or * didn't
+ firstPhasePreProcess(globParts) {
+ let didSomething = false;
+ do {
+ didSomething = false;
+ // /**/..//
/ -> {/..//
/,/**//
/}
+ for (let parts of globParts) {
+ let gs = -1;
+ while (-1 !== (gs = parts.indexOf('**', gs + 1))) {
+ let gss = gs;
+ while (parts[gss + 1] === '**') {
+ // /**/**/ -> /**/
+ gss++;
+ }
+ // eg, if gs is 2 and gss is 4, that means we have 3 **
+ // parts, and can remove 2 of them.
+ if (gss > gs) {
+ parts.splice(gs + 1, gss - gs);
+ }
+ let next = parts[gs + 1];
+ const p = parts[gs + 2];
+ const p2 = parts[gs + 3];
+ if (next !== '..')
+ continue;
+ if (!p ||
+ p === '.' ||
+ p === '..' ||
+ !p2 ||
+ p2 === '.' ||
+ p2 === '..') {
+ continue;
+ }
+ didSomething = true;
+ // edit parts in place, and push the new one
+ parts.splice(gs, 1);
+ const other = parts.slice(0);
+ other[gs] = '**';
+ globParts.push(other);
+ gs--;
+ }
+ // // -> /
+ if (!this.preserveMultipleSlashes) {
+ for (let i = 1; i < parts.length - 1; i++) {
+ const p = parts[i];
+ // don't squeeze out UNC patterns
+ if (i === 1 && p === '' && parts[0] === '')
+ continue;
+ if (p === '.' || p === '') {
+ didSomething = true;
+ parts.splice(i, 1);
+ i--;
+ }
+ }
+ if (parts[0] === '.' &&
+ parts.length === 2 &&
+ (parts[1] === '.' || parts[1] === '')) {
+ didSomething = true;
+ parts.pop();
+ }
+ }
+ // //../ -> /
+ let dd = 0;
+ while (-1 !== (dd = parts.indexOf('..', dd + 1))) {
+ const p = parts[dd - 1];
+ if (p && p !== '.' && p !== '..' && p !== '**') {
+ didSomething = true;
+ const needDot = dd === 1 && parts[dd + 1] === '**';
+ const splin = needDot ? ['.'] : [];
+ parts.splice(dd - 1, 2, ...splin);
+ if (parts.length === 0)
+ parts.push('');
+ dd -= 2;
+ }
+ }
+ }
+ } while (didSomething);
+ return globParts;
+ }
+ // second phase: multi-pattern dedupes
+ // {/*/,//} -> /*/
+ // {/,/} -> /
+ // {/**/,/} -> /**/
+ //
+ // {/**/,/**//} -> /**/
+ // ^-- not valid because ** doens't follow symlinks
+ secondPhasePreProcess(globParts) {
+ for (let i = 0; i < globParts.length - 1; i++) {
+ for (let j = i + 1; j < globParts.length; j++) {
+ const matched = this.partsMatch(globParts[i], globParts[j], !this.preserveMultipleSlashes);
+ if (matched) {
+ globParts[i] = [];
+ globParts[j] = matched;
+ break;
+ }
+ }
+ }
+ return globParts.filter(gs => gs.length);
+ }
+ partsMatch(a, b, emptyGSMatch = false) {
+ let ai = 0;
+ let bi = 0;
+ let result = [];
+ let which = '';
+ while (ai < a.length && bi < b.length) {
+ if (a[ai] === b[bi]) {
+ result.push(which === 'b' ? b[bi] : a[ai]);
+ ai++;
+ bi++;
+ }
+ else if (emptyGSMatch && a[ai] === '**' && b[bi] === a[ai + 1]) {
+ result.push(a[ai]);
+ ai++;
+ }
+ else if (emptyGSMatch && b[bi] === '**' && a[ai] === b[bi + 1]) {
+ result.push(b[bi]);
+ bi++;
+ }
+ else if (a[ai] === '*' &&
+ b[bi] &&
+ (this.options.dot || !b[bi].startsWith('.')) &&
+ b[bi] !== '**') {
+ if (which === 'b')
+ return false;
+ which = 'a';
+ result.push(a[ai]);
+ ai++;
+ bi++;
+ }
+ else if (b[bi] === '*' &&
+ a[ai] &&
+ (this.options.dot || !a[ai].startsWith('.')) &&
+ a[ai] !== '**') {
+ if (which === 'a')
+ return false;
+ which = 'b';
+ result.push(b[bi]);
+ ai++;
+ bi++;
+ }
+ else {
+ return false;
+ }
+ }
+ // if we fall out of the loop, it means they two are identical
+ // as long as their lengths match
+ return a.length === b.length && result;
+ }
+ parseNegate() {
+ if (this.nonegate)
+ return;
+ const pattern = this.pattern;
+ let negate = false;
+ let negateOffset = 0;
+ for (let i = 0; i < pattern.length && pattern.charAt(i) === '!'; i++) {
+ negate = !negate;
+ negateOffset++;
+ }
+ if (negateOffset)
+ this.pattern = pattern.slice(negateOffset);
+ this.negate = negate;
+ }
+ // set partial to true to test if, for example,
+ // "/a/b" matches the start of "/*/b/*/d"
+ // Partial means, if you run out of file before you run
+ // out of pattern, then that's fine, as long as all
+ // the parts match.
+ matchOne(file, pattern, partial = false) {
+ const options = this.options;
+ // UNC paths like //?/X:/... can match X:/... and vice versa
+ // Drive letters in absolute drive or unc paths are always compared
+ // case-insensitively.
+ if (this.isWindows) {
+ const fileDrive = typeof file[0] === 'string' && /^[a-z]:$/i.test(file[0]);
+ const fileUNC = !fileDrive &&
+ file[0] === '' &&
+ file[1] === '' &&
+ file[2] === '?' &&
+ /^[a-z]:$/i.test(file[3]);
+ const patternDrive = typeof pattern[0] === 'string' && /^[a-z]:$/i.test(pattern[0]);
+ const patternUNC = !patternDrive &&
+ pattern[0] === '' &&
+ pattern[1] === '' &&
+ pattern[2] === '?' &&
+ typeof pattern[3] === 'string' &&
+ /^[a-z]:$/i.test(pattern[3]);
+ const fdi = fileUNC ? 3 : fileDrive ? 0 : undefined;
+ const pdi = patternUNC ? 3 : patternDrive ? 0 : undefined;
+ if (typeof fdi === 'number' && typeof pdi === 'number') {
+ const [fd, pd] = [file[fdi], pattern[pdi]];
+ if (fd.toLowerCase() === pd.toLowerCase()) {
+ pattern[pdi] = fd;
+ if (pdi > fdi) {
+ pattern = pattern.slice(pdi);
+ }
+ else if (fdi > pdi) {
+ file = file.slice(fdi);
+ }
+ }
+ }
+ }
+ // resolve and reduce . and .. portions in the file as well.
+ // dont' need to do the second phase, because it's only one string[]
+ const { optimizationLevel = 1 } = this.options;
+ if (optimizationLevel >= 2) {
+ file = this.levelTwoFileOptimize(file);
+ }
+ this.debug('matchOne', this, { file, pattern });
+ this.debug('matchOne', file.length, pattern.length);
+ for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
+ this.debug('matchOne loop');
+ var p = pattern[pi];
+ var f = file[fi];
+ this.debug(pattern, p, f);
+ // should be impossible.
+ // some invalid regexp stuff in the set.
+ /* c8 ignore start */
+ if (p === false) {
+ return false;
+ }
+ /* c8 ignore stop */
+ if (p === exports.GLOBSTAR) {
+ this.debug('GLOBSTAR', [pattern, p, f]);
+ // "**"
+ // a/**/b/**/c would match the following:
+ // a/b/x/y/z/c
+ // a/x/y/z/b/c
+ // a/b/x/b/x/c
+ // a/b/c
+ // To do this, take the rest of the pattern after
+ // the **, and see if it would match the file remainder.
+ // If so, return success.
+ // If not, the ** "swallows" a segment, and try again.
+ // This is recursively awful.
+ //
+ // a/**/b/**/c matching a/b/x/y/z/c
+ // - a matches a
+ // - doublestar
+ // - matchOne(b/x/y/z/c, b/**/c)
+ // - b matches b
+ // - doublestar
+ // - matchOne(x/y/z/c, c) -> no
+ // - matchOne(y/z/c, c) -> no
+ // - matchOne(z/c, c) -> no
+ // - matchOne(c, c) yes, hit
+ var fr = fi;
+ var pr = pi + 1;
+ if (pr === pl) {
+ this.debug('** at the end');
+ // a ** at the end will just swallow the rest.
+ // We have found a match.
+ // however, it will not swallow /.x, unless
+ // options.dot is set.
+ // . and .. are *never* matched by **, for explosively
+ // exponential reasons.
+ for (; fi < fl; fi++) {
+ if (file[fi] === '.' ||
+ file[fi] === '..' ||
+ (!options.dot && file[fi].charAt(0) === '.'))
+ return false;
+ }
+ return true;
+ }
+ // ok, let's see if we can swallow whatever we can.
+ while (fr < fl) {
+ var swallowee = file[fr];
+ this.debug('\nglobstar while', file, fr, pattern, pr, swallowee);
+ // XXX remove this slice. Just pass the start index.
+ if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
+ this.debug('globstar found match!', fr, fl, swallowee);
+ // found a match.
+ return true;
+ }
+ else {
+ // can't swallow "." or ".." ever.
+ // can only swallow ".foo" when explicitly asked.
+ if (swallowee === '.' ||
+ swallowee === '..' ||
+ (!options.dot && swallowee.charAt(0) === '.')) {
+ this.debug('dot detected!', file, fr, pattern, pr);
+ break;
+ }
+ // ** swallows a segment, and continue.
+ this.debug('globstar swallow a segment, and continue');
+ fr++;
+ }
+ }
+ // no match was found.
+ // However, in partial mode, we can't say this is necessarily over.
+ /* c8 ignore start */
+ if (partial) {
+ // ran out of file
+ this.debug('\n>>> no match, partial?', file, fr, pattern, pr);
+ if (fr === fl) {
+ return true;
+ }
+ }
+ /* c8 ignore stop */
+ return false;
+ }
+ // something other than **
+ // non-magic patterns just have to match exactly
+ // patterns with magic have been turned into regexps.
+ let hit;
+ if (typeof p === 'string') {
+ hit = f === p;
+ this.debug('string match', p, f, hit);
+ }
+ else {
+ hit = p.test(f);
+ this.debug('pattern match', p, f, hit);
+ }
+ if (!hit)
+ return false;
+ }
+ // Note: ending in / means that we'll get a final ""
+ // at the end of the pattern. This can only match a
+ // corresponding "" at the end of the file.
+ // If the file ends in /, then it can only match a
+ // a pattern that ends in /, unless the pattern just
+ // doesn't have any more for it. But, a/b/ should *not*
+ // match "a/b/*", even though "" matches against the
+ // [^/]*? pattern, except in partial mode, where it might
+ // simply not be reached yet.
+ // However, a/b/ should still satisfy a/*
+ // now either we fell off the end of the pattern, or we're done.
+ if (fi === fl && pi === pl) {
+ // ran out of pattern and filename at the same time.
+ // an exact hit!
+ return true;
+ }
+ else if (fi === fl) {
+ // ran out of file, but still had pattern left.
+ // this is ok if we're doing the match as part of
+ // a glob fs traversal.
+ return partial;
+ }
+ else if (pi === pl) {
+ // ran out of pattern, still have file left.
+ // this is only acceptable if we're on the very last
+ // empty segment of a file with a trailing slash.
+ // a/* should match a/b/
+ return fi === fl - 1 && file[fi] === '';
+ /* c8 ignore start */
+ }
+ else {
+ // should be unreachable.
+ throw new Error('wtf?');
+ }
+ /* c8 ignore stop */
+ }
+ braceExpand() {
+ return (0, exports.braceExpand)(this.pattern, this.options);
+ }
+ parse(pattern) {
+ (0, assert_valid_pattern_js_1.assertValidPattern)(pattern);
+ const options = this.options;
+ // shortcuts
+ if (pattern === '**')
+ return exports.GLOBSTAR;
+ if (pattern === '')
+ return '';
+ // far and away, the most common glob pattern parts are
+ // *, *.*, and *. Add a fast check method for those.
+ let m;
+ let fastTest = null;
+ if ((m = pattern.match(starRE))) {
+ fastTest = options.dot ? starTestDot : starTest;
+ }
+ else if ((m = pattern.match(starDotExtRE))) {
+ fastTest = (options.nocase
+ ? options.dot
+ ? starDotExtTestNocaseDot
+ : starDotExtTestNocase
+ : options.dot
+ ? starDotExtTestDot
+ : starDotExtTest)(m[1]);
+ }
+ else if ((m = pattern.match(qmarksRE))) {
+ fastTest = (options.nocase
+ ? options.dot
+ ? qmarksTestNocaseDot
+ : qmarksTestNocase
+ : options.dot
+ ? qmarksTestDot
+ : qmarksTest)(m);
+ }
+ else if ((m = pattern.match(starDotStarRE))) {
+ fastTest = options.dot ? starDotStarTestDot : starDotStarTest;
+ }
+ else if ((m = pattern.match(dotStarRE))) {
+ fastTest = dotStarTest;
+ }
+ const re = ast_js_1.AST.fromGlob(pattern, this.options).toMMPattern();
+ if (fastTest && typeof re === 'object') {
+ // Avoids overriding in frozen environments
+ Reflect.defineProperty(re, 'test', { value: fastTest });
+ }
+ return re;
+ }
+ makeRe() {
+ if (this.regexp || this.regexp === false)
+ return this.regexp;
+ // at this point, this.set is a 2d array of partial
+ // pattern strings, or "**".
+ //
+ // It's better to use .match(). This function shouldn't
+ // be used, really, but it's pretty convenient sometimes,
+ // when you just want to work with a regex.
+ const set = this.set;
+ if (!set.length) {
+ this.regexp = false;
+ return this.regexp;
+ }
+ const options = this.options;
+ const twoStar = options.noglobstar
+ ? star
+ : options.dot
+ ? twoStarDot
+ : twoStarNoDot;
+ const flags = new Set(options.nocase ? ['i'] : []);
+ // regexpify non-globstar patterns
+ // if ** is only item, then we just do one twoStar
+ // if ** is first, and there are more, prepend (\/|twoStar\/)? to next
+ // if ** is last, append (\/twoStar|) to previous
+ // if ** is in the middle, append (\/|\/twoStar\/) to previous
+ // then filter out GLOBSTAR symbols
+ let re = set
+ .map(pattern => {
+ const pp = pattern.map(p => {
+ if (p instanceof RegExp) {
+ for (const f of p.flags.split(''))
+ flags.add(f);
+ }
+ return typeof p === 'string'
+ ? regExpEscape(p)
+ : p === exports.GLOBSTAR
+ ? exports.GLOBSTAR
+ : p._src;
+ });
+ pp.forEach((p, i) => {
+ const next = pp[i + 1];
+ const prev = pp[i - 1];
+ if (p !== exports.GLOBSTAR || prev === exports.GLOBSTAR) {
+ return;
+ }
+ if (prev === undefined) {
+ if (next !== undefined && next !== exports.GLOBSTAR) {
+ pp[i + 1] = '(?:\\/|' + twoStar + '\\/)?' + next;
+ }
+ else {
+ pp[i] = twoStar;
+ }
+ }
+ else if (next === undefined) {
+ pp[i - 1] = prev + '(?:\\/|' + twoStar + ')?';
+ }
+ else if (next !== exports.GLOBSTAR) {
+ pp[i - 1] = prev + '(?:\\/|\\/' + twoStar + '\\/)' + next;
+ pp[i + 1] = exports.GLOBSTAR;
+ }
+ });
+ return pp.filter(p => p !== exports.GLOBSTAR).join('/');
+ })
+ .join('|');
+ // need to wrap in parens if we had more than one thing with |,
+ // otherwise only the first will be anchored to ^ and the last to $
+ const [open, close] = set.length > 1 ? ['(?:', ')'] : ['', ''];
+ // must match entire pattern
+ // ending in a * or ** will make it less strict.
+ re = '^' + open + re + close + '$';
+ // can match anything, as long as it's not this.
+ if (this.negate)
+ re = '^(?!' + re + ').+$';
+ try {
+ this.regexp = new RegExp(re, [...flags].join(''));
+ /* c8 ignore start */
+ }
+ catch (ex) {
+ // should be impossible
+ this.regexp = false;
+ }
+ /* c8 ignore stop */
+ return this.regexp;
+ }
+ slashSplit(p) {
+ // if p starts with // on windows, we preserve that
+ // so that UNC paths aren't broken. Otherwise, any number of
+ // / characters are coalesced into one, unless
+ // preserveMultipleSlashes is set to true.
+ if (this.preserveMultipleSlashes) {
+ return p.split('/');
+ }
+ else if (this.isWindows && /^\/\/[^\/]+/.test(p)) {
+ // add an extra '' for the one we lose
+ return ['', ...p.split(/\/+/)];
+ }
+ else {
+ return p.split(/\/+/);
+ }
+ }
+ match(f, partial = this.partial) {
+ this.debug('match', f, this.pattern);
+ // short-circuit in the case of busted things.
+ // comments, etc.
+ if (this.comment) {
+ return false;
+ }
+ if (this.empty) {
+ return f === '';
+ }
+ if (f === '/' && partial) {
+ return true;
+ }
+ const options = this.options;
+ // windows: need to use /, not \
+ if (this.isWindows) {
+ f = f.split('\\').join('/');
+ }
+ // treat the test path as a set of pathparts.
+ const ff = this.slashSplit(f);
+ this.debug(this.pattern, 'split', ff);
+ // just ONE of the pattern sets in this.set needs to match
+ // in order for it to be valid. If negating, then just one
+ // match means that we have failed.
+ // Either way, return on the first hit.
+ const set = this.set;
+ this.debug(this.pattern, 'set', set);
+ // Find the basename of the path by looking for the last non-empty segment
+ let filename = ff[ff.length - 1];
+ if (!filename) {
+ for (let i = ff.length - 2; !filename && i >= 0; i--) {
+ filename = ff[i];
+ }
+ }
+ for (let i = 0; i < set.length; i++) {
+ const pattern = set[i];
+ let file = ff;
+ if (options.matchBase && pattern.length === 1) {
+ file = [filename];
+ }
+ const hit = this.matchOne(file, pattern, partial);
+ if (hit) {
+ if (options.flipNegate) {
+ return true;
+ }
+ return !this.negate;
+ }
+ }
+ // didn't get any hits. this is success if it's a negative
+ // pattern, failure otherwise.
+ if (options.flipNegate) {
+ return false;
+ }
+ return this.negate;
+ }
+ static defaults(def) {
+ return exports.minimatch.defaults(def).Minimatch;
+ }
+}
+exports.Minimatch = Minimatch;
+/* c8 ignore start */
+var ast_js_2 = require("./ast.js");
+Object.defineProperty(exports, "AST", { enumerable: true, get: function () { return ast_js_2.AST; } });
+var escape_js_2 = require("./escape.js");
+Object.defineProperty(exports, "escape", { enumerable: true, get: function () { return escape_js_2.escape; } });
+var unescape_js_2 = require("./unescape.js");
+Object.defineProperty(exports, "unescape", { enumerable: true, get: function () { return unescape_js_2.unescape; } });
+/* c8 ignore stop */
+exports.minimatch.AST = ast_js_1.AST;
+exports.minimatch.Minimatch = Minimatch;
+exports.minimatch.escape = escape_js_1.escape;
+exports.minimatch.unescape = unescape_js_1.unescape;
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/deps/npm/node_modules/cacache/node_modules/tar/dist/commonjs/package.json b/deps/npm/node_modules/@tufjs/models/node_modules/minimatch/dist/commonjs/package.json
similarity index 100%
rename from deps/npm/node_modules/cacache/node_modules/tar/dist/commonjs/package.json
rename to deps/npm/node_modules/@tufjs/models/node_modules/minimatch/dist/commonjs/package.json
diff --git a/deps/npm/node_modules/@tufjs/models/node_modules/minimatch/dist/commonjs/unescape.js b/deps/npm/node_modules/@tufjs/models/node_modules/minimatch/dist/commonjs/unescape.js
new file mode 100644
index 00000000000000..47c36bcee5a02a
--- /dev/null
+++ b/deps/npm/node_modules/@tufjs/models/node_modules/minimatch/dist/commonjs/unescape.js
@@ -0,0 +1,24 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.unescape = void 0;
+/**
+ * Un-escape a string that has been escaped with {@link escape}.
+ *
+ * If the {@link windowsPathsNoEscape} option is used, then square-brace
+ * escapes are removed, but not backslash escapes. For example, it will turn
+ * the string `'[*]'` into `*`, but it will not turn `'\\*'` into `'*'`,
+ * becuase `\` is a path separator in `windowsPathsNoEscape` mode.
+ *
+ * When `windowsPathsNoEscape` is not set, then both brace escapes and
+ * backslash escapes are removed.
+ *
+ * Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot be escaped
+ * or unescaped.
+ */
+const unescape = (s, { windowsPathsNoEscape = false, } = {}) => {
+ return windowsPathsNoEscape
+ ? s.replace(/\[([^\/\\])\]/g, '$1')
+ : s.replace(/((?!\\).|^)\[([^\/\\])\]/g, '$1$2').replace(/\\([^\/])/g, '$1');
+};
+exports.unescape = unescape;
+//# sourceMappingURL=unescape.js.map
\ No newline at end of file
diff --git a/deps/npm/node_modules/@tufjs/models/node_modules/minimatch/dist/esm/assert-valid-pattern.js b/deps/npm/node_modules/@tufjs/models/node_modules/minimatch/dist/esm/assert-valid-pattern.js
new file mode 100644
index 00000000000000..7b534fc30200bb
--- /dev/null
+++ b/deps/npm/node_modules/@tufjs/models/node_modules/minimatch/dist/esm/assert-valid-pattern.js
@@ -0,0 +1,10 @@
+const MAX_PATTERN_LENGTH = 1024 * 64;
+export const assertValidPattern = (pattern) => {
+ if (typeof pattern !== 'string') {
+ throw new TypeError('invalid pattern');
+ }
+ if (pattern.length > MAX_PATTERN_LENGTH) {
+ throw new TypeError('pattern is too long');
+ }
+};
+//# sourceMappingURL=assert-valid-pattern.js.map
\ No newline at end of file
diff --git a/deps/npm/node_modules/@tufjs/models/node_modules/minimatch/dist/esm/ast.js b/deps/npm/node_modules/@tufjs/models/node_modules/minimatch/dist/esm/ast.js
new file mode 100644
index 00000000000000..02c6bda68427fc
--- /dev/null
+++ b/deps/npm/node_modules/@tufjs/models/node_modules/minimatch/dist/esm/ast.js
@@ -0,0 +1,588 @@
+// parse a single path portion
+import { parseClass } from './brace-expressions.js';
+import { unescape } from './unescape.js';
+const types = new Set(['!', '?', '+', '*', '@']);
+const isExtglobType = (c) => types.has(c);
+// Patterns that get prepended to bind to the start of either the
+// entire string, or just a single path portion, to prevent dots
+// and/or traversal patterns, when needed.
+// Exts don't need the ^ or / bit, because the root binds that already.
+const startNoTraversal = '(?!(?:^|/)\\.\\.?(?:$|/))';
+const startNoDot = '(?!\\.)';
+// characters that indicate a start of pattern needs the "no dots" bit,
+// because a dot *might* be matched. ( is not in the list, because in
+// the case of a child extglob, it will handle the prevention itself.
+const addPatternStart = new Set(['[', '.']);
+// cases where traversal is A-OK, no dot prevention needed
+const justDots = new Set(['..', '.']);
+const reSpecials = new Set('().*{}+?[]^$\\!');
+const regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
+// any single thing other than /
+const qmark = '[^/]';
+// * => any number of characters
+const star = qmark + '*?';
+// use + when we need to ensure that *something* matches, because the * is
+// the only thing in the path portion.
+const starNoEmpty = qmark + '+?';
+// remove the \ chars that we added if we end up doing a nonmagic compare
+// const deslash = (s: string) => s.replace(/\\(.)/g, '$1')
+export class AST {
+ type;
+ #root;
+ #hasMagic;
+ #uflag = false;
+ #parts = [];
+ #parent;
+ #parentIndex;
+ #negs;
+ #filledNegs = false;
+ #options;
+ #toString;
+ // set to true if it's an extglob with no children
+ // (which really means one child of '')
+ #emptyExt = false;
+ constructor(type, parent, options = {}) {
+ this.type = type;
+ // extglobs are inherently magical
+ if (type)
+ this.#hasMagic = true;
+ this.#parent = parent;
+ this.#root = this.#parent ? this.#parent.#root : this;
+ this.#options = this.#root === this ? options : this.#root.#options;
+ this.#negs = this.#root === this ? [] : this.#root.#negs;
+ if (type === '!' && !this.#root.#filledNegs)
+ this.#negs.push(this);
+ this.#parentIndex = this.#parent ? this.#parent.#parts.length : 0;
+ }
+ get hasMagic() {
+ /* c8 ignore start */
+ if (this.#hasMagic !== undefined)
+ return this.#hasMagic;
+ /* c8 ignore stop */
+ for (const p of this.#parts) {
+ if (typeof p === 'string')
+ continue;
+ if (p.type || p.hasMagic)
+ return (this.#hasMagic = true);
+ }
+ // note: will be undefined until we generate the regexp src and find out
+ return this.#hasMagic;
+ }
+ // reconstructs the pattern
+ toString() {
+ if (this.#toString !== undefined)
+ return this.#toString;
+ if (!this.type) {
+ return (this.#toString = this.#parts.map(p => String(p)).join(''));
+ }
+ else {
+ return (this.#toString =
+ this.type + '(' + this.#parts.map(p => String(p)).join('|') + ')');
+ }
+ }
+ #fillNegs() {
+ /* c8 ignore start */
+ if (this !== this.#root)
+ throw new Error('should only call on root');
+ if (this.#filledNegs)
+ return this;
+ /* c8 ignore stop */
+ // call toString() once to fill this out
+ this.toString();
+ this.#filledNegs = true;
+ let n;
+ while ((n = this.#negs.pop())) {
+ if (n.type !== '!')
+ continue;
+ // walk up the tree, appending everthing that comes AFTER parentIndex
+ let p = n;
+ let pp = p.#parent;
+ while (pp) {
+ for (let i = p.#parentIndex + 1; !pp.type && i < pp.#parts.length; i++) {
+ for (const part of n.#parts) {
+ /* c8 ignore start */
+ if (typeof part === 'string') {
+ throw new Error('string part in extglob AST??');
+ }
+ /* c8 ignore stop */
+ part.copyIn(pp.#parts[i]);
+ }
+ }
+ p = pp;
+ pp = p.#parent;
+ }
+ }
+ return this;
+ }
+ push(...parts) {
+ for (const p of parts) {
+ if (p === '')
+ continue;
+ /* c8 ignore start */
+ if (typeof p !== 'string' && !(p instanceof AST && p.#parent === this)) {
+ throw new Error('invalid part: ' + p);
+ }
+ /* c8 ignore stop */
+ this.#parts.push(p);
+ }
+ }
+ toJSON() {
+ const ret = this.type === null
+ ? this.#parts.slice().map(p => (typeof p === 'string' ? p : p.toJSON()))
+ : [this.type, ...this.#parts.map(p => p.toJSON())];
+ if (this.isStart() && !this.type)
+ ret.unshift([]);
+ if (this.isEnd() &&
+ (this === this.#root ||
+ (this.#root.#filledNegs && this.#parent?.type === '!'))) {
+ ret.push({});
+ }
+ return ret;
+ }
+ isStart() {
+ if (this.#root === this)
+ return true;
+ // if (this.type) return !!this.#parent?.isStart()
+ if (!this.#parent?.isStart())
+ return false;
+ if (this.#parentIndex === 0)
+ return true;
+ // if everything AHEAD of this is a negation, then it's still the "start"
+ const p = this.#parent;
+ for (let i = 0; i < this.#parentIndex; i++) {
+ const pp = p.#parts[i];
+ if (!(pp instanceof AST && pp.type === '!')) {
+ return false;
+ }
+ }
+ return true;
+ }
+ isEnd() {
+ if (this.#root === this)
+ return true;
+ if (this.#parent?.type === '!')
+ return true;
+ if (!this.#parent?.isEnd())
+ return false;
+ if (!this.type)
+ return this.#parent?.isEnd();
+ // if not root, it'll always have a parent
+ /* c8 ignore start */
+ const pl = this.#parent ? this.#parent.#parts.length : 0;
+ /* c8 ignore stop */
+ return this.#parentIndex === pl - 1;
+ }
+ copyIn(part) {
+ if (typeof part === 'string')
+ this.push(part);
+ else
+ this.push(part.clone(this));
+ }
+ clone(parent) {
+ const c = new AST(this.type, parent);
+ for (const p of this.#parts) {
+ c.copyIn(p);
+ }
+ return c;
+ }
+ static #parseAST(str, ast, pos, opt) {
+ let escaping = false;
+ let inBrace = false;
+ let braceStart = -1;
+ let braceNeg = false;
+ if (ast.type === null) {
+ // outside of a extglob, append until we find a start
+ let i = pos;
+ let acc = '';
+ while (i < str.length) {
+ const c = str.charAt(i++);
+ // still accumulate escapes at this point, but we do ignore
+ // starts that are escaped
+ if (escaping || c === '\\') {
+ escaping = !escaping;
+ acc += c;
+ continue;
+ }
+ if (inBrace) {
+ if (i === braceStart + 1) {
+ if (c === '^' || c === '!') {
+ braceNeg = true;
+ }
+ }
+ else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {
+ inBrace = false;
+ }
+ acc += c;
+ continue;
+ }
+ else if (c === '[') {
+ inBrace = true;
+ braceStart = i;
+ braceNeg = false;
+ acc += c;
+ continue;
+ }
+ if (!opt.noext && isExtglobType(c) && str.charAt(i) === '(') {
+ ast.push(acc);
+ acc = '';
+ const ext = new AST(c, ast);
+ i = AST.#parseAST(str, ext, i, opt);
+ ast.push(ext);
+ continue;
+ }
+ acc += c;
+ }
+ ast.push(acc);
+ return i;
+ }
+ // some kind of extglob, pos is at the (
+ // find the next | or )
+ let i = pos + 1;
+ let part = new AST(null, ast);
+ const parts = [];
+ let acc = '';
+ while (i < str.length) {
+ const c = str.charAt(i++);
+ // still accumulate escapes at this point, but we do ignore
+ // starts that are escaped
+ if (escaping || c === '\\') {
+ escaping = !escaping;
+ acc += c;
+ continue;
+ }
+ if (inBrace) {
+ if (i === braceStart + 1) {
+ if (c === '^' || c === '!') {
+ braceNeg = true;
+ }
+ }
+ else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {
+ inBrace = false;
+ }
+ acc += c;
+ continue;
+ }
+ else if (c === '[') {
+ inBrace = true;
+ braceStart = i;
+ braceNeg = false;
+ acc += c;
+ continue;
+ }
+ if (isExtglobType(c) && str.charAt(i) === '(') {
+ part.push(acc);
+ acc = '';
+ const ext = new AST(c, part);
+ part.push(ext);
+ i = AST.#parseAST(str, ext, i, opt);
+ continue;
+ }
+ if (c === '|') {
+ part.push(acc);
+ acc = '';
+ parts.push(part);
+ part = new AST(null, ast);
+ continue;
+ }
+ if (c === ')') {
+ if (acc === '' && ast.#parts.length === 0) {
+ ast.#emptyExt = true;
+ }
+ part.push(acc);
+ acc = '';
+ ast.push(...parts, part);
+ return i;
+ }
+ acc += c;
+ }
+ // unfinished extglob
+ // if we got here, it was a malformed extglob! not an extglob, but
+ // maybe something else in there.
+ ast.type = null;
+ ast.#hasMagic = undefined;
+ ast.#parts = [str.substring(pos - 1)];
+ return i;
+ }
+ static fromGlob(pattern, options = {}) {
+ const ast = new AST(null, undefined, options);
+ AST.#parseAST(pattern, ast, 0, options);
+ return ast;
+ }
+ // returns the regular expression if there's magic, or the unescaped
+ // string if not.
+ toMMPattern() {
+ // should only be called on root
+ /* c8 ignore start */
+ if (this !== this.#root)
+ return this.#root.toMMPattern();
+ /* c8 ignore stop */
+ const glob = this.toString();
+ const [re, body, hasMagic, uflag] = this.toRegExpSource();
+ // if we're in nocase mode, and not nocaseMagicOnly, then we do
+ // still need a regular expression if we have to case-insensitively
+ // match capital/lowercase characters.
+ const anyMagic = hasMagic ||
+ this.#hasMagic ||
+ (this.#options.nocase &&
+ !this.#options.nocaseMagicOnly &&
+ glob.toUpperCase() !== glob.toLowerCase());
+ if (!anyMagic) {
+ return body;
+ }
+ const flags = (this.#options.nocase ? 'i' : '') + (uflag ? 'u' : '');
+ return Object.assign(new RegExp(`^${re}$`, flags), {
+ _src: re,
+ _glob: glob,
+ });
+ }
+ get options() {
+ return this.#options;
+ }
+ // returns the string match, the regexp source, whether there's magic
+ // in the regexp (so a regular expression is required) and whether or
+ // not the uflag is needed for the regular expression (for posix classes)
+ // TODO: instead of injecting the start/end at this point, just return
+ // the BODY of the regexp, along with the start/end portions suitable
+ // for binding the start/end in either a joined full-path makeRe context
+ // (where we bind to (^|/), or a standalone matchPart context (where
+ // we bind to ^, and not /). Otherwise slashes get duped!
+ //
+ // In part-matching mode, the start is:
+ // - if not isStart: nothing
+ // - if traversal possible, but not allowed: ^(?!\.\.?$)
+ // - if dots allowed or not possible: ^
+ // - if dots possible and not allowed: ^(?!\.)
+ // end is:
+ // - if not isEnd(): nothing
+ // - else: $
+ //
+ // In full-path matching mode, we put the slash at the START of the
+ // pattern, so start is:
+ // - if first pattern: same as part-matching mode
+ // - if not isStart(): nothing
+ // - if traversal possible, but not allowed: /(?!\.\.?(?:$|/))
+ // - if dots allowed or not possible: /
+ // - if dots possible and not allowed: /(?!\.)
+ // end is:
+ // - if last pattern, same as part-matching mode
+ // - else nothing
+ //
+ // Always put the (?:$|/) on negated tails, though, because that has to be
+ // there to bind the end of the negated pattern portion, and it's easier to
+ // just stick it in now rather than try to inject it later in the middle of
+ // the pattern.
+ //
+ // We can just always return the same end, and leave it up to the caller
+ // to know whether it's going to be used joined or in parts.
+ // And, if the start is adjusted slightly, can do the same there:
+ // - if not isStart: nothing
+ // - if traversal possible, but not allowed: (?:/|^)(?!\.\.?$)
+ // - if dots allowed or not possible: (?:/|^)
+ // - if dots possible and not allowed: (?:/|^)(?!\.)
+ //
+ // But it's better to have a simpler binding without a conditional, for
+ // performance, so probably better to return both start options.
+ //
+ // Then the caller just ignores the end if it's not the first pattern,
+ // and the start always gets applied.
+ //
+ // But that's always going to be $ if it's the ending pattern, or nothing,
+ // so the caller can just attach $ at the end of the pattern when building.
+ //
+ // So the todo is:
+ // - better detect what kind of start is needed
+ // - return both flavors of starting pattern
+ // - attach $ at the end of the pattern when creating the actual RegExp
+ //
+ // Ah, but wait, no, that all only applies to the root when the first pattern
+ // is not an extglob. If the first pattern IS an extglob, then we need all
+ // that dot prevention biz to live in the extglob portions, because eg
+ // +(*|.x*) can match .xy but not .yx.
+ //
+ // So, return the two flavors if it's #root and the first child is not an
+ // AST, otherwise leave it to the child AST to handle it, and there,
+ // use the (?:^|/) style of start binding.
+ //
+ // Even simplified further:
+ // - Since the start for a join is eg /(?!\.) and the start for a part
+ // is ^(?!\.), we can just prepend (?!\.) to the pattern (either root
+ // or start or whatever) and prepend ^ or / at the Regexp construction.
+ toRegExpSource(allowDot) {
+ const dot = allowDot ?? !!this.#options.dot;
+ if (this.#root === this)
+ this.#fillNegs();
+ if (!this.type) {
+ const noEmpty = this.isStart() && this.isEnd();
+ const src = this.#parts
+ .map(p => {
+ const [re, _, hasMagic, uflag] = typeof p === 'string'
+ ? AST.#parseGlob(p, this.#hasMagic, noEmpty)
+ : p.toRegExpSource(allowDot);
+ this.#hasMagic = this.#hasMagic || hasMagic;
+ this.#uflag = this.#uflag || uflag;
+ return re;
+ })
+ .join('');
+ let start = '';
+ if (this.isStart()) {
+ if (typeof this.#parts[0] === 'string') {
+ // this is the string that will match the start of the pattern,
+ // so we need to protect against dots and such.
+ // '.' and '..' cannot match unless the pattern is that exactly,
+ // even if it starts with . or dot:true is set.
+ const dotTravAllowed = this.#parts.length === 1 && justDots.has(this.#parts[0]);
+ if (!dotTravAllowed) {
+ const aps = addPatternStart;
+ // check if we have a possibility of matching . or ..,
+ // and prevent that.
+ const needNoTrav =
+ // dots are allowed, and the pattern starts with [ or .
+ (dot && aps.has(src.charAt(0))) ||
+ // the pattern starts with \., and then [ or .
+ (src.startsWith('\\.') && aps.has(src.charAt(2))) ||
+ // the pattern starts with \.\., and then [ or .
+ (src.startsWith('\\.\\.') && aps.has(src.charAt(4)));
+ // no need to prevent dots if it can't match a dot, or if a
+ // sub-pattern will be preventing it anyway.
+ const needNoDot = !dot && !allowDot && aps.has(src.charAt(0));
+ start = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : '';
+ }
+ }
+ }
+ // append the "end of path portion" pattern to negation tails
+ let end = '';
+ if (this.isEnd() &&
+ this.#root.#filledNegs &&
+ this.#parent?.type === '!') {
+ end = '(?:$|\\/)';
+ }
+ const final = start + src + end;
+ return [
+ final,
+ unescape(src),
+ (this.#hasMagic = !!this.#hasMagic),
+ this.#uflag,
+ ];
+ }
+ // We need to calculate the body *twice* if it's a repeat pattern
+ // at the start, once in nodot mode, then again in dot mode, so a
+ // pattern like *(?) can match 'x.y'
+ const repeated = this.type === '*' || this.type === '+';
+ // some kind of extglob
+ const start = this.type === '!' ? '(?:(?!(?:' : '(?:';
+ let body = this.#partsToRegExp(dot);
+ if (this.isStart() && this.isEnd() && !body && this.type !== '!') {
+ // invalid extglob, has to at least be *something* present, if it's
+ // the entire path portion.
+ const s = this.toString();
+ this.#parts = [s];
+ this.type = null;
+ this.#hasMagic = undefined;
+ return [s, unescape(this.toString()), false, false];
+ }
+ // XXX abstract out this map method
+ let bodyDotAllowed = !repeated || allowDot || dot || !startNoDot
+ ? ''
+ : this.#partsToRegExp(true);
+ if (bodyDotAllowed === body) {
+ bodyDotAllowed = '';
+ }
+ if (bodyDotAllowed) {
+ body = `(?:${body})(?:${bodyDotAllowed})*?`;
+ }
+ // an empty !() is exactly equivalent to a starNoEmpty
+ let final = '';
+ if (this.type === '!' && this.#emptyExt) {
+ final = (this.isStart() && !dot ? startNoDot : '') + starNoEmpty;
+ }
+ else {
+ const close = this.type === '!'
+ ? // !() must match something,but !(x) can match ''
+ '))' +
+ (this.isStart() && !dot && !allowDot ? startNoDot : '') +
+ star +
+ ')'
+ : this.type === '@'
+ ? ')'
+ : this.type === '?'
+ ? ')?'
+ : this.type === '+' && bodyDotAllowed
+ ? ')'
+ : this.type === '*' && bodyDotAllowed
+ ? `)?`
+ : `)${this.type}`;
+ final = start + body + close;
+ }
+ return [
+ final,
+ unescape(body),
+ (this.#hasMagic = !!this.#hasMagic),
+ this.#uflag,
+ ];
+ }
+ #partsToRegExp(dot) {
+ return this.#parts
+ .map(p => {
+ // extglob ASTs should only contain parent ASTs
+ /* c8 ignore start */
+ if (typeof p === 'string') {
+ throw new Error('string type in extglob ast??');
+ }
+ /* c8 ignore stop */
+ // can ignore hasMagic, because extglobs are already always magic
+ const [re, _, _hasMagic, uflag] = p.toRegExpSource(dot);
+ this.#uflag = this.#uflag || uflag;
+ return re;
+ })
+ .filter(p => !(this.isStart() && this.isEnd()) || !!p)
+ .join('|');
+ }
+ static #parseGlob(glob, hasMagic, noEmpty = false) {
+ let escaping = false;
+ let re = '';
+ let uflag = false;
+ for (let i = 0; i < glob.length; i++) {
+ const c = glob.charAt(i);
+ if (escaping) {
+ escaping = false;
+ re += (reSpecials.has(c) ? '\\' : '') + c;
+ continue;
+ }
+ if (c === '\\') {
+ if (i === glob.length - 1) {
+ re += '\\\\';
+ }
+ else {
+ escaping = true;
+ }
+ continue;
+ }
+ if (c === '[') {
+ const [src, needUflag, consumed, magic] = parseClass(glob, i);
+ if (consumed) {
+ re += src;
+ uflag = uflag || needUflag;
+ i += consumed - 1;
+ hasMagic = hasMagic || magic;
+ continue;
+ }
+ }
+ if (c === '*') {
+ if (noEmpty && glob === '*')
+ re += starNoEmpty;
+ else
+ re += star;
+ hasMagic = true;
+ continue;
+ }
+ if (c === '?') {
+ re += qmark;
+ hasMagic = true;
+ continue;
+ }
+ re += regExpEscape(c);
+ }
+ return [re, unescape(glob), !!hasMagic, uflag];
+ }
+}
+//# sourceMappingURL=ast.js.map
\ No newline at end of file
diff --git a/deps/npm/node_modules/@tufjs/models/node_modules/minimatch/dist/esm/brace-expressions.js b/deps/npm/node_modules/@tufjs/models/node_modules/minimatch/dist/esm/brace-expressions.js
new file mode 100644
index 00000000000000..c629d6ae816e27
--- /dev/null
+++ b/deps/npm/node_modules/@tufjs/models/node_modules/minimatch/dist/esm/brace-expressions.js
@@ -0,0 +1,148 @@
+// translate the various posix character classes into unicode properties
+// this works across all unicode locales
+// { : [, /u flag required, negated]
+const posixClasses = {
+ '[:alnum:]': ['\\p{L}\\p{Nl}\\p{Nd}', true],
+ '[:alpha:]': ['\\p{L}\\p{Nl}', true],
+ '[:ascii:]': ['\\x' + '00-\\x' + '7f', false],
+ '[:blank:]': ['\\p{Zs}\\t', true],
+ '[:cntrl:]': ['\\p{Cc}', true],
+ '[:digit:]': ['\\p{Nd}', true],
+ '[:graph:]': ['\\p{Z}\\p{C}', true, true],
+ '[:lower:]': ['\\p{Ll}', true],
+ '[:print:]': ['\\p{C}', true],
+ '[:punct:]': ['\\p{P}', true],
+ '[:space:]': ['\\p{Z}\\t\\r\\n\\v\\f', true],
+ '[:upper:]': ['\\p{Lu}', true],
+ '[:word:]': ['\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}', true],
+ '[:xdigit:]': ['A-Fa-f0-9', false],
+};
+// only need to escape a few things inside of brace expressions
+// escapes: [ \ ] -
+const braceEscape = (s) => s.replace(/[[\]\\-]/g, '\\$&');
+// escape all regexp magic characters
+const regexpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
+// everything has already been escaped, we just have to join
+const rangesToString = (ranges) => ranges.join('');
+// takes a glob string at a posix brace expression, and returns
+// an equivalent regular expression source, and boolean indicating
+// whether the /u flag needs to be applied, and the number of chars
+// consumed to parse the character class.
+// This also removes out of order ranges, and returns ($.) if the
+// entire class just no good.
+export const parseClass = (glob, position) => {
+ const pos = position;
+ /* c8 ignore start */
+ if (glob.charAt(pos) !== '[') {
+ throw new Error('not in a brace expression');
+ }
+ /* c8 ignore stop */
+ const ranges = [];
+ const negs = [];
+ let i = pos + 1;
+ let sawStart = false;
+ let uflag = false;
+ let escaping = false;
+ let negate = false;
+ let endPos = pos;
+ let rangeStart = '';
+ WHILE: while (i < glob.length) {
+ const c = glob.charAt(i);
+ if ((c === '!' || c === '^') && i === pos + 1) {
+ negate = true;
+ i++;
+ continue;
+ }
+ if (c === ']' && sawStart && !escaping) {
+ endPos = i + 1;
+ break;
+ }
+ sawStart = true;
+ if (c === '\\') {
+ if (!escaping) {
+ escaping = true;
+ i++;
+ continue;
+ }
+ // escaped \ char, fall through and treat like normal char
+ }
+ if (c === '[' && !escaping) {
+ // either a posix class, a collation equivalent, or just a [
+ for (const [cls, [unip, u, neg]] of Object.entries(posixClasses)) {
+ if (glob.startsWith(cls, i)) {
+ // invalid, [a-[] is fine, but not [a-[:alpha]]
+ if (rangeStart) {
+ return ['$.', false, glob.length - pos, true];
+ }
+ i += cls.length;
+ if (neg)
+ negs.push(unip);
+ else
+ ranges.push(unip);
+ uflag = uflag || u;
+ continue WHILE;
+ }
+ }
+ }
+ // now it's just a normal character, effectively
+ escaping = false;
+ if (rangeStart) {
+ // throw this range away if it's not valid, but others
+ // can still match.
+ if (c > rangeStart) {
+ ranges.push(braceEscape(rangeStart) + '-' + braceEscape(c));
+ }
+ else if (c === rangeStart) {
+ ranges.push(braceEscape(c));
+ }
+ rangeStart = '';
+ i++;
+ continue;
+ }
+ // now might be the start of a range.
+ // can be either c-d or c-] or c] or c] at this point
+ if (glob.startsWith('-]', i + 1)) {
+ ranges.push(braceEscape(c + '-'));
+ i += 2;
+ continue;
+ }
+ if (glob.startsWith('-', i + 1)) {
+ rangeStart = c;
+ i += 2;
+ continue;
+ }
+ // not the start of a range, just a single character
+ ranges.push(braceEscape(c));
+ i++;
+ }
+ if (endPos < i) {
+ // didn't see the end of the class, not a valid class,
+ // but might still be valid as a literal match.
+ return ['', false, 0, false];
+ }
+ // if we got no ranges and no negates, then we have a range that
+ // cannot possibly match anything, and that poisons the whole glob
+ if (!ranges.length && !negs.length) {
+ return ['$.', false, glob.length - pos, true];
+ }
+ // if we got one positive range, and it's a single character, then that's
+ // not actually a magic pattern, it's just that one literal character.
+ // we should not treat that as "magic", we should just return the literal
+ // character. [_] is a perfectly valid way to escape glob magic chars.
+ if (negs.length === 0 &&
+ ranges.length === 1 &&
+ /^\\?.$/.test(ranges[0]) &&
+ !negate) {
+ const r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0];
+ return [regexpEscape(r), false, endPos - pos, false];
+ }
+ const sranges = '[' + (negate ? '^' : '') + rangesToString(ranges) + ']';
+ const snegs = '[' + (negate ? '' : '^') + rangesToString(negs) + ']';
+ const comb = ranges.length && negs.length
+ ? '(' + sranges + '|' + snegs + ')'
+ : ranges.length
+ ? sranges
+ : snegs;
+ return [comb, uflag, endPos - pos, true];
+};
+//# sourceMappingURL=brace-expressions.js.map
\ No newline at end of file
diff --git a/deps/npm/node_modules/@tufjs/models/node_modules/minimatch/dist/esm/escape.js b/deps/npm/node_modules/@tufjs/models/node_modules/minimatch/dist/esm/escape.js
new file mode 100644
index 00000000000000..16f7c8c7bdc646
--- /dev/null
+++ b/deps/npm/node_modules/@tufjs/models/node_modules/minimatch/dist/esm/escape.js
@@ -0,0 +1,18 @@
+/**
+ * Escape all magic characters in a glob pattern.
+ *
+ * If the {@link windowsPathsNoEscape | GlobOptions.windowsPathsNoEscape}
+ * option is used, then characters are escaped by wrapping in `[]`, because
+ * a magic character wrapped in a character class can only be satisfied by
+ * that exact character. In this mode, `\` is _not_ escaped, because it is
+ * not interpreted as a magic character, but instead as a path separator.
+ */
+export const escape = (s, { windowsPathsNoEscape = false, } = {}) => {
+ // don't need to escape +@! because we escape the parens
+ // that make those magic, and escaping ! as [!] isn't valid,
+ // because [!]] is a valid glob class meaning not ']'.
+ return windowsPathsNoEscape
+ ? s.replace(/[?*()[\]]/g, '[$&]')
+ : s.replace(/[?*()[\]\\]/g, '\\$&');
+};
+//# sourceMappingURL=escape.js.map
\ No newline at end of file
diff --git a/deps/npm/node_modules/@tufjs/models/node_modules/minimatch/dist/esm/index.js b/deps/npm/node_modules/@tufjs/models/node_modules/minimatch/dist/esm/index.js
new file mode 100644
index 00000000000000..84b577b0472cb6
--- /dev/null
+++ b/deps/npm/node_modules/@tufjs/models/node_modules/minimatch/dist/esm/index.js
@@ -0,0 +1,1001 @@
+import expand from 'brace-expansion';
+import { assertValidPattern } from './assert-valid-pattern.js';
+import { AST } from './ast.js';
+import { escape } from './escape.js';
+import { unescape } from './unescape.js';
+export const minimatch = (p, pattern, options = {}) => {
+ assertValidPattern(pattern);
+ // shortcut: comments match nothing.
+ if (!options.nocomment && pattern.charAt(0) === '#') {
+ return false;
+ }
+ return new Minimatch(pattern, options).match(p);
+};
+// Optimized checking for the most common glob patterns.
+const starDotExtRE = /^\*+([^+@!?\*\[\(]*)$/;
+const starDotExtTest = (ext) => (f) => !f.startsWith('.') && f.endsWith(ext);
+const starDotExtTestDot = (ext) => (f) => f.endsWith(ext);
+const starDotExtTestNocase = (ext) => {
+ ext = ext.toLowerCase();
+ return (f) => !f.startsWith('.') && f.toLowerCase().endsWith(ext);
+};
+const starDotExtTestNocaseDot = (ext) => {
+ ext = ext.toLowerCase();
+ return (f) => f.toLowerCase().endsWith(ext);
+};
+const starDotStarRE = /^\*+\.\*+$/;
+const starDotStarTest = (f) => !f.startsWith('.') && f.includes('.');
+const starDotStarTestDot = (f) => f !== '.' && f !== '..' && f.includes('.');
+const dotStarRE = /^\.\*+$/;
+const dotStarTest = (f) => f !== '.' && f !== '..' && f.startsWith('.');
+const starRE = /^\*+$/;
+const starTest = (f) => f.length !== 0 && !f.startsWith('.');
+const starTestDot = (f) => f.length !== 0 && f !== '.' && f !== '..';
+const qmarksRE = /^\?+([^+@!?\*\[\(]*)?$/;
+const qmarksTestNocase = ([$0, ext = '']) => {
+ const noext = qmarksTestNoExt([$0]);
+ if (!ext)
+ return noext;
+ ext = ext.toLowerCase();
+ return (f) => noext(f) && f.toLowerCase().endsWith(ext);
+};
+const qmarksTestNocaseDot = ([$0, ext = '']) => {
+ const noext = qmarksTestNoExtDot([$0]);
+ if (!ext)
+ return noext;
+ ext = ext.toLowerCase();
+ return (f) => noext(f) && f.toLowerCase().endsWith(ext);
+};
+const qmarksTestDot = ([$0, ext = '']) => {
+ const noext = qmarksTestNoExtDot([$0]);
+ return !ext ? noext : (f) => noext(f) && f.endsWith(ext);
+};
+const qmarksTest = ([$0, ext = '']) => {
+ const noext = qmarksTestNoExt([$0]);
+ return !ext ? noext : (f) => noext(f) && f.endsWith(ext);
+};
+const qmarksTestNoExt = ([$0]) => {
+ const len = $0.length;
+ return (f) => f.length === len && !f.startsWith('.');
+};
+const qmarksTestNoExtDot = ([$0]) => {
+ const len = $0.length;
+ return (f) => f.length === len && f !== '.' && f !== '..';
+};
+/* c8 ignore start */
+const defaultPlatform = (typeof process === 'object' && process
+ ? (typeof process.env === 'object' &&
+ process.env &&
+ process.env.__MINIMATCH_TESTING_PLATFORM__) ||
+ process.platform
+ : 'posix');
+const path = {
+ win32: { sep: '\\' },
+ posix: { sep: '/' },
+};
+/* c8 ignore stop */
+export const sep = defaultPlatform === 'win32' ? path.win32.sep : path.posix.sep;
+minimatch.sep = sep;
+export const GLOBSTAR = Symbol('globstar **');
+minimatch.GLOBSTAR = GLOBSTAR;
+// any single thing other than /
+// don't need to escape / when using new RegExp()
+const qmark = '[^/]';
+// * => any number of characters
+const star = qmark + '*?';
+// ** when dots are allowed. Anything goes, except .. and .
+// not (^ or / followed by one or two dots followed by $ or /),
+// followed by anything, any number of times.
+const twoStarDot = '(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?';
+// not a ^ or / followed by a dot,
+// followed by anything, any number of times.
+const twoStarNoDot = '(?:(?!(?:\\/|^)\\.).)*?';
+export const filter = (pattern, options = {}) => (p) => minimatch(p, pattern, options);
+minimatch.filter = filter;
+const ext = (a, b = {}) => Object.assign({}, a, b);
+export const defaults = (def) => {
+ if (!def || typeof def !== 'object' || !Object.keys(def).length) {
+ return minimatch;
+ }
+ const orig = minimatch;
+ const m = (p, pattern, options = {}) => orig(p, pattern, ext(def, options));
+ return Object.assign(m, {
+ Minimatch: class Minimatch extends orig.Minimatch {
+ constructor(pattern, options = {}) {
+ super(pattern, ext(def, options));
+ }
+ static defaults(options) {
+ return orig.defaults(ext(def, options)).Minimatch;
+ }
+ },
+ AST: class AST extends orig.AST {
+ /* c8 ignore start */
+ constructor(type, parent, options = {}) {
+ super(type, parent, ext(def, options));
+ }
+ /* c8 ignore stop */
+ static fromGlob(pattern, options = {}) {
+ return orig.AST.fromGlob(pattern, ext(def, options));
+ }
+ },
+ unescape: (s, options = {}) => orig.unescape(s, ext(def, options)),
+ escape: (s, options = {}) => orig.escape(s, ext(def, options)),
+ filter: (pattern, options = {}) => orig.filter(pattern, ext(def, options)),
+ defaults: (options) => orig.defaults(ext(def, options)),
+ makeRe: (pattern, options = {}) => orig.makeRe(pattern, ext(def, options)),
+ braceExpand: (pattern, options = {}) => orig.braceExpand(pattern, ext(def, options)),
+ match: (list, pattern, options = {}) => orig.match(list, pattern, ext(def, options)),
+ sep: orig.sep,
+ GLOBSTAR: GLOBSTAR,
+ });
+};
+minimatch.defaults = defaults;
+// Brace expansion:
+// a{b,c}d -> abd acd
+// a{b,}c -> abc ac
+// a{0..3}d -> a0d a1d a2d a3d
+// a{b,c{d,e}f}g -> abg acdfg acefg
+// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg
+//
+// Invalid sets are not expanded.
+// a{2..}b -> a{2..}b
+// a{b}c -> a{b}c
+export const braceExpand = (pattern, options = {}) => {
+ assertValidPattern(pattern);
+ // Thanks to Yeting Li for
+ // improving this regexp to avoid a ReDOS vulnerability.
+ if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) {
+ // shortcut. no need to expand.
+ return [pattern];
+ }
+ return expand(pattern);
+};
+minimatch.braceExpand = braceExpand;
+// parse a component of the expanded set.
+// At this point, no pattern may contain "/" in it
+// so we're going to return a 2d array, where each entry is the full
+// pattern, split on '/', and then turned into a regular expression.
+// A regexp is made at the end which joins each array with an
+// escaped /, and another full one which joins each regexp with |.
+//
+// Following the lead of Bash 4.1, note that "**" only has special meaning
+// when it is the *only* thing in a path portion. Otherwise, any series
+// of * is equivalent to a single *. Globstar behavior is enabled by
+// default, and can be disabled by setting options.noglobstar.
+export const makeRe = (pattern, options = {}) => new Minimatch(pattern, options).makeRe();
+minimatch.makeRe = makeRe;
+export const match = (list, pattern, options = {}) => {
+ const mm = new Minimatch(pattern, options);
+ list = list.filter(f => mm.match(f));
+ if (mm.options.nonull && !list.length) {
+ list.push(pattern);
+ }
+ return list;
+};
+minimatch.match = match;
+// replace stuff like \* with *
+const globMagic = /[?*]|[+@!]\(.*?\)|\[|\]/;
+const regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
+export class Minimatch {
+ options;
+ set;
+ pattern;
+ windowsPathsNoEscape;
+ nonegate;
+ negate;
+ comment;
+ empty;
+ preserveMultipleSlashes;
+ partial;
+ globSet;
+ globParts;
+ nocase;
+ isWindows;
+ platform;
+ windowsNoMagicRoot;
+ regexp;
+ constructor(pattern, options = {}) {
+ assertValidPattern(pattern);
+ options = options || {};
+ this.options = options;
+ this.pattern = pattern;
+ this.platform = options.platform || defaultPlatform;
+ this.isWindows = this.platform === 'win32';
+ this.windowsPathsNoEscape =
+ !!options.windowsPathsNoEscape || options.allowWindowsEscape === false;
+ if (this.windowsPathsNoEscape) {
+ this.pattern = this.pattern.replace(/\\/g, '/');
+ }
+ this.preserveMultipleSlashes = !!options.preserveMultipleSlashes;
+ this.regexp = null;
+ this.negate = false;
+ this.nonegate = !!options.nonegate;
+ this.comment = false;
+ this.empty = false;
+ this.partial = !!options.partial;
+ this.nocase = !!this.options.nocase;
+ this.windowsNoMagicRoot =
+ options.windowsNoMagicRoot !== undefined
+ ? options.windowsNoMagicRoot
+ : !!(this.isWindows && this.nocase);
+ this.globSet = [];
+ this.globParts = [];
+ this.set = [];
+ // make the set of regexps etc.
+ this.make();
+ }
+ hasMagic() {
+ if (this.options.magicalBraces && this.set.length > 1) {
+ return true;
+ }
+ for (const pattern of this.set) {
+ for (const part of pattern) {
+ if (typeof part !== 'string')
+ return true;
+ }
+ }
+ return false;
+ }
+ debug(..._) { }
+ make() {
+ const pattern = this.pattern;
+ const options = this.options;
+ // empty patterns and comments match nothing.
+ if (!options.nocomment && pattern.charAt(0) === '#') {
+ this.comment = true;
+ return;
+ }
+ if (!pattern) {
+ this.empty = true;
+ return;
+ }
+ // step 1: figure out negation, etc.
+ this.parseNegate();
+ // step 2: expand braces
+ this.globSet = [...new Set(this.braceExpand())];
+ if (options.debug) {
+ this.debug = (...args) => console.error(...args);
+ }
+ this.debug(this.pattern, this.globSet);
+ // step 3: now we have a set, so turn each one into a series of
+ // path-portion matching patterns.
+ // These will be regexps, except in the case of "**", which is
+ // set to the GLOBSTAR object for globstar behavior,
+ // and will not contain any / characters
+ //
+ // First, we preprocess to make the glob pattern sets a bit simpler
+ // and deduped. There are some perf-killing patterns that can cause
+ // problems with a glob walk, but we can simplify them down a bit.
+ const rawGlobParts = this.globSet.map(s => this.slashSplit(s));
+ this.globParts = this.preprocess(rawGlobParts);
+ this.debug(this.pattern, this.globParts);
+ // glob --> regexps
+ let set = this.globParts.map((s, _, __) => {
+ if (this.isWindows && this.windowsNoMagicRoot) {
+ // check if it's a drive or unc path.
+ const isUNC = s[0] === '' &&
+ s[1] === '' &&
+ (s[2] === '?' || !globMagic.test(s[2])) &&
+ !globMagic.test(s[3]);
+ const isDrive = /^[a-z]:/i.test(s[0]);
+ if (isUNC) {
+ return [...s.slice(0, 4), ...s.slice(4).map(ss => this.parse(ss))];
+ }
+ else if (isDrive) {
+ return [s[0], ...s.slice(1).map(ss => this.parse(ss))];
+ }
+ }
+ return s.map(ss => this.parse(ss));
+ });
+ this.debug(this.pattern, set);
+ // filter out everything that didn't compile properly.
+ this.set = set.filter(s => s.indexOf(false) === -1);
+ // do not treat the ? in UNC paths as magic
+ if (this.isWindows) {
+ for (let i = 0; i < this.set.length; i++) {
+ const p = this.set[i];
+ if (p[0] === '' &&
+ p[1] === '' &&
+ this.globParts[i][2] === '?' &&
+ typeof p[3] === 'string' &&
+ /^[a-z]:$/i.test(p[3])) {
+ p[2] = '?';
+ }
+ }
+ }
+ this.debug(this.pattern, this.set);
+ }
+ // various transforms to equivalent pattern sets that are
+ // faster to process in a filesystem walk. The goal is to
+ // eliminate what we can, and push all ** patterns as far
+ // to the right as possible, even if it increases the number
+ // of patterns that we have to process.
+ preprocess(globParts) {
+ // if we're not in globstar mode, then turn all ** into *
+ if (this.options.noglobstar) {
+ for (let i = 0; i < globParts.length; i++) {
+ for (let j = 0; j < globParts[i].length; j++) {
+ if (globParts[i][j] === '**') {
+ globParts[i][j] = '*';
+ }
+ }
+ }
+ }
+ const { optimizationLevel = 1 } = this.options;
+ if (optimizationLevel >= 2) {
+ // aggressive optimization for the purpose of fs walking
+ globParts = this.firstPhasePreProcess(globParts);
+ globParts = this.secondPhasePreProcess(globParts);
+ }
+ else if (optimizationLevel >= 1) {
+ // just basic optimizations to remove some .. parts
+ globParts = this.levelOneOptimize(globParts);
+ }
+ else {
+ // just collapse multiple ** portions into one
+ globParts = this.adjascentGlobstarOptimize(globParts);
+ }
+ return globParts;
+ }
+ // just get rid of adjascent ** portions
+ adjascentGlobstarOptimize(globParts) {
+ return globParts.map(parts => {
+ let gs = -1;
+ while (-1 !== (gs = parts.indexOf('**', gs + 1))) {
+ let i = gs;
+ while (parts[i + 1] === '**') {
+ i++;
+ }
+ if (i !== gs) {
+ parts.splice(gs, i - gs);
+ }
+ }
+ return parts;
+ });
+ }
+ // get rid of adjascent ** and resolve .. portions
+ levelOneOptimize(globParts) {
+ return globParts.map(parts => {
+ parts = parts.reduce((set, part) => {
+ const prev = set[set.length - 1];
+ if (part === '**' && prev === '**') {
+ return set;
+ }
+ if (part === '..') {
+ if (prev && prev !== '..' && prev !== '.' && prev !== '**') {
+ set.pop();
+ return set;
+ }
+ }
+ set.push(part);
+ return set;
+ }, []);
+ return parts.length === 0 ? [''] : parts;
+ });
+ }
+ levelTwoFileOptimize(parts) {
+ if (!Array.isArray(parts)) {
+ parts = this.slashSplit(parts);
+ }
+ let didSomething = false;
+ do {
+ didSomething = false;
+ // // -> /
+ if (!this.preserveMultipleSlashes) {
+ for (let i = 1; i < parts.length - 1; i++) {
+ const p = parts[i];
+ // don't squeeze out UNC patterns
+ if (i === 1 && p === '' && parts[0] === '')
+ continue;
+ if (p === '.' || p === '') {
+ didSomething = true;
+ parts.splice(i, 1);
+ i--;
+ }
+ }
+ if (parts[0] === '.' &&
+ parts.length === 2 &&
+ (parts[1] === '.' || parts[1] === '')) {
+ didSomething = true;
+ parts.pop();
+ }
+ }
+ // //../ -> /
+ let dd = 0;
+ while (-1 !== (dd = parts.indexOf('..', dd + 1))) {
+ const p = parts[dd - 1];
+ if (p && p !== '.' && p !== '..' && p !== '**') {
+ didSomething = true;
+ parts.splice(dd - 1, 2);
+ dd -= 2;
+ }
+ }
+ } while (didSomething);
+ return parts.length === 0 ? [''] : parts;
+ }
+ // First phase: single-pattern processing
+ // is 1 or more portions
+ // is 1 or more portions
+ // is any portion other than ., .., '', or **
+ // is . or ''
+ //
+ // **/.. is *brutal* for filesystem walking performance, because
+ // it effectively resets the recursive walk each time it occurs,
+ // and ** cannot be reduced out by a .. pattern part like a regexp
+ // or most strings (other than .., ., and '') can be.
+ //
+ // /**/..//
/ -> {/..//
/,/**//
/}
+ // // -> /
+ // //../ -> /
+ // **/**/ -> **/
+ //
+ // **/*/ -> */**/ <== not valid because ** doesn't follow
+ // this WOULD be allowed if ** did follow symlinks, or * didn't
+ firstPhasePreProcess(globParts) {
+ let didSomething = false;
+ do {
+ didSomething = false;
+ // /**/..//
/ -> {/..//
/,/**//
/}
+ for (let parts of globParts) {
+ let gs = -1;
+ while (-1 !== (gs = parts.indexOf('**', gs + 1))) {
+ let gss = gs;
+ while (parts[gss + 1] === '**') {
+ // /**/**/ -> /**/
+ gss++;
+ }
+ // eg, if gs is 2 and gss is 4, that means we have 3 **
+ // parts, and can remove 2 of them.
+ if (gss > gs) {
+ parts.splice(gs + 1, gss - gs);
+ }
+ let next = parts[gs + 1];
+ const p = parts[gs + 2];
+ const p2 = parts[gs + 3];
+ if (next !== '..')
+ continue;
+ if (!p ||
+ p === '.' ||
+ p === '..' ||
+ !p2 ||
+ p2 === '.' ||
+ p2 === '..') {
+ continue;
+ }
+ didSomething = true;
+ // edit parts in place, and push the new one
+ parts.splice(gs, 1);
+ const other = parts.slice(0);
+ other[gs] = '**';
+ globParts.push(other);
+ gs--;
+ }
+ // // -> /
+ if (!this.preserveMultipleSlashes) {
+ for (let i = 1; i < parts.length - 1; i++) {
+ const p = parts[i];
+ // don't squeeze out UNC patterns
+ if (i === 1 && p === '' && parts[0] === '')
+ continue;
+ if (p === '.' || p === '') {
+ didSomething = true;
+ parts.splice(i, 1);
+ i--;
+ }
+ }
+ if (parts[0] === '.' &&
+ parts.length === 2 &&
+ (parts[1] === '.' || parts[1] === '')) {
+ didSomething = true;
+ parts.pop();
+ }
+ }
+ // //../ -> /
+ let dd = 0;
+ while (-1 !== (dd = parts.indexOf('..', dd + 1))) {
+ const p = parts[dd - 1];
+ if (p && p !== '.' && p !== '..' && p !== '**') {
+ didSomething = true;
+ const needDot = dd === 1 && parts[dd + 1] === '**';
+ const splin = needDot ? ['.'] : [];
+ parts.splice(dd - 1, 2, ...splin);
+ if (parts.length === 0)
+ parts.push('');
+ dd -= 2;
+ }
+ }
+ }
+ } while (didSomething);
+ return globParts;
+ }
+ // second phase: multi-pattern dedupes
+ // {/*/,//} -> /*/
+ // {/,/} -> /
+ // {/**/,/} -> /**/
+ //
+ // {/**/,/**//} -> /**/
+ // ^-- not valid because ** doens't follow symlinks
+ secondPhasePreProcess(globParts) {
+ for (let i = 0; i < globParts.length - 1; i++) {
+ for (let j = i + 1; j < globParts.length; j++) {
+ const matched = this.partsMatch(globParts[i], globParts[j], !this.preserveMultipleSlashes);
+ if (matched) {
+ globParts[i] = [];
+ globParts[j] = matched;
+ break;
+ }
+ }
+ }
+ return globParts.filter(gs => gs.length);
+ }
+ partsMatch(a, b, emptyGSMatch = false) {
+ let ai = 0;
+ let bi = 0;
+ let result = [];
+ let which = '';
+ while (ai < a.length && bi < b.length) {
+ if (a[ai] === b[bi]) {
+ result.push(which === 'b' ? b[bi] : a[ai]);
+ ai++;
+ bi++;
+ }
+ else if (emptyGSMatch && a[ai] === '**' && b[bi] === a[ai + 1]) {
+ result.push(a[ai]);
+ ai++;
+ }
+ else if (emptyGSMatch && b[bi] === '**' && a[ai] === b[bi + 1]) {
+ result.push(b[bi]);
+ bi++;
+ }
+ else if (a[ai] === '*' &&
+ b[bi] &&
+ (this.options.dot || !b[bi].startsWith('.')) &&
+ b[bi] !== '**') {
+ if (which === 'b')
+ return false;
+ which = 'a';
+ result.push(a[ai]);
+ ai++;
+ bi++;
+ }
+ else if (b[bi] === '*' &&
+ a[ai] &&
+ (this.options.dot || !a[ai].startsWith('.')) &&
+ a[ai] !== '**') {
+ if (which === 'a')
+ return false;
+ which = 'b';
+ result.push(b[bi]);
+ ai++;
+ bi++;
+ }
+ else {
+ return false;
+ }
+ }
+ // if we fall out of the loop, it means they two are identical
+ // as long as their lengths match
+ return a.length === b.length && result;
+ }
+ parseNegate() {
+ if (this.nonegate)
+ return;
+ const pattern = this.pattern;
+ let negate = false;
+ let negateOffset = 0;
+ for (let i = 0; i < pattern.length && pattern.charAt(i) === '!'; i++) {
+ negate = !negate;
+ negateOffset++;
+ }
+ if (negateOffset)
+ this.pattern = pattern.slice(negateOffset);
+ this.negate = negate;
+ }
+ // set partial to true to test if, for example,
+ // "/a/b" matches the start of "/*/b/*/d"
+ // Partial means, if you run out of file before you run
+ // out of pattern, then that's fine, as long as all
+ // the parts match.
+ matchOne(file, pattern, partial = false) {
+ const options = this.options;
+ // UNC paths like //?/X:/... can match X:/... and vice versa
+ // Drive letters in absolute drive or unc paths are always compared
+ // case-insensitively.
+ if (this.isWindows) {
+ const fileDrive = typeof file[0] === 'string' && /^[a-z]:$/i.test(file[0]);
+ const fileUNC = !fileDrive &&
+ file[0] === '' &&
+ file[1] === '' &&
+ file[2] === '?' &&
+ /^[a-z]:$/i.test(file[3]);
+ const patternDrive = typeof pattern[0] === 'string' && /^[a-z]:$/i.test(pattern[0]);
+ const patternUNC = !patternDrive &&
+ pattern[0] === '' &&
+ pattern[1] === '' &&
+ pattern[2] === '?' &&
+ typeof pattern[3] === 'string' &&
+ /^[a-z]:$/i.test(pattern[3]);
+ const fdi = fileUNC ? 3 : fileDrive ? 0 : undefined;
+ const pdi = patternUNC ? 3 : patternDrive ? 0 : undefined;
+ if (typeof fdi === 'number' && typeof pdi === 'number') {
+ const [fd, pd] = [file[fdi], pattern[pdi]];
+ if (fd.toLowerCase() === pd.toLowerCase()) {
+ pattern[pdi] = fd;
+ if (pdi > fdi) {
+ pattern = pattern.slice(pdi);
+ }
+ else if (fdi > pdi) {
+ file = file.slice(fdi);
+ }
+ }
+ }
+ }
+ // resolve and reduce . and .. portions in the file as well.
+ // dont' need to do the second phase, because it's only one string[]
+ const { optimizationLevel = 1 } = this.options;
+ if (optimizationLevel >= 2) {
+ file = this.levelTwoFileOptimize(file);
+ }
+ this.debug('matchOne', this, { file, pattern });
+ this.debug('matchOne', file.length, pattern.length);
+ for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
+ this.debug('matchOne loop');
+ var p = pattern[pi];
+ var f = file[fi];
+ this.debug(pattern, p, f);
+ // should be impossible.
+ // some invalid regexp stuff in the set.
+ /* c8 ignore start */
+ if (p === false) {
+ return false;
+ }
+ /* c8 ignore stop */
+ if (p === GLOBSTAR) {
+ this.debug('GLOBSTAR', [pattern, p, f]);
+ // "**"
+ // a/**/b/**/c would match the following:
+ // a/b/x/y/z/c
+ // a/x/y/z/b/c
+ // a/b/x/b/x/c
+ // a/b/c
+ // To do this, take the rest of the pattern after
+ // the **, and see if it would match the file remainder.
+ // If so, return success.
+ // If not, the ** "swallows" a segment, and try again.
+ // This is recursively awful.
+ //
+ // a/**/b/**/c matching a/b/x/y/z/c
+ // - a matches a
+ // - doublestar
+ // - matchOne(b/x/y/z/c, b/**/c)
+ // - b matches b
+ // - doublestar
+ // - matchOne(x/y/z/c, c) -> no
+ // - matchOne(y/z/c, c) -> no
+ // - matchOne(z/c, c) -> no
+ // - matchOne(c, c) yes, hit
+ var fr = fi;
+ var pr = pi + 1;
+ if (pr === pl) {
+ this.debug('** at the end');
+ // a ** at the end will just swallow the rest.
+ // We have found a match.
+ // however, it will not swallow /.x, unless
+ // options.dot is set.
+ // . and .. are *never* matched by **, for explosively
+ // exponential reasons.
+ for (; fi < fl; fi++) {
+ if (file[fi] === '.' ||
+ file[fi] === '..' ||
+ (!options.dot && file[fi].charAt(0) === '.'))
+ return false;
+ }
+ return true;
+ }
+ // ok, let's see if we can swallow whatever we can.
+ while (fr < fl) {
+ var swallowee = file[fr];
+ this.debug('\nglobstar while', file, fr, pattern, pr, swallowee);
+ // XXX remove this slice. Just pass the start index.
+ if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
+ this.debug('globstar found match!', fr, fl, swallowee);
+ // found a match.
+ return true;
+ }
+ else {
+ // can't swallow "." or ".." ever.
+ // can only swallow ".foo" when explicitly asked.
+ if (swallowee === '.' ||
+ swallowee === '..' ||
+ (!options.dot && swallowee.charAt(0) === '.')) {
+ this.debug('dot detected!', file, fr, pattern, pr);
+ break;
+ }
+ // ** swallows a segment, and continue.
+ this.debug('globstar swallow a segment, and continue');
+ fr++;
+ }
+ }
+ // no match was found.
+ // However, in partial mode, we can't say this is necessarily over.
+ /* c8 ignore start */
+ if (partial) {
+ // ran out of file
+ this.debug('\n>>> no match, partial?', file, fr, pattern, pr);
+ if (fr === fl) {
+ return true;
+ }
+ }
+ /* c8 ignore stop */
+ return false;
+ }
+ // something other than **
+ // non-magic patterns just have to match exactly
+ // patterns with magic have been turned into regexps.
+ let hit;
+ if (typeof p === 'string') {
+ hit = f === p;
+ this.debug('string match', p, f, hit);
+ }
+ else {
+ hit = p.test(f);
+ this.debug('pattern match', p, f, hit);
+ }
+ if (!hit)
+ return false;
+ }
+ // Note: ending in / means that we'll get a final ""
+ // at the end of the pattern. This can only match a
+ // corresponding "" at the end of the file.
+ // If the file ends in /, then it can only match a
+ // a pattern that ends in /, unless the pattern just
+ // doesn't have any more for it. But, a/b/ should *not*
+ // match "a/b/*", even though "" matches against the
+ // [^/]*? pattern, except in partial mode, where it might
+ // simply not be reached yet.
+ // However, a/b/ should still satisfy a/*
+ // now either we fell off the end of the pattern, or we're done.
+ if (fi === fl && pi === pl) {
+ // ran out of pattern and filename at the same time.
+ // an exact hit!
+ return true;
+ }
+ else if (fi === fl) {
+ // ran out of file, but still had pattern left.
+ // this is ok if we're doing the match as part of
+ // a glob fs traversal.
+ return partial;
+ }
+ else if (pi === pl) {
+ // ran out of pattern, still have file left.
+ // this is only acceptable if we're on the very last
+ // empty segment of a file with a trailing slash.
+ // a/* should match a/b/
+ return fi === fl - 1 && file[fi] === '';
+ /* c8 ignore start */
+ }
+ else {
+ // should be unreachable.
+ throw new Error('wtf?');
+ }
+ /* c8 ignore stop */
+ }
+ braceExpand() {
+ return braceExpand(this.pattern, this.options);
+ }
+ parse(pattern) {
+ assertValidPattern(pattern);
+ const options = this.options;
+ // shortcuts
+ if (pattern === '**')
+ return GLOBSTAR;
+ if (pattern === '')
+ return '';
+ // far and away, the most common glob pattern parts are
+ // *, *.*, and *. Add a fast check method for those.
+ let m;
+ let fastTest = null;
+ if ((m = pattern.match(starRE))) {
+ fastTest = options.dot ? starTestDot : starTest;
+ }
+ else if ((m = pattern.match(starDotExtRE))) {
+ fastTest = (options.nocase
+ ? options.dot
+ ? starDotExtTestNocaseDot
+ : starDotExtTestNocase
+ : options.dot
+ ? starDotExtTestDot
+ : starDotExtTest)(m[1]);
+ }
+ else if ((m = pattern.match(qmarksRE))) {
+ fastTest = (options.nocase
+ ? options.dot
+ ? qmarksTestNocaseDot
+ : qmarksTestNocase
+ : options.dot
+ ? qmarksTestDot
+ : qmarksTest)(m);
+ }
+ else if ((m = pattern.match(starDotStarRE))) {
+ fastTest = options.dot ? starDotStarTestDot : starDotStarTest;
+ }
+ else if ((m = pattern.match(dotStarRE))) {
+ fastTest = dotStarTest;
+ }
+ const re = AST.fromGlob(pattern, this.options).toMMPattern();
+ if (fastTest && typeof re === 'object') {
+ // Avoids overriding in frozen environments
+ Reflect.defineProperty(re, 'test', { value: fastTest });
+ }
+ return re;
+ }
+ makeRe() {
+ if (this.regexp || this.regexp === false)
+ return this.regexp;
+ // at this point, this.set is a 2d array of partial
+ // pattern strings, or "**".
+ //
+ // It's better to use .match(). This function shouldn't
+ // be used, really, but it's pretty convenient sometimes,
+ // when you just want to work with a regex.
+ const set = this.set;
+ if (!set.length) {
+ this.regexp = false;
+ return this.regexp;
+ }
+ const options = this.options;
+ const twoStar = options.noglobstar
+ ? star
+ : options.dot
+ ? twoStarDot
+ : twoStarNoDot;
+ const flags = new Set(options.nocase ? ['i'] : []);
+ // regexpify non-globstar patterns
+ // if ** is only item, then we just do one twoStar
+ // if ** is first, and there are more, prepend (\/|twoStar\/)? to next
+ // if ** is last, append (\/twoStar|) to previous
+ // if ** is in the middle, append (\/|\/twoStar\/) to previous
+ // then filter out GLOBSTAR symbols
+ let re = set
+ .map(pattern => {
+ const pp = pattern.map(p => {
+ if (p instanceof RegExp) {
+ for (const f of p.flags.split(''))
+ flags.add(f);
+ }
+ return typeof p === 'string'
+ ? regExpEscape(p)
+ : p === GLOBSTAR
+ ? GLOBSTAR
+ : p._src;
+ });
+ pp.forEach((p, i) => {
+ const next = pp[i + 1];
+ const prev = pp[i - 1];
+ if (p !== GLOBSTAR || prev === GLOBSTAR) {
+ return;
+ }
+ if (prev === undefined) {
+ if (next !== undefined && next !== GLOBSTAR) {
+ pp[i + 1] = '(?:\\/|' + twoStar + '\\/)?' + next;
+ }
+ else {
+ pp[i] = twoStar;
+ }
+ }
+ else if (next === undefined) {
+ pp[i - 1] = prev + '(?:\\/|' + twoStar + ')?';
+ }
+ else if (next !== GLOBSTAR) {
+ pp[i - 1] = prev + '(?:\\/|\\/' + twoStar + '\\/)' + next;
+ pp[i + 1] = GLOBSTAR;
+ }
+ });
+ return pp.filter(p => p !== GLOBSTAR).join('/');
+ })
+ .join('|');
+ // need to wrap in parens if we had more than one thing with |,
+ // otherwise only the first will be anchored to ^ and the last to $
+ const [open, close] = set.length > 1 ? ['(?:', ')'] : ['', ''];
+ // must match entire pattern
+ // ending in a * or ** will make it less strict.
+ re = '^' + open + re + close + '$';
+ // can match anything, as long as it's not this.
+ if (this.negate)
+ re = '^(?!' + re + ').+$';
+ try {
+ this.regexp = new RegExp(re, [...flags].join(''));
+ /* c8 ignore start */
+ }
+ catch (ex) {
+ // should be impossible
+ this.regexp = false;
+ }
+ /* c8 ignore stop */
+ return this.regexp;
+ }
+ slashSplit(p) {
+ // if p starts with // on windows, we preserve that
+ // so that UNC paths aren't broken. Otherwise, any number of
+ // / characters are coalesced into one, unless
+ // preserveMultipleSlashes is set to true.
+ if (this.preserveMultipleSlashes) {
+ return p.split('/');
+ }
+ else if (this.isWindows && /^\/\/[^\/]+/.test(p)) {
+ // add an extra '' for the one we lose
+ return ['', ...p.split(/\/+/)];
+ }
+ else {
+ return p.split(/\/+/);
+ }
+ }
+ match(f, partial = this.partial) {
+ this.debug('match', f, this.pattern);
+ // short-circuit in the case of busted things.
+ // comments, etc.
+ if (this.comment) {
+ return false;
+ }
+ if (this.empty) {
+ return f === '';
+ }
+ if (f === '/' && partial) {
+ return true;
+ }
+ const options = this.options;
+ // windows: need to use /, not \
+ if (this.isWindows) {
+ f = f.split('\\').join('/');
+ }
+ // treat the test path as a set of pathparts.
+ const ff = this.slashSplit(f);
+ this.debug(this.pattern, 'split', ff);
+ // just ONE of the pattern sets in this.set needs to match
+ // in order for it to be valid. If negating, then just one
+ // match means that we have failed.
+ // Either way, return on the first hit.
+ const set = this.set;
+ this.debug(this.pattern, 'set', set);
+ // Find the basename of the path by looking for the last non-empty segment
+ let filename = ff[ff.length - 1];
+ if (!filename) {
+ for (let i = ff.length - 2; !filename && i >= 0; i--) {
+ filename = ff[i];
+ }
+ }
+ for (let i = 0; i < set.length; i++) {
+ const pattern = set[i];
+ let file = ff;
+ if (options.matchBase && pattern.length === 1) {
+ file = [filename];
+ }
+ const hit = this.matchOne(file, pattern, partial);
+ if (hit) {
+ if (options.flipNegate) {
+ return true;
+ }
+ return !this.negate;
+ }
+ }
+ // didn't get any hits. this is success if it's a negative
+ // pattern, failure otherwise.
+ if (options.flipNegate) {
+ return false;
+ }
+ return this.negate;
+ }
+ static defaults(def) {
+ return minimatch.defaults(def).Minimatch;
+ }
+}
+/* c8 ignore start */
+export { AST } from './ast.js';
+export { escape } from './escape.js';
+export { unescape } from './unescape.js';
+/* c8 ignore stop */
+minimatch.AST = AST;
+minimatch.Minimatch = Minimatch;
+minimatch.escape = escape;
+minimatch.unescape = unescape;
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/deps/npm/node_modules/cacache/node_modules/mkdirp/dist/mjs/package.json b/deps/npm/node_modules/@tufjs/models/node_modules/minimatch/dist/esm/package.json
similarity index 100%
rename from deps/npm/node_modules/cacache/node_modules/mkdirp/dist/mjs/package.json
rename to deps/npm/node_modules/@tufjs/models/node_modules/minimatch/dist/esm/package.json
diff --git a/deps/npm/node_modules/@tufjs/models/node_modules/minimatch/dist/esm/unescape.js b/deps/npm/node_modules/@tufjs/models/node_modules/minimatch/dist/esm/unescape.js
new file mode 100644
index 00000000000000..0faf9a2b7306f7
--- /dev/null
+++ b/deps/npm/node_modules/@tufjs/models/node_modules/minimatch/dist/esm/unescape.js
@@ -0,0 +1,20 @@
+/**
+ * Un-escape a string that has been escaped with {@link escape}.
+ *
+ * If the {@link windowsPathsNoEscape} option is used, then square-brace
+ * escapes are removed, but not backslash escapes. For example, it will turn
+ * the string `'[*]'` into `*`, but it will not turn `'\\*'` into `'*'`,
+ * becuase `\` is a path separator in `windowsPathsNoEscape` mode.
+ *
+ * When `windowsPathsNoEscape` is not set, then both brace escapes and
+ * backslash escapes are removed.
+ *
+ * Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot be escaped
+ * or unescaped.
+ */
+export const unescape = (s, { windowsPathsNoEscape = false, } = {}) => {
+ return windowsPathsNoEscape
+ ? s.replace(/\[([^\/\\])\]/g, '$1')
+ : s.replace(/((?!\\).|^)\[([^\/\\])\]/g, '$1$2').replace(/\\([^\/])/g, '$1');
+};
+//# sourceMappingURL=unescape.js.map
\ No newline at end of file
diff --git a/deps/npm/node_modules/minipass-fetch/node_modules/minizlib/package.json b/deps/npm/node_modules/@tufjs/models/node_modules/minimatch/package.json
similarity index 56%
rename from deps/npm/node_modules/minipass-fetch/node_modules/minizlib/package.json
rename to deps/npm/node_modules/@tufjs/models/node_modules/minimatch/package.json
index 43cb855e15a5d8..01fc48ecfd6a9f 100644
--- a/deps/npm/node_modules/minipass-fetch/node_modules/minizlib/package.json
+++ b/deps/npm/node_modules/@tufjs/models/node_modules/minimatch/package.json
@@ -1,55 +1,14 @@
{
- "name": "minizlib",
- "version": "3.0.2",
- "description": "A small fast zlib stream built on [minipass](http://npm.im/minipass) and Node.js's zlib binding.",
- "main": "./dist/commonjs/index.js",
- "dependencies": {
- "minipass": "^7.1.2"
- },
- "scripts": {
- "prepare": "tshy",
- "pretest": "npm run prepare",
- "test": "tap",
- "preversion": "npm test",
- "postversion": "npm publish",
- "prepublishOnly": "git push origin --follow-tags",
- "format": "prettier --write . --loglevel warn",
- "typedoc": "typedoc --tsconfig .tshy/esm.json ./src/*.ts"
- },
+ "author": "Isaac Z. Schlueter (http://blog.izs.me)",
+ "name": "minimatch",
+ "description": "a glob matcher in javascript",
+ "version": "9.0.5",
"repository": {
"type": "git",
- "url": "git+https://github.com/isaacs/minizlib.git"
- },
- "keywords": [
- "zlib",
- "gzip",
- "gunzip",
- "deflate",
- "inflate",
- "compression",
- "zip",
- "unzip"
- ],
- "author": "Isaac Z. Schlueter (http://blog.izs.me/)",
- "license": "MIT",
- "devDependencies": {
- "@types/node": "^22.13.14",
- "tap": "^21.1.0",
- "tshy": "^3.0.2",
- "typedoc": "^0.28.1"
- },
- "files": [
- "dist"
- ],
- "engines": {
- "node": ">= 18"
- },
- "tshy": {
- "exports": {
- "./package.json": "./package.json",
- ".": "./src/index.ts"
- }
+ "url": "git://github.com/isaacs/minimatch.git"
},
+ "main": "./dist/commonjs/index.js",
+ "types": "./dist/commonjs/index.d.ts",
"exports": {
"./package.json": "./package.json",
".": {
@@ -63,11 +22,25 @@
}
}
},
- "types": "./dist/commonjs/index.d.ts",
- "type": "module",
+ "files": [
+ "dist"
+ ],
+ "scripts": {
+ "preversion": "npm test",
+ "postversion": "npm publish",
+ "prepublishOnly": "git push origin --follow-tags",
+ "prepare": "tshy",
+ "pretest": "npm run prepare",
+ "presnap": "npm run prepare",
+ "test": "tap",
+ "snap": "tap",
+ "format": "prettier --write . --loglevel warn",
+ "benchmark": "node benchmark/index.js",
+ "typedoc": "typedoc --tsconfig tsconfig-esm.json ./src/*.ts"
+ },
"prettier": {
"semi": false,
- "printWidth": 75,
+ "printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"singleQuote": true,
@@ -76,5 +49,34 @@
"arrowParens": "avoid",
"endOfLine": "lf"
},
- "module": "./dist/esm/index.js"
+ "engines": {
+ "node": ">=16 || 14 >=14.17"
+ },
+ "dependencies": {
+ "brace-expansion": "^2.0.1"
+ },
+ "devDependencies": {
+ "@types/brace-expansion": "^1.1.0",
+ "@types/node": "^18.15.11",
+ "@types/tap": "^15.0.8",
+ "eslint-config-prettier": "^8.6.0",
+ "mkdirp": "1",
+ "prettier": "^2.8.2",
+ "tap": "^18.7.2",
+ "ts-node": "^10.9.1",
+ "tshy": "^1.12.0",
+ "typedoc": "^0.23.21",
+ "typescript": "^4.9.3"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ },
+ "license": "ISC",
+ "tshy": {
+ "exports": {
+ "./package.json": "./package.json",
+ ".": "./src/index.ts"
+ }
+ },
+ "type": "module"
}
diff --git a/deps/npm/node_modules/@tufjs/models/package.json b/deps/npm/node_modules/@tufjs/models/package.json
index 8e5132ddf1079c..dfd60d248118cc 100644
--- a/deps/npm/node_modules/@tufjs/models/package.json
+++ b/deps/npm/node_modules/@tufjs/models/package.json
@@ -1,6 +1,6 @@
{
"name": "@tufjs/models",
- "version": "3.0.1",
+ "version": "4.0.0",
"description": "TUF metadata models",
"main": "dist/index.js",
"types": "dist/index.d.ts",
@@ -8,8 +8,8 @@
"dist"
],
"scripts": {
- "build": "tsc --build",
- "clean": "rm -rf dist && rm tsconfig.tsbuildinfo",
+ "build": "tsc --build tsconfig.build.json",
+ "clean": "rm -rf dist && rm tsconfig.build.tsbuildinfo",
"test": "jest"
},
"repository": {
@@ -32,6 +32,6 @@
"minimatch": "^9.0.5"
},
"engines": {
- "node": "^18.17.0 || >=20.5.0"
+ "node": "^20.17.0 || >=22.9.0"
}
}
diff --git a/deps/npm/node_modules/ansi-styles/index.js b/deps/npm/node_modules/ansi-styles/index.js
index d7bede44b7b6ba..eaa7bed6cb1ed9 100644
--- a/deps/npm/node_modules/ansi-styles/index.js
+++ b/deps/npm/node_modules/ansi-styles/index.js
@@ -109,7 +109,7 @@ function assembleStyles() {
// From https://github.com/Qix-/color-convert/blob/3f0e0d4e92e235796ccb17f6e85c72094a651f49/conversions.js
Object.defineProperties(styles, {
rgbToAnsi256: {
- value: (red, green, blue) => {
+ value(red, green, blue) {
// We use the extended greyscale palette here, with the exception of
// black and white. normal palette only has 4 greyscale shades.
if (red === green && green === blue) {
@@ -132,7 +132,7 @@ function assembleStyles() {
enumerable: false,
},
hexToRgb: {
- value: hex => {
+ value(hex) {
const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
if (!matches) {
return [0, 0, 0];
@@ -161,7 +161,7 @@ function assembleStyles() {
enumerable: false,
},
ansi256ToAnsi: {
- value: code => {
+ value(code) {
if (code < 8) {
return 30 + code;
}
diff --git a/deps/npm/node_modules/ansi-styles/package.json b/deps/npm/node_modules/ansi-styles/package.json
index 6cd3ca5bf95d00..16b508f0f3a047 100644
--- a/deps/npm/node_modules/ansi-styles/package.json
+++ b/deps/npm/node_modules/ansi-styles/package.json
@@ -1,6 +1,6 @@
{
"name": "ansi-styles",
- "version": "6.2.1",
+ "version": "6.2.3",
"description": "ANSI escape codes for styling strings in the terminal",
"license": "MIT",
"repository": "chalk/ansi-styles",
@@ -46,9 +46,9 @@
"text"
],
"devDependencies": {
- "ava": "^3.15.0",
+ "ava": "^6.1.3",
"svg-term-cli": "^2.1.1",
- "tsd": "^0.19.0",
- "xo": "^0.47.0"
+ "tsd": "^0.31.1",
+ "xo": "^0.58.0"
}
}
diff --git a/deps/npm/node_modules/cacache/node_modules/minizlib/LICENSE b/deps/npm/node_modules/cacache/node_modules/minizlib/LICENSE
deleted file mode 100644
index 49f7efe431c9ea..00000000000000
--- a/deps/npm/node_modules/cacache/node_modules/minizlib/LICENSE
+++ /dev/null
@@ -1,26 +0,0 @@
-Minizlib was created by Isaac Z. Schlueter.
-It is a derivative work of the Node.js project.
-
-"""
-Copyright (c) 2017-2023 Isaac Z. Schlueter and Contributors
-Copyright (c) 2017-2023 Node.js contributors. All rights reserved.
-Copyright (c) 2017-2023 Joyent, Inc. and other Node contributors. All rights reserved.
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the "Software"),
-to deal in the Software without restriction, including without limitation
-the rights to use, copy, modify, merge, publish, distribute, sublicense,
-and/or sell copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-"""
diff --git a/deps/npm/node_modules/cacache/node_modules/minizlib/dist/commonjs/index.js b/deps/npm/node_modules/cacache/node_modules/minizlib/dist/commonjs/index.js
deleted file mode 100644
index b4906d27833720..00000000000000
--- a/deps/npm/node_modules/cacache/node_modules/minizlib/dist/commonjs/index.js
+++ /dev/null
@@ -1,392 +0,0 @@
-"use strict";
-var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- var desc = Object.getOwnPropertyDescriptor(m, k);
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
- desc = { enumerable: true, get: function() { return m[k]; } };
- }
- Object.defineProperty(o, k2, desc);
-}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- o[k2] = m[k];
-}));
-var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
- Object.defineProperty(o, "default", { enumerable: true, value: v });
-}) : function(o, v) {
- o["default"] = v;
-});
-var __importStar = (this && this.__importStar) || (function () {
- var ownKeys = function(o) {
- ownKeys = Object.getOwnPropertyNames || function (o) {
- var ar = [];
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
- return ar;
- };
- return ownKeys(o);
- };
- return function (mod) {
- if (mod && mod.__esModule) return mod;
- var result = {};
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
- __setModuleDefault(result, mod);
- return result;
- };
-})();
-var __importDefault = (this && this.__importDefault) || function (mod) {
- return (mod && mod.__esModule) ? mod : { "default": mod };
-};
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.BrotliDecompress = exports.BrotliCompress = exports.Brotli = exports.Unzip = exports.InflateRaw = exports.DeflateRaw = exports.Gunzip = exports.Gzip = exports.Inflate = exports.Deflate = exports.Zlib = exports.ZlibError = exports.constants = void 0;
-const assert_1 = __importDefault(require("assert"));
-const buffer_1 = require("buffer");
-const minipass_1 = require("minipass");
-const realZlib = __importStar(require("zlib"));
-const constants_js_1 = require("./constants.js");
-var constants_js_2 = require("./constants.js");
-Object.defineProperty(exports, "constants", { enumerable: true, get: function () { return constants_js_2.constants; } });
-const OriginalBufferConcat = buffer_1.Buffer.concat;
-const desc = Object.getOwnPropertyDescriptor(buffer_1.Buffer, 'concat');
-const noop = (args) => args;
-const passthroughBufferConcat = desc?.writable === true || desc?.set !== undefined
- ? (makeNoOp) => {
- buffer_1.Buffer.concat = makeNoOp ? noop : OriginalBufferConcat;
- }
- : (_) => { };
-const _superWrite = Symbol('_superWrite');
-class ZlibError extends Error {
- code;
- errno;
- constructor(err) {
- super('zlib: ' + err.message);
- this.code = err.code;
- this.errno = err.errno;
- /* c8 ignore next */
- if (!this.code)
- this.code = 'ZLIB_ERROR';
- this.message = 'zlib: ' + err.message;
- Error.captureStackTrace(this, this.constructor);
- }
- get name() {
- return 'ZlibError';
- }
-}
-exports.ZlibError = ZlibError;
-// the Zlib class they all inherit from
-// This thing manages the queue of requests, and returns
-// true or false if there is anything in the queue when
-// you call the .write() method.
-const _flushFlag = Symbol('flushFlag');
-class ZlibBase extends minipass_1.Minipass {
- #sawError = false;
- #ended = false;
- #flushFlag;
- #finishFlushFlag;
- #fullFlushFlag;
- #handle;
- #onError;
- get sawError() {
- return this.#sawError;
- }
- get handle() {
- return this.#handle;
- }
- /* c8 ignore start */
- get flushFlag() {
- return this.#flushFlag;
- }
- /* c8 ignore stop */
- constructor(opts, mode) {
- if (!opts || typeof opts !== 'object')
- throw new TypeError('invalid options for ZlibBase constructor');
- //@ts-ignore
- super(opts);
- /* c8 ignore start */
- this.#flushFlag = opts.flush ?? 0;
- this.#finishFlushFlag = opts.finishFlush ?? 0;
- this.#fullFlushFlag = opts.fullFlushFlag ?? 0;
- /* c8 ignore stop */
- // this will throw if any options are invalid for the class selected
- try {
- // @types/node doesn't know that it exports the classes, but they're there
- //@ts-ignore
- this.#handle = new realZlib[mode](opts);
- }
- catch (er) {
- // make sure that all errors get decorated properly
- throw new ZlibError(er);
- }
- this.#onError = err => {
- // no sense raising multiple errors, since we abort on the first one.
- if (this.#sawError)
- return;
- this.#sawError = true;
- // there is no way to cleanly recover.
- // continuing only obscures problems.
- this.close();
- this.emit('error', err);
- };
- this.#handle?.on('error', er => this.#onError(new ZlibError(er)));
- this.once('end', () => this.close);
- }
- close() {
- if (this.#handle) {
- this.#handle.close();
- this.#handle = undefined;
- this.emit('close');
- }
- }
- reset() {
- if (!this.#sawError) {
- (0, assert_1.default)(this.#handle, 'zlib binding closed');
- //@ts-ignore
- return this.#handle.reset?.();
- }
- }
- flush(flushFlag) {
- if (this.ended)
- return;
- if (typeof flushFlag !== 'number')
- flushFlag = this.#fullFlushFlag;
- this.write(Object.assign(buffer_1.Buffer.alloc(0), { [_flushFlag]: flushFlag }));
- }
- end(chunk, encoding, cb) {
- /* c8 ignore start */
- if (typeof chunk === 'function') {
- cb = chunk;
- encoding = undefined;
- chunk = undefined;
- }
- if (typeof encoding === 'function') {
- cb = encoding;
- encoding = undefined;
- }
- /* c8 ignore stop */
- if (chunk) {
- if (encoding)
- this.write(chunk, encoding);
- else
- this.write(chunk);
- }
- this.flush(this.#finishFlushFlag);
- this.#ended = true;
- return super.end(cb);
- }
- get ended() {
- return this.#ended;
- }
- // overridden in the gzip classes to do portable writes
- [_superWrite](data) {
- return super.write(data);
- }
- write(chunk, encoding, cb) {
- // process the chunk using the sync process
- // then super.write() all the outputted chunks
- if (typeof encoding === 'function')
- (cb = encoding), (encoding = 'utf8');
- if (typeof chunk === 'string')
- chunk = buffer_1.Buffer.from(chunk, encoding);
- if (this.#sawError)
- return;
- (0, assert_1.default)(this.#handle, 'zlib binding closed');
- // _processChunk tries to .close() the native handle after it's done, so we
- // intercept that by temporarily making it a no-op.
- // diving into the node:zlib internals a bit here
- const nativeHandle = this.#handle
- ._handle;
- const originalNativeClose = nativeHandle.close;
- nativeHandle.close = () => { };
- const originalClose = this.#handle.close;
- this.#handle.close = () => { };
- // It also calls `Buffer.concat()` at the end, which may be convenient
- // for some, but which we are not interested in as it slows us down.
- passthroughBufferConcat(true);
- let result = undefined;
- try {
- const flushFlag = typeof chunk[_flushFlag] === 'number'
- ? chunk[_flushFlag]
- : this.#flushFlag;
- result = this.#handle._processChunk(chunk, flushFlag);
- // if we don't throw, reset it back how it was
- passthroughBufferConcat(false);
- }
- catch (err) {
- // or if we do, put Buffer.concat() back before we emit error
- // Error events call into user code, which may call Buffer.concat()
- passthroughBufferConcat(false);
- this.#onError(new ZlibError(err));
- }
- finally {
- if (this.#handle) {
- // Core zlib resets `_handle` to null after attempting to close the
- // native handle. Our no-op handler prevented actual closure, but we
- // need to restore the `._handle` property.
- ;
- this.#handle._handle =
- nativeHandle;
- nativeHandle.close = originalNativeClose;
- this.#handle.close = originalClose;
- // `_processChunk()` adds an 'error' listener. If we don't remove it
- // after each call, these handlers start piling up.
- this.#handle.removeAllListeners('error');
- // make sure OUR error listener is still attached tho
- }
- }
- if (this.#handle)
- this.#handle.on('error', er => this.#onError(new ZlibError(er)));
- let writeReturn;
- if (result) {
- if (Array.isArray(result) && result.length > 0) {
- const r = result[0];
- // The first buffer is always `handle._outBuffer`, which would be
- // re-used for later invocations; so, we always have to copy that one.
- writeReturn = this[_superWrite](buffer_1.Buffer.from(r));
- for (let i = 1; i < result.length; i++) {
- writeReturn = this[_superWrite](result[i]);
- }
- }
- else {
- // either a single Buffer or an empty array
- writeReturn = this[_superWrite](buffer_1.Buffer.from(result));
- }
- }
- if (cb)
- cb();
- return writeReturn;
- }
-}
-class Zlib extends ZlibBase {
- #level;
- #strategy;
- constructor(opts, mode) {
- opts = opts || {};
- opts.flush = opts.flush || constants_js_1.constants.Z_NO_FLUSH;
- opts.finishFlush = opts.finishFlush || constants_js_1.constants.Z_FINISH;
- opts.fullFlushFlag = constants_js_1.constants.Z_FULL_FLUSH;
- super(opts, mode);
- this.#level = opts.level;
- this.#strategy = opts.strategy;
- }
- params(level, strategy) {
- if (this.sawError)
- return;
- if (!this.handle)
- throw new Error('cannot switch params when binding is closed');
- // no way to test this without also not supporting params at all
- /* c8 ignore start */
- if (!this.handle.params)
- throw new Error('not supported in this implementation');
- /* c8 ignore stop */
- if (this.#level !== level || this.#strategy !== strategy) {
- this.flush(constants_js_1.constants.Z_SYNC_FLUSH);
- (0, assert_1.default)(this.handle, 'zlib binding closed');
- // .params() calls .flush(), but the latter is always async in the
- // core zlib. We override .flush() temporarily to intercept that and
- // flush synchronously.
- const origFlush = this.handle.flush;
- this.handle.flush = (flushFlag, cb) => {
- /* c8 ignore start */
- if (typeof flushFlag === 'function') {
- cb = flushFlag;
- flushFlag = this.flushFlag;
- }
- /* c8 ignore stop */
- this.flush(flushFlag);
- cb?.();
- };
- try {
- ;
- this.handle.params(level, strategy);
- }
- finally {
- this.handle.flush = origFlush;
- }
- /* c8 ignore start */
- if (this.handle) {
- this.#level = level;
- this.#strategy = strategy;
- }
- /* c8 ignore stop */
- }
- }
-}
-exports.Zlib = Zlib;
-// minimal 2-byte header
-class Deflate extends Zlib {
- constructor(opts) {
- super(opts, 'Deflate');
- }
-}
-exports.Deflate = Deflate;
-class Inflate extends Zlib {
- constructor(opts) {
- super(opts, 'Inflate');
- }
-}
-exports.Inflate = Inflate;
-class Gzip extends Zlib {
- #portable;
- constructor(opts) {
- super(opts, 'Gzip');
- this.#portable = opts && !!opts.portable;
- }
- [_superWrite](data) {
- if (!this.#portable)
- return super[_superWrite](data);
- // we'll always get the header emitted in one first chunk
- // overwrite the OS indicator byte with 0xFF
- this.#portable = false;
- data[9] = 255;
- return super[_superWrite](data);
- }
-}
-exports.Gzip = Gzip;
-class Gunzip extends Zlib {
- constructor(opts) {
- super(opts, 'Gunzip');
- }
-}
-exports.Gunzip = Gunzip;
-// raw - no header
-class DeflateRaw extends Zlib {
- constructor(opts) {
- super(opts, 'DeflateRaw');
- }
-}
-exports.DeflateRaw = DeflateRaw;
-class InflateRaw extends Zlib {
- constructor(opts) {
- super(opts, 'InflateRaw');
- }
-}
-exports.InflateRaw = InflateRaw;
-// auto-detect header.
-class Unzip extends Zlib {
- constructor(opts) {
- super(opts, 'Unzip');
- }
-}
-exports.Unzip = Unzip;
-class Brotli extends ZlibBase {
- constructor(opts, mode) {
- opts = opts || {};
- opts.flush = opts.flush || constants_js_1.constants.BROTLI_OPERATION_PROCESS;
- opts.finishFlush =
- opts.finishFlush || constants_js_1.constants.BROTLI_OPERATION_FINISH;
- opts.fullFlushFlag = constants_js_1.constants.BROTLI_OPERATION_FLUSH;
- super(opts, mode);
- }
-}
-exports.Brotli = Brotli;
-class BrotliCompress extends Brotli {
- constructor(opts) {
- super(opts, 'BrotliCompress');
- }
-}
-exports.BrotliCompress = BrotliCompress;
-class BrotliDecompress extends Brotli {
- constructor(opts) {
- super(opts, 'BrotliDecompress');
- }
-}
-exports.BrotliDecompress = BrotliDecompress;
-//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/deps/npm/node_modules/cacache/node_modules/minizlib/dist/esm/index.js b/deps/npm/node_modules/cacache/node_modules/minizlib/dist/esm/index.js
deleted file mode 100644
index f33586a8ab0ec1..00000000000000
--- a/deps/npm/node_modules/cacache/node_modules/minizlib/dist/esm/index.js
+++ /dev/null
@@ -1,340 +0,0 @@
-import assert from 'assert';
-import { Buffer } from 'buffer';
-import { Minipass } from 'minipass';
-import * as realZlib from 'zlib';
-import { constants } from './constants.js';
-export { constants } from './constants.js';
-const OriginalBufferConcat = Buffer.concat;
-const desc = Object.getOwnPropertyDescriptor(Buffer, 'concat');
-const noop = (args) => args;
-const passthroughBufferConcat = desc?.writable === true || desc?.set !== undefined
- ? (makeNoOp) => {
- Buffer.concat = makeNoOp ? noop : OriginalBufferConcat;
- }
- : (_) => { };
-const _superWrite = Symbol('_superWrite');
-export class ZlibError extends Error {
- code;
- errno;
- constructor(err) {
- super('zlib: ' + err.message);
- this.code = err.code;
- this.errno = err.errno;
- /* c8 ignore next */
- if (!this.code)
- this.code = 'ZLIB_ERROR';
- this.message = 'zlib: ' + err.message;
- Error.captureStackTrace(this, this.constructor);
- }
- get name() {
- return 'ZlibError';
- }
-}
-// the Zlib class they all inherit from
-// This thing manages the queue of requests, and returns
-// true or false if there is anything in the queue when
-// you call the .write() method.
-const _flushFlag = Symbol('flushFlag');
-class ZlibBase extends Minipass {
- #sawError = false;
- #ended = false;
- #flushFlag;
- #finishFlushFlag;
- #fullFlushFlag;
- #handle;
- #onError;
- get sawError() {
- return this.#sawError;
- }
- get handle() {
- return this.#handle;
- }
- /* c8 ignore start */
- get flushFlag() {
- return this.#flushFlag;
- }
- /* c8 ignore stop */
- constructor(opts, mode) {
- if (!opts || typeof opts !== 'object')
- throw new TypeError('invalid options for ZlibBase constructor');
- //@ts-ignore
- super(opts);
- /* c8 ignore start */
- this.#flushFlag = opts.flush ?? 0;
- this.#finishFlushFlag = opts.finishFlush ?? 0;
- this.#fullFlushFlag = opts.fullFlushFlag ?? 0;
- /* c8 ignore stop */
- // this will throw if any options are invalid for the class selected
- try {
- // @types/node doesn't know that it exports the classes, but they're there
- //@ts-ignore
- this.#handle = new realZlib[mode](opts);
- }
- catch (er) {
- // make sure that all errors get decorated properly
- throw new ZlibError(er);
- }
- this.#onError = err => {
- // no sense raising multiple errors, since we abort on the first one.
- if (this.#sawError)
- return;
- this.#sawError = true;
- // there is no way to cleanly recover.
- // continuing only obscures problems.
- this.close();
- this.emit('error', err);
- };
- this.#handle?.on('error', er => this.#onError(new ZlibError(er)));
- this.once('end', () => this.close);
- }
- close() {
- if (this.#handle) {
- this.#handle.close();
- this.#handle = undefined;
- this.emit('close');
- }
- }
- reset() {
- if (!this.#sawError) {
- assert(this.#handle, 'zlib binding closed');
- //@ts-ignore
- return this.#handle.reset?.();
- }
- }
- flush(flushFlag) {
- if (this.ended)
- return;
- if (typeof flushFlag !== 'number')
- flushFlag = this.#fullFlushFlag;
- this.write(Object.assign(Buffer.alloc(0), { [_flushFlag]: flushFlag }));
- }
- end(chunk, encoding, cb) {
- /* c8 ignore start */
- if (typeof chunk === 'function') {
- cb = chunk;
- encoding = undefined;
- chunk = undefined;
- }
- if (typeof encoding === 'function') {
- cb = encoding;
- encoding = undefined;
- }
- /* c8 ignore stop */
- if (chunk) {
- if (encoding)
- this.write(chunk, encoding);
- else
- this.write(chunk);
- }
- this.flush(this.#finishFlushFlag);
- this.#ended = true;
- return super.end(cb);
- }
- get ended() {
- return this.#ended;
- }
- // overridden in the gzip classes to do portable writes
- [_superWrite](data) {
- return super.write(data);
- }
- write(chunk, encoding, cb) {
- // process the chunk using the sync process
- // then super.write() all the outputted chunks
- if (typeof encoding === 'function')
- (cb = encoding), (encoding = 'utf8');
- if (typeof chunk === 'string')
- chunk = Buffer.from(chunk, encoding);
- if (this.#sawError)
- return;
- assert(this.#handle, 'zlib binding closed');
- // _processChunk tries to .close() the native handle after it's done, so we
- // intercept that by temporarily making it a no-op.
- // diving into the node:zlib internals a bit here
- const nativeHandle = this.#handle
- ._handle;
- const originalNativeClose = nativeHandle.close;
- nativeHandle.close = () => { };
- const originalClose = this.#handle.close;
- this.#handle.close = () => { };
- // It also calls `Buffer.concat()` at the end, which may be convenient
- // for some, but which we are not interested in as it slows us down.
- passthroughBufferConcat(true);
- let result = undefined;
- try {
- const flushFlag = typeof chunk[_flushFlag] === 'number'
- ? chunk[_flushFlag]
- : this.#flushFlag;
- result = this.#handle._processChunk(chunk, flushFlag);
- // if we don't throw, reset it back how it was
- passthroughBufferConcat(false);
- }
- catch (err) {
- // or if we do, put Buffer.concat() back before we emit error
- // Error events call into user code, which may call Buffer.concat()
- passthroughBufferConcat(false);
- this.#onError(new ZlibError(err));
- }
- finally {
- if (this.#handle) {
- // Core zlib resets `_handle` to null after attempting to close the
- // native handle. Our no-op handler prevented actual closure, but we
- // need to restore the `._handle` property.
- ;
- this.#handle._handle =
- nativeHandle;
- nativeHandle.close = originalNativeClose;
- this.#handle.close = originalClose;
- // `_processChunk()` adds an 'error' listener. If we don't remove it
- // after each call, these handlers start piling up.
- this.#handle.removeAllListeners('error');
- // make sure OUR error listener is still attached tho
- }
- }
- if (this.#handle)
- this.#handle.on('error', er => this.#onError(new ZlibError(er)));
- let writeReturn;
- if (result) {
- if (Array.isArray(result) && result.length > 0) {
- const r = result[0];
- // The first buffer is always `handle._outBuffer`, which would be
- // re-used for later invocations; so, we always have to copy that one.
- writeReturn = this[_superWrite](Buffer.from(r));
- for (let i = 1; i < result.length; i++) {
- writeReturn = this[_superWrite](result[i]);
- }
- }
- else {
- // either a single Buffer or an empty array
- writeReturn = this[_superWrite](Buffer.from(result));
- }
- }
- if (cb)
- cb();
- return writeReturn;
- }
-}
-export class Zlib extends ZlibBase {
- #level;
- #strategy;
- constructor(opts, mode) {
- opts = opts || {};
- opts.flush = opts.flush || constants.Z_NO_FLUSH;
- opts.finishFlush = opts.finishFlush || constants.Z_FINISH;
- opts.fullFlushFlag = constants.Z_FULL_FLUSH;
- super(opts, mode);
- this.#level = opts.level;
- this.#strategy = opts.strategy;
- }
- params(level, strategy) {
- if (this.sawError)
- return;
- if (!this.handle)
- throw new Error('cannot switch params when binding is closed');
- // no way to test this without also not supporting params at all
- /* c8 ignore start */
- if (!this.handle.params)
- throw new Error('not supported in this implementation');
- /* c8 ignore stop */
- if (this.#level !== level || this.#strategy !== strategy) {
- this.flush(constants.Z_SYNC_FLUSH);
- assert(this.handle, 'zlib binding closed');
- // .params() calls .flush(), but the latter is always async in the
- // core zlib. We override .flush() temporarily to intercept that and
- // flush synchronously.
- const origFlush = this.handle.flush;
- this.handle.flush = (flushFlag, cb) => {
- /* c8 ignore start */
- if (typeof flushFlag === 'function') {
- cb = flushFlag;
- flushFlag = this.flushFlag;
- }
- /* c8 ignore stop */
- this.flush(flushFlag);
- cb?.();
- };
- try {
- ;
- this.handle.params(level, strategy);
- }
- finally {
- this.handle.flush = origFlush;
- }
- /* c8 ignore start */
- if (this.handle) {
- this.#level = level;
- this.#strategy = strategy;
- }
- /* c8 ignore stop */
- }
- }
-}
-// minimal 2-byte header
-export class Deflate extends Zlib {
- constructor(opts) {
- super(opts, 'Deflate');
- }
-}
-export class Inflate extends Zlib {
- constructor(opts) {
- super(opts, 'Inflate');
- }
-}
-export class Gzip extends Zlib {
- #portable;
- constructor(opts) {
- super(opts, 'Gzip');
- this.#portable = opts && !!opts.portable;
- }
- [_superWrite](data) {
- if (!this.#portable)
- return super[_superWrite](data);
- // we'll always get the header emitted in one first chunk
- // overwrite the OS indicator byte with 0xFF
- this.#portable = false;
- data[9] = 255;
- return super[_superWrite](data);
- }
-}
-export class Gunzip extends Zlib {
- constructor(opts) {
- super(opts, 'Gunzip');
- }
-}
-// raw - no header
-export class DeflateRaw extends Zlib {
- constructor(opts) {
- super(opts, 'DeflateRaw');
- }
-}
-export class InflateRaw extends Zlib {
- constructor(opts) {
- super(opts, 'InflateRaw');
- }
-}
-// auto-detect header.
-export class Unzip extends Zlib {
- constructor(opts) {
- super(opts, 'Unzip');
- }
-}
-export class Brotli extends ZlibBase {
- constructor(opts, mode) {
- opts = opts || {};
- opts.flush = opts.flush || constants.BROTLI_OPERATION_PROCESS;
- opts.finishFlush =
- opts.finishFlush || constants.BROTLI_OPERATION_FINISH;
- opts.fullFlushFlag = constants.BROTLI_OPERATION_FLUSH;
- super(opts, mode);
- }
-}
-export class BrotliCompress extends Brotli {
- constructor(opts) {
- super(opts, 'BrotliCompress');
- }
-}
-export class BrotliDecompress extends Brotli {
- constructor(opts) {
- super(opts, 'BrotliDecompress');
- }
-}
-//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/deps/npm/node_modules/cacache/node_modules/mkdirp/LICENSE b/deps/npm/node_modules/cacache/node_modules/mkdirp/LICENSE
deleted file mode 100644
index 0a034db7a73b5d..00000000000000
--- a/deps/npm/node_modules/cacache/node_modules/mkdirp/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-Copyright (c) 2011-2023 James Halliday (mail@substack.net) and Isaac Z. Schlueter (i@izs.me)
-
-This project is free software released under the MIT license:
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/deps/npm/node_modules/cacache/node_modules/mkdirp/dist/cjs/package.json b/deps/npm/node_modules/cacache/node_modules/mkdirp/dist/cjs/package.json
deleted file mode 100644
index 9d04a66e16cd93..00000000000000
--- a/deps/npm/node_modules/cacache/node_modules/mkdirp/dist/cjs/package.json
+++ /dev/null
@@ -1,91 +0,0 @@
-{
- "name": "mkdirp",
- "description": "Recursively mkdir, like `mkdir -p`",
- "version": "3.0.1",
- "keywords": [
- "mkdir",
- "directory",
- "make dir",
- "make",
- "dir",
- "recursive",
- "native"
- ],
- "bin": "./dist/cjs/src/bin.js",
- "main": "./dist/cjs/src/index.js",
- "module": "./dist/mjs/index.js",
- "types": "./dist/mjs/index.d.ts",
- "exports": {
- ".": {
- "import": {
- "types": "./dist/mjs/index.d.ts",
- "default": "./dist/mjs/index.js"
- },
- "require": {
- "types": "./dist/cjs/src/index.d.ts",
- "default": "./dist/cjs/src/index.js"
- }
- }
- },
- "files": [
- "dist"
- ],
- "scripts": {
- "preversion": "npm test",
- "postversion": "npm publish",
- "prepublishOnly": "git push origin --follow-tags",
- "preprepare": "rm -rf dist",
- "prepare": "tsc -p tsconfig.json && tsc -p tsconfig-esm.json",
- "postprepare": "bash fixup.sh",
- "pretest": "npm run prepare",
- "presnap": "npm run prepare",
- "test": "c8 tap",
- "snap": "c8 tap",
- "format": "prettier --write . --loglevel warn",
- "benchmark": "node benchmark/index.js",
- "typedoc": "typedoc --tsconfig tsconfig-esm.json ./src/*.ts"
- },
- "prettier": {
- "semi": false,
- "printWidth": 80,
- "tabWidth": 2,
- "useTabs": false,
- "singleQuote": true,
- "jsxSingleQuote": false,
- "bracketSameLine": true,
- "arrowParens": "avoid",
- "endOfLine": "lf"
- },
- "devDependencies": {
- "@types/brace-expansion": "^1.1.0",
- "@types/node": "^18.11.9",
- "@types/tap": "^15.0.7",
- "c8": "^7.12.0",
- "eslint-config-prettier": "^8.6.0",
- "prettier": "^2.8.2",
- "tap": "^16.3.3",
- "ts-node": "^10.9.1",
- "typedoc": "^0.23.21",
- "typescript": "^4.9.3"
- },
- "tap": {
- "coverage": false,
- "node-arg": [
- "--no-warnings",
- "--loader",
- "ts-node/esm"
- ],
- "ts": false
- },
- "funding": {
- "url": "https://github.com/sponsors/isaacs"
- },
- "repository": {
- "type": "git",
- "url": "https://github.com/isaacs/node-mkdirp.git"
- },
- "license": "MIT",
- "engines": {
- "node": ">=10"
- }
-}
diff --git a/deps/npm/node_modules/cacache/node_modules/mkdirp/dist/cjs/src/bin.d.ts b/deps/npm/node_modules/cacache/node_modules/mkdirp/dist/cjs/src/bin.d.ts
deleted file mode 100644
index 34e005228653c8..00000000000000
--- a/deps/npm/node_modules/cacache/node_modules/mkdirp/dist/cjs/src/bin.d.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env node
-export {};
-//# sourceMappingURL=bin.d.ts.map
\ No newline at end of file
diff --git a/deps/npm/node_modules/cacache/node_modules/mkdirp/dist/cjs/src/bin.d.ts.map b/deps/npm/node_modules/cacache/node_modules/mkdirp/dist/cjs/src/bin.d.ts.map
deleted file mode 100644
index c10c656ec75109..00000000000000
--- a/deps/npm/node_modules/cacache/node_modules/mkdirp/dist/cjs/src/bin.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"bin.d.ts","sourceRoot":"","sources":["../../../src/bin.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/deps/npm/node_modules/cacache/node_modules/mkdirp/dist/cjs/src/bin.js b/deps/npm/node_modules/cacache/node_modules/mkdirp/dist/cjs/src/bin.js
deleted file mode 100755
index 757aae1fd96cb2..00000000000000
--- a/deps/npm/node_modules/cacache/node_modules/mkdirp/dist/cjs/src/bin.js
+++ /dev/null
@@ -1,80 +0,0 @@
-#!/usr/bin/env node
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-const package_json_1 = require("../package.json");
-const usage = () => `
-usage: mkdirp [DIR1,DIR2..] {OPTIONS}
-
- Create each supplied directory including any necessary parent directories
- that don't yet exist.
-
- If the directory already exists, do nothing.
-
-OPTIONS are:
-
- -m If a directory needs to be created, set the mode as an octal
- --mode= permission string.
-
- -v --version Print the mkdirp version number
-
- -h --help Print this helpful banner
-
- -p --print Print the first directories created for each path provided
-
- --manual Use manual implementation, even if native is available
-`;
-const dirs = [];
-const opts = {};
-let doPrint = false;
-let dashdash = false;
-let manual = false;
-for (const arg of process.argv.slice(2)) {
- if (dashdash)
- dirs.push(arg);
- else if (arg === '--')
- dashdash = true;
- else if (arg === '--manual')
- manual = true;
- else if (/^-h/.test(arg) || /^--help/.test(arg)) {
- console.log(usage());
- process.exit(0);
- }
- else if (arg === '-v' || arg === '--version') {
- console.log(package_json_1.version);
- process.exit(0);
- }
- else if (arg === '-p' || arg === '--print') {
- doPrint = true;
- }
- else if (/^-m/.test(arg) || /^--mode=/.test(arg)) {
- // these don't get covered in CI, but work locally
- // weird because the tests below show as passing in the output.
- /* c8 ignore start */
- const mode = parseInt(arg.replace(/^(-m|--mode=)/, ''), 8);
- if (isNaN(mode)) {
- console.error(`invalid mode argument: ${arg}\nMust be an octal number.`);
- process.exit(1);
- }
- /* c8 ignore stop */
- opts.mode = mode;
- }
- else
- dirs.push(arg);
-}
-const index_js_1 = require("./index.js");
-const impl = manual ? index_js_1.mkdirp.manual : index_js_1.mkdirp;
-if (dirs.length === 0) {
- console.error(usage());
-}
-// these don't get covered in CI, but work locally
-/* c8 ignore start */
-Promise.all(dirs.map(dir => impl(dir, opts)))
- .then(made => (doPrint ? made.forEach(m => m && console.log(m)) : null))
- .catch(er => {
- console.error(er.message);
- if (er.code)
- console.error(' code: ' + er.code);
- process.exit(1);
-});
-/* c8 ignore stop */
-//# sourceMappingURL=bin.js.map
\ No newline at end of file
diff --git a/deps/npm/node_modules/cacache/node_modules/mkdirp/dist/cjs/src/bin.js.map b/deps/npm/node_modules/cacache/node_modules/mkdirp/dist/cjs/src/bin.js.map
deleted file mode 100644
index d99295301b5fa7..00000000000000
--- a/deps/npm/node_modules/cacache/node_modules/mkdirp/dist/cjs/src/bin.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"bin.js","sourceRoot":"","sources":["../../../src/bin.ts"],"names":[],"mappings":";;;AAEA,kDAAyC;AAGzC,MAAM,KAAK,GAAG,GAAG,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;CAoBnB,CAAA;AAED,MAAM,IAAI,GAAa,EAAE,CAAA;AACzB,MAAM,IAAI,GAAkB,EAAE,CAAA;AAC9B,IAAI,OAAO,GAAY,KAAK,CAAA;AAC5B,IAAI,QAAQ,GAAG,KAAK,CAAA;AACpB,IAAI,MAAM,GAAG,KAAK,CAAA;AAClB,KAAK,MAAM,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;IACvC,IAAI,QAAQ;QAAE,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;SACvB,IAAI,GAAG,KAAK,IAAI;QAAE,QAAQ,GAAG,IAAI,CAAA;SACjC,IAAI,GAAG,KAAK,UAAU;QAAE,MAAM,GAAG,IAAI,CAAA;SACrC,IAAI,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;QAC/C,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,CAAA;QACpB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;KAChB;SAAM,IAAI,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,WAAW,EAAE;QAC9C,OAAO,CAAC,GAAG,CAAC,sBAAO,CAAC,CAAA;QACpB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;KAChB;SAAM,IAAI,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,SAAS,EAAE;QAC5C,OAAO,GAAG,IAAI,CAAA;KACf;SAAM,IAAI,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;QAClD,kDAAkD;QAClD,+DAA+D;QAC/D,qBAAqB;QACrB,MAAM,IAAI,GAAG,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,eAAe,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;QAC1D,IAAI,KAAK,CAAC,IAAI,CAAC,EAAE;YACf,OAAO,CAAC,KAAK,CAAC,0BAA0B,GAAG,4BAA4B,CAAC,CAAA;YACxE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;SAChB;QACD,oBAAoB;QACpB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;KACjB;;QAAM,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;CACtB;AAED,yCAAmC;AACnC,MAAM,IAAI,GAAG,MAAM,CAAC,CAAC,CAAC,iBAAM,CAAC,MAAM,CAAC,CAAC,CAAC,iBAAM,CAAA;AAC5C,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;IACrB,OAAO,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,CAAA;CACvB;AAED,kDAAkD;AAClD,qBAAqB;AACrB,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC;KAC1C,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;KACvE,KAAK,CAAC,EAAE,CAAC,EAAE;IACV,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,OAAO,CAAC,CAAA;IACzB,IAAI,EAAE,CAAC,IAAI;QAAE,OAAO,CAAC,KAAK,CAAC,UAAU,GAAG,EAAE,CAAC,IAAI,CAAC,CAAA;IAChD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AACjB,CAAC,CAAC,CAAA;AACJ,oBAAoB","sourcesContent":["#!/usr/bin/env node\n\nimport { version } from '../package.json'\nimport { MkdirpOptions } from './opts-arg.js'\n\nconst usage = () => `\nusage: mkdirp [DIR1,DIR2..] {OPTIONS}\n\n Create each supplied directory including any necessary parent directories\n that don't yet exist.\n\n If the directory already exists, do nothing.\n\nOPTIONS are:\n\n -m If a directory needs to be created, set the mode as an octal\n --mode= permission string.\n\n -v --version Print the mkdirp version number\n\n -h --help Print this helpful banner\n\n -p --print Print the first directories created for each path provided\n\n --manual Use manual implementation, even if native is available\n`\n\nconst dirs: string[] = []\nconst opts: MkdirpOptions = {}\nlet doPrint: boolean = false\nlet dashdash = false\nlet manual = false\nfor (const arg of process.argv.slice(2)) {\n if (dashdash) dirs.push(arg)\n else if (arg === '--') dashdash = true\n else if (arg === '--manual') manual = true\n else if (/^-h/.test(arg) || /^--help/.test(arg)) {\n console.log(usage())\n process.exit(0)\n } else if (arg === '-v' || arg === '--version') {\n console.log(version)\n process.exit(0)\n } else if (arg === '-p' || arg === '--print') {\n doPrint = true\n } else if (/^-m/.test(arg) || /^--mode=/.test(arg)) {\n // these don't get covered in CI, but work locally\n // weird because the tests below show as passing in the output.\n /* c8 ignore start */\n const mode = parseInt(arg.replace(/^(-m|--mode=)/, ''), 8)\n if (isNaN(mode)) {\n console.error(`invalid mode argument: ${arg}\\nMust be an octal number.`)\n process.exit(1)\n }\n /* c8 ignore stop */\n opts.mode = mode\n } else dirs.push(arg)\n}\n\nimport { mkdirp } from './index.js'\nconst impl = manual ? mkdirp.manual : mkdirp\nif (dirs.length === 0) {\n console.error(usage())\n}\n\n// these don't get covered in CI, but work locally\n/* c8 ignore start */\nPromise.all(dirs.map(dir => impl(dir, opts)))\n .then(made => (doPrint ? made.forEach(m => m && console.log(m)) : null))\n .catch(er => {\n console.error(er.message)\n if (er.code) console.error(' code: ' + er.code)\n process.exit(1)\n })\n/* c8 ignore stop */\n"]}
\ No newline at end of file
diff --git a/deps/npm/node_modules/cacache/node_modules/mkdirp/dist/cjs/src/find-made.d.ts b/deps/npm/node_modules/cacache/node_modules/mkdirp/dist/cjs/src/find-made.d.ts
deleted file mode 100644
index e47794b3bb72a3..00000000000000
--- a/deps/npm/node_modules/cacache/node_modules/mkdirp/dist/cjs/src/find-made.d.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-import { MkdirpOptionsResolved } from './opts-arg.js';
-export declare const findMade: (opts: MkdirpOptionsResolved, parent: string, path?: string) => Promise;
-export declare const findMadeSync: (opts: MkdirpOptionsResolved, parent: string, path?: string) => undefined | string;
-//# sourceMappingURL=find-made.d.ts.map
\ No newline at end of file
diff --git a/deps/npm/node_modules/cacache/node_modules/mkdirp/dist/cjs/src/find-made.d.ts.map b/deps/npm/node_modules/cacache/node_modules/mkdirp/dist/cjs/src/find-made.d.ts.map
deleted file mode 100644
index 00d5d1a4dbefdf..00000000000000
--- a/deps/npm/node_modules/cacache/node_modules/mkdirp/dist/cjs/src/find-made.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"find-made.d.ts","sourceRoot":"","sources":["../../../src/find-made.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAA;AAErD,eAAO,MAAM,QAAQ,SACb,qBAAqB,UACnB,MAAM,SACP,MAAM,KACZ,QAAQ,SAAS,GAAG,MAAM,CAe5B,CAAA;AAED,eAAO,MAAM,YAAY,SACjB,qBAAqB,UACnB,MAAM,SACP,MAAM,KACZ,SAAS,GAAG,MAad,CAAA"}
\ No newline at end of file
diff --git a/deps/npm/node_modules/cacache/node_modules/mkdirp/dist/cjs/src/find-made.js b/deps/npm/node_modules/cacache/node_modules/mkdirp/dist/cjs/src/find-made.js
deleted file mode 100644
index e831ef27cadc1d..00000000000000
--- a/deps/npm/node_modules/cacache/node_modules/mkdirp/dist/cjs/src/find-made.js
+++ /dev/null
@@ -1,35 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.findMadeSync = exports.findMade = void 0;
-const path_1 = require("path");
-const findMade = async (opts, parent, path) => {
- // we never want the 'made' return value to be a root directory
- if (path === parent) {
- return;
- }
- return opts.statAsync(parent).then(st => (st.isDirectory() ? path : undefined), // will fail later
- // will fail later
- er => {
- const fer = er;
- return fer && fer.code === 'ENOENT'
- ? (0, exports.findMade)(opts, (0, path_1.dirname)(parent), parent)
- : undefined;
- });
-};
-exports.findMade = findMade;
-const findMadeSync = (opts, parent, path) => {
- if (path === parent) {
- return undefined;
- }
- try {
- return opts.statSync(parent).isDirectory() ? path : undefined;
- }
- catch (er) {
- const fer = er;
- return fer && fer.code === 'ENOENT'
- ? (0, exports.findMadeSync)(opts, (0, path_1.dirname)(parent), parent)
- : undefined;
- }
-};
-exports.findMadeSync = findMadeSync;
-//# sourceMappingURL=find-made.js.map
\ No newline at end of file
diff --git a/deps/npm/node_modules/cacache/node_modules/mkdirp/dist/cjs/src/find-made.js.map b/deps/npm/node_modules/cacache/node_modules/mkdirp/dist/cjs/src/find-made.js.map
deleted file mode 100644
index 30a0d66398878d..00000000000000
--- a/deps/npm/node_modules/cacache/node_modules/mkdirp/dist/cjs/src/find-made.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"find-made.js","sourceRoot":"","sources":["../../../src/find-made.ts"],"names":[],"mappings":";;;AAAA,+BAA8B;AAGvB,MAAM,QAAQ,GAAG,KAAK,EAC3B,IAA2B,EAC3B,MAAc,EACd,IAAa,EACgB,EAAE;IAC/B,+DAA+D;IAC/D,IAAI,IAAI,KAAK,MAAM,EAAE;QACnB,OAAM;KACP;IAED,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,IAAI,CAChC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE,kBAAkB;IAC/D,AAD6C,kBAAkB;IAC/D,EAAE,CAAC,EAAE;QACH,MAAM,GAAG,GAAG,EAA2B,CAAA;QACvC,OAAO,GAAG,IAAI,GAAG,CAAC,IAAI,KAAK,QAAQ;YACjC,CAAC,CAAC,IAAA,gBAAQ,EAAC,IAAI,EAAE,IAAA,cAAO,EAAC,MAAM,CAAC,EAAE,MAAM,CAAC;YACzC,CAAC,CAAC,SAAS,CAAA;IACf,CAAC,CACF,CAAA;AACH,CAAC,CAAA;AAnBY,QAAA,QAAQ,YAmBpB;AAEM,MAAM,YAAY,GAAG,CAC1B,IAA2B,EAC3B,MAAc,EACd,IAAa,EACO,EAAE;IACtB,IAAI,IAAI,KAAK,MAAM,EAAE;QACnB,OAAO,SAAS,CAAA;KACjB;IAED,IAAI;QACF,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAA;KAC9D;IAAC,OAAO,EAAE,EAAE;QACX,MAAM,GAAG,GAAG,EAA2B,CAAA;QACvC,OAAO,GAAG,IAAI,GAAG,CAAC,IAAI,KAAK,QAAQ;YACjC,CAAC,CAAC,IAAA,oBAAY,EAAC,IAAI,EAAE,IAAA,cAAO,EAAC,MAAM,CAAC,EAAE,MAAM,CAAC;YAC7C,CAAC,CAAC,SAAS,CAAA;KACd;AACH,CAAC,CAAA;AAjBY,QAAA,YAAY,gBAiBxB","sourcesContent":["import { dirname } from 'path'\nimport { MkdirpOptionsResolved } from './opts-arg.js'\n\nexport const findMade = async (\n opts: MkdirpOptionsResolved,\n parent: string,\n path?: string\n): Promise => {\n // we never want the 'made' return value to be a root directory\n if (path === parent) {\n return\n }\n\n return opts.statAsync(parent).then(\n st => (st.isDirectory() ? path : undefined), // will fail later\n er => {\n const fer = er as NodeJS.ErrnoException\n return fer && fer.code === 'ENOENT'\n ? findMade(opts, dirname(parent), parent)\n : undefined\n }\n )\n}\n\nexport const findMadeSync = (\n opts: MkdirpOptionsResolved,\n parent: string,\n path?: string\n): undefined | string => {\n if (path === parent) {\n return undefined\n }\n\n try {\n return opts.statSync(parent).isDirectory() ? path : undefined\n } catch (er) {\n const fer = er as NodeJS.ErrnoException\n return fer && fer.code === 'ENOENT'\n ? findMadeSync(opts, dirname(parent), parent)\n : undefined\n }\n}\n"]}
\ No newline at end of file
diff --git a/deps/npm/node_modules/cacache/node_modules/mkdirp/dist/cjs/src/index.d.ts b/deps/npm/node_modules/cacache/node_modules/mkdirp/dist/cjs/src/index.d.ts
deleted file mode 100644
index fc9e43b3a45de1..00000000000000
--- a/deps/npm/node_modules/cacache/node_modules/mkdirp/dist/cjs/src/index.d.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-import { MkdirpOptions } from './opts-arg.js';
-export { mkdirpManual, mkdirpManualSync } from './mkdirp-manual.js';
-export { mkdirpNative, mkdirpNativeSync } from './mkdirp-native.js';
-export { useNative, useNativeSync } from './use-native.js';
-export declare const mkdirpSync: (path: string, opts?: MkdirpOptions) => string | void;
-export declare const sync: (path: string, opts?: MkdirpOptions) => string | void;
-export declare const manual: ((path: string, options?: MkdirpOptions | undefined, made?: string | void | undefined) => Promise) & {
- sync: (path: string, options?: MkdirpOptions | undefined, made?: string | void | undefined) => string | void | undefined;
-};
-export declare const manualSync: (path: string, options?: MkdirpOptions | undefined, made?: string | void | undefined) => string | void | undefined;
-export declare const native: ((path: string, options?: MkdirpOptions | undefined) => Promise) & {
- sync: (path: string, options?: MkdirpOptions | undefined) => string | void | undefined;
-};
-export declare const nativeSync: (path: string, options?: MkdirpOptions | undefined) => string | void | undefined;
-export declare const mkdirp: ((path: string, opts?: MkdirpOptions) => Promise) & {
- mkdirpSync: (path: string, opts?: MkdirpOptions) => string | void;
- mkdirpNative: ((path: string, options?: MkdirpOptions | undefined) => Promise) & {
- sync: (path: string, options?: MkdirpOptions | undefined) => string | void | undefined;
- };
- mkdirpNativeSync: (path: string, options?: MkdirpOptions | undefined) => string | void | undefined;
- mkdirpManual: ((path: string, options?: MkdirpOptions | undefined, made?: string | void | undefined) => Promise) & {
- sync: (path: string, options?: MkdirpOptions | undefined, made?: string | void | undefined) => string | void | undefined;
- };
- mkdirpManualSync: (path: string, options?: MkdirpOptions | undefined, made?: string | void | undefined) => string | void | undefined;
- sync: (path: string, opts?: MkdirpOptions) => string | void;
- native: ((path: string, options?: MkdirpOptions | undefined) => Promise) & {
- sync: (path: string, options?: MkdirpOptions | undefined) => string | void | undefined;
- };
- nativeSync: (path: string, options?: MkdirpOptions | undefined) => string | void | undefined;
- manual: ((path: string, options?: MkdirpOptions | undefined, made?: string | void | undefined) => Promise) & {
- sync: (path: string, options?: MkdirpOptions | undefined, made?: string | void | undefined) => string | void | undefined;
- };
- manualSync: (path: string, options?: MkdirpOptions | undefined, made?: string | void | undefined) => string | void | undefined;
- useNative: ((opts?: MkdirpOptions | undefined) => boolean) & {
- sync: (opts?: MkdirpOptions | undefined) => boolean;
- };
- useNativeSync: (opts?: MkdirpOptions | undefined) => boolean;
-};
-//# sourceMappingURL=index.d.ts.map
\ No newline at end of file
diff --git a/deps/npm/node_modules/cacache/node_modules/mkdirp/dist/cjs/src/index.d.ts.map b/deps/npm/node_modules/cacache/node_modules/mkdirp/dist/cjs/src/index.d.ts.map
deleted file mode 100644
index 0e915bbc9a0c7a..00000000000000
--- a/deps/npm/node_modules/cacache/node_modules/mkdirp/dist/cjs/src/index.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAW,MAAM,eAAe,CAAA;AAItD,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACnE,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACnE,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAG1D,eAAO,MAAM,UAAU,SAAU,MAAM,SAAS,aAAa,kBAM5D,CAAA;AAED,eAAO,MAAM,IAAI,SARgB,MAAM,SAAS,aAAa,kBAQ/B,CAAA;AAC9B,eAAO,MAAM,MAAM;;CAAe,CAAA;AAClC,eAAO,MAAM,UAAU,oHAAmB,CAAA;AAC1C,eAAO,MAAM,MAAM;;CAAe,CAAA;AAClC,eAAO,MAAM,UAAU,kFAAmB,CAAA;AAC1C,eAAO,MAAM,MAAM,UACJ,MAAM,SAAS,aAAa;uBAdV,MAAM,SAAS,aAAa;;;;;;;;;iBAA5B,MAAM,SAAS,aAAa;;;;;;;;;;;;;CAoC5D,CAAA"}
\ No newline at end of file
diff --git a/deps/npm/node_modules/cacache/node_modules/mkdirp/dist/cjs/src/index.js b/deps/npm/node_modules/cacache/node_modules/mkdirp/dist/cjs/src/index.js
deleted file mode 100644
index ab9dc62cddda36..00000000000000
--- a/deps/npm/node_modules/cacache/node_modules/mkdirp/dist/cjs/src/index.js
+++ /dev/null
@@ -1,53 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.mkdirp = exports.nativeSync = exports.native = exports.manualSync = exports.manual = exports.sync = exports.mkdirpSync = exports.useNativeSync = exports.useNative = exports.mkdirpNativeSync = exports.mkdirpNative = exports.mkdirpManualSync = exports.mkdirpManual = void 0;
-const mkdirp_manual_js_1 = require("./mkdirp-manual.js");
-const mkdirp_native_js_1 = require("./mkdirp-native.js");
-const opts_arg_js_1 = require("./opts-arg.js");
-const path_arg_js_1 = require("./path-arg.js");
-const use_native_js_1 = require("./use-native.js");
-/* c8 ignore start */
-var mkdirp_manual_js_2 = require("./mkdirp-manual.js");
-Object.defineProperty(exports, "mkdirpManual", { enumerable: true, get: function () { return mkdirp_manual_js_2.mkdirpManual; } });
-Object.defineProperty(exports, "mkdirpManualSync", { enumerable: true, get: function () { return mkdirp_manual_js_2.mkdirpManualSync; } });
-var mkdirp_native_js_2 = require("./mkdirp-native.js");
-Object.defineProperty(exports, "mkdirpNative", { enumerable: true, get: function () { return mkdirp_native_js_2.mkdirpNative; } });
-Object.defineProperty(exports, "mkdirpNativeSync", { enumerable: true, get: function () { return mkdirp_native_js_2.mkdirpNativeSync; } });
-var use_native_js_2 = require("./use-native.js");
-Object.defineProperty(exports, "useNative", { enumerable: true, get: function () { return use_native_js_2.useNative; } });
-Object.defineProperty(exports, "useNativeSync", { enumerable: true, get: function () { return use_native_js_2.useNativeSync; } });
-/* c8 ignore stop */
-const mkdirpSync = (path, opts) => {
- path = (0, path_arg_js_1.pathArg)(path);
- const resolved = (0, opts_arg_js_1.optsArg)(opts);
- return (0, use_native_js_1.useNativeSync)(resolved)
- ? (0, mkdirp_native_js_1.mkdirpNativeSync)(path, resolved)
- : (0, mkdirp_manual_js_1.mkdirpManualSync)(path, resolved);
-};
-exports.mkdirpSync = mkdirpSync;
-exports.sync = exports.mkdirpSync;
-exports.manual = mkdirp_manual_js_1.mkdirpManual;
-exports.manualSync = mkdirp_manual_js_1.mkdirpManualSync;
-exports.native = mkdirp_native_js_1.mkdirpNative;
-exports.nativeSync = mkdirp_native_js_1.mkdirpNativeSync;
-exports.mkdirp = Object.assign(async (path, opts) => {
- path = (0, path_arg_js_1.pathArg)(path);
- const resolved = (0, opts_arg_js_1.optsArg)(opts);
- return (0, use_native_js_1.useNative)(resolved)
- ? (0, mkdirp_native_js_1.mkdirpNative)(path, resolved)
- : (0, mkdirp_manual_js_1.mkdirpManual)(path, resolved);
-}, {
- mkdirpSync: exports.mkdirpSync,
- mkdirpNative: mkdirp_native_js_1.mkdirpNative,
- mkdirpNativeSync: mkdirp_native_js_1.mkdirpNativeSync,
- mkdirpManual: mkdirp_manual_js_1.mkdirpManual,
- mkdirpManualSync: mkdirp_manual_js_1.mkdirpManualSync,
- sync: exports.mkdirpSync,
- native: mkdirp_native_js_1.mkdirpNative,
- nativeSync: mkdirp_native_js_1.mkdirpNativeSync,
- manual: mkdirp_manual_js_1.mkdirpManual,
- manualSync: mkdirp_manual_js_1.mkdirpManualSync,
- useNative: use_native_js_1.useNative,
- useNativeSync: use_native_js_1.useNativeSync,
-});
-//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/deps/npm/node_modules/cacache/node_modules/mkdirp/dist/cjs/src/index.js.map b/deps/npm/node_modules/cacache/node_modules/mkdirp/dist/cjs/src/index.js.map
deleted file mode 100644
index fdb572677a98ef..00000000000000
--- a/deps/npm/node_modules/cacache/node_modules/mkdirp/dist/cjs/src/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":";;;AAAA,yDAAmE;AACnE,yDAAmE;AACnE,+CAAsD;AACtD,+CAAuC;AACvC,mDAA0D;AAC1D,qBAAqB;AACrB,uDAAmE;AAA1D,gHAAA,YAAY,OAAA;AAAE,oHAAA,gBAAgB,OAAA;AACvC,uDAAmE;AAA1D,gHAAA,YAAY,OAAA;AAAE,oHAAA,gBAAgB,OAAA;AACvC,iDAA0D;AAAjD,0GAAA,SAAS,OAAA;AAAE,8GAAA,aAAa,OAAA;AACjC,oBAAoB;AAEb,MAAM,UAAU,GAAG,CAAC,IAAY,EAAE,IAAoB,EAAE,EAAE;IAC/D,IAAI,GAAG,IAAA,qBAAO,EAAC,IAAI,CAAC,CAAA;IACpB,MAAM,QAAQ,GAAG,IAAA,qBAAO,EAAC,IAAI,CAAC,CAAA;IAC9B,OAAO,IAAA,6BAAa,EAAC,QAAQ,CAAC;QAC5B,CAAC,CAAC,IAAA,mCAAgB,EAAC,IAAI,EAAE,QAAQ,CAAC;QAClC,CAAC,CAAC,IAAA,mCAAgB,EAAC,IAAI,EAAE,QAAQ,CAAC,CAAA;AACtC,CAAC,CAAA;AANY,QAAA,UAAU,cAMtB;AAEY,QAAA,IAAI,GAAG,kBAAU,CAAA;AACjB,QAAA,MAAM,GAAG,+BAAY,CAAA;AACrB,QAAA,UAAU,GAAG,mCAAgB,CAAA;AAC7B,QAAA,MAAM,GAAG,+BAAY,CAAA;AACrB,QAAA,UAAU,GAAG,mCAAgB,CAAA;AAC7B,QAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CACjC,KAAK,EAAE,IAAY,EAAE,IAAoB,EAAE,EAAE;IAC3C,IAAI,GAAG,IAAA,qBAAO,EAAC,IAAI,CAAC,CAAA;IACpB,MAAM,QAAQ,GAAG,IAAA,qBAAO,EAAC,IAAI,CAAC,CAAA;IAC9B,OAAO,IAAA,yBAAS,EAAC,QAAQ,CAAC;QACxB,CAAC,CAAC,IAAA,+BAAY,EAAC,IAAI,EAAE,QAAQ,CAAC;QAC9B,CAAC,CAAC,IAAA,+BAAY,EAAC,IAAI,EAAE,QAAQ,CAAC,CAAA;AAClC,CAAC,EACD;IACE,UAAU,EAAV,kBAAU;IACV,YAAY,EAAZ,+BAAY;IACZ,gBAAgB,EAAhB,mCAAgB;IAChB,YAAY,EAAZ,+BAAY;IACZ,gBAAgB,EAAhB,mCAAgB;IAEhB,IAAI,EAAE,kBAAU;IAChB,MAAM,EAAE,+BAAY;IACpB,UAAU,EAAE,mCAAgB;IAC5B,MAAM,EAAE,+BAAY;IACpB,UAAU,EAAE,mCAAgB;IAC5B,SAAS,EAAT,yBAAS;IACT,aAAa,EAAb,6BAAa;CACd,CACF,CAAA","sourcesContent":["import { mkdirpManual, mkdirpManualSync } from './mkdirp-manual.js'\nimport { mkdirpNative, mkdirpNativeSync } from './mkdirp-native.js'\nimport { MkdirpOptions, optsArg } from './opts-arg.js'\nimport { pathArg } from './path-arg.js'\nimport { useNative, useNativeSync } from './use-native.js'\n/* c8 ignore start */\nexport { mkdirpManual, mkdirpManualSync } from './mkdirp-manual.js'\nexport { mkdirpNative, mkdirpNativeSync } from './mkdirp-native.js'\nexport { useNative, useNativeSync } from './use-native.js'\n/* c8 ignore stop */\n\nexport const mkdirpSync = (path: string, opts?: MkdirpOptions) => {\n path = pathArg(path)\n const resolved = optsArg(opts)\n return useNativeSync(resolved)\n ? mkdirpNativeSync(path, resolved)\n : mkdirpManualSync(path, resolved)\n}\n\nexport const sync = mkdirpSync\nexport const manual = mkdirpManual\nexport const manualSync = mkdirpManualSync\nexport const native = mkdirpNative\nexport const nativeSync = mkdirpNativeSync\nexport const mkdirp = Object.assign(\n async (path: string, opts?: MkdirpOptions) => {\n path = pathArg(path)\n const resolved = optsArg(opts)\n return useNative(resolved)\n ? mkdirpNative(path, resolved)\n : mkdirpManual(path, resolved)\n },\n {\n mkdirpSync,\n mkdirpNative,\n mkdirpNativeSync,\n mkdirpManual,\n mkdirpManualSync,\n\n sync: mkdirpSync,\n native: mkdirpNative,\n nativeSync: mkdirpNativeSync,\n manual: mkdirpManual,\n manualSync: mkdirpManualSync,\n useNative,\n useNativeSync,\n }\n)\n"]}
\ No newline at end of file
diff --git a/deps/npm/node_modules/cacache/node_modules/mkdirp/dist/cjs/src/mkdirp-manual.d.ts b/deps/npm/node_modules/cacache/node_modules/mkdirp/dist/cjs/src/mkdirp-manual.d.ts
deleted file mode 100644
index e49cdf9f1bd122..00000000000000
--- a/deps/npm/node_modules/cacache/node_modules/mkdirp/dist/cjs/src/mkdirp-manual.d.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-import { MkdirpOptions } from './opts-arg.js';
-export declare const mkdirpManualSync: (path: string, options?: MkdirpOptions, made?: string | undefined | void) => string | undefined | void;
-export declare const mkdirpManual: ((path: string, options?: MkdirpOptions, made?: string | undefined | void) => Promise) & {
- sync: (path: string, options?: MkdirpOptions, made?: string | undefined | void) => string | undefined | void;
-};
-//# sourceMappingURL=mkdirp-manual.d.ts.map
\ No newline at end of file
diff --git a/deps/npm/node_modules/cacache/node_modules/mkdirp/dist/cjs/src/mkdirp-manual.d.ts.map b/deps/npm/node_modules/cacache/node_modules/mkdirp/dist/cjs/src/mkdirp-manual.d.ts.map
deleted file mode 100644
index 9301bab1ffb35b..00000000000000
--- a/deps/npm/node_modules/cacache/node_modules/mkdirp/dist/cjs/src/mkdirp-manual.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"mkdirp-manual.d.ts","sourceRoot":"","sources":["../../../src/mkdirp-manual.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAW,MAAM,eAAe,CAAA;AAEtD,eAAO,MAAM,gBAAgB,SACrB,MAAM,YACF,aAAa,SAChB,MAAM,GAAG,SAAS,GAAG,IAAI,KAC/B,MAAM,GAAG,SAAS,GAAG,IAmCvB,CAAA;AAED,eAAO,MAAM,YAAY,UAEf,MAAM,YACF,aAAa,SAChB,MAAM,GAAG,SAAS,GAAG,IAAI,KAC/B,QAAQ,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC;iBA7C/B,MAAM,YACF,aAAa,SAChB,MAAM,GAAG,SAAS,GAAG,IAAI,KAC/B,MAAM,GAAG,SAAS,GAAG,IAAI;CAqF3B,CAAA"}
\ No newline at end of file
diff --git a/deps/npm/node_modules/cacache/node_modules/mkdirp/dist/cjs/src/mkdirp-manual.js b/deps/npm/node_modules/cacache/node_modules/mkdirp/dist/cjs/src/mkdirp-manual.js
deleted file mode 100644
index d9bd1d8bb5a49b..00000000000000
--- a/deps/npm/node_modules/cacache/node_modules/mkdirp/dist/cjs/src/mkdirp-manual.js
+++ /dev/null
@@ -1,79 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.mkdirpManual = exports.mkdirpManualSync = void 0;
-const path_1 = require("path");
-const opts_arg_js_1 = require("./opts-arg.js");
-const mkdirpManualSync = (path, options, made) => {
- const parent = (0, path_1.dirname)(path);
- const opts = { ...(0, opts_arg_js_1.optsArg)(options), recursive: false };
- if (parent === path) {
- try {
- return opts.mkdirSync(path, opts);
- }
- catch (er) {
- // swallowed by recursive implementation on posix systems
- // any other error is a failure
- const fer = er;
- if (fer && fer.code !== 'EISDIR') {
- throw er;
- }
- return;
- }
- }
- try {
- opts.mkdirSync(path, opts);
- return made || path;
- }
- catch (er) {
- const fer = er;
- if (fer && fer.code === 'ENOENT') {
- return (0, exports.mkdirpManualSync)(path, opts, (0, exports.mkdirpManualSync)(parent, opts, made));
- }
- if (fer && fer.code !== 'EEXIST' && fer && fer.code !== 'EROFS') {
- throw er;
- }
- try {
- if (!opts.statSync(path).isDirectory())
- throw er;
- }
- catch (_) {
- throw er;
- }
- }
-};
-exports.mkdirpManualSync = mkdirpManualSync;
-exports.mkdirpManual = Object.assign(async (path, options, made) => {
- const opts = (0, opts_arg_js_1.optsArg)(options);
- opts.recursive = false;
- const parent = (0, path_1.dirname)(path);
- if (parent === path) {
- return opts.mkdirAsync(path, opts).catch(er => {
- // swallowed by recursive implementation on posix systems
- // any other error is a failure
- const fer = er;
- if (fer && fer.code !== 'EISDIR') {
- throw er;
- }
- });
- }
- return opts.mkdirAsync(path, opts).then(() => made || path, async (er) => {
- const fer = er;
- if (fer && fer.code === 'ENOENT') {
- return (0, exports.mkdirpManual)(parent, opts).then((made) => (0, exports.mkdirpManual)(path, opts, made));
- }
- if (fer && fer.code !== 'EEXIST' && fer.code !== 'EROFS') {
- throw er;
- }
- return opts.statAsync(path).then(st => {
- if (st.isDirectory()) {
- return made;
- }
- else {
- throw er;
- }
- }, () => {
- throw er;
- });
- });
-}, { sync: exports.mkdirpManualSync });
-//# sourceMappingURL=mkdirp-manual.js.map
\ No newline at end of file
diff --git a/deps/npm/node_modules/cacache/node_modules/mkdirp/dist/cjs/src/mkdirp-manual.js.map b/deps/npm/node_modules/cacache/node_modules/mkdirp/dist/cjs/src/mkdirp-manual.js.map
deleted file mode 100644
index ff7ba24dca32ad..00000000000000
--- a/deps/npm/node_modules/cacache/node_modules/mkdirp/dist/cjs/src/mkdirp-manual.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"mkdirp-manual.js","sourceRoot":"","sources":["../../../src/mkdirp-manual.ts"],"names":[],"mappings":";;;AAAA,+BAA8B;AAC9B,+CAAsD;AAE/C,MAAM,gBAAgB,GAAG,CAC9B,IAAY,EACZ,OAAuB,EACvB,IAAgC,EACL,EAAE;IAC7B,MAAM,MAAM,GAAG,IAAA,cAAO,EAAC,IAAI,CAAC,CAAA;IAC5B,MAAM,IAAI,GAAG,EAAE,GAAG,IAAA,qBAAO,EAAC,OAAO,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAA;IAEtD,IAAI,MAAM,KAAK,IAAI,EAAE;QACnB,IAAI;YACF,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;SAClC;QAAC,OAAO,EAAE,EAAE;YACX,yDAAyD;YACzD,+BAA+B;YAC/B,MAAM,GAAG,GAAG,EAA2B,CAAA;YACvC,IAAI,GAAG,IAAI,GAAG,CAAC,IAAI,KAAK,QAAQ,EAAE;gBAChC,MAAM,EAAE,CAAA;aACT;YACD,OAAM;SACP;KACF;IAED,IAAI;QACF,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;QAC1B,OAAO,IAAI,IAAI,IAAI,CAAA;KACpB;IAAC,OAAO,EAAE,EAAE;QACX,MAAM,GAAG,GAAG,EAA2B,CAAA;QACvC,IAAI,GAAG,IAAI,GAAG,CAAC,IAAI,KAAK,QAAQ,EAAE;YAChC,OAAO,IAAA,wBAAgB,EAAC,IAAI,EAAE,IAAI,EAAE,IAAA,wBAAgB,EAAC,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAA;SAC1E;QACD,IAAI,GAAG,IAAI,GAAG,CAAC,IAAI,KAAK,QAAQ,IAAI,GAAG,IAAI,GAAG,CAAC,IAAI,KAAK,OAAO,EAAE;YAC/D,MAAM,EAAE,CAAA;SACT;QACD,IAAI;YACF,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE;gBAAE,MAAM,EAAE,CAAA;SACjD;QAAC,OAAO,CAAC,EAAE;YACV,MAAM,EAAE,CAAA;SACT;KACF;AACH,CAAC,CAAA;AAvCY,QAAA,gBAAgB,oBAuC5B;AAEY,QAAA,YAAY,GAAG,MAAM,CAAC,MAAM,CACvC,KAAK,EACH,IAAY,EACZ,OAAuB,EACvB,IAAgC,EACI,EAAE;IACtC,MAAM,IAAI,GAAG,IAAA,qBAAO,EAAC,OAAO,CAAC,CAAA;IAC7B,IAAI,CAAC,SAAS,GAAG,KAAK,CAAA;IACtB,MAAM,MAAM,GAAG,IAAA,cAAO,EAAC,IAAI,CAAC,CAAA;IAC5B,IAAI,MAAM,KAAK,IAAI,EAAE;QACnB,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE;YAC5C,yDAAyD;YACzD,+BAA+B;YAC/B,MAAM,GAAG,GAAG,EAA2B,CAAA;YACvC,IAAI,GAAG,IAAI,GAAG,CAAC,IAAI,KAAK,QAAQ,EAAE;gBAChC,MAAM,EAAE,CAAA;aACT;QACH,CAAC,CAAC,CAAA;KACH;IAED,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,IAAI,CACrC,GAAG,EAAE,CAAC,IAAI,IAAI,IAAI,EAClB,KAAK,EAAC,EAAE,EAAC,EAAE;QACT,MAAM,GAAG,GAAG,EAA2B,CAAA;QACvC,IAAI,GAAG,IAAI,GAAG,CAAC,IAAI,KAAK,QAAQ,EAAE;YAChC,OAAO,IAAA,oBAAY,EAAC,MAAM,EAAE,IAAI,CAAC,CAAC,IAAI,CACpC,CAAC,IAAgC,EAAE,EAAE,CAAC,IAAA,oBAAY,EAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CACrE,CAAA;SACF;QACD,IAAI,GAAG,IAAI,GAAG,CAAC,IAAI,KAAK,QAAQ,IAAI,GAAG,CAAC,IAAI,KAAK,OAAO,EAAE;YACxD,MAAM,EAAE,CAAA;SACT;QACD,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,IAAI,CAC9B,EAAE,CAAC,EAAE;YACH,IAAI,EAAE,CAAC,WAAW,EAAE,EAAE;gBACpB,OAAO,IAAI,CAAA;aACZ;iBAAM;gBACL,MAAM,EAAE,CAAA;aACT;QACH,CAAC,EACD,GAAG,EAAE;YACH,MAAM,EAAE,CAAA;QACV,CAAC,CACF,CAAA;IACH,CAAC,CACF,CAAA;AACH,CAAC,EACD,EAAE,IAAI,EAAE,wBAAgB,EAAE,CAC3B,CAAA","sourcesContent":["import { dirname } from 'path'\nimport { MkdirpOptions, optsArg } from './opts-arg.js'\n\nexport const mkdirpManualSync = (\n path: string,\n options?: MkdirpOptions,\n made?: string | undefined | void\n): string | undefined | void => {\n const parent = dirname(path)\n const opts = { ...optsArg(options), recursive: false }\n\n if (parent === path) {\n try {\n return opts.mkdirSync(path, opts)\n } catch (er) {\n // swallowed by recursive implementation on posix systems\n // any other error is a failure\n const fer = er as NodeJS.ErrnoException\n if (fer && fer.code !== 'EISDIR') {\n throw er\n }\n return\n }\n }\n\n try {\n opts.mkdirSync(path, opts)\n return made || path\n } catch (er) {\n const fer = er as NodeJS.ErrnoException\n if (fer && fer.code === 'ENOENT') {\n return mkdirpManualSync(path, opts, mkdirpManualSync(parent, opts, made))\n }\n if (fer && fer.code !== 'EEXIST' && fer && fer.code !== 'EROFS') {\n throw er\n }\n try {\n if (!opts.statSync(path).isDirectory()) throw er\n } catch (_) {\n throw er\n }\n }\n}\n\nexport const mkdirpManual = Object.assign(\n async (\n path: string,\n options?: MkdirpOptions,\n made?: string | undefined | void\n ): Promise