anys-web 3.0.3 → 4.0.0
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/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +16 -16
- package/src/recorder-plugin.js +20 -20
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "anys-web",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -11,23 +11,23 @@
|
|
|
11
11
|
"author": "tangshuang",
|
|
12
12
|
"license": "Apache-2.0",
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"anys": "^
|
|
15
|
-
"anys-shared": "^
|
|
16
|
-
"anys-web-plugin-identify": "^
|
|
17
|
-
"anys-web-plugin-monitor-ajax": "^
|
|
18
|
-
"anys-web-plugin-monitor-dom-mutation": "^
|
|
19
|
-
"anys-web-plugin-monitor-input-event": "^
|
|
20
|
-
"anys-web-plugin-monitor-mouse-event": "^
|
|
21
|
-
"anys-web-plugin-monitor-scroll-event": "^
|
|
22
|
-
"anys-web-plugin-monitor-touch-event": "^
|
|
23
|
-
"anys-web-plugin-monitor-url": "^
|
|
24
|
-
"anys-web-plugin-monitor-window-activity": "^
|
|
25
|
-
"anys-web-plugin-monitor-window-size": "^
|
|
26
|
-
"anys-web-plugin-send-by-ajax": "^
|
|
27
|
-
"anys-web-plugin-store-offline": "^
|
|
14
|
+
"anys": "^4.0.0",
|
|
15
|
+
"anys-shared": "^4.0.0",
|
|
16
|
+
"anys-web-plugin-identify": "^4.0.0",
|
|
17
|
+
"anys-web-plugin-monitor-ajax": "^4.0.0",
|
|
18
|
+
"anys-web-plugin-monitor-dom-mutation": "^4.0.0",
|
|
19
|
+
"anys-web-plugin-monitor-input-event": "^4.0.0",
|
|
20
|
+
"anys-web-plugin-monitor-mouse-event": "^4.0.0",
|
|
21
|
+
"anys-web-plugin-monitor-scroll-event": "^4.0.0",
|
|
22
|
+
"anys-web-plugin-monitor-touch-event": "^4.0.0",
|
|
23
|
+
"anys-web-plugin-monitor-url": "^4.0.0",
|
|
24
|
+
"anys-web-plugin-monitor-window-activity": "^4.0.0",
|
|
25
|
+
"anys-web-plugin-monitor-window-size": "^4.0.0",
|
|
26
|
+
"anys-web-plugin-send-by-ajax": "^4.0.0",
|
|
27
|
+
"anys-web-plugin-store-offline": "^4.0.0"
|
|
28
28
|
},
|
|
29
29
|
"publishConfig": {
|
|
30
30
|
"registry": "https://registry.npmjs.org/"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "ef55853eed15d3f8654ea449ef2d23751a385b05"
|
|
33
33
|
}
|
package/src/recorder-plugin.js
CHANGED
|
@@ -117,7 +117,7 @@ export class AnysRecorderPlugin extends AnysPlugin {
|
|
|
117
117
|
return this.offlineStore.read(message);
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
-
|
|
120
|
+
arrange(logs) {
|
|
121
121
|
const groups = [];
|
|
122
122
|
let i = 0;
|
|
123
123
|
|
|
@@ -129,30 +129,30 @@ export class AnysRecorderPlugin extends AnysPlugin {
|
|
|
129
129
|
}
|
|
130
130
|
});
|
|
131
131
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
const ids = [];
|
|
132
|
+
return groups;
|
|
133
|
+
}
|
|
135
134
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
items.push(info);
|
|
140
|
-
});
|
|
135
|
+
send(data) {
|
|
136
|
+
const items = [];
|
|
137
|
+
const ids = [];
|
|
141
138
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
139
|
+
data.forEach((item) => {
|
|
140
|
+
const { _id, ...info } = item;
|
|
141
|
+
ids.push(_id);
|
|
142
|
+
items.push(info);
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
if (!items.length) {
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
145
148
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
});
|
|
149
|
+
const { reportUrl, reportParams } = this.anys.options;
|
|
150
|
+
const url = reportParams ? replaceUrlSearch(reportUrl, reportParams) : reportUrl;
|
|
151
|
+
return ajaxPost(url, { data: items }).then(() => {
|
|
152
|
+
ids.forEach((id) => {
|
|
153
|
+
delete this.cache[id];
|
|
152
154
|
});
|
|
153
155
|
});
|
|
154
|
-
|
|
155
|
-
return Promise.all(defers);
|
|
156
156
|
}
|
|
157
157
|
|
|
158
158
|
clear() {
|