gemercheung 3 years ago
parent
commit
3e45ac93df

+ 2 - 2
package.json

@@ -18,8 +18,8 @@
     },
     "devDependencies": {
         "@changesets/cli": "^2.24.3",
-        "@typescript-eslint/eslint-plugin": "^5.34.0",
-        "@typescript-eslint/parser": "^5.34.0",
+        "@typescript-eslint/eslint-plugin": "^5.35.1",
+        "@typescript-eslint/parser": "^5.35.1",
         "doctoc": "~2.2.0",
         "eslint": "~8.19.0",
         "eslint-config-prettier": "^8.5.0",

+ 3 - 3
packages/core/src/history.ts

@@ -10,7 +10,7 @@ export interface playloadType {
     screen: string;
     language: string;
     url: string;
-    ua: string;
+    ua?: string;
     referrer?: string;
 }
 export class IHistory {
@@ -48,7 +48,7 @@ export class IHistory {
     initPlayload(): void {
         const {
             screen: { width, height },
-            navigator: { language, userAgent },
+            navigator: { language },
             location: { hostname, pathname, search },
             // localStorage,
             // document,
@@ -64,7 +64,7 @@ export class IHistory {
             screen: screen,
             language: language,
             url: this._currentUrl,
-            ua: userAgent,
+            // ua: userAgent,
             referrer: this._currentRef,
         };
     }

+ 1 - 1
packages/core/src/sdk.ts

@@ -1,6 +1,5 @@
 // import { getGlobalObject } from '@medici/utils';
 // import { BehaviorSubject } from 'rxjs';
-
 import { BaseTrack } from './basicTrack';
 import { IHistory } from './history';
 import { Eventer } from './event';
@@ -34,5 +33,6 @@ export class SDK extends BaseTrack {
     }
     public setConfig(config: SDKInitConfig): void {
         this._config = config;
+        super._config = this._config;
     }
 }

+ 1 - 1
packages/legacy/package.json

@@ -28,7 +28,7 @@
     "typescript": "~4.7.4"
   },
   "dependencies": {
-    "@medici/core": "workspace:^0.0.5",
+    "@medici/core": "workspace:^0.0.6",
     "@medici/utils": "workspace:^0.0.3"
   }
 }

+ 1 - 1
packages/web/package.json

@@ -22,6 +22,6 @@
     "typescript": "~4.7.4"
   },
   "dependencies": {
-    "@medici/core": "workspace:^0.0.5"
+    "@medici/core": "workspace:^0.0.6"
   }
 }

+ 1 - 1
play/package.json

