@rslib/core 0.10.2 → 0.10.4
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 +16 -10
- package/package.json +5 -5
|
@@ -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.8","types":"index.d.ts","type":"commonjs"}
|
package/dist/index.js
CHANGED
|
@@ -1587,9 +1587,6 @@ function composeDecoratorsConfig(compilerOptions, version) {
|
|
|
1587
1587
|
}
|
|
1588
1588
|
async function createConstantRsbuildConfig() {
|
|
1589
1589
|
return (0, __WEBPACK_EXTERNAL_MODULE__rsbuild_core_1b356efc__.defineConfig)({
|
|
1590
|
-
dev: {
|
|
1591
|
-
progressBar: false
|
|
1592
|
-
},
|
|
1593
1590
|
performance: {
|
|
1594
1591
|
chunkSplit: {
|
|
1595
1592
|
strategy: 'custom'
|
|
@@ -1663,6 +1660,11 @@ const composeFormatConfig = ({ format, bundle = true, umdName, pkgJson })=>{
|
|
|
1663
1660
|
worker: false
|
|
1664
1661
|
}
|
|
1665
1662
|
};
|
|
1663
|
+
const plugins = [
|
|
1664
|
+
new __WEBPACK_EXTERNAL_MODULE__rsbuild_core_1b356efc__.rspack.experiments.RslibPlugin({
|
|
1665
|
+
interceptApiPlugin: true
|
|
1666
|
+
})
|
|
1667
|
+
];
|
|
1666
1668
|
switch(format){
|
|
1667
1669
|
case 'esm':
|
|
1668
1670
|
return {
|
|
@@ -1694,7 +1696,8 @@ const composeFormatConfig = ({ format, bundle = true, umdName, pkgJson })=>{
|
|
|
1694
1696
|
},
|
|
1695
1697
|
experiments: {
|
|
1696
1698
|
outputModule: true
|
|
1697
|
-
}
|
|
1699
|
+
},
|
|
1700
|
+
plugins
|
|
1698
1701
|
}
|
|
1699
1702
|
}
|
|
1700
1703
|
};
|
|
@@ -1720,7 +1723,8 @@ const composeFormatConfig = ({ format, bundle = true, umdName, pkgJson })=>{
|
|
|
1720
1723
|
chunkLoading: 'require',
|
|
1721
1724
|
workerChunkLoading: 'async-node',
|
|
1722
1725
|
wasmLoading: 'async-node'
|
|
1723
|
-
}
|
|
1726
|
+
},
|
|
1727
|
+
plugins
|
|
1724
1728
|
}
|
|
1725
1729
|
}
|
|
1726
1730
|
};
|
|
@@ -1748,7 +1752,8 @@ const composeFormatConfig = ({ format, bundle = true, umdName, pkgJson })=>{
|
|
|
1748
1752
|
},
|
|
1749
1753
|
optimization: {
|
|
1750
1754
|
nodeEnv: process.env.NODE_ENV
|
|
1751
|
-
}
|
|
1755
|
+
},
|
|
1756
|
+
plugins
|
|
1752
1757
|
}
|
|
1753
1758
|
}
|
|
1754
1759
|
};
|
|
@@ -1776,7 +1781,8 @@ const composeFormatConfig = ({ format, bundle = true, umdName, pkgJson })=>{
|
|
|
1776
1781
|
},
|
|
1777
1782
|
optimization: {
|
|
1778
1783
|
nodeEnv: process.env.NODE_ENV
|
|
1779
|
-
}
|
|
1784
|
+
},
|
|
1785
|
+
plugins
|
|
1780
1786
|
}
|
|
1781
1787
|
}
|
|
1782
1788
|
};
|
|
@@ -2988,7 +2994,7 @@ const applyCommonOptions = (cli)=>{
|
|
|
2988
2994
|
function runCli() {
|
|
2989
2995
|
const cli = dist('rslib');
|
|
2990
2996
|
cli.help();
|
|
2991
|
-
cli.version("0.10.
|
|
2997
|
+
cli.version("0.10.4");
|
|
2992
2998
|
applyCommonOptions(cli);
|
|
2993
2999
|
const buildCommand = cli.command('build', 'build the library for production');
|
|
2994
3000
|
const inspectCommand = cli.command('inspect', 'inspect the Rsbuild / Rspack configs of Rslib projects');
|
|
@@ -3059,8 +3065,8 @@ function prepareCli() {
|
|
|
3059
3065
|
initNodeEnv();
|
|
3060
3066
|
const { npm_execpath } = process.env;
|
|
3061
3067
|
if (!npm_execpath || npm_execpath.includes('npx-cli.js') || npm_execpath.includes('.bun')) console.log();
|
|
3062
|
-
logger.greet(` Rslib v0.10.
|
|
3068
|
+
logger.greet(` Rslib v0.10.4\n`);
|
|
3063
3069
|
}
|
|
3064
|
-
const src_version = "0.10.
|
|
3070
|
+
const src_version = "0.10.4";
|
|
3065
3071
|
var __webpack_exports__rspack = __WEBPACK_EXTERNAL_MODULE__rsbuild_core_1b356efc__.rspack;
|
|
3066
3072
|
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.4",
|
|
4
4
|
"description": "The Rsbuild-based library development tool.",
|
|
5
5
|
"homepage": "https://rslib.rs",
|
|
6
6
|
"bugs": {
|
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
"types.d.ts"
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@rsbuild/core": "1.4.0
|
|
39
|
+
"@rsbuild/core": "~1.4.0",
|
|
40
40
|
"tinyglobby": "^0.2.14",
|
|
41
|
-
"rsbuild-plugin-dts": "0.10.
|
|
41
|
+
"rsbuild-plugin-dts": "0.10.4"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@module-federation/rsbuild-plugin": "^0.15.0",
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
"picocolors": "1.1.1",
|
|
51
51
|
"prebundle": "1.3.3",
|
|
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.3",
|
|
54
|
+
"rslog": "^1.2.8",
|
|
55
55
|
"tsconfck": "3.1.6",
|
|
56
56
|
"typescript": "^5.8.3",
|
|
57
57
|
"@rslib/tsconfig": "0.0.1"
|