@logbrew/react-native 0.1.34 → 0.1.36
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/README.md +33 -4
- package/android/src/main/java/co/logbrew/reactnative/AndroidDiagnosticsRuntime.java +2 -0
- package/android/src/main/java/co/logbrew/reactnative/AndroidNativeDiagnostics.java +56 -2
- package/android/src/main/java/co/logbrew/reactnative/EventRecordStore.java +25 -0
- package/android/src/main/java/co/logbrew/reactnative/FatalStoreModuleImpl.java +30 -3
- package/android/src/newarch/java/co/logbrew/reactnative/FatalStoreModule.java +6 -0
- package/android/src/oldarch/java/co/logbrew/reactnative/FatalStoreModule.java +6 -0
- package/expo.cjs +1 -1
- package/fatal-replay.cjs +97 -110
- package/global-errors.cjs +94 -130
- package/global-errors.d.cts +23 -3
- package/global-errors.d.ts +23 -3
- package/index.cjs +47 -20
- package/index.d.cts +1 -0
- package/index.d.ts +1 -0
- package/index.native.js +4 -3
- package/instrumentation.cjs +80 -57
- package/ios/AppleDiagnostics/LBRNAppleNativeDiagnostics.swift +1 -1
- package/ios/GeneratedAppleDiagnostics/LogBrewCrash/NativeCrashCorrelation.swift +2 -0
- package/ios/GeneratedAppleDiagnostics/LogBrewCrash/NativeCrashReplay.swift +31 -7
- package/ios/GeneratedAppleDiagnostics/SOURCE-MANIFEST.json +2 -2
- package/ios/LBRNEventRecordStore.h +1 -0
- package/ios/LBRNEventRecordStore.m +43 -0
- package/ios/LBRNFatalStoreModule.mm +14 -0
- package/metadata.cjs +1 -1
- package/native-bridge.cjs +112 -8
- package/native-bridge.d.cts +34 -0
- package/native-bridge.d.ts +34 -0
- package/native-bridge.js +2 -1
- package/package.json +1 -1
- package/persistent-delivery.native.js +12 -1
- package/promise-rejections.cjs +11 -1
- package/src/NativeLogBrewFatalStore.ts +4 -0
|
@@ -122,7 +122,7 @@ export function purgeReactNativePersistentQueue({ apiKey, clientKey } = {}) {
|
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
function createNativeEventStore(nativeStore, authKey, release) {
|
|
125
|
-
|
|
125
|
+
const eventStore = {
|
|
126
126
|
load() {
|
|
127
127
|
const result = requireStatus(
|
|
128
128
|
"load",
|
|
@@ -193,6 +193,15 @@ function createNativeEventStore(nativeStore, authKey, release) {
|
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
195
|
};
|
|
196
|
+
// Older native binaries lack removal; the core then drops a fatal at a full queue.
|
|
197
|
+
if (typeof nativeStore.removeEventRecords === "function") {
|
|
198
|
+
eventStore.remove = (indexes) => requireStatus(
|
|
199
|
+
"remove",
|
|
200
|
+
callNative(nativeStore, "removeEventRecords", authKey, indexes),
|
|
201
|
+
"removed"
|
|
202
|
+
);
|
|
203
|
+
}
|
|
204
|
+
return eventStore;
|
|
196
205
|
}
|
|
197
206
|
|
|
198
207
|
function defaultNativeStore() {
|
|
@@ -266,6 +275,8 @@ function methodName(method) {
|
|
|
266
275
|
return "append";
|
|
267
276
|
case "acknowledgeEventRecords":
|
|
268
277
|
return "acknowledge";
|
|
278
|
+
case "removeEventRecords":
|
|
279
|
+
return "remove";
|
|
269
280
|
case "purgeEventRecords":
|
|
270
281
|
return "purge";
|
|
271
282
|
case "closeEventStore":
|
package/promise-rejections.cjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
const { createReactNativeErrorEvent } = require("./index.cjs");
|
|
4
|
+
const { captureIssueWithAdmission } = require("./fatal-replay.cjs");
|
|
4
5
|
|
|
5
6
|
const AUTOMATIC_MESSAGE = "Unhandled Promise rejection";
|
|
6
7
|
const DEFAULT_MAX_TRACKED_REJECTIONS = 128;
|
|
@@ -101,7 +102,16 @@ function createPromiseRejectionHandlers(options, mechanism) {
|
|
|
101
102
|
emitStateDiagnostic(state, onDiagnostic, "promise_rejection_id_unavailable");
|
|
102
103
|
}
|
|
103
104
|
const event = createEvent(mechanism);
|
|
104
|
-
|
|
105
|
+
const admission = captureIssueWithAdmission(client, issue, event.id, event.timestamp, event.attributes);
|
|
106
|
+
if (admission !== "admitted") {
|
|
107
|
+
state.lastOutcome = admission === "unavailable"
|
|
108
|
+
? "admission_unavailable"
|
|
109
|
+
: admission === "filtered" ? "filtered" : "capture_failed";
|
|
110
|
+
emitStateDiagnostic(state, onDiagnostic, admission === "unavailable"
|
|
111
|
+
? "promise_rejection_admission_unavailable"
|
|
112
|
+
: admission === "filtered" ? "promise_rejection_filtered" : "promise_rejection_capture_failed");
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
105
115
|
state.capturedEvents = incrementBounded(state.capturedEvents);
|
|
106
116
|
|
|
107
117
|
if (key === undefined) {
|
|
@@ -10,6 +10,10 @@ export interface Spec extends TurboModule {
|
|
|
10
10
|
eventBytes: number
|
|
11
11
|
): CodegenTypes.UnsafeObject;
|
|
12
12
|
acknowledgeEventRecords(queueKey: string, count: number): CodegenTypes.UnsafeObject;
|
|
13
|
+
removeEventRecords(
|
|
14
|
+
queueKey: string,
|
|
15
|
+
indexes: ReadonlyArray<number>
|
|
16
|
+
): CodegenTypes.UnsafeObject;
|
|
13
17
|
purgeEventRecords(queueKey: string): CodegenTypes.UnsafeObject;
|
|
14
18
|
closeEventStore(queueKey: string): CodegenTypes.UnsafeObject;
|
|
15
19
|
installAndroidDiagnostics(
|