@ozen-ui/logger 0.37.0 → 0.37.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/dist/cjs/index.d.ts +21 -0
- package/dist/esm/index.d.ts +21 -0
- package/package.json +2 -2
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type LoggerType = 'log' | 'error' | 'warn' | 'info' | 'trace' | 'debug';
|
|
2
|
+
export type Logger = {
|
|
3
|
+
[keyof in LoggerType]: (message: any, ...rest: any[]) => void;
|
|
4
|
+
};
|
|
5
|
+
declare let defaultConfig: {
|
|
6
|
+
scope: string;
|
|
7
|
+
};
|
|
8
|
+
declare const setConfig: (config: Partial<typeof defaultConfig>) => void;
|
|
9
|
+
declare const logger: Logger;
|
|
10
|
+
declare const once: {
|
|
11
|
+
(type: LoggerType): (message: any, ...rest: any[]) => void;
|
|
12
|
+
clear(): void;
|
|
13
|
+
trace: (message: any, ...rest: any[]) => void;
|
|
14
|
+
debug: (message: any, ...rest: any[]) => void;
|
|
15
|
+
info: (message: any, ...rest: any[]) => void;
|
|
16
|
+
warn: (message: any, ...rest: any[]) => void;
|
|
17
|
+
error: (message: any, ...rest: any[]) => void;
|
|
18
|
+
log: (message: any, ...rest: any[]) => void;
|
|
19
|
+
};
|
|
20
|
+
declare const deprecate: (message: any, ...rest: any[]) => void;
|
|
21
|
+
export { logger, deprecate, once, setConfig };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type LoggerType = 'log' | 'error' | 'warn' | 'info' | 'trace' | 'debug';
|
|
2
|
+
export type Logger = {
|
|
3
|
+
[keyof in LoggerType]: (message: any, ...rest: any[]) => void;
|
|
4
|
+
};
|
|
5
|
+
declare let defaultConfig: {
|
|
6
|
+
scope: string;
|
|
7
|
+
};
|
|
8
|
+
declare const setConfig: (config: Partial<typeof defaultConfig>) => void;
|
|
9
|
+
declare const logger: Logger;
|
|
10
|
+
declare const once: {
|
|
11
|
+
(type: LoggerType): (message: any, ...rest: any[]) => void;
|
|
12
|
+
clear(): void;
|
|
13
|
+
trace: (message: any, ...rest: any[]) => void;
|
|
14
|
+
debug: (message: any, ...rest: any[]) => void;
|
|
15
|
+
info: (message: any, ...rest: any[]) => void;
|
|
16
|
+
warn: (message: any, ...rest: any[]) => void;
|
|
17
|
+
error: (message: any, ...rest: any[]) => void;
|
|
18
|
+
log: (message: any, ...rest: any[]) => void;
|
|
19
|
+
};
|
|
20
|
+
declare const deprecate: (message: any, ...rest: any[]) => void;
|
|
21
|
+
export { logger, deprecate, once, setConfig };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ozen-ui/logger",
|
|
3
|
-
"version": "0.37.
|
|
3
|
+
"version": "0.37.2",
|
|
4
4
|
"description": "A client logger",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"sideEffects": false,
|
|
24
24
|
"scripts": {
|
|
25
25
|
"prebuild": "rimraf dist",
|
|
26
|
-
"build": "
|
|
26
|
+
"build": "tsc && tsc --module commonjs --outDir ./dist/cjs",
|
|
27
27
|
"clean": "rimraf dist && rimraf node_modules && rimraf .turbo",
|
|
28
28
|
"lint:js": "eslint --ext .ts,.tsx src --fix",
|
|
29
29
|
"lint": "pnpm lint:js",
|