keeson-web-report-sdk 1.0.2 → 1.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/bundle.min.js +19 -19
- package/package.json +1 -2
package/bundle.min.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.umd = {}));
|
|
5
|
-
})(this, (function (exports) { 'use strict';
|
|
6
|
-
|
|
1
|
+
(function (global, factory) {
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.umd = {}));
|
|
5
|
+
})(this, (function (exports) { 'use strict';
|
|
6
|
+
|
|
7
7
|
// 错误上报
|
|
8
8
|
|
|
9
9
|
// 全局错误处理
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
|
|
36
36
|
// react
|
|
37
37
|
// export function reactErrorHandler() {
|
|
38
|
-
// }
|
|
39
|
-
|
|
38
|
+
// }
|
|
39
|
+
|
|
40
40
|
// 性能上报
|
|
41
41
|
function reportPerformance(callback) {
|
|
42
42
|
if (PerformanceNavigationTiming) {
|
|
@@ -79,8 +79,8 @@
|
|
|
79
79
|
dnsTime
|
|
80
80
|
});
|
|
81
81
|
}
|
|
82
|
-
}
|
|
83
|
-
|
|
82
|
+
}
|
|
83
|
+
|
|
84
84
|
function xhrReportHandle(onsuccess, onerror) {
|
|
85
85
|
var oldOpen = XMLHttpRequest.prototype.open;
|
|
86
86
|
XMLHttpRequest.prototype.open = function (method, url, async, user, pass) {
|
|
@@ -161,8 +161,8 @@
|
|
|
161
161
|
});
|
|
162
162
|
});
|
|
163
163
|
};
|
|
164
|
-
}
|
|
165
|
-
|
|
164
|
+
}
|
|
165
|
+
|
|
166
166
|
// 用户行为上报
|
|
167
167
|
|
|
168
168
|
// 路由跳转监听
|
|
@@ -305,8 +305,8 @@
|
|
|
305
305
|
return () => {
|
|
306
306
|
cleanups.forEach((cleanup) => cleanup());
|
|
307
307
|
};
|
|
308
|
-
}
|
|
309
|
-
|
|
308
|
+
}
|
|
309
|
+
|
|
310
310
|
const defaultOptions = {
|
|
311
311
|
appId: "", // appId
|
|
312
312
|
// appName: '',
|
|
@@ -425,8 +425,8 @@
|
|
|
425
425
|
function init(options = {}) {
|
|
426
426
|
if (!report) report = new Report(options);
|
|
427
427
|
report.init();
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
exports.init = init;
|
|
431
|
-
|
|
432
|
-
}));
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
exports.init = init;
|
|
431
|
+
|
|
432
|
+
}));
|
package/package.json
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "keeson-web-report-sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "for web/h5",
|
|
5
5
|
"main": "bundle.min.js",
|
|
6
|
-
"type": "module",
|
|
7
6
|
"scripts": {
|
|
8
7
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
9
8
|
"build": "rollup --config rollup.config.js"
|