Initial commit

This commit is contained in:
pasketti
2026-04-05 16:14:49 -04:00
commit ebee3a5534
14059 changed files with 2588797 additions and 0 deletions

21
node_modules/extglob/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2015-2017, Jon Schlinkert.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

331
node_modules/extglob/index.js generated vendored Normal file
View File

@@ -0,0 +1,331 @@
'use strict';
/**
* Module dependencies
*/
var extend = require('extend-shallow');
var unique = require('array-unique');
var toRegex = require('to-regex');
/**
* Local dependencies
*/
var compilers = require('./lib/compilers');
var parsers = require('./lib/parsers');
var Extglob = require('./lib/extglob');
var utils = require('./lib/utils');
var MAX_LENGTH = 1024 * 64;
/**
* Convert the given `extglob` pattern into a regex-compatible string. Returns
* an object with the compiled result and the parsed AST.
*
* ```js
* var extglob = require('extglob');
* console.log(extglob('*.!(*a)'));
* //=> '(?!\\.)[^/]*?\\.(?!(?!\\.)[^/]*?a\\b).*?'
* ```
* @param {String} `pattern`
* @param {Object} `options`
* @return {String}
* @api public
*/
function extglob(pattern, options) {
return extglob.create(pattern, options).output;
}
/**
* Takes an array of strings and an extglob pattern and returns a new
* array that contains only the strings that match the pattern.
*
* ```js
* var extglob = require('extglob');
* console.log(extglob.match(['a.a', 'a.b', 'a.c'], '*.!(*a)'));
* //=> ['a.b', 'a.c']
* ```
* @param {Array} `list` Array of strings to match
* @param {String} `pattern` Extglob pattern
* @param {Object} `options`
* @return {Array} Returns an array of matches
* @api public
*/
extglob.match = function(list, pattern, options) {
if (typeof pattern !== 'string') {
throw new TypeError('expected pattern to be a string');
}
list = utils.arrayify(list);
var isMatch = extglob.matcher(pattern, options);
var len = list.length;
var idx = -1;
var matches = [];
while (++idx < len) {
var ele = list[idx];
if (isMatch(ele)) {
matches.push(ele);
}
}
// if no options were passed, uniquify results and return
if (typeof options === 'undefined') {
return unique(matches);
}
if (matches.length === 0) {
if (options.failglob === true) {
throw new Error('no matches found for "' + pattern + '"');
}
if (options.nonull === true || options.nullglob === true) {
return [pattern.split('\\').join('')];
}
}
return options.nodupes !== false ? unique(matches) : matches;
};
/**
* Returns true if the specified `string` matches the given
* extglob `pattern`.
*
* ```js
* var extglob = require('extglob');
*
* console.log(extglob.isMatch('a.a', '*.!(*a)'));
* //=> false
* console.log(extglob.isMatch('a.b', '*.!(*a)'));
* //=> true
* ```
* @param {String} `string` String to match
* @param {String} `pattern` Extglob pattern
* @param {String} `options`
* @return {Boolean}
* @api public
*/
extglob.isMatch = function(str, pattern, options) {
if (typeof pattern !== 'string') {
throw new TypeError('expected pattern to be a string');
}
if (typeof str !== 'string') {
throw new TypeError('expected a string');
}
if (pattern === str) {
return true;
}
if (pattern === '' || pattern === ' ' || pattern === '.') {
return pattern === str;
}
var isMatch = utils.memoize('isMatch', pattern, options, extglob.matcher);
return isMatch(str);
};
/**
* Returns true if the given `string` contains the given pattern. Similar to `.isMatch` but
* the pattern can match any part of the string.
*
* ```js
* var extglob = require('extglob');
* console.log(extglob.contains('aa/bb/cc', '*b'));
* //=> true
* console.log(extglob.contains('aa/bb/cc', '*d'));
* //=> false
* ```
* @param {String} `str` The string to match.
* @param {String} `pattern` Glob pattern to use for matching.
* @param {Object} `options`
* @return {Boolean} Returns true if the patter matches any part of `str`.
* @api public
*/
extglob.contains = function(str, pattern, options) {
if (typeof str !== 'string') {
throw new TypeError('expected a string');
}
if (pattern === '' || pattern === ' ' || pattern === '.') {
return pattern === str;
}
var opts = extend({}, options, {contains: true});
opts.strictClose = false;
opts.strictOpen = false;
return extglob.isMatch(str, pattern, opts);
};
/**
* Takes an extglob pattern and returns a matcher function. The returned
* function takes the string to match as its only argument.
*
* ```js
* var extglob = require('extglob');
* var isMatch = extglob.matcher('*.!(*a)');
*
* console.log(isMatch('a.a'));
* //=> false
* console.log(isMatch('a.b'));
* //=> true
* ```
* @param {String} `pattern` Extglob pattern
* @param {String} `options`
* @return {Boolean}
* @api public
*/
extglob.matcher = function(pattern, options) {
if (typeof pattern !== 'string') {
throw new TypeError('expected pattern to be a string');
}
function matcher() {
var re = extglob.makeRe(pattern, options);
return function(str) {
return re.test(str);
};
}
return utils.memoize('matcher', pattern, options, matcher);
};
/**
* Convert the given `extglob` pattern into a regex-compatible string. Returns
* an object with the compiled result and the parsed AST.
*
* ```js
* var extglob = require('extglob');
* console.log(extglob.create('*.!(*a)').output);
* //=> '(?!\\.)[^/]*?\\.(?!(?!\\.)[^/]*?a\\b).*?'
* ```
* @param {String} `str`
* @param {Object} `options`
* @return {String}
* @api public
*/
extglob.create = function(pattern, options) {
if (typeof pattern !== 'string') {
throw new TypeError('expected pattern to be a string');
}
function create() {
var ext = new Extglob(options);
var ast = ext.parse(pattern, options);
return ext.compile(ast, options);
}
return utils.memoize('create', pattern, options, create);
};
/**
* Returns an array of matches captured by `pattern` in `string`, or `null`
* if the pattern did not match.
*
* ```js
* var extglob = require('extglob');
* extglob.capture(pattern, string[, options]);
*
* console.log(extglob.capture('test/*.js', 'test/foo.js'));
* //=> ['foo']
* console.log(extglob.capture('test/*.js', 'foo/bar.css'));
* //=> null
* ```
* @param {String} `pattern` Glob pattern to use for matching.
* @param {String} `string` String to match
* @param {Object} `options` See available [options](#options) for changing how matches are performed
* @return {Boolean} Returns an array of captures if the string matches the glob pattern, otherwise `null`.
* @api public
*/
extglob.capture = function(pattern, str, options) {
var re = extglob.makeRe(pattern, extend({capture: true}, options));
function match() {
return function(string) {
var match = re.exec(string);
if (!match) {
return null;
}
return match.slice(1);
};
}
var capture = utils.memoize('capture', pattern, options, match);
return capture(str);
};
/**
* Create a regular expression from the given `pattern` and `options`.
*
* ```js
* var extglob = require('extglob');
* var re = extglob.makeRe('*.!(*a)');
* console.log(re);
* //=> /^[^\/]*?\.(?![^\/]*?a)[^\/]*?$/
* ```
* @param {String} `pattern` The pattern to convert to regex.
* @param {Object} `options`
* @return {RegExp}
* @api public
*/
extglob.makeRe = function(pattern, options) {
if (pattern instanceof RegExp) {
return pattern;
}
if (typeof pattern !== 'string') {
throw new TypeError('expected pattern to be a string');
}
if (pattern.length > MAX_LENGTH) {
throw new Error('expected pattern to be less than ' + MAX_LENGTH + ' characters');
}
function makeRe() {
var opts = extend({strictErrors: false}, options);
if (opts.strictErrors === true) opts.strict = true;
var res = extglob.create(pattern, opts);
return toRegex(res.output, opts);
}
var regex = utils.memoize('makeRe', pattern, options, makeRe);
if (regex.source.length > MAX_LENGTH) {
throw new SyntaxError('potentially malicious regex detected');
}
return regex;
};
/**
* Cache
*/
extglob.cache = utils.cache;
extglob.clearCache = function() {
extglob.cache.__data__ = {};
};
/**
* Expose `Extglob` constructor, parsers and compilers
*/
extglob.Extglob = Extglob;
extglob.compilers = compilers;
extglob.parsers = parsers;
/**
* Expose `extglob`
* @type {Function}
*/
module.exports = extglob;

