@vtj/utils 0.7.10 → 0.7.12

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vtj/utils",
3
3
  "private": false,
4
- "version": "0.7.10",
4
+ "version": "0.7.12",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "build": "vue-tsc && vite build && npm run build:umd",
@@ -11,11 +11,11 @@
11
11
  "coverage": "vitest run --coverage"
12
12
  },
13
13
  "dependencies": {
14
- "@vtj/base": "^0.7.3"
14
+ "@vtj/base": "^0.7.5"
15
15
  },
16
16
  "devDependencies": {
17
17
  "@types/js-cookie": "~3.0.6",
18
- "@vtj/cli": "^0.7.7",
18
+ "@vtj/cli": "^0.7.9",
19
19
  "axios": "~1.6.4",
20
20
  "fetch-jsonp": "~1.3.0",
21
21
  "js-cookie": "~3.0.5",
@@ -35,7 +35,7 @@
35
35
  "dist",
36
36
  "types"
37
37
  ],
38
- "gitHead": "6c54f72d57ad363d1ed75a36f25aed10d6b6a262",
38
+ "gitHead": "e893df5593e0df19de9fdc35c486faef1a31f273",
39
39
  "publishConfig": {
40
40
  "access": "public"
41
41
  }
package/types/index.d.ts CHANGED
@@ -6,5 +6,6 @@ export * from './storage';
6
6
  export * from './jsonp';
7
7
  export * from './loadScript';
8
8
  export * from './util';
9
+ export * from './logger';
9
10
  export * as cookie from './cookie';
10
11
  export * as url from './url';
@@ -0,0 +1,25 @@
1
+ export type LoggerLevel = 'debug' | 'log' | 'info' | 'warn' | 'error';
2
+ interface Options {
3
+ level?: LoggerLevel;
4
+ bizName?: string;
5
+ }
6
+ declare class Logger {
7
+ config: {
8
+ targetLevel: LoggerLevel;
9
+ targetBizName: string;
10
+ };
11
+ options: Options;
12
+ constructor(options: Options);
13
+ private _log;
14
+ debug(...args: any | any[]): any;
15
+ log(...args: any | any[]): any;
16
+ info(...args: any | any[]): any;
17
+ warn(...args: any | any[]): any;
18
+ error(...args: any | any[]): any;
19
+ }
20
+ export declare function getLogger(config: {
21
+ level: LoggerLevel;
22
+ bizName: string;
23
+ }): Logger;
24
+ declare const logger: Logger;
25
+ export { Logger, logger };
@@ -2,7 +2,7 @@
2
2
  * Copyright (c) 2024, VTJ.PRO All rights reserved.
3
3
  * @name @vtj/utils
4
4
  * @author CHC chenhuachun1549@dingtalk.com
5
- * @version 0.7.10
5
+ * @version 0.7.12
6
6
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
7
7
  */
8
- export declare const version = "0.7.10";
8
+ export declare const version = "0.7.12";