@doreamonjs/plugin-analysis 0.3.13 → 0.3.14

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,25 +3,24 @@
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.3.13](https://github.com/zcorky/zodash/compare/v0.3.12...v0.3.13) (2022-08-31)
6
+ ## [0.3.14](https://github.com/zcorky/zodash/compare/v0.3.13...v0.3.14) (2022-08-31)
7
7
 
8
+ **Note:** Version bump only for package @doreamonjs/plugin-analysis
8
9
 
9
- ### Bug Fixes
10
10
 
11
- * plugin-authorization model + types ([7c4058c](https://github.com/zcorky/zodash/commit/7c4058c47429eda26de6af08ce6b2d2a423f83c9))
12
11
 
13
12
 
14
13
 
14
+ ## [0.3.13](https://github.com/zcorky/zodash/compare/v0.3.12...v0.3.13) (2022-08-31)
15
+
16
+ ### Bug Fixes
15
17
 
18
+ - plugin-authorization model + types ([7c4058c](https://github.com/zcorky/zodash/commit/7c4058c47429eda26de6af08ce6b2d2a423f83c9))
16
19
 
17
20
  ## [0.3.12](https://github.com/zcorky/zodash/compare/v0.3.11...v0.3.12) (2022-08-31)
18
21
 
19
22
  **Note:** Version bump only for package @doreamonjs/plugin-analysis
20
23
 
21
-
22
-
23
-
24
-
25
24
  ## [0.3.3](https://github.com/zcorky/zodash/compare/v0.3.2...v0.3.3) (2022-08-30)
26
25
 
27
26
  **Note:** Version bump only for package @doreamonjs/plugin-analysis
package/lib/service.js CHANGED
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Service = void 0;
4
4
  const doreamon_1 = require("@zodash/doreamon");
5
5
  const shared = require("@doreamonjs/plugin-shared");
6
+ const user = require("@doreamonjs/plugin-user");
6
7
  const constants_1 = require("./constants");
7
8
  class Service {
8
9
  constructor() {
@@ -96,7 +97,7 @@ class Service {
96
97
  return constants_1.NAMESPACE;
97
98
  }
98
99
  get user() {
99
- return window.doreamon_sdk.user.getCurrent();
100
+ return user.service.getCurrent();
100
101
  }
101
102
  async setup(config) {
102
103
  var _a;
@@ -136,14 +137,14 @@ class Service {
136
137
  }
137
138
  }
138
139
  async track(event, attributes) {
139
- var _a;
140
+ var _a, _b, _c;
140
141
  const userX = this.user;
141
142
  const user = {
142
143
  id: userX === null || userX === void 0 ? void 0 : userX.id,
143
144
  nickname: userX === null || userX === void 0 ? void 0 : userX.nickname,
144
145
  email: userX === null || userX === void 0 ? void 0 : userX.email,
145
- open_id: userX === null || userX === void 0 ? void 0 : userX.open_id,
146
- union_id: userX === null || userX === void 0 ? void 0 : userX.union_id,
146
+ open_id: (_a = userX) === null || _a === void 0 ? void 0 : _a.open_id,
147
+ union_id: (_b = userX) === null || _b === void 0 ? void 0 : _b.union_id,
147
148
  };
148
149
  try {
149
150
  const config = this.config;
@@ -156,7 +157,7 @@ class Service {
156
157
  await this.setup(this.config);
157
158
  }
158
159
  // this.sdks['thinkingdata']?.track(event, attributes)
159
- const promises = (_a = config === null || config === void 0 ? void 0 : config.clients) === null || _a === void 0 ? void 0 : _a.map(async (client) => {
160
+ const promises = (_c = config === null || config === void 0 ? void 0 : config.clients) === null || _c === void 0 ? void 0 : _c.map(async (client) => {
160
161
  if (!(client === null || client === void 0 ? void 0 : client.provider))
161
162
  return;
162
163
  if (!this.sdks[client.provider]) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@doreamonjs/plugin-analysis",
3
- "version": "0.3.13",
3
+ "version": "0.3.14",
4
4
  "description": "analysis plugin for doreamonjs",
5
5
  "keywords": [
6
6
  "doreamonjs",
@@ -65,8 +65,9 @@
65
65
  "url": "https://github.com/zcorky/zodash/issues"
66
66
  },
67
67
  "dependencies": {
68
- "@doreamonjs/plugin-request": "^0.3.2",
69
- "@doreamonjs/plugin-shared": "^0.3.13",
68
+ "@doreamonjs/plugin-request": "^0.3.14",
69
+ "@doreamonjs/plugin-shared": "^0.3.14",
70
+ "@doreamonjs/plugin-user": "^0.3.14",
70
71
  "@sentry/browser": "^7.11.1",
71
72
  "@sentry/tracing": "^7.11.1",
72
73
  "@zcorky/delay": "^1.0.1",
@@ -77,5 +78,5 @@
77
78
  "mixpanel-browser": "^2.45.0",
78
79
  "thinkingdata-browser": "^1.6.0"
79
80
  },
80
- "gitHead": "1b28761e66cad9a1e9e3f35b39258a0e3c3caf6c"
81
+ "gitHead": "a805f143e08e0642d568cc0b6bd61b9a393ea14b"
81
82
  }