@rsbuild/core 2.0.0-beta.6 → 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.
- package/bin/rsbuild.js +13 -0
- package/compiled/chokidar/index.d.ts +197 -29
- package/compiled/chokidar/package.json +1 -1
- package/compiled/connect-next/index.d.ts +56 -0
- package/compiled/connect-next/license +26 -0
- package/compiled/connect-next/package.json +1 -0
- package/compiled/cors/index.d.ts +56 -0
- package/compiled/cors/license +22 -0
- package/compiled/cors/package.json +1 -0
- package/compiled/css-loader/index.js +2 -2
- package/compiled/html-rspack-plugin/index.js +14 -14
- package/compiled/jiti/dist/babel.cjs +60 -60
- package/compiled/jiti/dist/jiti.cjs +2 -2
- package/compiled/postcss/index.js +1 -1
- package/compiled/postcss/lib/at-rule.d.ts +1 -1
- package/compiled/postcss/lib/comment.d.ts +1 -1
- package/compiled/postcss/lib/container.d.ts +1 -1
- package/compiled/postcss/lib/css-syntax-error.d.ts +1 -1
- package/compiled/postcss/lib/declaration.d.ts +1 -1
- package/compiled/postcss/lib/document.d.ts +1 -1
- package/compiled/postcss/lib/input.d.ts +1 -1
- package/compiled/postcss/lib/lazy-result.d.ts +1 -1
- package/compiled/postcss/lib/no-work-result.d.ts +1 -1
- package/compiled/postcss/lib/node.d.ts +1 -1
- package/compiled/postcss/lib/previous-map.d.ts +1 -1
- package/compiled/postcss/lib/processor.d.ts +1 -1
- package/compiled/postcss/lib/result.d.ts +1 -1
- package/compiled/postcss/lib/root.d.ts +1 -1
- package/compiled/postcss/lib/rule.d.ts +1 -1
- package/compiled/postcss/lib/stringifier.d.ts +1 -1
- package/compiled/postcss/lib/warning.d.ts +1 -1
- package/compiled/postcss/package.json +1 -1
- package/compiled/postcss-loader/index.js +6 -6
- package/compiled/rslog/index.d.ts +17 -1
- package/compiled/rslog/package.json +1 -1
- package/compiled/rspack-chain/package.json +1 -1
- package/compiled/rspack-chain/types/index.d.ts +0 -2
- package/compiled/rspack-manifest-plugin/index.d.ts +48 -0
- package/compiled/rspack-manifest-plugin/license +21 -0
- package/compiled/rspack-manifest-plugin/package.json +1 -0
- package/compiled/style-loader/index.js +37 -94
- package/compiled/style-loader/package.json +1 -1
- package/dist/{131.js → 958.js} +1125 -1083
- package/dist/chokidar.js +59 -57
- package/dist/client/hmr.js +2 -2
- package/dist/client/overlay.js +1 -1
- package/dist/connect-next.js +268 -0
- package/dist/{connect.js.LICENSE.txt → connect-next.js.LICENSE.txt} +3 -13
- package/dist/cors.js +2 -2
- package/dist/http-proxy-middleware.js +57 -552
- package/dist/index.js +1 -1
- package/dist/launch-editor-middleware.js +31 -15
- package/dist/manifest-plugin.js +18 -18
- package/dist/memfs.js +217 -756
- package/dist/{710.js → mrmime.js} +2 -1
- package/dist/open.js +36 -34
- package/dist/range-parser.js +2 -2
- package/dist/remapping.js +2 -2
- package/dist/rslib-runtime.js +3 -3
- package/dist/sirv.js +14 -14
- package/dist/src.js +510 -0
- package/dist/tinyglobby.js +114 -69
- package/dist/transformLoader.mjs +38 -1
- package/dist/transformRawLoader.mjs +1 -1
- package/dist/ws.js +1541 -0
- package/dist-types/helpers/index.d.ts +1 -1
- package/dist-types/helpers/vendors.d.ts +0 -1
- package/dist-types/server/runner/asModule.d.ts +1 -1
- package/dist-types/server/socketServer.d.ts +1 -1
- package/dist-types/types/config.d.ts +4 -4
- package/dist-types/types/thirdParty.d.ts +14 -5
- package/package.json +13 -14
- package/compiled/chokidar/handler.d.ts +0 -90
- package/compiled/ws/index.d.ts +0 -437
- package/compiled/ws/index.js +0 -3166
- package/compiled/ws/license +0 -20
- package/compiled/ws/package.json +0 -1
- package/dist/397.js +0 -11
- package/dist/7.js +0 -1
- package/dist/712.js +0 -15
- package/dist/743.js +0 -7
- package/dist/88.js +0 -40
- package/dist/connect.js +0 -570
- package/dist-types/helpers/color.d.ts +0 -4
- /package/dist/{131.js.LICENSE.txt → 958.js.LICENSE.txt} +0 -0
- /package/dist/client/{59.js → 797.js} +0 -0
- /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
|
+
});
|