@doreamonjs/plugin-shared 0.4.0 → 0.5.0

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/CHANGELOG.md CHANGED
@@ -3,6 +3,33 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [0.5.0](https://github.com/doreamonjs/doreamon/compare/v0.4.5...v0.5.0) (2022-09-02)
7
+
8
+ **Note:** Version bump only for package @doreamonjs/plugin-shared
9
+
10
+
11
+
12
+
13
+
14
+ ## [0.4.2](https://github.com/doreamonjs/doreamon/compare/v0.4.1...v0.4.2) (2022-08-31)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * dependencies @doreamonjs/plugin-service ([e63c89a](https://github.com/doreamonjs/doreamon/commit/e63c89ac075d1548d5da196027b3238dda7c65d8))
20
+
21
+
22
+
23
+
24
+
25
+ ## [0.4.1](https://github.com/doreamonjs/doreamon/compare/v0.4.0...v0.4.1) (2022-08-31)
26
+
27
+ **Note:** Version bump only for package @doreamonjs/plugin-shared
28
+
29
+
30
+
31
+
32
+
6
33
  # [0.4.0](https://github.com/doreamonjs/doreamon/compare/v0.3.17...v0.4.0) (2022-08-31)
7
34
 
8
35
  **Note:** Version bump only for package @doreamonjs/plugin-shared
package/lib/index.js CHANGED
@@ -18,4 +18,5 @@ __exportStar(require("./router"), exports);
18
18
  __exportStar(require("./store"), exports);
19
19
  __exportStar(require("./message"), exports);
20
20
  __exportStar(require("./notification"), exports);
21
- window.__doreamonjs = shared_1.shared;
21
+ //
22
+ globalThis.__doreamonjs = shared_1.shared;
package/lib/logger.d.ts CHANGED
@@ -10,11 +10,11 @@ export declare class Logger implements ILogger {
10
10
  private _logger;
11
11
  constructor(options?: LoggerOptions);
12
12
  private get logger();
13
- log(message: string, ...args: any[]): void;
14
- info(message: string, ...args: any[]): void;
15
- error(message: string, ...args: any[]): void;
16
- warn(message: string, ...args: any[]): void;
17
- debug(message: string, ...args: any[]): void;
18
- getLogger(namespace: string): ILogger;
13
+ log: (message: string, ...args: any[]) => void;
14
+ info: (message: string, ...args: any[]) => void;
15
+ error: (message: string, ...args: any[]) => void;
16
+ warn: (message: string, ...args: any[]) => void;
17
+ debug: (message: string, ...args: any[]) => void;
18
+ getLogger: (namespace: string) => ILogger;
19
19
  }
20
20
  export declare const logger: Logger;
package/lib/logger.js CHANGED
@@ -8,6 +8,24 @@ const DEFAULT_LOGGER = doreamon_1.default.logger.getLogger('doreamonjs');
8
8
  class Logger {
9
9
  constructor(options) {
10
10
  this.options = options;
11
+ this.log = (message, ...args) => {
12
+ this.logger.log(message, ...args);
13
+ };
14
+ this.info = (message, ...args) => {
15
+ this.logger.info(message, ...args);
16
+ };
17
+ this.error = (message, ...args) => {
18
+ this.logger.error(message, ...args);
19
+ };
20
+ this.warn = (message, ...args) => {
21
+ this.logger.warn(message, ...args);
22
+ };
23
+ this.debug = (message, ...args) => {
24
+ this.logger.debug(message, ...args);
25
+ };
26
+ this.getLogger = (namespace) => {
27
+ return doreamon_1.default.logger.getLogger(namespace);
28
+ };
11
29
  }
12
30
  get logger() {
13
31
  var _a, _b;
@@ -27,24 +45,6 @@ class Logger {
27
45
  }
28
46
  return this._logger;
29
47
  }
30
- log(message, ...args) {
31
- this.logger.log(message, ...args);
32
- }
33
- info(message, ...args) {
34
- this.logger.info(message, ...args);
35
- }
36
- error(message, ...args) {
37
- this.logger.error(message, ...args);
38
- }
39
- warn(message, ...args) {
40
- this.logger.warn(message, ...args);
41
- }
42
- debug(message, ...args) {
43
- this.logger.debug(message, ...args);
44
- }
45
- getLogger(namespace) {
46
- return doreamon_1.default.logger.getLogger(namespace);
47
- }
48
48
  }
49
49
  exports.Logger = Logger;
50
50
  exports.logger = new Logger();
package/lib/type.d.ts CHANGED
@@ -1,8 +1,6 @@
1
1
  import { Shared } from './shared';
2
2
  declare global {
3
- interface Window {
4
- __doreamonjs: DoreamonJSShared;
5
- }
3
+ var __doreamonjs: DoreamonJSShared;
6
4
  }
7
5
  export interface DoreamonJSShared extends Shared {
8
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@doreamonjs/plugin-shared",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "shared plugin for doreamonjs",
5
5
  "keywords": [
6
6
  "doreamonjs",
@@ -71,5 +71,5 @@
71
71
  "@zodash/doreamon": "^1.0.17",
72
72
  "history": "^5.3.0"
73
73
  },
74
- "gitHead": "065d4416da005250f2084bb564c83ec4026bf4cd"
74
+ "gitHead": "533eb5c2f399cd2aabd2633f4abcc03f38ae40d0"
75
75
  }