169
node_modules/extglob/lib/compilers.js generated vendored Normal file
View File

@@ -0,0 +1,169 @@
'use strict';
var brackets = require('expand-brackets');
/**
* Extglob compilers
*/
module.exports = function(extglob) {
function star() {
if (typeof extglob.options.star === 'function') {
return extglob.options.star.apply(this, arguments);
}
if (typeof extglob.options.star === 'string') {
return extglob.options.star;
}
return '.*?';
}
/**
* Use `expand-brackets` compilers
*/
extglob.use(brackets.compilers);
extglob.compiler
/**
* Escaped: "\\*"
*/
.set('escape', function(node) {
return this.emit(node.val, node);
})
/**
* Dot: "."
*/
.set('dot', function(node) {
return this.emit('\\' + node.val, node);
})
/**
* Question mark: "?"
*/
.set('qmark', function(node) {
var val = '[^\\\\/.]';
var prev = this.prev();
if (node.parsed.slice(-1) === '(') {
var ch = node.rest.charAt(0);
if (ch !== '!' && ch !== '=' && ch !== ':') {
return this.emit(val, node);
}
return this.emit(node.val, node);
}
if (prev.type === 'text' && prev.val) {
return this.emit(val, node);
}
if (node.val.length > 1) {
val += '{' + node.val.length + '}';
}
return this.emit(val, node);
})
/**
* Plus: "+"
*/
.set('plus', function(node) {
var prev = node.parsed.slice(-1);
if (prev === ']' || prev === ')') {
return this.emit(node.val, node);
}
var ch = this.output.slice(-1);
if (!this.output || (/[?*+]/.test(ch) && node.parent.type !== 'bracket')) {
return this.emit('\\+', node);
}
if (/\w/.test(ch) && !node.inside) {
return this.emit('+\\+?', node);
}
return this.emit('+', node);
})
/**
* Star: "*"
*/
.set('star', function(node) {
var prev = this.prev();
var prefix = prev.type !== 'text' && prev.type !== 'escape'
? '(?!\\.)'
: '';
return this.emit(prefix + star.call(this, node), node);
})
/**
* Parens
*/
.set('paren', function(node) {
return this.mapVisit(node.nodes);
})
.set('paren.open', function(node) {
var capture = this.options.capture ? '(' : '';
switch (node.parent.prefix) {
case '!':
case '^':
return this.emit(capture + '(?:(?!(?:', node);
case '*':
case '+':
case '?':
case '@':
return this.emit(capture + '(?:', node);
default: {
var val = node.val;
if (this.options.bash === true) {
val = '\\' + val;
} else if (!this.options.capture && val === '(' && node.parent.rest[0] !== '?') {
val += '?:';
}
return this.emit(val, node);
}
}
})
.set('paren.close', function(node) {
var capture = this.options.capture ? ')' : '';
switch (node.prefix) {
case '!':
case '^':
var prefix = /^(\)|$)/.test(node.rest) ? '$' : '';
var str = star.call(this, node);
// if the extglob has a slash explicitly defined, we know the user wants
// to match slashes, so we need to ensure the "star" regex allows for it
if (node.parent.hasSlash && !this.options.star && this.options.slash !== false) {
str = '.*?';
}
return this.emit(prefix + ('))' + str + ')') + capture, node);
case '*':
case '+':
case '?':
return this.emit(')' + node.prefix + capture, node);
case '@':
return this.emit(')' + capture, node);
default: {
var val = (this.options.bash === true ? '\\' : '') + ')';
return this.emit(val, node);
}
}
})
/**
* Text
*/
.set('text', function(node) {
var val = node.val.replace(/[\[\]]/g, '\\$&');
return this.emit(val, node);
});
};

