@rsbuild/core 2.0.0-beta.7 → 2.0.0-beta.8

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.
Files changed (56) hide show
  1. package/bin/rsbuild.js +13 -0
  2. package/compiled/connect-next/index.d.ts +56 -0
  3. package/compiled/{connect → connect-next}/license +1 -0
  4. package/compiled/connect-next/package.json +1 -0
  5. package/compiled/css-loader/index.js +2 -2
  6. package/compiled/html-rspack-plugin/index.js +14 -14
  7. package/compiled/jiti/dist/babel.cjs +60 -60
  8. package/compiled/jiti/dist/jiti.cjs +2 -2
  9. package/compiled/postcss-loader/index.js +6 -6
  10. package/compiled/rslog/index.d.ts +17 -1
  11. package/compiled/rslog/package.json +1 -1
  12. package/dist/{131.js → 958.js} +254 -357
  13. package/dist/chokidar.js +59 -57
  14. package/dist/client/hmr.js +1 -1
  15. package/dist/client/overlay.js +1 -1
  16. package/dist/connect-next.js +268 -0
  17. package/dist/{connect.js.LICENSE.txt → connect-next.js.LICENSE.txt} +3 -13
  18. package/dist/cors.js +2 -2
  19. package/dist/http-proxy-middleware.js +57 -552
  20. package/dist/index.js +1 -1
  21. package/dist/launch-editor-middleware.js +23 -8
  22. package/dist/manifest-plugin.js +18 -18
  23. package/dist/memfs.js +178 -717
  24. package/dist/{710.js → mrmime.js} +2 -1
  25. package/dist/open.js +35 -32
  26. package/dist/range-parser.js +2 -2
  27. package/dist/remapping.js +2 -2
  28. package/dist/rslib-runtime.js +3 -3
  29. package/dist/sirv.js +14 -14
  30. package/dist/src.js +510 -0
  31. package/dist/tinyglobby.js +25 -25
  32. package/dist/transformLoader.mjs +38 -1
  33. package/dist/transformRawLoader.mjs +1 -1
  34. package/dist/ws.js +1541 -0
  35. package/dist-types/helpers/index.d.ts +1 -1
  36. package/dist-types/helpers/vendors.d.ts +0 -1
  37. package/dist-types/server/runner/asModule.d.ts +1 -1
  38. package/dist-types/server/socketServer.d.ts +1 -1
  39. package/dist-types/types/thirdParty.d.ts +1 -1
  40. package/package.json +7 -8
  41. package/compiled/connect/index.d.ts +0 -90
  42. package/compiled/connect/package.json +0 -1
  43. package/compiled/ws/index.d.ts +0 -437
  44. package/compiled/ws/index.js +0 -3166
  45. package/compiled/ws/license +0 -20
  46. package/compiled/ws/package.json +0 -1
  47. package/dist/397.js +0 -11
  48. package/dist/7.js +0 -1
  49. package/dist/712.js +0 -15
  50. package/dist/743.js +0 -7
  51. package/dist/88.js +0 -40
  52. package/dist/connect.js +0 -574
  53. package/dist-types/helpers/color.d.ts +0 -4
  54. /package/dist/{131.js.LICENSE.txt → 958.js.LICENSE.txt} +0 -0
  55. /package/dist/client/{59.js → 797.js} +0 -0
  56. /package/dist/{31.js → trace-mapping.js} +0 -0
