vite-plugin-vue-devtools 0.4.10 → 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-e86027e5.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-a78e5cb0.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-82a30fea.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-fe1578eb.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-53c720d3.js → VIconTitle.vue_vue_type_script_setup_true_lang-3af9d81d.js} +1 -1
- package/dist/client/assets/{VPanelGrids-dc69b639.js → VPanelGrids-08ef47ce.js} +1 -1
- package/dist/client/assets/{VSectionBlock-57ec7b68.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-c7c2878d.js → VTextInput.vue_vue_type_script_setup_true_lang-4df2a1eb.js} +2 -2
- package/dist/client/assets/{__eyedropper-c3a23916.js → __eyedropper-9aeb7406.js} +2 -2
- package/dist/client/assets/{assets-2b8518ac.js → assets-4ff4283a.js} +17 -10
- package/dist/client/assets/component-docs-1e5f0727.js +1748 -0
- package/dist/client/assets/{components-433e30b5.js → components-5011f272.js} +7 -7
- package/dist/client/assets/{documentations-a41234ba.js → documentations-ec90fa66.js} +3 -3
- package/dist/client/assets/{graph-d61217d6.js → graph-c8cae02e.js} +2422 -61
- package/dist/client/assets/{index-07396aec.js → index-37b80b18.js} +1 -1
- package/dist/client/assets/{index-b8a9099c.js → index-793e4620.js} +1019 -2617
- package/dist/client/assets/index-ee2ca8be.css +474 -0
- package/dist/client/assets/{inspect-2b7bf157.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-95247458.js → overview-fc79467d.js} +5 -5
- package/dist/client/assets/{pages-72e88bdb.js → pages-d51e51ec.js} +5 -5
- package/dist/client/assets/{pinia-55c3fcd8.js → pinia-e230dd12.js} +6 -6
- package/dist/client/assets/{routes-ab38a14f.js → routes-7d3d04cf.js} +7 -7
- package/dist/client/assets/{rpc-cf3bd0fc.js → rpc-d8afe028.js} +1 -1
- package/dist/client/assets/{settings-c390240d.js → settings-2e4656aa.js} +36 -119
- package/dist/client/assets/{splitpanes.es-dd27b7fe.js → splitpanes.es-8a68d356.js} +1 -1
- package/dist/client/assets/{timeline-5fa02442.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-e06030af.js +0 -1748
- package/dist/client/assets/index-5221558c.css +0 -472
- package/dist/client/assets/npm-62fb6b03.js +0 -537
package/dist/index.cjs
CHANGED
|
@@ -8,19 +8,19 @@ const Inspect = require('vite-plugin-inspect');
|
|
|
8
8
|
const VueInspector = require('vite-plugin-vue-inspector');
|
|
9
9
|
const birpc = require('birpc');
|
|
10
10
|
const fs$9 = require('node:fs/promises');
|
|
11
|
-
const require$$0 = require('
|
|
12
|
-
const require$$
|
|
13
|
-
const require$$0$
|
|
14
|
-
const require$$0$
|
|
15
|
-
const require$$2
|
|
16
|
-
const require$$0$
|
|
11
|
+
const require$$0 = require('os');
|
|
12
|
+
const require$$0$1 = require('path');
|
|
13
|
+
const require$$0$2 = require('util');
|
|
14
|
+
const require$$0$3 = require('stream');
|
|
15
|
+
const require$$2 = require('events');
|
|
16
|
+
const require$$0$4 = require('fs');
|
|
17
17
|
const fs$1$1 = require('node:fs');
|
|
18
18
|
const require$$0$7 = require('readline');
|
|
19
19
|
const node_buffer = require('node:buffer');
|
|
20
20
|
const childProcess = require('node:child_process');
|
|
21
21
|
const process$2 = require('node:process');
|
|
22
22
|
const require$$0$2$1 = require('child_process');
|
|
23
|
-
const os$1 = require('node:os');
|
|
23
|
+
const os$1$1 = require('node:os');
|
|
24
24
|
const require$$0$3$1 = require('assert');
|
|
25
25
|
const require$$0$5 = require('buffer');
|
|
26
26
|
const node_util = require('node:util');
|
|
@@ -35,17 +35,17 @@ const Inspect__default = /*#__PURE__*/_interopDefaultCompat(Inspect);
|
|
|
35
35
|
const VueInspector__default = /*#__PURE__*/_interopDefaultCompat(VueInspector);
|
|
36
36
|
const fs__default = /*#__PURE__*/_interopDefaultCompat(fs$9);
|
|
37
37
|
const require$$0__default = /*#__PURE__*/_interopDefaultCompat(require$$0);
|
|
38
|
-
const require$$2__default = /*#__PURE__*/_interopDefaultCompat(require$$2);
|
|
39
38
|
const require$$0__default$1 = /*#__PURE__*/_interopDefaultCompat(require$$0$1);
|
|
40
39
|
const require$$0__default$2 = /*#__PURE__*/_interopDefaultCompat(require$$0$2);
|
|
41
|
-
const require$$2__default$1 = /*#__PURE__*/_interopDefaultCompat(require$$2$1);
|
|
42
40
|
const require$$0__default$3 = /*#__PURE__*/_interopDefaultCompat(require$$0$3);
|
|
41
|
+
const require$$2__default = /*#__PURE__*/_interopDefaultCompat(require$$2);
|
|
42
|
+
const require$$0__default$4 = /*#__PURE__*/_interopDefaultCompat(require$$0$4);
|
|
43
43
|
const fs$1__default = /*#__PURE__*/_interopDefaultCompat(fs$1$1);
|
|
44
44
|
const require$$0$7__default = /*#__PURE__*/_interopDefaultCompat(require$$0$7);
|
|
45
45
|
const childProcess__default = /*#__PURE__*/_interopDefaultCompat(childProcess);
|
|
46
46
|
const process$2__default = /*#__PURE__*/_interopDefaultCompat(process$2);
|
|
47
47
|
const require$$0$2__default = /*#__PURE__*/_interopDefaultCompat(require$$0$2$1);
|
|
48
|
-
const os$1__default = /*#__PURE__*/_interopDefaultCompat(os$1);
|
|
48
|
+
const os$1__default = /*#__PURE__*/_interopDefaultCompat(os$1$1);
|
|
49
49
|
const require$$0$3__default = /*#__PURE__*/_interopDefaultCompat(require$$0$3$1);
|
|
50
50
|
const require$$0$5__default = /*#__PURE__*/_interopDefaultCompat(require$$0$5);
|
|
51
51
|
const require$$1__default = /*#__PURE__*/_interopDefaultCompat(require$$1);
|
|
@@ -101,92 +101,127 @@ var utils$k = {};
|
|
|
101
101
|
|
|
102
102
|
var array$1 = {};
|
|
103
103
|
|
|
104
|
-
Object.defineProperty(array$1, "__esModule", { value: true });
|
|
105
|
-
array$1.splitWhen = array$1.flatten = void 0;
|
|
106
|
-
function flatten(items) {
|
|
107
|
-
return items.reduce((collection, item) => [].concat(collection, item), []);
|
|
108
|
-
}
|
|
109
|
-
array$1.flatten = flatten;
|
|
110
|
-
function splitWhen(items, predicate) {
|
|
111
|
-
const result = [[]];
|
|
112
|
-
let groupIndex = 0;
|
|
113
|
-
for (const item of items) {
|
|
114
|
-
if (predicate(item)) {
|
|
115
|
-
groupIndex++;
|
|
116
|
-
result[groupIndex] = [];
|
|
117
|
-
}
|
|
118
|
-
else {
|
|
119
|
-
result[groupIndex].push(item);
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
return result;
|
|
123
|
-
}
|
|
104
|
+
Object.defineProperty(array$1, "__esModule", { value: true });
|
|
105
|
+
array$1.splitWhen = array$1.flatten = void 0;
|
|
106
|
+
function flatten(items) {
|
|
107
|
+
return items.reduce((collection, item) => [].concat(collection, item), []);
|
|
108
|
+
}
|
|
109
|
+
array$1.flatten = flatten;
|
|
110
|
+
function splitWhen(items, predicate) {
|
|
111
|
+
const result = [[]];
|
|
112
|
+
let groupIndex = 0;
|
|
113
|
+
for (const item of items) {
|
|
114
|
+
if (predicate(item)) {
|
|
115
|
+
groupIndex++;
|
|
116
|
+
result[groupIndex] = [];
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
result[groupIndex].push(item);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
return result;
|
|
123
|
+
}
|
|
124
124
|
array$1.splitWhen = splitWhen;
|
|
125
125
|
|
|
126
126
|
var errno$1 = {};
|
|
127
127
|
|
|
128
|
-
Object.defineProperty(errno$1, "__esModule", { value: true });
|
|
129
|
-
errno$1.isEnoentCodeError = void 0;
|
|
130
|
-
function isEnoentCodeError(error) {
|
|
131
|
-
return error.code === 'ENOENT';
|
|
132
|
-
}
|
|
128
|
+
Object.defineProperty(errno$1, "__esModule", { value: true });
|
|
129
|
+
errno$1.isEnoentCodeError = void 0;
|
|
130
|
+
function isEnoentCodeError(error) {
|
|
131
|
+
return error.code === 'ENOENT';
|
|
132
|
+
}
|
|
133
133
|
errno$1.isEnoentCodeError = isEnoentCodeError;
|
|
134
134
|
|
|
135
135
|
var fs$8 = {};
|
|
136
136
|
|
|
137
|
-
Object.defineProperty(fs$8, "__esModule", { value: true });
|
|
138
|
-
fs$8.createDirentFromStats = void 0;
|
|
139
|
-
let DirentFromStats$1 = class DirentFromStats {
|
|
140
|
-
constructor(name, stats) {
|
|
141
|
-
this.name = name;
|
|
142
|
-
this.isBlockDevice = stats.isBlockDevice.bind(stats);
|
|
143
|
-
this.isCharacterDevice = stats.isCharacterDevice.bind(stats);
|
|
144
|
-
this.isDirectory = stats.isDirectory.bind(stats);
|
|
145
|
-
this.isFIFO = stats.isFIFO.bind(stats);
|
|
146
|
-
this.isFile = stats.isFile.bind(stats);
|
|
147
|
-
this.isSocket = stats.isSocket.bind(stats);
|
|
148
|
-
this.isSymbolicLink = stats.isSymbolicLink.bind(stats);
|
|
149
|
-
}
|
|
150
|
-
};
|
|
151
|
-
function createDirentFromStats$1(name, stats) {
|
|
152
|
-
return new DirentFromStats$1(name, stats);
|
|
153
|
-
}
|
|
137
|
+
Object.defineProperty(fs$8, "__esModule", { value: true });
|
|
138
|
+
fs$8.createDirentFromStats = void 0;
|
|
139
|
+
let DirentFromStats$1 = class DirentFromStats {
|
|
140
|
+
constructor(name, stats) {
|
|
141
|
+
this.name = name;
|
|
142
|
+
this.isBlockDevice = stats.isBlockDevice.bind(stats);
|
|
143
|
+
this.isCharacterDevice = stats.isCharacterDevice.bind(stats);
|
|
144
|
+
this.isDirectory = stats.isDirectory.bind(stats);
|
|
145
|
+
this.isFIFO = stats.isFIFO.bind(stats);
|
|
146
|
+
this.isFile = stats.isFile.bind(stats);
|
|
147
|
+
this.isSocket = stats.isSocket.bind(stats);
|
|
148
|
+
this.isSymbolicLink = stats.isSymbolicLink.bind(stats);
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
function createDirentFromStats$1(name, stats) {
|
|
152
|
+
return new DirentFromStats$1(name, stats);
|
|
153
|
+
}
|
|
154
154
|
fs$8.createDirentFromStats = createDirentFromStats$1;
|
|
155
155
|
|
|
156
156
|
var path$c = {};
|
|
157
157
|
|
|
158
|
-
Object.defineProperty(path$c, "__esModule", { value: true });
|
|
159
|
-
path$c.
|
|
160
|
-
const
|
|
161
|
-
const
|
|
162
|
-
const
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
158
|
+
Object.defineProperty(path$c, "__esModule", { value: true });
|
|
159
|
+
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;
|
|
160
|
+
const os$1 = require$$0__default;
|
|
161
|
+
const path$b = require$$0__default$1;
|
|
162
|
+
const IS_WINDOWS_PLATFORM = os$1.platform() === 'win32';
|
|
163
|
+
const LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2; // ./ or .\\
|
|
164
|
+
/**
|
|
165
|
+
* All non-escaped special characters.
|
|
166
|
+
* Posix: ()*?[\]{|}, !+@ before (, ! at the beginning, \\ before non-special characters.
|
|
167
|
+
* Windows: (){}, !+@ before (, ! at the beginning.
|
|
168
|
+
*/
|
|
169
|
+
const POSIX_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g;
|
|
170
|
+
const WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([(){}]|^!|[!+@](?=\())/g;
|
|
171
|
+
/**
|
|
172
|
+
* The device path (\\.\ or \\?\).
|
|
173
|
+
* https://learn.microsoft.com/en-us/dotnet/standard/io/file-path-formats#dos-device-paths
|
|
174
|
+
*/
|
|
175
|
+
const DOS_DEVICE_PATH_RE = /^\\\\([.?])/;
|
|
176
|
+
/**
|
|
177
|
+
* All backslashes except those escaping special characters.
|
|
178
|
+
* Windows: !()+@{}
|
|
179
|
+
* https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file#naming-conventions
|
|
180
|
+
*/
|
|
181
|
+
const WINDOWS_BACKSLASHES_RE = /\\(?![!()+@{}])/g;
|
|
182
|
+
/**
|
|
183
|
+
* Designed to work only with simple paths: `dir\\file`.
|
|
184
|
+
*/
|
|
185
|
+
function unixify(filepath) {
|
|
186
|
+
return filepath.replace(/\\/g, '/');
|
|
187
|
+
}
|
|
188
|
+
path$c.unixify = unixify;
|
|
189
|
+
function makeAbsolute(cwd, filepath) {
|
|
190
|
+
return path$b.resolve(cwd, filepath);
|
|
191
|
+
}
|
|
192
|
+
path$c.makeAbsolute = makeAbsolute;
|
|
193
|
+
function removeLeadingDotSegment(entry) {
|
|
194
|
+
// We do not use `startsWith` because this is 10x slower than current implementation for some cases.
|
|
195
|
+
// eslint-disable-next-line @typescript-eslint/prefer-string-starts-ends-with
|
|
196
|
+
if (entry.charAt(0) === '.') {
|
|
197
|
+
const secondCharactery = entry.charAt(1);
|
|
198
|
+
if (secondCharactery === '/' || secondCharactery === '\\') {
|
|
199
|
+
return entry.slice(LEADING_DOT_SEGMENT_CHARACTERS_COUNT);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
return entry;
|
|
203
|
+
}
|
|
189
204
|
path$c.removeLeadingDotSegment = removeLeadingDotSegment;
|
|
205
|
+
path$c.escape = IS_WINDOWS_PLATFORM ? escapeWindowsPath : escapePosixPath;
|
|
206
|
+
function escapeWindowsPath(pattern) {
|
|
207
|
+
return pattern.replace(WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE, '\\$2');
|
|
208
|
+
}
|
|
209
|
+
path$c.escapeWindowsPath = escapeWindowsPath;
|
|
210
|
+
function escapePosixPath(pattern) {
|
|
211
|
+
return pattern.replace(POSIX_UNESCAPED_GLOB_SYMBOLS_RE, '\\$2');
|
|
212
|
+
}
|
|
213
|
+
path$c.escapePosixPath = escapePosixPath;
|
|
214
|
+
path$c.convertPathToPattern = IS_WINDOWS_PLATFORM ? convertWindowsPathToPattern : convertPosixPathToPattern;
|
|
215
|
+
function convertWindowsPathToPattern(filepath) {
|
|
216
|
+
return escapeWindowsPath(filepath)
|
|
217
|
+
.replace(DOS_DEVICE_PATH_RE, '//$1')
|
|
218
|
+
.replace(WINDOWS_BACKSLASHES_RE, '/');
|
|
219
|
+
}
|
|
220
|
+
path$c.convertWindowsPathToPattern = convertWindowsPathToPattern;
|
|
221
|
+
function convertPosixPathToPattern(filepath) {
|
|
222
|
+
return escapePosixPath(filepath);
|
|
223
|
+
}
|
|
224
|
+
path$c.convertPosixPathToPattern = convertPosixPathToPattern;
|
|
190
225
|
|
|
191
226
|
var pattern$1 = {};
|
|
192
227
|
|
|
@@ -363,8 +398,8 @@ var isGlob$1 = function isGlob(str, options) {
|
|
|
363
398
|
};
|
|
364
399
|
|
|
365
400
|
var isGlob = isGlob$1;
|
|
366
|
-
var pathPosixDirname = require$$0__default.posix.dirname;
|
|
367
|
-
var isWin32 = require$$
|
|
401
|
+
var pathPosixDirname = require$$0__default$1.posix.dirname;
|
|
402
|
+
var isWin32 = require$$0__default.platform() === 'win32';
|
|
368
403
|
|
|
369
404
|
var slash = '/';
|
|
370
405
|
var backslash = /\\/g;
|
|
@@ -860,12 +895,12 @@ var toRegexRange_1 = toRegexRange$1;
|
|
|
860
895
|
* Licensed under the MIT License.
|
|
861
896
|
*/
|
|
862
897
|
|
|
863
|
-
const util$2 = require$$0__default$
|
|
898
|
+
const util$2 = require$$0__default$2;
|
|
864
899
|
const toRegexRange = toRegexRange_1;
|
|
865
900
|
|
|
866
901
|
const isObject$1 = val => val !== null && typeof val === 'object' && !Array.isArray(val);
|
|
867
902
|
|
|
868
|
-
const transform
|
|
903
|
+
const transform = toNumber => {
|
|
869
904
|
return value => toNumber === true ? Number(value) : String(value);
|
|
870
905
|
};
|
|
871
906
|
|
|
@@ -1002,7 +1037,7 @@ const fillNumbers = (start, end, step = 1, options = {}) => {
|
|
|
1002
1037
|
let padded = zeros(startString) || zeros(endString) || zeros(stepString);
|
|
1003
1038
|
let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0;
|
|
1004
1039
|
let toNumber = padded === false && stringify$3(start, end, options) === false;
|
|
1005
|
-
let format = options.transform || transform
|
|
1040
|
+
let format = options.transform || transform(toNumber);
|
|
1006
1041
|
|
|
1007
1042
|
if (options.toRegex && step === 1) {
|
|
1008
1043
|
return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options);
|
|
@@ -1825,7 +1860,7 @@ var braces_1 = braces$1;
|
|
|
1825
1860
|
|
|
1826
1861
|
var utils$f = {};
|
|
1827
1862
|
|
|
1828
|
-
const path$a = require$$0__default;
|
|
1863
|
+
const path$a = require$$0__default$1;
|
|
1829
1864
|
const WIN_SLASH = '\\\\/';
|
|
1830
1865
|
const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
|
|
1831
1866
|
|
|
@@ -2005,7 +2040,7 @@ var constants$3 = {
|
|
|
2005
2040
|
|
|
2006
2041
|
(function (exports) {
|
|
2007
2042
|
|
|
2008
|
-
const path = require$$0__default;
|
|
2043
|
+
const path = require$$0__default$1;
|
|
2009
2044
|
const win32 = process.platform === 'win32';
|
|
2010
2045
|
const {
|
|
2011
2046
|
REGEX_BACKSLASH,
|
|
@@ -3549,7 +3584,7 @@ parse$3.fastpaths = (input, options) => {
|
|
|
3549
3584
|
|
|
3550
3585
|
var parse_1$1 = parse$3;
|
|
3551
3586
|
|
|
3552
|
-
const path$9 = require$$0__default;
|
|
3587
|
+
const path$9 = require$$0__default$1;
|
|
3553
3588
|
const scan = scan_1;
|
|
3554
3589
|
const parse$2 = parse_1$1;
|
|
3555
3590
|
const utils$c = utils$f;
|
|
@@ -3892,7 +3927,7 @@ var picomatch_1 = picomatch$2;
|
|
|
3892
3927
|
|
|
3893
3928
|
var picomatch$1 = picomatch_1;
|
|
3894
3929
|
|
|
3895
|
-
const util$1 = require$$0__default$
|
|
3930
|
+
const util$1 = require$$0__default$2;
|
|
3896
3931
|
const braces = braces_1;
|
|
3897
3932
|
const picomatch = picomatch$1;
|
|
3898
3933
|
const utils$b = utils$f;
|
|
@@ -4358,174 +4393,193 @@ micromatch$1.braceExpand = (pattern, options) => {
|
|
|
4358
4393
|
|
|
4359
4394
|
var micromatch_1 = micromatch$1;
|
|
4360
4395
|
|
|
4361
|
-
Object.defineProperty(pattern$1, "__esModule", { value: true });
|
|
4362
|
-
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;
|
|
4363
|
-
const path$8 = require$$0__default;
|
|
4364
|
-
const globParent = globParent$1;
|
|
4365
|
-
const micromatch = micromatch_1;
|
|
4366
|
-
const GLOBSTAR = '**';
|
|
4367
|
-
const ESCAPE_SYMBOL = '\\';
|
|
4368
|
-
const COMMON_GLOB_SYMBOLS_RE = /[*?]|^!/;
|
|
4369
|
-
const REGEX_CHARACTER_CLASS_SYMBOLS_RE = /\[[^[]*]/;
|
|
4370
|
-
const REGEX_GROUP_SYMBOLS_RE = /(?:^|[^!*+?@])\([^(]*\|[^|]*\)/;
|
|
4371
|
-
const GLOB_EXTENSION_SYMBOLS_RE = /[!*+?@]\([^(]*\)/;
|
|
4372
|
-
const BRACE_EXPANSION_SEPARATORS_RE = /,|\.\./;
|
|
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
|
-
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
|
|
4464
|
-
|
|
4465
|
-
|
|
4466
|
-
|
|
4467
|
-
|
|
4468
|
-
|
|
4469
|
-
|
|
4470
|
-
|
|
4471
|
-
|
|
4472
|
-
|
|
4473
|
-
}
|
|
4474
|
-
|
|
4475
|
-
|
|
4476
|
-
|
|
4477
|
-
|
|
4478
|
-
|
|
4479
|
-
|
|
4480
|
-
|
|
4481
|
-
return
|
|
4482
|
-
}
|
|
4483
|
-
pattern$1.
|
|
4484
|
-
function
|
|
4485
|
-
|
|
4486
|
-
|
|
4487
|
-
|
|
4488
|
-
|
|
4489
|
-
|
|
4490
|
-
|
|
4491
|
-
|
|
4492
|
-
|
|
4493
|
-
|
|
4494
|
-
|
|
4495
|
-
|
|
4496
|
-
|
|
4497
|
-
|
|
4498
|
-
|
|
4499
|
-
|
|
4500
|
-
|
|
4501
|
-
|
|
4502
|
-
|
|
4503
|
-
|
|
4504
|
-
|
|
4505
|
-
|
|
4506
|
-
|
|
4507
|
-
|
|
4508
|
-
|
|
4509
|
-
|
|
4510
|
-
|
|
4511
|
-
|
|
4512
|
-
|
|
4513
|
-
|
|
4514
|
-
|
|
4515
|
-
|
|
4516
|
-
|
|
4517
|
-
|
|
4518
|
-
|
|
4519
|
-
|
|
4520
|
-
|
|
4521
|
-
|
|
4522
|
-
|
|
4523
|
-
|
|
4524
|
-
|
|
4525
|
-
|
|
4526
|
-
|
|
4527
|
-
|
|
4396
|
+
Object.defineProperty(pattern$1, "__esModule", { value: true });
|
|
4397
|
+
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;
|
|
4398
|
+
const path$8 = require$$0__default$1;
|
|
4399
|
+
const globParent = globParent$1;
|
|
4400
|
+
const micromatch = micromatch_1;
|
|
4401
|
+
const GLOBSTAR = '**';
|
|
4402
|
+
const ESCAPE_SYMBOL = '\\';
|
|
4403
|
+
const COMMON_GLOB_SYMBOLS_RE = /[*?]|^!/;
|
|
4404
|
+
const REGEX_CHARACTER_CLASS_SYMBOLS_RE = /\[[^[]*]/;
|
|
4405
|
+
const REGEX_GROUP_SYMBOLS_RE = /(?:^|[^!*+?@])\([^(]*\|[^|]*\)/;
|
|
4406
|
+
const GLOB_EXTENSION_SYMBOLS_RE = /[!*+?@]\([^(]*\)/;
|
|
4407
|
+
const BRACE_EXPANSION_SEPARATORS_RE = /,|\.\./;
|
|
4408
|
+
/**
|
|
4409
|
+
* Matches a sequence of two or more consecutive slashes, excluding the first two slashes at the beginning of the string.
|
|
4410
|
+
* The latter is due to the presence of the device path at the beginning of the UNC path.
|
|
4411
|
+
*/
|
|
4412
|
+
const DOUBLE_SLASH_RE = /(?!^)\/{2,}/g;
|
|
4413
|
+
function isStaticPattern(pattern, options = {}) {
|
|
4414
|
+
return !isDynamicPattern(pattern, options);
|
|
4415
|
+
}
|
|
4416
|
+
pattern$1.isStaticPattern = isStaticPattern;
|
|
4417
|
+
function isDynamicPattern(pattern, options = {}) {
|
|
4418
|
+
/**
|
|
4419
|
+
* A special case with an empty string is necessary for matching patterns that start with a forward slash.
|
|
4420
|
+
* An empty string cannot be a dynamic pattern.
|
|
4421
|
+
* For example, the pattern `/lib/*` will be spread into parts: '', 'lib', '*'.
|
|
4422
|
+
*/
|
|
4423
|
+
if (pattern === '') {
|
|
4424
|
+
return false;
|
|
4425
|
+
}
|
|
4426
|
+
/**
|
|
4427
|
+
* When the `caseSensitiveMatch` option is disabled, all patterns must be marked as dynamic, because we cannot check
|
|
4428
|
+
* filepath directly (without read directory).
|
|
4429
|
+
*/
|
|
4430
|
+
if (options.caseSensitiveMatch === false || pattern.includes(ESCAPE_SYMBOL)) {
|
|
4431
|
+
return true;
|
|
4432
|
+
}
|
|
4433
|
+
if (COMMON_GLOB_SYMBOLS_RE.test(pattern) || REGEX_CHARACTER_CLASS_SYMBOLS_RE.test(pattern) || REGEX_GROUP_SYMBOLS_RE.test(pattern)) {
|
|
4434
|
+
return true;
|
|
4435
|
+
}
|
|
4436
|
+
if (options.extglob !== false && GLOB_EXTENSION_SYMBOLS_RE.test(pattern)) {
|
|
4437
|
+
return true;
|
|
4438
|
+
}
|
|
4439
|
+
if (options.braceExpansion !== false && hasBraceExpansion(pattern)) {
|
|
4440
|
+
return true;
|
|
4441
|
+
}
|
|
4442
|
+
return false;
|
|
4443
|
+
}
|
|
4444
|
+
pattern$1.isDynamicPattern = isDynamicPattern;
|
|
4445
|
+
function hasBraceExpansion(pattern) {
|
|
4446
|
+
const openingBraceIndex = pattern.indexOf('{');
|
|
4447
|
+
if (openingBraceIndex === -1) {
|
|
4448
|
+
return false;
|
|
4449
|
+
}
|
|
4450
|
+
const closingBraceIndex = pattern.indexOf('}', openingBraceIndex + 1);
|
|
4451
|
+
if (closingBraceIndex === -1) {
|
|
4452
|
+
return false;
|
|
4453
|
+
}
|
|
4454
|
+
const braceContent = pattern.slice(openingBraceIndex, closingBraceIndex);
|
|
4455
|
+
return BRACE_EXPANSION_SEPARATORS_RE.test(braceContent);
|
|
4456
|
+
}
|
|
4457
|
+
function convertToPositivePattern(pattern) {
|
|
4458
|
+
return isNegativePattern(pattern) ? pattern.slice(1) : pattern;
|
|
4459
|
+
}
|
|
4460
|
+
pattern$1.convertToPositivePattern = convertToPositivePattern;
|
|
4461
|
+
function convertToNegativePattern(pattern) {
|
|
4462
|
+
return '!' + pattern;
|
|
4463
|
+
}
|
|
4464
|
+
pattern$1.convertToNegativePattern = convertToNegativePattern;
|
|
4465
|
+
function isNegativePattern(pattern) {
|
|
4466
|
+
return pattern.startsWith('!') && pattern[1] !== '(';
|
|
4467
|
+
}
|
|
4468
|
+
pattern$1.isNegativePattern = isNegativePattern;
|
|
4469
|
+
function isPositivePattern(pattern) {
|
|
4470
|
+
return !isNegativePattern(pattern);
|
|
4471
|
+
}
|
|
4472
|
+
pattern$1.isPositivePattern = isPositivePattern;
|
|
4473
|
+
function getNegativePatterns(patterns) {
|
|
4474
|
+
return patterns.filter(isNegativePattern);
|
|
4475
|
+
}
|
|
4476
|
+
pattern$1.getNegativePatterns = getNegativePatterns;
|
|
4477
|
+
function getPositivePatterns$1(patterns) {
|
|
4478
|
+
return patterns.filter(isPositivePattern);
|
|
4479
|
+
}
|
|
4480
|
+
pattern$1.getPositivePatterns = getPositivePatterns$1;
|
|
4481
|
+
/**
|
|
4482
|
+
* Returns patterns that can be applied inside the current directory.
|
|
4483
|
+
*
|
|
4484
|
+
* @example
|
|
4485
|
+
* // ['./*', '*', 'a/*']
|
|
4486
|
+
* getPatternsInsideCurrentDirectory(['./*', '*', 'a/*', '../*', './../*'])
|
|
4487
|
+
*/
|
|
4488
|
+
function getPatternsInsideCurrentDirectory(patterns) {
|
|
4489
|
+
return patterns.filter((pattern) => !isPatternRelatedToParentDirectory(pattern));
|
|
4490
|
+
}
|
|
4491
|
+
pattern$1.getPatternsInsideCurrentDirectory = getPatternsInsideCurrentDirectory;
|
|
4492
|
+
/**
|
|
4493
|
+
* Returns patterns to be expanded relative to (outside) the current directory.
|
|
4494
|
+
*
|
|
4495
|
+
* @example
|
|
4496
|
+
* // ['../*', './../*']
|
|
4497
|
+
* getPatternsInsideCurrentDirectory(['./*', '*', 'a/*', '../*', './../*'])
|
|
4498
|
+
*/
|
|
4499
|
+
function getPatternsOutsideCurrentDirectory(patterns) {
|
|
4500
|
+
return patterns.filter(isPatternRelatedToParentDirectory);
|
|
4501
|
+
}
|
|
4502
|
+
pattern$1.getPatternsOutsideCurrentDirectory = getPatternsOutsideCurrentDirectory;
|
|
4503
|
+
function isPatternRelatedToParentDirectory(pattern) {
|
|
4504
|
+
return pattern.startsWith('..') || pattern.startsWith('./..');
|
|
4505
|
+
}
|
|
4506
|
+
pattern$1.isPatternRelatedToParentDirectory = isPatternRelatedToParentDirectory;
|
|
4507
|
+
function getBaseDirectory(pattern) {
|
|
4508
|
+
return globParent(pattern, { flipBackslashes: false });
|
|
4509
|
+
}
|
|
4510
|
+
pattern$1.getBaseDirectory = getBaseDirectory;
|
|
4511
|
+
function hasGlobStar(pattern) {
|
|
4512
|
+
return pattern.includes(GLOBSTAR);
|
|
4513
|
+
}
|
|
4514
|
+
pattern$1.hasGlobStar = hasGlobStar;
|
|
4515
|
+
function endsWithSlashGlobStar(pattern) {
|
|
4516
|
+
return pattern.endsWith('/' + GLOBSTAR);
|
|
4517
|
+
}
|
|
4518
|
+
pattern$1.endsWithSlashGlobStar = endsWithSlashGlobStar;
|
|
4519
|
+
function isAffectDepthOfReadingPattern(pattern) {
|
|
4520
|
+
const basename = path$8.basename(pattern);
|
|
4521
|
+
return endsWithSlashGlobStar(pattern) || isStaticPattern(basename);
|
|
4522
|
+
}
|
|
4523
|
+
pattern$1.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern;
|
|
4524
|
+
function expandPatternsWithBraceExpansion(patterns) {
|
|
4525
|
+
return patterns.reduce((collection, pattern) => {
|
|
4526
|
+
return collection.concat(expandBraceExpansion(pattern));
|
|
4527
|
+
}, []);
|
|
4528
|
+
}
|
|
4529
|
+
pattern$1.expandPatternsWithBraceExpansion = expandPatternsWithBraceExpansion;
|
|
4530
|
+
function expandBraceExpansion(pattern) {
|
|
4531
|
+
const patterns = micromatch.braces(pattern, { expand: true, nodupes: true });
|
|
4532
|
+
/**
|
|
4533
|
+
* Sort the patterns by length so that the same depth patterns are processed side by side.
|
|
4534
|
+
* `a/{b,}/{c,}/*` – `['a///*', 'a/b//*', 'a//c/*', 'a/b/c/*']`
|
|
4535
|
+
*/
|
|
4536
|
+
patterns.sort((a, b) => a.length - b.length);
|
|
4537
|
+
/**
|
|
4538
|
+
* Micromatch can return an empty string in the case of patterns like `{a,}`.
|
|
4539
|
+
*/
|
|
4540
|
+
return patterns.filter((pattern) => pattern !== '');
|
|
4541
|
+
}
|
|
4542
|
+
pattern$1.expandBraceExpansion = expandBraceExpansion;
|
|
4543
|
+
function getPatternParts(pattern, options) {
|
|
4544
|
+
let { parts } = micromatch.scan(pattern, Object.assign(Object.assign({}, options), { parts: true }));
|
|
4545
|
+
/**
|
|
4546
|
+
* The scan method returns an empty array in some cases.
|
|
4547
|
+
* See micromatch/picomatch#58 for more details.
|
|
4548
|
+
*/
|
|
4549
|
+
if (parts.length === 0) {
|
|
4550
|
+
parts = [pattern];
|
|
4551
|
+
}
|
|
4552
|
+
/**
|
|
4553
|
+
* The scan method does not return an empty part for the pattern with a forward slash.
|
|
4554
|
+
* This is another part of micromatch/picomatch#58.
|
|
4555
|
+
*/
|
|
4556
|
+
if (parts[0].startsWith('/')) {
|
|
4557
|
+
parts[0] = parts[0].slice(1);
|
|
4558
|
+
parts.unshift('');
|
|
4559
|
+
}
|
|
4560
|
+
return parts;
|
|
4561
|
+
}
|
|
4562
|
+
pattern$1.getPatternParts = getPatternParts;
|
|
4563
|
+
function makeRe(pattern, options) {
|
|
4564
|
+
return micromatch.makeRe(pattern, options);
|
|
4565
|
+
}
|
|
4566
|
+
pattern$1.makeRe = makeRe;
|
|
4567
|
+
function convertPatternsToRe(patterns, options) {
|
|
4568
|
+
return patterns.map((pattern) => makeRe(pattern, options));
|
|
4569
|
+
}
|
|
4570
|
+
pattern$1.convertPatternsToRe = convertPatternsToRe;
|
|
4571
|
+
function matchAny(entry, patternsRe) {
|
|
4572
|
+
return patternsRe.some((patternRe) => patternRe.test(entry));
|
|
4573
|
+
}
|
|
4528
4574
|
pattern$1.matchAny = matchAny;
|
|
4575
|
+
/**
|
|
4576
|
+
* This package only works with forward slashes as a path separator.
|
|
4577
|
+
* Because of this, we cannot use the standard `path.normalize` method, because on Windows platform it will use of backslashes.
|
|
4578
|
+
*/
|
|
4579
|
+
function removeDuplicateSlashes(pattern) {
|
|
4580
|
+
return pattern.replace(DOUBLE_SLASH_RE, '/');
|
|
4581
|
+
}
|
|
4582
|
+
pattern$1.removeDuplicateSlashes = removeDuplicateSlashes;
|
|
4529
4583
|
|
|
4530
4584
|
var stream$5 = {};
|
|
4531
4585
|
|
|
@@ -4536,7 +4590,7 @@ var stream$5 = {};
|
|
|
4536
4590
|
* Copyright (c) 2014-2020 Teambition
|
|
4537
4591
|
* Licensed under the MIT license.
|
|
4538
4592
|
*/
|
|
4539
|
-
const Stream = require$$0__default$
|
|
4593
|
+
const Stream = require$$0__default$3;
|
|
4540
4594
|
const PassThrough$1 = Stream.PassThrough;
|
|
4541
4595
|
const slice = Array.prototype.slice;
|
|
4542
4596
|
|
|
@@ -4673,156 +4727,163 @@ function pauseStreams (streams, options) {
|
|
|
4673
4727
|
return streams
|
|
4674
4728
|
}
|
|
4675
4729
|
|
|
4676
|
-
Object.defineProperty(stream$5, "__esModule", { value: true });
|
|
4677
|
-
stream$5.merge = void 0;
|
|
4678
|
-
const merge2 = merge2_1;
|
|
4679
|
-
function merge(streams) {
|
|
4680
|
-
const mergedStream = merge2(streams);
|
|
4681
|
-
streams.forEach((stream) => {
|
|
4682
|
-
stream.once('error', (error) => mergedStream.emit('error', error));
|
|
4683
|
-
});
|
|
4684
|
-
mergedStream.once('close', () => propagateCloseEventToSources(streams));
|
|
4685
|
-
mergedStream.once('end', () => propagateCloseEventToSources(streams));
|
|
4686
|
-
return mergedStream;
|
|
4687
|
-
}
|
|
4688
|
-
stream$5.merge = merge;
|
|
4689
|
-
function propagateCloseEventToSources(streams) {
|
|
4690
|
-
streams.forEach((stream) => stream.emit('close'));
|
|
4730
|
+
Object.defineProperty(stream$5, "__esModule", { value: true });
|
|
4731
|
+
stream$5.merge = void 0;
|
|
4732
|
+
const merge2 = merge2_1;
|
|
4733
|
+
function merge(streams) {
|
|
4734
|
+
const mergedStream = merge2(streams);
|
|
4735
|
+
streams.forEach((stream) => {
|
|
4736
|
+
stream.once('error', (error) => mergedStream.emit('error', error));
|
|
4737
|
+
});
|
|
4738
|
+
mergedStream.once('close', () => propagateCloseEventToSources(streams));
|
|
4739
|
+
mergedStream.once('end', () => propagateCloseEventToSources(streams));
|
|
4740
|
+
return mergedStream;
|
|
4741
|
+
}
|
|
4742
|
+
stream$5.merge = merge;
|
|
4743
|
+
function propagateCloseEventToSources(streams) {
|
|
4744
|
+
streams.forEach((stream) => stream.emit('close'));
|
|
4691
4745
|
}
|
|
4692
4746
|
|
|
4693
4747
|
var string$1 = {};
|
|
4694
4748
|
|
|
4695
|
-
Object.defineProperty(string$1, "__esModule", { value: true });
|
|
4696
|
-
string$1.isEmpty = string$1.isString = void 0;
|
|
4697
|
-
function isString(input) {
|
|
4698
|
-
return typeof input === 'string';
|
|
4699
|
-
}
|
|
4700
|
-
string$1.isString = isString;
|
|
4701
|
-
function isEmpty(input) {
|
|
4702
|
-
return input === '';
|
|
4703
|
-
}
|
|
4749
|
+
Object.defineProperty(string$1, "__esModule", { value: true });
|
|
4750
|
+
string$1.isEmpty = string$1.isString = void 0;
|
|
4751
|
+
function isString(input) {
|
|
4752
|
+
return typeof input === 'string';
|
|
4753
|
+
}
|
|
4754
|
+
string$1.isString = isString;
|
|
4755
|
+
function isEmpty(input) {
|
|
4756
|
+
return input === '';
|
|
4757
|
+
}
|
|
4704
4758
|
string$1.isEmpty = isEmpty;
|
|
4705
4759
|
|
|
4706
|
-
Object.defineProperty(utils$k, "__esModule", { value: true });
|
|
4707
|
-
utils$k.string = utils$k.stream = utils$k.pattern = utils$k.path = utils$k.fs = utils$k.errno = utils$k.array = void 0;
|
|
4708
|
-
const array = array$1;
|
|
4709
|
-
utils$k.array = array;
|
|
4710
|
-
const errno = errno$1;
|
|
4711
|
-
utils$k.errno = errno;
|
|
4712
|
-
const fs$7 = fs$8;
|
|
4713
|
-
utils$k.fs = fs$7;
|
|
4714
|
-
const path$7 = path$c;
|
|
4715
|
-
utils$k.path = path$7;
|
|
4716
|
-
const pattern = pattern$1;
|
|
4717
|
-
utils$k.pattern = pattern;
|
|
4718
|
-
const stream$4 = stream$5;
|
|
4719
|
-
utils$k.stream = stream$4;
|
|
4720
|
-
const string = string$1;
|
|
4760
|
+
Object.defineProperty(utils$k, "__esModule", { value: true });
|
|
4761
|
+
utils$k.string = utils$k.stream = utils$k.pattern = utils$k.path = utils$k.fs = utils$k.errno = utils$k.array = void 0;
|
|
4762
|
+
const array = array$1;
|
|
4763
|
+
utils$k.array = array;
|
|
4764
|
+
const errno = errno$1;
|
|
4765
|
+
utils$k.errno = errno;
|
|
4766
|
+
const fs$7 = fs$8;
|
|
4767
|
+
utils$k.fs = fs$7;
|
|
4768
|
+
const path$7 = path$c;
|
|
4769
|
+
utils$k.path = path$7;
|
|
4770
|
+
const pattern = pattern$1;
|
|
4771
|
+
utils$k.pattern = pattern;
|
|
4772
|
+
const stream$4 = stream$5;
|
|
4773
|
+
utils$k.stream = stream$4;
|
|
4774
|
+
const string = string$1;
|
|
4721
4775
|
utils$k.string = string;
|
|
4722
4776
|
|
|
4723
|
-
Object.defineProperty(tasks, "__esModule", { value: true });
|
|
4724
|
-
tasks.convertPatternGroupToTask = tasks.convertPatternGroupsToTasks = tasks.groupPatternsByBaseDirectory = tasks.getNegativePatternsAsPositive = tasks.getPositivePatterns = tasks.convertPatternsToTasks = tasks.generate = void 0;
|
|
4725
|
-
const utils$a = utils$k;
|
|
4726
|
-
function generate(
|
|
4727
|
-
const
|
|
4728
|
-
const
|
|
4729
|
-
const
|
|
4730
|
-
const
|
|
4731
|
-
const
|
|
4732
|
-
const
|
|
4733
|
-
|
|
4734
|
-
|
|
4735
|
-
|
|
4736
|
-
|
|
4737
|
-
|
|
4738
|
-
|
|
4739
|
-
|
|
4740
|
-
|
|
4741
|
-
|
|
4742
|
-
|
|
4743
|
-
|
|
4744
|
-
|
|
4745
|
-
|
|
4746
|
-
|
|
4747
|
-
|
|
4748
|
-
|
|
4749
|
-
|
|
4750
|
-
|
|
4751
|
-
*
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
|
|
4759
|
-
|
|
4760
|
-
}
|
|
4761
|
-
|
|
4762
|
-
|
|
4763
|
-
|
|
4764
|
-
|
|
4765
|
-
|
|
4766
|
-
|
|
4767
|
-
|
|
4768
|
-
|
|
4769
|
-
|
|
4770
|
-
|
|
4771
|
-
|
|
4772
|
-
function
|
|
4773
|
-
const
|
|
4774
|
-
|
|
4775
|
-
|
|
4776
|
-
|
|
4777
|
-
|
|
4778
|
-
|
|
4779
|
-
|
|
4780
|
-
|
|
4781
|
-
|
|
4782
|
-
|
|
4783
|
-
|
|
4784
|
-
|
|
4785
|
-
|
|
4786
|
-
|
|
4787
|
-
|
|
4788
|
-
|
|
4789
|
-
|
|
4790
|
-
}
|
|
4791
|
-
tasks.
|
|
4792
|
-
function
|
|
4793
|
-
return
|
|
4794
|
-
|
|
4795
|
-
|
|
4796
|
-
|
|
4797
|
-
|
|
4798
|
-
|
|
4799
|
-
|
|
4800
|
-
}
|
|
4777
|
+
Object.defineProperty(tasks, "__esModule", { value: true });
|
|
4778
|
+
tasks.convertPatternGroupToTask = tasks.convertPatternGroupsToTasks = tasks.groupPatternsByBaseDirectory = tasks.getNegativePatternsAsPositive = tasks.getPositivePatterns = tasks.convertPatternsToTasks = tasks.generate = void 0;
|
|
4779
|
+
const utils$a = utils$k;
|
|
4780
|
+
function generate(input, settings) {
|
|
4781
|
+
const patterns = processPatterns(input, settings);
|
|
4782
|
+
const ignore = processPatterns(settings.ignore, settings);
|
|
4783
|
+
const positivePatterns = getPositivePatterns(patterns);
|
|
4784
|
+
const negativePatterns = getNegativePatternsAsPositive(patterns, ignore);
|
|
4785
|
+
const staticPatterns = positivePatterns.filter((pattern) => utils$a.pattern.isStaticPattern(pattern, settings));
|
|
4786
|
+
const dynamicPatterns = positivePatterns.filter((pattern) => utils$a.pattern.isDynamicPattern(pattern, settings));
|
|
4787
|
+
const staticTasks = convertPatternsToTasks(staticPatterns, negativePatterns, /* dynamic */ false);
|
|
4788
|
+
const dynamicTasks = convertPatternsToTasks(dynamicPatterns, negativePatterns, /* dynamic */ true);
|
|
4789
|
+
return staticTasks.concat(dynamicTasks);
|
|
4790
|
+
}
|
|
4791
|
+
tasks.generate = generate;
|
|
4792
|
+
function processPatterns(input, settings) {
|
|
4793
|
+
let patterns = input;
|
|
4794
|
+
/**
|
|
4795
|
+
* The original pattern like `{,*,**,a/*}` can lead to problems checking the depth when matching entry
|
|
4796
|
+
* and some problems with the micromatch package (see fast-glob issues: #365, #394).
|
|
4797
|
+
*
|
|
4798
|
+
* To solve this problem, we expand all patterns containing brace expansion. This can lead to a slight slowdown
|
|
4799
|
+
* in matching in the case of a large set of patterns after expansion.
|
|
4800
|
+
*/
|
|
4801
|
+
if (settings.braceExpansion) {
|
|
4802
|
+
patterns = utils$a.pattern.expandPatternsWithBraceExpansion(patterns);
|
|
4803
|
+
}
|
|
4804
|
+
/**
|
|
4805
|
+
* If the `baseNameMatch` option is enabled, we must add globstar to patterns, so that they can be used
|
|
4806
|
+
* at any nesting level.
|
|
4807
|
+
*
|
|
4808
|
+
* We do this here, because otherwise we have to complicate the filtering logic. For example, we need to change
|
|
4809
|
+
* the pattern in the filter before creating a regular expression. There is no need to change the patterns
|
|
4810
|
+
* in the application. Only on the input.
|
|
4811
|
+
*/
|
|
4812
|
+
if (settings.baseNameMatch) {
|
|
4813
|
+
patterns = patterns.map((pattern) => pattern.includes('/') ? pattern : `**/${pattern}`);
|
|
4814
|
+
}
|
|
4815
|
+
/**
|
|
4816
|
+
* This method also removes duplicate slashes that may have been in the pattern or formed as a result of expansion.
|
|
4817
|
+
*/
|
|
4818
|
+
return patterns.map((pattern) => utils$a.pattern.removeDuplicateSlashes(pattern));
|
|
4819
|
+
}
|
|
4820
|
+
/**
|
|
4821
|
+
* Returns tasks grouped by basic pattern directories.
|
|
4822
|
+
*
|
|
4823
|
+
* Patterns that can be found inside (`./`) and outside (`../`) the current directory are handled separately.
|
|
4824
|
+
* This is necessary because directory traversal starts at the base directory and goes deeper.
|
|
4825
|
+
*/
|
|
4826
|
+
function convertPatternsToTasks(positive, negative, dynamic) {
|
|
4827
|
+
const tasks = [];
|
|
4828
|
+
const patternsOutsideCurrentDirectory = utils$a.pattern.getPatternsOutsideCurrentDirectory(positive);
|
|
4829
|
+
const patternsInsideCurrentDirectory = utils$a.pattern.getPatternsInsideCurrentDirectory(positive);
|
|
4830
|
+
const outsideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsOutsideCurrentDirectory);
|
|
4831
|
+
const insideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsInsideCurrentDirectory);
|
|
4832
|
+
tasks.push(...convertPatternGroupsToTasks(outsideCurrentDirectoryGroup, negative, dynamic));
|
|
4833
|
+
/*
|
|
4834
|
+
* For the sake of reducing future accesses to the file system, we merge all tasks within the current directory
|
|
4835
|
+
* into a global task, if at least one pattern refers to the root (`.`). In this case, the global task covers the rest.
|
|
4836
|
+
*/
|
|
4837
|
+
if ('.' in insideCurrentDirectoryGroup) {
|
|
4838
|
+
tasks.push(convertPatternGroupToTask('.', patternsInsideCurrentDirectory, negative, dynamic));
|
|
4839
|
+
}
|
|
4840
|
+
else {
|
|
4841
|
+
tasks.push(...convertPatternGroupsToTasks(insideCurrentDirectoryGroup, negative, dynamic));
|
|
4842
|
+
}
|
|
4843
|
+
return tasks;
|
|
4844
|
+
}
|
|
4845
|
+
tasks.convertPatternsToTasks = convertPatternsToTasks;
|
|
4846
|
+
function getPositivePatterns(patterns) {
|
|
4847
|
+
return utils$a.pattern.getPositivePatterns(patterns);
|
|
4848
|
+
}
|
|
4849
|
+
tasks.getPositivePatterns = getPositivePatterns;
|
|
4850
|
+
function getNegativePatternsAsPositive(patterns, ignore) {
|
|
4851
|
+
const negative = utils$a.pattern.getNegativePatterns(patterns).concat(ignore);
|
|
4852
|
+
const positive = negative.map(utils$a.pattern.convertToPositivePattern);
|
|
4853
|
+
return positive;
|
|
4854
|
+
}
|
|
4855
|
+
tasks.getNegativePatternsAsPositive = getNegativePatternsAsPositive;
|
|
4856
|
+
function groupPatternsByBaseDirectory(patterns) {
|
|
4857
|
+
const group = {};
|
|
4858
|
+
return patterns.reduce((collection, pattern) => {
|
|
4859
|
+
const base = utils$a.pattern.getBaseDirectory(pattern);
|
|
4860
|
+
if (base in collection) {
|
|
4861
|
+
collection[base].push(pattern);
|
|
4862
|
+
}
|
|
4863
|
+
else {
|
|
4864
|
+
collection[base] = [pattern];
|
|
4865
|
+
}
|
|
4866
|
+
return collection;
|
|
4867
|
+
}, group);
|
|
4868
|
+
}
|
|
4869
|
+
tasks.groupPatternsByBaseDirectory = groupPatternsByBaseDirectory;
|
|
4870
|
+
function convertPatternGroupsToTasks(positive, negative, dynamic) {
|
|
4871
|
+
return Object.keys(positive).map((base) => {
|
|
4872
|
+
return convertPatternGroupToTask(base, positive[base], negative, dynamic);
|
|
4873
|
+
});
|
|
4874
|
+
}
|
|
4875
|
+
tasks.convertPatternGroupsToTasks = convertPatternGroupsToTasks;
|
|
4876
|
+
function convertPatternGroupToTask(base, positive, negative, dynamic) {
|
|
4877
|
+
return {
|
|
4878
|
+
dynamic,
|
|
4879
|
+
positive,
|
|
4880
|
+
negative,
|
|
4881
|
+
base,
|
|
4882
|
+
patterns: [].concat(positive, negative.map(utils$a.pattern.convertToNegativePattern))
|
|
4883
|
+
};
|
|
4884
|
+
}
|
|
4801
4885
|
tasks.convertPatternGroupToTask = convertPatternGroupToTask;
|
|
4802
4886
|
|
|
4803
|
-
var patterns = {};
|
|
4804
|
-
|
|
4805
|
-
Object.defineProperty(patterns, "__esModule", { value: true });
|
|
4806
|
-
patterns.removeDuplicateSlashes = patterns.transform = void 0;
|
|
4807
|
-
/**
|
|
4808
|
-
* Matches a sequence of two or more consecutive slashes, excluding the first two slashes at the beginning of the string.
|
|
4809
|
-
* The latter is due to the presence of the device path at the beginning of the UNC path.
|
|
4810
|
-
* @todo rewrite to negative lookbehind with the next major release.
|
|
4811
|
-
*/
|
|
4812
|
-
const DOUBLE_SLASH_RE = /(?!^)\/{2,}/g;
|
|
4813
|
-
function transform(patterns) {
|
|
4814
|
-
return patterns.map((pattern) => removeDuplicateSlashes(pattern));
|
|
4815
|
-
}
|
|
4816
|
-
patterns.transform = transform;
|
|
4817
|
-
/**
|
|
4818
|
-
* This package only works with forward slashes as a path separator.
|
|
4819
|
-
* Because of this, we cannot use the standard `path.normalize` method, because on Windows platform it will use of backslashes.
|
|
4820
|
-
*/
|
|
4821
|
-
function removeDuplicateSlashes(pattern) {
|
|
4822
|
-
return pattern.replace(DOUBLE_SLASH_RE, '/');
|
|
4823
|
-
}
|
|
4824
|
-
patterns.removeDuplicateSlashes = removeDuplicateSlashes;
|
|
4825
|
-
|
|
4826
4887
|
var async$7 = {};
|
|
4827
4888
|
|
|
4828
4889
|
var async$6 = {};
|
|
@@ -4909,7 +4970,7 @@ var fs$6 = {};
|
|
|
4909
4970
|
(function (exports) {
|
|
4910
4971
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4911
4972
|
exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0;
|
|
4912
|
-
const fs = require$$0__default$
|
|
4973
|
+
const fs = require$$0__default$4;
|
|
4913
4974
|
exports.FILE_SYSTEM_ADAPTER = {
|
|
4914
4975
|
lstat: fs.lstat,
|
|
4915
4976
|
stat: fs.stat,
|
|
@@ -5260,7 +5321,7 @@ var fs$2 = {};
|
|
|
5260
5321
|
(function (exports) {
|
|
5261
5322
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5262
5323
|
exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0;
|
|
5263
|
-
const fs = require$$0__default$
|
|
5324
|
+
const fs = require$$0__default$4;
|
|
5264
5325
|
exports.FILE_SYSTEM_ADAPTER = {
|
|
5265
5326
|
lstat: fs.lstat,
|
|
5266
5327
|
stat: fs.stat,
|
|
@@ -5279,7 +5340,7 @@ var fs$2 = {};
|
|
|
5279
5340
|
} (fs$2));
|
|
5280
5341
|
|
|
5281
5342
|
Object.defineProperty(settings$2, "__esModule", { value: true });
|
|
5282
|
-
const path$6 = require$$0__default;
|
|
5343
|
+
const path$6 = require$$0__default$1;
|
|
5283
5344
|
const fsStat$3 = out$1;
|
|
5284
5345
|
const fs$1 = fs$2;
|
|
5285
5346
|
let Settings$1 = class Settings {
|
|
@@ -5699,7 +5760,7 @@ let Reader$1 = class Reader {
|
|
|
5699
5760
|
reader$1.default = Reader$1;
|
|
5700
5761
|
|
|
5701
5762
|
Object.defineProperty(async$4, "__esModule", { value: true });
|
|
5702
|
-
const events_1 = require$$2__default
|
|
5763
|
+
const events_1 = require$$2__default;
|
|
5703
5764
|
const fsScandir$2 = out$2;
|
|
5704
5765
|
const fastq = queueExports;
|
|
5705
5766
|
const common$1 = common$3;
|
|
@@ -5828,7 +5889,7 @@ function callSuccessCallback(callback, entries) {
|
|
|
5828
5889
|
var stream$3 = {};
|
|
5829
5890
|
|
|
5830
5891
|
Object.defineProperty(stream$3, "__esModule", { value: true });
|
|
5831
|
-
const stream_1$5 = require$$0__default$
|
|
5892
|
+
const stream_1$5 = require$$0__default$3;
|
|
5832
5893
|
const async_1$3 = async$4;
|
|
5833
5894
|
class StreamProvider {
|
|
5834
5895
|
constructor(_root, _settings) {
|
|
@@ -5941,7 +6002,7 @@ sync$4.default = SyncProvider;
|
|
|
5941
6002
|
var settings$1 = {};
|
|
5942
6003
|
|
|
5943
6004
|
Object.defineProperty(settings$1, "__esModule", { value: true });
|
|
5944
|
-
const path$5 = require$$0__default;
|
|
6005
|
+
const path$5 = require$$0__default$1;
|
|
5945
6006
|
const fsScandir = out$2;
|
|
5946
6007
|
class Settings {
|
|
5947
6008
|
constructor(_options = {}) {
|
|
@@ -6002,129 +6063,129 @@ function getSettings(settingsOrOptions = {}) {
|
|
|
6002
6063
|
|
|
6003
6064
|
var reader = {};
|
|
6004
6065
|
|
|
6005
|
-
Object.defineProperty(reader, "__esModule", { value: true });
|
|
6006
|
-
const path$4 = require$$0__default;
|
|
6007
|
-
const fsStat$2 = out$1;
|
|
6008
|
-
const utils$6 = utils$k;
|
|
6009
|
-
class Reader {
|
|
6010
|
-
constructor(_settings) {
|
|
6011
|
-
this._settings = _settings;
|
|
6012
|
-
this._fsStatSettings = new fsStat$2.Settings({
|
|
6013
|
-
followSymbolicLink: this._settings.followSymbolicLinks,
|
|
6014
|
-
fs: this._settings.fs,
|
|
6015
|
-
throwErrorOnBrokenSymbolicLink: this._settings.followSymbolicLinks
|
|
6016
|
-
});
|
|
6017
|
-
}
|
|
6018
|
-
_getFullEntryPath(filepath) {
|
|
6019
|
-
return path$4.resolve(this._settings.cwd, filepath);
|
|
6020
|
-
}
|
|
6021
|
-
_makeEntry(stats, pattern) {
|
|
6022
|
-
const entry = {
|
|
6023
|
-
name: pattern,
|
|
6024
|
-
path: pattern,
|
|
6025
|
-
dirent: utils$6.fs.createDirentFromStats(pattern, stats)
|
|
6026
|
-
};
|
|
6027
|
-
if (this._settings.stats) {
|
|
6028
|
-
entry.stats = stats;
|
|
6029
|
-
}
|
|
6030
|
-
return entry;
|
|
6031
|
-
}
|
|
6032
|
-
_isFatalError(error) {
|
|
6033
|
-
return !utils$6.errno.isEnoentCodeError(error) && !this._settings.suppressErrors;
|
|
6034
|
-
}
|
|
6035
|
-
}
|
|
6066
|
+
Object.defineProperty(reader, "__esModule", { value: true });
|
|
6067
|
+
const path$4 = require$$0__default$1;
|
|
6068
|
+
const fsStat$2 = out$1;
|
|
6069
|
+
const utils$6 = utils$k;
|
|
6070
|
+
class Reader {
|
|
6071
|
+
constructor(_settings) {
|
|
6072
|
+
this._settings = _settings;
|
|
6073
|
+
this._fsStatSettings = new fsStat$2.Settings({
|
|
6074
|
+
followSymbolicLink: this._settings.followSymbolicLinks,
|
|
6075
|
+
fs: this._settings.fs,
|
|
6076
|
+
throwErrorOnBrokenSymbolicLink: this._settings.followSymbolicLinks
|
|
6077
|
+
});
|
|
6078
|
+
}
|
|
6079
|
+
_getFullEntryPath(filepath) {
|
|
6080
|
+
return path$4.resolve(this._settings.cwd, filepath);
|
|
6081
|
+
}
|
|
6082
|
+
_makeEntry(stats, pattern) {
|
|
6083
|
+
const entry = {
|
|
6084
|
+
name: pattern,
|
|
6085
|
+
path: pattern,
|
|
6086
|
+
dirent: utils$6.fs.createDirentFromStats(pattern, stats)
|
|
6087
|
+
};
|
|
6088
|
+
if (this._settings.stats) {
|
|
6089
|
+
entry.stats = stats;
|
|
6090
|
+
}
|
|
6091
|
+
return entry;
|
|
6092
|
+
}
|
|
6093
|
+
_isFatalError(error) {
|
|
6094
|
+
return !utils$6.errno.isEnoentCodeError(error) && !this._settings.suppressErrors;
|
|
6095
|
+
}
|
|
6096
|
+
}
|
|
6036
6097
|
reader.default = Reader;
|
|
6037
6098
|
|
|
6038
6099
|
var stream$2 = {};
|
|
6039
6100
|
|
|
6040
|
-
Object.defineProperty(stream$2, "__esModule", { value: true });
|
|
6041
|
-
const stream_1$3 = require$$0__default$
|
|
6042
|
-
const fsStat$1 = out$1;
|
|
6043
|
-
const fsWalk$2 = out$3;
|
|
6044
|
-
const reader_1$2 = reader;
|
|
6045
|
-
class ReaderStream extends reader_1$2.default {
|
|
6046
|
-
constructor() {
|
|
6047
|
-
super(...arguments);
|
|
6048
|
-
this._walkStream = fsWalk$2.walkStream;
|
|
6049
|
-
this._stat = fsStat$1.stat;
|
|
6050
|
-
}
|
|
6051
|
-
dynamic(root, options) {
|
|
6052
|
-
return this._walkStream(root, options);
|
|
6053
|
-
}
|
|
6054
|
-
static(patterns, options) {
|
|
6055
|
-
const filepaths = patterns.map(this._getFullEntryPath, this);
|
|
6056
|
-
const stream = new stream_1$3.PassThrough({ objectMode: true });
|
|
6057
|
-
stream._write = (index, _enc, done) => {
|
|
6058
|
-
return this._getEntry(filepaths[index], patterns[index], options)
|
|
6059
|
-
.then((entry) => {
|
|
6060
|
-
if (entry !== null && options.entryFilter(entry)) {
|
|
6061
|
-
stream.push(entry);
|
|
6062
|
-
}
|
|
6063
|
-
if (index === filepaths.length - 1) {
|
|
6064
|
-
stream.end();
|
|
6065
|
-
}
|
|
6066
|
-
done();
|
|
6067
|
-
})
|
|
6068
|
-
.catch(done);
|
|
6069
|
-
};
|
|
6070
|
-
for (let i = 0; i < filepaths.length; i++) {
|
|
6071
|
-
stream.write(i);
|
|
6072
|
-
}
|
|
6073
|
-
return stream;
|
|
6074
|
-
}
|
|
6075
|
-
_getEntry(filepath, pattern, options) {
|
|
6076
|
-
return this._getStat(filepath)
|
|
6077
|
-
.then((stats) => this._makeEntry(stats, pattern))
|
|
6078
|
-
.catch((error) => {
|
|
6079
|
-
if (options.errorFilter(error)) {
|
|
6080
|
-
return null;
|
|
6081
|
-
}
|
|
6082
|
-
throw error;
|
|
6083
|
-
});
|
|
6084
|
-
}
|
|
6085
|
-
_getStat(filepath) {
|
|
6086
|
-
return new Promise((resolve, reject) => {
|
|
6087
|
-
this._stat(filepath, this._fsStatSettings, (error, stats) => {
|
|
6088
|
-
return error === null ? resolve(stats) : reject(error);
|
|
6089
|
-
});
|
|
6090
|
-
});
|
|
6091
|
-
}
|
|
6092
|
-
}
|
|
6101
|
+
Object.defineProperty(stream$2, "__esModule", { value: true });
|
|
6102
|
+
const stream_1$3 = require$$0__default$3;
|
|
6103
|
+
const fsStat$1 = out$1;
|
|
6104
|
+
const fsWalk$2 = out$3;
|
|
6105
|
+
const reader_1$2 = reader;
|
|
6106
|
+
class ReaderStream extends reader_1$2.default {
|
|
6107
|
+
constructor() {
|
|
6108
|
+
super(...arguments);
|
|
6109
|
+
this._walkStream = fsWalk$2.walkStream;
|
|
6110
|
+
this._stat = fsStat$1.stat;
|
|
6111
|
+
}
|
|
6112
|
+
dynamic(root, options) {
|
|
6113
|
+
return this._walkStream(root, options);
|
|
6114
|
+
}
|
|
6115
|
+
static(patterns, options) {
|
|
6116
|
+
const filepaths = patterns.map(this._getFullEntryPath, this);
|
|
6117
|
+
const stream = new stream_1$3.PassThrough({ objectMode: true });
|
|
6118
|
+
stream._write = (index, _enc, done) => {
|
|
6119
|
+
return this._getEntry(filepaths[index], patterns[index], options)
|
|
6120
|
+
.then((entry) => {
|
|
6121
|
+
if (entry !== null && options.entryFilter(entry)) {
|
|
6122
|
+
stream.push(entry);
|
|
6123
|
+
}
|
|
6124
|
+
if (index === filepaths.length - 1) {
|
|
6125
|
+
stream.end();
|
|
6126
|
+
}
|
|
6127
|
+
done();
|
|
6128
|
+
})
|
|
6129
|
+
.catch(done);
|
|
6130
|
+
};
|
|
6131
|
+
for (let i = 0; i < filepaths.length; i++) {
|
|
6132
|
+
stream.write(i);
|
|
6133
|
+
}
|
|
6134
|
+
return stream;
|
|
6135
|
+
}
|
|
6136
|
+
_getEntry(filepath, pattern, options) {
|
|
6137
|
+
return this._getStat(filepath)
|
|
6138
|
+
.then((stats) => this._makeEntry(stats, pattern))
|
|
6139
|
+
.catch((error) => {
|
|
6140
|
+
if (options.errorFilter(error)) {
|
|
6141
|
+
return null;
|
|
6142
|
+
}
|
|
6143
|
+
throw error;
|
|
6144
|
+
});
|
|
6145
|
+
}
|
|
6146
|
+
_getStat(filepath) {
|
|
6147
|
+
return new Promise((resolve, reject) => {
|
|
6148
|
+
this._stat(filepath, this._fsStatSettings, (error, stats) => {
|
|
6149
|
+
return error === null ? resolve(stats) : reject(error);
|
|
6150
|
+
});
|
|
6151
|
+
});
|
|
6152
|
+
}
|
|
6153
|
+
}
|
|
6093
6154
|
stream$2.default = ReaderStream;
|
|
6094
6155
|
|
|
6095
|
-
Object.defineProperty(async$6, "__esModule", { value: true });
|
|
6096
|
-
const fsWalk$1 = out$3;
|
|
6097
|
-
const reader_1$1 = reader;
|
|
6098
|
-
const stream_1$2 = stream$2;
|
|
6099
|
-
class ReaderAsync extends reader_1$1.default {
|
|
6100
|
-
constructor() {
|
|
6101
|
-
super(...arguments);
|
|
6102
|
-
this._walkAsync = fsWalk$1.walk;
|
|
6103
|
-
this._readerStream = new stream_1$2.default(this._settings);
|
|
6104
|
-
}
|
|
6105
|
-
dynamic(root, options) {
|
|
6106
|
-
return new Promise((resolve, reject) => {
|
|
6107
|
-
this._walkAsync(root, options, (error, entries) => {
|
|
6108
|
-
if (error === null) {
|
|
6109
|
-
resolve(entries);
|
|
6110
|
-
}
|
|
6111
|
-
else {
|
|
6112
|
-
reject(error);
|
|
6113
|
-
}
|
|
6114
|
-
});
|
|
6115
|
-
});
|
|
6116
|
-
}
|
|
6117
|
-
async static(patterns, options) {
|
|
6118
|
-
const entries = [];
|
|
6119
|
-
const stream = this._readerStream.static(patterns, options);
|
|
6120
|
-
// After #235, replace it with an asynchronous iterator.
|
|
6121
|
-
return new Promise((resolve, reject) => {
|
|
6122
|
-
stream.once('error', reject);
|
|
6123
|
-
stream.on('data', (entry) => entries.push(entry));
|
|
6124
|
-
stream.once('end', () => resolve(entries));
|
|
6125
|
-
});
|
|
6126
|
-
}
|
|
6127
|
-
}
|
|
6156
|
+
Object.defineProperty(async$6, "__esModule", { value: true });
|
|
6157
|
+
const fsWalk$1 = out$3;
|
|
6158
|
+
const reader_1$1 = reader;
|
|
6159
|
+
const stream_1$2 = stream$2;
|
|
6160
|
+
class ReaderAsync extends reader_1$1.default {
|
|
6161
|
+
constructor() {
|
|
6162
|
+
super(...arguments);
|
|
6163
|
+
this._walkAsync = fsWalk$1.walk;
|
|
6164
|
+
this._readerStream = new stream_1$2.default(this._settings);
|
|
6165
|
+
}
|
|
6166
|
+
dynamic(root, options) {
|
|
6167
|
+
return new Promise((resolve, reject) => {
|
|
6168
|
+
this._walkAsync(root, options, (error, entries) => {
|
|
6169
|
+
if (error === null) {
|
|
6170
|
+
resolve(entries);
|
|
6171
|
+
}
|
|
6172
|
+
else {
|
|
6173
|
+
reject(error);
|
|
6174
|
+
}
|
|
6175
|
+
});
|
|
6176
|
+
});
|
|
6177
|
+
}
|
|
6178
|
+
async static(patterns, options) {
|
|
6179
|
+
const entries = [];
|
|
6180
|
+
const stream = this._readerStream.static(patterns, options);
|
|
6181
|
+
// After #235, replace it with an asynchronous iterator.
|
|
6182
|
+
return new Promise((resolve, reject) => {
|
|
6183
|
+
stream.once('error', reject);
|
|
6184
|
+
stream.on('data', (entry) => entries.push(entry));
|
|
6185
|
+
stream.once('end', () => resolve(entries));
|
|
6186
|
+
});
|
|
6187
|
+
}
|
|
6188
|
+
}
|
|
6128
6189
|
async$6.default = ReaderAsync;
|
|
6129
6190
|
|
|
6130
6191
|
var provider = {};
|
|
@@ -6135,568 +6196,594 @@ var partial = {};
|
|
|
6135
6196
|
|
|
6136
6197
|
var matcher = {};
|
|
6137
6198
|
|
|
6138
|
-
Object.defineProperty(matcher, "__esModule", { value: true });
|
|
6139
|
-
const utils$5 = utils$k;
|
|
6140
|
-
class Matcher {
|
|
6141
|
-
constructor(_patterns, _settings, _micromatchOptions) {
|
|
6142
|
-
this._patterns = _patterns;
|
|
6143
|
-
this._settings = _settings;
|
|
6144
|
-
this._micromatchOptions = _micromatchOptions;
|
|
6145
|
-
this._storage = [];
|
|
6146
|
-
this._fillStorage();
|
|
6147
|
-
}
|
|
6148
|
-
_fillStorage() {
|
|
6149
|
-
|
|
6150
|
-
|
|
6151
|
-
|
|
6152
|
-
|
|
6153
|
-
|
|
6154
|
-
|
|
6155
|
-
|
|
6156
|
-
|
|
6157
|
-
|
|
6158
|
-
|
|
6159
|
-
|
|
6160
|
-
|
|
6161
|
-
|
|
6162
|
-
|
|
6163
|
-
|
|
6164
|
-
|
|
6165
|
-
|
|
6166
|
-
|
|
6167
|
-
|
|
6168
|
-
|
|
6169
|
-
|
|
6170
|
-
|
|
6171
|
-
|
|
6172
|
-
|
|
6173
|
-
|
|
6174
|
-
}
|
|
6175
|
-
|
|
6176
|
-
|
|
6177
|
-
|
|
6178
|
-
|
|
6179
|
-
|
|
6180
|
-
|
|
6181
|
-
}
|
|
6182
|
-
_splitSegmentsIntoSections(segments) {
|
|
6183
|
-
return utils$5.array.splitWhen(segments, (segment) => segment.dynamic && utils$5.pattern.hasGlobStar(segment.pattern));
|
|
6184
|
-
}
|
|
6185
|
-
}
|
|
6199
|
+
Object.defineProperty(matcher, "__esModule", { value: true });
|
|
6200
|
+
const utils$5 = utils$k;
|
|
6201
|
+
class Matcher {
|
|
6202
|
+
constructor(_patterns, _settings, _micromatchOptions) {
|
|
6203
|
+
this._patterns = _patterns;
|
|
6204
|
+
this._settings = _settings;
|
|
6205
|
+
this._micromatchOptions = _micromatchOptions;
|
|
6206
|
+
this._storage = [];
|
|
6207
|
+
this._fillStorage();
|
|
6208
|
+
}
|
|
6209
|
+
_fillStorage() {
|
|
6210
|
+
for (const pattern of this._patterns) {
|
|
6211
|
+
const segments = this._getPatternSegments(pattern);
|
|
6212
|
+
const sections = this._splitSegmentsIntoSections(segments);
|
|
6213
|
+
this._storage.push({
|
|
6214
|
+
complete: sections.length <= 1,
|
|
6215
|
+
pattern,
|
|
6216
|
+
segments,
|
|
6217
|
+
sections
|
|
6218
|
+
});
|
|
6219
|
+
}
|
|
6220
|
+
}
|
|
6221
|
+
_getPatternSegments(pattern) {
|
|
6222
|
+
const parts = utils$5.pattern.getPatternParts(pattern, this._micromatchOptions);
|
|
6223
|
+
return parts.map((part) => {
|
|
6224
|
+
const dynamic = utils$5.pattern.isDynamicPattern(part, this._settings);
|
|
6225
|
+
if (!dynamic) {
|
|
6226
|
+
return {
|
|
6227
|
+
dynamic: false,
|
|
6228
|
+
pattern: part
|
|
6229
|
+
};
|
|
6230
|
+
}
|
|
6231
|
+
return {
|
|
6232
|
+
dynamic: true,
|
|
6233
|
+
pattern: part,
|
|
6234
|
+
patternRe: utils$5.pattern.makeRe(part, this._micromatchOptions)
|
|
6235
|
+
};
|
|
6236
|
+
});
|
|
6237
|
+
}
|
|
6238
|
+
_splitSegmentsIntoSections(segments) {
|
|
6239
|
+
return utils$5.array.splitWhen(segments, (segment) => segment.dynamic && utils$5.pattern.hasGlobStar(segment.pattern));
|
|
6240
|
+
}
|
|
6241
|
+
}
|
|
6186
6242
|
matcher.default = Matcher;
|
|
6187
6243
|
|
|
6188
|
-
Object.defineProperty(partial, "__esModule", { value: true });
|
|
6189
|
-
const matcher_1 = matcher;
|
|
6190
|
-
class PartialMatcher extends matcher_1.default {
|
|
6191
|
-
match(filepath) {
|
|
6192
|
-
const parts = filepath.split('/');
|
|
6193
|
-
const levels = parts.length;
|
|
6194
|
-
const patterns = this._storage.filter((info) => !info.complete || info.segments.length > levels);
|
|
6195
|
-
for (const pattern of patterns) {
|
|
6196
|
-
const section = pattern.sections[0];
|
|
6197
|
-
/**
|
|
6198
|
-
* In this case, the pattern has a globstar and we must read all directories unconditionally,
|
|
6199
|
-
* but only if the level has reached the end of the first group.
|
|
6200
|
-
*
|
|
6201
|
-
* fixtures/{a,b}/**
|
|
6202
|
-
* ^ true/false ^ always true
|
|
6203
|
-
*/
|
|
6204
|
-
if (!pattern.complete && levels > section.length) {
|
|
6205
|
-
return true;
|
|
6206
|
-
}
|
|
6207
|
-
const match = parts.every((part, index) => {
|
|
6208
|
-
const segment = pattern.segments[index];
|
|
6209
|
-
if (segment.dynamic && segment.patternRe.test(part)) {
|
|
6210
|
-
return true;
|
|
6211
|
-
}
|
|
6212
|
-
if (!segment.dynamic && segment.pattern === part) {
|
|
6213
|
-
return true;
|
|
6214
|
-
}
|
|
6215
|
-
return false;
|
|
6216
|
-
});
|
|
6217
|
-
if (match) {
|
|
6218
|
-
return true;
|
|
6219
|
-
}
|
|
6220
|
-
}
|
|
6221
|
-
return false;
|
|
6222
|
-
}
|
|
6223
|
-
}
|
|
6244
|
+
Object.defineProperty(partial, "__esModule", { value: true });
|
|
6245
|
+
const matcher_1 = matcher;
|
|
6246
|
+
class PartialMatcher extends matcher_1.default {
|
|
6247
|
+
match(filepath) {
|
|
6248
|
+
const parts = filepath.split('/');
|
|
6249
|
+
const levels = parts.length;
|
|
6250
|
+
const patterns = this._storage.filter((info) => !info.complete || info.segments.length > levels);
|
|
6251
|
+
for (const pattern of patterns) {
|
|
6252
|
+
const section = pattern.sections[0];
|
|
6253
|
+
/**
|
|
6254
|
+
* In this case, the pattern has a globstar and we must read all directories unconditionally,
|
|
6255
|
+
* but only if the level has reached the end of the first group.
|
|
6256
|
+
*
|
|
6257
|
+
* fixtures/{a,b}/**
|
|
6258
|
+
* ^ true/false ^ always true
|
|
6259
|
+
*/
|
|
6260
|
+
if (!pattern.complete && levels > section.length) {
|
|
6261
|
+
return true;
|
|
6262
|
+
}
|
|
6263
|
+
const match = parts.every((part, index) => {
|
|
6264
|
+
const segment = pattern.segments[index];
|
|
6265
|
+
if (segment.dynamic && segment.patternRe.test(part)) {
|
|
6266
|
+
return true;
|
|
6267
|
+
}
|
|
6268
|
+
if (!segment.dynamic && segment.pattern === part) {
|
|
6269
|
+
return true;
|
|
6270
|
+
}
|
|
6271
|
+
return false;
|
|
6272
|
+
});
|
|
6273
|
+
if (match) {
|
|
6274
|
+
return true;
|
|
6275
|
+
}
|
|
6276
|
+
}
|
|
6277
|
+
return false;
|
|
6278
|
+
}
|
|
6279
|
+
}
|
|
6224
6280
|
partial.default = PartialMatcher;
|
|
6225
6281
|
|
|
6226
|
-
Object.defineProperty(deep, "__esModule", { value: true });
|
|
6227
|
-
const utils$4 = utils$k;
|
|
6228
|
-
const partial_1 = partial;
|
|
6229
|
-
class DeepFilter {
|
|
6230
|
-
constructor(_settings, _micromatchOptions) {
|
|
6231
|
-
this._settings = _settings;
|
|
6232
|
-
this._micromatchOptions = _micromatchOptions;
|
|
6233
|
-
}
|
|
6234
|
-
getFilter(basePath, positive, negative) {
|
|
6235
|
-
const matcher = this._getMatcher(positive);
|
|
6236
|
-
const negativeRe = this._getNegativePatternsRe(negative);
|
|
6237
|
-
return (entry) => this._filter(basePath, entry, matcher, negativeRe);
|
|
6238
|
-
}
|
|
6239
|
-
_getMatcher(patterns) {
|
|
6240
|
-
return new partial_1.default(patterns, this._settings, this._micromatchOptions);
|
|
6241
|
-
}
|
|
6242
|
-
_getNegativePatternsRe(patterns) {
|
|
6243
|
-
const affectDepthOfReadingPatterns = patterns.filter(utils$4.pattern.isAffectDepthOfReadingPattern);
|
|
6244
|
-
return utils$4.pattern.convertPatternsToRe(affectDepthOfReadingPatterns, this._micromatchOptions);
|
|
6245
|
-
}
|
|
6246
|
-
_filter(basePath, entry, matcher, negativeRe) {
|
|
6247
|
-
if (this._isSkippedByDeep(basePath, entry.path)) {
|
|
6248
|
-
return false;
|
|
6249
|
-
}
|
|
6250
|
-
if (this._isSkippedSymbolicLink(entry)) {
|
|
6251
|
-
return false;
|
|
6252
|
-
}
|
|
6253
|
-
const filepath = utils$4.path.removeLeadingDotSegment(entry.path);
|
|
6254
|
-
if (this._isSkippedByPositivePatterns(filepath, matcher)) {
|
|
6255
|
-
return false;
|
|
6256
|
-
}
|
|
6257
|
-
return this._isSkippedByNegativePatterns(filepath, negativeRe);
|
|
6258
|
-
}
|
|
6259
|
-
_isSkippedByDeep(basePath, entryPath) {
|
|
6260
|
-
/**
|
|
6261
|
-
* Avoid unnecessary depth calculations when it doesn't matter.
|
|
6262
|
-
*/
|
|
6263
|
-
if (this._settings.deep === Infinity) {
|
|
6264
|
-
return false;
|
|
6265
|
-
}
|
|
6266
|
-
return this._getEntryLevel(basePath, entryPath) >= this._settings.deep;
|
|
6267
|
-
}
|
|
6268
|
-
_getEntryLevel(basePath, entryPath) {
|
|
6269
|
-
const entryPathDepth = entryPath.split('/').length;
|
|
6270
|
-
if (basePath === '') {
|
|
6271
|
-
return entryPathDepth;
|
|
6272
|
-
}
|
|
6273
|
-
const basePathDepth = basePath.split('/').length;
|
|
6274
|
-
return entryPathDepth - basePathDepth;
|
|
6275
|
-
}
|
|
6276
|
-
_isSkippedSymbolicLink(entry) {
|
|
6277
|
-
return !this._settings.followSymbolicLinks && entry.dirent.isSymbolicLink();
|
|
6278
|
-
}
|
|
6279
|
-
_isSkippedByPositivePatterns(entryPath, matcher) {
|
|
6280
|
-
return !this._settings.baseNameMatch && !matcher.match(entryPath);
|
|
6281
|
-
}
|
|
6282
|
-
_isSkippedByNegativePatterns(entryPath, patternsRe) {
|
|
6283
|
-
return !utils$4.pattern.matchAny(entryPath, patternsRe);
|
|
6284
|
-
}
|
|
6285
|
-
}
|
|
6282
|
+
Object.defineProperty(deep, "__esModule", { value: true });
|
|
6283
|
+
const utils$4 = utils$k;
|
|
6284
|
+
const partial_1 = partial;
|
|
6285
|
+
class DeepFilter {
|
|
6286
|
+
constructor(_settings, _micromatchOptions) {
|
|
6287
|
+
this._settings = _settings;
|
|
6288
|
+
this._micromatchOptions = _micromatchOptions;
|
|
6289
|
+
}
|
|
6290
|
+
getFilter(basePath, positive, negative) {
|
|
6291
|
+
const matcher = this._getMatcher(positive);
|
|
6292
|
+
const negativeRe = this._getNegativePatternsRe(negative);
|
|
6293
|
+
return (entry) => this._filter(basePath, entry, matcher, negativeRe);
|
|
6294
|
+
}
|
|
6295
|
+
_getMatcher(patterns) {
|
|
6296
|
+
return new partial_1.default(patterns, this._settings, this._micromatchOptions);
|
|
6297
|
+
}
|
|
6298
|
+
_getNegativePatternsRe(patterns) {
|
|
6299
|
+
const affectDepthOfReadingPatterns = patterns.filter(utils$4.pattern.isAffectDepthOfReadingPattern);
|
|
6300
|
+
return utils$4.pattern.convertPatternsToRe(affectDepthOfReadingPatterns, this._micromatchOptions);
|
|
6301
|
+
}
|
|
6302
|
+
_filter(basePath, entry, matcher, negativeRe) {
|
|
6303
|
+
if (this._isSkippedByDeep(basePath, entry.path)) {
|
|
6304
|
+
return false;
|
|
6305
|
+
}
|
|
6306
|
+
if (this._isSkippedSymbolicLink(entry)) {
|
|
6307
|
+
return false;
|
|
6308
|
+
}
|
|
6309
|
+
const filepath = utils$4.path.removeLeadingDotSegment(entry.path);
|
|
6310
|
+
if (this._isSkippedByPositivePatterns(filepath, matcher)) {
|
|
6311
|
+
return false;
|
|
6312
|
+
}
|
|
6313
|
+
return this._isSkippedByNegativePatterns(filepath, negativeRe);
|
|
6314
|
+
}
|
|
6315
|
+
_isSkippedByDeep(basePath, entryPath) {
|
|
6316
|
+
/**
|
|
6317
|
+
* Avoid unnecessary depth calculations when it doesn't matter.
|
|
6318
|
+
*/
|
|
6319
|
+
if (this._settings.deep === Infinity) {
|
|
6320
|
+
return false;
|
|
6321
|
+
}
|
|
6322
|
+
return this._getEntryLevel(basePath, entryPath) >= this._settings.deep;
|
|
6323
|
+
}
|
|
6324
|
+
_getEntryLevel(basePath, entryPath) {
|
|
6325
|
+
const entryPathDepth = entryPath.split('/').length;
|
|
6326
|
+
if (basePath === '') {
|
|
6327
|
+
return entryPathDepth;
|
|
6328
|
+
}
|
|
6329
|
+
const basePathDepth = basePath.split('/').length;
|
|
6330
|
+
return entryPathDepth - basePathDepth;
|
|
6331
|
+
}
|
|
6332
|
+
_isSkippedSymbolicLink(entry) {
|
|
6333
|
+
return !this._settings.followSymbolicLinks && entry.dirent.isSymbolicLink();
|
|
6334
|
+
}
|
|
6335
|
+
_isSkippedByPositivePatterns(entryPath, matcher) {
|
|
6336
|
+
return !this._settings.baseNameMatch && !matcher.match(entryPath);
|
|
6337
|
+
}
|
|
6338
|
+
_isSkippedByNegativePatterns(entryPath, patternsRe) {
|
|
6339
|
+
return !utils$4.pattern.matchAny(entryPath, patternsRe);
|
|
6340
|
+
}
|
|
6341
|
+
}
|
|
6286
6342
|
deep.default = DeepFilter;
|
|
6287
6343
|
|
|
6288
6344
|
var entry$1 = {};
|
|
6289
6345
|
|
|
6290
|
-
Object.defineProperty(entry$1, "__esModule", { value: true });
|
|
6291
|
-
const utils$3 = utils$k;
|
|
6292
|
-
class EntryFilter {
|
|
6293
|
-
constructor(_settings, _micromatchOptions) {
|
|
6294
|
-
this._settings = _settings;
|
|
6295
|
-
this._micromatchOptions = _micromatchOptions;
|
|
6296
|
-
this.index = new Map();
|
|
6297
|
-
}
|
|
6298
|
-
getFilter(positive, negative) {
|
|
6299
|
-
const positiveRe = utils$3.pattern.convertPatternsToRe(positive, this._micromatchOptions);
|
|
6300
|
-
const negativeRe = utils$3.pattern.convertPatternsToRe(negative, this._micromatchOptions);
|
|
6301
|
-
return (entry) => this._filter(entry, positiveRe, negativeRe);
|
|
6302
|
-
}
|
|
6303
|
-
_filter(entry, positiveRe, negativeRe) {
|
|
6304
|
-
|
|
6305
|
-
|
|
6306
|
-
|
|
6307
|
-
|
|
6308
|
-
|
|
6309
|
-
|
|
6310
|
-
|
|
6311
|
-
|
|
6312
|
-
|
|
6313
|
-
|
|
6314
|
-
const isDirectory = entry.dirent.isDirectory();
|
|
6315
|
-
const isMatched = this._isMatchToPatterns(filepath, positiveRe, isDirectory) && !this._isMatchToPatterns(
|
|
6316
|
-
if (this._settings.unique && isMatched) {
|
|
6317
|
-
this._createIndexRecord(
|
|
6318
|
-
}
|
|
6319
|
-
return isMatched;
|
|
6320
|
-
}
|
|
6321
|
-
_isDuplicateEntry(
|
|
6322
|
-
return this.index.has(
|
|
6323
|
-
}
|
|
6324
|
-
_createIndexRecord(
|
|
6325
|
-
this.index.set(
|
|
6326
|
-
}
|
|
6327
|
-
_onlyFileFilter(entry) {
|
|
6328
|
-
return this._settings.onlyFiles && !entry.dirent.isFile();
|
|
6329
|
-
}
|
|
6330
|
-
_onlyDirectoryFilter(entry) {
|
|
6331
|
-
return this._settings.onlyDirectories && !entry.dirent.isDirectory();
|
|
6332
|
-
}
|
|
6333
|
-
_isSkippedByAbsoluteNegativePatterns(entryPath, patternsRe) {
|
|
6334
|
-
if (!this._settings.absolute) {
|
|
6335
|
-
return false;
|
|
6336
|
-
}
|
|
6337
|
-
const fullpath = utils$3.path.makeAbsolute(this._settings.cwd, entryPath);
|
|
6338
|
-
return utils$3.pattern.matchAny(fullpath, patternsRe);
|
|
6339
|
-
}
|
|
6340
|
-
_isMatchToPatterns(
|
|
6341
|
-
|
|
6342
|
-
|
|
6343
|
-
|
|
6344
|
-
//
|
|
6345
|
-
|
|
6346
|
-
|
|
6347
|
-
|
|
6348
|
-
|
|
6349
|
-
|
|
6350
|
-
|
|
6351
|
-
}
|
|
6346
|
+
Object.defineProperty(entry$1, "__esModule", { value: true });
|
|
6347
|
+
const utils$3 = utils$k;
|
|
6348
|
+
class EntryFilter {
|
|
6349
|
+
constructor(_settings, _micromatchOptions) {
|
|
6350
|
+
this._settings = _settings;
|
|
6351
|
+
this._micromatchOptions = _micromatchOptions;
|
|
6352
|
+
this.index = new Map();
|
|
6353
|
+
}
|
|
6354
|
+
getFilter(positive, negative) {
|
|
6355
|
+
const positiveRe = utils$3.pattern.convertPatternsToRe(positive, this._micromatchOptions);
|
|
6356
|
+
const negativeRe = utils$3.pattern.convertPatternsToRe(negative, Object.assign(Object.assign({}, this._micromatchOptions), { dot: true }));
|
|
6357
|
+
return (entry) => this._filter(entry, positiveRe, negativeRe);
|
|
6358
|
+
}
|
|
6359
|
+
_filter(entry, positiveRe, negativeRe) {
|
|
6360
|
+
const filepath = utils$3.path.removeLeadingDotSegment(entry.path);
|
|
6361
|
+
if (this._settings.unique && this._isDuplicateEntry(filepath)) {
|
|
6362
|
+
return false;
|
|
6363
|
+
}
|
|
6364
|
+
if (this._onlyFileFilter(entry) || this._onlyDirectoryFilter(entry)) {
|
|
6365
|
+
return false;
|
|
6366
|
+
}
|
|
6367
|
+
if (this._isSkippedByAbsoluteNegativePatterns(filepath, negativeRe)) {
|
|
6368
|
+
return false;
|
|
6369
|
+
}
|
|
6370
|
+
const isDirectory = entry.dirent.isDirectory();
|
|
6371
|
+
const isMatched = this._isMatchToPatterns(filepath, positiveRe, isDirectory) && !this._isMatchToPatterns(filepath, negativeRe, isDirectory);
|
|
6372
|
+
if (this._settings.unique && isMatched) {
|
|
6373
|
+
this._createIndexRecord(filepath);
|
|
6374
|
+
}
|
|
6375
|
+
return isMatched;
|
|
6376
|
+
}
|
|
6377
|
+
_isDuplicateEntry(filepath) {
|
|
6378
|
+
return this.index.has(filepath);
|
|
6379
|
+
}
|
|
6380
|
+
_createIndexRecord(filepath) {
|
|
6381
|
+
this.index.set(filepath, undefined);
|
|
6382
|
+
}
|
|
6383
|
+
_onlyFileFilter(entry) {
|
|
6384
|
+
return this._settings.onlyFiles && !entry.dirent.isFile();
|
|
6385
|
+
}
|
|
6386
|
+
_onlyDirectoryFilter(entry) {
|
|
6387
|
+
return this._settings.onlyDirectories && !entry.dirent.isDirectory();
|
|
6388
|
+
}
|
|
6389
|
+
_isSkippedByAbsoluteNegativePatterns(entryPath, patternsRe) {
|
|
6390
|
+
if (!this._settings.absolute) {
|
|
6391
|
+
return false;
|
|
6392
|
+
}
|
|
6393
|
+
const fullpath = utils$3.path.makeAbsolute(this._settings.cwd, entryPath);
|
|
6394
|
+
return utils$3.pattern.matchAny(fullpath, patternsRe);
|
|
6395
|
+
}
|
|
6396
|
+
_isMatchToPatterns(filepath, patternsRe, isDirectory) {
|
|
6397
|
+
// Trying to match files and directories by patterns.
|
|
6398
|
+
const isMatched = utils$3.pattern.matchAny(filepath, patternsRe);
|
|
6399
|
+
// A pattern with a trailling slash can be used for directory matching.
|
|
6400
|
+
// To apply such pattern, we need to add a tralling slash to the path.
|
|
6401
|
+
if (!isMatched && isDirectory) {
|
|
6402
|
+
return utils$3.pattern.matchAny(filepath + '/', patternsRe);
|
|
6403
|
+
}
|
|
6404
|
+
return isMatched;
|
|
6405
|
+
}
|
|
6406
|
+
}
|
|
6352
6407
|
entry$1.default = EntryFilter;
|
|
6353
6408
|
|
|
6354
6409
|
var error = {};
|
|
6355
6410
|
|
|
6356
|
-
Object.defineProperty(error, "__esModule", { value: true });
|
|
6357
|
-
const utils$2 = utils$k;
|
|
6358
|
-
class ErrorFilter {
|
|
6359
|
-
constructor(_settings) {
|
|
6360
|
-
this._settings = _settings;
|
|
6361
|
-
}
|
|
6362
|
-
getFilter() {
|
|
6363
|
-
return (error) => this._isNonFatalError(error);
|
|
6364
|
-
}
|
|
6365
|
-
_isNonFatalError(error) {
|
|
6366
|
-
return utils$2.errno.isEnoentCodeError(error) || this._settings.suppressErrors;
|
|
6367
|
-
}
|
|
6368
|
-
}
|
|
6411
|
+
Object.defineProperty(error, "__esModule", { value: true });
|
|
6412
|
+
const utils$2 = utils$k;
|
|
6413
|
+
class ErrorFilter {
|
|
6414
|
+
constructor(_settings) {
|
|
6415
|
+
this._settings = _settings;
|
|
6416
|
+
}
|
|
6417
|
+
getFilter() {
|
|
6418
|
+
return (error) => this._isNonFatalError(error);
|
|
6419
|
+
}
|
|
6420
|
+
_isNonFatalError(error) {
|
|
6421
|
+
return utils$2.errno.isEnoentCodeError(error) || this._settings.suppressErrors;
|
|
6422
|
+
}
|
|
6423
|
+
}
|
|
6369
6424
|
error.default = ErrorFilter;
|
|
6370
6425
|
|
|
6371
6426
|
var entry = {};
|
|
6372
6427
|
|
|
6373
|
-
Object.defineProperty(entry, "__esModule", { value: true });
|
|
6374
|
-
const utils$1 = utils$k;
|
|
6375
|
-
class EntryTransformer {
|
|
6376
|
-
constructor(_settings) {
|
|
6377
|
-
this._settings = _settings;
|
|
6378
|
-
}
|
|
6379
|
-
getTransformer() {
|
|
6380
|
-
return (entry) => this._transform(entry);
|
|
6381
|
-
}
|
|
6382
|
-
_transform(entry) {
|
|
6383
|
-
let filepath = entry.path;
|
|
6384
|
-
if (this._settings.absolute) {
|
|
6385
|
-
filepath = utils$1.path.makeAbsolute(this._settings.cwd, filepath);
|
|
6386
|
-
filepath = utils$1.path.unixify(filepath);
|
|
6387
|
-
}
|
|
6388
|
-
if (this._settings.markDirectories && entry.dirent.isDirectory()) {
|
|
6389
|
-
filepath += '/';
|
|
6390
|
-
}
|
|
6391
|
-
if (!this._settings.objectMode) {
|
|
6392
|
-
return filepath;
|
|
6393
|
-
}
|
|
6394
|
-
return Object.assign(Object.assign({}, entry), { path: filepath });
|
|
6395
|
-
}
|
|
6396
|
-
}
|
|
6428
|
+
Object.defineProperty(entry, "__esModule", { value: true });
|
|
6429
|
+
const utils$1 = utils$k;
|
|
6430
|
+
class EntryTransformer {
|
|
6431
|
+
constructor(_settings) {
|
|
6432
|
+
this._settings = _settings;
|
|
6433
|
+
}
|
|
6434
|
+
getTransformer() {
|
|
6435
|
+
return (entry) => this._transform(entry);
|
|
6436
|
+
}
|
|
6437
|
+
_transform(entry) {
|
|
6438
|
+
let filepath = entry.path;
|
|
6439
|
+
if (this._settings.absolute) {
|
|
6440
|
+
filepath = utils$1.path.makeAbsolute(this._settings.cwd, filepath);
|
|
6441
|
+
filepath = utils$1.path.unixify(filepath);
|
|
6442
|
+
}
|
|
6443
|
+
if (this._settings.markDirectories && entry.dirent.isDirectory()) {
|
|
6444
|
+
filepath += '/';
|
|
6445
|
+
}
|
|
6446
|
+
if (!this._settings.objectMode) {
|
|
6447
|
+
return filepath;
|
|
6448
|
+
}
|
|
6449
|
+
return Object.assign(Object.assign({}, entry), { path: filepath });
|
|
6450
|
+
}
|
|
6451
|
+
}
|
|
6397
6452
|
entry.default = EntryTransformer;
|
|
6398
6453
|
|
|
6399
|
-
Object.defineProperty(provider, "__esModule", { value: true });
|
|
6400
|
-
const path$3 = require$$0__default;
|
|
6401
|
-
const deep_1 = deep;
|
|
6402
|
-
const entry_1 = entry$1;
|
|
6403
|
-
const error_1 = error;
|
|
6404
|
-
const entry_2 = entry;
|
|
6405
|
-
class Provider {
|
|
6406
|
-
constructor(_settings) {
|
|
6407
|
-
this._settings = _settings;
|
|
6408
|
-
this.errorFilter = new error_1.default(this._settings);
|
|
6409
|
-
this.entryFilter = new entry_1.default(this._settings, this._getMicromatchOptions());
|
|
6410
|
-
this.deepFilter = new deep_1.default(this._settings, this._getMicromatchOptions());
|
|
6411
|
-
this.entryTransformer = new entry_2.default(this._settings);
|
|
6412
|
-
}
|
|
6413
|
-
_getRootDirectory(task) {
|
|
6414
|
-
return path$3.resolve(this._settings.cwd, task.base);
|
|
6415
|
-
}
|
|
6416
|
-
_getReaderOptions(task) {
|
|
6417
|
-
const basePath = task.base === '.' ? '' : task.base;
|
|
6418
|
-
return {
|
|
6419
|
-
basePath,
|
|
6420
|
-
pathSegmentSeparator: '/',
|
|
6421
|
-
concurrency: this._settings.concurrency,
|
|
6422
|
-
deepFilter: this.deepFilter.getFilter(basePath, task.positive, task.negative),
|
|
6423
|
-
entryFilter: this.entryFilter.getFilter(task.positive, task.negative),
|
|
6424
|
-
errorFilter: this.errorFilter.getFilter(),
|
|
6425
|
-
followSymbolicLinks: this._settings.followSymbolicLinks,
|
|
6426
|
-
fs: this._settings.fs,
|
|
6427
|
-
stats: this._settings.stats,
|
|
6428
|
-
throwErrorOnBrokenSymbolicLink: this._settings.throwErrorOnBrokenSymbolicLink,
|
|
6429
|
-
transform: this.entryTransformer.getTransformer()
|
|
6430
|
-
};
|
|
6431
|
-
}
|
|
6432
|
-
_getMicromatchOptions() {
|
|
6433
|
-
return {
|
|
6434
|
-
dot: this._settings.dot,
|
|
6435
|
-
matchBase: this._settings.baseNameMatch,
|
|
6436
|
-
nobrace: !this._settings.braceExpansion,
|
|
6437
|
-
nocase: !this._settings.caseSensitiveMatch,
|
|
6438
|
-
noext: !this._settings.extglob,
|
|
6439
|
-
noglobstar: !this._settings.globstar,
|
|
6440
|
-
posix: true,
|
|
6441
|
-
strictSlashes: false
|
|
6442
|
-
};
|
|
6443
|
-
}
|
|
6444
|
-
}
|
|
6454
|
+
Object.defineProperty(provider, "__esModule", { value: true });
|
|
6455
|
+
const path$3 = require$$0__default$1;
|
|
6456
|
+
const deep_1 = deep;
|
|
6457
|
+
const entry_1 = entry$1;
|
|
6458
|
+
const error_1 = error;
|
|
6459
|
+
const entry_2 = entry;
|
|
6460
|
+
class Provider {
|
|
6461
|
+
constructor(_settings) {
|
|
6462
|
+
this._settings = _settings;
|
|
6463
|
+
this.errorFilter = new error_1.default(this._settings);
|
|
6464
|
+
this.entryFilter = new entry_1.default(this._settings, this._getMicromatchOptions());
|
|
6465
|
+
this.deepFilter = new deep_1.default(this._settings, this._getMicromatchOptions());
|
|
6466
|
+
this.entryTransformer = new entry_2.default(this._settings);
|
|
6467
|
+
}
|
|
6468
|
+
_getRootDirectory(task) {
|
|
6469
|
+
return path$3.resolve(this._settings.cwd, task.base);
|
|
6470
|
+
}
|
|
6471
|
+
_getReaderOptions(task) {
|
|
6472
|
+
const basePath = task.base === '.' ? '' : task.base;
|
|
6473
|
+
return {
|
|
6474
|
+
basePath,
|
|
6475
|
+
pathSegmentSeparator: '/',
|
|
6476
|
+
concurrency: this._settings.concurrency,
|
|
6477
|
+
deepFilter: this.deepFilter.getFilter(basePath, task.positive, task.negative),
|
|
6478
|
+
entryFilter: this.entryFilter.getFilter(task.positive, task.negative),
|
|
6479
|
+
errorFilter: this.errorFilter.getFilter(),
|
|
6480
|
+
followSymbolicLinks: this._settings.followSymbolicLinks,
|
|
6481
|
+
fs: this._settings.fs,
|
|
6482
|
+
stats: this._settings.stats,
|
|
6483
|
+
throwErrorOnBrokenSymbolicLink: this._settings.throwErrorOnBrokenSymbolicLink,
|
|
6484
|
+
transform: this.entryTransformer.getTransformer()
|
|
6485
|
+
};
|
|
6486
|
+
}
|
|
6487
|
+
_getMicromatchOptions() {
|
|
6488
|
+
return {
|
|
6489
|
+
dot: this._settings.dot,
|
|
6490
|
+
matchBase: this._settings.baseNameMatch,
|
|
6491
|
+
nobrace: !this._settings.braceExpansion,
|
|
6492
|
+
nocase: !this._settings.caseSensitiveMatch,
|
|
6493
|
+
noext: !this._settings.extglob,
|
|
6494
|
+
noglobstar: !this._settings.globstar,
|
|
6495
|
+
posix: true,
|
|
6496
|
+
strictSlashes: false
|
|
6497
|
+
};
|
|
6498
|
+
}
|
|
6499
|
+
}
|
|
6445
6500
|
provider.default = Provider;
|
|
6446
6501
|
|
|
6447
|
-
Object.defineProperty(async$7, "__esModule", { value: true });
|
|
6448
|
-
const async_1$1 = async$6;
|
|
6449
|
-
const provider_1$2 = provider;
|
|
6450
|
-
class ProviderAsync extends provider_1$2.default {
|
|
6451
|
-
constructor() {
|
|
6452
|
-
super(...arguments);
|
|
6453
|
-
this._reader = new async_1$1.default(this._settings);
|
|
6454
|
-
}
|
|
6455
|
-
async read(task) {
|
|
6456
|
-
const root = this._getRootDirectory(task);
|
|
6457
|
-
const options = this._getReaderOptions(task);
|
|
6458
|
-
const entries = await this.api(root, task, options);
|
|
6459
|
-
return entries.map((entry) => options.transform(entry));
|
|
6460
|
-
}
|
|
6461
|
-
api(root, task, options) {
|
|
6462
|
-
if (task.dynamic) {
|
|
6463
|
-
return this._reader.dynamic(root, options);
|
|
6464
|
-
}
|
|
6465
|
-
return this._reader.static(task.patterns, options);
|
|
6466
|
-
}
|
|
6467
|
-
}
|
|
6502
|
+
Object.defineProperty(async$7, "__esModule", { value: true });
|
|
6503
|
+
const async_1$1 = async$6;
|
|
6504
|
+
const provider_1$2 = provider;
|
|
6505
|
+
class ProviderAsync extends provider_1$2.default {
|
|
6506
|
+
constructor() {
|
|
6507
|
+
super(...arguments);
|
|
6508
|
+
this._reader = new async_1$1.default(this._settings);
|
|
6509
|
+
}
|
|
6510
|
+
async read(task) {
|
|
6511
|
+
const root = this._getRootDirectory(task);
|
|
6512
|
+
const options = this._getReaderOptions(task);
|
|
6513
|
+
const entries = await this.api(root, task, options);
|
|
6514
|
+
return entries.map((entry) => options.transform(entry));
|
|
6515
|
+
}
|
|
6516
|
+
api(root, task, options) {
|
|
6517
|
+
if (task.dynamic) {
|
|
6518
|
+
return this._reader.dynamic(root, options);
|
|
6519
|
+
}
|
|
6520
|
+
return this._reader.static(task.patterns, options);
|
|
6521
|
+
}
|
|
6522
|
+
}
|
|
6468
6523
|
async$7.default = ProviderAsync;
|
|
6469
6524
|
|
|
6470
6525
|
var stream$1 = {};
|
|
6471
6526
|
|
|
6472
|
-
Object.defineProperty(stream$1, "__esModule", { value: true });
|
|
6473
|
-
const stream_1$1 = require$$0__default$
|
|
6474
|
-
const stream_2 = stream$2;
|
|
6475
|
-
const provider_1$1 = provider;
|
|
6476
|
-
class ProviderStream extends provider_1$1.default {
|
|
6477
|
-
constructor() {
|
|
6478
|
-
super(...arguments);
|
|
6479
|
-
this._reader = new stream_2.default(this._settings);
|
|
6480
|
-
}
|
|
6481
|
-
read(task) {
|
|
6482
|
-
const root = this._getRootDirectory(task);
|
|
6483
|
-
const options = this._getReaderOptions(task);
|
|
6484
|
-
const source = this.api(root, task, options);
|
|
6485
|
-
const destination = new stream_1$1.Readable({ objectMode: true, read: () => { } });
|
|
6486
|
-
source
|
|
6487
|
-
.once('error', (error) => destination.emit('error', error))
|
|
6488
|
-
.on('data', (entry) => destination.emit('data', options.transform(entry)))
|
|
6489
|
-
.once('end', () => destination.emit('end'));
|
|
6490
|
-
destination
|
|
6491
|
-
.once('close', () => source.destroy());
|
|
6492
|
-
return destination;
|
|
6493
|
-
}
|
|
6494
|
-
api(root, task, options) {
|
|
6495
|
-
if (task.dynamic) {
|
|
6496
|
-
return this._reader.dynamic(root, options);
|
|
6497
|
-
}
|
|
6498
|
-
return this._reader.static(task.patterns, options);
|
|
6499
|
-
}
|
|
6500
|
-
}
|
|
6527
|
+
Object.defineProperty(stream$1, "__esModule", { value: true });
|
|
6528
|
+
const stream_1$1 = require$$0__default$3;
|
|
6529
|
+
const stream_2 = stream$2;
|
|
6530
|
+
const provider_1$1 = provider;
|
|
6531
|
+
class ProviderStream extends provider_1$1.default {
|
|
6532
|
+
constructor() {
|
|
6533
|
+
super(...arguments);
|
|
6534
|
+
this._reader = new stream_2.default(this._settings);
|
|
6535
|
+
}
|
|
6536
|
+
read(task) {
|
|
6537
|
+
const root = this._getRootDirectory(task);
|
|
6538
|
+
const options = this._getReaderOptions(task);
|
|
6539
|
+
const source = this.api(root, task, options);
|
|
6540
|
+
const destination = new stream_1$1.Readable({ objectMode: true, read: () => { } });
|
|
6541
|
+
source
|
|
6542
|
+
.once('error', (error) => destination.emit('error', error))
|
|
6543
|
+
.on('data', (entry) => destination.emit('data', options.transform(entry)))
|
|
6544
|
+
.once('end', () => destination.emit('end'));
|
|
6545
|
+
destination
|
|
6546
|
+
.once('close', () => source.destroy());
|
|
6547
|
+
return destination;
|
|
6548
|
+
}
|
|
6549
|
+
api(root, task, options) {
|
|
6550
|
+
if (task.dynamic) {
|
|
6551
|
+
return this._reader.dynamic(root, options);
|
|
6552
|
+
}
|
|
6553
|
+
return this._reader.static(task.patterns, options);
|
|
6554
|
+
}
|
|
6555
|
+
}
|
|
6501
6556
|
stream$1.default = ProviderStream;
|
|
6502
6557
|
|
|
6503
6558
|
var sync$2 = {};
|
|
6504
6559
|
|
|
6505
6560
|
var sync$1 = {};
|
|
6506
6561
|
|
|
6507
|
-
Object.defineProperty(sync$1, "__esModule", { value: true });
|
|
6508
|
-
const fsStat = out$1;
|
|
6509
|
-
const fsWalk = out$3;
|
|
6510
|
-
const reader_1 = reader;
|
|
6511
|
-
class ReaderSync extends reader_1.default {
|
|
6512
|
-
constructor() {
|
|
6513
|
-
super(...arguments);
|
|
6514
|
-
this._walkSync = fsWalk.walkSync;
|
|
6515
|
-
this._statSync = fsStat.statSync;
|
|
6516
|
-
}
|
|
6517
|
-
dynamic(root, options) {
|
|
6518
|
-
return this._walkSync(root, options);
|
|
6519
|
-
}
|
|
6520
|
-
static(patterns, options) {
|
|
6521
|
-
const entries = [];
|
|
6522
|
-
for (const pattern of patterns) {
|
|
6523
|
-
const filepath = this._getFullEntryPath(pattern);
|
|
6524
|
-
const entry = this._getEntry(filepath, pattern, options);
|
|
6525
|
-
if (entry === null || !options.entryFilter(entry)) {
|
|
6526
|
-
continue;
|
|
6527
|
-
}
|
|
6528
|
-
entries.push(entry);
|
|
6529
|
-
}
|
|
6530
|
-
return entries;
|
|
6531
|
-
}
|
|
6532
|
-
_getEntry(filepath, pattern, options) {
|
|
6533
|
-
try {
|
|
6534
|
-
const stats = this._getStat(filepath);
|
|
6535
|
-
return this._makeEntry(stats, pattern);
|
|
6536
|
-
}
|
|
6537
|
-
catch (error) {
|
|
6538
|
-
if (options.errorFilter(error)) {
|
|
6539
|
-
return null;
|
|
6540
|
-
}
|
|
6541
|
-
throw error;
|
|
6542
|
-
}
|
|
6543
|
-
}
|
|
6544
|
-
_getStat(filepath) {
|
|
6545
|
-
return this._statSync(filepath, this._fsStatSettings);
|
|
6546
|
-
}
|
|
6547
|
-
}
|
|
6562
|
+
Object.defineProperty(sync$1, "__esModule", { value: true });
|
|
6563
|
+
const fsStat = out$1;
|
|
6564
|
+
const fsWalk = out$3;
|
|
6565
|
+
const reader_1 = reader;
|
|
6566
|
+
class ReaderSync extends reader_1.default {
|
|
6567
|
+
constructor() {
|
|
6568
|
+
super(...arguments);
|
|
6569
|
+
this._walkSync = fsWalk.walkSync;
|
|
6570
|
+
this._statSync = fsStat.statSync;
|
|
6571
|
+
}
|
|
6572
|
+
dynamic(root, options) {
|
|
6573
|
+
return this._walkSync(root, options);
|
|
6574
|
+
}
|
|
6575
|
+
static(patterns, options) {
|
|
6576
|
+
const entries = [];
|
|
6577
|
+
for (const pattern of patterns) {
|
|
6578
|
+
const filepath = this._getFullEntryPath(pattern);
|
|
6579
|
+
const entry = this._getEntry(filepath, pattern, options);
|
|
6580
|
+
if (entry === null || !options.entryFilter(entry)) {
|
|
6581
|
+
continue;
|
|
6582
|
+
}
|
|
6583
|
+
entries.push(entry);
|
|
6584
|
+
}
|
|
6585
|
+
return entries;
|
|
6586
|
+
}
|
|
6587
|
+
_getEntry(filepath, pattern, options) {
|
|
6588
|
+
try {
|
|
6589
|
+
const stats = this._getStat(filepath);
|
|
6590
|
+
return this._makeEntry(stats, pattern);
|
|
6591
|
+
}
|
|
6592
|
+
catch (error) {
|
|
6593
|
+
if (options.errorFilter(error)) {
|
|
6594
|
+
return null;
|
|
6595
|
+
}
|
|
6596
|
+
throw error;
|
|
6597
|
+
}
|
|
6598
|
+
}
|
|
6599
|
+
_getStat(filepath) {
|
|
6600
|
+
return this._statSync(filepath, this._fsStatSettings);
|
|
6601
|
+
}
|
|
6602
|
+
}
|
|
6548
6603
|
sync$1.default = ReaderSync;
|
|
6549
6604
|
|
|
6550
|
-
Object.defineProperty(sync$2, "__esModule", { value: true });
|
|
6551
|
-
const sync_1$1 = sync$1;
|
|
6552
|
-
const provider_1 = provider;
|
|
6553
|
-
class ProviderSync extends provider_1.default {
|
|
6554
|
-
constructor() {
|
|
6555
|
-
super(...arguments);
|
|
6556
|
-
this._reader = new sync_1$1.default(this._settings);
|
|
6557
|
-
}
|
|
6558
|
-
read(task) {
|
|
6559
|
-
const root = this._getRootDirectory(task);
|
|
6560
|
-
const options = this._getReaderOptions(task);
|
|
6561
|
-
const entries = this.api(root, task, options);
|
|
6562
|
-
return entries.map(options.transform);
|
|
6563
|
-
}
|
|
6564
|
-
api(root, task, options) {
|
|
6565
|
-
if (task.dynamic) {
|
|
6566
|
-
return this._reader.dynamic(root, options);
|
|
6567
|
-
}
|
|
6568
|
-
return this._reader.static(task.patterns, options);
|
|
6569
|
-
}
|
|
6570
|
-
}
|
|
6605
|
+
Object.defineProperty(sync$2, "__esModule", { value: true });
|
|
6606
|
+
const sync_1$1 = sync$1;
|
|
6607
|
+
const provider_1 = provider;
|
|
6608
|
+
class ProviderSync extends provider_1.default {
|
|
6609
|
+
constructor() {
|
|
6610
|
+
super(...arguments);
|
|
6611
|
+
this._reader = new sync_1$1.default(this._settings);
|
|
6612
|
+
}
|
|
6613
|
+
read(task) {
|
|
6614
|
+
const root = this._getRootDirectory(task);
|
|
6615
|
+
const options = this._getReaderOptions(task);
|
|
6616
|
+
const entries = this.api(root, task, options);
|
|
6617
|
+
return entries.map(options.transform);
|
|
6618
|
+
}
|
|
6619
|
+
api(root, task, options) {
|
|
6620
|
+
if (task.dynamic) {
|
|
6621
|
+
return this._reader.dynamic(root, options);
|
|
6622
|
+
}
|
|
6623
|
+
return this._reader.static(task.patterns, options);
|
|
6624
|
+
}
|
|
6625
|
+
}
|
|
6571
6626
|
sync$2.default = ProviderSync;
|
|
6572
6627
|
|
|
6573
6628
|
var settings = {};
|
|
6574
6629
|
|
|
6575
6630
|
(function (exports) {
|
|
6576
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6577
|
-
exports.DEFAULT_FILE_SYSTEM_ADAPTER = void 0;
|
|
6578
|
-
const fs = require$$0__default$
|
|
6579
|
-
const os = require$$
|
|
6580
|
-
/**
|
|
6581
|
-
* The `os.cpus` method can return zero. We expect the number of cores to be greater than zero.
|
|
6582
|
-
* https://github.com/nodejs/node/blob/7faeddf23a98c53896f8b574a6e66589e8fb1eb8/lib/os.js#L106-L107
|
|
6583
|
-
*/
|
|
6584
|
-
const CPU_COUNT = Math.max(os.cpus().length, 1);
|
|
6585
|
-
exports.DEFAULT_FILE_SYSTEM_ADAPTER = {
|
|
6586
|
-
lstat: fs.lstat,
|
|
6587
|
-
lstatSync: fs.lstatSync,
|
|
6588
|
-
stat: fs.stat,
|
|
6589
|
-
statSync: fs.statSync,
|
|
6590
|
-
readdir: fs.readdir,
|
|
6591
|
-
readdirSync: fs.readdirSync
|
|
6592
|
-
};
|
|
6593
|
-
class Settings {
|
|
6594
|
-
constructor(_options = {}) {
|
|
6595
|
-
this._options = _options;
|
|
6596
|
-
this.absolute = this._getValue(this._options.absolute, false);
|
|
6597
|
-
this.baseNameMatch = this._getValue(this._options.baseNameMatch, false);
|
|
6598
|
-
this.braceExpansion = this._getValue(this._options.braceExpansion, true);
|
|
6599
|
-
this.caseSensitiveMatch = this._getValue(this._options.caseSensitiveMatch, true);
|
|
6600
|
-
this.concurrency = this._getValue(this._options.concurrency, CPU_COUNT);
|
|
6601
|
-
this.cwd = this._getValue(this._options.cwd, process.cwd());
|
|
6602
|
-
this.deep = this._getValue(this._options.deep, Infinity);
|
|
6603
|
-
this.dot = this._getValue(this._options.dot, false);
|
|
6604
|
-
this.extglob = this._getValue(this._options.extglob, true);
|
|
6605
|
-
this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, true);
|
|
6606
|
-
this.fs = this._getFileSystemMethods(this._options.fs);
|
|
6607
|
-
this.globstar = this._getValue(this._options.globstar, true);
|
|
6608
|
-
this.ignore = this._getValue(this._options.ignore, []);
|
|
6609
|
-
this.markDirectories = this._getValue(this._options.markDirectories, false);
|
|
6610
|
-
this.objectMode = this._getValue(this._options.objectMode, false);
|
|
6611
|
-
this.onlyDirectories = this._getValue(this._options.onlyDirectories, false);
|
|
6612
|
-
this.onlyFiles = this._getValue(this._options.onlyFiles, true);
|
|
6613
|
-
this.stats = this._getValue(this._options.stats, false);
|
|
6614
|
-
this.suppressErrors = this._getValue(this._options.suppressErrors, false);
|
|
6615
|
-
this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, false);
|
|
6616
|
-
this.unique = this._getValue(this._options.unique, true);
|
|
6617
|
-
if (this.onlyDirectories) {
|
|
6618
|
-
this.onlyFiles = false;
|
|
6619
|
-
}
|
|
6620
|
-
if (this.stats) {
|
|
6621
|
-
this.objectMode = true;
|
|
6622
|
-
}
|
|
6623
|
-
}
|
|
6624
|
-
_getValue(option, value) {
|
|
6625
|
-
return option === undefined ? value : option;
|
|
6626
|
-
}
|
|
6627
|
-
_getFileSystemMethods(methods = {}) {
|
|
6628
|
-
return Object.assign(Object.assign({}, exports.DEFAULT_FILE_SYSTEM_ADAPTER), methods);
|
|
6629
|
-
}
|
|
6630
|
-
}
|
|
6631
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6632
|
+
exports.DEFAULT_FILE_SYSTEM_ADAPTER = void 0;
|
|
6633
|
+
const fs = require$$0__default$4;
|
|
6634
|
+
const os = require$$0__default;
|
|
6635
|
+
/**
|
|
6636
|
+
* The `os.cpus` method can return zero. We expect the number of cores to be greater than zero.
|
|
6637
|
+
* https://github.com/nodejs/node/blob/7faeddf23a98c53896f8b574a6e66589e8fb1eb8/lib/os.js#L106-L107
|
|
6638
|
+
*/
|
|
6639
|
+
const CPU_COUNT = Math.max(os.cpus().length, 1);
|
|
6640
|
+
exports.DEFAULT_FILE_SYSTEM_ADAPTER = {
|
|
6641
|
+
lstat: fs.lstat,
|
|
6642
|
+
lstatSync: fs.lstatSync,
|
|
6643
|
+
stat: fs.stat,
|
|
6644
|
+
statSync: fs.statSync,
|
|
6645
|
+
readdir: fs.readdir,
|
|
6646
|
+
readdirSync: fs.readdirSync
|
|
6647
|
+
};
|
|
6648
|
+
class Settings {
|
|
6649
|
+
constructor(_options = {}) {
|
|
6650
|
+
this._options = _options;
|
|
6651
|
+
this.absolute = this._getValue(this._options.absolute, false);
|
|
6652
|
+
this.baseNameMatch = this._getValue(this._options.baseNameMatch, false);
|
|
6653
|
+
this.braceExpansion = this._getValue(this._options.braceExpansion, true);
|
|
6654
|
+
this.caseSensitiveMatch = this._getValue(this._options.caseSensitiveMatch, true);
|
|
6655
|
+
this.concurrency = this._getValue(this._options.concurrency, CPU_COUNT);
|
|
6656
|
+
this.cwd = this._getValue(this._options.cwd, process.cwd());
|
|
6657
|
+
this.deep = this._getValue(this._options.deep, Infinity);
|
|
6658
|
+
this.dot = this._getValue(this._options.dot, false);
|
|
6659
|
+
this.extglob = this._getValue(this._options.extglob, true);
|
|
6660
|
+
this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, true);
|
|
6661
|
+
this.fs = this._getFileSystemMethods(this._options.fs);
|
|
6662
|
+
this.globstar = this._getValue(this._options.globstar, true);
|
|
6663
|
+
this.ignore = this._getValue(this._options.ignore, []);
|
|
6664
|
+
this.markDirectories = this._getValue(this._options.markDirectories, false);
|
|
6665
|
+
this.objectMode = this._getValue(this._options.objectMode, false);
|
|
6666
|
+
this.onlyDirectories = this._getValue(this._options.onlyDirectories, false);
|
|
6667
|
+
this.onlyFiles = this._getValue(this._options.onlyFiles, true);
|
|
6668
|
+
this.stats = this._getValue(this._options.stats, false);
|
|
6669
|
+
this.suppressErrors = this._getValue(this._options.suppressErrors, false);
|
|
6670
|
+
this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, false);
|
|
6671
|
+
this.unique = this._getValue(this._options.unique, true);
|
|
6672
|
+
if (this.onlyDirectories) {
|
|
6673
|
+
this.onlyFiles = false;
|
|
6674
|
+
}
|
|
6675
|
+
if (this.stats) {
|
|
6676
|
+
this.objectMode = true;
|
|
6677
|
+
}
|
|
6678
|
+
}
|
|
6679
|
+
_getValue(option, value) {
|
|
6680
|
+
return option === undefined ? value : option;
|
|
6681
|
+
}
|
|
6682
|
+
_getFileSystemMethods(methods = {}) {
|
|
6683
|
+
return Object.assign(Object.assign({}, exports.DEFAULT_FILE_SYSTEM_ADAPTER), methods);
|
|
6684
|
+
}
|
|
6685
|
+
}
|
|
6631
6686
|
exports.default = Settings;
|
|
6632
6687
|
} (settings));
|
|
6633
6688
|
|
|
6634
|
-
const taskManager = tasks;
|
|
6635
|
-
const
|
|
6636
|
-
const
|
|
6637
|
-
const
|
|
6638
|
-
const
|
|
6639
|
-
const
|
|
6640
|
-
|
|
6641
|
-
|
|
6642
|
-
|
|
6643
|
-
const
|
|
6644
|
-
|
|
6645
|
-
|
|
6646
|
-
|
|
6647
|
-
//
|
|
6648
|
-
|
|
6649
|
-
|
|
6650
|
-
|
|
6651
|
-
|
|
6652
|
-
|
|
6653
|
-
|
|
6654
|
-
|
|
6655
|
-
|
|
6656
|
-
|
|
6657
|
-
|
|
6658
|
-
|
|
6659
|
-
|
|
6660
|
-
|
|
6661
|
-
|
|
6662
|
-
|
|
6663
|
-
|
|
6664
|
-
|
|
6665
|
-
|
|
6666
|
-
|
|
6667
|
-
|
|
6668
|
-
|
|
6669
|
-
|
|
6670
|
-
|
|
6671
|
-
|
|
6672
|
-
|
|
6673
|
-
|
|
6674
|
-
|
|
6675
|
-
|
|
6676
|
-
|
|
6677
|
-
|
|
6678
|
-
|
|
6679
|
-
|
|
6680
|
-
|
|
6681
|
-
|
|
6682
|
-
|
|
6683
|
-
|
|
6684
|
-
|
|
6685
|
-
|
|
6686
|
-
|
|
6687
|
-
|
|
6688
|
-
|
|
6689
|
-
|
|
6690
|
-
|
|
6691
|
-
|
|
6692
|
-
|
|
6693
|
-
function
|
|
6694
|
-
|
|
6695
|
-
|
|
6696
|
-
|
|
6697
|
-
|
|
6698
|
-
|
|
6699
|
-
|
|
6689
|
+
const taskManager = tasks;
|
|
6690
|
+
const async_1 = async$7;
|
|
6691
|
+
const stream_1 = stream$1;
|
|
6692
|
+
const sync_1 = sync$2;
|
|
6693
|
+
const settings_1 = settings;
|
|
6694
|
+
const utils = utils$k;
|
|
6695
|
+
async function FastGlob(source, options) {
|
|
6696
|
+
assertPatternsInput(source);
|
|
6697
|
+
const works = getWorks(source, async_1.default, options);
|
|
6698
|
+
const result = await Promise.all(works);
|
|
6699
|
+
return utils.array.flatten(result);
|
|
6700
|
+
}
|
|
6701
|
+
// https://github.com/typescript-eslint/typescript-eslint/issues/60
|
|
6702
|
+
// eslint-disable-next-line no-redeclare
|
|
6703
|
+
(function (FastGlob) {
|
|
6704
|
+
FastGlob.glob = FastGlob;
|
|
6705
|
+
FastGlob.globSync = sync;
|
|
6706
|
+
FastGlob.globStream = stream;
|
|
6707
|
+
FastGlob.async = FastGlob;
|
|
6708
|
+
function sync(source, options) {
|
|
6709
|
+
assertPatternsInput(source);
|
|
6710
|
+
const works = getWorks(source, sync_1.default, options);
|
|
6711
|
+
return utils.array.flatten(works);
|
|
6712
|
+
}
|
|
6713
|
+
FastGlob.sync = sync;
|
|
6714
|
+
function stream(source, options) {
|
|
6715
|
+
assertPatternsInput(source);
|
|
6716
|
+
const works = getWorks(source, stream_1.default, options);
|
|
6717
|
+
/**
|
|
6718
|
+
* The stream returned by the provider cannot work with an asynchronous iterator.
|
|
6719
|
+
* To support asynchronous iterators, regardless of the number of tasks, we always multiplex streams.
|
|
6720
|
+
* This affects performance (+25%). I don't see best solution right now.
|
|
6721
|
+
*/
|
|
6722
|
+
return utils.stream.merge(works);
|
|
6723
|
+
}
|
|
6724
|
+
FastGlob.stream = stream;
|
|
6725
|
+
function generateTasks(source, options) {
|
|
6726
|
+
assertPatternsInput(source);
|
|
6727
|
+
const patterns = [].concat(source);
|
|
6728
|
+
const settings = new settings_1.default(options);
|
|
6729
|
+
return taskManager.generate(patterns, settings);
|
|
6730
|
+
}
|
|
6731
|
+
FastGlob.generateTasks = generateTasks;
|
|
6732
|
+
function isDynamicPattern(source, options) {
|
|
6733
|
+
assertPatternsInput(source);
|
|
6734
|
+
const settings = new settings_1.default(options);
|
|
6735
|
+
return utils.pattern.isDynamicPattern(source, settings);
|
|
6736
|
+
}
|
|
6737
|
+
FastGlob.isDynamicPattern = isDynamicPattern;
|
|
6738
|
+
function escapePath(source) {
|
|
6739
|
+
assertPatternsInput(source);
|
|
6740
|
+
return utils.path.escape(source);
|
|
6741
|
+
}
|
|
6742
|
+
FastGlob.escapePath = escapePath;
|
|
6743
|
+
function convertPathToPattern(source) {
|
|
6744
|
+
assertPatternsInput(source);
|
|
6745
|
+
return utils.path.convertPathToPattern(source);
|
|
6746
|
+
}
|
|
6747
|
+
FastGlob.convertPathToPattern = convertPathToPattern;
|
|
6748
|
+
(function (posix) {
|
|
6749
|
+
function escapePath(source) {
|
|
6750
|
+
assertPatternsInput(source);
|
|
6751
|
+
return utils.path.escapePosixPath(source);
|
|
6752
|
+
}
|
|
6753
|
+
posix.escapePath = escapePath;
|
|
6754
|
+
function convertPathToPattern(source) {
|
|
6755
|
+
assertPatternsInput(source);
|
|
6756
|
+
return utils.path.convertPosixPathToPattern(source);
|
|
6757
|
+
}
|
|
6758
|
+
posix.convertPathToPattern = convertPathToPattern;
|
|
6759
|
+
})(FastGlob.posix || (FastGlob.posix = {}));
|
|
6760
|
+
(function (win32) {
|
|
6761
|
+
function escapePath(source) {
|
|
6762
|
+
assertPatternsInput(source);
|
|
6763
|
+
return utils.path.escapeWindowsPath(source);
|
|
6764
|
+
}
|
|
6765
|
+
win32.escapePath = escapePath;
|
|
6766
|
+
function convertPathToPattern(source) {
|
|
6767
|
+
assertPatternsInput(source);
|
|
6768
|
+
return utils.path.convertWindowsPathToPattern(source);
|
|
6769
|
+
}
|
|
6770
|
+
win32.convertPathToPattern = convertPathToPattern;
|
|
6771
|
+
})(FastGlob.win32 || (FastGlob.win32 = {}));
|
|
6772
|
+
})(FastGlob || (FastGlob = {}));
|
|
6773
|
+
function getWorks(source, _Provider, options) {
|
|
6774
|
+
const patterns = [].concat(source);
|
|
6775
|
+
const settings = new settings_1.default(options);
|
|
6776
|
+
const tasks = taskManager.generate(patterns, settings);
|
|
6777
|
+
const provider = new _Provider(settings);
|
|
6778
|
+
return tasks.map(provider.read, provider);
|
|
6779
|
+
}
|
|
6780
|
+
function assertPatternsInput(input) {
|
|
6781
|
+
const source = [].concat(input);
|
|
6782
|
+
const isValidSource = source.every((item) => utils.string.isString(item) && !utils.string.isEmpty(item));
|
|
6783
|
+
if (!isValidSource) {
|
|
6784
|
+
throw new TypeError('Patterns must be a string (non empty) or an array of strings');
|
|
6785
|
+
}
|
|
6786
|
+
}
|
|
6700
6787
|
var out = FastGlob;
|
|
6701
6788
|
|
|
6702
6789
|
const fg = /*@__PURE__*/getDefaultExportFromCjs$1(out);
|
|
@@ -7581,18 +7668,14 @@ async function getTextAssetContent(filepath, limit = 300) {
|
|
|
7581
7668
|
async function getPackages(root) {
|
|
7582
7669
|
const pkgPath = resolve(root, "package.json");
|
|
7583
7670
|
const data = JSON.parse(await fs$1$1.promises.readFile(pkgPath, "utf-8").catch(() => "{}"));
|
|
7584
|
-
const categorizedPackages = {};
|
|
7585
7671
|
const packages = {};
|
|
7586
7672
|
for (const type of ["dependencies", "devDependencies", "optionalDependencies", "peerDependencies"]) {
|
|
7587
|
-
|
|
7673
|
+
const dep = data[type];
|
|
7674
|
+
if (!dep)
|
|
7588
7675
|
continue;
|
|
7589
|
-
|
|
7590
|
-
|
|
7591
|
-
|
|
7592
|
-
for (const name in categorizedPackages[type]) {
|
|
7593
|
-
const version = categorizedPackages[type][name];
|
|
7594
|
-
packages[name] = {
|
|
7595
|
-
version,
|
|
7676
|
+
for (const depName in dep) {
|
|
7677
|
+
packages[depName] = {
|
|
7678
|
+
version: dep[depName],
|
|
7596
7679
|
type
|
|
7597
7680
|
};
|
|
7598
7681
|
}
|
|
@@ -7602,12 +7685,14 @@ async function getPackages(root) {
|
|
|
7602
7685
|
};
|
|
7603
7686
|
}
|
|
7604
7687
|
|
|
7605
|
-
|
|
7606
|
-
|
|
7607
|
-
|
|
7608
|
-
|
|
7609
|
-
|
|
7610
|
-
}
|
|
7688
|
+
function npmRun(agent) {
|
|
7689
|
+
return (args) => {
|
|
7690
|
+
if (args.length > 1)
|
|
7691
|
+
return `${agent} run ${args[0]} -- ${args.slice(1).join(" ")}`;
|
|
7692
|
+
else
|
|
7693
|
+
return `${agent} run ${args[0]}`;
|
|
7694
|
+
};
|
|
7695
|
+
}
|
|
7611
7696
|
const yarn = {
|
|
7612
7697
|
"agent": "yarn {0}",
|
|
7613
7698
|
"run": "yarn run {0}",
|
|
@@ -7702,10 +7787,6 @@ function getDefaultExportFromCjs (x) {
|
|
|
7702
7787
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
7703
7788
|
}
|
|
7704
7789
|
|
|
7705
|
-
/* istanbul ignore next */
|
|
7706
|
-
typeof process !== 'undefined' &&
|
|
7707
|
-
process.platform === 'win32' ? '\r\n' : '\n';
|
|
7708
|
-
|
|
7709
7790
|
/*
|
|
7710
7791
|
How it works:
|
|
7711
7792
|
`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.
|
|
@@ -7987,11 +8068,7 @@ process.env.NI_CONFIG_FILE;
|
|
|
7987
8068
|
const home = process.platform === "win32" ? process.env.USERPROFILE : process.env.HOME;
|
|
7988
8069
|
path$3__default.join(home || "~/", ".nirc");
|
|
7989
8070
|
|
|
7990
|
-
var
|
|
7991
|
-
var crossSpawn = {
|
|
7992
|
-
get exports(){ return crossSpawnExports; },
|
|
7993
|
-
set exports(v){ crossSpawnExports = v; },
|
|
7994
|
-
};
|
|
8071
|
+
var crossSpawn$1 = {exports: {}};
|
|
7995
8072
|
|
|
7996
8073
|
var windows;
|
|
7997
8074
|
var hasRequiredWindows;
|
|
@@ -8002,7 +8079,7 @@ function requireWindows () {
|
|
|
8002
8079
|
windows = isexe;
|
|
8003
8080
|
isexe.sync = sync;
|
|
8004
8081
|
|
|
8005
|
-
var fs = require$$0__default$
|
|
8082
|
+
var fs = require$$0__default$4;
|
|
8006
8083
|
|
|
8007
8084
|
function checkPathExt (path, options) {
|
|
8008
8085
|
var pathext = options.pathExt !== undefined ?
|
|
@@ -8053,7 +8130,7 @@ function requireMode () {
|
|
|
8053
8130
|
mode = isexe;
|
|
8054
8131
|
isexe.sync = sync;
|
|
8055
8132
|
|
|
8056
|
-
var fs = require$$0__default$
|
|
8133
|
+
var fs = require$$0__default$4;
|
|
8057
8134
|
|
|
8058
8135
|
function isexe (path, options, cb) {
|
|
8059
8136
|
fs.stat(path, function (er, stat) {
|
|
@@ -8155,7 +8232,7 @@ const isWindows$1 = process.platform === 'win32' ||
|
|
|
8155
8232
|
process.env.OSTYPE === 'cygwin' ||
|
|
8156
8233
|
process.env.OSTYPE === 'msys';
|
|
8157
8234
|
|
|
8158
|
-
const path$2 = require$$0__default;
|
|
8235
|
+
const path$2 = require$$0__default$1;
|
|
8159
8236
|
const COLON = isWindows$1 ? ';' : ':';
|
|
8160
8237
|
const isexe$1 = isexe_1;
|
|
8161
8238
|
|
|
@@ -8193,7 +8270,7 @@ const getPathInfo$1 = (cmd, opt) => {
|
|
|
8193
8270
|
}
|
|
8194
8271
|
};
|
|
8195
8272
|
|
|
8196
|
-
const which$
|
|
8273
|
+
const which$3 = (cmd, opt, cb) => {
|
|
8197
8274
|
if (typeof opt === 'function') {
|
|
8198
8275
|
cb = opt;
|
|
8199
8276
|
opt = {};
|
|
@@ -8274,14 +8351,10 @@ const whichSync$1 = (cmd, opt) => {
|
|
|
8274
8351
|
throw getNotFoundError$1(cmd)
|
|
8275
8352
|
};
|
|
8276
8353
|
|
|
8277
|
-
var which_1 = which$
|
|
8278
|
-
which$
|
|
8354
|
+
var which_1 = which$3;
|
|
8355
|
+
which$3.sync = whichSync$1;
|
|
8279
8356
|
|
|
8280
|
-
var
|
|
8281
|
-
var pathKey$2 = {
|
|
8282
|
-
get exports(){ return pathKeyExports; },
|
|
8283
|
-
set exports(v){ pathKeyExports = v; },
|
|
8284
|
-
};
|
|
8357
|
+
var pathKey$2 = {exports: {}};
|
|
8285
8358
|
|
|
8286
8359
|
const pathKey$1 = (options = {}) => {
|
|
8287
8360
|
const environment = options.env || process.env;
|
|
@@ -8296,10 +8369,12 @@ const pathKey$1 = (options = {}) => {
|
|
|
8296
8369
|
|
|
8297
8370
|
pathKey$2.exports = pathKey$1;
|
|
8298
8371
|
// TODO: Remove this for the next major release
|
|
8299
|
-
|
|
8372
|
+
pathKey$2.exports.default = pathKey$1;
|
|
8300
8373
|
|
|
8301
|
-
|
|
8302
|
-
|
|
8374
|
+
var pathKeyExports = pathKey$2.exports;
|
|
8375
|
+
|
|
8376
|
+
const path$1 = require$$0__default$1;
|
|
8377
|
+
const which$2 = which_1;
|
|
8303
8378
|
const getPathKey = pathKeyExports;
|
|
8304
8379
|
|
|
8305
8380
|
function resolveCommandAttempt(parsed, withoutPathExt) {
|
|
@@ -8322,7 +8397,7 @@ function resolveCommandAttempt(parsed, withoutPathExt) {
|
|
|
8322
8397
|
let resolved;
|
|
8323
8398
|
|
|
8324
8399
|
try {
|
|
8325
|
-
resolved = which$
|
|
8400
|
+
resolved = which$2.sync(parsed.command, {
|
|
8326
8401
|
path: env[getPathKey({ env })],
|
|
8327
8402
|
pathExt: withoutPathExt ? path$1.delimiter : undefined,
|
|
8328
8403
|
});
|
|
@@ -8416,7 +8491,7 @@ var shebangCommand$1 = (string = '') => {
|
|
|
8416
8491
|
return argument ? `${binary} ${argument}` : binary;
|
|
8417
8492
|
};
|
|
8418
8493
|
|
|
8419
|
-
const fs = require$$0__default$
|
|
8494
|
+
const fs = require$$0__default$4;
|
|
8420
8495
|
const shebangCommand = shebangCommand$1;
|
|
8421
8496
|
|
|
8422
8497
|
function readShebang$1(command) {
|
|
@@ -8438,7 +8513,7 @@ function readShebang$1(command) {
|
|
|
8438
8513
|
|
|
8439
8514
|
var readShebang_1 = readShebang$1;
|
|
8440
8515
|
|
|
8441
|
-
const path = require$$0__default;
|
|
8516
|
+
const path = require$$0__default$1;
|
|
8442
8517
|
const resolveCommand = resolveCommand_1;
|
|
8443
8518
|
const escape = _escape;
|
|
8444
8519
|
const readShebang = readShebang_1;
|
|
@@ -8617,12 +8692,15 @@ function spawnSync(command, args, options) {
|
|
|
8617
8692
|
return result;
|
|
8618
8693
|
}
|
|
8619
8694
|
|
|
8620
|
-
crossSpawn.exports = spawn;
|
|
8621
|
-
|
|
8622
|
-
|
|
8695
|
+
crossSpawn$1.exports = spawn;
|
|
8696
|
+
crossSpawn$1.exports.spawn = spawn;
|
|
8697
|
+
crossSpawn$1.exports.sync = spawnSync;
|
|
8698
|
+
|
|
8699
|
+
crossSpawn$1.exports._parse = parse;
|
|
8700
|
+
crossSpawn$1.exports._enoent = enoent;
|
|
8623
8701
|
|
|
8624
|
-
crossSpawnExports
|
|
8625
|
-
|
|
8702
|
+
var crossSpawnExports = crossSpawn$1.exports;
|
|
8703
|
+
const crossSpawn = /*@__PURE__*/getDefaultExportFromCjs(crossSpawnExports);
|
|
8626
8704
|
|
|
8627
8705
|
function stripFinalNewline(input) {
|
|
8628
8706
|
const LF = typeof input === 'string' ? '\n' : '\n'.charCodeAt();
|
|
@@ -9106,7 +9184,7 @@ standard
|
|
|
9106
9184
|
})=>{
|
|
9107
9185
|
const{
|
|
9108
9186
|
signals:{[name]:constantSignal}
|
|
9109
|
-
}=os$1.constants;
|
|
9187
|
+
}=os$1$1.constants;
|
|
9110
9188
|
const supported=constantSignal!==undefined;
|
|
9111
9189
|
const number=supported?constantSignal:defaultNumber;
|
|
9112
9190
|
return {name,number,description,supported,action,forced,standard};
|
|
@@ -9165,7 +9243,7 @@ standard
|
|
|
9165
9243
|
|
|
9166
9244
|
|
|
9167
9245
|
const findSignalByNumber=(number,signals)=>{
|
|
9168
|
-
const signal=signals.find(({name})=>os$1.constants.signals[name]===number);
|
|
9246
|
+
const signal=signals.find(({name})=>os$1$1.constants.signals[name]===number);
|
|
9169
9247
|
|
|
9170
9248
|
if(signal!==undefined){
|
|
9171
9249
|
return signal;
|
|
@@ -9291,22 +9369,14 @@ const normalizeStdio = options => {
|
|
|
9291
9369
|
return Array.from({length}, (value, index) => stdio[index]);
|
|
9292
9370
|
};
|
|
9293
9371
|
|
|
9294
|
-
var
|
|
9295
|
-
var signalExit = {
|
|
9296
|
-
get exports(){ return signalExitExports; },
|
|
9297
|
-
set exports(v){ signalExitExports = v; },
|
|
9298
|
-
};
|
|
9372
|
+
var signalExit = {exports: {}};
|
|
9299
9373
|
|
|
9300
|
-
var
|
|
9301
|
-
var signals$1 = {
|
|
9302
|
-
get exports(){ return signalsExports; },
|
|
9303
|
-
set exports(v){ signalsExports = v; },
|
|
9304
|
-
};
|
|
9374
|
+
var signals$1 = {exports: {}};
|
|
9305
9375
|
|
|
9306
9376
|
var hasRequiredSignals;
|
|
9307
9377
|
|
|
9308
9378
|
function requireSignals () {
|
|
9309
|
-
if (hasRequiredSignals) return
|
|
9379
|
+
if (hasRequiredSignals) return signals$1.exports;
|
|
9310
9380
|
hasRequiredSignals = 1;
|
|
9311
9381
|
(function (module) {
|
|
9312
9382
|
// This is not the set of all possible signals.
|
|
@@ -9361,9 +9431,9 @@ function requireSignals () {
|
|
|
9361
9431
|
'SIGSTKFLT',
|
|
9362
9432
|
'SIGUNUSED'
|
|
9363
9433
|
);
|
|
9364
|
-
}
|
|
9365
|
-
} (signals$1));
|
|
9366
|
-
return
|
|
9434
|
+
}
|
|
9435
|
+
} (signals$1));
|
|
9436
|
+
return signals$1.exports;
|
|
9367
9437
|
}
|
|
9368
9438
|
|
|
9369
9439
|
// Note: since nyc uses this module to output coverage, any lines
|
|
@@ -9395,7 +9465,7 @@ if (!processOk(process$1)) {
|
|
|
9395
9465
|
var signals = requireSignals();
|
|
9396
9466
|
var isWin = /^win/i.test(process$1.platform);
|
|
9397
9467
|
|
|
9398
|
-
var EE = require$$2__default
|
|
9468
|
+
var EE = require$$2__default;
|
|
9399
9469
|
/* istanbul ignore if */
|
|
9400
9470
|
if (typeof EE !== 'function') {
|
|
9401
9471
|
EE = EE.EventEmitter;
|
|
@@ -9462,7 +9532,7 @@ if (!processOk(process$1)) {
|
|
|
9462
9532
|
process$1.reallyExit = originalProcessReallyExit;
|
|
9463
9533
|
emitter.count -= 1;
|
|
9464
9534
|
};
|
|
9465
|
-
|
|
9535
|
+
signalExit.exports.unload = unload;
|
|
9466
9536
|
|
|
9467
9537
|
var emit = function emit (event, code, signal) {
|
|
9468
9538
|
/* istanbul ignore if */
|
|
@@ -9503,7 +9573,7 @@ if (!processOk(process$1)) {
|
|
|
9503
9573
|
};
|
|
9504
9574
|
});
|
|
9505
9575
|
|
|
9506
|
-
|
|
9576
|
+
signalExit.exports.signals = function () {
|
|
9507
9577
|
return signals
|
|
9508
9578
|
};
|
|
9509
9579
|
|
|
@@ -9533,7 +9603,7 @@ if (!processOk(process$1)) {
|
|
|
9533
9603
|
process$1.emit = processEmit;
|
|
9534
9604
|
process$1.reallyExit = processReallyExit;
|
|
9535
9605
|
};
|
|
9536
|
-
|
|
9606
|
+
signalExit.exports.load = load;
|
|
9537
9607
|
|
|
9538
9608
|
var originalProcessReallyExit = process$1.reallyExit;
|
|
9539
9609
|
var processReallyExit = function processReallyExit (code) {
|
|
@@ -9569,6 +9639,9 @@ if (!processOk(process$1)) {
|
|
|
9569
9639
|
};
|
|
9570
9640
|
}
|
|
9571
9641
|
|
|
9642
|
+
var signalExitExports = signalExit.exports;
|
|
9643
|
+
const onExit = /*@__PURE__*/getDefaultExportFromCjs(signalExitExports);
|
|
9644
|
+
|
|
9572
9645
|
const DEFAULT_FORCE_KILL_TIMEOUT = 1000 * 5;
|
|
9573
9646
|
|
|
9574
9647
|
// Monkey-patches `childProcess.kill()` to add `forceKillAfterTimeout` behavior
|
|
@@ -9660,7 +9733,7 @@ const setExitHandler = async (spawned, {cleanup, detached}, timedPromise) => {
|
|
|
9660
9733
|
return timedPromise;
|
|
9661
9734
|
}
|
|
9662
9735
|
|
|
9663
|
-
const removeExitHandler =
|
|
9736
|
+
const removeExitHandler = onExit(() => {
|
|
9664
9737
|
spawned.kill();
|
|
9665
9738
|
});
|
|
9666
9739
|
|
|
@@ -9721,13 +9794,9 @@ const addPipeMethods = spawned => {
|
|
|
9721
9794
|
}
|
|
9722
9795
|
};
|
|
9723
9796
|
|
|
9724
|
-
var
|
|
9725
|
-
var getStream$1 = {
|
|
9726
|
-
get exports(){ return getStreamExports; },
|
|
9727
|
-
set exports(v){ getStreamExports = v; },
|
|
9728
|
-
};
|
|
9797
|
+
var getStream$2 = {exports: {}};
|
|
9729
9798
|
|
|
9730
|
-
const {PassThrough: PassThroughStream} = require$$0__default$
|
|
9799
|
+
const {PassThrough: PassThroughStream} = require$$0__default$3;
|
|
9731
9800
|
|
|
9732
9801
|
var bufferStream$1 = options => {
|
|
9733
9802
|
options = {...options};
|
|
@@ -9780,8 +9849,8 @@ var bufferStream$1 = options => {
|
|
|
9780
9849
|
};
|
|
9781
9850
|
|
|
9782
9851
|
const {constants: BufferConstants} = require$$0$5__default;
|
|
9783
|
-
const stream = require$$0__default$
|
|
9784
|
-
const {promisify} = require$$0__default$
|
|
9852
|
+
const stream = require$$0__default$3;
|
|
9853
|
+
const {promisify} = require$$0__default$2;
|
|
9785
9854
|
const bufferStream = bufferStream$1;
|
|
9786
9855
|
|
|
9787
9856
|
const streamPipelinePromisified = promisify(stream.pipeline);
|
|
@@ -9835,12 +9904,15 @@ async function getStream(inputStream, options) {
|
|
|
9835
9904
|
return stream.getBufferedValue();
|
|
9836
9905
|
}
|
|
9837
9906
|
|
|
9838
|
-
getStream$
|
|
9839
|
-
|
|
9840
|
-
|
|
9841
|
-
|
|
9907
|
+
getStream$2.exports = getStream;
|
|
9908
|
+
getStream$2.exports.buffer = (stream, options) => getStream(stream, {...options, encoding: 'buffer'});
|
|
9909
|
+
getStream$2.exports.array = (stream, options) => getStream(stream, {...options, array: true});
|
|
9910
|
+
getStream$2.exports.MaxBufferError = MaxBufferError;
|
|
9842
9911
|
|
|
9843
|
-
|
|
9912
|
+
var getStreamExports = getStream$2.exports;
|
|
9913
|
+
const getStream$1 = /*@__PURE__*/getDefaultExportFromCjs(getStreamExports);
|
|
9914
|
+
|
|
9915
|
+
const { PassThrough } = require$$0__default$3;
|
|
9844
9916
|
|
|
9845
9917
|
var mergeStream = function (/*streams...*/) {
|
|
9846
9918
|
var sources = [];
|
|
@@ -9880,6 +9952,8 @@ var mergeStream = function (/*streams...*/) {
|
|
|
9880
9952
|
}
|
|
9881
9953
|
};
|
|
9882
9954
|
|
|
9955
|
+
const mergeStream$1 = /*@__PURE__*/getDefaultExportFromCjs(mergeStream);
|
|
9956
|
+
|
|
9883
9957
|
const validateInputOptions = input => {
|
|
9884
9958
|
if (input !== undefined) {
|
|
9885
9959
|
throw new TypeError('The `input` and `inputFile` options cannot be both set.');
|
|
@@ -9916,7 +9990,7 @@ const makeAllStream = (spawned, {all}) => {
|
|
|
9916
9990
|
return;
|
|
9917
9991
|
}
|
|
9918
9992
|
|
|
9919
|
-
const mixed = mergeStream();
|
|
9993
|
+
const mixed = mergeStream$1();
|
|
9920
9994
|
|
|
9921
9995
|
if (spawned.stdout) {
|
|
9922
9996
|
mixed.add(spawned.stdout);
|
|
@@ -9951,10 +10025,10 @@ const getStreamPromise = (stream, {encoding, buffer, maxBuffer}) => {
|
|
|
9951
10025
|
}
|
|
9952
10026
|
|
|
9953
10027
|
if (encoding) {
|
|
9954
|
-
return
|
|
10028
|
+
return getStream$1(stream, {encoding, maxBuffer});
|
|
9955
10029
|
}
|
|
9956
10030
|
|
|
9957
|
-
return
|
|
10031
|
+
return getStream$1.buffer(stream, {maxBuffer});
|
|
9958
10032
|
};
|
|
9959
10033
|
|
|
9960
10034
|
// Retrieve result of child process: exit code, signal, error, streams (stdout/stderr/all)
|
|
@@ -10084,7 +10158,7 @@ const getEnv = ({env: envOption, extendEnv, preferLocal, localDir, execPath}) =>
|
|
|
10084
10158
|
};
|
|
10085
10159
|
|
|
10086
10160
|
const handleArguments = (file, args, options = {}) => {
|
|
10087
|
-
const parsed =
|
|
10161
|
+
const parsed = crossSpawn._parse(file, args, options);
|
|
10088
10162
|
file = parsed.command;
|
|
10089
10163
|
args = parsed.args;
|
|
10090
10164
|
options = parsed.options;
|
|
@@ -10391,7 +10465,7 @@ var hasFlag$2 = (flag, argv = process.argv) => {
|
|
|
10391
10465
|
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
10392
10466
|
};
|
|
10393
10467
|
|
|
10394
|
-
const os = require$$
|
|
10468
|
+
const os = require$$0__default;
|
|
10395
10469
|
const tty = require$$1__default;
|
|
10396
10470
|
const hasFlag$1 = hasFlag$2;
|
|
10397
10471
|
|
|
@@ -10621,8 +10695,10 @@ var supportsHyperlinks = {
|
|
|
10621
10695
|
stderr: supportsHyperlink(process.stderr)
|
|
10622
10696
|
};
|
|
10623
10697
|
|
|
10698
|
+
const supportsHyperlinks$1 = /*@__PURE__*/getDefaultExportFromCjs(supportsHyperlinks);
|
|
10699
|
+
|
|
10624
10700
|
function terminalLink(text, url, {target = 'stdout', ...options} = {}) {
|
|
10625
|
-
if (!supportsHyperlinks[target]) {
|
|
10701
|
+
if (!supportsHyperlinks$1[target]) {
|
|
10626
10702
|
// If the fallback has been explicitly disabled, don't modify the text itself.
|
|
10627
10703
|
if (options.fallback === false) {
|
|
10628
10704
|
return text;
|
|
@@ -10634,17 +10710,11 @@ function terminalLink(text, url, {target = 'stdout', ...options} = {}) {
|
|
|
10634
10710
|
return ansiEscapes.link(text, url);
|
|
10635
10711
|
}
|
|
10636
10712
|
|
|
10637
|
-
terminalLink.isSupported = supportsHyperlinks.stdout;
|
|
10713
|
+
terminalLink.isSupported = supportsHyperlinks$1.stdout;
|
|
10638
10714
|
terminalLink.stderr = (text, url, options = {}) => terminalLink(text, url, {target: 'stderr', ...options});
|
|
10639
|
-
terminalLink.stderr.isSupported = supportsHyperlinks.stderr;
|
|
10640
|
-
|
|
10641
|
-
var promptsExports = {};
|
|
10642
|
-
var prompts$3 = {
|
|
10643
|
-
get exports(){ return promptsExports; },
|
|
10644
|
-
set exports(v){ promptsExports = v; },
|
|
10645
|
-
};
|
|
10715
|
+
terminalLink.stderr.isSupported = supportsHyperlinks$1.stderr;
|
|
10646
10716
|
|
|
10647
|
-
var prompts$
|
|
10717
|
+
var prompts$3 = {};
|
|
10648
10718
|
|
|
10649
10719
|
let FORCE_COLOR$1, NODE_DISABLE_COLORS$1, NO_COLOR$1, TERM$1, isTTY$1=true;
|
|
10650
10720
|
if (typeof process !== 'undefined') {
|
|
@@ -11030,7 +11100,7 @@ var util = {
|
|
|
11030
11100
|
|
|
11031
11101
|
const readline = require$$0$7__default;
|
|
11032
11102
|
const { action } = util;
|
|
11033
|
-
const EventEmitter = require$$2__default
|
|
11103
|
+
const EventEmitter = require$$2__default;
|
|
11034
11104
|
const { beep, cursor: cursor$9 } = src;
|
|
11035
11105
|
const color$9 = kleur;
|
|
11036
11106
|
|
|
@@ -13330,10 +13400,10 @@ var elements = {
|
|
|
13330
13400
|
args.suggest = args.suggest || byTitle;
|
|
13331
13401
|
args.choices = [].concat(args.choices || []);
|
|
13332
13402
|
return toPrompt('AutocompletePrompt', args);
|
|
13333
|
-
};
|
|
13334
|
-
} (prompts$
|
|
13403
|
+
};
|
|
13404
|
+
} (prompts$3));
|
|
13335
13405
|
|
|
13336
|
-
const prompts$
|
|
13406
|
+
const prompts$2 = prompts$3;
|
|
13337
13407
|
|
|
13338
13408
|
const passOn = ['suggest', 'format', 'onState', 'validate', 'onRender', 'type'];
|
|
13339
13409
|
const noop = () => {};
|
|
@@ -13384,7 +13454,7 @@ async function prompt(questions=[], { onSubmit=noop, onCancel=noop }={}) {
|
|
|
13384
13454
|
// update vars in case they changed
|
|
13385
13455
|
({ name, type } = question);
|
|
13386
13456
|
|
|
13387
|
-
if (prompts$
|
|
13457
|
+
if (prompts$2[type] === void 0) {
|
|
13388
13458
|
throw new Error(`prompt type (${type}) is not defined`);
|
|
13389
13459
|
}
|
|
13390
13460
|
|
|
@@ -13398,7 +13468,7 @@ async function prompt(questions=[], { onSubmit=noop, onCancel=noop }={}) {
|
|
|
13398
13468
|
|
|
13399
13469
|
try {
|
|
13400
13470
|
// Get the injected answer if there is one or prompt the user
|
|
13401
|
-
answer = prompt._injected ? getInjectedAnswer(prompt._injected, question.initial) : await prompts$
|
|
13471
|
+
answer = prompt._injected ? getInjectedAnswer(prompt._injected, question.initial) : await prompts$2[type](question);
|
|
13402
13472
|
answers[name] = answer = await getFormattedAnswer(question, answer, true);
|
|
13403
13473
|
quit = await onSubmit(question, answer, answers);
|
|
13404
13474
|
} catch (err) {
|
|
@@ -13428,16 +13498,14 @@ function override(answers) {
|
|
|
13428
13498
|
prompt._override = Object.assign({}, answers);
|
|
13429
13499
|
}
|
|
13430
13500
|
|
|
13431
|
-
var lib$1 = Object.assign(prompt, { prompt, prompts: prompts$
|
|
13501
|
+
var lib$1 = Object.assign(prompt, { prompt, prompts: prompts$2, inject, override });
|
|
13432
13502
|
|
|
13433
|
-
|
|
13434
|
-
module.exports = lib$1;
|
|
13435
|
-
} (prompts$3));
|
|
13503
|
+
var prompts = lib$1;
|
|
13436
13504
|
|
|
13437
|
-
const prompts = /*@__PURE__*/getDefaultExportFromCjs(
|
|
13505
|
+
const prompts$1 = /*@__PURE__*/getDefaultExportFromCjs(prompts);
|
|
13438
13506
|
|
|
13439
13507
|
const isexe = isexe_1;
|
|
13440
|
-
const { join, delimiter, sep, posix } = require$$0__default;
|
|
13508
|
+
const { join, delimiter, sep, posix } = require$$0__default$1;
|
|
13441
13509
|
|
|
13442
13510
|
const isWindows = process.platform === 'win32';
|
|
13443
13511
|
|
|
@@ -13467,8 +13535,13 @@ const getPathInfo = (cmd, {
|
|
|
13467
13535
|
];
|
|
13468
13536
|
|
|
13469
13537
|
if (isWindows) {
|
|
13470
|
-
const pathExtExe = optPathExt ||
|
|
13471
|
-
|
|
13538
|
+
const pathExtExe = optPathExt ||
|
|
13539
|
+
['.EXE', '.CMD', '.BAT', '.COM'].join(optDelimiter);
|
|
13540
|
+
const pathExt = pathExtExe.split(optDelimiter).reduce((acc, item) => {
|
|
13541
|
+
acc.push(item);
|
|
13542
|
+
acc.push(item.toLowerCase());
|
|
13543
|
+
return acc
|
|
13544
|
+
}, []);
|
|
13472
13545
|
if (cmd.includes('.') && pathExt[0] !== '') {
|
|
13473
13546
|
pathExt.unshift('');
|
|
13474
13547
|
}
|
|
@@ -13547,15 +13620,17 @@ const whichSync = (cmd, opt = {}) => {
|
|
|
13547
13620
|
var lib = which;
|
|
13548
13621
|
which.sync = whichSync;
|
|
13549
13622
|
|
|
13623
|
+
const which$1 = /*@__PURE__*/getDefaultExportFromCjs(lib);
|
|
13624
|
+
|
|
13550
13625
|
path$3$1.join(os$1__default.tmpdir(), "antfu-ni");
|
|
13551
13626
|
function exclude(arr, v) {
|
|
13552
13627
|
return arr.slice().filter((item) => item !== v);
|
|
13553
13628
|
}
|
|
13554
13629
|
function cmdExists(cmd) {
|
|
13555
|
-
return
|
|
13630
|
+
return which$1.sync(cmd, { nothrow: true }) !== null;
|
|
13556
13631
|
}
|
|
13557
13632
|
|
|
13558
|
-
async function detect({ autoInstall, cwd } = {}) {
|
|
13633
|
+
async function detect({ autoInstall, programmatic, cwd } = {}) {
|
|
13559
13634
|
let agent = null;
|
|
13560
13635
|
let version = null;
|
|
13561
13636
|
const lockPath = await findUp(Object.keys(LOCKS), { cwd });
|
|
@@ -13570,13 +13645,13 @@ async function detect({ autoInstall, cwd } = {}) {
|
|
|
13570
13645
|
if (typeof pkg.packageManager === "string") {
|
|
13571
13646
|
const [name, ver] = pkg.packageManager.split("@");
|
|
13572
13647
|
version = ver;
|
|
13573
|
-
if (name === "yarn" && parseInt(ver) > 1)
|
|
13648
|
+
if (name === "yarn" && Number.parseInt(ver) > 1)
|
|
13574
13649
|
agent = "yarn@berry";
|
|
13575
|
-
else if (name === "pnpm" && parseInt(ver) < 7)
|
|
13650
|
+
else if (name === "pnpm" && Number.parseInt(ver) < 7)
|
|
13576
13651
|
agent = "pnpm@6";
|
|
13577
13652
|
else if (name in AGENTS)
|
|
13578
13653
|
agent = name;
|
|
13579
|
-
else
|
|
13654
|
+
else if (!programmatic)
|
|
13580
13655
|
console.warn("[ni] Unknown packageManager:", pkg.packageManager);
|
|
13581
13656
|
}
|
|
13582
13657
|
} catch {
|
|
@@ -13584,14 +13659,14 @@ async function detect({ autoInstall, cwd } = {}) {
|
|
|
13584
13659
|
}
|
|
13585
13660
|
if (!agent && lockPath)
|
|
13586
13661
|
agent = LOCKS[path$3__default.basename(lockPath)];
|
|
13587
|
-
if (agent && !cmdExists(agent.split("@")[0])) {
|
|
13662
|
+
if (agent && !cmdExists(agent.split("@")[0]) && !programmatic) {
|
|
13588
13663
|
if (!autoInstall) {
|
|
13589
13664
|
console.warn(`[ni] Detected ${agent} but it doesn't seem to be installed.
|
|
13590
13665
|
`);
|
|
13591
13666
|
if (process.env.CI)
|
|
13592
13667
|
process.exit(1);
|
|
13593
13668
|
const link = terminalLink(agent, INSTALL_PAGE[agent]);
|
|
13594
|
-
const { tryInstall } = await prompts({
|
|
13669
|
+
const { tryInstall } = await prompts$1({
|
|
13595
13670
|
name: "tryInstall",
|
|
13596
13671
|
type: "confirm",
|
|
13597
13672
|
message: `Would you like to globally install ${link}?`
|
|
@@ -13749,7 +13824,8 @@ function VitePluginVueDevTools(options = { appendTo: "" }) {
|
|
|
13749
13824
|
else if (type === "exit")
|
|
13750
13825
|
rpc.onTerminalExit({ data });
|
|
13751
13826
|
}
|
|
13752
|
-
})
|
|
13827
|
+
}),
|
|
13828
|
+
root: () => config.root
|
|
13753
13829
|
});
|
|
13754
13830
|
}
|
|
13755
13831
|
const plugin = {
|