@@ -10,7 +10,7 @@
   },
   "dependencies": {
     "@highlightjs/vue-plugin": "^2.1.0",
-    "@medici/core": "workspace:^0.0.5",
+    "@medici/core": "workspace:^0.0.6",
     "@medici/web": "workspace:^0.0.4",
     "highlight.js": "^11.6.0",
     "vue": "^3.2.37",

+ 45 - 45
pnpm-lock.yaml

@@ -5,8 +5,8 @@ importers:
   .:
     specifiers:
       '@changesets/cli': ^2.24.3
-      '@typescript-eslint/eslint-plugin': ^5.34.0
-      '@typescript-eslint/parser': ^5.34.0
+      '@typescript-eslint/eslint-plugin': ^5.35.1
+      '@typescript-eslint/parser': ^5.35.1
       doctoc: ~2.2.0
       eslint: ~8.19.0
       eslint-config-prettier: ^8.5.0
@@ -16,12 +16,12 @@ importers:
       typescript: ~4.7.4
     devDependencies:
       '@changesets/cli': 2.24.3
-      '@typescript-eslint/eslint-plugin': 5.34.0_w2hqzjfaeagrl2vartllf6jizi
-      '@typescript-eslint/parser': 5.34.0_4x5o4skxv6sl53vpwefgt23khm
+      '@typescript-eslint/eslint-plugin': 5.35.1_osseespewv2mfntnlqtrqcjlra
+      '@typescript-eslint/parser': 5.35.1_4x5o4skxv6sl53vpwefgt23khm
       doctoc: 2.2.0
       eslint: 8.19.0
       eslint-config-prettier: 8.5.0_eslint@8.19.0
-      eslint-plugin-import: 2.26.0_6go5y6lenqclsnxfpqt7lvefdy
+      eslint-plugin-import: 2.26.0_w6hyi6a46houmo6i7chjqdbh2e
       eslint-plugin-prettier: 4.2.1_7uxdfn2xinezdgvmbammh6ev5i
       prettier: 2.7.1
       typescript: 4.7.4
@@ -61,7 +61,7 @@ importers:
 
   packages/legacy:
     specifiers:
-      '@medici/core': workspace:^0.0.5
+      '@medici/core': workspace:^0.0.6
       '@medici/utils': workspace:^0.0.3
       '@rollup/plugin-commonjs': ^22.0.2
       '@rollup/plugin-node-resolve': ^13.3.0
@@ -102,7 +102,7 @@ importers:
 
   packages/web:
     specifiers:
-      '@medici/core': workspace:^0.0.5
+      '@medici/core': workspace:^0.0.6
       rimraf: ~3.0.2
       typescript: ~4.7.4
     dependencies:
@@ -114,7 +114,7 @@ importers:
   play:
     specifiers:
       '@highlightjs/vue-plugin': ^2.1.0
-      '@medici/core': workspace:^0.0.5
+      '@medici/core': workspace:^0.0.6
       '@medici/web': workspace:^0.0.4
       '@vitejs/plugin-vue': ^3.0.3
       highlight.js: ^11.6.0
@@ -638,8 +638,8 @@ packages:
     resolution: {integrity: sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw==}
     dev: false
 
-  /@typescript-eslint/eslint-plugin/5.34.0_w2hqzjfaeagrl2vartllf6jizi:
-    resolution: {integrity: sha512-eRfPPcasO39iwjlUAMtjeueRGuIrW3TQ9WseIDl7i5UWuFbf83yYaU7YPs4j8+4CxUMIsj1k+4kV+E+G+6ypDQ==}
+  /@typescript-eslint/eslint-plugin/5.35.1_osseespewv2mfntnlqtrqcjlra:
+    resolution: {integrity: sha512-RBZZXZlI4XCY4Wzgy64vB+0slT9+yAPQRjj/HSaRwUot33xbDjF1oN9BLwOLTewoOI0jothIltZRe9uJCHf8gg==}
     engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
     peerDependencies:
       '@typescript-eslint/parser': ^5.0.0
@@ -649,10 +649,10 @@ packages:
       typescript:
         optional: true
     dependencies:
-      '@typescript-eslint/parser': 5.34.0_4x5o4skxv6sl53vpwefgt23khm
-      '@typescript-eslint/scope-manager': 5.34.0
-      '@typescript-eslint/type-utils': 5.34.0_4x5o4skxv6sl53vpwefgt23khm
-      '@typescript-eslint/utils': 5.34.0_4x5o4skxv6sl53vpwefgt23khm
+      '@typescript-eslint/parser': 5.35.1_4x5o4skxv6sl53vpwefgt23khm
+      '@typescript-eslint/scope-manager': 5.35.1
+      '@typescript-eslint/type-utils': 5.35.1_4x5o4skxv6sl53vpwefgt23khm
+      '@typescript-eslint/utils': 5.35.1_4x5o4skxv6sl53vpwefgt23khm
       debug: 4.3.4
       eslint: 8.19.0
       functional-red-black-tree: 1.0.1
@@ -665,8 +665,8 @@ packages:
       - supports-color
     dev: true
 
-  /@typescript-eslint/parser/5.34.0_4x5o4skxv6sl53vpwefgt23khm:
-    resolution: {integrity: sha512-SZ3NEnK4usd2CXkoV3jPa/vo1mWX1fqRyIVUQZR4As1vyp4fneknBNJj+OFtV8WAVgGf+rOHMSqQbs2Qn3nFZQ==}
+  /@typescript-eslint/parser/5.35.1_4x5o4skxv6sl53vpwefgt23khm:
+    resolution: {integrity: sha512-XL2TBTSrh3yWAsMYpKseBYTVpvudNf69rPOWXWVBI08My2JVT5jR66eTt4IgQFHA/giiKJW5dUD4x/ZviCKyGg==}
     engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
     peerDependencies:
       eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
@@ -675,9 +675,9 @@ packages:
       typescript:
         optional: true
     dependencies:
-      '@typescript-eslint/scope-manager': 5.34.0
-      '@typescript-eslint/types': 5.34.0
-      '@typescript-eslint/typescript-estree': 5.34.0_typescript@4.7.4
+      '@typescript-eslint/scope-manager': 5.35.1
+      '@typescript-eslint/types': 5.35.1
+      '@typescript-eslint/typescript-estree': 5.35.1_typescript@4.7.4
       debug: 4.3.4
       eslint: 8.19.0
       typescript: 4.7.4
@@ -685,16 +685,16 @@ packages:
       - supports-color
     dev: true
 
-  /@typescript-eslint/scope-manager/5.34.0:
-    resolution: {integrity: sha512-HNvASMQlah5RsBW6L6c7IJ0vsm+8Sope/wu5sEAf7joJYWNb1LDbJipzmdhdUOnfrDFE6LR1j57x1EYVxrY4ow==}
+  /@typescript-eslint/scope-manager/5.35.1:
+    resolution: {integrity: sha512-kCYRSAzIW9ByEIzmzGHE50NGAvAP3wFTaZevgWva7GpquDyFPFcmvVkFJGWJJktg/hLwmys/FZwqM9EKr2u24Q==}
     engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
     dependencies:
-      '@typescript-eslint/types': 5.34.0
-      '@typescript-eslint/visitor-keys': 5.34.0
+      '@typescript-eslint/types': 5.35.1
+      '@typescript-eslint/visitor-keys': 5.35.1
     dev: true
 
-  /@typescript-eslint/type-utils/5.34.0_4x5o4skxv6sl53vpwefgt23khm:
-    resolution: {integrity: sha512-Pxlno9bjsQ7hs1pdWRUv9aJijGYPYsHpwMeCQ/Inavhym3/XaKt1ZKAA8FIw4odTBfowBdZJDMxf2aavyMDkLg==}
+  /@typescript-eslint/type-utils/5.35.1_4x5o4skxv6sl53vpwefgt23khm:
+    resolution: {integrity: sha512-8xT8ljvo43Mp7BiTn1vxLXkjpw8wS4oAc00hMSB4L1/jIiYbjjnc3Qp2GAUOG/v8zsNCd1qwcqfCQ0BuishHkw==}
     engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
     peerDependencies:
       eslint: '*'
@@ -703,7 +703,7 @@ packages:
       typescript:
         optional: true
     dependencies:
-      '@typescript-eslint/utils': 5.34.0_4x5o4skxv6sl53vpwefgt23khm
+      '@typescript-eslint/utils': 5.35.1_4x5o4skxv6sl53vpwefgt23khm
       debug: 4.3.4
       eslint: 8.19.0
       tsutils: 3.21.0_typescript@4.7.4
@@ -712,13 +712,13 @@ packages:
       - supports-color
     dev: true
 
-  /@typescript-eslint/types/5.34.0:
-    resolution: {integrity: sha512-49fm3xbbUPuzBIOcy2CDpYWqy/X7VBkxVN+DC21e0zIm3+61Z0NZi6J9mqPmSW1BDVk9FIOvuCFyUPjXz93sjA==}
+  /@typescript-eslint/types/5.35.1:
+    resolution: {integrity: sha512-FDaujtsH07VHzG0gQ6NDkVVhi1+rhq0qEvzHdJAQjysN+LHDCKDKCBRlZFFE0ec0jKxiv0hN63SNfExy0KrbQQ==}
     engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
     dev: true
 
-  /@typescript-eslint/typescript-estree/5.34.0_typescript@4.7.4:
-    resolution: {integrity: sha512-mXHAqapJJDVzxauEkfJI96j3D10sd567LlqroyCeJaHnu42sDbjxotGb3XFtGPYKPD9IyLjhsoULML1oI3M86A==}
+  /@typescript-eslint/typescript-estree/5.35.1_typescript@4.7.4:
+    resolution: {integrity: sha512-JUqE1+VRTGyoXlDWWjm6MdfpBYVq+hixytrv1oyjYIBEOZhBCwtpp5ZSvBt4wIA1MKWlnaC2UXl2XmYGC3BoQA==}
     engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
     peerDependencies:
       typescript: '*'
@@ -726,8 +726,8 @@ packages:
       typescript:
         optional: true
     dependencies:
-      '@typescript-eslint/types': 5.34.0
-      '@typescript-eslint/visitor-keys': 5.34.0
+      '@typescript-eslint/types': 5.35.1
+      '@typescript-eslint/visitor-keys': 5.35.1
       debug: 4.3.4
       globby: 11.1.0
       is-glob: 4.0.3
@@ -738,16 +738,16 @@ packages:
       - supports-color
     dev: true
 
-  /@typescript-eslint/utils/5.34.0_4x5o4skxv6sl53vpwefgt23khm:
-    resolution: {integrity: sha512-kWRYybU4Rn++7lm9yu8pbuydRyQsHRoBDIo11k7eqBWTldN4xUdVUMCsHBiE7aoEkFzrUEaZy3iH477vr4xHAQ==}
+  /@typescript-eslint/utils/5.35.1_4x5o4skxv6sl53vpwefgt23khm:
+    resolution: {integrity: sha512-v6F8JNXgeBWI4pzZn36hT2HXXzoBBBJuOYvoQiaQaEEjdi5STzux3Yj8v7ODIpx36i/5s8TdzuQ54TPc5AITQQ==}
     engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
     peerDependencies:
       eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
     dependencies:
       '@types/json-schema': 7.0.11
-      '@typescript-eslint/scope-manager': 5.34.0
-      '@typescript-eslint/types': 5.34.0
-      '@typescript-eslint/typescript-estree': 5.34.0_typescript@4.7.4
+      '@typescript-eslint/scope-manager': 5.35.1
+      '@typescript-eslint/types': 5.35.1
+      '@typescript-eslint/typescript-estree': 5.35.1_typescript@4.7.4
       eslint: 8.19.0
       eslint-scope: 5.1.1
       eslint-utils: 3.0.0_eslint@8.19.0
@@ -756,11 +756,11 @@ packages:
       - typescript
     dev: true
 
-  /@typescript-eslint/visitor-keys/5.34.0:
-    resolution: {integrity: sha512-O1moYjOSrab0a2fUvFpsJe0QHtvTC+cR+ovYpgKrAVXzqQyc74mv76TgY6z+aEtjQE2vgZux3CQVtGryqdcOAw==}
+  /@typescript-eslint/visitor-keys/5.35.1:
+    resolution: {integrity: sha512-cEB1DvBVo1bxbW/S5axbGPE6b7FIMAbo3w+AGq6zNDA7+NYJOIkKj/sInfTv4edxd4PxJSgdN4t6/pbvgA+n5g==}
     engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
     dependencies:
-      '@typescript-eslint/types': 5.34.0
+      '@typescript-eslint/types': 5.35.1
       eslint-visitor-keys: 3.3.0
     dev: true
 
@@ -1636,7 +1636,7 @@ packages:
       - supports-color
     dev: true
 
-  /eslint-module-utils/2.7.4_jta27pxmheaimoao73exahy2ma:
+  /eslint-module-utils/2.7.4_qcfrouqrotjex73gew5ttf4gvu:
     resolution: {integrity: sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA==}
     engines: {node: '>=4'}
     peerDependencies:
@@ -1657,7 +1657,7 @@ packages:
       eslint-import-resolver-webpack:
         optional: true
     dependencies:
-      '@typescript-eslint/parser': 5.34.0_4x5o4skxv6sl53vpwefgt23khm
+      '@typescript-eslint/parser': 5.35.1_4x5o4skxv6sl53vpwefgt23khm
       debug: 3.2.7
       eslint: 8.19.0
       eslint-import-resolver-node: 0.3.6
@@ -1665,7 +1665,7 @@ packages:
       - supports-color
     dev: true
 
-  /eslint-plugin-import/2.26.0_6go5y6lenqclsnxfpqt7lvefdy:
+  /eslint-plugin-import/2.26.0_w6hyi6a46houmo6i7chjqdbh2e:
     resolution: {integrity: sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA==}
     engines: {node: '>=4'}
     peerDependencies:
@@ -1675,14 +1675,14 @@ packages:
       '@typescript-eslint/parser':
         optional: true
     dependencies:
-      '@typescript-eslint/parser': 5.34.0_4x5o4skxv6sl53vpwefgt23khm
+      '@typescript-eslint/parser': 5.35.1_4x5o4skxv6sl53vpwefgt23khm
       array-includes: 3.1.5
       array.prototype.flat: 1.3.0
       debug: 2.6.9
       doctrine: 2.1.0
       eslint: 8.19.0
       eslint-import-resolver-node: 0.3.6
-      eslint-module-utils: 2.7.4_jta27pxmheaimoao73exahy2ma
+      eslint-module-utils: 2.7.4_qcfrouqrotjex73gew5ttf4gvu
       has: 1.0.3
       is-core-module: 2.10.0
       is-glob: 4.0.3