reportli 1.0.0 → 1.0.2
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.ts +8 -77
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +116 -641
- package/dist/index.js.map +2 -2
- package/dist/index.mjs +116 -641
- package/dist/index.mjs.map +2 -2
- package/package.json +1 -1
- package/src/index.ts +151 -753
package/dist/index.d.ts
CHANGED
|
@@ -1,80 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
* Reportli SDK
|
|
3
|
-
* Enterprise-grade real-time exception tracking and AI diagnostic companion.
|
|
4
|
-
*/
|
|
5
|
-
export interface ReportliConfig {
|
|
1
|
+
type Config = {
|
|
6
2
|
apiKey: string;
|
|
7
|
-
projectId?: string;
|
|
8
|
-
projectName?: string;
|
|
9
3
|
environment?: string;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
export
|
|
17
|
-
apiKey: string;
|
|
18
|
-
projectId?: string;
|
|
19
|
-
projectName?: string;
|
|
20
|
-
errorType: string;
|
|
21
|
-
errorMessage: string;
|
|
22
|
-
errorStack: string;
|
|
23
|
-
framework?: string;
|
|
24
|
-
user_email?: string;
|
|
25
|
-
severity?: "low" | "medium" | "high" | "critical";
|
|
26
|
-
status?: string;
|
|
27
|
-
}
|
|
28
|
-
declare class ReportliTracker {
|
|
29
|
-
private config;
|
|
30
|
-
private isInitialized;
|
|
31
|
-
/**
|
|
32
|
-
* Initializes the Reportli tracker with your secure project credentials.
|
|
33
|
-
*/
|
|
34
|
-
init(config: ReportliConfig): void;
|
|
35
|
-
/**
|
|
36
|
-
* Manually captures and files a custom application exception with custom severity.
|
|
37
|
-
*/
|
|
38
|
-
captureException(error: Error | any, severityInput?: "low" | "medium" | "high" | "critical"): void;
|
|
39
|
-
/**
|
|
40
|
-
* Express error handler middleware
|
|
41
|
-
*/
|
|
42
|
-
expressErrorHandler: (err: any, req: any, res: any, next: any) => void;
|
|
43
|
-
/**
|
|
44
|
-
* Registers global window listeners for DOM-based exceptions.
|
|
45
|
-
*/
|
|
46
|
-
private setupBrowserListeners;
|
|
47
|
-
/**
|
|
48
|
-
* Registers node process listeners for server instances.
|
|
49
|
-
*/
|
|
50
|
-
private setupNodeListeners;
|
|
51
|
-
/**
|
|
52
|
-
* Safe payload sender with retry limits.
|
|
53
|
-
*/
|
|
54
|
-
private sendCrashReport;
|
|
55
|
-
/**
|
|
56
|
-
* Sends registration verification to user edge function on first install.
|
|
57
|
-
*/
|
|
58
|
-
private sendRegistrationWebhook;
|
|
59
|
-
/**
|
|
60
|
-
* Capture fetch network status deviations.
|
|
61
|
-
*/
|
|
62
|
-
private interceptFetch;
|
|
63
|
-
/**
|
|
64
|
-
* Trace XHR status failures.
|
|
65
|
-
*/
|
|
66
|
-
private interceptXhr;
|
|
67
|
-
private logNetworkError;
|
|
68
|
-
private logNetworkFailure;
|
|
69
|
-
/**
|
|
70
|
-
* Helper to safely format raw objects / strings into structured Errors
|
|
71
|
-
*/
|
|
72
|
-
private normalizeError;
|
|
73
|
-
/**
|
|
74
|
-
* Comprehensive classification rules checking substring and classifications
|
|
75
|
-
*/
|
|
76
|
-
private classifyError;
|
|
77
|
-
}
|
|
78
|
-
export declare const Reportli: ReportliTracker;
|
|
79
|
-
export default Reportli;
|
|
4
|
+
};
|
|
5
|
+
export declare const Reportli: {
|
|
6
|
+
init(cfg: Config): void;
|
|
7
|
+
capture(error: unknown): void;
|
|
8
|
+
captureMessage(message: string): void;
|
|
9
|
+
};
|
|
10
|
+
export {};
|
|
80
11
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,KAAK,MAAM,GAAG;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAiDF,eAAO,MAAM,QAAQ;cACT,MAAM;mBAmGD,OAAO;4BAeE,MAAM;CAO/B,CAAC"}
|