@weapp-core/logger 3.1.1 → 3.1.3
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/dist/index.d.ts +7 -10
- package/package.json +16 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,22 +1,19 @@
|
|
|
1
1
|
import { ConsolaInstance } from "consola";
|
|
2
|
-
import
|
|
3
|
-
|
|
2
|
+
import picocolors from "picocolors";
|
|
4
3
|
//#region src/index.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* @description 日志类型
|
|
7
6
|
*/
|
|
8
|
-
type LogType = 'error' | 'warn' | 'info';
|
|
7
|
+
export type LogType = 'error' | 'warn' | 'info';
|
|
9
8
|
/**
|
|
10
9
|
* @description 日志级别
|
|
11
10
|
*/
|
|
12
|
-
type LogLevel = LogType | 'silent';
|
|
11
|
+
export type LogLevel = LogType | 'silent';
|
|
13
12
|
/**
|
|
14
13
|
* @description 终端文本染色工具,基于 picocolors。
|
|
15
14
|
*/
|
|
16
|
-
declare const colors:
|
|
17
|
-
|
|
18
|
-
};
|
|
19
|
-
interface LoggerConfig {
|
|
15
|
+
export declare const colors: typeof picocolors;
|
|
16
|
+
export interface LoggerConfig {
|
|
20
17
|
/**
|
|
21
18
|
* @description 全局日志级别
|
|
22
19
|
* @example
|
|
@@ -33,7 +30,7 @@ interface LoggerConfig {
|
|
|
33
30
|
/**
|
|
34
31
|
* @description 设置全局 logger 配置
|
|
35
32
|
*/
|
|
36
|
-
declare function configureLogger(config?: LoggerConfig): void;
|
|
33
|
+
export declare function configureLogger(config?: LoggerConfig): void;
|
|
37
34
|
declare const logger: ConsolaInstance;
|
|
38
35
|
//#endregion
|
|
39
|
-
export {
|
|
36
|
+
export { logger as default };
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@weapp-core/logger",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.1.
|
|
5
|
-
"description": "
|
|
4
|
+
"version": "3.1.3",
|
|
5
|
+
"description": "Structured logging utilities for the weapp-vite toolchain and mini-program runtimes.",
|
|
6
6
|
"author": "ice breaker <1324318532@qq.com>",
|
|
7
7
|
"license": "MIT",
|
|
8
|
+
"homepage": "https://github.com/weapp-vite/weapp-vite#readme",
|
|
8
9
|
"repository": {
|
|
9
10
|
"type": "git",
|
|
10
11
|
"url": "git+https://github.com/weapp-vite/weapp-vite.git",
|
|
@@ -13,7 +14,15 @@
|
|
|
13
14
|
"bugs": {
|
|
14
15
|
"url": "https://github.com/weapp-vite/weapp-vite/issues"
|
|
15
16
|
},
|
|
16
|
-
"keywords": [
|
|
17
|
+
"keywords": [
|
|
18
|
+
"weapp-vite",
|
|
19
|
+
"weapp",
|
|
20
|
+
"wechat",
|
|
21
|
+
"mini-program",
|
|
22
|
+
"miniprogram",
|
|
23
|
+
"vite",
|
|
24
|
+
"runtime"
|
|
25
|
+
],
|
|
17
26
|
"sideEffects": false,
|
|
18
27
|
"exports": {
|
|
19
28
|
".": {
|
|
@@ -38,6 +47,10 @@
|
|
|
38
47
|
"engines": {
|
|
39
48
|
"node": "^20.19.0 || >=22.12.0"
|
|
40
49
|
},
|
|
50
|
+
"publishConfig": {
|
|
51
|
+
"access": "public",
|
|
52
|
+
"registry": "https://registry.npmjs.org"
|
|
53
|
+
},
|
|
41
54
|
"dependencies": {
|
|
42
55
|
"consola": "^3.4.2",
|
|
43
56
|
"picocolors": "^1.1.1"
|