Added missing changes and modified dist assets.
This commit is contained in:
parent
bf548e4af2
commit
96f65726ea
426
dist/index.js
generated
vendored
426
dist/index.js
generated
vendored
@ -16136,8 +16136,8 @@ const braces = (input, options = {}) => {
|
||||
let output = [];
|
||||
|
||||
if (Array.isArray(input)) {
|
||||
for (let pattern of input) {
|
||||
let result = braces.create(pattern, options);
|
||||
for (const pattern of input) {
|
||||
const result = braces.create(pattern, options);
|
||||
if (Array.isArray(result)) {
|
||||
output.push(...result);
|
||||
} else {
|
||||
@ -16271,7 +16271,7 @@ braces.create = (input, options = {}) => {
|
||||
return [input];
|
||||
}
|
||||
|
||||
return options.expand !== true
|
||||
return options.expand !== true
|
||||
? braces.compile(input, options)
|
||||
: braces.expand(input, options);
|
||||
};
|
||||
@ -16295,30 +16295,32 @@ const fill = __nccwpck_require__(6330);
|
||||
const utils = __nccwpck_require__(5207);
|
||||
|
||||
const compile = (ast, options = {}) => {
|
||||
let walk = (node, parent = {}) => {
|
||||
let invalidBlock = utils.isInvalidBrace(parent);
|
||||
let invalidNode = node.invalid === true && options.escapeInvalid === true;
|
||||
let invalid = invalidBlock === true || invalidNode === true;
|
||||
let prefix = options.escapeInvalid === true ? '\\' : '';
|
||||
const walk = (node, parent = {}) => {
|
||||
const invalidBlock = utils.isInvalidBrace(parent);
|
||||
const invalidNode = node.invalid === true && options.escapeInvalid === true;
|
||||
const invalid = invalidBlock === true || invalidNode === true;
|
||||
const prefix = options.escapeInvalid === true ? '\\' : '';
|
||||
let output = '';
|
||||
|
||||
if (node.isOpen === true) {
|
||||
return prefix + node.value;
|
||||
}
|
||||
|
||||
if (node.isClose === true) {
|
||||
console.log('node.isClose', prefix, node.value);
|
||||
return prefix + node.value;
|
||||
}
|
||||
|
||||
if (node.type === 'open') {
|
||||
return invalid ? (prefix + node.value) : '(';
|
||||
return invalid ? prefix + node.value : '(';
|
||||
}
|
||||
|
||||
if (node.type === 'close') {
|
||||
return invalid ? (prefix + node.value) : ')';
|
||||
return invalid ? prefix + node.value : ')';
|
||||
}
|
||||
|
||||
if (node.type === 'comma') {
|
||||
return node.prev.type === 'comma' ? '' : (invalid ? node.value : '|');
|
||||
return node.prev.type === 'comma' ? '' : invalid ? node.value : '|';
|
||||
}
|
||||
|
||||
if (node.value) {
|
||||
@ -16326,8 +16328,8 @@ const compile = (ast, options = {}) => {
|
||||
}
|
||||
|
||||
if (node.nodes && node.ranges > 0) {
|
||||
let args = utils.reduce(node.nodes);
|
||||
let range = fill(...args, { ...options, wrap: false, toRegex: true });
|
||||
const args = utils.reduce(node.nodes);
|
||||
const range = fill(...args, { ...options, wrap: false, toRegex: true, strictZeros: true });
|
||||
|
||||
if (range.length !== 0) {
|
||||
return args.length > 1 && range.length > 1 ? `(${range})` : range;
|
||||
@ -16335,10 +16337,11 @@ const compile = (ast, options = {}) => {
|
||||
}
|
||||
|
||||
if (node.nodes) {
|
||||
for (let child of node.nodes) {
|
||||
for (const child of node.nodes) {
|
||||
output += walk(child, node);
|
||||
}
|
||||
}
|
||||
|
||||
return output;
|
||||
};
|
||||
|
||||
@ -16357,7 +16360,7 @@ module.exports = compile;
|
||||
|
||||
|
||||
module.exports = {
|
||||
MAX_LENGTH: 1024 * 64,
|
||||
MAX_LENGTH: 10000,
|
||||
|
||||
// Digits
|
||||
CHAR_0: '0', /* 0 */
|
||||
@ -16426,7 +16429,7 @@ const stringify = __nccwpck_require__(1514);
|
||||
const utils = __nccwpck_require__(5207);
|
||||
|
||||
const append = (queue = '', stash = '', enclose = false) => {
|
||||
let result = [];
|
||||
const result = [];
|
||||
|
||||
queue = [].concat(queue);
|
||||
stash = [].concat(stash);
|
||||
@ -16436,15 +16439,15 @@ const append = (queue = '', stash = '', enclose = false) => {
|
||||
return enclose ? utils.flatten(stash).map(ele => `{${ele}}`) : stash;
|
||||
}
|
||||
|
||||
for (let item of queue) {
|
||||
for (const item of queue) {
|
||||
if (Array.isArray(item)) {
|
||||
for (let value of item) {
|
||||
for (const value of item) {
|
||||
result.push(append(value, stash, enclose));
|
||||
}
|
||||
} else {
|
||||
for (let ele of stash) {
|
||||
if (enclose === true && typeof ele === 'string') ele = `{${ele}}`;
|
||||
result.push(Array.isArray(ele) ? append(item, ele, enclose) : (item + ele));
|
||||
result.push(Array.isArray(ele) ? append(item, ele, enclose) : item + ele);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -16452,9 +16455,9 @@ const append = (queue = '', stash = '', enclose = false) => {
|
||||
};
|
||||
|
||||
const expand = (ast, options = {}) => {
|
||||
let rangeLimit = options.rangeLimit === void 0 ? 1000 : options.rangeLimit;
|
||||
const rangeLimit = options.rangeLimit === undefined ? 1000 : options.rangeLimit;
|
||||
|
||||
let walk = (node, parent = {}) => {
|
||||
const walk = (node, parent = {}) => {
|
||||
node.queue = [];
|
||||
|
||||
let p = parent;
|
||||
@ -16476,7 +16479,7 @@ const expand = (ast, options = {}) => {
|
||||
}
|
||||
|
||||
if (node.nodes && node.ranges > 0) {
|
||||
let args = utils.reduce(node.nodes);
|
||||
const args = utils.reduce(node.nodes);
|
||||
|
||||
if (utils.exceedsLimit(...args, options.step, rangeLimit)) {
|
||||
throw new RangeError('expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.');
|
||||
@ -16492,7 +16495,7 @@ const expand = (ast, options = {}) => {
|
||||
return;
|
||||
}
|
||||
|
||||
let enclose = utils.encloseBrace(node);
|
||||
const enclose = utils.encloseBrace(node);
|
||||
let queue = node.queue;
|
||||
let block = node;
|
||||
|
||||
@ -16502,7 +16505,7 @@ const expand = (ast, options = {}) => {
|
||||
}
|
||||
|
||||
for (let i = 0; i < node.nodes.length; i++) {
|
||||
let child = node.nodes[i];
|
||||
const child = node.nodes[i];
|
||||
|
||||
if (child.type === 'comma' && node.type === 'brace') {
|
||||
if (i === 1) queue.push('');
|
||||
@ -16575,22 +16578,21 @@ const parse = (input, options = {}) => {
|
||||
throw new TypeError('Expected a string');
|
||||
}
|
||||
|
||||
let opts = options || {};
|
||||
let max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
|
||||
const opts = options || {};
|
||||
const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
|
||||
if (input.length > max) {
|
||||
throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`);
|
||||
}
|
||||
|
||||
let ast = { type: 'root', input, nodes: [] };
|
||||
let stack = [ast];
|
||||
const ast = { type: 'root', input, nodes: [] };
|
||||
const stack = [ast];
|
||||
let block = ast;
|
||||
let prev = ast;
|
||||
let brackets = 0;
|
||||
let length = input.length;
|
||||
const length = input.length;
|
||||
let index = 0;
|
||||
let depth = 0;
|
||||
let value;
|
||||
let memo = {};
|
||||
|
||||
/**
|
||||
* Helpers
|
||||
@ -16653,7 +16655,6 @@ const parse = (input, options = {}) => {
|
||||
if (value === CHAR_LEFT_SQUARE_BRACKET) {
|
||||
brackets++;
|
||||
|
||||
let closed = true;
|
||||
let next;
|
||||
|
||||
while (index < length && (next = advance())) {
|
||||
@ -16709,7 +16710,7 @@ const parse = (input, options = {}) => {
|
||||
*/
|
||||
|
||||
if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) {
|
||||
let open = value;
|
||||
const open = value;
|
||||
let next;
|
||||
|
||||
if (options.keepQuotes !== true) {
|
||||
@ -16741,8 +16742,8 @@ const parse = (input, options = {}) => {
|
||||
if (value === CHAR_LEFT_CURLY_BRACE) {
|
||||
depth++;
|
||||
|
||||
let dollar = prev.value && prev.value.slice(-1) === '$' || block.dollar === true;
|
||||
let brace = {
|
||||
const dollar = prev.value && prev.value.slice(-1) === '$' || block.dollar === true;
|
||||
const brace = {
|
||||
type: 'brace',
|
||||
open: true,
|
||||
close: false,
|
||||
@ -16769,7 +16770,7 @@ const parse = (input, options = {}) => {
|
||||
continue;
|
||||
}
|
||||
|
||||
let type = 'close';
|
||||
const type = 'close';
|
||||
block = stack.pop();
|
||||
block.close = true;
|
||||
|
||||
@ -16787,7 +16788,7 @@ const parse = (input, options = {}) => {
|
||||
if (value === CHAR_COMMA && depth > 0) {
|
||||
if (block.ranges > 0) {
|
||||
block.ranges = 0;
|
||||
let open = block.nodes.shift();
|
||||
const open = block.nodes.shift();
|
||||
block.nodes = [open, { type: 'text', value: stringify(block) }];
|
||||
}
|
||||
|
||||
@ -16801,7 +16802,7 @@ const parse = (input, options = {}) => {
|
||||
*/
|
||||
|
||||
if (value === CHAR_DOT && depth > 0 && block.commas === 0) {
|
||||
let siblings = block.nodes;
|
||||
const siblings = block.nodes;
|
||||
|
||||
if (depth === 0 || siblings.length === 0) {
|
||||
push({ type: 'text', value });
|
||||
@ -16828,7 +16829,7 @@ const parse = (input, options = {}) => {
|
||||
if (prev.type === 'range') {
|
||||
siblings.pop();
|
||||
|
||||
let before = siblings[siblings.length - 1];
|
||||
const before = siblings[siblings.length - 1];
|
||||
before.value += prev.value + value;
|
||||
prev = before;
|
||||
block.ranges--;
|
||||
@ -16861,8 +16862,8 @@ const parse = (input, options = {}) => {
|
||||
});
|
||||
|
||||
// get the location of the block on parent.nodes (block's siblings)
|
||||
let parent = stack[stack.length - 1];
|
||||
let index = parent.nodes.indexOf(block);
|
||||
const parent = stack[stack.length - 1];
|
||||
const index = parent.nodes.indexOf(block);
|
||||
// replace the (invalid) block with it's nodes
|
||||
parent.nodes.splice(index, 1, ...block.nodes);
|
||||
}
|
||||
@ -16886,9 +16887,9 @@ module.exports = parse;
|
||||
const utils = __nccwpck_require__(5207);
|
||||
|
||||
module.exports = (ast, options = {}) => {
|
||||
let stringify = (node, parent = {}) => {
|
||||
let invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent);
|
||||
let invalidNode = node.invalid === true && options.escapeInvalid === true;
|
||||
const stringify = (node, parent = {}) => {
|
||||
const invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent);
|
||||
const invalidNode = node.invalid === true && options.escapeInvalid === true;
|
||||
let output = '';
|
||||
|
||||
if (node.value) {
|
||||
@ -16903,7 +16904,7 @@ module.exports = (ast, options = {}) => {
|
||||
}
|
||||
|
||||
if (node.nodes) {
|
||||
for (let child of node.nodes) {
|
||||
for (const child of node.nodes) {
|
||||
output += stringify(child);
|
||||
}
|
||||
}
|
||||
@ -16954,7 +16955,7 @@ exports.exceedsLimit = (min, max, step = 1, limit) => {
|
||||
*/
|
||||
|
||||
exports.escapeNode = (block, n = 0, type) => {
|
||||
let node = block.nodes[n];
|
||||
const node = block.nodes[n];
|
||||
if (!node) return;
|
||||
|
||||
if ((type && node.type === type) || node.type === 'open' || node.type === 'close') {
|
||||
@ -17023,13 +17024,23 @@ exports.reduce = nodes => nodes.reduce((acc, node) => {
|
||||
|
||||
exports.flatten = (...args) => {
|
||||
const result = [];
|
||||
|
||||
const flat = arr => {
|
||||
for (let i = 0; i < arr.length; i++) {
|
||||
let ele = arr[i];
|
||||
Array.isArray(ele) ? flat(ele, result) : ele !== void 0 && result.push(ele);
|
||||
const ele = arr[i];
|
||||
|
||||
if (Array.isArray(ele)) {
|
||||
flat(ele);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (ele !== undefined) {
|
||||
result.push(ele);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
flat(args);
|
||||
return result;
|
||||
};
|
||||
@ -17131,7 +17142,7 @@ const toMaxLen = (input, maxLength) => {
|
||||
return negative ? ('-' + input) : input;
|
||||
};
|
||||
|
||||
const toSequence = (parts, options) => {
|
||||
const toSequence = (parts, options, maxLen) => {
|
||||
parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
|
||||
parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
|
||||
|
||||
@ -17141,11 +17152,11 @@ const toSequence = (parts, options) => {
|
||||
let result;
|
||||
|
||||
if (parts.positives.length) {
|
||||
positives = parts.positives.join('|');
|
||||
positives = parts.positives.map(v => toMaxLen(String(v), maxLen)).join('|');
|
||||
}
|
||||
|
||||
if (parts.negatives.length) {
|
||||
negatives = `-(${prefix}${parts.negatives.join('|')})`;
|
||||
negatives = `-(${prefix}${parts.negatives.map(v => toMaxLen(String(v), maxLen)).join('|')})`;
|
||||
}
|
||||
|
||||
if (positives && negatives) {
|
||||
@ -17243,7 +17254,7 @@ const fillNumbers = (start, end, step = 1, options = {}) => {
|
||||
|
||||
if (options.toRegex === true) {
|
||||
return step > 1
|
||||
? toSequence(parts, options)
|
||||
? toSequence(parts, options, maxLen)
|
||||
: toRegex(range, null, { wrap: false, ...options });
|
||||
}
|
||||
|
||||
@ -17255,7 +17266,6 @@ const fillLetters = (start, end, step = 1, options = {}) => {
|
||||
return invalidRange(start, end, options);
|
||||
}
|
||||
|
||||
|
||||
let format = options.transform || (val => String.fromCharCode(val));
|
||||
let a = `${start}`.charCodeAt(0);
|
||||
let b = `${end}`.charCodeAt(0);
|
||||
@ -34995,9 +35005,15 @@ module.exports = isObjectLike;
|
||||
|
||||
const util = __nccwpck_require__(3837);
|
||||
const braces = __nccwpck_require__(610);
|
||||
const picomatch = __nccwpck_require__(8569);
|
||||
const utils = __nccwpck_require__(479);
|
||||
const isEmptyString = val => val === '' || val === './';
|
||||
const picomatch = __nccwpck_require__(1890);
|
||||
const utils = __nccwpck_require__(7426);
|
||||
|
||||
const isEmptyString = v => v === '' || v === './';
|
||||
const isObject = v => v !== null && typeof v === 'object' && !Array.isArray(v);
|
||||
const hasBraces = v => {
|
||||
const index = v.indexOf('{');
|
||||
return index > -1 && v.indexOf('}', index) > -1;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns an array of strings that match one or more glob patterns.
|
||||
@ -35021,12 +35037,12 @@ const micromatch = (list, patterns, options) => {
|
||||
patterns = [].concat(patterns);
|
||||
list = [].concat(list);
|
||||
|
||||
let omit = new Set();
|
||||
let keep = new Set();
|
||||
let items = new Set();
|
||||
const omit = new Set();
|
||||
const keep = new Set();
|
||||
const items = new Set();
|
||||
let negatives = 0;
|
||||
|
||||
let onResult = state => {
|
||||
const onResult = state => {
|
||||
items.add(state.output);
|
||||
if (options && options.onResult) {
|
||||
options.onResult(state);
|
||||
@ -35034,14 +35050,14 @@ const micromatch = (list, patterns, options) => {
|
||||
};
|
||||
|
||||
for (let i = 0; i < patterns.length; i++) {
|
||||
let isMatch = picomatch(String(patterns[i]), { ...options, onResult }, true);
|
||||
let negated = isMatch.state.negated || isMatch.state.negatedExtglob;
|
||||
const isMatch = picomatch(String(patterns[i]), { windows: true, ...options, onResult }, true);
|
||||
const negated = isMatch.state.negated || isMatch.state.negatedExtglob;
|
||||
if (negated) negatives++;
|
||||
|
||||
for (let item of list) {
|
||||
let matched = isMatch(item, true);
|
||||
for (const item of list) {
|
||||
const matched = isMatch(item, true);
|
||||
|
||||
let match = negated ? !matched.isMatch : matched.isMatch;
|
||||
const match = negated ? !matched.isMatch : matched.isMatch;
|
||||
if (!match) continue;
|
||||
|
||||
if (negated) {
|
||||
@ -35053,8 +35069,8 @@ const micromatch = (list, patterns, options) => {
|
||||
}
|
||||
}
|
||||
|
||||
let result = negatives === patterns.length ? [...items] : [...keep];
|
||||
let matches = result.filter(item => !omit.has(item));
|
||||
const result = negatives === patterns.length ? [...items] : [...keep];
|
||||
const matches = result.filter(item => !omit.has(item));
|
||||
|
||||
if (options && matches.length === 0) {
|
||||
if (options.failglob === true) {
|
||||
@ -35087,14 +35103,17 @@ micromatch.match = micromatch;
|
||||
* const isMatch = mm.matcher('*.!(*a)');
|
||||
* console.log(isMatch('a.a')); //=> false
|
||||
* console.log(isMatch('a.b')); //=> true
|
||||
*
|
||||
* const isMatch = mm.matcher(['b.*', '*.a']);
|
||||
* console.log(isMatch('a.a')); //=> true
|
||||
* ```
|
||||
* @param {String} `pattern` Glob pattern
|
||||
* @param {String|Array} `pattern` One or more glob patterns to use for matching.
|
||||
* @param {Object} `options`
|
||||
* @return {Function} Returns a matcher function.
|
||||
* @api public
|
||||
*/
|
||||
|
||||
micromatch.matcher = (pattern, options) => picomatch(pattern, options);
|
||||
micromatch.matcher = (pattern, options) => picomatch(pattern, { windows: true, ...options });
|
||||
|
||||
/**
|
||||
* Returns true if **any** of the given glob `patterns` match the specified `string`.
|
||||
@ -35140,17 +35159,17 @@ micromatch.any = micromatch.isMatch;
|
||||
|
||||
micromatch.not = (list, patterns, options = {}) => {
|
||||
patterns = [].concat(patterns).map(String);
|
||||
let result = new Set();
|
||||
let items = [];
|
||||
const result = new Set();
|
||||
const items = [];
|
||||
|
||||
let onResult = state => {
|
||||
const onResult = state => {
|
||||
if (options.onResult) options.onResult(state);
|
||||
items.push(state.output);
|
||||
};
|
||||
|
||||
let matches = new Set(micromatch(list, patterns, { ...options, onResult }));
|
||||
const matches = new Set(micromatch(list, patterns, { ...options, onResult }));
|
||||
|
||||
for (let item of items) {
|
||||
for (const item of items) {
|
||||
if (!matches.has(item)) {
|
||||
result.add(item);
|
||||
}
|
||||
@ -35221,12 +35240,12 @@ micromatch.contains = (str, pattern, options) => {
|
||||
*/
|
||||
|
||||
micromatch.matchKeys = (obj, patterns, options) => {
|
||||
if (!utils.isObject(obj)) {
|
||||
if (!isObject(obj)) {
|
||||
throw new TypeError('Expected the first argument to be an object');
|
||||
}
|
||||
let keys = micromatch(Object.keys(obj), patterns, options);
|
||||
let res = {};
|
||||
for (let key of keys) res[key] = obj[key];
|
||||
const keys = micromatch(Object.keys(obj), patterns, options);
|
||||
const res = {};
|
||||
for (const key of keys) res[key] = obj[key];
|
||||
return res;
|
||||
};
|
||||
|
||||
@ -35250,10 +35269,10 @@ micromatch.matchKeys = (obj, patterns, options) => {
|
||||
*/
|
||||
|
||||
micromatch.some = (list, patterns, options) => {
|
||||
let items = [].concat(list);
|
||||
const items = [].concat(list);
|
||||
|
||||
for (let pattern of [].concat(patterns)) {
|
||||
let isMatch = picomatch(String(pattern), options);
|
||||
for (const pattern of [].concat(patterns)) {
|
||||
const isMatch = picomatch(String(pattern), { windows: true, ...options });
|
||||
if (items.some(item => isMatch(item))) {
|
||||
return true;
|
||||
}
|
||||
@ -35286,10 +35305,10 @@ micromatch.some = (list, patterns, options) => {
|
||||
*/
|
||||
|
||||
micromatch.every = (list, patterns, options) => {
|
||||
let items = [].concat(list);
|
||||
const items = [].concat(list);
|
||||
|
||||
for (let pattern of [].concat(patterns)) {
|
||||
let isMatch = picomatch(String(pattern), options);
|
||||
for (const pattern of [].concat(patterns)) {
|
||||
const isMatch = picomatch(String(pattern), { windows: true, ...options });
|
||||
if (!items.every(item => isMatch(item))) {
|
||||
return false;
|
||||
}
|
||||
@ -35329,7 +35348,7 @@ micromatch.all = (str, patterns, options) => {
|
||||
throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
|
||||
}
|
||||
|
||||
return [].concat(patterns).every(p => picomatch(p, options)(str));
|
||||
return [].concat(patterns).every(p => picomatch(p, { windows: true, ...options })(str));
|
||||
};
|
||||
|
||||
/**
|
||||
@ -35352,9 +35371,9 @@ micromatch.all = (str, patterns, options) => {
|
||||
*/
|
||||
|
||||
micromatch.capture = (glob, input, options) => {
|
||||
let posix = utils.isWindows(options);
|
||||
let regex = picomatch.makeRe(String(glob), { ...options, capture: true });
|
||||
let match = regex.exec(posix ? utils.toPosixSlashes(input) : input);
|
||||
const windows = utils.isWindows(options);
|
||||
const regex = picomatch.makeRe(String(glob), { windows: true, ...options, capture: true });
|
||||
const match = regex.exec(windows ? utils.toPosixSlashes(input) : input);
|
||||
|
||||
if (match) {
|
||||
return match.slice(1).map(v => v === void 0 ? '' : v);
|
||||
@ -35377,7 +35396,7 @@ micromatch.capture = (glob, input, options) => {
|
||||
* @api public
|
||||
*/
|
||||
|
||||
micromatch.makeRe = (...args) => picomatch.makeRe(...args);
|
||||
micromatch.makeRe = (pattern, options) => picomatch.makeRe(pattern, { windows: true, ...options });
|
||||
|
||||
/**
|
||||
* Scan a glob pattern to separate the pattern into segments. Used
|
||||
@ -35393,7 +35412,7 @@ micromatch.makeRe = (...args) => picomatch.makeRe(...args);
|
||||
* @api public
|
||||
*/
|
||||
|
||||
micromatch.scan = (...args) => picomatch.scan(...args);
|
||||
micromatch.scan = (pattern, options) => picomatch.scan(pattern, { windows: true, ...options });
|
||||
|
||||
/**
|
||||
* Parse a glob pattern to create the source string for a regular
|
||||
@ -35410,10 +35429,10 @@ micromatch.scan = (...args) => picomatch.scan(...args);
|
||||
*/
|
||||
|
||||
micromatch.parse = (patterns, options) => {
|
||||
let res = [];
|
||||
for (let pattern of [].concat(patterns || [])) {
|
||||
for (let str of braces(String(pattern), options)) {
|
||||
res.push(picomatch.parse(str, options));
|
||||
const res = [];
|
||||
for (const pattern of [].concat(patterns || [])) {
|
||||
for (const str of braces(String(pattern), options)) {
|
||||
res.push(picomatch.parse(str, { windows: utils.isWindows(), ...options }));
|
||||
}
|
||||
}
|
||||
return res;
|
||||
@ -35438,7 +35457,7 @@ micromatch.parse = (patterns, options) => {
|
||||
|
||||
micromatch.braces = (pattern, options) => {
|
||||
if (typeof pattern !== 'string') throw new TypeError('Expected a string');
|
||||
if ((options && options.nobrace === true) || !/\{.*\}/.test(pattern)) {
|
||||
if ((options && options.nobrace === true) || !hasBraces(pattern)) {
|
||||
return [pattern];
|
||||
}
|
||||
return braces(pattern, options);
|
||||
@ -35457,78 +35476,44 @@ micromatch.braceExpand = (pattern, options) => {
|
||||
* Expose micromatch
|
||||
*/
|
||||
|
||||
// exposed for tests
|
||||
micromatch.hasBraces = hasBraces;
|
||||
module.exports = micromatch;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 1223:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
var wrappy = __nccwpck_require__(2940)
|
||||
module.exports = wrappy(once)
|
||||
module.exports.strict = wrappy(onceStrict)
|
||||
|
||||
once.proto = once(function () {
|
||||
Object.defineProperty(Function.prototype, 'once', {
|
||||
value: function () {
|
||||
return once(this)
|
||||
},
|
||||
configurable: true
|
||||
})
|
||||
|
||||
Object.defineProperty(Function.prototype, 'onceStrict', {
|
||||
value: function () {
|
||||
return onceStrict(this)
|
||||
},
|
||||
configurable: true
|
||||
})
|
||||
})
|
||||
|
||||
function once (fn) {
|
||||
var f = function () {
|
||||
if (f.called) return f.value
|
||||
f.called = true
|
||||
return f.value = fn.apply(this, arguments)
|
||||
}
|
||||
f.called = false
|
||||
return f
|
||||
}
|
||||
|
||||
function onceStrict (fn) {
|
||||
var f = function () {
|
||||
if (f.called)
|
||||
throw new Error(f.onceError)
|
||||
f.called = true
|
||||
return f.value = fn.apply(this, arguments)
|
||||
}
|
||||
var name = fn.name || 'Function wrapped with `once`'
|
||||
f.onceError = name + " shouldn't be called more than once"
|
||||
f.called = false
|
||||
return f
|
||||
}
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 8569:
|
||||
/***/ 1890:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
module.exports = __nccwpck_require__(3322);
|
||||
const pico = __nccwpck_require__(555);
|
||||
const utils = __nccwpck_require__(7426);
|
||||
|
||||
function picomatch(glob, options, returnState = false) {
|
||||
// default to os.platform()
|
||||
if (options && (options.windows === null || options.windows === undefined)) {
|
||||
// don't mutate the original options object
|
||||
options = { ...options, windows: utils.isWindows() };
|
||||
}
|
||||
|
||||
return pico(glob, options, returnState);
|
||||
}
|
||||
|
||||
Object.assign(picomatch, pico);
|
||||
module.exports = picomatch;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 6099:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
/***/ 128:
|
||||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const path = __nccwpck_require__(1017);
|
||||
const WIN_SLASH = '\\\\/';
|
||||
const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
|
||||
|
||||
@ -35551,6 +35536,7 @@ const NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`;
|
||||
const NO_DOTS_SLASH = `(?!${DOTS_SLASH})`;
|
||||
const QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`;
|
||||
const STAR = `${QMARK}*?`;
|
||||
const SEP = '/';
|
||||
|
||||
const POSIX_CHARS = {
|
||||
DOT_LITERAL,
|
||||
@ -35567,7 +35553,8 @@ const POSIX_CHARS = {
|
||||
NO_DOTS_SLASH,
|
||||
QMARK_NO_DOT,
|
||||
STAR,
|
||||
START_ANCHOR
|
||||
START_ANCHOR,
|
||||
SEP
|
||||
};
|
||||
|
||||
/**
|
||||
@ -35587,7 +35574,8 @@ const WINDOWS_CHARS = {
|
||||
NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
|
||||
QMARK_NO_DOT: `[^.${WIN_SLASH}]`,
|
||||
START_ANCHOR: `(?:^|[${WIN_SLASH}])`,
|
||||
END_ANCHOR: `(?:[${WIN_SLASH}]|$)`
|
||||
END_ANCHOR: `(?:[${WIN_SLASH}]|$)`,
|
||||
SEP: '\\'
|
||||
};
|
||||
|
||||
/**
|
||||
@ -35681,8 +35669,6 @@ module.exports = {
|
||||
CHAR_VERTICAL_LINE: 124, /* | */
|
||||
CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \uFEFF */
|
||||
|
||||
SEP: path.sep,
|
||||
|
||||
/**
|
||||
* Create EXTGLOB_CHARS
|
||||
*/
|
||||
@ -35709,14 +35695,14 @@ module.exports = {
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 2139:
|
||||
/***/ 5961:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const constants = __nccwpck_require__(6099);
|
||||
const utils = __nccwpck_require__(479);
|
||||
const constants = __nccwpck_require__(128);
|
||||
const utils = __nccwpck_require__(7426);
|
||||
|
||||
/**
|
||||
* Constants
|
||||
@ -35786,10 +35772,9 @@ const parse = (input, options) => {
|
||||
const tokens = [bos];
|
||||
|
||||
const capture = opts.capture ? '' : '?:';
|
||||
const win32 = utils.isWindows(options);
|
||||
|
||||
// create constants based on platform, for windows or posix
|
||||
const PLATFORM_CHARS = constants.globChars(win32);
|
||||
const PLATFORM_CHARS = constants.globChars(opts.windows);
|
||||
const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS);
|
||||
|
||||
const {
|
||||
@ -35925,8 +35910,8 @@ const parse = (input, options) => {
|
||||
|
||||
if (tok.value || tok.output) append(tok);
|
||||
if (prev && prev.type === 'text' && tok.type === 'text') {
|
||||
prev.output = (prev.output || prev.value) + tok.value;
|
||||
prev.value += tok.value;
|
||||
prev.output = (prev.output || '') + tok.value;
|
||||
return;
|
||||
}
|
||||
|
||||
@ -36414,10 +36399,6 @@ const parse = (input, options) => {
|
||||
const next = peek();
|
||||
let output = value;
|
||||
|
||||
if (next === '<' && !utils.supportsLookbehinds()) {
|
||||
throw new Error('Node.js v10 or higher is required for regex lookbehinds');
|
||||
}
|
||||
|
||||
if ((prev.value === '(' && !/[!=<:]/.test(next)) || (next === '<' && !/<([!=]|\w+>)/.test(remaining()))) {
|
||||
output = `\\${value}`;
|
||||
}
|
||||
@ -36725,7 +36706,6 @@ parse.fastpaths = (input, options) => {
|
||||
}
|
||||
|
||||
input = REPLACEMENTS[input] || input;
|
||||
const win32 = utils.isWindows(options);
|
||||
|
||||
// create constants based on platform, for windows or posix
|
||||
const {
|
||||
@ -36738,7 +36718,7 @@ parse.fastpaths = (input, options) => {
|
||||
NO_DOTS_SLASH,
|
||||
STAR,
|
||||
START_ANCHOR
|
||||
} = constants.globChars(win32);
|
||||
} = constants.globChars(opts.windows);
|
||||
|
||||
const nodot = opts.dot ? NO_DOTS : NO_DOT;
|
||||
const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;
|
||||
@ -36808,17 +36788,16 @@ module.exports = parse;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 3322:
|
||||
/***/ 555:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const path = __nccwpck_require__(1017);
|
||||
const scan = __nccwpck_require__(2429);
|
||||
const parse = __nccwpck_require__(2139);
|
||||
const utils = __nccwpck_require__(479);
|
||||
const constants = __nccwpck_require__(6099);
|
||||
const scan = __nccwpck_require__(7751);
|
||||
const parse = __nccwpck_require__(5961);
|
||||
const utils = __nccwpck_require__(7426);
|
||||
const constants = __nccwpck_require__(128);
|
||||
const isObject = val => val && typeof val === 'object' && !Array.isArray(val);
|
||||
|
||||
/**
|
||||
@ -36863,7 +36842,7 @@ const picomatch = (glob, options, returnState = false) => {
|
||||
}
|
||||
|
||||
const opts = options || {};
|
||||
const posix = utils.isWindows(options);
|
||||
const posix = opts.windows;
|
||||
const regex = isState
|
||||
? picomatch.compileRe(glob, options)
|
||||
: picomatch.makeRe(glob, options, false, true);
|
||||
@ -36972,9 +36951,9 @@ picomatch.test = (input, regex, options, { glob, posix } = {}) => {
|
||||
* @api public
|
||||
*/
|
||||
|
||||
picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
|
||||
picomatch.matchBase = (input, glob, options) => {
|
||||
const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
|
||||
return regex.test(path.basename(input));
|
||||
return regex.test(utils.basename(input));
|
||||
};
|
||||
|
||||
/**
|
||||
@ -37158,13 +37137,13 @@ module.exports = picomatch;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 2429:
|
||||
/***/ 7751:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const utils = __nccwpck_require__(479);
|
||||
const utils = __nccwpck_require__(7426);
|
||||
const {
|
||||
CHAR_ASTERISK, /* * */
|
||||
CHAR_AT, /* @ */
|
||||
@ -37181,7 +37160,7 @@ const {
|
||||
CHAR_RIGHT_CURLY_BRACE, /* } */
|
||||
CHAR_RIGHT_PARENTHESES, /* ) */
|
||||
CHAR_RIGHT_SQUARE_BRACKET /* ] */
|
||||
} = __nccwpck_require__(6099);
|
||||
} = __nccwpck_require__(128);
|
||||
|
||||
const isPathSeparator = code => {
|
||||
return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
|
||||
@ -37557,20 +37536,19 @@ module.exports = scan;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 479:
|
||||
/***/ 7426:
|
||||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
/*global navigator*/
|
||||
|
||||
|
||||
const path = __nccwpck_require__(1017);
|
||||
const win32 = process.platform === 'win32';
|
||||
const {
|
||||
REGEX_BACKSLASH,
|
||||
REGEX_REMOVE_BACKSLASH,
|
||||
REGEX_SPECIAL_CHARS,
|
||||
REGEX_SPECIAL_CHARS_GLOBAL
|
||||
} = __nccwpck_require__(6099);
|
||||
} = __nccwpck_require__(128);
|
||||
|
||||
exports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);
|
||||
exports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str);
|
||||
@ -37578,27 +37556,25 @@ exports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str);
|
||||
exports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\$1');
|
||||
exports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/');
|
||||
|
||||
exports.isWindows = () => {
|
||||
if (typeof navigator !== 'undefined' && navigator.platform) {
|
||||
const platform = navigator.platform.toLowerCase();
|
||||
return platform === 'win32' || platform === 'windows';
|
||||
}
|
||||
|
||||
if (typeof process !== 'undefined' && process.platform) {
|
||||
return process.platform === 'win32';
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
exports.removeBackslashes = str => {
|
||||
return str.replace(REGEX_REMOVE_BACKSLASH, match => {
|
||||
return match === '\\' ? '' : match;
|
||||
});
|
||||
};
|
||||
|
||||
exports.supportsLookbehinds = () => {
|
||||
const segs = process.version.slice(1).split('.').map(Number);
|
||||
if (segs.length === 3 && segs[0] >= 9 || (segs[0] === 8 && segs[1] >= 10)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
exports.isWindows = options => {
|
||||
if (options && typeof options.windows === 'boolean') {
|
||||
return options.windows;
|
||||
}
|
||||
return win32 === true || path.sep === '\\';
|
||||
};
|
||||
|
||||
exports.escapeLast = (input, char, lastIdx) => {
|
||||
const idx = input.lastIndexOf(char, lastIdx);
|
||||
if (idx === -1) return input;
|
||||
@ -37626,6 +37602,66 @@ exports.wrapOutput = (input, state = {}, options = {}) => {
|
||||
return output;
|
||||
};
|
||||
|
||||
exports.basename = (path, { windows } = {}) => {
|
||||
const segs = path.split(windows ? /[\\/]/ : '/');
|
||||
const last = segs[segs.length - 1];
|
||||
|
||||
if (last === '') {
|
||||
return segs[segs.length - 2];
|
||||
}
|
||||
|
||||
return last;
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 1223:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
var wrappy = __nccwpck_require__(2940)
|
||||
module.exports = wrappy(once)
|
||||
module.exports.strict = wrappy(onceStrict)
|
||||
|
||||
once.proto = once(function () {
|
||||
Object.defineProperty(Function.prototype, 'once', {
|
||||
value: function () {
|
||||
return once(this)
|
||||
},
|
||||
configurable: true
|
||||
})
|
||||
|
||||
Object.defineProperty(Function.prototype, 'onceStrict', {
|
||||
value: function () {
|
||||
return onceStrict(this)
|
||||
},
|
||||
configurable: true
|
||||
})
|
||||
})
|
||||
|
||||
function once (fn) {
|
||||
var f = function () {
|
||||
if (f.called) return f.value
|
||||
f.called = true
|
||||
return f.value = fn.apply(this, arguments)
|
||||
}
|
||||
f.called = false
|
||||
return f
|
||||
}
|
||||
|
||||
function onceStrict (fn) {
|
||||
var f = function () {
|
||||
if (f.called)
|
||||
throw new Error(f.onceError)
|
||||
f.called = true
|
||||
return f.value = fn.apply(this, arguments)
|
||||
}
|
||||
var name = fn.name || 'Function wrapped with `once`'
|
||||
f.onceError = name + " shouldn't be called more than once"
|
||||
f.called = false
|
||||
return f
|
||||
}
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
|
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
2
dist/licenses.txt
generated
vendored
2
dist/licenses.txt
generated
vendored
@ -5723,7 +5723,7 @@ braces
|
||||
MIT
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014-2018, Jon Schlinkert.
|
||||
Copyright (c) 2014-present, 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
|
||||
|
Loading…
x
Reference in New Issue
Block a user