@rsbuild/core 1.6.10 → 1.6.12-canary-63b4dae2-20251204065915
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 -18
- package/compiled/html-rspack-plugin/index.js +14 -14
- package/compiled/memfs/index.js +123 -121
- package/compiled/memfs/package.json +1 -1
- package/compiled/postcss-loader/index.js +6 -6
- package/compiled/rslog/index.js +12 -9
- package/compiled/rslog/package.json +1 -1
- package/compiled/rspack-manifest-plugin/index.js +4 -4
- package/compiled/webpack-merge/index.d.ts +31 -0
- package/compiled/webpack-merge/index.js +1200 -0
- package/compiled/webpack-merge/license +20 -0
- package/compiled/webpack-merge/package.json +1 -0
- package/dist/0~range-parser.js +1 -1
- package/dist/131.js +262 -861
- package/dist/131.js.LICENSE.txt +0 -21
- package/dist/136.mjs +1 -1
- package/dist/2~open.cjs +1 -1
- package/dist/2~range-parser.cjs +1 -1
- package/dist/index.cjs +272 -884
- package/dist/index.cjs.LICENSE.txt +0 -21
- package/dist/rslib-runtime.js +1 -1
- package/dist-types/constants.d.ts +1 -0
- package/dist-types/helpers/format.d.ts +1 -1
- package/dist-types/helpers/stats.d.ts +1 -1
- package/dist-types/helpers/vendors.d.ts +1 -0
- package/dist-types/plugins/fileSize.d.ts +2 -0
- package/dist-types/server/socketServer.d.ts +4 -0
- package/dist-types/types/config.d.ts +11 -0
- package/package.json +5 -5
package/compiled/rslog/index.js
CHANGED
|
@@ -24,8 +24,8 @@ var __webpack_require__ = {};
|
|
|
24
24
|
var __webpack_exports__ = {};
|
|
25
25
|
__webpack_require__.r(__webpack_exports__);
|
|
26
26
|
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
createLogger: ()=>createLogger,
|
|
28
|
+
logger: ()=>src_logger
|
|
29
29
|
});
|
|
30
30
|
const external_node_process_namespaceObject = require("node:process");
|
|
31
31
|
const external_node_os_namespaceObject = require("node:os");
|
|
@@ -132,9 +132,10 @@ const supportsColor = {
|
|
|
132
132
|
};
|
|
133
133
|
const supports_color = supportsColor;
|
|
134
134
|
const colorLevel = supports_color.stdout ? supports_color.stdout.level : 0;
|
|
135
|
-
let errorStackRegExp = /at\
|
|
136
|
-
let anonymousErrorStackRegExp = /at\
|
|
137
|
-
let
|
|
135
|
+
let errorStackRegExp = /at [^\r\n]{0,200}:\d+:\d+[\s\)]*$/;
|
|
136
|
+
let anonymousErrorStackRegExp = /at [^\r\n]{0,200}\(<anonymous>\)$/;
|
|
137
|
+
let indexErrorStackRegExp = /at [^\r\n]{0,200}\(index\s\d+\)$/;
|
|
138
|
+
let isErrorStackMessage = (message)=>errorStackRegExp.test(message) || anonymousErrorStackRegExp.test(message) || indexErrorStackRegExp.test(message);
|
|
138
139
|
let formatter = (open, close, replace = open)=>colorLevel >= 2 ? (input)=>{
|
|
139
140
|
let string = '' + input;
|
|
140
141
|
let index = string.indexOf(close, open.length);
|
|
@@ -246,9 +247,10 @@ const normalizeErrorMessage = (err)=>{
|
|
|
246
247
|
let createLogger = (options = {})=>{
|
|
247
248
|
let maxLevel = options.level || 'info';
|
|
248
249
|
let log = (type, message, ...args)=>{
|
|
249
|
-
if (LOG_LEVEL[LOG_TYPES[type].level] > LOG_LEVEL[maxLevel]) return;
|
|
250
|
-
if (null == message) return console.log();
|
|
251
250
|
let logType = LOG_TYPES[type];
|
|
251
|
+
const { level } = logType;
|
|
252
|
+
if (LOG_LEVEL[level] > LOG_LEVEL[maxLevel]) return;
|
|
253
|
+
if (null == message) return console.log();
|
|
252
254
|
let label = '';
|
|
253
255
|
let text = '';
|
|
254
256
|
if ('label' in logType) {
|
|
@@ -262,11 +264,12 @@ let createLogger = (options = {})=>{
|
|
|
262
264
|
text += yellow('\n [cause]: ');
|
|
263
265
|
text += cause instanceof Error ? normalizeErrorMessage(cause) : String(cause);
|
|
264
266
|
}
|
|
265
|
-
} else if ('error' ===
|
|
267
|
+
} else if ('error' === level && 'string' == typeof message) {
|
|
266
268
|
let lines = message.split('\n');
|
|
267
269
|
text = lines.map((line)=>isErrorStackMessage(line) ? gray(line) : line).join('\n');
|
|
268
270
|
} else text = `${message}`;
|
|
269
|
-
|
|
271
|
+
const method = 'error' === level || 'warn' === level ? level : 'log';
|
|
272
|
+
console[method](label.length ? `${label} ${text}` : text, ...args);
|
|
270
273
|
};
|
|
271
274
|
let logger = {
|
|
272
275
|
greet: (message)=>log('log', gradient(message))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"rslog","version":"1.3.
|
|
1
|
+
{"name":"rslog","version":"1.3.2","license":"MIT","types":"index.d.ts","type":"commonjs"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
"use strict";
|
|
3
3
|
var __webpack_modules__ = {
|
|
4
|
-
|
|
4
|
+
422: (__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
|
+
151: (__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 node_fs_1 = __nccwpck_require__(24);
|
|
131
131
|
const node_path_1 = __nccwpck_require__(760);
|
|
132
132
|
const lite_tapable_1 = __nccwpck_require__(408);
|
|
133
|
-
const helpers_1 = __nccwpck_require__(
|
|
133
|
+
const helpers_1 = __nccwpck_require__(422);
|
|
134
134
|
const compilerHookMap = new WeakMap();
|
|
135
135
|
const getCompilerHooks = (compiler) => {
|
|
136
136
|
let hooks = compilerHookMap.get(compiler);
|
|
@@ -327,7 +327,7 @@
|
|
|
327
327
|
exports.getCompilerHooks =
|
|
328
328
|
void 0;
|
|
329
329
|
const node_path_1 = __nccwpck_require__(760);
|
|
330
|
-
const hooks_1 = __nccwpck_require__(
|
|
330
|
+
const hooks_1 = __nccwpck_require__(151);
|
|
331
331
|
Object.defineProperty(exports, "getCompilerHooks", {
|
|
332
332
|
enumerable: true,
|
|
333
333
|
get: function () {
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
declare function mergeUnique(key: string, uniques: string[], getter: (a: object) => string): (a: [], b: [], k: string) => false | any[];
|
|
2
|
+
|
|
3
|
+
type Key = string;
|
|
4
|
+
type Customize = (a: any, b: any, key: Key) => any;
|
|
5
|
+
interface ICustomizeOptions {
|
|
6
|
+
customizeArray?: Customize;
|
|
7
|
+
customizeObject?: Customize;
|
|
8
|
+
}
|
|
9
|
+
declare enum CustomizeRule {
|
|
10
|
+
Match = "match",
|
|
11
|
+
Merge = "merge",
|
|
12
|
+
Append = "append",
|
|
13
|
+
Prepend = "prepend",
|
|
14
|
+
Replace = "replace"
|
|
15
|
+
}
|
|
16
|
+
type CustomizeRuleString = "match" | "merge" | "append" | "prepend" | "replace";
|
|
17
|
+
|
|
18
|
+
declare function merge<Configuration extends object>(firstConfiguration: Configuration | Configuration[], ...configurations: Configuration[]): Configuration;
|
|
19
|
+
declare function mergeWithCustomize<Configuration extends object>(options: ICustomizeOptions): (firstConfiguration: Configuration | Configuration[], ...configurations: Configuration[]) => Configuration;
|
|
20
|
+
declare function customizeArray(rules: {
|
|
21
|
+
[s: string]: CustomizeRule | CustomizeRuleString;
|
|
22
|
+
}): (a: any, b: any, key: Key) => any;
|
|
23
|
+
type Rules = {
|
|
24
|
+
[s: string]: CustomizeRule | CustomizeRuleString | Rules;
|
|
25
|
+
};
|
|
26
|
+
declare function mergeWithRules(rules: Rules): (firstConfiguration: object | object[], ...configurations: object[]) => object;
|
|
27
|
+
declare function customizeObject(rules: {
|
|
28
|
+
[s: string]: CustomizeRule | CustomizeRuleString;
|
|
29
|
+
}): (a: any, b: any, key: Key) => any;
|
|
30
|
+
|
|
31
|
+
export { CustomizeRule, customizeArray, customizeObject, merge as default, merge, mergeWithCustomize, mergeWithRules, mergeUnique as unique };
|