vite-plugin-vue-devtools 0.4.9 → 0.4.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -2
- package/dist/client/assets/{IframeView.vue_vue_type_script_setup_true_lang-dbf4788f.js → IframeView.vue_vue_type_script_setup_true_lang-fd720d18.js} +1 -1
- package/dist/client/assets/{StateFields.vue_vue_type_script_setup_true_lang-92d427dd.js → StateFields.vue_vue_type_script_setup_true_lang-0e4af331.js} +8 -8
- package/dist/client/assets/{VIcon.vue_vue_type_script_setup_true_lang-0471a697.js → VIcon.vue_vue_type_script_setup_true_lang-d1646658.js} +1 -1
- package/dist/client/assets/{VIconButton.vue_vue_type_script_setup_true_lang-119f94ff.js → VIconButton.vue_vue_type_script_setup_true_lang-5c7fa25b.js} +2 -2
- package/dist/client/assets/{VIconTitle.vue_vue_type_script_setup_true_lang-103d54da.js → VIconTitle.vue_vue_type_script_setup_true_lang-3af9d81d.js} +1 -1
- package/dist/client/assets/{VPanelGrids-a58b3ecd.js → VPanelGrids-08ef47ce.js} +1 -1
- package/dist/client/assets/{VSectionBlock-f57f512c.js → VSectionBlock-44a9204b.js} +3 -3
- package/dist/client/assets/VSwitch.vue_vue_type_script_setup_true_lang-b1b6daad.js +88 -0
- package/dist/client/assets/{VTextInput.vue_vue_type_script_setup_true_lang-c2fa20e8.js → VTextInput.vue_vue_type_script_setup_true_lang-4df2a1eb.js} +2 -2
- package/dist/client/assets/{__eyedropper-3cca8ce1.js → __eyedropper-9aeb7406.js} +2 -2
- package/dist/client/assets/{assets-35cb492d.js → assets-4ff4283a.js} +17 -10
- package/dist/client/assets/component-docs-1e5f0727.js +1748 -0
- package/dist/client/assets/{components-b45b1440.js → components-5011f272.js} +11 -8
- package/dist/client/assets/{documentations-6e435dfa.js → documentations-ec90fa66.js} +3 -3
- package/dist/client/assets/{graph-23e2d183.js → graph-c8cae02e.js} +2422 -61
- package/dist/client/assets/{index-f35b9ded.js → index-37b80b18.js} +1 -1
- package/dist/client/assets/{index-419b1e26.js → index-793e4620.js} +1019 -2617
- package/dist/client/assets/index-ee2ca8be.css +474 -0
- package/dist/client/assets/{inspect-5ace614b.js → inspect-c464cac5.js} +3 -3
- package/dist/client/assets/{npm-125f4259.css → npm-832f3f2c.css} +20 -2
- package/dist/client/assets/npm-de038c5b.js +537 -0
- package/dist/client/assets/{overview-53e9f8bb.js → overview-fc79467d.js} +5 -5
- package/dist/client/assets/{pages-d5ca868b.js → pages-d51e51ec.js} +5 -5
- package/dist/client/assets/{pinia-b39bf0f8.js → pinia-e230dd12.js} +6 -6
- package/dist/client/assets/{routes-e42ba149.js → routes-7d3d04cf.js} +7 -7
- package/dist/client/assets/{rpc-ebdebff3.js → rpc-d8afe028.js} +1 -1
- package/dist/client/assets/{settings-0d6c7a2d.js → settings-2e4656aa.js} +36 -119
- package/dist/client/assets/{splitpanes.es-6544bd84.js → splitpanes.es-8a68d356.js} +1 -1
- package/dist/client/assets/{timeline-0c1ece86.js → timeline-202ca852.js} +8 -8
- package/dist/client/index.html +2 -2
- package/dist/index.cjs +1238 -1162
- package/dist/index.mjs +1235 -1159
- package/package.json +35 -31
- package/src/node/views/Main.vue +9 -2
- package/src/node/views/composables.ts +26 -1
- package/src/node/views/utils.ts +4 -0
- package/dist/client/assets/component-docs-621a63cc.js +0 -1748
- package/dist/client/assets/index-5221558c.css +0 -472
- package/dist/client/assets/npm-087e8329.js +0 -537
package/dist/index.mjs
CHANGED
|
@@ -6,19 +6,19 @@ import Inspect from 'vite-plugin-inspect';
|
|
|
6
6
|
import VueInspector from 'vite-plugin-vue-inspector';
|
|
7
7
|
import { createBirpcGroup, cachedMap } from 'birpc';
|
|
8
8
|
import fs$9 from 'node:fs/promises';
|
|
9
|
-
import require$$0 from '
|
|
10
|
-
import require$$
|
|
11
|
-
import require$$0$
|
|
12
|
-
import require$$0$
|
|
13
|
-
import require$$2
|
|
14
|
-
import require$$0$
|
|
9
|
+
import require$$0 from 'os';
|
|
10
|
+
import require$$0$1 from 'path';
|
|
11
|
+
import require$$0$2 from 'util';
|
|
12
|
+
import require$$0$3 from 'stream';
|
|
13
|
+
import require$$2 from 'events';
|
|
14
|
+
import require$$0$4 from 'fs';
|
|
15
15
|
import fs$1$1, { promises, createWriteStream, createReadStream } from 'node:fs';
|
|
16
16
|
import require$$0$7 from 'readline';
|
|
17
17
|
import { Buffer as Buffer$1 } from 'node:buffer';
|
|
18
18
|
import childProcess, { ChildProcess } from 'node:child_process';
|
|
19
19
|
import process$2 from 'node:process';
|
|
20
20
|
import require$$0$2$1 from 'child_process';
|
|
21
|
-
import os$1, { constants as constants$5 } from 'node:os';
|
|
21
|
+
import os$1$1, { constants as constants$5 } from 'node:os';
|
|
22
22
|
import require$$0$3$1 from 'assert';
|
|
23
23
|
import require$$0$5 from 'buffer';
|
|
24
24
|
import { debuglog } from 'node:util';
|
|
@@ -75,92 +75,127 @@ var utils$k = {};
|
|
|
75
75
|
|
|
76
76
|
var array$1 = {};
|
|
77
77
|
|
|
78
|
-
Object.defineProperty(array$1, "__esModule", { value: true });
|
|
79
|
-
array$1.splitWhen = array$1.flatten = void 0;
|
|
80
|
-
function flatten(items) {
|
|
81
|
-
return items.reduce((collection, item) => [].concat(collection, item), []);
|
|
82
|
-
}
|
|
83
|
-
array$1.flatten = flatten;
|
|
84
|
-
function splitWhen(items, predicate) {
|
|
85
|
-
const result = [[]];
|
|
86
|
-
let groupIndex = 0;
|
|
87
|
-
for (const item of items) {
|
|
88
|
-
if (predicate(item)) {
|
|
89
|
-
groupIndex++;
|
|
90
|
-
result[groupIndex] = [];
|
|
91
|
-
}
|
|
92
|
-
else {
|
|
93
|
-
result[groupIndex].push(item);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
return result;
|
|
97
|
-
}
|
|
78
|
+
Object.defineProperty(array$1, "__esModule", { value: true });
|
|
79
|
+
array$1.splitWhen = array$1.flatten = void 0;
|
|
80
|
+
function flatten(items) {
|
|
81
|
+
return items.reduce((collection, item) => [].concat(collection, item), []);
|
|
82
|
+
}
|
|
83
|
+
array$1.flatten = flatten;
|
|
84
|
+
function splitWhen(items, predicate) {
|
|
85
|
+
const result = [[]];
|
|
86
|
+
let groupIndex = 0;
|
|
87
|
+
for (const item of items) {
|
|
88
|
+
if (predicate(item)) {
|
|
89
|
+
groupIndex++;
|
|
90
|
+
result[groupIndex] = [];
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
result[groupIndex].push(item);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
return result;
|
|
97
|
+
}
|
|
98
98
|
array$1.splitWhen = splitWhen;
|
|
99
99
|
|
|
100
100
|
var errno$1 = {};
|
|
101
101
|
|
|
102
|
-
Object.defineProperty(errno$1, "__esModule", { value: true });
|
|
103
|
-
errno$1.isEnoentCodeError = void 0;
|
|
104
|
-
function isEnoentCodeError(error) {
|
|
105
|
-
return error.code === 'ENOENT';
|
|
106
|
-
}
|
|
102
|
+
Object.defineProperty(errno$1, "__esModule", { value: true });
|
|
103
|
+
errno$1.isEnoentCodeError = void 0;
|
|
104
|
+
function isEnoentCodeError(error) {
|
|
105
|
+
return error.code === 'ENOENT';
|
|
106
|
+
}
|
|
107
107
|
errno$1.isEnoentCodeError = isEnoentCodeError;
|
|
108
108
|
|
|
109
109
|
var fs$8 = {};
|
|
110
110
|
|
|
111
|
-
Object.defineProperty(fs$8, "__esModule", { value: true });
|
|
112
|
-
fs$8.createDirentFromStats = void 0;
|
|
113
|
-
let DirentFromStats$1 = class DirentFromStats {
|
|
114
|
-
constructor(name, stats) {
|
|
115
|
-
this.name = name;
|
|
116
|
-
this.isBlockDevice = stats.isBlockDevice.bind(stats);
|
|
117
|
-
this.isCharacterDevice = stats.isCharacterDevice.bind(stats);
|
|
118
|
-
this.isDirectory = stats.isDirectory.bind(stats);
|
|
119
|
-
this.isFIFO = stats.isFIFO.bind(stats);
|
|
120
|
-
this.isFile = stats.isFile.bind(stats);
|
|
121
|
-
this.isSocket = stats.isSocket.bind(stats);
|
|
122
|
-
this.isSymbolicLink = stats.isSymbolicLink.bind(stats);
|
|
123
|
-
}
|
|
124
|
-
};
|
|
125
|
-
function createDirentFromStats$1(name, stats) {
|
|
126
|
-
return new DirentFromStats$1(name, stats);
|
|
127
|
-
}
|
|
111
|
+
Object.defineProperty(fs$8, "__esModule", { value: true });
|
|
112
|
+
fs$8.createDirentFromStats = void 0;
|
|
113
|
+
let DirentFromStats$1 = class DirentFromStats {
|
|
114
|
+
constructor(name, stats) {
|
|
115
|
+
this.name = name;
|
|
116
|
+
this.isBlockDevice = stats.isBlockDevice.bind(stats);
|
|
117
|
+
this.isCharacterDevice = stats.isCharacterDevice.bind(stats);
|
|
118
|
+
this.isDirectory = stats.isDirectory.bind(stats);
|
|
119
|
+
this.isFIFO = stats.isFIFO.bind(stats);
|
|
120
|
+
this.isFile = stats.isFile.bind(stats);
|
|
121
|
+
this.isSocket = stats.isSocket.bind(stats);
|
|
122
|
+
this.isSymbolicLink = stats.isSymbolicLink.bind(stats);
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
function createDirentFromStats$1(name, stats) {
|
|
126
|
+
return new DirentFromStats$1(name, stats);
|
|
127
|
+
}
|
|
128
128
|
fs$8.createDirentFromStats = createDirentFromStats$1;
|
|
129
129
|
|
|
130
130
|
var path$c = {};
|
|
131
131
|
|
|
132
|
-
Object.defineProperty(path$c, "__esModule", { value: true });
|
|
133
|
-
path$c.
|
|
134
|
-
const
|
|
135
|
-
const
|
|
136
|
-
const
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
132
|
+
Object.defineProperty(path$c, "__esModule", { value: true });
|
|
133
|
+
path$c.convertPosixPathToPattern = path$c.convertWindowsPathToPattern = path$c.convertPathToPattern = path$c.escapePosixPath = path$c.escapeWindowsPath = path$c.escape = path$c.removeLeadingDotSegment = path$c.makeAbsolute = path$c.unixify = void 0;
|
|
134
|
+
const os$1 = require$$0;
|
|
135
|
+
const path$b = require$$0$1;
|
|
136
|
+
const IS_WINDOWS_PLATFORM = os$1.platform() === 'win32';
|
|
137
|
+
const LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2; // ./ or .\\
|
|
138
|
+
/**
|
|
139
|
+
* All non-escaped special characters.
|
|
140
|
+
* Posix: ()*?[\]{|}, !+@ before (, ! at the beginning, \\ before non-special characters.
|
|
141
|
+
* Windows: (){}, !+@ before (, ! at the beginning.
|
|
142
|
+
*/
|
|
143
|
+
const POSIX_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g;
|
|
144
|
+
const WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([(){}]|^!|[!+@](?=\())/g;
|
|
145
|
+
/**
|
|
146
|
+
* The device path (\\.\ or \\?\).
|
|
147
|
+
* https://learn.microsoft.com/en-us/dotnet/standard/io/file-path-formats#dos-device-paths
|
|
148
|
+
*/
|
|
149
|
+
const DOS_DEVICE_PATH_RE = /^\\\\([.?])/;
|
|
150
|
+
/**
|
|
151
|
+
* All backslashes except those escaping special characters.
|
|
152
|
+
* Windows: !()+@{}
|
|
153
|
+
* https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file#naming-conventions
|
|
154
|
+
*/
|
|
155
|
+
const WINDOWS_BACKSLASHES_RE = /\\(?![!()+@{}])/g;
|
|
156
|
+
/**
|
|
157
|
+
* Designed to work only with simple paths: `dir\\file`.
|
|
158
|
+
*/
|
|
159
|
+
function unixify(filepath) {
|
|
160
|
+
return filepath.replace(/\\/g, '/');
|
|
161
|
+
}
|
|
162
|
+
path$c.unixify = unixify;
|
|
163
|
+
function makeAbsolute(cwd, filepath) {
|
|
164
|
+
return path$b.resolve(cwd, filepath);
|
|
165
|
+
}
|
|
166
|
+
path$c.makeAbsolute = makeAbsolute;
|
|
167
|
+
function removeLeadingDotSegment(entry) {
|
|
168
|
+
// We do not use `startsWith` because this is 10x slower than current implementation for some cases.
|
|
169
|
+
// eslint-disable-next-line @typescript-eslint/prefer-string-starts-ends-with
|
|
170
|
+
if (entry.charAt(0) === '.') {
|
|
171
|
+
const secondCharactery = entry.charAt(1);
|
|
172
|
+
if (secondCharactery === '/' || secondCharactery === '\\') {
|
|
173
|
+
return entry.slice(LEADING_DOT_SEGMENT_CHARACTERS_COUNT);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
return entry;
|
|
177
|
+
}
|
|
163
178
|
path$c.removeLeadingDotSegment = removeLeadingDotSegment;
|
|
179
|
+
path$c.escape = IS_WINDOWS_PLATFORM ? escapeWindowsPath : escapePosixPath;
|
|
180
|
+
function escapeWindowsPath(pattern) {
|
|
181
|
+
return pattern.replace(WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE, '\\$2');
|
|
182
|
+
}
|
|
183
|
+
path$c.escapeWindowsPath = escapeWindowsPath;
|
|
184
|
+
function escapePosixPath(pattern) {
|
|
185
|
+
return pattern.replace(POSIX_UNESCAPED_GLOB_SYMBOLS_RE, '\\$2');
|
|
186
|
+
}
|
|
187
|
+
path$c.escapePosixPath = escapePosixPath;
|
|
188
|
+
path$c.convertPathToPattern = IS_WINDOWS_PLATFORM ? convertWindowsPathToPattern : convertPosixPathToPattern;
|
|
189
|
+
function convertWindowsPathToPattern(filepath) {
|
|
190
|
+
return escapeWindowsPath(filepath)
|
|
191
|
+
.replace(DOS_DEVICE_PATH_RE, '//$1')
|
|
192
|
+
.replace(WINDOWS_BACKSLASHES_RE, '/');
|
|
193
|
+
}
|
|
194
|
+
path$c.convertWindowsPathToPattern = convertWindowsPathToPattern;
|
|
195
|
+
function convertPosixPathToPattern(filepath) {
|
|
196
|
+
return escapePosixPath(filepath);
|
|
197
|
+
}
|
|
198
|
+
path$c.convertPosixPathToPattern = convertPosixPathToPattern;
|
|
164
199
|
|
|
165
200
|
var pattern$1 = {};
|
|
166
201
|
|
|
@@ -337,8 +372,8 @@ var isGlob$1 = function isGlob(str, options) {
|
|
|
337
372
|
};
|
|
338
373
|
|
|
339
374
|
var isGlob = isGlob$1;
|
|
340
|
-
var pathPosixDirname = require$$0.posix.dirname;
|
|
341
|
-
var isWin32 = require$$
|
|
375
|
+
var pathPosixDirname = require$$0$1.posix.dirname;
|
|
376
|
+
var isWin32 = require$$0.platform() === 'win32';
|
|
342
377
|
|
|
343
378
|
var slash = '/';
|
|
344
379
|
var backslash = /\\/g;
|
|
@@ -834,12 +869,12 @@ var toRegexRange_1 = toRegexRange$1;
|
|
|
834
869
|
* Licensed under the MIT License.
|
|
835
870
|
*/
|
|
836
871
|
|
|
837
|
-
const util$2 = require$$0$
|
|
872
|
+
const util$2 = require$$0$2;
|
|
838
873
|
const toRegexRange = toRegexRange_1;
|
|
839
874
|
|
|
840
875
|
const isObject$1 = val => val !== null && typeof val === 'object' && !Array.isArray(val);
|
|
841
876
|
|
|
842
|
-
const transform
|
|
877
|
+
const transform = toNumber => {
|
|
843
878
|
return value => toNumber === true ? Number(value) : String(value);
|
|
844
879
|
};
|
|
845
880
|
|
|
@@ -976,7 +1011,7 @@ const fillNumbers = (start, end, step = 1, options = {}) => {
|
|
|
976
1011
|
let padded = zeros(startString) || zeros(endString) || zeros(stepString);
|
|
977
1012
|
let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0;
|
|
978
1013
|
let toNumber = padded === false && stringify$3(start, end, options) === false;
|
|
979
|
-
let format = options.transform || transform
|
|
1014
|
+
let format = options.transform || transform(toNumber);
|
|
980
1015
|
|
|
981
1016
|
if (options.toRegex && step === 1) {
|
|
982
1017
|
return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options);
|
|
@@ -1799,7 +1834,7 @@ var braces_1 = braces$1;
|
|
|
1799
1834
|
|
|
1800
1835
|
var utils$f = {};
|
|
1801
1836
|
|
|
1802
|
-
const path$a = require$$0;
|
|
1837
|
+
const path$a = require$$0$1;
|
|
1803
1838
|
const WIN_SLASH = '\\\\/';
|
|
1804
1839
|
const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
|
|
1805
1840
|
|
|
@@ -1979,7 +2014,7 @@ var constants$3 = {
|
|
|
1979
2014
|
|
|
1980
2015
|
(function (exports) {
|
|
1981
2016
|
|
|
1982
|
-
const path = require$$0;
|
|
2017
|
+
const path = require$$0$1;
|
|
1983
2018
|
const win32 = process.platform === 'win32';
|
|
1984
2019
|
const {
|
|
1985
2020
|
REGEX_BACKSLASH,
|
|
@@ -3523,7 +3558,7 @@ parse$3.fastpaths = (input, options) => {
|
|
|
3523
3558
|
|
|
3524
3559
|
var parse_1$1 = parse$3;
|
|
3525
3560
|
|
|
3526
|
-
const path$9 = require$$0;
|
|
3561
|
+
const path$9 = require$$0$1;
|
|
3527
3562
|
const scan = scan_1;
|
|
3528
3563
|
const parse$2 = parse_1$1;
|
|
3529
3564
|
const utils$c = utils$f;
|
|
@@ -3866,7 +3901,7 @@ var picomatch_1 = picomatch$2;
|
|
|
3866
3901
|
|
|
3867
3902
|
var picomatch$1 = picomatch_1;
|
|
3868
3903
|
|
|
3869
|
-
const util$1 = require$$0$
|
|
3904
|
+
const util$1 = require$$0$2;
|
|
3870
3905
|
const braces = braces_1;
|
|
3871
3906
|
const picomatch = picomatch$1;
|
|
3872
3907
|
const utils$b = utils$f;
|
|
@@ -4332,174 +4367,193 @@ micromatch$1.braceExpand = (pattern, options) => {
|
|
|
4332
4367
|
|
|
4333
4368
|
var micromatch_1 = micromatch$1;
|
|
4334
4369
|
|
|
4335
|
-
Object.defineProperty(pattern$1, "__esModule", { value: true });
|
|
4336
|
-
pattern$1.matchAny = pattern$1.convertPatternsToRe = pattern$1.makeRe = pattern$1.getPatternParts = pattern$1.expandBraceExpansion = pattern$1.expandPatternsWithBraceExpansion = pattern$1.isAffectDepthOfReadingPattern = pattern$1.endsWithSlashGlobStar = pattern$1.hasGlobStar = pattern$1.getBaseDirectory = pattern$1.isPatternRelatedToParentDirectory = pattern$1.getPatternsOutsideCurrentDirectory = pattern$1.getPatternsInsideCurrentDirectory = pattern$1.getPositivePatterns = pattern$1.getNegativePatterns = pattern$1.isPositivePattern = pattern$1.isNegativePattern = pattern$1.convertToNegativePattern = pattern$1.convertToPositivePattern = pattern$1.isDynamicPattern = pattern$1.isStaticPattern = void 0;
|
|
4337
|
-
const path$8 = require$$0;
|
|
4338
|
-
const globParent = globParent$1;
|
|
4339
|
-
const micromatch = micromatch_1;
|
|
4340
|
-
const GLOBSTAR = '**';
|
|
4341
|
-
const ESCAPE_SYMBOL = '\\';
|
|
4342
|
-
const COMMON_GLOB_SYMBOLS_RE = /[*?]|^!/;
|
|
4343
|
-
const REGEX_CHARACTER_CLASS_SYMBOLS_RE = /\[[^[]*]/;
|
|
4344
|
-
const REGEX_GROUP_SYMBOLS_RE = /(?:^|[^!*+?@])\([^(]*\|[^|]*\)/;
|
|
4345
|
-
const GLOB_EXTENSION_SYMBOLS_RE = /[!*+?@]\([^(]*\)/;
|
|
4346
|
-
const BRACE_EXPANSION_SEPARATORS_RE = /,|\.\./;
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
-
|
|
4353
|
-
|
|
4354
|
-
|
|
4355
|
-
|
|
4356
|
-
|
|
4357
|
-
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
|
|
4362
|
-
|
|
4363
|
-
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
|
|
4367
|
-
|
|
4368
|
-
|
|
4369
|
-
|
|
4370
|
-
|
|
4371
|
-
|
|
4372
|
-
|
|
4373
|
-
|
|
4374
|
-
|
|
4375
|
-
|
|
4376
|
-
|
|
4377
|
-
}
|
|
4378
|
-
|
|
4379
|
-
|
|
4380
|
-
|
|
4381
|
-
|
|
4382
|
-
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
|
|
4389
|
-
|
|
4390
|
-
|
|
4391
|
-
|
|
4392
|
-
|
|
4393
|
-
|
|
4394
|
-
|
|
4395
|
-
|
|
4396
|
-
|
|
4397
|
-
|
|
4398
|
-
|
|
4399
|
-
|
|
4400
|
-
|
|
4401
|
-
|
|
4402
|
-
|
|
4403
|
-
|
|
4404
|
-
|
|
4405
|
-
|
|
4406
|
-
|
|
4407
|
-
|
|
4408
|
-
|
|
4409
|
-
|
|
4410
|
-
|
|
4411
|
-
|
|
4412
|
-
|
|
4413
|
-
|
|
4414
|
-
|
|
4415
|
-
|
|
4416
|
-
|
|
4417
|
-
|
|
4418
|
-
|
|
4419
|
-
|
|
4420
|
-
|
|
4421
|
-
|
|
4422
|
-
|
|
4423
|
-
|
|
4424
|
-
|
|
4425
|
-
|
|
4426
|
-
|
|
4427
|
-
|
|
4428
|
-
|
|
4429
|
-
|
|
4430
|
-
|
|
4431
|
-
|
|
4432
|
-
|
|
4433
|
-
|
|
4434
|
-
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
|
|
4440
|
-
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
|
|
4444
|
-
|
|
4445
|
-
|
|
4446
|
-
|
|
4447
|
-
}
|
|
4448
|
-
|
|
4449
|
-
|
|
4450
|
-
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
return
|
|
4456
|
-
}
|
|
4457
|
-
pattern$1.
|
|
4458
|
-
function
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
|
|
4464
|
-
|
|
4465
|
-
|
|
4466
|
-
|
|
4467
|
-
|
|
4468
|
-
|
|
4469
|
-
|
|
4470
|
-
|
|
4471
|
-
|
|
4472
|
-
|
|
4473
|
-
|
|
4474
|
-
|
|
4475
|
-
|
|
4476
|
-
|
|
4477
|
-
|
|
4478
|
-
|
|
4479
|
-
|
|
4480
|
-
|
|
4481
|
-
|
|
4482
|
-
|
|
4483
|
-
|
|
4484
|
-
|
|
4485
|
-
|
|
4486
|
-
|
|
4487
|
-
|
|
4488
|
-
|
|
4489
|
-
|
|
4490
|
-
|
|
4491
|
-
|
|
4492
|
-
|
|
4493
|
-
|
|
4494
|
-
|
|
4495
|
-
|
|
4496
|
-
|
|
4497
|
-
|
|
4498
|
-
|
|
4499
|
-
|
|
4500
|
-
|
|
4501
|
-
|
|
4370
|
+
Object.defineProperty(pattern$1, "__esModule", { value: true });
|
|
4371
|
+
pattern$1.removeDuplicateSlashes = pattern$1.matchAny = pattern$1.convertPatternsToRe = pattern$1.makeRe = pattern$1.getPatternParts = pattern$1.expandBraceExpansion = pattern$1.expandPatternsWithBraceExpansion = pattern$1.isAffectDepthOfReadingPattern = pattern$1.endsWithSlashGlobStar = pattern$1.hasGlobStar = pattern$1.getBaseDirectory = pattern$1.isPatternRelatedToParentDirectory = pattern$1.getPatternsOutsideCurrentDirectory = pattern$1.getPatternsInsideCurrentDirectory = pattern$1.getPositivePatterns = pattern$1.getNegativePatterns = pattern$1.isPositivePattern = pattern$1.isNegativePattern = pattern$1.convertToNegativePattern = pattern$1.convertToPositivePattern = pattern$1.isDynamicPattern = pattern$1.isStaticPattern = void 0;
|
|
4372
|
+
const path$8 = require$$0$1;
|
|
4373
|
+
const globParent = globParent$1;
|
|
4374
|
+
const micromatch = micromatch_1;
|
|
4375
|
+
const GLOBSTAR = '**';
|
|
4376
|
+
const ESCAPE_SYMBOL = '\\';
|
|
4377
|
+
const COMMON_GLOB_SYMBOLS_RE = /[*?]|^!/;
|
|
4378
|
+
const REGEX_CHARACTER_CLASS_SYMBOLS_RE = /\[[^[]*]/;
|
|
4379
|
+
const REGEX_GROUP_SYMBOLS_RE = /(?:^|[^!*+?@])\([^(]*\|[^|]*\)/;
|
|
4380
|
+
const GLOB_EXTENSION_SYMBOLS_RE = /[!*+?@]\([^(]*\)/;
|
|
4381
|
+
const BRACE_EXPANSION_SEPARATORS_RE = /,|\.\./;
|
|
4382
|
+
/**
|
|
4383
|
+
* Matches a sequence of two or more consecutive slashes, excluding the first two slashes at the beginning of the string.
|
|
4384
|
+
* The latter is due to the presence of the device path at the beginning of the UNC path.
|
|
4385
|
+
*/
|
|
4386
|
+
const DOUBLE_SLASH_RE = /(?!^)\/{2,}/g;
|
|
4387
|
+
function isStaticPattern(pattern, options = {}) {
|
|
4388
|
+
return !isDynamicPattern(pattern, options);
|
|
4389
|
+
}
|
|
4390
|
+
pattern$1.isStaticPattern = isStaticPattern;
|
|
4391
|
+
function isDynamicPattern(pattern, options = {}) {
|
|
4392
|
+
/**
|
|
4393
|
+
* A special case with an empty string is necessary for matching patterns that start with a forward slash.
|
|
4394
|
+
* An empty string cannot be a dynamic pattern.
|
|
4395
|
+
* For example, the pattern `/lib/*` will be spread into parts: '', 'lib', '*'.
|
|
4396
|
+
*/
|
|
4397
|
+
if (pattern === '') {
|
|
4398
|
+
return false;
|
|
4399
|
+
}
|
|
4400
|
+
/**
|
|
4401
|
+
* When the `caseSensitiveMatch` option is disabled, all patterns must be marked as dynamic, because we cannot check
|
|
4402
|
+
* filepath directly (without read directory).
|
|
4403
|
+
*/
|
|
4404
|
+
if (options.caseSensitiveMatch === false || pattern.includes(ESCAPE_SYMBOL)) {
|
|
4405
|
+
return true;
|
|
4406
|
+
}
|
|
4407
|
+
if (COMMON_GLOB_SYMBOLS_RE.test(pattern) || REGEX_CHARACTER_CLASS_SYMBOLS_RE.test(pattern) || REGEX_GROUP_SYMBOLS_RE.test(pattern)) {
|
|
4408
|
+
return true;
|
|
4409
|
+
}
|
|
4410
|
+
if (options.extglob !== false && GLOB_EXTENSION_SYMBOLS_RE.test(pattern)) {
|
|
4411
|
+
return true;
|
|
4412
|
+
}
|
|
4413
|
+
if (options.braceExpansion !== false && hasBraceExpansion(pattern)) {
|
|
4414
|
+
return true;
|
|
4415
|
+
}
|
|
4416
|
+
return false;
|
|
4417
|
+
}
|
|
4418
|
+
pattern$1.isDynamicPattern = isDynamicPattern;
|
|
4419
|
+
function hasBraceExpansion(pattern) {
|
|
4420
|
+
const openingBraceIndex = pattern.indexOf('{');
|
|
4421
|
+
if (openingBraceIndex === -1) {
|
|
4422
|
+
return false;
|
|
4423
|
+
}
|
|
4424
|
+
const closingBraceIndex = pattern.indexOf('}', openingBraceIndex + 1);
|
|
4425
|
+
if (closingBraceIndex === -1) {
|
|
4426
|
+
return false;
|
|
4427
|
+
}
|
|
4428
|
+
const braceContent = pattern.slice(openingBraceIndex, closingBraceIndex);
|
|
4429
|
+
return BRACE_EXPANSION_SEPARATORS_RE.test(braceContent);
|
|
4430
|
+
}
|
|
4431
|
+
function convertToPositivePattern(pattern) {
|
|
4432
|
+
return isNegativePattern(pattern) ? pattern.slice(1) : pattern;
|
|
4433
|
+
}
|
|
4434
|
+
pattern$1.convertToPositivePattern = convertToPositivePattern;
|
|
4435
|
+
function convertToNegativePattern(pattern) {
|
|
4436
|
+
return '!' + pattern;
|
|
4437
|
+
}
|
|
4438
|
+
pattern$1.convertToNegativePattern = convertToNegativePattern;
|
|
4439
|
+
function isNegativePattern(pattern) {
|
|
4440
|
+
return pattern.startsWith('!') && pattern[1] !== '(';
|
|
4441
|
+
}
|
|
4442
|
+
pattern$1.isNegativePattern = isNegativePattern;
|
|
4443
|
+
function isPositivePattern(pattern) {
|
|
4444
|
+
return !isNegativePattern(pattern);
|
|
4445
|
+
}
|
|
4446
|
+
pattern$1.isPositivePattern = isPositivePattern;
|
|
4447
|
+
function getNegativePatterns(patterns) {
|
|
4448
|
+
return patterns.filter(isNegativePattern);
|
|
4449
|
+
}
|
|
4450
|
+
pattern$1.getNegativePatterns = getNegativePatterns;
|
|
4451
|
+
function getPositivePatterns$1(patterns) {
|
|
4452
|
+
return patterns.filter(isPositivePattern);
|
|
4453
|
+
}
|
|
4454
|
+
pattern$1.getPositivePatterns = getPositivePatterns$1;
|
|
4455
|
+
/**
|
|
4456
|
+
* Returns patterns that can be applied inside the current directory.
|
|
4457
|
+
*
|
|
4458
|
+
* @example
|
|
4459
|
+
* // ['./*', '*', 'a/*']
|
|
4460
|
+
* getPatternsInsideCurrentDirectory(['./*', '*', 'a/*', '../*', './../*'])
|
|
4461
|
+
*/
|
|
4462
|
+
function getPatternsInsideCurrentDirectory(patterns) {
|
|
4463
|
+
return patterns.filter((pattern) => !isPatternRelatedToParentDirectory(pattern));
|
|
4464
|
+
}
|
|
4465
|
+
pattern$1.getPatternsInsideCurrentDirectory = getPatternsInsideCurrentDirectory;
|
|
4466
|
+
/**
|
|
4467
|
+
* Returns patterns to be expanded relative to (outside) the current directory.
|
|
4468
|
+
*
|
|
4469
|
+
* @example
|
|
4470
|
+
* // ['../*', './../*']
|
|
4471
|
+
* getPatternsInsideCurrentDirectory(['./*', '*', 'a/*', '../*', './../*'])
|
|
4472
|
+
*/
|
|
4473
|
+
function getPatternsOutsideCurrentDirectory(patterns) {
|
|
4474
|
+
return patterns.filter(isPatternRelatedToParentDirectory);
|
|
4475
|
+
}
|
|
4476
|
+
pattern$1.getPatternsOutsideCurrentDirectory = getPatternsOutsideCurrentDirectory;
|
|
4477
|
+
function isPatternRelatedToParentDirectory(pattern) {
|
|
4478
|
+
return pattern.startsWith('..') || pattern.startsWith('./..');
|
|
4479
|
+
}
|
|
4480
|
+
pattern$1.isPatternRelatedToParentDirectory = isPatternRelatedToParentDirectory;
|
|
4481
|
+
function getBaseDirectory(pattern) {
|
|
4482
|
+
return globParent(pattern, { flipBackslashes: false });
|
|
4483
|
+
}
|
|
4484
|
+
pattern$1.getBaseDirectory = getBaseDirectory;
|
|
4485
|
+
function hasGlobStar(pattern) {
|
|
4486
|
+
return pattern.includes(GLOBSTAR);
|
|
4487
|
+
}
|
|
4488
|
+
pattern$1.hasGlobStar = hasGlobStar;
|
|
4489
|
+
function endsWithSlashGlobStar(pattern) {
|
|
4490
|
+
return pattern.endsWith('/' + GLOBSTAR);
|
|
4491
|
+
}
|
|
4492
|
+
pattern$1.endsWithSlashGlobStar = endsWithSlashGlobStar;
|
|
4493
|
+
function isAffectDepthOfReadingPattern(pattern) {
|
|
4494
|
+
const basename = path$8.basename(pattern);
|
|
4495
|
+
return endsWithSlashGlobStar(pattern) || isStaticPattern(basename);
|
|
4496
|
+
}
|
|
4497
|
+
pattern$1.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern;
|
|
4498
|
+
function expandPatternsWithBraceExpansion(patterns) {
|
|
4499
|
+
return patterns.reduce((collection, pattern) => {
|
|
4500
|
+
return collection.concat(expandBraceExpansion(pattern));
|
|
4501
|
+
}, []);
|
|
4502
|
+
}
|
|
4503
|
+
pattern$1.expandPatternsWithBraceExpansion = expandPatternsWithBraceExpansion;
|
|
4504
|
+
function expandBraceExpansion(pattern) {
|
|
4505
|
+
const patterns = micromatch.braces(pattern, { expand: true, nodupes: true });
|
|
4506
|
+
/**
|
|
4507
|
+
* Sort the patterns by length so that the same depth patterns are processed side by side.
|
|
4508
|
+
* `a/{b,}/{c,}/*` – `['a///*', 'a/b//*', 'a//c/*', 'a/b/c/*']`
|
|
4509
|
+
*/
|
|
4510
|
+
patterns.sort((a, b) => a.length - b.length);
|
|
4511
|
+
/**
|
|
4512
|
+
* Micromatch can return an empty string in the case of patterns like `{a,}`.
|
|
4513
|
+
*/
|
|
4514
|
+
return patterns.filter((pattern) => pattern !== '');
|
|
4515
|
+
}
|
|
4516
|
+
pattern$1.expandBraceExpansion = expandBraceExpansion;
|
|
4517
|
+
function getPatternParts(pattern, options) {
|
|
4518
|
+
let { parts } = micromatch.scan(pattern, Object.assign(Object.assign({}, options), { parts: true }));
|
|
4519
|
+
/**
|
|
4520
|
+
* The scan method returns an empty array in some cases.
|
|
4521
|
+
* See micromatch/picomatch#58 for more details.
|
|
4522
|
+
*/
|
|
4523
|
+
if (parts.length === 0) {
|
|
4524
|
+
parts = [pattern];
|
|
4525
|
+
}
|
|
4526
|
+
/**
|
|
4527
|
+
* The scan method does not return an empty part for the pattern with a forward slash.
|
|
4528
|
+
* This is another part of micromatch/picomatch#58.
|
|
4529
|
+
*/
|
|
4530
|
+
if (parts[0].startsWith('/')) {
|
|
4531
|
+
parts[0] = parts[0].slice(1);
|
|
4532
|
+
parts.unshift('');
|
|
4533
|
+
}
|
|
4534
|
+
return parts;
|
|
4535
|
+
}
|
|
4536
|
+
pattern$1.getPatternParts = getPatternParts;
|
|
4537
|
+
function makeRe(pattern, options) {
|
|
4538
|
+
return micromatch.makeRe(pattern, options);
|
|
4539
|
+
}
|
|
4540
|
+
pattern$1.makeRe = makeRe;
|
|
4541
|
+
function convertPatternsToRe(patterns, options) {
|
|
4542
|
+
return patterns.map((pattern) => makeRe(pattern, options));
|
|
4543
|
+
}
|
|
4544
|
+
pattern$1.convertPatternsToRe = convertPatternsToRe;
|
|
4545
|
+
function matchAny(entry, patternsRe) {
|
|
4546
|
+
return patternsRe.some((patternRe) => patternRe.test(entry));
|
|
4547
|
+
}
|
|
4502
4548
|
pattern$1.matchAny = matchAny;
|
|
4549
|
+
/**
|
|
4550
|
+
* This package only works with forward slashes as a path separator.
|
|
4551
|
+
* Because of this, we cannot use the standard `path.normalize` method, because on Windows platform it will use of backslashes.
|
|
4552
|
+
*/
|
|
4553
|
+
function removeDuplicateSlashes(pattern) {
|
|
4554
|
+
return pattern.replace(DOUBLE_SLASH_RE, '/');
|
|
4555
|
+
}
|
|
4556
|
+
pattern$1.removeDuplicateSlashes = removeDuplicateSlashes;
|
|
4503
4557
|
|
|
4504
4558
|
var stream$5 = {};
|
|
4505
4559
|
|
|
@@ -4510,7 +4564,7 @@ var stream$5 = {};
|
|
|
4510
4564
|
* Copyright (c) 2014-2020 Teambition
|
|
4511
4565
|
* Licensed under the MIT license.
|
|
4512
4566
|
*/
|
|
4513
|
-
const Stream = require$$0$
|
|
4567
|
+
const Stream = require$$0$3;
|
|
4514
4568
|
const PassThrough$1 = Stream.PassThrough;
|
|
4515
4569
|
const slice = Array.prototype.slice;
|
|
4516
4570
|
|
|
@@ -4647,156 +4701,163 @@ function pauseStreams (streams, options) {
|
|
|
4647
4701
|
return streams
|
|
4648
4702
|
}
|
|
4649
4703
|
|
|
4650
|
-
Object.defineProperty(stream$5, "__esModule", { value: true });
|
|
4651
|
-
stream$5.merge = void 0;
|
|
4652
|
-
const merge2 = merge2_1;
|
|
4653
|
-
function merge(streams) {
|
|
4654
|
-
const mergedStream = merge2(streams);
|
|
4655
|
-
streams.forEach((stream) => {
|
|
4656
|
-
stream.once('error', (error) => mergedStream.emit('error', error));
|
|
4657
|
-
});
|
|
4658
|
-
mergedStream.once('close', () => propagateCloseEventToSources(streams));
|
|
4659
|
-
mergedStream.once('end', () => propagateCloseEventToSources(streams));
|
|
4660
|
-
return mergedStream;
|
|
4661
|
-
}
|
|
4662
|
-
stream$5.merge = merge;
|
|
4663
|
-
function propagateCloseEventToSources(streams) {
|
|
4664
|
-
streams.forEach((stream) => stream.emit('close'));
|
|
4704
|
+
Object.defineProperty(stream$5, "__esModule", { value: true });
|
|
4705
|
+
stream$5.merge = void 0;
|
|
4706
|
+
const merge2 = merge2_1;
|
|
4707
|
+
function merge(streams) {
|
|
4708
|
+
const mergedStream = merge2(streams);
|
|
4709
|
+
streams.forEach((stream) => {
|
|
4710
|
+
stream.once('error', (error) => mergedStream.emit('error', error));
|
|
4711
|
+
});
|
|
4712
|
+
mergedStream.once('close', () => propagateCloseEventToSources(streams));
|
|
4713
|
+
mergedStream.once('end', () => propagateCloseEventToSources(streams));
|
|
4714
|
+
return mergedStream;
|
|
4715
|
+
}
|
|
4716
|
+
stream$5.merge = merge;
|
|
4717
|
+
function propagateCloseEventToSources(streams) {
|
|
4718
|
+
streams.forEach((stream) => stream.emit('close'));
|
|
4665
4719
|
}
|
|
4666
4720
|
|
|
4667
4721
|
var string$1 = {};
|
|
4668
4722
|
|
|
4669
|
-
Object.defineProperty(string$1, "__esModule", { value: true });
|
|
4670
|
-
string$1.isEmpty = string$1.isString = void 0;
|
|
4671
|
-
function isString(input) {
|
|
4672
|
-
return typeof input === 'string';
|
|
4673
|
-
}
|
|
4674
|
-
string$1.isString = isString;
|
|
4675
|
-
function isEmpty(input) {
|
|
4676
|
-
return input === '';
|
|
4677
|
-
}
|
|
4723
|
+
Object.defineProperty(string$1, "__esModule", { value: true });
|
|
4724
|
+
string$1.isEmpty = string$1.isString = void 0;
|
|
4725
|
+
function isString(input) {
|
|
4726
|
+
return typeof input === 'string';
|
|
4727
|
+
}
|
|
4728
|
+
string$1.isString = isString;
|
|
4729
|
+
function isEmpty(input) {
|
|
4730
|
+
return input === '';
|
|
4731
|
+
}
|
|
4678
4732
|
string$1.isEmpty = isEmpty;
|
|
4679
4733
|
|
|
4680
|
-
Object.defineProperty(utils$k, "__esModule", { value: true });
|
|
4681
|
-
utils$k.string = utils$k.stream = utils$k.pattern = utils$k.path = utils$k.fs = utils$k.errno = utils$k.array = void 0;
|
|
4682
|
-
const array = array$1;
|
|
4683
|
-
utils$k.array = array;
|
|
4684
|
-
const errno = errno$1;
|
|
4685
|
-
utils$k.errno = errno;
|
|
4686
|
-
const fs$7 = fs$8;
|
|
4687
|
-
utils$k.fs = fs$7;
|
|
4688
|
-
const path$7 = path$c;
|
|
4689
|
-
utils$k.path = path$7;
|
|
4690
|
-
const pattern = pattern$1;
|
|
4691
|
-
utils$k.pattern = pattern;
|
|
4692
|
-
const stream$4 = stream$5;
|
|
4693
|
-
utils$k.stream = stream$4;
|
|
4694
|
-
const string = string$1;
|
|
4734
|
+
Object.defineProperty(utils$k, "__esModule", { value: true });
|
|
4735
|
+
utils$k.string = utils$k.stream = utils$k.pattern = utils$k.path = utils$k.fs = utils$k.errno = utils$k.array = void 0;
|
|
4736
|
+
const array = array$1;
|
|
4737
|
+
utils$k.array = array;
|
|
4738
|
+
const errno = errno$1;
|
|
4739
|
+
utils$k.errno = errno;
|
|
4740
|
+
const fs$7 = fs$8;
|
|
4741
|
+
utils$k.fs = fs$7;
|
|
4742
|
+
const path$7 = path$c;
|
|
4743
|
+
utils$k.path = path$7;
|
|
4744
|
+
const pattern = pattern$1;
|
|
4745
|
+
utils$k.pattern = pattern;
|
|
4746
|
+
const stream$4 = stream$5;
|
|
4747
|
+
utils$k.stream = stream$4;
|
|
4748
|
+
const string = string$1;
|
|
4695
4749
|
utils$k.string = string;
|
|
4696
4750
|
|
|
4697
|
-
Object.defineProperty(tasks, "__esModule", { value: true });
|
|
4698
|
-
tasks.convertPatternGroupToTask = tasks.convertPatternGroupsToTasks = tasks.groupPatternsByBaseDirectory = tasks.getNegativePatternsAsPositive = tasks.getPositivePatterns = tasks.convertPatternsToTasks = tasks.generate = void 0;
|
|
4699
|
-
const utils$a = utils$k;
|
|
4700
|
-
function generate(
|
|
4701
|
-
const
|
|
4702
|
-
const
|
|
4703
|
-
const
|
|
4704
|
-
const
|
|
4705
|
-
const
|
|
4706
|
-
const
|
|
4707
|
-
|
|
4708
|
-
|
|
4709
|
-
|
|
4710
|
-
|
|
4711
|
-
|
|
4712
|
-
|
|
4713
|
-
|
|
4714
|
-
|
|
4715
|
-
|
|
4716
|
-
|
|
4717
|
-
|
|
4718
|
-
|
|
4719
|
-
|
|
4720
|
-
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
|
|
4725
|
-
*
|
|
4726
|
-
|
|
4727
|
-
|
|
4728
|
-
|
|
4729
|
-
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
|
|
4733
|
-
|
|
4734
|
-
}
|
|
4735
|
-
|
|
4736
|
-
|
|
4737
|
-
|
|
4738
|
-
|
|
4739
|
-
|
|
4740
|
-
|
|
4741
|
-
|
|
4742
|
-
|
|
4743
|
-
|
|
4744
|
-
|
|
4745
|
-
|
|
4746
|
-
function
|
|
4747
|
-
const
|
|
4748
|
-
|
|
4749
|
-
|
|
4750
|
-
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
|
|
4759
|
-
|
|
4760
|
-
|
|
4761
|
-
|
|
4762
|
-
|
|
4763
|
-
|
|
4764
|
-
}
|
|
4765
|
-
tasks.
|
|
4766
|
-
function
|
|
4767
|
-
return
|
|
4768
|
-
|
|
4769
|
-
|
|
4770
|
-
|
|
4771
|
-
|
|
4772
|
-
|
|
4773
|
-
|
|
4774
|
-
}
|
|
4751
|
+
Object.defineProperty(tasks, "__esModule", { value: true });
|
|
4752
|
+
tasks.convertPatternGroupToTask = tasks.convertPatternGroupsToTasks = tasks.groupPatternsByBaseDirectory = tasks.getNegativePatternsAsPositive = tasks.getPositivePatterns = tasks.convertPatternsToTasks = tasks.generate = void 0;
|
|
4753
|
+
const utils$a = utils$k;
|
|
4754
|
+
function generate(input, settings) {
|
|
4755
|
+
const patterns = processPatterns(input, settings);
|
|
4756
|
+
const ignore = processPatterns(settings.ignore, settings);
|
|
4757
|
+
const positivePatterns = getPositivePatterns(patterns);
|
|
4758
|
+
const negativePatterns = getNegativePatternsAsPositive(patterns, ignore);
|
|
4759
|
+
const staticPatterns = positivePatterns.filter((pattern) => utils$a.pattern.isStaticPattern(pattern, settings));
|
|
4760
|
+
const dynamicPatterns = positivePatterns.filter((pattern) => utils$a.pattern.isDynamicPattern(pattern, settings));
|
|
4761
|
+
const staticTasks = convertPatternsToTasks(staticPatterns, negativePatterns, /* dynamic */ false);
|
|
4762
|
+
const dynamicTasks = convertPatternsToTasks(dynamicPatterns, negativePatterns, /* dynamic */ true);
|
|
4763
|
+
return staticTasks.concat(dynamicTasks);
|
|
4764
|
+
}
|
|
4765
|
+
tasks.generate = generate;
|
|
4766
|
+
function processPatterns(input, settings) {
|
|
4767
|
+
let patterns = input;
|
|
4768
|
+
/**
|
|
4769
|
+
* The original pattern like `{,*,**,a/*}` can lead to problems checking the depth when matching entry
|
|
4770
|
+
* and some problems with the micromatch package (see fast-glob issues: #365, #394).
|
|
4771
|
+
*
|
|
4772
|
+
* To solve this problem, we expand all patterns containing brace expansion. This can lead to a slight slowdown
|
|
4773
|
+
* in matching in the case of a large set of patterns after expansion.
|
|
4774
|
+
*/
|
|
4775
|
+
if (settings.braceExpansion) {
|
|
4776
|
+
patterns = utils$a.pattern.expandPatternsWithBraceExpansion(patterns);
|
|
4777
|
+
}
|
|
4778
|
+
/**
|
|
4779
|
+
* If the `baseNameMatch` option is enabled, we must add globstar to patterns, so that they can be used
|
|
4780
|
+
* at any nesting level.
|
|
4781
|
+
*
|
|
4782
|
+
* We do this here, because otherwise we have to complicate the filtering logic. For example, we need to change
|
|
4783
|
+
* the pattern in the filter before creating a regular expression. There is no need to change the patterns
|
|
4784
|
+
* in the application. Only on the input.
|
|
4785
|
+
*/
|
|
4786
|
+
if (settings.baseNameMatch) {
|
|
4787
|
+
patterns = patterns.map((pattern) => pattern.includes('/') ? pattern : `**/${pattern}`);
|
|
4788
|
+
}
|
|
4789
|
+
/**
|
|
4790
|
+
* This method also removes duplicate slashes that may have been in the pattern or formed as a result of expansion.
|
|
4791
|
+
*/
|
|
4792
|
+
return patterns.map((pattern) => utils$a.pattern.removeDuplicateSlashes(pattern));
|
|
4793
|
+
}
|
|
4794
|
+
/**
|
|
4795
|
+
* Returns tasks grouped by basic pattern directories.
|
|
4796
|
+
*
|
|
4797
|
+
* Patterns that can be found inside (`./`) and outside (`../`) the current directory are handled separately.
|
|
4798
|
+
* This is necessary because directory traversal starts at the base directory and goes deeper.
|
|
4799
|
+
*/
|
|
4800
|
+
function convertPatternsToTasks(positive, negative, dynamic) {
|
|
4801
|
+
const tasks = [];
|
|
4802
|
+
const patternsOutsideCurrentDirectory = utils$a.pattern.getPatternsOutsideCurrentDirectory(positive);
|
|
4803
|
+
const patternsInsideCurrentDirectory = utils$a.pattern.getPatternsInsideCurrentDirectory(positive);
|
|
4804
|
+
const outsideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsOutsideCurrentDirectory);
|
|
4805
|
+
const insideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsInsideCurrentDirectory);
|
|
4806
|
+
tasks.push(...convertPatternGroupsToTasks(outsideCurrentDirectoryGroup, negative, dynamic));
|
|
4807
|
+
/*
|
|
4808
|
+
* For the sake of reducing future accesses to the file system, we merge all tasks within the current directory
|
|
4809
|
+
* into a global task, if at least one pattern refers to the root (`.`). In this case, the global task covers the rest.
|
|
4810
|
+
*/
|
|
4811
|
+
if ('.' in insideCurrentDirectoryGroup) {
|
|
4812
|
+
tasks.push(convertPatternGroupToTask('.', patternsInsideCurrentDirectory, negative, dynamic));
|
|
4813
|
+
}
|
|
4814
|
+
else {
|
|
4815
|
+
tasks.push(...convertPatternGroupsToTasks(insideCurrentDirectoryGroup, negative, dynamic));
|
|
4816
|
+
}
|
|
4817
|
+
return tasks;
|
|
4818
|
+
}
|
|
4819
|
+
tasks.convertPatternsToTasks = convertPatternsToTasks;
|
|
4820
|
+
function getPositivePatterns(patterns) {
|
|
4821
|
+
return utils$a.pattern.getPositivePatterns(patterns);
|
|
4822
|
+
}
|
|
4823
|
+
tasks.getPositivePatterns = getPositivePatterns;
|
|
4824
|
+
function getNegativePatternsAsPositive(patterns, ignore) {
|
|
4825
|
+
const negative = utils$a.pattern.getNegativePatterns(patterns).concat(ignore);
|
|
4826
|
+
const positive = negative.map(utils$a.pattern.convertToPositivePattern);
|
|
4827
|
+
return positive;
|
|
4828
|
+
}
|
|
4829
|
+
tasks.getNegativePatternsAsPositive = getNegativePatternsAsPositive;
|
|
4830
|
+
function groupPatternsByBaseDirectory(patterns) {
|
|
4831
|
+
const group = {};
|
|
4832
|
+
return patterns.reduce((collection, pattern) => {
|
|
4833
|
+
const base = utils$a.pattern.getBaseDirectory(pattern);
|
|
4834
|
+
if (base in collection) {
|
|
4835
|
+
collection[base].push(pattern);
|
|
4836
|
+
}
|
|
4837
|
+
else {
|
|
4838
|
+
collection[base] = [pattern];
|
|
4839
|
+
}
|
|
4840
|
+
return collection;
|
|
4841
|
+
}, group);
|
|
4842
|
+
}
|
|
4843
|
+
tasks.groupPatternsByBaseDirectory = groupPatternsByBaseDirectory;
|
|
4844
|
+
function convertPatternGroupsToTasks(positive, negative, dynamic) {
|
|
4845
|
+
return Object.keys(positive).map((base) => {
|
|
4846
|
+
return convertPatternGroupToTask(base, positive[base], negative, dynamic);
|
|
4847
|
+
});
|
|
4848
|
+
}
|
|
4849
|
+
tasks.convertPatternGroupsToTasks = convertPatternGroupsToTasks;
|
|
4850
|
+
function convertPatternGroupToTask(base, positive, negative, dynamic) {
|
|
4851
|
+
return {
|
|
4852
|
+
dynamic,
|
|
4853
|
+
positive,
|
|
4854
|
+
negative,
|
|
4855
|
+
base,
|
|
4856
|
+
patterns: [].concat(positive, negative.map(utils$a.pattern.convertToNegativePattern))
|
|
4857
|
+
};
|
|
4858
|
+
}
|
|
4775
4859
|
tasks.convertPatternGroupToTask = convertPatternGroupToTask;
|
|
4776
4860
|
|
|
4777
|
-
var patterns = {};
|
|
4778
|
-
|
|
4779
|
-
Object.defineProperty(patterns, "__esModule", { value: true });
|
|
4780
|
-
patterns.removeDuplicateSlashes = patterns.transform = void 0;
|
|
4781
|
-
/**
|
|
4782
|
-
* Matches a sequence of two or more consecutive slashes, excluding the first two slashes at the beginning of the string.
|
|
4783
|
-
* The latter is due to the presence of the device path at the beginning of the UNC path.
|
|
4784
|
-
* @todo rewrite to negative lookbehind with the next major release.
|
|
4785
|
-
*/
|
|
4786
|
-
const DOUBLE_SLASH_RE = /(?!^)\/{2,}/g;
|
|
4787
|
-
function transform(patterns) {
|
|
4788
|
-
return patterns.map((pattern) => removeDuplicateSlashes(pattern));
|
|
4789
|
-
}
|
|
4790
|
-
patterns.transform = transform;
|
|
4791
|
-
/**
|
|
4792
|
-
* This package only works with forward slashes as a path separator.
|
|
4793
|
-
* Because of this, we cannot use the standard `path.normalize` method, because on Windows platform it will use of backslashes.
|
|
4794
|
-
*/
|
|
4795
|
-
function removeDuplicateSlashes(pattern) {
|
|
4796
|
-
return pattern.replace(DOUBLE_SLASH_RE, '/');
|
|
4797
|
-
}
|
|
4798
|
-
patterns.removeDuplicateSlashes = removeDuplicateSlashes;
|
|
4799
|
-
|
|
4800
4861
|
var async$7 = {};
|
|
4801
4862
|
|
|
4802
4863
|
var async$6 = {};
|
|
@@ -4883,7 +4944,7 @@ var fs$6 = {};
|
|
|
4883
4944
|
(function (exports) {
|
|
4884
4945
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4885
4946
|
exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0;
|
|
4886
|
-
const fs = require$$0$
|
|
4947
|
+
const fs = require$$0$4;
|
|
4887
4948
|
exports.FILE_SYSTEM_ADAPTER = {
|
|
4888
4949
|
lstat: fs.lstat,
|
|
4889
4950
|
stat: fs.stat,
|
|
@@ -5234,7 +5295,7 @@ var fs$2 = {};
|
|
|
5234
5295
|
(function (exports) {
|
|
5235
5296
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5236
5297
|
exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0;
|
|
5237
|
-
const fs = require$$0$
|
|
5298
|
+
const fs = require$$0$4;
|
|
5238
5299
|
exports.FILE_SYSTEM_ADAPTER = {
|
|
5239
5300
|
lstat: fs.lstat,
|
|
5240
5301
|
stat: fs.stat,
|
|
@@ -5253,7 +5314,7 @@ var fs$2 = {};
|
|
|
5253
5314
|
} (fs$2));
|
|
5254
5315
|
|
|
5255
5316
|
Object.defineProperty(settings$2, "__esModule", { value: true });
|
|
5256
|
-
const path$6 = require$$0;
|
|
5317
|
+
const path$6 = require$$0$1;
|
|
5257
5318
|
const fsStat$3 = out$1;
|
|
5258
5319
|
const fs$1 = fs$2;
|
|
5259
5320
|
let Settings$1 = class Settings {
|
|
@@ -5673,7 +5734,7 @@ let Reader$1 = class Reader {
|
|
|
5673
5734
|
reader$1.default = Reader$1;
|
|
5674
5735
|
|
|
5675
5736
|
Object.defineProperty(async$4, "__esModule", { value: true });
|
|
5676
|
-
const events_1 = require$$2
|
|
5737
|
+
const events_1 = require$$2;
|
|
5677
5738
|
const fsScandir$2 = out$2;
|
|
5678
5739
|
const fastq = queueExports;
|
|
5679
5740
|
const common$1 = common$3;
|
|
@@ -5802,7 +5863,7 @@ function callSuccessCallback(callback, entries) {
|
|
|
5802
5863
|
var stream$3 = {};
|
|
5803
5864
|
|
|
5804
5865
|
Object.defineProperty(stream$3, "__esModule", { value: true });
|
|
5805
|
-
const stream_1$5 = require$$0$
|
|
5866
|
+
const stream_1$5 = require$$0$3;
|
|
5806
5867
|
const async_1$3 = async$4;
|
|
5807
5868
|
class StreamProvider {
|
|
5808
5869
|
constructor(_root, _settings) {
|
|
@@ -5915,7 +5976,7 @@ sync$4.default = SyncProvider;
|
|
|
5915
5976
|
var settings$1 = {};
|
|
5916
5977
|
|
|
5917
5978
|
Object.defineProperty(settings$1, "__esModule", { value: true });
|
|
5918
|
-
const path$5 = require$$0;
|
|
5979
|
+
const path$5 = require$$0$1;
|
|
5919
5980
|
const fsScandir = out$2;
|
|
5920
5981
|
class Settings {
|
|
5921
5982
|
constructor(_options = {}) {
|
|
@@ -5976,129 +6037,129 @@ function getSettings(settingsOrOptions = {}) {
|
|
|
5976
6037
|
|
|
5977
6038
|
var reader = {};
|
|
5978
6039
|
|
|
5979
|
-
Object.defineProperty(reader, "__esModule", { value: true });
|
|
5980
|
-
const path$4 = require$$0;
|
|
5981
|
-
const fsStat$2 = out$1;
|
|
5982
|
-
const utils$6 = utils$k;
|
|
5983
|
-
class Reader {
|
|
5984
|
-
constructor(_settings) {
|
|
5985
|
-
this._settings = _settings;
|
|
5986
|
-
this._fsStatSettings = new fsStat$2.Settings({
|
|
5987
|
-
followSymbolicLink: this._settings.followSymbolicLinks,
|
|
5988
|
-
fs: this._settings.fs,
|
|
5989
|
-
throwErrorOnBrokenSymbolicLink: this._settings.followSymbolicLinks
|
|
5990
|
-
});
|
|
5991
|
-
}
|
|
5992
|
-
_getFullEntryPath(filepath) {
|
|
5993
|
-
return path$4.resolve(this._settings.cwd, filepath);
|
|
5994
|
-
}
|
|
5995
|
-
_makeEntry(stats, pattern) {
|
|
5996
|
-
const entry = {
|
|
5997
|
-
name: pattern,
|
|
5998
|
-
path: pattern,
|
|
5999
|
-
dirent: utils$6.fs.createDirentFromStats(pattern, stats)
|
|
6000
|
-
};
|
|
6001
|
-
if (this._settings.stats) {
|
|
6002
|
-
entry.stats = stats;
|
|
6003
|
-
}
|
|
6004
|
-
return entry;
|
|
6005
|
-
}
|
|
6006
|
-
_isFatalError(error) {
|
|
6007
|
-
return !utils$6.errno.isEnoentCodeError(error) && !this._settings.suppressErrors;
|
|
6008
|
-
}
|
|
6009
|
-
}
|
|
6040
|
+
Object.defineProperty(reader, "__esModule", { value: true });
|
|
6041
|
+
const path$4 = require$$0$1;
|
|
6042
|
+
const fsStat$2 = out$1;
|
|
6043
|
+
const utils$6 = utils$k;
|
|
6044
|
+
class Reader {
|
|
6045
|
+
constructor(_settings) {
|
|
6046
|
+
this._settings = _settings;
|
|
6047
|
+
this._fsStatSettings = new fsStat$2.Settings({
|
|
6048
|
+
followSymbolicLink: this._settings.followSymbolicLinks,
|
|
6049
|
+
fs: this._settings.fs,
|
|
6050
|
+
throwErrorOnBrokenSymbolicLink: this._settings.followSymbolicLinks
|
|
6051
|
+
});
|
|
6052
|
+
}
|
|
6053
|
+
_getFullEntryPath(filepath) {
|
|
6054
|
+
return path$4.resolve(this._settings.cwd, filepath);
|
|
6055
|
+
}
|
|
6056
|
+
_makeEntry(stats, pattern) {
|
|
6057
|
+
const entry = {
|
|
6058
|
+
name: pattern,
|
|
6059
|
+
path: pattern,
|
|
6060
|
+
dirent: utils$6.fs.createDirentFromStats(pattern, stats)
|
|
6061
|
+
};
|
|
6062
|
+
if (this._settings.stats) {
|
|
6063
|
+
entry.stats = stats;
|
|
6064
|
+
}
|
|
6065
|
+
return entry;
|
|
6066
|
+
}
|
|
6067
|
+
_isFatalError(error) {
|
|
6068
|
+
return !utils$6.errno.isEnoentCodeError(error) && !this._settings.suppressErrors;
|
|
6069
|
+
}
|
|
6070
|
+
}
|
|
6010
6071
|
reader.default = Reader;
|
|
6011
6072
|
|
|
6012
6073
|
var stream$2 = {};
|
|
6013
6074
|
|
|
6014
|
-
Object.defineProperty(stream$2, "__esModule", { value: true });
|
|
6015
|
-
const stream_1$3 = require$$0$
|
|
6016
|
-
const fsStat$1 = out$1;
|
|
6017
|
-
const fsWalk$2 = out$3;
|
|
6018
|
-
const reader_1$2 = reader;
|
|
6019
|
-
class ReaderStream extends reader_1$2.default {
|
|
6020
|
-
constructor() {
|
|
6021
|
-
super(...arguments);
|
|
6022
|
-
this._walkStream = fsWalk$2.walkStream;
|
|
6023
|
-
this._stat = fsStat$1.stat;
|
|
6024
|
-
}
|
|
6025
|
-
dynamic(root, options) {
|
|
6026
|
-
return this._walkStream(root, options);
|
|
6027
|
-
}
|
|
6028
|
-
static(patterns, options) {
|
|
6029
|
-
const filepaths = patterns.map(this._getFullEntryPath, this);
|
|
6030
|
-
const stream = new stream_1$3.PassThrough({ objectMode: true });
|
|
6031
|
-
stream._write = (index, _enc, done) => {
|
|
6032
|
-
return this._getEntry(filepaths[index], patterns[index], options)
|
|
6033
|
-
.then((entry) => {
|
|
6034
|
-
if (entry !== null && options.entryFilter(entry)) {
|
|
6035
|
-
stream.push(entry);
|
|
6036
|
-
}
|
|
6037
|
-
if (index === filepaths.length - 1) {
|
|
6038
|
-
stream.end();
|
|
6039
|
-
}
|
|
6040
|
-
done();
|
|
6041
|
-
})
|
|
6042
|
-
.catch(done);
|
|
6043
|
-
};
|
|
6044
|
-
for (let i = 0; i < filepaths.length; i++) {
|
|
6045
|
-
stream.write(i);
|
|
6046
|
-
}
|
|
6047
|
-
return stream;
|
|
6048
|
-
}
|
|
6049
|
-
_getEntry(filepath, pattern, options) {
|
|
6050
|
-
return this._getStat(filepath)
|
|
6051
|
-
.then((stats) => this._makeEntry(stats, pattern))
|
|
6052
|
-
.catch((error) => {
|
|
6053
|
-
if (options.errorFilter(error)) {
|
|
6054
|
-
return null;
|
|
6055
|
-
}
|
|
6056
|
-
throw error;
|
|
6057
|
-
});
|
|
6058
|
-
}
|
|
6059
|
-
_getStat(filepath) {
|
|
6060
|
-
return new Promise((resolve, reject) => {
|
|
6061
|
-
this._stat(filepath, this._fsStatSettings, (error, stats) => {
|
|
6062
|
-
return error === null ? resolve(stats) : reject(error);
|
|
6063
|
-
});
|
|
6064
|
-
});
|
|
6065
|
-
}
|
|
6066
|
-
}
|
|
6075
|
+
Object.defineProperty(stream$2, "__esModule", { value: true });
|
|
6076
|
+
const stream_1$3 = require$$0$3;
|
|
6077
|
+
const fsStat$1 = out$1;
|
|
6078
|
+
const fsWalk$2 = out$3;
|
|
6079
|
+
const reader_1$2 = reader;
|
|
6080
|
+
class ReaderStream extends reader_1$2.default {
|
|
6081
|
+
constructor() {
|
|
6082
|
+
super(...arguments);
|
|
6083
|
+
this._walkStream = fsWalk$2.walkStream;
|
|
6084
|
+
this._stat = fsStat$1.stat;
|
|
6085
|
+
}
|
|
6086
|
+
dynamic(root, options) {
|
|
6087
|
+
return this._walkStream(root, options);
|
|
6088
|
+
}
|
|
6089
|
+
static(patterns, options) {
|
|
6090
|
+
const filepaths = patterns.map(this._getFullEntryPath, this);
|
|
6091
|
+
const stream = new stream_1$3.PassThrough({ objectMode: true });
|
|
6092
|
+
stream._write = (index, _enc, done) => {
|
|
6093
|
+
return this._getEntry(filepaths[index], patterns[index], options)
|
|
6094
|
+
.then((entry) => {
|
|
6095
|
+
if (entry !== null && options.entryFilter(entry)) {
|
|
6096
|
+
stream.push(entry);
|
|
6097
|
+
}
|
|
6098
|
+
if (index === filepaths.length - 1) {
|
|
6099
|
+
stream.end();
|
|
6100
|
+
}
|
|
6101
|
+
done();
|
|
6102
|
+
})
|
|
6103
|
+
.catch(done);
|
|
6104
|
+
};
|
|
6105
|
+
for (let i = 0; i < filepaths.length; i++) {
|
|
6106
|
+
stream.write(i);
|
|
6107
|
+
}
|
|
6108
|
+
return stream;
|
|
6109
|
+
}
|
|
6110
|
+
_getEntry(filepath, pattern, options) {
|
|
6111
|
+
return this._getStat(filepath)
|
|
6112
|
+
.then((stats) => this._makeEntry(stats, pattern))
|
|
6113
|
+
.catch((error) => {
|
|
6114
|
+
if (options.errorFilter(error)) {
|
|
6115
|
+
return null;
|
|
6116
|
+
}
|
|
6117
|
+
throw error;
|
|
6118
|
+
});
|
|
6119
|
+
}
|
|
6120
|
+
_getStat(filepath) {
|
|
6121
|
+
return new Promise((resolve, reject) => {
|
|
6122
|
+
this._stat(filepath, this._fsStatSettings, (error, stats) => {
|
|
6123
|
+
return error === null ? resolve(stats) : reject(error);
|
|
6124
|
+
});
|
|
6125
|
+
});
|
|
6126
|
+
}
|
|
6127
|
+
}
|
|
6067
6128
|
stream$2.default = ReaderStream;
|
|
6068
6129
|
|
|
6069
|
-
Object.defineProperty(async$6, "__esModule", { value: true });
|
|
6070
|
-
const fsWalk$1 = out$3;
|
|
6071
|
-
const reader_1$1 = reader;
|
|
6072
|
-
const stream_1$2 = stream$2;
|
|
6073
|
-
class ReaderAsync extends reader_1$1.default {
|
|
6074
|
-
constructor() {
|
|
6075
|
-
super(...arguments);
|
|
6076
|
-
this._walkAsync = fsWalk$1.walk;
|
|
6077
|
-
this._readerStream = new stream_1$2.default(this._settings);
|
|
6078
|
-
}
|
|
6079
|
-
dynamic(root, options) {
|
|
6080
|
-
return new Promise((resolve, reject) => {
|
|
6081
|
-
this._walkAsync(root, options, (error, entries) => {
|
|
6082
|
-
if (error === null) {
|
|
6083
|
-
resolve(entries);
|
|
6084
|
-
}
|
|
6085
|
-
else {
|
|
6086
|
-
reject(error);
|
|
6087
|
-
}
|
|
6088
|
-
});
|
|
6089
|
-
});
|
|
6090
|
-
}
|
|
6091
|
-
async static(patterns, options) {
|
|
6092
|
-
const entries = [];
|
|
6093
|
-
const stream = this._readerStream.static(patterns, options);
|
|
6094
|
-
// After #235, replace it with an asynchronous iterator.
|
|
6095
|
-
return new Promise((resolve, reject) => {
|
|
6096
|
-
stream.once('error', reject);
|
|
6097
|
-
stream.on('data', (entry) => entries.push(entry));
|
|
6098
|
-
stream.once('end', () => resolve(entries));
|
|
6099
|
-
});
|
|
6100
|
-
}
|
|
6101
|
-
}
|
|
6130
|
+
Object.defineProperty(async$6, "__esModule", { value: true });
|
|
6131
|
+
const fsWalk$1 = out$3;
|
|
6132
|
+
const reader_1$1 = reader;
|
|
6133
|
+
const stream_1$2 = stream$2;
|
|
6134
|
+
class ReaderAsync extends reader_1$1.default {
|
|
6135
|
+
constructor() {
|
|
6136
|
+
super(...arguments);
|
|
6137
|
+
this._walkAsync = fsWalk$1.walk;
|
|
6138
|
+
this._readerStream = new stream_1$2.default(this._settings);
|
|
6139
|
+
}
|
|
6140
|
+
dynamic(root, options) {
|
|
6141
|
+
return new Promise((resolve, reject) => {
|
|
6142
|
+
this._walkAsync(root, options, (error, entries) => {
|
|
6143
|
+
if (error === null) {
|
|
6144
|
+
resolve(entries);
|
|
6145
|
+
}
|
|
6146
|
+
else {
|
|
6147
|
+
reject(error);
|
|
6148
|
+
}
|
|
6149
|
+
});
|
|
6150
|
+
});
|
|
6151
|
+
}
|
|
6152
|
+
async static(patterns, options) {
|
|
6153
|
+
const entries = [];
|
|
6154
|
+
const stream = this._readerStream.static(patterns, options);
|
|
6155
|
+
// After #235, replace it with an asynchronous iterator.
|
|
6156
|
+
return new Promise((resolve, reject) => {
|
|
6157
|
+
stream.once('error', reject);
|
|
6158
|
+
stream.on('data', (entry) => entries.push(entry));
|
|
6159
|
+
stream.once('end', () => resolve(entries));
|
|
6160
|
+
});
|
|
6161
|
+
}
|
|
6162
|
+
}
|
|
6102
6163
|
async$6.default = ReaderAsync;
|
|
6103
6164
|
|
|
6104
6165
|
var provider = {};
|
|
@@ -6109,568 +6170,594 @@ var partial = {};
|
|
|
6109
6170
|
|
|
6110
6171
|
var matcher = {};
|
|
6111
6172
|
|
|
6112
|
-
Object.defineProperty(matcher, "__esModule", { value: true });
|
|
6113
|
-
const utils$5 = utils$k;
|
|
6114
|
-
class Matcher {
|
|
6115
|
-
constructor(_patterns, _settings, _micromatchOptions) {
|
|
6116
|
-
this._patterns = _patterns;
|
|
6117
|
-
this._settings = _settings;
|
|
6118
|
-
this._micromatchOptions = _micromatchOptions;
|
|
6119
|
-
this._storage = [];
|
|
6120
|
-
this._fillStorage();
|
|
6121
|
-
}
|
|
6122
|
-
_fillStorage() {
|
|
6123
|
-
|
|
6124
|
-
|
|
6125
|
-
|
|
6126
|
-
|
|
6127
|
-
|
|
6128
|
-
|
|
6129
|
-
|
|
6130
|
-
|
|
6131
|
-
|
|
6132
|
-
|
|
6133
|
-
|
|
6134
|
-
|
|
6135
|
-
|
|
6136
|
-
|
|
6137
|
-
|
|
6138
|
-
|
|
6139
|
-
|
|
6140
|
-
|
|
6141
|
-
|
|
6142
|
-
|
|
6143
|
-
|
|
6144
|
-
|
|
6145
|
-
|
|
6146
|
-
|
|
6147
|
-
|
|
6148
|
-
}
|
|
6149
|
-
|
|
6150
|
-
|
|
6151
|
-
|
|
6152
|
-
|
|
6153
|
-
|
|
6154
|
-
|
|
6155
|
-
}
|
|
6156
|
-
_splitSegmentsIntoSections(segments) {
|
|
6157
|
-
return utils$5.array.splitWhen(segments, (segment) => segment.dynamic && utils$5.pattern.hasGlobStar(segment.pattern));
|
|
6158
|
-
}
|
|
6159
|
-
}
|
|
6173
|
+
Object.defineProperty(matcher, "__esModule", { value: true });
|
|
6174
|
+
const utils$5 = utils$k;
|
|
6175
|
+
class Matcher {
|
|
6176
|
+
constructor(_patterns, _settings, _micromatchOptions) {
|
|
6177
|
+
this._patterns = _patterns;
|
|
6178
|
+
this._settings = _settings;
|
|
6179
|
+
this._micromatchOptions = _micromatchOptions;
|
|
6180
|
+
this._storage = [];
|
|
6181
|
+
this._fillStorage();
|
|
6182
|
+
}
|
|
6183
|
+
_fillStorage() {
|
|
6184
|
+
for (const pattern of this._patterns) {
|
|
6185
|
+
const segments = this._getPatternSegments(pattern);
|
|
6186
|
+
const sections = this._splitSegmentsIntoSections(segments);
|
|
6187
|
+
this._storage.push({
|
|
6188
|
+
complete: sections.length <= 1,
|
|
6189
|
+
pattern,
|
|
6190
|
+
segments,
|
|
6191
|
+
sections
|
|
6192
|
+
});
|
|
6193
|
+
}
|
|
6194
|
+
}
|
|
6195
|
+
_getPatternSegments(pattern) {
|
|
6196
|
+
const parts = utils$5.pattern.getPatternParts(pattern, this._micromatchOptions);
|
|
6197
|
+
return parts.map((part) => {
|
|
6198
|
+
const dynamic = utils$5.pattern.isDynamicPattern(part, this._settings);
|
|
6199
|
+
if (!dynamic) {
|
|
6200
|
+
return {
|
|
6201
|
+
dynamic: false,
|
|
6202
|
+
pattern: part
|
|
6203
|
+
};
|
|
6204
|
+
}
|
|
6205
|
+
return {
|
|
6206
|
+
dynamic: true,
|
|
6207
|
+
pattern: part,
|
|
6208
|
+
patternRe: utils$5.pattern.makeRe(part, this._micromatchOptions)
|
|
6209
|
+
};
|
|
6210
|
+
});
|
|
6211
|
+
}
|
|
6212
|
+
_splitSegmentsIntoSections(segments) {
|
|
6213
|
+
return utils$5.array.splitWhen(segments, (segment) => segment.dynamic && utils$5.pattern.hasGlobStar(segment.pattern));
|
|
6214
|
+
}
|
|
6215
|
+
}
|
|
6160
6216
|
matcher.default = Matcher;
|
|
6161
6217
|
|
|
6162
|
-
Object.defineProperty(partial, "__esModule", { value: true });
|
|
6163
|
-
const matcher_1 = matcher;
|
|
6164
|
-
class PartialMatcher extends matcher_1.default {
|
|
6165
|
-
match(filepath) {
|
|
6166
|
-
const parts = filepath.split('/');
|
|
6167
|
-
const levels = parts.length;
|
|
6168
|
-
const patterns = this._storage.filter((info) => !info.complete || info.segments.length > levels);
|
|
6169
|
-
for (const pattern of patterns) {
|
|
6170
|
-
const section = pattern.sections[0];
|
|
6171
|
-
/**
|
|
6172
|
-
* In this case, the pattern has a globstar and we must read all directories unconditionally,
|
|
6173
|
-
* but only if the level has reached the end of the first group.
|
|
6174
|
-
*
|
|
6175
|
-
* fixtures/{a,b}/**
|
|
6176
|
-
* ^ true/false ^ always true
|
|
6177
|
-
*/
|
|
6178
|
-
if (!pattern.complete && levels > section.length) {
|
|
6179
|
-
return true;
|
|
6180
|
-
}
|
|
6181
|
-
const match = parts.every((part, index) => {
|
|
6182
|
-
const segment = pattern.segments[index];
|
|
6183
|
-
if (segment.dynamic && segment.patternRe.test(part)) {
|
|
6184
|
-
return true;
|
|
6185
|
-
}
|
|
6186
|
-
if (!segment.dynamic && segment.pattern === part) {
|
|
6187
|
-
return true;
|
|
6188
|
-
}
|
|
6189
|
-
return false;
|
|
6190
|
-
});
|
|
6191
|
-
if (match) {
|
|
6192
|
-
return true;
|
|
6193
|
-
}
|
|
6194
|
-
}
|
|
6195
|
-
return false;
|
|
6196
|
-
}
|
|
6197
|
-
}
|
|
6218
|
+
Object.defineProperty(partial, "__esModule", { value: true });
|
|
6219
|
+
const matcher_1 = matcher;
|
|
6220
|
+
class PartialMatcher extends matcher_1.default {
|
|
6221
|
+
match(filepath) {
|
|
6222
|
+
const parts = filepath.split('/');
|
|
6223
|
+
const levels = parts.length;
|
|
6224
|
+
const patterns = this._storage.filter((info) => !info.complete || info.segments.length > levels);
|
|
6225
|
+
for (const pattern of patterns) {
|
|
6226
|
+
const section = pattern.sections[0];
|
|
6227
|
+
/**
|
|
6228
|
+
* In this case, the pattern has a globstar and we must read all directories unconditionally,
|
|
6229
|
+
* but only if the level has reached the end of the first group.
|
|
6230
|
+
*
|
|
6231
|
+
* fixtures/{a,b}/**
|
|
6232
|
+
* ^ true/false ^ always true
|
|
6233
|
+
*/
|
|
6234
|
+
if (!pattern.complete && levels > section.length) {
|
|
6235
|
+
return true;
|
|
6236
|
+
}
|
|
6237
|
+
const match = parts.every((part, index) => {
|
|
6238
|
+
const segment = pattern.segments[index];
|
|
6239
|
+
if (segment.dynamic && segment.patternRe.test(part)) {
|
|
6240
|
+
return true;
|
|
6241
|
+
}
|
|
6242
|
+
if (!segment.dynamic && segment.pattern === part) {
|
|
6243
|
+
return true;
|
|
6244
|
+
}
|
|
6245
|
+
return false;
|
|
6246
|
+
});
|
|
6247
|
+
if (match) {
|
|
6248
|
+
return true;
|
|
6249
|
+
}
|
|
6250
|
+
}
|
|
6251
|
+
return false;
|
|
6252
|
+
}
|
|
6253
|
+
}
|
|
6198
6254
|
partial.default = PartialMatcher;
|
|
6199
6255
|
|
|
6200
|
-
Object.defineProperty(deep, "__esModule", { value: true });
|
|
6201
|
-
const utils$4 = utils$k;
|
|
6202
|
-
const partial_1 = partial;
|
|
6203
|
-
class DeepFilter {
|
|
6204
|
-
constructor(_settings, _micromatchOptions) {
|
|
6205
|
-
this._settings = _settings;
|
|
6206
|
-
this._micromatchOptions = _micromatchOptions;
|
|
6207
|
-
}
|
|
6208
|
-
getFilter(basePath, positive, negative) {
|
|
6209
|
-
const matcher = this._getMatcher(positive);
|
|
6210
|
-
const negativeRe = this._getNegativePatternsRe(negative);
|
|
6211
|
-
return (entry) => this._filter(basePath, entry, matcher, negativeRe);
|
|
6212
|
-
}
|
|
6213
|
-
_getMatcher(patterns) {
|
|
6214
|
-
return new partial_1.default(patterns, this._settings, this._micromatchOptions);
|
|
6215
|
-
}
|
|
6216
|
-
_getNegativePatternsRe(patterns) {
|
|
6217
|
-
const affectDepthOfReadingPatterns = patterns.filter(utils$4.pattern.isAffectDepthOfReadingPattern);
|
|
6218
|
-
return utils$4.pattern.convertPatternsToRe(affectDepthOfReadingPatterns, this._micromatchOptions);
|
|
6219
|
-
}
|
|
6220
|
-
_filter(basePath, entry, matcher, negativeRe) {
|
|
6221
|
-
if (this._isSkippedByDeep(basePath, entry.path)) {
|
|
6222
|
-
return false;
|
|
6223
|
-
}
|
|
6224
|
-
if (this._isSkippedSymbolicLink(entry)) {
|
|
6225
|
-
return false;
|
|
6226
|
-
}
|
|
6227
|
-
const filepath = utils$4.path.removeLeadingDotSegment(entry.path);
|
|
6228
|
-
if (this._isSkippedByPositivePatterns(filepath, matcher)) {
|
|
6229
|
-
return false;
|
|
6230
|
-
}
|
|
6231
|
-
return this._isSkippedByNegativePatterns(filepath, negativeRe);
|
|
6232
|
-
}
|
|
6233
|
-
_isSkippedByDeep(basePath, entryPath) {
|
|
6234
|
-
/**
|
|
6235
|
-
* Avoid unnecessary depth calculations when it doesn't matter.
|
|
6236
|
-
*/
|
|
6237
|
-
if (this._settings.deep === Infinity) {
|
|
6238
|
-
return false;
|
|
6239
|
-
}
|
|
6240
|
-
return this._getEntryLevel(basePath, entryPath) >= this._settings.deep;
|
|
6241
|
-
}
|
|
6242
|
-
_getEntryLevel(basePath, entryPath) {
|
|
6243
|
-
const entryPathDepth = entryPath.split('/').length;
|
|
6244
|
-
if (basePath === '') {
|
|
6245
|
-
return entryPathDepth;
|
|
6246
|
-
}
|
|
6247
|
-
const basePathDepth = basePath.split('/').length;
|
|
6248
|
-
return entryPathDepth - basePathDepth;
|
|
6249
|
-
}
|
|
6250
|
-
_isSkippedSymbolicLink(entry) {
|
|
6251
|
-
return !this._settings.followSymbolicLinks && entry.dirent.isSymbolicLink();
|
|
6252
|
-
}
|
|
6253
|
-
_isSkippedByPositivePatterns(entryPath, matcher) {
|
|
6254
|
-
return !this._settings.baseNameMatch && !matcher.match(entryPath);
|
|
6255
|
-
}
|
|
6256
|
-
_isSkippedByNegativePatterns(entryPath, patternsRe) {
|
|
6257
|
-
return !utils$4.pattern.matchAny(entryPath, patternsRe);
|
|
6258
|
-
}
|
|
6259
|
-
}
|
|
6256
|
+
Object.defineProperty(deep, "__esModule", { value: true });
|
|
6257
|
+
const utils$4 = utils$k;
|
|
6258
|
+
const partial_1 = partial;
|
|
6259
|
+
class DeepFilter {
|
|
6260
|
+
constructor(_settings, _micromatchOptions) {
|
|
6261
|
+
this._settings = _settings;
|
|
6262
|
+
this._micromatchOptions = _micromatchOptions;
|
|
6263
|
+
}
|
|
6264
|
+
getFilter(basePath, positive, negative) {
|
|
6265
|
+
const matcher = this._getMatcher(positive);
|
|
6266
|
+
const negativeRe = this._getNegativePatternsRe(negative);
|
|
6267
|
+
return (entry) => this._filter(basePath, entry, matcher, negativeRe);
|
|
6268
|
+
}
|
|
6269
|
+
_getMatcher(patterns) {
|
|
6270
|
+
return new partial_1.default(patterns, this._settings, this._micromatchOptions);
|
|
6271
|
+
}
|
|
6272
|
+
_getNegativePatternsRe(patterns) {
|
|
6273
|
+
const affectDepthOfReadingPatterns = patterns.filter(utils$4.pattern.isAffectDepthOfReadingPattern);
|
|
6274
|
+
return utils$4.pattern.convertPatternsToRe(affectDepthOfReadingPatterns, this._micromatchOptions);
|
|
6275
|
+
}
|
|
6276
|
+
_filter(basePath, entry, matcher, negativeRe) {
|
|
6277
|
+
if (this._isSkippedByDeep(basePath, entry.path)) {
|
|
6278
|
+
return false;
|
|
6279
|
+
}
|
|
6280
|
+
if (this._isSkippedSymbolicLink(entry)) {
|
|
6281
|
+
return false;
|
|
6282
|
+
}
|
|
6283
|
+
const filepath = utils$4.path.removeLeadingDotSegment(entry.path);
|
|
6284
|
+
if (this._isSkippedByPositivePatterns(filepath, matcher)) {
|
|
6285
|
+
return false;
|
|
6286
|
+
}
|
|
6287
|
+
return this._isSkippedByNegativePatterns(filepath, negativeRe);
|
|
6288
|
+
}
|
|
6289
|
+
_isSkippedByDeep(basePath, entryPath) {
|
|
6290
|
+
/**
|
|
6291
|
+
* Avoid unnecessary depth calculations when it doesn't matter.
|
|
6292
|
+
*/
|
|
6293
|
+
if (this._settings.deep === Infinity) {
|
|
6294
|
+
return false;
|
|
6295
|
+
}
|
|
6296
|
+
return this._getEntryLevel(basePath, entryPath) >= this._settings.deep;
|
|
6297
|
+
}
|
|
6298
|
+
_getEntryLevel(basePath, entryPath) {
|
|
6299
|
+
const entryPathDepth = entryPath.split('/').length;
|
|
6300
|
+
if (basePath === '') {
|
|
6301
|
+
return entryPathDepth;
|
|
6302
|
+
}
|
|
6303
|
+
const basePathDepth = basePath.split('/').length;
|
|
6304
|
+
return entryPathDepth - basePathDepth;
|
|
6305
|
+
}
|
|
6306
|
+
_isSkippedSymbolicLink(entry) {
|
|
6307
|
+
return !this._settings.followSymbolicLinks && entry.dirent.isSymbolicLink();
|
|
6308
|
+
}
|
|
6309
|
+
_isSkippedByPositivePatterns(entryPath, matcher) {
|
|
6310
|
+
return !this._settings.baseNameMatch && !matcher.match(entryPath);
|
|
6311
|
+
}
|
|
6312
|
+
_isSkippedByNegativePatterns(entryPath, patternsRe) {
|
|
6313
|
+
return !utils$4.pattern.matchAny(entryPath, patternsRe);
|
|
6314
|
+
}
|
|
6315
|
+
}
|
|
6260
6316
|
deep.default = DeepFilter;
|
|
6261
6317
|
|
|
6262
6318
|
var entry$1 = {};
|
|
6263
6319
|
|
|
6264
|
-
Object.defineProperty(entry$1, "__esModule", { value: true });
|
|
6265
|
-
const utils$3 = utils$k;
|
|
6266
|
-
class EntryFilter {
|
|
6267
|
-
constructor(_settings, _micromatchOptions) {
|
|
6268
|
-
this._settings = _settings;
|
|
6269
|
-
this._micromatchOptions = _micromatchOptions;
|
|
6270
|
-
this.index = new Map();
|
|
6271
|
-
}
|
|
6272
|
-
getFilter(positive, negative) {
|
|
6273
|
-
const positiveRe = utils$3.pattern.convertPatternsToRe(positive, this._micromatchOptions);
|
|
6274
|
-
const negativeRe = utils$3.pattern.convertPatternsToRe(negative, this._micromatchOptions);
|
|
6275
|
-
return (entry) => this._filter(entry, positiveRe, negativeRe);
|
|
6276
|
-
}
|
|
6277
|
-
_filter(entry, positiveRe, negativeRe) {
|
|
6278
|
-
|
|
6279
|
-
|
|
6280
|
-
|
|
6281
|
-
|
|
6282
|
-
|
|
6283
|
-
|
|
6284
|
-
|
|
6285
|
-
|
|
6286
|
-
|
|
6287
|
-
|
|
6288
|
-
const isDirectory = entry.dirent.isDirectory();
|
|
6289
|
-
const isMatched = this._isMatchToPatterns(filepath, positiveRe, isDirectory) && !this._isMatchToPatterns(
|
|
6290
|
-
if (this._settings.unique && isMatched) {
|
|
6291
|
-
this._createIndexRecord(
|
|
6292
|
-
}
|
|
6293
|
-
return isMatched;
|
|
6294
|
-
}
|
|
6295
|
-
_isDuplicateEntry(
|
|
6296
|
-
return this.index.has(
|
|
6297
|
-
}
|
|
6298
|
-
_createIndexRecord(
|
|
6299
|
-
this.index.set(
|
|
6300
|
-
}
|
|
6301
|
-
_onlyFileFilter(entry) {
|
|
6302
|
-
return this._settings.onlyFiles && !entry.dirent.isFile();
|
|
6303
|
-
}
|
|
6304
|
-
_onlyDirectoryFilter(entry) {
|
|
6305
|
-
return this._settings.onlyDirectories && !entry.dirent.isDirectory();
|
|
6306
|
-
}
|
|
6307
|
-
_isSkippedByAbsoluteNegativePatterns(entryPath, patternsRe) {
|
|
6308
|
-
if (!this._settings.absolute) {
|
|
6309
|
-
return false;
|
|
6310
|
-
}
|
|
6311
|
-
const fullpath = utils$3.path.makeAbsolute(this._settings.cwd, entryPath);
|
|
6312
|
-
return utils$3.pattern.matchAny(fullpath, patternsRe);
|
|
6313
|
-
}
|
|
6314
|
-
_isMatchToPatterns(
|
|
6315
|
-
|
|
6316
|
-
|
|
6317
|
-
|
|
6318
|
-
//
|
|
6319
|
-
|
|
6320
|
-
|
|
6321
|
-
|
|
6322
|
-
|
|
6323
|
-
|
|
6324
|
-
|
|
6325
|
-
}
|
|
6320
|
+
Object.defineProperty(entry$1, "__esModule", { value: true });
|
|
6321
|
+
const utils$3 = utils$k;
|
|
6322
|
+
class EntryFilter {
|
|
6323
|
+
constructor(_settings, _micromatchOptions) {
|
|
6324
|
+
this._settings = _settings;
|
|
6325
|
+
this._micromatchOptions = _micromatchOptions;
|
|
6326
|
+
this.index = new Map();
|
|
6327
|
+
}
|
|
6328
|
+
getFilter(positive, negative) {
|
|
6329
|
+
const positiveRe = utils$3.pattern.convertPatternsToRe(positive, this._micromatchOptions);
|
|
6330
|
+
const negativeRe = utils$3.pattern.convertPatternsToRe(negative, Object.assign(Object.assign({}, this._micromatchOptions), { dot: true }));
|
|
6331
|
+
return (entry) => this._filter(entry, positiveRe, negativeRe);
|
|
6332
|
+
}
|
|
6333
|
+
_filter(entry, positiveRe, negativeRe) {
|
|
6334
|
+
const filepath = utils$3.path.removeLeadingDotSegment(entry.path);
|
|
6335
|
+
if (this._settings.unique && this._isDuplicateEntry(filepath)) {
|
|
6336
|
+
return false;
|
|
6337
|
+
}
|
|
6338
|
+
if (this._onlyFileFilter(entry) || this._onlyDirectoryFilter(entry)) {
|
|
6339
|
+
return false;
|
|
6340
|
+
}
|
|
6341
|
+
if (this._isSkippedByAbsoluteNegativePatterns(filepath, negativeRe)) {
|
|
6342
|
+
return false;
|
|
6343
|
+
}
|
|
6344
|
+
const isDirectory = entry.dirent.isDirectory();
|
|
6345
|
+
const isMatched = this._isMatchToPatterns(filepath, positiveRe, isDirectory) && !this._isMatchToPatterns(filepath, negativeRe, isDirectory);
|
|
6346
|
+
if (this._settings.unique && isMatched) {
|
|
6347
|
+
this._createIndexRecord(filepath);
|
|
6348
|
+
}
|
|
6349
|
+
return isMatched;
|
|
6350
|
+
}
|
|
6351
|
+
_isDuplicateEntry(filepath) {
|
|
6352
|
+
return this.index.has(filepath);
|
|
6353
|
+
}
|
|
6354
|
+
_createIndexRecord(filepath) {
|
|
6355
|
+
this.index.set(filepath, undefined);
|
|
6356
|
+
}
|
|
6357
|
+
_onlyFileFilter(entry) {
|
|
6358
|
+
return this._settings.onlyFiles && !entry.dirent.isFile();
|
|
6359
|
+
}
|
|
6360
|
+
_onlyDirectoryFilter(entry) {
|
|
6361
|
+
return this._settings.onlyDirectories && !entry.dirent.isDirectory();
|
|
6362
|
+
}
|
|
6363
|
+
_isSkippedByAbsoluteNegativePatterns(entryPath, patternsRe) {
|
|
6364
|
+
if (!this._settings.absolute) {
|
|
6365
|
+
return false;
|
|
6366
|
+
}
|
|
6367
|
+
const fullpath = utils$3.path.makeAbsolute(this._settings.cwd, entryPath);
|
|
6368
|
+
return utils$3.pattern.matchAny(fullpath, patternsRe);
|
|
6369
|
+
}
|
|
6370
|
+
_isMatchToPatterns(filepath, patternsRe, isDirectory) {
|
|
6371
|
+
// Trying to match files and directories by patterns.
|
|
6372
|
+
const isMatched = utils$3.pattern.matchAny(filepath, patternsRe);
|
|
6373
|
+
// A pattern with a trailling slash can be used for directory matching.
|
|
6374
|
+
// To apply such pattern, we need to add a tralling slash to the path.
|
|
6375
|
+
if (!isMatched && isDirectory) {
|
|
6376
|
+
return utils$3.pattern.matchAny(filepath + '/', patternsRe);
|
|
6377
|
+
}
|
|
6378
|
+
return isMatched;
|
|
6379
|
+
}
|
|
6380
|
+
}
|
|
6326
6381
|
entry$1.default = EntryFilter;
|
|
6327
6382
|
|
|
6328
6383
|
var error = {};
|
|
6329
6384
|
|
|
6330
|
-
Object.defineProperty(error, "__esModule", { value: true });
|
|
6331
|
-
const utils$2 = utils$k;
|
|
6332
|
-
class ErrorFilter {
|
|
6333
|
-
constructor(_settings) {
|
|
6334
|
-
this._settings = _settings;
|
|
6335
|
-
}
|
|
6336
|
-
getFilter() {
|
|
6337
|
-
return (error) => this._isNonFatalError(error);
|
|
6338
|
-
}
|
|
6339
|
-
_isNonFatalError(error) {
|
|
6340
|
-
return utils$2.errno.isEnoentCodeError(error) || this._settings.suppressErrors;
|
|
6341
|
-
}
|
|
6342
|
-
}
|
|
6385
|
+
Object.defineProperty(error, "__esModule", { value: true });
|
|
6386
|
+
const utils$2 = utils$k;
|
|
6387
|
+
class ErrorFilter {
|
|
6388
|
+
constructor(_settings) {
|
|
6389
|
+
this._settings = _settings;
|
|
6390
|
+
}
|
|
6391
|
+
getFilter() {
|
|
6392
|
+
return (error) => this._isNonFatalError(error);
|
|
6393
|
+
}
|
|
6394
|
+
_isNonFatalError(error) {
|
|
6395
|
+
return utils$2.errno.isEnoentCodeError(error) || this._settings.suppressErrors;
|
|
6396
|
+
}
|
|
6397
|
+
}
|
|
6343
6398
|
error.default = ErrorFilter;
|
|
6344
6399
|
|
|
6345
6400
|
var entry = {};
|
|
6346
6401
|
|
|
6347
|
-
Object.defineProperty(entry, "__esModule", { value: true });
|
|
6348
|
-
const utils$1 = utils$k;
|
|
6349
|
-
class EntryTransformer {
|
|
6350
|
-
constructor(_settings) {
|
|
6351
|
-
this._settings = _settings;
|
|
6352
|
-
}
|
|
6353
|
-
getTransformer() {
|
|
6354
|
-
return (entry) => this._transform(entry);
|
|
6355
|
-
}
|
|
6356
|
-
_transform(entry) {
|
|
6357
|
-
let filepath = entry.path;
|
|
6358
|
-
if (this._settings.absolute) {
|
|
6359
|
-
filepath = utils$1.path.makeAbsolute(this._settings.cwd, filepath);
|
|
6360
|
-
filepath = utils$1.path.unixify(filepath);
|
|
6361
|
-
}
|
|
6362
|
-
if (this._settings.markDirectories && entry.dirent.isDirectory()) {
|
|
6363
|
-
filepath += '/';
|
|
6364
|
-
}
|
|
6365
|
-
if (!this._settings.objectMode) {
|
|
6366
|
-
return filepath;
|
|
6367
|
-
}
|
|
6368
|
-
return Object.assign(Object.assign({}, entry), { path: filepath });
|
|
6369
|
-
}
|
|
6370
|
-
}
|
|
6402
|
+
Object.defineProperty(entry, "__esModule", { value: true });
|
|
6403
|
+
const utils$1 = utils$k;
|
|
6404
|
+
class EntryTransformer {
|
|
6405
|
+
constructor(_settings) {
|
|
6406
|
+
this._settings = _settings;
|
|
6407
|
+
}
|
|
6408
|
+
getTransformer() {
|
|
6409
|
+
return (entry) => this._transform(entry);
|
|
6410
|
+
}
|
|
6411
|
+
_transform(entry) {
|
|
6412
|
+
let filepath = entry.path;
|
|
6413
|
+
if (this._settings.absolute) {
|
|
6414
|
+
filepath = utils$1.path.makeAbsolute(this._settings.cwd, filepath);
|
|
6415
|
+
filepath = utils$1.path.unixify(filepath);
|
|
6416
|
+
}
|
|
6417
|
+
if (this._settings.markDirectories && entry.dirent.isDirectory()) {
|
|
6418
|
+
filepath += '/';
|
|
6419
|
+
}
|
|
6420
|
+
if (!this._settings.objectMode) {
|
|
6421
|
+
return filepath;
|
|
6422
|
+
}
|
|
6423
|
+
return Object.assign(Object.assign({}, entry), { path: filepath });
|
|
6424
|
+
}
|
|
6425
|
+
}
|
|
6371
6426
|
entry.default = EntryTransformer;
|
|
6372
6427
|
|
|
6373
|
-
Object.defineProperty(provider, "__esModule", { value: true });
|
|
6374
|
-
const path$3 = require$$0;
|
|
6375
|
-
const deep_1 = deep;
|
|
6376
|
-
const entry_1 = entry$1;
|
|
6377
|
-
const error_1 = error;
|
|
6378
|
-
const entry_2 = entry;
|
|
6379
|
-
class Provider {
|
|
6380
|
-
constructor(_settings) {
|
|
6381
|
-
this._settings = _settings;
|
|
6382
|
-
this.errorFilter = new error_1.default(this._settings);
|
|
6383
|
-
this.entryFilter = new entry_1.default(this._settings, this._getMicromatchOptions());
|
|
6384
|
-
this.deepFilter = new deep_1.default(this._settings, this._getMicromatchOptions());
|
|
6385
|
-
this.entryTransformer = new entry_2.default(this._settings);
|
|
6386
|
-
}
|
|
6387
|
-
_getRootDirectory(task) {
|
|
6388
|
-
return path$3.resolve(this._settings.cwd, task.base);
|
|
6389
|
-
}
|
|
6390
|
-
_getReaderOptions(task) {
|
|
6391
|
-
const basePath = task.base === '.' ? '' : task.base;
|
|
6392
|
-
return {
|
|
6393
|
-
basePath,
|
|
6394
|
-
pathSegmentSeparator: '/',
|
|
6395
|
-
concurrency: this._settings.concurrency,
|
|
6396
|
-
deepFilter: this.deepFilter.getFilter(basePath, task.positive, task.negative),
|
|
6397
|
-
entryFilter: this.entryFilter.getFilter(task.positive, task.negative),
|
|
6398
|
-
errorFilter: this.errorFilter.getFilter(),
|
|
6399
|
-
followSymbolicLinks: this._settings.followSymbolicLinks,
|
|
6400
|
-
fs: this._settings.fs,
|
|
6401
|
-
stats: this._settings.stats,
|
|
6402
|
-
throwErrorOnBrokenSymbolicLink: this._settings.throwErrorOnBrokenSymbolicLink,
|
|
6403
|
-
transform: this.entryTransformer.getTransformer()
|
|
6404
|
-
};
|
|
6405
|
-
}
|
|
6406
|
-
_getMicromatchOptions() {
|
|
6407
|
-
return {
|
|
6408
|
-
dot: this._settings.dot,
|
|
6409
|
-
matchBase: this._settings.baseNameMatch,
|
|
6410
|
-
nobrace: !this._settings.braceExpansion,
|
|
6411
|
-
nocase: !this._settings.caseSensitiveMatch,
|
|
6412
|
-
noext: !this._settings.extglob,
|
|
6413
|
-
noglobstar: !this._settings.globstar,
|
|
6414
|
-
posix: true,
|
|
6415
|
-
strictSlashes: false
|
|
6416
|
-
};
|
|
6417
|
-
}
|
|
6418
|
-
}
|
|
6428
|
+
Object.defineProperty(provider, "__esModule", { value: true });
|
|
6429
|
+
const path$3 = require$$0$1;
|
|
6430
|
+
const deep_1 = deep;
|
|
6431
|
+
const entry_1 = entry$1;
|
|
6432
|
+
const error_1 = error;
|
|
6433
|
+
const entry_2 = entry;
|
|
6434
|
+
class Provider {
|
|
6435
|
+
constructor(_settings) {
|
|
6436
|
+
this._settings = _settings;
|
|
6437
|
+
this.errorFilter = new error_1.default(this._settings);
|
|
6438
|
+
this.entryFilter = new entry_1.default(this._settings, this._getMicromatchOptions());
|
|
6439
|
+
this.deepFilter = new deep_1.default(this._settings, this._getMicromatchOptions());
|
|
6440
|
+
this.entryTransformer = new entry_2.default(this._settings);
|
|
6441
|
+
}
|
|
6442
|
+
_getRootDirectory(task) {
|
|
6443
|
+
return path$3.resolve(this._settings.cwd, task.base);
|
|
6444
|
+
}
|
|
6445
|
+
_getReaderOptions(task) {
|
|
6446
|
+
const basePath = task.base === '.' ? '' : task.base;
|
|
6447
|
+
return {
|
|
6448
|
+
basePath,
|
|
6449
|
+
pathSegmentSeparator: '/',
|
|
6450
|
+
concurrency: this._settings.concurrency,
|
|
6451
|
+
deepFilter: this.deepFilter.getFilter(basePath, task.positive, task.negative),
|
|
6452
|
+
entryFilter: this.entryFilter.getFilter(task.positive, task.negative),
|
|
6453
|
+
errorFilter: this.errorFilter.getFilter(),
|
|
6454
|
+
followSymbolicLinks: this._settings.followSymbolicLinks,
|
|
6455
|
+
fs: this._settings.fs,
|
|
6456
|
+
stats: this._settings.stats,
|
|
6457
|
+
throwErrorOnBrokenSymbolicLink: this._settings.throwErrorOnBrokenSymbolicLink,
|
|
6458
|
+
transform: this.entryTransformer.getTransformer()
|
|
6459
|
+
};
|
|
6460
|
+
}
|
|
6461
|
+
_getMicromatchOptions() {
|
|
6462
|
+
return {
|
|
6463
|
+
dot: this._settings.dot,
|
|
6464
|
+
matchBase: this._settings.baseNameMatch,
|
|
6465
|
+
nobrace: !this._settings.braceExpansion,
|
|
6466
|
+
nocase: !this._settings.caseSensitiveMatch,
|
|
6467
|
+
noext: !this._settings.extglob,
|
|
6468
|
+
noglobstar: !this._settings.globstar,
|
|
6469
|
+
posix: true,
|
|
6470
|
+
strictSlashes: false
|
|
6471
|
+
};
|
|
6472
|
+
}
|
|
6473
|
+
}
|
|
6419
6474
|
provider.default = Provider;
|
|
6420
6475
|
|
|
6421
|
-
Object.defineProperty(async$7, "__esModule", { value: true });
|
|
6422
|
-
const async_1$1 = async$6;
|
|
6423
|
-
const provider_1$2 = provider;
|
|
6424
|
-
class ProviderAsync extends provider_1$2.default {
|
|
6425
|
-
constructor() {
|
|
6426
|
-
super(...arguments);
|
|
6427
|
-
this._reader = new async_1$1.default(this._settings);
|
|
6428
|
-
}
|
|
6429
|
-
async read(task) {
|
|
6430
|
-
const root = this._getRootDirectory(task);
|
|
6431
|
-
const options = this._getReaderOptions(task);
|
|
6432
|
-
const entries = await this.api(root, task, options);
|
|
6433
|
-
return entries.map((entry) => options.transform(entry));
|
|
6434
|
-
}
|
|
6435
|
-
api(root, task, options) {
|
|
6436
|
-
if (task.dynamic) {
|
|
6437
|
-
return this._reader.dynamic(root, options);
|
|
6438
|
-
}
|
|
6439
|
-
return this._reader.static(task.patterns, options);
|
|
6440
|
-
}
|
|
6441
|
-
}
|
|
6476
|
+
Object.defineProperty(async$7, "__esModule", { value: true });
|
|
6477
|
+
const async_1$1 = async$6;
|
|
6478
|
+
const provider_1$2 = provider;
|
|
6479
|
+
class ProviderAsync extends provider_1$2.default {
|
|
6480
|
+
constructor() {
|
|
6481
|
+
super(...arguments);
|
|
6482
|
+
this._reader = new async_1$1.default(this._settings);
|
|
6483
|
+
}
|
|
6484
|
+
async read(task) {
|
|
6485
|
+
const root = this._getRootDirectory(task);
|
|
6486
|
+
const options = this._getReaderOptions(task);
|
|
6487
|
+
const entries = await this.api(root, task, options);
|
|
6488
|
+
return entries.map((entry) => options.transform(entry));
|
|
6489
|
+
}
|
|
6490
|
+
api(root, task, options) {
|
|
6491
|
+
if (task.dynamic) {
|
|
6492
|
+
return this._reader.dynamic(root, options);
|
|
6493
|
+
}
|
|
6494
|
+
return this._reader.static(task.patterns, options);
|
|
6495
|
+
}
|
|
6496
|
+
}
|
|
6442
6497
|
async$7.default = ProviderAsync;
|
|
6443
6498
|
|
|
6444
6499
|
var stream$1 = {};
|
|
6445
6500
|
|
|
6446
|
-
Object.defineProperty(stream$1, "__esModule", { value: true });
|
|
6447
|
-
const stream_1$1 = require$$0$
|
|
6448
|
-
const stream_2 = stream$2;
|
|
6449
|
-
const provider_1$1 = provider;
|
|
6450
|
-
class ProviderStream extends provider_1$1.default {
|
|
6451
|
-
constructor() {
|
|
6452
|
-
super(...arguments);
|
|
6453
|
-
this._reader = new stream_2.default(this._settings);
|
|
6454
|
-
}
|
|
6455
|
-
read(task) {
|
|
6456
|
-
const root = this._getRootDirectory(task);
|
|
6457
|
-
const options = this._getReaderOptions(task);
|
|
6458
|
-
const source = this.api(root, task, options);
|
|
6459
|
-
const destination = new stream_1$1.Readable({ objectMode: true, read: () => { } });
|
|
6460
|
-
source
|
|
6461
|
-
.once('error', (error) => destination.emit('error', error))
|
|
6462
|
-
.on('data', (entry) => destination.emit('data', options.transform(entry)))
|
|
6463
|
-
.once('end', () => destination.emit('end'));
|
|
6464
|
-
destination
|
|
6465
|
-
.once('close', () => source.destroy());
|
|
6466
|
-
return destination;
|
|
6467
|
-
}
|
|
6468
|
-
api(root, task, options) {
|
|
6469
|
-
if (task.dynamic) {
|
|
6470
|
-
return this._reader.dynamic(root, options);
|
|
6471
|
-
}
|
|
6472
|
-
return this._reader.static(task.patterns, options);
|
|
6473
|
-
}
|
|
6474
|
-
}
|
|
6501
|
+
Object.defineProperty(stream$1, "__esModule", { value: true });
|
|
6502
|
+
const stream_1$1 = require$$0$3;
|
|
6503
|
+
const stream_2 = stream$2;
|
|
6504
|
+
const provider_1$1 = provider;
|
|
6505
|
+
class ProviderStream extends provider_1$1.default {
|
|
6506
|
+
constructor() {
|
|
6507
|
+
super(...arguments);
|
|
6508
|
+
this._reader = new stream_2.default(this._settings);
|
|
6509
|
+
}
|
|
6510
|
+
read(task) {
|
|
6511
|
+
const root = this._getRootDirectory(task);
|
|
6512
|
+
const options = this._getReaderOptions(task);
|
|
6513
|
+
const source = this.api(root, task, options);
|
|
6514
|
+
const destination = new stream_1$1.Readable({ objectMode: true, read: () => { } });
|
|
6515
|
+
source
|
|
6516
|
+
.once('error', (error) => destination.emit('error', error))
|
|
6517
|
+
.on('data', (entry) => destination.emit('data', options.transform(entry)))
|
|
6518
|
+
.once('end', () => destination.emit('end'));
|
|
6519
|
+
destination
|
|
6520
|
+
.once('close', () => source.destroy());
|
|
6521
|
+
return destination;
|
|
6522
|
+
}
|
|
6523
|
+
api(root, task, options) {
|
|
6524
|
+
if (task.dynamic) {
|
|
6525
|
+
return this._reader.dynamic(root, options);
|
|
6526
|
+
}
|
|
6527
|
+
return this._reader.static(task.patterns, options);
|
|
6528
|
+
}
|
|
6529
|
+
}
|
|
6475
6530
|
stream$1.default = ProviderStream;
|
|
6476
6531
|
|
|
6477
6532
|
var sync$2 = {};
|
|
6478
6533
|
|
|
6479
6534
|
var sync$1 = {};
|
|
6480
6535
|
|
|
6481
|
-
Object.defineProperty(sync$1, "__esModule", { value: true });
|
|
6482
|
-
const fsStat = out$1;
|
|
6483
|
-
const fsWalk = out$3;
|
|
6484
|
-
const reader_1 = reader;
|
|
6485
|
-
class ReaderSync extends reader_1.default {
|
|
6486
|
-
constructor() {
|
|
6487
|
-
super(...arguments);
|
|
6488
|
-
this._walkSync = fsWalk.walkSync;
|
|
6489
|
-
this._statSync = fsStat.statSync;
|
|
6490
|
-
}
|
|
6491
|
-
dynamic(root, options) {
|
|
6492
|
-
return this._walkSync(root, options);
|
|
6493
|
-
}
|
|
6494
|
-
static(patterns, options) {
|
|
6495
|
-
const entries = [];
|
|
6496
|
-
for (const pattern of patterns) {
|
|
6497
|
-
const filepath = this._getFullEntryPath(pattern);
|
|
6498
|
-
const entry = this._getEntry(filepath, pattern, options);
|
|
6499
|
-
if (entry === null || !options.entryFilter(entry)) {
|
|
6500
|
-
continue;
|
|
6501
|
-
}
|
|
6502
|
-
entries.push(entry);
|
|
6503
|
-
}
|
|
6504
|
-
return entries;
|
|
6505
|
-
}
|
|
6506
|
-
_getEntry(filepath, pattern, options) {
|
|
6507
|
-
try {
|
|
6508
|
-
const stats = this._getStat(filepath);
|
|
6509
|
-
return this._makeEntry(stats, pattern);
|
|
6510
|
-
}
|
|
6511
|
-
catch (error) {
|
|
6512
|
-
if (options.errorFilter(error)) {
|
|
6513
|
-
return null;
|
|
6514
|
-
}
|
|
6515
|
-
throw error;
|
|
6516
|
-
}
|
|
6517
|
-
}
|
|
6518
|
-
_getStat(filepath) {
|
|
6519
|
-
return this._statSync(filepath, this._fsStatSettings);
|
|
6520
|
-
}
|
|
6521
|
-
}
|
|
6536
|
+
Object.defineProperty(sync$1, "__esModule", { value: true });
|
|
6537
|
+
const fsStat = out$1;
|
|
6538
|
+
const fsWalk = out$3;
|
|
6539
|
+
const reader_1 = reader;
|
|
6540
|
+
class ReaderSync extends reader_1.default {
|
|
6541
|
+
constructor() {
|
|
6542
|
+
super(...arguments);
|
|
6543
|
+
this._walkSync = fsWalk.walkSync;
|
|
6544
|
+
this._statSync = fsStat.statSync;
|
|
6545
|
+
}
|
|
6546
|
+
dynamic(root, options) {
|
|
6547
|
+
return this._walkSync(root, options);
|
|
6548
|
+
}
|
|
6549
|
+
static(patterns, options) {
|
|
6550
|
+
const entries = [];
|
|
6551
|
+
for (const pattern of patterns) {
|
|
6552
|
+
const filepath = this._getFullEntryPath(pattern);
|
|
6553
|
+
const entry = this._getEntry(filepath, pattern, options);
|
|
6554
|
+
if (entry === null || !options.entryFilter(entry)) {
|
|
6555
|
+
continue;
|
|
6556
|
+
}
|
|
6557
|
+
entries.push(entry);
|
|
6558
|
+
}
|
|
6559
|
+
return entries;
|
|
6560
|
+
}
|
|
6561
|
+
_getEntry(filepath, pattern, options) {
|
|
6562
|
+
try {
|
|
6563
|
+
const stats = this._getStat(filepath);
|
|
6564
|
+
return this._makeEntry(stats, pattern);
|
|
6565
|
+
}
|
|
6566
|
+
catch (error) {
|
|
6567
|
+
if (options.errorFilter(error)) {
|
|
6568
|
+
return null;
|
|
6569
|
+
}
|
|
6570
|
+
throw error;
|
|
6571
|
+
}
|
|
6572
|
+
}
|
|
6573
|
+
_getStat(filepath) {
|
|
6574
|
+
return this._statSync(filepath, this._fsStatSettings);
|
|
6575
|
+
}
|
|
6576
|
+
}
|
|
6522
6577
|
sync$1.default = ReaderSync;
|
|
6523
6578
|
|
|
6524
|
-
Object.defineProperty(sync$2, "__esModule", { value: true });
|
|
6525
|
-
const sync_1$1 = sync$1;
|
|
6526
|
-
const provider_1 = provider;
|
|
6527
|
-
class ProviderSync extends provider_1.default {
|
|
6528
|
-
constructor() {
|
|
6529
|
-
super(...arguments);
|
|
6530
|
-
this._reader = new sync_1$1.default(this._settings);
|
|
6531
|
-
}
|
|
6532
|
-
read(task) {
|
|
6533
|
-
const root = this._getRootDirectory(task);
|
|
6534
|
-
const options = this._getReaderOptions(task);
|
|
6535
|
-
const entries = this.api(root, task, options);
|
|
6536
|
-
return entries.map(options.transform);
|
|
6537
|
-
}
|
|
6538
|
-
api(root, task, options) {
|
|
6539
|
-
if (task.dynamic) {
|
|
6540
|
-
return this._reader.dynamic(root, options);
|
|
6541
|
-
}
|
|
6542
|
-
return this._reader.static(task.patterns, options);
|
|
6543
|
-
}
|
|
6544
|
-
}
|
|
6579
|
+
Object.defineProperty(sync$2, "__esModule", { value: true });
|
|
6580
|
+
const sync_1$1 = sync$1;
|
|
6581
|
+
const provider_1 = provider;
|
|
6582
|
+
class ProviderSync extends provider_1.default {
|
|
6583
|
+
constructor() {
|
|
6584
|
+
super(...arguments);
|
|
6585
|
+
this._reader = new sync_1$1.default(this._settings);
|
|
6586
|
+
}
|
|
6587
|
+
read(task) {
|
|
6588
|
+
const root = this._getRootDirectory(task);
|
|
6589
|
+
const options = this._getReaderOptions(task);
|
|
6590
|
+
const entries = this.api(root, task, options);
|
|
6591
|
+
return entries.map(options.transform);
|
|
6592
|
+
}
|
|
6593
|
+
api(root, task, options) {
|
|
6594
|
+
if (task.dynamic) {
|
|
6595
|
+
return this._reader.dynamic(root, options);
|
|
6596
|
+
}
|
|
6597
|
+
return this._reader.static(task.patterns, options);
|
|
6598
|
+
}
|
|
6599
|
+
}
|
|
6545
6600
|
sync$2.default = ProviderSync;
|
|
6546
6601
|
|
|
6547
6602
|
var settings = {};
|
|
6548
6603
|
|
|
6549
6604
|
(function (exports) {
|
|
6550
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6551
|
-
exports.DEFAULT_FILE_SYSTEM_ADAPTER = void 0;
|
|
6552
|
-
const fs = require$$0$
|
|
6553
|
-
const os = require$$
|
|
6554
|
-
/**
|
|
6555
|
-
* The `os.cpus` method can return zero. We expect the number of cores to be greater than zero.
|
|
6556
|
-
* https://github.com/nodejs/node/blob/7faeddf23a98c53896f8b574a6e66589e8fb1eb8/lib/os.js#L106-L107
|
|
6557
|
-
*/
|
|
6558
|
-
const CPU_COUNT = Math.max(os.cpus().length, 1);
|
|
6559
|
-
exports.DEFAULT_FILE_SYSTEM_ADAPTER = {
|
|
6560
|
-
lstat: fs.lstat,
|
|
6561
|
-
lstatSync: fs.lstatSync,
|
|
6562
|
-
stat: fs.stat,
|
|
6563
|
-
statSync: fs.statSync,
|
|
6564
|
-
readdir: fs.readdir,
|
|
6565
|
-
readdirSync: fs.readdirSync
|
|
6566
|
-
};
|
|
6567
|
-
class Settings {
|
|
6568
|
-
constructor(_options = {}) {
|
|
6569
|
-
this._options = _options;
|
|
6570
|
-
this.absolute = this._getValue(this._options.absolute, false);
|
|
6571
|
-
this.baseNameMatch = this._getValue(this._options.baseNameMatch, false);
|
|
6572
|
-
this.braceExpansion = this._getValue(this._options.braceExpansion, true);
|
|
6573
|
-
this.caseSensitiveMatch = this._getValue(this._options.caseSensitiveMatch, true);
|
|
6574
|
-
this.concurrency = this._getValue(this._options.concurrency, CPU_COUNT);
|
|
6575
|
-
this.cwd = this._getValue(this._options.cwd, process.cwd());
|
|
6576
|
-
this.deep = this._getValue(this._options.deep, Infinity);
|
|
6577
|
-
this.dot = this._getValue(this._options.dot, false);
|
|
6578
|
-
this.extglob = this._getValue(this._options.extglob, true);
|
|
6579
|
-
this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, true);
|
|
6580
|
-
this.fs = this._getFileSystemMethods(this._options.fs);
|
|
6581
|
-
this.globstar = this._getValue(this._options.globstar, true);
|
|
6582
|
-
this.ignore = this._getValue(this._options.ignore, []);
|
|
6583
|
-
this.markDirectories = this._getValue(this._options.markDirectories, false);
|
|
6584
|
-
this.objectMode = this._getValue(this._options.objectMode, false);
|
|
6585
|
-
this.onlyDirectories = this._getValue(this._options.onlyDirectories, false);
|
|
6586
|
-
this.onlyFiles = this._getValue(this._options.onlyFiles, true);
|
|
6587
|
-
this.stats = this._getValue(this._options.stats, false);
|
|
6588
|
-
this.suppressErrors = this._getValue(this._options.suppressErrors, false);
|
|
6589
|
-
this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, false);
|
|
6590
|
-
this.unique = this._getValue(this._options.unique, true);
|
|
6591
|
-
if (this.onlyDirectories) {
|
|
6592
|
-
this.onlyFiles = false;
|
|
6593
|
-
}
|
|
6594
|
-
if (this.stats) {
|
|
6595
|
-
this.objectMode = true;
|
|
6596
|
-
}
|
|
6597
|
-
}
|
|
6598
|
-
_getValue(option, value) {
|
|
6599
|
-
return option === undefined ? value : option;
|
|
6600
|
-
}
|
|
6601
|
-
_getFileSystemMethods(methods = {}) {
|
|
6602
|
-
return Object.assign(Object.assign({}, exports.DEFAULT_FILE_SYSTEM_ADAPTER), methods);
|
|
6603
|
-
}
|
|
6604
|
-
}
|
|
6605
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6606
|
+
exports.DEFAULT_FILE_SYSTEM_ADAPTER = void 0;
|
|
6607
|
+
const fs = require$$0$4;
|
|
6608
|
+
const os = require$$0;
|
|
6609
|
+
/**
|
|
6610
|
+
* The `os.cpus` method can return zero. We expect the number of cores to be greater than zero.
|
|
6611
|
+
* https://github.com/nodejs/node/blob/7faeddf23a98c53896f8b574a6e66589e8fb1eb8/lib/os.js#L106-L107
|
|
6612
|
+
*/
|
|
6613
|
+
const CPU_COUNT = Math.max(os.cpus().length, 1);
|
|
6614
|
+
exports.DEFAULT_FILE_SYSTEM_ADAPTER = {
|
|
6615
|
+
lstat: fs.lstat,
|
|
6616
|
+
lstatSync: fs.lstatSync,
|
|
6617
|
+
stat: fs.stat,
|
|
6618
|
+
statSync: fs.statSync,
|
|
6619
|
+
readdir: fs.readdir,
|
|
6620
|
+
readdirSync: fs.readdirSync
|
|
6621
|
+
};
|
|
6622
|
+
class Settings {
|
|
6623
|
+
constructor(_options = {}) {
|
|
6624
|
+
this._options = _options;
|
|
6625
|
+
this.absolute = this._getValue(this._options.absolute, false);
|
|
6626
|
+
this.baseNameMatch = this._getValue(this._options.baseNameMatch, false);
|
|
6627
|
+
this.braceExpansion = this._getValue(this._options.braceExpansion, true);
|
|
6628
|
+
this.caseSensitiveMatch = this._getValue(this._options.caseSensitiveMatch, true);
|
|
6629
|
+
this.concurrency = this._getValue(this._options.concurrency, CPU_COUNT);
|
|
6630
|
+
this.cwd = this._getValue(this._options.cwd, process.cwd());
|
|
6631
|
+
this.deep = this._getValue(this._options.deep, Infinity);
|
|
6632
|
+
this.dot = this._getValue(this._options.dot, false);
|
|
6633
|
+
this.extglob = this._getValue(this._options.extglob, true);
|
|
6634
|
+
this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, true);
|
|
6635
|
+
this.fs = this._getFileSystemMethods(this._options.fs);
|
|
6636
|
+
this.globstar = this._getValue(this._options.globstar, true);
|
|
6637
|
+
this.ignore = this._getValue(this._options.ignore, []);
|
|
6638
|
+
this.markDirectories = this._getValue(this._options.markDirectories, false);
|
|
6639
|
+
this.objectMode = this._getValue(this._options.objectMode, false);
|
|
6640
|
+
this.onlyDirectories = this._getValue(this._options.onlyDirectories, false);
|
|
6641
|
+
this.onlyFiles = this._getValue(this._options.onlyFiles, true);
|
|
6642
|
+
this.stats = this._getValue(this._options.stats, false);
|
|
6643
|
+
this.suppressErrors = this._getValue(this._options.suppressErrors, false);
|
|
6644
|
+
this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, false);
|
|
6645
|
+
this.unique = this._getValue(this._options.unique, true);
|
|
6646
|
+
if (this.onlyDirectories) {
|
|
6647
|
+
this.onlyFiles = false;
|
|
6648
|
+
}
|
|
6649
|
+
if (this.stats) {
|
|
6650
|
+
this.objectMode = true;
|
|
6651
|
+
}
|
|
6652
|
+
}
|
|
6653
|
+
_getValue(option, value) {
|
|
6654
|
+
return option === undefined ? value : option;
|
|
6655
|
+
}
|
|
6656
|
+
_getFileSystemMethods(methods = {}) {
|
|
6657
|
+
return Object.assign(Object.assign({}, exports.DEFAULT_FILE_SYSTEM_ADAPTER), methods);
|
|
6658
|
+
}
|
|
6659
|
+
}
|
|
6605
6660
|
exports.default = Settings;
|
|
6606
6661
|
} (settings));
|
|
6607
6662
|
|
|
6608
|
-
const taskManager = tasks;
|
|
6609
|
-
const
|
|
6610
|
-
const
|
|
6611
|
-
const
|
|
6612
|
-
const
|
|
6613
|
-
const
|
|
6614
|
-
|
|
6615
|
-
|
|
6616
|
-
|
|
6617
|
-
const
|
|
6618
|
-
|
|
6619
|
-
|
|
6620
|
-
|
|
6621
|
-
//
|
|
6622
|
-
|
|
6623
|
-
|
|
6624
|
-
|
|
6625
|
-
|
|
6626
|
-
|
|
6627
|
-
|
|
6628
|
-
|
|
6629
|
-
|
|
6630
|
-
|
|
6631
|
-
|
|
6632
|
-
|
|
6633
|
-
|
|
6634
|
-
|
|
6635
|
-
|
|
6636
|
-
|
|
6637
|
-
|
|
6638
|
-
|
|
6639
|
-
|
|
6640
|
-
|
|
6641
|
-
|
|
6642
|
-
|
|
6643
|
-
|
|
6644
|
-
|
|
6645
|
-
|
|
6646
|
-
|
|
6647
|
-
|
|
6648
|
-
|
|
6649
|
-
|
|
6650
|
-
|
|
6651
|
-
|
|
6652
|
-
|
|
6653
|
-
|
|
6654
|
-
|
|
6655
|
-
|
|
6656
|
-
|
|
6657
|
-
|
|
6658
|
-
|
|
6659
|
-
|
|
6660
|
-
|
|
6661
|
-
|
|
6662
|
-
|
|
6663
|
-
|
|
6664
|
-
|
|
6665
|
-
|
|
6666
|
-
|
|
6667
|
-
function
|
|
6668
|
-
|
|
6669
|
-
|
|
6670
|
-
|
|
6671
|
-
|
|
6672
|
-
|
|
6673
|
-
|
|
6663
|
+
const taskManager = tasks;
|
|
6664
|
+
const async_1 = async$7;
|
|
6665
|
+
const stream_1 = stream$1;
|
|
6666
|
+
const sync_1 = sync$2;
|
|
6667
|
+
const settings_1 = settings;
|
|
6668
|
+
const utils = utils$k;
|
|
6669
|
+
async function FastGlob(source, options) {
|
|
6670
|
+
assertPatternsInput(source);
|
|
6671
|
+
const works = getWorks(source, async_1.default, options);
|
|
6672
|
+
const result = await Promise.all(works);
|
|
6673
|
+
return utils.array.flatten(result);
|
|
6674
|
+
}
|
|
6675
|
+
// https://github.com/typescript-eslint/typescript-eslint/issues/60
|
|
6676
|
+
// eslint-disable-next-line no-redeclare
|
|
6677
|
+
(function (FastGlob) {
|
|
6678
|
+
FastGlob.glob = FastGlob;
|
|
6679
|
+
FastGlob.globSync = sync;
|
|
6680
|
+
FastGlob.globStream = stream;
|
|
6681
|
+
FastGlob.async = FastGlob;
|
|
6682
|
+
function sync(source, options) {
|
|
6683
|
+
assertPatternsInput(source);
|
|
6684
|
+
const works = getWorks(source, sync_1.default, options);
|
|
6685
|
+
return utils.array.flatten(works);
|
|
6686
|
+
}
|
|
6687
|
+
FastGlob.sync = sync;
|
|
6688
|
+
function stream(source, options) {
|
|
6689
|
+
assertPatternsInput(source);
|
|
6690
|
+
const works = getWorks(source, stream_1.default, options);
|
|
6691
|
+
/**
|
|
6692
|
+
* The stream returned by the provider cannot work with an asynchronous iterator.
|
|
6693
|
+
* To support asynchronous iterators, regardless of the number of tasks, we always multiplex streams.
|
|
6694
|
+
* This affects performance (+25%). I don't see best solution right now.
|
|
6695
|
+
*/
|
|
6696
|
+
return utils.stream.merge(works);
|
|
6697
|
+
}
|
|
6698
|
+
FastGlob.stream = stream;
|
|
6699
|
+
function generateTasks(source, options) {
|
|
6700
|
+
assertPatternsInput(source);
|
|
6701
|
+
const patterns = [].concat(source);
|
|
6702
|
+
const settings = new settings_1.default(options);
|
|
6703
|
+
return taskManager.generate(patterns, settings);
|
|
6704
|
+
}
|
|
6705
|
+
FastGlob.generateTasks = generateTasks;
|
|
6706
|
+
function isDynamicPattern(source, options) {
|
|
6707
|
+
assertPatternsInput(source);
|
|
6708
|
+
const settings = new settings_1.default(options);
|
|
6709
|
+
return utils.pattern.isDynamicPattern(source, settings);
|
|
6710
|
+
}
|
|
6711
|
+
FastGlob.isDynamicPattern = isDynamicPattern;
|
|
6712
|
+
function escapePath(source) {
|
|
6713
|
+
assertPatternsInput(source);
|
|
6714
|
+
return utils.path.escape(source);
|
|
6715
|
+
}
|
|
6716
|
+
FastGlob.escapePath = escapePath;
|
|
6717
|
+
function convertPathToPattern(source) {
|
|
6718
|
+
assertPatternsInput(source);
|
|
6719
|
+
return utils.path.convertPathToPattern(source);
|
|
6720
|
+
}
|
|
6721
|
+
FastGlob.convertPathToPattern = convertPathToPattern;
|
|
6722
|
+
(function (posix) {
|
|
6723
|
+
function escapePath(source) {
|
|
6724
|
+
assertPatternsInput(source);
|
|
6725
|
+
return utils.path.escapePosixPath(source);
|
|
6726
|
+
}
|
|
6727
|
+
posix.escapePath = escapePath;
|
|
6728
|
+
function convertPathToPattern(source) {
|
|
6729
|
+
assertPatternsInput(source);
|
|
6730
|
+
return utils.path.convertPosixPathToPattern(source);
|
|
6731
|
+
}
|
|
6732
|
+
posix.convertPathToPattern = convertPathToPattern;
|
|
6733
|
+
})(FastGlob.posix || (FastGlob.posix = {}));
|
|
6734
|
+
(function (win32) {
|
|
6735
|
+
function escapePath(source) {
|
|
6736
|
+
assertPatternsInput(source);
|
|
6737
|
+
return utils.path.escapeWindowsPath(source);
|
|
6738
|
+
}
|
|
6739
|
+
win32.escapePath = escapePath;
|
|
6740
|
+
function convertPathToPattern(source) {
|
|
6741
|
+
assertPatternsInput(source);
|
|
6742
|
+
return utils.path.convertWindowsPathToPattern(source);
|
|
6743
|
+
}
|
|
6744
|
+
win32.convertPathToPattern = convertPathToPattern;
|
|
6745
|
+
})(FastGlob.win32 || (FastGlob.win32 = {}));
|
|
6746
|
+
})(FastGlob || (FastGlob = {}));
|
|
6747
|
+
function getWorks(source, _Provider, options) {
|
|
6748
|
+
const patterns = [].concat(source);
|
|
6749
|
+
const settings = new settings_1.default(options);
|
|
6750
|
+
const tasks = taskManager.generate(patterns, settings);
|
|
6751
|
+
const provider = new _Provider(settings);
|
|
6752
|
+
return tasks.map(provider.read, provider);
|
|
6753
|
+
}
|
|
6754
|
+
function assertPatternsInput(input) {
|
|
6755
|
+
const source = [].concat(input);
|
|
6756
|
+
const isValidSource = source.every((item) => utils.string.isString(item) && !utils.string.isEmpty(item));
|
|
6757
|
+
if (!isValidSource) {
|
|
6758
|
+
throw new TypeError('Patterns must be a string (non empty) or an array of strings');
|
|
6759
|
+
}
|
|
6760
|
+
}
|
|
6674
6761
|
var out = FastGlob;
|
|
6675
6762
|
|
|
6676
6763
|
const fg = /*@__PURE__*/getDefaultExportFromCjs$1(out);
|
|
@@ -7555,18 +7642,14 @@ async function getTextAssetContent(filepath, limit = 300) {
|
|
|
7555
7642
|
async function getPackages(root) {
|
|
7556
7643
|
const pkgPath = resolve(root, "package.json");
|
|
7557
7644
|
const data = JSON.parse(await promises.readFile(pkgPath, "utf-8").catch(() => "{}"));
|
|
7558
|
-
const categorizedPackages = {};
|
|
7559
7645
|
const packages = {};
|
|
7560
7646
|
for (const type of ["dependencies", "devDependencies", "optionalDependencies", "peerDependencies"]) {
|
|
7561
|
-
|
|
7647
|
+
const dep = data[type];
|
|
7648
|
+
if (!dep)
|
|
7562
7649
|
continue;
|
|
7563
|
-
|
|
7564
|
-
|
|
7565
|
-
|
|
7566
|
-
for (const name in categorizedPackages[type]) {
|
|
7567
|
-
const version = categorizedPackages[type][name];
|
|
7568
|
-
packages[name] = {
|
|
7569
|
-
version,
|
|
7650
|
+
for (const depName in dep) {
|
|
7651
|
+
packages[depName] = {
|
|
7652
|
+
version: dep[depName],
|
|
7570
7653
|
type
|
|
7571
7654
|
};
|
|
7572
7655
|
}
|
|
@@ -7576,12 +7659,14 @@ async function getPackages(root) {
|
|
|
7576
7659
|
};
|
|
7577
7660
|
}
|
|
7578
7661
|
|
|
7579
|
-
|
|
7580
|
-
|
|
7581
|
-
|
|
7582
|
-
|
|
7583
|
-
|
|
7584
|
-
}
|
|
7662
|
+
function npmRun(agent) {
|
|
7663
|
+
return (args) => {
|
|
7664
|
+
if (args.length > 1)
|
|
7665
|
+
return `${agent} run ${args[0]} -- ${args.slice(1).join(" ")}`;
|
|
7666
|
+
else
|
|
7667
|
+
return `${agent} run ${args[0]}`;
|
|
7668
|
+
};
|
|
7669
|
+
}
|
|
7585
7670
|
const yarn = {
|
|
7586
7671
|
"agent": "yarn {0}",
|
|
7587
7672
|
"run": "yarn run {0}",
|
|
@@ -7676,10 +7761,6 @@ function getDefaultExportFromCjs (x) {
|
|
|
7676
7761
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
7677
7762
|
}
|
|
7678
7763
|
|
|
7679
|
-
/* istanbul ignore next */
|
|
7680
|
-
typeof process !== 'undefined' &&
|
|
7681
|
-
process.platform === 'win32' ? '\r\n' : '\n';
|
|
7682
|
-
|
|
7683
7764
|
/*
|
|
7684
7765
|
How it works:
|
|
7685
7766
|
`this.#head` is an instance of `Node` which keeps track of its current value and nests another instance of `Node` that keeps the value that comes after it. When a value is provided to `.enqueue()`, the code needs to iterate through `this.#head`, going deeper and deeper to find the last value. However, iterating through every single item is slow. This problem is solved by saving a reference to the last value as `this.#tail` so that it can reference it to add a new value.
|
|
@@ -7961,11 +8042,7 @@ process.env.NI_CONFIG_FILE;
|
|
|
7961
8042
|
const home = process.platform === "win32" ? process.env.USERPROFILE : process.env.HOME;
|
|
7962
8043
|
path$3$1.join(home || "~/", ".nirc");
|
|
7963
8044
|
|
|
7964
|
-
var
|
|
7965
|
-
var crossSpawn = {
|
|
7966
|
-
get exports(){ return crossSpawnExports; },
|
|
7967
|
-
set exports(v){ crossSpawnExports = v; },
|
|
7968
|
-
};
|
|
8045
|
+
var crossSpawn$1 = {exports: {}};
|
|
7969
8046
|
|
|
7970
8047
|
var windows;
|
|
7971
8048
|
var hasRequiredWindows;
|
|
@@ -7976,7 +8053,7 @@ function requireWindows () {
|
|
|
7976
8053
|
windows = isexe;
|
|
7977
8054
|
isexe.sync = sync;
|
|
7978
8055
|
|
|
7979
|
-
var fs = require$$0$
|
|
8056
|
+
var fs = require$$0$4;
|
|
7980
8057
|
|
|
7981
8058
|
function checkPathExt (path, options) {
|
|
7982
8059
|
var pathext = options.pathExt !== undefined ?
|
|
@@ -8027,7 +8104,7 @@ function requireMode () {
|
|
|
8027
8104
|
mode = isexe;
|
|
8028
8105
|
isexe.sync = sync;
|
|
8029
8106
|
|
|
8030
|
-
var fs = require$$0$
|
|
8107
|
+
var fs = require$$0$4;
|
|
8031
8108
|
|
|
8032
8109
|
function isexe (path, options, cb) {
|
|
8033
8110
|
fs.stat(path, function (er, stat) {
|
|
@@ -8129,7 +8206,7 @@ const isWindows$1 = process.platform === 'win32' ||
|
|
|
8129
8206
|
process.env.OSTYPE === 'cygwin' ||
|
|
8130
8207
|
process.env.OSTYPE === 'msys';
|
|
8131
8208
|
|
|
8132
|
-
const path$2 = require$$0;
|
|
8209
|
+
const path$2 = require$$0$1;
|
|
8133
8210
|
const COLON = isWindows$1 ? ';' : ':';
|
|
8134
8211
|
const isexe$1 = isexe_1;
|
|
8135
8212
|
|
|
@@ -8167,7 +8244,7 @@ const getPathInfo$1 = (cmd, opt) => {
|
|
|
8167
8244
|
}
|
|
8168
8245
|
};
|
|
8169
8246
|
|
|
8170
|
-
const which$
|
|
8247
|
+
const which$3 = (cmd, opt, cb) => {
|
|
8171
8248
|
if (typeof opt === 'function') {
|
|
8172
8249
|
cb = opt;
|
|
8173
8250
|
opt = {};
|
|
@@ -8248,14 +8325,10 @@ const whichSync$1 = (cmd, opt) => {
|
|
|
8248
8325
|
throw getNotFoundError$1(cmd)
|
|
8249
8326
|
};
|
|
8250
8327
|
|
|
8251
|
-
var which_1 = which$
|
|
8252
|
-
which$
|
|
8328
|
+
var which_1 = which$3;
|
|
8329
|
+
which$3.sync = whichSync$1;
|
|
8253
8330
|
|
|
8254
|
-
var
|
|
8255
|
-
var pathKey$2 = {
|
|
8256
|
-
get exports(){ return pathKeyExports; },
|
|
8257
|
-
set exports(v){ pathKeyExports = v; },
|
|
8258
|
-
};
|
|
8331
|
+
var pathKey$2 = {exports: {}};
|
|
8259
8332
|
|
|
8260
8333
|
const pathKey$1 = (options = {}) => {
|
|
8261
8334
|
const environment = options.env || process.env;
|
|
@@ -8270,10 +8343,12 @@ const pathKey$1 = (options = {}) => {
|
|
|
8270
8343
|
|
|
8271
8344
|
pathKey$2.exports = pathKey$1;
|
|
8272
8345
|
// TODO: Remove this for the next major release
|
|
8273
|
-
|
|
8346
|
+
pathKey$2.exports.default = pathKey$1;
|
|
8347
|
+
|
|
8348
|
+
var pathKeyExports = pathKey$2.exports;
|
|
8274
8349
|
|
|
8275
|
-
const path$1 = require$$0;
|
|
8276
|
-
const which$
|
|
8350
|
+
const path$1 = require$$0$1;
|
|
8351
|
+
const which$2 = which_1;
|
|
8277
8352
|
const getPathKey = pathKeyExports;
|
|
8278
8353
|
|
|
8279
8354
|
function resolveCommandAttempt(parsed, withoutPathExt) {
|
|
@@ -8296,7 +8371,7 @@ function resolveCommandAttempt(parsed, withoutPathExt) {
|
|
|
8296
8371
|
let resolved;
|
|
8297
8372
|
|
|
8298
8373
|
try {
|
|
8299
|
-
resolved = which$
|
|
8374
|
+
resolved = which$2.sync(parsed.command, {
|
|
8300
8375
|
path: env[getPathKey({ env })],
|
|
8301
8376
|
pathExt: withoutPathExt ? path$1.delimiter : undefined,
|
|
8302
8377
|
});
|
|
@@ -8390,7 +8465,7 @@ var shebangCommand$1 = (string = '') => {
|
|
|
8390
8465
|
return argument ? `${binary} ${argument}` : binary;
|
|
8391
8466
|
};
|
|
8392
8467
|
|
|
8393
|
-
const fs = require$$0$
|
|
8468
|
+
const fs = require$$0$4;
|
|
8394
8469
|
const shebangCommand = shebangCommand$1;
|
|
8395
8470
|
|
|
8396
8471
|
function readShebang$1(command) {
|
|
@@ -8412,7 +8487,7 @@ function readShebang$1(command) {
|
|
|
8412
8487
|
|
|
8413
8488
|
var readShebang_1 = readShebang$1;
|
|
8414
8489
|
|
|
8415
|
-
const path = require$$0;
|
|
8490
|
+
const path = require$$0$1;
|
|
8416
8491
|
const resolveCommand = resolveCommand_1;
|
|
8417
8492
|
const escape = _escape;
|
|
8418
8493
|
const readShebang = readShebang_1;
|
|
@@ -8591,12 +8666,15 @@ function spawnSync(command, args, options) {
|
|
|
8591
8666
|
return result;
|
|
8592
8667
|
}
|
|
8593
8668
|
|
|
8594
|
-
crossSpawn.exports = spawn;
|
|
8595
|
-
|
|
8596
|
-
|
|
8669
|
+
crossSpawn$1.exports = spawn;
|
|
8670
|
+
crossSpawn$1.exports.spawn = spawn;
|
|
8671
|
+
crossSpawn$1.exports.sync = spawnSync;
|
|
8597
8672
|
|
|
8598
|
-
|
|
8599
|
-
|
|
8673
|
+
crossSpawn$1.exports._parse = parse;
|
|
8674
|
+
crossSpawn$1.exports._enoent = enoent;
|
|
8675
|
+
|
|
8676
|
+
var crossSpawnExports = crossSpawn$1.exports;
|
|
8677
|
+
const crossSpawn = /*@__PURE__*/getDefaultExportFromCjs(crossSpawnExports);
|
|
8600
8678
|
|
|
8601
8679
|
function stripFinalNewline(input) {
|
|
8602
8680
|
const LF = typeof input === 'string' ? '\n' : '\n'.charCodeAt();
|
|
@@ -9265,22 +9343,14 @@ const normalizeStdio = options => {
|
|
|
9265
9343
|
return Array.from({length}, (value, index) => stdio[index]);
|
|
9266
9344
|
};
|
|
9267
9345
|
|
|
9268
|
-
var
|
|
9269
|
-
var signalExit = {
|
|
9270
|
-
get exports(){ return signalExitExports; },
|
|
9271
|
-
set exports(v){ signalExitExports = v; },
|
|
9272
|
-
};
|
|
9346
|
+
var signalExit = {exports: {}};
|
|
9273
9347
|
|
|
9274
|
-
var
|
|
9275
|
-
var signals$1 = {
|
|
9276
|
-
get exports(){ return signalsExports; },
|
|
9277
|
-
set exports(v){ signalsExports = v; },
|
|
9278
|
-
};
|
|
9348
|
+
var signals$1 = {exports: {}};
|
|
9279
9349
|
|
|
9280
9350
|
var hasRequiredSignals;
|
|
9281
9351
|
|
|
9282
9352
|
function requireSignals () {
|
|
9283
|
-
if (hasRequiredSignals) return
|
|
9353
|
+
if (hasRequiredSignals) return signals$1.exports;
|
|
9284
9354
|
hasRequiredSignals = 1;
|
|
9285
9355
|
(function (module) {
|
|
9286
9356
|
// This is not the set of all possible signals.
|
|
@@ -9335,9 +9405,9 @@ function requireSignals () {
|
|
|
9335
9405
|
'SIGSTKFLT',
|
|
9336
9406
|
'SIGUNUSED'
|
|
9337
9407
|
);
|
|
9338
|
-
}
|
|
9339
|
-
} (signals$1));
|
|
9340
|
-
return
|
|
9408
|
+
}
|
|
9409
|
+
} (signals$1));
|
|
9410
|
+
return signals$1.exports;
|
|
9341
9411
|
}
|
|
9342
9412
|
|
|
9343
9413
|
// Note: since nyc uses this module to output coverage, any lines
|
|
@@ -9369,7 +9439,7 @@ if (!processOk(process$1)) {
|
|
|
9369
9439
|
var signals = requireSignals();
|
|
9370
9440
|
var isWin = /^win/i.test(process$1.platform);
|
|
9371
9441
|
|
|
9372
|
-
var EE = require$$2
|
|
9442
|
+
var EE = require$$2;
|
|
9373
9443
|
/* istanbul ignore if */
|
|
9374
9444
|
if (typeof EE !== 'function') {
|
|
9375
9445
|
EE = EE.EventEmitter;
|
|
@@ -9436,7 +9506,7 @@ if (!processOk(process$1)) {
|
|
|
9436
9506
|
process$1.reallyExit = originalProcessReallyExit;
|
|
9437
9507
|
emitter.count -= 1;
|
|
9438
9508
|
};
|
|
9439
|
-
|
|
9509
|
+
signalExit.exports.unload = unload;
|
|
9440
9510
|
|
|
9441
9511
|
var emit = function emit (event, code, signal) {
|
|
9442
9512
|
/* istanbul ignore if */
|
|
@@ -9477,7 +9547,7 @@ if (!processOk(process$1)) {
|
|
|
9477
9547
|
};
|
|
9478
9548
|
});
|
|
9479
9549
|
|
|
9480
|
-
|
|
9550
|
+
signalExit.exports.signals = function () {
|
|
9481
9551
|
return signals
|
|
9482
9552
|
};
|
|
9483
9553
|
|
|
@@ -9507,7 +9577,7 @@ if (!processOk(process$1)) {
|
|
|
9507
9577
|
process$1.emit = processEmit;
|
|
9508
9578
|
process$1.reallyExit = processReallyExit;
|
|
9509
9579
|
};
|
|
9510
|
-
|
|
9580
|
+
signalExit.exports.load = load;
|
|
9511
9581
|
|
|
9512
9582
|
var originalProcessReallyExit = process$1.reallyExit;
|
|
9513
9583
|
var processReallyExit = function processReallyExit (code) {
|
|
@@ -9543,6 +9613,9 @@ if (!processOk(process$1)) {
|
|
|
9543
9613
|
};
|
|
9544
9614
|
}
|
|
9545
9615
|
|
|
9616
|
+
var signalExitExports = signalExit.exports;
|
|
9617
|
+
const onExit = /*@__PURE__*/getDefaultExportFromCjs(signalExitExports);
|
|
9618
|
+
|
|
9546
9619
|
const DEFAULT_FORCE_KILL_TIMEOUT = 1000 * 5;
|
|
9547
9620
|
|
|
9548
9621
|
// Monkey-patches `childProcess.kill()` to add `forceKillAfterTimeout` behavior
|
|
@@ -9573,7 +9646,7 @@ const setKillTimeout = (kill, signal, options, killResult) => {
|
|
|
9573
9646
|
|
|
9574
9647
|
const shouldForceKill = (signal, {forceKillAfterTimeout}, killResult) => isSigterm(signal) && forceKillAfterTimeout !== false && killResult;
|
|
9575
9648
|
|
|
9576
|
-
const isSigterm = signal => signal === os$1.constants.signals.SIGTERM
|
|
9649
|
+
const isSigterm = signal => signal === os$1$1.constants.signals.SIGTERM
|
|
9577
9650
|
|| (typeof signal === 'string' && signal.toUpperCase() === 'SIGTERM');
|
|
9578
9651
|
|
|
9579
9652
|
const getForceKillAfterTimeout = ({forceKillAfterTimeout = true}) => {
|
|
@@ -9634,7 +9707,7 @@ const setExitHandler = async (spawned, {cleanup, detached}, timedPromise) => {
|
|
|
9634
9707
|
return timedPromise;
|
|
9635
9708
|
}
|
|
9636
9709
|
|
|
9637
|
-
const removeExitHandler =
|
|
9710
|
+
const removeExitHandler = onExit(() => {
|
|
9638
9711
|
spawned.kill();
|
|
9639
9712
|
});
|
|
9640
9713
|
|
|
@@ -9695,13 +9768,9 @@ const addPipeMethods = spawned => {
|
|
|
9695
9768
|
}
|
|
9696
9769
|
};
|
|
9697
9770
|
|
|
9698
|
-
var
|
|
9699
|
-
var getStream$1 = {
|
|
9700
|
-
get exports(){ return getStreamExports; },
|
|
9701
|
-
set exports(v){ getStreamExports = v; },
|
|
9702
|
-
};
|
|
9771
|
+
var getStream$2 = {exports: {}};
|
|
9703
9772
|
|
|
9704
|
-
const {PassThrough: PassThroughStream} = require$$0$
|
|
9773
|
+
const {PassThrough: PassThroughStream} = require$$0$3;
|
|
9705
9774
|
|
|
9706
9775
|
var bufferStream$1 = options => {
|
|
9707
9776
|
options = {...options};
|
|
@@ -9754,8 +9823,8 @@ var bufferStream$1 = options => {
|
|
|
9754
9823
|
};
|
|
9755
9824
|
|
|
9756
9825
|
const {constants: BufferConstants} = require$$0$5;
|
|
9757
|
-
const stream = require$$0$
|
|
9758
|
-
const {promisify} = require$$0$
|
|
9826
|
+
const stream = require$$0$3;
|
|
9827
|
+
const {promisify} = require$$0$2;
|
|
9759
9828
|
const bufferStream = bufferStream$1;
|
|
9760
9829
|
|
|
9761
9830
|
const streamPipelinePromisified = promisify(stream.pipeline);
|
|
@@ -9809,12 +9878,15 @@ async function getStream(inputStream, options) {
|
|
|
9809
9878
|
return stream.getBufferedValue();
|
|
9810
9879
|
}
|
|
9811
9880
|
|
|
9812
|
-
getStream$
|
|
9813
|
-
|
|
9814
|
-
|
|
9815
|
-
|
|
9881
|
+
getStream$2.exports = getStream;
|
|
9882
|
+
getStream$2.exports.buffer = (stream, options) => getStream(stream, {...options, encoding: 'buffer'});
|
|
9883
|
+
getStream$2.exports.array = (stream, options) => getStream(stream, {...options, array: true});
|
|
9884
|
+
getStream$2.exports.MaxBufferError = MaxBufferError;
|
|
9885
|
+
|
|
9886
|
+
var getStreamExports = getStream$2.exports;
|
|
9887
|
+
const getStream$1 = /*@__PURE__*/getDefaultExportFromCjs(getStreamExports);
|
|
9816
9888
|
|
|
9817
|
-
const { PassThrough } = require$$0$
|
|
9889
|
+
const { PassThrough } = require$$0$3;
|
|
9818
9890
|
|
|
9819
9891
|
var mergeStream = function (/*streams...*/) {
|
|
9820
9892
|
var sources = [];
|
|
@@ -9854,6 +9926,8 @@ var mergeStream = function (/*streams...*/) {
|
|
|
9854
9926
|
}
|
|
9855
9927
|
};
|
|
9856
9928
|
|
|
9929
|
+
const mergeStream$1 = /*@__PURE__*/getDefaultExportFromCjs(mergeStream);
|
|
9930
|
+
|
|
9857
9931
|
const validateInputOptions = input => {
|
|
9858
9932
|
if (input !== undefined) {
|
|
9859
9933
|
throw new TypeError('The `input` and `inputFile` options cannot be both set.');
|
|
@@ -9890,7 +9964,7 @@ const makeAllStream = (spawned, {all}) => {
|
|
|
9890
9964
|
return;
|
|
9891
9965
|
}
|
|
9892
9966
|
|
|
9893
|
-
const mixed = mergeStream();
|
|
9967
|
+
const mixed = mergeStream$1();
|
|
9894
9968
|
|
|
9895
9969
|
if (spawned.stdout) {
|
|
9896
9970
|
mixed.add(spawned.stdout);
|
|
@@ -9925,10 +9999,10 @@ const getStreamPromise = (stream, {encoding, buffer, maxBuffer}) => {
|
|
|
9925
9999
|
}
|
|
9926
10000
|
|
|
9927
10001
|
if (encoding) {
|
|
9928
|
-
return
|
|
10002
|
+
return getStream$1(stream, {encoding, maxBuffer});
|
|
9929
10003
|
}
|
|
9930
10004
|
|
|
9931
|
-
return
|
|
10005
|
+
return getStream$1.buffer(stream, {maxBuffer});
|
|
9932
10006
|
};
|
|
9933
10007
|
|
|
9934
10008
|
// Retrieve result of child process: exit code, signal, error, streams (stdout/stderr/all)
|
|
@@ -10058,7 +10132,7 @@ const getEnv = ({env: envOption, extendEnv, preferLocal, localDir, execPath}) =>
|
|
|
10058
10132
|
};
|
|
10059
10133
|
|
|
10060
10134
|
const handleArguments = (file, args, options = {}) => {
|
|
10061
|
-
const parsed =
|
|
10135
|
+
const parsed = crossSpawn._parse(file, args, options);
|
|
10062
10136
|
file = parsed.command;
|
|
10063
10137
|
args = parsed.args;
|
|
10064
10138
|
options = parsed.options;
|
|
@@ -10365,7 +10439,7 @@ var hasFlag$2 = (flag, argv = process.argv) => {
|
|
|
10365
10439
|
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
10366
10440
|
};
|
|
10367
10441
|
|
|
10368
|
-
const os = require$$
|
|
10442
|
+
const os = require$$0;
|
|
10369
10443
|
const tty = require$$1;
|
|
10370
10444
|
const hasFlag$1 = hasFlag$2;
|
|
10371
10445
|
|
|
@@ -10595,8 +10669,10 @@ var supportsHyperlinks = {
|
|
|
10595
10669
|
stderr: supportsHyperlink(process.stderr)
|
|
10596
10670
|
};
|
|
10597
10671
|
|
|
10672
|
+
const supportsHyperlinks$1 = /*@__PURE__*/getDefaultExportFromCjs(supportsHyperlinks);
|
|
10673
|
+
|
|
10598
10674
|
function terminalLink(text, url, {target = 'stdout', ...options} = {}) {
|
|
10599
|
-
if (!supportsHyperlinks[target]) {
|
|
10675
|
+
if (!supportsHyperlinks$1[target]) {
|
|
10600
10676
|
// If the fallback has been explicitly disabled, don't modify the text itself.
|
|
10601
10677
|
if (options.fallback === false) {
|
|
10602
10678
|
return text;
|
|
@@ -10608,17 +10684,11 @@ function terminalLink(text, url, {target = 'stdout', ...options} = {}) {
|
|
|
10608
10684
|
return ansiEscapes.link(text, url);
|
|
10609
10685
|
}
|
|
10610
10686
|
|
|
10611
|
-
terminalLink.isSupported = supportsHyperlinks.stdout;
|
|
10687
|
+
terminalLink.isSupported = supportsHyperlinks$1.stdout;
|
|
10612
10688
|
terminalLink.stderr = (text, url, options = {}) => terminalLink(text, url, {target: 'stderr', ...options});
|
|
10613
|
-
terminalLink.stderr.isSupported = supportsHyperlinks.stderr;
|
|
10614
|
-
|
|
10615
|
-
var promptsExports = {};
|
|
10616
|
-
var prompts$3 = {
|
|
10617
|
-
get exports(){ return promptsExports; },
|
|
10618
|
-
set exports(v){ promptsExports = v; },
|
|
10619
|
-
};
|
|
10689
|
+
terminalLink.stderr.isSupported = supportsHyperlinks$1.stderr;
|
|
10620
10690
|
|
|
10621
|
-
var prompts$
|
|
10691
|
+
var prompts$3 = {};
|
|
10622
10692
|
|
|
10623
10693
|
let FORCE_COLOR$1, NODE_DISABLE_COLORS$1, NO_COLOR$1, TERM$1, isTTY$1=true;
|
|
10624
10694
|
if (typeof process !== 'undefined') {
|
|
@@ -11004,7 +11074,7 @@ var util = {
|
|
|
11004
11074
|
|
|
11005
11075
|
const readline = require$$0$7;
|
|
11006
11076
|
const { action } = util;
|
|
11007
|
-
const EventEmitter = require$$2
|
|
11077
|
+
const EventEmitter = require$$2;
|
|
11008
11078
|
const { beep, cursor: cursor$9 } = src;
|
|
11009
11079
|
const color$9 = kleur;
|
|
11010
11080
|
|
|
@@ -13304,10 +13374,10 @@ var elements = {
|
|
|
13304
13374
|
args.suggest = args.suggest || byTitle;
|
|
13305
13375
|
args.choices = [].concat(args.choices || []);
|
|
13306
13376
|
return toPrompt('AutocompletePrompt', args);
|
|
13307
|
-
};
|
|
13308
|
-
} (prompts$
|
|
13377
|
+
};
|
|
13378
|
+
} (prompts$3));
|
|
13309
13379
|
|
|
13310
|
-
const prompts$
|
|
13380
|
+
const prompts$2 = prompts$3;
|
|
13311
13381
|
|
|
13312
13382
|
const passOn = ['suggest', 'format', 'onState', 'validate', 'onRender', 'type'];
|
|
13313
13383
|
const noop = () => {};
|
|
@@ -13358,7 +13428,7 @@ async function prompt(questions=[], { onSubmit=noop, onCancel=noop }={}) {
|
|
|
13358
13428
|
// update vars in case they changed
|
|
13359
13429
|
({ name, type } = question);
|
|
13360
13430
|
|
|
13361
|
-
if (prompts$
|
|
13431
|
+
if (prompts$2[type] === void 0) {
|
|
13362
13432
|
throw new Error(`prompt type (${type}) is not defined`);
|
|
13363
13433
|
}
|
|
13364
13434
|
|
|
@@ -13372,7 +13442,7 @@ async function prompt(questions=[], { onSubmit=noop, onCancel=noop }={}) {
|
|
|
13372
13442
|
|
|
13373
13443
|
try {
|
|
13374
13444
|
// Get the injected answer if there is one or prompt the user
|
|
13375
|
-
answer = prompt._injected ? getInjectedAnswer(prompt._injected, question.initial) : await prompts$
|
|
13445
|
+
answer = prompt._injected ? getInjectedAnswer(prompt._injected, question.initial) : await prompts$2[type](question);
|
|
13376
13446
|
answers[name] = answer = await getFormattedAnswer(question, answer, true);
|
|
13377
13447
|
quit = await onSubmit(question, answer, answers);
|
|
13378
13448
|
} catch (err) {
|
|
@@ -13402,16 +13472,14 @@ function override(answers) {
|
|
|
13402
13472
|
prompt._override = Object.assign({}, answers);
|
|
13403
13473
|
}
|
|
13404
13474
|
|
|
13405
|
-
var lib$1 = Object.assign(prompt, { prompt, prompts: prompts$
|
|
13475
|
+
var lib$1 = Object.assign(prompt, { prompt, prompts: prompts$2, inject, override });
|
|
13406
13476
|
|
|
13407
|
-
|
|
13408
|
-
module.exports = lib$1;
|
|
13409
|
-
} (prompts$3));
|
|
13477
|
+
var prompts = lib$1;
|
|
13410
13478
|
|
|
13411
|
-
const prompts = /*@__PURE__*/getDefaultExportFromCjs(
|
|
13479
|
+
const prompts$1 = /*@__PURE__*/getDefaultExportFromCjs(prompts);
|
|
13412
13480
|
|
|
13413
13481
|
const isexe = isexe_1;
|
|
13414
|
-
const { join, delimiter, sep, posix } = require$$0;
|
|
13482
|
+
const { join, delimiter, sep, posix } = require$$0$1;
|
|
13415
13483
|
|
|
13416
13484
|
const isWindows = process.platform === 'win32';
|
|
13417
13485
|
|
|
@@ -13441,8 +13509,13 @@ const getPathInfo = (cmd, {
|
|
|
13441
13509
|
];
|
|
13442
13510
|
|
|
13443
13511
|
if (isWindows) {
|
|
13444
|
-
const pathExtExe = optPathExt ||
|
|
13445
|
-
|
|
13512
|
+
const pathExtExe = optPathExt ||
|
|
13513
|
+
['.EXE', '.CMD', '.BAT', '.COM'].join(optDelimiter);
|
|
13514
|
+
const pathExt = pathExtExe.split(optDelimiter).reduce((acc, item) => {
|
|
13515
|
+
acc.push(item);
|
|
13516
|
+
acc.push(item.toLowerCase());
|
|
13517
|
+
return acc
|
|
13518
|
+
}, []);
|
|
13446
13519
|
if (cmd.includes('.') && pathExt[0] !== '') {
|
|
13447
13520
|
pathExt.unshift('');
|
|
13448
13521
|
}
|
|
@@ -13521,15 +13594,17 @@ const whichSync = (cmd, opt = {}) => {
|
|
|
13521
13594
|
var lib = which;
|
|
13522
13595
|
which.sync = whichSync;
|
|
13523
13596
|
|
|
13524
|
-
|
|
13597
|
+
const which$1 = /*@__PURE__*/getDefaultExportFromCjs(lib);
|
|
13598
|
+
|
|
13599
|
+
join$2(os$1$1.tmpdir(), "antfu-ni");
|
|
13525
13600
|
function exclude(arr, v) {
|
|
13526
13601
|
return arr.slice().filter((item) => item !== v);
|
|
13527
13602
|
}
|
|
13528
13603
|
function cmdExists(cmd) {
|
|
13529
|
-
return
|
|
13604
|
+
return which$1.sync(cmd, { nothrow: true }) !== null;
|
|
13530
13605
|
}
|
|
13531
13606
|
|
|
13532
|
-
async function detect({ autoInstall, cwd } = {}) {
|
|
13607
|
+
async function detect({ autoInstall, programmatic, cwd } = {}) {
|
|
13533
13608
|
let agent = null;
|
|
13534
13609
|
let version = null;
|
|
13535
13610
|
const lockPath = await findUp(Object.keys(LOCKS), { cwd });
|
|
@@ -13544,13 +13619,13 @@ async function detect({ autoInstall, cwd } = {}) {
|
|
|
13544
13619
|
if (typeof pkg.packageManager === "string") {
|
|
13545
13620
|
const [name, ver] = pkg.packageManager.split("@");
|
|
13546
13621
|
version = ver;
|
|
13547
|
-
if (name === "yarn" && parseInt(ver) > 1)
|
|
13622
|
+
if (name === "yarn" && Number.parseInt(ver) > 1)
|
|
13548
13623
|
agent = "yarn@berry";
|
|
13549
|
-
else if (name === "pnpm" && parseInt(ver) < 7)
|
|
13624
|
+
else if (name === "pnpm" && Number.parseInt(ver) < 7)
|
|
13550
13625
|
agent = "pnpm@6";
|
|
13551
13626
|
else if (name in AGENTS)
|
|
13552
13627
|
agent = name;
|
|
13553
|
-
else
|
|
13628
|
+
else if (!programmatic)
|
|
13554
13629
|
console.warn("[ni] Unknown packageManager:", pkg.packageManager);
|
|
13555
13630
|
}
|
|
13556
13631
|
} catch {
|
|
@@ -13558,14 +13633,14 @@ async function detect({ autoInstall, cwd } = {}) {
|
|
|
13558
13633
|
}
|
|
13559
13634
|
if (!agent && lockPath)
|
|
13560
13635
|
agent = LOCKS[path$3$1.basename(lockPath)];
|
|
13561
|
-
if (agent && !cmdExists(agent.split("@")[0])) {
|
|
13636
|
+
if (agent && !cmdExists(agent.split("@")[0]) && !programmatic) {
|
|
13562
13637
|
if (!autoInstall) {
|
|
13563
13638
|
console.warn(`[ni] Detected ${agent} but it doesn't seem to be installed.
|
|
13564
13639
|
`);
|
|
13565
13640
|
if (process.env.CI)
|
|
13566
13641
|
process.exit(1);
|
|
13567
13642
|
const link = terminalLink(agent, INSTALL_PAGE[agent]);
|
|
13568
|
-
const { tryInstall } = await prompts({
|
|
13643
|
+
const { tryInstall } = await prompts$1({
|
|
13569
13644
|
name: "tryInstall",
|
|
13570
13645
|
type: "confirm",
|
|
13571
13646
|
message: `Would you like to globally install ${link}?`
|
|
@@ -13723,7 +13798,8 @@ function VitePluginVueDevTools(options = { appendTo: "" }) {
|
|
|
13723
13798
|
else if (type === "exit")
|
|
13724
13799
|
rpc.onTerminalExit({ data });
|
|
13725
13800
|
}
|
|
13726
|
-
})
|
|
13801
|
+
}),
|
|
13802
|
+
root: () => config.root
|
|
13727
13803
|
});
|
|
13728
13804
|
}
|
|
13729
13805
|
const plugin = {
|