@bugsnag/plugin-react-native-event-sync
Advanced tools
Comparing version 8.0.0-alpha.9 to 8.0.0-alpha.10
module.exports = (NativeClient) => ({ | ||
load: (client) => { | ||
client.addOnError(async event => { | ||
const { | ||
threads, | ||
breadcrumbs, | ||
app, | ||
device, | ||
deviceMetadata, | ||
appMetadata | ||
} = await NativeClient.getPayloadInfo({ unhandled: event.unhandled }) | ||
const isTurboModuleEnabled = global.__turboModuleProxy != null | ||
event.breadcrumbs = breadcrumbs | ||
event.app = { ...event.app, ...app } | ||
event.device = { ...event.device, ...device } | ||
event.threads = threads | ||
event.addMetadata('device', deviceMetadata) | ||
event.addMetadata('app', appMetadata) | ||
}, true) | ||
if (isTurboModuleEnabled) { | ||
client.addOnError(event => { | ||
const payloadInfo = NativeClient.getPayloadInfo({ unhandled: event.unhandled }) | ||
syncEvent(payloadInfo, event) | ||
}, true) | ||
} else { | ||
client.addOnError(async event => { | ||
const payloadInfo = await NativeClient.getPayloadInfoAsync({ unhandled: event.unhandled }) | ||
syncEvent(payloadInfo, event) | ||
}, true) | ||
} | ||
} | ||
}) | ||
const syncEvent = (payloadInfo, event) => { | ||
const { | ||
threads, | ||
breadcrumbs, | ||
app, | ||
device, | ||
deviceMetadata, | ||
appMetadata | ||
} = payloadInfo | ||
event.breadcrumbs = breadcrumbs | ||
event.app = { ...event.app, ...app } | ||
event.device = { ...event.device, ...device } | ||
event.threads = threads | ||
event.addMetadata('device', deviceMetadata) | ||
event.addMetadata('app', appMetadata) | ||
} |
{ | ||
"name": "@bugsnag/plugin-react-native-event-sync", | ||
"version": "8.0.0-alpha.9", | ||
"version": "8.0.0-alpha.10", | ||
"main": "event-sync.js", | ||
@@ -20,3 +20,3 @@ "description": "@bugsnag/react-native plugin to sync native event information in an onError callbacks", | ||
"devDependencies": { | ||
"@bugsnag/core": "^8.0.0-alpha.9" | ||
"@bugsnag/core": "^8.0.0-alpha.10" | ||
}, | ||
@@ -26,3 +26,3 @@ "peerDependencies": { | ||
}, | ||
"gitHead": "aa2585cd436873745012438acb522dd4db91272c" | ||
"gitHead": "295998db709e022da6f5c7e73571e5b9a45f045e" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2998
32