@rsbuild/core 1.2.16 → 1.2.18
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/compiled/css-loader/index.js +18 -20
- package/compiled/html-rspack-plugin/index.js +14 -14
- package/compiled/postcss-loader/index.js +6 -6
- package/compiled/rspack-manifest-plugin/index.js +4 -4
- package/dist/index.cjs +734 -82
- package/dist/index.cjs.LICENSE.txt +20 -0
- package/dist/index.js +718 -73
- package/dist/index.js.LICENSE.txt +20 -0
- package/dist-types/configChain.d.ts +0 -1
- package/dist-types/helpers/path.d.ts +1 -0
- package/dist-types/index.d.ts +1 -0
- package/dist-types/server/overlay.d.ts +2 -2
- package/dist-types/server/runner/basic.d.ts +0 -1
- package/dist-types/types/config.d.ts +2 -1
- package/dist-types/types/plugin.d.ts +2 -2
- package/dist-types/types/rsbuild.d.ts +18 -0
- package/package.json +4 -4
- package/compiled/webpack-merge/index.d.ts +0 -31
- package/compiled/webpack-merge/index.js +0 -1200
- package/compiled/webpack-merge/license +0 -20
- package/compiled/webpack-merge/package.json +0 -1
package/dist/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/*! For license information please see index.js.LICENSE.txt */
|
|
1
2
|
let swcHelpersPath, pluginHelper_htmlPlugin, cssExtractPlugin;
|
|
2
3
|
import * as __WEBPACK_EXTERNAL_MODULE_crypto__ from "crypto";
|
|
3
4
|
import * as __WEBPACK_EXTERNAL_MODULE_fs__ from "fs";
|
|
@@ -27,6 +28,31 @@ import * as __WEBPACK_EXTERNAL_MODULE_node_querystring_aeb3c0b4__ from "node:que
|
|
|
27
28
|
import * as __WEBPACK_EXTERNAL_MODULE_node_vm_bd3d9cea__ from "node:vm";
|
|
28
29
|
import * as __WEBPACK_EXTERNAL_MODULE_events__ from "events";
|
|
29
30
|
var EsmMode, __webpack_modules__ = {
|
|
31
|
+
"../../node_modules/.pnpm/clone-deep@4.0.1/node_modules/clone-deep/index.js": function(module, __unused_webpack_exports, __webpack_require__) {
|
|
32
|
+
let clone = __webpack_require__("../../node_modules/.pnpm/shallow-clone@3.0.1/node_modules/shallow-clone/index.js"), typeOf = __webpack_require__("../../node_modules/.pnpm/kind-of@6.0.3/node_modules/kind-of/index.js"), isPlainObject = __webpack_require__("../../node_modules/.pnpm/is-plain-object@2.0.4/node_modules/is-plain-object/index.js");
|
|
33
|
+
module.exports = function cloneDeep(val, instanceClone) {
|
|
34
|
+
switch(typeOf(val)){
|
|
35
|
+
case 'object':
|
|
36
|
+
return function(val, instanceClone) {
|
|
37
|
+
if ('function' == typeof instanceClone) return instanceClone(val);
|
|
38
|
+
if (instanceClone || isPlainObject(val)) {
|
|
39
|
+
let res = new val.constructor();
|
|
40
|
+
for(let key in val)res[key] = cloneDeep(val[key], instanceClone);
|
|
41
|
+
return res;
|
|
42
|
+
}
|
|
43
|
+
return val;
|
|
44
|
+
}(val, instanceClone);
|
|
45
|
+
case 'array':
|
|
46
|
+
return function(val, instanceClone) {
|
|
47
|
+
let res = new val.constructor(val.length);
|
|
48
|
+
for(let i = 0; i < val.length; i++)res[i] = cloneDeep(val[i], instanceClone);
|
|
49
|
+
return res;
|
|
50
|
+
}(val, instanceClone);
|
|
51
|
+
default:
|
|
52
|
+
return clone(val);
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
},
|
|
30
56
|
"../../node_modules/.pnpm/deepmerge@4.3.1/node_modules/deepmerge/dist/cjs.js": function(module) {
|
|
31
57
|
var isMergeableObject = function(value) {
|
|
32
58
|
var value1, value2, stringValue;
|
|
@@ -257,6 +283,617 @@ var EsmMode, __webpack_modules__ = {
|
|
|
257
283
|
};
|
|
258
284
|
module.exports.configDotenv = DotenvModule.configDotenv, module.exports._configVault = DotenvModule._configVault, module.exports._parseVault = DotenvModule._parseVault, module.exports.config = DotenvModule.config, module.exports.decrypt = DotenvModule.decrypt, module.exports.parse = DotenvModule.parse, module.exports.populate = DotenvModule.populate, module.exports = DotenvModule;
|
|
259
285
|
},
|
|
286
|
+
"../../node_modules/.pnpm/flat@5.0.2/node_modules/flat/index.js": function(module) {
|
|
287
|
+
function isBuffer(obj) {
|
|
288
|
+
return obj && obj.constructor && 'function' == typeof obj.constructor.isBuffer && obj.constructor.isBuffer(obj);
|
|
289
|
+
}
|
|
290
|
+
function keyIdentity(key) {
|
|
291
|
+
return key;
|
|
292
|
+
}
|
|
293
|
+
function flatten(target, opts) {
|
|
294
|
+
let delimiter = (opts = opts || {}).delimiter || '.', maxDepth = opts.maxDepth, transformKey = opts.transformKey || keyIdentity, output = {};
|
|
295
|
+
return !function step(object, prev, currentDepth) {
|
|
296
|
+
currentDepth = currentDepth || 1, Object.keys(object).forEach(function(key) {
|
|
297
|
+
let value = object[key], isarray = opts.safe && Array.isArray(value), type = Object.prototype.toString.call(value), isbuffer = isBuffer(value), newKey = prev ? prev + delimiter + transformKey(key) : transformKey(key);
|
|
298
|
+
if (!isarray && !isbuffer && ('[object Object]' === type || '[object Array]' === type) && Object.keys(value).length && (!opts.maxDepth || currentDepth < maxDepth)) return step(value, newKey, currentDepth + 1);
|
|
299
|
+
output[newKey] = value;
|
|
300
|
+
});
|
|
301
|
+
}(target), output;
|
|
302
|
+
}
|
|
303
|
+
module.exports = flatten, flatten.flatten = flatten, flatten.unflatten = function unflatten(target, opts) {
|
|
304
|
+
let delimiter = (opts = opts || {}).delimiter || '.', overwrite = opts.overwrite || !1, transformKey = opts.transformKey || keyIdentity, result = {};
|
|
305
|
+
if (isBuffer(target) || '[object Object]' !== Object.prototype.toString.call(target)) return target;
|
|
306
|
+
function getkey(key) {
|
|
307
|
+
let parsedKey = Number(key);
|
|
308
|
+
return isNaN(parsedKey) || -1 !== key.indexOf('.') || opts.object ? key : parsedKey;
|
|
309
|
+
}
|
|
310
|
+
return Object.keys(target = Object.keys(target).reduce(function(result, key) {
|
|
311
|
+
var target1;
|
|
312
|
+
let type = Object.prototype.toString.call(target[key]);
|
|
313
|
+
return '[object Object]' !== type && '[object Array]' !== type || function(val) {
|
|
314
|
+
let type = Object.prototype.toString.call(val);
|
|
315
|
+
return !val || ('[object Array]' === type ? !val.length : '[object Object]' === type ? !Object.keys(val).length : void 0);
|
|
316
|
+
}(target[key]) ? (result[key] = target[key], result) : Object.keys(target1 = flatten(target[key], opts)).reduce(function(result, key1) {
|
|
317
|
+
return result[key + delimiter + key1] = target1[key1], result;
|
|
318
|
+
}, result);
|
|
319
|
+
}, {})).forEach(function(key) {
|
|
320
|
+
let split = key.split(delimiter).map(transformKey), key1 = getkey(split.shift()), key2 = getkey(split[0]), recipient = result;
|
|
321
|
+
for(; void 0 !== key2;){
|
|
322
|
+
if ('__proto__' === key1) return;
|
|
323
|
+
let type = Object.prototype.toString.call(recipient[key1]), isobject = '[object Object]' === type || '[object Array]' === type;
|
|
324
|
+
if (!overwrite && !isobject && void 0 !== recipient[key1]) return;
|
|
325
|
+
(!overwrite || isobject) && (overwrite || null != recipient[key1]) || (recipient[key1] = 'number' != typeof key2 || opts.object ? {} : []), recipient = recipient[key1], split.length > 0 && (key1 = getkey(split.shift()), key2 = getkey(split[0]));
|
|
326
|
+
}
|
|
327
|
+
recipient[key1] = unflatten(target[key], opts);
|
|
328
|
+
}), result;
|
|
329
|
+
};
|
|
330
|
+
},
|
|
331
|
+
"../../node_modules/.pnpm/is-plain-object@2.0.4/node_modules/is-plain-object/index.js": function(module, __unused_webpack_exports, __webpack_require__) {
|
|
332
|
+
var isObject = __webpack_require__("../../node_modules/.pnpm/isobject@3.0.1/node_modules/isobject/index.js");
|
|
333
|
+
function isObjectObject(o) {
|
|
334
|
+
return !0 === isObject(o) && '[object Object]' === Object.prototype.toString.call(o);
|
|
335
|
+
}
|
|
336
|
+
module.exports = function(o) {
|
|
337
|
+
var ctor, prot;
|
|
338
|
+
return !1 !== isObjectObject(o) && 'function' == typeof (ctor = o.constructor) && !1 !== isObjectObject(prot = ctor.prototype) && !1 !== prot.hasOwnProperty('isPrototypeOf');
|
|
339
|
+
};
|
|
340
|
+
},
|
|
341
|
+
"../../node_modules/.pnpm/isobject@3.0.1/node_modules/isobject/index.js": function(module) {
|
|
342
|
+
module.exports = function(val) {
|
|
343
|
+
return null != val && 'object' == typeof val && !1 === Array.isArray(val);
|
|
344
|
+
};
|
|
345
|
+
},
|
|
346
|
+
"../../node_modules/.pnpm/kind-of@6.0.3/node_modules/kind-of/index.js": function(module) {
|
|
347
|
+
var toString = Object.prototype.toString;
|
|
348
|
+
function ctorName(val) {
|
|
349
|
+
return 'function' == typeof val.constructor ? val.constructor.name : null;
|
|
350
|
+
}
|
|
351
|
+
module.exports = function(val) {
|
|
352
|
+
if (void 0 === val) return 'undefined';
|
|
353
|
+
if (null === val) return 'null';
|
|
354
|
+
var val1, val2, val3, val4, val5, val6, val7, type = typeof val;
|
|
355
|
+
if ('boolean' === type) return 'boolean';
|
|
356
|
+
if ('string' === type) return 'string';
|
|
357
|
+
if ('number' === type) return 'number';
|
|
358
|
+
if ('symbol' === type) return 'symbol';
|
|
359
|
+
if ('function' === type) {
|
|
360
|
+
return 'GeneratorFunction' === ctorName(val) ? 'generatorfunction' : 'function';
|
|
361
|
+
}
|
|
362
|
+
if (val2 = val, Array.isArray ? Array.isArray(val2) : val2 instanceof Array) return 'array';
|
|
363
|
+
if ((val3 = val).constructor && 'function' == typeof val3.constructor.isBuffer && val3.constructor.isBuffer(val3)) return 'buffer';
|
|
364
|
+
if (function(val) {
|
|
365
|
+
try {
|
|
366
|
+
if ('number' == typeof val.length && 'function' == typeof val.callee) return !0;
|
|
367
|
+
} catch (err) {
|
|
368
|
+
if (-1 !== err.message.indexOf('callee')) return !0;
|
|
369
|
+
}
|
|
370
|
+
return !1;
|
|
371
|
+
}(val)) return 'arguments';
|
|
372
|
+
if ((val4 = val) instanceof Date || 'function' == typeof val4.toDateString && 'function' == typeof val4.getDate && 'function' == typeof val4.setDate) return 'date';
|
|
373
|
+
if ((val5 = val) instanceof Error || 'string' == typeof val5.message && val5.constructor && 'number' == typeof val5.constructor.stackTraceLimit) return 'error';
|
|
374
|
+
if ((val6 = val) instanceof RegExp || 'string' == typeof val6.flags && 'boolean' == typeof val6.ignoreCase && 'boolean' == typeof val6.multiline && 'boolean' == typeof val6.global) return 'regexp';
|
|
375
|
+
switch(ctorName(val)){
|
|
376
|
+
case 'Symbol':
|
|
377
|
+
return 'symbol';
|
|
378
|
+
case 'Promise':
|
|
379
|
+
return 'promise';
|
|
380
|
+
case 'WeakMap':
|
|
381
|
+
return 'weakmap';
|
|
382
|
+
case 'WeakSet':
|
|
383
|
+
return 'weakset';
|
|
384
|
+
case 'Map':
|
|
385
|
+
return 'map';
|
|
386
|
+
case 'Set':
|
|
387
|
+
return 'set';
|
|
388
|
+
case 'Int8Array':
|
|
389
|
+
return 'int8array';
|
|
390
|
+
case 'Uint8Array':
|
|
391
|
+
return 'uint8array';
|
|
392
|
+
case 'Uint8ClampedArray':
|
|
393
|
+
return 'uint8clampedarray';
|
|
394
|
+
case 'Int16Array':
|
|
395
|
+
return 'int16array';
|
|
396
|
+
case 'Uint16Array':
|
|
397
|
+
return 'uint16array';
|
|
398
|
+
case 'Int32Array':
|
|
399
|
+
return 'int32array';
|
|
400
|
+
case 'Uint32Array':
|
|
401
|
+
return 'uint32array';
|
|
402
|
+
case 'Float32Array':
|
|
403
|
+
return 'float32array';
|
|
404
|
+
case 'Float64Array':
|
|
405
|
+
return 'float64array';
|
|
406
|
+
}
|
|
407
|
+
if ('function' == typeof (val7 = val).throw && 'function' == typeof val7.return && 'function' == typeof val7.next) return 'generator';
|
|
408
|
+
switch(type = toString.call(val)){
|
|
409
|
+
case '[object Object]':
|
|
410
|
+
return 'object';
|
|
411
|
+
case '[object Map Iterator]':
|
|
412
|
+
return 'mapiterator';
|
|
413
|
+
case '[object Set Iterator]':
|
|
414
|
+
return 'setiterator';
|
|
415
|
+
case '[object String Iterator]':
|
|
416
|
+
return 'stringiterator';
|
|
417
|
+
case '[object Array Iterator]':
|
|
418
|
+
return 'arrayiterator';
|
|
419
|
+
}
|
|
420
|
+
return type.slice(8, -1).toLowerCase().replace(/\s/g, '');
|
|
421
|
+
};
|
|
422
|
+
},
|
|
423
|
+
"../../node_modules/.pnpm/shallow-clone@3.0.1/node_modules/shallow-clone/index.js": function(module, __unused_webpack_exports, __webpack_require__) {
|
|
424
|
+
let valueOf = Symbol.prototype.valueOf, typeOf = __webpack_require__("../../node_modules/.pnpm/kind-of@6.0.3/node_modules/kind-of/index.js");
|
|
425
|
+
module.exports = function(val, deep) {
|
|
426
|
+
var val1, val2, deep1;
|
|
427
|
+
switch(typeOf(val)){
|
|
428
|
+
case 'array':
|
|
429
|
+
return val.slice();
|
|
430
|
+
case 'object':
|
|
431
|
+
return Object.assign({}, val);
|
|
432
|
+
case 'date':
|
|
433
|
+
return new val.constructor(Number(val));
|
|
434
|
+
case 'map':
|
|
435
|
+
return new Map(val);
|
|
436
|
+
case 'set':
|
|
437
|
+
return new Set(val);
|
|
438
|
+
case 'buffer':
|
|
439
|
+
return function(val) {
|
|
440
|
+
let len = val.length, buf = Buffer.allocUnsafe ? Buffer.allocUnsafe(len) : Buffer.from(len);
|
|
441
|
+
return val.copy(buf), buf;
|
|
442
|
+
}(val);
|
|
443
|
+
case 'symbol':
|
|
444
|
+
return val1 = val, valueOf ? Object(valueOf.call(val1)) : {};
|
|
445
|
+
case 'arraybuffer':
|
|
446
|
+
return function(val) {
|
|
447
|
+
let res = new val.constructor(val.byteLength);
|
|
448
|
+
return new Uint8Array(res).set(new Uint8Array(val)), res;
|
|
449
|
+
}(val);
|
|
450
|
+
case 'float32array':
|
|
451
|
+
case 'float64array':
|
|
452
|
+
case 'int16array':
|
|
453
|
+
case 'int32array':
|
|
454
|
+
case 'int8array':
|
|
455
|
+
case 'uint16array':
|
|
456
|
+
case 'uint32array':
|
|
457
|
+
case 'uint8clampedarray':
|
|
458
|
+
case 'uint8array':
|
|
459
|
+
return new (val2 = val).constructor(val2.buffer, val2.byteOffset, val2.length);
|
|
460
|
+
case 'regexp':
|
|
461
|
+
return function(val) {
|
|
462
|
+
let flags = void 0 !== val.flags ? val.flags : /\w+$/.exec(val) || void 0, re = new val.constructor(val.source, flags);
|
|
463
|
+
return re.lastIndex = val.lastIndex, re;
|
|
464
|
+
}(val);
|
|
465
|
+
case 'error':
|
|
466
|
+
return Object.create(val);
|
|
467
|
+
default:
|
|
468
|
+
return val;
|
|
469
|
+
}
|
|
470
|
+
};
|
|
471
|
+
},
|
|
472
|
+
"../../node_modules/.pnpm/webpack-merge@6.0.1/node_modules/webpack-merge/dist/index.js": function(__unused_webpack_module, exports, __webpack_require__) {
|
|
473
|
+
var __read = this && this.__read || function(o, n) {
|
|
474
|
+
var m = "function" == typeof Symbol && o[Symbol.iterator];
|
|
475
|
+
if (!m) return o;
|
|
476
|
+
var r, e, i = m.call(o), ar = [];
|
|
477
|
+
try {
|
|
478
|
+
for(; (void 0 === n || n-- > 0) && !(r = i.next()).done;)ar.push(r.value);
|
|
479
|
+
} catch (error) {
|
|
480
|
+
e = {
|
|
481
|
+
error: error
|
|
482
|
+
};
|
|
483
|
+
} finally{
|
|
484
|
+
try {
|
|
485
|
+
r && !r.done && (m = i.return) && m.call(i);
|
|
486
|
+
} finally{
|
|
487
|
+
if (e) throw e.error;
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
return ar;
|
|
491
|
+
}, __spreadArray = this && this.__spreadArray || function(to, from, pack) {
|
|
492
|
+
if (pack || 2 == arguments.length) for(var ar, i = 0, l = from.length; i < l; i++)!ar && i in from || (ar || (ar = Array.prototype.slice.call(from, 0, i)), ar[i] = from[i]);
|
|
493
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
494
|
+
}, __importDefault = this && this.__importDefault || function(mod) {
|
|
495
|
+
return mod && mod.__esModule ? mod : {
|
|
496
|
+
default: mod
|
|
497
|
+
};
|
|
498
|
+
};
|
|
499
|
+
Object.defineProperty(exports, "__esModule", {
|
|
500
|
+
value: !0
|
|
501
|
+
}), exports.unique = exports.mergeWithRules = exports.mergeWithCustomize = exports.default = exports.merge = exports.CustomizeRule = exports.customizeObject = exports.customizeArray = void 0;
|
|
502
|
+
var wildcard_1 = __importDefault(__webpack_require__("../../node_modules/.pnpm/wildcard@2.0.1/node_modules/wildcard/index.js")), merge_with_1 = __importDefault(__webpack_require__("../../node_modules/.pnpm/webpack-merge@6.0.1/node_modules/webpack-merge/dist/merge-with.js")), join_arrays_1 = __importDefault(__webpack_require__("../../node_modules/.pnpm/webpack-merge@6.0.1/node_modules/webpack-merge/dist/join-arrays.js")), unique_1 = __importDefault(__webpack_require__("../../node_modules/.pnpm/webpack-merge@6.0.1/node_modules/webpack-merge/dist/unique.js"));
|
|
503
|
+
exports.unique = unique_1.default;
|
|
504
|
+
var types_1 = __webpack_require__("../../node_modules/.pnpm/webpack-merge@6.0.1/node_modules/webpack-merge/dist/types.js");
|
|
505
|
+
Object.defineProperty(exports, "CustomizeRule", {
|
|
506
|
+
enumerable: !0,
|
|
507
|
+
get: function() {
|
|
508
|
+
return types_1.CustomizeRule;
|
|
509
|
+
}
|
|
510
|
+
});
|
|
511
|
+
var utils_1 = __webpack_require__("../../node_modules/.pnpm/webpack-merge@6.0.1/node_modules/webpack-merge/dist/utils.js");
|
|
512
|
+
function merge(firstConfiguration) {
|
|
513
|
+
for(var configurations = [], _i = 1; _i < arguments.length; _i++)configurations[_i - 1] = arguments[_i];
|
|
514
|
+
return mergeWithCustomize({}).apply(void 0, __spreadArray([
|
|
515
|
+
firstConfiguration
|
|
516
|
+
], __read(configurations), !1));
|
|
517
|
+
}
|
|
518
|
+
function mergeWithCustomize(options) {
|
|
519
|
+
return function(firstConfiguration) {
|
|
520
|
+
for(var configurations = [], _i = 1; _i < arguments.length; _i++)configurations[_i - 1] = arguments[_i];
|
|
521
|
+
if ((0, utils_1.isUndefined)(firstConfiguration) || configurations.some(utils_1.isUndefined)) throw TypeError("Merging undefined is not supported");
|
|
522
|
+
if (firstConfiguration.then) throw TypeError("Promises are not supported");
|
|
523
|
+
if (!firstConfiguration) return {};
|
|
524
|
+
if (0 === configurations.length) {
|
|
525
|
+
if (Array.isArray(firstConfiguration)) {
|
|
526
|
+
if (0 === firstConfiguration.length) return {};
|
|
527
|
+
if (firstConfiguration.some(utils_1.isUndefined)) throw TypeError("Merging undefined is not supported");
|
|
528
|
+
if (firstConfiguration[0].then) throw TypeError("Promises are not supported");
|
|
529
|
+
return (0, merge_with_1.default)(firstConfiguration, (0, join_arrays_1.default)(options));
|
|
530
|
+
}
|
|
531
|
+
return firstConfiguration;
|
|
532
|
+
}
|
|
533
|
+
return (0, merge_with_1.default)([
|
|
534
|
+
firstConfiguration
|
|
535
|
+
].concat(configurations), (0, join_arrays_1.default)(options));
|
|
536
|
+
};
|
|
537
|
+
}
|
|
538
|
+
exports.merge = merge, exports.default = merge, exports.mergeWithCustomize = mergeWithCustomize, exports.customizeArray = function(rules) {
|
|
539
|
+
return function(a, b, key) {
|
|
540
|
+
var matchedRule = Object.keys(rules).find(function(rule) {
|
|
541
|
+
return (0, wildcard_1.default)(rule, key);
|
|
542
|
+
}) || "";
|
|
543
|
+
if (matchedRule) switch(rules[matchedRule]){
|
|
544
|
+
case types_1.CustomizeRule.Prepend:
|
|
545
|
+
return __spreadArray(__spreadArray([], __read(b), !1), __read(a), !1);
|
|
546
|
+
case types_1.CustomizeRule.Replace:
|
|
547
|
+
return b;
|
|
548
|
+
case types_1.CustomizeRule.Append:
|
|
549
|
+
default:
|
|
550
|
+
return __spreadArray(__spreadArray([], __read(a), !1), __read(b), !1);
|
|
551
|
+
}
|
|
552
|
+
};
|
|
553
|
+
}, exports.mergeWithRules = function(rules) {
|
|
554
|
+
return mergeWithCustomize({
|
|
555
|
+
customizeArray: function(a, b, key) {
|
|
556
|
+
var currentRule = rules;
|
|
557
|
+
return (key.split(".").forEach(function(k) {
|
|
558
|
+
currentRule && (currentRule = currentRule[k]);
|
|
559
|
+
}), (0, utils_1.isPlainObject)(currentRule)) ? function mergeWithRule(_a) {
|
|
560
|
+
var currentRule = _a.currentRule, a = _a.a, b = _a.b;
|
|
561
|
+
if (!isArray(a)) return a;
|
|
562
|
+
var bAllMatches = [];
|
|
563
|
+
return a.map(function(ao) {
|
|
564
|
+
if (!(0, utils_1.isPlainObject)(currentRule)) return ao;
|
|
565
|
+
var ret = {}, rulesToMatch = [], operations = {};
|
|
566
|
+
Object.entries(currentRule).forEach(function(_a) {
|
|
567
|
+
var _b = __read(_a, 2), k = _b[0], v = _b[1];
|
|
568
|
+
v === types_1.CustomizeRule.Match ? rulesToMatch.push(k) : operations[k] = v;
|
|
569
|
+
});
|
|
570
|
+
var bMatches = b.filter(function(o) {
|
|
571
|
+
var matches = rulesToMatch.every(function(rule) {
|
|
572
|
+
return (0, utils_1.isSameCondition)(ao[rule], o[rule]);
|
|
573
|
+
});
|
|
574
|
+
return matches && bAllMatches.push(o), matches;
|
|
575
|
+
});
|
|
576
|
+
return (0, utils_1.isPlainObject)(ao) ? (Object.entries(ao).forEach(function(_a) {
|
|
577
|
+
var _b = __read(_a, 2), k = _b[0], v = _b[1];
|
|
578
|
+
switch(currentRule[k]){
|
|
579
|
+
case types_1.CustomizeRule.Match:
|
|
580
|
+
ret[k] = v, Object.entries(currentRule).forEach(function(_a) {
|
|
581
|
+
var _b = __read(_a, 2), k = _b[0];
|
|
582
|
+
if (_b[1] === types_1.CustomizeRule.Replace && bMatches.length > 0) {
|
|
583
|
+
var val = last(bMatches)[k];
|
|
584
|
+
void 0 !== val && (ret[k] = val);
|
|
585
|
+
}
|
|
586
|
+
});
|
|
587
|
+
break;
|
|
588
|
+
case types_1.CustomizeRule.Append:
|
|
589
|
+
if (!bMatches.length) {
|
|
590
|
+
ret[k] = v;
|
|
591
|
+
break;
|
|
592
|
+
}
|
|
593
|
+
var appendValue = last(bMatches)[k];
|
|
594
|
+
if (!isArray(v) || !isArray(appendValue)) throw TypeError("Trying to append non-arrays");
|
|
595
|
+
ret[k] = v.concat(appendValue);
|
|
596
|
+
break;
|
|
597
|
+
case types_1.CustomizeRule.Merge:
|
|
598
|
+
if (!bMatches.length) {
|
|
599
|
+
ret[k] = v;
|
|
600
|
+
break;
|
|
601
|
+
}
|
|
602
|
+
var lastValue = last(bMatches)[k];
|
|
603
|
+
if (!(0, utils_1.isPlainObject)(v) || !(0, utils_1.isPlainObject)(lastValue)) throw TypeError("Trying to merge non-objects");
|
|
604
|
+
ret[k] = merge(v, lastValue);
|
|
605
|
+
break;
|
|
606
|
+
case types_1.CustomizeRule.Prepend:
|
|
607
|
+
if (!bMatches.length) {
|
|
608
|
+
ret[k] = v;
|
|
609
|
+
break;
|
|
610
|
+
}
|
|
611
|
+
var prependValue = last(bMatches)[k];
|
|
612
|
+
if (!isArray(v) || !isArray(prependValue)) throw TypeError("Trying to prepend non-arrays");
|
|
613
|
+
ret[k] = prependValue.concat(v);
|
|
614
|
+
break;
|
|
615
|
+
case types_1.CustomizeRule.Replace:
|
|
616
|
+
ret[k] = bMatches.length > 0 ? last(bMatches)[k] : v;
|
|
617
|
+
break;
|
|
618
|
+
default:
|
|
619
|
+
var currentRule_1 = operations[k], b_1 = bMatches.map(function(o) {
|
|
620
|
+
return o[k];
|
|
621
|
+
}).reduce(function(acc, val) {
|
|
622
|
+
return isArray(acc) && isArray(val) ? __spreadArray(__spreadArray([], __read(acc), !1), __read(val), !1) : acc;
|
|
623
|
+
}, []);
|
|
624
|
+
ret[k] = mergeWithRule({
|
|
625
|
+
currentRule: currentRule_1,
|
|
626
|
+
a: v,
|
|
627
|
+
b: b_1
|
|
628
|
+
});
|
|
629
|
+
}
|
|
630
|
+
}), ret) : ao;
|
|
631
|
+
}).concat(b.filter(function(o) {
|
|
632
|
+
return !bAllMatches.includes(o);
|
|
633
|
+
}));
|
|
634
|
+
}({
|
|
635
|
+
currentRule: currentRule,
|
|
636
|
+
a: a,
|
|
637
|
+
b: b
|
|
638
|
+
}) : "string" == typeof currentRule ? function(_a) {
|
|
639
|
+
var currentRule = _a.currentRule, a = _a.a, b = _a.b;
|
|
640
|
+
switch(currentRule){
|
|
641
|
+
case types_1.CustomizeRule.Append:
|
|
642
|
+
return a.concat(b);
|
|
643
|
+
case types_1.CustomizeRule.Prepend:
|
|
644
|
+
return b.concat(a);
|
|
645
|
+
case types_1.CustomizeRule.Replace:
|
|
646
|
+
return b;
|
|
647
|
+
}
|
|
648
|
+
return a;
|
|
649
|
+
}({
|
|
650
|
+
currentRule: currentRule,
|
|
651
|
+
a: a,
|
|
652
|
+
b: b
|
|
653
|
+
}) : void 0;
|
|
654
|
+
}
|
|
655
|
+
});
|
|
656
|
+
};
|
|
657
|
+
var isArray = Array.isArray;
|
|
658
|
+
function last(arr) {
|
|
659
|
+
return arr[arr.length - 1];
|
|
660
|
+
}
|
|
661
|
+
exports.customizeObject = function(rules) {
|
|
662
|
+
return function(a, b, key) {
|
|
663
|
+
switch(rules[key]){
|
|
664
|
+
case types_1.CustomizeRule.Prepend:
|
|
665
|
+
return (0, merge_with_1.default)([
|
|
666
|
+
b,
|
|
667
|
+
a
|
|
668
|
+
], (0, join_arrays_1.default)());
|
|
669
|
+
case types_1.CustomizeRule.Replace:
|
|
670
|
+
return b;
|
|
671
|
+
case types_1.CustomizeRule.Append:
|
|
672
|
+
return (0, merge_with_1.default)([
|
|
673
|
+
a,
|
|
674
|
+
b
|
|
675
|
+
], (0, join_arrays_1.default)());
|
|
676
|
+
}
|
|
677
|
+
};
|
|
678
|
+
};
|
|
679
|
+
},
|
|
680
|
+
"../../node_modules/.pnpm/webpack-merge@6.0.1/node_modules/webpack-merge/dist/join-arrays.js": function(__unused_webpack_module, exports, __webpack_require__) {
|
|
681
|
+
var __read = this && this.__read || function(o, n) {
|
|
682
|
+
var m = "function" == typeof Symbol && o[Symbol.iterator];
|
|
683
|
+
if (!m) return o;
|
|
684
|
+
var r, e, i = m.call(o), ar = [];
|
|
685
|
+
try {
|
|
686
|
+
for(; (void 0 === n || n-- > 0) && !(r = i.next()).done;)ar.push(r.value);
|
|
687
|
+
} catch (error) {
|
|
688
|
+
e = {
|
|
689
|
+
error: error
|
|
690
|
+
};
|
|
691
|
+
} finally{
|
|
692
|
+
try {
|
|
693
|
+
r && !r.done && (m = i.return) && m.call(i);
|
|
694
|
+
} finally{
|
|
695
|
+
if (e) throw e.error;
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
return ar;
|
|
699
|
+
}, __spreadArray = this && this.__spreadArray || function(to, from, pack) {
|
|
700
|
+
if (pack || 2 == arguments.length) for(var ar, i = 0, l = from.length; i < l; i++)!ar && i in from || (ar || (ar = Array.prototype.slice.call(from, 0, i)), ar[i] = from[i]);
|
|
701
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
702
|
+
}, __importDefault = this && this.__importDefault || function(mod) {
|
|
703
|
+
return mod && mod.__esModule ? mod : {
|
|
704
|
+
default: mod
|
|
705
|
+
};
|
|
706
|
+
};
|
|
707
|
+
Object.defineProperty(exports, "__esModule", {
|
|
708
|
+
value: !0
|
|
709
|
+
});
|
|
710
|
+
var clone_deep_1 = __importDefault(__webpack_require__("../../node_modules/.pnpm/clone-deep@4.0.1/node_modules/clone-deep/index.js")), merge_with_1 = __importDefault(__webpack_require__("../../node_modules/.pnpm/webpack-merge@6.0.1/node_modules/webpack-merge/dist/merge-with.js")), utils_1 = __webpack_require__("../../node_modules/.pnpm/webpack-merge@6.0.1/node_modules/webpack-merge/dist/utils.js"), isArray = Array.isArray;
|
|
711
|
+
exports.default = function joinArrays(_a) {
|
|
712
|
+
var _b = void 0 === _a ? {} : _a, customizeArray = _b.customizeArray, customizeObject = _b.customizeObject, key = _b.key;
|
|
713
|
+
return function _joinArrays(a, b, k) {
|
|
714
|
+
var newKey = key ? "".concat(key, ".").concat(k) : k;
|
|
715
|
+
if ((0, utils_1.isFunction)(a) && (0, utils_1.isFunction)(b)) return function() {
|
|
716
|
+
for(var args = [], _i = 0; _i < arguments.length; _i++)args[_i] = arguments[_i];
|
|
717
|
+
return _joinArrays(a.apply(void 0, __spreadArray([], __read(args), !1)), b.apply(void 0, __spreadArray([], __read(args), !1)), k);
|
|
718
|
+
};
|
|
719
|
+
if (isArray(a) && isArray(b)) {
|
|
720
|
+
var customResult = customizeArray && customizeArray(a, b, newKey);
|
|
721
|
+
return customResult || __spreadArray(__spreadArray([], __read(a), !1), __read(b), !1);
|
|
722
|
+
}
|
|
723
|
+
if ((0, utils_1.isRegex)(b)) return b;
|
|
724
|
+
if ((0, utils_1.isPlainObject)(a) && (0, utils_1.isPlainObject)(b)) {
|
|
725
|
+
var customResult = customizeObject && customizeObject(a, b, newKey);
|
|
726
|
+
return customResult || (0, merge_with_1.default)([
|
|
727
|
+
a,
|
|
728
|
+
b
|
|
729
|
+
], joinArrays({
|
|
730
|
+
customizeArray: customizeArray,
|
|
731
|
+
customizeObject: customizeObject,
|
|
732
|
+
key: newKey
|
|
733
|
+
}));
|
|
734
|
+
}
|
|
735
|
+
return (0, utils_1.isPlainObject)(b) ? (0, clone_deep_1.default)(b) : isArray(b) ? __spreadArray([], __read(b), !1) : b;
|
|
736
|
+
};
|
|
737
|
+
};
|
|
738
|
+
},
|
|
739
|
+
"../../node_modules/.pnpm/webpack-merge@6.0.1/node_modules/webpack-merge/dist/merge-with.js": function(__unused_webpack_module, exports) {
|
|
740
|
+
var __read = this && this.__read || function(o, n) {
|
|
741
|
+
var m = "function" == typeof Symbol && o[Symbol.iterator];
|
|
742
|
+
if (!m) return o;
|
|
743
|
+
var r, e, i = m.call(o), ar = [];
|
|
744
|
+
try {
|
|
745
|
+
for(; (void 0 === n || n-- > 0) && !(r = i.next()).done;)ar.push(r.value);
|
|
746
|
+
} catch (error) {
|
|
747
|
+
e = {
|
|
748
|
+
error: error
|
|
749
|
+
};
|
|
750
|
+
} finally{
|
|
751
|
+
try {
|
|
752
|
+
r && !r.done && (m = i.return) && m.call(i);
|
|
753
|
+
} finally{
|
|
754
|
+
if (e) throw e.error;
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
return ar;
|
|
758
|
+
};
|
|
759
|
+
Object.defineProperty(exports, "__esModule", {
|
|
760
|
+
value: !0
|
|
761
|
+
}), exports.default = function(objects, customizer) {
|
|
762
|
+
var _a = __read(objects), first = _a[0], rest = _a.slice(1), ret = first;
|
|
763
|
+
return rest.forEach(function(a) {
|
|
764
|
+
var a1, b, customizer1, ret1;
|
|
765
|
+
a1 = ret, b = a, customizer1 = customizer, ret1 = {}, Object.keys(a1).concat(Object.keys(b)).forEach(function(k) {
|
|
766
|
+
var v = customizer1(a1[k], b[k], k);
|
|
767
|
+
ret1[k] = void 0 === v ? a1[k] : v;
|
|
768
|
+
}), ret = ret1;
|
|
769
|
+
}), ret;
|
|
770
|
+
};
|
|
771
|
+
},
|
|
772
|
+
"../../node_modules/.pnpm/webpack-merge@6.0.1/node_modules/webpack-merge/dist/types.js": function(__unused_webpack_module, exports) {
|
|
773
|
+
var CustomizeRule, CustomizeRule1;
|
|
774
|
+
Object.defineProperty(exports, "__esModule", {
|
|
775
|
+
value: !0
|
|
776
|
+
}), exports.CustomizeRule = void 0, (CustomizeRule1 = CustomizeRule || (exports.CustomizeRule = CustomizeRule = {})).Match = "match", CustomizeRule1.Merge = "merge", CustomizeRule1.Append = "append", CustomizeRule1.Prepend = "prepend", CustomizeRule1.Replace = "replace";
|
|
777
|
+
},
|
|
778
|
+
"../../node_modules/.pnpm/webpack-merge@6.0.1/node_modules/webpack-merge/dist/unique.js": function(__unused_webpack_module, exports) {
|
|
779
|
+
var __read = this && this.__read || function(o, n) {
|
|
780
|
+
var m = "function" == typeof Symbol && o[Symbol.iterator];
|
|
781
|
+
if (!m) return o;
|
|
782
|
+
var r, e, i = m.call(o), ar = [];
|
|
783
|
+
try {
|
|
784
|
+
for(; (void 0 === n || n-- > 0) && !(r = i.next()).done;)ar.push(r.value);
|
|
785
|
+
} catch (error) {
|
|
786
|
+
e = {
|
|
787
|
+
error: error
|
|
788
|
+
};
|
|
789
|
+
} finally{
|
|
790
|
+
try {
|
|
791
|
+
r && !r.done && (m = i.return) && m.call(i);
|
|
792
|
+
} finally{
|
|
793
|
+
if (e) throw e.error;
|
|
794
|
+
}
|
|
795
|
+
}
|
|
796
|
+
return ar;
|
|
797
|
+
}, __spreadArray = this && this.__spreadArray || function(to, from, pack) {
|
|
798
|
+
if (pack || 2 == arguments.length) for(var ar, i = 0, l = from.length; i < l; i++)!ar && i in from || (ar || (ar = Array.prototype.slice.call(from, 0, i)), ar[i] = from[i]);
|
|
799
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
800
|
+
};
|
|
801
|
+
Object.defineProperty(exports, "__esModule", {
|
|
802
|
+
value: !0
|
|
803
|
+
}), exports.default = function(key, uniques, getter) {
|
|
804
|
+
var uniquesSet = new Set(uniques);
|
|
805
|
+
return function(a, b, k) {
|
|
806
|
+
return k === key && Array.from(__spreadArray(__spreadArray([], __read(a), !1), __read(b), !1).map(function(it) {
|
|
807
|
+
return {
|
|
808
|
+
key: getter(it),
|
|
809
|
+
value: it
|
|
810
|
+
};
|
|
811
|
+
}).map(function(_a) {
|
|
812
|
+
var key = _a.key, value = _a.value;
|
|
813
|
+
return {
|
|
814
|
+
key: uniquesSet.has(key) ? key : value,
|
|
815
|
+
value: value
|
|
816
|
+
};
|
|
817
|
+
}).reduce(function(m, _a) {
|
|
818
|
+
var key = _a.key, value = _a.value;
|
|
819
|
+
return m.delete(key), m.set(key, value);
|
|
820
|
+
}, new Map()).values());
|
|
821
|
+
};
|
|
822
|
+
};
|
|
823
|
+
},
|
|
824
|
+
"../../node_modules/.pnpm/webpack-merge@6.0.1/node_modules/webpack-merge/dist/utils.js": function(__unused_webpack_module, exports, __webpack_require__) {
|
|
825
|
+
var __read = this && this.__read || function(o, n) {
|
|
826
|
+
var m = "function" == typeof Symbol && o[Symbol.iterator];
|
|
827
|
+
if (!m) return o;
|
|
828
|
+
var r, e, i = m.call(o), ar = [];
|
|
829
|
+
try {
|
|
830
|
+
for(; (void 0 === n || n-- > 0) && !(r = i.next()).done;)ar.push(r.value);
|
|
831
|
+
} catch (error) {
|
|
832
|
+
e = {
|
|
833
|
+
error: error
|
|
834
|
+
};
|
|
835
|
+
} finally{
|
|
836
|
+
try {
|
|
837
|
+
r && !r.done && (m = i.return) && m.call(i);
|
|
838
|
+
} finally{
|
|
839
|
+
if (e) throw e.error;
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
return ar;
|
|
843
|
+
};
|
|
844
|
+
Object.defineProperty(exports, "__esModule", {
|
|
845
|
+
value: !0
|
|
846
|
+
}), exports.isSameCondition = exports.isUndefined = exports.isPlainObject = exports.isFunction = exports.isRegex = void 0;
|
|
847
|
+
var flat_1 = __webpack_require__("../../node_modules/.pnpm/flat@5.0.2/node_modules/flat/index.js");
|
|
848
|
+
function isRegex(o) {
|
|
849
|
+
return o instanceof RegExp;
|
|
850
|
+
}
|
|
851
|
+
function isFunction(functionToCheck) {
|
|
852
|
+
return functionToCheck && "[object Function]" === ({}).toString.call(functionToCheck);
|
|
853
|
+
}
|
|
854
|
+
exports.isRegex = isRegex, exports.isFunction = isFunction, exports.isPlainObject = function(a) {
|
|
855
|
+
return !(null === a || Array.isArray(a)) && "object" == typeof a;
|
|
856
|
+
}, exports.isUndefined = function(a) {
|
|
857
|
+
return void 0 === a;
|
|
858
|
+
}, exports.isSameCondition = function(a, b) {
|
|
859
|
+
if (!a || !b) return a === b;
|
|
860
|
+
if ("string" == typeof a || "string" == typeof b || isRegex(a) || isRegex(b) || isFunction(a) || isFunction(b)) return a.toString() === b.toString();
|
|
861
|
+
var _a, _b, entriesA = Object.entries((0, flat_1.flatten)(a)), entriesB = Object.entries((0, flat_1.flatten)(b));
|
|
862
|
+
if (entriesA.length !== entriesB.length) return !1;
|
|
863
|
+
for(var i = 0; i < entriesA.length; i++)entriesA[i][0] = entriesA[i][0].replace(/\b\d+\b/g, "[]"), entriesB[i][0] = entriesB[i][0].replace(/\b\d+\b/g, "[]");
|
|
864
|
+
function cmp(_a, _b) {
|
|
865
|
+
var _c = __read(_a, 2), k1 = _c[0], v1 = _c[1], _d = __read(_b, 2), k2 = _d[0], v2 = _d[1];
|
|
866
|
+
return k1 < k2 ? -1 : k1 > k2 ? 1 : v1 < v2 ? -1 : +(v1 > v2);
|
|
867
|
+
}
|
|
868
|
+
if (entriesA.sort(cmp), entriesB.sort(cmp), entriesA.length !== entriesB.length) return !1;
|
|
869
|
+
for(var i = 0; i < entriesA.length; i++)if (entriesA[i][0] !== entriesB[i][0] || (null === (_a = entriesA[i][1]) || void 0 === _a ? void 0 : _a.toString()) !== (null === (_b = entriesB[i][1]) || void 0 === _b ? void 0 : _b.toString())) return !1;
|
|
870
|
+
return !0;
|
|
871
|
+
};
|
|
872
|
+
},
|
|
873
|
+
"../../node_modules/.pnpm/wildcard@2.0.1/node_modules/wildcard/index.js": function(module) {
|
|
874
|
+
var REGEXP_PARTS = /(\*|\?)/g;
|
|
875
|
+
function WildcardMatcher(text, separator) {
|
|
876
|
+
this.text = text = text || '', this.hasWild = text.indexOf('*') >= 0, this.separator = separator, this.parts = text.split(separator).map(this.classifyPart.bind(this));
|
|
877
|
+
}
|
|
878
|
+
WildcardMatcher.prototype.match = function(input) {
|
|
879
|
+
var ii, testParts, matches = !0, parts = this.parts, partsCount = parts.length;
|
|
880
|
+
if ('string' == typeof input || input instanceof String) {
|
|
881
|
+
if (this.hasWild || this.text == input) {
|
|
882
|
+
for(ii = 0, testParts = (input || '').split(this.separator); matches && ii < partsCount; ii++)'*' !== parts[ii] && (matches = ii < testParts.length && (parts[ii] instanceof RegExp ? parts[ii].test(testParts[ii]) : parts[ii] === testParts[ii]));
|
|
883
|
+
matches = matches && testParts;
|
|
884
|
+
} else matches = !1;
|
|
885
|
+
} else if ('function' == typeof input.splice) for(matches = [], ii = input.length; ii--;)this.match(input[ii]) && (matches[matches.length] = input[ii]);
|
|
886
|
+
else if ('object' == typeof input) for(var key in matches = {}, input)this.match(key) && (matches[key] = input[key]);
|
|
887
|
+
return matches;
|
|
888
|
+
}, WildcardMatcher.prototype.classifyPart = function(part) {
|
|
889
|
+
if ('*' === part) ;
|
|
890
|
+
else if (part.indexOf('*') >= 0 || part.indexOf('?') >= 0) return new RegExp(part.replace(REGEXP_PARTS, '\.$1'));
|
|
891
|
+
return part;
|
|
892
|
+
}, module.exports = function(text, test, separator) {
|
|
893
|
+
var matcher = new WildcardMatcher(text, separator || /[\/\.]/);
|
|
894
|
+
return void 0 !== test ? matcher.match(test) : matcher;
|
|
895
|
+
};
|
|
896
|
+
},
|
|
260
897
|
crypto: function(module) {
|
|
261
898
|
module.exports = __WEBPACK_EXTERNAL_MODULE_crypto__;
|
|
262
899
|
},
|
|
@@ -279,25 +916,19 @@ function __webpack_require__(moduleId) {
|
|
|
279
916
|
var module = __webpack_module_cache__[moduleId] = {
|
|
280
917
|
exports: {}
|
|
281
918
|
};
|
|
282
|
-
return __webpack_modules__[moduleId](module, module.exports, __webpack_require__), module.exports;
|
|
919
|
+
return __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__), module.exports;
|
|
283
920
|
}
|
|
284
|
-
__webpack_require__.n =
|
|
285
|
-
var getter = module && module.__esModule ?
|
|
286
|
-
return module.default;
|
|
287
|
-
} : function() {
|
|
288
|
-
return module;
|
|
289
|
-
};
|
|
921
|
+
__webpack_require__.n = (module)=>{
|
|
922
|
+
var getter = module && module.__esModule ? ()=>module.default : ()=>module;
|
|
290
923
|
return __webpack_require__.d(getter, {
|
|
291
924
|
a: getter
|
|
292
925
|
}), getter;
|
|
293
|
-
}, __webpack_require__.d =
|
|
926
|
+
}, __webpack_require__.d = (exports, definition)=>{
|
|
294
927
|
for(var key in definition)__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key) && Object.defineProperty(exports, key, {
|
|
295
928
|
enumerable: !0,
|
|
296
929
|
get: definition[key]
|
|
297
930
|
});
|
|
298
|
-
}, __webpack_require__.o =
|
|
299
|
-
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
300
|
-
}, __webpack_require__.r = function(exports) {
|
|
931
|
+
}, __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop), __webpack_require__.r = function(exports) {
|
|
301
932
|
'undefined' != typeof Symbol && Symbol.toStringTag && Object.defineProperty(exports, Symbol.toStringTag, {
|
|
302
933
|
value: 'Module'
|
|
303
934
|
}), Object.defineProperty(exports, '__esModule', {
|
|
@@ -572,7 +1203,7 @@ let getAllStatsErrors = (statsData)=>{
|
|
|
572
1203
|
return statsData.warningsCount && (null === (_statsData_warnings = statsData.warnings) || void 0 === _statsData_warnings ? void 0 : _statsData_warnings.length) === 0 ? null === (_statsData_children = statsData.children) || void 0 === _statsData_children ? void 0 : _statsData_children.reduce((warnings, curr)=>warnings.concat(curr.warnings || []), []) : statsData.warnings;
|
|
573
1204
|
};
|
|
574
1205
|
function getStatsOptions(compiler) {
|
|
575
|
-
if (
|
|
1206
|
+
if (helpers_isMultiCompiler(compiler)) return {
|
|
576
1207
|
children: compiler.compilers.map((compiler)=>compiler.options ? compiler.options.stats : void 0)
|
|
577
1208
|
};
|
|
578
1209
|
let { stats } = compiler.options;
|
|
@@ -671,8 +1302,8 @@ function getFilename(config, type, isProd, isServer) {
|
|
|
671
1302
|
}
|
|
672
1303
|
}
|
|
673
1304
|
let applyToCompiler = (compiler, apply)=>{
|
|
674
|
-
|
|
675
|
-
}, upperFirst = (str)=>str ? str.charAt(0).toUpperCase() + str.slice(1) : '', isURL = (str)=>str.startsWith('http') || str.startsWith('//:'), createVirtualModule = (content)=>`data:text/javascript,${content}`,
|
|
1305
|
+
helpers_isMultiCompiler(compiler) ? compiler.compilers.forEach(apply) : apply(compiler, 0);
|
|
1306
|
+
}, upperFirst = (str)=>str ? str.charAt(0).toUpperCase() + str.slice(1) : '', isURL = (str)=>str.startsWith('http') || str.startsWith('//:'), createVirtualModule = (content)=>`data:text/javascript,${content}`, helpers_isMultiCompiler = (compiler)=>'compilers' in compiler && Array.isArray(compiler.compilers);
|
|
676
1307
|
function pick(obj, keys) {
|
|
677
1308
|
return keys.reduce((ret, key)=>(void 0 !== obj[key] && (ret[key] = obj[key]), ret), {});
|
|
678
1309
|
}
|
|
@@ -778,7 +1409,7 @@ function parsePackageOrReadConfig(file) {
|
|
|
778
1409
|
}
|
|
779
1410
|
function pickEnv(config, opts) {
|
|
780
1411
|
let name;
|
|
781
|
-
return 'object' != typeof config ? config :
|
|
1412
|
+
return 'object' != typeof config ? config : config['string' == typeof opts.env ? opts.env : process.env.BROWSERSLIST_ENV ? process.env.BROWSERSLIST_ENV : process.env.NODE_ENV ? process.env.NODE_ENV : 'production'] || config.defaults;
|
|
782
1413
|
}
|
|
783
1414
|
function eachParent(file, callback) {
|
|
784
1415
|
let dir = isFile(file) ? __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__.default.dirname(file) : file, loc = __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__.default.resolve(dir);
|
|
@@ -803,7 +1434,7 @@ let configCache = {}, OVERRIDE_PATHS = [
|
|
|
803
1434
|
return OVERRIDE_PATHS.includes(realKey);
|
|
804
1435
|
}
|
|
805
1436
|
return OVERRIDE_PATHS.includes(key);
|
|
806
|
-
},
|
|
1437
|
+
}, merge = (x, y, path = '')=>{
|
|
807
1438
|
if (isOverridePath(path)) return y ?? x;
|
|
808
1439
|
if (void 0 === x) return isPlainObject(y) ? cloneDeep(y) : y;
|
|
809
1440
|
if (void 0 === y) return isPlainObject(x) ? cloneDeep(x) : x;
|
|
@@ -824,10 +1455,10 @@ let configCache = {}, OVERRIDE_PATHS = [
|
|
|
824
1455
|
...Object.keys(y)
|
|
825
1456
|
])){
|
|
826
1457
|
let childPath = path ? `${path}.${key}` : key;
|
|
827
|
-
merged[key] =
|
|
1458
|
+
merged[key] = merge(x[key], y[key], childPath);
|
|
828
1459
|
}
|
|
829
1460
|
return merged;
|
|
830
|
-
}, mergeRsbuildConfig = (...configs)=>2 === configs.length ?
|
|
1461
|
+
}, mergeRsbuildConfig = (...configs)=>2 === configs.length ? merge(configs[0], configs[1]) : configs.length < 2 ? configs[0] : configs.reduce((result, config)=>merge(result, config), {}), commonOpts = {}, getEnvDir = (cwd, envDir)=>envDir ? __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__.default.isAbsolute(envDir) ? envDir : __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__.default.join(cwd, envDir) : cwd;
|
|
831
1462
|
async function init({ cliOptions, isRestart, isBuildWatch = !1 }) {
|
|
832
1463
|
cliOptions && (commonOpts = cliOptions);
|
|
833
1464
|
try {
|
|
@@ -1148,7 +1779,7 @@ async function watchFilesForRestart(files, root, isBuildWatch, watchOptions) {
|
|
|
1148
1779
|
ignorePermissionErrors: !0,
|
|
1149
1780
|
...watchOptions
|
|
1150
1781
|
}), callback = (func = async (filePath)=>{
|
|
1151
|
-
watcher.close(), isBuildWatch ? await restartBuild({
|
|
1782
|
+
await watcher.close(), isBuildWatch ? await restartBuild({
|
|
1152
1783
|
filePath
|
|
1153
1784
|
}) : await restartDevServer({
|
|
1154
1785
|
filePath
|
|
@@ -1414,7 +2045,7 @@ function createAsyncHook() {
|
|
|
1414
2045
|
}
|
|
1415
2046
|
let onBeforeCompile = ({ compiler, beforeCompile, beforeEnvironmentCompiler, isWatch })=>{
|
|
1416
2047
|
let name = 'rsbuild:beforeCompile';
|
|
1417
|
-
if (
|
|
2048
|
+
if (helpers_isMultiCompiler(compiler)) {
|
|
1418
2049
|
let waitBeforeCompileDone;
|
|
1419
2050
|
let { compilers } = compiler, doneCompilers = 0;
|
|
1420
2051
|
for(let index = 0; index < compilers.length; index++){
|
|
@@ -1429,7 +2060,7 @@ let onBeforeCompile = ({ compiler, beforeCompile, beforeEnvironmentCompiler, isW
|
|
|
1429
2060
|
await (null == beforeCompile ? void 0 : beforeCompile()), await beforeEnvironmentCompiler(0);
|
|
1430
2061
|
});
|
|
1431
2062
|
}, onCompileDone = ({ compiler, onDone, onEnvironmentDone, MultiStatsCtor })=>{
|
|
1432
|
-
if (
|
|
2063
|
+
if (helpers_isMultiCompiler(compiler)) {
|
|
1433
2064
|
let { compilers } = compiler, compilerStats = [], doneCompilers = 0;
|
|
1434
2065
|
for(let index = 0; index < compilers.length; index++){
|
|
1435
2066
|
let compiler = compilers[index], compilerIndex = index, compilerDone = !1;
|
|
@@ -1653,7 +2284,7 @@ async function updateEnvironmentContext(context, configs) {
|
|
|
1653
2284
|
async function createContext(options, userConfig, bundlerType) {
|
|
1654
2285
|
let { cwd } = options, rootPath = userConfig.root ? getAbsolutePath(cwd, userConfig.root) : cwd, rsbuildConfig = await withDefaultConfig(rootPath, userConfig), cachePath = (0, __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__.join)(rootPath, 'node_modules', '.cache'), specifiedEnvironments = options.environment && options.environment.length > 0 ? options.environment : void 0;
|
|
1655
2286
|
return {
|
|
1656
|
-
version: "1.2.
|
|
2287
|
+
version: "1.2.18",
|
|
1657
2288
|
rootPath,
|
|
1658
2289
|
distPath: '',
|
|
1659
2290
|
cachePath,
|
|
@@ -4159,29 +4790,32 @@ async function inspectConfig({ context, pluginManager, rsbuildOptions, bundlerCo
|
|
|
4159
4790
|
}
|
|
4160
4791
|
};
|
|
4161
4792
|
}
|
|
4162
|
-
|
|
4793
|
+
var dist = __webpack_require__("../../node_modules/.pnpm/webpack-merge@6.0.1/node_modules/webpack-merge/dist/index.js");
|
|
4794
|
+
async function modifyRspackConfig(context, rspackConfig, chainUtils) {
|
|
4163
4795
|
var _utils_environment_config_tools;
|
|
4164
4796
|
__WEBPACK_EXTERNAL_MODULE__compiled_rslog_index_js_c302f6e3__.logger.debug('modify Rspack config');
|
|
4165
|
-
let
|
|
4797
|
+
let currentConfig = rspackConfig, proxiedConfig = new Proxy({}, {
|
|
4798
|
+
get: (_, prop)=>currentConfig[prop],
|
|
4799
|
+
set: (_, prop, value)=>(currentConfig[prop] = value, !0)
|
|
4800
|
+
}), utils = await getConfigUtils(proxiedConfig, chainUtils);
|
|
4801
|
+
return [currentConfig] = await context.hooks.modifyRspackConfig.callChain({
|
|
4166
4802
|
environment: utils.environment.name,
|
|
4167
4803
|
args: [
|
|
4168
4804
|
rspackConfig,
|
|
4169
4805
|
utils
|
|
4170
4806
|
]
|
|
4171
|
-
})
|
|
4172
|
-
|
|
4173
|
-
initial: modifiedConfig,
|
|
4807
|
+
}), (null === (_utils_environment_config_tools = utils.environment.config.tools) || void 0 === _utils_environment_config_tools ? void 0 : _utils_environment_config_tools.rspack) && (currentConfig = await reduceConfigsAsyncWithContext({
|
|
4808
|
+
initial: currentConfig,
|
|
4174
4809
|
config: utils.environment.config.tools.rspack,
|
|
4175
4810
|
ctx: utils,
|
|
4176
|
-
mergeFn: utils.mergeConfig
|
|
4177
|
-
})), __WEBPACK_EXTERNAL_MODULE__compiled_rslog_index_js_c302f6e3__.logger.debug('modify Rspack config done'),
|
|
4811
|
+
mergeFn: (...args)=>currentConfig = utils.mergeConfig.call(utils, args)
|
|
4812
|
+
})), __WEBPACK_EXTERNAL_MODULE__compiled_rslog_index_js_c302f6e3__.logger.debug('modify Rspack config done'), currentConfig;
|
|
4178
4813
|
}
|
|
4179
4814
|
async function getConfigUtils(config, chainUtils) {
|
|
4180
|
-
let { merge } = await import("../compiled/webpack-merge/index.js");
|
|
4181
4815
|
return {
|
|
4182
4816
|
...chainUtils,
|
|
4183
4817
|
rspack: __WEBPACK_EXTERNAL_MODULE__rspack_core_e0096ff7__.rspack,
|
|
4184
|
-
mergeConfig: merge,
|
|
4818
|
+
mergeConfig: dist.merge,
|
|
4185
4819
|
addRules (rules) {
|
|
4186
4820
|
let ruleArr = castArray(rules);
|
|
4187
4821
|
config.module || (config.module = {}), config.module.rules || (config.module.rules = []), config.module.rules.unshift(...ruleArr);
|
|
@@ -4236,7 +4870,7 @@ async function generateRspackConfig({ target, context, environment }) {
|
|
|
4236
4870
|
}
|
|
4237
4871
|
}
|
|
4238
4872
|
config.devServer && __WEBPACK_EXTERNAL_MODULE__compiled_rslog_index_js_c302f6e3__.logger.warn(`[rsbuild:config] Find invalid Rspack config: "${__WEBPACK_EXTERNAL_MODULE__compiled_picocolors_index_js_ea7a20e9__.default.yellow('devServer')}". Note that Rspack's "devServer" config is not supported by Rsbuild. You can use Rsbuild's "dev" config to configure the Rsbuild dev server.`);
|
|
4239
|
-
}(rspackConfig = await modifyRspackConfig(context, rspackConfig,
|
|
4873
|
+
}(rspackConfig = await modifyRspackConfig(context, rspackConfig, chainUtils)), rspackConfig;
|
|
4240
4874
|
}
|
|
4241
4875
|
async function modifyRsbuildConfig(context) {
|
|
4242
4876
|
__WEBPACK_EXTERNAL_MODULE__compiled_rslog_index_js_c302f6e3__.logger.debug('modify Rsbuild config');
|
|
@@ -4616,47 +5250,50 @@ class SocketServer {
|
|
|
4616
5250
|
let curStats = this.stats[name];
|
|
4617
5251
|
if (!curStats) return null;
|
|
4618
5252
|
let statsOptions = getStatsOptions(curStats.compilation.compiler);
|
|
4619
|
-
return
|
|
4620
|
-
|
|
4621
|
-
|
|
4622
|
-
|
|
4623
|
-
|
|
4624
|
-
|
|
4625
|
-
|
|
4626
|
-
|
|
4627
|
-
|
|
4628
|
-
|
|
4629
|
-
|
|
4630
|
-
|
|
4631
|
-
|
|
4632
|
-
|
|
5253
|
+
return {
|
|
5254
|
+
statsJson: curStats.toJson({
|
|
5255
|
+
all: !1,
|
|
5256
|
+
hash: !0,
|
|
5257
|
+
assets: !0,
|
|
5258
|
+
warnings: !0,
|
|
5259
|
+
warningsCount: !0,
|
|
5260
|
+
errors: !0,
|
|
5261
|
+
errorsCount: !0,
|
|
5262
|
+
errorDetails: !1,
|
|
5263
|
+
entrypoints: !0,
|
|
5264
|
+
children: !0,
|
|
5265
|
+
moduleTrace: !0,
|
|
5266
|
+
...statsOptions
|
|
5267
|
+
}),
|
|
5268
|
+
root: curStats.compilation.compiler.options.context
|
|
5269
|
+
};
|
|
4633
5270
|
}
|
|
4634
5271
|
sendStats({ force = !1, compilationId }) {
|
|
4635
|
-
let
|
|
4636
|
-
if (!
|
|
4637
|
-
let newInitialChunks = new Set();
|
|
4638
|
-
if (
|
|
5272
|
+
let result = this.getStats(compilationId);
|
|
5273
|
+
if (!result) return null;
|
|
5274
|
+
let { statsJson, root } = result, newInitialChunks = new Set();
|
|
5275
|
+
if (statsJson.entrypoints) for (let entrypoint of Object.values(statsJson.entrypoints)){
|
|
4639
5276
|
let chunks = entrypoint.chunks;
|
|
4640
5277
|
if (Array.isArray(chunks)) for (let chunkName of chunks)chunkName && newInitialChunks.add(String(chunkName));
|
|
4641
5278
|
}
|
|
4642
|
-
let initialChunks = this.initialChunks[compilationId], shouldReload = !!
|
|
5279
|
+
let initialChunks = this.initialChunks[compilationId], shouldReload = !!statsJson.entrypoints && !!initialChunks && !(initialChunks.size === newInitialChunks.size && [
|
|
4643
5280
|
...initialChunks
|
|
4644
5281
|
].every((value)=>newInitialChunks.has(value)));
|
|
4645
5282
|
if (this.initialChunks[compilationId] = newInitialChunks, shouldReload) return this.sockWrite({
|
|
4646
5283
|
type: 'static-changed',
|
|
4647
5284
|
compilationId
|
|
4648
5285
|
});
|
|
4649
|
-
if (!force &&
|
|
5286
|
+
if (!force && statsJson && !statsJson.errorsCount && statsJson.assets && statsJson.assets.every((asset)=>!asset.emitted)) return this.sockWrite({
|
|
4650
5287
|
type: 'still-ok',
|
|
4651
5288
|
compilationId
|
|
4652
5289
|
});
|
|
4653
5290
|
if (this.sockWrite({
|
|
4654
5291
|
type: 'hash',
|
|
4655
5292
|
compilationId,
|
|
4656
|
-
data:
|
|
4657
|
-
}),
|
|
5293
|
+
data: statsJson.hash
|
|
5294
|
+
}), statsJson.errorsCount) {
|
|
4658
5295
|
let { errors: formattedErrors } = formatStatsMessages({
|
|
4659
|
-
errors: getAllStatsErrors(
|
|
5296
|
+
errors: getAllStatsErrors(statsJson),
|
|
4660
5297
|
warnings: []
|
|
4661
5298
|
});
|
|
4662
5299
|
return this.sockWrite({
|
|
@@ -4664,10 +5301,13 @@ class SocketServer {
|
|
|
4664
5301
|
compilationId,
|
|
4665
5302
|
data: {
|
|
4666
5303
|
text: formattedErrors,
|
|
4667
|
-
html: function(errors) {
|
|
4668
|
-
let htmlItems = errors.map((item)=>server_ansiHTML(item ? item.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/'/g, ''') : '').replace(/(
|
|
4669
|
-
let hasClosingSpan = file.includes('</span>') && !file.includes('<span'), filePath = hasClosingSpan ? file.replace('</span>', '') : file
|
|
4670
|
-
|
|
5304
|
+
html: function(errors, root) {
|
|
5305
|
+
let htmlItems = errors.map((item)=>server_ansiHTML(item ? item.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/'/g, ''') : '').replace(/(?:\.\.?[\/\\]|[a-zA-Z]:\\|\/)[^:]*:\d+:\d+/g, (file)=>{
|
|
5306
|
+
let hasClosingSpan = file.includes('</span>') && !file.includes('<span'), filePath = hasClosingSpan ? file.replace('</span>', '') : file, isAbsolute = __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__.default.isAbsolute(filePath), absolutePath = root && !isAbsolute ? __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__.default.join(root, filePath) : filePath, relativePath = root && isAbsolute ? function(base, filepath) {
|
|
5307
|
+
let relativePath = (0, __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__.relative)(base, filepath);
|
|
5308
|
+
return '' === relativePath ? `.${__WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__.sep}` : relativePath.startsWith('.') ? relativePath : `.${__WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__.sep}${relativePath}`;
|
|
5309
|
+
}(root, filePath) : filePath;
|
|
5310
|
+
return `<a class="file-link" data-file="${absolutePath}">${relativePath}</a>${hasClosingSpan ? '</span>' : ''}`;
|
|
4671
5311
|
}));
|
|
4672
5312
|
return `
|
|
4673
5313
|
<style>
|
|
@@ -4789,13 +5429,13 @@ class SocketServer {
|
|
|
4789
5429
|
</div>
|
|
4790
5430
|
</div>
|
|
4791
5431
|
`;
|
|
4792
|
-
}(formattedErrors)
|
|
5432
|
+
}(formattedErrors, root)
|
|
4793
5433
|
}
|
|
4794
5434
|
});
|
|
4795
5435
|
}
|
|
4796
|
-
if (
|
|
5436
|
+
if (statsJson.warningsCount) {
|
|
4797
5437
|
let { warnings: formattedWarnings } = formatStatsMessages({
|
|
4798
|
-
warnings: getAllStatsWarnings(
|
|
5438
|
+
warnings: getAllStatsWarnings(statsJson),
|
|
4799
5439
|
errors: []
|
|
4800
5440
|
});
|
|
4801
5441
|
return this.sockWrite({
|
|
@@ -5044,7 +5684,12 @@ class CommonJsRunner extends BasicRunner {
|
|
|
5044
5684
|
let currentModuleScope = this.createModuleScope(this.getRequire(), m, file), args = Object.keys(currentModuleScope), argValues = args.map((arg)=>currentModuleScope[arg]), code = `(function(${args.join(', ')}) {
|
|
5045
5685
|
${file.content}
|
|
5046
5686
|
})`;
|
|
5047
|
-
|
|
5687
|
+
this.preExecute(code, file);
|
|
5688
|
+
let dynamicImport = Function('specifier', 'return import(specifier)');
|
|
5689
|
+
return __WEBPACK_EXTERNAL_MODULE_node_vm_bd3d9cea__.default.runInThisContext(code, {
|
|
5690
|
+
filename: file.path,
|
|
5691
|
+
importModuleDynamically: async (specifier)=>await dynamicImport(specifier)
|
|
5692
|
+
}).call(m.exports, ...argValues), this.postExecute(m, file), m.exports;
|
|
5048
5693
|
};
|
|
5049
5694
|
}
|
|
5050
5695
|
}
|
|
@@ -5487,7 +6132,7 @@ async function devServer_createDevServer(options, createCompiler, config, { comp
|
|
|
5487
6132
|
}) : Promise.resolve(), startCompile = async ()=>{
|
|
5488
6133
|
let compiler = customCompiler || await createCompiler();
|
|
5489
6134
|
if (!compiler) throw Error('[rsbuild:server] Failed to get compiler instance.');
|
|
5490
|
-
let publicPaths =
|
|
6135
|
+
let publicPaths = helpers_isMultiCompiler(compiler) ? compiler.compilers.map(getPublicPathFromCompiler) : [
|
|
5491
6136
|
getPublicPathFromCompiler(compiler)
|
|
5492
6137
|
], compilerDevMiddleware = new CompilerDevMiddleware({
|
|
5493
6138
|
dev: devConfig,
|
|
@@ -5499,7 +6144,7 @@ async function devServer_createDevServer(options, createCompiler, config, { comp
|
|
|
5499
6144
|
compiler,
|
|
5500
6145
|
environments: options.context.environments
|
|
5501
6146
|
});
|
|
5502
|
-
return await compilerDevMiddleware.init(), outputFileSystem = (
|
|
6147
|
+
return await compilerDevMiddleware.init(), outputFileSystem = (helpers_isMultiCompiler(compiler) ? compiler.compilers[0].outputFileSystem : compiler.outputFileSystem) || __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__.default, {
|
|
5503
6148
|
middleware: compilerDevMiddleware.middleware,
|
|
5504
6149
|
sockWrite: (...args)=>compilerDevMiddleware.sockWrite(...args),
|
|
5505
6150
|
onUpgrade: (...args)=>compilerDevMiddleware.upgrade(...args),
|
|
@@ -5648,7 +6293,7 @@ async function createCompiler_createCompiler(options) {
|
|
|
5648
6293
|
bundlerConfigs: rspackConfigs,
|
|
5649
6294
|
environments: context.environments
|
|
5650
6295
|
}), !await isSatisfyRspackVersion(__WEBPACK_EXTERNAL_MODULE__rspack_core_e0096ff7__.rspack.rspackVersion)) throw Error(`[rsbuild] The current Rspack version does not meet the requirements, the minimum supported version of Rspack is ${__WEBPACK_EXTERNAL_MODULE__compiled_picocolors_index_js_ea7a20e9__.default.green(rspackMinVersion)}`);
|
|
5651
|
-
let
|
|
6296
|
+
let isMultiCompiler = rspackConfigs.length > 1, compiler = isMultiCompiler ? (0, __WEBPACK_EXTERNAL_MODULE__rspack_core_e0096ff7__.rspack)(rspackConfigs) : (0, __WEBPACK_EXTERNAL_MODULE__rspack_core_e0096ff7__.rspack)(rspackConfigs[0]), isVersionLogged = !1, isCompiling = !1, logRspackVersion = ()=>{
|
|
5652
6297
|
isVersionLogged || (__WEBPACK_EXTERNAL_MODULE__compiled_rslog_index_js_c302f6e3__.logger.debug(`use Rspack v${__WEBPACK_EXTERNAL_MODULE__rspack_core_e0096ff7__.rspack.rspackVersion}`), isVersionLogged = !0);
|
|
5653
6298
|
};
|
|
5654
6299
|
compiler.hooks.watchRun.tap('rsbuild:compiling', (compiler)=>{
|
|
@@ -5677,13 +6322,13 @@ async function createCompiler_createCompiler(options) {
|
|
|
5677
6322
|
...statsOptions
|
|
5678
6323
|
}), printTime = (c, index)=>{
|
|
5679
6324
|
if (c.time) {
|
|
5680
|
-
let time = prettyTime(c.time / 1000), { name } = rspackConfigs[index], suffix = name ? __WEBPACK_EXTERNAL_MODULE__compiled_picocolors_index_js_ea7a20e9__.default.gray(` (${name})`) : '';
|
|
6325
|
+
let time = prettyTime(c.time / 1000), { name } = rspackConfigs[index], suffix = name && isMultiCompiler ? __WEBPACK_EXTERNAL_MODULE__compiled_picocolors_index_js_ea7a20e9__.default.gray(` (${name})`) : '';
|
|
5681
6326
|
__WEBPACK_EXTERNAL_MODULE__compiled_rslog_index_js_c302f6e3__.logger.ready(`built in ${time}${suffix}`);
|
|
5682
6327
|
}
|
|
5683
6328
|
}, hasErrors = stats.hasErrors();
|
|
5684
6329
|
if (!hasErrors) {
|
|
5685
6330
|
var _statsJson_children;
|
|
5686
|
-
|
|
6331
|
+
isMultiCompiler && (null === (_statsJson_children = statsJson.children) || void 0 === _statsJson_children ? void 0 : _statsJson_children.length) ? statsJson.children.forEach((c, index)=>{
|
|
5687
6332
|
printTime(c, index);
|
|
5688
6333
|
}) : printTime(statsJson, 0);
|
|
5689
6334
|
}
|
|
@@ -6644,7 +7289,7 @@ class CAC extends __WEBPACK_EXTERNAL_MODULE_events__.EventEmitter {
|
|
|
6644
7289
|
}), actionArgs.push(options), command.commandAction.apply(this, actionArgs);
|
|
6645
7290
|
}
|
|
6646
7291
|
}
|
|
6647
|
-
let
|
|
7292
|
+
let cac_dist = (name = "")=>new CAC(name), applyCommonOptions = (cli)=>{
|
|
6648
7293
|
cli.option('--base <base>', 'specify the base path of the server').option('-c, --config <config>', 'specify the configuration file, can be a relative or absolute path').option('--config-loader <loader>', 'specify the loader to load the config file, can be `jiti` or `native`', {
|
|
6649
7294
|
default: 'jiti'
|
|
6650
7295
|
}).option('-r, --root <root>', 'specify the project root directory, can be an absolute path or a path relative to cwd').option('-m, --mode <mode>', 'specify the build mode, can be `development`, `production` or `none`').option('--env-mode <mode>', 'specify the env mode to load the `.env.[mode]` file').option('--environment <name>', 'specify the name of environment to build', {
|
|
@@ -6668,12 +7313,12 @@ async function runCLI() {
|
|
|
6668
7313
|
}
|
|
6669
7314
|
}(), process.title = 'rsbuild-node';
|
|
6670
7315
|
let { npm_execpath } = process.env;
|
|
6671
|
-
(!npm_execpath || npm_execpath.includes('npx-cli.js') || npm_execpath.includes('.bun')) && console.log(), __WEBPACK_EXTERNAL_MODULE__compiled_rslog_index_js_c302f6e3__.logger.greet(` Rsbuild v1.2.
|
|
7316
|
+
(!npm_execpath || npm_execpath.includes('npx-cli.js') || npm_execpath.includes('.bun')) && console.log(), __WEBPACK_EXTERNAL_MODULE__compiled_rslog_index_js_c302f6e3__.logger.greet(` Rsbuild v1.2.18\n`);
|
|
6672
7317
|
}();
|
|
6673
7318
|
try {
|
|
6674
7319
|
!function() {
|
|
6675
|
-
let cli =
|
|
6676
|
-
cli.help(), cli.version("1.2.
|
|
7320
|
+
let cli = cac_dist('rsbuild');
|
|
7321
|
+
cli.help(), cli.version("1.2.18"), applyCommonOptions(cli);
|
|
6677
7322
|
let devCommand = cli.command('dev', 'starting the dev server'), buildCommand = cli.command('build', 'build the app for production'), previewCommand = cli.command('preview', 'preview the production build locally'), inspectCommand = cli.command('inspect', 'inspect the Rspack and Rsbuild configs');
|
|
6678
7323
|
applyServerOptions(devCommand), applyServerOptions(previewCommand), devCommand.action(async (options)=>{
|
|
6679
7324
|
try {
|
|
@@ -6724,6 +7369,6 @@ async function runCLI() {
|
|
|
6724
7369
|
__WEBPACK_EXTERNAL_MODULE__compiled_rslog_index_js_c302f6e3__.logger.error('Failed to start Rsbuild CLI.'), __WEBPACK_EXTERNAL_MODULE__compiled_rslog_index_js_c302f6e3__.logger.error(err);
|
|
6725
7370
|
}
|
|
6726
7371
|
}
|
|
6727
|
-
let src_version = "1.2.
|
|
7372
|
+
let src_version = "1.2.18";
|
|
6728
7373
|
var __webpack_exports__logger = __WEBPACK_EXTERNAL_MODULE__compiled_rslog_index_js_c302f6e3__.logger, __webpack_exports__rspack = __WEBPACK_EXTERNAL_MODULE__rspack_core_e0096ff7__.rspack;
|
|
6729
7374
|
export { PLUGIN_CSS_NAME, PLUGIN_SWC_NAME, createRsbuild, defineConfig, ensureAssetPrefix, config_loadConfig as loadConfig, loadEnv, mergeRsbuildConfig, runCLI, src_version as version, __webpack_exports__logger as logger, __webpack_exports__rspack as rspack };
|