@doreamonjs/plugin-analysis 0.4.0 → 0.4.1

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,14 @@
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.4.1](https://github.com/doreamonjs/doreamon/compare/v0.4.0...v0.4.1) (2022-08-31)
7
+
8
+ **Note:** Version bump only for package @doreamonjs/plugin-analysis
9
+
10
+
11
+
12
+
13
+
6
14
  # [0.4.0](https://github.com/doreamonjs/doreamon/compare/v0.3.17...v0.4.0) (2022-08-31)
7
15
 
8
16
  **Note:** Version bump only for package @doreamonjs/plugin-analysis
package/lib/model.d.ts CHANGED
@@ -4,6 +4,7 @@ export interface ModelOptions {
4
4
  export declare class Model {
5
5
  readonly options?: ModelOptions;
6
6
  private _service;
7
+ private logger;
7
8
  constructor(options?: ModelOptions);
8
9
  private get service();
9
10
  get namespace(): string;
package/lib/model.js CHANGED
@@ -1,12 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Model = void 0;
4
- const doreamon_1 = require("@zodash/doreamon");
4
+ const shared = require("@doreamonjs/plugin-shared");
5
5
  const constants_1 = require("./constants");
6
6
  const service_1 = require("./service");
7
7
  class Model {
8
8
  constructor(options) {
9
9
  this.options = options;
10
+ this.logger = shared.logger;
10
11
  }
11
12
  get service() {
12
13
  if (!this._service) {
@@ -19,6 +20,7 @@ class Model {
19
20
  }
20
21
  build() {
21
22
  const service = this.service;
23
+ const logger = this.logger;
22
24
  return {
23
25
  namespace: constants_1.NAMESPACE,
24
26
  state: {},
@@ -38,7 +40,7 @@ class Model {
38
40
  (_a = service.setup) === null || _a === void 0 ? void 0 : _a.call(service, config);
39
41
  }
40
42
  catch (error) {
41
- doreamon_1.default.logger.error('[model] analysis setup error', error);
43
+ logger.error('[model] analysis setup error', error);
42
44
  }
43
45
  },
44
46
  *track({ payload: { event, attributes } }, { select }) {
@@ -49,7 +51,7 @@ class Model {
49
51
  (_a = service.track) === null || _a === void 0 ? void 0 : _a.call(service, event, attributes);
50
52
  }
51
53
  catch (error) {
52
- doreamon_1.default.logger.error('[model] analysis track error', error);
54
+ logger.error('[model] analysis track error', error);
53
55
  }
54
56
  },
55
57
  },
package/lib/service.js CHANGED
@@ -7,7 +7,7 @@ const user = require("@doreamonjs/plugin-user");
7
7
  const constants_1 = require("./constants");
8
8
  class Service {
9
9
  constructor() {
10
- this.logger = shared.logger.getLogger(constants_1.NAMESPACE);
10
+ this.logger = shared.logger;
11
11
  this.config = null;
12
12
  this.isInitialized = false;
13
13
  this.sdks = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@doreamonjs/plugin-analysis",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "analysis plugin for doreamonjs",
5
5
  "keywords": [
6
6
  "doreamonjs",
@@ -65,9 +65,9 @@
65
65
  "url": "https://github.com/doreamonjs/doreamon/issues"
66
66
  },
67
67
  "dependencies": {
68
- "@doreamonjs/plugin-shared": "^0.4.0",
69
- "@doreamonjs/plugin-user": "^0.4.0",
70
- "@doreamonjs/request": "^0.4.0",
68
+ "@doreamonjs/plugin-shared": "^0.4.1",
69
+ "@doreamonjs/plugin-user": "^0.4.1",
70
+ "@doreamonjs/request": "^0.4.1",
71
71
  "@sentry/browser": "^7.11.1",
72
72
  "@sentry/tracing": "^7.11.1",
73
73
  "@zcorky/delay": "^1.0.1",
@@ -78,5 +78,5 @@
78
78
  "mixpanel-browser": "^2.45.0",
79
79
  "thinkingdata-browser": "^1.6.0"
80
80
  },
81
- "gitHead": "065d4416da005250f2084bb564c83ec4026bf4cd"
81
+ "gitHead": "e440f855ed366651bf9ee047904611220d345656"
82
82
  }