error-monitor-web 1.0.0 → 1.0.1
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/blank-screen-constants.d.ts +17 -0
- package/dist/blank-screen-constants.d.ts.map +1 -0
- package/dist/blank-screen-detector.d.ts +44 -0
- package/dist/blank-screen-detector.d.ts.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +266 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +265 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.d.ts +53 -89
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +844 -194
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.d.ts +1 -0
- package/dist/index.umd.d.ts.map +1 -0
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/performance-monitor.d.ts +59 -0
- package/dist/performance-monitor.d.ts.map +1 -0
- package/package.json +13 -9
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
export default m;
|
|
2
|
+
declare class y {
|
|
3
|
+
constructor(e?: {});
|
|
4
|
+
checkCount: number;
|
|
5
|
+
timerId: number | null;
|
|
6
|
+
isBlankScreen: boolean;
|
|
7
|
+
config: {
|
|
8
|
+
detectionDelay: any;
|
|
9
|
+
minElements: any;
|
|
10
|
+
checkInterval: any;
|
|
11
|
+
maxChecks: any;
|
|
12
|
+
checkPerformance: boolean;
|
|
13
|
+
customCheck: any;
|
|
14
|
+
};
|
|
15
|
+
logger: f;
|
|
16
|
+
setLogLevel(e: any): void;
|
|
17
|
+
start(e: any): void;
|
|
18
|
+
performCheck(e: any): void;
|
|
19
|
+
checkIfBlank(): boolean;
|
|
20
|
+
checkDOMElementsOptimized(): {
|
|
21
|
+
isBlank: boolean;
|
|
22
|
+
info: {
|
|
23
|
+
reason: string;
|
|
24
|
+
bodyChildren?: undefined;
|
|
25
|
+
error?: undefined;
|
|
26
|
+
totalNodes?: undefined;
|
|
27
|
+
contentNodes?: undefined;
|
|
28
|
+
checkedNodes?: undefined;
|
|
29
|
+
};
|
|
30
|
+
} | {
|
|
31
|
+
isBlank: boolean;
|
|
32
|
+
info: {
|
|
33
|
+
reason: string;
|
|
34
|
+
bodyChildren: number;
|
|
35
|
+
error?: undefined;
|
|
36
|
+
totalNodes?: undefined;
|
|
37
|
+
contentNodes?: undefined;
|
|
38
|
+
checkedNodes?: undefined;
|
|
39
|
+
};
|
|
40
|
+
} | {
|
|
41
|
+
isBlank: boolean;
|
|
42
|
+
info: {
|
|
43
|
+
bodyChildren: number;
|
|
44
|
+
error: boolean;
|
|
45
|
+
reason?: undefined;
|
|
46
|
+
totalNodes?: undefined;
|
|
47
|
+
contentNodes?: undefined;
|
|
48
|
+
checkedNodes?: undefined;
|
|
49
|
+
};
|
|
50
|
+
} | {
|
|
51
|
+
isBlank: boolean;
|
|
52
|
+
info: {
|
|
53
|
+
totalNodes: number;
|
|
54
|
+
contentNodes: number;
|
|
55
|
+
bodyChildren: number;
|
|
56
|
+
checkedNodes: number;
|
|
57
|
+
reason?: undefined;
|
|
58
|
+
error?: undefined;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
checkPerformanceTiming(): {
|
|
62
|
+
isBlank: boolean;
|
|
63
|
+
info: {
|
|
64
|
+
reason: string;
|
|
65
|
+
domContentLoaded?: undefined;
|
|
66
|
+
loadComplete?: undefined;
|
|
67
|
+
firstPaint?: undefined;
|
|
68
|
+
firstContentfulPaint?: undefined;
|
|
69
|
+
};
|
|
70
|
+
} | {
|
|
71
|
+
isBlank: boolean;
|
|
72
|
+
info: {
|
|
73
|
+
domContentLoaded: number;
|
|
74
|
+
loadComplete: number;
|
|
75
|
+
firstPaint: number | undefined;
|
|
76
|
+
firstContentfulPaint: number | undefined;
|
|
77
|
+
reason?: undefined;
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
generateReport(): {
|
|
81
|
+
type: string;
|
|
82
|
+
message: string;
|
|
83
|
+
context: {
|
|
84
|
+
timestamp: number;
|
|
85
|
+
url: string;
|
|
86
|
+
domElements: number;
|
|
87
|
+
bodyElements: number;
|
|
88
|
+
hasContent: boolean;
|
|
89
|
+
performanceTiming: {
|
|
90
|
+
reason: string;
|
|
91
|
+
domContentLoaded?: undefined;
|
|
92
|
+
loadComplete?: undefined;
|
|
93
|
+
firstPaint?: undefined;
|
|
94
|
+
firstContentfulPaint?: undefined;
|
|
95
|
+
} | {
|
|
96
|
+
domContentLoaded: number;
|
|
97
|
+
loadComplete: number;
|
|
98
|
+
firstPaint: number | undefined;
|
|
99
|
+
firstContentfulPaint: number | undefined;
|
|
100
|
+
reason?: undefined;
|
|
101
|
+
} | undefined;
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
stop(): void;
|
|
105
|
+
reset(): void;
|
|
106
|
+
}
|
|
107
|
+
declare class S {
|
|
108
|
+
constructor(e: any);
|
|
109
|
+
isInitialized: boolean;
|
|
110
|
+
maxBreadcrumbs: number;
|
|
111
|
+
plugins: any[];
|
|
112
|
+
sessionId: string;
|
|
113
|
+
batchQueue: I | null;
|
|
114
|
+
offlineCache: M;
|
|
115
|
+
config: any;
|
|
116
|
+
logger: f;
|
|
117
|
+
breadcrumbs: D;
|
|
118
|
+
updateConfig(e: any): void;
|
|
119
|
+
enable(): void;
|
|
120
|
+
disable(): void;
|
|
121
|
+
addFilter(e: any): void;
|
|
122
|
+
removeFilter(e: any): void;
|
|
123
|
+
setSampleRate(e: any): void;
|
|
124
|
+
setErrorSampleRate(e: any): void;
|
|
125
|
+
init(): void;
|
|
126
|
+
use(e: any): void;
|
|
127
|
+
capture(e: any, t: any): void;
|
|
128
|
+
shouldFilter(e: any): boolean;
|
|
129
|
+
captureError(e: any, t: any): void;
|
|
130
|
+
captureMessage(e: any, t: string | undefined, i: any): void;
|
|
131
|
+
report(e: any): void;
|
|
132
|
+
addBreadcrumb(e: any): void;
|
|
133
|
+
generateId(): string;
|
|
134
|
+
setUser(e: any): void;
|
|
135
|
+
sendToServer(e: any): void;
|
|
136
|
+
sendToServerDirectly(e: any): void;
|
|
137
|
+
sendBatchToServer(e: any): void;
|
|
138
|
+
destroy(): void;
|
|
139
|
+
}
|
|
140
|
+
declare class m extends S {
|
|
141
|
+
originalFetch: (((input: RequestInfo | URL, init?: RequestInit) => Promise<Response>) & typeof fetch) | null;
|
|
142
|
+
originalXHR: {
|
|
143
|
+
new (): XMLHttpRequest;
|
|
144
|
+
prototype: XMLHttpRequest;
|
|
145
|
+
readonly UNSENT: 0;
|
|
146
|
+
readonly OPENED: 1;
|
|
147
|
+
readonly HEADERS_RECEIVED: 2;
|
|
148
|
+
readonly LOADING: 3;
|
|
149
|
+
readonly DONE: 4;
|
|
150
|
+
} | null;
|
|
151
|
+
blankScreenDetector: y | null;
|
|
152
|
+
eventListeners: any[];
|
|
153
|
+
timers: Set<any>;
|
|
154
|
+
performanceMonitor: k;
|
|
155
|
+
trackedAddEventListener(e: any, t: any, i: any, r: any): void;
|
|
156
|
+
trackedSetTimeout(e: any, t: any): number;
|
|
157
|
+
trackedClearTimeout(e: any): void;
|
|
158
|
+
setupJsErrorHandler(): void;
|
|
159
|
+
setupPromiseErrorHandler(): void;
|
|
160
|
+
setupNetworkErrorHandler(): void;
|
|
161
|
+
setupResourceErrorHandler(): void;
|
|
162
|
+
interceptResourceElements(): void;
|
|
163
|
+
setupBlankScreenDetection(): void;
|
|
164
|
+
captureMessage(e: any, t?: string): void;
|
|
165
|
+
getPerformanceMetrics(): {};
|
|
166
|
+
getPerformanceSummary(): string;
|
|
167
|
+
checkPerformanceHealth(): {
|
|
168
|
+
healthy: boolean;
|
|
169
|
+
issues: string[];
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
declare class k {
|
|
173
|
+
metrics: {};
|
|
174
|
+
entries: any[];
|
|
175
|
+
errorProcessingTimes: any[];
|
|
176
|
+
uploadTimes: any[];
|
|
177
|
+
failedUploads: number;
|
|
178
|
+
initStartTime: number | null;
|
|
179
|
+
initEndTime: number | null;
|
|
180
|
+
startInit(): void;
|
|
181
|
+
endInit(): void;
|
|
182
|
+
recordErrorProcessing(e: any, t: any): void;
|
|
183
|
+
recordUpload(e: any, t: any, i: any): void;
|
|
184
|
+
getMetrics(): {};
|
|
185
|
+
getEntries(): any[];
|
|
186
|
+
getRecentEntries(e: any): any[];
|
|
187
|
+
clear(): void;
|
|
188
|
+
getSummary(): string;
|
|
189
|
+
updateErrorProcessingMetrics(): void;
|
|
190
|
+
updateUploadMetrics(): void;
|
|
191
|
+
isHealthy(): {
|
|
192
|
+
healthy: boolean;
|
|
193
|
+
issues: string[];
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
declare function b(c: any): y;
|
|
197
|
+
declare function _(c: any): m;
|
|
198
|
+
declare function v(): k;
|
|
199
|
+
declare class f {
|
|
200
|
+
constructor(e?: boolean, t?: number);
|
|
201
|
+
level: number;
|
|
202
|
+
setLevel(e: any): void;
|
|
203
|
+
setEnabled(e: any): void;
|
|
204
|
+
getLevel(): number;
|
|
205
|
+
debug(...e: any[]): void;
|
|
206
|
+
info(...e: any[]): void;
|
|
207
|
+
warn(...e: any[]): void;
|
|
208
|
+
error(...e: any[]): void;
|
|
209
|
+
}
|
|
210
|
+
declare class I {
|
|
211
|
+
constructor(e: any, t: any);
|
|
212
|
+
queue: any[];
|
|
213
|
+
timerId: number | null;
|
|
214
|
+
config: {
|
|
215
|
+
batchSize: any;
|
|
216
|
+
delay: any;
|
|
217
|
+
enabled: boolean;
|
|
218
|
+
};
|
|
219
|
+
sender: any;
|
|
220
|
+
add(e: any): void;
|
|
221
|
+
scheduleFlush(): void;
|
|
222
|
+
flush(): void;
|
|
223
|
+
sendReports(e: any): void;
|
|
224
|
+
size(): number;
|
|
225
|
+
clear(): void;
|
|
226
|
+
updateConfig(e: any): void;
|
|
227
|
+
destroy(): void;
|
|
228
|
+
}
|
|
229
|
+
declare class M {
|
|
230
|
+
constructor(e: any, t: any);
|
|
231
|
+
cacheQueue: any[];
|
|
232
|
+
config: {
|
|
233
|
+
maxCacheSize: any;
|
|
234
|
+
enabled: boolean;
|
|
235
|
+
storageKey: any;
|
|
236
|
+
};
|
|
237
|
+
sender: any;
|
|
238
|
+
isOnline: boolean;
|
|
239
|
+
cache(e: any): void;
|
|
240
|
+
send(e: any): void;
|
|
241
|
+
handleOnline(): void;
|
|
242
|
+
handleOffline(): void;
|
|
243
|
+
flush(): Promise<void>;
|
|
244
|
+
saveToStorage(): void;
|
|
245
|
+
loadFromStorage(): void;
|
|
246
|
+
clear(): void;
|
|
247
|
+
size(): number;
|
|
248
|
+
online(): boolean;
|
|
249
|
+
destroy(): void;
|
|
250
|
+
}
|
|
251
|
+
declare class D {
|
|
252
|
+
constructor(e: any);
|
|
253
|
+
head: number;
|
|
254
|
+
tail: number;
|
|
255
|
+
_size: number;
|
|
256
|
+
capacity: any;
|
|
257
|
+
buffer: any[];
|
|
258
|
+
push(e: any): void;
|
|
259
|
+
toArray(): any[];
|
|
260
|
+
getSize(): number;
|
|
261
|
+
clear(): void;
|
|
262
|
+
get length(): number;
|
|
263
|
+
get(e: any): any;
|
|
264
|
+
}
|
|
265
|
+
export { y as BlankScreenDetector, S as ErrorMonitor, m as ErrorMonitorWeb, k as PerformanceMonitor, b as createBlankScreenDetector, _ as createErrorMonitorWeb, v as createPerformanceMonitor };
|
|
266
|
+
//# sourceMappingURL=index.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../index.cjs"],"names":[],"mappings":";AAAigV;IAAQ,oBAAwZ;IAAtY,mBAAiB;IAAC,uBAAiB;IAAC,uBAAqB;IAAC;;;;;;;MAA2S;IAAC,UAA+B;IAAC,0BAAuC;IAAA,oBAAqQ;IAAA,2BAAylB;IAAA,wBAAgZ;IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAA4yB;IAAA;;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IAAjB,cAAgB;IAAC,uBAAyB;IAAA,yBAA+B;IAAA,mBAA6B;IAAA,yBAAoE;IAAA,wBAAmE;IAAA,wBAAmE;IAAA,yBAAsE;CAAC;AAAmI;IAAQ,4BAAoR;IAAnQ,aAAa;IAAC,uBAAiB;IAAC;;;;MAAiF;IAAC,YAAa;IAAoI,kBAAoL;IAAA,sBAA4G;IAAA,cAAyL;IAAA,0BAAuM;IAAA,eAAgC;IAAA,cAAiG;IAAA,2BAAkD;IAAA,gBAAgK;CAAC;AAAA;IAAQ,4BAAgY;IAA/W,kBAAkB;IAAC;;;;MAAoH;IAAC,YAAa;IAAC,kBAAsD;IAAmK,oBAAmN;IAAA,mBAAmD;IAAA,qBAA+G;IAAA,sBAA4G;IAAA,uBAAghB;IAAA,sBAA2M;IAAA,wBAAwU;IAAA,cAAgD;IAAA,eAAqC;IAAA,kBAA8B;IAAA,gBAAgL;CAAC;AAAkK;IAAQ,oBAA6F;IAA9E,aAAW;IAAC,aAAW;IAAC,cAAY;IAAC,cAAe;IAAC,cAAwB;IAAC,mBAAmJ;IAAA,iBAAuI;IAAA,kBAA4B;IAAA,cAAkF;IAAA,qBAA+B;IAAA,iBAA8F;CAAC"}
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
declare class I {
|
|
2
|
+
constructor(e?: {});
|
|
3
|
+
checkCount: number;
|
|
4
|
+
timerId: number | null;
|
|
5
|
+
isBlankScreen: boolean;
|
|
6
|
+
config: {
|
|
7
|
+
detectionDelay: any;
|
|
8
|
+
minElements: any;
|
|
9
|
+
checkInterval: any;
|
|
10
|
+
maxChecks: any;
|
|
11
|
+
checkPerformance: boolean;
|
|
12
|
+
customCheck: any;
|
|
13
|
+
};
|
|
14
|
+
logger: f;
|
|
15
|
+
setLogLevel(e: any): void;
|
|
16
|
+
start(e: any): void;
|
|
17
|
+
performCheck(e: any): void;
|
|
18
|
+
checkIfBlank(): boolean;
|
|
19
|
+
checkDOMElementsOptimized(): {
|
|
20
|
+
isBlank: boolean;
|
|
21
|
+
info: {
|
|
22
|
+
reason: string;
|
|
23
|
+
bodyChildren?: undefined;
|
|
24
|
+
error?: undefined;
|
|
25
|
+
totalNodes?: undefined;
|
|
26
|
+
contentNodes?: undefined;
|
|
27
|
+
checkedNodes?: undefined;
|
|
28
|
+
};
|
|
29
|
+
} | {
|
|
30
|
+
isBlank: boolean;
|
|
31
|
+
info: {
|
|
32
|
+
reason: string;
|
|
33
|
+
bodyChildren: number;
|
|
34
|
+
error?: undefined;
|
|
35
|
+
totalNodes?: undefined;
|
|
36
|
+
contentNodes?: undefined;
|
|
37
|
+
checkedNodes?: undefined;
|
|
38
|
+
};
|
|
39
|
+
} | {
|
|
40
|
+
isBlank: boolean;
|
|
41
|
+
info: {
|
|
42
|
+
bodyChildren: number;
|
|
43
|
+
error: boolean;
|
|
44
|
+
reason?: undefined;
|
|
45
|
+
totalNodes?: undefined;
|
|
46
|
+
contentNodes?: undefined;
|
|
47
|
+
checkedNodes?: undefined;
|
|
48
|
+
};
|
|
49
|
+
} | {
|
|
50
|
+
isBlank: boolean;
|
|
51
|
+
info: {
|
|
52
|
+
totalNodes: number;
|
|
53
|
+
contentNodes: number;
|
|
54
|
+
bodyChildren: number;
|
|
55
|
+
checkedNodes: number;
|
|
56
|
+
reason?: undefined;
|
|
57
|
+
error?: undefined;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
checkPerformanceTiming(): {
|
|
61
|
+
isBlank: boolean;
|
|
62
|
+
info: {
|
|
63
|
+
reason: string;
|
|
64
|
+
domContentLoaded?: undefined;
|
|
65
|
+
loadComplete?: undefined;
|
|
66
|
+
firstPaint?: undefined;
|
|
67
|
+
firstContentfulPaint?: undefined;
|
|
68
|
+
};
|
|
69
|
+
} | {
|
|
70
|
+
isBlank: boolean;
|
|
71
|
+
info: {
|
|
72
|
+
domContentLoaded: number;
|
|
73
|
+
loadComplete: number;
|
|
74
|
+
firstPaint: number | undefined;
|
|
75
|
+
firstContentfulPaint: number | undefined;
|
|
76
|
+
reason?: undefined;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
generateReport(): {
|
|
80
|
+
type: string;
|
|
81
|
+
message: string;
|
|
82
|
+
context: {
|
|
83
|
+
timestamp: number;
|
|
84
|
+
url: string;
|
|
85
|
+
domElements: number;
|
|
86
|
+
bodyElements: number;
|
|
87
|
+
hasContent: boolean;
|
|
88
|
+
performanceTiming: {
|
|
89
|
+
reason: string;
|
|
90
|
+
domContentLoaded?: undefined;
|
|
91
|
+
loadComplete?: undefined;
|
|
92
|
+
firstPaint?: undefined;
|
|
93
|
+
firstContentfulPaint?: undefined;
|
|
94
|
+
} | {
|
|
95
|
+
domContentLoaded: number;
|
|
96
|
+
loadComplete: number;
|
|
97
|
+
firstPaint: number | undefined;
|
|
98
|
+
firstContentfulPaint: number | undefined;
|
|
99
|
+
reason?: undefined;
|
|
100
|
+
} | undefined;
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
stop(): void;
|
|
104
|
+
reset(): void;
|
|
105
|
+
}
|
|
106
|
+
declare class v {
|
|
107
|
+
constructor(e: any);
|
|
108
|
+
isInitialized: boolean;
|
|
109
|
+
maxBreadcrumbs: number;
|
|
110
|
+
plugins: any[];
|
|
111
|
+
sessionId: string;
|
|
112
|
+
batchQueue: S | null;
|
|
113
|
+
offlineCache: y;
|
|
114
|
+
config: any;
|
|
115
|
+
logger: f;
|
|
116
|
+
breadcrumbs: b;
|
|
117
|
+
updateConfig(e: any): void;
|
|
118
|
+
enable(): void;
|
|
119
|
+
disable(): void;
|
|
120
|
+
addFilter(e: any): void;
|
|
121
|
+
removeFilter(e: any): void;
|
|
122
|
+
setSampleRate(e: any): void;
|
|
123
|
+
setErrorSampleRate(e: any): void;
|
|
124
|
+
init(): void;
|
|
125
|
+
use(e: any): void;
|
|
126
|
+
capture(e: any, t: any): void;
|
|
127
|
+
shouldFilter(e: any): boolean;
|
|
128
|
+
captureError(e: any, t: any): void;
|
|
129
|
+
captureMessage(e: any, t: string | undefined, i: any): void;
|
|
130
|
+
report(e: any): void;
|
|
131
|
+
addBreadcrumb(e: any): void;
|
|
132
|
+
generateId(): string;
|
|
133
|
+
setUser(e: any): void;
|
|
134
|
+
sendToServer(e: any): void;
|
|
135
|
+
sendToServerDirectly(e: any): void;
|
|
136
|
+
sendBatchToServer(e: any): void;
|
|
137
|
+
destroy(): void;
|
|
138
|
+
}
|
|
139
|
+
declare class A extends v {
|
|
140
|
+
originalFetch: (((input: RequestInfo | URL, init?: RequestInit) => Promise<Response>) & typeof fetch) | null;
|
|
141
|
+
originalXHR: {
|
|
142
|
+
new (): XMLHttpRequest;
|
|
143
|
+
prototype: XMLHttpRequest;
|
|
144
|
+
readonly UNSENT: 0;
|
|
145
|
+
readonly OPENED: 1;
|
|
146
|
+
readonly HEADERS_RECEIVED: 2;
|
|
147
|
+
readonly LOADING: 3;
|
|
148
|
+
readonly DONE: 4;
|
|
149
|
+
} | null;
|
|
150
|
+
blankScreenDetector: I | null;
|
|
151
|
+
eventListeners: any[];
|
|
152
|
+
timers: Set<any>;
|
|
153
|
+
performanceMonitor: M;
|
|
154
|
+
trackedAddEventListener(e: any, t: any, i: any, r: any): void;
|
|
155
|
+
trackedSetTimeout(e: any, t: any): number;
|
|
156
|
+
trackedClearTimeout(e: any): void;
|
|
157
|
+
setupJsErrorHandler(): void;
|
|
158
|
+
setupPromiseErrorHandler(): void;
|
|
159
|
+
setupNetworkErrorHandler(): void;
|
|
160
|
+
setupResourceErrorHandler(): void;
|
|
161
|
+
interceptResourceElements(): void;
|
|
162
|
+
setupBlankScreenDetection(): void;
|
|
163
|
+
captureMessage(e: any, t?: string): void;
|
|
164
|
+
getPerformanceMetrics(): {};
|
|
165
|
+
getPerformanceSummary(): string;
|
|
166
|
+
checkPerformanceHealth(): {
|
|
167
|
+
healthy: boolean;
|
|
168
|
+
issues: string[];
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
declare class M {
|
|
172
|
+
metrics: {};
|
|
173
|
+
entries: any[];
|
|
174
|
+
errorProcessingTimes: any[];
|
|
175
|
+
uploadTimes: any[];
|
|
176
|
+
failedUploads: number;
|
|
177
|
+
initStartTime: number | null;
|
|
178
|
+
initEndTime: number | null;
|
|
179
|
+
startInit(): void;
|
|
180
|
+
endInit(): void;
|
|
181
|
+
recordErrorProcessing(e: any, t: any): void;
|
|
182
|
+
recordUpload(e: any, t: any, i: any): void;
|
|
183
|
+
getMetrics(): {};
|
|
184
|
+
getEntries(): any[];
|
|
185
|
+
getRecentEntries(e: any): any[];
|
|
186
|
+
clear(): void;
|
|
187
|
+
getSummary(): string;
|
|
188
|
+
updateErrorProcessingMetrics(): void;
|
|
189
|
+
updateUploadMetrics(): void;
|
|
190
|
+
isHealthy(): {
|
|
191
|
+
healthy: boolean;
|
|
192
|
+
issues: string[];
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
declare function L(c: any): I;
|
|
196
|
+
declare function R(c: any): A;
|
|
197
|
+
declare function D(): M;
|
|
198
|
+
declare class f {
|
|
199
|
+
constructor(e?: boolean, t?: number);
|
|
200
|
+
level: number;
|
|
201
|
+
setLevel(e: any): void;
|
|
202
|
+
setEnabled(e: any): void;
|
|
203
|
+
getLevel(): number;
|
|
204
|
+
debug(...e: any[]): void;
|
|
205
|
+
info(...e: any[]): void;
|
|
206
|
+
warn(...e: any[]): void;
|
|
207
|
+
error(...e: any[]): void;
|
|
208
|
+
}
|
|
209
|
+
declare class S {
|
|
210
|
+
constructor(e: any, t: any);
|
|
211
|
+
queue: any[];
|
|
212
|
+
timerId: number | null;
|
|
213
|
+
config: {
|
|
214
|
+
batchSize: any;
|
|
215
|
+
delay: any;
|
|
216
|
+
enabled: boolean;
|
|
217
|
+
};
|
|
218
|
+
sender: any;
|
|
219
|
+
add(e: any): void;
|
|
220
|
+
scheduleFlush(): void;
|
|
221
|
+
flush(): void;
|
|
222
|
+
sendReports(e: any): void;
|
|
223
|
+
size(): number;
|
|
224
|
+
clear(): void;
|
|
225
|
+
updateConfig(e: any): void;
|
|
226
|
+
destroy(): void;
|
|
227
|
+
}
|
|
228
|
+
declare class y {
|
|
229
|
+
constructor(e: any, t: any);
|
|
230
|
+
cacheQueue: any[];
|
|
231
|
+
config: {
|
|
232
|
+
maxCacheSize: any;
|
|
233
|
+
enabled: boolean;
|
|
234
|
+
storageKey: any;
|
|
235
|
+
};
|
|
236
|
+
sender: any;
|
|
237
|
+
isOnline: boolean;
|
|
238
|
+
cache(e: any): void;
|
|
239
|
+
send(e: any): void;
|
|
240
|
+
handleOnline(): void;
|
|
241
|
+
handleOffline(): void;
|
|
242
|
+
flush(): Promise<void>;
|
|
243
|
+
saveToStorage(): void;
|
|
244
|
+
loadFromStorage(): void;
|
|
245
|
+
clear(): void;
|
|
246
|
+
size(): number;
|
|
247
|
+
online(): boolean;
|
|
248
|
+
destroy(): void;
|
|
249
|
+
}
|
|
250
|
+
declare class b {
|
|
251
|
+
constructor(e: any);
|
|
252
|
+
head: number;
|
|
253
|
+
tail: number;
|
|
254
|
+
_size: number;
|
|
255
|
+
capacity: any;
|
|
256
|
+
buffer: any[];
|
|
257
|
+
push(e: any): void;
|
|
258
|
+
toArray(): any[];
|
|
259
|
+
getSize(): number;
|
|
260
|
+
clear(): void;
|
|
261
|
+
get length(): number;
|
|
262
|
+
get(e: any): any;
|
|
263
|
+
}
|
|
264
|
+
export { I as BlankScreenDetector, v as ErrorMonitor, A as ErrorMonitorWeb, M as PerformanceMonitor, L as createBlankScreenDetector, R as createErrorMonitorWeb, D as createPerformanceMonitor, A as default };
|
|
265
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../index.mjs"],"names":[],"mappings":"AAioBA;IACE,oBASC;IARC,mBAAmB;IAAE,uBAAmB;IAAE,uBAAuB;IAAE;;;;;;;MAOlE;IAAE,UAAkC;IAMvC,0BAEC;IAID,oBAIC;IAID,2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;IAID,yBAEC;IAID,wBAEC;IAID,wBAEC;IAID,yBAEC;CACF;AAsBD;IACE,4BAMC;IALC,aAAe;IAAE,uBAAmB;IAAE;;;;MAIrC;IAAE,YAAe;IAKpB,kBASC;IAID,sBAIC;IAID,cAKC;IAID,0BASC;IAID,eAEC;IAID,cAEC;IAID,2BAEC;IAID,gBAEC;CACF;AACD;IACE,4BAMC;IALC,kBAAoB;IAAE;;;;MAIrB;IAAE,YAAe;IAAE,kBAA8D;IAKpF,oBASC;IAID,mBAEC;IAID,qBAEC;IAID,sBAEC;IAID,uBAkBC;IAID,sBAOC;IAID,wBAQC;IAID,cAEC;IAID,eAEC;IAID,kBAEC;IAID,gBAEC;CACF;AAOD;IACE,oBAEC;IADC,aAAa;IAAE,aAAa;IAAE,cAAc;IAAE,cAAiB;IAAE,cAA0B;IAK7F,mBAEC;IAID,iBAOC;IAID,kBAEC;IAID,cAEC;IAID,qBAEC;IAID,iBAKC;CACF"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,89 +1,53 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
private
|
|
23
|
-
private
|
|
24
|
-
private
|
|
25
|
-
private
|
|
26
|
-
private
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
export
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
export declare function createErrorMonitorWeb(config: WebConfig): ErrorMonitorWeb;
|
|
56
|
-
|
|
57
|
-
export { ErrorMonitor }
|
|
58
|
-
|
|
59
|
-
declare class ErrorMonitorWeb extends ErrorMonitor {
|
|
60
|
-
protected config: WebConfig;
|
|
61
|
-
private originalFetch;
|
|
62
|
-
private originalXHR;
|
|
63
|
-
private blankScreenDetector;
|
|
64
|
-
constructor(config: WebConfig);
|
|
65
|
-
init(): void;
|
|
66
|
-
private setupJsErrorHandler;
|
|
67
|
-
private setupPromiseErrorHandler;
|
|
68
|
-
private setupNetworkErrorHandler;
|
|
69
|
-
private setupResourceErrorHandler;
|
|
70
|
-
private setupBlankScreenDetection;
|
|
71
|
-
captureError(error: Error, context?: Record<string, any>): void;
|
|
72
|
-
captureMessage(message: string, level?: string): void;
|
|
73
|
-
destroy(): void;
|
|
74
|
-
}
|
|
75
|
-
export { ErrorMonitorWeb }
|
|
76
|
-
export default ErrorMonitorWeb;
|
|
77
|
-
|
|
78
|
-
export { Plugin_2 as Plugin }
|
|
79
|
-
|
|
80
|
-
export declare interface WebConfig extends Config {
|
|
81
|
-
captureJsErrors?: boolean;
|
|
82
|
-
capturePromiseErrors?: boolean;
|
|
83
|
-
captureNetworkErrors?: boolean;
|
|
84
|
-
captureResourceErrors?: boolean;
|
|
85
|
-
blankScreenDetection?: boolean | BlankScreenConfig;
|
|
86
|
-
customReporter?: (data: any) => void;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
export { }
|
|
1
|
+
import { ErrorMonitor, Config } from 'error-monitor-core';
|
|
2
|
+
import { BlankScreenDetector, BlankScreenConfig, createBlankScreenDetector } from './blank-screen-detector';
|
|
3
|
+
import { PerformanceMonitor, createPerformanceMonitor, PerformanceMetrics } from './performance-monitor';
|
|
4
|
+
|
|
5
|
+
export { ErrorMonitor } from 'error-monitor-core';
|
|
6
|
+
export type { Config, Plugin, Breadcrumb } from 'error-monitor-core';
|
|
7
|
+
export { BlankScreenDetector, createBlankScreenDetector };
|
|
8
|
+
export type { BlankScreenConfig, BlankScreenReport } from './blank-screen-detector';
|
|
9
|
+
export { PerformanceMonitor, createPerformanceMonitor };
|
|
10
|
+
export type { PerformanceMetrics } from './performance-monitor';
|
|
11
|
+
export interface WebConfig extends Config {
|
|
12
|
+
captureJsErrors?: boolean;
|
|
13
|
+
capturePromiseErrors?: boolean;
|
|
14
|
+
captureNetworkErrors?: boolean;
|
|
15
|
+
captureResourceErrors?: boolean;
|
|
16
|
+
blankScreenDetection?: boolean | BlankScreenConfig;
|
|
17
|
+
customReporter?: (data: any) => void;
|
|
18
|
+
}
|
|
19
|
+
export declare class ErrorMonitorWeb extends ErrorMonitor {
|
|
20
|
+
protected config: WebConfig;
|
|
21
|
+
private originalFetch;
|
|
22
|
+
private originalXHR;
|
|
23
|
+
private blankScreenDetector;
|
|
24
|
+
private performanceMonitor;
|
|
25
|
+
private logger;
|
|
26
|
+
private eventListeners;
|
|
27
|
+
private timers;
|
|
28
|
+
constructor(config: WebConfig);
|
|
29
|
+
init(): void;
|
|
30
|
+
private trackedAddEventListener;
|
|
31
|
+
private trackedSetTimeout;
|
|
32
|
+
private trackedClearTimeout;
|
|
33
|
+
private setupJsErrorHandler;
|
|
34
|
+
private setupPromiseErrorHandler;
|
|
35
|
+
private setupNetworkErrorHandler;
|
|
36
|
+
private setupResourceErrorHandler;
|
|
37
|
+
private interceptResourceElements;
|
|
38
|
+
private setupBlankScreenDetection;
|
|
39
|
+
captureError(error: Error, context?: Record<string, any>): void;
|
|
40
|
+
captureMessage(message: string, level?: string): void;
|
|
41
|
+
capture(error: any, options?: any): void;
|
|
42
|
+
report(data: any): void;
|
|
43
|
+
getPerformanceMetrics(): PerformanceMetrics;
|
|
44
|
+
getPerformanceSummary(): string;
|
|
45
|
+
checkPerformanceHealth(): {
|
|
46
|
+
healthy: boolean;
|
|
47
|
+
issues: string[];
|
|
48
|
+
};
|
|
49
|
+
destroy(): void;
|
|
50
|
+
}
|
|
51
|
+
export declare function createErrorMonitorWeb(config: WebConfig): ErrorMonitorWeb;
|
|
52
|
+
export default ErrorMonitorWeb;
|
|
53
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,EAAU,MAAM,oBAAoB,CAAA;AACjE,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,yBAAyB,EAC1B,MAAM,yBAAyB,CAAA;AAChC,OAAO,EACL,kBAAkB,EAClB,wBAAwB,EACxB,kBAAkB,EACnB,MAAM,uBAAuB,CAAA;AAG9B,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACjD,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAGpE,OAAO,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,CAAA;AACzD,YAAY,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAGnF,OAAO,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,CAAA;AACvD,YAAY,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAK/D,MAAM,WAAW,SAAU,SAAQ,MAAM;IAEvC,eAAe,CAAC,EAAE,OAAO,CAAA;IAEzB,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAE9B,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAE9B,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAE/B,oBAAoB,CAAC,EAAE,OAAO,GAAG,iBAAiB,CAAA;IAElD,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAA;CACrC;AAKD,qBAAa,eAAgB,SAAQ,YAAY;IAC/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