anys-web 1.3.0 → 1.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/cjs/index.js +32 -8
- package/cjs/recorder-plugin.js +45 -38
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +14 -14
- package/src/index.js +11 -1
- package/src/recorder-plugin.js +1 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "anys-web",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "cjs/index.js",
|
|
6
6
|
"module": "src/index.js",
|
|
@@ -19,22 +19,22 @@
|
|
|
19
19
|
"license": "Apache-2.0",
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"anys": "^1.2.0",
|
|
22
|
-
"anys-shared": "^1.
|
|
22
|
+
"anys-shared": "^1.4.0",
|
|
23
23
|
"anys-web-plugin-identify": "^1.1.0",
|
|
24
|
-
"anys-web-plugin-monitor-ajax": "^1.
|
|
25
|
-
"anys-web-plugin-monitor-dom-mutation": "^1.
|
|
26
|
-
"anys-web-plugin-monitor-input-event": "^1.
|
|
27
|
-
"anys-web-plugin-monitor-mouse-event": "^1.
|
|
28
|
-
"anys-web-plugin-monitor-scroll-event": "^1.
|
|
29
|
-
"anys-web-plugin-monitor-touch-event": "^1.
|
|
30
|
-
"anys-web-plugin-monitor-url": "^1.
|
|
31
|
-
"anys-web-plugin-monitor-window-activity": "^1.
|
|
32
|
-
"anys-web-plugin-monitor-window-size": "^1.
|
|
33
|
-
"anys-web-plugin-send-by-ajax": "^1.
|
|
34
|
-
"anys-web-plugin-store-offline": "^1.
|
|
24
|
+
"anys-web-plugin-monitor-ajax": "^1.4.0",
|
|
25
|
+
"anys-web-plugin-monitor-dom-mutation": "^1.4.0",
|
|
26
|
+
"anys-web-plugin-monitor-input-event": "^1.4.0",
|
|
27
|
+
"anys-web-plugin-monitor-mouse-event": "^1.4.0",
|
|
28
|
+
"anys-web-plugin-monitor-scroll-event": "^1.4.0",
|
|
29
|
+
"anys-web-plugin-monitor-touch-event": "^1.4.0",
|
|
30
|
+
"anys-web-plugin-monitor-url": "^1.4.0",
|
|
31
|
+
"anys-web-plugin-monitor-window-activity": "^1.4.0",
|
|
32
|
+
"anys-web-plugin-monitor-window-size": "^1.4.0",
|
|
33
|
+
"anys-web-plugin-send-by-ajax": "^1.4.1",
|
|
34
|
+
"anys-web-plugin-store-offline": "^1.4.0"
|
|
35
35
|
},
|
|
36
36
|
"publishConfig": {
|
|
37
37
|
"registry": "https://registry.npmjs.org/"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "22d5ab7437886b2550680c9dc6b97ed9436c6a6b"
|
|
40
40
|
}
|
package/src/index.js
CHANGED
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
import { Anys } from 'anys';
|
|
2
2
|
import { AnysRecorderPlugin } from './recorder-plugin.js';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
class RecorderAnys extends Anys {
|
|
5
|
+
/**
|
|
6
|
+
* patch auth info into reportParams
|
|
7
|
+
* @param {object} info
|
|
8
|
+
*/
|
|
9
|
+
auth(info) {
|
|
10
|
+
this.options.reportParams = Object.assign(this.options.reportParams || {}, info);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const create = (options = {}) => new RecorderAnys({
|
|
5
15
|
namespace: 'AnysTracer',
|
|
6
16
|
autoReport: false,
|
|
7
17
|
...options,
|
package/src/recorder-plugin.js
CHANGED
|
@@ -145,7 +145,7 @@ export class AnysRecorderPlugin extends AnysPlugin {
|
|
|
145
145
|
|
|
146
146
|
const { reportUrl, reportParams } = this.anys.options;
|
|
147
147
|
const url = reportParams ? replaceUrlSearch(reportUrl, reportParams) : reportUrl;
|
|
148
|
-
return ajaxPost(url, items).then(() => {
|
|
148
|
+
return ajaxPost(url, { data: items }).then(() => {
|
|
149
149
|
ids.forEach((id) => {
|
|
150
150
|
delete this.cache[id];
|
|
151
151
|
});
|
|
@@ -158,8 +158,4 @@ export class AnysRecorderPlugin extends AnysPlugin {
|
|
|
158
158
|
clear() {
|
|
159
159
|
this.cache = {};
|
|
160
160
|
}
|
|
161
|
-
|
|
162
|
-
auth(info) {
|
|
163
|
-
this.anys.options.reportParams = Object.assign(this.anys.options.reportParams || {}, info);
|
|
164
|
-
}
|
|
165
161
|
}
|