@rslib/core 0.11.1 → 0.11.2
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 +63 -69
- package/compiled/rslog/index.js +1 -0
- package/compiled/rslog/package.json +1 -1
- package/dist/index.js +3 -3
- package/package.json +8 -9
|
@@ -1,73 +1,67 @@
|
|
|
1
|
-
|
|
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
|
-
|
|
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;
|
|
1
|
+
type ColorFn = (input: string | number | null | undefined) => string;
|
|
2
|
+
|
|
3
|
+
declare let LOG_TYPES: {
|
|
4
|
+
error: {
|
|
5
|
+
label: string;
|
|
6
|
+
level: "error";
|
|
7
|
+
color: ColorFn;
|
|
8
|
+
};
|
|
9
|
+
warn: {
|
|
10
|
+
label: string;
|
|
11
|
+
level: "warn";
|
|
12
|
+
color: ColorFn;
|
|
13
|
+
};
|
|
14
|
+
info: {
|
|
15
|
+
label: string;
|
|
16
|
+
level: "info";
|
|
17
|
+
color: ColorFn;
|
|
18
|
+
};
|
|
19
|
+
start: {
|
|
20
|
+
label: string;
|
|
21
|
+
level: "info";
|
|
22
|
+
color: ColorFn;
|
|
23
|
+
};
|
|
24
|
+
ready: {
|
|
25
|
+
label: string;
|
|
26
|
+
level: "info";
|
|
27
|
+
color: ColorFn;
|
|
28
|
+
};
|
|
29
|
+
success: {
|
|
30
|
+
label: string;
|
|
31
|
+
level: "info";
|
|
32
|
+
color: ColorFn;
|
|
33
|
+
};
|
|
34
|
+
log: {
|
|
35
|
+
level: "info";
|
|
36
|
+
};
|
|
37
|
+
debug: {
|
|
38
|
+
label: string;
|
|
39
|
+
level: "verbose";
|
|
40
|
+
color: ColorFn;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
type LogLevel = 'silent' | 'error' | 'warn' | 'info' | 'log' | 'verbose';
|
|
45
|
+
type LogMessage = unknown;
|
|
46
|
+
interface LogType {
|
|
47
|
+
label?: string;
|
|
48
|
+
level: LogLevel;
|
|
49
|
+
color?: ColorFn;
|
|
50
|
+
}
|
|
51
|
+
type LogFunction = (message?: LogMessage, ...args: any[]) => void;
|
|
52
|
+
interface Options {
|
|
53
|
+
level?: LogLevel;
|
|
70
54
|
}
|
|
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;
|
|
71
65
|
|
|
72
66
|
export { createLogger, logger };
|
|
73
67
|
export type { LogFunction, LogLevel, LogMessage, LogType, Logger, Options };
|
package/compiled/rslog/index.js
CHANGED
|
@@ -99,6 +99,7 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
|
99
99
|
if ('TEAMCITY_VERSION' in env) return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
|
100
100
|
if ('truecolor' === env.COLORTERM) return 3;
|
|
101
101
|
if ('xterm-kitty' === env.TERM) return 3;
|
|
102
|
+
if ('xterm-ghostty' === env.TERM) return 3;
|
|
102
103
|
if ('TERM_PROGRAM' in env) {
|
|
103
104
|
const version = Number.parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
|
|
104
105
|
switch(env.TERM_PROGRAM){
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"rslog","version":"1.2.
|
|
1
|
+
{"name":"rslog","version":"1.2.11","license":"MIT","types":"index.d.ts","type":"commonjs"}
|
package/dist/index.js
CHANGED
|
@@ -3004,7 +3004,7 @@ const applyCommonOptions = (cli)=>{
|
|
|
3004
3004
|
function runCli() {
|
|
3005
3005
|
const cli = dist('rslib');
|
|
3006
3006
|
cli.help();
|
|
3007
|
-
cli.version("0.11.
|
|
3007
|
+
cli.version("0.11.2");
|
|
3008
3008
|
applyCommonOptions(cli);
|
|
3009
3009
|
const buildCommand = cli.command('build', 'build the library for production');
|
|
3010
3010
|
const inspectCommand = cli.command('inspect', 'inspect the Rsbuild / Rspack configs of Rslib projects');
|
|
@@ -3075,8 +3075,8 @@ function prepareCli() {
|
|
|
3075
3075
|
initNodeEnv();
|
|
3076
3076
|
const { npm_execpath } = process.env;
|
|
3077
3077
|
if (!npm_execpath || npm_execpath.includes('npx-cli.js') || npm_execpath.includes('.bun')) console.log();
|
|
3078
|
-
logger.greet(` Rslib v0.11.
|
|
3078
|
+
logger.greet(` Rslib v0.11.2\n`);
|
|
3079
3079
|
}
|
|
3080
|
-
const src_version = "0.11.
|
|
3080
|
+
const src_version = "0.11.2";
|
|
3081
3081
|
var __webpack_exports__rspack = __WEBPACK_EXTERNAL_MODULE__rsbuild_core_1b356efc__.rspack;
|
|
3082
3082
|
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.11.
|
|
3
|
+
"version": "0.11.2",
|
|
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.
|
|
39
|
+
"@rsbuild/core": "~1.4.14",
|
|
40
40
|
"tinyglobby": "^0.2.14",
|
|
41
|
-
"rsbuild-plugin-dts": "0.11.
|
|
41
|
+
"rsbuild-plugin-dts": "0.11.2"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@module-federation/rsbuild-plugin": "^0.17.1",
|
|
@@ -46,12 +46,12 @@
|
|
|
46
46
|
"cac": "^6.7.14",
|
|
47
47
|
"chokidar": "^4.0.3",
|
|
48
48
|
"fs-extra": "^11.3.0",
|
|
49
|
-
"memfs": "^4.
|
|
49
|
+
"memfs": "^4.36.0",
|
|
50
50
|
"picocolors": "1.1.1",
|
|
51
|
-
"prebundle": "1.4.
|
|
52
|
-
"rsbuild-plugin-publint": "^0.3.
|
|
53
|
-
"rslib": "npm:@rslib/core@0.11.
|
|
54
|
-
"rslog": "^1.2.
|
|
51
|
+
"prebundle": "1.4.1",
|
|
52
|
+
"rsbuild-plugin-publint": "^0.3.3",
|
|
53
|
+
"rslib": "npm:@rslib/core@0.11.1",
|
|
54
|
+
"rslog": "^1.2.11",
|
|
55
55
|
"tsconfck": "3.1.6",
|
|
56
56
|
"typescript": "^5.9.2",
|
|
57
57
|
"@rslib/tsconfig": "0.0.1"
|
|
@@ -73,7 +73,6 @@
|
|
|
73
73
|
},
|
|
74
74
|
"publishConfig": {
|
|
75
75
|
"access": "public",
|
|
76
|
-
"provenance": true,
|
|
77
76
|
"registry": "https://registry.npmjs.org/"
|
|
78
77
|
},
|
|
79
78
|
"scripts": {
|