@rslib/core 0.10.3 → 0.10.5
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/rslog/index.d.ts +69 -63
- package/compiled/rslog/package.json +1 -1
- package/dist/index.js +19 -8
- package/package.json +8 -7
|
@@ -1,67 +1,73 @@
|
|
|
1
|
-
type ColorFn = (input: string | number | null | undefined) => string;
|
|
2
|
-
|
|
3
|
-
declare let
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
1
|
+
declare type ColorFn = (input: string | number | null | undefined) => string;
|
|
2
|
+
|
|
3
|
+
declare let createLogger: (options?: Options) => Logger;
|
|
4
|
+
|
|
5
|
+
declare let LOG_TYPES: {
|
|
6
|
+
error: {
|
|
7
|
+
label: string;
|
|
8
|
+
level: "error";
|
|
9
|
+
color: ColorFn;
|
|
10
|
+
};
|
|
11
|
+
warn: {
|
|
12
|
+
label: string;
|
|
13
|
+
level: "warn";
|
|
14
|
+
color: ColorFn;
|
|
15
|
+
};
|
|
16
|
+
info: {
|
|
17
|
+
label: string;
|
|
18
|
+
level: "info";
|
|
19
|
+
color: ColorFn;
|
|
20
|
+
};
|
|
21
|
+
start: {
|
|
22
|
+
label: string;
|
|
23
|
+
level: "info";
|
|
24
|
+
color: ColorFn;
|
|
25
|
+
};
|
|
26
|
+
ready: {
|
|
27
|
+
label: string;
|
|
28
|
+
level: "info";
|
|
29
|
+
color: ColorFn;
|
|
30
|
+
};
|
|
31
|
+
success: {
|
|
32
|
+
label: string;
|
|
33
|
+
level: "info";
|
|
34
|
+
color: ColorFn;
|
|
35
|
+
};
|
|
36
|
+
log: {
|
|
37
|
+
level: "info";
|
|
38
|
+
};
|
|
39
|
+
debug: {
|
|
40
|
+
label: string;
|
|
41
|
+
level: "verbose";
|
|
42
|
+
color: ColorFn;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
declare type LogFunction = (message?: LogMessage, ...args: any[]) => void;
|
|
47
|
+
|
|
48
|
+
declare type Logger = Record<LogMethods, LogFunction> & {
|
|
49
|
+
greet: (message: string) => void;
|
|
50
|
+
level: LogLevel;
|
|
51
|
+
override: (customLogger: Partial<Record<LogMethods, LogFunction>>) => void;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
declare let logger: Logger;
|
|
55
|
+
|
|
56
|
+
declare type LogLevel = 'silent' | 'error' | 'warn' | 'info' | 'log' | 'verbose';
|
|
57
|
+
|
|
58
|
+
declare type LogMessage = unknown;
|
|
59
|
+
|
|
60
|
+
declare type LogMethods = keyof typeof LOG_TYPES;
|
|
61
|
+
|
|
62
|
+
declare interface LogType {
|
|
63
|
+
label?: string;
|
|
64
|
+
level: LogLevel;
|
|
65
|
+
color?: ColorFn;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
declare interface Options {
|
|
69
|
+
level?: LogLevel;
|
|
54
70
|
}
|
|
55
|
-
type LogMethods = keyof typeof LOG_TYPES;
|
|
56
|
-
type Logger = Record<LogMethods, LogFunction> & {
|
|
57
|
-
greet: (message: string) => void;
|
|
58
|
-
level: LogLevel;
|
|
59
|
-
override: (customLogger: Partial<Record<LogMethods, LogFunction>>) => void;
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
declare let createLogger: (options?: Options) => Logger;
|
|
63
|
-
|
|
64
|
-
declare let logger: Logger;
|
|
65
71
|
|
|
66
72
|
export { createLogger, logger };
|
|
67
73
|
export type { LogFunction, LogLevel, LogMessage, LogType, Logger, Options };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"rslog","version":"1.2.
|
|
1
|
+
{"name":"rslog","version":"1.2.9","license":"MIT","types":"index.d.ts","type":"commonjs"}
|
package/dist/index.js
CHANGED
|
@@ -198,7 +198,9 @@ const pluginLibAsset = ({ bundle })=>({
|
|
|
198
198
|
rule.generator(generatorOptions);
|
|
199
199
|
} else {
|
|
200
200
|
const rule = config.module.rule(CHAIN_ID.RULE.SVG).oneOf(CHAIN_ID.ONE_OF.SVG);
|
|
201
|
-
rule.issuer(
|
|
201
|
+
rule.issuer({
|
|
202
|
+
not: CSS_EXTENSIONS_PATTERN
|
|
203
|
+
});
|
|
202
204
|
}
|
|
203
205
|
if (bundle) config.plugins.get(CHAIN_ID.PLUGIN.MINI_CSS_EXTRACT)?.tap((options)=>[
|
|
204
206
|
{
|
|
@@ -1660,6 +1662,11 @@ const composeFormatConfig = ({ format, bundle = true, umdName, pkgJson })=>{
|
|
|
1660
1662
|
worker: false
|
|
1661
1663
|
}
|
|
1662
1664
|
};
|
|
1665
|
+
const plugins = [
|
|
1666
|
+
new __WEBPACK_EXTERNAL_MODULE__rsbuild_core_1b356efc__.rspack.experiments.RslibPlugin({
|
|
1667
|
+
interceptApiPlugin: true
|
|
1668
|
+
})
|
|
1669
|
+
];
|
|
1663
1670
|
switch(format){
|
|
1664
1671
|
case 'esm':
|
|
1665
1672
|
return {
|
|
@@ -1691,7 +1698,8 @@ const composeFormatConfig = ({ format, bundle = true, umdName, pkgJson })=>{
|
|
|
1691
1698
|
},
|
|
1692
1699
|
experiments: {
|
|
1693
1700
|
outputModule: true
|
|
1694
|
-
}
|
|
1701
|
+
},
|
|
1702
|
+
plugins
|
|
1695
1703
|
}
|
|
1696
1704
|
}
|
|
1697
1705
|
};
|
|
@@ -1717,7 +1725,8 @@ const composeFormatConfig = ({ format, bundle = true, umdName, pkgJson })=>{
|
|
|
1717
1725
|
chunkLoading: 'require',
|
|
1718
1726
|
workerChunkLoading: 'async-node',
|
|
1719
1727
|
wasmLoading: 'async-node'
|
|
1720
|
-
}
|
|
1728
|
+
},
|
|
1729
|
+
plugins
|
|
1721
1730
|
}
|
|
1722
1731
|
}
|
|
1723
1732
|
};
|
|
@@ -1745,7 +1754,8 @@ const composeFormatConfig = ({ format, bundle = true, umdName, pkgJson })=>{
|
|
|
1745
1754
|
},
|
|
1746
1755
|
optimization: {
|
|
1747
1756
|
nodeEnv: process.env.NODE_ENV
|
|
1748
|
-
}
|
|
1757
|
+
},
|
|
1758
|
+
plugins
|
|
1749
1759
|
}
|
|
1750
1760
|
}
|
|
1751
1761
|
};
|
|
@@ -1773,7 +1783,8 @@ const composeFormatConfig = ({ format, bundle = true, umdName, pkgJson })=>{
|
|
|
1773
1783
|
},
|
|
1774
1784
|
optimization: {
|
|
1775
1785
|
nodeEnv: process.env.NODE_ENV
|
|
1776
|
-
}
|
|
1786
|
+
},
|
|
1787
|
+
plugins
|
|
1777
1788
|
}
|
|
1778
1789
|
}
|
|
1779
1790
|
};
|
|
@@ -2985,7 +2996,7 @@ const applyCommonOptions = (cli)=>{
|
|
|
2985
2996
|
function runCli() {
|
|
2986
2997
|
const cli = dist('rslib');
|
|
2987
2998
|
cli.help();
|
|
2988
|
-
cli.version("0.10.
|
|
2999
|
+
cli.version("0.10.5");
|
|
2989
3000
|
applyCommonOptions(cli);
|
|
2990
3001
|
const buildCommand = cli.command('build', 'build the library for production');
|
|
2991
3002
|
const inspectCommand = cli.command('inspect', 'inspect the Rsbuild / Rspack configs of Rslib projects');
|
|
@@ -3056,8 +3067,8 @@ function prepareCli() {
|
|
|
3056
3067
|
initNodeEnv();
|
|
3057
3068
|
const { npm_execpath } = process.env;
|
|
3058
3069
|
if (!npm_execpath || npm_execpath.includes('npx-cli.js') || npm_execpath.includes('.bun')) console.log();
|
|
3059
|
-
logger.greet(` Rslib v0.10.
|
|
3070
|
+
logger.greet(` Rslib v0.10.5\n`);
|
|
3060
3071
|
}
|
|
3061
|
-
const src_version = "0.10.
|
|
3072
|
+
const src_version = "0.10.5";
|
|
3062
3073
|
var __webpack_exports__rspack = __WEBPACK_EXTERNAL_MODULE__rsbuild_core_1b356efc__.rspack;
|
|
3063
3074
|
export { build, defineConfig, inspect, loadConfig, logger, prepareCli, __WEBPACK_EXTERNAL_MODULE__rsbuild_core_1b356efc__ as rsbuild, runCli, startMFDevServer, composeCreateRsbuildConfig as unstable_composeCreateRsbuildConfig, src_version as version, __webpack_exports__rspack as rspack };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rslib/core",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.5",
|
|
4
4
|
"description": "The Rsbuild-based library development tool.",
|
|
5
5
|
"homepage": "https://rslib.rs",
|
|
6
6
|
"bugs": {
|
|
@@ -36,22 +36,22 @@
|
|
|
36
36
|
"types.d.ts"
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@rsbuild/core": "1.4.
|
|
39
|
+
"@rsbuild/core": "~1.4.3",
|
|
40
40
|
"tinyglobby": "^0.2.14",
|
|
41
|
-
"rsbuild-plugin-dts": "0.10.
|
|
41
|
+
"rsbuild-plugin-dts": "0.10.5"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@module-federation/rsbuild-plugin": "^0.
|
|
44
|
+
"@module-federation/rsbuild-plugin": "^0.16.0",
|
|
45
45
|
"@types/fs-extra": "^11.0.4",
|
|
46
46
|
"cac": "^6.7.14",
|
|
47
47
|
"chokidar": "^4.0.3",
|
|
48
48
|
"fs-extra": "^11.3.0",
|
|
49
49
|
"memfs": "^4.17.2",
|
|
50
50
|
"picocolors": "1.1.1",
|
|
51
|
-
"prebundle": "1.3.
|
|
51
|
+
"prebundle": "1.3.4",
|
|
52
52
|
"rsbuild-plugin-publint": "^0.3.2",
|
|
53
|
-
"rslib": "npm:@rslib/core@0.10.
|
|
54
|
-
"rslog": "^1.2.
|
|
53
|
+
"rslib": "npm:@rslib/core@0.10.4",
|
|
54
|
+
"rslog": "^1.2.9",
|
|
55
55
|
"tsconfck": "3.1.6",
|
|
56
56
|
"typescript": "^5.8.3",
|
|
57
57
|
"@rslib/tsconfig": "0.0.1"
|
|
@@ -80,6 +80,7 @@
|
|
|
80
80
|
"build": "rslib build",
|
|
81
81
|
"dev": "rslib build --watch",
|
|
82
82
|
"prebundle": "prebundle",
|
|
83
|
+
"test": "rstest run",
|
|
83
84
|
"type-check": "tsc --noEmit && tsc --noEmit -p tests"
|
|
84
85
|
}
|
|
85
86
|
}
|