Update checked-in dependencies
This commit is contained in:
parent
abf1cea835
commit
7806af3040
137 changed files with 22204 additions and 2832 deletions
2
node_modules/glob/LICENSE
generated
vendored
2
node_modules/glob/LICENSE
generated
vendored
|
|
@ -1,6 +1,6 @@
|
|||
The ISC License
|
||||
|
||||
Copyright (c) 2009-2022 Isaac Z. Schlueter and Contributors
|
||||
Copyright (c) 2009-2023 Isaac Z. Schlueter and Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
|
|
|
|||
1276
node_modules/glob/README.md
generated
vendored
1276
node_modules/glob/README.md
generated
vendored
File diff suppressed because it is too large
Load diff
238
node_modules/glob/common.js
generated
vendored
238
node_modules/glob/common.js
generated
vendored
|
|
@ -1,238 +0,0 @@
|
|||
exports.setopts = setopts
|
||||
exports.ownProp = ownProp
|
||||
exports.makeAbs = makeAbs
|
||||
exports.finish = finish
|
||||
exports.mark = mark
|
||||
exports.isIgnored = isIgnored
|
||||
exports.childrenIgnored = childrenIgnored
|
||||
|
||||
function ownProp (obj, field) {
|
||||
return Object.prototype.hasOwnProperty.call(obj, field)
|
||||
}
|
||||
|
||||
var fs = require("fs")
|
||||
var path = require("path")
|
||||
var minimatch = require("minimatch")
|
||||
var isAbsolute = require("path-is-absolute")
|
||||
var Minimatch = minimatch.Minimatch
|
||||
|
||||
function alphasort (a, b) {
|
||||
return a.localeCompare(b, 'en')
|
||||
}
|
||||
|
||||
function setupIgnores (self, options) {
|
||||
self.ignore = options.ignore || []
|
||||
|
||||
if (!Array.isArray(self.ignore))
|
||||
self.ignore = [self.ignore]
|
||||
|
||||
if (self.ignore.length) {
|
||||
self.ignore = self.ignore.map(ignoreMap)
|
||||
}
|
||||
}
|
||||
|
||||
// ignore patterns are always in dot:true mode.
|
||||
function ignoreMap (pattern) {
|
||||
var gmatcher = null
|
||||
if (pattern.slice(-3) === '/**') {
|
||||
var gpattern = pattern.replace(/(\/\*\*)+$/, '')
|
||||
gmatcher = new Minimatch(gpattern, { dot: true })
|
||||
}
|
||||
|
||||
return {
|
||||
matcher: new Minimatch(pattern, { dot: true }),
|
||||
gmatcher: gmatcher
|
||||
}
|
||||
}
|
||||
|
||||
function setopts (self, pattern, options) {
|
||||
if (!options)
|
||||
options = {}
|
||||
|
||||
// base-matching: just use globstar for that.
|
||||
if (options.matchBase && -1 === pattern.indexOf("/")) {
|
||||
if (options.noglobstar) {
|
||||
throw new Error("base matching requires globstar")
|
||||
}
|
||||
pattern = "**/" + pattern
|
||||
}
|
||||
|
||||
self.silent = !!options.silent
|
||||
self.pattern = pattern
|
||||
self.strict = options.strict !== false
|
||||
self.realpath = !!options.realpath
|
||||
self.realpathCache = options.realpathCache || Object.create(null)
|
||||
self.follow = !!options.follow
|
||||
self.dot = !!options.dot
|
||||
self.mark = !!options.mark
|
||||
self.nodir = !!options.nodir
|
||||
if (self.nodir)
|
||||
self.mark = true
|
||||
self.sync = !!options.sync
|
||||
self.nounique = !!options.nounique
|
||||
self.nonull = !!options.nonull
|
||||
self.nosort = !!options.nosort
|
||||
self.nocase = !!options.nocase
|
||||
self.stat = !!options.stat
|
||||
self.noprocess = !!options.noprocess
|
||||
self.absolute = !!options.absolute
|
||||
self.fs = options.fs || fs
|
||||
|
||||
self.maxLength = options.maxLength || Infinity
|
||||
self.cache = options.cache || Object.create(null)
|
||||
self.statCache = options.statCache || Object.create(null)
|
||||
self.symlinks = options.symlinks || Object.create(null)
|
||||
|
||||
setupIgnores(self, options)
|
||||
|
||||
self.changedCwd = false
|
||||
var cwd = process.cwd()
|
||||
if (!ownProp(options, "cwd"))
|
||||
self.cwd = cwd
|
||||
else {
|
||||
self.cwd = path.resolve(options.cwd)
|
||||
self.changedCwd = self.cwd !== cwd
|
||||
}
|
||||
|
||||
self.root = options.root || path.resolve(self.cwd, "/")
|
||||
self.root = path.resolve(self.root)
|
||||
if (process.platform === "win32")
|
||||
self.root = self.root.replace(/\\/g, "/")
|
||||
|
||||
// TODO: is an absolute `cwd` supposed to be resolved against `root`?
|
||||
// e.g. { cwd: '/test', root: __dirname } === path.join(__dirname, '/test')
|
||||
self.cwdAbs = isAbsolute(self.cwd) ? self.cwd : makeAbs(self, self.cwd)
|
||||
if (process.platform === "win32")
|
||||
self.cwdAbs = self.cwdAbs.replace(/\\/g, "/")
|
||||
self.nomount = !!options.nomount
|
||||
|
||||
// disable comments and negation in Minimatch.
|
||||
// Note that they are not supported in Glob itself anyway.
|
||||
options.nonegate = true
|
||||
options.nocomment = true
|
||||
// always treat \ in patterns as escapes, not path separators
|
||||
options.allowWindowsEscape = true
|
||||
|
||||
self.minimatch = new Minimatch(pattern, options)
|
||||
self.options = self.minimatch.options
|
||||
}
|
||||
|
||||
function finish (self) {
|
||||
var nou = self.nounique
|
||||
var all = nou ? [] : Object.create(null)
|
||||
|
||||
for (var i = 0, l = self.matches.length; i < l; i ++) {
|
||||
var matches = self.matches[i]
|
||||
if (!matches || Object.keys(matches).length === 0) {
|
||||
if (self.nonull) {
|
||||
// do like the shell, and spit out the literal glob
|
||||
var literal = self.minimatch.globSet[i]
|
||||
if (nou)
|
||||
all.push(literal)
|
||||
else
|
||||
all[literal] = true
|
||||
}
|
||||
} else {
|
||||
// had matches
|
||||
var m = Object.keys(matches)
|
||||
if (nou)
|
||||
all.push.apply(all, m)
|
||||
else
|
||||
m.forEach(function (m) {
|
||||
all[m] = true
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
if (!nou)
|
||||
all = Object.keys(all)
|
||||
|
||||
if (!self.nosort)
|
||||
all = all.sort(alphasort)
|
||||
|
||||
// at *some* point we statted all of these
|
||||
if (self.mark) {
|
||||
for (var i = 0; i < all.length; i++) {
|
||||
all[i] = self._mark(all[i])
|
||||
}
|
||||
if (self.nodir) {
|
||||
all = all.filter(function (e) {
|
||||
var notDir = !(/\/$/.test(e))
|
||||
var c = self.cache[e] || self.cache[makeAbs(self, e)]
|
||||
if (notDir && c)
|
||||
notDir = c !== 'DIR' && !Array.isArray(c)
|
||||
return notDir
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
if (self.ignore.length)
|
||||
all = all.filter(function(m) {
|
||||
return !isIgnored(self, m)
|
||||
})
|
||||
|
||||
self.found = all
|
||||
}
|
||||
|
||||
function mark (self, p) {
|
||||
var abs = makeAbs(self, p)
|
||||
var c = self.cache[abs]
|
||||
var m = p
|
||||
if (c) {
|
||||
var isDir = c === 'DIR' || Array.isArray(c)
|
||||
var slash = p.slice(-1) === '/'
|
||||
|
||||
if (isDir && !slash)
|
||||
m += '/'
|
||||
else if (!isDir && slash)
|
||||
m = m.slice(0, -1)
|
||||
|
||||
if (m !== p) {
|
||||
var mabs = makeAbs(self, m)
|
||||
self.statCache[mabs] = self.statCache[abs]
|
||||
self.cache[mabs] = self.cache[abs]
|
||||
}
|
||||
}
|
||||
|
||||
return m
|
||||
}
|
||||
|
||||
// lotta situps...
|
||||
function makeAbs (self, f) {
|
||||
var abs = f
|
||||
if (f.charAt(0) === '/') {
|
||||
abs = path.join(self.root, f)
|
||||
} else if (isAbsolute(f) || f === '') {
|
||||
abs = f
|
||||
} else if (self.changedCwd) {
|
||||
abs = path.resolve(self.cwd, f)
|
||||
} else {
|
||||
abs = path.resolve(f)
|
||||
}
|
||||
|
||||
if (process.platform === 'win32')
|
||||
abs = abs.replace(/\\/g, '/')
|
||||
|
||||
return abs
|
||||
}
|
||||
|
||||
|
||||
// Return true, if pattern ends with globstar '**', for the accompanying parent directory.
|
||||
// Ex:- If node_modules/** is the pattern, add 'node_modules' to ignore list along with it's contents
|
||||
function isIgnored (self, path) {
|
||||
if (!self.ignore.length)
|
||||
return false
|
||||
|
||||
return self.ignore.some(function(item) {
|
||||
return item.matcher.match(path) || !!(item.gmatcher && item.gmatcher.match(path))
|
||||
})
|
||||
}
|
||||
|
||||
function childrenIgnored (self, path) {
|
||||
if (!self.ignore.length)
|
||||
return false
|
||||
|
||||
return self.ignore.some(function(item) {
|
||||
return !!(item.gmatcher && item.gmatcher.match(path))
|
||||
})
|
||||
}
|
||||
328
node_modules/glob/dist/cjs/glob.d.ts
generated
vendored
Normal file
328
node_modules/glob/dist/cjs/glob.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,328 @@
|
|||
/// <reference types="node" />
|
||||
import { Minimatch } from 'minimatch';
|
||||
import Minipass from 'minipass';
|
||||
import { FSOption, Path, PathScurry } from 'path-scurry';
|
||||
import { IgnoreLike } from './ignore.js';
|
||||
import { Pattern } from './pattern.js';
|
||||
export type MatchSet = Minimatch['set'];
|
||||
export type GlobParts = Exclude<Minimatch['globParts'], undefined>;
|
||||
/**
|
||||
* A `GlobOptions` object may be provided to any of the exported methods, and
|
||||
* must be provided to the `Glob` constructor.
|
||||
*
|
||||
* All options are optional, boolean, and false by default, unless otherwise
|
||||
* noted.
|
||||
*
|
||||
* All resolved options are added to the Glob object as properties.
|
||||
*
|
||||
* If you are running many `glob` operations, you can pass a Glob object as the
|
||||
* `options` argument to a subsequent operation to share the previously loaded
|
||||
* cache.
|
||||
*/
|
||||
export interface GlobOptions {
|
||||
/**
|
||||
* Set to `true` to always receive absolute paths for
|
||||
* matched files. Set to `false` to always return relative paths.
|
||||
*
|
||||
* When this option is not set, absolute paths are returned for patterns
|
||||
* that are absolute, and otherwise paths are returned that are relative
|
||||
* to the `cwd` setting.
|
||||
*
|
||||
* This does _not_ make an extra system call to get
|
||||
* the realpath, it only does string path resolution.
|
||||
*
|
||||
* Conflicts with {@link withFileTypes}
|
||||
*/
|
||||
absolute?: boolean;
|
||||
/**
|
||||
* Set to false to enable {@link windowsPathsNoEscape}
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
allowWindowsEscape?: boolean;
|
||||
/**
|
||||
* The current working directory in which to search. Defaults to
|
||||
* `process.cwd()`.
|
||||
*
|
||||
* May be eiher a string path or a `file://` URL object or string.
|
||||
*/
|
||||
cwd?: string | URL;
|
||||
/**
|
||||
* Include `.dot` files in normal matches and `globstar`
|
||||
* matches. Note that an explicit dot in a portion of the pattern
|
||||
* will always match dot files.
|
||||
*/
|
||||
dot?: boolean;
|
||||
/**
|
||||
* Prepend all relative path strings with `./` (or `.\` on Windows).
|
||||
*
|
||||
* Without this option, returned relative paths are "bare", so instead of
|
||||
* returning `'./foo/bar'`, they are returned as `'foo/bar'`.
|
||||
*
|
||||
* Relative patterns starting with `'../'` are not prepended with `./`, even
|
||||
* if this option is set.
|
||||
*/
|
||||
dotRelative?: boolean;
|
||||
/**
|
||||
* Follow symlinked directories when expanding `**`
|
||||
* patterns. This can result in a lot of duplicate references in
|
||||
* the presence of cyclic links, and make performance quite bad.
|
||||
*
|
||||
* By default, a `**` in a pattern will follow 1 symbolic link if
|
||||
* it is not the first item in the pattern, or none if it is the
|
||||
* first item in the pattern, following the same behavior as Bash.
|
||||
*/
|
||||
follow?: boolean;
|
||||
/**
|
||||
* string or string[], or an object with `ignore` and `ignoreChildren`
|
||||
* methods.
|
||||
*
|
||||
* If a string or string[] is provided, then this is treated as a glob
|
||||
* pattern or array of glob patterns to exclude from matches. To ignore all
|
||||
* children within a directory, as well as the entry itself, append `'/**'`
|
||||
* to the ignore pattern.
|
||||
*
|
||||
* **Note** `ignore` patterns are _always_ in `dot:true` mode, regardless of
|
||||
* any other settings.
|
||||
*
|
||||
* If an object is provided that has `ignored(path)` and/or
|
||||
* `childrenIgnored(path)` methods, then these methods will be called to
|
||||
* determine whether any Path is a match or if its children should be
|
||||
* traversed, respectively.
|
||||
*/
|
||||
ignore?: string | string[] | IgnoreLike;
|
||||
/**
|
||||
* Treat brace expansion like `{a,b}` as a "magic" pattern. Has no
|
||||
* effect if {@link nobrace} is set.
|
||||
*
|
||||
* Only has effect on the {@link hasMagic} function.
|
||||
*/
|
||||
magicalBraces?: boolean;
|
||||
/**
|
||||
* Add a `/` character to directory matches. Note that this requires
|
||||
* additional stat calls in some cases.
|
||||
*/
|
||||
mark?: boolean;
|
||||
/**
|
||||
* Perform a basename-only match if the pattern does not contain any slash
|
||||
* characters. That is, `*.js` would be treated as equivalent to
|
||||
* `**\/*.js`, matching all js files in all directories.
|
||||
*/
|
||||
matchBase?: boolean;
|
||||
/**
|
||||
* Limit the directory traversal to a given depth below the cwd.
|
||||
* Note that this does NOT prevent traversal to sibling folders,
|
||||
* root patterns, and so on. It only limits the maximum folder depth
|
||||
* that the walk will descend, relative to the cwd.
|
||||
*/
|
||||
maxDepth?: number;
|
||||
/**
|
||||
* Do not expand `{a,b}` and `{1..3}` brace sets.
|
||||
*/
|
||||
nobrace?: boolean;
|
||||
/**
|
||||
* Perform a case-insensitive match. This defaults to `true` on macOS and
|
||||
* Windows systems, and `false` on all others.
|
||||
*
|
||||
* **Note** `nocase` should only be explicitly set when it is
|
||||
* known that the filesystem's case sensitivity differs from the
|
||||
* platform default. If set `true` on case-sensitive file
|
||||
* systems, or `false` on case-insensitive file systems, then the
|
||||
* walk may return more or less results than expected.
|
||||
*/
|
||||
nocase?: boolean;
|
||||
/**
|
||||
* Do not match directories, only files. (Note: to match
|
||||
* _only_ directories, put a `/` at the end of the pattern.)
|
||||
*/
|
||||
nodir?: boolean;
|
||||
/**
|
||||
* Do not match "extglob" patterns such as `+(a|b)`.
|
||||
*/
|
||||
noext?: boolean;
|
||||
/**
|
||||
* Do not match `**` against multiple filenames. (Ie, treat it as a normal
|
||||
* `*` instead.)
|
||||
*
|
||||
* Conflicts with {@link matchBase}
|
||||
*/
|
||||
noglobstar?: boolean;
|
||||
/**
|
||||
* Defaults to value of `process.platform` if available, or `'linux'` if
|
||||
* not. Setting `platform:'win32'` on non-Windows systems may cause strange
|
||||
* behavior.
|
||||
*/
|
||||
platform?: NodeJS.Platform;
|
||||
/**
|
||||
* Set to true to call `fs.realpath` on all of the
|
||||
* results. In the case of an entry that cannot be resolved, the
|
||||
* entry is omitted. This incurs a slight performance penalty, of
|
||||
* course, because of the added system calls.
|
||||
*/
|
||||
realpath?: boolean;
|
||||
/**
|
||||
*
|
||||
* A string path resolved against the `cwd` option, which
|
||||
* is used as the starting point for absolute patterns that start
|
||||
* with `/`, (but not drive letters or UNC paths on Windows).
|
||||
*
|
||||
* Note that this _doesn't_ necessarily limit the walk to the
|
||||
* `root` directory, and doesn't affect the cwd starting point for
|
||||
* non-absolute patterns. A pattern containing `..` will still be
|
||||
* able to traverse out of the root directory, if it is not an
|
||||
* actual root directory on the filesystem, and any non-absolute
|
||||
* patterns will be matched in the `cwd`. For example, the
|
||||
* pattern `/../*` with `{root:'/some/path'}` will return all
|
||||
* files in `/some`, not all files in `/some/path`. The pattern
|
||||
* `*` with `{root:'/some/path'}` will return all the entries in
|
||||
* the cwd, not the entries in `/some/path`.
|
||||
*
|
||||
* To start absolute and non-absolute patterns in the same
|
||||
* path, you can use `{root:''}`. However, be aware that on
|
||||
* Windows systems, a pattern like `x:/*` or `//host/share/*` will
|
||||
* _always_ start in the `x:/` or `//host/share` directory,
|
||||
* regardless of the `root` setting.
|
||||
*/
|
||||
root?: string;
|
||||
/**
|
||||
* A [PathScurry](http://npm.im/path-scurry) object used
|
||||
* to traverse the file system. If the `nocase` option is set
|
||||
* explicitly, then any provided `scurry` object must match this
|
||||
* setting.
|
||||
*/
|
||||
scurry?: PathScurry;
|
||||
/**
|
||||
* Call `lstat()` on all entries, whether required or not to determine
|
||||
* whether it's a valid match. When used with {@link withFileTypes}, this
|
||||
* means that matches will include data such as modified time, permissions,
|
||||
* and so on. Note that this will incur a performance cost due to the added
|
||||
* system calls.
|
||||
*/
|
||||
stat?: boolean;
|
||||
/**
|
||||
* An AbortSignal which will cancel the Glob walk when
|
||||
* triggered.
|
||||
*/
|
||||
signal?: AbortSignal;
|
||||
/**
|
||||
* Use `\\` as a path separator _only_, and
|
||||
* _never_ as an escape character. If set, all `\\` characters are
|
||||
* replaced with `/` in the pattern.
|
||||
*
|
||||
* Note that this makes it **impossible** to match against paths
|
||||
* containing literal glob pattern characters, but allows matching
|
||||
* with patterns constructed using `path.join()` and
|
||||
* `path.resolve()` on Windows platforms, mimicking the (buggy!)
|
||||
* behavior of Glob v7 and before on Windows. Please use with
|
||||
* caution, and be mindful of [the caveat below about Windows
|
||||
* paths](#windows). (For legacy reasons, this is also set if
|
||||
* `allowWindowsEscape` is set to the exact value `false`.)
|
||||
*/
|
||||
windowsPathsNoEscape?: boolean;
|
||||
/**
|
||||
* Return [PathScurry](http://npm.im/path-scurry)
|
||||
* `Path` objects instead of strings. These are similar to a
|
||||
* NodeJS `Dirent` object, but with additional methods and
|
||||
* properties.
|
||||
*
|
||||
* Conflicts with {@link absolute}
|
||||
*/
|
||||
withFileTypes?: boolean;
|
||||
/**
|
||||
* An fs implementation to override some or all of the defaults. See
|
||||
* http://npm.im/path-scurry for details about what can be overridden.
|
||||
*/
|
||||
fs?: FSOption;
|
||||
}
|
||||
export type GlobOptionsWithFileTypesTrue = GlobOptions & {
|
||||
withFileTypes: true;
|
||||
absolute?: undefined;
|
||||
};
|
||||
export type GlobOptionsWithFileTypesFalse = GlobOptions & {
|
||||
withFileTypes?: false;
|
||||
};
|
||||
export type GlobOptionsWithFileTypesUnset = GlobOptions & {
|
||||
withFileTypes?: undefined;
|
||||
};
|
||||
export type Result<Opts> = Opts extends GlobOptionsWithFileTypesTrue ? Path : Opts extends GlobOptionsWithFileTypesFalse ? string : Opts extends GlobOptionsWithFileTypesUnset ? string : string | Path;
|
||||
export type Results<Opts> = Result<Opts>[];
|
||||
export type FileTypes<Opts> = Opts extends GlobOptionsWithFileTypesTrue ? true : Opts extends GlobOptionsWithFileTypesFalse ? false : Opts extends GlobOptionsWithFileTypesUnset ? false : boolean;
|
||||
/**
|
||||
* An object that can perform glob pattern traversals.
|
||||
*/
|
||||
export declare class Glob<Opts extends GlobOptions> implements GlobOptions {
|
||||
absolute?: boolean;
|
||||
cwd: string;
|
||||
root?: string;
|
||||
dot: boolean;
|
||||
dotRelative: boolean;
|
||||
follow: boolean;
|
||||
ignore?: string | string[] | IgnoreLike;
|
||||
magicalBraces: boolean;
|
||||
mark?: boolean;
|
||||
matchBase: boolean;
|
||||
maxDepth: number;
|
||||
nobrace: boolean;
|
||||
nocase: boolean;
|
||||
nodir: boolean;
|
||||
noext: boolean;
|
||||
noglobstar: boolean;
|
||||
pattern: string[];
|
||||
platform: NodeJS.Platform;
|
||||
realpath: boolean;
|
||||
scurry: PathScurry;
|
||||
stat: boolean;
|
||||
signal?: AbortSignal;
|
||||
windowsPathsNoEscape: boolean;
|
||||
withFileTypes: FileTypes<Opts>;
|
||||
/**
|
||||
* The options provided to the constructor.
|
||||
*/
|
||||
opts: Opts;
|
||||
/**
|
||||
* An array of parsed immutable {@link Pattern} objects.
|
||||
*/
|
||||
patterns: Pattern[];
|
||||
/**
|
||||
* All options are stored as properties on the `Glob` object.
|
||||
*
|
||||
* See {@link GlobOptions} for full options descriptions.
|
||||
*
|
||||
* Note that a previous `Glob` object can be passed as the
|
||||
* `GlobOptions` to another `Glob` instantiation to re-use settings
|
||||
* and caches with a new pattern.
|
||||
*
|
||||
* Traversal functions can be called multiple times to run the walk
|
||||
* again.
|
||||
*/
|
||||
constructor(pattern: string | string[], opts: Opts);
|
||||
/**
|
||||
* Returns a Promise that resolves to the results array.
|
||||
*/
|
||||
walk(): Promise<Results<Opts>>;
|
||||
/**
|
||||
* synchronous {@link Glob.walk}
|
||||
*/
|
||||
walkSync(): Results<Opts>;
|
||||
/**
|
||||
* Stream results asynchronously.
|
||||
*/
|
||||
stream(): Minipass<Result<Opts>, Result<Opts>>;
|
||||
/**
|
||||
* Stream results synchronously.
|
||||
*/
|
||||
streamSync(): Minipass<Result<Opts>, Result<Opts>>;
|
||||
/**
|
||||
* Default sync iteration function. Returns a Generator that
|
||||
* iterates over the results.
|
||||
*/
|
||||
iterateSync(): Generator<Result<Opts>, void, void>;
|
||||
[Symbol.iterator](): Generator<Result<Opts>, void, void>;
|
||||
/**
|
||||
* Default async iteration function. Returns an AsyncGenerator that
|
||||
* iterates over the results.
|
||||
*/
|
||||
iterate(): AsyncGenerator<Result<Opts>, void, void>;
|
||||
[Symbol.asyncIterator](): AsyncGenerator<Result<Opts>, void, void>;
|
||||
}
|
||||
//# sourceMappingURL=glob.d.ts.map
|
||||
1
node_modules/glob/dist/cjs/glob.d.ts.map
generated
vendored
Normal file
1
node_modules/glob/dist/cjs/glob.d.ts.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"glob.d.ts","sourceRoot":"","sources":["../../src/glob.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAoB,MAAM,WAAW,CAAA;AACvD,OAAO,QAAQ,MAAM,UAAU,CAAA;AAC/B,OAAO,EACL,QAAQ,EACR,IAAI,EACJ,UAAU,EAIX,MAAM,aAAa,CAAA;AAEpB,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAGtC,MAAM,MAAM,QAAQ,GAAG,SAAS,CAAC,KAAK,CAAC,CAAA;AACvC,MAAM,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,SAAS,CAAC,CAAA;AAWlE;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,WAAW;IAC1B;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAE5B;;;;;OAKG;IACH,GAAG,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;IAElB;;;;OAIG;IACH,GAAG,CAAC,EAAE,OAAO,CAAA;IAEb;;;;;;;;OAQG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IAErB;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAEhB;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,UAAU,CAAA;IAEvC;;;;;OAKG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;IAEvB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAA;IAEd;;;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aAAa,EAAE,SAAS,CAAC,IAAI,CAAC,CAAA;IAE9B;;OAEG;IACH,IAAI,EAAE,IAAI,CAAA;IAEV;;OAEG;IACH,QAAQ,EAAE,OAAO,EAAE,CAAA;IAEnB;;;;;;;;;;;OAWG;gBACS,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,IAAI,EAAE,IAAI;IA6GlD;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAmBpC;;OAEG;IACH,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAezB;;OAEG;IACH,MAAM,IAAI,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;IAa9C;;OAEG;IACH,UAAU,IAAI,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;IAalD;;;OAGG;IACH,WAAW,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC;IAGlD,CAAC,MAAM,CAAC,QAAQ,CAAC;IAIjB;;;OAGG;IACH,OAAO,IAAI,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC;IAGnD,CAAC,MAAM,CAAC,aAAa,CAAC;CAGvB"}
|
||||
228
node_modules/glob/dist/cjs/glob.js
generated
vendored
Normal file
228
node_modules/glob/dist/cjs/glob.js
generated
vendored
Normal file
|
|
@ -0,0 +1,228 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Glob = void 0;
|
||||
const minimatch_1 = require("minimatch");
|
||||
const path_scurry_1 = require("path-scurry");
|
||||
const url_1 = require("url");
|
||||
const pattern_js_1 = require("./pattern.js");
|
||||
const walker_js_1 = require("./walker.js");
|
||||
// if no process global, just call it linux.
|
||||
// so we default to case-sensitive, / separators
|
||||
const defaultPlatform = typeof process === 'object' &&
|
||||
process &&
|
||||
typeof process.platform === 'string'
|
||||
? process.platform
|
||||
: 'linux';
|
||||
/**
|
||||
* An object that can perform glob pattern traversals.
|
||||
*/
|
||||
class Glob {
|
||||
absolute;
|
||||
cwd;
|
||||
root;
|
||||
dot;
|
||||
dotRelative;
|
||||
follow;
|
||||
ignore;
|
||||
magicalBraces;
|
||||
mark;
|
||||
matchBase;
|
||||
maxDepth;
|
||||
nobrace;
|
||||
nocase;
|
||||
nodir;
|
||||
noext;
|
||||
noglobstar;
|
||||
pattern;
|
||||
platform;
|
||||
realpath;
|
||||
scurry;
|
||||
stat;
|
||||
signal;
|
||||
windowsPathsNoEscape;
|
||||
withFileTypes;
|
||||
/**
|
||||
* The options provided to the constructor.
|
||||
*/
|
||||
opts;
|
||||
/**
|
||||
* An array of parsed immutable {@link Pattern} objects.
|
||||
*/
|
||||
patterns;
|
||||
/**
|
||||
* All options are stored as properties on the `Glob` object.
|
||||
*
|
||||
* See {@link GlobOptions} for full options descriptions.
|
||||
*
|
||||
* Note that a previous `Glob` object can be passed as the
|
||||
* `GlobOptions` to another `Glob` instantiation to re-use settings
|
||||
* and caches with a new pattern.
|
||||
*
|
||||
* Traversal functions can be called multiple times to run the walk
|
||||
* again.
|
||||
*/
|
||||
constructor(pattern, opts) {
|
||||
this.withFileTypes = !!opts.withFileTypes;
|
||||
this.signal = opts.signal;
|
||||
this.follow = !!opts.follow;
|
||||
this.dot = !!opts.dot;
|
||||
this.dotRelative = !!opts.dotRelative;
|
||||
this.nodir = !!opts.nodir;
|
||||
this.mark = !!opts.mark;
|
||||
if (!opts.cwd) {
|
||||
this.cwd = '';
|
||||
}
|
||||
else if (opts.cwd instanceof URL || opts.cwd.startsWith('file://')) {
|
||||
opts.cwd = (0, url_1.fileURLToPath)(opts.cwd);
|
||||
}
|
||||
this.cwd = opts.cwd || '';
|
||||
this.root = opts.root;
|
||||
this.magicalBraces = !!opts.magicalBraces;
|
||||
this.nobrace = !!opts.nobrace;
|
||||
this.noext = !!opts.noext;
|
||||
this.realpath = !!opts.realpath;
|
||||
this.absolute = opts.absolute;
|
||||
this.noglobstar = !!opts.noglobstar;
|
||||
this.matchBase = !!opts.matchBase;
|
||||
this.maxDepth =
|
||||
typeof opts.maxDepth === 'number' ? opts.maxDepth : Infinity;
|
||||
this.stat = !!opts.stat;
|
||||
this.ignore = opts.ignore;
|
||||
if (this.withFileTypes && this.absolute !== undefined) {
|
||||
throw new Error('cannot set absolute and withFileTypes:true');
|
||||
}
|
||||
if (typeof pattern === 'string') {
|
||||
pattern = [pattern];
|
||||
}
|
||||
this.windowsPathsNoEscape =
|
||||
!!opts.windowsPathsNoEscape ||
|
||||
opts.allowWindowsEscape === false;
|
||||
if (this.windowsPathsNoEscape) {
|
||||
pattern = pattern.map(p => p.replace(/\\/g, '/'));
|
||||
}
|
||||
if (this.matchBase) {
|
||||
if (opts.noglobstar) {
|
||||
throw new TypeError('base matching requires globstar');
|
||||
}
|
||||
pattern = pattern.map(p => (p.includes('/') ? p : `./**/${p}`));
|
||||
}
|
||||
this.pattern = pattern;
|
||||
this.platform = opts.platform || defaultPlatform;
|
||||
this.opts = { ...opts, platform: this.platform };
|
||||
if (opts.scurry) {
|
||||
this.scurry = opts.scurry;
|
||||
if (opts.nocase !== undefined &&
|
||||
opts.nocase !== opts.scurry.nocase) {
|
||||
throw new Error('nocase option contradicts provided scurry option');
|
||||
}
|
||||
}
|
||||
else {
|
||||
const Scurry = opts.platform === 'win32'
|
||||
? path_scurry_1.PathScurryWin32
|
||||
: opts.platform === 'darwin'
|
||||
? path_scurry_1.PathScurryDarwin
|
||||
: opts.platform
|
||||
? path_scurry_1.PathScurryPosix
|
||||
: path_scurry_1.PathScurry;
|
||||
this.scurry = new Scurry(this.cwd, {
|
||||
nocase: opts.nocase,
|
||||
fs: opts.fs,
|
||||
});
|
||||
}
|
||||
this.nocase = this.scurry.nocase;
|
||||
const mmo = {
|
||||
// default nocase based on platform
|
||||
...opts,
|
||||
dot: this.dot,
|
||||
matchBase: this.matchBase,
|
||||
nobrace: this.nobrace,
|
||||
nocase: this.nocase,
|
||||
nocaseMagicOnly: true,
|
||||
nocomment: true,
|
||||
noext: this.noext,
|
||||
nonegate: true,
|
||||
optimizationLevel: 2,
|
||||
platform: this.platform,
|
||||
windowsPathsNoEscape: this.windowsPathsNoEscape,
|
||||
};
|
||||
const mms = this.pattern.map(p => new minimatch_1.Minimatch(p, mmo));
|
||||
const [matchSet, globParts] = mms.reduce((set, m) => {
|
||||
set[0].push(...m.set);
|
||||
set[1].push(...m.globParts);
|
||||
return set;
|
||||
}, [[], []]);
|
||||
this.patterns = matchSet.map((set, i) => {
|
||||
return new pattern_js_1.Pattern(set, globParts[i], 0, this.platform);
|
||||
});
|
||||
}
|
||||
async walk() {
|
||||
// Walkers always return array of Path objects, so we just have to
|
||||
// coerce them into the right shape. It will have already called
|
||||
// realpath() if the option was set to do so, so we know that's cached.
|
||||
// start out knowing the cwd, at least
|
||||
return [
|
||||
...(await new walker_js_1.GlobWalker(this.patterns, this.scurry.cwd, {
|
||||
...this.opts,
|
||||
maxDepth: this.maxDepth !== Infinity
|
||||
? this.maxDepth + this.scurry.cwd.depth()
|
||||
: Infinity,
|
||||
platform: this.platform,
|
||||
nocase: this.nocase,
|
||||
}).walk()),
|
||||
];
|
||||
}
|
||||
walkSync() {
|
||||
return [
|
||||
...new walker_js_1.GlobWalker(this.patterns, this.scurry.cwd, {
|
||||
...this.opts,
|
||||
maxDepth: this.maxDepth !== Infinity
|
||||
? this.maxDepth + this.scurry.cwd.depth()
|
||||
: Infinity,
|
||||
platform: this.platform,
|
||||
nocase: this.nocase,
|
||||
}).walkSync(),
|
||||
];
|
||||
}
|
||||
stream() {
|
||||
return new walker_js_1.GlobStream(this.patterns, this.scurry.cwd, {
|
||||
...this.opts,
|
||||
maxDepth: this.maxDepth !== Infinity
|
||||
? this.maxDepth + this.scurry.cwd.depth()
|
||||
: Infinity,
|
||||
platform: this.platform,
|
||||
nocase: this.nocase,
|
||||
}).stream();
|
||||
}
|
||||
streamSync() {
|
||||
return new walker_js_1.GlobStream(this.patterns, this.scurry.cwd, {
|
||||
...this.opts,
|
||||
maxDepth: this.maxDepth !== Infinity
|
||||
? this.maxDepth + this.scurry.cwd.depth()
|
||||
: Infinity,
|
||||
platform: this.platform,
|
||||
nocase: this.nocase,
|
||||
}).streamSync();
|
||||
}
|
||||
/**
|
||||
* Default sync iteration function. Returns a Generator that
|
||||
* iterates over the results.
|
||||
*/
|
||||
iterateSync() {
|
||||
return this.streamSync()[Symbol.iterator]();
|
||||
}
|
||||
[Symbol.iterator]() {
|
||||
return this.iterateSync();
|
||||
}
|
||||
/**
|
||||
* Default async iteration function. Returns an AsyncGenerator that
|
||||
* iterates over the results.
|
||||
*/
|
||||
iterate() {
|
||||
return this.stream()[Symbol.asyncIterator]();
|
||||
}
|
||||
[Symbol.asyncIterator]() {
|
||||
return this.iterate();
|
||||
}
|
||||
}
|
||||
exports.Glob = Glob;
|
||||
//# sourceMappingURL=glob.js.map
|
||||
1
node_modules/glob/dist/cjs/glob.js.map
generated
vendored
Normal file
1
node_modules/glob/dist/cjs/glob.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
14
node_modules/glob/dist/cjs/has-magic.d.ts
generated
vendored
Normal file
14
node_modules/glob/dist/cjs/has-magic.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
import { GlobOptions } from './glob.js';
|
||||
/**
|
||||
* Return true if the patterns provided contain any magic glob characters,
|
||||
* given the options provided.
|
||||
*
|
||||
* Brace expansion is not considered "magic" unless the `magicalBraces` option
|
||||
* is set, as brace expansion just turns one string into an array of strings.
|
||||
* So a pattern like `'x{a,b}y'` would return `false`, because `'xay'` and
|
||||
* `'xby'` both do not contain any magic glob characters, and it's treated the
|
||||
* same as if you had called it on `['xay', 'xby']`. When `magicalBraces:true`
|
||||
* is in the options, brace expansion _is_ treated as a pattern having magic.
|
||||
*/
|
||||
export declare const hasMagic: (pattern: string | string[], options?: GlobOptions) => boolean;
|
||||
//# sourceMappingURL=has-magic.d.ts.map
|
||||
1
node_modules/glob/dist/cjs/has-magic.d.ts.map
generated
vendored
Normal file
1
node_modules/glob/dist/cjs/has-magic.d.ts.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"has-magic.d.ts","sourceRoot":"","sources":["../../src/has-magic.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAEvC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,QAAQ,YACV,MAAM,GAAG,MAAM,EAAE,YACjB,WAAW,KACnB,OAQF,CAAA"}
|
||||
27
node_modules/glob/dist/cjs/has-magic.js
generated
vendored
Normal file
27
node_modules/glob/dist/cjs/has-magic.js
generated
vendored
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.hasMagic = void 0;
|
||||
const minimatch_1 = require("minimatch");
|
||||
/**
|
||||
* Return true if the patterns provided contain any magic glob characters,
|
||||
* given the options provided.
|
||||
*
|
||||
* Brace expansion is not considered "magic" unless the `magicalBraces` option
|
||||
* is set, as brace expansion just turns one string into an array of strings.
|
||||
* So a pattern like `'x{a,b}y'` would return `false`, because `'xay'` and
|
||||
* `'xby'` both do not contain any magic glob characters, and it's treated the
|
||||
* same as if you had called it on `['xay', 'xby']`. When `magicalBraces:true`
|
||||
* is in the options, brace expansion _is_ treated as a pattern having magic.
|
||||
*/
|
||||
const hasMagic = (pattern, options = {}) => {
|
||||
if (!Array.isArray(pattern)) {
|
||||
pattern = [pattern];
|
||||
}
|
||||
for (const p of pattern) {
|
||||
if (new minimatch_1.Minimatch(p, options).hasMagic())
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
exports.hasMagic = hasMagic;
|
||||
//# sourceMappingURL=has-magic.js.map
|
||||
1
node_modules/glob/dist/cjs/has-magic.js.map
generated
vendored
Normal file
1
node_modules/glob/dist/cjs/has-magic.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"has-magic.js","sourceRoot":"","sources":["../../src/has-magic.ts"],"names":[],"mappings":";;;AAAA,yCAAqC;AAGrC;;;;;;;;;;GAUG;AACI,MAAM,QAAQ,GAAG,CACtB,OAA0B,EAC1B,UAAuB,EAAE,EAChB,EAAE;IACX,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;QAC3B,OAAO,GAAG,CAAC,OAAO,CAAC,CAAA;KACpB;IACD,KAAK,MAAM,CAAC,IAAI,OAAO,EAAE;QACvB,IAAI,IAAI,qBAAS,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,QAAQ,EAAE;YAAE,OAAO,IAAI,CAAA;KACtD;IACD,OAAO,KAAK,CAAA;AACd,CAAC,CAAA;AAXY,QAAA,QAAQ,YAWpB"}
|
||||
20
node_modules/glob/dist/cjs/ignore.d.ts
generated
vendored
Normal file
20
node_modules/glob/dist/cjs/ignore.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
import { Minimatch } from 'minimatch';
|
||||
import { Path } from 'path-scurry';
|
||||
import { GlobWalkerOpts } from './walker.js';
|
||||
export interface IgnoreLike {
|
||||
ignored?: (p: Path) => boolean;
|
||||
childrenIgnored?: (p: Path) => boolean;
|
||||
}
|
||||
/**
|
||||
* Class used to process ignored patterns
|
||||
*/
|
||||
export declare class Ignore implements IgnoreLike {
|
||||
relative: Minimatch[];
|
||||
relativeChildren: Minimatch[];
|
||||
absolute: Minimatch[];
|
||||
absoluteChildren: Minimatch[];
|
||||
constructor(ignored: string[], { nobrace, nocase, noext, noglobstar, platform, }: GlobWalkerOpts);
|
||||
ignored(p: Path): boolean;
|
||||
childrenIgnored(p: Path): boolean;
|
||||
}
|
||||
//# sourceMappingURL=ignore.d.ts.map
|
||||
1
node_modules/glob/dist/cjs/ignore.d.ts.map
generated
vendored
Normal file
1
node_modules/glob/dist/cjs/ignore.d.ts.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"ignore.d.ts","sourceRoot":"","sources":["../../src/ignore.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAElC,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAE5C,MAAM,WAAW,UAAU;IACzB,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,KAAK,OAAO,CAAA;IAC9B,eAAe,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,KAAK,OAAO,CAAA;CACvC;AASD;;GAEG;AACH,qBAAa,MAAO,YAAW,UAAU;IACvC,QAAQ,EAAE,SAAS,EAAE,CAAA;IACrB,gBAAgB,EAAE,SAAS,EAAE,CAAA;IAC7B,QAAQ,EAAE,SAAS,EAAE,CAAA;IACrB,gBAAgB,EAAE,SAAS,EAAE,CAAA;gBAG3B,OAAO,EAAE,MAAM,EAAE,EACjB,EACE,OAAO,EACP,MAAM,EACN,KAAK,EACL,UAAU,EACV,QAA0B,GAC3B,EAAE,cAAc;IAiDnB,OAAO,CAAC,CAAC,EAAE,IAAI,GAAG,OAAO;IAczB,eAAe,CAAC,CAAC,EAAE,IAAI,GAAG,OAAO;CAWlC"}
|
||||
103
node_modules/glob/dist/cjs/ignore.js
generated
vendored
Normal file
103
node_modules/glob/dist/cjs/ignore.js
generated
vendored
Normal file
|
|
@ -0,0 +1,103 @@
|
|||
"use strict";
|
||||
// give it a pattern, and it'll be able to tell you if
|
||||
// a given path should be ignored.
|
||||
// Ignoring a path ignores its children if the pattern ends in /**
|
||||
// Ignores are always parsed in dot:true mode
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Ignore = void 0;
|
||||
const minimatch_1 = require("minimatch");
|
||||
const pattern_js_1 = require("./pattern.js");
|
||||
const defaultPlatform = typeof process === 'object' &&
|
||||
process &&
|
||||
typeof process.platform === 'string'
|
||||
? process.platform
|
||||
: 'linux';
|
||||
/**
|
||||
* Class used to process ignored patterns
|
||||
*/
|
||||
class Ignore {
|
||||
relative;
|
||||
relativeChildren;
|
||||
absolute;
|
||||
absoluteChildren;
|
||||
constructor(ignored, { nobrace, nocase, noext, noglobstar, platform = defaultPlatform, }) {
|
||||
this.relative = [];
|
||||
this.absolute = [];
|
||||
this.relativeChildren = [];
|
||||
this.absoluteChildren = [];
|
||||
const mmopts = {
|
||||
dot: true,
|
||||
nobrace,
|
||||
nocase,
|
||||
noext,
|
||||
noglobstar,
|
||||
optimizationLevel: 2,
|
||||
platform,
|
||||
nocomment: true,
|
||||
nonegate: true,
|
||||
};
|
||||
// this is a little weird, but it gives us a clean set of optimized
|
||||
// minimatch matchers, without getting tripped up if one of them
|
||||
// ends in /** inside a brace section, and it's only inefficient at
|
||||
// the start of the walk, not along it.
|
||||
// It'd be nice if the Pattern class just had a .test() method, but
|
||||
// handling globstars is a bit of a pita, and that code already lives
|
||||
// in minimatch anyway.
|
||||
// Another way would be if maybe Minimatch could take its set/globParts
|
||||
// as an option, and then we could at least just use Pattern to test
|
||||
// for absolute-ness.
|
||||
// Yet another way, Minimatch could take an array of glob strings, and
|
||||
// a cwd option, and do the right thing.
|
||||
for (const ign of ignored) {
|
||||
const mm = new minimatch_1.Minimatch(ign, mmopts);
|
||||
for (let i = 0; i < mm.set.length; i++) {
|
||||
const parsed = mm.set[i];
|
||||
const globParts = mm.globParts[i];
|
||||
const p = new pattern_js_1.Pattern(parsed, globParts, 0, platform);
|
||||
const m = new minimatch_1.Minimatch(p.globString(), mmopts);
|
||||
const children = globParts[globParts.length - 1] === '**';
|
||||
const absolute = p.isAbsolute();
|
||||
if (absolute)
|
||||
this.absolute.push(m);
|
||||
else
|
||||
this.relative.push(m);
|
||||
if (children) {
|
||||
if (absolute)
|
||||
this.absoluteChildren.push(m);
|
||||
else
|
||||
this.relativeChildren.push(m);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
ignored(p) {
|
||||
const fullpath = p.fullpath();
|
||||
const fullpaths = `${fullpath}/`;
|
||||
const relative = p.relative() || '.';
|
||||
const relatives = `${relative}/`;
|
||||
for (const m of this.relative) {
|
||||
if (m.match(relative) || m.match(relatives))
|
||||
return true;
|
||||
}
|
||||
for (const m of this.absolute) {
|
||||
if (m.match(fullpath) || m.match(fullpaths))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
childrenIgnored(p) {
|
||||
const fullpath = p.fullpath() + '/';
|
||||
const relative = (p.relative() || '.') + '/';
|
||||
for (const m of this.relativeChildren) {
|
||||
if (m.match(relative))
|
||||
return true;
|
||||
}
|
||||
for (const m of this.absoluteChildren) {
|
||||
if (m.match(fullpath))
|
||||
true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
exports.Ignore = Ignore;
|
||||
//# sourceMappingURL=ignore.js.map
|
||||
1
node_modules/glob/dist/cjs/ignore.js.map
generated
vendored
Normal file
1
node_modules/glob/dist/cjs/ignore.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"ignore.js","sourceRoot":"","sources":["../../src/ignore.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,kCAAkC;AAClC,kEAAkE;AAClE,6CAA6C;;;AAE7C,yCAAqC;AAErC,6CAAsC;AAQtC,MAAM,eAAe,GACnB,OAAO,OAAO,KAAK,QAAQ;IAC3B,OAAO;IACP,OAAO,OAAO,CAAC,QAAQ,KAAK,QAAQ;IAClC,CAAC,CAAC,OAAO,CAAC,QAAQ;IAClB,CAAC,CAAC,OAAO,CAAA;AAEb;;GAEG;AACH,MAAa,MAAM;IACjB,QAAQ,CAAa;IACrB,gBAAgB,CAAa;IAC7B,QAAQ,CAAa;IACrB,gBAAgB,CAAa;IAE7B,YACE,OAAiB,EACjB,EACE,OAAO,EACP,MAAM,EACN,KAAK,EACL,UAAU,EACV,QAAQ,GAAG,e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AC,gBAAgB,EAAE;YACrC,IAAI,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC;gBAAE,OAAO,IAAI,CAAA;SACnC;QACD,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,gBAAgB,EAAE;YACrC,IAAI,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC;gBAAE,IAAI,CAAA;SAC5B;QACD,OAAO,KAAK,CAAA;IACd,CAAC;CACF;AAxFD,wBAwFC"}
|
||||
39
node_modules/glob/dist/cjs/index-cjs.d.ts
generated
vendored
Normal file
39
node_modules/glob/dist/cjs/index-cjs.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
declare const _default: typeof import("./index.js").glob & {
|
||||
glob: typeof import("./index.js").glob;
|
||||
globSync: typeof import("./index.js").globSync;
|
||||
globStream: typeof import("./index.js").globStream;
|
||||
globStreamSync: typeof import("./index.js").globStreamSync;
|
||||
globIterate: typeof import("./index.js").globIterate;
|
||||
globIterateSync: typeof import("./index.js").globIterateSync;
|
||||
Glob: typeof import("./glob.js").Glob;
|
||||
hasMagic: (pattern: string | string[], options?: import("./glob.js").GlobOptions) => boolean;
|
||||
escape: (s: string, { windowsPathsNoEscape, }?: Pick<import("minimatch").MinimatchOptions, "windowsPathsNoEscape"> | undefined) => string;
|
||||
unescape: (s: string, { windowsPathsNoEscape, }?: Pick<import("minimatch").MinimatchOptions, "windowsPathsNoEscape"> | undefined) => string;
|
||||
} & {
|
||||
default: typeof import("./index.js").glob & {
|
||||
glob: typeof import("./index.js").glob;
|
||||
globSync: typeof import("./index.js").globSync;
|
||||
globStream: typeof import("./index.js").globStream;
|
||||
globStreamSync: typeof import("./index.js").globStreamSync;
|
||||
globIterate: typeof import("./index.js").globIterate;
|
||||
globIterateSync: typeof import("./index.js").globIterateSync;
|
||||
Glob: typeof import("./glob.js").Glob;
|
||||
hasMagic: (pattern: string | string[], options?: import("./glob.js").GlobOptions) => boolean;
|
||||
escape: (s: string, { windowsPathsNoEscape, }?: Pick<import("minimatch").MinimatchOptions, "windowsPathsNoEscape"> | undefined) => string;
|
||||
unescape: (s: string, { windowsPathsNoEscape, }?: Pick<import("minimatch").MinimatchOptions, "windowsPathsNoEscape"> | undefined) => string;
|
||||
};
|
||||
glob: typeof import("./index.js").glob & {
|
||||
glob: typeof import("./index.js").glob;
|
||||
globSync: typeof import("./index.js").globSync;
|
||||
globStream: typeof import("./index.js").globStream;
|
||||
globStreamSync: typeof import("./index.js").globStreamSync;
|
||||
globIterate: typeof import("./index.js").globIterate;
|
||||
globIterateSync: typeof import("./index.js").globIterateSync;
|
||||
Glob: typeof import("./glob.js").Glob;
|
||||
hasMagic: (pattern: string | string[], options?: import("./glob.js").GlobOptions) => boolean;
|
||||
escape: (s: string, { windowsPathsNoEscape, }?: Pick<import("minimatch").MinimatchOptions, "windowsPathsNoEscape"> | undefined) => string;
|
||||
unescape: (s: string, { windowsPathsNoEscape, }?: Pick<import("minimatch").MinimatchOptions, "windowsPathsNoEscape"> | undefined) => string;
|
||||
};
|
||||
};
|
||||
export = _default;
|
||||
//# sourceMappingURL=index-cjs.d.ts.map
|
||||
1
node_modules/glob/dist/cjs/index-cjs.d.ts.map
generated
vendored
Normal file
1
node_modules/glob/dist/cjs/index-cjs.d.ts.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"index-cjs.d.ts","sourceRoot":"","sources":["../../src/index-cjs.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,kBAAqD"}
|
||||
7
node_modules/glob/dist/cjs/index-cjs.js
generated
vendored
Normal file
7
node_modules/glob/dist/cjs/index-cjs.js
generated
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
const index_js_1 = __importDefault(require("./index.js"));
|
||||
module.exports = Object.assign(index_js_1.default, { default: index_js_1.default, glob: index_js_1.default });
|
||||
//# sourceMappingURL=index-cjs.js.map
|
||||
1
node_modules/glob/dist/cjs/index-cjs.js.map
generated
vendored
Normal file
1
node_modules/glob/dist/cjs/index-cjs.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"index-cjs.js","sourceRoot":"","sources":["../../src/index-cjs.ts"],"names":[],"mappings":";;;;AAAA,0DAA6B;AAE7B,iBAAS,MAAM,CAAC,MAAM,CAAC,kBAAI,EAAE,EAAE,OAAO,EAAE,kBAAI,EAAE,IAAI,EAAJ,kBAAI,EAAE,CAAC,CAAA"}
|
||||
72
node_modules/glob/dist/cjs/index.d.ts
generated
vendored
Normal file
72
node_modules/glob/dist/cjs/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
import Minipass from 'minipass';
|
||||
import { Path } from 'path-scurry';
|
||||
import type { GlobOptions, GlobOptionsWithFileTypesFalse, GlobOptionsWithFileTypesTrue, GlobOptionsWithFileTypesUnset } from './glob.js';
|
||||
import { Glob } from './glob.js';
|
||||
/**
|
||||
* Syncronous form of {@link globStream}. Will read all the matches as fast as
|
||||
* you consume them, even all in a single tick if you consume them immediately,
|
||||
* but will still respond to backpressure if they're not consumed immediately.
|
||||
*/
|
||||
export declare function globStreamSync(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Minipass<Path, Path>;
|
||||
export declare function globStreamSync(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): Minipass<string, string>;
|
||||
export declare function globStreamSync(pattern: string | string[], options: GlobOptionsWithFileTypesUnset): Minipass<string, string>;
|
||||
export declare function globStreamSync(pattern: string | string[], options: GlobOptions): Minipass<Path, Path> | Minipass<string, string>;
|
||||
/**
|
||||
* Return a stream that emits all the strings or `Path` objects and
|
||||
* then emits `end` when completed.
|
||||
*/
|
||||
export declare function globStream(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): Minipass<string, string>;
|
||||
export declare function globStream(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Minipass<Path, Path>;
|
||||
export declare function globStream(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): Minipass<string, string>;
|
||||
export declare function globStream(pattern: string | string[], options: GlobOptions): Minipass<Path, Path> | Minipass<string, string>;
|
||||
/**
|
||||
* Synchronous form of {@link glob}
|
||||
*/
|
||||
export declare function globSync(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): string[];
|
||||
export declare function globSync(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Path[];
|
||||
export declare function globSync(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): string[];
|
||||
export declare function globSync(pattern: string | string[], options: GlobOptions): Path[] | string[];
|
||||
/**
|
||||
* Perform an asynchronous glob search for the pattern(s) specified. Returns
|
||||
* [Path](https://isaacs.github.io/path-scurry/classes/PathBase) objects if the
|
||||
* {@link withFileTypes} option is set to `true`. See {@link GlobOptions} for
|
||||
* full option descriptions.
|
||||
*/
|
||||
export declare function glob(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): Promise<string[]>;
|
||||
export declare function glob(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Promise<Path[]>;
|
||||
export declare function glob(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): Promise<string[]>;
|
||||
export declare function glob(pattern: string | string[], options: GlobOptions): Promise<Path[] | string[]>;
|
||||
/**
|
||||
* Return an async iterator for walking glob pattern matches.
|
||||
*/
|
||||
export declare function globIterate(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): AsyncGenerator<string, void, void>;
|
||||
export declare function globIterate(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): AsyncGenerator<Path, void, void>;
|
||||
export declare function globIterate(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): AsyncGenerator<string, void, void>;
|
||||
export declare function globIterate(pattern: string | string[], options: GlobOptions): AsyncGenerator<Path, void, void> | AsyncGenerator<string, void, void>;
|
||||
/**
|
||||
* Return a sync iterator for walking glob pattern matches.
|
||||
*/
|
||||
export declare function globIterateSync(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): Generator<string, void, void>;
|
||||
export declare function globIterateSync(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Generator<Path, void, void>;
|
||||
export declare function globIterateSync(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): Generator<string, void, void>;
|
||||
export declare function globIterateSync(pattern: string | string[], options: GlobOptions): Generator<Path, void, void> | Generator<string, void, void>;
|
||||
export { escape, unescape } from 'minimatch';
|
||||
export { Glob } from './glob.js';
|
||||
export type { GlobOptions, GlobOptionsWithFileTypesFalse, GlobOptionsWithFileTypesTrue, GlobOptionsWithFileTypesUnset, } from './glob.js';
|
||||
export { hasMagic } from './has-magic.js';
|
||||
export type { IgnoreLike } from './ignore.js';
|
||||
export type { MatchStream } from './walker.js';
|
||||
declare const _default: typeof glob & {
|
||||
glob: typeof glob;
|
||||
globSync: typeof globSync;
|
||||
globStream: typeof globStream;
|
||||
globStreamSync: typeof globStreamSync;
|
||||
globIterate: typeof globIterate;
|
||||
globIterateSync: typeof globIterateSync;
|
||||
Glob: typeof Glob;
|
||||
hasMagic: (pattern: string | string[], options?: GlobOptions) => boolean;
|
||||
escape: (s: string, { windowsPathsNoEscape, }?: Pick<import("minimatch").MinimatchOptions, "windowsPathsNoEscape"> | undefined) => string;
|
||||
unescape: (s: string, { windowsPathsNoEscape, }?: Pick<import("minimatch").MinimatchOptions, "windowsPathsNoEscape"> | undefined) => string;
|
||||
};
|
||||
export default _default;
|
||||
//# sourceMappingURL=index.d.ts.map
|
||||
1
node_modules/glob/dist/cjs/index.d.ts.map
generated
vendored
Normal file
1
node_modules/glob/dist/cjs/index.d.ts.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,UAAU,CAAA;AAC/B,OAAO,EAAE,IAAI,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gB,eAAe,CAC7B,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,EAAE,WAAW,GACnB,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AAS9D,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,YAAY,EACV,WAAW,EACX,6BAA6B,EAC7B,4BAA4B,EAC5B,6BAA6B,GAC9B,MAAM,WAAW,CAAA;AAClB,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,YAAY,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAC7C,YAAY,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;;;;;;;;;;;;;AAG9C,wBAWE"}
|
||||
52
node_modules/glob/dist/cjs/index.js
generated
vendored
Normal file
52
node_modules/glob/dist/cjs/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.hasMagic = exports.Glob = exports.unescape = exports.escape = exports.globIterateSync = exports.globIterate = exports.glob = exports.globSync = exports.globStream = exports.globStreamSync = void 0;
|
||||
const minimatch_1 = require("minimatch");
|
||||
const glob_js_1 = require("./glob.js");
|
||||
const has_magic_js_1 = require("./has-magic.js");
|
||||
function globStreamSync(pattern, options = {}) {
|
||||
return new glob_js_1.Glob(pattern, options).streamSync();
|
||||
}
|
||||
exports.globStreamSync = globStreamSync;
|
||||
function globStream(pattern, options = {}) {
|
||||
return new glob_js_1.Glob(pattern, options).stream();
|
||||
}
|
||||
exports.globStream = globStream;
|
||||
function globSync(pattern, options = {}) {
|
||||
return new glob_js_1.Glob(pattern, options).walkSync();
|
||||
}
|
||||
exports.globSync = globSync;
|
||||
async function glob(pattern, options = {}) {
|
||||
return new glob_js_1.Glob(pattern, options).walk();
|
||||
}
|
||||
exports.glob = glob;
|
||||
function globIterate(pattern, options = {}) {
|
||||
return new glob_js_1.Glob(pattern, options).iterate();
|
||||
}
|
||||
exports.globIterate = globIterate;
|
||||
function globIterateSync(pattern, options = {}) {
|
||||
return new glob_js_1.Glob(pattern, options).iterateSync();
|
||||
}
|
||||
exports.globIterateSync = globIterateSync;
|
||||
/* c8 ignore start */
|
||||
var minimatch_2 = require("minimatch");
|
||||
Object.defineProperty(exports, "escape", { enumerable: true, get: function () { return minimatch_2.escape; } });
|
||||
Object.defineProperty(exports, "unescape", { enumerable: true, get: function () { return minimatch_2.unescape; } });
|
||||
var glob_js_2 = require("./glob.js");
|
||||
Object.defineProperty(exports, "Glob", { enumerable: true, get: function () { return glob_js_2.Glob; } });
|
||||
var has_magic_js_2 = require("./has-magic.js");
|
||||
Object.defineProperty(exports, "hasMagic", { enumerable: true, get: function () { return has_magic_js_2.hasMagic; } });
|
||||
/* c8 ignore stop */
|
||||
exports.default = Object.assign(glob, {
|
||||
glob,
|
||||
globSync,
|
||||
globStream,
|
||||
globStreamSync,
|
||||
globIterate,
|
||||
globIterateSync,
|
||||
Glob: glob_js_1.Glob,
|
||||
hasMagic: has_magic_js_1.hasMagic,
|
||||
escape: minimatch_1.escape,
|
||||
unescape: minimatch_1.unescape,
|
||||
});
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
node_modules/glob/dist/cjs/index.js.map
generated
vendored
Normal file
1
node_modules/glob/dist/cjs/index.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,yCAA4C;AAS5C,uCAAgC;AAChC,iDAAyC;AAuBzC,SAAgB,cAAc,CAC5B,OAA0B,EAC1B,UAAuB,EAAE;IAEzB,OAAO,IAAI,cAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,UAAU,EAAE,CAAA;AAChD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CAAA"}
|
||||
3
node_modules/glob/dist/cjs/package.json
generated
vendored
Normal file
3
node_modules/glob/dist/cjs/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"type": "commonjs"
|
||||
}
|
||||
77
node_modules/glob/dist/cjs/pattern.d.ts
generated
vendored
Normal file
77
node_modules/glob/dist/cjs/pattern.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
/// <reference types="node" />
|
||||
import { GLOBSTAR } from 'minimatch';
|
||||
export type MMPattern = string | RegExp | typeof GLOBSTAR;
|
||||
export type PatternList = [p: MMPattern, ...rest: MMPattern[]];
|
||||
export type UNCPatternList = [
|
||||
p0: '',
|
||||
p1: '',
|
||||
p2: string,
|
||||
p3: string,
|
||||
...rest: MMPattern[]
|
||||
];
|
||||
export type DrivePatternList = [p0: string, ...rest: MMPattern[]];
|
||||
export type AbsolutePatternList = [p0: '', ...rest: MMPattern[]];
|
||||
export type GlobList = [p: string, ...rest: string[]];
|
||||
/**
|
||||
* An immutable-ish view on an array of glob parts and their parsed
|
||||
* results
|
||||
*/
|
||||
export declare class Pattern {
|
||||
#private;
|
||||
readonly length: number;
|
||||
constructor(patternList: MMPattern[], globList: string[], index: number, platform: NodeJS.Platform);
|
||||
/**
|
||||
* The first entry in the parsed list of patterns
|
||||
*/
|
||||
pattern(): MMPattern;
|
||||
/**
|
||||
* true of if pattern() returns a string
|
||||
*/
|
||||
isString(): boolean;
|
||||
/**
|
||||
* true of if pattern() returns GLOBSTAR
|
||||
*/
|
||||
isGlobstar(): boolean;
|
||||
/**
|
||||
* true if pattern() returns a regexp
|
||||
*/
|
||||
isRegExp(): boolean;
|
||||
/**
|
||||
* The /-joined set of glob parts that make up this pattern
|
||||
*/
|
||||
globString(): string;
|
||||
/**
|
||||
* true if there are more pattern parts after this one
|
||||
*/
|
||||
hasMore(): boolean;
|
||||
/**
|
||||
* The rest of the pattern after this part, or null if this is the end
|
||||
*/
|
||||
rest(): Pattern | null;
|
||||
/**
|
||||
* true if the pattern represents a //unc/path/ on windows
|
||||
*/
|
||||
isUNC(): boolean;
|
||||
/**
|
||||
* True if the pattern starts with a drive letter on Windows
|
||||
*/
|
||||
isDrive(): boolean;
|
||||
/**
|
||||
* True if the pattern is rooted on an absolute path
|
||||
*/
|
||||
isAbsolute(): boolean;
|
||||
/**
|
||||
* consume the root of the pattern, and return it
|
||||
*/
|
||||
root(): string;
|
||||
/**
|
||||
* Check to see if the current globstar pattern is allowed to follow
|
||||
* a symbolic link.
|
||||
*/
|
||||
checkFollowGlobstar(): boolean;
|
||||
/**
|
||||
* Mark that the current globstar pattern is following a symbolic link
|
||||
*/
|
||||
markFollowGlobstar(): boolean;
|
||||
}
|
||||
//# sourceMappingURL=pattern.d.ts.map
|
||||
1
node_modules/glob/dist/cjs/pattern.d.ts.map
generated
vendored
Normal file
1
node_modules/glob/dist/cjs/pattern.d.ts.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"pattern.d.ts","sourceRoot":"","sources":["../../src/pattern.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AACpC,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,QAAQ,CAAA;AAGzD,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,SAAS,EAAE,CAAC,CAAA;AAC9D,MAAM,MAAM,cAAc,GAAG;IAC3B,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,MAAM;IACV,EAAE,EAAE,MAAM;IACV,GAAG,IAAI,EAAE,SAAS,EAAE;CACrB,CAAA;AACD,MAAM,MAAM,gBAAgB,GAAG,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,SAAS,EAAE,CAAC,CAAA;AACjE,MAAM,MAAM,mBAAmB,GAAG,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,IAAI,EAAE,SAAS,EAAE,CAAC,CAAA;AAChE,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,CAAC,CAAA;AAMrD;;;GAGG;AACH,qBAAa,OAAO;;IAIlB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;gBAUrB,WAAW,EAAE,SAAS,EAAE,EACxB,QAAQ,EAAE,MAAM,EAAE,EAClB,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,CAAC,QAAQ;IA6D3B;;OAEG;IACH,OAAO,IAAI,SAAS;IAIpB;;OAEG;IACH,QAAQ,IAAI,OAAO;IAGnB;;OAEG;IACH,UAAU,IAAI,OAAO;IAGrB;;OAEG;IACH,QAAQ,IAAI,OAAO;IAInB;;OAEG;IACH,UAAU,IAAI,MAAM;IAUpB;;OAEG;IACH,OAAO,IAAI,OAAO;IAIlB;;OAEG;IACH,IAAI,IAAI,OAAO,GAAG,IAAI;IAetB;;OAEG;IACH,KAAK,IAAI,OAAO;IAoBhB;;OAEG;IACH,OAAO,IAAI,OAAO;IAelB;;OAEG;IACH,UAAU,IAAI,OAAO;IAUrB;;OAEG;IACH,IAAI,IAAI,MAAM;IAOd;;;OAGG;IACH,mBAAmB,IAAI,OAAO;IAQ9B;;OAEG;IACH,kBAAkB,IAAI,OAAO;CAM9B"}
|
||||
219
node_modules/glob/dist/cjs/pattern.js
generated
vendored
Normal file
219
node_modules/glob/dist/cjs/pattern.js
generated
vendored
Normal file
|
|
@ -0,0 +1,219 @@
|
|||
"use strict";
|
||||
// this is just a very light wrapper around 2 arrays with an offset index
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Pattern = void 0;
|
||||
const minimatch_1 = require("minimatch");
|
||||
const isPatternList = (pl) => pl.length >= 1;
|
||||
const isGlobList = (gl) => gl.length >= 1;
|
||||
/**
|
||||
* An immutable-ish view on an array of glob parts and their parsed
|
||||
* results
|
||||
*/
|
||||
class Pattern {
|
||||
#patternList;
|
||||
#globList;
|
||||
#index;
|
||||
length;
|
||||
#platform;
|
||||
#rest;
|
||||
#globString;
|
||||
#isDrive;
|
||||
#isUNC;
|
||||
#isAbsolute;
|
||||
#followGlobstar = true;
|
||||
constructor(patternList, globList, index, platform) {
|
||||
if (!isPatternList(patternList)) {
|
||||
throw new TypeError('empty pattern list');
|
||||
}
|
||||
if (!isGlobList(globList)) {
|
||||
throw new TypeError('empty glob list');
|
||||
}
|
||||
if (globList.length !== patternList.length) {
|
||||
throw new TypeError('mismatched pattern list and glob list lengths');
|
||||
}
|
||||
this.length = patternList.length;
|
||||
if (index < 0 || index >= this.length) {
|
||||
throw new TypeError('index out of range');
|
||||
}
|
||||
this.#patternList = patternList;
|
||||
this.#globList = globList;
|
||||
this.#index = index;
|
||||
this.#platform = platform;
|
||||
// normalize root entries of absolute patterns on initial creation.
|
||||
if (this.#index === 0) {
|
||||
// c: => ['c:/']
|
||||
// C:/ => ['C:/']
|
||||
// C:/x => ['C:/', 'x']
|
||||
// //host/share => ['//host/share/']
|
||||
// //host/share/ => ['//host/share/']
|
||||
// //host/share/x => ['//host/share/', 'x']
|
||||
// /etc => ['/', 'etc']
|
||||
// / => ['/']
|
||||
if (this.isUNC()) {
|
||||
// '' / '' / 'host' / 'share'
|
||||
const [p0, p1, p2, p3, ...prest] = this.#patternList;
|
||||
const [g0, g1, g2, g3, ...grest] = this.#globList;
|
||||
if (prest[0] === '') {
|
||||
// ends in /
|
||||
prest.shift();
|
||||
grest.shift();
|
||||
}
|
||||
const p = [p0, p1, p2, p3, ''].join('/');
|
||||
const g = [g0, g1, g2, g3, ''].join('/');
|
||||
this.#patternList = [p, ...prest];
|
||||
this.#globList = [g, ...grest];
|
||||
this.length = this.#patternList.length;
|
||||
}
|
||||
else if (this.isDrive() || this.isAbsolute()) {
|
||||
const [p1, ...prest] = this.#patternList;
|
||||
const [g1, ...grest] = this.#globList;
|
||||
if (prest[0] === '') {
|
||||
// ends in /
|
||||
prest.shift();
|
||||
grest.shift();
|
||||
}
|
||||
const p = p1 + '/';
|
||||
const g = g1 + '/';
|
||||
this.#patternList = [p, ...prest];
|
||||
this.#globList = [g, ...grest];
|
||||
this.length = this.#patternList.length;
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* The first entry in the parsed list of patterns
|
||||
*/
|
||||
pattern() {
|
||||
return this.#patternList[this.#index];
|
||||
}
|
||||
/**
|
||||
* true of if pattern() returns a string
|
||||
*/
|
||||
isString() {
|
||||
return typeof this.#patternList[this.#index] === 'string';
|
||||
}
|
||||
/**
|
||||
* true of if pattern() returns GLOBSTAR
|
||||
*/
|
||||
isGlobstar() {
|
||||
return this.#patternList[this.#index] === minimatch_1.GLOBSTAR;
|
||||
}
|
||||
/**
|
||||
* true if pattern() returns a regexp
|
||||
*/
|
||||
isRegExp() {
|
||||
return this.#patternList[this.#index] instanceof RegExp;
|
||||
}
|
||||
/**
|
||||
* The /-joined set of glob parts that make up this pattern
|
||||
*/
|
||||
globString() {
|
||||
return (this.#globString =
|
||||
this.#globString ||
|
||||
(this.#index === 0
|
||||
? this.isAbsolute()
|
||||
? this.#globList[0] + this.#globList.slice(1).join('/')
|
||||
: this.#globList.join('/')
|
||||
: this.#globList.slice(this.#index).join('/')));
|
||||
}
|
||||
/**
|
||||
* true if there are more pattern parts after this one
|
||||
*/
|
||||
hasMore() {
|
||||
return this.length > this.#index + 1;
|
||||
}
|
||||
/**
|
||||
* The rest of the pattern after this part, or null if this is the end
|
||||
*/
|
||||
rest() {
|
||||
if (this.#rest !== undefined)
|
||||
return this.#rest;
|
||||
if (!this.hasMore())
|
||||
return (this.#rest = null);
|
||||
this.#rest = new Pattern(this.#patternList, this.#globList, this.#index + 1, this.#platform);
|
||||
this.#rest.#isAbsolute = this.#isAbsolute;
|
||||
this.#rest.#isUNC = this.#isUNC;
|
||||
this.#rest.#isDrive = this.#isDrive;
|
||||
return this.#rest;
|
||||
}
|
||||
/**
|
||||
* true if the pattern represents a //unc/path/ on windows
|
||||
*/
|
||||
isUNC() {
|
||||
const pl = this.#patternList;
|
||||
return this.#isUNC !== undefined
|
||||
? this.#isUNC
|
||||
: (this.#isUNC =
|
||||
this.#platform === 'win32' &&
|
||||
this.#index === 0 &&
|
||||
pl[0] === '' &&
|
||||
pl[1] === '' &&
|
||||
typeof pl[2] === 'string' &&
|
||||
!!pl[2] &&
|
||||
typeof pl[3] === 'string' &&
|
||||
!!pl[3]);
|
||||
}
|
||||
// pattern like C:/...
|
||||
// split = ['C:', ...]
|
||||
// XXX: would be nice to handle patterns like `c:*` to test the cwd
|
||||
// in c: for *, but I don't know of a way to even figure out what that
|
||||
// cwd is without actually chdir'ing into it?
|
||||
/**
|
||||
* True if the pattern starts with a drive letter on Windows
|
||||
*/
|
||||
isDrive() {
|
||||
const pl = this.#patternList;
|
||||
return this.#isDrive !== undefined
|
||||
? this.#isDrive
|
||||
: (this.#isDrive =
|
||||
this.#platform === 'win32' &&
|
||||
this.#index === 0 &&
|
||||
this.length > 1 &&
|
||||
typeof pl[0] === 'string' &&
|
||||
/^[a-z]:$/i.test(pl[0]));
|
||||
}
|
||||
// pattern = '/' or '/...' or '/x/...'
|
||||
// split = ['', ''] or ['', ...] or ['', 'x', ...]
|
||||
// Drive and UNC both considered absolute on windows
|
||||
/**
|
||||
* True if the pattern is rooted on an absolute path
|
||||
*/
|
||||
isAbsolute() {
|
||||
const pl = this.#patternList;
|
||||
return this.#isAbsolute !== undefined
|
||||
? this.#isAbsolute
|
||||
: (this.#isAbsolute =
|
||||
(pl[0] === '' && pl.length > 1) ||
|
||||
this.isDrive() ||
|
||||
this.isUNC());
|
||||
}
|
||||
/**
|
||||
* consume the root of the pattern, and return it
|
||||
*/
|
||||
root() {
|
||||
const p = this.#patternList[0];
|
||||
return typeof p === 'string' && this.isAbsolute() && this.#index === 0
|
||||
? p
|
||||
: '';
|
||||
}
|
||||
/**
|
||||
* Check to see if the current globstar pattern is allowed to follow
|
||||
* a symbolic link.
|
||||
*/
|
||||
checkFollowGlobstar() {
|
||||
return !(this.#index === 0 ||
|
||||
!this.isGlobstar() ||
|
||||
!this.#followGlobstar);
|
||||
}
|
||||
/**
|
||||
* Mark that the current globstar pattern is following a symbolic link
|
||||
*/
|
||||
markFollowGlobstar() {
|
||||
if (this.#index === 0 || !this.isGlobstar() || !this.#followGlobstar)
|
||||
return false;
|
||||
this.#followGlobstar = false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
exports.Pattern = Pattern;
|
||||
//# sourceMappingURL=pattern.js.map
|
||||
1
node_modules/glob/dist/cjs/pattern.js.map
generated
vendored
Normal file
1
node_modules/glob/dist/cjs/pattern.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
59
node_modules/glob/dist/cjs/processor.d.ts
generated
vendored
Normal file
59
node_modules/glob/dist/cjs/processor.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
import { MMRegExp } from 'minimatch';
|
||||
import { Path } from 'path-scurry';
|
||||
import { Pattern } from './pattern.js';
|
||||
import { GlobWalkerOpts } from './walker.js';
|
||||
/**
|
||||
* A cache of which patterns have been processed for a given Path
|
||||
*/
|
||||
export declare class HasWalkedCache {
|
||||
store: Map<string, Set<string>>;
|
||||
constructor(store?: Map<string, Set<string>>);
|
||||
copy(): HasWalkedCache;
|
||||
hasWalked(target: Path, pattern: Pattern): boolean | undefined;
|
||||
storeWalked(target: Path, pattern: Pattern): void;
|
||||
}
|
||||
/**
|
||||
* A record of which paths have been matched in a given walk step,
|
||||
* and whether they only are considered a match if they are a directory,
|
||||
* and whether their absolute or relative path should be returned.
|
||||
*/
|
||||
export declare class MatchRecord {
|
||||
store: Map<Path, number>;
|
||||
add(target: Path, absolute: boolean, ifDir: boolean): void;
|
||||
entries(): [Path, boolean, boolean][];
|
||||
}
|
||||
/**
|
||||
* A collection of patterns that must be processed in a subsequent step
|
||||
* for a given path.
|
||||
*/
|
||||
export declare class SubWalks {
|
||||
store: Map<Path, Pattern[]>;
|
||||
add(target: Path, pattern: Pattern): void;
|
||||
get(target: Path): Pattern[];
|
||||
entries(): [Path, Pattern[]][];
|
||||
keys(): Path[];
|
||||
}
|
||||
/**
|
||||
* The class that processes patterns for a given path.
|
||||
*
|
||||
* Handles child entry filtering, and determining whether a path's
|
||||
* directory contents must be read.
|
||||
*/
|
||||
export declare class Processor {
|
||||
hasWalkedCache: HasWalkedCache;
|
||||
matches: MatchRecord;
|
||||
subwalks: SubWalks;
|
||||
patterns?: Pattern[];
|
||||
follow: boolean;
|
||||
dot: boolean;
|
||||
opts: GlobWalkerOpts;
|
||||
constructor(opts: GlobWalkerOpts, hasWalkedCache?: HasWalkedCache);
|
||||
processPatterns(target: Path, patterns: Pattern[]): this;
|
||||
subwalkTargets(): Path[];
|
||||
child(): Processor;
|
||||
filterEntries(parent: Path, entries: Path[]): Processor;
|
||||
testGlobstar(e: Path, pattern: Pattern, rest: Pattern | null, absolute: boolean): void;
|
||||
testRegExp(e: Path, p: MMRegExp, rest: Pattern | null, absolute: boolean): void;
|
||||
testString(e: Path, p: string, rest: Pattern | null, absolute: boolean): void;
|
||||
}
|
||||
//# sourceMappingURL=processor.d.ts.map
|
||||
1
node_modules/glob/dist/cjs/processor.d.ts.map
generated
vendored
Normal file
1
node_modules/glob/dist/cjs/processor.d.ts.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"processor.d.ts","sourceRoot":"","sources":["../../src/processor.ts"],"names":[],"mappings":"AAEA,OAAO,EAAY,QAAQ,EAAE,MAAM,WAAW,CAAA;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAClC,OAAO,EAAa,OAAO,EAAE,MAAM,cAAc,CAAA;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAE5C;;GAEG;AACH,qBAAa,cAAc;IACzB,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAA;g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O,EAAE,IAAI,EAAE,GAAG,SAAS;IAqBvD,YAAY,CACV,CAAC,EAAE,IAAI,EACP,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,OAAO,GAAG,IAAI,EACpB,QAAQ,EAAE,OAAO;IA8CnB,UAAU,CACR,CAAC,EAAE,IAAI,EACP,CAAC,EAAE,QAAQ,EACX,IAAI,EAAE,OAAO,GAAG,IAAI,EACpB,QAAQ,EAAE,OAAO;IAUnB,UAAU,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,IAAI,EAAE,QAAQ,EAAE,OAAO;CASvE"}
|
||||
307
node_modules/glob/dist/cjs/processor.js
generated
vendored
Normal file
307
node_modules/glob/dist/cjs/processor.js
generated
vendored
Normal file
|
|
@ -0,0 +1,307 @@
|
|||
"use strict";
|
||||
// synchronous utility for filtering entries and calculating subwalks
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Processor = exports.SubWalks = exports.MatchRecord = exports.HasWalkedCache = void 0;
|
||||
const minimatch_1 = require("minimatch");
|
||||
/**
|
||||
* A cache of which patterns have been processed for a given Path
|
||||
*/
|
||||
class HasWalkedCache {
|
||||
store;
|
||||
constructor(store = new Map()) {
|
||||
this.store = store;
|
||||
}
|
||||
copy() {
|
||||
return new HasWalkedCache(new Map(this.store));
|
||||
}
|
||||
hasWalked(target, pattern) {
|
||||
return this.store.get(target.fullpath())?.has(pattern.globString());
|
||||
}
|
||||
storeWalked(target, pattern) {
|
||||
const fullpath = target.fullpath();
|
||||
const cached = this.store.get(fullpath);
|
||||
if (cached)
|
||||
cached.add(pattern.globString());
|
||||
else
|
||||
this.store.set(fullpath, new Set([pattern.globString()]));
|
||||
}
|
||||
}
|
||||
exports.HasWalkedCache = HasWalkedCache;
|
||||
/**
|
||||
* A record of which paths have been matched in a given walk step,
|
||||
* and whether they only are considered a match if they are a directory,
|
||||
* and whether their absolute or relative path should be returned.
|
||||
*/
|
||||
class MatchRecord {
|
||||
store = new Map();
|
||||
add(target, absolute, ifDir) {
|
||||
const n = (absolute ? 2 : 0) | (ifDir ? 1 : 0);
|
||||
const current = this.store.get(target);
|
||||
this.store.set(target, current === undefined ? n : n & current);
|
||||
}
|
||||
// match, absolute, ifdir
|
||||
entries() {
|
||||
return [...this.store.entries()].map(([path, n]) => [
|
||||
path,
|
||||
!!(n & 2),
|
||||
!!(n & 1),
|
||||
]);
|
||||
}
|
||||
}
|
||||
exports.MatchRecord = MatchRecord;
|
||||
/**
|
||||
* A collection of patterns that must be processed in a subsequent step
|
||||
* for a given path.
|
||||
*/
|
||||
class SubWalks {
|
||||
store = new Map();
|
||||
add(target, pattern) {
|
||||
if (!target.canReaddir()) {
|
||||
return;
|
||||
}
|
||||
const subs = this.store.get(target);
|
||||
if (subs) {
|
||||
if (!subs.find(p => p.globString() === pattern.globString())) {
|
||||
subs.push(pattern);
|
||||
}
|
||||
}
|
||||
else
|
||||
this.store.set(target, [pattern]);
|
||||
}
|
||||
get(target) {
|
||||
const subs = this.store.get(target);
|
||||
/* c8 ignore start */
|
||||
if (!subs) {
|
||||
throw new Error('attempting to walk unknown path');
|
||||
}
|
||||
/* c8 ignore stop */
|
||||
return subs;
|
||||
}
|
||||
entries() {
|
||||
return this.keys().map(k => [k, this.store.get(k)]);
|
||||
}
|
||||
keys() {
|
||||
return [...this.store.keys()].filter(t => t.canReaddir());
|
||||
}
|
||||
}
|
||||
exports.SubWalks = SubWalks;
|
||||
/**
|
||||
* The class that processes patterns for a given path.
|
||||
*
|
||||
* Handles child entry filtering, and determining whether a path's
|
||||
* directory contents must be read.
|
||||
*/
|
||||
class Processor {
|
||||
hasWalkedCache;
|
||||
matches = new MatchRecord();
|
||||
subwalks = new SubWalks();
|
||||
patterns;
|
||||
follow;
|
||||
dot;
|
||||
opts;
|
||||
constructor(opts, hasWalkedCache) {
|
||||
this.opts = opts;
|
||||
this.follow = !!opts.follow;
|
||||
this.dot = !!opts.dot;
|
||||
this.hasWalkedCache = hasWalkedCache
|
||||
? hasWalkedCache.copy()
|
||||
: new HasWalkedCache();
|
||||
}
|
||||
processPatterns(target, patterns) {
|
||||
this.patterns = patterns;
|
||||
const processingSet = patterns.map(p => [target, p]);
|
||||
// map of paths to the magic-starting subwalks they need to walk
|
||||
// first item in patterns is the filter
|
||||
for (let [t, pattern] of processingSet) {
|
||||
this.hasWalkedCache.storeWalked(t, pattern);
|
||||
const root = pattern.root();
|
||||
const absolute = pattern.isAbsolute() && this.opts.absolute !== false;
|
||||
// start absolute patterns at root
|
||||
if (root) {
|
||||
t = t.resolve(root === '/' && this.opts.root !== undefined
|
||||
? this.opts.root
|
||||
: root);
|
||||
const rest = pattern.rest();
|
||||
if (!rest) {
|
||||
this.matches.add(t, true, false);
|
||||
continue;
|
||||
}
|
||||
else {
|
||||
pattern = rest;
|
||||
}
|
||||
}
|
||||
let p;
|
||||
let rest;
|
||||
let changed = false;
|
||||
while (typeof (p = pattern.pattern()) === 'string' &&
|
||||
(rest = pattern.rest())) {
|
||||
const c = t.resolve(p);
|
||||
// we can be reasonably sure that .. is a readable dir
|
||||
if (c.isUnknown() && p !== '..')
|
||||
break;
|
||||
t = c;
|
||||
pattern = rest;
|
||||
changed = true;
|
||||
}
|
||||
p = pattern.pattern();
|
||||
rest = pattern.rest();
|
||||
if (changed) {
|
||||
if (this.hasWalkedCache.hasWalked(t, pattern))
|
||||
continue;
|
||||
this.hasWalkedCache.storeWalked(t, pattern);
|
||||
}
|
||||
// now we have either a final string for a known entry,
|
||||
// more strings for an unknown entry,
|
||||
// or a pattern starting with magic, mounted on t.
|
||||
if (typeof p === 'string') {
|
||||
// must be final entry
|
||||
if (!rest) {
|
||||
const ifDir = p === '..' || p === '' || p === '.';
|
||||
this.matches.add(t.resolve(p), absolute, ifDir);
|
||||
}
|
||||
else {
|
||||
this.subwalks.add(t, pattern);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
else if (p === minimatch_1.GLOBSTAR) {
|
||||
// if no rest, match and subwalk pattern
|
||||
// if rest, process rest and subwalk pattern
|
||||
// if it's a symlink, but we didn't get here by way of a
|
||||
// globstar match (meaning it's the first time THIS globstar
|
||||
// has traversed a symlink), then we follow it. Otherwise, stop.
|
||||
if (!t.isSymbolicLink() ||
|
||||
this.follow ||
|
||||
pattern.checkFollowGlobstar()) {
|
||||
this.subwalks.add(t, pattern);
|
||||
}
|
||||
const rp = rest?.pattern();
|
||||
const rrest = rest?.rest();
|
||||
if (!rest || ((rp === '' || rp === '.') && !rrest)) {
|
||||
// only HAS to be a dir if it ends in **/ or **/.
|
||||
// but ending in ** will match files as well.
|
||||
this.matches.add(t, absolute, rp === '' || rp === '.');
|
||||
}
|
||||
else {
|
||||
if (rp === '..') {
|
||||
// this would mean you're matching **/.. at the fs root,
|
||||
// and no thanks, I'm not gonna test that specific case.
|
||||
/* c8 ignore start */
|
||||
const tp = t.parent || t;
|
||||
/* c8 ignore stop */
|
||||
if (!rrest)
|
||||
this.matches.add(tp, absolute, true);
|
||||
else if (!this.hasWalkedCache.hasWalked(tp, rrest)) {
|
||||
this.subwalks.add(tp, rrest);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (p instanceof RegExp) {
|
||||
this.subwalks.add(t, pattern);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
subwalkTargets() {
|
||||
return this.subwalks.keys();
|
||||
}
|
||||
child() {
|
||||
return new Processor(this.opts, this.hasWalkedCache);
|
||||
}
|
||||
// return a new Processor containing the subwalks for each
|
||||
// child entry, and a set of matches, and
|
||||
// a hasWalkedCache that's a copy of this one
|
||||
// then we're going to call
|
||||
filterEntries(parent, entries) {
|
||||
const patterns = this.subwalks.get(parent);
|
||||
// put matches and entry walks into the results processor
|
||||
const results = this.child();
|
||||
for (const e of entries) {
|
||||
for (const pattern of patterns) {
|
||||
const absolute = pattern.isAbsolute();
|
||||
const p = pattern.pattern();
|
||||
const rest = pattern.rest();
|
||||
if (p === minimatch_1.GLOBSTAR) {
|
||||
results.testGlobstar(e, pattern, rest, absolute);
|
||||
}
|
||||
else if (p instanceof RegExp) {
|
||||
results.testRegExp(e, p, rest, absolute);
|
||||
}
|
||||
else {
|
||||
results.testString(e, p, rest, absolute);
|
||||
}
|
||||
}
|
||||
}
|
||||
return results;
|
||||
}
|
||||
testGlobstar(e, pattern, rest, absolute) {
|
||||
if (this.dot || !e.name.startsWith('.')) {
|
||||
if (!pattern.hasMore()) {
|
||||
this.matches.add(e, absolute, false);
|
||||
}
|
||||
if (e.canReaddir()) {
|
||||
// if we're in follow mode or it's not a symlink, just keep
|
||||
// testing the same pattern. If there's more after the globstar,
|
||||
// then this symlink consumes the globstar. If not, then we can
|
||||
// follow at most ONE symlink along the way, so we mark it, which
|
||||
// also checks to ensure that it wasn't already marked.
|
||||
if (this.follow || !e.isSymbolicLink()) {
|
||||
this.subwalks.add(e, pattern);
|
||||
}
|
||||
else if (e.isSymbolicLink()) {
|
||||
if (rest && pattern.checkFollowGlobstar()) {
|
||||
this.subwalks.add(e, rest);
|
||||
}
|
||||
else if (pattern.markFollowGlobstar()) {
|
||||
this.subwalks.add(e, pattern);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// if the NEXT thing matches this entry, then also add
|
||||
// the rest.
|
||||
if (rest) {
|
||||
const rp = rest.pattern();
|
||||
if (typeof rp === 'string' &&
|
||||
// dots and empty were handled already
|
||||
rp !== '..' &&
|
||||
rp !== '' &&
|
||||
rp !== '.') {
|
||||
this.testString(e, rp, rest.rest(), absolute);
|
||||
}
|
||||
else if (rp === '..') {
|
||||
/* c8 ignore start */
|
||||
const ep = e.parent || e;
|
||||
/* c8 ignore stop */
|
||||
this.subwalks.add(ep, rest);
|
||||
}
|
||||
else if (rp instanceof RegExp) {
|
||||
this.testRegExp(e, rp, rest.rest(), absolute);
|
||||
}
|
||||
}
|
||||
}
|
||||
testRegExp(e, p, rest, absolute) {
|
||||
if (!p.test(e.name))
|
||||
return;
|
||||
if (!rest) {
|
||||
this.matches.add(e, absolute, false);
|
||||
}
|
||||
else {
|
||||
this.subwalks.add(e, rest);
|
||||
}
|
||||
}
|
||||
testString(e, p, rest, absolute) {
|
||||
// should never happen?
|
||||
if (!e.isNamed(p))
|
||||
return;
|
||||
if (!rest) {
|
||||
this.matches.add(e, absolute, false);
|
||||
}
|
||||
else {
|
||||
this.subwalks.add(e, rest);
|
||||
}
|
||||
}
|
||||
}
|
||||
exports.Processor = Processor;
|
||||
//# sourceMappingURL=processor.js.map
|
||||
1
node_modules/glob/dist/cjs/processor.js.map
generated
vendored
Normal file
1
node_modules/glob/dist/cjs/processor.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
95
node_modules/glob/dist/cjs/walker.d.ts
generated
vendored
Normal file
95
node_modules/glob/dist/cjs/walker.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
/// <reference types="node" />
|
||||
/**
|
||||
* Single-use utility classes to provide functionality to the {@link Glob}
|
||||
* methods.
|
||||
*
|
||||
* @module
|
||||
*/
|
||||
import Minipass from 'minipass';
|
||||
import { Path } from 'path-scurry';
|
||||
import { IgnoreLike } from './ignore.js';
|
||||
import { Pattern } from './pattern.js';
|
||||
import { Processor } from './processor.js';
|
||||
export interface GlobWalkerOpts {
|
||||
absolute?: boolean;
|
||||
allowWindowsEscape?: boolean;
|
||||
cwd?: string | URL;
|
||||
dot?: boolean;
|
||||
dotRelative?: boolean;
|
||||
follow?: boolean;
|
||||
ignore?: string | string[] | IgnoreLike;
|
||||
mark?: boolean;
|
||||
matchBase?: boolean;
|
||||
maxDepth?: number;
|
||||
nobrace?: boolean;
|
||||
nocase?: boolean;
|
||||
nodir?: boolean;
|
||||
noext?: boolean;
|
||||
noglobstar?: boolean;
|
||||
platform?: NodeJS.Platform;
|
||||
realpath?: boolean;
|
||||
root?: string;
|
||||
stat?: boolean;
|
||||
signal?: AbortSignal;
|
||||
windowsPathsNoEscape?: boolean;
|
||||
withFileTypes?: boolean;
|
||||
}
|
||||
export type GWOFileTypesTrue = GlobWalkerOpts & {
|
||||
withFileTypes: true;
|
||||
};
|
||||
export type GWOFileTypesFalse = GlobWalkerOpts & {
|
||||
withFileTypes: false;
|
||||
};
|
||||
export type GWOFileTypesUnset = GlobWalkerOpts & {
|
||||
withFileTypes?: undefined;
|
||||
};
|
||||
export type Result<O extends GlobWalkerOpts> = O extends GWOFileTypesTrue ? Path : O extends GWOFileTypesFalse ? string : O extends GWOFileTypesUnset ? string : Path | string;
|
||||
export type Matches<O extends GlobWalkerOpts> = O extends GWOFileTypesTrue ? Set<Path> : O extends GWOFileTypesFalse ? Set<string> : O extends GWOFileTypesUnset ? Set<string> : Set<Path | string>;
|
||||
export type MatchStream<O extends GlobWalkerOpts> = O extends GWOFileTypesTrue ? Minipass<Path, Path> : O extends GWOFileTypesFalse ? Minipass<string, string> : O extends GWOFileTypesUnset ? Minipass<string, string> : Minipass<Path | string, Path | string>;
|
||||
/**
|
||||
* basic walking utilities that all the glob walker types use
|
||||
*/
|
||||
export declare abstract class GlobUtil<O extends GlobWalkerOpts = GlobWalkerOpts> {
|
||||
#private;
|
||||
path: Path;
|
||||
patterns: Pattern[];
|
||||
opts: O;
|
||||
seen: Set<Path>;
|
||||
paused: boolean;
|
||||
aborted: boolean;
|
||||
signal?: AbortSignal;
|
||||
maxDepth: number;
|
||||
constructor(patterns: Pattern[], path: Path, opts: O);
|
||||
pause(): void;
|
||||
resume(): void;
|
||||
onResume(fn: () => any): void;
|
||||
matchCheck(e: Path, ifDir: boolean): Promise<Path | undefined>;
|
||||
matchCheckTest(e: Path | undefined, ifDir: boolean): Path | undefined;
|
||||
matchCheckSync(e: Path, ifDir: boolean): Path | undefined;
|
||||
abstract matchEmit(p: Result<O>): void;
|
||||
abstract matchEmit(p: string | Path): void;
|
||||
matchFinish(e: Path, absolute: boolean): void;
|
||||
match(e: Path, absolute: boolean, ifDir: boolean): Promise<void>;
|
||||
matchSync(e: Path, absolute: boolean, ifDir: boolean): void;
|
||||
walkCB(target: Path, patterns: Pattern[], cb: () => any): void;
|
||||
walkCB2(target: Path, patterns: Pattern[], processor: Processor, cb: () => any): any;
|
||||
walkCB3(target: Path, entries: Path[], processor: Processor, cb: () => any): void;
|
||||
walkCBSync(target: Path, patterns: Pattern[], cb: () => any): void;
|
||||
walkCB2Sync(target: Path, patterns: Pattern[], processor: Processor, cb: () => any): any;
|
||||
walkCB3Sync(target: Path, entries: Path[], processor: Processor, cb: () => any): void;
|
||||
}
|
||||
export declare class GlobWalker<O extends GlobWalkerOpts = GlobWalkerOpts> extends GlobUtil<O> {
|
||||
matches: O extends GWOFileTypesTrue ? Set<Path> : O extends GWOFileTypesFalse ? Set<string> : O extends GWOFileTypesUnset ? Set<string> : Set<Path | string>;
|
||||
constructor(patterns: Pattern[], path: Path, opts: O);
|
||||
matchEmit(e: Result<O>): void;
|
||||
walk(): Promise<Matches<O>>;
|
||||
walkSync(): Matches<O>;
|
||||
}
|
||||
export declare class GlobStream<O extends GlobWalkerOpts = GlobWalkerOpts> extends GlobUtil<O> {
|
||||
results: O extends GWOFileTypesTrue ? Minipass<Path, Path> : O extends GWOFileTypesFalse ? Minipass<string, string> : O extends GWOFileTypesUnset ? Minipass<string, string> : Minipass<Path | string, Path | string>;
|
||||
constructor(patterns: Pattern[], path: Path, opts: O);
|
||||
matchEmit(e: Result<O>): void;
|
||||
stream(): MatchStream<O>;
|
||||
streamSync(): MatchStream<O>;
|
||||
}
|
||||
//# sourceMappingURL=walker.d.ts.map
|
||||
1
node_modules/glob/dist/cjs/walker.d.ts.map
generated
vendored
Normal file
1
node_modules/glob/dist/cjs/walker.d.ts.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"walker.d.ts","sourceRoot":"","sources":["../../src/walker.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;AACH,OAAO,QAAQ,MAAM,UAAU,CAAA;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAClC,OAAO,EAAU,UAAU,EAAE,M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G,MAAM,CAAC,CAAA;gBAE9B,QAAQ,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAUpD,SAAS,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI;IAM7B,MAAM,IAAI,WAAW,CAAC,CAAC,CAAC;IAgBxB,UAAU,IAAI,WAAW,CAAC,CAAC,CAAC;CAW7B"}
|
||||
370
node_modules/glob/dist/cjs/walker.js
generated
vendored
Normal file
370
node_modules/glob/dist/cjs/walker.js
generated
vendored
Normal file
|
|
@ -0,0 +1,370 @@
|
|||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.GlobStream = exports.GlobWalker = exports.GlobUtil = void 0;
|
||||
/**
|
||||
* Single-use utility classes to provide functionality to the {@link Glob}
|
||||
* methods.
|
||||
*
|
||||
* @module
|
||||
*/
|
||||
const minipass_1 = __importDefault(require("minipass"));
|
||||
const ignore_js_1 = require("./ignore.js");
|
||||
const processor_js_1 = require("./processor.js");
|
||||
const makeIgnore = (ignore, opts) => typeof ignore === 'string'
|
||||
? new ignore_js_1.Ignore([ignore], opts)
|
||||
: Array.isArray(ignore)
|
||||
? new ignore_js_1.Ignore(ignore, opts)
|
||||
: ignore;
|
||||
/**
|
||||
* basic walking utilities that all the glob walker types use
|
||||
*/
|
||||
class GlobUtil {
|
||||
path;
|
||||
patterns;
|
||||
opts;
|
||||
seen = new Set();
|
||||
paused = false;
|
||||
aborted = false;
|
||||
#onResume = [];
|
||||
#ignore;
|
||||
#sep;
|
||||
signal;
|
||||
maxDepth;
|
||||
constructor(patterns, path, opts) {
|
||||
this.patterns = patterns;
|
||||
this.path = path;
|
||||
this.opts = opts;
|
||||
this.#sep = opts.platform === 'win32' ? '\\' : '/';
|
||||
if (opts.ignore) {
|
||||
this.#ignore = makeIgnore(opts.ignore, opts);
|
||||
}
|
||||
// ignore, always set with maxDepth, but it's optional on the
|
||||
// GlobOptions type
|
||||
/* c8 ignore start */
|
||||
this.maxDepth = opts.maxDepth || Infinity;
|
||||
/* c8 ignore stop */
|
||||
if (opts.signal) {
|
||||
this.signal = opts.signal;
|
||||
this.signal.addEventListener('abort', () => {
|
||||
this.#onResume.length = 0;
|
||||
});
|
||||
}
|
||||
}
|
||||
#ignored(path) {
|
||||
return this.seen.has(path) || !!this.#ignore?.ignored?.(path);
|
||||
}
|
||||
#childrenIgnored(path) {
|
||||
return !!this.#ignore?.childrenIgnored?.(path);
|
||||
}
|
||||
// backpressure mechanism
|
||||
pause() {
|
||||
this.paused = true;
|
||||
}
|
||||
resume() {
|
||||
/* c8 ignore start */
|
||||
if (this.signal?.aborted)
|
||||
return;
|
||||
/* c8 ignore stop */
|
||||
this.paused = false;
|
||||
let fn = undefined;
|
||||
while (!this.paused && (fn = this.#onResume.shift())) {
|
||||
fn();
|
||||
}
|
||||
}
|
||||
onResume(fn) {
|
||||
if (this.signal?.aborted)
|
||||
return;
|
||||
/* c8 ignore start */
|
||||
if (!this.paused) {
|
||||
fn();
|
||||
}
|
||||
else {
|
||||
/* c8 ignore stop */
|
||||
this.#onResume.push(fn);
|
||||
}
|
||||
}
|
||||
// do the requisite realpath/stat checking, and return the path
|
||||
// to add or undefined to filter it out.
|
||||
async matchCheck(e, ifDir) {
|
||||
if (ifDir && this.opts.nodir)
|
||||
return undefined;
|
||||
let rpc;
|
||||
if (this.opts.realpath) {
|
||||
rpc = e.realpathCached() || (await e.realpath());
|
||||
if (!rpc)
|
||||
return undefined;
|
||||
e = rpc;
|
||||
}
|
||||
const needStat = e.isUnknown() || this.opts.stat;
|
||||
return this.matchCheckTest(needStat ? await e.lstat() : e, ifDir);
|
||||
}
|
||||
matchCheckTest(e, ifDir) {
|
||||
return e &&
|
||||
(this.maxDepth === Infinity || e.depth() <= this.maxDepth) &&
|
||||
(!ifDir || e.canReaddir()) &&
|
||||
(!this.opts.nodir || !e.isDirectory()) &&
|
||||
!this.#ignored(e)
|
||||
? e
|
||||
: undefined;
|
||||
}
|
||||
matchCheckSync(e, ifDir) {
|
||||
if (ifDir && this.opts.nodir)
|
||||
return undefined;
|
||||
let rpc;
|
||||
if (this.opts.realpath) {
|
||||
rpc = e.realpathCached() || e.realpathSync();
|
||||
if (!rpc)
|
||||
return undefined;
|
||||
e = rpc;
|
||||
}
|
||||
const needStat = e.isUnknown() || this.opts.stat;
|
||||
return this.matchCheckTest(needStat ? e.lstatSync() : e, ifDir);
|
||||
}
|
||||
matchFinish(e, absolute) {
|
||||
if (this.#ignored(e))
|
||||
return;
|
||||
const abs = this.opts.absolute === undefined ? absolute : this.opts.absolute;
|
||||
this.seen.add(e);
|
||||
const mark = this.opts.mark && e.isDirectory() ? this.#sep : '';
|
||||
// ok, we have what we need!
|
||||
if (this.opts.withFileTypes) {
|
||||
this.matchEmit(e);
|
||||
}
|
||||
else if (abs) {
|
||||
this.matchEmit(e.fullpath() + mark);
|
||||
}
|
||||
else {
|
||||
const rel = e.relative();
|
||||
const pre = this.opts.dotRelative && !rel.startsWith('..' + this.#sep)
|
||||
? '.' + this.#sep
|
||||
: '';
|
||||
this.matchEmit(!rel && mark ? '.' + mark : pre + rel + mark);
|
||||
}
|
||||
}
|
||||
async match(e, absolute, ifDir) {
|
||||
const p = await this.matchCheck(e, ifDir);
|
||||
if (p)
|
||||
this.matchFinish(p, absolute);
|
||||
}
|
||||
matchSync(e, absolute, ifDir) {
|
||||
const p = this.matchCheckSync(e, ifDir);
|
||||
if (p)
|
||||
this.matchFinish(p, absolute);
|
||||
}
|
||||
walkCB(target, patterns, cb) {
|
||||
/* c8 ignore start */
|
||||
if (this.signal?.aborted)
|
||||
cb();
|
||||
/* c8 ignore stop */
|
||||
this.walkCB2(target, patterns, new processor_js_1.Processor(this.opts), cb);
|
||||
}
|
||||
walkCB2(target, patterns, processor, cb) {
|
||||
if (this.#childrenIgnored(target))
|
||||
return cb();
|
||||
if (this.signal?.aborted)
|
||||
cb();
|
||||
if (this.paused) {
|
||||
this.onResume(() => this.walkCB2(target, patterns, processor, cb));
|
||||
return;
|
||||
}
|
||||
processor.processPatterns(target, patterns);
|
||||
// done processing. all of the above is sync, can be abstracted out.
|
||||
// subwalks is a map of paths to the entry filters they need
|
||||
// matches is a map of paths to [absolute, ifDir] tuples.
|
||||
let tasks = 1;
|
||||
const next = () => {
|
||||
if (--tasks === 0)
|
||||
cb();
|
||||
};
|
||||
for (const [m, absolute, ifDir] of processor.matches.entries()) {
|
||||
if (this.#ignored(m))
|
||||
continue;
|
||||
tasks++;
|
||||
this.match(m, absolute, ifDir).then(() => next());
|
||||
}
|
||||
for (const t of processor.subwalkTargets()) {
|
||||
if (this.maxDepth !== Infinity && t.depth() >= this.maxDepth) {
|
||||
continue;
|
||||
}
|
||||
tasks++;
|
||||
const childrenCached = t.readdirCached();
|
||||
if (t.calledReaddir())
|
||||
this.walkCB3(t, childrenCached, processor, next);
|
||||
else {
|
||||
t.readdirCB((_, entries) => this.walkCB3(t, entries, processor, next), true);
|
||||
}
|
||||
}
|
||||
next();
|
||||
}
|
||||
walkCB3(target, entries, processor, cb) {
|
||||
processor = processor.filterEntries(target, entries);
|
||||
let tasks = 1;
|
||||
const next = () => {
|
||||
if (--tasks === 0)
|
||||
cb();
|
||||
};
|
||||
for (const [m, absolute, ifDir] of processor.matches.entries()) {
|
||||
if (this.#ignored(m))
|
||||
continue;
|
||||
tasks++;
|
||||
this.match(m, absolute, ifDir).then(() => next());
|
||||
}
|
||||
for (const [target, patterns] of processor.subwalks.entries()) {
|
||||
tasks++;
|
||||
this.walkCB2(target, patterns, processor.child(), next);
|
||||
}
|
||||
next();
|
||||
}
|
||||
walkCBSync(target, patterns, cb) {
|
||||
/* c8 ignore start */
|
||||
if (this.signal?.aborted)
|
||||
cb();
|
||||
/* c8 ignore stop */
|
||||
this.walkCB2Sync(target, patterns, new processor_js_1.Processor(this.opts), cb);
|
||||
}
|
||||
walkCB2Sync(target, patterns, processor, cb) {
|
||||
if (this.#childrenIgnored(target))
|
||||
return cb();
|
||||
if (this.signal?.aborted)
|
||||
cb();
|
||||
if (this.paused) {
|
||||
this.onResume(() => this.walkCB2Sync(target, patterns, processor, cb));
|
||||
return;
|
||||
}
|
||||
processor.processPatterns(target, patterns);
|
||||
// done processing. all of the above is sync, can be abstracted out.
|
||||
// subwalks is a map of paths to the entry filters they need
|
||||
// matches is a map of paths to [absolute, ifDir] tuples.
|
||||
let tasks = 1;
|
||||
const next = () => {
|
||||
if (--tasks === 0)
|
||||
cb();
|
||||
};
|
||||
for (const [m, absolute, ifDir] of processor.matches.entries()) {
|
||||
if (this.#ignored(m))
|
||||
continue;
|
||||
this.matchSync(m, absolute, ifDir);
|
||||
}
|
||||
for (const t of processor.subwalkTargets()) {
|
||||
if (this.maxDepth !== Infinity && t.depth() >= this.maxDepth) {
|
||||
continue;
|
||||
}
|
||||
tasks++;
|
||||
const children = t.readdirSync();
|
||||
this.walkCB3Sync(t, children, processor, next);
|
||||
}
|
||||
next();
|
||||
}
|
||||
walkCB3Sync(target, entries, processor, cb) {
|
||||
processor = processor.filterEntries(target, entries);
|
||||
let tasks = 1;
|
||||
const next = () => {
|
||||
if (--tasks === 0)
|
||||
cb();
|
||||
};
|
||||
for (const [m, absolute, ifDir] of processor.matches.entries()) {
|
||||
if (this.#ignored(m))
|
||||
continue;
|
||||
this.matchSync(m, absolute, ifDir);
|
||||
}
|
||||
for (const [target, patterns] of processor.subwalks.entries()) {
|
||||
tasks++;
|
||||
this.walkCB2Sync(target, patterns, processor.child(), next);
|
||||
}
|
||||
next();
|
||||
}
|
||||
}
|
||||
exports.GlobUtil = GlobUtil;
|
||||
class GlobWalker extends GlobUtil {
|
||||
matches;
|
||||
constructor(patterns, path, opts) {
|
||||
super(patterns, path, opts);
|
||||
this.matches = new Set();
|
||||
}
|
||||
matchEmit(e) {
|
||||
this.matches.add(e);
|
||||
}
|
||||
async walk() {
|
||||
if (this.signal?.aborted)
|
||||
throw this.signal.reason;
|
||||
const t = this.path.isUnknown() ? await this.path.lstat() : this.path;
|
||||
if (t) {
|
||||
await new Promise((res, rej) => {
|
||||
this.walkCB(t, this.patterns, () => {
|
||||
if (this.signal?.aborted) {
|
||||
rej(this.signal.reason);
|
||||
}
|
||||
else {
|
||||
res(this.matches);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
return this.matches;
|
||||
}
|
||||
walkSync() {
|
||||
if (this.signal?.aborted)
|
||||
throw this.signal.reason;
|
||||
const t = this.path.isUnknown() ? this.path.lstatSync() : this.path;
|
||||
// nothing for the callback to do, because this never pauses
|
||||
if (t) {
|
||||
this.walkCBSync(t, this.patterns, () => {
|
||||
if (this.signal?.aborted)
|
||||
throw this.signal.reason;
|
||||
});
|
||||
}
|
||||
return this.matches;
|
||||
}
|
||||
}
|
||||
exports.GlobWalker = GlobWalker;
|
||||
class GlobStream extends GlobUtil {
|
||||
results;
|
||||
constructor(patterns, path, opts) {
|
||||
super(patterns, path, opts);
|
||||
this.results = new minipass_1.default({
|
||||
signal: this.signal,
|
||||
objectMode: true,
|
||||
});
|
||||
this.results.on('drain', () => this.resume());
|
||||
this.results.on('resume', () => this.resume());
|
||||
}
|
||||
matchEmit(e) {
|
||||
this.results.write(e);
|
||||
if (!this.results.flowing)
|
||||
this.pause();
|
||||
}
|
||||
stream() {
|
||||
const target = this.path;
|
||||
if (target.isUnknown()) {
|
||||
target.lstat().then(e => {
|
||||
if (e) {
|
||||
this.walkCB(target, this.patterns, () => this.results.end());
|
||||
}
|
||||
else {
|
||||
this.results.end();
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
this.walkCB(target, this.patterns, () => this.results.end());
|
||||
}
|
||||
return this.results;
|
||||
}
|
||||
streamSync() {
|
||||
const target = this.path.isUnknown()
|
||||
? this.path.lstatSync()
|
||||
: this.path;
|
||||
if (target) {
|
||||
this.walkCBSync(target, this.patterns, () => this.results.end());
|
||||
}
|
||||
else {
|
||||
this.results.end();
|
||||
}
|
||||
return this.results;
|
||||
}
|
||||
}
|
||||
exports.GlobStream = GlobStream;
|
||||
//# sourceMappingURL=walker.js.map
|
||||
1
node_modules/glob/dist/cjs/walker.js.map
generated
vendored
Normal file
1
node_modules/glob/dist/cjs/walker.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
328
node_modules/glob/dist/mjs/glob.d.ts
generated
vendored
Normal file
328
node_modules/glob/dist/mjs/glob.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,328 @@
|
|||
/// <reference types="node" />
|
||||
import { Minimatch } from 'minimatch';
|
||||
import Minipass from 'minipass';
|
||||
import { FSOption, Path, PathScurry } from 'path-scurry';
|
||||
import { IgnoreLike } from './ignore.js';
|
||||
import { Pattern } from './pattern.js';
|
||||
export type MatchSet = Minimatch['set'];
|
||||
export type GlobParts = Exclude<Minimatch['globParts'], undefined>;
|
||||
/**
|
||||
* A `GlobOptions` object may be provided to any of the exported methods, and
|
||||
* must be provided to the `Glob` constructor.
|
||||
*
|
||||
* All options are optional, boolean, and false by default, unless otherwise
|
||||
* noted.
|
||||
*
|
||||
* All resolved options are added to the Glob object as properties.
|
||||
*
|
||||
* If you are running many `glob` operations, you can pass a Glob object as the
|
||||
* `options` argument to a subsequent operation to share the previously loaded
|
||||
* cache.
|
||||
*/
|
||||
export interface GlobOptions {
|
||||
/**
|
||||
* Set to `true` to always receive absolute paths for
|
||||
* matched files. Set to `false` to always return relative paths.
|
||||
*
|
||||
* When this option is not set, absolute paths are returned for patterns
|
||||
* that are absolute, and otherwise paths are returned that are relative
|
||||
* to the `cwd` setting.
|
||||
*
|
||||
* This does _not_ make an extra system call to get
|
||||
* the realpath, it only does string path resolution.
|
||||
*
|
||||
* Conflicts with {@link withFileTypes}
|
||||
*/
|
||||
absolute?: boolean;
|
||||
/**
|
||||
* Set to false to enable {@link windowsPathsNoEscape}
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
allowWindowsEscape?: boolean;
|
||||
/**
|
||||
* The current working directory in which to search. Defaults to
|
||||
* `process.cwd()`.
|
||||
*
|
||||
* May be eiher a string path or a `file://` URL object or string.
|
||||
*/
|
||||
cwd?: string | URL;
|
||||
/**
|
||||
* Include `.dot` files in normal matches and `globstar`
|
||||
* matches. Note that an explicit dot in a portion of the pattern
|
||||
* will always match dot files.
|
||||
*/
|
||||
dot?: boolean;
|
||||
/**
|
||||
* Prepend all relative path strings with `./` (or `.\` on Windows).
|
||||
*
|
||||
* Without this option, returned relative paths are "bare", so instead of
|
||||
* returning `'./foo/bar'`, they are returned as `'foo/bar'`.
|
||||
*
|
||||
* Relative patterns starting with `'../'` are not prepended with `./`, even
|
||||
* if this option is set.
|
||||
*/
|
||||
dotRelative?: boolean;
|
||||
/**
|
||||
* Follow symlinked directories when expanding `**`
|
||||
* patterns. This can result in a lot of duplicate references in
|
||||
* the presence of cyclic links, and make performance quite bad.
|
||||
*
|
||||
* By default, a `**` in a pattern will follow 1 symbolic link if
|
||||
* it is not the first item in the pattern, or none if it is the
|
||||
* first item in the pattern, following the same behavior as Bash.
|
||||
*/
|
||||
follow?: boolean;
|
||||
/**
|
||||
* string or string[], or an object with `ignore` and `ignoreChildren`
|
||||
* methods.
|
||||
*
|
||||
* If a string or string[] is provided, then this is treated as a glob
|
||||
* pattern or array of glob patterns to exclude from matches. To ignore all
|
||||
* children within a directory, as well as the entry itself, append `'/**'`
|
||||
* to the ignore pattern.
|
||||
*
|
||||
* **Note** `ignore` patterns are _always_ in `dot:true` mode, regardless of
|
||||
* any other settings.
|
||||
*
|
||||
* If an object is provided that has `ignored(path)` and/or
|
||||
* `childrenIgnored(path)` methods, then these methods will be called to
|
||||
* determine whether any Path is a match or if its children should be
|
||||
* traversed, respectively.
|
||||
*/
|
||||
ignore?: string | string[] | IgnoreLike;
|
||||
/**
|
||||
* Treat brace expansion like `{a,b}` as a "magic" pattern. Has no
|
||||
* effect if {@link nobrace} is set.
|
||||
*
|
||||
* Only has effect on the {@link hasMagic} function.
|
||||
*/
|
||||
magicalBraces?: boolean;
|
||||
/**
|
||||
* Add a `/` character to directory matches. Note that this requires
|
||||
* additional stat calls in some cases.
|
||||
*/
|
||||
mark?: boolean;
|
||||
/**
|
||||
* Perform a basename-only match if the pattern does not contain any slash
|
||||
* characters. That is, `*.js` would be treated as equivalent to
|
||||
* `**\/*.js`, matching all js files in all directories.
|
||||
*/
|
||||
matchBase?: boolean;
|
||||
/**
|
||||
* Limit the directory traversal to a given depth below the cwd.
|
||||
* Note that this does NOT prevent traversal to sibling folders,
|
||||
* root patterns, and so on. It only limits the maximum folder depth
|
||||
* that the walk will descend, relative to the cwd.
|
||||
*/
|
||||
maxDepth?: number;
|
||||
/**
|
||||
* Do not expand `{a,b}` and `{1..3}` brace sets.
|
||||
*/
|
||||
nobrace?: boolean;
|
||||
/**
|
||||
* Perform a case-insensitive match. This defaults to `true` on macOS and
|
||||
* Windows systems, and `false` on all others.
|
||||
*
|
||||
* **Note** `nocase` should only be explicitly set when it is
|
||||
* known that the filesystem's case sensitivity differs from the
|
||||
* platform default. If set `true` on case-sensitive file
|
||||
* systems, or `false` on case-insensitive file systems, then the
|
||||
* walk may return more or less results than expected.
|
||||
*/
|
||||
nocase?: boolean;
|
||||
/**
|
||||
* Do not match directories, only files. (Note: to match
|
||||
* _only_ directories, put a `/` at the end of the pattern.)
|
||||
*/
|
||||
nodir?: boolean;
|
||||
/**
|
||||
* Do not match "extglob" patterns such as `+(a|b)`.
|
||||
*/
|
||||
noext?: boolean;
|
||||
/**
|
||||
* Do not match `**` against multiple filenames. (Ie, treat it as a normal
|
||||
* `*` instead.)
|
||||
*
|
||||
* Conflicts with {@link matchBase}
|
||||
*/
|
||||
noglobstar?: boolean;
|
||||
/**
|
||||
* Defaults to value of `process.platform` if available, or `'linux'` if
|
||||
* not. Setting `platform:'win32'` on non-Windows systems may cause strange
|
||||
* behavior.
|
||||
*/
|
||||
platform?: NodeJS.Platform;
|
||||
/**
|
||||
* Set to true to call `fs.realpath` on all of the
|
||||
* results. In the case of an entry that cannot be resolved, the
|
||||
* entry is omitted. This incurs a slight performance penalty, of
|
||||
* course, because of the added system calls.
|
||||
*/
|
||||
realpath?: boolean;
|
||||
/**
|
||||
*
|
||||
* A string path resolved against the `cwd` option, which
|
||||
* is used as the starting point for absolute patterns that start
|
||||
* with `/`, (but not drive letters or UNC paths on Windows).
|
||||
*
|
||||
* Note that this _doesn't_ necessarily limit the walk to the
|
||||
* `root` directory, and doesn't affect the cwd starting point for
|
||||
* non-absolute patterns. A pattern containing `..` will still be
|
||||
* able to traverse out of the root directory, if it is not an
|
||||
* actual root directory on the filesystem, and any non-absolute
|
||||
* patterns will be matched in the `cwd`. For example, the
|
||||
* pattern `/../*` with `{root:'/some/path'}` will return all
|
||||
* files in `/some`, not all files in `/some/path`. The pattern
|
||||
* `*` with `{root:'/some/path'}` will return all the entries in
|
||||
* the cwd, not the entries in `/some/path`.
|
||||
*
|
||||
* To start absolute and non-absolute patterns in the same
|
||||
* path, you can use `{root:''}`. However, be aware that on
|
||||
* Windows systems, a pattern like `x:/*` or `//host/share/*` will
|
||||
* _always_ start in the `x:/` or `//host/share` directory,
|
||||
* regardless of the `root` setting.
|
||||
*/
|
||||
root?: string;
|
||||
/**
|
||||
* A [PathScurry](http://npm.im/path-scurry) object used
|
||||
* to traverse the file system. If the `nocase` option is set
|
||||
* explicitly, then any provided `scurry` object must match this
|
||||
* setting.
|
||||
*/
|
||||
scurry?: PathScurry;
|
||||
/**
|
||||
* Call `lstat()` on all entries, whether required or not to determine
|
||||
* whether it's a valid match. When used with {@link withFileTypes}, this
|
||||
* means that matches will include data such as modified time, permissions,
|
||||
* and so on. Note that this will incur a performance cost due to the added
|
||||
* system calls.
|
||||
*/
|
||||
stat?: boolean;
|
||||
/**
|
||||
* An AbortSignal which will cancel the Glob walk when
|
||||
* triggered.
|
||||
*/
|
||||
signal?: AbortSignal;
|
||||
/**
|
||||
* Use `\\` as a path separator _only_, and
|
||||
* _never_ as an escape character. If set, all `\\` characters are
|
||||
* replaced with `/` in the pattern.
|
||||
*
|
||||
* Note that this makes it **impossible** to match against paths
|
||||
* containing literal glob pattern characters, but allows matching
|
||||
* with patterns constructed using `path.join()` and
|
||||
* `path.resolve()` on Windows platforms, mimicking the (buggy!)
|
||||
* behavior of Glob v7 and before on Windows. Please use with
|
||||
* caution, and be mindful of [the caveat below about Windows
|
||||
* paths](#windows). (For legacy reasons, this is also set if
|
||||
* `allowWindowsEscape` is set to the exact value `false`.)
|
||||
*/
|
||||
windowsPathsNoEscape?: boolean;
|
||||
/**
|
||||
* Return [PathScurry](http://npm.im/path-scurry)
|
||||
* `Path` objects instead of strings. These are similar to a
|
||||
* NodeJS `Dirent` object, but with additional methods and
|
||||
* properties.
|
||||
*
|
||||
* Conflicts with {@link absolute}
|
||||
*/
|
||||
withFileTypes?: boolean;
|
||||
/**
|
||||
* An fs implementation to override some or all of the defaults. See
|
||||
* http://npm.im/path-scurry for details about what can be overridden.
|
||||
*/
|
||||
fs?: FSOption;
|
||||
}
|
||||
export type GlobOptionsWithFileTypesTrue = GlobOptions & {
|
||||
withFileTypes: true;
|
||||
absolute?: undefined;
|
||||
};
|
||||
export type GlobOptionsWithFileTypesFalse = GlobOptions & {
|
||||
withFileTypes?: false;
|
||||
};
|
||||
export type GlobOptionsWithFileTypesUnset = GlobOptions & {
|
||||
withFileTypes?: undefined;
|
||||
};
|
||||
export type Result<Opts> = Opts extends GlobOptionsWithFileTypesTrue ? Path : Opts extends GlobOptionsWithFileTypesFalse ? string : Opts extends GlobOptionsWithFileTypesUnset ? string : string | Path;
|
||||
export type Results<Opts> = Result<Opts>[];
|
||||
export type FileTypes<Opts> = Opts extends GlobOptionsWithFileTypesTrue ? true : Opts extends GlobOptionsWithFileTypesFalse ? false : Opts extends GlobOptionsWithFileTypesUnset ? false : boolean;
|
||||
/**
|
||||
* An object that can perform glob pattern traversals.
|
||||
*/
|
||||
export declare class Glob<Opts extends GlobOptions> implements GlobOptions {
|
||||
absolute?: boolean;
|
||||
cwd: string;
|
||||
root?: string;
|
||||
dot: boolean;
|
||||
dotRelative: boolean;
|
||||
follow: boolean;
|
||||
ignore?: string | string[] | IgnoreLike;
|
||||
magicalBraces: boolean;
|
||||
mark?: boolean;
|
||||
matchBase: boolean;
|
||||
maxDepth: number;
|
||||
nobrace: boolean;
|
||||
nocase: boolean;
|
||||
nodir: boolean;
|
||||
noext: boolean;
|
||||
noglobstar: boolean;
|
||||
pattern: string[];
|
||||
platform: NodeJS.Platform;
|
||||
realpath: boolean;
|
||||
scurry: PathScurry;
|
||||
stat: boolean;
|
||||
signal?: AbortSignal;
|
||||
windowsPathsNoEscape: boolean;
|
||||
withFileTypes: FileTypes<Opts>;
|
||||
/**
|
||||
* The options provided to the constructor.
|
||||
*/
|
||||
opts: Opts;
|
||||
/**
|
||||
* An array of parsed immutable {@link Pattern} objects.
|
||||
*/
|
||||
patterns: Pattern[];
|
||||
/**
|
||||
* All options are stored as properties on the `Glob` object.
|
||||
*
|
||||
* See {@link GlobOptions} for full options descriptions.
|
||||
*
|
||||
* Note that a previous `Glob` object can be passed as the
|
||||
* `GlobOptions` to another `Glob` instantiation to re-use settings
|
||||
* and caches with a new pattern.
|
||||
*
|
||||
* Traversal functions can be called multiple times to run the walk
|
||||
* again.
|
||||
*/
|
||||
constructor(pattern: string | string[], opts: Opts);
|
||||
/**
|
||||
* Returns a Promise that resolves to the results array.
|
||||
*/
|
||||
walk(): Promise<Results<Opts>>;
|
||||
/**
|
||||
* synchronous {@link Glob.walk}
|
||||
*/
|
||||
walkSync(): Results<Opts>;
|
||||
/**
|
||||
* Stream results asynchronously.
|
||||
*/
|
||||
stream(): Minipass<Result<Opts>, Result<Opts>>;
|
||||
/**
|
||||
* Stream results synchronously.
|
||||
*/
|
||||
streamSync(): Minipass<Result<Opts>, Result<Opts>>;
|
||||
/**
|
||||
* Default sync iteration function. Returns a Generator that
|
||||
* iterates over the results.
|
||||
*/
|
||||
iterateSync(): Generator<Result<Opts>, void, void>;
|
||||
[Symbol.iterator](): Generator<Result<Opts>, void, void>;
|
||||
/**
|
||||
* Default async iteration function. Returns an AsyncGenerator that
|
||||
* iterates over the results.
|
||||
*/
|
||||
iterate(): AsyncGenerator<Result<Opts>, void, void>;
|
||||
[Symbol.asyncIterator](): AsyncGenerator<Result<Opts>, void, void>;
|
||||
}
|
||||
//# sourceMappingURL=glob.d.ts.map
|
||||
1
node_modules/glob/dist/mjs/glob.d.ts.map
generated
vendored
Normal file
1
node_modules/glob/dist/mjs/glob.d.ts.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"glob.d.ts","sourceRoot":"","sources":["../../src/glob.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAoB,MAAM,WAAW,CAAA;AACvD,OAAO,QAAQ,MAAM,UAAU,CAAA;AAC/B,OAAO,EACL,QAAQ,EACR,IAAI,EACJ,UAAU,EAIX,MAAM,aAAa,CAAA;AAEpB,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAGtC,MAAM,MAAM,QAAQ,GAAG,SAAS,CAAC,KAAK,CAAC,CAAA;AACvC,MAAM,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,SAAS,CAAC,CAAA;AAWlE;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,WAAW;IAC1B;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAE5B;;;;;OAKG;IACH,GAAG,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;IAElB;;;;OAIG;IACH,GAAG,CAAC,EAAE,OAAO,CAAA;IAEb;;;;;;;;OAQG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IAErB;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;I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jB,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAA;IACzB,QAAQ,EAAE,OAAO,CAAA;IACjB,MAAM,EAAE,UAAU,CAAA;IAClB,IAAI,EAAE,OAAO,CAAA;IACb,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB,oBAAoB,EAAE,OAAO,CAAA;IAC7B,aAAa,EAAE,SAAS,CAAC,IAAI,CAAC,CAAA;IAE9B;;OAEG;IACH,IAAI,EAAE,IAAI,CAAA;IAEV;;OAEG;IACH,QAAQ,EAAE,OAAO,EAAE,CAAA;IAEnB;;;;;;;;;;;OAWG;gBACS,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,IAAI,EAAE,IAAI;IA6GlD;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAmBpC;;OAEG;IACH,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAezB;;OAEG;IACH,MAAM,IAAI,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;IAa9C;;OAEG;IACH,UAAU,IAAI,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;IAalD;;;OAGG;IACH,WAAW,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC;IAGlD,CAAC,MAAM,CAAC,QAAQ,CAAC;IAIjB;;;OAGG;IACH,OAAO,IAAI,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC;IAGnD,CAAC,MAAM,CAAC,aAAa,CAAC;CAGvB"}
|
||||
224
node_modules/glob/dist/mjs/glob.js
generated
vendored
Normal file
224
node_modules/glob/dist/mjs/glob.js
generated
vendored
Normal file
|
|
@ -0,0 +1,224 @@
|
|||
import { Minimatch } from 'minimatch';
|
||||
import { PathScurry, PathScurryDarwin, PathScurryPosix, PathScurryWin32, } from 'path-scurry';
|
||||
import { fileURLToPath } from 'url';
|
||||
import { Pattern } from './pattern.js';
|
||||
import { GlobStream, GlobWalker } from './walker.js';
|
||||
// if no process global, just call it linux.
|
||||
// so we default to case-sensitive, / separators
|
||||
const defaultPlatform = typeof process === 'object' &&
|
||||
process &&
|
||||
typeof process.platform === 'string'
|
||||
? process.platform
|
||||
: 'linux';
|
||||
/**
|
||||
* An object that can perform glob pattern traversals.
|
||||
*/
|
||||
export class Glob {
|
||||
absolute;
|
||||
cwd;
|
||||
root;
|
||||
dot;
|
||||
dotRelative;
|
||||
follow;
|
||||
ignore;
|
||||
magicalBraces;
|
||||
mark;
|
||||
matchBase;
|
||||
maxDepth;
|
||||
nobrace;
|
||||
nocase;
|
||||
nodir;
|
||||
noext;
|
||||
noglobstar;
|
||||
pattern;
|
||||
platform;
|
||||
realpath;
|
||||
scurry;
|
||||
stat;
|
||||
signal;
|
||||
windowsPathsNoEscape;
|
||||
withFileTypes;
|
||||
/**
|
||||
* The options provided to the constructor.
|
||||
*/
|
||||
opts;
|
||||
/**
|
||||
* An array of parsed immutable {@link Pattern} objects.
|
||||
*/
|
||||
patterns;
|
||||
/**
|
||||
* All options are stored as properties on the `Glob` object.
|
||||
*
|
||||
* See {@link GlobOptions} for full options descriptions.
|
||||
*
|
||||
* Note that a previous `Glob` object can be passed as the
|
||||
* `GlobOptions` to another `Glob` instantiation to re-use settings
|
||||
* and caches with a new pattern.
|
||||
*
|
||||
* Traversal functions can be called multiple times to run the walk
|
||||
* again.
|
||||
*/
|
||||
constructor(pattern, opts) {
|
||||
this.withFileTypes = !!opts.withFileTypes;
|
||||
this.signal = opts.signal;
|
||||
this.follow = !!opts.follow;
|
||||
this.dot = !!opts.dot;
|
||||
this.dotRelative = !!opts.dotRelative;
|
||||
this.nodir = !!opts.nodir;
|
||||
this.mark = !!opts.mark;
|
||||
if (!opts.cwd) {
|
||||
this.cwd = '';
|
||||
}
|
||||
else if (opts.cwd instanceof URL || opts.cwd.startsWith('file://')) {
|
||||
opts.cwd = fileURLToPath(opts.cwd);
|
||||
}
|
||||
this.cwd = opts.cwd || '';
|
||||
this.root = opts.root;
|
||||
this.magicalBraces = !!opts.magicalBraces;
|
||||
this.nobrace = !!opts.nobrace;
|
||||
this.noext = !!opts.noext;
|
||||
this.realpath = !!opts.realpath;
|
||||
this.absolute = opts.absolute;
|
||||
this.noglobstar = !!opts.noglobstar;
|
||||
this.matchBase = !!opts.matchBase;
|
||||
this.maxDepth =
|
||||
typeof opts.maxDepth === 'number' ? opts.maxDepth : Infinity;
|
||||
this.stat = !!opts.stat;
|
||||
this.ignore = opts.ignore;
|
||||
if (this.withFileTypes && this.absolute !== undefined) {
|
||||
throw new Error('cannot set absolute and withFileTypes:true');
|
||||
}
|
||||
if (typeof pattern === 'string') {
|
||||
pattern = [pattern];
|
||||
}
|
||||
this.windowsPathsNoEscape =
|
||||
!!opts.windowsPathsNoEscape ||
|
||||
opts.allowWindowsEscape === false;
|
||||
if (this.windowsPathsNoEscape) {
|
||||
pattern = pattern.map(p => p.replace(/\\/g, '/'));
|
||||
}
|
||||
if (this.matchBase) {
|
||||
if (opts.noglobstar) {
|
||||
throw new TypeError('base matching requires globstar');
|
||||
}
|
||||
pattern = pattern.map(p => (p.includes('/') ? p : `./**/${p}`));
|
||||
}
|
||||
this.pattern = pattern;
|
||||
this.platform = opts.platform || defaultPlatform;
|
||||
this.opts = { ...opts, platform: this.platform };
|
||||
if (opts.scurry) {
|
||||
this.scurry = opts.scurry;
|
||||
if (opts.nocase !== undefined &&
|
||||
opts.nocase !== opts.scurry.nocase) {
|
||||
throw new Error('nocase option contradicts provided scurry option');
|
||||
}
|
||||
}
|
||||
else {
|
||||
const Scurry = opts.platform === 'win32'
|
||||
? PathScurryWin32
|
||||
: opts.platform === 'darwin'
|
||||
? PathScurryDarwin
|
||||
: opts.platform
|
||||
? PathScurryPosix
|
||||
: PathScurry;
|
||||
this.scurry = new Scurry(this.cwd, {
|
||||
nocase: opts.nocase,
|
||||
fs: opts.fs,
|
||||
});
|
||||
}
|
||||
this.nocase = this.scurry.nocase;
|
||||
const mmo = {
|
||||
// default nocase based on platform
|
||||
...opts,
|
||||
dot: this.dot,
|
||||
matchBase: this.matchBase,
|
||||
nobrace: this.nobrace,
|
||||
nocase: this.nocase,
|
||||
nocaseMagicOnly: true,
|
||||
nocomment: true,
|
||||
noext: this.noext,
|
||||
nonegate: true,
|
||||
optimizationLevel: 2,
|
||||
platform: this.platform,
|
||||
windowsPathsNoEscape: this.windowsPathsNoEscape,
|
||||
};
|
||||
const mms = this.pattern.map(p => new Minimatch(p, mmo));
|
||||
const [matchSet, globParts] = mms.reduce((set, m) => {
|
||||
set[0].push(...m.set);
|
||||
set[1].push(...m.globParts);
|
||||
return set;
|
||||
}, [[], []]);
|
||||
this.patterns = matchSet.map((set, i) => {
|
||||
return new Pattern(set, globParts[i], 0, this.platform);
|
||||
});
|
||||
}
|
||||
async walk() {
|
||||
// Walkers always return array of Path objects, so we just have to
|
||||
// coerce them into the right shape. It will have already called
|
||||
// realpath() if the option was set to do so, so we know that's cached.
|
||||
// start out knowing the cwd, at least
|
||||
return [
|
||||
...(await new GlobWalker(this.patterns, this.scurry.cwd, {
|
||||
...this.opts,
|
||||
maxDepth: this.maxDepth !== Infinity
|
||||
? this.maxDepth + this.scurry.cwd.depth()
|
||||
: Infinity,
|
||||
platform: this.platform,
|
||||
nocase: this.nocase,
|
||||
}).walk()),
|
||||
];
|
||||
}
|
||||
walkSync() {
|
||||
return [
|
||||
...new GlobWalker(this.patterns, this.scurry.cwd, {
|
||||
...this.opts,
|
||||
maxDepth: this.maxDepth !== Infinity
|
||||
? this.maxDepth + this.scurry.cwd.depth()
|
||||
: Infinity,
|
||||
platform: this.platform,
|
||||
nocase: this.nocase,
|
||||
}).walkSync(),
|
||||
];
|
||||
}
|
||||
stream() {
|
||||
return new GlobStream(this.patterns, this.scurry.cwd, {
|
||||
...this.opts,
|
||||
maxDepth: this.maxDepth !== Infinity
|
||||
? this.maxDepth + this.scurry.cwd.depth()
|
||||
: Infinity,
|
||||
platform: this.platform,
|
||||
nocase: this.nocase,
|
||||
}).stream();
|
||||
}
|
||||
streamSync() {
|
||||
return new GlobStream(this.patterns, this.scurry.cwd, {
|
||||
...this.opts,
|
||||
maxDepth: this.maxDepth !== Infinity
|
||||
? this.maxDepth + this.scurry.cwd.depth()
|
||||
: Infinity,
|
||||
platform: this.platform,
|
||||
nocase: this.nocase,
|
||||
}).streamSync();
|
||||
}
|
||||
/**
|
||||
* Default sync iteration function. Returns a Generator that
|
||||
* iterates over the results.
|
||||
*/
|
||||
iterateSync() {
|
||||
return this.streamSync()[Symbol.iterator]();
|
||||
}
|
||||
[Symbol.iterator]() {
|
||||
return this.iterateSync();
|
||||
}
|
||||
/**
|
||||
* Default async iteration function. Returns an AsyncGenerator that
|
||||
* iterates over the results.
|
||||
*/
|
||||
iterate() {
|
||||
return this.stream()[Symbol.asyncIterator]();
|
||||
}
|
||||
[Symbol.asyncIterator]() {
|
||||
return this.iterate();
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=glob.js.map
|
||||
1
node_modules/glob/dist/mjs/glob.js.map
generated
vendored
Normal file
1
node_modules/glob/dist/mjs/glob.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
14
node_modules/glob/dist/mjs/has-magic.d.ts
generated
vendored
Normal file
14
node_modules/glob/dist/mjs/has-magic.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
import { GlobOptions } from './glob.js';
|
||||
/**
|
||||
* Return true if the patterns provided contain any magic glob characters,
|
||||
* given the options provided.
|
||||
*
|
||||
* Brace expansion is not considered "magic" unless the `magicalBraces` option
|
||||
* is set, as brace expansion just turns one string into an array of strings.
|
||||
* So a pattern like `'x{a,b}y'` would return `false`, because `'xay'` and
|
||||
* `'xby'` both do not contain any magic glob characters, and it's treated the
|
||||
* same as if you had called it on `['xay', 'xby']`. When `magicalBraces:true`
|
||||
* is in the options, brace expansion _is_ treated as a pattern having magic.
|
||||
*/
|
||||
export declare const hasMagic: (pattern: string | string[], options?: GlobOptions) => boolean;
|
||||
//# sourceMappingURL=has-magic.d.ts.map
|
||||
1
node_modules/glob/dist/mjs/has-magic.d.ts.map
generated
vendored
Normal file
1
node_modules/glob/dist/mjs/has-magic.d.ts.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"has-magic.d.ts","sourceRoot":"","sources":["../../src/has-magic.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAEvC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,QAAQ,YACV,MAAM,GAAG,MAAM,EAAE,YACjB,WAAW,KACnB,OAQF,CAAA"}
|
||||
23
node_modules/glob/dist/mjs/has-magic.js
generated
vendored
Normal file
23
node_modules/glob/dist/mjs/has-magic.js
generated
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
import { Minimatch } from 'minimatch';
|
||||
/**
|
||||
* Return true if the patterns provided contain any magic glob characters,
|
||||
* given the options provided.
|
||||
*
|
||||
* Brace expansion is not considered "magic" unless the `magicalBraces` option
|
||||
* is set, as brace expansion just turns one string into an array of strings.
|
||||
* So a pattern like `'x{a,b}y'` would return `false`, because `'xay'` and
|
||||
* `'xby'` both do not contain any magic glob characters, and it's treated the
|
||||
* same as if you had called it on `['xay', 'xby']`. When `magicalBraces:true`
|
||||
* is in the options, brace expansion _is_ treated as a pattern having magic.
|
||||
*/
|
||||
export const hasMagic = (pattern, options = {}) => {
|
||||
if (!Array.isArray(pattern)) {
|
||||
pattern = [pattern];
|
||||
}
|
||||
for (const p of pattern) {
|
||||
if (new Minimatch(p, options).hasMagic())
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
//# sourceMappingURL=has-magic.js.map
|
||||
1
node_modules/glob/dist/mjs/has-magic.js.map
generated
vendored
Normal file
1
node_modules/glob/dist/mjs/has-magic.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"has-magic.js","sourceRoot":"","sources":["../../src/has-magic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAGrC;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CACtB,OAA0B,EAC1B,UAAuB,EAAE,EAChB,EAAE;IACX,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;QAC3B,OAAO,GAAG,CAAC,OAAO,CAAC,CAAA;KACpB;IACD,KAAK,MAAM,CAAC,IAAI,OAAO,EAAE;QACvB,IAAI,IAAI,SAAS,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,QAAQ,EAAE;YAAE,OAAO,IAAI,CAAA;KACtD;IACD,OAAO,KAAK,CAAA;AACd,CAAC,CAAA"}
|
||||
20
node_modules/glob/dist/mjs/ignore.d.ts
generated
vendored
Normal file
20
node_modules/glob/dist/mjs/ignore.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
import { Minimatch } from 'minimatch';
|
||||
import { Path } from 'path-scurry';
|
||||
import { GlobWalkerOpts } from './walker.js';
|
||||
export interface IgnoreLike {
|
||||
ignored?: (p: Path) => boolean;
|
||||
childrenIgnored?: (p: Path) => boolean;
|
||||
}
|
||||
/**
|
||||
* Class used to process ignored patterns
|
||||
*/
|
||||
export declare class Ignore implements IgnoreLike {
|
||||
relative: Minimatch[];
|
||||
relativeChildren: Minimatch[];
|
||||
absolute: Minimatch[];
|
||||
absoluteChildren: Minimatch[];
|
||||
constructor(ignored: string[], { nobrace, nocase, noext, noglobstar, platform, }: GlobWalkerOpts);
|
||||
ignored(p: Path): boolean;
|
||||
childrenIgnored(p: Path): boolean;
|
||||
}
|
||||
//# sourceMappingURL=ignore.d.ts.map
|
||||
1
node_modules/glob/dist/mjs/ignore.d.ts.map
generated
vendored
Normal file
1
node_modules/glob/dist/mjs/ignore.d.ts.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"ignore.d.ts","sourceRoot":"","sources":["../../src/ignore.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAElC,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAE5C,MAAM,WAAW,UAAU;IACzB,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,KAAK,OAAO,CAAA;IAC9B,eAAe,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,KAAK,OAAO,CAAA;CACvC;AASD;;GAEG;AACH,qBAAa,MAAO,YAAW,UAAU;IACvC,QAAQ,EAAE,SAAS,EAAE,CAAA;IACrB,gBAAgB,EAAE,SAAS,EAAE,CAAA;IAC7B,QAAQ,EAAE,SAAS,EAAE,CAAA;IACrB,gBAAgB,EAAE,SAAS,EAAE,CAAA;gBAG3B,OAAO,EAAE,MAAM,EAAE,EACjB,EACE,OAAO,EACP,MAAM,EACN,KAAK,EACL,UAAU,EACV,QAA0B,GAC3B,EAAE,cAAc;IAiDnB,OAAO,CAAC,CAAC,EAAE,IAAI,GAAG,OAAO;IAczB,eAAe,CAAC,CAAC,EAAE,IAAI,GAAG,OAAO;CAWlC"}
|
||||
99
node_modules/glob/dist/mjs/ignore.js
generated
vendored
Normal file
99
node_modules/glob/dist/mjs/ignore.js
generated
vendored
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
// give it a pattern, and it'll be able to tell you if
|
||||
// a given path should be ignored.
|
||||
// Ignoring a path ignores its children if the pattern ends in /**
|
||||
// Ignores are always parsed in dot:true mode
|
||||
import { Minimatch } from 'minimatch';
|
||||
import { Pattern } from './pattern.js';
|
||||
const defaultPlatform = typeof process === 'object' &&
|
||||
process &&
|
||||
typeof process.platform === 'string'
|
||||
? process.platform
|
||||
: 'linux';
|
||||
/**
|
||||
* Class used to process ignored patterns
|
||||
*/
|
||||
export class Ignore {
|
||||
relative;
|
||||
relativeChildren;
|
||||
absolute;
|
||||
absoluteChildren;
|
||||
constructor(ignored, { nobrace, nocase, noext, noglobstar, platform = defaultPlatform, }) {
|
||||
this.relative = [];
|
||||
this.absolute = [];
|
||||
this.relativeChildren = [];
|
||||
this.absoluteChildren = [];
|
||||
const mmopts = {
|
||||
dot: true,
|
||||
nobrace,
|
||||
nocase,
|
||||
noext,
|
||||
noglobstar,
|
||||
optimizationLevel: 2,
|
||||
platform,
|
||||
nocomment: true,
|
||||
nonegate: true,
|
||||
};
|
||||
// this is a little weird, but it gives us a clean set of optimized
|
||||
// minimatch matchers, without getting tripped up if one of them
|
||||
// ends in /** inside a brace section, and it's only inefficient at
|
||||
// the start of the walk, not along it.
|
||||
// It'd be nice if the Pattern class just had a .test() method, but
|
||||
// handling globstars is a bit of a pita, and that code already lives
|
||||
// in minimatch anyway.
|
||||
// Another way would be if maybe Minimatch could take its set/globParts
|
||||
// as an option, and then we could at least just use Pattern to test
|
||||
// for absolute-ness.
|
||||
// Yet another way, Minimatch could take an array of glob strings, and
|
||||
// a cwd option, and do the right thing.
|
||||
for (const ign of ignored) {
|
||||
const mm = new Minimatch(ign, mmopts);
|
||||
for (let i = 0; i < mm.set.length; i++) {
|
||||
const parsed = mm.set[i];
|
||||
const globParts = mm.globParts[i];
|
||||
const p = new Pattern(parsed, globParts, 0, platform);
|
||||
const m = new Minimatch(p.globString(), mmopts);
|
||||
const children = globParts[globParts.length - 1] === '**';
|
||||
const absolute = p.isAbsolute();
|
||||
if (absolute)
|
||||
this.absolute.push(m);
|
||||
else
|
||||
this.relative.push(m);
|
||||
if (children) {
|
||||
if (absolute)
|
||||
this.absoluteChildren.push(m);
|
||||
else
|
||||
this.relativeChildren.push(m);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
ignored(p) {
|
||||
const fullpath = p.fullpath();
|
||||
const fullpaths = `${fullpath}/`;
|
||||
const relative = p.relative() || '.';
|
||||
const relatives = `${relative}/`;
|
||||
for (const m of this.relative) {
|
||||
if (m.match(relative) || m.match(relatives))
|
||||
return true;
|
||||
}
|
||||
for (const m of this.absolute) {
|
||||
if (m.match(fullpath) || m.match(fullpaths))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
childrenIgnored(p) {
|
||||
const fullpath = p.fullpath() + '/';
|
||||
const relative = (p.relative() || '.') + '/';
|
||||
for (const m of this.relativeChildren) {
|
||||
if (m.match(relative))
|
||||
return true;
|
||||
}
|
||||
for (const m of this.absoluteChildren) {
|
||||
if (m.match(fullpath))
|
||||
true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=ignore.js.map
|
||||
1
node_modules/glob/dist/mjs/ignore.js.map
generated
vendored
Normal file
1
node_modules/glob/dist/mjs/ignore.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"ignore.js","sourceRoot":"","sources":["../../src/ignore.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,kCAAkC;AAClC,kEAAkE;AAClE,6CAA6C;AAE7C,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAErC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAQtC,MAAM,eAAe,GACnB,OAAO,OAAO,KAAK,QAAQ;IAC3B,OAAO;IACP,OAAO,OAAO,CAAC,QAAQ,KAAK,QAAQ;IAClC,CAAC,CAAC,OAAO,CAAC,QAAQ;IAClB,CAAC,CAAC,OAAO,CAAA;AAEb;;GAEG;AACH,MAAM,OAAO,MAAM;IACjB,QAAQ,CAAa;IACrB,gBAAgB,CAAa;IAC7B,QAAQ,CAAa;IACrB,gBAAgB,CAAa;IAE7B,YACE,OAAiB,EACjB,EACE,OAAO,EACP,MAAM,EACN,KAAK,EACL,UAAU,EACV,QAAQ,GAAG,eAAe,GACX;QAEjB,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAA;QAClB,IAAI,CAAC,QAAQ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AAI,CAAA;SACnC;QACD,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,gBAAgB,EAAE;YACrC,IAAI,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC;gBAAE,IAAI,CAAA;SAC5B;QACD,OAAO,KAAK,CAAA;IACd,CAAC;CACF"}
|
||||
72
node_modules/glob/dist/mjs/index.d.ts
generated
vendored
Normal file
72
node_modules/glob/dist/mjs/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
import Minipass from 'minipass';
|
||||
import { Path } from 'path-scurry';
|
||||
import type { GlobOptions, GlobOptionsWithFileTypesFalse, GlobOptionsWithFileTypesTrue, GlobOptionsWithFileTypesUnset } from './glob.js';
|
||||
import { Glob } from './glob.js';
|
||||
/**
|
||||
* Syncronous form of {@link globStream}. Will read all the matches as fast as
|
||||
* you consume them, even all in a single tick if you consume them immediately,
|
||||
* but will still respond to backpressure if they're not consumed immediately.
|
||||
*/
|
||||
export declare function globStreamSync(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Minipass<Path, Path>;
|
||||
export declare function globStreamSync(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): Minipass<string, string>;
|
||||
export declare function globStreamSync(pattern: string | string[], options: GlobOptionsWithFileTypesUnset): Minipass<string, string>;
|
||||
export declare function globStreamSync(pattern: string | string[], options: GlobOptions): Minipass<Path, Path> | Minipass<string, string>;
|
||||
/**
|
||||
* Return a stream that emits all the strings or `Path` objects and
|
||||
* then emits `end` when completed.
|
||||
*/
|
||||
export declare function globStream(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): Minipass<string, string>;
|
||||
export declare function globStream(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Minipass<Path, Path>;
|
||||
export declare function globStream(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): Minipass<string, string>;
|
||||
export declare function globStream(pattern: string | string[], options: GlobOptions): Minipass<Path, Path> | Minipass<string, string>;
|
||||
/**
|
||||
* Synchronous form of {@link glob}
|
||||
*/
|
||||
export declare function globSync(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): string[];
|
||||
export declare function globSync(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Path[];
|
||||
export declare function globSync(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): string[];
|
||||
export declare function globSync(pattern: string | string[], options: GlobOptions): Path[] | string[];
|
||||
/**
|
||||
* Perform an asynchronous glob search for the pattern(s) specified. Returns
|
||||
* [Path](https://isaacs.github.io/path-scurry/classes/PathBase) objects if the
|
||||
* {@link withFileTypes} option is set to `true`. See {@link GlobOptions} for
|
||||
* full option descriptions.
|
||||
*/
|
||||
export declare function glob(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): Promise<string[]>;
|
||||
export declare function glob(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Promise<Path[]>;
|
||||
export declare function glob(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): Promise<string[]>;
|
||||
export declare function glob(pattern: string | string[], options: GlobOptions): Promise<Path[] | string[]>;
|
||||
/**
|
||||
* Return an async iterator for walking glob pattern matches.
|
||||
*/
|
||||
export declare function globIterate(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): AsyncGenerator<string, void, void>;
|
||||
export declare function globIterate(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): AsyncGenerator<Path, void, void>;
|
||||
export declare function globIterate(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): AsyncGenerator<string, void, void>;
|
||||
export declare function globIterate(pattern: string | string[], options: GlobOptions): AsyncGenerator<Path, void, void> | AsyncGenerator<string, void, void>;
|
||||
/**
|
||||
* Return a sync iterator for walking glob pattern matches.
|
||||
*/
|
||||
export declare function globIterateSync(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): Generator<string, void, void>;
|
||||
export declare function globIterateSync(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Generator<Path, void, void>;
|
||||
export declare function globIterateSync(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): Generator<string, void, void>;
|
||||
export declare function globIterateSync(pattern: string | string[], options: GlobOptions): Generator<Path, void, void> | Generator<string, void, void>;
|
||||
export { escape, unescape } from 'minimatch';
|
||||
export { Glob } from './glob.js';
|
||||
export type { GlobOptions, GlobOptionsWithFileTypesFalse, GlobOptionsWithFileTypesTrue, GlobOptionsWithFileTypesUnset, } from './glob.js';
|
||||
export { hasMagic } from './has-magic.js';
|
||||
export type { IgnoreLike } from './ignore.js';
|
||||
export type { MatchStream } from './walker.js';
|
||||
declare const _default: typeof glob & {
|
||||
glob: typeof glob;
|
||||
globSync: typeof globSync;
|
||||
globStream: typeof globStream;
|
||||
globStreamSync: typeof globStreamSync;
|
||||
globIterate: typeof globIterate;
|
||||
globIterateSync: typeof globIterateSync;
|
||||
Glob: typeof Glob;
|
||||
hasMagic: (pattern: string | string[], options?: GlobOptions) => boolean;
|
||||
escape: (s: string, { windowsPathsNoEscape, }?: Pick<import("minimatch").MinimatchOptions, "windowsPathsNoEscape"> | undefined) => string;
|
||||
unescape: (s: string, { windowsPathsNoEscape, }?: Pick<import("minimatch").MinimatchOptions, "windowsPathsNoEscape"> | undefined) => string;
|
||||
};
|
||||
export default _default;
|
||||
//# sourceMappingURL=index.d.ts.map
|
||||
1
node_modules/glob/dist/mjs/index.d.ts.map
generated
vendored
Normal file
1
node_modules/glob/dist/mjs/index.d.ts.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,UAAU,CAAA;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAClC,OAAO,KAAK,EACV,WAAW,EACX,6BAA6B,EAC7B,4BAA4B,EAC5B,6BAA6B,EAC9B,MAAM,WAAW,CAAA;AAClB,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAGhC;;;;GAIG;AACH,wBAAgB,cA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O,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,YAAY,EACV,WAAW,EACX,6BAA6B,EAC7B,4BAA4B,EAC5B,6BAA6B,GAC9B,MAAM,WAAW,CAAA;AAClB,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,YAAY,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAC7C,YAAY,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;;;;;;;;;;;;;AAG9C,wBAWE"}
|
||||
39
node_modules/glob/dist/mjs/index.js
generated
vendored
Normal file
39
node_modules/glob/dist/mjs/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
import { escape, unescape } from 'minimatch';
|
||||
import { Glob } from './glob.js';
|
||||
import { hasMagic } from './has-magic.js';
|
||||
export function globStreamSync(pattern, options = {}) {
|
||||
return new Glob(pattern, options).streamSync();
|
||||
}
|
||||
export function globStream(pattern, options = {}) {
|
||||
return new Glob(pattern, options).stream();
|
||||
}
|
||||
export function globSync(pattern, options = {}) {
|
||||
return new Glob(pattern, options).walkSync();
|
||||
}
|
||||
export async function glob(pattern, options = {}) {
|
||||
return new Glob(pattern, options).walk();
|
||||
}
|
||||
export function globIterate(pattern, options = {}) {
|
||||
return new Glob(pattern, options).iterate();
|
||||
}
|
||||
export function globIterateSync(pattern, options = {}) {
|
||||
return new Glob(pattern, options).iterateSync();
|
||||
}
|
||||
/* c8 ignore start */
|
||||
export { escape, unescape } from 'minimatch';
|
||||
export { Glob } from './glob.js';
|
||||
export { hasMagic } from './has-magic.js';
|
||||
/* c8 ignore stop */
|
||||
export default Object.assign(glob, {
|
||||
glob,
|
||||
globSync,
|
||||
globStream,
|
||||
globStreamSync,
|
||||
globIterate,
|
||||
globIterateSync,
|
||||
Glob,
|
||||
hasMagic,
|
||||
escape,
|
||||
unescape,
|
||||
});
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
node_modules/glob/dist/mjs/index.js.map
generated
vendored
Normal file
1
node_modules/glob/dist/mjs/index.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAS5C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAuBzC,MAAM,UAAU,cAAc,CAC5B,OAA0B,EAC1B,UAAuB,EAAE;IAEzB,OAAO,IAAI,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,UAAU,EAAE,CAAA;AAChD,CAAC;AAsBD,MAAM,UAAU,UAAU,CACxB,OAA0B,EAC1B,UAAuB,EAAE;IAEzB,OAAO,IAAI,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,MAAM,EAAE,CAAA;AAC5C,CAAC;AAqBD,MAAM,UAAU,QAAQ,CACtB,OAA0B,EAC1B,UAAuB,EAAE;IAEzB,OAAO,IAAI,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,QAAQ,EAAE,CAAA;AAC9C,CAAC;AAwBD,MAAM,CAAC,KAAK,UAAU,IAAI,CACxB,OAA0B,EAC1B,UAAuB,EAAE;IAEzB,OAAO,IAAI,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI,EAAE,CAAA;AAC1C,CAAC;AAqBD,MAAM,UAAU,WAAW,CACzB,OAA0B,EAC1B,UAAuB,EAAE;IAEzB,OAAO,IAAI,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,OAAO,EAAE,CAAA;AAC7C,CAAC;AAqBD,MAAM,UAAU,eAAe,CAC7B,OAA0B,EAC1B,UAAuB,EAAE;IAEzB,OAAO,IAAI,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,WAAW,EAAE,CAAA;AACjD,CAAC;AAED,qBAAqB;AACrB,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAOhC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAGzC,oBAAoB;AAEpB,eAAe,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE;IACjC,IAAI;IACJ,QAAQ;IACR,UAAU;IACV,cAAc;IACd,WAAW;IACX,eAAe;IACf,IAAI;IACJ,QAAQ;IACR,MAAM;IACN,QAAQ;CACT,CAAC,CAAA"}
|
||||
3
node_modules/glob/dist/mjs/package.json
generated
vendored
Normal file
3
node_modules/glob/dist/mjs/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"type": "module"
|
||||
}
|
||||
77
node_modules/glob/dist/mjs/pattern.d.ts
generated
vendored
Normal file
77
node_modules/glob/dist/mjs/pattern.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
/// <reference types="node" />
|
||||
import { GLOBSTAR } from 'minimatch';
|
||||
export type MMPattern = string | RegExp | typeof GLOBSTAR;
|
||||
export type PatternList = [p: MMPattern, ...rest: MMPattern[]];
|
||||
export type UNCPatternList = [
|
||||
p0: '',
|
||||
p1: '',
|
||||
p2: string,
|
||||
p3: string,
|
||||
...rest: MMPattern[]
|
||||
];
|
||||
export type DrivePatternList = [p0: string, ...rest: MMPattern[]];
|
||||
export type AbsolutePatternList = [p0: '', ...rest: MMPattern[]];
|
||||
export type GlobList = [p: string, ...rest: string[]];
|
||||
/**
|
||||
* An immutable-ish view on an array of glob parts and their parsed
|
||||
* results
|
||||
*/
|
||||
export declare class Pattern {
|
||||
#private;
|
||||
readonly length: number;
|
||||
constructor(patternList: MMPattern[], globList: string[], index: number, platform: NodeJS.Platform);
|
||||
/**
|
||||
* The first entry in the parsed list of patterns
|
||||
*/
|
||||
pattern(): MMPattern;
|
||||
/**
|
||||
* true of if pattern() returns a string
|
||||
*/
|
||||
isString(): boolean;
|
||||
/**
|
||||
* true of if pattern() returns GLOBSTAR
|
||||
*/
|
||||
isGlobstar(): boolean;
|
||||
/**
|
||||
* true if pattern() returns a regexp
|
||||
*/
|
||||
isRegExp(): boolean;
|
||||
/**
|
||||
* The /-joined set of glob parts that make up this pattern
|
||||
*/
|
||||
globString(): string;
|
||||
/**
|
||||
* true if there are more pattern parts after this one
|
||||
*/
|
||||
hasMore(): boolean;
|
||||
/**
|
||||
* The rest of the pattern after this part, or null if this is the end
|
||||
*/
|
||||
rest(): Pattern | null;
|
||||
/**
|
||||
* true if the pattern represents a //unc/path/ on windows
|
||||
*/
|
||||
isUNC(): boolean;
|
||||
/**
|
||||
* True if the pattern starts with a drive letter on Windows
|
||||
*/
|
||||
isDrive(): boolean;
|
||||
/**
|
||||
* True if the pattern is rooted on an absolute path
|
||||
*/
|
||||
isAbsolute(): boolean;
|
||||
/**
|
||||
* consume the root of the pattern, and return it
|
||||
*/
|
||||
root(): string;
|
||||
/**
|
||||
* Check to see if the current globstar pattern is allowed to follow
|
||||
* a symbolic link.
|
||||
*/
|
||||
checkFollowGlobstar(): boolean;
|
||||
/**
|
||||
* Mark that the current globstar pattern is following a symbolic link
|
||||
*/
|
||||
markFollowGlobstar(): boolean;
|
||||
}
|
||||
//# sourceMappingURL=pattern.d.ts.map
|
||||
1
node_modules/glob/dist/mjs/pattern.d.ts.map
generated
vendored
Normal file
1
node_modules/glob/dist/mjs/pattern.d.ts.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"pattern.d.ts","sourceRoot":"","sources":["../../src/pattern.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AACpC,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,QAAQ,CAAA;AAGzD,MAAM,MAAM,WAAW,GA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9B;;OAEG;IACH,kBAAkB,IAAI,OAAO;CAM9B"}
|
||||
215
node_modules/glob/dist/mjs/pattern.js
generated
vendored
Normal file
215
node_modules/glob/dist/mjs/pattern.js
generated
vendored
Normal file
|
|
@ -0,0 +1,215 @@
|
|||
// this is just a very light wrapper around 2 arrays with an offset index
|
||||
import { GLOBSTAR } from 'minimatch';
|
||||
const isPatternList = (pl) => pl.length >= 1;
|
||||
const isGlobList = (gl) => gl.length >= 1;
|
||||
/**
|
||||
* An immutable-ish view on an array of glob parts and their parsed
|
||||
* results
|
||||
*/
|
||||
export class Pattern {
|
||||
#patternList;
|
||||
#globList;
|
||||
#index;
|
||||
length;
|
||||
#platform;
|
||||
#rest;
|
||||
#globString;
|
||||
#isDrive;
|
||||
#isUNC;
|
||||
#isAbsolute;
|
||||
#followGlobstar = true;
|
||||
constructor(patternList, globList, index, platform) {
|
||||
if (!isPatternList(patternList)) {
|
||||
throw new TypeError('empty pattern list');
|
||||
}
|
||||
if (!isGlobList(globList)) {
|
||||
throw new TypeError('empty glob list');
|
||||
}
|
||||
if (globList.length !== patternList.length) {
|
||||
throw new TypeError('mismatched pattern list and glob list lengths');
|
||||
}
|
||||
this.length = patternList.length;
|
||||
if (index < 0 || index >= this.length) {
|
||||
throw new TypeError('index out of range');
|
||||
}
|
||||
this.#patternList = patternList;
|
||||
this.#globList = globList;
|
||||
this.#index = index;
|
||||
this.#platform = platform;
|
||||
// normalize root entries of absolute patterns on initial creation.
|
||||
if (this.#index === 0) {
|
||||
// c: => ['c:/']
|
||||
// C:/ => ['C:/']
|
||||
// C:/x => ['C:/', 'x']
|
||||
// //host/share => ['//host/share/']
|
||||
// //host/share/ => ['//host/share/']
|
||||
// //host/share/x => ['//host/share/', 'x']
|
||||
// /etc => ['/', 'etc']
|
||||
// / => ['/']
|
||||
if (this.isUNC()) {
|
||||
// '' / '' / 'host' / 'share'
|
||||
const [p0, p1, p2, p3, ...prest] = this.#patternList;
|
||||
const [g0, g1, g2, g3, ...grest] = this.#globList;
|
||||
if (prest[0] === '') {
|
||||
// ends in /
|
||||
prest.shift();
|
||||
grest.shift();
|
||||
}
|
||||
const p = [p0, p1, p2, p3, ''].join('/');
|
||||
const g = [g0, g1, g2, g3, ''].join('/');
|
||||
this.#patternList = [p, ...prest];
|
||||
this.#globList = [g, ...grest];
|
||||
this.length = this.#patternList.length;
|
||||
}
|
||||
else if (this.isDrive() || this.isAbsolute()) {
|
||||
const [p1, ...prest] = this.#patternList;
|
||||
const [g1, ...grest] = this.#globList;
|
||||
if (prest[0] === '') {
|
||||
// ends in /
|
||||
prest.shift();
|
||||
grest.shift();
|
||||
}
|
||||
const p = p1 + '/';
|
||||
const g = g1 + '/';
|
||||
this.#patternList = [p, ...prest];
|
||||
this.#globList = [g, ...grest];
|
||||
this.length = this.#patternList.length;
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* The first entry in the parsed list of patterns
|
||||
*/
|
||||
pattern() {
|
||||
return this.#patternList[this.#index];
|
||||
}
|
||||
/**
|
||||
* true of if pattern() returns a string
|
||||
*/
|
||||
isString() {
|
||||
return typeof this.#patternList[this.#index] === 'string';
|
||||
}
|
||||
/**
|
||||
* true of if pattern() returns GLOBSTAR
|
||||
*/
|
||||
isGlobstar() {
|
||||
return this.#patternList[this.#index] === GLOBSTAR;
|
||||
}
|
||||
/**
|
||||
* true if pattern() returns a regexp
|
||||
*/
|
||||
isRegExp() {
|
||||
return this.#patternList[this.#index] instanceof RegExp;
|
||||
}
|
||||
/**
|
||||
* The /-joined set of glob parts that make up this pattern
|
||||
*/
|
||||
globString() {
|
||||
return (this.#globString =
|
||||
this.#globString ||
|
||||
(this.#index === 0
|
||||
? this.isAbsolute()
|
||||
? this.#globList[0] + this.#globList.slice(1).join('/')
|
||||
: this.#globList.join('/')
|
||||
: this.#globList.slice(this.#index).join('/')));
|
||||
}
|
||||
/**
|
||||
* true if there are more pattern parts after this one
|
||||
*/
|
||||
hasMore() {
|
||||
return this.length > this.#index + 1;
|
||||
}
|
||||
/**
|
||||
* The rest of the pattern after this part, or null if this is the end
|
||||
*/
|
||||
rest() {
|
||||
if (this.#rest !== undefined)
|
||||
return this.#rest;
|
||||
if (!this.hasMore())
|
||||
return (this.#rest = null);
|
||||
this.#rest = new Pattern(this.#patternList, this.#globList, this.#index + 1, this.#platform);
|
||||
this.#rest.#isAbsolute = this.#isAbsolute;
|
||||
this.#rest.#isUNC = this.#isUNC;
|
||||
this.#rest.#isDrive = this.#isDrive;
|
||||
return this.#rest;
|
||||
}
|
||||
/**
|
||||
* true if the pattern represents a //unc/path/ on windows
|
||||
*/
|
||||
isUNC() {
|
||||
const pl = this.#patternList;
|
||||
return this.#isUNC !== undefined
|
||||
? this.#isUNC
|
||||
: (this.#isUNC =
|
||||
this.#platform === 'win32' &&
|
||||
this.#index === 0 &&
|
||||
pl[0] === '' &&
|
||||
pl[1] === '' &&
|
||||
typeof pl[2] === 'string' &&
|
||||
!!pl[2] &&
|
||||
typeof pl[3] === 'string' &&
|
||||
!!pl[3]);
|
||||
}
|
||||
// pattern like C:/...
|
||||
// split = ['C:', ...]
|
||||
// XXX: would be nice to handle patterns like `c:*` to test the cwd
|
||||
// in c: for *, but I don't know of a way to even figure out what that
|
||||
// cwd is without actually chdir'ing into it?
|
||||
/**
|
||||
* True if the pattern starts with a drive letter on Windows
|
||||
*/
|
||||
isDrive() {
|
||||
const pl = this.#patternList;
|
||||
return this.#isDrive !== undefined
|
||||
? this.#isDrive
|
||||
: (this.#isDrive =
|
||||
this.#platform === 'win32' &&
|
||||
this.#index === 0 &&
|
||||
this.length > 1 &&
|
||||
typeof pl[0] === 'string' &&
|
||||
/^[a-z]:$/i.test(pl[0]));
|
||||
}
|
||||
// pattern = '/' or '/...' or '/x/...'
|
||||
// split = ['', ''] or ['', ...] or ['', 'x', ...]
|
||||
// Drive and UNC both considered absolute on windows
|
||||
/**
|
||||
* True if the pattern is rooted on an absolute path
|
||||
*/
|
||||
isAbsolute() {
|
||||
const pl = this.#patternList;
|
||||
return this.#isAbsolute !== undefined
|
||||
? this.#isAbsolute
|
||||
: (this.#isAbsolute =
|
||||
(pl[0] === '' && pl.length > 1) ||
|
||||
this.isDrive() ||
|
||||
this.isUNC());
|
||||
}
|
||||
/**
|
||||
* consume the root of the pattern, and return it
|
||||
*/
|
||||
root() {
|
||||
const p = this.#patternList[0];
|
||||
return typeof p === 'string' && this.isAbsolute() && this.#index === 0
|
||||
? p
|
||||
: '';
|
||||
}
|
||||
/**
|
||||
* Check to see if the current globstar pattern is allowed to follow
|
||||
* a symbolic link.
|
||||
*/
|
||||
checkFollowGlobstar() {
|
||||
return !(this.#index === 0 ||
|
||||
!this.isGlobstar() ||
|
||||
!this.#followGlobstar);
|
||||
}
|
||||
/**
|
||||
* Mark that the current globstar pattern is following a symbolic link
|
||||
*/
|
||||
markFollowGlobstar() {
|
||||
if (this.#index === 0 || !this.isGlobstar() || !this.#followGlobstar)
|
||||
return false;
|
||||
this.#followGlobstar = false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=pattern.js.map
|
||||
1
node_modules/glob/dist/mjs/pattern.js.map
generated
vendored
Normal file
1
node_modules/glob/dist/mjs/pattern.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
59
node_modules/glob/dist/mjs/processor.d.ts
generated
vendored
Normal file
59
node_modules/glob/dist/mjs/processor.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
import { MMRegExp } from 'minimatch';
|
||||
import { Path } from 'path-scurry';
|
||||
import { Pattern } from './pattern.js';
|
||||
import { GlobWalkerOpts } from './walker.js';
|
||||
/**
|
||||
* A cache of which patterns have been processed for a given Path
|
||||
*/
|
||||
export declare class HasWalkedCache {
|
||||
store: Map<string, Set<string>>;
|
||||
constructor(store?: Map<string, Set<string>>);
|
||||
copy(): HasWalkedCache;
|
||||
hasWalked(target: Path, pattern: Pattern): boolean | undefined;
|
||||
storeWalked(target: Path, pattern: Pattern): void;
|
||||
}
|
||||
/**
|
||||
* A record of which paths have been matched in a given walk step,
|
||||
* and whether they only are considered a match if they are a directory,
|
||||
* and whether their absolute or relative path should be returned.
|
||||
*/
|
||||
export declare class MatchRecord {
|
||||
store: Map<Path, number>;
|
||||
add(target: Path, absolute: boolean, ifDir: boolean): void;
|
||||
entries(): [Path, boolean, boolean][];
|
||||
}
|
||||
/**
|
||||
* A collection of patterns that must be processed in a subsequent step
|
||||
* for a given path.
|
||||
*/
|
||||
export declare class SubWalks {
|
||||
store: Map<Path, Pattern[]>;
|
||||
add(target: Path, pattern: Pattern): void;
|
||||
get(target: Path): Pattern[];
|
||||
entries(): [Path, Pattern[]][];
|
||||
keys(): Path[];
|
||||
}
|
||||
/**
|
||||
* The class that processes patterns for a given path.
|
||||
*
|
||||
* Handles child entry filtering, and determining whether a path's
|
||||
* directory contents must be read.
|
||||
*/
|
||||
export declare class Processor {
|
||||
hasWalkedCache: HasWalkedCache;
|
||||
matches: MatchRecord;
|
||||
subwalks: SubWalks;
|
||||
patterns?: Pattern[];
|
||||
follow: boolean;
|
||||
dot: boolean;
|
||||
opts: GlobWalkerOpts;
|
||||
constructor(opts: GlobWalkerOpts, hasWalkedCache?: HasWalkedCache);
|
||||
processPatterns(target: Path, patterns: Pattern[]): this;
|
||||
subwalkTargets(): Path[];
|
||||
child(): Processor;
|
||||
filterEntries(parent: Path, entries: Path[]): Processor;
|
||||
testGlobstar(e: Path, pattern: Pattern, rest: Pattern | null, absolute: boolean): void;
|
||||
testRegExp(e: Path, p: MMRegExp, rest: Pattern | null, absolute: boolean): void;
|
||||
testString(e: Path, p: string, rest: Pattern | null, absolute: boolean): void;
|
||||
}
|
||||
//# sourceMappingURL=processor.d.ts.map
|
||||
1
node_modules/glob/dist/mjs/processor.d.ts.map
generated
vendored
Normal file
1
node_modules/glob/dist/mjs/processor.d.ts.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"processor.d.ts","sourceRoot":"","sources":["../../src/processor.ts"],"names":[],"mappings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,CAAA;IACpB,MAAM,EAAE,OAAO,CAAA;IACf,GAAG,EAAE,OAAO,CAAA;IACZ,IAAI,EAAE,cAAc,CAAA;gBAER,IAAI,EAAE,cAAc,EAAE,cAAc,CAAC,EAAE,cAAc;IASjE,eAAe,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE;IAsGjD,cAAc,IAAI,IAAI,EAAE;IAIxB,KAAK;IAQL,aAAa,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,SAAS;IAqBvD,YAAY,CACV,CAAC,EAAE,IAAI,EACP,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,OAAO,GAAG,IAAI,EACpB,QAAQ,EAAE,OAAO;IA8CnB,UAAU,CACR,CAAC,EAAE,IAAI,EACP,CAAC,EAAE,QAAQ,EACX,IAAI,EAAE,OAAO,GAAG,IAAI,EACpB,QAAQ,EAAE,OAAO;IAUnB,UAAU,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,IAAI,EAAE,QAAQ,EAAE,OAAO;CASvE"}
|
||||
300
node_modules/glob/dist/mjs/processor.js
generated
vendored
Normal file
300
node_modules/glob/dist/mjs/processor.js
generated
vendored
Normal file
|
|
@ -0,0 +1,300 @@
|
|||
// synchronous utility for filtering entries and calculating subwalks
|
||||
import { GLOBSTAR } from 'minimatch';
|
||||
/**
|
||||
* A cache of which patterns have been processed for a given Path
|
||||
*/
|
||||
export class HasWalkedCache {
|
||||
store;
|
||||
constructor(store = new Map()) {
|
||||
this.store = store;
|
||||
}
|
||||
copy() {
|
||||
return new HasWalkedCache(new Map(this.store));
|
||||
}
|
||||
hasWalked(target, pattern) {
|
||||
return this.store.get(target.fullpath())?.has(pattern.globString());
|
||||
}
|
||||
storeWalked(target, pattern) {
|
||||
const fullpath = target.fullpath();
|
||||
const cached = this.store.get(fullpath);
|
||||
if (cached)
|
||||
cached.add(pattern.globString());
|
||||
else
|
||||
this.store.set(fullpath, new Set([pattern.globString()]));
|
||||
}
|
||||
}
|
||||
/**
|
||||
* A record of which paths have been matched in a given walk step,
|
||||
* and whether they only are considered a match if they are a directory,
|
||||
* and whether their absolute or relative path should be returned.
|
||||
*/
|
||||
export class MatchRecord {
|
||||
store = new Map();
|
||||
add(target, absolute, ifDir) {
|
||||
const n = (absolute ? 2 : 0) | (ifDir ? 1 : 0);
|
||||
const current = this.store.get(target);
|
||||
this.store.set(target, current === undefined ? n : n & current);
|
||||
}
|
||||
// match, absolute, ifdir
|
||||
entries() {
|
||||
return [...this.store.entries()].map(([path, n]) => [
|
||||
path,
|
||||
!!(n & 2),
|
||||
!!(n & 1),
|
||||
]);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* A collection of patterns that must be processed in a subsequent step
|
||||
* for a given path.
|
||||
*/
|
||||
export class SubWalks {
|
||||
store = new Map();
|
||||
add(target, pattern) {
|
||||
if (!target.canReaddir()) {
|
||||
return;
|
||||
}
|
||||
const subs = this.store.get(target);
|
||||
if (subs) {
|
||||
if (!subs.find(p => p.globString() === pattern.globString())) {
|
||||
subs.push(pattern);
|
||||
}
|
||||
}
|
||||
else
|
||||
this.store.set(target, [pattern]);
|
||||
}
|
||||
get(target) {
|
||||
const subs = this.store.get(target);
|
||||
/* c8 ignore start */
|
||||
if (!subs) {
|
||||
throw new Error('attempting to walk unknown path');
|
||||
}
|
||||
/* c8 ignore stop */
|
||||
return subs;
|
||||
}
|
||||
entries() {
|
||||
return this.keys().map(k => [k, this.store.get(k)]);
|
||||
}
|
||||
keys() {
|
||||
return [...this.store.keys()].filter(t => t.canReaddir());
|
||||
}
|
||||
}
|
||||
/**
|
||||
* The class that processes patterns for a given path.
|
||||
*
|
||||
* Handles child entry filtering, and determining whether a path's
|
||||
* directory contents must be read.
|
||||
*/
|
||||
export class Processor {
|
||||
hasWalkedCache;
|
||||
matches = new MatchRecord();
|
||||
subwalks = new SubWalks();
|
||||
patterns;
|
||||
follow;
|
||||
dot;
|
||||
opts;
|
||||
constructor(opts, hasWalkedCache) {
|
||||
this.opts = opts;
|
||||
this.follow = !!opts.follow;
|
||||
this.dot = !!opts.dot;
|
||||
this.hasWalkedCache = hasWalkedCache
|
||||
? hasWalkedCache.copy()
|
||||
: new HasWalkedCache();
|
||||
}
|
||||
processPatterns(target, patterns) {
|
||||
this.patterns = patterns;
|
||||
const processingSet = patterns.map(p => [target, p]);
|
||||
// map of paths to the magic-starting subwalks they need to walk
|
||||
// first item in patterns is the filter
|
||||
for (let [t, pattern] of processingSet) {
|
||||
this.hasWalkedCache.storeWalked(t, pattern);
|
||||
const root = pattern.root();
|
||||
const absolute = pattern.isAbsolute() && this.opts.absolute !== false;
|
||||
// start absolute patterns at root
|
||||
if (root) {
|
||||
t = t.resolve(root === '/' && this.opts.root !== undefined
|
||||
? this.opts.root
|
||||
: root);
|
||||
const rest = pattern.rest();
|
||||
if (!rest) {
|
||||
this.matches.add(t, true, false);
|
||||
continue;
|
||||
}
|
||||
else {
|
||||
pattern = rest;
|
||||
}
|
||||
}
|
||||
let p;
|
||||
let rest;
|
||||
let changed = false;
|
||||
while (typeof (p = pattern.pattern()) === 'string' &&
|
||||
(rest = pattern.rest())) {
|
||||
const c = t.resolve(p);
|
||||
// we can be reasonably sure that .. is a readable dir
|
||||
if (c.isUnknown() && p !== '..')
|
||||
break;
|
||||
t = c;
|
||||
pattern = rest;
|
||||
changed = true;
|
||||
}
|
||||
p = pattern.pattern();
|
||||
rest = pattern.rest();
|
||||
if (changed) {
|
||||
if (this.hasWalkedCache.hasWalked(t, pattern))
|
||||
continue;
|
||||
this.hasWalkedCache.storeWalked(t, pattern);
|
||||
}
|
||||
// now we have either a final string for a known entry,
|
||||
// more strings for an unknown entry,
|
||||
// or a pattern starting with magic, mounted on t.
|
||||
if (typeof p === 'string') {
|
||||
// must be final entry
|
||||
if (!rest) {
|
||||
const ifDir = p === '..' || p === '' || p === '.';
|
||||
this.matches.add(t.resolve(p), absolute, ifDir);
|
||||
}
|
||||
else {
|
||||
this.subwalks.add(t, pattern);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
else if (p === GLOBSTAR) {
|
||||
// if no rest, match and subwalk pattern
|
||||
// if rest, process rest and subwalk pattern
|
||||
// if it's a symlink, but we didn't get here by way of a
|
||||
// globstar match (meaning it's the first time THIS globstar
|
||||
// has traversed a symlink), then we follow it. Otherwise, stop.
|
||||
if (!t.isSymbolicLink() ||
|
||||
this.follow ||
|
||||
pattern.checkFollowGlobstar()) {
|
||||
this.subwalks.add(t, pattern);
|
||||
}
|
||||
const rp = rest?.pattern();
|
||||
const rrest = rest?.rest();
|
||||
if (!rest || ((rp === '' || rp === '.') && !rrest)) {
|
||||
// only HAS to be a dir if it ends in **/ or **/.
|
||||
// but ending in ** will match files as well.
|
||||
this.matches.add(t, absolute, rp === '' || rp === '.');
|
||||
}
|
||||
else {
|
||||
if (rp === '..') {
|
||||
// this would mean you're matching **/.. at the fs root,
|
||||
// and no thanks, I'm not gonna test that specific case.
|
||||
/* c8 ignore start */
|
||||
const tp = t.parent || t;
|
||||
/* c8 ignore stop */
|
||||
if (!rrest)
|
||||
this.matches.add(tp, absolute, true);
|
||||
else if (!this.hasWalkedCache.hasWalked(tp, rrest)) {
|
||||
this.subwalks.add(tp, rrest);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (p instanceof RegExp) {
|
||||
this.subwalks.add(t, pattern);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
subwalkTargets() {
|
||||
return this.subwalks.keys();
|
||||
}
|
||||
child() {
|
||||
return new Processor(this.opts, this.hasWalkedCache);
|
||||
}
|
||||
// return a new Processor containing the subwalks for each
|
||||
// child entry, and a set of matches, and
|
||||
// a hasWalkedCache that's a copy of this one
|
||||
// then we're going to call
|
||||
filterEntries(parent, entries) {
|
||||
const patterns = this.subwalks.get(parent);
|
||||
// put matches and entry walks into the results processor
|
||||
const results = this.child();
|
||||
for (const e of entries) {
|
||||
for (const pattern of patterns) {
|
||||
const absolute = pattern.isAbsolute();
|
||||
const p = pattern.pattern();
|
||||
const rest = pattern.rest();
|
||||
if (p === GLOBSTAR) {
|
||||
results.testGlobstar(e, pattern, rest, absolute);
|
||||
}
|
||||
else if (p instanceof RegExp) {
|
||||
results.testRegExp(e, p, rest, absolute);
|
||||
}
|
||||
else {
|
||||
results.testString(e, p, rest, absolute);
|
||||
}
|
||||
}
|
||||
}
|
||||
return results;
|
||||
}
|
||||
testGlobstar(e, pattern, rest, absolute) {
|
||||
if (this.dot || !e.name.startsWith('.')) {
|
||||
if (!pattern.hasMore()) {
|
||||
this.matches.add(e, absolute, false);
|
||||
}
|
||||
if (e.canReaddir()) {
|
||||
// if we're in follow mode or it's not a symlink, just keep
|
||||
// testing the same pattern. If there's more after the globstar,
|
||||
// then this symlink consumes the globstar. If not, then we can
|
||||
// follow at most ONE symlink along the way, so we mark it, which
|
||||
// also checks to ensure that it wasn't already marked.
|
||||
if (this.follow || !e.isSymbolicLink()) {
|
||||
this.subwalks.add(e, pattern);
|
||||
}
|
||||
else if (e.isSymbolicLink()) {
|
||||
if (rest && pattern.checkFollowGlobstar()) {
|
||||
this.subwalks.add(e, rest);
|
||||
}
|
||||
else if (pattern.markFollowGlobstar()) {
|
||||
this.subwalks.add(e, pattern);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// if the NEXT thing matches this entry, then also add
|
||||
// the rest.
|
||||
if (rest) {
|
||||
const rp = rest.pattern();
|
||||
if (typeof rp === 'string' &&
|
||||
// dots and empty were handled already
|
||||
rp !== '..' &&
|
||||
rp !== '' &&
|
||||
rp !== '.') {
|
||||
this.testString(e, rp, rest.rest(), absolute);
|
||||
}
|
||||
else if (rp === '..') {
|
||||
/* c8 ignore start */
|
||||
const ep = e.parent || e;
|
||||
/* c8 ignore stop */
|
||||
this.subwalks.add(ep, rest);
|
||||
}
|
||||
else if (rp instanceof RegExp) {
|
||||
this.testRegExp(e, rp, rest.rest(), absolute);
|
||||
}
|
||||
}
|
||||
}
|
||||
testRegExp(e, p, rest, absolute) {
|
||||
if (!p.test(e.name))
|
||||
return;
|
||||
if (!rest) {
|
||||
this.matches.add(e, absolute, false);
|
||||
}
|
||||
else {
|
||||
this.subwalks.add(e, rest);
|
||||
}
|
||||
}
|
||||
testString(e, p, rest, absolute) {
|
||||
// should never happen?
|
||||
if (!e.isNamed(p))
|
||||
return;
|
||||
if (!rest) {
|
||||
this.matches.add(e, absolute, false);
|
||||
}
|
||||
else {
|
||||
this.subwalks.add(e, rest);
|
||||
}
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=processor.js.map
|
||||
1
node_modules/glob/dist/mjs/processor.js.map
generated
vendored
Normal file
1
node_modules/glob/dist/mjs/processor.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
95
node_modules/glob/dist/mjs/walker.d.ts
generated
vendored
Normal file
95
node_modules/glob/dist/mjs/walker.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
/// <reference types="node" />
|
||||
/**
|
||||
* Single-use utility classes to provide functionality to the {@link Glob}
|
||||
* methods.
|
||||
*
|
||||
* @module
|
||||
*/
|
||||
import Minipass from 'minipass';
|
||||
import { Path } from 'path-scurry';
|
||||
import { IgnoreLike } from './ignore.js';
|
||||
import { Pattern } from './pattern.js';
|
||||
import { Processor } from './processor.js';
|
||||
export interface GlobWalkerOpts {
|
||||
absolute?: boolean;
|
||||
allowWindowsEscape?: boolean;
|
||||
cwd?: string | URL;
|
||||
dot?: boolean;
|
||||
dotRelative?: boolean;
|
||||
follow?: boolean;
|
||||
ignore?: string | string[] | IgnoreLike;
|
||||
mark?: boolean;
|
||||
matchBase?: boolean;
|
||||
maxDepth?: number;
|
||||
nobrace?: boolean;
|
||||
nocase?: boolean;
|
||||
nodir?: boolean;
|
||||
noext?: boolean;
|
||||
noglobstar?: boolean;
|
||||
platform?: NodeJS.Platform;
|
||||
realpath?: boolean;
|
||||
root?: string;
|
||||
stat?: boolean;
|
||||
signal?: AbortSignal;
|
||||
windowsPathsNoEscape?: boolean;
|
||||
withFileTypes?: boolean;
|
||||
}
|
||||
export type GWOFileTypesTrue = GlobWalkerOpts & {
|
||||
withFileTypes: true;
|
||||
};
|
||||
export type GWOFileTypesFalse = GlobWalkerOpts & {
|
||||
withFileTypes: false;
|
||||
};
|
||||
export type GWOFileTypesUnset = GlobWalkerOpts & {
|
||||
withFileTypes?: undefined;
|
||||
};
|
||||
export type Result<O extends GlobWalkerOpts> = O extends GWOFileTypesTrue ? Path : O extends GWOFileTypesFalse ? string : O extends GWOFileTypesUnset ? string : Path | string;
|
||||
export type Matches<O extends GlobWalkerOpts> = O extends GWOFileTypesTrue ? Set<Path> : O extends GWOFileTypesFalse ? Set<string> : O extends GWOFileTypesUnset ? Set<string> : Set<Path | string>;
|
||||
export type MatchStream<O extends GlobWalkerOpts> = O extends GWOFileTypesTrue ? Minipass<Path, Path> : O extends GWOFileTypesFalse ? Minipass<string, string> : O extends GWOFileTypesUnset ? Minipass<string, string> : Minipass<Path | string, Path | string>;
|
||||
/**
|
||||
* basic walking utilities that all the glob walker types use
|
||||
*/
|
||||
export declare abstract class GlobUtil<O extends GlobWalkerOpts = GlobWalkerOpts> {
|
||||
#private;
|
||||
path: Path;
|
||||
patterns: Pattern[];
|
||||
opts: O;
|
||||
seen: Set<Path>;
|
||||
paused: boolean;
|
||||
aborted: boolean;
|
||||
signal?: AbortSignal;
|
||||
maxDepth: number;
|
||||
constructor(patterns: Pattern[], path: Path, opts: O);
|
||||
pause(): void;
|
||||
resume(): void;
|
||||
onResume(fn: () => any): void;
|
||||
matchCheck(e: Path, ifDir: boolean): Promise<Path | undefined>;
|
||||
matchCheckTest(e: Path | undefined, ifDir: boolean): Path | undefined;
|
||||
matchCheckSync(e: Path, ifDir: boolean): Path | undefined;
|
||||
abstract matchEmit(p: Result<O>): void;
|
||||
abstract matchEmit(p: string | Path): void;
|
||||
matchFinish(e: Path, absolute: boolean): void;
|
||||
match(e: Path, absolute: boolean, ifDir: boolean): Promise<void>;
|
||||
matchSync(e: Path, absolute: boolean, ifDir: boolean): void;
|
||||
walkCB(target: Path, patterns: Pattern[], cb: () => any): void;
|
||||
walkCB2(target: Path, patterns: Pattern[], processor: Processor, cb: () => any): any;
|
||||
walkCB3(target: Path, entries: Path[], processor: Processor, cb: () => any): void;
|
||||
walkCBSync(target: Path, patterns: Pattern[], cb: () => any): void;
|
||||
walkCB2Sync(target: Path, patterns: Pattern[], processor: Processor, cb: () => any): any;
|
||||
walkCB3Sync(target: Path, entries: Path[], processor: Processor, cb: () => any): void;
|
||||
}
|
||||
export declare class GlobWalker<O extends GlobWalkerOpts = GlobWalkerOpts> extends GlobUtil<O> {
|
||||
matches: O extends GWOFileTypesTrue ? Set<Path> : O extends GWOFileTypesFalse ? Set<string> : O extends GWOFileTypesUnset ? Set<string> : Set<Path | string>;
|
||||
constructor(patterns: Pattern[], path: Path, opts: O);
|
||||
matchEmit(e: Result<O>): void;
|
||||
walk(): Promise<Matches<O>>;
|
||||
walkSync(): Matches<O>;
|
||||
}
|
||||
export declare class GlobStream<O extends GlobWalkerOpts = GlobWalkerOpts> extends GlobUtil<O> {
|
||||
results: O extends GWOFileTypesTrue ? Minipass<Path, Path> : O extends GWOFileTypesFalse ? Minipass<string, string> : O extends GWOFileTypesUnset ? Minipass<string, string> : Minipass<Path | string, Path | string>;
|
||||
constructor(patterns: Pattern[], path: Path, opts: O);
|
||||
matchEmit(e: Result<O>): void;
|
||||
stream(): MatchStream<O>;
|
||||
streamSync(): MatchStream<O>;
|
||||
}
|
||||
//# sourceMappingURL=walker.d.ts.map
|
||||
1
node_modules/glob/dist/mjs/walker.d.ts.map
generated
vendored
Normal file
1
node_modules/glob/dist/mjs/walker.d.ts.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"walker.d.ts","sourceRoot":"","sources":["../../src/walker.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;AACH,OAAO,QAAQ,MAAM,UAA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AAQ,CAAC,MAAM,EAAE,MAAM,CAAC,GACxB,QAAQ,CAAC,IAAI,GAAG,MAAM,EAAE,IAAI,GAAG,MAAM,CAAC,CAAA;gBAE9B,QAAQ,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAUpD,SAAS,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI;IAM7B,MAAM,IAAI,WAAW,CAAC,CAAC,CAAC;IAgBxB,UAAU,IAAI,WAAW,CAAC,CAAC,CAAC;CAW7B"}
|
||||
361
node_modules/glob/dist/mjs/walker.js
generated
vendored
Normal file
361
node_modules/glob/dist/mjs/walker.js
generated
vendored
Normal file
|
|
@ -0,0 +1,361 @@
|
|||
/**
|
||||
* Single-use utility classes to provide functionality to the {@link Glob}
|
||||
* methods.
|
||||
*
|
||||
* @module
|
||||
*/
|
||||
import Minipass from 'minipass';
|
||||
import { Ignore } from './ignore.js';
|
||||
import { Processor } from './processor.js';
|
||||
const makeIgnore = (ignore, opts) => typeof ignore === 'string'
|
||||
? new Ignore([ignore], opts)
|
||||
: Array.isArray(ignore)
|
||||
? new Ignore(ignore, opts)
|
||||
: ignore;
|
||||
/**
|
||||
* basic walking utilities that all the glob walker types use
|
||||
*/
|
||||
export class GlobUtil {
|
||||
path;
|
||||
patterns;
|
||||
opts;
|
||||
seen = new Set();
|
||||
paused = false;
|
||||
aborted = false;
|
||||
#onResume = [];
|
||||
#ignore;
|
||||
#sep;
|
||||
signal;
|
||||
maxDepth;
|
||||
constructor(patterns, path, opts) {
|
||||
this.patterns = patterns;
|
||||
this.path = path;
|
||||
this.opts = opts;
|
||||
this.#sep = opts.platform === 'win32' ? '\\' : '/';
|
||||
if (opts.ignore) {
|
||||
this.#ignore = makeIgnore(opts.ignore, opts);
|
||||
}
|
||||
// ignore, always set with maxDepth, but it's optional on the
|
||||
// GlobOptions type
|
||||
/* c8 ignore start */
|
||||
this.maxDepth = opts.maxDepth || Infinity;
|
||||
/* c8 ignore stop */
|
||||
if (opts.signal) {
|
||||
this.signal = opts.signal;
|
||||
this.signal.addEventListener('abort', () => {
|
||||
this.#onResume.length = 0;
|
||||
});
|
||||
}
|
||||
}
|
||||
#ignored(path) {
|
||||
return this.seen.has(path) || !!this.#ignore?.ignored?.(path);
|
||||
}
|
||||
#childrenIgnored(path) {
|
||||
return !!this.#ignore?.childrenIgnored?.(path);
|
||||
}
|
||||
// backpressure mechanism
|
||||
pause() {
|
||||
this.paused = true;
|
||||
}
|
||||
resume() {
|
||||
/* c8 ignore start */
|
||||
if (this.signal?.aborted)
|
||||
return;
|
||||
/* c8 ignore stop */
|
||||
this.paused = false;
|
||||
let fn = undefined;
|
||||
while (!this.paused && (fn = this.#onResume.shift())) {
|
||||
fn();
|
||||
}
|
||||
}
|
||||
onResume(fn) {
|
||||
if (this.signal?.aborted)
|
||||
return;
|
||||
/* c8 ignore start */
|
||||
if (!this.paused) {
|
||||
fn();
|
||||
}
|
||||
else {
|
||||
/* c8 ignore stop */
|
||||
this.#onResume.push(fn);
|
||||
}
|
||||
}
|
||||
// do the requisite realpath/stat checking, and return the path
|
||||
// to add or undefined to filter it out.
|
||||
async matchCheck(e, ifDir) {
|
||||
if (ifDir && this.opts.nodir)
|
||||
return undefined;
|
||||
let rpc;
|
||||
if (this.opts.realpath) {
|
||||
rpc = e.realpathCached() || (await e.realpath());
|
||||
if (!rpc)
|
||||
return undefined;
|
||||
e = rpc;
|
||||
}
|
||||
const needStat = e.isUnknown() || this.opts.stat;
|
||||
return this.matchCheckTest(needStat ? await e.lstat() : e, ifDir);
|
||||
}
|
||||
matchCheckTest(e, ifDir) {
|
||||
return e &&
|
||||
(this.maxDepth === Infinity || e.depth() <= this.maxDepth) &&
|
||||
(!ifDir || e.canReaddir()) &&
|
||||
(!this.opts.nodir || !e.isDirectory()) &&
|
||||
!this.#ignored(e)
|
||||
? e
|
||||
: undefined;
|
||||
}
|
||||
matchCheckSync(e, ifDir) {
|
||||
if (ifDir && this.opts.nodir)
|
||||
return undefined;
|
||||
let rpc;
|
||||
if (this.opts.realpath) {
|
||||
rpc = e.realpathCached() || e.realpathSync();
|
||||
if (!rpc)
|
||||
return undefined;
|
||||
e = rpc;
|
||||
}
|
||||
const needStat = e.isUnknown() || this.opts.stat;
|
||||
return this.matchCheckTest(needStat ? e.lstatSync() : e, ifDir);
|
||||
}
|
||||
matchFinish(e, absolute) {
|
||||
if (this.#ignored(e))
|
||||
return;
|
||||
const abs = this.opts.absolute === undefined ? absolute : this.opts.absolute;
|
||||
this.seen.add(e);
|
||||
const mark = this.opts.mark && e.isDirectory() ? this.#sep : '';
|
||||
// ok, we have what we need!
|
||||
if (this.opts.withFileTypes) {
|
||||
this.matchEmit(e);
|
||||
}
|
||||
else if (abs) {
|
||||
this.matchEmit(e.fullpath() + mark);
|
||||
}
|
||||
else {
|
||||
const rel = e.relative();
|
||||
const pre = this.opts.dotRelative && !rel.startsWith('..' + this.#sep)
|
||||
? '.' + this.#sep
|
||||
: '';
|
||||
this.matchEmit(!rel && mark ? '.' + mark : pre + rel + mark);
|
||||
}
|
||||
}
|
||||
async match(e, absolute, ifDir) {
|
||||
const p = await this.matchCheck(e, ifDir);
|
||||
if (p)
|
||||
this.matchFinish(p, absolute);
|
||||
}
|
||||
matchSync(e, absolute, ifDir) {
|
||||
const p = this.matchCheckSync(e, ifDir);
|
||||
if (p)
|
||||
this.matchFinish(p, absolute);
|
||||
}
|
||||
walkCB(target, patterns, cb) {
|
||||
/* c8 ignore start */
|
||||
if (this.signal?.aborted)
|
||||
cb();
|
||||
/* c8 ignore stop */
|
||||
this.walkCB2(target, patterns, new Processor(this.opts), cb);
|
||||
}
|
||||
walkCB2(target, patterns, processor, cb) {
|
||||
if (this.#childrenIgnored(target))
|
||||
return cb();
|
||||
if (this.signal?.aborted)
|
||||
cb();
|
||||
if (this.paused) {
|
||||
this.onResume(() => this.walkCB2(target, patterns, processor, cb));
|
||||
return;
|
||||
}
|
||||
processor.processPatterns(target, patterns);
|
||||
// done processing. all of the above is sync, can be abstracted out.
|
||||
// subwalks is a map of paths to the entry filters they need
|
||||
// matches is a map of paths to [absolute, ifDir] tuples.
|
||||
let tasks = 1;
|
||||
const next = () => {
|
||||
if (--tasks === 0)
|
||||
cb();
|
||||
};
|
||||
for (const [m, absolute, ifDir] of processor.matches.entries()) {
|
||||
if (this.#ignored(m))
|
||||
continue;
|
||||
tasks++;
|
||||
this.match(m, absolute, ifDir).then(() => next());
|
||||
}
|
||||
for (const t of processor.subwalkTargets()) {
|
||||
if (this.maxDepth !== Infinity && t.depth() >= this.maxDepth) {
|
||||
continue;
|
||||
}
|
||||
tasks++;
|
||||
const childrenCached = t.readdirCached();
|
||||
if (t.calledReaddir())
|
||||
this.walkCB3(t, childrenCached, processor, next);
|
||||
else {
|
||||
t.readdirCB((_, entries) => this.walkCB3(t, entries, processor, next), true);
|
||||
}
|
||||
}
|
||||
next();
|
||||
}
|
||||
walkCB3(target, entries, processor, cb) {
|
||||
processor = processor.filterEntries(target, entries);
|
||||
let tasks = 1;
|
||||
const next = () => {
|
||||
if (--tasks === 0)
|
||||
cb();
|
||||
};
|
||||
for (const [m, absolute, ifDir] of processor.matches.entries()) {
|
||||
if (this.#ignored(m))
|
||||
continue;
|
||||
tasks++;
|
||||
this.match(m, absolute, ifDir).then(() => next());
|
||||
}
|
||||
for (const [target, patterns] of processor.subwalks.entries()) {
|
||||
tasks++;
|
||||
this.walkCB2(target, patterns, processor.child(), next);
|
||||
}
|
||||
next();
|
||||
}
|
||||
walkCBSync(target, patterns, cb) {
|
||||
/* c8 ignore start */
|
||||
if (this.signal?.aborted)
|
||||
cb();
|
||||
/* c8 ignore stop */
|
||||
this.walkCB2Sync(target, patterns, new Processor(this.opts), cb);
|
||||
}
|
||||
walkCB2Sync(target, patterns, processor, cb) {
|
||||
if (this.#childrenIgnored(target))
|
||||
return cb();
|
||||
if (this.signal?.aborted)
|
||||
cb();
|
||||
if (this.paused) {
|
||||
this.onResume(() => this.walkCB2Sync(target, patterns, processor, cb));
|
||||
return;
|
||||
}
|
||||
processor.processPatterns(target, patterns);
|
||||
// done processing. all of the above is sync, can be abstracted out.
|
||||
// subwalks is a map of paths to the entry filters they need
|
||||
// matches is a map of paths to [absolute, ifDir] tuples.
|
||||
let tasks = 1;
|
||||
const next = () => {
|
||||
if (--tasks === 0)
|
||||
cb();
|
||||
};
|
||||
for (const [m, absolute, ifDir] of processor.matches.entries()) {
|
||||
if (this.#ignored(m))
|
||||
continue;
|
||||
this.matchSync(m, absolute, ifDir);
|
||||
}
|
||||
for (const t of processor.subwalkTargets()) {
|
||||
if (this.maxDepth !== Infinity && t.depth() >= this.maxDepth) {
|
||||
continue;
|
||||
}
|
||||
tasks++;
|
||||
const children = t.readdirSync();
|
||||
this.walkCB3Sync(t, children, processor, next);
|
||||
}
|
||||
next();
|
||||
}
|
||||
walkCB3Sync(target, entries, processor, cb) {
|
||||
processor = processor.filterEntries(target, entries);
|
||||
let tasks = 1;
|
||||
const next = () => {
|
||||
if (--tasks === 0)
|
||||
cb();
|
||||
};
|
||||
for (const [m, absolute, ifDir] of processor.matches.entries()) {
|
||||
if (this.#ignored(m))
|
||||
continue;
|
||||
this.matchSync(m, absolute, ifDir);
|
||||
}
|
||||
for (const [target, patterns] of processor.subwalks.entries()) {
|
||||
tasks++;
|
||||
this.walkCB2Sync(target, patterns, processor.child(), next);
|
||||
}
|
||||
next();
|
||||
}
|
||||
}
|
||||
export class GlobWalker extends GlobUtil {
|
||||
matches;
|
||||
constructor(patterns, path, opts) {
|
||||
super(patterns, path, opts);
|
||||
this.matches = new Set();
|
||||
}
|
||||
matchEmit(e) {
|
||||
this.matches.add(e);
|
||||
}
|
||||
async walk() {
|
||||
if (this.signal?.aborted)
|
||||
throw this.signal.reason;
|
||||
const t = this.path.isUnknown() ? await this.path.lstat() : this.path;
|
||||
if (t) {
|
||||
await new Promise((res, rej) => {
|
||||
this.walkCB(t, this.patterns, () => {
|
||||
if (this.signal?.aborted) {
|
||||
rej(this.signal.reason);
|
||||
}
|
||||
else {
|
||||
res(this.matches);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
return this.matches;
|
||||
}
|
||||
walkSync() {
|
||||
if (this.signal?.aborted)
|
||||
throw this.signal.reason;
|
||||
const t = this.path.isUnknown() ? this.path.lstatSync() : this.path;
|
||||
// nothing for the callback to do, because this never pauses
|
||||
if (t) {
|
||||
this.walkCBSync(t, this.patterns, () => {
|
||||
if (this.signal?.aborted)
|
||||
throw this.signal.reason;
|
||||
});
|
||||
}
|
||||
return this.matches;
|
||||
}
|
||||
}
|
||||
export class GlobStream extends GlobUtil {
|
||||
results;
|
||||
constructor(patterns, path, opts) {
|
||||
super(patterns, path, opts);
|
||||
this.results = new Minipass({
|
||||
signal: this.signal,
|
||||
objectMode: true,
|
||||
});
|
||||
this.results.on('drain', () => this.resume());
|
||||
this.results.on('resume', () => this.resume());
|
||||
}
|
||||
matchEmit(e) {
|
||||
this.results.write(e);
|
||||
if (!this.results.flowing)
|
||||
this.pause();
|
||||
}
|
||||
stream() {
|
||||
const target = this.path;
|
||||
if (target.isUnknown()) {
|
||||
target.lstat().then(e => {
|
||||
if (e) {
|
||||
this.walkCB(target, this.patterns, () => this.results.end());
|
||||
}
|
||||
else {
|
||||
this.results.end();
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
this.walkCB(target, this.patterns, () => this.results.end());
|
||||
}
|
||||
return this.results;
|
||||
}
|
||||
streamSync() {
|
||||
const target = this.path.isUnknown()
|
||||
? this.path.lstatSync()
|
||||
: this.path;
|
||||
if (target) {
|
||||
this.walkCBSync(target, this.patterns, () => this.results.end());
|
||||
}
|
||||
else {
|
||||
this.results.end();
|
||||
}
|
||||
return this.results;
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=walker.js.map
|
||||
1
node_modules/glob/dist/mjs/walker.js.map
generated
vendored
Normal file
1
node_modules/glob/dist/mjs/walker.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
790
node_modules/glob/glob.js
generated
vendored
790
node_modules/glob/glob.js
generated
vendored
|
|
@ -1,790 +0,0 @@
|
|||
// Approach:
|
||||
//
|
||||
// 1. Get the minimatch set
|
||||
// 2. For each pattern in the set, PROCESS(pattern, false)
|
||||
// 3. Store matches per-set, then uniq them
|
||||
//
|
||||
// PROCESS(pattern, inGlobStar)
|
||||
// Get the first [n] items from pattern that are all strings
|
||||
// Join these together. This is PREFIX.
|
||||
// If there is no more remaining, then stat(PREFIX) and
|
||||
// add to matches if it succeeds. END.
|
||||
//
|
||||
// If inGlobStar and PREFIX is symlink and points to dir
|
||||
// set ENTRIES = []
|
||||
// else readdir(PREFIX) as ENTRIES
|
||||
// If fail, END
|
||||
//
|
||||
// with ENTRIES
|
||||
// If pattern[n] is GLOBSTAR
|
||||
// // handle the case where the globstar match is empty
|
||||
// // by pruning it out, and testing the resulting pattern
|
||||
// PROCESS(pattern[0..n] + pattern[n+1 .. $], false)
|
||||
// // handle other cases.
|
||||
// for ENTRY in ENTRIES (not dotfiles)
|
||||
// // attach globstar + tail onto the entry
|
||||
// // Mark that this entry is a globstar match
|
||||
// PROCESS(pattern[0..n] + ENTRY + pattern[n .. $], true)
|
||||
//
|
||||
// else // not globstar
|
||||
// for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot)
|
||||
// Test ENTRY against pattern[n]
|
||||
// If fails, continue
|
||||
// If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $])
|
||||
//
|
||||
// Caveat:
|
||||
// Cache all stats and readdirs results to minimize syscall. Since all
|
||||
// we ever care about is existence and directory-ness, we can just keep
|
||||
// `true` for files, and [children,...] for directories, or `false` for
|
||||
// things that don't exist.
|
||||
|
||||
module.exports = glob
|
||||
|
||||
var rp = require('fs.realpath')
|
||||
var minimatch = require('minimatch')
|
||||
var Minimatch = minimatch.Minimatch
|
||||
var inherits = require('inherits')
|
||||
var EE = require('events').EventEmitter
|
||||
var path = require('path')
|
||||
var assert = require('assert')
|
||||
var isAbsolute = require('path-is-absolute')
|
||||
var globSync = require('./sync.js')
|
||||
var common = require('./common.js')
|
||||
var setopts = common.setopts
|
||||
var ownProp = common.ownProp
|
||||
var inflight = require('inflight')
|
||||
var util = require('util')
|
||||
var childrenIgnored = common.childrenIgnored
|
||||
var isIgnored = common.isIgnored
|
||||
|
||||
var once = require('once')
|
||||
|
||||
function glob (pattern, options, cb) {
|
||||
if (typeof options === 'function') cb = options, options = {}
|
||||
if (!options) options = {}
|
||||
|
||||
if (options.sync) {
|
||||
if (cb)
|
||||
throw new TypeError('callback provided to sync glob')
|
||||
return globSync(pattern, options)
|
||||
}
|
||||
|
||||
return new Glob(pattern, options, cb)
|
||||
}
|
||||
|
||||
glob.sync = globSync
|
||||
var GlobSync = glob.GlobSync = globSync.GlobSync
|
||||
|
||||
// old api surface
|
||||
glob.glob = glob
|
||||
|
||||
function extend (origin, add) {
|
||||
if (add === null || typeof add !== 'object') {
|
||||
return origin
|
||||
}
|
||||
|
||||
var keys = Object.keys(add)
|
||||
var i = keys.length
|
||||
while (i--) {
|
||||
origin[keys[i]] = add[keys[i]]
|
||||
}
|
||||
return origin
|
||||
}
|
||||
|
||||
glob.hasMagic = function (pattern, options_) {
|
||||
var options = extend({}, options_)
|
||||
options.noprocess = true
|
||||
|
||||
var g = new Glob(pattern, options)
|
||||
var set = g.minimatch.set
|
||||
|
||||
if (!pattern)
|
||||
return false
|
||||
|
||||
if (set.length > 1)
|
||||
return true
|
||||
|
||||
for (var j = 0; j < set[0].length; j++) {
|
||||
if (typeof set[0][j] !== 'string')
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
glob.Glob = Glob
|
||||
inherits(Glob, EE)
|
||||
function Glob (pattern, options, cb) {
|
||||
if (typeof options === 'function') {
|
||||
cb = options
|
||||
options = null
|
||||
}
|
||||
|
||||
if (options && options.sync) {
|
||||
if (cb)
|
||||
throw new TypeError('callback provided to sync glob')
|
||||
return new GlobSync(pattern, options)
|
||||
}
|
||||
|
||||
if (!(this instanceof Glob))
|
||||
return new Glob(pattern, options, cb)
|
||||
|
||||
setopts(this, pattern, options)
|
||||
this._didRealPath = false
|
||||
|
||||
// process each pattern in the minimatch set
|
||||
var n = this.minimatch.set.length
|
||||
|
||||
// The matches are stored as {<filename>: true,...} so that
|
||||
// duplicates are automagically pruned.
|
||||
// Later, we do an Object.keys() on these.
|
||||
// Keep them as a list so we can fill in when nonull is set.
|
||||
this.matches = new Array(n)
|
||||
|
||||
if (typeof cb === 'function') {
|
||||
cb = once(cb)
|
||||
this.on('error', cb)
|
||||
this.on('end', function (matches) {
|
||||
cb(null, matches)
|
||||
})
|
||||
}
|
||||
|
||||
var self = this
|
||||
this._processing = 0
|
||||
|
||||
this._emitQueue = []
|
||||
this._processQueue = []
|
||||
this.paused = false
|
||||
|
||||
if (this.noprocess)
|
||||
return this
|
||||
|
||||
if (n === 0)
|
||||
return done()
|
||||
|
||||
var sync = true
|
||||
for (var i = 0; i < n; i ++) {
|
||||
this._process(this.minimatch.set[i], i, false, done)
|
||||
}
|
||||
sync = false
|
||||
|
||||
function done () {
|
||||
--self._processing
|
||||
if (self._processing <= 0) {
|
||||
if (sync) {
|
||||
process.nextTick(function () {
|
||||
self._finish()
|
||||
})
|
||||
} else {
|
||||
self._finish()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Glob.prototype._finish = function () {
|
||||
assert(this instanceof Glob)
|
||||
if (this.aborted)
|
||||
return
|
||||
|
||||
if (this.realpath && !this._didRealpath)
|
||||
return this._realpath()
|
||||
|
||||
common.finish(this)
|
||||
this.emit('end', this.found)
|
||||
}
|
||||
|
||||
Glob.prototype._realpath = function () {
|
||||
if (this._didRealpath)
|
||||
return
|
||||
|
||||
this._didRealpath = true
|
||||
|
||||
var n = this.matches.length
|
||||
if (n === 0)
|
||||
return this._finish()
|
||||
|
||||
var self = this
|
||||
for (var i = 0; i < this.matches.length; i++)
|
||||
this._realpathSet(i, next)
|
||||
|
||||
function next () {
|
||||
if (--n === 0)
|
||||
self._finish()
|
||||
}
|
||||
}
|
||||
|
||||
Glob.prototype._realpathSet = function (index, cb) {
|
||||
var matchset = this.matches[index]
|
||||
if (!matchset)
|
||||
return cb()
|
||||
|
||||
var found = Object.keys(matchset)
|
||||
var self = this
|
||||
var n = found.length
|
||||
|
||||
if (n === 0)
|
||||
return cb()
|
||||
|
||||
var set = this.matches[index] = Object.create(null)
|
||||
found.forEach(function (p, i) {
|
||||
// If there's a problem with the stat, then it means that
|
||||
// one or more of the links in the realpath couldn't be
|
||||
// resolved. just return the abs value in that case.
|
||||
p = self._makeAbs(p)
|
||||
rp.realpath(p, self.realpathCache, function (er, real) {
|
||||
if (!er)
|
||||
set[real] = true
|
||||
else if (er.syscall === 'stat')
|
||||
set[p] = true
|
||||
else
|
||||
self.emit('error', er) // srsly wtf right here
|
||||
|
||||
if (--n === 0) {
|
||||
self.matches[index] = set
|
||||
cb()
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
Glob.prototype._mark = function (p) {
|
||||
return common.mark(this, p)
|
||||
}
|
||||
|
||||
Glob.prototype._makeAbs = function (f) {
|
||||
return common.makeAbs(this, f)
|
||||
}
|
||||
|
||||
Glob.prototype.abort = function () {
|
||||
this.aborted = true
|
||||
this.emit('abort')
|
||||
}
|
||||
|
||||
Glob.prototype.pause = function () {
|
||||
if (!this.paused) {
|
||||
this.paused = true
|
||||
this.emit('pause')
|
||||
}
|
||||
}
|
||||
|
||||
Glob.prototype.resume = function () {
|
||||
if (this.paused) {
|
||||
this.emit('resume')
|
||||
this.paused = false
|
||||
if (this._emitQueue.length) {
|
||||
var eq = this._emitQueue.slice(0)
|
||||
this._emitQueue.length = 0
|
||||
for (var i = 0; i < eq.length; i ++) {
|
||||
var e = eq[i]
|
||||
this._emitMatch(e[0], e[1])
|
||||
}
|
||||
}
|
||||
if (this._processQueue.length) {
|
||||
var pq = this._processQueue.slice(0)
|
||||
this._processQueue.length = 0
|
||||
for (var i = 0; i < pq.length; i ++) {
|
||||
var p = pq[i]
|
||||
this._processing--
|
||||
this._process(p[0], p[1], p[2], p[3])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Glob.prototype._process = function (pattern, index, inGlobStar, cb) {
|
||||
assert(this instanceof Glob)
|
||||
assert(typeof cb === 'function')
|
||||
|
||||
if (this.aborted)
|
||||
return
|
||||
|
||||
this._processing++
|
||||
if (this.paused) {
|
||||
this._processQueue.push([pattern, index, inGlobStar, cb])
|
||||
return
|
||||
}
|
||||
|
||||
//console.error('PROCESS %d', this._processing, pattern)
|
||||
|
||||
// Get the first [n] parts of pattern that are all strings.
|
||||
var n = 0
|
||||
while (typeof pattern[n] === 'string') {
|
||||
n ++
|
||||
}
|
||||
// now n is the index of the first one that is *not* a string.
|
||||
|
||||
// see if there's anything else
|
||||
var prefix
|
||||
switch (n) {
|
||||
// if not, then this is rather simple
|
||||
case pattern.length:
|
||||
this._processSimple(pattern.join('/'), index, cb)
|
||||
return
|
||||
|
||||
case 0:
|
||||
// pattern *starts* with some non-trivial item.
|
||||
// going to readdir(cwd), but not include the prefix in matches.
|
||||
prefix = null
|
||||
break
|
||||
|
||||
default:
|
||||
// pattern has some string bits in the front.
|
||||
// whatever it starts with, whether that's 'absolute' like /foo/bar,
|
||||
// or 'relative' like '../baz'
|
||||
prefix = pattern.slice(0, n).join('/')
|
||||
break
|
||||
}
|
||||
|
||||
var remain = pattern.slice(n)
|
||||
|
||||
// get the list of entries.
|
||||
var read
|
||||
if (prefix === null)
|
||||
read = '.'
|
||||
else if (isAbsolute(prefix) ||
|
||||
isAbsolute(pattern.map(function (p) {
|
||||
return typeof p === 'string' ? p : '[*]'
|
||||
}).join('/'))) {
|
||||
if (!prefix || !isAbsolute(prefix))
|
||||
prefix = '/' + prefix
|
||||
read = prefix
|
||||
} else
|
||||
read = prefix
|
||||
|
||||
var abs = this._makeAbs(read)
|
||||
|
||||
//if ignored, skip _processing
|
||||
if (childrenIgnored(this, read))
|
||||
return cb()
|
||||
|
||||
var isGlobStar = remain[0] === minimatch.GLOBSTAR
|
||||
if (isGlobStar)
|
||||
this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb)
|
||||
else
|
||||
this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb)
|
||||
}
|
||||
|
||||
Glob.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar, cb) {
|
||||
var self = this
|
||||
this._readdir(abs, inGlobStar, function (er, entries) {
|
||||
return self._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb)
|
||||
})
|
||||
}
|
||||
|
||||
Glob.prototype._processReaddir2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) {
|
||||
|
||||
// if the abs isn't a dir, then nothing can match!
|
||||
if (!entries)
|
||||
return cb()
|
||||
|
||||
// It will only match dot entries if it starts with a dot, or if
|
||||
// dot is set. Stuff like @(.foo|.bar) isn't allowed.
|
||||
var pn = remain[0]
|
||||
var negate = !!this.minimatch.negate
|
||||
var rawGlob = pn._glob
|
||||
var dotOk = this.dot || rawGlob.charAt(0) === '.'
|
||||
|
||||
var matchedEntries = []
|
||||
for (var i = 0; i < entries.length; i++) {
|
||||
var e = entries[i]
|
||||
if (e.charAt(0) !== '.' || dotOk) {
|
||||
var m
|
||||
if (negate && !prefix) {
|
||||
m = !e.match(pn)
|
||||
} else {
|
||||
m = e.match(pn)
|
||||
}
|
||||
if (m)
|
||||
matchedEntries.push(e)
|
||||
}
|
||||
}
|
||||
|
||||
//console.error('prd2', prefix, entries, remain[0]._glob, matchedEntries)
|
||||
|
||||
var len = matchedEntries.length
|
||||
// If there are no matched entries, then nothing matches.
|
||||
if (len === 0)
|
||||
return cb()
|
||||
|
||||
// if this is the last remaining pattern bit, then no need for
|
||||
// an additional stat *unless* the user has specified mark or
|
||||
// stat explicitly. We know they exist, since readdir returned
|
||||
// them.
|
||||
|
||||
if (remain.length === 1 && !this.mark && !this.stat) {
|
||||
if (!this.matches[index])
|
||||
this.matches[index] = Object.create(null)
|
||||
|
||||
for (var i = 0; i < len; i ++) {
|
||||
var e = matchedEntries[i]
|
||||
if (prefix) {
|
||||
if (prefix !== '/')
|
||||
e = prefix + '/' + e
|
||||
else
|
||||
e = prefix + e
|
||||
}
|
||||
|
||||
if (e.charAt(0) === '/' && !this.nomount) {
|
||||
e = path.join(this.root, e)
|
||||
}
|
||||
this._emitMatch(index, e)
|
||||
}
|
||||
// This was the last one, and no stats were needed
|
||||
return cb()
|
||||
}
|
||||
|
||||
// now test all matched entries as stand-ins for that part
|
||||
// of the pattern.
|
||||
remain.shift()
|
||||
for (var i = 0; i < len; i ++) {
|
||||
var e = matchedEntries[i]
|
||||
var newPattern
|
||||
if (prefix) {
|
||||
if (prefix !== '/')
|
||||
e = prefix + '/' + e
|
||||
else
|
||||
e = prefix + e
|
||||
}
|
||||
this._process([e].concat(remain), index, inGlobStar, cb)
|
||||
}
|
||||
cb()
|
||||
}
|
||||
|
||||
Glob.prototype._emitMatch = function (index, e) {
|
||||
if (this.aborted)
|
||||
return
|
||||
|
||||
if (isIgnored(this, e))
|
||||
return
|
||||
|
||||
if (this.paused) {
|
||||
this._emitQueue.push([index, e])
|
||||
return
|
||||
}
|
||||
|
||||
var abs = isAbsolute(e) ? e : this._makeAbs(e)
|
||||
|
||||
if (this.mark)
|
||||
e = this._mark(e)
|
||||
|
||||
if (this.absolute)
|
||||
e = abs
|
||||
|
||||
if (this.matches[index][e])
|
||||
return
|
||||
|
||||
if (this.nodir) {
|
||||
var c = this.cache[abs]
|
||||
if (c === 'DIR' || Array.isArray(c))
|
||||
return
|
||||
}
|
||||
|
||||
this.matches[index][e] = true
|
||||
|
||||
var st = this.statCache[abs]
|
||||
if (st)
|
||||
this.emit('stat', e, st)
|
||||
|
||||
this.emit('match', e)
|
||||
}
|
||||
|
||||
Glob.prototype._readdirInGlobStar = function (abs, cb) {
|
||||
if (this.aborted)
|
||||
return
|
||||
|
||||
// follow all symlinked directories forever
|
||||
// just proceed as if this is a non-globstar situation
|
||||
if (this.follow)
|
||||
return this._readdir(abs, false, cb)
|
||||
|
||||
var lstatkey = 'lstat\0' + abs
|
||||
var self = this
|
||||
var lstatcb = inflight(lstatkey, lstatcb_)
|
||||
|
||||
if (lstatcb)
|
||||
self.fs.lstat(abs, lstatcb)
|
||||
|
||||
function lstatcb_ (er, lstat) {
|
||||
if (er && er.code === 'ENOENT')
|
||||
return cb()
|
||||
|
||||
var isSym = lstat && lstat.isSymbolicLink()
|
||||
self.symlinks[abs] = isSym
|
||||
|
||||
// If it's not a symlink or a dir, then it's definitely a regular file.
|
||||
// don't bother doing a readdir in that case.
|
||||
if (!isSym && lstat && !lstat.isDirectory()) {
|
||||
self.cache[abs] = 'FILE'
|
||||
cb()
|
||||
} else
|
||||
self._readdir(abs, false, cb)
|
||||
}
|
||||
}
|
||||
|
||||
Glob.prototype._readdir = function (abs, inGlobStar, cb) {
|
||||
if (this.aborted)
|
||||
return
|
||||
|
||||
cb = inflight('readdir\0'+abs+'\0'+inGlobStar, cb)
|
||||
if (!cb)
|
||||
return
|
||||
|
||||
//console.error('RD %j %j', +inGlobStar, abs)
|
||||
if (inGlobStar && !ownProp(this.symlinks, abs))
|
||||
return this._readdirInGlobStar(abs, cb)
|
||||
|
||||
if (ownProp(this.cache, abs)) {
|
||||
var c = this.cache[abs]
|
||||
if (!c || c === 'FILE')
|
||||
return cb()
|
||||
|
||||
if (Array.isArray(c))
|
||||
return cb(null, c)
|
||||
}
|
||||
|
||||
var self = this
|
||||
self.fs.readdir(abs, readdirCb(this, abs, cb))
|
||||
}
|
||||
|
||||
function readdirCb (self, abs, cb) {
|
||||
return function (er, entries) {
|
||||
if (er)
|
||||
self._readdirError(abs, er, cb)
|
||||
else
|
||||
self._readdirEntries(abs, entries, cb)
|
||||
}
|
||||
}
|
||||
|
||||
Glob.prototype._readdirEntries = function (abs, entries, cb) {
|
||||
if (this.aborted)
|
||||
return
|
||||
|
||||
// if we haven't asked to stat everything, then just
|
||||
// assume that everything in there exists, so we can avoid
|
||||
// having to stat it a second time.
|
||||
if (!this.mark && !this.stat) {
|
||||
for (var i = 0; i < entries.length; i ++) {
|
||||
var e = entries[i]
|
||||
if (abs === '/')
|
||||
e = abs + e
|
||||
else
|
||||
e = abs + '/' + e
|
||||
this.cache[e] = true
|
||||
}
|
||||
}
|
||||
|
||||
this.cache[abs] = entries
|
||||
return cb(null, entries)
|
||||
}
|
||||
|
||||
Glob.prototype._readdirError = function (f, er, cb) {
|
||||
if (this.aborted)
|
||||
return
|
||||
|
||||
// handle errors, and cache the information
|
||||
switch (er.code) {
|
||||
case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205
|
||||
case 'ENOTDIR': // totally normal. means it *does* exist.
|
||||
var abs = this._makeAbs(f)
|
||||
this.cache[abs] = 'FILE'
|
||||
if (abs === this.cwdAbs) {
|
||||
var error = new Error(er.code + ' invalid cwd ' + this.cwd)
|
||||
error.path = this.cwd
|
||||
error.code = er.code
|
||||
this.emit('error', error)
|
||||
this.abort()
|
||||
}
|
||||
break
|
||||
|
||||
case 'ENOENT': // not terribly unusual
|
||||
case 'ELOOP':
|
||||
case 'ENAMETOOLONG':
|
||||
case 'UNKNOWN':
|
||||
this.cache[this._makeAbs(f)] = false
|
||||
break
|
||||
|
||||
default: // some unusual error. Treat as failure.
|
||||
this.cache[this._makeAbs(f)] = false
|
||||
if (this.strict) {
|
||||
this.emit('error', er)
|
||||
// If the error is handled, then we abort
|
||||
// if not, we threw out of here
|
||||
this.abort()
|
||||
}
|
||||
if (!this.silent)
|
||||
console.error('glob error', er)
|
||||
break
|
||||
}
|
||||
|
||||
return cb()
|
||||
}
|
||||
|
||||
Glob.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar, cb) {
|
||||
var self = this
|
||||
this._readdir(abs, inGlobStar, function (er, entries) {
|
||||
self._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Glob.prototype._processGlobStar2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) {
|
||||
//console.error('pgs2', prefix, remain[0], entries)
|
||||
|
||||
// no entries means not a dir, so it can never have matches
|
||||
// foo.txt/** doesn't match foo.txt
|
||||
if (!entries)
|
||||
return cb()
|
||||
|
||||
// test without the globstar, and with every child both below
|
||||
// and replacing the globstar.
|
||||
var remainWithoutGlobStar = remain.slice(1)
|
||||
var gspref = prefix ? [ prefix ] : []
|
||||
var noGlobStar = gspref.concat(remainWithoutGlobStar)
|
||||
|
||||
// the noGlobStar pattern exits the inGlobStar state
|
||||
this._process(noGlobStar, index, false, cb)
|
||||
|
||||
var isSym = this.symlinks[abs]
|
||||
var len = entries.length
|
||||
|
||||
// If it's a symlink, and we're in a globstar, then stop
|
||||
if (isSym && inGlobStar)
|
||||
return cb()
|
||||
|
||||
for (var i = 0; i < len; i++) {
|
||||
var e = entries[i]
|
||||
if (e.charAt(0) === '.' && !this.dot)
|
||||
continue
|
||||
|
||||
// these two cases enter the inGlobStar state
|
||||
var instead = gspref.concat(entries[i], remainWithoutGlobStar)
|
||||
this._process(instead, index, true, cb)
|
||||
|
||||
var below = gspref.concat(entries[i], remain)
|
||||
this._process(below, index, true, cb)
|
||||
}
|
||||
|
||||
cb()
|
||||
}
|
||||
|
||||
Glob.prototype._processSimple = function (prefix, index, cb) {
|
||||
// XXX review this. Shouldn't it be doing the mounting etc
|
||||
// before doing stat? kinda weird?
|
||||
var self = this
|
||||
this._stat(prefix, function (er, exists) {
|
||||
self._processSimple2(prefix, index, er, exists, cb)
|
||||
})
|
||||
}
|
||||
Glob.prototype._processSimple2 = function (prefix, index, er, exists, cb) {
|
||||
|
||||
//console.error('ps2', prefix, exists)
|
||||
|
||||
if (!this.matches[index])
|
||||
this.matches[index] = Object.create(null)
|
||||
|
||||
// If it doesn't exist, then just mark the lack of results
|
||||
if (!exists)
|
||||
return cb()
|
||||
|
||||
if (prefix && isAbsolute(prefix) && !this.nomount) {
|
||||
var trail = /[\/\\]$/.test(prefix)
|
||||
if (prefix.charAt(0) === '/') {
|
||||
prefix = path.join(this.root, prefix)
|
||||
} else {
|
||||
prefix = path.resolve(this.root, prefix)
|
||||
if (trail)
|
||||
prefix += '/'
|
||||
}
|
||||
}
|
||||
|
||||
if (process.platform === 'win32')
|
||||
prefix = prefix.replace(/\\/g, '/')
|
||||
|
||||
// Mark this as a match
|
||||
this._emitMatch(index, prefix)
|
||||
cb()
|
||||
}
|
||||
|
||||
// Returns either 'DIR', 'FILE', or false
|
||||
Glob.prototype._stat = function (f, cb) {
|
||||
var abs = this._makeAbs(f)
|
||||
var needDir = f.slice(-1) === '/'
|
||||
|
||||
if (f.length > this.maxLength)
|
||||
return cb()
|
||||
|
||||
if (!this.stat && ownProp(this.cache, abs)) {
|
||||
var c = this.cache[abs]
|
||||
|
||||
if (Array.isArray(c))
|
||||
c = 'DIR'
|
||||
|
||||
// It exists, but maybe not how we need it
|
||||
if (!needDir || c === 'DIR')
|
||||
return cb(null, c)
|
||||
|
||||
if (needDir && c === 'FILE')
|
||||
return cb()
|
||||
|
||||
// otherwise we have to stat, because maybe c=true
|
||||
// if we know it exists, but not what it is.
|
||||
}
|
||||
|
||||
var exists
|
||||
var stat = this.statCache[abs]
|
||||
if (stat !== undefined) {
|
||||
if (stat === false)
|
||||
return cb(null, stat)
|
||||
else {
|
||||
var type = stat.isDirectory() ? 'DIR' : 'FILE'
|
||||
if (needDir && type === 'FILE')
|
||||
return cb()
|
||||
else
|
||||
return cb(null, type, stat)
|
||||
}
|
||||
}
|
||||
|
||||
var self = this
|
||||
var statcb = inflight('stat\0' + abs, lstatcb_)
|
||||
if (statcb)
|
||||
self.fs.lstat(abs, statcb)
|
||||
|
||||
function lstatcb_ (er, lstat) {
|
||||
if (lstat && lstat.isSymbolicLink()) {
|
||||
// If it's a symlink, then treat it as the target, unless
|
||||
// the target does not exist, then treat it as a file.
|
||||
return self.fs.stat(abs, function (er, stat) {
|
||||
if (er)
|
||||
self._stat2(f, abs, null, lstat, cb)
|
||||
else
|
||||
self._stat2(f, abs, er, stat, cb)
|
||||
})
|
||||
} else {
|
||||
self._stat2(f, abs, er, lstat, cb)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Glob.prototype._stat2 = function (f, abs, er, stat, cb) {
|
||||
if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) {
|
||||
this.statCache[abs] = false
|
||||
return cb()
|
||||
}
|
||||
|
||||
var needDir = f.slice(-1) === '/'
|
||||
this.statCache[abs] = stat
|
||||
|
||||
if (abs.slice(-1) === '/' && stat && !stat.isDirectory())
|
||||
return cb(null, false, stat)
|
||||
|
||||
var c = true
|
||||
if (stat)
|
||||
c = stat.isDirectory() ? 'DIR' : 'FILE'
|
||||
this.cache[abs] = this.cache[abs] || c
|
||||
|
||||
if (needDir && c === 'FILE')
|
||||
return cb()
|
||||
|
||||
return cb(null, c, stat)
|
||||
}
|
||||
2
node_modules/glob/node_modules/minimatch/LICENSE
generated
vendored
2
node_modules/glob/node_modules/minimatch/LICENSE
generated
vendored
|
|
@ -1,6 +1,6 @@
|
|||
The ISC License
|
||||
|
||||
Copyright (c) 2011-2022 Isaac Z. Schlueter and Contributors
|
||||
Copyright (c) 2011-2023 Isaac Z. Schlueter and Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
|
|
|
|||
341
node_modules/glob/node_modules/minimatch/README.md
generated
vendored
341
node_modules/glob/node_modules/minimatch/README.md
generated
vendored
|
|
@ -2,9 +2,6 @@
|
|||
|
||||
A minimal matching utility.
|
||||
|
||||
[](http://travis-ci.org/isaacs/minimatch)
|
||||
|
||||
|
||||
This is the matching library used internally by npm.
|
||||
|
||||
It works by converting glob expressions into JavaScript `RegExp`
|
||||
|
|
@ -12,36 +9,53 @@ objects.
|
|||
|
||||
## Usage
|
||||
|
||||
```javascript
|
||||
var minimatch = require("minimatch")
|
||||
```js
|
||||
// hybrid module, load with require() or import
|
||||
import { minimatch } from 'minimatch'
|
||||
// or:
|
||||
const { minimatch } = require('minimatch')
|
||||
|
||||
minimatch("bar.foo", "*.foo") // true!
|
||||
minimatch("bar.foo", "*.bar") // false!
|
||||
minimatch("bar.foo", "*.+(bar|foo)", { debug: true }) // true, and noisy!
|
||||
// default export also works
|
||||
import minimatch from 'minimatch'
|
||||
// or:
|
||||
const minimatch = require('minimatch')
|
||||
|
||||
minimatch('bar.foo', '*.foo') // true!
|
||||
minimatch('bar.foo', '*.bar') // false!
|
||||
minimatch('bar.foo', '*.+(bar|foo)', { debug: true }) // true, and noisy!
|
||||
```
|
||||
|
||||
## Features
|
||||
|
||||
Supports these glob features:
|
||||
|
||||
* Brace Expansion
|
||||
* Extended glob matching
|
||||
* "Globstar" `**` matching
|
||||
- Brace Expansion
|
||||
- Extended glob matching
|
||||
- "Globstar" `**` matching
|
||||
- [Posix character
|
||||
classes](https://www.gnu.org/software/bash/manual/html_node/Pattern-Matching.html),
|
||||
like `[[:alpha:]]`, supporting the full range of Unicode
|
||||
characters. For example, `[[:alpha:]]` will match against
|
||||
`'é'`, though `[a-zA-Z]` will not. Collating symbol and set
|
||||
matching is not supported, so `[[=e=]]` will _not_ match `'é'`
|
||||
and `[[.ch.]]` will not match `'ch'` in locales where `ch` is
|
||||
considered a single character.
|
||||
|
||||
See:
|
||||
|
||||
* `man sh`
|
||||
* `man bash`
|
||||
* `man 3 fnmatch`
|
||||
* `man 5 gitignore`
|
||||
- `man sh`
|
||||
- `man bash` [Pattern
|
||||
Matching](https://www.gnu.org/software/bash/manual/html_node/Pattern-Matching.html)
|
||||
- `man 3 fnmatch`
|
||||
- `man 5 gitignore`
|
||||
|
||||
## Windows
|
||||
|
||||
**Please only use forward-slashes in glob expressions.**
|
||||
|
||||
Though windows uses either `/` or `\` as its path separator, only `/`
|
||||
characters are used by this glob implementation. You must use
|
||||
forward-slashes **only** in glob expressions. Back-slashes in patterns
|
||||
characters are used by this glob implementation. You must use
|
||||
forward-slashes **only** in glob expressions. Back-slashes in patterns
|
||||
will always be interpreted as escape characters, not path separators.
|
||||
|
||||
Note that `\` or `/` _will_ be interpreted as path separators in paths on
|
||||
|
|
@ -49,78 +63,144 @@ Windows, and will match against `/` in glob expressions.
|
|||
|
||||
So just always use `/` in patterns.
|
||||
|
||||
### UNC Paths
|
||||
|
||||
On Windows, UNC paths like `//?/c:/...` or
|
||||
`//ComputerName/Share/...` are handled specially.
|
||||
|
||||
- Patterns starting with a double-slash followed by some
|
||||
non-slash characters will preserve their double-slash. As a
|
||||
result, a pattern like `//*` will match `//x`, but not `/x`.
|
||||
- Patterns staring with `//?/<drive letter>:` will _not_ treat
|
||||
the `?` as a wildcard character. Instead, it will be treated
|
||||
as a normal string.
|
||||
- Patterns starting with `//?/<drive letter>:/...` will match
|
||||
file paths starting with `<drive letter>:/...`, and vice versa,
|
||||
as if the `//?/` was not present. This behavior only is
|
||||
present when the drive letters are a case-insensitive match to
|
||||
one another. The remaining portions of the path/pattern are
|
||||
compared case sensitively, unless `nocase:true` is set.
|
||||
|
||||
Note that specifying a UNC path using `\` characters as path
|
||||
separators is always allowed in the file path argument, but only
|
||||
allowed in the pattern argument when `windowsPathsNoEscape: true`
|
||||
is set in the options.
|
||||
|
||||
## Minimatch Class
|
||||
|
||||
Create a minimatch object by instantiating the `minimatch.Minimatch` class.
|
||||
|
||||
```javascript
|
||||
var Minimatch = require("minimatch").Minimatch
|
||||
var Minimatch = require('minimatch').Minimatch
|
||||
var mm = new Minimatch(pattern, options)
|
||||
```
|
||||
|
||||
### Properties
|
||||
|
||||
* `pattern` The original pattern the minimatch object represents.
|
||||
* `options` The options supplied to the constructor.
|
||||
* `set` A 2-dimensional array of regexp or string expressions.
|
||||
- `pattern` The original pattern the minimatch object represents.
|
||||
- `options` The options supplied to the constructor.
|
||||
- `set` A 2-dimensional array of regexp or string expressions.
|
||||
Each row in the
|
||||
array corresponds to a brace-expanded pattern. Each item in the row
|
||||
corresponds to a single path-part. For example, the pattern
|
||||
array corresponds to a brace-expanded pattern. Each item in the row
|
||||
corresponds to a single path-part. For example, the pattern
|
||||
`{a,b/c}/d` would expand to a set of patterns like:
|
||||
|
||||
[ [ a, d ]
|
||||
, [ b, c, d ] ]
|
||||
|
||||
If a portion of the pattern doesn't have any "magic" in it
|
||||
(that is, it's something like `"foo"` rather than `fo*o?`), then it
|
||||
will be left as a string rather than converted to a regular
|
||||
expression.
|
||||
If a portion of the pattern doesn't have any "magic" in it
|
||||
(that is, it's something like `"foo"` rather than `fo*o?`), then it
|
||||
will be left as a string rather than converted to a regular
|
||||
expression.
|
||||
|
||||
* `regexp` Created by the `makeRe` method. A single regular expression
|
||||
expressing the entire pattern. This is useful in cases where you wish
|
||||
- `regexp` Created by the `makeRe` method. A single regular expression
|
||||
expressing the entire pattern. This is useful in cases where you wish
|
||||
to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled.
|
||||
* `negate` True if the pattern is negated.
|
||||
* `comment` True if the pattern is a comment.
|
||||
* `empty` True if the pattern is `""`.
|
||||
- `negate` True if the pattern is negated.
|
||||
- `comment` True if the pattern is a comment.
|
||||
- `empty` True if the pattern is `""`.
|
||||
|
||||
### Methods
|
||||
|
||||
* `makeRe` Generate the `regexp` member if necessary, and return it.
|
||||
- `makeRe()` Generate the `regexp` member if necessary, and return it.
|
||||
Will return `false` if the pattern is invalid.
|
||||
* `match(fname)` Return true if the filename matches the pattern, or
|
||||
- `match(fname)` Return true if the filename matches the pattern, or
|
||||
false otherwise.
|
||||
* `matchOne(fileArray, patternArray, partial)` Take a `/`-split
|
||||
filename, and match it against a single row in the `regExpSet`. This
|
||||
- `matchOne(fileArray, patternArray, partial)` Take a `/`-split
|
||||
filename, and match it against a single row in the `regExpSet`. This
|
||||
method is mainly for internal use, but is exposed so that it can be
|
||||
used by a glob-walker that needs to avoid excessive filesystem calls.
|
||||
- `hasMagic()` Returns true if the parsed pattern contains any
|
||||
magic characters. Returns false if all comparator parts are
|
||||
string literals. If the `magicalBraces` option is set on the
|
||||
constructor, then it will consider brace expansions which are
|
||||
not otherwise magical to be magic. If not set, then a pattern
|
||||
like `a{b,c}d` will return `false`, because neither `abd` nor
|
||||
`acd` contain any special glob characters.
|
||||
|
||||
This does **not** mean that the pattern string can be used as a
|
||||
literal filename, as it may contain magic glob characters that
|
||||
are escaped. For example, the pattern `\\*` or `[*]` would not
|
||||
be considered to have magic, as the matching portion parses to
|
||||
the literal string `'*'` and would match a path named `'*'`,
|
||||
not `'\\*'` or `'[*]'`. The `minimatch.unescape()` method may
|
||||
be used to remove escape characters.
|
||||
|
||||
All other methods are internal, and will be called as necessary.
|
||||
|
||||
### minimatch(path, pattern, options)
|
||||
|
||||
Main export. Tests a path against the pattern using the options.
|
||||
Main export. Tests a path against the pattern using the options.
|
||||
|
||||
```javascript
|
||||
var isJS = minimatch(file, "*.js", { matchBase: true })
|
||||
var isJS = minimatch(file, '*.js', { matchBase: true })
|
||||
```
|
||||
|
||||
### minimatch.filter(pattern, options)
|
||||
|
||||
Returns a function that tests its
|
||||
supplied argument, suitable for use with `Array.filter`. Example:
|
||||
supplied argument, suitable for use with `Array.filter`. Example:
|
||||
|
||||
```javascript
|
||||
var javascripts = fileList.filter(minimatch.filter("*.js", {matchBase: true}))
|
||||
var javascripts = fileList.filter(minimatch.filter('*.js', { matchBase: true }))
|
||||
```
|
||||
|
||||
### minimatch.escape(pattern, options = {})
|
||||
|
||||
Escape all magic characters in a glob pattern, so that it will
|
||||
only ever match literal strings
|
||||
|
||||
If the `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.
|
||||
|
||||
Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot
|
||||
be escaped or unescaped.
|
||||
|
||||
### minimatch.unescape(pattern, options = {})
|
||||
|
||||
Un-escape a glob string that may contain some escaped characters.
|
||||
|
||||
If the `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 `'*'`, because `\` 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.
|
||||
|
||||
### minimatch.match(list, pattern, options)
|
||||
|
||||
Match against the list of
|
||||
files, in the style of fnmatch or glob. If nothing is matched, and
|
||||
files, in the style of fnmatch or glob. If nothing is matched, and
|
||||
options.nonull is set, then return a list containing the pattern itself.
|
||||
|
||||
```javascript
|
||||
var javascripts = minimatch.match(fileList, "*.js", {matchBase: true}))
|
||||
var javascripts = minimatch.match(fileList, '*.js', { matchBase: true })
|
||||
```
|
||||
|
||||
### minimatch.makeRe(pattern, options)
|
||||
|
|
@ -159,16 +239,36 @@ Disable "extglob" style patterns like `+(a|b)`.
|
|||
|
||||
Perform a case-insensitive match.
|
||||
|
||||
### nocaseMagicOnly
|
||||
|
||||
When used with `{nocase: true}`, create regular expressions that
|
||||
are case-insensitive, but leave string match portions untouched.
|
||||
Has no effect when used without `{nocase: true}`
|
||||
|
||||
Useful when some other form of case-insensitive matching is used,
|
||||
or if the original string representation is useful in some other
|
||||
way.
|
||||
|
||||
### nonull
|
||||
|
||||
When a match is not found by `minimatch.match`, return a list containing
|
||||
the pattern itself if this option is set. When not set, an empty list
|
||||
the pattern itself if this option is set. When not set, an empty list
|
||||
is returned if there are no matches.
|
||||
|
||||
### magicalBraces
|
||||
|
||||
This only affects the results of the `Minimatch.hasMagic` method.
|
||||
|
||||
If the pattern contains brace expansions, such as `a{b,c}d`, but
|
||||
no other magic characters, then the `Minipass.hasMagic()` method
|
||||
will return `false` by default. When this option set, it will
|
||||
return `true` for brace expansion as well as other magic glob
|
||||
characters.
|
||||
|
||||
### matchBase
|
||||
|
||||
If set, then patterns without slashes will be matched
|
||||
against the basename of the path if it contains slashes. For example,
|
||||
against the basename of the path if it contains slashes. For example,
|
||||
`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.
|
||||
|
||||
### nocomment
|
||||
|
|
@ -187,58 +287,173 @@ Returns from negate expressions the same as if they were not negated.
|
|||
|
||||
### partial
|
||||
|
||||
Compare a partial path to a pattern. As long as the parts of the path that
|
||||
Compare a partial path to a pattern. As long as the parts of the path that
|
||||
are present are not contradicted by the pattern, it will be treated as a
|
||||
match. This is useful in applications where you're walking through a
|
||||
match. This is useful in applications where you're walking through a
|
||||
folder structure, and don't yet have the full path, but want to ensure that
|
||||
you do not walk down paths that can never be a match.
|
||||
|
||||
For example,
|
||||
|
||||
```js
|
||||
minimatch('/a/b', '/a/*/c/d', { partial: true }) // true, might be /a/b/c/d
|
||||
minimatch('/a/b', '/**/d', { partial: true }) // true, might be /a/b/.../d
|
||||
minimatch('/a/b', '/a/*/c/d', { partial: true }) // true, might be /a/b/c/d
|
||||
minimatch('/a/b', '/**/d', { partial: true }) // true, might be /a/b/.../d
|
||||
minimatch('/x/y/z', '/a/**/z', { partial: true }) // false, because x !== a
|
||||
```
|
||||
|
||||
### windowsPathsNoEscape
|
||||
|
||||
Use `\\` as a path separator _only_, and _never_ as an escape
|
||||
character. If set, all `\\` characters are replaced with `/` in
|
||||
the pattern. Note that this makes it **impossible** to match
|
||||
against paths containing literal glob pattern characters, but
|
||||
allows matching with patterns constructed using `path.join()` and
|
||||
`path.resolve()` on Windows platforms, mimicking the (buggy!)
|
||||
behavior of earlier versions on Windows. Please use with
|
||||
caution, and be mindful of [the caveat about Windows
|
||||
paths](#windows).
|
||||
|
||||
For legacy reasons, this is also set if
|
||||
`options.allowWindowsEscape` is set to the exact value `false`.
|
||||
|
||||
### windowsNoMagicRoot
|
||||
|
||||
When a pattern starts with a UNC path or drive letter, and in
|
||||
`nocase:true` mode, do not convert the root portions of the
|
||||
pattern into a case-insensitive regular expression, and instead
|
||||
leave them as strings.
|
||||
|
||||
This is the default when the platform is `win32` and
|
||||
`nocase:true` is set.
|
||||
|
||||
### preserveMultipleSlashes
|
||||
|
||||
By default, multiple `/` characters (other than the leading `//`
|
||||
in a UNC path, see "UNC Paths" above) are treated as a single
|
||||
`/`.
|
||||
|
||||
That is, a pattern like `a///b` will match the file path `a/b`.
|
||||
|
||||
Set `preserveMultipleSlashes: true` to suppress this behavior.
|
||||
|
||||
### optimizationLevel
|
||||
|
||||
A number indicating the level of optimization that should be done
|
||||
to the pattern prior to parsing and using it for matches.
|
||||
|
||||
Globstar parts `**` are always converted to `*` when `noglobstar`
|
||||
is set, and multiple adjascent `**` parts are converted into a
|
||||
single `**` (ie, `a/**/**/b` will be treated as `a/**/b`, as this
|
||||
is equivalent in all cases).
|
||||
|
||||
- `0` - Make no further changes. In this mode, `.` and `..` are
|
||||
maintained in the pattern, meaning that they must also appear
|
||||
in the same position in the test path string. Eg, a pattern
|
||||
like `a/*/../c` will match the string `a/b/../c` but not the
|
||||
string `a/c`.
|
||||
- `1` - (default) Remove cases where a double-dot `..` follows a
|
||||
pattern portion that is not `**`, `.`, `..`, or empty `''`. For
|
||||
example, the pattern `./a/b/../*` is converted to `./a/*`, and
|
||||
so it will match the path string `./a/c`, but not the path
|
||||
string `./a/b/../c`. Dots and empty path portions in the
|
||||
pattern are preserved.
|
||||
- `2` (or higher) - Much more aggressive optimizations, suitable
|
||||
for use with file-walking cases:
|
||||
|
||||
- Remove cases where a double-dot `..` follows a pattern
|
||||
portion that is not `**`, `.`, or empty `''`. Remove empty
|
||||
and `.` portions of the pattern, where safe to do so (ie,
|
||||
anywhere other than the last position, the first position, or
|
||||
the second position in a pattern starting with `/`, as this
|
||||
may indicate a UNC path on Windows).
|
||||
- Convert patterns containing `<pre>/**/../<p>/<rest>` into the
|
||||
equivalent `<pre>/{..,**}/<p>/<rest>`, where `<p>` is a
|
||||
a pattern portion other than `.`, `..`, `**`, or empty
|
||||
`''`.
|
||||
- Dedupe patterns where a `**` portion is present in one and
|
||||
omitted in another, and it is not the final path portion, and
|
||||
they are otherwise equivalent. So `{a/**/b,a/b}` becomes
|
||||
`a/**/b`, because `**` matches against an empty path portion.
|
||||
- Dedupe patterns where a `*` portion is present in one, and a
|
||||
non-dot pattern other than `**`, `.`, `..`, or `''` is in the
|
||||
same position in the other. So `a/{*,x}/b` becomes `a/*/b`,
|
||||
because `*` can match against `x`.
|
||||
|
||||
While these optimizations improve the performance of
|
||||
file-walking use cases such as [glob](http://npm.im/glob) (ie,
|
||||
the reason this module exists), there are cases where it will
|
||||
fail to match a literal string that would have been matched in
|
||||
optimization level 1 or 0.
|
||||
|
||||
Specifically, while the `Minimatch.match()` method will
|
||||
optimize the file path string in the same ways, resulting in
|
||||
the same matches, it will fail when tested with the regular
|
||||
expression provided by `Minimatch.makeRe()`, unless the path
|
||||
string is first processed with
|
||||
`minimatch.levelTwoFileOptimize()` or similar.
|
||||
|
||||
### platform
|
||||
|
||||
When set to `win32`, this will trigger all windows-specific
|
||||
behaviors (special handling for UNC paths, and treating `\` as
|
||||
separators in file paths for comparison.)
|
||||
|
||||
Defaults to the value of `process.platform`.
|
||||
|
||||
## Comparisons to other fnmatch/glob implementations
|
||||
|
||||
While strict compliance with the existing standards is a worthwhile
|
||||
goal, some discrepancies exist between minimatch and other
|
||||
implementations, and are intentional.
|
||||
While strict compliance with the existing standards is a
|
||||
worthwhile goal, some discrepancies exist between minimatch and
|
||||
other implementations. Some are intentional, and some are
|
||||
unavoidable.
|
||||
|
||||
If the pattern starts with a `!` character, then it is negated. Set the
|
||||
If the pattern starts with a `!` character, then it is negated. Set the
|
||||
`nonegate` flag to suppress this behavior, and treat leading `!`
|
||||
characters normally. This is perhaps relevant if you wish to start the
|
||||
pattern with a negative extglob pattern like `!(a|B)`. Multiple `!`
|
||||
characters normally. This is perhaps relevant if you wish to start the
|
||||
pattern with a negative extglob pattern like `!(a|B)`. Multiple `!`
|
||||
characters at the start of a pattern will negate the pattern multiple
|
||||
times.
|
||||
|
||||
If a pattern starts with `#`, then it is treated as a comment, and
|
||||
will not match anything. Use `\#` to match a literal `#` at the
|
||||
will not match anything. Use `\#` to match a literal `#` at the
|
||||
start of a line, or set the `nocomment` flag to suppress this behavior.
|
||||
|
||||
The double-star character `**` is supported by default, unless the
|
||||
`noglobstar` flag is set. This is supported in the manner of bsdglob
|
||||
`noglobstar` flag is set. This is supported in the manner of bsdglob
|
||||
and bash 4.1, where `**` only has special significance if it is the only
|
||||
thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but
|
||||
thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but
|
||||
`a/**b` will not.
|
||||
|
||||
If an escaped pattern has no matches, and the `nonull` flag is set,
|
||||
then minimatch.match returns the pattern as-provided, rather than
|
||||
interpreting the character escapes. For example,
|
||||
interpreting the character escapes. For example,
|
||||
`minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than
|
||||
`"*a?"`. This is akin to setting the `nullglob` option in bash, except
|
||||
`"*a?"`. This is akin to setting the `nullglob` option in bash, except
|
||||
that it does not resolve escaped pattern characters.
|
||||
|
||||
If brace expansion is not disabled, then it is performed before any
|
||||
other interpretation of the glob pattern. Thus, a pattern like
|
||||
other interpretation of the glob pattern. Thus, a pattern like
|
||||
`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded
|
||||
**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are
|
||||
checked for validity. Since those two are valid, matching proceeds.
|
||||
checked for validity. Since those two are valid, matching proceeds.
|
||||
|
||||
Negated extglob patterns are handled as closely as possible to
|
||||
Bash semantics, but there are some cases with negative extglobs
|
||||
which are exceedingly difficult to express in a JavaScript
|
||||
regular expression. In particular the negated pattern
|
||||
`<start>!(<pattern>*|)*` will in bash match anything that does
|
||||
not start with `<start><pattern>`. However,
|
||||
`<start>!(<pattern>*)*` _will_ match paths starting with
|
||||
`<start><pattern>`, because the empty string can match against
|
||||
the negated portion. In this library, `<start>!(<pattern>*|)*`
|
||||
will _not_ match any pattern starting with `<start>`, due to a
|
||||
difference in precisely which patterns are considered "greedy" in
|
||||
Regular Expressions vs bash path expansion. This may be fixable,
|
||||
but not without incurring some complexity and performance costs,
|
||||
and the trade-off seems to not be worth pursuing.
|
||||
|
||||
Note that `fnmatch(3)` in libc is an extremely naive string comparison
|
||||
matcher, which does not do anything special for slashes. This library is
|
||||
matcher, which does not do anything special for slashes. This library is
|
||||
designed to be used in glob searching and file walkers, and so it does do
|
||||
special things with `/`. Thus, `foo*` will not match `foo/bar` in this
|
||||
special things with `/`. Thus, `foo*` will not match `foo/bar` in this
|
||||
library, even though it would in `fnmatch(3)`.
|
||||
|
|
|
|||
8
node_modules/glob/node_modules/minimatch/dist/cjs/brace-expressions.d.ts
generated
vendored
Normal file
8
node_modules/glob/node_modules/minimatch/dist/cjs/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/glob/node_modules/minimatch/dist/cjs/brace-expressions.d.ts.map
generated
vendored
Normal file
1
node_modules/glob/node_modules/minimatch/dist/cjs/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"}
|
||||
152
node_modules/glob/node_modules/minimatch/dist/cjs/brace-expressions.js
generated
vendored
Normal file
152
node_modules/glob/node_modules/minimatch/dist/cjs/brace-expressions.js
generated
vendored
Normal file
|
|
@ -0,0 +1,152 @@
|
|||
"use strict";
|
||||
// translate the various posix character classes into unicode properties
|
||||
// this works across all unicode locales
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.parseClass = void 0;
|
||||
// { <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.
|
||||
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];
|
||||
};
|
||||
exports.parseClass = parseClass;
|
||||
//# sourceMappingURL=brace-expressions.js.map
|
||||
1
node_modules/glob/node_modules/minimatch/dist/cjs/brace-expressions.js.map
generated
vendored
Normal file
1
node_modules/glob/node_modules/minimatch/dist/cjs/brace-expressions.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"brace-expressions.js","sourceRoot":"","sources":["../../src/brace-expressions.ts"],"names":[],"mappings":";AAAA,w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CAAC,CAAA;KACrD;IAED,MAAM,OAAO,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,cAAc,CAAC,MAAM,CAAC,GAAG,GAAG,CAAA;IACxE,MAAM,KAAK,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,cAAc,CAAC,IAAI,CAAC,GAAG,GAAG,CAAA;IACpE,MAAM,IAAI,GACR,MAAM,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM;QAC1B,CAAC,CAAC,GAAG,GAAG,OAAO,GAAG,GAAG,GAAG,KAAK,GAAG,GAAG;QACnC,CAAC,CAAC,MAAM,CAAC,MAAM;YACf,CAAC,CAAC,OAAO;YACT,CAAC,CAAC,KAAK,CAAA;IAEX,OAAO,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,GAAG,EAAE,IAAI,CAAC,CAAA;AAC1C,CAAC,CAAA;AAhIY,QAAA,UAAU,cAgItB"}
|
||||
12
node_modules/glob/node_modules/minimatch/dist/cjs/escape.d.ts
generated
vendored
Normal file
12
node_modules/glob/node_modules/minimatch/dist/cjs/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/glob/node_modules/minimatch/dist/cjs/escape.d.ts.map
generated
vendored
Normal file
1
node_modules/glob/node_modules/minimatch/dist/cjs/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"}
|
||||
22
node_modules/glob/node_modules/minimatch/dist/cjs/escape.js
generated
vendored
Normal file
22
node_modules/glob/node_modules/minimatch/dist/cjs/escape.js
generated
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.escape = void 0;
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
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, '\\$&');
|
||||
};
|
||||
exports.escape = escape;
|
||||
//# sourceMappingURL=escape.js.map
|
||||
1
node_modules/glob/node_modules/minimatch/dist/cjs/escape.js.map
generated
vendored
Normal file
1
node_modules/glob/node_modules/minimatch/dist/cjs/escape.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"escape.js","sourceRoot":"","sources":["../../src/escape.ts"],"names":[],"mappings":";;;AACA;;;;;;;;GAQG;AACI,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;AAZY,QAAA,MAAM,UAYlB"}
|
||||
42
node_modules/glob/node_modules/minimatch/dist/cjs/index-cjs.d.ts
generated
vendored
Normal file
42
node_modules/glob/node_modules/minimatch/dist/cjs/index-cjs.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
declare const _default: {
|
||||
(p: string, pattern: string, options?: import("./index.js").MinimatchOptions): boolean;
|
||||
sep: "\\" | "/";
|
||||
GLOBSTAR: typeof import("./index.js").GLOBSTAR;
|
||||
filter: (pattern: string, options?: import("./index.js").MinimatchOptions) => (p: string) => boolean;
|
||||
defaults: (def: import("./index.js").MinimatchOptions) => any;
|
||||
braceExpand: (pattern: string, options?: import("./index.js").MinimatchOptions) => string[];
|
||||
makeRe: (pattern: string, options?: import("./index.js").MinimatchOptions) => false | import("./index.js").MMRegExp;
|
||||
match: (list: string[], pattern: string, options?: import("./index.js").MinimatchOptions) => string[];
|
||||
Minimatch: typeof import("./index.js").Minimatch;
|
||||
escape: (s: string, { windowsPathsNoEscape, }?: Pick<import("./index.js").MinimatchOptions, "windowsPathsNoEscape">) => string;
|
||||
unescape: (s: string, { windowsPathsNoEscape, }?: Pick<import("./index.js").MinimatchOptions, "windowsPathsNoEscape">) => string;
|
||||
} & {
|
||||
default: {
|
||||
(p: string, pattern: string, options?: import("./index.js").MinimatchOptions): boolean;
|
||||
sep: "\\" | "/";
|
||||
GLOBSTAR: typeof import("./index.js").GLOBSTAR;
|
||||
filter: (pattern: string, options?: import("./index.js").MinimatchOptions) => (p: string) => boolean;
|
||||
defaults: (def: import("./index.js").MinimatchOptions) => any;
|
||||
braceExpand: (pattern: string, options?: import("./index.js").MinimatchOptions) => string[];
|
||||
makeRe: (pattern: string, options?: import("./index.js").MinimatchOptions) => false | import("./index.js").MMRegExp;
|
||||
match: (list: string[], pattern: string, options?: import("./index.js").MinimatchOptions) => string[];
|
||||
Minimatch: typeof import("./index.js").Minimatch;
|
||||
escape: (s: string, { windowsPathsNoEscape, }?: Pick<import("./index.js").MinimatchOptions, "windowsPathsNoEscape">) => string;
|
||||
unescape: (s: string, { windowsPathsNoEscape, }?: Pick<import("./index.js").MinimatchOptions, "windowsPathsNoEscape">) => string;
|
||||
};
|
||||
minimatch: {
|
||||
(p: string, pattern: string, options?: import("./index.js").MinimatchOptions): boolean;
|
||||
sep: "\\" | "/";
|
||||
GLOBSTAR: typeof import("./index.js").GLOBSTAR;
|
||||
filter: (pattern: string, options?: import("./index.js").MinimatchOptions) => (p: string) => boolean;
|
||||
defaults: (def: import("./index.js").MinimatchOptions) => any;
|
||||
braceExpand: (pattern: string, options?: import("./index.js").MinimatchOptions) => string[];
|
||||
makeRe: (pattern: string, options?: import("./index.js").MinimatchOptions) => false | import("./index.js").MMRegExp;
|
||||
match: (list: string[], pattern: string, options?: import("./index.js").MinimatchOptions) => string[];
|
||||
Minimatch: typeof import("./index.js").Minimatch;
|
||||
escape: (s: string, { windowsPathsNoEscape, }?: Pick<import("./index.js").MinimatchOptions, "windowsPathsNoEscape">) => string;
|
||||
unescape: (s: string, { windowsPathsNoEscape, }?: Pick<import("./index.js").MinimatchOptions, "windowsPathsNoEscape">) => string;
|
||||
};
|
||||
};
|
||||
export = _default;
|
||||
//# sourceMappingURL=index-cjs.d.ts.map
|
||||
1
node_modules/glob/node_modules/minimatch/dist/cjs/index-cjs.d.ts.map
generated
vendored
Normal file
1
node_modules/glob/node_modules/minimatch/dist/cjs/index-cjs.d.ts.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"index-cjs.d.ts","sourceRoot":"","sources":["../../src/index-cjs.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,kBAAoE"}
|
||||
7
node_modules/glob/node_modules/minimatch/dist/cjs/index-cjs.js
generated
vendored
Normal file
7
node_modules/glob/node_modules/minimatch/dist/cjs/index-cjs.js
generated
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
const index_js_1 = __importDefault(require("./index.js"));
|
||||
module.exports = Object.assign(index_js_1.default, { default: index_js_1.default, minimatch: index_js_1.default });
|
||||
//# sourceMappingURL=index-cjs.js.map
|
||||
1
node_modules/glob/node_modules/minimatch/dist/cjs/index-cjs.js.map
generated
vendored
Normal file
1
node_modules/glob/node_modules/minimatch/dist/cjs/index-cjs.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"index-cjs.js","sourceRoot":"","sources":["../../src/index-cjs.ts"],"names":[],"mappings":";;;;AAAA,0DAAkC;AAElC,iBAAS,MAAM,CAAC,MAAM,CAAC,kBAAS,EAAE,EAAE,OAAO,EAAE,kBAAS,EAAE,SAAS,EAAT,kBAAS,EAAE,CAAC,CAAA"}
|
||||
92
node_modules/glob/node_modules/minimatch/dist/cjs/index.d.ts
generated
vendored
Normal file
92
node_modules/glob/node_modules/minimatch/dist/cjs/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
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?: typeof process.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[];
|
||||
Minimatch: typeof Minimatch;
|
||||
escape: (s: string, { windowsPathsNoEscape, }?: Pick<MinimatchOptions, "windowsPathsNoEscape">) => string;
|
||||
unescape: (s: string, { windowsPathsNoEscape, }?: Pick<MinimatchOptions, "windowsPathsNoEscape">) => string;
|
||||
};
|
||||
export default minimatch;
|
||||
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;
|
||||
};
|
||||
type SubparseReturn = [string, boolean];
|
||||
type ParseReturnFiltered = string | MMRegExp | typeof GLOBSTAR;
|
||||
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: typeof process.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 | SubparseReturn;
|
||||
makeRe(): false | MMRegExp;
|
||||
slashSplit(p: string): string[];
|
||||
match(f: string, partial?: boolean): boolean;
|
||||
static defaults(def: MinimatchOptions): typeof Minimatch;
|
||||
}
|
||||
export { escape } from './escape.js';
|
||||
export { unescape } from './unescape.js';
|
||||
//# sourceMappingURL=index.d.ts.map
|
||||
1
node_modules/glob/node_modules/minimatch/dist/cjs/index.d.ts.map
generated
vendored
Normal file
1
node_modules/glob/node_modules/minimatch/dist/cjs/index.d.ts.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|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/index.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
1
node_modules/glob/node_modules/minimatch/dist/cjs/index.js.map
generated
vendored
Normal file
1
node_modules/glob/node_modules/minimatch/dist/cjs/index.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
3
node_modules/glob/node_modules/minimatch/dist/cjs/package.json
generated
vendored
Normal file
3
node_modules/glob/node_modules/minimatch/dist/cjs/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"type": "commonjs"
|
||||
}
|
||||
17
node_modules/glob/node_modules/minimatch/dist/cjs/unescape.d.ts
generated
vendored
Normal file
17
node_modules/glob/node_modules/minimatch/dist/cjs/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/glob/node_modules/minimatch/dist/cjs/unescape.d.ts.map
generated
vendored
Normal file
1
node_modules/glob/node_modules/minimatch/dist/cjs/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"}
|
||||
24
node_modules/glob/node_modules/minimatch/dist/cjs/unescape.js
generated
vendored
Normal file
24
node_modules/glob/node_modules/minimatch/dist/cjs/unescape.js
generated
vendored
Normal file
|
|
@ -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
|
||||
1
node_modules/glob/node_modules/minimatch/dist/cjs/unescape.js.map
generated
vendored
Normal file
1
node_modules/glob/node_modules/minimatch/dist/cjs/unescape.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"unescape.js","sourceRoot":"","sources":["../../src/unescape.ts"],"names":[],"mappings":";;;AACA;;;;;;;;;;;;;GAaG;AACI,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;AATY,QAAA,QAAQ,YASpB"}
|
||||
8
node_modules/glob/node_modules/minimatch/dist/mjs/brace-expressions.d.ts
generated
vendored
Normal file
8
node_modules/glob/node_modules/minimatch/dist/mjs/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/glob/node_modules/minimatch/dist/mjs/brace-expressions.d.ts.map
generated
vendored
Normal file
1
node_modules/glob/node_modules/minimatch/dist/mjs/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/glob/node_modules/minimatch/dist/mjs/brace-expressions.js
generated
vendored
Normal file
148
node_modules/glob/node_modules/minimatch/dist/mjs/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/glob/node_modules/minimatch/dist/mjs/brace-expressions.js.map
generated
vendored
Normal file
1
node_modules/glob/node_modules/minimatch/dist/mjs/brace-expressions.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"brace-expressions.js","sourceRoot":"","sources":["../../src/brace-expressions.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,wCAAwC;AAExC,8DAA8D;AAC9D,MAAM,YAAY,GAA0D;IAC1E,WAAW,EAAE,CAAC,sBAAsB,EAAE,IAAI,CAAC;IAC3C,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E,CAAC,GAAG,cAAc,CAAC,MAAM,CAAC,GAAG,GAAG,CAAA;IACxE,MAAM,KAAK,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,cAAc,CAAC,IAAI,CAAC,GAAG,GAAG,CAAA;IACpE,MAAM,IAAI,GACR,MAAM,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM;QAC1B,CAAC,CAAC,GAAG,GAAG,OAAO,GAAG,GAAG,GAAG,KAAK,GAAG,GAAG;QACnC,CAAC,CAAC,MAAM,CAAC,MAAM;YACf,CAAC,CAAC,OAAO;YACT,CAAC,CAAC,KAAK,CAAA;IAEX,OAAO,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,GAAG,EAAE,IAAI,CAAC,CAAA;AAC1C,CAAC,CAAA"}
|
||||
12
node_modules/glob/node_modules/minimatch/dist/mjs/escape.d.ts
generated
vendored
Normal file
12
node_modules/glob/node_modules/minimatch/dist/mjs/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/glob/node_modules/minimatch/dist/mjs/escape.d.ts.map
generated
vendored
Normal file
1
node_modules/glob/node_modules/minimatch/dist/mjs/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/glob/node_modules/minimatch/dist/mjs/escape.js
generated
vendored
Normal file
18
node_modules/glob/node_modules/minimatch/dist/mjs/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/glob/node_modules/minimatch/dist/mjs/escape.js.map
generated
vendored
Normal file
1
node_modules/glob/node_modules/minimatch/dist/mjs/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"}
|
||||
92
node_modules/glob/node_modules/minimatch/dist/mjs/index.d.ts
generated
vendored
Normal file
92
node_modules/glob/node_modules/minimatch/dist/mjs/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
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?: typeof process.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[];
|
||||
Minimatch: typeof Minimatch;
|
||||
escape: (s: string, { windowsPathsNoEscape, }?: Pick<MinimatchOptions, "windowsPathsNoEscape">) => string;
|
||||
unescape: (s: string, { windowsPathsNoEscape, }?: Pick<MinimatchOptions, "windowsPathsNoEscape">) => string;
|
||||
};
|
||||
export default minimatch;
|
||||
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;
|
||||
};
|
||||
type SubparseReturn = [string, boolean];
|
||||
type ParseReturnFiltered = string | MMRegExp | typeof GLOBSTAR;
|
||||
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: typeof process.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 | SubparseReturn;
|
||||
makeRe(): false | MMRegExp;
|
||||
slashSplit(p: string): string[];
|
||||
match(f: string, partial?: boolean): boolean;
|
||||
static defaults(def: MinimatchOptions): typeof Minimatch;
|
||||
}
|
||||
export { escape } from './escape.js';
|
||||
export { unescape } from './unescape.js';
|
||||
//# sourceMappingURL=index.d.ts.map
|
||||
1
node_modules/glob/node_modules/minimatch/dist/mjs/index.d.ts.map
generated
vendored
Normal file
1
node_modules/glob/node_modules/minimatch/dist/mjs/index.d.ts.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,uBAAuB,CAAC,EAAE,OAAO,CAAA;IACjC,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B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AAE,WAAW,EAAE,EAAE,OAAO,GAAE,OAAe;IAkNzE,WAAW;IAIX,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,WAAW,GAAG,cAAc;IAgXpD,MAAM;IAgFN,UAAU,CAAC,CAAC,EAAE,MAAM;IAepB,KAAK,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,UAAe;IAiEvC,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAE,gBAAgB;CAGtC;AAED,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA"}
|
||||
1289
node_modules/glob/node_modules/minimatch/dist/mjs/index.js
generated
vendored
Normal file
1289
node_modules/glob/node_modules/minimatch/dist/mjs/index.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue