@xifan052/monitor 0.1.4 → 0.1.6
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/baseClient-CpBY_Ydd.d.cts +23 -0
- package/dist/baseClient-CpBY_Ydd.d.ts +23 -0
- package/dist/index.cjs +0 -3
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +0 -3
- package/dist/rn.cjs +0 -3
- package/dist/rn.d.cts +1 -1
- package/dist/rn.d.ts +1 -1
- package/dist/rn.js +0 -3
- package/dist/web.cjs +0 -3
- package/dist/web.d.cts +1 -1
- package/dist/web.d.ts +1 -1
- package/dist/web.js +0 -3
- package/package.json +12 -10
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
interface MonitorUser {
|
|
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
|
+
|
|
12
|
+
declare abstract class BaseClient {
|
|
13
|
+
protected sentry: any;
|
|
14
|
+
protected options: any;
|
|
15
|
+
constructor(sentry: any, options: any);
|
|
16
|
+
init(): void;
|
|
17
|
+
captureException(error: Error, ctx?: CaptureContext): void;
|
|
18
|
+
captureMessage(message: string, ctx?: CaptureContext): void;
|
|
19
|
+
setUser(user: MonitorUser): void;
|
|
20
|
+
get ErrorBoundary(): any;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export { BaseClient as B, type CaptureContext as C, type MonitorUser as M };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
interface MonitorUser {
|
|
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
|
+
|
|
12
|
+
declare abstract class BaseClient {
|
|
13
|
+
protected sentry: any;
|
|
14
|
+
protected options: any;
|
|
15
|
+
constructor(sentry: any, options: any);
|
|
16
|
+
init(): void;
|
|
17
|
+
captureException(error: Error, ctx?: CaptureContext): void;
|
|
18
|
+
captureMessage(message: string, ctx?: CaptureContext): void;
|
|
19
|
+
setUser(user: MonitorUser): void;
|
|
20
|
+
get ErrorBoundary(): any;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export { BaseClient as B, type CaptureContext as C, type MonitorUser as M };
|
package/dist/index.cjs
CHANGED
|
@@ -43,12 +43,9 @@ var BaseClient = class {
|
|
|
43
43
|
constructor(sentry, options) {
|
|
44
44
|
this.sentry = sentry;
|
|
45
45
|
this.options = options;
|
|
46
|
-
this.initialized = false;
|
|
47
46
|
}
|
|
48
47
|
init() {
|
|
49
|
-
if (this.initialized) return;
|
|
50
48
|
this.sentry.init(this.options);
|
|
51
|
-
this.initialized = true;
|
|
52
49
|
}
|
|
53
50
|
captureException(error, ctx) {
|
|
54
51
|
this.sentry.captureException(error, (scope) => {
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { C as CaptureContext, M as MonitorUser } from './baseClient-
|
|
1
|
+
export { C as CaptureContext, M as MonitorUser } from './baseClient-CpBY_Ydd.cjs';
|
|
2
2
|
export { WebMonitorClient } from './web.cjs';
|
|
3
3
|
export { RNMonitorClient } from './rn.cjs';
|
|
4
4
|
import '@sentry/react';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { C as CaptureContext, M as MonitorUser } from './baseClient-
|
|
1
|
+
export { C as CaptureContext, M as MonitorUser } from './baseClient-CpBY_Ydd.js';
|
|
2
2
|
export { WebMonitorClient } from './web.js';
|
|
3
3
|
export { RNMonitorClient } from './rn.js';
|
|
4
4
|
import '@sentry/react';
|
package/dist/index.js
CHANGED
|
@@ -6,12 +6,9 @@ var BaseClient = class {
|
|
|
6
6
|
constructor(sentry, options) {
|
|
7
7
|
this.sentry = sentry;
|
|
8
8
|
this.options = options;
|
|
9
|
-
this.initialized = false;
|
|
10
9
|
}
|
|
11
10
|
init() {
|
|
12
|
-
if (this.initialized) return;
|
|
13
11
|
this.sentry.init(this.options);
|
|
14
|
-
this.initialized = true;
|
|
15
12
|
}
|
|
16
13
|
captureException(error, ctx) {
|
|
17
14
|
this.sentry.captureException(error, (scope) => {
|
package/dist/rn.cjs
CHANGED
|
@@ -40,12 +40,9 @@ var BaseClient = class {
|
|
|
40
40
|
constructor(sentry, options) {
|
|
41
41
|
this.sentry = sentry;
|
|
42
42
|
this.options = options;
|
|
43
|
-
this.initialized = false;
|
|
44
43
|
}
|
|
45
44
|
init() {
|
|
46
|
-
if (this.initialized) return;
|
|
47
45
|
this.sentry.init(this.options);
|
|
48
|
-
this.initialized = true;
|
|
49
46
|
}
|
|
50
47
|
captureException(error, ctx) {
|
|
51
48
|
this.sentry.captureException(error, (scope) => {
|
package/dist/rn.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as Sentry from '@sentry/react-native';
|
|
2
|
-
import { B as BaseClient } from './baseClient-
|
|
2
|
+
import { B as BaseClient } from './baseClient-CpBY_Ydd.cjs';
|
|
3
3
|
|
|
4
4
|
declare class RNMonitorClient extends BaseClient {
|
|
5
5
|
constructor(options: Sentry.ReactNativeOptions);
|
package/dist/rn.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as Sentry from '@sentry/react-native';
|
|
2
|
-
import { B as BaseClient } from './baseClient-
|
|
2
|
+
import { B as BaseClient } from './baseClient-CpBY_Ydd.js';
|
|
3
3
|
|
|
4
4
|
declare class RNMonitorClient extends BaseClient {
|
|
5
5
|
constructor(options: Sentry.ReactNativeOptions);
|
package/dist/rn.js
CHANGED
|
@@ -6,12 +6,9 @@ var BaseClient = class {
|
|
|
6
6
|
constructor(sentry, options) {
|
|
7
7
|
this.sentry = sentry;
|
|
8
8
|
this.options = options;
|
|
9
|
-
this.initialized = false;
|
|
10
9
|
}
|
|
11
10
|
init() {
|
|
12
|
-
if (this.initialized) return;
|
|
13
11
|
this.sentry.init(this.options);
|
|
14
|
-
this.initialized = true;
|
|
15
12
|
}
|
|
16
13
|
captureException(error, ctx) {
|
|
17
14
|
this.sentry.captureException(error, (scope) => {
|
package/dist/web.cjs
CHANGED
|
@@ -40,12 +40,9 @@ var BaseClient = class {
|
|
|
40
40
|
constructor(sentry, options) {
|
|
41
41
|
this.sentry = sentry;
|
|
42
42
|
this.options = options;
|
|
43
|
-
this.initialized = false;
|
|
44
43
|
}
|
|
45
44
|
init() {
|
|
46
|
-
if (this.initialized) return;
|
|
47
45
|
this.sentry.init(this.options);
|
|
48
|
-
this.initialized = true;
|
|
49
46
|
}
|
|
50
47
|
captureException(error, ctx) {
|
|
51
48
|
this.sentry.captureException(error, (scope) => {
|
package/dist/web.d.cts
CHANGED
package/dist/web.d.ts
CHANGED
package/dist/web.js
CHANGED
|
@@ -6,12 +6,9 @@ var BaseClient = class {
|
|
|
6
6
|
constructor(sentry, options) {
|
|
7
7
|
this.sentry = sentry;
|
|
8
8
|
this.options = options;
|
|
9
|
-
this.initialized = false;
|
|
10
9
|
}
|
|
11
10
|
init() {
|
|
12
|
-
if (this.initialized) return;
|
|
13
11
|
this.sentry.init(this.options);
|
|
14
|
-
this.initialized = true;
|
|
15
12
|
}
|
|
16
13
|
captureException(error, ctx) {
|
|
17
14
|
this.sentry.captureException(error, (scope) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xifan052/monitor",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -26,6 +26,14 @@
|
|
|
26
26
|
"require": "./dist/rn.cjs"
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
|
+
"scripts": {
|
|
30
|
+
"build": "tsup --dts",
|
|
31
|
+
"changeset": "changeset",
|
|
32
|
+
"version": "changeset version",
|
|
33
|
+
"release": "changeset publish",
|
|
34
|
+
"test": "vitest",
|
|
35
|
+
"prepublishOnly": "pnpm build"
|
|
36
|
+
},
|
|
29
37
|
"peerDependencies": {
|
|
30
38
|
"@sentry/react": "^7",
|
|
31
39
|
"@sentry/react-native": "^5"
|
|
@@ -36,13 +44,7 @@
|
|
|
36
44
|
"vitest": "^1"
|
|
37
45
|
},
|
|
38
46
|
"dependencies": {
|
|
39
|
-
"tsup": "^8.5.1"
|
|
40
|
-
|
|
41
|
-
"scripts": {
|
|
42
|
-
"build": "tsup --dts",
|
|
43
|
-
"changeset": "changeset",
|
|
44
|
-
"version": "changeset version",
|
|
45
|
-
"release": "changeset publish",
|
|
46
|
-
"test": "vitest"
|
|
47
|
+
"tsup": "^8.5.1",
|
|
48
|
+
"tslib": "^2.8.1"
|
|
47
49
|
}
|
|
48
|
-
}
|
|
50
|
+
}
|