@yysports/tools 0.0.8 → 0.0.10

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.
@@ -1,3 +1,4 @@
1
+ import { CurrentUserInfo } from '../interfaces/currentUser.interface';
1
2
  import { CustomizeProfile, ErrorProfile, SystemProfile, TrackConfig, TrackType, UserProfile } from '../interfaces/track.interface';
2
3
  declare class Track {
3
4
  static config: TrackConfig;
@@ -9,7 +10,7 @@ declare class Track {
9
10
  static getSystemProfile(): SystemProfile;
10
11
  static getUserProfile(): UserProfile;
11
12
  static setUserProfile(userProfile: UserProfile): void;
12
- static init({ userProfile, menuNameMap, routes, getAuth, menuBuild, ...restConfig }: TrackConfig): Promise<import("..").CurrentUserInfo | null>;
13
+ static init({ userProfile, menuNameMap, routes, getAuth, menuBuild, ...restConfig }: TrackConfig): Promise<CurrentUserInfo>;
13
14
  static pushQueue({ type, log, }: {
14
15
  type: TrackType;
15
16
  log: ErrorProfile | CustomizeProfile;
@@ -38,9 +38,6 @@ var Track = /*#__PURE__*/function () {
38
38
  if (!config.appId) {
39
39
  throw new Error('请设置appId');
40
40
  }
41
- if (CurrentUser.profile === null) {
42
- throw new Error('请先调用CurrentUser对象设置系统信息');
43
- }
44
41
  this.config = config;
45
42
  }
46
43
 
@@ -1,3 +1,4 @@
1
+ import { CurrentUserInfo } from '../interfaces/currentUser.interface';
1
2
  import { CustomizeProfile, ErrorProfile, SystemProfile, TrackConfig, TrackType, UserProfile } from '../interfaces/track.interface';
2
3
  declare class Track {
3
4
  static config: TrackConfig;
@@ -9,7 +10,7 @@ declare class Track {
9
10
  static getSystemProfile(): SystemProfile;
10
11
  static getUserProfile(): UserProfile;
11
12
  static setUserProfile(userProfile: UserProfile): void;
12
- static init({ userProfile, menuNameMap, routes, getAuth, menuBuild, ...restConfig }: TrackConfig): Promise<import("..").CurrentUserInfo | null>;
13
+ static init({ userProfile, menuNameMap, routes, getAuth, menuBuild, ...restConfig }: TrackConfig): Promise<CurrentUserInfo>;
13
14
  static pushQueue({ type, log, }: {
14
15
  type: TrackType;
15
16
  log: ErrorProfile | CustomizeProfile;
@@ -45,9 +45,6 @@ var Track = class {
45
45
  if (!config.appId) {
46
46
  throw new Error("请设置appId");
47
47
  }
48
- if (import_CurrentUser.default.profile === null) {
49
- throw new Error("请先调用CurrentUser对象设置系统信息");
50
- }
51
48
  this.config = config;
52
49
  }
53
50
  // 发送埋点数据
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yysports/tools",
3
- "version": "0.0.8",
3
+ "version": "0.0.10",
4
4
  "description": "常用工具函数库",
5
5
  "homepage": "https://git.pousheng.com/sport-service-department/pousheng-guard/yysports_tools#readme",
6
6
  "bugs": {