FIN INIT
This commit is contained in:
2
node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts
generated
vendored
Normal file
2
node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
export declare const assertValidPattern: (pattern: any) => void;
|
||||
//# sourceMappingURL=assert-valid-pattern.d.ts.map
|
1
node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts.map
generated
vendored
Normal file
1
node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"assert-valid-pattern.d.ts","sourceRoot":"","sources":["../../src/assert-valid-pattern.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,kBAAkB,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,IAUlD,CAAA"}
|
10
node_modules/minimatch/dist/esm/assert-valid-pattern.js
generated
vendored
Normal file
10
node_modules/minimatch/dist/esm/assert-valid-pattern.js
generated
vendored
Normal file
@ -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
|
1
node_modules/minimatch/dist/esm/assert-valid-pattern.js.map
generated
vendored
Normal file
1
node_modules/minimatch/dist/esm/assert-valid-pattern.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"assert-valid-pattern.js","sourceRoot":"","sources":["../../src/assert-valid-pattern.ts"],"names":[],"mappings":"AAAA,MAAM,kBAAkB,GAAG,IAAI,GAAG,EAAE,CAAA;AACpC,MAAM,CAAC,MAAM,kBAAkB,GAA2B,CACxD,OAAY,EACe,EAAE;IAC7B,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;QAC/B,MAAM,IAAI,SAAS,CAAC,iBAAiB,CAAC,CAAA;KACvC;IAED,IAAI,OAAO,CAAC,MAAM,GAAG,kBAAkB,EAAE;QACvC,MAAM,IAAI,SAAS,CAAC,qBAAqB,CAAC,CAAA;KAC3C;AACH,CAAC,CAAA","sourcesContent":["const MAX_PATTERN_LENGTH = 1024 * 64\nexport const assertValidPattern: (pattern: any) => void = (\n pattern: any\n): asserts pattern is string => {\n if (typeof pattern !== 'string') {\n throw new TypeError('invalid pattern')\n }\n\n if (pattern.length > MAX_PATTERN_LENGTH) {\n throw new TypeError('pattern is too long')\n }\n}\n"]}
|
20
node_modules/minimatch/dist/esm/ast.d.ts
generated
vendored
Normal file
20
node_modules/minimatch/dist/esm/ast.d.ts
generated
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
import { MinimatchOptions, MMRegExp } from './index.js';
|
||||
export type ExtglobType = '!' | '?' | '+' | '*' | '@';
|
||||
export declare class AST {
|
||||
#private;
|
||||
type: ExtglobType | null;
|
||||
constructor(type: ExtglobType | null, parent?: AST, options?: MinimatchOptions);
|
||||
get hasMagic(): boolean | undefined;
|
||||
toString(): string;
|
||||
push(...parts: (string | AST)[]): void;
|
||||
toJSON(): any[];
|
||||
isStart(): boolean;
|
||||
isEnd(): boolean;
|
||||
copyIn(part: AST | string): void;
|
||||
clone(parent: AST): AST;
|
||||
static fromGlob(pattern: string, options?: MinimatchOptions): AST;
|
||||
toMMPattern(): MMRegExp | string;
|
||||
get options(): MinimatchOptions;
|
||||
toRegExpSource(allowDot?: boolean): [re: string, body: string, hasMagic: boolean, uflag: boolean];
|
||||
}
|
||||
//# sourceMappingURL=ast.d.ts.map
|
1
node_modules/minimatch/dist/esm/ast.d.ts.map
generated
vendored
Normal file
1
node_modules/minimatch/dist/esm/ast.d.ts.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"ast.d.ts","sourceRoot":"","sources":["../../src/ast.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAwCvD,MAAM,MAAM,WAAW,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAA;AAkCrD,qBAAa,GAAG;;IACd,IAAI,EAAE,WAAW,GAAG,IAAI,CAAA;gBAiBtB,IAAI,EAAE,WAAW,GAAG,IAAI,EACxB,MAAM,CAAC,EAAE,GAAG,EACZ,OAAO,GAAE,gBAAqB;IAahC,IAAI,QAAQ,IAAI,OAAO,GAAG,SAAS,CAUlC;IAGD,QAAQ,IAAI,MAAM;IA+ClB,IAAI,CAAC,GAAG,KAAK,EAAE,CAAC,MAAM,GAAG,GAAG,CAAC,EAAE;IAY/B,MAAM;IAgBN,OAAO,IAAI,OAAO;IAgBlB,KAAK,IAAI,OAAO;IAYhB,MAAM,CAAC,IAAI,EAAE,GAAG,GAAG,MAAM;IAKzB,KAAK,CAAC,MAAM,EAAE,GAAG;IAsIjB,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,gBAAqB;IAQ/D,WAAW,IAAI,QAAQ,GAAG,MAAM;IA2BhC,IAAI,OAAO,qBAEV;IAuED,cAAc,CACZ,QAAQ,CAAC,EAAE,OAAO,GACjB,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC;CAiMjE"}
|
588
node_modules/minimatch/dist/esm/ast.js
generated
vendored
Normal file
588
node_modules/minimatch/dist/esm/ast.js
generated
vendored
Normal file
@ -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
|
1
node_modules/minimatch/dist/esm/ast.js.map
generated
vendored
Normal file
1
node_modules/minimatch/dist/esm/ast.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
8
node_modules/minimatch/dist/esm/brace-expressions.d.ts
generated
vendored
Normal file
8
node_modules/minimatch/dist/esm/brace-expressions.d.ts
generated
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
export type ParseClassResult = [
|
||||
src: string,
|
||||
uFlag: boolean,
|
||||
consumed: number,
|
||||
hasMagic: boolean
|
||||
];
|
||||
export declare const parseClass: (glob: string, position: number) => ParseClassResult;
|
||||
//# sourceMappingURL=brace-expressions.d.ts.map
|
1
node_modules/minimatch/dist/esm/brace-expressions.d.ts.map
generated
vendored
Normal file
1
node_modules/minimatch/dist/esm/brace-expressions.d.ts.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"brace-expressions.d.ts","sourceRoot":"","sources":["../../src/brace-expressions.ts"],"names":[],"mappings":"AA+BA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,GAAG,EAAE,MAAM;IACX,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,MAAM;IAChB,QAAQ,EAAE,OAAO;CAClB,CAAA;AAQD,eAAO,MAAM,UAAU,SACf,MAAM,YACF,MAAM,qBA8HjB,CAAA"}
|
148
node_modules/minimatch/dist/esm/brace-expressions.js
generated
vendored
Normal file
148
node_modules/minimatch/dist/esm/brace-expressions.js
generated
vendored
Normal file
@ -0,0 +1,148 @@
|
||||
// translate the various posix character classes into unicode properties
|
||||
// this works across all unicode locales
|
||||
// { <posix class>: [<translation>, /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<more...>] 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
|
1
node_modules/minimatch/dist/esm/brace-expressions.js.map
generated
vendored
Normal file
1
node_modules/minimatch/dist/esm/brace-expressions.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
12
node_modules/minimatch/dist/esm/escape.d.ts
generated
vendored
Normal file
12
node_modules/minimatch/dist/esm/escape.d.ts
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
import { MinimatchOptions } from './index.js';
|
||||
/**
|
||||
* 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 declare const escape: (s: string, { windowsPathsNoEscape, }?: Pick<MinimatchOptions, 'windowsPathsNoEscape'>) => string;
|
||||
//# sourceMappingURL=escape.d.ts.map
|
1
node_modules/minimatch/dist/esm/escape.d.ts.map
generated
vendored
Normal file
1
node_modules/minimatch/dist/esm/escape.d.ts.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"escape.d.ts","sourceRoot":"","sources":["../../src/escape.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAC7C;;;;;;;;GAQG;AACH,eAAO,MAAM,MAAM,MACd,MAAM,8BAGN,KAAK,gBAAgB,EAAE,sBAAsB,CAAC,WAQlD,CAAA"}
|
18
node_modules/minimatch/dist/esm/escape.js
generated
vendored
Normal file
18
node_modules/minimatch/dist/esm/escape.js
generated
vendored
Normal file
@ -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
|
1
node_modules/minimatch/dist/esm/escape.js.map
generated
vendored
Normal file
1
node_modules/minimatch/dist/esm/escape.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"escape.js","sourceRoot":"","sources":["../../src/escape.ts"],"names":[],"mappings":"AACA;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,CACpB,CAAS,EACT,EACE,oBAAoB,GAAG,KAAK,MACsB,EAAE,EACtD,EAAE;IACF,wDAAwD;IACxD,4DAA4D;IAC5D,sDAAsD;IACtD,OAAO,oBAAoB;QACzB,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC;QACjC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,cAAc,EAAE,MAAM,CAAC,CAAA;AACvC,CAAC,CAAA","sourcesContent":["import { MinimatchOptions } from './index.js'\n/**\n * Escape all magic characters in a glob pattern.\n *\n * If the {@link windowsPathsNoEscape | GlobOptions.windowsPathsNoEscape}\n * option is used, then characters are escaped by wrapping in `[]`, because\n * a magic character wrapped in a character class can only be satisfied by\n * that exact character. In this mode, `\\` is _not_ escaped, because it is\n * not interpreted as a magic character, but instead as a path separator.\n */\nexport const escape = (\n s: string,\n {\n windowsPathsNoEscape = false,\n }: Pick<MinimatchOptions, 'windowsPathsNoEscape'> = {}\n) => {\n // don't need to escape +@! because we escape the parens\n // that make those magic, and escaping ! as [!] isn't valid,\n // because [!]] is a valid glob class meaning not ']'.\n return windowsPathsNoEscape\n ? s.replace(/[?*()[\\]]/g, '[$&]')\n : s.replace(/[?*()[\\]\\\\]/g, '\\\\$&')\n}\n"]}
|
94
node_modules/minimatch/dist/esm/index.d.ts
generated
vendored
Normal file
94
node_modules/minimatch/dist/esm/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,94 @@
|
||||
import { AST } from './ast.js';
|
||||
type Platform = 'aix' | 'android' | 'darwin' | 'freebsd' | 'haiku' | 'linux' | 'openbsd' | 'sunos' | 'win32' | 'cygwin' | 'netbsd';
|
||||
export interface MinimatchOptions {
|
||||
nobrace?: boolean;
|
||||
nocomment?: boolean;
|
||||
nonegate?: boolean;
|
||||
debug?: boolean;
|
||||
noglobstar?: boolean;
|
||||
noext?: boolean;
|
||||
nonull?: boolean;
|
||||
windowsPathsNoEscape?: boolean;
|
||||
allowWindowsEscape?: boolean;
|
||||
partial?: boolean;
|
||||
dot?: boolean;
|
||||
nocase?: boolean;
|
||||
nocaseMagicOnly?: boolean;
|
||||
magicalBraces?: boolean;
|
||||
matchBase?: boolean;
|
||||
flipNegate?: boolean;
|
||||
preserveMultipleSlashes?: boolean;
|
||||
optimizationLevel?: number;
|
||||
platform?: Platform;
|
||||
windowsNoMagicRoot?: boolean;
|
||||
}
|
||||
export declare const minimatch: {
|
||||
(p: string, pattern: string, options?: MinimatchOptions): boolean;
|
||||
sep: Sep;
|
||||
GLOBSTAR: typeof GLOBSTAR;
|
||||
filter: (pattern: string, options?: MinimatchOptions) => (p: string) => boolean;
|
||||
defaults: (def: MinimatchOptions) => typeof minimatch;
|
||||
braceExpand: (pattern: string, options?: MinimatchOptions) => string[];
|
||||
makeRe: (pattern: string, options?: MinimatchOptions) => false | MMRegExp;
|
||||
match: (list: string[], pattern: string, options?: MinimatchOptions) => string[];
|
||||
AST: typeof AST;
|
||||
Minimatch: typeof Minimatch;
|
||||
escape: (s: string, { windowsPathsNoEscape, }?: Pick<MinimatchOptions, "windowsPathsNoEscape">) => string;
|
||||
unescape: (s: string, { windowsPathsNoEscape, }?: Pick<MinimatchOptions, "windowsPathsNoEscape">) => string;
|
||||
};
|
||||
type Sep = '\\' | '/';
|
||||
export declare const sep: Sep;
|
||||
export declare const GLOBSTAR: unique symbol;
|
||||
export declare const filter: (pattern: string, options?: MinimatchOptions) => (p: string) => boolean;
|
||||
export declare const defaults: (def: MinimatchOptions) => typeof minimatch;
|
||||
export declare const braceExpand: (pattern: string, options?: MinimatchOptions) => string[];
|
||||
export declare const makeRe: (pattern: string, options?: MinimatchOptions) => false | MMRegExp;
|
||||
export declare const match: (list: string[], pattern: string, options?: MinimatchOptions) => string[];
|
||||
export type MMRegExp = RegExp & {
|
||||
_src?: string;
|
||||
_glob?: string;
|
||||
};
|
||||
export type ParseReturnFiltered = string | MMRegExp | typeof GLOBSTAR;
|
||||
export type ParseReturn = ParseReturnFiltered | false;
|
||||
export declare class Minimatch {
|
||||
options: MinimatchOptions;
|
||||
set: ParseReturnFiltered[][];
|
||||
pattern: string;
|
||||
windowsPathsNoEscape: boolean;
|
||||
nonegate: boolean;
|
||||
negate: boolean;
|
||||
comment: boolean;
|
||||
empty: boolean;
|
||||
preserveMultipleSlashes: boolean;
|
||||
partial: boolean;
|
||||
globSet: string[];
|
||||
globParts: string[][];
|
||||
nocase: boolean;
|
||||
isWindows: boolean;
|
||||
platform: Platform;
|
||||
windowsNoMagicRoot: boolean;
|
||||
regexp: false | null | MMRegExp;
|
||||
constructor(pattern: string, options?: MinimatchOptions);
|
||||
hasMagic(): boolean;
|
||||
debug(..._: any[]): void;
|
||||
make(): void;
|
||||
preprocess(globParts: string[][]): string[][];
|
||||
adjascentGlobstarOptimize(globParts: string[][]): string[][];
|
||||
levelOneOptimize(globParts: string[][]): string[][];
|
||||
levelTwoFileOptimize(parts: string | string[]): string[];
|
||||
firstPhasePreProcess(globParts: string[][]): string[][];
|
||||
secondPhasePreProcess(globParts: string[][]): string[][];
|
||||
partsMatch(a: string[], b: string[], emptyGSMatch?: boolean): false | string[];
|
||||
parseNegate(): void;
|
||||
matchOne(file: string[], pattern: ParseReturn[], partial?: boolean): boolean;
|
||||
braceExpand(): string[];
|
||||
parse(pattern: string): ParseReturn;
|
||||
makeRe(): false | MMRegExp;
|
||||
slashSplit(p: string): string[];
|
||||
match(f: string, partial?: boolean): boolean;
|
||||
static defaults(def: MinimatchOptions): typeof Minimatch;
|
||||
}
|
||||
export { AST } from './ast.js';
|
||||
export { escape } from './escape.js';
|
||||
export { unescape } from './unescape.js';
|
||||
//# sourceMappingURL=index.d.ts.map
|
1
node_modules/minimatch/dist/esm/index.d.ts.map
generated
vendored
Normal file
1
node_modules/minimatch/dist/esm/index.d.ts.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"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"}
|
1001
node_modules/minimatch/dist/esm/index.js
generated
vendored
Normal file
1001
node_modules/minimatch/dist/esm/index.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
node_modules/minimatch/dist/esm/index.js.map
generated
vendored
Normal file
1
node_modules/minimatch/dist/esm/index.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
3
node_modules/minimatch/dist/esm/package.json
generated
vendored
Normal file
3
node_modules/minimatch/dist/esm/package.json
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"type": "module"
|
||||
}
|
17
node_modules/minimatch/dist/esm/unescape.d.ts
generated
vendored
Normal file
17
node_modules/minimatch/dist/esm/unescape.d.ts
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
import { MinimatchOptions } from './index.js';
|
||||
/**
|
||||
* 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 declare const unescape: (s: string, { windowsPathsNoEscape, }?: Pick<MinimatchOptions, 'windowsPathsNoEscape'>) => string;
|
||||
//# sourceMappingURL=unescape.d.ts.map
|
1
node_modules/minimatch/dist/esm/unescape.d.ts.map
generated
vendored
Normal file
1
node_modules/minimatch/dist/esm/unescape.d.ts.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"unescape.d.ts","sourceRoot":"","sources":["../../src/unescape.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAC7C;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,QAAQ,MAChB,MAAM,8BAGN,KAAK,gBAAgB,EAAE,sBAAsB,CAAC,WAKlD,CAAA"}
|
20
node_modules/minimatch/dist/esm/unescape.js
generated
vendored
Normal file
20
node_modules/minimatch/dist/esm/unescape.js
generated
vendored
Normal file
@ -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
|
1
node_modules/minimatch/dist/esm/unescape.js.map
generated
vendored
Normal file
1
node_modules/minimatch/dist/esm/unescape.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"unescape.js","sourceRoot":"","sources":["../../src/unescape.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CACtB,CAAS,EACT,EACE,oBAAoB,GAAG,KAAK,MACsB,EAAE,EACtD,EAAE;IACF,OAAO,oBAAoB;QACzB,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,gBAAgB,EAAE,IAAI,CAAC;QACnC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,2BAA2B,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,YAAY,EAAE,IAAI,CAAC,CAAA;AAChF,CAAC,CAAA","sourcesContent":["import { MinimatchOptions } from './index.js'\n/**\n * Un-escape a string that has been escaped with {@link escape}.\n *\n * If the {@link windowsPathsNoEscape} option is used, then square-brace\n * escapes are removed, but not backslash escapes. For example, it will turn\n * the string `'[*]'` into `*`, but it will not turn `'\\\\*'` into `'*'`,\n * becuase `\\` is a path separator in `windowsPathsNoEscape` mode.\n *\n * When `windowsPathsNoEscape` is not set, then both brace escapes and\n * backslash escapes are removed.\n *\n * Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot be escaped\n * or unescaped.\n */\nexport const unescape = (\n s: string,\n {\n windowsPathsNoEscape = false,\n }: Pick<MinimatchOptions, 'windowsPathsNoEscape'> = {}\n) => {\n return windowsPathsNoEscape\n ? s.replace(/\\[([^\\/\\\\])\\]/g, '$1')\n : s.replace(/((?!\\\\).|^)\\[([^\\/\\\\])\\]/g, '$1$2').replace(/\\\\([^\\/])/g, '$1')\n}\n"]}
|
Reference in New Issue
Block a user