@xifan0/monitor-web 0.0.2-beta.14 → 0.0.2-beta.15
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.d.mts +5 -30
- package/dist/index.d.ts +5 -30
- package/package.json +4 -3
package/dist/index.d.mts
CHANGED
|
@@ -1,34 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
id?: string;
|
|
3
|
-
email?: string;
|
|
4
|
-
username?: string;
|
|
5
|
-
[key: string]: string | undefined;
|
|
6
|
-
}
|
|
7
|
-
interface CaptureContext {
|
|
8
|
-
tags?: Record<string, string>;
|
|
9
|
-
extra?: Record<string, any>;
|
|
10
|
-
}
|
|
11
|
-
interface Monitor$1 {
|
|
12
|
-
init(options: any): any;
|
|
13
|
-
/** 上报异常 */
|
|
14
|
-
captureException(error: Error, ctx?: CaptureContext): any;
|
|
15
|
-
/** 发送消息/提醒/日志 */
|
|
16
|
-
captureMessage(message: string, ctx?: CaptureContext): any;
|
|
17
|
-
/** 设置用户信息 */
|
|
18
|
-
setUser(user: MonitorUser): any;
|
|
19
|
-
/** sentry事件 */
|
|
20
|
-
addBreadcrumb?(crumb: any): any;
|
|
21
|
-
setTag?(key: string, value: string): any;
|
|
22
|
-
setContext?(key: string, ctx: any): any;
|
|
23
|
-
withScope?(cb: (scope: any) => void): any;
|
|
24
|
-
/** 未声明事件的调用 */
|
|
25
|
-
[key: string]: any;
|
|
26
|
-
}
|
|
1
|
+
import * as _xifan0_monitor_core from '@xifan0/monitor-core';
|
|
27
2
|
|
|
28
|
-
declare const Monitor: Monitor
|
|
3
|
+
declare const Monitor: _xifan0_monitor_core.Monitor;
|
|
29
4
|
declare const init: (options: any) => any;
|
|
30
|
-
declare const captureException: (error: Error, ctx?: CaptureContext) => any;
|
|
31
|
-
declare const captureMessage: (message: string, ctx?: CaptureContext) => any;
|
|
32
|
-
declare const setUser: (user: MonitorUser) => any;
|
|
5
|
+
declare const captureException: (error: Error, ctx?: _xifan0_monitor_core.CaptureContext) => any;
|
|
6
|
+
declare const captureMessage: (message: string, ctx?: _xifan0_monitor_core.CaptureContext) => any;
|
|
7
|
+
declare const setUser: (user: _xifan0_monitor_core.MonitorUser) => any;
|
|
33
8
|
|
|
34
9
|
export { captureException, captureMessage, Monitor as default, init, setUser };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,34 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
id?: string;
|
|
3
|
-
email?: string;
|
|
4
|
-
username?: string;
|
|
5
|
-
[key: string]: string | undefined;
|
|
6
|
-
}
|
|
7
|
-
interface CaptureContext {
|
|
8
|
-
tags?: Record<string, string>;
|
|
9
|
-
extra?: Record<string, any>;
|
|
10
|
-
}
|
|
11
|
-
interface Monitor$1 {
|
|
12
|
-
init(options: any): any;
|
|
13
|
-
/** 上报异常 */
|
|
14
|
-
captureException(error: Error, ctx?: CaptureContext): any;
|
|
15
|
-
/** 发送消息/提醒/日志 */
|
|
16
|
-
captureMessage(message: string, ctx?: CaptureContext): any;
|
|
17
|
-
/** 设置用户信息 */
|
|
18
|
-
setUser(user: MonitorUser): any;
|
|
19
|
-
/** sentry事件 */
|
|
20
|
-
addBreadcrumb?(crumb: any): any;
|
|
21
|
-
setTag?(key: string, value: string): any;
|
|
22
|
-
setContext?(key: string, ctx: any): any;
|
|
23
|
-
withScope?(cb: (scope: any) => void): any;
|
|
24
|
-
/** 未声明事件的调用 */
|
|
25
|
-
[key: string]: any;
|
|
26
|
-
}
|
|
1
|
+
import * as _xifan0_monitor_core from '@xifan0/monitor-core';
|
|
27
2
|
|
|
28
|
-
declare const Monitor: Monitor
|
|
3
|
+
declare const Monitor: _xifan0_monitor_core.Monitor;
|
|
29
4
|
declare const init: (options: any) => any;
|
|
30
|
-
declare const captureException: (error: Error, ctx?: CaptureContext) => any;
|
|
31
|
-
declare const captureMessage: (message: string, ctx?: CaptureContext) => any;
|
|
32
|
-
declare const setUser: (user: MonitorUser) => any;
|
|
5
|
+
declare const captureException: (error: Error, ctx?: _xifan0_monitor_core.CaptureContext) => any;
|
|
6
|
+
declare const captureMessage: (message: string, ctx?: _xifan0_monitor_core.CaptureContext) => any;
|
|
7
|
+
declare const setUser: (user: _xifan0_monitor_core.MonitorUser) => any;
|
|
33
8
|
|
|
34
9
|
export { captureException, captureMessage, Monitor as default, init, setUser };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xifan0/monitor-web",
|
|
3
|
-
"version": "0.0.2-beta.
|
|
3
|
+
"version": "0.0.2-beta.15",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/index.mjs",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -19,13 +19,14 @@
|
|
|
19
19
|
"@sentry/react": "^7"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@sentry/react": "^7"
|
|
22
|
+
"@sentry/react": "^7",
|
|
23
|
+
"@xifan0/monitor-core": "0.0.2-beta.15"
|
|
23
24
|
},
|
|
24
25
|
"devDependencies": {
|
|
25
26
|
"@sentry/react": "^7",
|
|
26
27
|
"typescript": "^5",
|
|
27
28
|
"tsup": "^8.5.1",
|
|
28
|
-
"@xifan0/monitor-core": "0.0.2-beta.
|
|
29
|
+
"@xifan0/monitor-core": "0.0.2-beta.15"
|
|
29
30
|
},
|
|
30
31
|
"scripts": {
|
|
31
32
|
"build": "tsup --dts"
|