@rsbuild/core 1.3.15 → 1.3.17
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 +21 -21
- package/compiled/html-rspack-plugin/index.js +54 -43
- package/compiled/html-rspack-plugin/loader.js +4 -3
- package/compiled/html-rspack-plugin/package.json +1 -1
- package/compiled/postcss-loader/index.js +6 -6
- package/compiled/rspack-manifest-plugin/index.js +4 -4
- package/compiled/ws/index.js +55 -51
- package/compiled/ws/package.json +1 -1
- package/dist/index.cjs +22 -18
- package/dist/index.js +22 -18
- package/dist-types/server/ansiHTML.d.ts +0 -1
- package/dist-types/types/config.d.ts +13 -0
- package/dist-types/types/plugin.d.ts +20 -5
- package/package.json +4 -4
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
var __webpack_modules__ = {
|
|
3
|
-
|
|
3
|
+
4278: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
4
4
|
"use strict";
|
|
5
|
-
const loader = __nccwpck_require__(
|
|
5
|
+
const loader = __nccwpck_require__(2284);
|
|
6
6
|
module.exports = loader.default;
|
|
7
7
|
module.exports.defaultGetLocalIdent =
|
|
8
|
-
__nccwpck_require__(
|
|
8
|
+
__nccwpck_require__(8453).defaultGetLocalIdent;
|
|
9
9
|
},
|
|
10
|
-
|
|
10
|
+
2284: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
11
11
|
"use strict";
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
exports["default"] = loader;
|
|
14
14
|
var _postcss = _interopRequireDefault(__nccwpck_require__(9409));
|
|
15
|
-
var _plugins = __nccwpck_require__(
|
|
16
|
-
var _utils = __nccwpck_require__(
|
|
15
|
+
var _plugins = __nccwpck_require__(1539);
|
|
16
|
+
var _utils = __nccwpck_require__(8453);
|
|
17
17
|
function _interopRequireDefault(obj) {
|
|
18
18
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
19
19
|
}
|
|
@@ -236,7 +236,7 @@
|
|
|
236
236
|
callback(null, `${importCode}${moduleCode}${exportCode}`);
|
|
237
237
|
}
|
|
238
238
|
},
|
|
239
|
-
|
|
239
|
+
1539: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
240
240
|
"use strict";
|
|
241
241
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
242
242
|
Object.defineProperty(exports, "icssParser", {
|
|
@@ -258,20 +258,20 @@
|
|
|
258
258
|
},
|
|
259
259
|
});
|
|
260
260
|
var _postcssImportParser = _interopRequireDefault(
|
|
261
|
-
__nccwpck_require__(
|
|
261
|
+
__nccwpck_require__(2984),
|
|
262
262
|
);
|
|
263
|
-
var _postcssIcssParser = _interopRequireDefault(__nccwpck_require__(
|
|
264
|
-
var _postcssUrlParser = _interopRequireDefault(__nccwpck_require__(
|
|
263
|
+
var _postcssIcssParser = _interopRequireDefault(__nccwpck_require__(893));
|
|
264
|
+
var _postcssUrlParser = _interopRequireDefault(__nccwpck_require__(1500));
|
|
265
265
|
function _interopRequireDefault(obj) {
|
|
266
266
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
267
267
|
}
|
|
268
268
|
},
|
|
269
|
-
|
|
269
|
+
893: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
270
270
|
"use strict";
|
|
271
271
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
272
272
|
exports["default"] = void 0;
|
|
273
273
|
var _icssUtils = __nccwpck_require__(4531);
|
|
274
|
-
var _utils = __nccwpck_require__(
|
|
274
|
+
var _utils = __nccwpck_require__(8453);
|
|
275
275
|
const plugin = (options = {}) => ({
|
|
276
276
|
postcssPlugin: "postcss-icss-parser",
|
|
277
277
|
async OnceExit(root) {
|
|
@@ -370,14 +370,14 @@
|
|
|
370
370
|
plugin.postcss = true;
|
|
371
371
|
var _default = (exports["default"] = plugin);
|
|
372
372
|
},
|
|
373
|
-
|
|
373
|
+
2984: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
374
374
|
"use strict";
|
|
375
375
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
376
376
|
exports["default"] = void 0;
|
|
377
377
|
var _postcssValueParser = _interopRequireDefault(
|
|
378
378
|
__nccwpck_require__(2948),
|
|
379
379
|
);
|
|
380
|
-
var _utils = __nccwpck_require__(
|
|
380
|
+
var _utils = __nccwpck_require__(8453);
|
|
381
381
|
function _interopRequireDefault(obj) {
|
|
382
382
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
383
383
|
}
|
|
@@ -682,14 +682,14 @@
|
|
|
682
682
|
plugin.postcss = true;
|
|
683
683
|
var _default = (exports["default"] = plugin);
|
|
684
684
|
},
|
|
685
|
-
|
|
685
|
+
1500: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
686
686
|
"use strict";
|
|
687
687
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
688
688
|
exports["default"] = void 0;
|
|
689
689
|
var _postcssValueParser = _interopRequireDefault(
|
|
690
690
|
__nccwpck_require__(2948),
|
|
691
691
|
);
|
|
692
|
-
var _utils = __nccwpck_require__(
|
|
692
|
+
var _utils = __nccwpck_require__(8453);
|
|
693
693
|
function _interopRequireDefault(obj) {
|
|
694
694
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
695
695
|
}
|
|
@@ -1032,7 +1032,7 @@
|
|
|
1032
1032
|
plugin.postcss = true;
|
|
1033
1033
|
var _default = (exports["default"] = plugin);
|
|
1034
1034
|
},
|
|
1035
|
-
|
|
1035
|
+
8453: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
1036
1036
|
"use strict";
|
|
1037
1037
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1038
1038
|
exports.WEBPACK_IGNORE_COMMENT_REGEXP = void 0;
|
|
@@ -3731,7 +3731,7 @@
|
|
|
3731
3731
|
var _selector = _interopRequireDefault(__nccwpck_require__(5297));
|
|
3732
3732
|
var _className = _interopRequireDefault(__nccwpck_require__(173));
|
|
3733
3733
|
var _comment = _interopRequireDefault(__nccwpck_require__(8983));
|
|
3734
|
-
var _id = _interopRequireDefault(__nccwpck_require__(
|
|
3734
|
+
var _id = _interopRequireDefault(__nccwpck_require__(834));
|
|
3735
3735
|
var _tag = _interopRequireDefault(__nccwpck_require__(5526));
|
|
3736
3736
|
var _string = _interopRequireDefault(__nccwpck_require__(4349));
|
|
3737
3737
|
var _pseudo = _interopRequireDefault(__nccwpck_require__(7250));
|
|
@@ -5707,7 +5707,7 @@
|
|
|
5707
5707
|
var _className = _interopRequireDefault(__nccwpck_require__(173));
|
|
5708
5708
|
var _combinator = _interopRequireDefault(__nccwpck_require__(3998));
|
|
5709
5709
|
var _comment = _interopRequireDefault(__nccwpck_require__(8983));
|
|
5710
|
-
var _id = _interopRequireDefault(__nccwpck_require__(
|
|
5710
|
+
var _id = _interopRequireDefault(__nccwpck_require__(834));
|
|
5711
5711
|
var _nesting = _interopRequireDefault(__nccwpck_require__(8568));
|
|
5712
5712
|
var _pseudo = _interopRequireDefault(__nccwpck_require__(7250));
|
|
5713
5713
|
var _root = _interopRequireDefault(__nccwpck_require__(9608));
|
|
@@ -6289,7 +6289,7 @@
|
|
|
6289
6289
|
return isAttribute(node) || isTag(node);
|
|
6290
6290
|
}
|
|
6291
6291
|
},
|
|
6292
|
-
|
|
6292
|
+
834: (module, exports, __nccwpck_require__) => {
|
|
6293
6293
|
"use strict";
|
|
6294
6294
|
exports.__esModule = true;
|
|
6295
6295
|
exports["default"] = void 0;
|
|
@@ -8096,6 +8096,6 @@
|
|
|
8096
8096
|
}
|
|
8097
8097
|
if (typeof __nccwpck_require__ !== "undefined")
|
|
8098
8098
|
__nccwpck_require__.ab = __dirname + "/";
|
|
8099
|
-
var __webpack_exports__ = __nccwpck_require__(
|
|
8099
|
+
var __webpack_exports__ = __nccwpck_require__(4278);
|
|
8100
8100
|
module.exports = __webpack_exports__;
|
|
8101
8101
|
})();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
var __webpack_modules__ = {
|
|
3
|
-
|
|
3
|
+
722: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
4
4
|
"use strict";
|
|
5
|
-
const { HtmlWebpackChildCompiler } = __nccwpck_require__(
|
|
5
|
+
const { HtmlWebpackChildCompiler } = __nccwpck_require__(907);
|
|
6
6
|
const compilerMap = new WeakMap();
|
|
7
7
|
class CachedChildCompilation {
|
|
8
8
|
constructor(compiler) {
|
|
@@ -52,35 +52,43 @@
|
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
class PersistentChildCompilerSingletonPlugin {
|
|
55
|
-
static createSnapshot(fileDependencies, mainCompilation
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
55
|
+
static createSnapshot(fileDependencies, mainCompilation) {
|
|
56
|
+
const timestamps = {};
|
|
57
|
+
const fs = mainCompilation.inputFileSystem;
|
|
58
|
+
return Promise.all(
|
|
59
|
+
fileDependencies.map(
|
|
60
|
+
(file) =>
|
|
61
|
+
new Promise((resolve) => {
|
|
62
|
+
fs.stat(file, (err, stat) => {
|
|
63
|
+
if (!err && stat) {
|
|
64
|
+
timestamps[file] = stat.mtime.getTime();
|
|
65
|
+
} else {
|
|
66
|
+
timestamps[file] = null;
|
|
67
|
+
}
|
|
68
|
+
resolve();
|
|
69
|
+
});
|
|
70
|
+
}),
|
|
71
|
+
),
|
|
72
|
+
).then(() => timestamps);
|
|
71
73
|
}
|
|
72
74
|
static isSnapshotValid(snapshot, mainCompilation) {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
(
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
75
|
+
const fs = mainCompilation.inputFileSystem;
|
|
76
|
+
return Promise.all(
|
|
77
|
+
Object.keys(snapshot).map(
|
|
78
|
+
(file) =>
|
|
79
|
+
new Promise((resolve) => {
|
|
80
|
+
fs.stat(file, (err, stat) => {
|
|
81
|
+
if (!err && stat && snapshot[file] !== null) {
|
|
82
|
+
resolve(stat.mtime.getTime() === snapshot[file]);
|
|
83
|
+
} else if (err && snapshot[file] === null) {
|
|
84
|
+
resolve(true);
|
|
85
|
+
} else {
|
|
86
|
+
resolve(false);
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
}),
|
|
90
|
+
),
|
|
91
|
+
).then((results) => !results.includes(false));
|
|
84
92
|
}
|
|
85
93
|
static watchFiles(mainCompilation, fileDependencies) {
|
|
86
94
|
Object.keys(fileDependencies).forEach((depencyTypes) => {
|
|
@@ -154,9 +162,8 @@
|
|
|
154
162
|
compiledEntriesPromise
|
|
155
163
|
.then((childCompilationResult) =>
|
|
156
164
|
PersistentChildCompilerSingletonPlugin.createSnapshot(
|
|
157
|
-
childCompilationResult.dependencies,
|
|
165
|
+
childCompilationResult.dependencies.fileDependencies,
|
|
158
166
|
mainCompilation,
|
|
159
|
-
compilationStartTime,
|
|
160
167
|
),
|
|
161
168
|
)
|
|
162
169
|
.then((snapshot) => {
|
|
@@ -304,7 +311,7 @@
|
|
|
304
311
|
}
|
|
305
312
|
module.exports = { CachedChildCompilation };
|
|
306
313
|
},
|
|
307
|
-
|
|
314
|
+
907: (module) => {
|
|
308
315
|
"use strict";
|
|
309
316
|
class HtmlWebpackChildCompiler {
|
|
310
317
|
constructor(templates) {
|
|
@@ -473,7 +480,7 @@
|
|
|
473
480
|
}
|
|
474
481
|
module.exports = { HtmlWebpackChildCompiler };
|
|
475
482
|
},
|
|
476
|
-
|
|
483
|
+
297: (module) => {
|
|
477
484
|
"use strict";
|
|
478
485
|
module.exports = {};
|
|
479
486
|
module.exports.none = (chunks) => chunks;
|
|
@@ -492,7 +499,7 @@
|
|
|
492
499
|
};
|
|
493
500
|
module.exports.auto = module.exports.none;
|
|
494
501
|
},
|
|
495
|
-
|
|
502
|
+
184: (module) => {
|
|
496
503
|
"use strict";
|
|
497
504
|
module.exports = function (err) {
|
|
498
505
|
return {
|
|
@@ -513,7 +520,7 @@
|
|
|
513
520
|
};
|
|
514
521
|
};
|
|
515
522
|
},
|
|
516
|
-
|
|
523
|
+
55: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
517
524
|
"use strict";
|
|
518
525
|
const { AsyncSeriesWaterfallHook } = __nccwpck_require__(408);
|
|
519
526
|
const htmlWebpackPluginHooksMap = new WeakMap();
|
|
@@ -539,7 +546,7 @@
|
|
|
539
546
|
}
|
|
540
547
|
module.exports = { getHtmlRspackPluginHooks };
|
|
541
548
|
},
|
|
542
|
-
|
|
549
|
+
502: (module) => {
|
|
543
550
|
const voidTags = [
|
|
544
551
|
"area",
|
|
545
552
|
"base",
|
|
@@ -607,19 +614,20 @@
|
|
|
607
614
|
htmlTagObjectToString,
|
|
608
615
|
};
|
|
609
616
|
},
|
|
610
|
-
|
|
617
|
+
759: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
611
618
|
"use strict";
|
|
612
619
|
const promisify = __nccwpck_require__(23).promisify;
|
|
613
620
|
const vm = __nccwpck_require__(154);
|
|
614
621
|
const fs = __nccwpck_require__(896);
|
|
615
622
|
const path = __nccwpck_require__(928);
|
|
616
|
-
const { CachedChildCompilation } = __nccwpck_require__(
|
|
623
|
+
const { CachedChildCompilation } = __nccwpck_require__(722);
|
|
617
624
|
const { createHtmlTagObject, htmlTagObjectToString, HtmlTagArray } =
|
|
618
|
-
__nccwpck_require__(
|
|
619
|
-
const prettyError = __nccwpck_require__(
|
|
620
|
-
const chunkSorter = __nccwpck_require__(
|
|
625
|
+
__nccwpck_require__(502);
|
|
626
|
+
const prettyError = __nccwpck_require__(184);
|
|
627
|
+
const chunkSorter = __nccwpck_require__(297);
|
|
621
628
|
const getHtmlRspackPluginHooks =
|
|
622
|
-
__nccwpck_require__(
|
|
629
|
+
__nccwpck_require__(55).getHtmlRspackPluginHooks;
|
|
630
|
+
const WITH_PLACEHOLDER = "function __with_placeholder__";
|
|
623
631
|
class HtmlRspackPlugin {
|
|
624
632
|
constructor(userOptions = {}) {
|
|
625
633
|
this.version = HtmlRspackPlugin.version;
|
|
@@ -887,6 +895,9 @@
|
|
|
887
895
|
new Error("The child compilation didn't provide a result"),
|
|
888
896
|
);
|
|
889
897
|
}
|
|
898
|
+
if (source.indexOf(WITH_PLACEHOLDER) >= 0) {
|
|
899
|
+
source = source.replace(WITH_PLACEHOLDER, "with");
|
|
900
|
+
}
|
|
890
901
|
if (source.indexOf("HTML_WEBPACK_PLUGIN_RESULT") >= 0) {
|
|
891
902
|
source += ";\nHTML_WEBPACK_PLUGIN_RESULT";
|
|
892
903
|
}
|
|
@@ -1586,6 +1597,6 @@
|
|
|
1586
1597
|
}
|
|
1587
1598
|
if (typeof __nccwpck_require__ !== "undefined")
|
|
1588
1599
|
__nccwpck_require__.ab = __dirname + "/";
|
|
1589
|
-
var __webpack_exports__ = __nccwpck_require__(
|
|
1600
|
+
var __webpack_exports__ = __nccwpck_require__(759);
|
|
1590
1601
|
module.exports = __webpack_exports__;
|
|
1591
1602
|
})();
|
|
@@ -30,6 +30,7 @@ const stringEscapes = {
|
|
|
30
30
|
'\u2029': 'u2029',
|
|
31
31
|
};
|
|
32
32
|
|
|
33
|
+
const WITH_PLACEHOLDER = 'function __with_placeholder__';
|
|
33
34
|
const escapeStringChar = (chr) => '\\' + stringEscapes[chr];
|
|
34
35
|
|
|
35
36
|
function template(string) {
|
|
@@ -150,11 +151,11 @@ function lodashEscape(string) {
|
|
|
150
151
|
};`;
|
|
151
152
|
|
|
152
153
|
// The following part renders the template with lodash as a minimalistic loader
|
|
154
|
+
// The WITH_PLACEHOLDER will be replaced with `with` in the next step
|
|
155
|
+
// to make the code compatible with SWC strict mode
|
|
153
156
|
const { compiled, isEscaping } = template(source);
|
|
154
|
-
// Use `eval("require")("lodash")` to enforce using the native nodejs require
|
|
155
|
-
// during template execution
|
|
156
157
|
return `
|
|
157
|
-
module.exports = function (templateParams) {
|
|
158
|
+
module.exports = function (templateParams) { ${WITH_PLACEHOLDER}(templateParams) {
|
|
158
159
|
${isEscaping ? escapeCode : ''}
|
|
159
160
|
// Execute the lodash template
|
|
160
161
|
return (${compiled})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"html-rspack-plugin","author":"Jan Nicklas <j.nicklas@me.com> (https://github.com/jantimon)","version":"6.
|
|
1
|
+
{"name":"html-rspack-plugin","author":"Jan Nicklas <j.nicklas@me.com> (https://github.com/jantimon)","version":"6.1.2","funding":{"type":"opencollective","url":"https://opencollective.com/html-webpack-plugin"},"license":"MIT","types":"index.d.ts","type":"commonjs"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
"use strict";
|
|
3
3
|
var __webpack_modules__ = {
|
|
4
|
-
|
|
5
|
-
module.exports = __nccwpck_require__(
|
|
4
|
+
866: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
5
|
+
module.exports = __nccwpck_require__(184)["default"];
|
|
6
6
|
},
|
|
7
|
-
|
|
7
|
+
184: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
8
8
|
var __webpack_unused_export__;
|
|
9
9
|
__webpack_unused_export__ = { value: true };
|
|
10
10
|
exports["default"] = loader;
|
|
11
11
|
var _path = _interopRequireDefault(__nccwpck_require__(928));
|
|
12
|
-
var _utils = __nccwpck_require__(
|
|
12
|
+
var _utils = __nccwpck_require__(201);
|
|
13
13
|
function _interopRequireDefault(obj) {
|
|
14
14
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
15
15
|
}
|
|
@@ -179,7 +179,7 @@
|
|
|
179
179
|
callback(null, result.css, map, { ast });
|
|
180
180
|
}
|
|
181
181
|
},
|
|
182
|
-
|
|
182
|
+
201: (module, exports, __nccwpck_require__) => {
|
|
183
183
|
module = __nccwpck_require__.nmd(module);
|
|
184
184
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
185
185
|
exports.exec = exec;
|
|
@@ -716,6 +716,6 @@
|
|
|
716
716
|
})();
|
|
717
717
|
if (typeof __nccwpck_require__ !== "undefined")
|
|
718
718
|
__nccwpck_require__.ab = __dirname + "/";
|
|
719
|
-
var __webpack_exports__ = __nccwpck_require__(
|
|
719
|
+
var __webpack_exports__ = __nccwpck_require__(866);
|
|
720
720
|
module.exports = __webpack_exports__;
|
|
721
721
|
})();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
"use strict";
|
|
3
3
|
var __webpack_modules__ = {
|
|
4
|
-
|
|
4
|
+
14: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.transformFiles =
|
|
7
7
|
exports.reduceChunk =
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
.map(standardizeFilePaths);
|
|
121
121
|
exports.transformFiles = transformFiles;
|
|
122
122
|
},
|
|
123
|
-
|
|
123
|
+
207: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
124
124
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
125
125
|
exports.normalModuleLoaderHook =
|
|
126
126
|
exports.getCompilerHooks =
|
|
@@ -130,7 +130,7 @@
|
|
|
130
130
|
const fs_1 = __nccwpck_require__(896);
|
|
131
131
|
const path_1 = __nccwpck_require__(928);
|
|
132
132
|
const lite_tapable_1 = __nccwpck_require__(408);
|
|
133
|
-
const helpers_1 = __nccwpck_require__(
|
|
133
|
+
const helpers_1 = __nccwpck_require__(14);
|
|
134
134
|
const compilerHookMap = new WeakMap();
|
|
135
135
|
const getCompilerHooks = (compiler) => {
|
|
136
136
|
let hooks = compilerHookMap.get(compiler);
|
|
@@ -312,7 +312,7 @@
|
|
|
312
312
|
exports.getCompilerHooks =
|
|
313
313
|
void 0;
|
|
314
314
|
const path_1 = __nccwpck_require__(928);
|
|
315
|
-
const hooks_1 = __nccwpck_require__(
|
|
315
|
+
const hooks_1 = __nccwpck_require__(207);
|
|
316
316
|
Object.defineProperty(exports, "getCompilerHooks", {
|
|
317
317
|
enumerable: true,
|
|
318
318
|
get: function () {
|
package/compiled/ws/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
var __webpack_modules__ = {
|
|
3
|
-
|
|
3
|
+
777: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
4
4
|
"use strict";
|
|
5
|
-
const WebSocket = __nccwpck_require__(
|
|
6
|
-
WebSocket.createWebSocketStream = __nccwpck_require__(
|
|
7
|
-
WebSocket.Server = __nccwpck_require__(
|
|
8
|
-
WebSocket.Receiver = __nccwpck_require__(
|
|
9
|
-
WebSocket.Sender = __nccwpck_require__(
|
|
5
|
+
const WebSocket = __nccwpck_require__(590);
|
|
6
|
+
WebSocket.createWebSocketStream = __nccwpck_require__(605);
|
|
7
|
+
WebSocket.Server = __nccwpck_require__(920);
|
|
8
|
+
WebSocket.Receiver = __nccwpck_require__(196);
|
|
9
|
+
WebSocket.Sender = __nccwpck_require__(780);
|
|
10
10
|
WebSocket.WebSocket = WebSocket;
|
|
11
11
|
WebSocket.WebSocketServer = WebSocket.Server;
|
|
12
12
|
module.exports = WebSocket;
|
|
13
13
|
},
|
|
14
|
-
|
|
14
|
+
468: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
15
15
|
"use strict";
|
|
16
|
-
const { EMPTY_BUFFER } = __nccwpck_require__(
|
|
16
|
+
const { EMPTY_BUFFER } = __nccwpck_require__(656);
|
|
17
17
|
const FastBuffer = Buffer[Symbol.species];
|
|
18
18
|
function concat(list, totalLength) {
|
|
19
19
|
if (list.length === 0) return EMPTY_BUFFER;
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
} catch (e) {}
|
|
88
88
|
}
|
|
89
89
|
},
|
|
90
|
-
|
|
90
|
+
656: (module) => {
|
|
91
91
|
"use strict";
|
|
92
92
|
const BINARY_TYPES = ["nodebuffer", "arraybuffer", "fragments"];
|
|
93
93
|
const hasBlob = typeof Blob !== "undefined";
|
|
@@ -104,9 +104,9 @@
|
|
|
104
104
|
NOOP: () => {},
|
|
105
105
|
};
|
|
106
106
|
},
|
|
107
|
-
|
|
107
|
+
24: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
108
108
|
"use strict";
|
|
109
|
-
const { kForOnEventAttribute, kListener } = __nccwpck_require__(
|
|
109
|
+
const { kForOnEventAttribute, kListener } = __nccwpck_require__(656);
|
|
110
110
|
const kCode = Symbol("kCode");
|
|
111
111
|
const kData = Symbol("kData");
|
|
112
112
|
const kError = Symbol("kError");
|
|
@@ -268,9 +268,9 @@
|
|
|
268
268
|
}
|
|
269
269
|
}
|
|
270
270
|
},
|
|
271
|
-
|
|
271
|
+
992: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
272
272
|
"use strict";
|
|
273
|
-
const { tokenChars } = __nccwpck_require__(
|
|
273
|
+
const { tokenChars } = __nccwpck_require__(674);
|
|
274
274
|
function push(dest, name, elem) {
|
|
275
275
|
if (dest[name] === undefined) dest[name] = [elem];
|
|
276
276
|
else dest[name].push(elem);
|
|
@@ -426,7 +426,7 @@
|
|
|
426
426
|
}
|
|
427
427
|
module.exports = { format, parse };
|
|
428
428
|
},
|
|
429
|
-
|
|
429
|
+
13: (module) => {
|
|
430
430
|
"use strict";
|
|
431
431
|
const kDone = Symbol("kDone");
|
|
432
432
|
const kRun = Symbol("kRun");
|
|
@@ -455,12 +455,12 @@
|
|
|
455
455
|
}
|
|
456
456
|
module.exports = Limiter;
|
|
457
457
|
},
|
|
458
|
-
|
|
458
|
+
245: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
459
459
|
"use strict";
|
|
460
460
|
const zlib = __nccwpck_require__(106);
|
|
461
|
-
const bufferUtil = __nccwpck_require__(
|
|
462
|
-
const Limiter = __nccwpck_require__(
|
|
463
|
-
const { kStatusCode } = __nccwpck_require__(
|
|
461
|
+
const bufferUtil = __nccwpck_require__(468);
|
|
462
|
+
const Limiter = __nccwpck_require__(13);
|
|
463
|
+
const { kStatusCode } = __nccwpck_require__(656);
|
|
464
464
|
const FastBuffer = Buffer[Symbol.species];
|
|
465
465
|
const TRAILER = Buffer.from([0, 0, 255, 255]);
|
|
466
466
|
const kPerMessageDeflate = Symbol("permessage-deflate");
|
|
@@ -776,18 +776,22 @@
|
|
|
776
776
|
}
|
|
777
777
|
function inflateOnError(err) {
|
|
778
778
|
this[kPerMessageDeflate]._inflate = null;
|
|
779
|
+
if (this[kError]) {
|
|
780
|
+
this[kCallback](this[kError]);
|
|
781
|
+
return;
|
|
782
|
+
}
|
|
779
783
|
err[kStatusCode] = 1007;
|
|
780
784
|
this[kCallback](err);
|
|
781
785
|
}
|
|
782
786
|
},
|
|
783
|
-
|
|
787
|
+
196: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
784
788
|
"use strict";
|
|
785
789
|
const { Writable } = __nccwpck_require__(203);
|
|
786
|
-
const PerMessageDeflate = __nccwpck_require__(
|
|
790
|
+
const PerMessageDeflate = __nccwpck_require__(245);
|
|
787
791
|
const { BINARY_TYPES, EMPTY_BUFFER, kStatusCode, kWebSocket } =
|
|
788
|
-
__nccwpck_require__(
|
|
789
|
-
const { concat, toArrayBuffer, unmask } = __nccwpck_require__(
|
|
790
|
-
const { isValidStatusCode, isValidUTF8 } = __nccwpck_require__(
|
|
792
|
+
__nccwpck_require__(656);
|
|
793
|
+
const { concat, toArrayBuffer, unmask } = __nccwpck_require__(468);
|
|
794
|
+
const { isValidStatusCode, isValidUTF8 } = __nccwpck_require__(674);
|
|
791
795
|
const FastBuffer = Buffer[Symbol.species];
|
|
792
796
|
const GET_INFO = 0;
|
|
793
797
|
const GET_PAYLOAD_LENGTH_16 = 1;
|
|
@@ -1284,14 +1288,14 @@
|
|
|
1284
1288
|
}
|
|
1285
1289
|
module.exports = Receiver;
|
|
1286
1290
|
},
|
|
1287
|
-
|
|
1291
|
+
780: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
1288
1292
|
"use strict";
|
|
1289
1293
|
const { Duplex } = __nccwpck_require__(203);
|
|
1290
1294
|
const { randomFillSync } = __nccwpck_require__(982);
|
|
1291
|
-
const PerMessageDeflate = __nccwpck_require__(
|
|
1292
|
-
const { EMPTY_BUFFER, kWebSocket, NOOP } = __nccwpck_require__(
|
|
1293
|
-
const { isBlob, isValidStatusCode } = __nccwpck_require__(
|
|
1294
|
-
const { mask: applyMask, toBuffer } = __nccwpck_require__(
|
|
1295
|
+
const PerMessageDeflate = __nccwpck_require__(245);
|
|
1296
|
+
const { EMPTY_BUFFER, kWebSocket, NOOP } = __nccwpck_require__(656);
|
|
1297
|
+
const { isBlob, isValidStatusCode } = __nccwpck_require__(674);
|
|
1298
|
+
const { mask: applyMask, toBuffer } = __nccwpck_require__(468);
|
|
1295
1299
|
const kByteLength = Symbol("kByteLength");
|
|
1296
1300
|
const maskBuffer = Buffer.alloc(4);
|
|
1297
1301
|
const RANDOM_POOL_SIZE = 8 * 1024;
|
|
@@ -1660,9 +1664,9 @@
|
|
|
1660
1664
|
sender.onerror(err);
|
|
1661
1665
|
}
|
|
1662
1666
|
},
|
|
1663
|
-
|
|
1667
|
+
605: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
1664
1668
|
"use strict";
|
|
1665
|
-
const WebSocket = __nccwpck_require__(
|
|
1669
|
+
const WebSocket = __nccwpck_require__(590);
|
|
1666
1670
|
const { Duplex } = __nccwpck_require__(203);
|
|
1667
1671
|
function emitClose(stream) {
|
|
1668
1672
|
stream.emit("close");
|
|
@@ -1757,9 +1761,9 @@
|
|
|
1757
1761
|
}
|
|
1758
1762
|
module.exports = createWebSocketStream;
|
|
1759
1763
|
},
|
|
1760
|
-
|
|
1764
|
+
907: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
1761
1765
|
"use strict";
|
|
1762
|
-
const { tokenChars } = __nccwpck_require__(
|
|
1766
|
+
const { tokenChars } = __nccwpck_require__(674);
|
|
1763
1767
|
function parse(header) {
|
|
1764
1768
|
const protocols = new Set();
|
|
1765
1769
|
let start = -1;
|
|
@@ -1800,10 +1804,10 @@
|
|
|
1800
1804
|
}
|
|
1801
1805
|
module.exports = { parse };
|
|
1802
1806
|
},
|
|
1803
|
-
|
|
1807
|
+
674: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
1804
1808
|
"use strict";
|
|
1805
1809
|
const { isUtf8 } = __nccwpck_require__(181);
|
|
1806
|
-
const { hasBlob } = __nccwpck_require__(
|
|
1810
|
+
const { hasBlob } = __nccwpck_require__(656);
|
|
1807
1811
|
const tokenChars = [
|
|
1808
1812
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
1809
1813
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0,
|
|
@@ -1897,17 +1901,17 @@
|
|
|
1897
1901
|
} catch (e) {}
|
|
1898
1902
|
}
|
|
1899
1903
|
},
|
|
1900
|
-
|
|
1904
|
+
920: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
1901
1905
|
"use strict";
|
|
1902
1906
|
const EventEmitter = __nccwpck_require__(434);
|
|
1903
1907
|
const http = __nccwpck_require__(611);
|
|
1904
1908
|
const { Duplex } = __nccwpck_require__(203);
|
|
1905
1909
|
const { createHash } = __nccwpck_require__(982);
|
|
1906
|
-
const extension = __nccwpck_require__(
|
|
1907
|
-
const PerMessageDeflate = __nccwpck_require__(
|
|
1908
|
-
const subprotocol = __nccwpck_require__(
|
|
1909
|
-
const WebSocket = __nccwpck_require__(
|
|
1910
|
-
const { GUID, kWebSocket } = __nccwpck_require__(
|
|
1910
|
+
const extension = __nccwpck_require__(992);
|
|
1911
|
+
const PerMessageDeflate = __nccwpck_require__(245);
|
|
1912
|
+
const subprotocol = __nccwpck_require__(907);
|
|
1913
|
+
const WebSocket = __nccwpck_require__(590);
|
|
1914
|
+
const { GUID, kWebSocket } = __nccwpck_require__(656);
|
|
1911
1915
|
const keyRegex = /^[+/0-9A-Za-z]{22}==$/;
|
|
1912
1916
|
const RUNNING = 0;
|
|
1913
1917
|
const CLOSING = 1;
|
|
@@ -2263,7 +2267,7 @@
|
|
|
2263
2267
|
}
|
|
2264
2268
|
}
|
|
2265
2269
|
},
|
|
2266
|
-
|
|
2270
|
+
590: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
2267
2271
|
"use strict";
|
|
2268
2272
|
const EventEmitter = __nccwpck_require__(434);
|
|
2269
2273
|
const https = __nccwpck_require__(692);
|
|
@@ -2273,10 +2277,10 @@
|
|
|
2273
2277
|
const { randomBytes, createHash } = __nccwpck_require__(982);
|
|
2274
2278
|
const { Duplex, Readable } = __nccwpck_require__(203);
|
|
2275
2279
|
const { URL } = __nccwpck_require__(16);
|
|
2276
|
-
const PerMessageDeflate = __nccwpck_require__(
|
|
2277
|
-
const Receiver = __nccwpck_require__(
|
|
2278
|
-
const Sender = __nccwpck_require__(
|
|
2279
|
-
const { isBlob } = __nccwpck_require__(
|
|
2280
|
+
const PerMessageDeflate = __nccwpck_require__(245);
|
|
2281
|
+
const Receiver = __nccwpck_require__(196);
|
|
2282
|
+
const Sender = __nccwpck_require__(780);
|
|
2283
|
+
const { isBlob } = __nccwpck_require__(674);
|
|
2280
2284
|
const {
|
|
2281
2285
|
BINARY_TYPES,
|
|
2282
2286
|
EMPTY_BUFFER,
|
|
@@ -2286,12 +2290,12 @@
|
|
|
2286
2290
|
kStatusCode,
|
|
2287
2291
|
kWebSocket,
|
|
2288
2292
|
NOOP,
|
|
2289
|
-
} = __nccwpck_require__(
|
|
2293
|
+
} = __nccwpck_require__(656);
|
|
2290
2294
|
const {
|
|
2291
2295
|
EventTarget: { addEventListener, removeEventListener },
|
|
2292
|
-
} = __nccwpck_require__(
|
|
2293
|
-
const { format, parse } = __nccwpck_require__(
|
|
2294
|
-
const { toBuffer } = __nccwpck_require__(
|
|
2296
|
+
} = __nccwpck_require__(24);
|
|
2297
|
+
const { format, parse } = __nccwpck_require__(992);
|
|
2298
|
+
const { toBuffer } = __nccwpck_require__(468);
|
|
2295
2299
|
const closeTimeout = 30 * 1e3;
|
|
2296
2300
|
const kAborted = Symbol("kAborted");
|
|
2297
2301
|
const protocolVersions = [8, 13];
|
|
@@ -2673,7 +2677,7 @@
|
|
|
2673
2677
|
if (parsedUrl.protocol !== "ws:" && !isSecure && !isIpcUrl) {
|
|
2674
2678
|
invalidUrlMessage =
|
|
2675
2679
|
'The URL\'s protocol must be one of "ws:", "wss:", ' +
|
|
2676
|
-
'"http:", "https", or "ws+unix:"';
|
|
2680
|
+
'"http:", "https:", or "ws+unix:"';
|
|
2677
2681
|
} else if (isIpcUrl && !parsedUrl.pathname) {
|
|
2678
2682
|
invalidUrlMessage = "The URL's pathname is empty";
|
|
2679
2683
|
} else if (parsedUrl.hash) {
|
|
@@ -3149,6 +3153,6 @@
|
|
|
3149
3153
|
}
|
|
3150
3154
|
if (typeof __nccwpck_require__ !== "undefined")
|
|
3151
3155
|
__nccwpck_require__.ab = __dirname + "/";
|
|
3152
|
-
var __webpack_exports__ = __nccwpck_require__(
|
|
3156
|
+
var __webpack_exports__ = __nccwpck_require__(777);
|
|
3153
3157
|
module.exports = __webpack_exports__;
|
|
3154
3158
|
})();
|
package/compiled/ws/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"ws","author":"Einar Otto Stangvik <einaros@gmail.com> (http://2x.io)","version":"8.18.
|
|
1
|
+
{"name":"ws","author":"Einar Otto Stangvik <einaros@gmail.com> (http://2x.io)","version":"8.18.2","license":"MIT","types":"index.d.ts","type":"commonjs"}
|
package/dist/index.cjs
CHANGED
|
@@ -2258,7 +2258,7 @@ for(var __webpack_i__ in (()=>{
|
|
|
2258
2258
|
async function createContext(options, userConfig) {
|
|
2259
2259
|
let { cwd } = options, rootPath = userConfig.root ? getAbsolutePath(cwd, userConfig.root) : cwd, rsbuildConfig = await withDefaultConfig(rootPath, userConfig), cachePath = (0, external_node_path_namespaceObject.join)(rootPath, 'node_modules', '.cache'), specifiedEnvironments = options.environment && options.environment.length > 0 ? options.environment : void 0;
|
|
2260
2260
|
return {
|
|
2261
|
-
version: "1.3.
|
|
2261
|
+
version: "1.3.17",
|
|
2262
2262
|
rootPath,
|
|
2263
2263
|
distPath: '',
|
|
2264
2264
|
cachePath,
|
|
@@ -2566,15 +2566,14 @@ for(var __webpack_i__ in (()=>{
|
|
|
2566
2566
|
]), chain.context(api.context.rootPath), chain.mode(environment.config.mode), chain.infrastructureLogging({
|
|
2567
2567
|
level: 'error'
|
|
2568
2568
|
}), chain.watchOptions({
|
|
2569
|
-
ignored: /[\\/](?:\.git|node_modules)[\\/]/,
|
|
2570
2569
|
aggregateTimeout: 0
|
|
2571
2570
|
}), chain.performance.hints(!1), chain.module.parser.merge({
|
|
2572
2571
|
javascript: {
|
|
2573
2572
|
exportsPresence: 'error'
|
|
2574
2573
|
}
|
|
2575
|
-
}), isDev && config.dev.hmr && 'web' === target && chain.plugin(CHAIN_ID.PLUGIN.HMR).use(bundler.HotModuleReplacementPlugin), 'development' === env && chain.output.devtoolModuleFilenameTemplate((info)=>toPosixPath(info.absoluteResourcePath)), process.env.RSPACK_CONFIG_VALIDATE ||= 'loose-unrecognized-keys',
|
|
2574
|
+
}), isDev && config.dev.hmr && 'web' === target && chain.plugin(CHAIN_ID.PLUGIN.HMR).use(bundler.HotModuleReplacementPlugin), 'development' === env && chain.output.devtoolModuleFilenameTemplate((info)=>toPosixPath(info.absoluteResourcePath)), process.env.RSPACK_CONFIG_VALIDATE ||= 'loose-unrecognized-keys', 'rspack' === api.context.bundlerType && chain.experiments({
|
|
2576
2575
|
...chain.get('experiments'),
|
|
2577
|
-
incremental:
|
|
2576
|
+
incremental: !0
|
|
2578
2577
|
});
|
|
2579
2578
|
});
|
|
2580
2579
|
}
|
|
@@ -3663,6 +3662,7 @@ for(var __webpack_i__ in (()=>{
|
|
|
3663
3662
|
}, pluginManifest = ()=>({
|
|
3664
3663
|
name: 'rsbuild:manifest',
|
|
3665
3664
|
setup (api) {
|
|
3665
|
+
let manifestFilenames = new Map();
|
|
3666
3666
|
api.modifyBundlerChain(async (chain, { CHAIN_ID, environment, isDev })=>{
|
|
3667
3667
|
let { output: { manifest }, dev: { writeToDisk } } = environment.config;
|
|
3668
3668
|
if (!1 === manifest) return;
|
|
@@ -3678,7 +3678,7 @@ for(var __webpack_i__ in (()=>{
|
|
|
3678
3678
|
...manifest
|
|
3679
3679
|
};
|
|
3680
3680
|
}(manifest), { RspackManifestPlugin } = await Promise.resolve().then(__webpack_require__.bind(__webpack_require__, "../../compiled/rspack-manifest-plugin/index.js")), { htmlPaths } = environment, filter = manifestOptions.filter ?? ((file)=>!file.name.endsWith('.LICENSE.txt'));
|
|
3681
|
-
chain.plugin(CHAIN_ID.PLUGIN.MANIFEST).use(RspackManifestPlugin, [
|
|
3681
|
+
manifestFilenames.set(environment.name, manifestOptions.filename), chain.plugin(CHAIN_ID.PLUGIN.MANIFEST).use(RspackManifestPlugin, [
|
|
3682
3682
|
{
|
|
3683
3683
|
fileName: manifestOptions.filename,
|
|
3684
3684
|
filter,
|
|
@@ -3686,6 +3686,10 @@ for(var __webpack_i__ in (()=>{
|
|
|
3686
3686
|
generate: generateManifest(htmlPaths, manifestOptions, environment)
|
|
3687
3687
|
}
|
|
3688
3688
|
]);
|
|
3689
|
+
}), api.onAfterCreateCompiler(()=>{
|
|
3690
|
+
if (manifestFilenames.size <= 1) return void manifestFilenames.clear();
|
|
3691
|
+
let environmentNames = Array.from(manifestFilenames.keys()), filenames = Array.from(manifestFilenames.values());
|
|
3692
|
+
new Set(filenames).size !== filenames.length && rslog_index_js_namespaceObject.logger.warn(`[rsbuild:manifest] The \`manifest.filename\` option must be unique when there are multiple environments (${environmentNames.join(', ')}), otherwise the manifest file will be overwritten.`), manifestFilenames.clear();
|
|
3689
3693
|
});
|
|
3690
3694
|
}
|
|
3691
3695
|
});
|
|
@@ -5333,14 +5337,7 @@ throw new Error('Failed to load Node.js addon: "${name}"\\n' + error);
|
|
|
5333
5337
|
29,
|
|
5334
5338
|
39,
|
|
5335
5339
|
49
|
|
5336
|
-
]
|
|
5337
|
-
let ansiCodes = [], ret = text.replace(/\x1B\[([0-9;]+)m/g, (_match, sequences)=>{
|
|
5338
|
-
let style = '';
|
|
5339
|
-
for (let seq of sequences.split(';'))styles[seq] && (style += `${styles[seq]};`);
|
|
5340
|
-
return style ? (ansiCodes.push(sequences), `<span style="${style}">`) : closeCode.includes(Number(sequences)) && ansiCodes.length > 0 ? (ansiCodes.pop(), '</span>') : '';
|
|
5341
|
-
});
|
|
5342
|
-
return ansiCodes.length > 0 && (ret += Array(ansiCodes.length + 1).join('</span>')), ret;
|
|
5343
|
-
};
|
|
5340
|
+
];
|
|
5344
5341
|
function socketServer_define_property(obj, key, value) {
|
|
5345
5342
|
return key in obj ? Object.defineProperty(obj, key, {
|
|
5346
5343
|
value: value,
|
|
@@ -5468,7 +5465,14 @@ throw new Error('Failed to load Node.js addon: "${name}"\\n' + error);
|
|
|
5468
5465
|
text: formattedErrors,
|
|
5469
5466
|
html: function(errors, root) {
|
|
5470
5467
|
let htmlItems = errors.map((item)=>{
|
|
5471
|
-
var text, text1 =
|
|
5468
|
+
var text, text1 = function(text) {
|
|
5469
|
+
let ansiCodes = [], ret = text.replace(/\x1B\[([0-9;]+)m/g, (_match, sequences)=>{
|
|
5470
|
+
let style = '';
|
|
5471
|
+
for (let seq of sequences.split(';'))styles[seq] && (style += `${styles[seq]};`);
|
|
5472
|
+
return style ? (ansiCodes.push(sequences), `<span style="${style}">`) : closeCode.includes(Number(sequences)) && ansiCodes.length > 0 ? (ansiCodes.pop(), '</span>') : '';
|
|
5473
|
+
});
|
|
5474
|
+
return ansiCodes.length > 0 && (ret += Array(ansiCodes.length + 1).join('</span>')), ret;
|
|
5475
|
+
}((text = item) ? text.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/'/g, ''') : ''), root1 = root;
|
|
5472
5476
|
let pathRegex = /(?:\.\.?[\/\\]|[a-zA-Z]:\\|\/)[^:]*:\d+:\d+/g, urlRegex = /(https?:\/\/(?:[\w-]+\.)+[a-z0-9](?:[\w-.~:/?#[\]@!$&'*+,;=])*)/gi;
|
|
5473
5477
|
return text1.split('\n').map((line)=>{
|
|
5474
5478
|
let replacedLine = line.replace(pathRegex, (file)=>{
|
|
@@ -7014,7 +7018,7 @@ throw new Error('Failed to load Node.js addon: "${name}"\\n' + error);
|
|
|
7014
7018
|
handler: (chain, { target, environment })=>{
|
|
7015
7019
|
if (descriptor.targets && !descriptor.targets.includes(target) || descriptor.environments && !descriptor.environments.includes(environment.name)) return;
|
|
7016
7020
|
let rule = chain.module.rule(id);
|
|
7017
|
-
descriptor.test && rule.test(descriptor.test), descriptor.resourceQuery && rule.resourceQuery(descriptor.resourceQuery), descriptor.layer && rule.layer(descriptor.layer), descriptor.issuerLayer && rule.issuerLayer(descriptor.issuerLayer), descriptor.issuer && rule.issuer(descriptor.issuer), descriptor.with && rule.with(descriptor.with);
|
|
7021
|
+
descriptor.test && rule.test(descriptor.test), descriptor.resourceQuery && rule.resourceQuery(descriptor.resourceQuery), descriptor.layer && rule.layer(descriptor.layer), descriptor.issuerLayer && rule.issuerLayer(descriptor.issuerLayer), descriptor.issuer && rule.issuer(descriptor.issuer), descriptor.with && rule.with(descriptor.with), descriptor.mimetype && rule.mimetype(descriptor.mimetype), descriptor.enforce && rule.enforce(descriptor.enforce);
|
|
7018
7022
|
let loaderName = descriptor.raw ? 'transformRawLoader.mjs' : 'transformLoader.mjs', loaderPath = (0, external_node_path_namespaceObject.join)(LOADER_PATH, loaderName);
|
|
7019
7023
|
rule.use(id).loader(loaderPath).options({
|
|
7020
7024
|
id,
|
|
@@ -7523,11 +7527,11 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
7523
7527
|
}
|
|
7524
7528
|
process.title = 'rsbuild-node';
|
|
7525
7529
|
let { npm_execpath } = process.env;
|
|
7526
|
-
(!npm_execpath || npm_execpath.includes('npx-cli.js') || npm_execpath.includes('.bun')) && console.log(), rslog_index_js_namespaceObject.logger.greet(` Rsbuild v1.3.
|
|
7530
|
+
(!npm_execpath || npm_execpath.includes('npx-cli.js') || npm_execpath.includes('.bun')) && console.log(), rslog_index_js_namespaceObject.logger.greet(` Rsbuild v1.3.17\n`);
|
|
7527
7531
|
try {
|
|
7528
7532
|
!function() {
|
|
7529
7533
|
let cli = cac_dist('rsbuild');
|
|
7530
|
-
cli.help(), cli.version("1.3.
|
|
7534
|
+
cli.help(), cli.version("1.3.17"), applyCommonOptions(cli);
|
|
7531
7535
|
let devCommand = cli.command('', 'starting the dev server').alias('dev'), 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');
|
|
7532
7536
|
applyServerOptions(devCommand), applyServerOptions(previewCommand), devCommand.action(async (options)=>{
|
|
7533
7537
|
try {
|
|
@@ -7578,7 +7582,7 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
7578
7582
|
rslog_index_js_namespaceObject.logger.error('Failed to start Rsbuild CLI.'), rslog_index_js_namespaceObject.logger.error(err);
|
|
7579
7583
|
}
|
|
7580
7584
|
}
|
|
7581
|
-
let src_version = "1.3.
|
|
7585
|
+
let src_version = "1.3.17";
|
|
7582
7586
|
})(), exports.PLUGIN_CSS_NAME = __webpack_exports__.PLUGIN_CSS_NAME, exports.PLUGIN_SWC_NAME = __webpack_exports__.PLUGIN_SWC_NAME, exports.createRsbuild = __webpack_exports__.createRsbuild, exports.defineConfig = __webpack_exports__.defineConfig, exports.ensureAssetPrefix = __webpack_exports__.ensureAssetPrefix, exports.loadConfig = __webpack_exports__.loadConfig, exports.loadEnv = __webpack_exports__.loadEnv, exports.logger = __webpack_exports__.logger, exports.mergeRsbuildConfig = __webpack_exports__.mergeRsbuildConfig, exports.rspack = __webpack_exports__.rspack, exports.runCLI = __webpack_exports__.runCLI, exports.version = __webpack_exports__.version, __webpack_exports__)-1 === [
|
|
7583
7587
|
"PLUGIN_CSS_NAME",
|
|
7584
7588
|
"PLUGIN_SWC_NAME",
|
package/dist/index.js
CHANGED
|
@@ -2117,7 +2117,7 @@ async function updateEnvironmentContext(context, configs) {
|
|
|
2117
2117
|
async function createContext(options, userConfig) {
|
|
2118
2118
|
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;
|
|
2119
2119
|
return {
|
|
2120
|
-
version: "1.3.
|
|
2120
|
+
version: "1.3.17",
|
|
2121
2121
|
rootPath,
|
|
2122
2122
|
distPath: '',
|
|
2123
2123
|
cachePath,
|
|
@@ -2425,15 +2425,14 @@ let configChain_CHAIN_ID = {
|
|
|
2425
2425
|
]), chain.context(api.context.rootPath), chain.mode(environment.config.mode), chain.infrastructureLogging({
|
|
2426
2426
|
level: 'error'
|
|
2427
2427
|
}), chain.watchOptions({
|
|
2428
|
-
ignored: /[\\/](?:\.git|node_modules)[\\/]/,
|
|
2429
2428
|
aggregateTimeout: 0
|
|
2430
2429
|
}), chain.performance.hints(!1), chain.module.parser.merge({
|
|
2431
2430
|
javascript: {
|
|
2432
2431
|
exportsPresence: 'error'
|
|
2433
2432
|
}
|
|
2434
|
-
}), isDev && config.dev.hmr && 'web' === target && chain.plugin(CHAIN_ID.PLUGIN.HMR).use(bundler.HotModuleReplacementPlugin), 'development' === env && chain.output.devtoolModuleFilenameTemplate((info)=>toPosixPath(info.absoluteResourcePath)), process.env.RSPACK_CONFIG_VALIDATE ||= 'loose-unrecognized-keys',
|
|
2433
|
+
}), isDev && config.dev.hmr && 'web' === target && chain.plugin(CHAIN_ID.PLUGIN.HMR).use(bundler.HotModuleReplacementPlugin), 'development' === env && chain.output.devtoolModuleFilenameTemplate((info)=>toPosixPath(info.absoluteResourcePath)), process.env.RSPACK_CONFIG_VALIDATE ||= 'loose-unrecognized-keys', 'rspack' === api.context.bundlerType && chain.experiments({
|
|
2435
2434
|
...chain.get('experiments'),
|
|
2436
|
-
incremental:
|
|
2435
|
+
incremental: !0
|
|
2437
2436
|
});
|
|
2438
2437
|
});
|
|
2439
2438
|
}
|
|
@@ -3518,6 +3517,7 @@ let generateManifest = (htmlPaths, manifestOptions, environment)=>(_seed, files)
|
|
|
3518
3517
|
}, pluginManifest = ()=>({
|
|
3519
3518
|
name: 'rsbuild:manifest',
|
|
3520
3519
|
setup (api) {
|
|
3520
|
+
let manifestFilenames = new Map();
|
|
3521
3521
|
api.modifyBundlerChain(async (chain, { CHAIN_ID, environment, isDev })=>{
|
|
3522
3522
|
let { output: { manifest }, dev: { writeToDisk } } = environment.config;
|
|
3523
3523
|
if (!1 === manifest) return;
|
|
@@ -3533,7 +3533,7 @@ let generateManifest = (htmlPaths, manifestOptions, environment)=>(_seed, files)
|
|
|
3533
3533
|
...manifest
|
|
3534
3534
|
};
|
|
3535
3535
|
}(manifest), { RspackManifestPlugin } = await import("../compiled/rspack-manifest-plugin/index.js"), { htmlPaths } = environment, filter = manifestOptions.filter ?? ((file)=>!file.name.endsWith('.LICENSE.txt'));
|
|
3536
|
-
chain.plugin(CHAIN_ID.PLUGIN.MANIFEST).use(RspackManifestPlugin, [
|
|
3536
|
+
manifestFilenames.set(environment.name, manifestOptions.filename), chain.plugin(CHAIN_ID.PLUGIN.MANIFEST).use(RspackManifestPlugin, [
|
|
3537
3537
|
{
|
|
3538
3538
|
fileName: manifestOptions.filename,
|
|
3539
3539
|
filter,
|
|
@@ -3541,6 +3541,10 @@ let generateManifest = (htmlPaths, manifestOptions, environment)=>(_seed, files)
|
|
|
3541
3541
|
generate: generateManifest(htmlPaths, manifestOptions, environment)
|
|
3542
3542
|
}
|
|
3543
3543
|
]);
|
|
3544
|
+
}), api.onAfterCreateCompiler(()=>{
|
|
3545
|
+
if (manifestFilenames.size <= 1) return void manifestFilenames.clear();
|
|
3546
|
+
let environmentNames = Array.from(manifestFilenames.keys()), filenames = Array.from(manifestFilenames.values());
|
|
3547
|
+
new Set(filenames).size !== filenames.length && __WEBPACK_EXTERNAL_MODULE__compiled_rslog_index_js_c302f6e3__.logger.warn(`[rsbuild:manifest] The \`manifest.filename\` option must be unique when there are multiple environments (${environmentNames.join(', ')}), otherwise the manifest file will be overwritten.`), manifestFilenames.clear();
|
|
3544
3548
|
});
|
|
3545
3549
|
}
|
|
3546
3550
|
});
|
|
@@ -5176,14 +5180,7 @@ let closeCode = [
|
|
|
5176
5180
|
29,
|
|
5177
5181
|
39,
|
|
5178
5182
|
49
|
|
5179
|
-
]
|
|
5180
|
-
let ansiCodes = [], ret = text.replace(/\x1B\[([0-9;]+)m/g, (_match, sequences)=>{
|
|
5181
|
-
let style = '';
|
|
5182
|
-
for (let seq of sequences.split(';'))styles[seq] && (style += `${styles[seq]};`);
|
|
5183
|
-
return style ? (ansiCodes.push(sequences), `<span style="${style}">`) : closeCode.includes(Number(sequences)) && ansiCodes.length > 0 ? (ansiCodes.pop(), '</span>') : '';
|
|
5184
|
-
});
|
|
5185
|
-
return ansiCodes.length > 0 && (ret += Array(ansiCodes.length + 1).join('</span>')), ret;
|
|
5186
|
-
};
|
|
5183
|
+
];
|
|
5187
5184
|
function socketServer_define_property(obj, key, value) {
|
|
5188
5185
|
return key in obj ? Object.defineProperty(obj, key, {
|
|
5189
5186
|
value: value,
|
|
@@ -5310,7 +5307,14 @@ class SocketServer {
|
|
|
5310
5307
|
text: formattedErrors,
|
|
5311
5308
|
html: function(errors, root) {
|
|
5312
5309
|
let htmlItems = errors.map((item)=>{
|
|
5313
|
-
var text =
|
|
5310
|
+
var text = function(text) {
|
|
5311
|
+
let ansiCodes = [], ret = text.replace(/\x1B\[([0-9;]+)m/g, (_match, sequences)=>{
|
|
5312
|
+
let style = '';
|
|
5313
|
+
for (let seq of sequences.split(';'))styles[seq] && (style += `${styles[seq]};`);
|
|
5314
|
+
return style ? (ansiCodes.push(sequences), `<span style="${style}">`) : closeCode.includes(Number(sequences)) && ansiCodes.length > 0 ? (ansiCodes.pop(), '</span>') : '';
|
|
5315
|
+
});
|
|
5316
|
+
return ansiCodes.length > 0 && (ret += Array(ansiCodes.length + 1).join('</span>')), ret;
|
|
5317
|
+
}(item ? item.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/'/g, ''') : ''), root1 = root;
|
|
5314
5318
|
let pathRegex = /(?:\.\.?[\/\\]|[a-zA-Z]:\\|\/)[^:]*:\d+:\d+/g, urlRegex = /(https?:\/\/(?:[\w-]+\.)+[a-z0-9](?:[\w-.~:/?#[\]@!$&'*+,;=])*)/gi;
|
|
5315
5319
|
return text.split('\n').map((line)=>{
|
|
5316
5320
|
let replacedLine = line.replace(pathRegex, (file)=>{
|
|
@@ -6850,7 +6854,7 @@ async function createRsbuild(options = {}) {
|
|
|
6850
6854
|
handler: (chain, { target, environment })=>{
|
|
6851
6855
|
if (descriptor.targets && !descriptor.targets.includes(target) || descriptor.environments && !descriptor.environments.includes(environment.name)) return;
|
|
6852
6856
|
let rule = chain.module.rule(id);
|
|
6853
|
-
descriptor.test && rule.test(descriptor.test), descriptor.resourceQuery && rule.resourceQuery(descriptor.resourceQuery), descriptor.layer && rule.layer(descriptor.layer), descriptor.issuerLayer && rule.issuerLayer(descriptor.issuerLayer), descriptor.issuer && rule.issuer(descriptor.issuer), descriptor.with && rule.with(descriptor.with);
|
|
6857
|
+
descriptor.test && rule.test(descriptor.test), descriptor.resourceQuery && rule.resourceQuery(descriptor.resourceQuery), descriptor.layer && rule.layer(descriptor.layer), descriptor.issuerLayer && rule.issuerLayer(descriptor.issuerLayer), descriptor.issuer && rule.issuer(descriptor.issuer), descriptor.with && rule.with(descriptor.with), descriptor.mimetype && rule.mimetype(descriptor.mimetype), descriptor.enforce && rule.enforce(descriptor.enforce);
|
|
6854
6858
|
let loaderName = descriptor.raw ? 'transformRawLoader.mjs' : 'transformLoader.mjs', loaderPath = (0, __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__.join)(LOADER_PATH, loaderName);
|
|
6855
6859
|
rule.use(id).loader(loaderPath).options({
|
|
6856
6860
|
id,
|
|
@@ -7358,11 +7362,11 @@ async function runCLI() {
|
|
|
7358
7362
|
}
|
|
7359
7363
|
process.title = 'rsbuild-node';
|
|
7360
7364
|
let { npm_execpath } = process.env;
|
|
7361
|
-
(!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.3.
|
|
7365
|
+
(!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.3.17\n`);
|
|
7362
7366
|
try {
|
|
7363
7367
|
!function() {
|
|
7364
7368
|
let cli = cac_dist('rsbuild');
|
|
7365
|
-
cli.help(), cli.version("1.3.
|
|
7369
|
+
cli.help(), cli.version("1.3.17"), applyCommonOptions(cli);
|
|
7366
7370
|
let devCommand = cli.command('', 'starting the dev server').alias('dev'), 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');
|
|
7367
7371
|
applyServerOptions(devCommand), applyServerOptions(previewCommand), devCommand.action(async (options)=>{
|
|
7368
7372
|
try {
|
|
@@ -7413,6 +7417,6 @@ async function runCLI() {
|
|
|
7413
7417
|
__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);
|
|
7414
7418
|
}
|
|
7415
7419
|
}
|
|
7416
|
-
let src_version = "1.3.
|
|
7420
|
+
let src_version = "1.3.17";
|
|
7417
7421
|
var __webpack_exports__logger = __WEBPACK_EXTERNAL_MODULE__compiled_rslog_index_js_c302f6e3__.logger, __webpack_exports__rspack = __WEBPACK_EXTERNAL_MODULE__rspack_core_e0096ff7__.rspack;
|
|
7418
7422
|
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 };
|
|
@@ -1032,9 +1032,22 @@ export type HtmlBasicTag = {
|
|
|
1032
1032
|
children?: string;
|
|
1033
1033
|
};
|
|
1034
1034
|
export type HtmlTag = HtmlBasicTag & {
|
|
1035
|
+
/** @default false */
|
|
1035
1036
|
hash?: boolean | string | ((url: string, hash: string) => string);
|
|
1037
|
+
/** @default true */
|
|
1036
1038
|
publicPath?: boolean | string | ((url: string, publicPath: string) => string);
|
|
1039
|
+
/**
|
|
1040
|
+
* Defines the injection position of the current tag relative to existing tags
|
|
1041
|
+
* - When set to `true`, the tag will be inserted after existing tags
|
|
1042
|
+
* - When set to `false`, the tag will be inserted before existing tags
|
|
1043
|
+
* @default true
|
|
1044
|
+
*/
|
|
1037
1045
|
append?: boolean;
|
|
1046
|
+
/**
|
|
1047
|
+
* Specifies whether to add the current tag to the HTML `<head>` element
|
|
1048
|
+
* @default defaults to `true` for element types allowed in the `<head>`, otherwise `false`
|
|
1049
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/head#see_also
|
|
1050
|
+
*/
|
|
1038
1051
|
head?: boolean;
|
|
1039
1052
|
};
|
|
1040
1053
|
export type HtmlTagContext = {
|
|
@@ -261,9 +261,8 @@ export type TransformDescriptor = {
|
|
|
261
261
|
*/
|
|
262
262
|
raw?: boolean;
|
|
263
263
|
/**
|
|
264
|
-
*
|
|
265
|
-
*
|
|
266
|
-
* split chunks, stats or entry options.
|
|
264
|
+
* Marks the layer of the matching module, can be used to group a group of
|
|
265
|
+
* modules into one layer
|
|
267
266
|
* @see https://rspack.dev/config/module#rulelayer
|
|
268
267
|
*/
|
|
269
268
|
layer?: string;
|
|
@@ -275,15 +274,31 @@ export type TransformDescriptor = {
|
|
|
275
274
|
issuerLayer?: string;
|
|
276
275
|
/**
|
|
277
276
|
* Matches all modules that match this resource, and will match against Resource
|
|
278
|
-
* (the absolute path without query and fragment) of the module that issued the
|
|
277
|
+
* (the absolute path without query and fragment) of the module that issued the
|
|
278
|
+
* current module.
|
|
279
279
|
* @see https://rspack.dev/config/module#ruleissuer
|
|
280
280
|
*/
|
|
281
281
|
issuer?: Rspack.RuleSetCondition;
|
|
282
282
|
/**
|
|
283
|
-
*
|
|
283
|
+
* Matches [import attributes](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import/with)
|
|
284
284
|
* @see https://rspack.dev/config/module#rulewith
|
|
285
285
|
*/
|
|
286
286
|
with?: Record<string, Rspack.RuleSetCondition>;
|
|
287
|
+
/**
|
|
288
|
+
* Matches modules based on MIME type instead of file extension. It's primarily
|
|
289
|
+
* useful for data URI module (like `data:text/javascript,...`).
|
|
290
|
+
* @see https://rspack.dev/config/module#rulemimetype
|
|
291
|
+
*/
|
|
292
|
+
mimetype?: Rspack.RuleSetCondition;
|
|
293
|
+
/**
|
|
294
|
+
* Specifies the execution order of the transform function.
|
|
295
|
+
* - When specified as 'pre', the transform function will execute before other
|
|
296
|
+
* transform functions (or Rspack loaders).
|
|
297
|
+
* - When specified as 'post', the transform function will execute after other
|
|
298
|
+
* transform functions (or Rspack loaders).
|
|
299
|
+
* @see https://rspack.dev/config/module#ruleenforce
|
|
300
|
+
*/
|
|
301
|
+
enforce?: 'pre' | 'post';
|
|
287
302
|
};
|
|
288
303
|
export type TransformHook = (descriptor: TransformDescriptor, handler: TransformHandler) => void;
|
|
289
304
|
export type ProcessAssetsStage = 'additional' | 'pre-process' | 'derived' | 'additions' | 'none' | 'optimize' | 'optimize-count' | 'optimize-compatibility' | 'optimize-size' | 'dev-tooling' | 'optimize-inline' | 'summarize' | 'optimize-hash' | 'optimize-transfer' | 'analyse' | 'report';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/core",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.17",
|
|
4
4
|
"description": "The Rspack-based build tool.",
|
|
5
5
|
"homepage": "https://rsbuild.dev",
|
|
6
6
|
"bugs": {
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"types.d.ts"
|
|
47
47
|
],
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@rspack/core": "1.3.
|
|
49
|
+
"@rspack/core": "1.3.9",
|
|
50
50
|
"@rspack/lite-tapable": "~1.0.1",
|
|
51
51
|
"@swc/helpers": "^0.5.17",
|
|
52
52
|
"core-js": "~3.42.0",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"deepmerge": "^4.3.1",
|
|
71
71
|
"dotenv": "16.5.0",
|
|
72
72
|
"dotenv-expand": "12.0.2",
|
|
73
|
-
"html-rspack-plugin": "6.
|
|
73
|
+
"html-rspack-plugin": "6.1.2",
|
|
74
74
|
"http-proxy-middleware": "^2.0.9",
|
|
75
75
|
"launch-editor-middleware": "^2.10.0",
|
|
76
76
|
"mrmime": "^2.0.1",
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"webpack": "^5.98.0",
|
|
94
94
|
"webpack-bundle-analyzer": "^4.10.2",
|
|
95
95
|
"webpack-merge": "6.0.1",
|
|
96
|
-
"ws": "^8.18.
|
|
96
|
+
"ws": "^8.18.2"
|
|
97
97
|
},
|
|
98
98
|
"engines": {
|
|
99
99
|
"node": ">=16.10.0"
|