heading-case 1.0.1 → 1.0.3
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/dist/index.js +647 -790
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -1,707 +1,12 @@
|
|
|
1
|
-
import * as __WEBPACK_EXTERNAL_MODULE_fs__ from "fs";
|
|
2
|
-
import * as __WEBPACK_EXTERNAL_MODULE_path__ from "path";
|
|
3
1
|
import node_fs from "node:fs";
|
|
4
2
|
import node_process from "node:process";
|
|
5
3
|
import node_os from "node:os";
|
|
6
4
|
import node_tty from "node:tty";
|
|
5
|
+
import path_0, { basename, dirname, normalize, posix, relative as external_path_relative, resolve, sep } from "path";
|
|
6
|
+
import { fileURLToPath } from "url";
|
|
7
|
+
import { createRequire } from "module";
|
|
8
|
+
import * as __WEBPACK_EXTERNAL_MODULE_fs__ from "fs";
|
|
7
9
|
var __webpack_modules__ = {
|
|
8
|
-
"./node_modules/.pnpm/fdir@6.4.6_picomatch@4.0.2/node_modules/fdir/dist/api/async.js": function(__unused_webpack_module, exports, __webpack_require__) {
|
|
9
|
-
Object.defineProperty(exports, "__esModule", {
|
|
10
|
-
value: true
|
|
11
|
-
});
|
|
12
|
-
exports.callback = exports.promise = void 0;
|
|
13
|
-
const walker_1 = __webpack_require__("./node_modules/.pnpm/fdir@6.4.6_picomatch@4.0.2/node_modules/fdir/dist/api/walker.js");
|
|
14
|
-
function promise(root, options) {
|
|
15
|
-
return new Promise((resolve, reject)=>{
|
|
16
|
-
callback(root, options, (err, output)=>{
|
|
17
|
-
if (err) return reject(err);
|
|
18
|
-
resolve(output);
|
|
19
|
-
});
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
exports.promise = promise;
|
|
23
|
-
function callback(root, options, callback) {
|
|
24
|
-
let walker = new walker_1.Walker(root, options, callback);
|
|
25
|
-
walker.start();
|
|
26
|
-
}
|
|
27
|
-
exports.callback = callback;
|
|
28
|
-
},
|
|
29
|
-
"./node_modules/.pnpm/fdir@6.4.6_picomatch@4.0.2/node_modules/fdir/dist/api/counter.js": function(__unused_webpack_module, exports) {
|
|
30
|
-
Object.defineProperty(exports, "__esModule", {
|
|
31
|
-
value: true
|
|
32
|
-
});
|
|
33
|
-
exports.Counter = void 0;
|
|
34
|
-
class Counter {
|
|
35
|
-
_files = 0;
|
|
36
|
-
_directories = 0;
|
|
37
|
-
set files(num) {
|
|
38
|
-
this._files = num;
|
|
39
|
-
}
|
|
40
|
-
get files() {
|
|
41
|
-
return this._files;
|
|
42
|
-
}
|
|
43
|
-
set directories(num) {
|
|
44
|
-
this._directories = num;
|
|
45
|
-
}
|
|
46
|
-
get directories() {
|
|
47
|
-
return this._directories;
|
|
48
|
-
}
|
|
49
|
-
get dirs() {
|
|
50
|
-
return this._directories;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
exports.Counter = Counter;
|
|
54
|
-
},
|
|
55
|
-
"./node_modules/.pnpm/fdir@6.4.6_picomatch@4.0.2/node_modules/fdir/dist/api/functions/get-array.js": function(__unused_webpack_module, exports) {
|
|
56
|
-
Object.defineProperty(exports, "__esModule", {
|
|
57
|
-
value: true
|
|
58
|
-
});
|
|
59
|
-
exports.build = void 0;
|
|
60
|
-
const getArray = (paths)=>paths;
|
|
61
|
-
const getArrayGroup = ()=>[
|
|
62
|
-
""
|
|
63
|
-
].slice(0, 0);
|
|
64
|
-
function build(options) {
|
|
65
|
-
return options.group ? getArrayGroup : getArray;
|
|
66
|
-
}
|
|
67
|
-
exports.build = build;
|
|
68
|
-
},
|
|
69
|
-
"./node_modules/.pnpm/fdir@6.4.6_picomatch@4.0.2/node_modules/fdir/dist/api/functions/group-files.js": function(__unused_webpack_module, exports) {
|
|
70
|
-
Object.defineProperty(exports, "__esModule", {
|
|
71
|
-
value: true
|
|
72
|
-
});
|
|
73
|
-
exports.build = void 0;
|
|
74
|
-
const groupFiles = (groups, directory, files)=>{
|
|
75
|
-
groups.push({
|
|
76
|
-
directory,
|
|
77
|
-
files,
|
|
78
|
-
dir: directory
|
|
79
|
-
});
|
|
80
|
-
};
|
|
81
|
-
const empty = ()=>{};
|
|
82
|
-
function build(options) {
|
|
83
|
-
return options.group ? groupFiles : empty;
|
|
84
|
-
}
|
|
85
|
-
exports.build = build;
|
|
86
|
-
},
|
|
87
|
-
"./node_modules/.pnpm/fdir@6.4.6_picomatch@4.0.2/node_modules/fdir/dist/api/functions/invoke-callback.js": function(__unused_webpack_module, exports) {
|
|
88
|
-
Object.defineProperty(exports, "__esModule", {
|
|
89
|
-
value: true
|
|
90
|
-
});
|
|
91
|
-
exports.build = void 0;
|
|
92
|
-
const onlyCountsSync = (state)=>state.counts;
|
|
93
|
-
const groupsSync = (state)=>state.groups;
|
|
94
|
-
const defaultSync = (state)=>state.paths;
|
|
95
|
-
const limitFilesSync = (state)=>state.paths.slice(0, state.options.maxFiles);
|
|
96
|
-
const onlyCountsAsync = (state, error, callback)=>{
|
|
97
|
-
report(error, callback, state.counts, state.options.suppressErrors);
|
|
98
|
-
return null;
|
|
99
|
-
};
|
|
100
|
-
const defaultAsync = (state, error, callback)=>{
|
|
101
|
-
report(error, callback, state.paths, state.options.suppressErrors);
|
|
102
|
-
return null;
|
|
103
|
-
};
|
|
104
|
-
const limitFilesAsync = (state, error, callback)=>{
|
|
105
|
-
report(error, callback, state.paths.slice(0, state.options.maxFiles), state.options.suppressErrors);
|
|
106
|
-
return null;
|
|
107
|
-
};
|
|
108
|
-
const groupsAsync = (state, error, callback)=>{
|
|
109
|
-
report(error, callback, state.groups, state.options.suppressErrors);
|
|
110
|
-
return null;
|
|
111
|
-
};
|
|
112
|
-
function report(error, callback, output, suppressErrors) {
|
|
113
|
-
callback(error && !suppressErrors ? error : null, output);
|
|
114
|
-
}
|
|
115
|
-
function build(options, isSynchronous) {
|
|
116
|
-
const { onlyCounts, group, maxFiles } = options;
|
|
117
|
-
if (onlyCounts) return isSynchronous ? onlyCountsSync : onlyCountsAsync;
|
|
118
|
-
if (group) return isSynchronous ? groupsSync : groupsAsync;
|
|
119
|
-
if (maxFiles) return isSynchronous ? limitFilesSync : limitFilesAsync;
|
|
120
|
-
return isSynchronous ? defaultSync : defaultAsync;
|
|
121
|
-
}
|
|
122
|
-
exports.build = build;
|
|
123
|
-
},
|
|
124
|
-
"./node_modules/.pnpm/fdir@6.4.6_picomatch@4.0.2/node_modules/fdir/dist/api/functions/join-path.js": function(__unused_webpack_module, exports, __webpack_require__) {
|
|
125
|
-
Object.defineProperty(exports, "__esModule", {
|
|
126
|
-
value: true
|
|
127
|
-
});
|
|
128
|
-
exports.build = exports.joinDirectoryPath = exports.joinPathWithBasePath = void 0;
|
|
129
|
-
const path_1 = __webpack_require__("path");
|
|
130
|
-
const utils_1 = __webpack_require__("./node_modules/.pnpm/fdir@6.4.6_picomatch@4.0.2/node_modules/fdir/dist/utils.js");
|
|
131
|
-
function joinPathWithBasePath(filename, directoryPath) {
|
|
132
|
-
return directoryPath + filename;
|
|
133
|
-
}
|
|
134
|
-
exports.joinPathWithBasePath = joinPathWithBasePath;
|
|
135
|
-
function joinPathWithRelativePath(root, options) {
|
|
136
|
-
return function(filename, directoryPath) {
|
|
137
|
-
const sameRoot = directoryPath.startsWith(root);
|
|
138
|
-
if (sameRoot) return directoryPath.replace(root, "") + filename;
|
|
139
|
-
return (0, utils_1.convertSlashes)((0, path_1.relative)(root, directoryPath), options.pathSeparator) + options.pathSeparator + filename;
|
|
140
|
-
};
|
|
141
|
-
}
|
|
142
|
-
function joinPath(filename) {
|
|
143
|
-
return filename;
|
|
144
|
-
}
|
|
145
|
-
function joinDirectoryPath(filename, directoryPath, separator) {
|
|
146
|
-
return directoryPath + filename + separator;
|
|
147
|
-
}
|
|
148
|
-
exports.joinDirectoryPath = joinDirectoryPath;
|
|
149
|
-
function build(root, options) {
|
|
150
|
-
const { relativePaths, includeBasePath } = options;
|
|
151
|
-
return relativePaths && root ? joinPathWithRelativePath(root, options) : includeBasePath ? joinPathWithBasePath : joinPath;
|
|
152
|
-
}
|
|
153
|
-
exports.build = build;
|
|
154
|
-
},
|
|
155
|
-
"./node_modules/.pnpm/fdir@6.4.6_picomatch@4.0.2/node_modules/fdir/dist/api/functions/push-directory.js": function(__unused_webpack_module, exports) {
|
|
156
|
-
Object.defineProperty(exports, "__esModule", {
|
|
157
|
-
value: true
|
|
158
|
-
});
|
|
159
|
-
exports.build = void 0;
|
|
160
|
-
function pushDirectoryWithRelativePath(root) {
|
|
161
|
-
return function(directoryPath, paths) {
|
|
162
|
-
paths.push(directoryPath.substring(root.length) || ".");
|
|
163
|
-
};
|
|
164
|
-
}
|
|
165
|
-
function pushDirectoryFilterWithRelativePath(root) {
|
|
166
|
-
return function(directoryPath, paths, filters) {
|
|
167
|
-
const relativePath = directoryPath.substring(root.length) || ".";
|
|
168
|
-
if (filters.every((filter)=>filter(relativePath, true))) paths.push(relativePath);
|
|
169
|
-
};
|
|
170
|
-
}
|
|
171
|
-
const pushDirectory = (directoryPath, paths)=>{
|
|
172
|
-
paths.push(directoryPath || ".");
|
|
173
|
-
};
|
|
174
|
-
const pushDirectoryFilter = (directoryPath, paths, filters)=>{
|
|
175
|
-
const path = directoryPath || ".";
|
|
176
|
-
if (filters.every((filter)=>filter(path, true))) paths.push(path);
|
|
177
|
-
};
|
|
178
|
-
const empty = ()=>{};
|
|
179
|
-
function build(root, options) {
|
|
180
|
-
const { includeDirs, filters, relativePaths } = options;
|
|
181
|
-
if (!includeDirs) return empty;
|
|
182
|
-
if (relativePaths) return filters && filters.length ? pushDirectoryFilterWithRelativePath(root) : pushDirectoryWithRelativePath(root);
|
|
183
|
-
return filters && filters.length ? pushDirectoryFilter : pushDirectory;
|
|
184
|
-
}
|
|
185
|
-
exports.build = build;
|
|
186
|
-
},
|
|
187
|
-
"./node_modules/.pnpm/fdir@6.4.6_picomatch@4.0.2/node_modules/fdir/dist/api/functions/push-file.js": function(__unused_webpack_module, exports) {
|
|
188
|
-
Object.defineProperty(exports, "__esModule", {
|
|
189
|
-
value: true
|
|
190
|
-
});
|
|
191
|
-
exports.build = void 0;
|
|
192
|
-
const pushFileFilterAndCount = (filename, _paths, counts, filters)=>{
|
|
193
|
-
if (filters.every((filter)=>filter(filename, false))) counts.files++;
|
|
194
|
-
};
|
|
195
|
-
const pushFileFilter = (filename, paths, _counts, filters)=>{
|
|
196
|
-
if (filters.every((filter)=>filter(filename, false))) paths.push(filename);
|
|
197
|
-
};
|
|
198
|
-
const pushFileCount = (_filename, _paths, counts, _filters)=>{
|
|
199
|
-
counts.files++;
|
|
200
|
-
};
|
|
201
|
-
const pushFile = (filename, paths)=>{
|
|
202
|
-
paths.push(filename);
|
|
203
|
-
};
|
|
204
|
-
const empty = ()=>{};
|
|
205
|
-
function build(options) {
|
|
206
|
-
const { excludeFiles, filters, onlyCounts } = options;
|
|
207
|
-
if (excludeFiles) return empty;
|
|
208
|
-
if (filters && filters.length) return onlyCounts ? pushFileFilterAndCount : pushFileFilter;
|
|
209
|
-
if (onlyCounts) return pushFileCount;
|
|
210
|
-
return pushFile;
|
|
211
|
-
}
|
|
212
|
-
exports.build = build;
|
|
213
|
-
},
|
|
214
|
-
"./node_modules/.pnpm/fdir@6.4.6_picomatch@4.0.2/node_modules/fdir/dist/api/functions/resolve-symlink.js": function(__unused_webpack_module, exports, __webpack_require__) {
|
|
215
|
-
var __importDefault = this && this.__importDefault || function(mod) {
|
|
216
|
-
return mod && mod.__esModule ? mod : {
|
|
217
|
-
default: mod
|
|
218
|
-
};
|
|
219
|
-
};
|
|
220
|
-
Object.defineProperty(exports, "__esModule", {
|
|
221
|
-
value: true
|
|
222
|
-
});
|
|
223
|
-
exports.build = void 0;
|
|
224
|
-
const fs_1 = __importDefault(__webpack_require__("fs"));
|
|
225
|
-
const path_1 = __webpack_require__("path");
|
|
226
|
-
const resolveSymlinksAsync = function(path, state, callback) {
|
|
227
|
-
const { queue, options: { suppressErrors } } = state;
|
|
228
|
-
queue.enqueue();
|
|
229
|
-
fs_1.default.realpath(path, (error, resolvedPath)=>{
|
|
230
|
-
if (error) return queue.dequeue(suppressErrors ? null : error, state);
|
|
231
|
-
fs_1.default.stat(resolvedPath, (error, stat)=>{
|
|
232
|
-
if (error) return queue.dequeue(suppressErrors ? null : error, state);
|
|
233
|
-
if (stat.isDirectory() && isRecursive(path, resolvedPath, state)) return queue.dequeue(null, state);
|
|
234
|
-
callback(stat, resolvedPath);
|
|
235
|
-
queue.dequeue(null, state);
|
|
236
|
-
});
|
|
237
|
-
});
|
|
238
|
-
};
|
|
239
|
-
const resolveSymlinks = function(path, state, callback) {
|
|
240
|
-
const { queue, options: { suppressErrors } } = state;
|
|
241
|
-
queue.enqueue();
|
|
242
|
-
try {
|
|
243
|
-
const resolvedPath = fs_1.default.realpathSync(path);
|
|
244
|
-
const stat = fs_1.default.statSync(resolvedPath);
|
|
245
|
-
if (stat.isDirectory() && isRecursive(path, resolvedPath, state)) return;
|
|
246
|
-
callback(stat, resolvedPath);
|
|
247
|
-
} catch (e) {
|
|
248
|
-
if (!suppressErrors) throw e;
|
|
249
|
-
}
|
|
250
|
-
};
|
|
251
|
-
function build(options, isSynchronous) {
|
|
252
|
-
if (!options.resolveSymlinks || options.excludeSymlinks) return null;
|
|
253
|
-
return isSynchronous ? resolveSymlinks : resolveSymlinksAsync;
|
|
254
|
-
}
|
|
255
|
-
exports.build = build;
|
|
256
|
-
function isRecursive(path, resolved, state) {
|
|
257
|
-
if (state.options.useRealPaths) return isRecursiveUsingRealPaths(resolved, state);
|
|
258
|
-
let parent = (0, path_1.dirname)(path);
|
|
259
|
-
let depth = 1;
|
|
260
|
-
while(parent !== state.root && depth < 2){
|
|
261
|
-
const resolvedPath = state.symlinks.get(parent);
|
|
262
|
-
const isSameRoot = !!resolvedPath && (resolvedPath === resolved || resolvedPath.startsWith(resolved) || resolved.startsWith(resolvedPath));
|
|
263
|
-
if (isSameRoot) depth++;
|
|
264
|
-
else parent = (0, path_1.dirname)(parent);
|
|
265
|
-
}
|
|
266
|
-
state.symlinks.set(path, resolved);
|
|
267
|
-
return depth > 1;
|
|
268
|
-
}
|
|
269
|
-
function isRecursiveUsingRealPaths(resolved, state) {
|
|
270
|
-
return state.visited.includes(resolved + state.options.pathSeparator);
|
|
271
|
-
}
|
|
272
|
-
},
|
|
273
|
-
"./node_modules/.pnpm/fdir@6.4.6_picomatch@4.0.2/node_modules/fdir/dist/api/functions/walk-directory.js": function(__unused_webpack_module, exports, __webpack_require__) {
|
|
274
|
-
var __importDefault = this && this.__importDefault || function(mod) {
|
|
275
|
-
return mod && mod.__esModule ? mod : {
|
|
276
|
-
default: mod
|
|
277
|
-
};
|
|
278
|
-
};
|
|
279
|
-
Object.defineProperty(exports, "__esModule", {
|
|
280
|
-
value: true
|
|
281
|
-
});
|
|
282
|
-
exports.build = void 0;
|
|
283
|
-
const fs_1 = __importDefault(__webpack_require__("fs"));
|
|
284
|
-
const readdirOpts = {
|
|
285
|
-
withFileTypes: true
|
|
286
|
-
};
|
|
287
|
-
const walkAsync = (state, crawlPath, directoryPath, currentDepth, callback)=>{
|
|
288
|
-
state.queue.enqueue();
|
|
289
|
-
if (currentDepth < 0) return state.queue.dequeue(null, state);
|
|
290
|
-
state.visited.push(crawlPath);
|
|
291
|
-
state.counts.directories++;
|
|
292
|
-
fs_1.default.readdir(crawlPath || ".", readdirOpts, (error, entries = [])=>{
|
|
293
|
-
callback(entries, directoryPath, currentDepth);
|
|
294
|
-
state.queue.dequeue(state.options.suppressErrors ? null : error, state);
|
|
295
|
-
});
|
|
296
|
-
};
|
|
297
|
-
const walkSync = (state, crawlPath, directoryPath, currentDepth, callback)=>{
|
|
298
|
-
if (currentDepth < 0) return;
|
|
299
|
-
state.visited.push(crawlPath);
|
|
300
|
-
state.counts.directories++;
|
|
301
|
-
let entries = [];
|
|
302
|
-
try {
|
|
303
|
-
entries = fs_1.default.readdirSync(crawlPath || ".", readdirOpts);
|
|
304
|
-
} catch (e) {
|
|
305
|
-
if (!state.options.suppressErrors) throw e;
|
|
306
|
-
}
|
|
307
|
-
callback(entries, directoryPath, currentDepth);
|
|
308
|
-
};
|
|
309
|
-
function build(isSynchronous) {
|
|
310
|
-
return isSynchronous ? walkSync : walkAsync;
|
|
311
|
-
}
|
|
312
|
-
exports.build = build;
|
|
313
|
-
},
|
|
314
|
-
"./node_modules/.pnpm/fdir@6.4.6_picomatch@4.0.2/node_modules/fdir/dist/api/queue.js": function(__unused_webpack_module, exports) {
|
|
315
|
-
Object.defineProperty(exports, "__esModule", {
|
|
316
|
-
value: true
|
|
317
|
-
});
|
|
318
|
-
exports.Queue = void 0;
|
|
319
|
-
class Queue {
|
|
320
|
-
onQueueEmpty;
|
|
321
|
-
count = 0;
|
|
322
|
-
constructor(onQueueEmpty){
|
|
323
|
-
this.onQueueEmpty = onQueueEmpty;
|
|
324
|
-
}
|
|
325
|
-
enqueue() {
|
|
326
|
-
this.count++;
|
|
327
|
-
return this.count;
|
|
328
|
-
}
|
|
329
|
-
dequeue(error, output) {
|
|
330
|
-
if (this.onQueueEmpty && (--this.count <= 0 || error)) {
|
|
331
|
-
this.onQueueEmpty(error, output);
|
|
332
|
-
if (error) {
|
|
333
|
-
output.controller.abort();
|
|
334
|
-
this.onQueueEmpty = void 0;
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
exports.Queue = Queue;
|
|
340
|
-
},
|
|
341
|
-
"./node_modules/.pnpm/fdir@6.4.6_picomatch@4.0.2/node_modules/fdir/dist/api/sync.js": function(__unused_webpack_module, exports, __webpack_require__) {
|
|
342
|
-
Object.defineProperty(exports, "__esModule", {
|
|
343
|
-
value: true
|
|
344
|
-
});
|
|
345
|
-
exports.sync = void 0;
|
|
346
|
-
const walker_1 = __webpack_require__("./node_modules/.pnpm/fdir@6.4.6_picomatch@4.0.2/node_modules/fdir/dist/api/walker.js");
|
|
347
|
-
function sync(root, options) {
|
|
348
|
-
const walker = new walker_1.Walker(root, options);
|
|
349
|
-
return walker.start();
|
|
350
|
-
}
|
|
351
|
-
exports.sync = sync;
|
|
352
|
-
},
|
|
353
|
-
"./node_modules/.pnpm/fdir@6.4.6_picomatch@4.0.2/node_modules/fdir/dist/api/walker.js": function(__unused_webpack_module, exports, __webpack_require__) {
|
|
354
|
-
var __createBinding = this && this.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
355
|
-
if (void 0 === k2) k2 = k;
|
|
356
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
357
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = {
|
|
358
|
-
enumerable: true,
|
|
359
|
-
get: function() {
|
|
360
|
-
return m[k];
|
|
361
|
-
}
|
|
362
|
-
};
|
|
363
|
-
Object.defineProperty(o, k2, desc);
|
|
364
|
-
} : function(o, m, k, k2) {
|
|
365
|
-
if (void 0 === k2) k2 = k;
|
|
366
|
-
o[k2] = m[k];
|
|
367
|
-
});
|
|
368
|
-
var __setModuleDefault = this && this.__setModuleDefault || (Object.create ? function(o, v) {
|
|
369
|
-
Object.defineProperty(o, "default", {
|
|
370
|
-
enumerable: true,
|
|
371
|
-
value: v
|
|
372
|
-
});
|
|
373
|
-
} : function(o, v) {
|
|
374
|
-
o["default"] = v;
|
|
375
|
-
});
|
|
376
|
-
var __importStar = this && this.__importStar || function(mod) {
|
|
377
|
-
if (mod && mod.__esModule) return mod;
|
|
378
|
-
var result = {};
|
|
379
|
-
if (null != mod) {
|
|
380
|
-
for(var k in mod)if ("default" !== k && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
381
|
-
}
|
|
382
|
-
__setModuleDefault(result, mod);
|
|
383
|
-
return result;
|
|
384
|
-
};
|
|
385
|
-
Object.defineProperty(exports, "__esModule", {
|
|
386
|
-
value: true
|
|
387
|
-
});
|
|
388
|
-
exports.Walker = void 0;
|
|
389
|
-
const path_1 = __webpack_require__("path");
|
|
390
|
-
const utils_1 = __webpack_require__("./node_modules/.pnpm/fdir@6.4.6_picomatch@4.0.2/node_modules/fdir/dist/utils.js");
|
|
391
|
-
const joinPath = __importStar(__webpack_require__("./node_modules/.pnpm/fdir@6.4.6_picomatch@4.0.2/node_modules/fdir/dist/api/functions/join-path.js"));
|
|
392
|
-
const pushDirectory = __importStar(__webpack_require__("./node_modules/.pnpm/fdir@6.4.6_picomatch@4.0.2/node_modules/fdir/dist/api/functions/push-directory.js"));
|
|
393
|
-
const pushFile = __importStar(__webpack_require__("./node_modules/.pnpm/fdir@6.4.6_picomatch@4.0.2/node_modules/fdir/dist/api/functions/push-file.js"));
|
|
394
|
-
const getArray = __importStar(__webpack_require__("./node_modules/.pnpm/fdir@6.4.6_picomatch@4.0.2/node_modules/fdir/dist/api/functions/get-array.js"));
|
|
395
|
-
const groupFiles = __importStar(__webpack_require__("./node_modules/.pnpm/fdir@6.4.6_picomatch@4.0.2/node_modules/fdir/dist/api/functions/group-files.js"));
|
|
396
|
-
const resolveSymlink = __importStar(__webpack_require__("./node_modules/.pnpm/fdir@6.4.6_picomatch@4.0.2/node_modules/fdir/dist/api/functions/resolve-symlink.js"));
|
|
397
|
-
const invokeCallback = __importStar(__webpack_require__("./node_modules/.pnpm/fdir@6.4.6_picomatch@4.0.2/node_modules/fdir/dist/api/functions/invoke-callback.js"));
|
|
398
|
-
const walkDirectory = __importStar(__webpack_require__("./node_modules/.pnpm/fdir@6.4.6_picomatch@4.0.2/node_modules/fdir/dist/api/functions/walk-directory.js"));
|
|
399
|
-
const queue_1 = __webpack_require__("./node_modules/.pnpm/fdir@6.4.6_picomatch@4.0.2/node_modules/fdir/dist/api/queue.js");
|
|
400
|
-
const counter_1 = __webpack_require__("./node_modules/.pnpm/fdir@6.4.6_picomatch@4.0.2/node_modules/fdir/dist/api/counter.js");
|
|
401
|
-
class Walker {
|
|
402
|
-
root;
|
|
403
|
-
isSynchronous;
|
|
404
|
-
state;
|
|
405
|
-
joinPath;
|
|
406
|
-
pushDirectory;
|
|
407
|
-
pushFile;
|
|
408
|
-
getArray;
|
|
409
|
-
groupFiles;
|
|
410
|
-
resolveSymlink;
|
|
411
|
-
walkDirectory;
|
|
412
|
-
callbackInvoker;
|
|
413
|
-
constructor(root, options, callback){
|
|
414
|
-
this.isSynchronous = !callback;
|
|
415
|
-
this.callbackInvoker = invokeCallback.build(options, this.isSynchronous);
|
|
416
|
-
this.root = (0, utils_1.normalizePath)(root, options);
|
|
417
|
-
this.state = {
|
|
418
|
-
root: (0, utils_1.isRootDirectory)(this.root) ? this.root : this.root.slice(0, -1),
|
|
419
|
-
paths: [
|
|
420
|
-
""
|
|
421
|
-
].slice(0, 0),
|
|
422
|
-
groups: [],
|
|
423
|
-
counts: new counter_1.Counter(),
|
|
424
|
-
options,
|
|
425
|
-
queue: new queue_1.Queue((error, state)=>this.callbackInvoker(state, error, callback)),
|
|
426
|
-
symlinks: new Map(),
|
|
427
|
-
visited: [
|
|
428
|
-
""
|
|
429
|
-
].slice(0, 0),
|
|
430
|
-
controller: new AbortController()
|
|
431
|
-
};
|
|
432
|
-
this.joinPath = joinPath.build(this.root, options);
|
|
433
|
-
this.pushDirectory = pushDirectory.build(this.root, options);
|
|
434
|
-
this.pushFile = pushFile.build(options);
|
|
435
|
-
this.getArray = getArray.build(options);
|
|
436
|
-
this.groupFiles = groupFiles.build(options);
|
|
437
|
-
this.resolveSymlink = resolveSymlink.build(options, this.isSynchronous);
|
|
438
|
-
this.walkDirectory = walkDirectory.build(this.isSynchronous);
|
|
439
|
-
}
|
|
440
|
-
start() {
|
|
441
|
-
this.pushDirectory(this.root, this.state.paths, this.state.options.filters);
|
|
442
|
-
this.walkDirectory(this.state, this.root, this.root, this.state.options.maxDepth, this.walk);
|
|
443
|
-
return this.isSynchronous ? this.callbackInvoker(this.state, null) : null;
|
|
444
|
-
}
|
|
445
|
-
walk = (entries, directoryPath, depth)=>{
|
|
446
|
-
const { paths, options: { filters, resolveSymlinks, excludeSymlinks, exclude, maxFiles, signal, useRealPaths, pathSeparator }, controller } = this.state;
|
|
447
|
-
if (controller.signal.aborted || signal && signal.aborted || maxFiles && paths.length > maxFiles) return;
|
|
448
|
-
const files = this.getArray(this.state.paths);
|
|
449
|
-
for(let i = 0; i < entries.length; ++i){
|
|
450
|
-
const entry = entries[i];
|
|
451
|
-
if (entry.isFile() || entry.isSymbolicLink() && !resolveSymlinks && !excludeSymlinks) {
|
|
452
|
-
const filename = this.joinPath(entry.name, directoryPath);
|
|
453
|
-
this.pushFile(filename, files, this.state.counts, filters);
|
|
454
|
-
} else if (entry.isDirectory()) {
|
|
455
|
-
let path = joinPath.joinDirectoryPath(entry.name, directoryPath, this.state.options.pathSeparator);
|
|
456
|
-
if (exclude && exclude(entry.name, path)) continue;
|
|
457
|
-
this.pushDirectory(path, paths, filters);
|
|
458
|
-
this.walkDirectory(this.state, path, path, depth - 1, this.walk);
|
|
459
|
-
} else if (this.resolveSymlink && entry.isSymbolicLink()) {
|
|
460
|
-
let path = joinPath.joinPathWithBasePath(entry.name, directoryPath);
|
|
461
|
-
this.resolveSymlink(path, this.state, (stat, resolvedPath)=>{
|
|
462
|
-
if (stat.isDirectory()) {
|
|
463
|
-
resolvedPath = (0, utils_1.normalizePath)(resolvedPath, this.state.options);
|
|
464
|
-
if (exclude && exclude(entry.name, useRealPaths ? resolvedPath : path + pathSeparator)) return;
|
|
465
|
-
this.walkDirectory(this.state, resolvedPath, useRealPaths ? resolvedPath : path + pathSeparator, depth - 1, this.walk);
|
|
466
|
-
} else {
|
|
467
|
-
resolvedPath = useRealPaths ? resolvedPath : path;
|
|
468
|
-
const filename = (0, path_1.basename)(resolvedPath);
|
|
469
|
-
const directoryPath = (0, utils_1.normalizePath)((0, path_1.dirname)(resolvedPath), this.state.options);
|
|
470
|
-
resolvedPath = this.joinPath(filename, directoryPath);
|
|
471
|
-
this.pushFile(resolvedPath, files, this.state.counts, filters);
|
|
472
|
-
}
|
|
473
|
-
});
|
|
474
|
-
}
|
|
475
|
-
}
|
|
476
|
-
this.groupFiles(this.state.groups, directoryPath, files);
|
|
477
|
-
};
|
|
478
|
-
}
|
|
479
|
-
exports.Walker = Walker;
|
|
480
|
-
},
|
|
481
|
-
"./node_modules/.pnpm/fdir@6.4.6_picomatch@4.0.2/node_modules/fdir/dist/builder/api-builder.js": function(__unused_webpack_module, exports, __webpack_require__) {
|
|
482
|
-
Object.defineProperty(exports, "__esModule", {
|
|
483
|
-
value: true
|
|
484
|
-
});
|
|
485
|
-
exports.APIBuilder = void 0;
|
|
486
|
-
const async_1 = __webpack_require__("./node_modules/.pnpm/fdir@6.4.6_picomatch@4.0.2/node_modules/fdir/dist/api/async.js");
|
|
487
|
-
const sync_1 = __webpack_require__("./node_modules/.pnpm/fdir@6.4.6_picomatch@4.0.2/node_modules/fdir/dist/api/sync.js");
|
|
488
|
-
class APIBuilder {
|
|
489
|
-
root;
|
|
490
|
-
options;
|
|
491
|
-
constructor(root, options){
|
|
492
|
-
this.root = root;
|
|
493
|
-
this.options = options;
|
|
494
|
-
}
|
|
495
|
-
withPromise() {
|
|
496
|
-
return (0, async_1.promise)(this.root, this.options);
|
|
497
|
-
}
|
|
498
|
-
withCallback(cb) {
|
|
499
|
-
(0, async_1.callback)(this.root, this.options, cb);
|
|
500
|
-
}
|
|
501
|
-
sync() {
|
|
502
|
-
return (0, sync_1.sync)(this.root, this.options);
|
|
503
|
-
}
|
|
504
|
-
}
|
|
505
|
-
exports.APIBuilder = APIBuilder;
|
|
506
|
-
},
|
|
507
|
-
"./node_modules/.pnpm/fdir@6.4.6_picomatch@4.0.2/node_modules/fdir/dist/builder/index.js": function(__unused_webpack_module, exports, __webpack_require__) {
|
|
508
|
-
Object.defineProperty(exports, "__esModule", {
|
|
509
|
-
value: true
|
|
510
|
-
});
|
|
511
|
-
exports.Builder = void 0;
|
|
512
|
-
const path_1 = __webpack_require__("path");
|
|
513
|
-
const api_builder_1 = __webpack_require__("./node_modules/.pnpm/fdir@6.4.6_picomatch@4.0.2/node_modules/fdir/dist/builder/api-builder.js");
|
|
514
|
-
var pm = null;
|
|
515
|
-
try {
|
|
516
|
-
require.resolve("picomatch");
|
|
517
|
-
pm = __webpack_require__("./node_modules/.pnpm/picomatch@4.0.2/node_modules/picomatch/index.js");
|
|
518
|
-
} catch (_e) {}
|
|
519
|
-
class Builder {
|
|
520
|
-
globCache = {};
|
|
521
|
-
options = {
|
|
522
|
-
maxDepth: 1 / 0,
|
|
523
|
-
suppressErrors: true,
|
|
524
|
-
pathSeparator: path_1.sep,
|
|
525
|
-
filters: []
|
|
526
|
-
};
|
|
527
|
-
globFunction;
|
|
528
|
-
constructor(options){
|
|
529
|
-
this.options = {
|
|
530
|
-
...this.options,
|
|
531
|
-
...options
|
|
532
|
-
};
|
|
533
|
-
this.globFunction = this.options.globFunction;
|
|
534
|
-
}
|
|
535
|
-
group() {
|
|
536
|
-
this.options.group = true;
|
|
537
|
-
return this;
|
|
538
|
-
}
|
|
539
|
-
withPathSeparator(separator) {
|
|
540
|
-
this.options.pathSeparator = separator;
|
|
541
|
-
return this;
|
|
542
|
-
}
|
|
543
|
-
withBasePath() {
|
|
544
|
-
this.options.includeBasePath = true;
|
|
545
|
-
return this;
|
|
546
|
-
}
|
|
547
|
-
withRelativePaths() {
|
|
548
|
-
this.options.relativePaths = true;
|
|
549
|
-
return this;
|
|
550
|
-
}
|
|
551
|
-
withDirs() {
|
|
552
|
-
this.options.includeDirs = true;
|
|
553
|
-
return this;
|
|
554
|
-
}
|
|
555
|
-
withMaxDepth(depth) {
|
|
556
|
-
this.options.maxDepth = depth;
|
|
557
|
-
return this;
|
|
558
|
-
}
|
|
559
|
-
withMaxFiles(limit) {
|
|
560
|
-
this.options.maxFiles = limit;
|
|
561
|
-
return this;
|
|
562
|
-
}
|
|
563
|
-
withFullPaths() {
|
|
564
|
-
this.options.resolvePaths = true;
|
|
565
|
-
this.options.includeBasePath = true;
|
|
566
|
-
return this;
|
|
567
|
-
}
|
|
568
|
-
withErrors() {
|
|
569
|
-
this.options.suppressErrors = false;
|
|
570
|
-
return this;
|
|
571
|
-
}
|
|
572
|
-
withSymlinks({ resolvePaths = true } = {}) {
|
|
573
|
-
this.options.resolveSymlinks = true;
|
|
574
|
-
this.options.useRealPaths = resolvePaths;
|
|
575
|
-
return this.withFullPaths();
|
|
576
|
-
}
|
|
577
|
-
withAbortSignal(signal) {
|
|
578
|
-
this.options.signal = signal;
|
|
579
|
-
return this;
|
|
580
|
-
}
|
|
581
|
-
normalize() {
|
|
582
|
-
this.options.normalizePath = true;
|
|
583
|
-
return this;
|
|
584
|
-
}
|
|
585
|
-
filter(predicate) {
|
|
586
|
-
this.options.filters.push(predicate);
|
|
587
|
-
return this;
|
|
588
|
-
}
|
|
589
|
-
onlyDirs() {
|
|
590
|
-
this.options.excludeFiles = true;
|
|
591
|
-
this.options.includeDirs = true;
|
|
592
|
-
return this;
|
|
593
|
-
}
|
|
594
|
-
exclude(predicate) {
|
|
595
|
-
this.options.exclude = predicate;
|
|
596
|
-
return this;
|
|
597
|
-
}
|
|
598
|
-
onlyCounts() {
|
|
599
|
-
this.options.onlyCounts = true;
|
|
600
|
-
return this;
|
|
601
|
-
}
|
|
602
|
-
crawl(root) {
|
|
603
|
-
return new api_builder_1.APIBuilder(root || ".", this.options);
|
|
604
|
-
}
|
|
605
|
-
withGlobFunction(fn) {
|
|
606
|
-
this.globFunction = fn;
|
|
607
|
-
return this;
|
|
608
|
-
}
|
|
609
|
-
crawlWithOptions(root, options) {
|
|
610
|
-
this.options = {
|
|
611
|
-
...this.options,
|
|
612
|
-
...options
|
|
613
|
-
};
|
|
614
|
-
return new api_builder_1.APIBuilder(root || ".", this.options);
|
|
615
|
-
}
|
|
616
|
-
glob(...patterns) {
|
|
617
|
-
if (this.globFunction) return this.globWithOptions(patterns);
|
|
618
|
-
return this.globWithOptions(patterns, {
|
|
619
|
-
dot: true
|
|
620
|
-
});
|
|
621
|
-
}
|
|
622
|
-
globWithOptions(patterns, ...options) {
|
|
623
|
-
const globFn = this.globFunction || pm;
|
|
624
|
-
if (!globFn) throw new Error("Please specify a glob function to use glob matching.");
|
|
625
|
-
var isMatch = this.globCache[patterns.join("\0")];
|
|
626
|
-
if (!isMatch) {
|
|
627
|
-
isMatch = globFn(patterns, ...options);
|
|
628
|
-
this.globCache[patterns.join("\0")] = isMatch;
|
|
629
|
-
}
|
|
630
|
-
this.options.filters.push((path)=>isMatch(path));
|
|
631
|
-
return this;
|
|
632
|
-
}
|
|
633
|
-
}
|
|
634
|
-
exports.Builder = Builder;
|
|
635
|
-
},
|
|
636
|
-
"./node_modules/.pnpm/fdir@6.4.6_picomatch@4.0.2/node_modules/fdir/dist/index.js": function(__unused_webpack_module, exports, __webpack_require__) {
|
|
637
|
-
var __createBinding = this && this.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
638
|
-
if (void 0 === k2) k2 = k;
|
|
639
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
640
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = {
|
|
641
|
-
enumerable: true,
|
|
642
|
-
get: function() {
|
|
643
|
-
return m[k];
|
|
644
|
-
}
|
|
645
|
-
};
|
|
646
|
-
Object.defineProperty(o, k2, desc);
|
|
647
|
-
} : function(o, m, k, k2) {
|
|
648
|
-
if (void 0 === k2) k2 = k;
|
|
649
|
-
o[k2] = m[k];
|
|
650
|
-
});
|
|
651
|
-
var __exportStar = this && this.__exportStar || function(m, exports) {
|
|
652
|
-
for(var p in m)if ("default" !== p && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
653
|
-
};
|
|
654
|
-
Object.defineProperty(exports, "__esModule", {
|
|
655
|
-
value: true
|
|
656
|
-
});
|
|
657
|
-
exports.fdir = void 0;
|
|
658
|
-
const builder_1 = __webpack_require__("./node_modules/.pnpm/fdir@6.4.6_picomatch@4.0.2/node_modules/fdir/dist/builder/index.js");
|
|
659
|
-
Object.defineProperty(exports, "fdir", {
|
|
660
|
-
enumerable: true,
|
|
661
|
-
get: function() {
|
|
662
|
-
return builder_1.Builder;
|
|
663
|
-
}
|
|
664
|
-
});
|
|
665
|
-
__exportStar(__webpack_require__("./node_modules/.pnpm/fdir@6.4.6_picomatch@4.0.2/node_modules/fdir/dist/types.js"), exports);
|
|
666
|
-
},
|
|
667
|
-
"./node_modules/.pnpm/fdir@6.4.6_picomatch@4.0.2/node_modules/fdir/dist/types.js": function(__unused_webpack_module, exports) {
|
|
668
|
-
Object.defineProperty(exports, "__esModule", {
|
|
669
|
-
value: true
|
|
670
|
-
});
|
|
671
|
-
},
|
|
672
|
-
"./node_modules/.pnpm/fdir@6.4.6_picomatch@4.0.2/node_modules/fdir/dist/utils.js": function(__unused_webpack_module, exports, __webpack_require__) {
|
|
673
|
-
Object.defineProperty(exports, "__esModule", {
|
|
674
|
-
value: true
|
|
675
|
-
});
|
|
676
|
-
exports.normalizePath = exports.isRootDirectory = exports.convertSlashes = exports.cleanPath = void 0;
|
|
677
|
-
const path_1 = __webpack_require__("path");
|
|
678
|
-
function cleanPath(path) {
|
|
679
|
-
let normalized = (0, path_1.normalize)(path);
|
|
680
|
-
if (normalized.length > 1 && normalized[normalized.length - 1] === path_1.sep) normalized = normalized.substring(0, normalized.length - 1);
|
|
681
|
-
return normalized;
|
|
682
|
-
}
|
|
683
|
-
exports.cleanPath = cleanPath;
|
|
684
|
-
const SLASHES_REGEX = /[\\/]/g;
|
|
685
|
-
function convertSlashes(path, separator) {
|
|
686
|
-
return path.replace(SLASHES_REGEX, separator);
|
|
687
|
-
}
|
|
688
|
-
exports.convertSlashes = convertSlashes;
|
|
689
|
-
const WINDOWS_ROOT_DIR_REGEX = /^[a-z]:[\\/]$/i;
|
|
690
|
-
function isRootDirectory(path) {
|
|
691
|
-
return "/" === path || WINDOWS_ROOT_DIR_REGEX.test(path);
|
|
692
|
-
}
|
|
693
|
-
exports.isRootDirectory = isRootDirectory;
|
|
694
|
-
function normalizePath(path, options) {
|
|
695
|
-
const { resolvePaths, normalizePath, pathSeparator } = options;
|
|
696
|
-
const pathNeedsCleaning = "win32" === process.platform && path.includes("/") || path.startsWith(".");
|
|
697
|
-
if (resolvePaths) path = (0, path_1.resolve)(path);
|
|
698
|
-
if (normalizePath || pathNeedsCleaning) path = cleanPath(path);
|
|
699
|
-
if ("." === path) return "";
|
|
700
|
-
const needsSeperator = path[path.length - 1] !== pathSeparator;
|
|
701
|
-
return convertSlashes(needsSeperator ? path + pathSeparator : path, pathSeparator);
|
|
702
|
-
}
|
|
703
|
-
exports.normalizePath = normalizePath;
|
|
704
|
-
},
|
|
705
10
|
"./node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js": function(module) {
|
|
706
11
|
let p = process || {}, argv = p.argv || [], env = p.env || {};
|
|
707
12
|
let isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || "win32" === p.platform || (p.stdout || {}).isTTY && "dumb" !== env.TERM || !!env.CI);
|
|
@@ -768,9 +73,9 @@ var __webpack_modules__ = {
|
|
|
768
73
|
module.exports = createColors();
|
|
769
74
|
module.exports.createColors = createColors;
|
|
770
75
|
},
|
|
771
|
-
"./node_modules/.pnpm/picomatch@4.0.
|
|
772
|
-
const pico = __webpack_require__("./node_modules/.pnpm/picomatch@4.0.
|
|
773
|
-
const utils = __webpack_require__("./node_modules/.pnpm/picomatch@4.0.
|
|
76
|
+
"./node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/index.js": function(module, __unused_webpack_exports, __webpack_require__) {
|
|
77
|
+
const pico = __webpack_require__("./node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/picomatch.js");
|
|
78
|
+
const utils = __webpack_require__("./node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/utils.js");
|
|
774
79
|
function picomatch(glob, options, returnState = false) {
|
|
775
80
|
if (options && (null === options.windows || void 0 === options.windows)) options = {
|
|
776
81
|
...options,
|
|
@@ -781,7 +86,7 @@ var __webpack_modules__ = {
|
|
|
781
86
|
Object.assign(picomatch, pico);
|
|
782
87
|
module.exports = picomatch;
|
|
783
88
|
},
|
|
784
|
-
"./node_modules/.pnpm/picomatch@4.0.
|
|
89
|
+
"./node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/constants.js": function(module) {
|
|
785
90
|
const WIN_SLASH = '\\\\/';
|
|
786
91
|
const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
|
|
787
92
|
const DOT_LITERAL = '\\.';
|
|
@@ -859,6 +164,7 @@ var __webpack_modules__ = {
|
|
|
859
164
|
REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g,
|
|
860
165
|
REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
|
|
861
166
|
REPLACEMENTS: {
|
|
167
|
+
__proto__: null,
|
|
862
168
|
'***': '*',
|
|
863
169
|
'**/**': '**',
|
|
864
170
|
'**/**/**': '**'
|
|
@@ -940,9 +246,9 @@ var __webpack_modules__ = {
|
|
|
940
246
|
}
|
|
941
247
|
};
|
|
942
248
|
},
|
|
943
|
-
"./node_modules/.pnpm/picomatch@4.0.
|
|
944
|
-
const constants = __webpack_require__("./node_modules/.pnpm/picomatch@4.0.
|
|
945
|
-
const utils = __webpack_require__("./node_modules/.pnpm/picomatch@4.0.
|
|
249
|
+
"./node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/parse.js": function(module, __unused_webpack_exports, __webpack_require__) {
|
|
250
|
+
const constants = __webpack_require__("./node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/constants.js");
|
|
251
|
+
const utils = __webpack_require__("./node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/utils.js");
|
|
946
252
|
const { MAX_LENGTH, POSIX_REGEX_SOURCE, REGEX_NON_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_BACKREF, REPLACEMENTS } = constants;
|
|
947
253
|
const expandRange = (args, options)=>{
|
|
948
254
|
if ('function' == typeof options.expandRange) return options.expandRange(...args, options);
|
|
@@ -1728,11 +1034,11 @@ var __webpack_modules__ = {
|
|
|
1728
1034
|
};
|
|
1729
1035
|
module.exports = parse;
|
|
1730
1036
|
},
|
|
1731
|
-
"./node_modules/.pnpm/picomatch@4.0.
|
|
1732
|
-
const scan = __webpack_require__("./node_modules/.pnpm/picomatch@4.0.
|
|
1733
|
-
const parse = __webpack_require__("./node_modules/.pnpm/picomatch@4.0.
|
|
1734
|
-
const utils = __webpack_require__("./node_modules/.pnpm/picomatch@4.0.
|
|
1735
|
-
const constants = __webpack_require__("./node_modules/.pnpm/picomatch@4.0.
|
|
1037
|
+
"./node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/picomatch.js": function(module, __unused_webpack_exports, __webpack_require__) {
|
|
1038
|
+
const scan = __webpack_require__("./node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/scan.js");
|
|
1039
|
+
const parse = __webpack_require__("./node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/parse.js");
|
|
1040
|
+
const utils = __webpack_require__("./node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/utils.js");
|
|
1041
|
+
const constants = __webpack_require__("./node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/constants.js");
|
|
1736
1042
|
const isObject = (val)=>val && 'object' == typeof val && !Array.isArray(val);
|
|
1737
1043
|
const picomatch = (glob, options, returnState = false)=>{
|
|
1738
1044
|
if (Array.isArray(glob)) {
|
|
@@ -1861,9 +1167,9 @@ var __webpack_modules__ = {
|
|
|
1861
1167
|
picomatch.constants = constants;
|
|
1862
1168
|
module.exports = picomatch;
|
|
1863
1169
|
},
|
|
1864
|
-
"./node_modules/.pnpm/picomatch@4.0.
|
|
1865
|
-
const utils = __webpack_require__("./node_modules/.pnpm/picomatch@4.0.
|
|
1866
|
-
const { CHAR_ASTERISK, CHAR_AT, CHAR_BACKWARD_SLASH, CHAR_COMMA, CHAR_DOT, CHAR_EXCLAMATION_MARK, CHAR_FORWARD_SLASH, CHAR_LEFT_CURLY_BRACE, CHAR_LEFT_PARENTHESES, CHAR_LEFT_SQUARE_BRACKET, CHAR_PLUS, CHAR_QUESTION_MARK, CHAR_RIGHT_CURLY_BRACE, CHAR_RIGHT_PARENTHESES, CHAR_RIGHT_SQUARE_BRACKET } = __webpack_require__("./node_modules/.pnpm/picomatch@4.0.
|
|
1170
|
+
"./node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/scan.js": function(module, __unused_webpack_exports, __webpack_require__) {
|
|
1171
|
+
const utils = __webpack_require__("./node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/utils.js");
|
|
1172
|
+
const { CHAR_ASTERISK, CHAR_AT, CHAR_BACKWARD_SLASH, CHAR_COMMA, CHAR_DOT, CHAR_EXCLAMATION_MARK, CHAR_FORWARD_SLASH, CHAR_LEFT_CURLY_BRACE, CHAR_LEFT_PARENTHESES, CHAR_LEFT_SQUARE_BRACKET, CHAR_PLUS, CHAR_QUESTION_MARK, CHAR_RIGHT_CURLY_BRACE, CHAR_RIGHT_PARENTHESES, CHAR_RIGHT_SQUARE_BRACKET } = __webpack_require__("./node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/constants.js");
|
|
1867
1173
|
const isPathSeparator = (code)=>code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
|
|
1868
1174
|
const depth = (token)=>{
|
|
1869
1175
|
if (true !== token.isPrefix) token.depth = token.isGlobstar ? 1 / 0 : 1;
|
|
@@ -2129,8 +1435,8 @@ var __webpack_modules__ = {
|
|
|
2129
1435
|
};
|
|
2130
1436
|
module.exports = scan;
|
|
2131
1437
|
},
|
|
2132
|
-
"./node_modules/.pnpm/picomatch@4.0.
|
|
2133
|
-
const { REGEX_BACKSLASH, REGEX_REMOVE_BACKSLASH, REGEX_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_GLOBAL } = __webpack_require__("./node_modules/.pnpm/picomatch@4.0.
|
|
1438
|
+
"./node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/utils.js": function(__unused_webpack_module, exports, __webpack_require__) {
|
|
1439
|
+
const { REGEX_BACKSLASH, REGEX_REMOVE_BACKSLASH, REGEX_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_GLOBAL } = __webpack_require__("./node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/constants.js");
|
|
2134
1440
|
exports.isObject = (val)=>null !== val && 'object' == typeof val && !Array.isArray(val);
|
|
2135
1441
|
exports.hasRegexChars = (str)=>REGEX_SPECIAL_CHARS.test(str);
|
|
2136
1442
|
exports.isRegexChar = (str)=>1 === str.length && exports.hasRegexChars(str);
|
|
@@ -2172,12 +1478,6 @@ var __webpack_modules__ = {
|
|
|
2172
1478
|
if ('' === last) return segs[segs.length - 2];
|
|
2173
1479
|
return last;
|
|
2174
1480
|
};
|
|
2175
|
-
},
|
|
2176
|
-
fs: function(module) {
|
|
2177
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE_fs__;
|
|
2178
|
-
},
|
|
2179
|
-
path: function(module) {
|
|
2180
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE_path__;
|
|
2181
1481
|
}
|
|
2182
1482
|
};
|
|
2183
1483
|
var __webpack_module_cache__ = {};
|
|
@@ -2187,7 +1487,7 @@ function __webpack_require__(moduleId) {
|
|
|
2187
1487
|
var module = __webpack_module_cache__[moduleId] = {
|
|
2188
1488
|
exports: {}
|
|
2189
1489
|
};
|
|
2190
|
-
__webpack_modules__[moduleId]
|
|
1490
|
+
__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
2191
1491
|
return module.exports;
|
|
2192
1492
|
}
|
|
2193
1493
|
(()=>{
|
|
@@ -2281,6 +1581,8 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
|
2281
1581
|
if ('TEAMCITY_VERSION' in env) return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
|
2282
1582
|
if ('truecolor' === env.COLORTERM) return 3;
|
|
2283
1583
|
if ('xterm-kitty' === env.TERM) return 3;
|
|
1584
|
+
if ('xterm-ghostty' === env.TERM) return 3;
|
|
1585
|
+
if ('wezterm' === env.TERM) return 3;
|
|
2284
1586
|
if ('TERM_PROGRAM' in env) {
|
|
2285
1587
|
const version = Number.parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
|
|
2286
1588
|
switch(env.TERM_PROGRAM){
|
|
@@ -2415,6 +1717,14 @@ let LOG_TYPES = {
|
|
|
2415
1717
|
color: magenta
|
|
2416
1718
|
}
|
|
2417
1719
|
};
|
|
1720
|
+
const normalizeErrorMessage = (err)=>{
|
|
1721
|
+
if (err.stack) {
|
|
1722
|
+
let [name, ...rest] = err.stack.split('\n');
|
|
1723
|
+
if (name.startsWith('Error: ')) name = name.slice(7);
|
|
1724
|
+
return `${name}\n${gray(rest.join('\n'))}`;
|
|
1725
|
+
}
|
|
1726
|
+
return err.message;
|
|
1727
|
+
};
|
|
2418
1728
|
let createLogger = (options = {})=>{
|
|
2419
1729
|
let maxLevel = options.level || 'info';
|
|
2420
1730
|
let log = (type, message, ...args)=>{
|
|
@@ -2427,12 +1737,14 @@ let createLogger = (options = {})=>{
|
|
|
2427
1737
|
label = (logType.label || '').padEnd(7);
|
|
2428
1738
|
label = bold(logType.color ? logType.color(label) : label);
|
|
2429
1739
|
}
|
|
2430
|
-
if (message instanceof Error)
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
1740
|
+
if (message instanceof Error) {
|
|
1741
|
+
text += normalizeErrorMessage(message);
|
|
1742
|
+
const { cause } = message;
|
|
1743
|
+
if (cause) {
|
|
1744
|
+
text += yellow('\n [cause]: ');
|
|
1745
|
+
text += cause instanceof Error ? normalizeErrorMessage(cause) : String(cause);
|
|
1746
|
+
}
|
|
1747
|
+
} else if ('error' === logType.level && 'string' == typeof message) {
|
|
2436
1748
|
let lines = message.split('\n');
|
|
2437
1749
|
text = lines.map((line)=>isErrorStackMessage(line) ? gray(line) : line).join('\n');
|
|
2438
1750
|
} else text = `${message}`;
|
|
@@ -2456,37 +1768,523 @@ let createLogger = (options = {})=>{
|
|
|
2456
1768
|
return logger;
|
|
2457
1769
|
};
|
|
2458
1770
|
let src_logger = createLogger();
|
|
2459
|
-
var
|
|
2460
|
-
|
|
2461
|
-
|
|
1771
|
+
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
1772
|
+
function cleanPath(path) {
|
|
1773
|
+
let normalized = normalize(path);
|
|
1774
|
+
if (normalized.length > 1 && normalized[normalized.length - 1] === sep) normalized = normalized.substring(0, normalized.length - 1);
|
|
1775
|
+
return normalized;
|
|
1776
|
+
}
|
|
1777
|
+
const SLASHES_REGEX = /[\\/]/g;
|
|
1778
|
+
function convertSlashes(path, separator) {
|
|
1779
|
+
return path.replace(SLASHES_REGEX, separator);
|
|
1780
|
+
}
|
|
1781
|
+
const WINDOWS_ROOT_DIR_REGEX = /^[a-z]:[\\/]$/i;
|
|
1782
|
+
function isRootDirectory(path) {
|
|
1783
|
+
return "/" === path || WINDOWS_ROOT_DIR_REGEX.test(path);
|
|
1784
|
+
}
|
|
1785
|
+
function normalizePath(path, options) {
|
|
1786
|
+
const { resolvePaths, normalizePath: normalizePath$1, pathSeparator } = options;
|
|
1787
|
+
const pathNeedsCleaning = "win32" === process.platform && path.includes("/") || path.startsWith(".");
|
|
1788
|
+
if (resolvePaths) path = resolve(path);
|
|
1789
|
+
if (normalizePath$1 || pathNeedsCleaning) path = cleanPath(path);
|
|
1790
|
+
if ("." === path) return "";
|
|
1791
|
+
const needsSeperator = path[path.length - 1] !== pathSeparator;
|
|
1792
|
+
return convertSlashes(needsSeperator ? path + pathSeparator : path, pathSeparator);
|
|
1793
|
+
}
|
|
1794
|
+
function joinPathWithBasePath(filename, directoryPath) {
|
|
1795
|
+
return directoryPath + filename;
|
|
1796
|
+
}
|
|
1797
|
+
function joinPathWithRelativePath(root, options) {
|
|
1798
|
+
return function(filename, directoryPath) {
|
|
1799
|
+
const sameRoot = directoryPath.startsWith(root);
|
|
1800
|
+
if (sameRoot) return directoryPath.slice(root.length) + filename;
|
|
1801
|
+
return convertSlashes(external_path_relative(root, directoryPath), options.pathSeparator) + options.pathSeparator + filename;
|
|
1802
|
+
};
|
|
1803
|
+
}
|
|
1804
|
+
function joinPath(filename) {
|
|
1805
|
+
return filename;
|
|
1806
|
+
}
|
|
1807
|
+
function joinDirectoryPath(filename, directoryPath, separator) {
|
|
1808
|
+
return directoryPath + filename + separator;
|
|
1809
|
+
}
|
|
1810
|
+
function build$7(root, options) {
|
|
1811
|
+
const { relativePaths, includeBasePath } = options;
|
|
1812
|
+
return relativePaths && root ? joinPathWithRelativePath(root, options) : includeBasePath ? joinPathWithBasePath : joinPath;
|
|
1813
|
+
}
|
|
1814
|
+
function pushDirectoryWithRelativePath(root) {
|
|
1815
|
+
return function(directoryPath, paths) {
|
|
1816
|
+
paths.push(directoryPath.substring(root.length) || ".");
|
|
1817
|
+
};
|
|
1818
|
+
}
|
|
1819
|
+
function pushDirectoryFilterWithRelativePath(root) {
|
|
1820
|
+
return function(directoryPath, paths, filters) {
|
|
1821
|
+
const relativePath = directoryPath.substring(root.length) || ".";
|
|
1822
|
+
if (filters.every((filter)=>filter(relativePath, true))) paths.push(relativePath);
|
|
1823
|
+
};
|
|
1824
|
+
}
|
|
1825
|
+
const pushDirectory = (directoryPath, paths)=>{
|
|
1826
|
+
paths.push(directoryPath || ".");
|
|
1827
|
+
};
|
|
1828
|
+
const pushDirectoryFilter = (directoryPath, paths, filters)=>{
|
|
1829
|
+
const path = directoryPath || ".";
|
|
1830
|
+
if (filters.every((filter)=>filter(path, true))) paths.push(path);
|
|
1831
|
+
};
|
|
1832
|
+
const empty$2 = ()=>{};
|
|
1833
|
+
function build$6(root, options) {
|
|
1834
|
+
const { includeDirs, filters, relativePaths } = options;
|
|
1835
|
+
if (!includeDirs) return empty$2;
|
|
1836
|
+
if (relativePaths) return filters && filters.length ? pushDirectoryFilterWithRelativePath(root) : pushDirectoryWithRelativePath(root);
|
|
1837
|
+
return filters && filters.length ? pushDirectoryFilter : pushDirectory;
|
|
1838
|
+
}
|
|
1839
|
+
const pushFileFilterAndCount = (filename, _paths, counts, filters)=>{
|
|
1840
|
+
if (filters.every((filter)=>filter(filename, false))) counts.files++;
|
|
1841
|
+
};
|
|
1842
|
+
const pushFileFilter = (filename, paths, _counts, filters)=>{
|
|
1843
|
+
if (filters.every((filter)=>filter(filename, false))) paths.push(filename);
|
|
1844
|
+
};
|
|
1845
|
+
const pushFileCount = (_filename, _paths, counts, _filters)=>{
|
|
1846
|
+
counts.files++;
|
|
1847
|
+
};
|
|
1848
|
+
const pushFile = (filename, paths)=>{
|
|
1849
|
+
paths.push(filename);
|
|
1850
|
+
};
|
|
1851
|
+
const empty$1 = ()=>{};
|
|
1852
|
+
function build$5(options) {
|
|
1853
|
+
const { excludeFiles, filters, onlyCounts } = options;
|
|
1854
|
+
if (excludeFiles) return empty$1;
|
|
1855
|
+
if (filters && filters.length) return onlyCounts ? pushFileFilterAndCount : pushFileFilter;
|
|
1856
|
+
if (onlyCounts) return pushFileCount;
|
|
1857
|
+
return pushFile;
|
|
1858
|
+
}
|
|
1859
|
+
const getArray = (paths)=>paths;
|
|
1860
|
+
const getArrayGroup = ()=>[
|
|
1861
|
+
""
|
|
1862
|
+
].slice(0, 0);
|
|
1863
|
+
function build$4(options) {
|
|
1864
|
+
return options.group ? getArrayGroup : getArray;
|
|
1865
|
+
}
|
|
1866
|
+
const groupFiles = (groups, directory, files)=>{
|
|
1867
|
+
groups.push({
|
|
1868
|
+
directory,
|
|
1869
|
+
files,
|
|
1870
|
+
dir: directory
|
|
1871
|
+
});
|
|
1872
|
+
};
|
|
1873
|
+
const empty = ()=>{};
|
|
1874
|
+
function build$3(options) {
|
|
1875
|
+
return options.group ? groupFiles : empty;
|
|
1876
|
+
}
|
|
1877
|
+
const resolveSymlinksAsync = function(path, state, callback$1) {
|
|
1878
|
+
const { queue, fs, options: { suppressErrors } } = state;
|
|
1879
|
+
queue.enqueue();
|
|
1880
|
+
fs.realpath(path, (error, resolvedPath)=>{
|
|
1881
|
+
if (error) return queue.dequeue(suppressErrors ? null : error, state);
|
|
1882
|
+
fs.stat(resolvedPath, (error$1, stat)=>{
|
|
1883
|
+
if (error$1) return queue.dequeue(suppressErrors ? null : error$1, state);
|
|
1884
|
+
if (stat.isDirectory() && isRecursive(path, resolvedPath, state)) return queue.dequeue(null, state);
|
|
1885
|
+
callback$1(stat, resolvedPath);
|
|
1886
|
+
queue.dequeue(null, state);
|
|
1887
|
+
});
|
|
1888
|
+
});
|
|
1889
|
+
};
|
|
1890
|
+
const resolveSymlinks = function(path, state, callback$1) {
|
|
1891
|
+
const { queue, fs, options: { suppressErrors } } = state;
|
|
1892
|
+
queue.enqueue();
|
|
1893
|
+
try {
|
|
1894
|
+
const resolvedPath = fs.realpathSync(path);
|
|
1895
|
+
const stat = fs.statSync(resolvedPath);
|
|
1896
|
+
if (stat.isDirectory() && isRecursive(path, resolvedPath, state)) return;
|
|
1897
|
+
callback$1(stat, resolvedPath);
|
|
1898
|
+
} catch (e) {
|
|
1899
|
+
if (!suppressErrors) throw e;
|
|
1900
|
+
}
|
|
1901
|
+
};
|
|
1902
|
+
function build$2(options, isSynchronous) {
|
|
1903
|
+
if (!options.resolveSymlinks || options.excludeSymlinks) return null;
|
|
1904
|
+
return isSynchronous ? resolveSymlinks : resolveSymlinksAsync;
|
|
1905
|
+
}
|
|
1906
|
+
function isRecursive(path, resolved, state) {
|
|
1907
|
+
if (state.options.useRealPaths) return isRecursiveUsingRealPaths(resolved, state);
|
|
1908
|
+
let parent = dirname(path);
|
|
1909
|
+
let depth = 1;
|
|
1910
|
+
while(parent !== state.root && depth < 2){
|
|
1911
|
+
const resolvedPath = state.symlinks.get(parent);
|
|
1912
|
+
const isSameRoot = !!resolvedPath && (resolvedPath === resolved || resolvedPath.startsWith(resolved) || resolved.startsWith(resolvedPath));
|
|
1913
|
+
if (isSameRoot) depth++;
|
|
1914
|
+
else parent = dirname(parent);
|
|
1915
|
+
}
|
|
1916
|
+
state.symlinks.set(path, resolved);
|
|
1917
|
+
return depth > 1;
|
|
1918
|
+
}
|
|
1919
|
+
function isRecursiveUsingRealPaths(resolved, state) {
|
|
1920
|
+
return state.visited.includes(resolved + state.options.pathSeparator);
|
|
1921
|
+
}
|
|
1922
|
+
const onlyCountsSync = (state)=>state.counts;
|
|
1923
|
+
const groupsSync = (state)=>state.groups;
|
|
1924
|
+
const defaultSync = (state)=>state.paths;
|
|
1925
|
+
const limitFilesSync = (state)=>state.paths.slice(0, state.options.maxFiles);
|
|
1926
|
+
const onlyCountsAsync = (state, error, callback$1)=>{
|
|
1927
|
+
report(error, callback$1, state.counts, state.options.suppressErrors);
|
|
1928
|
+
return null;
|
|
1929
|
+
};
|
|
1930
|
+
const defaultAsync = (state, error, callback$1)=>{
|
|
1931
|
+
report(error, callback$1, state.paths, state.options.suppressErrors);
|
|
1932
|
+
return null;
|
|
1933
|
+
};
|
|
1934
|
+
const limitFilesAsync = (state, error, callback$1)=>{
|
|
1935
|
+
report(error, callback$1, state.paths.slice(0, state.options.maxFiles), state.options.suppressErrors);
|
|
1936
|
+
return null;
|
|
1937
|
+
};
|
|
1938
|
+
const groupsAsync = (state, error, callback$1)=>{
|
|
1939
|
+
report(error, callback$1, state.groups, state.options.suppressErrors);
|
|
1940
|
+
return null;
|
|
1941
|
+
};
|
|
1942
|
+
function report(error, callback$1, output, suppressErrors) {
|
|
1943
|
+
callback$1(error && !suppressErrors ? error : null, output);
|
|
1944
|
+
}
|
|
1945
|
+
function build$1(options, isSynchronous) {
|
|
1946
|
+
const { onlyCounts, group, maxFiles } = options;
|
|
1947
|
+
if (onlyCounts) return isSynchronous ? onlyCountsSync : onlyCountsAsync;
|
|
1948
|
+
if (group) return isSynchronous ? groupsSync : groupsAsync;
|
|
1949
|
+
if (maxFiles) return isSynchronous ? limitFilesSync : limitFilesAsync;
|
|
1950
|
+
return isSynchronous ? defaultSync : defaultAsync;
|
|
1951
|
+
}
|
|
1952
|
+
const readdirOpts = {
|
|
1953
|
+
withFileTypes: true
|
|
1954
|
+
};
|
|
1955
|
+
const walkAsync = (state, crawlPath, directoryPath, currentDepth, callback$1)=>{
|
|
1956
|
+
state.queue.enqueue();
|
|
1957
|
+
if (currentDepth < 0) return state.queue.dequeue(null, state);
|
|
1958
|
+
const { fs } = state;
|
|
1959
|
+
state.visited.push(crawlPath);
|
|
1960
|
+
state.counts.directories++;
|
|
1961
|
+
fs.readdir(crawlPath || ".", readdirOpts, (error, entries = [])=>{
|
|
1962
|
+
callback$1(entries, directoryPath, currentDepth);
|
|
1963
|
+
state.queue.dequeue(state.options.suppressErrors ? null : error, state);
|
|
1964
|
+
});
|
|
1965
|
+
};
|
|
1966
|
+
const walkSync = (state, crawlPath, directoryPath, currentDepth, callback$1)=>{
|
|
1967
|
+
const { fs } = state;
|
|
1968
|
+
if (currentDepth < 0) return;
|
|
1969
|
+
state.visited.push(crawlPath);
|
|
1970
|
+
state.counts.directories++;
|
|
1971
|
+
let entries = [];
|
|
1972
|
+
try {
|
|
1973
|
+
entries = fs.readdirSync(crawlPath || ".", readdirOpts);
|
|
1974
|
+
} catch (e) {
|
|
1975
|
+
if (!state.options.suppressErrors) throw e;
|
|
1976
|
+
}
|
|
1977
|
+
callback$1(entries, directoryPath, currentDepth);
|
|
1978
|
+
};
|
|
1979
|
+
function build(isSynchronous) {
|
|
1980
|
+
return isSynchronous ? walkSync : walkAsync;
|
|
1981
|
+
}
|
|
1982
|
+
var Queue = class {
|
|
1983
|
+
count = 0;
|
|
1984
|
+
constructor(onQueueEmpty){
|
|
1985
|
+
this.onQueueEmpty = onQueueEmpty;
|
|
1986
|
+
}
|
|
1987
|
+
enqueue() {
|
|
1988
|
+
this.count++;
|
|
1989
|
+
return this.count;
|
|
1990
|
+
}
|
|
1991
|
+
dequeue(error, output) {
|
|
1992
|
+
if (this.onQueueEmpty && (--this.count <= 0 || error)) {
|
|
1993
|
+
this.onQueueEmpty(error, output);
|
|
1994
|
+
if (error) {
|
|
1995
|
+
output.controller.abort();
|
|
1996
|
+
this.onQueueEmpty = void 0;
|
|
1997
|
+
}
|
|
1998
|
+
}
|
|
1999
|
+
}
|
|
2000
|
+
};
|
|
2001
|
+
var Counter = class {
|
|
2002
|
+
_files = 0;
|
|
2003
|
+
_directories = 0;
|
|
2004
|
+
set files(num) {
|
|
2005
|
+
this._files = num;
|
|
2006
|
+
}
|
|
2007
|
+
get files() {
|
|
2008
|
+
return this._files;
|
|
2009
|
+
}
|
|
2010
|
+
set directories(num) {
|
|
2011
|
+
this._directories = num;
|
|
2012
|
+
}
|
|
2013
|
+
get directories() {
|
|
2014
|
+
return this._directories;
|
|
2015
|
+
}
|
|
2016
|
+
get dirs() {
|
|
2017
|
+
return this._directories;
|
|
2018
|
+
}
|
|
2019
|
+
};
|
|
2020
|
+
var Aborter = class {
|
|
2021
|
+
aborted = false;
|
|
2022
|
+
abort() {
|
|
2023
|
+
this.aborted = true;
|
|
2024
|
+
}
|
|
2025
|
+
};
|
|
2026
|
+
var Walker = class {
|
|
2027
|
+
root;
|
|
2028
|
+
isSynchronous;
|
|
2029
|
+
state;
|
|
2030
|
+
joinPath;
|
|
2031
|
+
pushDirectory;
|
|
2032
|
+
pushFile;
|
|
2033
|
+
getArray;
|
|
2034
|
+
groupFiles;
|
|
2035
|
+
resolveSymlink;
|
|
2036
|
+
walkDirectory;
|
|
2037
|
+
callbackInvoker;
|
|
2038
|
+
constructor(root, options, callback$1){
|
|
2039
|
+
this.isSynchronous = !callback$1;
|
|
2040
|
+
this.callbackInvoker = build$1(options, this.isSynchronous);
|
|
2041
|
+
this.root = normalizePath(root, options);
|
|
2042
|
+
this.state = {
|
|
2043
|
+
root: isRootDirectory(this.root) ? this.root : this.root.slice(0, -1),
|
|
2044
|
+
paths: [
|
|
2045
|
+
""
|
|
2046
|
+
].slice(0, 0),
|
|
2047
|
+
groups: [],
|
|
2048
|
+
counts: new Counter(),
|
|
2049
|
+
options,
|
|
2050
|
+
queue: new Queue((error, state)=>this.callbackInvoker(state, error, callback$1)),
|
|
2051
|
+
symlinks: /* @__PURE__ */ new Map(),
|
|
2052
|
+
visited: [
|
|
2053
|
+
""
|
|
2054
|
+
].slice(0, 0),
|
|
2055
|
+
controller: new Aborter(),
|
|
2056
|
+
fs: options.fs || __WEBPACK_EXTERNAL_MODULE_fs__
|
|
2057
|
+
};
|
|
2058
|
+
this.joinPath = build$7(this.root, options);
|
|
2059
|
+
this.pushDirectory = build$6(this.root, options);
|
|
2060
|
+
this.pushFile = build$5(options);
|
|
2061
|
+
this.getArray = build$4(options);
|
|
2062
|
+
this.groupFiles = build$3(options);
|
|
2063
|
+
this.resolveSymlink = build$2(options, this.isSynchronous);
|
|
2064
|
+
this.walkDirectory = build(this.isSynchronous);
|
|
2065
|
+
}
|
|
2066
|
+
start() {
|
|
2067
|
+
this.pushDirectory(this.root, this.state.paths, this.state.options.filters);
|
|
2068
|
+
this.walkDirectory(this.state, this.root, this.root, this.state.options.maxDepth, this.walk);
|
|
2069
|
+
return this.isSynchronous ? this.callbackInvoker(this.state, null) : null;
|
|
2070
|
+
}
|
|
2071
|
+
walk = (entries, directoryPath, depth)=>{
|
|
2072
|
+
const { paths, options: { filters, resolveSymlinks: resolveSymlinks$1, excludeSymlinks, exclude, maxFiles, signal, useRealPaths, pathSeparator }, controller } = this.state;
|
|
2073
|
+
if (controller.aborted || signal && signal.aborted || maxFiles && paths.length > maxFiles) return;
|
|
2074
|
+
const files = this.getArray(this.state.paths);
|
|
2075
|
+
for(let i = 0; i < entries.length; ++i){
|
|
2076
|
+
const entry = entries[i];
|
|
2077
|
+
if (entry.isFile() || entry.isSymbolicLink() && !resolveSymlinks$1 && !excludeSymlinks) {
|
|
2078
|
+
const filename = this.joinPath(entry.name, directoryPath);
|
|
2079
|
+
this.pushFile(filename, files, this.state.counts, filters);
|
|
2080
|
+
} else if (entry.isDirectory()) {
|
|
2081
|
+
let path = joinDirectoryPath(entry.name, directoryPath, this.state.options.pathSeparator);
|
|
2082
|
+
if (exclude && exclude(entry.name, path)) continue;
|
|
2083
|
+
this.pushDirectory(path, paths, filters);
|
|
2084
|
+
this.walkDirectory(this.state, path, path, depth - 1, this.walk);
|
|
2085
|
+
} else if (this.resolveSymlink && entry.isSymbolicLink()) {
|
|
2086
|
+
let path = joinPathWithBasePath(entry.name, directoryPath);
|
|
2087
|
+
this.resolveSymlink(path, this.state, (stat, resolvedPath)=>{
|
|
2088
|
+
if (stat.isDirectory()) {
|
|
2089
|
+
resolvedPath = normalizePath(resolvedPath, this.state.options);
|
|
2090
|
+
if (exclude && exclude(entry.name, useRealPaths ? resolvedPath : path + pathSeparator)) return;
|
|
2091
|
+
this.walkDirectory(this.state, resolvedPath, useRealPaths ? resolvedPath : path + pathSeparator, depth - 1, this.walk);
|
|
2092
|
+
} else {
|
|
2093
|
+
resolvedPath = useRealPaths ? resolvedPath : path;
|
|
2094
|
+
const filename = basename(resolvedPath);
|
|
2095
|
+
const directoryPath$1 = normalizePath(dirname(resolvedPath), this.state.options);
|
|
2096
|
+
resolvedPath = this.joinPath(filename, directoryPath$1);
|
|
2097
|
+
this.pushFile(resolvedPath, files, this.state.counts, filters);
|
|
2098
|
+
}
|
|
2099
|
+
});
|
|
2100
|
+
}
|
|
2101
|
+
}
|
|
2102
|
+
this.groupFiles(this.state.groups, directoryPath, files);
|
|
2103
|
+
};
|
|
2104
|
+
};
|
|
2105
|
+
function promise(root, options) {
|
|
2106
|
+
return new Promise((resolve$1, reject)=>{
|
|
2107
|
+
callback(root, options, (err, output)=>{
|
|
2108
|
+
if (err) return reject(err);
|
|
2109
|
+
resolve$1(output);
|
|
2110
|
+
});
|
|
2111
|
+
});
|
|
2112
|
+
}
|
|
2113
|
+
function callback(root, options, callback$1) {
|
|
2114
|
+
let walker = new Walker(root, options, callback$1);
|
|
2115
|
+
walker.start();
|
|
2116
|
+
}
|
|
2117
|
+
function sync(root, options) {
|
|
2118
|
+
const walker = new Walker(root, options);
|
|
2119
|
+
return walker.start();
|
|
2120
|
+
}
|
|
2121
|
+
var APIBuilder = class {
|
|
2122
|
+
constructor(root, options){
|
|
2123
|
+
this.root = root;
|
|
2124
|
+
this.options = options;
|
|
2125
|
+
}
|
|
2126
|
+
withPromise() {
|
|
2127
|
+
return promise(this.root, this.options);
|
|
2128
|
+
}
|
|
2129
|
+
withCallback(cb) {
|
|
2130
|
+
callback(this.root, this.options, cb);
|
|
2131
|
+
}
|
|
2132
|
+
sync() {
|
|
2133
|
+
return sync(this.root, this.options);
|
|
2134
|
+
}
|
|
2135
|
+
};
|
|
2136
|
+
let pm = null;
|
|
2137
|
+
try {
|
|
2138
|
+
__require.resolve("picomatch");
|
|
2139
|
+
pm = __require("picomatch");
|
|
2140
|
+
} catch {}
|
|
2141
|
+
var Builder = class {
|
|
2142
|
+
globCache = {};
|
|
2143
|
+
options = {
|
|
2144
|
+
maxDepth: 1 / 0,
|
|
2145
|
+
suppressErrors: true,
|
|
2146
|
+
pathSeparator: sep,
|
|
2147
|
+
filters: []
|
|
2148
|
+
};
|
|
2149
|
+
globFunction;
|
|
2150
|
+
constructor(options){
|
|
2151
|
+
this.options = {
|
|
2152
|
+
...this.options,
|
|
2153
|
+
...options
|
|
2154
|
+
};
|
|
2155
|
+
this.globFunction = this.options.globFunction;
|
|
2156
|
+
}
|
|
2157
|
+
group() {
|
|
2158
|
+
this.options.group = true;
|
|
2159
|
+
return this;
|
|
2160
|
+
}
|
|
2161
|
+
withPathSeparator(separator) {
|
|
2162
|
+
this.options.pathSeparator = separator;
|
|
2163
|
+
return this;
|
|
2164
|
+
}
|
|
2165
|
+
withBasePath() {
|
|
2166
|
+
this.options.includeBasePath = true;
|
|
2167
|
+
return this;
|
|
2168
|
+
}
|
|
2169
|
+
withRelativePaths() {
|
|
2170
|
+
this.options.relativePaths = true;
|
|
2171
|
+
return this;
|
|
2172
|
+
}
|
|
2173
|
+
withDirs() {
|
|
2174
|
+
this.options.includeDirs = true;
|
|
2175
|
+
return this;
|
|
2176
|
+
}
|
|
2177
|
+
withMaxDepth(depth) {
|
|
2178
|
+
this.options.maxDepth = depth;
|
|
2179
|
+
return this;
|
|
2180
|
+
}
|
|
2181
|
+
withMaxFiles(limit) {
|
|
2182
|
+
this.options.maxFiles = limit;
|
|
2183
|
+
return this;
|
|
2184
|
+
}
|
|
2185
|
+
withFullPaths() {
|
|
2186
|
+
this.options.resolvePaths = true;
|
|
2187
|
+
this.options.includeBasePath = true;
|
|
2188
|
+
return this;
|
|
2189
|
+
}
|
|
2190
|
+
withErrors() {
|
|
2191
|
+
this.options.suppressErrors = false;
|
|
2192
|
+
return this;
|
|
2193
|
+
}
|
|
2194
|
+
withSymlinks({ resolvePaths = true } = {}) {
|
|
2195
|
+
this.options.resolveSymlinks = true;
|
|
2196
|
+
this.options.useRealPaths = resolvePaths;
|
|
2197
|
+
return this.withFullPaths();
|
|
2198
|
+
}
|
|
2199
|
+
withAbortSignal(signal) {
|
|
2200
|
+
this.options.signal = signal;
|
|
2201
|
+
return this;
|
|
2202
|
+
}
|
|
2203
|
+
normalize() {
|
|
2204
|
+
this.options.normalizePath = true;
|
|
2205
|
+
return this;
|
|
2206
|
+
}
|
|
2207
|
+
filter(predicate) {
|
|
2208
|
+
this.options.filters.push(predicate);
|
|
2209
|
+
return this;
|
|
2210
|
+
}
|
|
2211
|
+
onlyDirs() {
|
|
2212
|
+
this.options.excludeFiles = true;
|
|
2213
|
+
this.options.includeDirs = true;
|
|
2214
|
+
return this;
|
|
2215
|
+
}
|
|
2216
|
+
exclude(predicate) {
|
|
2217
|
+
this.options.exclude = predicate;
|
|
2218
|
+
return this;
|
|
2219
|
+
}
|
|
2220
|
+
onlyCounts() {
|
|
2221
|
+
this.options.onlyCounts = true;
|
|
2222
|
+
return this;
|
|
2223
|
+
}
|
|
2224
|
+
crawl(root) {
|
|
2225
|
+
return new APIBuilder(root || ".", this.options);
|
|
2226
|
+
}
|
|
2227
|
+
withGlobFunction(fn) {
|
|
2228
|
+
this.globFunction = fn;
|
|
2229
|
+
return this;
|
|
2230
|
+
}
|
|
2231
|
+
crawlWithOptions(root, options) {
|
|
2232
|
+
this.options = {
|
|
2233
|
+
...this.options,
|
|
2234
|
+
...options
|
|
2235
|
+
};
|
|
2236
|
+
return new APIBuilder(root || ".", this.options);
|
|
2237
|
+
}
|
|
2238
|
+
glob(...patterns) {
|
|
2239
|
+
if (this.globFunction) return this.globWithOptions(patterns);
|
|
2240
|
+
return this.globWithOptions(patterns, {
|
|
2241
|
+
dot: true
|
|
2242
|
+
});
|
|
2243
|
+
}
|
|
2244
|
+
globWithOptions(patterns, ...options) {
|
|
2245
|
+
const globFn = this.globFunction || pm;
|
|
2246
|
+
if (!globFn) throw new Error("Please specify a glob function to use glob matching.");
|
|
2247
|
+
var isMatch = this.globCache[patterns.join("\0")];
|
|
2248
|
+
if (!isMatch) {
|
|
2249
|
+
isMatch = globFn(patterns, ...options);
|
|
2250
|
+
this.globCache[patterns.join("\0")] = isMatch;
|
|
2251
|
+
}
|
|
2252
|
+
this.options.filters.push((path)=>isMatch(path));
|
|
2253
|
+
return this;
|
|
2254
|
+
}
|
|
2255
|
+
};
|
|
2256
|
+
var picomatch = __webpack_require__("./node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/index.js");
|
|
2257
|
+
const isReadonlyArray = Array.isArray;
|
|
2258
|
+
const isWin = "win32" === process.platform;
|
|
2462
2259
|
const ONLY_PARENT_DIRECTORIES = /^(\/?\.\.)+$/;
|
|
2463
|
-
function getPartialMatcher(patterns, options) {
|
|
2260
|
+
function getPartialMatcher(patterns, options = {}) {
|
|
2464
2261
|
const patternsCount = patterns.length;
|
|
2465
2262
|
const patternsParts = Array(patternsCount);
|
|
2466
|
-
const
|
|
2263
|
+
const matchers = Array(patternsCount);
|
|
2264
|
+
const globstarEnabled = !options.noglobstar;
|
|
2467
2265
|
for(let i = 0; i < patternsCount; i++){
|
|
2468
2266
|
const parts = splitPattern(patterns[i]);
|
|
2469
2267
|
patternsParts[i] = parts;
|
|
2470
2268
|
const partsCount = parts.length;
|
|
2471
|
-
const
|
|
2472
|
-
for(let j = 0; j < partsCount; j++)
|
|
2473
|
-
|
|
2269
|
+
const partMatchers = Array(partsCount);
|
|
2270
|
+
for(let j = 0; j < partsCount; j++)partMatchers[j] = picomatch(parts[j], options);
|
|
2271
|
+
matchers[i] = partMatchers;
|
|
2474
2272
|
}
|
|
2475
2273
|
return (input)=>{
|
|
2476
2274
|
const inputParts = input.split("/");
|
|
2477
2275
|
if (".." === inputParts[0] && ONLY_PARENT_DIRECTORIES.test(input)) return true;
|
|
2478
2276
|
for(let i = 0; i < patterns.length; i++){
|
|
2479
2277
|
const patternParts = patternsParts[i];
|
|
2480
|
-
const
|
|
2278
|
+
const matcher = matchers[i];
|
|
2481
2279
|
const inputPatternCount = inputParts.length;
|
|
2482
2280
|
const minParts = Math.min(inputPatternCount, patternParts.length);
|
|
2483
2281
|
let j = 0;
|
|
2484
2282
|
while(j < minParts){
|
|
2485
2283
|
const part = patternParts[j];
|
|
2486
2284
|
if (part.includes("/")) return true;
|
|
2487
|
-
const match =
|
|
2285
|
+
const match = matcher[j](inputParts[j]);
|
|
2488
2286
|
if (!match) break;
|
|
2489
|
-
if ("**" === part) return true;
|
|
2287
|
+
if (globstarEnabled && "**" === part) return true;
|
|
2490
2288
|
j++;
|
|
2491
2289
|
}
|
|
2492
2290
|
if (j === inputPatternCount) return true;
|
|
@@ -2494,6 +2292,36 @@ function getPartialMatcher(patterns, options) {
|
|
|
2494
2292
|
return false;
|
|
2495
2293
|
};
|
|
2496
2294
|
}
|
|
2295
|
+
const WIN32_ROOT_DIR = /^[A-Z]:\/$/i;
|
|
2296
|
+
const isRoot = isWin ? (p)=>WIN32_ROOT_DIR.test(p) : (p)=>"/" === p;
|
|
2297
|
+
function buildFormat(cwd, root, absolute) {
|
|
2298
|
+
if (cwd === root || root.startsWith(`${cwd}/`)) {
|
|
2299
|
+
if (absolute) {
|
|
2300
|
+
const start = isRoot(cwd) ? cwd.length : cwd.length + 1;
|
|
2301
|
+
return (p, isDir)=>p.slice(start, isDir ? -1 : void 0) || ".";
|
|
2302
|
+
}
|
|
2303
|
+
const prefix = root.slice(cwd.length + 1);
|
|
2304
|
+
if (prefix) return (p, isDir)=>{
|
|
2305
|
+
if ("." === p) return prefix;
|
|
2306
|
+
const result = `${prefix}/${p}`;
|
|
2307
|
+
return isDir ? result.slice(0, -1) : result;
|
|
2308
|
+
};
|
|
2309
|
+
return (p, isDir)=>isDir && "." !== p ? p.slice(0, -1) : p;
|
|
2310
|
+
}
|
|
2311
|
+
if (absolute) return (p)=>posix.relative(cwd, p) || ".";
|
|
2312
|
+
return (p)=>posix.relative(cwd, `${root}/${p}`) || ".";
|
|
2313
|
+
}
|
|
2314
|
+
function buildRelative(cwd, root) {
|
|
2315
|
+
if (root.startsWith(`${cwd}/`)) {
|
|
2316
|
+
const prefix = root.slice(cwd.length + 1);
|
|
2317
|
+
return (p)=>`${prefix}/${p}`;
|
|
2318
|
+
}
|
|
2319
|
+
return (p)=>{
|
|
2320
|
+
const result = posix.relative(cwd, `${root}/${p}`);
|
|
2321
|
+
if (p.endsWith("/") && "" !== result) return `${result}/`;
|
|
2322
|
+
return result || ".";
|
|
2323
|
+
};
|
|
2324
|
+
}
|
|
2497
2325
|
const splitPatternOptions = {
|
|
2498
2326
|
parts: true
|
|
2499
2327
|
};
|
|
@@ -2504,7 +2332,6 @@ function splitPattern(path$1) {
|
|
|
2504
2332
|
path$1
|
|
2505
2333
|
];
|
|
2506
2334
|
}
|
|
2507
|
-
const isWin = "win32" === process.platform;
|
|
2508
2335
|
const POSIX_UNESCAPED_GLOB_SYMBOLS = /(?<!\\)([()[\]{}*?|]|^!|[!+@](?=\()|\\(?![()[\]{}!*+?@|]))/g;
|
|
2509
2336
|
const WIN32_UNESCAPED_GLOB_SYMBOLS = /(?<!\\)([()[\]{}]|^!|[!+@](?=\())/g;
|
|
2510
2337
|
const escapePosixPath = (path$1)=>path$1.replace(POSIX_UNESCAPED_GLOB_SYMBOLS, "\\$&");
|
|
@@ -2516,7 +2343,7 @@ function isDynamicPattern(pattern, options) {
|
|
|
2516
2343
|
return scan.isGlob || scan.negated;
|
|
2517
2344
|
}
|
|
2518
2345
|
function dist_log(...tasks) {
|
|
2519
|
-
console.log(`[tinyglobby ${new Date().toLocaleTimeString("es")}]`, ...tasks);
|
|
2346
|
+
console.log(`[tinyglobby ${/* @__PURE__ */ new Date().toLocaleTimeString("es")}]`, ...tasks);
|
|
2520
2347
|
}
|
|
2521
2348
|
const PARENT_DIRECTORY = /^(\/?\.\.)+/;
|
|
2522
2349
|
const ESCAPING_BACKSLASHES = /\\(?=[()[\]{}!*+?@|])/g;
|
|
@@ -2526,7 +2353,7 @@ function normalizePattern(pattern, expandDirectories, cwd, props, isIgnore) {
|
|
|
2526
2353
|
if (pattern.endsWith("/")) result = pattern.slice(0, -1);
|
|
2527
2354
|
if (!result.endsWith("*") && expandDirectories) result += "/**";
|
|
2528
2355
|
const escapedCwd = escapePath(cwd);
|
|
2529
|
-
result =
|
|
2356
|
+
result = path_0.isAbsolute(result.replace(ESCAPING_BACKSLASHES, "")) ? posix.relative(escapedCwd, result) : posix.normalize(result);
|
|
2530
2357
|
const parentDirectoryMatch = PARENT_DIRECTORY.exec(result);
|
|
2531
2358
|
const parts = splitPattern(result);
|
|
2532
2359
|
if (null == parentDirectoryMatch ? void 0 : parentDirectoryMatch[0]) {
|
|
@@ -2537,7 +2364,7 @@ function normalizePattern(pattern, expandDirectories, cwd, props, isIgnore) {
|
|
|
2537
2364
|
result = result.slice(0, (n - i - 1) * 3) + result.slice((n - i) * 3 + parts[i + n].length + 1) || ".";
|
|
2538
2365
|
i++;
|
|
2539
2366
|
}
|
|
2540
|
-
const potentialRoot =
|
|
2367
|
+
const potentialRoot = posix.join(cwd, parentDirectoryMatch[0].slice(3 * i));
|
|
2541
2368
|
if (!potentialRoot.startsWith(".") && props.root.length > potentialRoot.length) {
|
|
2542
2369
|
props.root = potentialRoot;
|
|
2543
2370
|
props.depthOffset = -n + i;
|
|
@@ -2558,17 +2385,16 @@ function normalizePattern(pattern, expandDirectories, cwd, props, isIgnore) {
|
|
|
2558
2385
|
}
|
|
2559
2386
|
props.depthOffset = newCommonPath.length;
|
|
2560
2387
|
props.commonPath = newCommonPath;
|
|
2561
|
-
props.root = newCommonPath.length > 0 ?
|
|
2388
|
+
props.root = newCommonPath.length > 0 ? posix.join(cwd, ...newCommonPath) : cwd;
|
|
2562
2389
|
}
|
|
2563
2390
|
return result;
|
|
2564
2391
|
}
|
|
2565
|
-
function processPatterns({ patterns
|
|
2392
|
+
function processPatterns({ patterns = [
|
|
2393
|
+
"**/*"
|
|
2394
|
+
], ignore = [], expandDirectories = true }, cwd, props) {
|
|
2566
2395
|
if ("string" == typeof patterns) patterns = [
|
|
2567
2396
|
patterns
|
|
2568
2397
|
];
|
|
2569
|
-
else if (!patterns) patterns = [
|
|
2570
|
-
"**/*"
|
|
2571
|
-
];
|
|
2572
2398
|
if ("string" == typeof ignore) ignore = [
|
|
2573
2399
|
ignore
|
|
2574
2400
|
];
|
|
@@ -2586,67 +2412,92 @@ function processPatterns({ patterns, ignore = [], expandDirectories = true }, cw
|
|
|
2586
2412
|
ignore: ignorePatterns
|
|
2587
2413
|
};
|
|
2588
2414
|
}
|
|
2589
|
-
function
|
|
2590
|
-
return external_path_.posix.relative(cwd, `${root}/${path$1}`) || ".";
|
|
2591
|
-
}
|
|
2592
|
-
function processPath(path$1, cwd, root, isDirectory, absolute) {
|
|
2593
|
-
const relativePath = absolute ? path$1.slice("/" === root ? 1 : root.length + 1) || "." : path$1;
|
|
2594
|
-
if (root === cwd) return isDirectory && "." !== relativePath ? relativePath.slice(0, -1) : relativePath;
|
|
2595
|
-
return getRelativePath(relativePath, cwd, root);
|
|
2596
|
-
}
|
|
2597
|
-
function formatPaths(paths, cwd, root) {
|
|
2415
|
+
function formatPaths(paths, relative) {
|
|
2598
2416
|
for(let i = paths.length - 1; i >= 0; i--){
|
|
2599
2417
|
const path$1 = paths[i];
|
|
2600
|
-
paths[i] =
|
|
2418
|
+
paths[i] = relative(path$1);
|
|
2601
2419
|
}
|
|
2602
2420
|
return paths;
|
|
2603
2421
|
}
|
|
2604
|
-
function
|
|
2605
|
-
if (process.
|
|
2606
|
-
if (
|
|
2607
|
-
|
|
2422
|
+
function normalizeCwd(cwd) {
|
|
2423
|
+
if (!cwd) return process.cwd().replace(BACKSLASHES, "/");
|
|
2424
|
+
if (cwd instanceof URL) return fileURLToPath(cwd).replace(BACKSLASHES, "/");
|
|
2425
|
+
return path_0.resolve(cwd).replace(BACKSLASHES, "/");
|
|
2426
|
+
}
|
|
2427
|
+
function getCrawler(patterns, inputOptions = {}) {
|
|
2428
|
+
const options = process.env.TINYGLOBBY_DEBUG ? {
|
|
2429
|
+
...inputOptions,
|
|
2430
|
+
debug: true
|
|
2431
|
+
} : inputOptions;
|
|
2432
|
+
const cwd = normalizeCwd(options.cwd);
|
|
2433
|
+
if (options.debug) dist_log("globbing with:", {
|
|
2434
|
+
patterns,
|
|
2435
|
+
options,
|
|
2436
|
+
cwd
|
|
2437
|
+
});
|
|
2438
|
+
if (Array.isArray(patterns) && 0 === patterns.length) return [
|
|
2439
|
+
{
|
|
2440
|
+
sync: ()=>[],
|
|
2441
|
+
withPromise: async ()=>[]
|
|
2442
|
+
},
|
|
2443
|
+
false
|
|
2444
|
+
];
|
|
2608
2445
|
const props = {
|
|
2609
2446
|
root: cwd,
|
|
2610
2447
|
commonPath: null,
|
|
2611
2448
|
depthOffset: 0
|
|
2612
2449
|
};
|
|
2613
|
-
const processed = processPatterns(
|
|
2614
|
-
|
|
2450
|
+
const processed = processPatterns({
|
|
2451
|
+
...options,
|
|
2452
|
+
patterns
|
|
2453
|
+
}, cwd, props);
|
|
2615
2454
|
if (options.debug) dist_log("internal processing patterns:", processed);
|
|
2616
|
-
const
|
|
2455
|
+
const matchOptions = {
|
|
2617
2456
|
dot: options.dot,
|
|
2618
|
-
|
|
2457
|
+
nobrace: false === options.braceExpansion,
|
|
2458
|
+
nocase: false === options.caseSensitiveMatch,
|
|
2459
|
+
noextglob: false === options.extglob,
|
|
2460
|
+
noglobstar: false === options.globstar,
|
|
2461
|
+
posix: true
|
|
2462
|
+
};
|
|
2463
|
+
const matcher = picomatch(processed.match, {
|
|
2464
|
+
...matchOptions,
|
|
2619
2465
|
ignore: processed.ignore
|
|
2620
2466
|
});
|
|
2621
|
-
const ignore = picomatch(processed.ignore,
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
const partialMatcher = getPartialMatcher(processed.match, {
|
|
2626
|
-
dot: options.dot,
|
|
2627
|
-
nocase
|
|
2628
|
-
});
|
|
2467
|
+
const ignore = picomatch(processed.ignore, matchOptions);
|
|
2468
|
+
const partialMatcher = getPartialMatcher(processed.match, matchOptions);
|
|
2469
|
+
const format = buildFormat(cwd, props.root, options.absolute);
|
|
2470
|
+
const formatExclude = options.absolute ? format : buildFormat(cwd, props.root, true);
|
|
2629
2471
|
const fdirOptions = {
|
|
2630
2472
|
filters: [
|
|
2631
2473
|
options.debug ? (p, isDirectory)=>{
|
|
2632
|
-
const path$1 =
|
|
2474
|
+
const path$1 = format(p, isDirectory);
|
|
2633
2475
|
const matches = matcher(path$1);
|
|
2634
2476
|
if (matches) dist_log(`matched ${path$1}`);
|
|
2635
2477
|
return matches;
|
|
2636
|
-
} : (p, isDirectory)=>matcher(
|
|
2478
|
+
} : (p, isDirectory)=>matcher(format(p, isDirectory))
|
|
2637
2479
|
],
|
|
2638
2480
|
exclude: options.debug ? (_, p)=>{
|
|
2639
|
-
const relativePath =
|
|
2481
|
+
const relativePath = formatExclude(p, true);
|
|
2640
2482
|
const skipped = "." !== relativePath && !partialMatcher(relativePath) || ignore(relativePath);
|
|
2641
2483
|
skipped ? dist_log(`skipped ${p}`) : dist_log(`crawling ${p}`);
|
|
2642
2484
|
return skipped;
|
|
2643
2485
|
} : (_, p)=>{
|
|
2644
|
-
const relativePath =
|
|
2486
|
+
const relativePath = formatExclude(p, true);
|
|
2645
2487
|
return "." !== relativePath && !partialMatcher(relativePath) || ignore(relativePath);
|
|
2646
2488
|
},
|
|
2489
|
+
fs: options.fs ? {
|
|
2490
|
+
readdir: options.fs.readdir || __WEBPACK_EXTERNAL_MODULE_fs__["default"].readdir,
|
|
2491
|
+
readdirSync: options.fs.readdirSync || __WEBPACK_EXTERNAL_MODULE_fs__["default"].readdirSync,
|
|
2492
|
+
realpath: options.fs.realpath || __WEBPACK_EXTERNAL_MODULE_fs__["default"].realpath,
|
|
2493
|
+
realpathSync: options.fs.realpathSync || __WEBPACK_EXTERNAL_MODULE_fs__["default"].realpathSync,
|
|
2494
|
+
stat: options.fs.stat || __WEBPACK_EXTERNAL_MODULE_fs__["default"].stat,
|
|
2495
|
+
statSync: options.fs.statSync || __WEBPACK_EXTERNAL_MODULE_fs__["default"].statSync
|
|
2496
|
+
} : void 0,
|
|
2647
2497
|
pathSeparator: "/",
|
|
2648
2498
|
relativePaths: true,
|
|
2649
|
-
resolveSymlinks: true
|
|
2499
|
+
resolveSymlinks: true,
|
|
2500
|
+
signal: options.signal
|
|
2650
2501
|
};
|
|
2651
2502
|
if (void 0 !== options.deep) fdirOptions.maxDepth = Math.round(options.deep - props.depthOffset);
|
|
2652
2503
|
if (options.absolute) {
|
|
@@ -2665,18 +2516,20 @@ function crawl(options, cwd, sync) {
|
|
|
2665
2516
|
props.root = props.root.replace(BACKSLASHES, "");
|
|
2666
2517
|
const root = props.root;
|
|
2667
2518
|
if (options.debug) dist_log("internal properties:", props);
|
|
2668
|
-
const
|
|
2669
|
-
|
|
2670
|
-
|
|
2519
|
+
const relative = cwd !== root && !options.absolute && buildRelative(cwd, props.root);
|
|
2520
|
+
return [
|
|
2521
|
+
new Builder(fdirOptions).crawl(root),
|
|
2522
|
+
relative
|
|
2523
|
+
];
|
|
2671
2524
|
}
|
|
2672
2525
|
async function glob(patternsOrOptions, options) {
|
|
2673
2526
|
if (patternsOrOptions && (null == options ? void 0 : options.patterns)) throw new Error("Cannot pass patterns as both an argument and an option");
|
|
2674
|
-
const
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
return
|
|
2527
|
+
const isModern = isReadonlyArray(patternsOrOptions) || "string" == typeof patternsOrOptions;
|
|
2528
|
+
const opts = isModern ? options : patternsOrOptions;
|
|
2529
|
+
const patterns = isModern ? patternsOrOptions : patternsOrOptions.patterns;
|
|
2530
|
+
const [crawler, relative] = getCrawler(patterns, opts);
|
|
2531
|
+
if (!relative) return crawler.withPromise();
|
|
2532
|
+
return formatPaths(await crawler.withPromise(), relative);
|
|
2680
2533
|
}
|
|
2681
2534
|
var abbreviates_namespaceObject = JSON.parse('{"abi":"ABI","amd":"AMD","api":"API","ast":"AST","bom":"BOM","bsd":"BSD","cdn":"CDN","cjs":"CJS","cli":"CLI","cncf":"CNCF","cors":"CORS","cpu":"CPU","crud":"CRUD","csrf":"CSRF","css":"CSS","csv":"CSV","db2":"DB2","dns":"DNS","dom":"DOM","dos":"DOS","es6":"ES6","esm":"ESM","fbi":"FBI","ftp":"FTP","ftps":"FTPS","gcc":"GCC","gcp":"GCP","glsl":"GLSL","gorm":"GORM","gpl":"GPL","gps":"GPS","gpu":"GPU","gre":"GRE","gui":"GUI","hdmi":"HDMI","hmr":"HMR","html":"HTML","http":"HTTP","https":"HTTPS","iife":"IIFE","iot":"IoT","ipc":"IPC","ipfs":"IPFS","ipmi":"IPMI","jdbc":"JDBC","jdk":"JDK","jit":"JIT","jpeg":"JPEG","jpg":"JPG","jre":"JRE","jsf":"JSF","json":"JSON","jsonp":"JSONP","jsp":"JSP","jwt":"JWT","kcp":"KCP","kde":"KDE","kpi":"KPI","lfu":"LFU","llvm":"LLVM","lru":"LRU","lts":"LTS","mdn":"MDN","mdx":"MDX","mvc":"MVC","mvp":"MVP","mvvm":"MVVM","nft":"NFT","odbc":"ODBC","ont":"ONT","orm":"ORM","oss":"OSS","pdf":"PDF","pdo":"PDO","posix":"POSIX","pwa":"PWA","qemu":"QEMU","qgis":"QGIS","quic":"QUIC","rfc":"RFC","rom":"ROM","rpc":"RPC","rss":"RSS","rss3":"RSS3","sdk":"SDK","seo":"SEO","sip":"SIP","smtp":"SMTP","sql":"SQL","sre":"SRE","ssg":"SSG","ssh":"SSH","sso":"SSO","ssr":"SSR","stp":"STP","svg":"SVG","svn":"SVN","tcp":"TCP","tls":"TLS","toml":"TOML","tsc":"TSC","udp":"UDP","umd":"UMD","uri":"URI","url":"URL","usb":"USB","vlan":"VLAN","vnc":"VNC","vpn":"VPN","vps":"VPS","wgsl":"WGSL","wlan":"WLAN","wsa":"WSA","wsl":"WSL","xhtml":"XHTML","xml":"XML","xss":"XSS","yaml":"YAML"}');
|
|
2682
2535
|
var brands_namespaceObject = JSON.parse('{"airbnb":"Airbnb","alphago":"AlphaGo","bitbucket":"Bitbucket","bytedance":"ByteDance","circleci":"CircleCI","cloudflare":"Cloudflare","freecodecamp":"freeCodeCamp","gitea":"Gitea","gitee":"Gitee","github":"GitHub","gitlab":"GitLab","gitops":"GitOps","gitpod":"Gitpod","hp":"HP","ibm":"IBM","jsdelivr":"jsDelivr","kfc":"KFC","leetcode":"LeetCode","linkedin":"LinkedIn","mcdonald":"McDonald","nvidia":"NVIDIA","pagerduty":"PagerDuty","producthunt":"Product Hunt","stackblitz":"StackBlitz","stackit":"STACKIT","stackoverflow":"Stack Overflow","unjs":"UnJS","v2ex":"V2EX","youtube":"YouTube"}');
|
|
@@ -2702,6 +2555,7 @@ const dict = [
|
|
|
2702
2555
|
'GitHub Actions',
|
|
2703
2556
|
'GitHub Pages',
|
|
2704
2557
|
'I',
|
|
2558
|
+
'Jest',
|
|
2705
2559
|
'Lightning CSS',
|
|
2706
2560
|
'Lynx',
|
|
2707
2561
|
'Module Federation',
|
|
@@ -2728,6 +2582,7 @@ const dict = [
|
|
|
2728
2582
|
'Rspack Stack',
|
|
2729
2583
|
'Rspress',
|
|
2730
2584
|
'Rstest',
|
|
2585
|
+
'Rslint',
|
|
2731
2586
|
'Solid',
|
|
2732
2587
|
'Svelte',
|
|
2733
2588
|
'Server Action',
|
|
@@ -2737,7 +2592,9 @@ const dict = [
|
|
|
2737
2592
|
'Vue',
|
|
2738
2593
|
'Web Workers',
|
|
2739
2594
|
'Xcode',
|
|
2740
|
-
'Zeabur'
|
|
2595
|
+
'Zeabur',
|
|
2596
|
+
'Zephyr',
|
|
2597
|
+
'Zephyr Cloud'
|
|
2741
2598
|
];
|
|
2742
2599
|
async function globMarkdownFiles(cwd) {
|
|
2743
2600
|
return glob([
|