anys-web 5.0.2 → 5.0.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "anys-web",
3
- "version": "5.0.2",
3
+ "version": "5.0.3",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -11,25 +11,25 @@
11
11
  "author": "tangshuang",
12
12
  "license": "Apache-2.0",
13
13
  "dependencies": {
14
- "anys": "^5.0.2",
15
- "anys-shared": "^5.0.2",
14
+ "anys": "^5.0.3",
15
+ "anys-shared": "^5.0.3",
16
16
  "anys-web-plugin-identify": "^5.0.2",
17
- "anys-web-plugin-monitor-ajax": "^5.0.2",
18
- "anys-web-plugin-monitor-dom-mutation": "^5.0.2",
19
- "anys-web-plugin-monitor-error": "^5.0.2",
20
- "anys-web-plugin-monitor-input-event": "^5.0.2",
21
- "anys-web-plugin-monitor-mouse-event": "^5.0.2",
22
- "anys-web-plugin-monitor-performance": "^5.0.2",
23
- "anys-web-plugin-monitor-scroll-event": "^5.0.2",
24
- "anys-web-plugin-monitor-touch-event": "^5.0.2",
25
- "anys-web-plugin-monitor-url": "^5.0.2",
26
- "anys-web-plugin-monitor-window-activity": "^5.0.2",
27
- "anys-web-plugin-monitor-window-size": "^5.0.2",
28
- "anys-web-plugin-send-by-ajax": "^5.0.2",
29
- "anys-web-plugin-store-offline": "^5.0.2"
17
+ "anys-web-plugin-monitor-ajax": "^5.0.3",
18
+ "anys-web-plugin-monitor-dom-mutation": "^5.0.3",
19
+ "anys-web-plugin-monitor-error": "^5.0.3",
20
+ "anys-web-plugin-monitor-input-event": "^5.0.3",
21
+ "anys-web-plugin-monitor-mouse-event": "^5.0.3",
22
+ "anys-web-plugin-monitor-performance": "^5.0.3",
23
+ "anys-web-plugin-monitor-scroll-event": "^5.0.3",
24
+ "anys-web-plugin-monitor-touch-event": "^5.0.3",
25
+ "anys-web-plugin-monitor-url": "^5.0.3",
26
+ "anys-web-plugin-monitor-window-activity": "^5.0.3",
27
+ "anys-web-plugin-monitor-window-size": "^5.0.3",
28
+ "anys-web-plugin-send-by-ajax": "^5.0.3",
29
+ "anys-web-plugin-store-offline": "^5.0.3"
30
30
  },
31
31
  "publishConfig": {
32
32
  "registry": "https://registry.npmjs.org/"
33
33
  },
34
- "gitHead": "12b035c07617795e59fd67950864ec664583c357"
34
+ "gitHead": "5ecaecd58e814294f9508e1f43a9eab91a7b0421"
35
35
  }
@@ -1,5 +1,4 @@
1
1
  import { AnysPlugin, ajaxPost, replaceUrlSearch } from 'anys-shared';
2
- import { AnysMonitorAjaxPlugin } from 'anys-web-plugin-monitor-ajax';
3
2
  import { AnysIdentifyPlugin } from 'anys-web-plugin-identify';
4
3
  import { AnysMonitorInputEventPlugin } from 'anys-web-plugin-monitor-input-event';
5
4
  import { AnysMonitorMouseEventPlugin } from 'anys-web-plugin-monitor-mouse-event';
@@ -18,7 +17,6 @@ export class AnysTracePlugin extends AnysPlugin {
18
17
  AnysMonitorWindowSizePlugin,
19
18
  AnysMonitorDOMMutationPlugin,
20
19
  AnysIdentifyPlugin,
21
- AnysMonitorAjaxPlugin,
22
20
  AnysMonitorInputEventPlugin,
23
21
  AnysMonitorMouseEventPlugin,
24
22
  AnysMonitorWindowActivityPlugin,
@@ -83,7 +81,7 @@ export class AnysTracePlugin extends AnysPlugin {
83
81
  isUnloaded = 1;
84
82
 
85
83
  const ids = Object.keys(this.cache);
86
- const logs = Object.values(this.cache);
84
+ const logs = { data: Object.values(this.cache), by: 'beacon' };
87
85
  if (ids.length) {
88
86
  this.offlineStore.remove(ids); // async may not executed
89
87
  navigator.sendBeacon(this.anys.options.reportUrl, JSON.stringify(logs));