package/dist/src.js ADDED
@@ -0,0 +1,510 @@
1
+ import * as __rspack_external_node_os_74b4b876 from "node:os";
2
+ import * as __rspack_external_node_process_786449bf from "node:process";
3
+ import * as __rspack_external_node_tty_c64aab7e from "node:tty";
4
+ import * as __rspack_external_tty from "tty";
5
+ import * as __rspack_external_util from "util";
6
+ import { __webpack_require__ } from "./rslib-runtime.js";
7
+ __webpack_require__.add({
8
+ "../../node_modules/.pnpm/debug@4.4.3_supports-color@10.2.2/node_modules/debug/src/browser.js" (module, exports, __webpack_require__) {
9
+ let warned;
10
+ function useColors() {
11
+ let m;
12
+ return "u" > typeof window && !!window.process && ('renderer' === window.process.type || !!window.process.__nwjs) || !("u" > typeof navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) && ("u" > typeof document && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || "u" > typeof window && window.console && (window.console.firebug || window.console.exception && window.console.table) || "u" > typeof navigator && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31 || "u" > typeof navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
13
+ }
14
+ function formatArgs(args) {
15
+ if (args[0] = (this.useColors ? '%c' : '') + this.namespace + (this.useColors ? ' %c' : ' ') + args[0] + (this.useColors ? '%c ' : ' ') + '+' + module.exports.humanize(this.diff), !this.useColors) return;
16
+ let c = 'color: ' + this.color;
17
+ args.splice(1, 0, c, 'color: inherit');
18
+ let index = 0, lastC = 0;
19
+ args[0].replace(/%[a-zA-Z%]/g, (match)=>{
20
+ '%%' !== match && (index++, '%c' === match && (lastC = index));
21
+ }), args.splice(lastC, 0, c);
22
+ }
23
+ function save(namespaces) {
24
+ try {
25
+ namespaces ? exports.storage.setItem('debug', namespaces) : exports.storage.removeItem('debug');
26
+ } catch (error) {}
27
+ }
28
+ function load() {
29
+ let r;
30
+ try {
31
+ r = exports.storage.getItem('debug') || exports.storage.getItem('DEBUG');
32
+ } catch (error) {}
33
+ return !r && "u" > typeof process && 'env' in process && (r = process.env.DEBUG), r;
34
+ }
35
+ function localstorage() {
36
+ try {
37
+ return localStorage;
38
+ } catch (error) {}
39
+ }
40
+ exports.formatArgs = formatArgs, exports.save = save, exports.load = load, exports.useColors = useColors, exports.storage = localstorage(), warned = !1, exports.destroy = ()=>{
41
+ warned || (warned = !0, console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'));
42
+ }, exports.colors = [
43
+ '#0000CC',
44
+ '#0000FF',
45
+ '#0033CC',
46
+ '#0033FF',
47
+ '#0066CC',
48
+ '#0066FF',
49
+ '#0099CC',
50
+ '#0099FF',
51
+ '#00CC00',
52
+ '#00CC33',
53
+ '#00CC66',
54
+ '#00CC99',
55
+ '#00CCCC',
56
+ '#00CCFF',
57
+ '#3300CC',
58
+ '#3300FF',
59
+ '#3333CC',
60
+ '#3333FF',
61
+ '#3366CC',
62
+ '#3366FF',
63
+ '#3399CC',
64
+ '#3399FF',
65
+ '#33CC00',
66
+ '#33CC33',
67
+ '#33CC66',
68
+ '#33CC99',
69
+ '#33CCCC',
70
+ '#33CCFF',
71
+ '#6600CC',
72
+ '#6600FF',
73
+ '#6633CC',
74
+ '#6633FF',
75
+ '#66CC00',
76
+ '#66CC33',
77
+ '#9900CC',
78
+ '#9900FF',
79
+ '#9933CC',
80
+ '#9933FF',
81
+ '#99CC00',
82
+ '#99CC33',
83
+ '#CC0000',
84
+ '#CC0033',
85
+ '#CC0066',
86
+ '#CC0099',
87
+ '#CC00CC',
88
+ '#CC00FF',
89
+ '#CC3300',
90
+ '#CC3333',
91
+ '#CC3366',
92
+ '#CC3399',
93
+ '#CC33CC',
94
+ '#CC33FF',
95
+ '#CC6600',
96
+ '#CC6633',
97
+ '#CC9900',
98
+ '#CC9933',
99
+ '#CCCC00',
100
+ '#CCCC33',
101
+ '#FF0000',
102
+ '#FF0033',
103
+ '#FF0066',
104
+ '#FF0099',
105
+ '#FF00CC',
106
+ '#FF00FF',
107
+ '#FF3300',
108
+ '#FF3333',
109
+ '#FF3366',
110
+ '#FF3399',
111
+ '#FF33CC',
112
+ '#FF33FF',
113
+ '#FF6600',
114
+ '#FF6633',
115
+ '#FF9900',
116
+ '#FF9933',
117
+ '#FFCC00',
118
+ '#FFCC33'
119
+ ], exports.log = console.debug || console.log || (()=>{}), module.exports = __webpack_require__("../../node_modules/.pnpm/debug@4.4.3_supports-color@10.2.2/node_modules/debug/src/common.js")(exports);
120
+ let { formatters } = module.exports;
121
+ formatters.j = function(v) {
122
+ try {
123
+ return JSON.stringify(v);
124
+ } catch (error) {
125
+ return '[UnexpectedJSONParseError]: ' + error.message;
126
+ }
127
+ };
128
+ },
129
+ "../../node_modules/.pnpm/debug@4.4.3_supports-color@10.2.2/node_modules/debug/src/common.js" (module, __unused_rspack_exports, __webpack_require__) {
130
+ module.exports = function setup(env) {
131
+ function selectColor(namespace) {
132
+ let hash = 0;
133
+ for(let i = 0; i < namespace.length; i++)hash = (hash << 5) - hash + namespace.charCodeAt(i) | 0;
134
+ return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
135
+ }
136
+ function createDebug(namespace) {
137
+ let prevTime, namespacesCache, enabledCache, enableOverride = null;
138
+ function debug(...args) {
139
+ if (!debug.enabled) return;
140
+ let self = debug, curr = Number(new Date());
141
+ self.diff = curr - (prevTime || curr), self.prev = prevTime, self.curr = curr, prevTime = curr, args[0] = createDebug.coerce(args[0]), 'string' != typeof args[0] && args.unshift('%O');
142
+ let index = 0;
143
+ args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format)=>{
144
+ if ('%%' === match) return '%';
145
+ index++;
146
+ let formatter = createDebug.formatters[format];
147
+ if ('function' == typeof formatter) {
148
+ let val = args[index];
149
+ match = formatter.call(self, val), args.splice(index, 1), index--;
150
+ }
151
+ return match;
152
+ }), createDebug.formatArgs.call(self, args), (self.log || createDebug.log).apply(self, args);
153
+ }
154
+ return debug.namespace = namespace, debug.useColors = createDebug.useColors(), debug.color = createDebug.selectColor(namespace), debug.extend = extend, debug.destroy = createDebug.destroy, Object.defineProperty(debug, 'enabled', {
155
+ enumerable: !0,
156
+ configurable: !1,
157
+ get: ()=>null !== enableOverride ? enableOverride : (namespacesCache !== createDebug.namespaces && (namespacesCache = createDebug.namespaces, enabledCache = createDebug.enabled(namespace)), enabledCache),
158
+ set: (v)=>{
159
+ enableOverride = v;
160
+ }
161
+ }), 'function' == typeof createDebug.init && createDebug.init(debug), debug;
162
+ }
163
+ function extend(namespace, delimiter) {
164
+ let newDebug = createDebug(this.namespace + (void 0 === delimiter ? ':' : delimiter) + namespace);
165
+ return newDebug.log = this.log, newDebug;
166
+ }
167
+ function enable(namespaces) {
168
+ for (let ns of (createDebug.save(namespaces), createDebug.namespaces = namespaces, createDebug.names = [], createDebug.skips = [], ('string' == typeof namespaces ? namespaces : '').trim().replace(/\s+/g, ',').split(',').filter(Boolean)))'-' === ns[0] ? createDebug.skips.push(ns.slice(1)) : createDebug.names.push(ns);
169
+ }
170
+ function matchesTemplate(search, template) {
171
+ let searchIndex = 0, templateIndex = 0, starIndex = -1, matchIndex = 0;
172
+ for(; searchIndex < search.length;)if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || '*' === template[templateIndex])) '*' === template[templateIndex] ? (starIndex = templateIndex, matchIndex = searchIndex) : searchIndex++, templateIndex++;
173
+ else {
174
+ if (-1 === starIndex) return !1;
175
+ templateIndex = starIndex + 1, searchIndex = ++matchIndex;
176
+ }
177
+ for(; templateIndex < template.length && '*' === template[templateIndex];)templateIndex++;
178
+ return templateIndex === template.length;
179
+ }
180
+ function disable() {
181
+ let namespaces = [
182
+ ...createDebug.names,
183
+ ...createDebug.skips.map((namespace)=>'-' + namespace)
184
+ ].join(',');
185
+ return createDebug.enable(''), namespaces;
186
+ }
187
+ function enabled(name) {
188
+ for (let skip of createDebug.skips)if (matchesTemplate(name, skip)) return !1;
189
+ for (let ns of createDebug.names)if (matchesTemplate(name, ns)) return !0;
190
+ return !1;
191
+ }
192
+ function coerce(val) {
193
+ return val instanceof Error ? val.stack || val.message : val;
194
+ }
195
+ function destroy() {
196
+ console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
197
+ }
198
+ return createDebug.debug = createDebug, createDebug.default = createDebug, createDebug.coerce = coerce, createDebug.disable = disable, createDebug.enable = enable, createDebug.enabled = enabled, createDebug.humanize = __webpack_require__("../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js"), createDebug.destroy = destroy, Object.keys(env).forEach((key)=>{
199
+ createDebug[key] = env[key];
200
+ }), createDebug.names = [], createDebug.skips = [], createDebug.formatters = {}, createDebug.selectColor = selectColor, createDebug.enable(createDebug.load()), createDebug;
201
+ };
202
+ },
203
+ "../../node_modules/.pnpm/debug@4.4.3_supports-color@10.2.2/node_modules/debug/src/index.js" (module, __unused_rspack_exports, __webpack_require__) {
204
+ "u" < typeof process || 'renderer' === process.type || !0 === process.browser || process.__nwjs ? module.exports = __webpack_require__("../../node_modules/.pnpm/debug@4.4.3_supports-color@10.2.2/node_modules/debug/src/browser.js") : module.exports = __webpack_require__("../../node_modules/.pnpm/debug@4.4.3_supports-color@10.2.2/node_modules/debug/src/node.js");
205
+ },
206
+ "../../node_modules/.pnpm/debug@4.4.3_supports-color@10.2.2/node_modules/debug/src/node.js" (module, exports, __webpack_require__) {
207
+ let tty = __webpack_require__("tty"), util = __webpack_require__("util?9076");
208
+ exports.init = init, exports.log = log, exports.formatArgs = formatArgs, exports.save = save, exports.load = load, exports.useColors = useColors, exports.destroy = util.deprecate(()=>{}, 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'), exports.colors = [
209
+ 6,
210
+ 2,
211
+ 3,
212
+ 4,
213
+ 5,
214
+ 1
215
+ ];
216
+ try {
217
+ let supportsColor = __webpack_require__("../../node_modules/.pnpm/supports-color@10.2.2/node_modules/supports-color/index.js");
218
+ supportsColor && (supportsColor.stderr || supportsColor).level >= 2 && (exports.colors = [
219
+ 20,
220
+ 21,
221
+ 26,
222
+ 27,
223
+ 32,
224
+ 33,
225
+ 38,
226
+ 39,
227
+ 40,
228
+ 41,
229
+ 42,
230
+ 43,
231
+ 44,
232
+ 45,
233
+ 56,
234
+ 57,
235
+ 62,
236
+ 63,
237
+ 68,
238
+ 69,
239
+ 74,
240
+ 75,
241
+ 76,
242
+ 77,
243
+ 78,
244
+ 79,
245
+ 80,
246
+ 81,
247
+ 92,
248
+ 93,
249
+ 98,
250
+ 99,
251
+ 112,
252
+ 113,
253
+ 128,
254
+ 129,
255
+ 134,
256
+ 135,
257
+ 148,
258
+ 149,
259
+ 160,
260
+ 161,
261
+ 162,
262
+ 163,
263
+ 164,
264
+ 165,
265
+ 166,
266
+ 167,
267
+ 168,
268
+ 169,
269
+ 170,
270
+ 171,
271
+ 172,
272
+ 173,
273
+ 178,
274
+ 179,
275
+ 184,
276
+ 185,
277
+ 196,
278
+ 197,
279
+ 198,
280
+ 199,
281
+ 200,
282
+ 201,
283
+ 202,
284
+ 203,
285
+ 204,
286
+ 205,
287
+ 206,
288
+ 207,
289
+ 208,
290
+ 209,
291
+ 214,
292
+ 215,
293
+ 220,
294
+ 221
295
+ ]);
296
+ } catch (error) {}
297
+ function useColors() {
298
+ return 'colors' in exports.inspectOpts ? !!exports.inspectOpts.colors : tty.isatty(process.stderr.fd);
299
+ }
300
+ function formatArgs(args) {
301
+ let { namespace: name, useColors } = this;
302
+ if (useColors) {
303
+ let c = this.color, colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c), prefix = ` ${colorCode};1m${name} \u001B[0m`;
304
+ args[0] = prefix + args[0].split('\n').join('\n' + prefix), args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m');
305
+ } else args[0] = getDate() + name + ' ' + args[0];
306
+ }
307
+ function getDate() {
308
+ return exports.inspectOpts.hideDate ? '' : new Date().toISOString() + ' ';
309
+ }
310
+ function log(...args) {
311
+ return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + '\n');
312
+ }
313
+ function save(namespaces) {
314
+ namespaces ? process.env.DEBUG = namespaces : delete process.env.DEBUG;
315
+ }
316
+ function load() {
317
+ return process.env.DEBUG;
318
+ }
319
+ function init(debug) {
320
+ debug.inspectOpts = {};
321
+ let keys = Object.keys(exports.inspectOpts);
322
+ for(let i = 0; i < keys.length; i++)debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
323
+ }
324
+ exports.inspectOpts = Object.keys(process.env).filter((key)=>/^debug_/i.test(key)).reduce((obj, key)=>{
325
+ let prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k)=>k.toUpperCase()), val = process.env[key];
326
+ return val = !!/^(yes|on|true|enabled)$/i.test(val) || !/^(no|off|false|disabled)$/i.test(val) && ('null' === val ? null : Number(val)), obj[prop] = val, obj;
327
+ }, {}), module.exports = __webpack_require__("../../node_modules/.pnpm/debug@4.4.3_supports-color@10.2.2/node_modules/debug/src/common.js")(exports);
328
+ let { formatters } = module.exports;
329
+ formatters.o = function(v) {
330
+ return this.inspectOpts.colors = this.useColors, util.inspect(v, this.inspectOpts).split('\n').map((str)=>str.trim()).join(' ');
331
+ }, formatters.O = function(v) {
332
+ return this.inspectOpts.colors = this.useColors, util.inspect(v, this.inspectOpts);
333
+ };
334
+ },
335
+ "../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js" (module) {
336
+ function parse(str) {
337
+ if (!((str = String(str)).length > 100)) {
338
+ var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str);
339
+ if (match) {
340
+ var n = parseFloat(match[1]);
341
+ switch((match[2] || 'ms').toLowerCase()){
342
+ case 'years':
343
+ case 'year':
344
+ case 'yrs':
345
+ case 'yr':
346
+ case 'y':
347
+ return 31557600000 * n;
348
+ case 'weeks':
349
+ case 'week':
350
+ case 'w':
351
+ return 604800000 * n;
352
+ case 'days':
353
+ case 'day':
354
+ case 'd':
355
+ return 86400000 * n;
356
+ case 'hours':
357
+ case 'hour':
358
+ case 'hrs':
359
+ case 'hr':
360
+ case 'h':
361
+ return 3600000 * n;
362
+ case 'minutes':
363
+ case 'minute':
364
+ case 'mins':
365
+ case 'min':
366
+ case 'm':
367
+ return 60000 * n;
368
+ case 'seconds':
369
+ case 'second':
370
+ case 'secs':
371
+ case 'sec':
372
+ case 's':
373
+ return 1000 * n;
374
+ case 'milliseconds':
375
+ case 'millisecond':
376
+ case 'msecs':
377
+ case 'msec':
378
+ case 'ms':
379
+ return n;
380
+ default:
381
+ return;
382
+ }
383
+ }
384
+ }
385
+ }
386
+ function fmtShort(ms) {
387
+ var msAbs = Math.abs(ms);
388
+ return msAbs >= 86400000 ? Math.round(ms / 86400000) + 'd' : msAbs >= 3600000 ? Math.round(ms / 3600000) + 'h' : msAbs >= 60000 ? Math.round(ms / 60000) + 'm' : msAbs >= 1000 ? Math.round(ms / 1000) + 's' : ms + 'ms';
389
+ }
390
+ function fmtLong(ms) {
391
+ var msAbs = Math.abs(ms);
392
+ return msAbs >= 86400000 ? plural(ms, msAbs, 86400000, 'day') : msAbs >= 3600000 ? plural(ms, msAbs, 3600000, 'hour') : msAbs >= 60000 ? plural(ms, msAbs, 60000, 'minute') : msAbs >= 1000 ? plural(ms, msAbs, 1000, 'second') : ms + ' ms';
393
+ }
394
+ function plural(ms, msAbs, n, name) {
395
+ return Math.round(ms / n) + ' ' + name + (msAbs >= 1.5 * n ? 's' : '');
396
+ }
397
+ module.exports = function(val, options) {
398
+ options = options || {};
399
+ var type = typeof val;
400
+ if ('string' === type && val.length > 0) return parse(val);
401
+ if ('number' === type && isFinite(val)) return options.long ? fmtLong(val) : fmtShort(val);
402
+ throw Error('val is not a non-empty string or a valid number. val=' + JSON.stringify(val));
403
+ };
404
+ },
405
+ "node:os?3b8c" (module) {
406
+ module.exports = __rspack_external_node_os_74b4b876;
407
+ },
408
+ "node:process?aa5c" (module) {
409
+ module.exports = __rspack_external_node_process_786449bf;
410
+ },
411
+ "node:tty?4724" (module) {
412
+ module.exports = __rspack_external_node_tty_c64aab7e;
413
+ },
414
+ tty (module) {
415
+ module.exports = __rspack_external_tty;
416
+ },
417
+ "util?9076" (module) {
418
+ module.exports = __rspack_external_util;
419
+ },
420
+ "../../node_modules/.pnpm/supports-color@10.2.2/node_modules/supports-color/index.js" (__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
421
+ let flagForceColor;
422
+ __webpack_require__.r(__webpack_exports__), __webpack_require__.d(__webpack_exports__, {
423
+ createSupportsColor: ()=>createSupportsColor,
424
+ default: ()=>__rspack_default_export
425
+ });
426
+ var node_process__rspack_import_0 = __webpack_require__("node:process?aa5c"), node_os__rspack_import_1 = __webpack_require__("node:os?3b8c"), node_tty__rspack_import_2 = __webpack_require__("node:tty?4724");
427
+ function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : node_process__rspack_import_0.default.argv) {
428
+ let prefix = flag.startsWith('-') ? '' : 1 === flag.length ? '-' : '--', position = argv.indexOf(prefix + flag), terminatorPosition = argv.indexOf('--');
429
+ return -1 !== position && (-1 === terminatorPosition || position < terminatorPosition);
430
+ }
431
+ let { env } = node_process__rspack_import_0.default;
432
+ function envForceColor() {
433
+ if (!('FORCE_COLOR' in env)) return;
434
+ if ('true' === env.FORCE_COLOR) return 1;
435
+ if ('false' === env.FORCE_COLOR) return 0;
436
+ if (0 === env.FORCE_COLOR.length) return 1;
437
+ let level = Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
438
+ if ([
439
+ 0,
440
+ 1,
441
+ 2,
442
+ 3
443
+ ].includes(level)) return level;
444
+ }
445
+ function translateLevel(level) {
446
+ return 0 !== level && {
447
+ level,
448
+ hasBasic: !0,
449
+ has256: level >= 2,
450
+ has16m: level >= 3
451
+ };
452
+ }
453
+ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = !0 } = {}) {
454
+ let noFlagForceColor = envForceColor();
455
+ void 0 !== noFlagForceColor && (flagForceColor = noFlagForceColor);
456
+ let forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
457
+ if (0 === forceColor) return 0;
458
+ if (sniffFlags) {
459
+ if (hasFlag('color=16m') || hasFlag('color=full') || hasFlag('color=truecolor')) return 3;
460
+ if (hasFlag('color=256')) return 2;
461
+ }
462
+ if ('TF_BUILD' in env && 'AGENT_NAME' in env) return 1;
463
+ if (haveStream && !streamIsTTY && void 0 === forceColor) return 0;
464
+ let min = forceColor || 0;
465
+ if ('dumb' === env.TERM) return min;
466
+ if ('win32' === node_process__rspack_import_0.default.platform) {
467
+ let osRelease = node_os__rspack_import_1.default.release().split('.');
468
+ return Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586 ? Number(osRelease[2]) >= 14931 ? 3 : 2 : 1;
469
+ }
470
+ if ('CI' in env) return [
471
+ 'GITHUB_ACTIONS',
472
+ 'GITEA_ACTIONS',
473
+ 'CIRCLECI'
474
+ ].some((key)=>key in env) ? 3 : [
475
+ 'TRAVIS',
476
+ 'APPVEYOR',
477
+ 'GITLAB_CI',
478
+ 'BUILDKITE',
479
+ 'DRONE'
480
+ ].some((sign)=>sign in env) || 'codeship' === env.CI_NAME ? 1 : min;
481
+ if ('TEAMCITY_VERSION' in env) return +!!/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION);
482
+ if ('truecolor' === env.COLORTERM || 'xterm-kitty' === env.TERM || 'xterm-ghostty' === env.TERM || 'wezterm' === env.TERM) return 3;
483
+ if ('TERM_PROGRAM' in env) {
484
+ let version = Number.parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
485
+ switch(env.TERM_PROGRAM){
486
+ case 'iTerm.app':
487
+ return version >= 3 ? 3 : 2;
488
+ case 'Apple_Terminal':
489
+ return 2;
490
+ }
491
+ }
492
+ return /-256(color)?$/i.test(env.TERM) ? 2 : /^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM) || 'COLORTERM' in env ? 1 : min;
493
+ }
494
+ function createSupportsColor(stream, options = {}) {
495
+ return translateLevel(_supportsColor(stream, {
496
+ streamIsTTY: stream && stream.isTTY,
497
+ ...options
498
+ }));
499
+ }
500
+ hasFlag('no-color') || hasFlag('no-colors') || hasFlag('color=false') || hasFlag('color=never') ? flagForceColor = 0 : (hasFlag('color') || hasFlag('colors') || hasFlag('color=true') || hasFlag('color=always')) && (flagForceColor = 1);
501
+ let __rspack_default_export = {
502
+ stdout: createSupportsColor({
503
+ isTTY: node_tty__rspack_import_2.default.isatty(1)
504
+ }),
505
+ stderr: createSupportsColor({
506
+ isTTY: node_tty__rspack_import_2.default.isatty(2)
507
+ })
508
+ };
509
+ }
510
+ });
@@ -1,6 +1,8 @@
1
1
  import { __webpack_require__ } from "./rslib-runtime.js";
