monitor-track 1.14.0 → 1.15.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/CHANGELOG.md +10 -0
- package/README.md +1 -0
- package/cjs/config/global.d.ts +0 -2
- package/cjs/config/request.d.ts +15 -0
- package/cjs/handlers/websocket.d.ts +16 -0
- package/cjs/index.d.ts +0 -5
- package/cjs/index.js +425 -170
- package/cjs/reporter.d.ts +2 -0
- package/cjs/types/config.d.ts +2 -0
- package/cjs/types/global.d.ts +2 -1
- package/esm/config/global.d.ts +0 -2
- package/esm/config/global.js +2 -167
- package/esm/config/index.js +3 -2
- package/esm/config/request.d.ts +15 -0
- package/esm/config/request.js +158 -0
- package/esm/handlers/websocket.d.ts +16 -0
- package/esm/handlers/websocket.js +277 -0
- package/esm/index.d.ts +0 -5
- package/esm/index.js +7 -15
- package/esm/package.json.js +1 -1
- package/esm/reporter.d.ts +2 -0
- package/esm/reporter.js +6 -0
- package/esm/types/config.d.ts +2 -0
- package/esm/types/global.d.ts +2 -1
- package/index.js +460 -166
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,16 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.14.0](https://gitlab.seazonmotor.com/panda/CSD_UserBehaviorTracking/compare/monitor-track@1.13.0...monitor-track@1.14.0) (2026-05-26)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### ✨ Features
|
|
10
|
+
|
|
11
|
+
* 增加enableErrorScreenshot和enableErrorEvent,默认启用页面卡顿监听 ([591c8d4](https://gitlab.seazonmotor.com/panda/CSD_UserBehaviorTracking/commit/591c8d4db4c5ef1e98e54a04c48a4189ce218cd6))
|
|
12
|
+
* 新增启用页面录制字段 ([afa5151](https://gitlab.seazonmotor.com/panda/CSD_UserBehaviorTracking/commit/afa5151f14fcc45f5947e004cfe9112a7745f5f3))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
6
16
|
## [1.13.0](https://gitlab.seazonmotor.com/panda/CSD_UserBehaviorTracking/compare/monitor-track@1.12.1...monitor-track@1.13.0) (2026-05-22)
|
|
7
17
|
|
|
8
18
|
|
package/README.md
CHANGED
|
@@ -49,6 +49,7 @@ track.init({
|
|
|
49
49
|
| enableLagTrack | boolean | 否 | false | 启用页面卡顿信息上报 |
|
|
50
50
|
| lagTimeout | number | 否 | 400 | 页面卡顿上报的阈值时间(毫秒) |
|
|
51
51
|
| enableRecord | boolean | 否 | false | 启用页面录制 |
|
|
52
|
+
| enableOnlinePersons | boolean | 否 | true | 显示在线人数 |
|
|
52
53
|
| ignore | 见下方 ignore | 否 | false | 忽略上报的信息 |
|
|
53
54
|
| customPayload | string | 否 | false | 自定义 payload |
|
|
54
55
|
| enable | boolean | 否 | false | 是否开启日志收集,默认关闭 |
|
package/cjs/config/global.d.ts
CHANGED
|
@@ -13,5 +13,3 @@ export declare function setReportValue<T extends IReport, K extends keyof T>(key
|
|
|
13
13
|
* @description 获取上报数据
|
|
14
14
|
*/
|
|
15
15
|
export declare function getReport(): IReport;
|
|
16
|
-
export declare const recordXMLHttpRequestLog: (XMLHttpRequestTimeout?: number) => void;
|
|
17
|
-
export declare const hackFetch: (XMLHttpRequestTimeout?: number) => void;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface IRequestInfo {
|
|
2
|
+
requestType: 'xhr' | 'fetch';
|
|
3
|
+
method: string;
|
|
4
|
+
responseURL: string;
|
|
5
|
+
requestData: string | null;
|
|
6
|
+
responseBody: string | null;
|
|
7
|
+
status: number;
|
|
8
|
+
startTime: number;
|
|
9
|
+
loadTime: number;
|
|
10
|
+
statusText: string;
|
|
11
|
+
reason: string;
|
|
12
|
+
detail: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const recordXMLHttpRequest: (XMLHttpRequestTimeout: number) => void;
|
|
15
|
+
export declare const recordFetch: (XMLHttpRequestTimeout: number) => void;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IRequestInfo } from '../config/request';
|
|
2
|
+
export declare const uploadRequest: (requestInfo: IRequestInfo) => void;
|
|
3
|
+
export declare function enableOnlinePersonsFunc(): void;
|
|
4
|
+
export declare const WEBSOCKET_TYPE: {
|
|
5
|
+
TRY_CONNECT: string;
|
|
6
|
+
CHECK_CONNECT: string;
|
|
7
|
+
PING: string;
|
|
8
|
+
PONG: string;
|
|
9
|
+
REPLY_SERVER_HEART_BEAT: string;
|
|
10
|
+
SOCKET_HEART_BEAT: string;
|
|
11
|
+
RESPONSE_DATE: string;
|
|
12
|
+
REMOTE_DEBUG_ENABLE: string;
|
|
13
|
+
DEBUG_INFO_UPLOAD: string;
|
|
14
|
+
REPlY_MESSAGE: string;
|
|
15
|
+
};
|
|
16
|
+
export declare const closeWebsocket: (info: string) => void;
|