78
node_modules/extglob/lib/extglob.js generated vendored Normal file
View File

@@ -0,0 +1,78 @@
'use strict';
/**
* Module dependencies
*/
var Snapdragon = require('snapdragon');
var define = require('define-property');
var extend = require('extend-shallow');
/**
* Local dependencies
*/
var compilers = require('./compilers');
var parsers = require('./parsers');
/**
* Customize Snapdragon parser and renderer
*/
function Extglob(options) {
this.options = extend({source: 'extglob'}, options);
this.snapdragon = this.options.snapdragon || new Snapdragon(this.options);
this.snapdragon.patterns = this.snapdragon.patterns || {};
this.compiler = this.snapdragon.compiler;
this.parser = this.snapdragon.parser;
compilers(this.snapdragon);
parsers(this.snapdragon);
/**
* Override Snapdragon `.parse` method
*/
define(this.snapdragon, 'parse', function(str, options) {
var parsed = Snapdragon.prototype.parse.apply(this, arguments);
parsed.input = str;
// escape unmatched brace/bracket/parens
var last = this.parser.stack.pop();
if (last && this.options.strict !== true) {
var node = last.nodes[0];
node.val = '\\' + node.val;
var sibling = node.parent.nodes[1];
if (sibling.type === 'star') {
sibling.loose = true;
}
}
// add non-enumerable parser reference
define(parsed, 'parser', this.parser);
return parsed;
});
/**
* Decorate `.parse` method
*/
define(this, 'parse', function(ast, options) {
return this.snapdragon.parse.apply(this.snapdragon, arguments);
});
/**
* Decorate `.compile` method
*/
define(this, 'compile', function(ast, options) {
return this.snapdragon.compile.apply(this.snapdragon, arguments);
});
}
/**
* Expose `Extglob`
*/
module.exports = Extglob;