2
+ import fs_0, * as __rspack_external_fs from "fs";
3
+ import path_0, { basename, dirname, normalize, posix, relative as external_path_relative, resolve, sep } from "path";
4
+ import { fileURLToPath } from "url";
2
5
  import { createRequire } from "module";
3
- import "./131.js";
4
6
  __webpack_require__.add({
5
7
  "../../node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/index.js" (module, __unused_rspack_exports, __webpack_require__) {
6
8
  let pico = __webpack_require__("../../node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/picomatch.js"), utils = __webpack_require__("../../node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/utils.js");
@@ -942,11 +944,10 @@ __webpack_require__.add({
942
944
  };
943
945
  }
944
946
  });
945
- let external_path_ = __webpack_require__("path"), external_fs_ = __webpack_require__("fs");
946
947
  var __require = createRequire(import.meta.url);
947
948
  function cleanPath(path) {
948
- let normalized = (0, external_path_.normalize)(path);
949
- return normalized.length > 1 && normalized[normalized.length - 1] === external_path_.sep && (normalized = normalized.substring(0, normalized.length - 1)), normalized;
949
+ let normalized = normalize(path);
950
+ return normalized.length > 1 && normalized[normalized.length - 1] === sep && (normalized = normalized.substring(0, normalized.length - 1)), normalized;
950
951
  }
951
952
  let SLASHES_REGEX = /[\\/]/g;
952
953
  function convertSlashes(path, separator) {
@@ -958,14 +959,14 @@ function isRootDirectory(path) {
958
959
  }
959
960
  function normalizePath(path, options) {
960
961
  let { resolvePaths, normalizePath: normalizePath$1, pathSeparator } = options, pathNeedsCleaning = "win32" === process.platform && path.includes("/") || path.startsWith(".");
961
- return (resolvePaths && (path = (0, external_path_.resolve)(path)), (normalizePath$1 || pathNeedsCleaning) && (path = cleanPath(path)), "." === path) ? "" : convertSlashes(path[path.length - 1] !== pathSeparator ? path + pathSeparator : path, pathSeparator);
962
+ return (resolvePaths && (path = resolve(path)), (normalizePath$1 || pathNeedsCleaning) && (path = cleanPath(path)), "." === path) ? "" : convertSlashes(path[path.length - 1] !== pathSeparator ? path + pathSeparator : path, pathSeparator);
962
963
  }
963
964
  function joinPathWithBasePath(filename, directoryPath) {
964
965
  return directoryPath + filename;
965
966
  }
966
967
  function joinPathWithRelativePath(root, options) {
967
968
  return function(filename, directoryPath) {
968
- return directoryPath.startsWith(root) ? directoryPath.slice(root.length) + filename : convertSlashes((0, external_path_.relative)(root, directoryPath), options.pathSeparator) + options.pathSeparator + filename;
969
+ return directoryPath.startsWith(root) ? directoryPath.slice(root.length) + filename : convertSlashes(external_path_relative(root, directoryPath), options.pathSeparator) + options.pathSeparator + filename;
969
970
  };
970
971
  }
971
972
  function joinPath(filename) {
@@ -1050,10 +1051,10 @@ function build$2(options, isSynchronous) {
1050
1051
  }
1051
1052
  function isRecursive(path, resolved, state) {
1052
1053
  if (state.options.useRealPaths) return isRecursiveUsingRealPaths(resolved, state);
1053
- let parent = (0, external_path_.dirname)(path), depth = 1;
1054
+ let parent = dirname(path), depth = 1;
1054
1055
  for(; parent !== state.root && depth < 2;){
1055
1056
  let resolvedPath = state.symlinks.get(parent);
1056
- resolvedPath && (resolvedPath === resolved || resolvedPath.startsWith(resolved) || resolved.startsWith(resolvedPath)) ? depth++ : parent = (0, external_path_.dirname)(parent);
1057
+ resolvedPath && (resolvedPath === resolved || resolvedPath.startsWith(resolved) || resolved.startsWith(resolvedPath)) ? depth++ : parent = dirname(parent);
1057
1058
  }
1058
1059
  return state.symlinks.set(path, resolved), depth > 1;
1059
1060
  }
@@ -1152,7 +1153,7 @@ var Queue = class {
1152
1153
  ""
1153
1154
  ].slice(0, 0),
1154
1155
  controller: new Aborter(),
1155
- fs: options.fs || external_fs_
1156
+ fs: options.fs || __rspack_external_fs
1156
1157
  }, this.joinPath = build$7(this.root, options), this.pushDirectory = build$6(this.root, options), this.pushFile = build$5(options), this.getArray = build$4(options), this.groupFiles = build$3(options), this.resolveSymlink = build$2(options, this.isSynchronous), this.walkDirectory = build(this.isSynchronous);
1157
1158
  }
1158
1159
  start() {
@@ -1176,8 +1177,7 @@ var Queue = class {
1176
1177
  this.resolveSymlink(path, this.state, (stat, resolvedPath)=>{
1177
1178
  if (stat.isDirectory()) resolvedPath = normalizePath(resolvedPath, this.state.options), exclude && exclude(entry.name, useRealPaths ? resolvedPath : path + pathSeparator) || this.walkDirectory(this.state, resolvedPath, useRealPaths ? resolvedPath : path + pathSeparator, depth - 1, this.walk);
1178
1179
  else {
1179
- resolvedPath = useRealPaths ? resolvedPath : path;
1180
- let filename = (0, external_path_.basename)(resolvedPath), directoryPath$1 = normalizePath((0, external_path_.dirname)(resolvedPath), this.state.options);
1180
+ let filename = basename(resolvedPath = useRealPaths ? resolvedPath : path), directoryPath$1 = normalizePath(dirname(resolvedPath), this.state.options);
1181
1181
  resolvedPath = this.joinPath(filename, directoryPath$1), this.pushFile(resolvedPath, files, this.state.counts, filters);
1182
1182
  }
1183
1183
  });
@@ -1223,7 +1223,7 @@ var Builder = class {
1223
1223
  options = {
1224
1224
  maxDepth: 1 / 0,
1225
1225
  suppressErrors: !0,
1226
- pathSeparator: external_path_.sep,
1226
+ pathSeparator: sep,
1227
1227
  filters: []
1228
1228
  };
1229
1229
  globFunction;
@@ -1305,7 +1305,7 @@ var Builder = class {
1305
1305
  return isMatch || (isMatch = globFn(patterns, ...options), this.globCache[patterns.join("\0")] = isMatch), this.options.filters.push((path)=>isMatch(path)), this;
1306
1306
  }
1307
1307
  };
1308
- let external_url_ = __webpack_require__("url"), picomatch = __webpack_require__("../../node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/index.js"), isReadonlyArray = Array.isArray, isWin = "win32" === process.platform, ONLY_PARENT_DIRECTORIES = /^(\/?\.\.)+$/;
1308
+ let picomatch = __webpack_require__("../../node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/index.js"), isReadonlyArray = Array.isArray, isWin = "win32" === process.platform, ONLY_PARENT_DIRECTORIES = /^(\/?\.\.)+$/;
1309
1309
  function getPartialMatcher(patterns, options = {}) {
1310
1310
  let patternsCount = patterns.length, patternsParts = Array(patternsCount), matchers = Array(patternsCount), globstarEnabled = !options.noglobstar;
1311
1311
  for(let i = 0; i < patternsCount; i++){
@@ -1346,7 +1346,7 @@ function buildFormat(cwd, root, absolute) {
1346
1346
  return isDir ? result.slice(0, -1) : result;
1347
1347
  } : (p, isDir)=>isDir && "." !== p ? p.slice(0, -1) : p;
1348
1348
  }
1349
- return absolute ? (p)=>external_path_.posix.relative(cwd, p) || "." : (p)=>external_path_.posix.relative(cwd, `${root}/${p}`) || ".";
1349
+ return absolute ? (p)=>posix.relative(cwd, p) || "." : (p)=>posix.relative(cwd, `${root}/${p}`) || ".";
1350
1350
  }
1351
1351
  function buildRelative(cwd, root) {
1352
1352
  if (root.startsWith(`${cwd}/`)) {
@@ -1354,7 +1354,7 @@ function buildRelative(cwd, root) {
1354
1354
  return (p)=>`${prefix}/${p}`;
1355
1355
  }
1356
1356
  return (p)=>{
1357
- let result = external_path_.posix.relative(cwd, `${root}/${p}`);
1357
+ let result = posix.relative(cwd, `${root}/${p}`);
1358
1358
  return p.endsWith("/") && "" !== result ? `${result}/` : result || ".";
1359
1359
  };
1360
1360
  }
@@ -1382,12 +1382,12 @@ function normalizePattern(pattern, expandDirectories, cwd, props, isIgnore) {
1382
1382
  let result = pattern;
1383
1383
  pattern.endsWith("/") && (result = pattern.slice(0, -1)), !result.endsWith("*") && expandDirectories && (result += "/**");
1384
1384
  let escapedCwd = escapePath(cwd);
1385
- result = external_path_.default.isAbsolute(result.replace(ESCAPING_BACKSLASHES, "")) ? external_path_.posix.relative(escapedCwd, result) : external_path_.posix.normalize(result);
1385
+ result = path_0.isAbsolute(result.replace(ESCAPING_BACKSLASHES, "")) ? posix.relative(escapedCwd, result) : posix.normalize(result);
1386
1386
  let parentDirectoryMatch = PARENT_DIRECTORY.exec(result), parts = splitPattern(result);
1387
1387
  if (null == parentDirectoryMatch ? void 0 : parentDirectoryMatch[0]) {
1388
1388
  let n = (parentDirectoryMatch[0].length + 1) / 3, i = 0, cwdParts = escapedCwd.split("/");
1389
1389
  for(; i < n && parts[i + n] === cwdParts[cwdParts.length + i - n];)result = result.slice(0, (n - i - 1) * 3) + result.slice((n - i) * 3 + parts[i + n].length + 1) || ".", i++;
1390
- let potentialRoot = external_path_.posix.join(cwd, parentDirectoryMatch[0].slice(3 * i));
1390
+ let potentialRoot = posix.join(cwd, parentDirectoryMatch[0].slice(3 * i));
1391
1391
  !potentialRoot.startsWith(".") && props.root.length > potentialRoot.length && (props.root = potentialRoot, props.depthOffset = -n + i);
1392
1392
  }
1393
1393
  if (!isIgnore && props.depthOffset >= 0) {
@@ -1402,7 +1402,7 @@ function normalizePattern(pattern, expandDirectories, cwd, props, isIgnore) {
1402
1402
  if (part !== props.commonPath[i] || isDynamicPattern(part) || i === parts.length - 1) break;
1403
1403
  newCommonPath.push(part);
1404
1404
  }
1405
- props.depthOffset = newCommonPath.length, props.commonPath = newCommonPath, props.root = newCommonPath.length > 0 ? external_path_.posix.join(cwd, ...newCommonPath) : cwd;
1405
+ props.depthOffset = newCommonPath.length, props.commonPath = newCommonPath, props.root = newCommonPath.length > 0 ? posix.join(cwd, ...newCommonPath) : cwd;
1406
1406
  }
1407
1407
  return result;
1408
1408
  }
@@ -1430,7 +1430,7 @@ function formatPaths(paths, relative) {
1430
1430
  return paths;
1431
1431
  }
1432
1432
  function normalizeCwd(cwd) {
1433
- return cwd ? cwd instanceof URL ? (0, external_url_.fileURLToPath)(cwd).replace(BACKSLASHES, "/") : external_path_.default.resolve(cwd).replace(BACKSLASHES, "/") : process.cwd().replace(BACKSLASHES, "/");
1433
+ return cwd ? cwd instanceof URL ? fileURLToPath(cwd).replace(BACKSLASHES, "/") : path_0.resolve(cwd).replace(BACKSLASHES, "/") : process.cwd().replace(BACKSLASHES, "/");
1434
1434
  }
1435
1435
  function getCrawler(patterns, inputOptions = {}) {
1436
1436
  let options = process.env.TINYGLOBBY_DEBUG ? {
@@ -1482,12 +1482,12 @@ function getCrawler(patterns, inputOptions = {}) {
1482
1482
  return "." !== relativePath && !partialMatcher(relativePath) || ignore(relativePath);
1483
1483
  },
1484
1484
  fs: options.fs ? {
1485
- readdir: options.fs.readdir || external_fs_.default.readdir,
1486
- readdirSync: options.fs.readdirSync || external_fs_.default.readdirSync,
1487
- realpath: options.fs.realpath || external_fs_.default.realpath,
1488
- realpathSync: options.fs.realpathSync || external_fs_.default.realpathSync,
1489
- stat: options.fs.stat || external_fs_.default.stat,
1490
- statSync: options.fs.statSync || external_fs_.default.statSync
1485
+ readdir: options.fs.readdir || fs_0.readdir,
1486
+ readdirSync: options.fs.readdirSync || fs_0.readdirSync,
1487
+ realpath: options.fs.realpath || fs_0.realpath,
1488
+ realpathSync: options.fs.realpathSync || fs_0.realpathSync,
1489
+ stat: options.fs.stat || fs_0.stat,
1490
+ statSync: options.fs.statSync || fs_0.statSync
1491
1491
  } : void 0,
1492
1492
  pathSeparator: "/",
1493
1493
  relativePaths: !0,