heading-case 1.0.7 → 1.1.1
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 +2 -0
- package/dist/index.js +476 -197
- package/package.json +22 -17
- package/dist/rslib-runtime.js +0 -38
package/README.md
CHANGED
|
@@ -44,6 +44,8 @@ Check all markdown and MDX files in the current directory:
|
|
|
44
44
|
npx heading-case
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
+
By default, files ignored by Git are skipped as well, including rules from `.gitignore`, `.git/info/exclude`, and global Git ignore files.
|
|
48
|
+
|
|
47
49
|
Check and write the formatted content to the file:
|
|
48
50
|
|
|
49
51
|
```bash
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,51 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { __webpack_require__ } from "./rslib-runtime.js";
|
|
1
|
+
import { execFileSync } from "node:child_process";
|
|
3
2
|
import node_fs from "node:fs";
|
|
3
|
+
import node_util from "node:util";
|
|
4
4
|
import node_process from "node:process";
|
|
5
5
|
import node_os from "node:os";
|
|
6
6
|
import node_tty from "node:tty";
|
|
7
|
-
import
|
|
7
|
+
import * as __rspack_external_fs from "fs";
|
|
8
|
+
import { readdir, readdirSync, realpath, realpathSync, stat as external_fs_stat, statSync } from "fs";
|
|
9
|
+
import { basename, dirname, isAbsolute, normalize, posix, relative as external_path_relative, resolve, sep } from "path";
|
|
8
10
|
import { fileURLToPath } from "url";
|
|
9
11
|
import { createRequire } from "module";
|
|
12
|
+
var __webpack_modules__ = {};
|
|
13
|
+
var __webpack_module_cache__ = {};
|
|
14
|
+
function __webpack_require__(moduleId) {
|
|
15
|
+
var cachedModule = __webpack_module_cache__[moduleId];
|
|
16
|
+
if (void 0 !== cachedModule) return cachedModule.exports;
|
|
17
|
+
var module = __webpack_module_cache__[moduleId] = {
|
|
18
|
+
exports: {}
|
|
19
|
+
};
|
|
20
|
+
__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
21
|
+
return module.exports;
|
|
22
|
+
}
|
|
23
|
+
__webpack_require__.m = __webpack_modules__;
|
|
24
|
+
(()=>{
|
|
25
|
+
__webpack_require__.n = (module)=>{
|
|
26
|
+
var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
|
|
27
|
+
__webpack_require__.d(getter, {
|
|
28
|
+
a: getter
|
|
29
|
+
});
|
|
30
|
+
return getter;
|
|
31
|
+
};
|
|
32
|
+
})();
|
|
33
|
+
(()=>{
|
|
34
|
+
__webpack_require__.d = (exports, definition)=>{
|
|
35
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) Object.defineProperty(exports, key, {
|
|
36
|
+
enumerable: true,
|
|
37
|
+
get: definition[key]
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
})();
|
|
41
|
+
(()=>{
|
|
42
|
+
__webpack_require__.add = function(modules) {
|
|
43
|
+
Object.assign(__webpack_require__.m, modules);
|
|
44
|
+
};
|
|
45
|
+
})();
|
|
46
|
+
(()=>{
|
|
47
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
48
|
+
})();
|
|
10
49
|
__webpack_require__.add({
|
|
11
50
|
"./node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js" (module) {
|
|
12
51
|
let p = process || {}, argv = p.argv || [], env = p.env || {};
|
|
@@ -74,9 +113,9 @@ __webpack_require__.add({
|
|
|
74
113
|
module.exports = createColors();
|
|
75
114
|
module.exports.createColors = createColors;
|
|
76
115
|
},
|
|
77
|
-
"./node_modules/.pnpm/picomatch@4.0.
|
|
78
|
-
const pico = __webpack_require__("./node_modules/.pnpm/picomatch@4.0.
|
|
79
|
-
const utils = __webpack_require__("./node_modules/.pnpm/picomatch@4.0.
|
|
116
|
+
"./node_modules/.pnpm/picomatch@4.0.4/node_modules/picomatch/index.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
117
|
+
const pico = __webpack_require__("./node_modules/.pnpm/picomatch@4.0.4/node_modules/picomatch/lib/picomatch.js");
|
|
118
|
+
const utils = __webpack_require__("./node_modules/.pnpm/picomatch@4.0.4/node_modules/picomatch/lib/utils.js");
|
|
80
119
|
function picomatch(glob, options, returnState = false) {
|
|
81
120
|
if (options && (null === options.windows || void 0 === options.windows)) options = {
|
|
82
121
|
...options,
|
|
@@ -87,9 +126,10 @@ __webpack_require__.add({
|
|
|
87
126
|
Object.assign(picomatch, pico);
|
|
88
127
|
module.exports = picomatch;
|
|
89
128
|
},
|
|
90
|
-
"./node_modules/.pnpm/picomatch@4.0.
|
|
129
|
+
"./node_modules/.pnpm/picomatch@4.0.4/node_modules/picomatch/lib/constants.js" (module) {
|
|
91
130
|
const WIN_SLASH = '\\\\/';
|
|
92
131
|
const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
|
|
132
|
+
const DEFAULT_MAX_EXTGLOB_RECURSION = 0;
|
|
93
133
|
const DOT_LITERAL = '\\.';
|
|
94
134
|
const PLUS_LITERAL = '\\+';
|
|
95
135
|
const QMARK_LITERAL = '\\?';
|
|
@@ -140,6 +180,7 @@ __webpack_require__.add({
|
|
|
140
180
|
SEP: '\\'
|
|
141
181
|
};
|
|
142
182
|
const POSIX_REGEX_SOURCE = {
|
|
183
|
+
__proto__: null,
|
|
143
184
|
alnum: 'a-zA-Z0-9',
|
|
144
185
|
alpha: 'a-zA-Z',
|
|
145
186
|
ascii: '\\x00-\\x7F',
|
|
@@ -156,6 +197,7 @@ __webpack_require__.add({
|
|
|
156
197
|
xdigit: 'A-Fa-f0-9'
|
|
157
198
|
};
|
|
158
199
|
module.exports = {
|
|
200
|
+
DEFAULT_MAX_EXTGLOB_RECURSION,
|
|
159
201
|
MAX_LENGTH: 65536,
|
|
160
202
|
POSIX_REGEX_SOURCE,
|
|
161
203
|
REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g,
|
|
@@ -247,9 +289,9 @@ __webpack_require__.add({
|
|
|
247
289
|
}
|
|
248
290
|
};
|
|
249
291
|
},
|
|
250
|
-
"./node_modules/.pnpm/picomatch@4.0.
|
|
251
|
-
const constants = __webpack_require__("./node_modules/.pnpm/picomatch@4.0.
|
|
252
|
-
const utils = __webpack_require__("./node_modules/.pnpm/picomatch@4.0.
|
|
292
|
+
"./node_modules/.pnpm/picomatch@4.0.4/node_modules/picomatch/lib/parse.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
293
|
+
const constants = __webpack_require__("./node_modules/.pnpm/picomatch@4.0.4/node_modules/picomatch/lib/constants.js");
|
|
294
|
+
const utils = __webpack_require__("./node_modules/.pnpm/picomatch@4.0.4/node_modules/picomatch/lib/utils.js");
|
|
253
295
|
const { MAX_LENGTH, POSIX_REGEX_SOURCE, REGEX_NON_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_BACKREF, REPLACEMENTS } = constants;
|
|
254
296
|
const expandRange = (args, options)=>{
|
|
255
297
|
if ('function' == typeof options.expandRange) return options.expandRange(...args, options);
|
|
@@ -263,6 +305,189 @@ __webpack_require__.add({
|
|
|
263
305
|
return value;
|
|
264
306
|
};
|
|
265
307
|
const syntaxError = (type, char)=>`Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
|
|
308
|
+
const splitTopLevel = (input)=>{
|
|
309
|
+
const parts = [];
|
|
310
|
+
let bracket = 0;
|
|
311
|
+
let paren = 0;
|
|
312
|
+
let quote = 0;
|
|
313
|
+
let value = '';
|
|
314
|
+
let escaped = false;
|
|
315
|
+
for (const ch of input){
|
|
316
|
+
if (true === escaped) {
|
|
317
|
+
value += ch;
|
|
318
|
+
escaped = false;
|
|
319
|
+
continue;
|
|
320
|
+
}
|
|
321
|
+
if ('\\' === ch) {
|
|
322
|
+
value += ch;
|
|
323
|
+
escaped = true;
|
|
324
|
+
continue;
|
|
325
|
+
}
|
|
326
|
+
if ('"' === ch) {
|
|
327
|
+
quote = 1 === quote ? 0 : 1;
|
|
328
|
+
value += ch;
|
|
329
|
+
continue;
|
|
330
|
+
}
|
|
331
|
+
if (0 === quote) {
|
|
332
|
+
if ('[' === ch) bracket++;
|
|
333
|
+
else if (']' === ch && bracket > 0) bracket--;
|
|
334
|
+
else if (0 === bracket) {
|
|
335
|
+
if ('(' === ch) paren++;
|
|
336
|
+
else if (')' === ch && paren > 0) paren--;
|
|
337
|
+
else if ('|' === ch && 0 === paren) {
|
|
338
|
+
parts.push(value);
|
|
339
|
+
value = '';
|
|
340
|
+
continue;
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
value += ch;
|
|
345
|
+
}
|
|
346
|
+
parts.push(value);
|
|
347
|
+
return parts;
|
|
348
|
+
};
|
|
349
|
+
const isPlainBranch = (branch)=>{
|
|
350
|
+
let escaped = false;
|
|
351
|
+
for (const ch of branch){
|
|
352
|
+
if (true === escaped) {
|
|
353
|
+
escaped = false;
|
|
354
|
+
continue;
|
|
355
|
+
}
|
|
356
|
+
if ('\\' === ch) {
|
|
357
|
+
escaped = true;
|
|
358
|
+
continue;
|
|
359
|
+
}
|
|
360
|
+
if (/[?*+@!()[\]{}]/.test(ch)) return false;
|
|
361
|
+
}
|
|
362
|
+
return true;
|
|
363
|
+
};
|
|
364
|
+
const normalizeSimpleBranch = (branch)=>{
|
|
365
|
+
let value = branch.trim();
|
|
366
|
+
let changed = true;
|
|
367
|
+
while(true === changed){
|
|
368
|
+
changed = false;
|
|
369
|
+
if (/^@\([^\\()[\]{}|]+\)$/.test(value)) {
|
|
370
|
+
value = value.slice(2, -1);
|
|
371
|
+
changed = true;
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
if (!isPlainBranch(value)) return;
|
|
375
|
+
return value.replace(/\\(.)/g, '$1');
|
|
376
|
+
};
|
|
377
|
+
const hasRepeatedCharPrefixOverlap = (branches)=>{
|
|
378
|
+
const values = branches.map(normalizeSimpleBranch).filter(Boolean);
|
|
379
|
+
for(let i = 0; i < values.length; i++)for(let j = i + 1; j < values.length; j++){
|
|
380
|
+
const a = values[i];
|
|
381
|
+
const b = values[j];
|
|
382
|
+
const char = a[0];
|
|
383
|
+
if (char && a === char.repeat(a.length) && b === char.repeat(b.length)) {
|
|
384
|
+
if (a === b || a.startsWith(b) || b.startsWith(a)) return true;
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
return false;
|
|
388
|
+
};
|
|
389
|
+
const parseRepeatedExtglob = (pattern, requireEnd = true)=>{
|
|
390
|
+
if ('+' !== pattern[0] && '*' !== pattern[0] || '(' !== pattern[1]) return;
|
|
391
|
+
let bracket = 0;
|
|
392
|
+
let paren = 0;
|
|
393
|
+
let quote = 0;
|
|
394
|
+
let escaped = false;
|
|
395
|
+
for(let i = 1; i < pattern.length; i++){
|
|
396
|
+
const ch = pattern[i];
|
|
397
|
+
if (true === escaped) {
|
|
398
|
+
escaped = false;
|
|
399
|
+
continue;
|
|
400
|
+
}
|
|
401
|
+
if ('\\' === ch) {
|
|
402
|
+
escaped = true;
|
|
403
|
+
continue;
|
|
404
|
+
}
|
|
405
|
+
if ('"' === ch) {
|
|
406
|
+
quote = 1 === quote ? 0 : 1;
|
|
407
|
+
continue;
|
|
408
|
+
}
|
|
409
|
+
if (1 !== quote) {
|
|
410
|
+
if ('[' === ch) {
|
|
411
|
+
bracket++;
|
|
412
|
+
continue;
|
|
413
|
+
}
|
|
414
|
+
if (']' === ch && bracket > 0) {
|
|
415
|
+
bracket--;
|
|
416
|
+
continue;
|
|
417
|
+
}
|
|
418
|
+
if (!(bracket > 0)) {
|
|
419
|
+
if ('(' === ch) {
|
|
420
|
+
paren++;
|
|
421
|
+
continue;
|
|
422
|
+
}
|
|
423
|
+
if (')' === ch) {
|
|
424
|
+
paren--;
|
|
425
|
+
if (0 === paren) {
|
|
426
|
+
if (true === requireEnd && i !== pattern.length - 1) return;
|
|
427
|
+
return {
|
|
428
|
+
type: pattern[0],
|
|
429
|
+
body: pattern.slice(2, i),
|
|
430
|
+
end: i
|
|
431
|
+
};
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
};
|
|
438
|
+
const getStarExtglobSequenceOutput = (pattern)=>{
|
|
439
|
+
let index = 0;
|
|
440
|
+
const chars = [];
|
|
441
|
+
while(index < pattern.length){
|
|
442
|
+
const match = parseRepeatedExtglob(pattern.slice(index), false);
|
|
443
|
+
if (!match || '*' !== match.type) return;
|
|
444
|
+
const branches = splitTopLevel(match.body).map((branch)=>branch.trim());
|
|
445
|
+
if (1 !== branches.length) return;
|
|
446
|
+
const branch = normalizeSimpleBranch(branches[0]);
|
|
447
|
+
if (!branch || 1 !== branch.length) return;
|
|
448
|
+
chars.push(branch);
|
|
449
|
+
index += match.end + 1;
|
|
450
|
+
}
|
|
451
|
+
if (chars.length < 1) return;
|
|
452
|
+
const source = 1 === chars.length ? utils.escapeRegex(chars[0]) : `[${chars.map((ch)=>utils.escapeRegex(ch)).join('')}]`;
|
|
453
|
+
return `${source}*`;
|
|
454
|
+
};
|
|
455
|
+
const repeatedExtglobRecursion = (pattern)=>{
|
|
456
|
+
let depth = 0;
|
|
457
|
+
let value = pattern.trim();
|
|
458
|
+
let match = parseRepeatedExtglob(value);
|
|
459
|
+
while(match){
|
|
460
|
+
depth++;
|
|
461
|
+
value = match.body.trim();
|
|
462
|
+
match = parseRepeatedExtglob(value);
|
|
463
|
+
}
|
|
464
|
+
return depth;
|
|
465
|
+
};
|
|
466
|
+
const analyzeRepeatedExtglob = (body, options)=>{
|
|
467
|
+
if (false === options.maxExtglobRecursion) return {
|
|
468
|
+
risky: false
|
|
469
|
+
};
|
|
470
|
+
const max = 'number' == typeof options.maxExtglobRecursion ? options.maxExtglobRecursion : constants.DEFAULT_MAX_EXTGLOB_RECURSION;
|
|
471
|
+
const branches = splitTopLevel(body).map((branch)=>branch.trim());
|
|
472
|
+
if (branches.length > 1) {
|
|
473
|
+
if (branches.some((branch)=>'' === branch) || branches.some((branch)=>/^[*?]+$/.test(branch)) || hasRepeatedCharPrefixOverlap(branches)) return {
|
|
474
|
+
risky: true
|
|
475
|
+
};
|
|
476
|
+
}
|
|
477
|
+
for (const branch of branches){
|
|
478
|
+
const safeOutput = getStarExtglobSequenceOutput(branch);
|
|
479
|
+
if (safeOutput) return {
|
|
480
|
+
risky: true,
|
|
481
|
+
safeOutput
|
|
482
|
+
};
|
|
483
|
+
if (repeatedExtglobRecursion(branch) > max) return {
|
|
484
|
+
risky: true
|
|
485
|
+
};
|
|
486
|
+
}
|
|
487
|
+
return {
|
|
488
|
+
risky: false
|
|
489
|
+
};
|
|
490
|
+
};
|
|
266
491
|
const parse = (input, options)=>{
|
|
267
492
|
if ('string' != typeof input) throw new TypeError('Expected a string');
|
|
268
493
|
input = REPLACEMENTS[input] || input;
|
|
@@ -378,6 +603,8 @@ __webpack_require__.add({
|
|
|
378
603
|
token.prev = prev;
|
|
379
604
|
token.parens = state.parens;
|
|
380
605
|
token.output = state.output;
|
|
606
|
+
token.startIndex = state.index;
|
|
607
|
+
token.tokensIndex = tokens.length;
|
|
381
608
|
const output = (opts.capture ? '(' : '') + token.open;
|
|
382
609
|
increment('parens');
|
|
383
610
|
push({
|
|
@@ -394,6 +621,31 @@ __webpack_require__.add({
|
|
|
394
621
|
extglobs.push(token);
|
|
395
622
|
};
|
|
396
623
|
const extglobClose = (token)=>{
|
|
624
|
+
const literal = input.slice(token.startIndex, state.index + 1);
|
|
625
|
+
const body = input.slice(token.startIndex + 2, state.index);
|
|
626
|
+
const analysis = analyzeRepeatedExtglob(body, opts);
|
|
627
|
+
if (('plus' === token.type || 'star' === token.type) && analysis.risky) {
|
|
628
|
+
const safeOutput = analysis.safeOutput ? (token.output ? '' : ONE_CHAR) + (opts.capture ? `(${analysis.safeOutput})` : analysis.safeOutput) : void 0;
|
|
629
|
+
const open = tokens[token.tokensIndex];
|
|
630
|
+
open.type = 'text';
|
|
631
|
+
open.value = literal;
|
|
632
|
+
open.output = safeOutput || utils.escapeRegex(literal);
|
|
633
|
+
for(let i = token.tokensIndex + 1; i < tokens.length; i++){
|
|
634
|
+
tokens[i].value = '';
|
|
635
|
+
tokens[i].output = '';
|
|
636
|
+
delete tokens[i].suffix;
|
|
637
|
+
}
|
|
638
|
+
state.output = token.output + open.output;
|
|
639
|
+
state.backtrack = true;
|
|
640
|
+
push({
|
|
641
|
+
type: 'paren',
|
|
642
|
+
extglob: true,
|
|
643
|
+
value,
|
|
644
|
+
output: ''
|
|
645
|
+
});
|
|
646
|
+
decrement('parens');
|
|
647
|
+
return;
|
|
648
|
+
}
|
|
397
649
|
let output = token.close + (opts.capture ? ')' : '');
|
|
398
650
|
let rest;
|
|
399
651
|
if ('negate' === token.type) {
|
|
@@ -1035,11 +1287,11 @@ __webpack_require__.add({
|
|
|
1035
1287
|
};
|
|
1036
1288
|
module.exports = parse;
|
|
1037
1289
|
},
|
|
1038
|
-
"./node_modules/.pnpm/picomatch@4.0.
|
|
1039
|
-
const scan = __webpack_require__("./node_modules/.pnpm/picomatch@4.0.
|
|
1040
|
-
const parse = __webpack_require__("./node_modules/.pnpm/picomatch@4.0.
|
|
1041
|
-
const utils = __webpack_require__("./node_modules/.pnpm/picomatch@4.0.
|
|
1042
|
-
const constants = __webpack_require__("./node_modules/.pnpm/picomatch@4.0.
|
|
1290
|
+
"./node_modules/.pnpm/picomatch@4.0.4/node_modules/picomatch/lib/picomatch.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
1291
|
+
const scan = __webpack_require__("./node_modules/.pnpm/picomatch@4.0.4/node_modules/picomatch/lib/scan.js");
|
|
1292
|
+
const parse = __webpack_require__("./node_modules/.pnpm/picomatch@4.0.4/node_modules/picomatch/lib/parse.js");
|
|
1293
|
+
const utils = __webpack_require__("./node_modules/.pnpm/picomatch@4.0.4/node_modules/picomatch/lib/utils.js");
|
|
1294
|
+
const constants = __webpack_require__("./node_modules/.pnpm/picomatch@4.0.4/node_modules/picomatch/lib/constants.js");
|
|
1043
1295
|
const isObject = (val)=>val && 'object' == typeof val && !Array.isArray(val);
|
|
1044
1296
|
const picomatch = (glob, options, returnState = false)=>{
|
|
1045
1297
|
if (Array.isArray(glob)) {
|
|
@@ -1168,9 +1420,9 @@ __webpack_require__.add({
|
|
|
1168
1420
|
picomatch.constants = constants;
|
|
1169
1421
|
module.exports = picomatch;
|
|
1170
1422
|
},
|
|
1171
|
-
"./node_modules/.pnpm/picomatch@4.0.
|
|
1172
|
-
const utils = __webpack_require__("./node_modules/.pnpm/picomatch@4.0.
|
|
1173
|
-
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.
|
|
1423
|
+
"./node_modules/.pnpm/picomatch@4.0.4/node_modules/picomatch/lib/scan.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
1424
|
+
const utils = __webpack_require__("./node_modules/.pnpm/picomatch@4.0.4/node_modules/picomatch/lib/utils.js");
|
|
1425
|
+
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.4/node_modules/picomatch/lib/constants.js");
|
|
1174
1426
|
const isPathSeparator = (code)=>code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
|
|
1175
1427
|
const depth = (token)=>{
|
|
1176
1428
|
if (true !== token.isPrefix) token.depth = token.isGlobstar ? 1 / 0 : 1;
|
|
@@ -1436,8 +1688,8 @@ __webpack_require__.add({
|
|
|
1436
1688
|
};
|
|
1437
1689
|
module.exports = scan;
|
|
1438
1690
|
},
|
|
1439
|
-
"./node_modules/.pnpm/picomatch@4.0.
|
|
1440
|
-
const { REGEX_BACKSLASH, REGEX_REMOVE_BACKSLASH, REGEX_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_GLOBAL } = __webpack_require__("./node_modules/.pnpm/picomatch@4.0.
|
|
1691
|
+
"./node_modules/.pnpm/picomatch@4.0.4/node_modules/picomatch/lib/utils.js" (__unused_rspack_module, exports, __webpack_require__) {
|
|
1692
|
+
const { REGEX_BACKSLASH, REGEX_REMOVE_BACKSLASH, REGEX_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_GLOBAL } = __webpack_require__("./node_modules/.pnpm/picomatch@4.0.4/node_modules/picomatch/lib/constants.js");
|
|
1441
1693
|
exports.isObject = (val)=>null !== val && 'object' == typeof val && !Array.isArray(val);
|
|
1442
1694
|
exports.hasRegexChars = (str)=>REGEX_SPECIAL_CHARS.test(str);
|
|
1443
1695
|
exports.isRegexChar = (str)=>1 === str.length && exports.hasRegexChars(str);
|
|
@@ -1481,6 +1733,29 @@ __webpack_require__.add({
|
|
|
1481
1733
|
};
|
|
1482
1734
|
}
|
|
1483
1735
|
});
|
|
1736
|
+
function checkNodeVersion() {
|
|
1737
|
+
const { versions } = process;
|
|
1738
|
+
if ("styleText" in node_util || !versions.node || versions.bun || versions.deno) return;
|
|
1739
|
+
throw new Error(`Unsupported Node.js version: "${process.versions.node || 'unknown'}". Expected Node.js >= 20.`);
|
|
1740
|
+
}
|
|
1741
|
+
checkNodeVersion();
|
|
1742
|
+
const createStyler = (style)=>(text)=>node_util.styleText(style, String(text));
|
|
1743
|
+
const color = {
|
|
1744
|
+
dim: createStyler('dim'),
|
|
1745
|
+
red: createStyler('red'),
|
|
1746
|
+
bold: createStyler('bold'),
|
|
1747
|
+
blue: createStyler('blue'),
|
|
1748
|
+
cyan: createStyler('cyan'),
|
|
1749
|
+
gray: createStyler('gray'),
|
|
1750
|
+
black: createStyler('black'),
|
|
1751
|
+
green: createStyler('green'),
|
|
1752
|
+
white: createStyler('white'),
|
|
1753
|
+
reset: createStyler('reset'),
|
|
1754
|
+
yellow: createStyler('yellow'),
|
|
1755
|
+
magenta: createStyler('magenta'),
|
|
1756
|
+
underline: createStyler('underline'),
|
|
1757
|
+
strikethrough: createStyler('strikethrough')
|
|
1758
|
+
};
|
|
1484
1759
|
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : node_process.argv) {
|
|
1485
1760
|
const prefix = flag.startsWith('-') ? '' : 1 === flag.length ? '-' : '--';
|
|
1486
1761
|
const position = argv.indexOf(prefix + flag);
|
|
@@ -1587,24 +1862,6 @@ let errorStackRegExp = /at [^\r\n]{0,200}:\d+:\d+[\s\)]*$/;
|
|
|
1587
1862
|
let anonymousErrorStackRegExp = /at [^\r\n]{0,200}\(<anonymous>\)$/;
|
|
1588
1863
|
let indexErrorStackRegExp = /at [^\r\n]{0,200}\(index\s\d+\)$/;
|
|
1589
1864
|
let isErrorStackMessage = (message)=>errorStackRegExp.test(message) || anonymousErrorStackRegExp.test(message) || indexErrorStackRegExp.test(message);
|
|
1590
|
-
let formatter = (open, close, replace = open)=>colorLevel >= 2 ? (input)=>{
|
|
1591
|
-
let string = '' + input;
|
|
1592
|
-
let index = string.indexOf(close, open.length);
|
|
1593
|
-
return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
|
|
1594
|
-
} : String;
|
|
1595
|
-
let replaceClose = (string, close, replace, index)=>{
|
|
1596
|
-
let start = string.substring(0, index) + replace;
|
|
1597
|
-
let end = string.substring(index + close.length);
|
|
1598
|
-
let nextIndex = end.indexOf(close);
|
|
1599
|
-
return ~nextIndex ? start + replaceClose(end, close, replace, nextIndex) : start + end;
|
|
1600
|
-
};
|
|
1601
|
-
const bold = formatter('\x1b[1m', '\x1b[22m', '\x1b[22m\x1b[1m');
|
|
1602
|
-
const red = formatter('\x1b[31m', '\x1b[39m');
|
|
1603
|
-
const green = formatter('\x1b[32m', '\x1b[39m');
|
|
1604
|
-
const yellow = formatter('\x1b[33m', '\x1b[39m');
|
|
1605
|
-
const magenta = formatter('\x1b[35m', '\x1b[39m');
|
|
1606
|
-
const cyan = formatter('\x1b[36m', '\x1b[39m');
|
|
1607
|
-
const gray = formatter('\x1b[90m', '\x1b[39m');
|
|
1608
1865
|
let startColor = [
|
|
1609
1866
|
189,
|
|
1610
1867
|
255,
|
|
@@ -1617,7 +1874,7 @@ let endColor = [
|
|
|
1617
1874
|
];
|
|
1618
1875
|
let isWord = (char)=>!/[\s\n]/.test(char);
|
|
1619
1876
|
let gradient = (message)=>{
|
|
1620
|
-
if (colorLevel < 3) return 2 === colorLevel ?
|
|
1877
|
+
if (colorLevel < 3) return 2 === colorLevel ? color.cyan(message) : message;
|
|
1621
1878
|
let chars = [
|
|
1622
1879
|
...message
|
|
1623
1880
|
];
|
|
@@ -1637,7 +1894,7 @@ let gradient = (message)=>{
|
|
|
1637
1894
|
}
|
|
1638
1895
|
output += `\x1b[38;2;${Math.round(r)};${Math.round(g)};${Math.round(b)}m${char}\x1b[39m`;
|
|
1639
1896
|
}
|
|
1640
|
-
return bold(output);
|
|
1897
|
+
return color.bold(output);
|
|
1641
1898
|
};
|
|
1642
1899
|
let LOG_LEVEL = {
|
|
1643
1900
|
silent: -1,
|
|
@@ -1651,32 +1908,32 @@ let LOG_TYPES = {
|
|
|
1651
1908
|
error: {
|
|
1652
1909
|
label: 'error',
|
|
1653
1910
|
level: 'error',
|
|
1654
|
-
color: red
|
|
1911
|
+
color: color.red
|
|
1655
1912
|
},
|
|
1656
1913
|
warn: {
|
|
1657
1914
|
label: 'warn',
|
|
1658
1915
|
level: 'warn',
|
|
1659
|
-
color: yellow
|
|
1916
|
+
color: color.yellow
|
|
1660
1917
|
},
|
|
1661
1918
|
info: {
|
|
1662
1919
|
label: 'info',
|
|
1663
1920
|
level: 'info',
|
|
1664
|
-
color: cyan
|
|
1921
|
+
color: color.cyan
|
|
1665
1922
|
},
|
|
1666
1923
|
start: {
|
|
1667
1924
|
label: 'start',
|
|
1668
1925
|
level: 'info',
|
|
1669
|
-
color: cyan
|
|
1926
|
+
color: color.cyan
|
|
1670
1927
|
},
|
|
1671
1928
|
ready: {
|
|
1672
1929
|
label: 'ready',
|
|
1673
1930
|
level: 'info',
|
|
1674
|
-
color: green
|
|
1931
|
+
color: color.green
|
|
1675
1932
|
},
|
|
1676
1933
|
success: {
|
|
1677
1934
|
label: 'success',
|
|
1678
1935
|
level: 'info',
|
|
1679
|
-
color: green
|
|
1936
|
+
color: color.green
|
|
1680
1937
|
},
|
|
1681
1938
|
log: {
|
|
1682
1939
|
level: 'info'
|
|
@@ -1684,43 +1941,45 @@ let LOG_TYPES = {
|
|
|
1684
1941
|
debug: {
|
|
1685
1942
|
label: 'debug',
|
|
1686
1943
|
level: 'verbose',
|
|
1687
|
-
color: magenta
|
|
1944
|
+
color: color.magenta
|
|
1688
1945
|
}
|
|
1689
1946
|
};
|
|
1690
1947
|
const normalizeErrorMessage = (err)=>{
|
|
1691
1948
|
if (err.stack) {
|
|
1692
1949
|
let [name, ...rest] = err.stack.split('\n');
|
|
1693
1950
|
if (name.startsWith('Error: ')) name = name.slice(7);
|
|
1694
|
-
return `${name}\n${gray(rest.join('\n'))}`;
|
|
1951
|
+
return `${name}\n${color.gray(rest.join('\n'))}`;
|
|
1695
1952
|
}
|
|
1696
1953
|
return err.message;
|
|
1697
1954
|
};
|
|
1698
1955
|
let createLogger = (options = {})=>{
|
|
1699
|
-
|
|
1956
|
+
const { level = 'info', prefix, console: console1 = globalThis.console } = options;
|
|
1957
|
+
let maxLevel = level;
|
|
1700
1958
|
let log = (type, message, ...args)=>{
|
|
1701
1959
|
let logType = LOG_TYPES[type];
|
|
1702
1960
|
const { level } = logType;
|
|
1703
1961
|
if (LOG_LEVEL[level] > LOG_LEVEL[maxLevel]) return;
|
|
1704
|
-
if (null == message) return
|
|
1962
|
+
if (null == message) return console1.log();
|
|
1705
1963
|
let label = '';
|
|
1706
1964
|
let text = '';
|
|
1707
1965
|
if ('label' in logType) {
|
|
1708
1966
|
label = (logType.label || '').padEnd(7);
|
|
1709
|
-
label = bold(logType.color ? logType.color(label) : label);
|
|
1967
|
+
label = color.bold(logType.color ? logType.color(label) : label);
|
|
1710
1968
|
}
|
|
1711
1969
|
if (message instanceof Error) {
|
|
1712
1970
|
text += normalizeErrorMessage(message);
|
|
1713
1971
|
const { cause } = message;
|
|
1714
1972
|
if (cause) {
|
|
1715
|
-
text += yellow('\n [cause]: ');
|
|
1973
|
+
text += color.yellow('\n [cause]: ');
|
|
1716
1974
|
text += cause instanceof Error ? normalizeErrorMessage(cause) : String(cause);
|
|
1717
1975
|
}
|
|
1718
1976
|
} else if ('error' === level && 'string' == typeof message) {
|
|
1719
1977
|
let lines = message.split('\n');
|
|
1720
|
-
text = lines.map((line)=>isErrorStackMessage(line) ? gray(line) : line).join('\n');
|
|
1978
|
+
text = lines.map((line)=>isErrorStackMessage(line) ? color.gray(line) : line).join('\n');
|
|
1721
1979
|
} else text = `${message}`;
|
|
1980
|
+
if (prefix) text = `${prefix} ${text}`;
|
|
1722
1981
|
const method = 'error' === level || 'warn' === level ? level : 'log';
|
|
1723
|
-
|
|
1982
|
+
console1[method](label.length ? `${label} ${text}` : text, ...args);
|
|
1724
1983
|
};
|
|
1725
1984
|
let logger = {
|
|
1726
1985
|
greet: (message)=>log('log', gradient(message))
|
|
@@ -1734,6 +1993,11 @@ let createLogger = (options = {})=>{
|
|
|
1734
1993
|
maxLevel = val;
|
|
1735
1994
|
}
|
|
1736
1995
|
});
|
|
1996
|
+
Object.defineProperty(logger, 'options', {
|
|
1997
|
+
get: ()=>({
|
|
1998
|
+
...options
|
|
1999
|
+
})
|
|
2000
|
+
});
|
|
1737
2001
|
logger.override = (customLogger)=>{
|
|
1738
2002
|
Object.assign(logger, customLogger);
|
|
1739
2003
|
};
|
|
@@ -2225,38 +2489,38 @@ var Builder = class {
|
|
|
2225
2489
|
return this;
|
|
2226
2490
|
}
|
|
2227
2491
|
};
|
|
2228
|
-
const picomatch = __webpack_require__("./node_modules/.pnpm/picomatch@4.0.
|
|
2492
|
+
const picomatch = __webpack_require__("./node_modules/.pnpm/picomatch@4.0.4/node_modules/picomatch/index.js");
|
|
2229
2493
|
const isReadonlyArray = Array.isArray;
|
|
2494
|
+
const BACKSLASHES = /\\/g;
|
|
2230
2495
|
const isWin = "win32" === process.platform;
|
|
2231
2496
|
const ONLY_PARENT_DIRECTORIES = /^(\/?\.\.)+$/;
|
|
2232
2497
|
function getPartialMatcher(patterns, options = {}) {
|
|
2233
2498
|
const patternsCount = patterns.length;
|
|
2234
2499
|
const patternsParts = Array(patternsCount);
|
|
2235
2500
|
const matchers = Array(patternsCount);
|
|
2236
|
-
|
|
2237
|
-
for(
|
|
2501
|
+
let i, j;
|
|
2502
|
+
for(i = 0; i < patternsCount; i++){
|
|
2238
2503
|
const parts = splitPattern(patterns[i]);
|
|
2239
2504
|
patternsParts[i] = parts;
|
|
2240
2505
|
const partsCount = parts.length;
|
|
2241
2506
|
const partMatchers = Array(partsCount);
|
|
2242
|
-
for(
|
|
2507
|
+
for(j = 0; j < partsCount; j++)partMatchers[j] = picomatch(parts[j], options);
|
|
2243
2508
|
matchers[i] = partMatchers;
|
|
2244
2509
|
}
|
|
2245
2510
|
return (input)=>{
|
|
2246
2511
|
const inputParts = input.split("/");
|
|
2247
2512
|
if (".." === inputParts[0] && ONLY_PARENT_DIRECTORIES.test(input)) return true;
|
|
2248
|
-
for(
|
|
2513
|
+
for(i = 0; i < patternsCount; i++){
|
|
2249
2514
|
const patternParts = patternsParts[i];
|
|
2250
2515
|
const matcher = matchers[i];
|
|
2251
2516
|
const inputPatternCount = inputParts.length;
|
|
2252
2517
|
const minParts = Math.min(inputPatternCount, patternParts.length);
|
|
2253
|
-
|
|
2518
|
+
j = 0;
|
|
2254
2519
|
while(j < minParts){
|
|
2255
2520
|
const part = patternParts[j];
|
|
2256
2521
|
if (part.includes("/")) return true;
|
|
2257
|
-
|
|
2258
|
-
if (!
|
|
2259
|
-
if (globstarEnabled && "**" === part) return true;
|
|
2522
|
+
if (!matcher[j](inputParts[j])) break;
|
|
2523
|
+
if (!options.noglobstar && "**" === part) return true;
|
|
2260
2524
|
j++;
|
|
2261
2525
|
}
|
|
2262
2526
|
if (j === inputPatternCount) return true;
|
|
@@ -2269,7 +2533,7 @@ const isRoot = isWin ? (p)=>WIN32_ROOT_DIR.test(p) : (p)=>"/" === p;
|
|
|
2269
2533
|
function buildFormat(cwd, root, absolute) {
|
|
2270
2534
|
if (cwd === root || root.startsWith(`${cwd}/`)) {
|
|
2271
2535
|
if (absolute) {
|
|
2272
|
-
const start =
|
|
2536
|
+
const start = cwd.length + +!isRoot(cwd);
|
|
2273
2537
|
return (p, isDir)=>p.slice(start, isDir ? -1 : void 0) || ".";
|
|
2274
2538
|
}
|
|
2275
2539
|
const prefix = root.slice(cwd.length + 1);
|
|
@@ -2290,24 +2554,23 @@ function buildRelative(cwd, root) {
|
|
|
2290
2554
|
}
|
|
2291
2555
|
return (p)=>{
|
|
2292
2556
|
const result = posix.relative(cwd, `${root}/${p}`);
|
|
2293
|
-
|
|
2294
|
-
return result || ".";
|
|
2557
|
+
return "/" === p[p.length - 1] && "" !== result ? `${result}/` : result || ".";
|
|
2295
2558
|
};
|
|
2296
2559
|
}
|
|
2297
2560
|
const splitPatternOptions = {
|
|
2298
2561
|
parts: true
|
|
2299
2562
|
};
|
|
2300
|
-
function splitPattern(path
|
|
2563
|
+
function splitPattern(path) {
|
|
2301
2564
|
var _result$parts;
|
|
2302
|
-
const result = picomatch.scan(path
|
|
2565
|
+
const result = picomatch.scan(path, splitPatternOptions);
|
|
2303
2566
|
return (null == (_result$parts = result.parts) ? void 0 : _result$parts.length) ? result.parts : [
|
|
2304
|
-
path
|
|
2567
|
+
path
|
|
2305
2568
|
];
|
|
2306
2569
|
}
|
|
2307
2570
|
const POSIX_UNESCAPED_GLOB_SYMBOLS = /(?<!\\)([()[\]{}*?|]|^!|[!+@](?=\()|\\(?![()[\]{}!*+?@|]))/g;
|
|
2308
2571
|
const WIN32_UNESCAPED_GLOB_SYMBOLS = /(?<!\\)([()[\]{}]|^!|[!+@](?=\())/g;
|
|
2309
|
-
const escapePosixPath = (path
|
|
2310
|
-
const escapeWin32Path = (path
|
|
2572
|
+
const escapePosixPath = (path)=>path.replace(POSIX_UNESCAPED_GLOB_SYMBOLS, "\\$&");
|
|
2573
|
+
const escapeWin32Path = (path)=>path.replace(WIN32_UNESCAPED_GLOB_SYMBOLS, "\\$&");
|
|
2311
2574
|
const escapePath = isWin ? escapeWin32Path : escapePosixPath;
|
|
2312
2575
|
function isDynamicPattern(pattern, options) {
|
|
2313
2576
|
if ((null == options ? void 0 : options.caseSensitiveMatch) === false) return true;
|
|
@@ -2317,27 +2580,33 @@ function isDynamicPattern(pattern, options) {
|
|
|
2317
2580
|
function dist_log(...tasks) {
|
|
2318
2581
|
console.log(`[tinyglobby ${/* @__PURE__ */ new Date().toLocaleTimeString("es")}]`, ...tasks);
|
|
2319
2582
|
}
|
|
2583
|
+
function ensureStringArray(value) {
|
|
2584
|
+
return "string" == typeof value ? [
|
|
2585
|
+
value
|
|
2586
|
+
] : null != value ? value : [];
|
|
2587
|
+
}
|
|
2320
2588
|
const PARENT_DIRECTORY = /^(\/?\.\.)+/;
|
|
2321
2589
|
const ESCAPING_BACKSLASHES = /\\(?=[()[\]{}!*+?@|])/g;
|
|
2322
|
-
|
|
2323
|
-
|
|
2590
|
+
function normalizePattern(pattern, opts, props, isIgnore) {
|
|
2591
|
+
var _PARENT_DIRECTORY$exe;
|
|
2592
|
+
const cwd = opts.cwd;
|
|
2324
2593
|
let result = pattern;
|
|
2325
|
-
if (
|
|
2326
|
-
if (
|
|
2594
|
+
if ("/" === pattern[pattern.length - 1]) result = pattern.slice(0, -1);
|
|
2595
|
+
if ("*" !== result[result.length - 1] && opts.expandDirectories) result += "/**";
|
|
2327
2596
|
const escapedCwd = escapePath(cwd);
|
|
2328
|
-
result =
|
|
2329
|
-
const
|
|
2597
|
+
result = isAbsolute(result.replace(ESCAPING_BACKSLASHES, "")) ? posix.relative(escapedCwd, result) : posix.normalize(result);
|
|
2598
|
+
const parentDir = null == (_PARENT_DIRECTORY$exe = PARENT_DIRECTORY.exec(result)) ? void 0 : _PARENT_DIRECTORY$exe[0];
|
|
2330
2599
|
const parts = splitPattern(result);
|
|
2331
|
-
if (
|
|
2332
|
-
const n = (
|
|
2600
|
+
if (parentDir) {
|
|
2601
|
+
const n = (parentDir.length + 1) / 3;
|
|
2333
2602
|
let i = 0;
|
|
2334
2603
|
const cwdParts = escapedCwd.split("/");
|
|
2335
2604
|
while(i < n && parts[i + n] === cwdParts[cwdParts.length + i - n]){
|
|
2336
2605
|
result = result.slice(0, (n - i - 1) * 3) + result.slice((n - i) * 3 + parts[i + n].length + 1) || ".";
|
|
2337
2606
|
i++;
|
|
2338
2607
|
}
|
|
2339
|
-
const potentialRoot = posix.join(cwd,
|
|
2340
|
-
if (
|
|
2608
|
+
const potentialRoot = posix.join(cwd, parentDir.slice(3 * i));
|
|
2609
|
+
if ("." !== potentialRoot[0] && props.root.length > potentialRoot.length) {
|
|
2341
2610
|
props.root = potentialRoot;
|
|
2342
2611
|
props.depthOffset = -n + i;
|
|
2343
2612
|
}
|
|
@@ -2352,7 +2621,7 @@ function normalizePattern(pattern, expandDirectories, cwd, props, isIgnore) {
|
|
|
2352
2621
|
newCommonPath.pop();
|
|
2353
2622
|
break;
|
|
2354
2623
|
}
|
|
2355
|
-
if (part !== props.commonPath[i] || isDynamicPattern(part)
|
|
2624
|
+
if (i === parts.length - 1 || part !== props.commonPath[i] || isDynamicPattern(part)) break;
|
|
2356
2625
|
newCommonPath.push(part);
|
|
2357
2626
|
}
|
|
2358
2627
|
props.depthOffset = newCommonPath.length;
|
|
@@ -2361,153 +2630,135 @@ function normalizePattern(pattern, expandDirectories, cwd, props, isIgnore) {
|
|
|
2361
2630
|
}
|
|
2362
2631
|
return result;
|
|
2363
2632
|
}
|
|
2364
|
-
function processPatterns(
|
|
2365
|
-
"**/*"
|
|
2366
|
-
], ignore = [], expandDirectories = true }, cwd, props) {
|
|
2367
|
-
if ("string" == typeof patterns) patterns = [
|
|
2368
|
-
patterns
|
|
2369
|
-
];
|
|
2370
|
-
if ("string" == typeof ignore) ignore = [
|
|
2371
|
-
ignore
|
|
2372
|
-
];
|
|
2633
|
+
function processPatterns(options, patterns, props) {
|
|
2373
2634
|
const matchPatterns = [];
|
|
2374
2635
|
const ignorePatterns = [];
|
|
2375
|
-
for (const pattern of ignore)if (pattern) {
|
|
2376
|
-
if ("!" !== pattern[0] || "(" === pattern[1]) ignorePatterns.push(normalizePattern(pattern,
|
|
2636
|
+
for (const pattern of options.ignore)if (pattern) {
|
|
2637
|
+
if ("!" !== pattern[0] || "(" === pattern[1]) ignorePatterns.push(normalizePattern(pattern, options, props, true));
|
|
2377
2638
|
}
|
|
2378
2639
|
for (const pattern of patterns)if (pattern) {
|
|
2379
|
-
if ("!" !== pattern[0] || "(" === pattern[1]) matchPatterns.push(normalizePattern(pattern,
|
|
2380
|
-
else if ("!" !== pattern[1] || "(" === pattern[2]) ignorePatterns.push(normalizePattern(pattern.slice(1),
|
|
2640
|
+
if ("!" !== pattern[0] || "(" === pattern[1]) matchPatterns.push(normalizePattern(pattern, options, props, false));
|
|
2641
|
+
else if ("!" !== pattern[1] || "(" === pattern[2]) ignorePatterns.push(normalizePattern(pattern.slice(1), options, props, true));
|
|
2381
2642
|
}
|
|
2382
2643
|
return {
|
|
2383
2644
|
match: matchPatterns,
|
|
2384
2645
|
ignore: ignorePatterns
|
|
2385
2646
|
};
|
|
2386
2647
|
}
|
|
2387
|
-
function
|
|
2388
|
-
|
|
2389
|
-
const path$1 = paths[i];
|
|
2390
|
-
paths[i] = relative(path$1);
|
|
2391
|
-
}
|
|
2392
|
-
return paths;
|
|
2393
|
-
}
|
|
2394
|
-
function normalizeCwd(cwd) {
|
|
2395
|
-
if (!cwd) return process.cwd().replace(BACKSLASHES, "/");
|
|
2396
|
-
if (cwd instanceof URL) return fileURLToPath(cwd).replace(BACKSLASHES, "/");
|
|
2397
|
-
return path_0.resolve(cwd).replace(BACKSLASHES, "/");
|
|
2398
|
-
}
|
|
2399
|
-
function getCrawler(patterns, inputOptions = {}) {
|
|
2400
|
-
const options = process.env.TINYGLOBBY_DEBUG ? {
|
|
2401
|
-
...inputOptions,
|
|
2402
|
-
debug: true
|
|
2403
|
-
} : inputOptions;
|
|
2404
|
-
const cwd = normalizeCwd(options.cwd);
|
|
2405
|
-
if (options.debug) dist_log("globbing with:", {
|
|
2406
|
-
patterns,
|
|
2407
|
-
options,
|
|
2408
|
-
cwd
|
|
2409
|
-
});
|
|
2410
|
-
if (Array.isArray(patterns) && 0 === patterns.length) return [
|
|
2411
|
-
{
|
|
2412
|
-
sync: ()=>[],
|
|
2413
|
-
withPromise: async ()=>[]
|
|
2414
|
-
},
|
|
2415
|
-
false
|
|
2416
|
-
];
|
|
2648
|
+
function buildCrawler(options, patterns) {
|
|
2649
|
+
const cwd = options.cwd;
|
|
2417
2650
|
const props = {
|
|
2418
2651
|
root: cwd,
|
|
2419
|
-
commonPath: null,
|
|
2420
2652
|
depthOffset: 0
|
|
2421
2653
|
};
|
|
2422
|
-
const processed = processPatterns(
|
|
2423
|
-
...options,
|
|
2424
|
-
patterns
|
|
2425
|
-
}, cwd, props);
|
|
2654
|
+
const processed = processPatterns(options, patterns, props);
|
|
2426
2655
|
if (options.debug) dist_log("internal processing patterns:", processed);
|
|
2656
|
+
const { absolute, caseSensitiveMatch, debug, dot, followSymbolicLinks, onlyDirectories } = options;
|
|
2657
|
+
const root = props.root.replace(BACKSLASHES, "");
|
|
2427
2658
|
const matchOptions = {
|
|
2428
|
-
dot
|
|
2659
|
+
dot,
|
|
2429
2660
|
nobrace: false === options.braceExpansion,
|
|
2430
|
-
nocase:
|
|
2661
|
+
nocase: !caseSensitiveMatch,
|
|
2431
2662
|
noextglob: false === options.extglob,
|
|
2432
2663
|
noglobstar: false === options.globstar,
|
|
2433
2664
|
posix: true
|
|
2434
2665
|
};
|
|
2435
|
-
const matcher = picomatch(processed.match,
|
|
2436
|
-
...matchOptions,
|
|
2437
|
-
ignore: processed.ignore
|
|
2438
|
-
});
|
|
2666
|
+
const matcher = picomatch(processed.match, matchOptions);
|
|
2439
2667
|
const ignore = picomatch(processed.ignore, matchOptions);
|
|
2440
2668
|
const partialMatcher = getPartialMatcher(processed.match, matchOptions);
|
|
2441
|
-
const format = buildFormat(cwd,
|
|
2442
|
-
const
|
|
2443
|
-
const
|
|
2669
|
+
const format = buildFormat(cwd, root, absolute);
|
|
2670
|
+
const excludeFormatter = absolute ? format : buildFormat(cwd, root, true);
|
|
2671
|
+
const excludePredicate = (_, p)=>{
|
|
2672
|
+
const relativePath = excludeFormatter(p, true);
|
|
2673
|
+
return "." !== relativePath && !partialMatcher(relativePath) || ignore(relativePath);
|
|
2674
|
+
};
|
|
2675
|
+
let maxDepth;
|
|
2676
|
+
if (void 0 !== options.deep) maxDepth = Math.round(options.deep - props.depthOffset);
|
|
2677
|
+
const crawler = new Builder({
|
|
2444
2678
|
filters: [
|
|
2445
|
-
|
|
2446
|
-
const path
|
|
2447
|
-
const matches = matcher(path
|
|
2448
|
-
if (matches) dist_log(`matched ${path
|
|
2679
|
+
debug ? (p, isDirectory)=>{
|
|
2680
|
+
const path = format(p, isDirectory);
|
|
2681
|
+
const matches = matcher(path) && !ignore(path);
|
|
2682
|
+
if (matches) dist_log(`matched ${path}`);
|
|
2449
2683
|
return matches;
|
|
2450
|
-
} : (p, isDirectory)=>
|
|
2684
|
+
} : (p, isDirectory)=>{
|
|
2685
|
+
const path = format(p, isDirectory);
|
|
2686
|
+
return matcher(path) && !ignore(path);
|
|
2687
|
+
}
|
|
2451
2688
|
],
|
|
2452
|
-
exclude:
|
|
2453
|
-
const
|
|
2454
|
-
|
|
2455
|
-
skipped ? dist_log(`skipped ${p}`) : dist_log(`crawling ${p}`);
|
|
2689
|
+
exclude: debug ? (_, p)=>{
|
|
2690
|
+
const skipped = excludePredicate(_, p);
|
|
2691
|
+
dist_log(`${skipped ? "skipped" : "crawling"} ${p}`);
|
|
2456
2692
|
return skipped;
|
|
2457
|
-
} :
|
|
2458
|
-
|
|
2459
|
-
return "." !== relativePath && !partialMatcher(relativePath) || ignore(relativePath);
|
|
2460
|
-
},
|
|
2461
|
-
fs: options.fs ? {
|
|
2462
|
-
readdir: options.fs.readdir || __rspack_external_fs["default"].readdir,
|
|
2463
|
-
readdirSync: options.fs.readdirSync || __rspack_external_fs["default"].readdirSync,
|
|
2464
|
-
realpath: options.fs.realpath || __rspack_external_fs["default"].realpath,
|
|
2465
|
-
realpathSync: options.fs.realpathSync || __rspack_external_fs["default"].realpathSync,
|
|
2466
|
-
stat: options.fs.stat || __rspack_external_fs["default"].stat,
|
|
2467
|
-
statSync: options.fs.statSync || __rspack_external_fs["default"].statSync
|
|
2468
|
-
} : void 0,
|
|
2693
|
+
} : excludePredicate,
|
|
2694
|
+
fs: options.fs,
|
|
2469
2695
|
pathSeparator: "/",
|
|
2470
|
-
relativePaths:
|
|
2471
|
-
|
|
2696
|
+
relativePaths: !absolute,
|
|
2697
|
+
resolvePaths: absolute,
|
|
2698
|
+
includeBasePath: absolute,
|
|
2699
|
+
resolveSymlinks: followSymbolicLinks,
|
|
2700
|
+
excludeSymlinks: !followSymbolicLinks,
|
|
2701
|
+
excludeFiles: onlyDirectories,
|
|
2702
|
+
includeDirs: onlyDirectories || !options.onlyFiles,
|
|
2703
|
+
maxDepth,
|
|
2472
2704
|
signal: options.signal
|
|
2473
|
-
};
|
|
2474
|
-
if (
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
fdirOptions.includeBasePath = true;
|
|
2479
|
-
}
|
|
2480
|
-
if (false === options.followSymbolicLinks) {
|
|
2481
|
-
fdirOptions.resolveSymlinks = false;
|
|
2482
|
-
fdirOptions.excludeSymlinks = true;
|
|
2483
|
-
}
|
|
2484
|
-
if (options.onlyDirectories) {
|
|
2485
|
-
fdirOptions.excludeFiles = true;
|
|
2486
|
-
fdirOptions.includeDirs = true;
|
|
2487
|
-
} else if (false === options.onlyFiles) fdirOptions.includeDirs = true;
|
|
2488
|
-
props.root = props.root.replace(BACKSLASHES, "");
|
|
2489
|
-
const root = props.root;
|
|
2490
|
-
if (options.debug) dist_log("internal properties:", props);
|
|
2491
|
-
const relative = cwd !== root && !options.absolute && buildRelative(cwd, props.root);
|
|
2705
|
+
}).crawl(root);
|
|
2706
|
+
if (options.debug) dist_log("internal properties:", {
|
|
2707
|
+
...props,
|
|
2708
|
+
root
|
|
2709
|
+
});
|
|
2492
2710
|
return [
|
|
2493
|
-
|
|
2494
|
-
|
|
2711
|
+
crawler,
|
|
2712
|
+
cwd !== root && !absolute && buildRelative(cwd, root)
|
|
2495
2713
|
];
|
|
2496
2714
|
}
|
|
2497
|
-
|
|
2498
|
-
if (
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2715
|
+
function formatPaths(paths, mapper) {
|
|
2716
|
+
if (mapper) for(let i = paths.length - 1; i >= 0; i--)paths[i] = mapper(paths[i]);
|
|
2717
|
+
return paths;
|
|
2718
|
+
}
|
|
2719
|
+
const defaultOptions = {
|
|
2720
|
+
caseSensitiveMatch: true,
|
|
2721
|
+
cwd: process.cwd(),
|
|
2722
|
+
debug: !!process.env.TINYGLOBBY_DEBUG,
|
|
2723
|
+
expandDirectories: true,
|
|
2724
|
+
followSymbolicLinks: true,
|
|
2725
|
+
onlyFiles: true
|
|
2726
|
+
};
|
|
2727
|
+
function getOptions(options) {
|
|
2728
|
+
const opts = {
|
|
2729
|
+
...defaultOptions,
|
|
2730
|
+
...options
|
|
2731
|
+
};
|
|
2732
|
+
opts.cwd = (opts.cwd instanceof URL ? fileURLToPath(opts.cwd) : resolve(opts.cwd)).replace(BACKSLASHES, "/");
|
|
2733
|
+
opts.ignore = ensureStringArray(opts.ignore);
|
|
2734
|
+
opts.fs && (opts.fs = {
|
|
2735
|
+
readdir: opts.fs.readdir || readdir,
|
|
2736
|
+
readdirSync: opts.fs.readdirSync || readdirSync,
|
|
2737
|
+
realpath: opts.fs.realpath || realpath,
|
|
2738
|
+
realpathSync: opts.fs.realpathSync || realpathSync,
|
|
2739
|
+
stat: opts.fs.stat || external_fs_stat,
|
|
2740
|
+
statSync: opts.fs.statSync || statSync
|
|
2741
|
+
});
|
|
2742
|
+
if (opts.debug) dist_log("globbing with options:", opts);
|
|
2743
|
+
return opts;
|
|
2744
|
+
}
|
|
2745
|
+
function getCrawler(globInput, inputOptions = {}) {
|
|
2746
|
+
var _ref;
|
|
2747
|
+
if (globInput && (null == inputOptions ? void 0 : inputOptions.patterns)) throw new Error("Cannot pass patterns as both an argument and an option");
|
|
2748
|
+
const isModern = isReadonlyArray(globInput) || "string" == typeof globInput;
|
|
2749
|
+
const patterns = ensureStringArray(null != (_ref = isModern ? globInput : globInput.patterns) ? _ref : "**/*");
|
|
2750
|
+
const options = getOptions(isModern ? inputOptions : globInput);
|
|
2751
|
+
return patterns.length > 0 ? buildCrawler(options, patterns) : [];
|
|
2752
|
+
}
|
|
2753
|
+
async function glob(globInput, options) {
|
|
2754
|
+
const [crawler, relative] = getCrawler(globInput, options);
|
|
2755
|
+
return crawler ? formatPaths(await crawler.withPromise(), relative) : [];
|
|
2505
2756
|
}
|
|
2506
2757
|
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"}');
|
|
2507
2758
|
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","vuefes":"Vue Fes","youtube":"YouTube"}');
|
|
2508
2759
|
var general_namespaceObject = JSON.parse('{"aiaas":"AIaaS","baas":"BaaS","caas":"CaaS","daas":"DaaS","ddos":"DDoS","devops":"DevOps","devtools":"DevTools","esim":"eSIM","faas":"FaaS","iac":"IaC","iaas":"IaaS","ioc":"IoC","ipsec":"IPsec","mpaas":"mPaaS","paas":"PaaS","saas":"SaaS","wifi":"Wi-Fi","xaas":"XaaS"}');
|
|
2509
2760
|
var products_namespaceObject = JSON.parse('{"airdrop":"AirDrop","airpods":"AirPods","airtag":"AirTag","homekit":"HomeKit","homepod":"HomePod","imac":"iMac","ipad":"iPad","iphone":"iPhone","ipod":"iPod","macbook":"MacBook","macbook air":"MacBook Air","macbook pro":"MacBook Pro","yubikey":"YubiKey"}');
|
|
2510
|
-
var softwares_namespaceObject = JSON.parse('{"1password":"1Password","3dtiles":"3DTiles","actionscript":"ActionScript","adblock":"AdBlock","ajax":"AJAX","alipay":"Alipay","amap":"AMap","angularjs":"AngularJS","ant design":"Ant Design","ant design vue":"Ant Design Vue","antd":"AntD","antdesign":"AntDesign","antdesignvue":"AntDesignVue","antv":"AntV","apifox":"Apifox","app store":"App Store","apple pay":"Apple Pay","applescript":"AppleScript","appletalk":"AppleTalk","arangodb":"ArangoDB","arcgis":"ArcGIS","arcmap":"ArcMap","arcobjects":"ArcObjects","beego":"Beego","bittorrent":"BitTorrent","bluesky":"Bluesky","busybox":"BusyBox","centos":"CentOS","cesiumjs":"CesiumJS","chatgpt":"ChatGPT","citygml":"CityGML","cityjson":"CityJSON","ckeditor":"CKEditor","clashx":"ClashX","clickhouse":"ClickHouse","cloudfront":"CloudFront","cmake":"CMake","cockroachdb":"CockroachDB","cocoapods":"CocoaPods","codepen":"CodePen","codesandbox":"CodeSandbox","coffeescript":"CoffeeScript","commonjs":"CommonJS","composition api":"Composition API","compositionapi":"CompositionAPI","coredns":"CoreDNS","css modules":"CSS Modules","dapr":"Dapr","datadog":"Datadog","datagrip":"DataGrip","dbase":"dBase","definitelytyped":"DefinitelyTyped","denodeploy":"DenoDeploy","digital ocean":"DigitalOcean","digitalocean":"DigitalOcean","dingtalk":"DingTalk","directx":"DirectX","django":"Django","duckduckgo":"DuckDuckGo","dynamodb":"DynamoDB","echarts":"ECharts","ecmascript":"ECMAScript","edgedb":"EdgeDB","eggjs":"Egg.js","elasticsearch":"Elasticsearch","element plus":"Element Plus","elementui":"ElementUI","esbuild":"esbuild","eslint":"ESLint","esxi":"ESXi","etcd":"etcd","facetime":"FaceTime","fastapi":"FastAPI","ffmpeg":"FFmpeg","filezilla":"FileZilla","firefox":"Firefox","freemarker":"FreeMarker","gdnative":"GDNative","gdscript":"GDScript","geforce":"GeForce","geojson":"GeoJSON","geopackage":"GeoPackage","geopandas":"GeoPandas","geoserver":"GeoServer","gitbook":"GitBook","gitkraken":"GitKraken","gltf":"glTF","gnome":"GNOME","gnu":"GNU","gnupg":"GnuPG","goland":"GoLand","google pay":"Google Pay","graph rag":"Graph RAG","graphql":"GraphQL","graphrag":"GraphRAG","greensock":"GreenSock","grpc":"gRPC","hackernews":"Hacker News","hacpai":"HacPai","hbase":"HBase","hbuilderx":"HBuilderX","ibook":"iBook","icloud":"iCloud","idrac":"iDRAC","ilo":"iLO","imessage":"iMessage","imovie":"iMovie","imtoken":"imToken","influxdb":"InfluxDB","intellij":"IntelliJ","intellij idea":"IntelliJ IDEA","ios":"iOS","ipados":"iPadOS","iphoto":"iPhoto","iscsi":"iSCSI","iterm":"iTerm","itunes":"iTunes","iwork":"iWork","javascript":"JavaScript","jetbrains":"JetBrains","jquery":"jQuery","jsdoc":"JSDoc","jupyterlab":"JupyterLab","katex":"KaTeX","kubernetes":"Kubernetes","latex":"LaTeX","less":"Less","libreoffice":"LibreOffice","line pay":"LINE Pay","lineageos":"LineageOS","macos":"macOS","mariadb":"MariaDB","markdown":"Markdown","markdownlint":"MarkdownLint","
|
|
2761
|
+
var softwares_namespaceObject = JSON.parse('{"1password":"1Password","3dtiles":"3DTiles","actionscript":"ActionScript","adblock":"AdBlock","ajax":"AJAX","alipay":"Alipay","amap":"AMap","angularjs":"AngularJS","ant design":"Ant Design","ant design vue":"Ant Design Vue","antd":"AntD","antdesign":"AntDesign","antdesignvue":"AntDesignVue","antv":"AntV","apifox":"Apifox","app store":"App Store","apple pay":"Apple Pay","applescript":"AppleScript","appletalk":"AppleTalk","arangodb":"ArangoDB","arcgis":"ArcGIS","arcmap":"ArcMap","arcobjects":"ArcObjects","beego":"Beego","bittorrent":"BitTorrent","bluesky":"Bluesky","busybox":"BusyBox","centos":"CentOS","cesiumjs":"CesiumJS","chatgpt":"ChatGPT","citygml":"CityGML","cityjson":"CityJSON","ckeditor":"CKEditor","clashx":"ClashX","clickhouse":"ClickHouse","cloudfront":"CloudFront","cmake":"CMake","cockroachdb":"CockroachDB","cocoapods":"CocoaPods","codepen":"CodePen","codesandbox":"CodeSandbox","coffeescript":"CoffeeScript","commonjs":"CommonJS","composition api":"Composition API","compositionapi":"CompositionAPI","coredns":"CoreDNS","css modules":"CSS Modules","dapr":"Dapr","datadog":"Datadog","datagrip":"DataGrip","dbase":"dBase","definitelytyped":"DefinitelyTyped","denodeploy":"DenoDeploy","digital ocean":"DigitalOcean","digitalocean":"DigitalOcean","dingtalk":"DingTalk","directx":"DirectX","django":"Django","duckduckgo":"DuckDuckGo","dynamodb":"DynamoDB","echarts":"ECharts","ecmascript":"ECMAScript","edgedb":"EdgeDB","eggjs":"Egg.js","elasticsearch":"Elasticsearch","element plus":"Element Plus","elementui":"ElementUI","esbuild":"esbuild","eslint":"ESLint","esxi":"ESXi","etcd":"etcd","facetime":"FaceTime","fastapi":"FastAPI","ffmpeg":"FFmpeg","filezilla":"FileZilla","firefox":"Firefox","freemarker":"FreeMarker","gdnative":"GDNative","gdscript":"GDScript","geforce":"GeForce","geojson":"GeoJSON","geopackage":"GeoPackage","geopandas":"GeoPandas","geoserver":"GeoServer","gitbook":"GitBook","gitkraken":"GitKraken","gltf":"glTF","gnome":"GNOME","gnu":"GNU","gnupg":"GnuPG","goland":"GoLand","google pay":"Google Pay","graph rag":"Graph RAG","graphql":"GraphQL","graphrag":"GraphRAG","greensock":"GreenSock","grpc":"gRPC","hackernews":"Hacker News","hacpai":"HacPai","hbase":"HBase","hbuilderx":"HBuilderX","ibook":"iBook","icloud":"iCloud","idrac":"iDRAC","ilo":"iLO","imessage":"iMessage","imovie":"iMovie","imtoken":"imToken","influxdb":"InfluxDB","intellij":"IntelliJ","intellij idea":"IntelliJ IDEA","ios":"iOS","ipados":"iPadOS","iphoto":"iPhoto","iscsi":"iSCSI","iterm":"iTerm","itunes":"iTunes","iwork":"iWork","javascript":"JavaScript","jetbrains":"JetBrains","jquery":"jQuery","jsdoc":"JSDoc","jupyterlab":"JupyterLab","katex":"KaTeX","kubernetes":"Kubernetes","latex":"LaTeX","less":"Less","libreoffice":"LibreOffice","line pay":"LINE Pay","lineageos":"LineageOS","macos":"macOS","mariadb":"MariaDB","markdown":"Markdown","markdownlint":"MarkdownLint","mathjax":"MathJax","mathml":"MathML","mathtype":"MathType","matlab":"MATLAB","mediawiki":"MediaWiki","memcached":"Memcached","messagepack":"MessagePack","metamask":"MetaMask","mkdocs":"MkDocs","mlaas":"MLaaS","mlops":"MLOps","mobx":"MobX","mongodb":"MongoDB","mongoose":"Mongoose","ms-dos":"MS-DOS","mybatis":"MyBatis","mysql":"MySQL","naive ui":"Naive UI","naiveui":"NaiveUI","neo4j":"Neo4j","nestjs":"NestJS","netbeans":"NetBeans","netbios":"NetBIOS","nextjs":"Next.js","nixos":"NixOS","nocodb":"NocoDB","node.js":"Node.js","nosql":"NoSQL","notepad ++":"Notepad++","npm":"npm","numpy":"NumPy","nuxtjs":"NuxtJS","oauth":"OAuth","obs":"OBS","ocaml":"OCaml","onedrive":"OneDrive","onenote":"OneNote","openai":"OpenAI","openapi":"OpenAPI","opencv":"OpenCV","openfaas":"OpenFaaS","openflow":"OpenFlow","opengauss":"openGauss","opengl":"OpenGL","opengl es":"OpenGL ES","openjdk":"OpenJDK","openlayers":"OpenLayers","openpgp":"OpenPGP","opensea":"OpenSea","openssl":"OpenSSL","openstack":"OpenStack","openstreetmap":"OpenStreetMap","opensuse":"openSUSE","openvino":"OpenVINO","openwrt":"OpenWrt","opnsense":"OPNsense","pagp":"PAgP","paypal":"PayPal","photoshop":"Photoshop","php":"PHP","phpstorm":"PhpStorm","pihole":"Pi-hole","planetscale":"PlanetScale","postcss":"PostCSS","postgis":"PostGIS","postgresql":"PostgreSQL","potplayer":"PotPlayer","powerpoint":"PowerPoint","powershell":"PowerShell","premid":"PreMiD","primevue":"PrimeVue","protobuf":"Protobuf","pycharm":"PyCharm","pytorch":"PyTorch","qtscript":"QtScript","raii":"RAII","react native":"React Native","redhat":"RedHat","redisearch":"RediSearch","redisjson":"RedisJSON","rescript":"ReScript","restful":"RESTful","rethinkdb":"RethinkDB","rsshub":"RSSHub","rust":"Rust","rxdb":"RxDB","rxjs":"RxJS","samsung pay":"Samsung Pay","sass":"Sass","scss":"SCSS","segmentfault":"SegmentFault","socket.io":"Socket.IO","solarwinds":"SolarWinds","spatiallite":"SpatialLite","spir-v":"SPIR-V","springboot":"SpringBoot","springcloud":"SpringCloud","springmvc":"SpringMVC","sqlite":"SQLite","sqlserver":"SQLServer","storybook":"Storybook","stylus":"Stylus","sublime text":"Sublime Text","surrealdb":"SurrealDB","sveltekit":"SvelteKit","tailwind css":"Tailwind CSS","tailwindcss":"TailwindCSS","teamviewer":"TeamViewer","tensorflow":"TensorFlow","testflight":"TestFlight","tex":"TeX","threejs":"ThreeJS","tianocore":"TianoCore","tidb":"TiDB","tiflash":"TiFlash","tiktok":"TikTok","tikv":"TiKV","travis ci":"Travis CI","trpc":"tRPC","tsconfig":"TSConfig","tsdoc":"TSDoc","tsdx":"TSdx","turbopack":"Turbopack","turborepo":"Turborepo","typeorm":"TypeORM","typescript":"TypeScript","uniapp":"uniapp","unifi":"UniFi","unix":"UNIX","unocss":"UnoCSS","upnp":"UPnP","vercel":"Vercel","videolan":"VideoLAN","vim":"Vim","virtualbox":"VirtualBox","visual studio":"Visual Studio","visual studio code":"Visual Studio Code","vitepress":"VitePress","vividcortex":"VividCortex","vlc":"VLC","vmware":"VMware","voip":"VoIP","vs code":"VS Code","vs codium":"VSCodium","vscode":"VS Code","vscodium":"VSCodium","vue cli":"Vue CLI","vuepress":"VuePress","vueuse":"VueUse","vulkan":"Vulkan","w3c":"W3C","wasm":"Wasm","watchos":"watchOS","web assembly":"WebAssembly","webar":"WebAR","webassembly":"WebAssembly","webgl":"WebGL","webgpu":"WebGPU","webkit":"WebKit","webpack":"webpack","webrtc":"WebRTC","websocket":"WebSocket","webstorm":"WebStorm","webvr":"WebVR","webxr":"WebXR","wechat":"WeChat","wechat pay":"WeChat Pay","whatsapp":"WhatsApp","windi css":"Windi CSS","windicss":"WindiCSS","wireguard":"WireGuard","wordpress":"WordPress","xmind":"XMind","xstate":"XState","yapi":"YApi"}');
|
|
2511
2762
|
const dict = [
|
|
2512
2763
|
...Object.values(abbreviates_namespaceObject),
|
|
2513
2764
|
...Object.values(brands_namespaceObject),
|
|
@@ -2518,6 +2769,7 @@ const dict = [
|
|
|
2518
2769
|
'Agent Skills',
|
|
2519
2770
|
'API Report File',
|
|
2520
2771
|
'App Router',
|
|
2772
|
+
'Babel',
|
|
2521
2773
|
'Create React App',
|
|
2522
2774
|
'Cloudflare Pages',
|
|
2523
2775
|
'CSS Modules',
|
|
@@ -2575,6 +2827,36 @@ const dict = [
|
|
|
2575
2827
|
];
|
|
2576
2828
|
const picocolors = __webpack_require__("./node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js");
|
|
2577
2829
|
var picocolors_default = /*#__PURE__*/ __webpack_require__.n(picocolors);
|
|
2830
|
+
const DEFAULT_IGNORE = [
|
|
2831
|
+
'**/node_modules',
|
|
2832
|
+
'**/dist',
|
|
2833
|
+
'**/.git',
|
|
2834
|
+
'**/.cache',
|
|
2835
|
+
'**/temp'
|
|
2836
|
+
];
|
|
2837
|
+
function getGitIgnorePatterns(cwd) {
|
|
2838
|
+
try {
|
|
2839
|
+
const stdout = execFileSync('git', [
|
|
2840
|
+
'ls-files',
|
|
2841
|
+
'--others',
|
|
2842
|
+
'--ignored',
|
|
2843
|
+
'--exclude-standard',
|
|
2844
|
+
'--directory',
|
|
2845
|
+
'-z'
|
|
2846
|
+
], {
|
|
2847
|
+
cwd,
|
|
2848
|
+
encoding: 'utf8',
|
|
2849
|
+
stdio: [
|
|
2850
|
+
'ignore',
|
|
2851
|
+
'pipe',
|
|
2852
|
+
'ignore'
|
|
2853
|
+
]
|
|
2854
|
+
});
|
|
2855
|
+
return stdout.split('\0').filter(Boolean).map((path)=>escapePath(path));
|
|
2856
|
+
} catch {
|
|
2857
|
+
return [];
|
|
2858
|
+
}
|
|
2859
|
+
}
|
|
2578
2860
|
async function globMarkdownFiles(cwd) {
|
|
2579
2861
|
return glob([
|
|
2580
2862
|
'**/*.md',
|
|
@@ -2582,11 +2864,8 @@ async function globMarkdownFiles(cwd) {
|
|
|
2582
2864
|
], {
|
|
2583
2865
|
cwd,
|
|
2584
2866
|
ignore: [
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
'**/.git',
|
|
2588
|
-
'**/.cache',
|
|
2589
|
-
'**/temp'
|
|
2867
|
+
...DEFAULT_IGNORE,
|
|
2868
|
+
...getGitIgnorePatterns(cwd)
|
|
2590
2869
|
],
|
|
2591
2870
|
absolute: true
|
|
2592
2871
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "heading-case",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"repository": "https://github.com/rstackjs/heading-case",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -15,31 +15,36 @@
|
|
|
15
15
|
},
|
|
16
16
|
"module": "./dist/index.mjs",
|
|
17
17
|
"types": "./dist/index.d.ts",
|
|
18
|
-
"files": [
|
|
18
|
+
"files": [
|
|
19
|
+
"dist"
|
|
20
|
+
],
|
|
19
21
|
"scripts": {
|
|
20
|
-
"build": "rslib
|
|
21
|
-
"dev": "rslib
|
|
22
|
-
"lint": "
|
|
23
|
-
"lint:write": "
|
|
24
|
-
"prepare": "simple-git-hooks &&
|
|
25
|
-
"test": "
|
|
22
|
+
"build": "rslib",
|
|
23
|
+
"dev": "rslib -w",
|
|
24
|
+
"lint": "rslint && prettier -c .",
|
|
25
|
+
"lint:write": "rslint --fix && prettier -w .",
|
|
26
|
+
"prepare": "simple-git-hooks && rslib",
|
|
27
|
+
"test": "rstest",
|
|
26
28
|
"bump": "npx bumpp"
|
|
27
29
|
},
|
|
28
30
|
"simple-git-hooks": {
|
|
29
|
-
"pre-commit": "
|
|
31
|
+
"pre-commit": "pnpm run lint:write"
|
|
30
32
|
},
|
|
31
33
|
"devDependencies": {
|
|
32
|
-
"@
|
|
33
|
-
"@
|
|
34
|
-
"@
|
|
35
|
-
"
|
|
34
|
+
"@rslib/core": "^0.21.5",
|
|
35
|
+
"@rslint/core": "^0.5.3",
|
|
36
|
+
"@rstest/core": "^0.10.2",
|
|
37
|
+
"@types/node": "^24.12.4",
|
|
38
|
+
"case-police": "^2.2.1",
|
|
39
|
+
"pathe": "^2.0.3",
|
|
36
40
|
"picocolors": "^1.1.1",
|
|
37
|
-
"
|
|
41
|
+
"prettier": "^3.8.3",
|
|
42
|
+
"rslog": "^2.1.1",
|
|
38
43
|
"simple-git-hooks": "^2.13.1",
|
|
39
|
-
"tinyglobby": "^0.2.
|
|
40
|
-
"typescript": "^
|
|
44
|
+
"tinyglobby": "^0.2.16",
|
|
45
|
+
"typescript": "^6.0.3"
|
|
41
46
|
},
|
|
42
|
-
"packageManager": "pnpm@
|
|
47
|
+
"packageManager": "pnpm@11.2.2",
|
|
43
48
|
"publishConfig": {
|
|
44
49
|
"access": "public",
|
|
45
50
|
"registry": "https://registry.npmjs.org/"
|
package/dist/rslib-runtime.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
var __webpack_modules__ = {};
|
|
2
|
-
var __webpack_module_cache__ = {};
|
|
3
|
-
function __webpack_require__(moduleId) {
|
|
4
|
-
var cachedModule = __webpack_module_cache__[moduleId];
|
|
5
|
-
if (void 0 !== cachedModule) return cachedModule.exports;
|
|
6
|
-
var module = __webpack_module_cache__[moduleId] = {
|
|
7
|
-
exports: {}
|
|
8
|
-
};
|
|
9
|
-
__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
10
|
-
return module.exports;
|
|
11
|
-
}
|
|
12
|
-
__webpack_require__.m = __webpack_modules__;
|
|
13
|
-
(()=>{
|
|
14
|
-
__webpack_require__.add = function(modules) {
|
|
15
|
-
Object.assign(__webpack_require__.m, modules);
|
|
16
|
-
};
|
|
17
|
-
})();
|
|
18
|
-
(()=>{
|
|
19
|
-
__webpack_require__.n = (module)=>{
|
|
20
|
-
var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
|
|
21
|
-
__webpack_require__.d(getter, {
|
|
22
|
-
a: getter
|
|
23
|
-
});
|
|
24
|
-
return getter;
|
|
25
|
-
};
|
|
26
|
-
})();
|
|
27
|
-
(()=>{
|
|
28
|
-
__webpack_require__.d = (exports, definition)=>{
|
|
29
|
-
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) Object.defineProperty(exports, key, {
|
|
30
|
-
enumerable: true,
|
|
31
|
-
get: definition[key]
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
(()=>{
|
|
36
|
-
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
37
|
-
})();
|
|
38
|
-
export { __webpack_require__ };
|