156
node_modules/extglob/lib/parsers.js generated vendored Normal file
View File

@@ -0,0 +1,156 @@
'use strict';
var brackets = require('expand-brackets');
var define = require('define-property');
var utils = require('./utils');
/**
* Characters to use in text regex (we want to "not" match
* characters that are matched by other parsers)
*/
var TEXT_REGEX = '([!@*?+]?\\(|\\)|[*?.+\\\\]|\\[:?(?=.*\\])|:?\\])+';
var not = utils.createRegex(TEXT_REGEX);
/**
* Extglob parsers
*/
function parsers(extglob) {
extglob.state = extglob.state || {};
/**
* Use `expand-brackets` parsers
*/
extglob.use(brackets.parsers);
extglob.parser.sets.paren = extglob.parser.sets.paren || [];
extglob.parser
/**
* Extglob open: "*("
*/
.capture('paren.open', function() {
var parsed = this.parsed;
var pos = this.position();
var m = this.match(/^([!@*?+])?\(/);
if (!m) return;
var prev = this.prev();
var prefix = m[1];
var val = m[0];
var open = pos({
type: 'paren.open',
parsed: parsed,
val: val
});
var node = pos({
type: 'paren',
prefix: prefix,
nodes: [open]
});
// if nested negation extglobs, just cancel them out to simplify
if (prefix === '!' && prev.type === 'paren' && prev.prefix === '!') {
prev.prefix = '@';
node.prefix = '@';
}
define(node, 'rest', this.input);
define(node, 'parsed', parsed);
define(node, 'parent', prev);
define(open, 'parent', node);
this.push('paren', node);
prev.nodes.push(node);
})
/**
* Extglob close: ")"
*/
.capture('paren.close', function() {
var parsed = this.parsed;
var pos = this.position();
var m = this.match(/^\)/);
if (!m) return;
var parent = this.pop('paren');
var node = pos({
type: 'paren.close',
rest: this.input,
parsed: parsed,
val: m[0]
});
if (!this.isType(parent, 'paren')) {
if (this.options.strict) {
throw new Error('missing opening paren: "("');
}
node.escaped = true;
return node;
}
node.prefix = parent.prefix;
parent.nodes.push(node);
define(node, 'parent', parent);
})
/**
* Escape: "\\."
*/
.capture('escape', function() {
var pos = this.position();
var m = this.match(/^\\(.)/);
if (!m) return;
return pos({
type: 'escape',
val: m[0],
ch: m[1]
});
})
/**
* Question marks: "?"
*/
.capture('qmark', function() {
var parsed = this.parsed;
var pos = this.position();
var m = this.match(/^\?+(?!\()/);
if (!m) return;
extglob.state.metachar = true;
return pos({
type: 'qmark',
rest: this.input,
parsed: parsed,
val: m[0]
});
})
/**
* Character parsers
*/
.capture('star', /^\*(?!\()/)
.capture('plus', /^\+(?!\()/)
.capture('dot', /^\./)
.capture('text', not);
};
/**
* Expose text regex string
*/
module.exports.TEXT_REGEX = TEXT_REGEX;
/**
* Extglob parsers
*/
module.exports = parsers;

69
node_modules/extglob/lib/utils.js generated vendored Normal file
View File

@@ -0,0 +1,69 @@
'use strict';
var regex = require('regex-not');
var Cache = require('fragment-cache');
/**
* Utils
*/
var utils = module.exports;
var cache = utils.cache = new Cache();
/**
* Cast `val` to an array
* @return {Array}
*/
utils.arrayify = function(val) {
if (!Array.isArray(val)) {
return [val];
}
return val;
};
/**
* Memoize a generated regex or function
*/
utils.memoize = function(type, pattern, options, fn) {
var key = utils.createKey(type + pattern, options);
if (cache.has(type, key)) {
return cache.get(type, key);
}
var val = fn(pattern, options);
if (options && options.cache === false) {
return val;
}
cache.set(type, key, val);
return val;
};
/**
* Create the key to use for memoization. The key is generated
* by iterating over the options and concatenating key-value pairs
* to the pattern string.
*/
utils.createKey = function(pattern, options) {
var key = pattern;
if (typeof options === 'undefined') {
return key;
}
for (var prop in options) {
key += ';' + prop + '=' + String(options[prop]);
}
return key;
};
/**
* Create the regex to use for matching text
*/
utils.createRegex = function(str) {
var opts = {contains: true, strictClose: false};
return regex(str, opts);
};

View File

@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2015, 2017, Jon Schlinkert
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View File

@@ -0,0 +1,31 @@
/*!
* define-property <https://github.com/jonschlinkert/define-property>
*
* Copyright (c) 2015, 2017, Jon Schlinkert.
* Released under the MIT License.
*/
'use strict';
var isDescriptor = require('is-descriptor');
module.exports = function defineProperty(obj, prop, val) {
if (typeof obj !== 'object' && typeof obj !== 'function') {
throw new TypeError('expected an object or function.');
}
if (typeof prop !== 'string') {
throw new TypeError('expected `prop` to be a string.');
}
if (isDescriptor(val) && ('set' in val || 'get' in val)) {
return Object.defineProperty(obj, prop, val);
}
return Object.defineProperty(obj, prop, {
configurable: true,
enumerable: false,
writable: true,
value: val
});
};

View File

@@ -0,0 +1,44 @@
{
"name": "define-property",
"description": "Define a non-enumerable property on an object.",
"version": "1.0.0",
"homepage": "https://github.com/jonschlinkert/define-property",
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
"repository": "jonschlinkert/define-property",
"license": "MIT",
"files": [
"index.js"
],
"main": "index.js",
"engines": {
"node": ">=0.10.0"
},
"dependencies": {
"is-descriptor": "^1.0.0"
},
"devDependencies": {
"gulp-format-md": "^0.1.12",
"mocha": "^3.2.0"
},
"verb": {
"related": {
"list": [
"extend-shallow",
"merge-deep",
"assign-deep",
"mixin-deep"
]
},
"toc": false,
"layout": "default",
"tasks": [
"readme"
],
"plugins": [
"gulp-format-md"
],
"lint": {
"reflinks": true
}
}
}

80
node_modules/extglob/package.json generated vendored Normal file
View File

@@ -0,0 +1,80 @@
{
"name": "extglob",
"description": "Extended glob support for JavaScript. Adds (almost) the expressive power of regular expressions to glob patterns.",
"version": "2.0.4",
"homepage": "https://github.com/micromatch/extglob",
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
"repository": "micromatch/extglob",
"license": "MIT",
"files": [
"index.js",
"lib"
],
"main": "index.js",
"engines": {
"node": ">=0.10.0"
},
"dependencies": {
"array-unique": "^0.3.2",
"define-property": "^1.0.0",
"expand-brackets": "^2.1.4",
"extend-shallow": "^2.0.1",
"fragment-cache": "^0.2.1",
"regex-not": "^1.0.0",
"snapdragon": "^0.8.1",
"to-regex": "^3.0.1"
},
"devDependencies": {
"bash-match": "^1.0.2",
"for-own": "^1.0.0",
"gulp": "^3.9.1",
"gulp-eslint": "^4.0.0",
"gulp-format-md": "^1.0.0",
"gulp-istanbul": "^1.1.2",
"gulp-mocha": "^3.0.1",
"gulp-unused": "^0.2.1",
"helper-changelog": "^0.3.0",
"is-windows": "^1.0.1",
"micromatch": "^3.0.4",
"minimatch": "^3.0.4",
"minimist": "^1.2.0",
"mocha": "^3.5.0",
"multimatch": "^2.1.0"
},
"lintDeps": {
"devDependencies": {
"files": {
"options": {
"ignore": [
"benchmark/**/*.js"
]
}
}
}
},
"verb": {
"toc": false,
"layout": "default",
"tasks": [
"readme"
],
"related": {
"list": [
"braces",
"expand-brackets",
"expand-range",
"fill-range",
"micromatch"
]
},
"helpers": [
"helper-changelog"
],
"plugins": [
"gulp-format-md"
],
"lint": {
"reflinks": true
}
}
}