@sentry/react-native 6.11.0 → 6.12.0
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/RNSentry.podspec +1 -1
- package/android/src/main/java/io/sentry/react/RNSentryVersion.java +1 -1
- package/dist/js/integrations/default.d.ts.map +1 -1
- package/dist/js/integrations/default.js +2 -4
- package/dist/js/integrations/default.js.map +1 -1
- package/dist/js/integrations/expocontext.d.ts +2 -1
- package/dist/js/integrations/expocontext.d.ts.map +1 -1
- package/dist/js/integrations/expocontext.js +81 -6
- package/dist/js/integrations/expocontext.js.map +1 -1
- package/dist/js/integrations/exports.d.ts +1 -1
- package/dist/js/integrations/exports.d.ts.map +1 -1
- package/dist/js/integrations/exports.js +1 -1
- package/dist/js/integrations/exports.js.map +1 -1
- package/dist/js/tools/metroconfig.js +1 -1
- package/dist/js/tools/metroconfig.js.map +1 -1
- package/dist/js/utils/expoglobalobject.d.ts +21 -0
- package/dist/js/utils/expoglobalobject.d.ts.map +1 -1
- package/dist/js/utils/expoglobalobject.js.map +1 -1
- package/dist/js/utils/expomodules.d.ts +5 -1
- package/dist/js/utils/expomodules.d.ts.map +1 -1
- package/dist/js/utils/expomodules.js +11 -2
- package/dist/js/utils/expomodules.js.map +1 -1
- package/dist/js/version.d.ts +1 -1
- package/dist/js/version.js +1 -1
- package/dist/js/version.js.map +1 -1
- package/ios/RNSentryVersion.m +1 -1
- package/package.json +3 -3
- package/ts3.8/dist/js/integrations/expocontext.d.ts +1 -0
- package/ts3.8/dist/js/integrations/exports.d.ts +1 -1
- package/ts3.8/dist/js/utils/expoglobalobject.d.ts +21 -0
- package/ts3.8/dist/js/utils/expomodules.d.ts +5 -1
- package/ts3.8/dist/js/version.d.ts +1 -1
package/RNSentry.podspec
CHANGED
|
@@ -37,7 +37,7 @@ Pod::Spec.new do |s|
|
|
|
37
37
|
|
|
38
38
|
s.compiler_flags = other_cflags
|
|
39
39
|
|
|
40
|
-
s.dependency 'Sentry/HybridSDK', '8.49.
|
|
40
|
+
s.dependency 'Sentry/HybridSDK', '8.49.1'
|
|
41
41
|
|
|
42
42
|
if defined? install_modules_dependencies
|
|
43
43
|
# Default React Native dependencies for 0.71 and above (new and legacy architecture)
|
|
@@ -2,7 +2,7 @@ package io.sentry.react;
|
|
|
2
2
|
|
|
3
3
|
class RNSentryVersion {
|
|
4
4
|
static final String REACT_NATIVE_SDK_PACKAGE_NAME = "npm:@sentry/react-native";
|
|
5
|
-
static final String REACT_NATIVE_SDK_PACKAGE_VERSION = "6.
|
|
5
|
+
static final String REACT_NATIVE_SDK_PACKAGE_VERSION = "6.12.0";
|
|
6
6
|
static final String NATIVE_SDK_NAME = "sentry.native.android.react-native";
|
|
7
7
|
static final String ANDROID_SDK_NAME = "sentry.java.android.react-native";
|
|
8
8
|
static final String REACT_NATIVE_SDK_NAME = "sentry.javascript.react-native";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/default.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAqC3D;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,wBAAwB,GAAG,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/default.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAqC3D;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,wBAAwB,GAAG,WAAW,EAAE,CA4GvF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { reactNativeTracingIntegration } from '../tracing';
|
|
2
|
-
import {
|
|
2
|
+
import { notWeb } from '../utils/environment';
|
|
3
3
|
import { appRegistryIntegration, appStartIntegration, breadcrumbsIntegration, browserApiErrorsIntegration, browserGlobalHandlersIntegration, browserLinkedErrorsIntegration, createNativeFramesIntegrations, createReactNativeRewriteFrames, debugSymbolicatorIntegration, dedupeIntegration, deviceContextIntegration, eventOriginIntegration, expoContextIntegration, functionToStringIntegration, hermesProfilingIntegration, httpClientIntegration, httpContextIntegration, inboundFiltersIntegration, mobileReplayIntegration, modulesLoaderIntegration, nativeLinkedErrorsIntegration, nativeReleaseIntegration, reactNativeErrorHandlersIntegration, reactNativeInfoIntegration, screenshotIntegration, sdkInfoIntegration, spotlightIntegration, stallTrackingIntegration, timeToDisplayIntegration, userInteractionIntegration, viewHierarchyIntegration, } from './exports';
|
|
4
4
|
/**
|
|
5
5
|
* Returns the default ReactNative integrations based on the current environment.
|
|
@@ -75,9 +75,7 @@ export function getDefaultIntegrations(options) {
|
|
|
75
75
|
if (options.enableCaptureFailedRequests) {
|
|
76
76
|
integrations.push(httpClientIntegration());
|
|
77
77
|
}
|
|
78
|
-
|
|
79
|
-
integrations.push(expoContextIntegration());
|
|
80
|
-
}
|
|
78
|
+
integrations.push(expoContextIntegration());
|
|
81
79
|
if (options.spotlight) {
|
|
82
80
|
const sidecarUrl = typeof options.spotlight === 'string' ? options.spotlight : undefined;
|
|
83
81
|
integrations.push(spotlightIntegration({ sidecarUrl }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default.js","sourceRoot":"","sources":["../../../src/js/integrations/default.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,6BAA6B,EAAE,MAAM,YAAY,CAAC;AAC3D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"default.js","sourceRoot":"","sources":["../../../src/js/integrations/default.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,6BAA6B,EAAE,MAAM,YAAY,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,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OAAO,CAAC,YAAY,CAAC,wBAAwB,KAAK,QAAQ,CAAC,CAAC;IAE9F,IAAI,CAAC,gBAAgB,IAAI,2BAA2B,EAAE;QACpD,wCAAwC;QACxC,OAAO,CAAC,wBAAwB,GAAG,OAAO,CAAC,YAAY,CAAC,wBAAwB,CAAC;QACjF,OAAO,CAAC,wBAAwB,GAAG,OAAO,CAAC,YAAY,CAAC,wBAAwB,CAAC;KAClF;IAED,IAAI,CAAC,gBAAgB,IAAI,2BAA2B,CAAC,IAAI,MAAM,EAAE,EAAE;QACjE,0FAA0F;QAC1F,yFAAyF;QACzF,YAAY,CAAC,IAAI,CAAC,uBAAuB,EAAE,CAAC,CAAC;KAC9C;IAED,IAAI,OAAO,IAAI,MAAM,EAAE,EAAE;QACvB,YAAY,CAAC,IAAI,CAAC,4BAA4B,EAAE,CAAC,CAAC;KACnD;IAED,OAAO,YAAY,CAAC;AACtB,CAAC","sourcesContent":["/* eslint-disable complexity */\nimport type { Integration } from '@sentry/core';\n\nimport type { ReactNativeClientOptions } from '../options';\nimport { reactNativeTracingIntegration } from '../tracing';\nimport { notWeb } from '../utils/environment';\nimport {\n appRegistryIntegration,\n appStartIntegration,\n breadcrumbsIntegration,\n browserApiErrorsIntegration,\n browserGlobalHandlersIntegration,\n browserLinkedErrorsIntegration,\n createNativeFramesIntegrations,\n createReactNativeRewriteFrames,\n debugSymbolicatorIntegration,\n dedupeIntegration,\n deviceContextIntegration,\n eventOriginIntegration,\n expoContextIntegration,\n functionToStringIntegration,\n hermesProfilingIntegration,\n httpClientIntegration,\n httpContextIntegration,\n inboundFiltersIntegration,\n mobileReplayIntegration,\n modulesLoaderIntegration,\n nativeLinkedErrorsIntegration,\n nativeReleaseIntegration,\n reactNativeErrorHandlersIntegration,\n reactNativeInfoIntegration,\n screenshotIntegration,\n sdkInfoIntegration,\n spotlightIntegration,\n stallTrackingIntegration,\n timeToDisplayIntegration,\n userInteractionIntegration,\n viewHierarchyIntegration,\n} from './exports';\n\n/**\n * Returns the default ReactNative integrations based on the current environment.\n *\n * Native integrations are only returned when native is enabled.\n *\n * Web integrations are only returned when running on web.\n */\nexport function getDefaultIntegrations(options: ReactNativeClientOptions): Integration[] {\n const integrations: Integration[] = [];\n\n if (notWeb()) {\n integrations.push(\n reactNativeErrorHandlersIntegration({\n patchGlobalPromise: options.patchGlobalPromise,\n }),\n );\n integrations.push(nativeLinkedErrorsIntegration());\n } else {\n integrations.push(browserApiErrorsIntegration());\n integrations.push(browserGlobalHandlersIntegration());\n integrations.push(browserLinkedErrorsIntegration());\n }\n\n // @sentry/react default integrations\n integrations.push(inboundFiltersIntegration());\n integrations.push(functionToStringIntegration());\n integrations.push(breadcrumbsIntegration());\n integrations.push(dedupeIntegration());\n integrations.push(httpContextIntegration());\n // end @sentry/react-native default integrations\n\n integrations.push(nativeReleaseIntegration());\n integrations.push(eventOriginIntegration());\n integrations.push(sdkInfoIntegration());\n integrations.push(reactNativeInfoIntegration());\n\n integrations.push(createReactNativeRewriteFrames());\n\n if (options.enableNative) {\n integrations.push(deviceContextIntegration());\n integrations.push(modulesLoaderIntegration());\n if (options.attachScreenshot) {\n integrations.push(screenshotIntegration());\n }\n if (options.attachViewHierarchy) {\n integrations.push(viewHierarchyIntegration());\n }\n if (typeof options.profilesSampleRate === 'number') {\n integrations.push(hermesProfilingIntegration());\n }\n }\n\n // hasTracingEnabled from `@sentry/core` only check if tracesSampler or tracesSampleRate keys are present\n // that's different from prev imp here and might lead misconfiguration\n // `tracesSampleRate: undefined` should not enable tracing\n const hasTracingEnabled =\n options.enableTracing ||\n typeof options.tracesSampleRate === 'number' ||\n typeof options.tracesSampler === 'function';\n if (hasTracingEnabled && options.enableAppStartTracking) {\n integrations.push(appStartIntegration());\n }\n const nativeFramesIntegrationInstance = createNativeFramesIntegrations(\n hasTracingEnabled && options.enableNativeFramesTracking,\n );\n if (nativeFramesIntegrationInstance) {\n integrations.push(nativeFramesIntegrationInstance);\n }\n if (hasTracingEnabled && options.enableStallTracking) {\n integrations.push(stallTrackingIntegration());\n }\n if (hasTracingEnabled && options.enableUserInteractionTracing) {\n integrations.push(userInteractionIntegration());\n }\n if (hasTracingEnabled && options.enableAutoPerformanceTracing) {\n integrations.push(appRegistryIntegration());\n integrations.push(reactNativeTracingIntegration());\n }\n if (hasTracingEnabled) {\n integrations.push(timeToDisplayIntegration());\n }\n if (options.enableCaptureFailedRequests) {\n integrations.push(httpClientIntegration());\n }\n\n integrations.push(expoContextIntegration());\n\n if (options.spotlight) {\n const sidecarUrl = typeof options.spotlight === 'string' ? options.spotlight : undefined;\n integrations.push(spotlightIntegration({ sidecarUrl }));\n }\n\n const hasReplayOptions =\n typeof options.replaysOnErrorSampleRate === 'number' || typeof options.replaysSessionSampleRate === 'number';\n const hasExperimentsReplayOptions =\n (options._experiments && typeof options._experiments.replaysOnErrorSampleRate === 'number') ||\n (options._experiments && typeof options._experiments.replaysSessionSampleRate === 'number');\n\n if (!hasReplayOptions && hasExperimentsReplayOptions) {\n // Remove in the next major version (v7)\n options.replaysOnErrorSampleRate = options._experiments.replaysOnErrorSampleRate;\n options.replaysSessionSampleRate = options._experiments.replaysSessionSampleRate;\n }\n\n if ((hasReplayOptions || hasExperimentsReplayOptions) && notWeb()) {\n // We can't create and add browserReplayIntegration as it overrides the users supplied one\n // The browser replay integration works differently than the rest of default integrations\n integrations.push(mobileReplayIntegration());\n }\n\n if (__DEV__ && notWeb()) {\n integrations.push(debugSymbolicatorIntegration());\n }\n\n return integrations;\n}\n"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Integration } from '@sentry/core';
|
|
2
|
+
export declare const OTA_UPDATES_CONTEXT_KEY = "ota_updates";
|
|
2
3
|
/** Load device context from expo modules. */
|
|
3
4
|
export declare const expoContextIntegration: () => Integration;
|
|
4
5
|
//# sourceMappingURL=expocontext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expocontext.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/expocontext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"expocontext.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/expocontext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkC,KAAK,WAAW,EAA0B,MAAM,cAAc,CAAC;AAQxG,eAAO,MAAM,uBAAuB,gBAAgB,CAAC;AAErD,6CAA6C;AAC7C,eAAO,MAAM,sBAAsB,QAAO,WAoDzC,CAAC"}
|
|
@@ -1,16 +1,92 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { logger } from '@sentry/core';
|
|
2
|
+
import { isExpo, isExpoGo } from '../utils/environment';
|
|
3
|
+
import { getExpoDevice, getExpoUpdates } from '../utils/expomodules';
|
|
4
|
+
import { NATIVE } from '../wrapper';
|
|
2
5
|
const INTEGRATION_NAME = 'ExpoContext';
|
|
6
|
+
export const OTA_UPDATES_CONTEXT_KEY = 'ota_updates';
|
|
3
7
|
/** Load device context from expo modules. */
|
|
4
8
|
export const expoContextIntegration = () => {
|
|
9
|
+
let _expoUpdatesContextCached;
|
|
10
|
+
function setup() {
|
|
11
|
+
setExpoUpdatesNativeContext();
|
|
12
|
+
}
|
|
13
|
+
function setExpoUpdatesNativeContext() {
|
|
14
|
+
if (!isExpo() || isExpoGo()) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
const expoUpdates = getExpoUpdatesContextCached();
|
|
18
|
+
try {
|
|
19
|
+
// Ensures native errors and crashes have the same context as JS errors
|
|
20
|
+
NATIVE.setContext(OTA_UPDATES_CONTEXT_KEY, expoUpdates);
|
|
21
|
+
}
|
|
22
|
+
catch (error) {
|
|
23
|
+
logger.error('Error setting Expo updates context:', error);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
function processEvent(event) {
|
|
27
|
+
if (!isExpo()) {
|
|
28
|
+
return event;
|
|
29
|
+
}
|
|
30
|
+
addExpoGoContext(event);
|
|
31
|
+
addExpoUpdatesContext(event);
|
|
32
|
+
return event;
|
|
33
|
+
}
|
|
34
|
+
function addExpoUpdatesContext(event) {
|
|
35
|
+
event.contexts = event.contexts || {};
|
|
36
|
+
event.contexts[OTA_UPDATES_CONTEXT_KEY] = Object.assign({}, getExpoUpdatesContextCached());
|
|
37
|
+
}
|
|
38
|
+
function getExpoUpdatesContextCached() {
|
|
39
|
+
if (_expoUpdatesContextCached) {
|
|
40
|
+
return _expoUpdatesContextCached;
|
|
41
|
+
}
|
|
42
|
+
return (_expoUpdatesContextCached = getExpoUpdatesContext());
|
|
43
|
+
}
|
|
5
44
|
return {
|
|
6
45
|
name: INTEGRATION_NAME,
|
|
7
|
-
|
|
8
|
-
// noop
|
|
9
|
-
},
|
|
46
|
+
setup,
|
|
10
47
|
processEvent,
|
|
11
48
|
};
|
|
12
49
|
};
|
|
13
|
-
function
|
|
50
|
+
function getExpoUpdatesContext() {
|
|
51
|
+
const expoUpdates = getExpoUpdates();
|
|
52
|
+
if (!expoUpdates) {
|
|
53
|
+
return {
|
|
54
|
+
is_enabled: false,
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
const updatesContext = {
|
|
58
|
+
is_enabled: !!expoUpdates.isEnabled,
|
|
59
|
+
is_embedded_launch: !!expoUpdates.isEmbeddedLaunch,
|
|
60
|
+
is_emergency_launch: !!expoUpdates.isEmergencyLaunch,
|
|
61
|
+
is_using_embedded_assets: !!expoUpdates.isUsingEmbeddedAssets,
|
|
62
|
+
};
|
|
63
|
+
if (typeof expoUpdates.updateId === 'string') {
|
|
64
|
+
updatesContext.update_id = expoUpdates.updateId;
|
|
65
|
+
}
|
|
66
|
+
if (typeof expoUpdates.channel === 'string') {
|
|
67
|
+
updatesContext.channel = expoUpdates.channel;
|
|
68
|
+
}
|
|
69
|
+
if (typeof expoUpdates.runtimeVersion === 'string') {
|
|
70
|
+
updatesContext.runtime_version = expoUpdates.runtimeVersion;
|
|
71
|
+
}
|
|
72
|
+
if (typeof expoUpdates.checkAutomatically === 'string') {
|
|
73
|
+
updatesContext.check_automatically = expoUpdates.checkAutomatically;
|
|
74
|
+
}
|
|
75
|
+
if (typeof expoUpdates.emergencyLaunchReason === 'string') {
|
|
76
|
+
updatesContext.emergency_launch_reason = expoUpdates.emergencyLaunchReason;
|
|
77
|
+
}
|
|
78
|
+
if (typeof expoUpdates.launchDuration === 'number') {
|
|
79
|
+
updatesContext.launch_duration = expoUpdates.launchDuration;
|
|
80
|
+
}
|
|
81
|
+
if (expoUpdates.createdAt instanceof Date) {
|
|
82
|
+
updatesContext.created_at = expoUpdates.createdAt.toISOString();
|
|
83
|
+
}
|
|
84
|
+
return updatesContext;
|
|
85
|
+
}
|
|
86
|
+
function addExpoGoContext(event) {
|
|
87
|
+
if (!isExpoGo()) {
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
14
90
|
const expoDeviceContext = getExpoDeviceContext();
|
|
15
91
|
if (expoDeviceContext) {
|
|
16
92
|
event.contexts = event.contexts || {};
|
|
@@ -21,7 +97,6 @@ function processEvent(event) {
|
|
|
21
97
|
event.contexts = event.contexts || {};
|
|
22
98
|
event.contexts.os = Object.assign(Object.assign({}, expoOsContext), event.contexts.os);
|
|
23
99
|
}
|
|
24
|
-
return event;
|
|
25
100
|
}
|
|
26
101
|
/**
|
|
27
102
|
* Returns the Expo Device context if present
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expocontext.js","sourceRoot":"","sources":["../../../src/js/integrations/expocontext.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"expocontext.js","sourceRoot":"","sources":["../../../src/js/integrations/expocontext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoE,MAAM,EAAE,MAAM,cAAc,CAAC;AAExG,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEpC,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,MAAM;KACxB,CAAC;AACJ,CAAC","sourcesContent":["import { type DeviceContext, type Event, type Integration, type OsContext, logger } from '@sentry/core';\n\nimport { isExpo, isExpoGo } from '../utils/environment';\nimport { getExpoDevice, getExpoUpdates } from '../utils/expomodules';\nimport { NATIVE } from '../wrapper';\n\nconst INTEGRATION_NAME = 'ExpoContext';\n\nexport const OTA_UPDATES_CONTEXT_KEY = 'ota_updates';\n\n/** Load device context from expo modules. */\nexport const expoContextIntegration = (): Integration => {\n let _expoUpdatesContextCached: ExpoUpdatesContext | undefined;\n\n function setup(): void {\n setExpoUpdatesNativeContext();\n }\n\n function setExpoUpdatesNativeContext(): void {\n if (!isExpo() || isExpoGo()) {\n return;\n }\n\n const expoUpdates = getExpoUpdatesContextCached();\n\n try {\n // Ensures native errors and crashes have the same context as JS errors\n NATIVE.setContext(OTA_UPDATES_CONTEXT_KEY, expoUpdates);\n } catch (error) {\n logger.error('Error setting Expo updates context:', error);\n }\n }\n\n function processEvent(event: Event): Event {\n if (!isExpo()) {\n return event;\n }\n\n addExpoGoContext(event);\n addExpoUpdatesContext(event);\n return event;\n }\n\n function addExpoUpdatesContext(event: Event): void {\n event.contexts = event.contexts || {};\n event.contexts[OTA_UPDATES_CONTEXT_KEY] = {\n ...getExpoUpdatesContextCached(),\n };\n }\n\n function getExpoUpdatesContextCached(): ExpoUpdatesContext {\n if (_expoUpdatesContextCached) {\n return _expoUpdatesContextCached;\n }\n\n return (_expoUpdatesContextCached = getExpoUpdatesContext());\n }\n\n return {\n name: INTEGRATION_NAME,\n setup,\n processEvent,\n };\n};\n\nfunction getExpoUpdatesContext(): ExpoUpdatesContext {\n const expoUpdates = getExpoUpdates();\n if (!expoUpdates) {\n return {\n is_enabled: false,\n };\n }\n\n const updatesContext: ExpoUpdatesContext = {\n is_enabled: !!expoUpdates.isEnabled,\n is_embedded_launch: !!expoUpdates.isEmbeddedLaunch,\n is_emergency_launch: !!expoUpdates.isEmergencyLaunch,\n is_using_embedded_assets: !!expoUpdates.isUsingEmbeddedAssets,\n };\n\n if (typeof expoUpdates.updateId === 'string') {\n updatesContext.update_id = expoUpdates.updateId;\n }\n if (typeof expoUpdates.channel === 'string') {\n updatesContext.channel = expoUpdates.channel;\n }\n if (typeof expoUpdates.runtimeVersion === 'string') {\n updatesContext.runtime_version = expoUpdates.runtimeVersion;\n }\n if (typeof expoUpdates.checkAutomatically === 'string') {\n updatesContext.check_automatically = expoUpdates.checkAutomatically;\n }\n if (typeof expoUpdates.emergencyLaunchReason === 'string') {\n updatesContext.emergency_launch_reason = expoUpdates.emergencyLaunchReason;\n }\n if (typeof expoUpdates.launchDuration === 'number') {\n updatesContext.launch_duration = expoUpdates.launchDuration;\n }\n if (expoUpdates.createdAt instanceof Date) {\n updatesContext.created_at = expoUpdates.createdAt.toISOString();\n }\n return updatesContext;\n}\n\nfunction addExpoGoContext(event: Event): void {\n if (!isExpoGo()) {\n return;\n }\n\n const expoDeviceContext = getExpoDeviceContext();\n if (expoDeviceContext) {\n event.contexts = event.contexts || {};\n event.contexts.device = { ...expoDeviceContext, ...event.contexts.device };\n }\n\n const expoOsContext = getExpoOsContext();\n if (expoOsContext) {\n event.contexts = event.contexts || {};\n event.contexts.os = { ...expoOsContext, ...event.contexts.os };\n }\n}\n\n/**\n * Returns the Expo Device context if present\n */\nfunction getExpoDeviceContext(): DeviceContext | undefined {\n const expoDevice = getExpoDevice();\n\n if (!expoDevice) {\n return undefined;\n }\n\n return {\n name: expoDevice.deviceName,\n simulator: !expoDevice?.isDevice,\n model: expoDevice.modelName,\n manufacturer: expoDevice.manufacturer,\n memory_size: expoDevice.totalMemory,\n };\n}\n\n/**\n * Returns the Expo OS context if present\n */\nfunction getExpoOsContext(): OsContext | undefined {\n const expoDevice = getExpoDevice();\n\n if (!expoDevice) {\n return undefined;\n }\n\n return {\n build: expoDevice.osBuildId,\n version: expoDevice.osVersion,\n name: expoDevice.osName,\n };\n}\n\ntype ExpoUpdatesContext = Partial<{\n is_enabled: boolean;\n is_embedded_launch: boolean;\n is_emergency_launch: boolean;\n is_using_embedded_assets: boolean;\n update_id: string;\n channel: string;\n runtime_version: string;\n check_automatically: string;\n emergency_launch_reason: string;\n launch_duration: number;\n created_at: string;\n}>;\n"]}
|
|
@@ -22,5 +22,5 @@ export { userInteractionIntegration } from '../tracing/integrations/userInteract
|
|
|
22
22
|
export { createReactNativeRewriteFrames } from './rewriteframes';
|
|
23
23
|
export { appRegistryIntegration } from './appRegistry';
|
|
24
24
|
export { timeToDisplayIntegration } from '../tracing/integrations/timeToDisplayIntegration';
|
|
25
|
-
export { breadcrumbsIntegration, browserApiErrorsIntegration, dedupeIntegration, functionToStringIntegration, globalHandlersIntegration as browserGlobalHandlersIntegration, httpClientIntegration, httpContextIntegration, inboundFiltersIntegration, linkedErrorsIntegration as browserLinkedErrorsIntegration, rewriteFramesIntegration, } from '@sentry/react';
|
|
25
|
+
export { breadcrumbsIntegration, browserApiErrorsIntegration, dedupeIntegration, functionToStringIntegration, globalHandlersIntegration as browserGlobalHandlersIntegration, httpClientIntegration, httpContextIntegration, inboundFiltersIntegration, linkedErrorsIntegration as browserLinkedErrorsIntegration, rewriteFramesIntegration, extraErrorDataIntegration, } from '@sentry/react';
|
|
26
26
|
//# sourceMappingURL=exports.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exports.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/exports.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,mCAAmC,EAAE,MAAM,4BAA4B,CAAC;AACjF,OAAO,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,kBAAkB,EA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MAAM,kDAAkD,CAAC;AAE5F,OAAO,EACL,sBAAsB,EACtB,2BAA2B,EAC3B,iBAAiB,EACjB,2BAA2B,EAC3B,yBAAyB,IAAI,gCAAgC,EAC7D,qBAAqB,EACrB,sBAAsB,EACtB,yBAAyB,EACzB,uBAAuB,IAAI,8BAA8B,EACzD,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,eAAe,CAAC"}
|
|
@@ -22,5 +22,5 @@ export { userInteractionIntegration } from '../tracing/integrations/userInteract
|
|
|
22
22
|
export { createReactNativeRewriteFrames } from './rewriteframes';
|
|
23
23
|
export { appRegistryIntegration } from './appRegistry';
|
|
24
24
|
export { timeToDisplayIntegration } from '../tracing/integrations/timeToDisplayIntegration';
|
|
25
|
-
export { breadcrumbsIntegration, browserApiErrorsIntegration, dedupeIntegration, functionToStringIntegration, globalHandlersIntegration as browserGlobalHandlersIntegration, httpClientIntegration, httpContextIntegration, inboundFiltersIntegration, linkedErrorsIntegration as browserLinkedErrorsIntegration, rewriteFramesIntegration, } from '@sentry/react';
|
|
25
|
+
export { breadcrumbsIntegration, browserApiErrorsIntegration, dedupeIntegration, functionToStringIntegration, globalHandlersIntegration as browserGlobalHandlersIntegration, httpClientIntegration, httpContextIntegration, inboundFiltersIntegration, linkedErrorsIntegration as browserLinkedErrorsIntegration, rewriteFramesIntegration, extraErrorDataIntegration, } from '@sentry/react';
|
|
26
26
|
//# sourceMappingURL=exports.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exports.js","sourceRoot":"","sources":["../../../src/js/integrations/exports.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,mCAAmC,EAAE,MAAM,4BAA4B,CAAC;AACjF,OAAO,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,wBAAwB,EA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iBAAiB,CAAC;AACjE,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,kDAAkD,CAAC;AAE5F,OAAO,EACL,sBAAsB,EACtB,2BAA2B,EAC3B,iBAAiB,EACjB,2BAA2B,EAC3B,yBAAyB,IAAI,gCAAgC,EAC7D,qBAAqB,EACrB,sBAAsB,EACtB,yBAAyB,EACzB,uBAAuB,IAAI,8BAA8B,EACzD,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,eAAe,CAAC","sourcesContent":["export { debugSymbolicatorIntegration } from './debugsymbolicator';\nexport { deviceContextIntegration } from './devicecontext';\nexport { reactNativeErrorHandlersIntegration } from './reactnativeerrorhandlers';\nexport { nativeLinkedErrorsIntegration } from './nativelinkederrors';\nexport { nativeReleaseIntegration } from './release';\nexport { eventOriginIntegration } from './eventorigin';\nexport { sdkInfoIntegration } from './sdkinfo';\nexport { reactNativeInfoIntegration } from './reactnativeinfo';\nexport { modulesLoaderIntegration } from './modulesloader';\nexport { hermesProfilingIntegration } from '../profiling/integration';\nexport { screenshotIntegration } from './screenshot';\nexport { viewHierarchyIntegration } from './viewhierarchy';\nexport { expoContextIntegration } from './expocontext';\nexport { spotlightIntegration } from './spotlight';\nexport { mobileReplayIntegration } from '../replay/mobilereplay';\nexport { feedbackIntegration } from '../feedback/integration';\nexport { browserReplayIntegration } from '../replay/browserReplay';\nexport { appStartIntegration } from '../tracing/integrations/appStart';\nexport { nativeFramesIntegration, createNativeFramesIntegrations } from '../tracing/integrations/nativeFrames';\nexport { stallTrackingIntegration } from '../tracing/integrations/stalltracking';\nexport { userInteractionIntegration } from '../tracing/integrations/userInteraction';\nexport { createReactNativeRewriteFrames } from './rewriteframes';\nexport { appRegistryIntegration } from './appRegistry';\nexport { timeToDisplayIntegration } from '../tracing/integrations/timeToDisplayIntegration';\n\nexport {\n breadcrumbsIntegration,\n browserApiErrorsIntegration,\n dedupeIntegration,\n functionToStringIntegration,\n globalHandlersIntegration as browserGlobalHandlersIntegration,\n httpClientIntegration,\n httpContextIntegration,\n inboundFiltersIntegration,\n linkedErrorsIntegration as browserLinkedErrorsIntegration,\n rewriteFramesIntegration,\n extraErrorDataIntegration,\n} from '@sentry/react';\n"]}
|
|
@@ -120,7 +120,7 @@ function withSentryResolver(config, includeWebReplay) {
|
|
|
120
120
|
const sentryResolverRequest = (context, moduleName, platform, oldMetroModuleName) => {
|
|
121
121
|
if ((includeWebReplay === false ||
|
|
122
122
|
(includeWebReplay === undefined && (platform === 'android' || platform === 'ios'))) &&
|
|
123
|
-
(oldMetroModuleName !== null && oldMetroModuleName !== void 0 ? oldMetroModuleName : moduleName).
|
|
123
|
+
!!(oldMetroModuleName !== null && oldMetroModuleName !== void 0 ? oldMetroModuleName : moduleName).match(/@sentry(?:-internal)?\/replay/)) {
|
|
124
124
|
return { type: 'empty' };
|
|
125
125
|
}
|
|
126
126
|
if (originalResolver) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metroconfig.js","sourceRoot":"","sources":["../../../src/js/tools/metroconfig.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uCAAsC;AAGtC,mCAAmC;AACnC,qCAA8B;AAE9B,iDAA8C;AAC9C,+EAGuC;AACvC,mEAA+G;AAE/G,0DAAwC;AACxC,uDAAyD;AAEzD,IAAA,2BAAY,GAAE,CAAC;AAgCf;;;;;GAKG;AACH,SAAgB,gBAAgB,CAC9B,MAAmB,EACnB,EACE,uBAAuB,GAAG,KAAK,EAC/B,gBAAgB,GAAG,IAAI,EACvB,gCAAgC,GAAG,IAAI,MACX,EAAE;IAEhC,8BAA8B,EAAE,CAAC;IAEjC,IAAI,SAAS,GAAG,MAAM,CAAC;IAEvB,SAAS,GAAG,iBAAiB,CAAC,SAAS,CAAC,CAAC;IACzC,SAAS,GAAG,yBAAyB,CAAC,SAAS,CAAC,CAAC;IACjD,IAAI,uBAAuB,EAAE;QAC3B,SAAS,GAAG,0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EAAW,EAAE,CAClE,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ;QAC9B,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,6CAA6C,CAAC;YACjE,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,yCAAyC,CAAC,CAAC,CAAC;IAEpE,MAAM,cAAc,GAAG,CAAC,KAAiB,EAAkC,EAAE;QAC3E,MAAM,8BAA8B,GAAG,CACrC,qBAAsD,EACjC,EAAE,CAAC,iCACrB,qBAAqB,KACxB,QAAQ,EAAE,CAAC,qBAAqB,IAAI,qBAAqB,CAAC,QAAQ,CAAC,IAAI,4BAA4B,CAAC,KAAK,CAAC,IAC1G,CAAC;QAEH,MAAM,yBAAyB,GAAG,CAAC,sBAAsB,IAAI,sBAAsB,CAAC,KAAK,CAAC,CAAC,IAAI,SAAS,CAAC;QAEzG,IAAI,yBAAyB,KAAK,SAAS,IAAI,MAAM,IAAI,yBAAyB,EAAE;YAClF,OAAO,yBAAyB,CAAC,IAAI,CAAsB,qBAAqB,CAAC,EAAE,CACjF,8BAA8B,CAAC,qBAAqB,CAAC,CACtD,CAAC;SACH;QAED,OAAO,8BAA8B,CAAC,yBAAyB,CAAC,CAAC;IACnE,CAAC,CAAC;IAEF,uCACK,MAAM,KACT,YAAY,kCACP,MAAM,CAAC,YAAY,KACtB,cAAc,OAEhB;AACJ,CAAC;AAjCD,8DAiCC;AAED;;;;GAIG;AACH,SAAS,8BAA8B;IACrC,aAAG,CAAC,6BAA6B,GAAG,MAAM,CAAC;AAC7C,CAAC","sourcesContent":["import { logger } from '@sentry/core';\nimport type { MetroConfig, MixedOutput, Module, ReadOnlyGraph } from 'metro';\nimport type { CustomResolutionContext, CustomResolver, Resolution } from 'metro-resolver';\nimport * as process from 'process';\nimport { env } from 'process';\n\nimport { enableLogger } from './enableLogger';\nimport {\n setSentryBabelTransformerOptions,\n setSentryDefaultBabelTransformerPathEnv,\n} from './sentryBabelTransformerUtils';\nimport { createSentryMetroSerializer, unstable_beforeAssetSerializationPlugin } from './sentryMetroSerializer';\nimport type { DefaultConfigOptions } from './vendor/expo/expoconfig';\nexport * from './sentryMetroSerializer';\nimport { withSentryMiddleware } from './metroMiddleware';\n\nenableLogger();\n\nexport interface SentryMetroConfigOptions {\n /**\n * Annotates React components with Sentry data.\n * @default false\n */\n annotateReactComponents?:\n | boolean\n | {\n ignoredComponents?: string[];\n };\n /**\n * Adds the Sentry replay package for web.\n * @default true\n */\n includeWebReplay?: boolean;\n /**\n * Add Sentry Metro Server Middleware which\n * enables the app to fetch stack frames source context.\n * @default true\n */\n enableSourceContextInDevelopment?: boolean;\n}\n\nexport interface SentryExpoConfigOptions {\n /**\n * Pass a custom `getDefaultConfig` function to override the default Expo configuration getter.\n */\n getDefaultConfig?: typeof getSentryExpoConfig;\n}\n\n/**\n * Adds Sentry to the Metro config.\n *\n * Adds Debug ID to the output bundle and source maps.\n * Collapses Sentry frames from the stack trace view in LogBox.\n */\nexport function withSentryConfig(\n config: MetroConfig,\n {\n annotateReactComponents = false,\n includeWebReplay = true,\n enableSourceContextInDevelopment = true,\n }: SentryMetroConfigOptions = {},\n): MetroConfig {\n setSentryMetroDevServerEnvFlag();\n\n let newConfig = config;\n\n newConfig = withSentryDebugId(newConfig);\n newConfig = withSentryFramesCollapsed(newConfig);\n if (annotateReactComponents) {\n newConfig = withSentryBabelTransformer(newConfig, annotateReactComponents);\n }\n if (includeWebReplay === false) {\n newConfig = withSentryResolver(newConfig, includeWebReplay);\n }\n if (enableSourceContextInDevelopment) {\n newConfig = withSentryMiddleware(newConfig);\n }\n\n return newConfig;\n}\n\n/**\n * This function returns Default Expo configuration with Sentry plugins.\n */\nexport function getSentryExpoConfig(\n projectRoot: string,\n options: DefaultConfigOptions & SentryExpoConfigOptions & SentryMetroConfigOptions = {},\n): MetroConfig {\n setSentryMetroDevServerEnvFlag();\n\n const getDefaultConfig = options.getDefaultConfig || loadExpoMetroConfigModule().getDefaultConfig;\n const config = getDefaultConfig(projectRoot, {\n ...options,\n unstable_beforeAssetSerializationPlugins: [\n ...(options.unstable_beforeAssetSerializationPlugins || []),\n unstable_beforeAssetSerializationPlugin,\n ],\n });\n\n let newConfig = withSentryFramesCollapsed(config);\n if (options.annotateReactComponents) {\n newConfig = withSentryBabelTransformer(newConfig, options.annotateReactComponents);\n }\n\n if (options.includeWebReplay === false) {\n newConfig = withSentryResolver(newConfig, options.includeWebReplay);\n }\n\n if (options.enableSourceContextInDevelopment ?? true) {\n newConfig = withSentryMiddleware(newConfig);\n }\n\n return newConfig;\n}\n\nfunction loadExpoMetroConfigModule(): {\n getDefaultConfig: (\n projectRoot: string,\n options: {\n unstable_beforeAssetSerializationPlugins?: ((serializationInput: {\n graph: ReadOnlyGraph<MixedOutput>;\n premodules: Module[];\n debugId?: string;\n }) => Module[])[];\n },\n ) => MetroConfig;\n} {\n try {\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n return require('expo/metro-config');\n } catch (e) {\n throw new Error('Unable to load `expo/metro-config`. Make sure you have Expo installed.');\n }\n}\n\n/**\n * Adds Sentry Babel transformer to the Metro config.\n */\nexport function withSentryBabelTransformer(\n config: MetroConfig,\n annotateReactComponents: true | { ignoredComponents?: string[] },\n): MetroConfig {\n const defaultBabelTransformerPath = config.transformer && config.transformer.babelTransformerPath;\n logger.debug('Default Babel transformer path from `config.transformer`:', defaultBabelTransformerPath);\n\n if (!defaultBabelTransformerPath) {\n // This has to be console.warn because the options is enabled but won't be used\n // eslint-disable-next-line no-console\n console.warn('`transformer.babelTransformerPath` is undefined.');\n // eslint-disable-next-line no-console\n console.warn('Sentry Babel transformer cannot be used. Not adding it...');\n return config;\n }\n\n if (defaultBabelTransformerPath) {\n setSentryDefaultBabelTransformerPathEnv(defaultBabelTransformerPath);\n }\n\n if (typeof annotateReactComponents === 'object') {\n setSentryBabelTransformerOptions({\n annotateReactComponents,\n });\n }\n\n return {\n ...config,\n transformer: {\n ...config.transformer,\n babelTransformerPath: require.resolve('./sentryBabelTransformer'),\n },\n };\n}\n\ntype MetroCustomSerializer = Required<Required<MetroConfig>['serializer']>['customSerializer'] | undefined;\n\nfunction withSentryDebugId(config: MetroConfig): MetroConfig {\n const customSerializer = createSentryMetroSerializer(\n config.serializer?.customSerializer || undefined,\n ) as MetroCustomSerializer;\n // MetroConfig types customSerializers as async only, but sync returns are also supported\n // The default serializer is sync\n\n return {\n ...config,\n serializer: {\n ...config.serializer,\n customSerializer,\n },\n };\n}\n\n// Based on: https://github.com/facebook/metro/blob/c21daba415ea26511e157f794689caab9abe8236/packages/metro-resolver/src/resolve.js#L86-L91\ntype CustomResolverBeforeMetro068 = (\n context: CustomResolutionContext,\n realModuleName: string,\n platform: string | null,\n moduleName?: string,\n) => Resolution;\n\n/**\n * Includes `@sentry/replay` packages based on the `includeWebReplay` flag and current bundle `platform`.\n */\nexport function withSentryResolver(config: MetroConfig, includeWebReplay: boolean | undefined): MetroConfig {\n const originalResolver = config.resolver?.resolveRequest as CustomResolver | CustomResolverBeforeMetro068 | undefined;\n\n const sentryResolverRequest: CustomResolver = (\n context: CustomResolutionContext,\n moduleName: string,\n platform: string | null,\n oldMetroModuleName?: string,\n ) => {\n if (\n (includeWebReplay === false ||\n (includeWebReplay === undefined && (platform === 'android' || platform === 'ios'))) &&\n (oldMetroModuleName ?? moduleName).includes('@sentry/replay')\n ) {\n return { type: 'empty' } as Resolution;\n }\n if (originalResolver) {\n return oldMetroModuleName\n ? originalResolver(context, moduleName, platform, oldMetroModuleName)\n : originalResolver(context, moduleName, platform);\n }\n\n // Prior 0.68, resolve context.resolveRequest is sentryResolver itself, where on later version it is the default resolver.\n if (context.resolveRequest === sentryResolverRequest) {\n // eslint-disable-next-line no-console\n console.error(\n `Error: [@sentry/react-native/metro] Can not resolve the defaultResolver on Metro older than 0.68.\nPlease follow one of the following options:\n- Include your resolverRequest on your metroconfig.\n- Update your Metro version to 0.68 or higher.\n- Set includeWebReplay as true on your metro config.\n- If you are still facing issues, report the issue at http://www.github.com/getsentry/sentry-react-native/issues`,\n );\n // Return required for test.\n return process.exit(-1);\n }\n\n return context.resolveRequest(context, moduleName, platform);\n };\n\n return {\n ...config,\n resolver: {\n ...config.resolver,\n resolveRequest: sentryResolverRequest,\n },\n };\n}\n\ntype MetroFrame = Parameters<Required<Required<MetroConfig>['symbolicator']>['customizeFrame']>[0];\ntype MetroCustomizeFrame = { readonly collapse?: boolean };\ntype MetroCustomizeFrameReturnValue =\n | ReturnType<Required<Required<MetroConfig>['symbolicator']>['customizeFrame']>\n | undefined;\n\n/**\n * Collapses Sentry internal frames from the stack trace view in LogBox.\n */\nexport function withSentryFramesCollapsed(config: MetroConfig): MetroConfig {\n const originalCustomizeFrame = config.symbolicator?.customizeFrame;\n const collapseSentryInternalFrames = (frame: MetroFrame): boolean =>\n typeof frame.file === 'string' &&\n (frame.file.includes('node_modules/@sentry/core/cjs/instrument.js') ||\n frame.file.includes('node_modules/@sentry/core/cjs/logger.js'));\n\n const customizeFrame = (frame: MetroFrame): MetroCustomizeFrameReturnValue => {\n const originalOrSentryCustomizeFrame = (\n originalCustomization: MetroCustomizeFrame | undefined,\n ): MetroCustomizeFrame => ({\n ...originalCustomization,\n collapse: (originalCustomization && originalCustomization.collapse) || collapseSentryInternalFrames(frame),\n });\n\n const maybePromiseCustomization = (originalCustomizeFrame && originalCustomizeFrame(frame)) || undefined;\n\n if (maybePromiseCustomization !== undefined && 'then' in maybePromiseCustomization) {\n return maybePromiseCustomization.then<MetroCustomizeFrame>(originalCustomization =>\n originalOrSentryCustomizeFrame(originalCustomization),\n );\n }\n\n return originalOrSentryCustomizeFrame(maybePromiseCustomization);\n };\n\n return {\n ...config,\n symbolicator: {\n ...config.symbolicator,\n customizeFrame,\n },\n };\n}\n\n/**\n * Sets the `___SENTRY_METRO_DEV_SERVER___` environment flag.\n * This is used to determine if the SDK is running in Node in Metro Dev Server.\n * For example during static routes generation in `expo-router`.\n */\nfunction setSentryMetroDevServerEnvFlag(): void {\n env.___SENTRY_METRO_DEV_SERVER___ = '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,EAAE;YAClF,OAAO,yBAAyB,CAAC,IAAI,CAAsB,qBAAqB,CAAC,EAAE,CACjF,8BAA8B,CAAC,qBAAqB,CAAC,CACtD,CAAC;SACH;QAED,OAAO,8BAA8B,CAAC,yBAAyB,CAAC,CAAC;IACnE,CAAC,CAAC;IAEF,uCACK,MAAM,KACT,YAAY,kCACP,MAAM,CAAC,YAAY,KACtB,cAAc,OAEhB;AACJ,CAAC;AAjCD,8DAiCC;AAED;;;;GAIG;AACH,SAAS,8BAA8B;IACrC,aAAG,CAAC,6BAA6B,GAAG,MAAM,CAAC;AAC7C,CAAC","sourcesContent":["import { logger } from '@sentry/core';\nimport type { MetroConfig, MixedOutput, Module, ReadOnlyGraph } from 'metro';\nimport type { CustomResolutionContext, CustomResolver, Resolution } from 'metro-resolver';\nimport * as process from 'process';\nimport { env } from 'process';\n\nimport { enableLogger } from './enableLogger';\nimport {\n setSentryBabelTransformerOptions,\n setSentryDefaultBabelTransformerPathEnv,\n} from './sentryBabelTransformerUtils';\nimport { createSentryMetroSerializer, unstable_beforeAssetSerializationPlugin } from './sentryMetroSerializer';\nimport type { DefaultConfigOptions } from './vendor/expo/expoconfig';\nexport * from './sentryMetroSerializer';\nimport { withSentryMiddleware } from './metroMiddleware';\n\nenableLogger();\n\nexport interface SentryMetroConfigOptions {\n /**\n * Annotates React components with Sentry data.\n * @default false\n */\n annotateReactComponents?:\n | boolean\n | {\n ignoredComponents?: string[];\n };\n /**\n * Adds the Sentry replay package for web.\n * @default true\n */\n includeWebReplay?: boolean;\n /**\n * Add Sentry Metro Server Middleware which\n * enables the app to fetch stack frames source context.\n * @default true\n */\n enableSourceContextInDevelopment?: boolean;\n}\n\nexport interface SentryExpoConfigOptions {\n /**\n * Pass a custom `getDefaultConfig` function to override the default Expo configuration getter.\n */\n getDefaultConfig?: typeof getSentryExpoConfig;\n}\n\n/**\n * Adds Sentry to the Metro config.\n *\n * Adds Debug ID to the output bundle and source maps.\n * Collapses Sentry frames from the stack trace view in LogBox.\n */\nexport function withSentryConfig(\n config: MetroConfig,\n {\n annotateReactComponents = false,\n includeWebReplay = true,\n enableSourceContextInDevelopment = true,\n }: SentryMetroConfigOptions = {},\n): MetroConfig {\n setSentryMetroDevServerEnvFlag();\n\n let newConfig = config;\n\n newConfig = withSentryDebugId(newConfig);\n newConfig = withSentryFramesCollapsed(newConfig);\n if (annotateReactComponents) {\n newConfig = withSentryBabelTransformer(newConfig, annotateReactComponents);\n }\n if (includeWebReplay === false) {\n newConfig = withSentryResolver(newConfig, includeWebReplay);\n }\n if (enableSourceContextInDevelopment) {\n newConfig = withSentryMiddleware(newConfig);\n }\n\n return newConfig;\n}\n\n/**\n * This function returns Default Expo configuration with Sentry plugins.\n */\nexport function getSentryExpoConfig(\n projectRoot: string,\n options: DefaultConfigOptions & SentryExpoConfigOptions & SentryMetroConfigOptions = {},\n): MetroConfig {\n setSentryMetroDevServerEnvFlag();\n\n const getDefaultConfig = options.getDefaultConfig || loadExpoMetroConfigModule().getDefaultConfig;\n const config = getDefaultConfig(projectRoot, {\n ...options,\n unstable_beforeAssetSerializationPlugins: [\n ...(options.unstable_beforeAssetSerializationPlugins || []),\n unstable_beforeAssetSerializationPlugin,\n ],\n });\n\n let newConfig = withSentryFramesCollapsed(config);\n if (options.annotateReactComponents) {\n newConfig = withSentryBabelTransformer(newConfig, options.annotateReactComponents);\n }\n\n if (options.includeWebReplay === false) {\n newConfig = withSentryResolver(newConfig, options.includeWebReplay);\n }\n\n if (options.enableSourceContextInDevelopment ?? true) {\n newConfig = withSentryMiddleware(newConfig);\n }\n\n return newConfig;\n}\n\nfunction loadExpoMetroConfigModule(): {\n getDefaultConfig: (\n projectRoot: string,\n options: {\n unstable_beforeAssetSerializationPlugins?: ((serializationInput: {\n graph: ReadOnlyGraph<MixedOutput>;\n premodules: Module[];\n debugId?: string;\n }) => Module[])[];\n },\n ) => MetroConfig;\n} {\n try {\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n return require('expo/metro-config');\n } catch (e) {\n throw new Error('Unable to load `expo/metro-config`. Make sure you have Expo installed.');\n }\n}\n\n/**\n * Adds Sentry Babel transformer to the Metro config.\n */\nexport function withSentryBabelTransformer(\n config: MetroConfig,\n annotateReactComponents: true | { ignoredComponents?: string[] },\n): MetroConfig {\n const defaultBabelTransformerPath = config.transformer && config.transformer.babelTransformerPath;\n logger.debug('Default Babel transformer path from `config.transformer`:', defaultBabelTransformerPath);\n\n if (!defaultBabelTransformerPath) {\n // This has to be console.warn because the options is enabled but won't be used\n // eslint-disable-next-line no-console\n console.warn('`transformer.babelTransformerPath` is undefined.');\n // eslint-disable-next-line no-console\n console.warn('Sentry Babel transformer cannot be used. Not adding it...');\n return config;\n }\n\n if (defaultBabelTransformerPath) {\n setSentryDefaultBabelTransformerPathEnv(defaultBabelTransformerPath);\n }\n\n if (typeof annotateReactComponents === 'object') {\n setSentryBabelTransformerOptions({\n annotateReactComponents,\n });\n }\n\n return {\n ...config,\n transformer: {\n ...config.transformer,\n babelTransformerPath: require.resolve('./sentryBabelTransformer'),\n },\n };\n}\n\ntype MetroCustomSerializer = Required<Required<MetroConfig>['serializer']>['customSerializer'] | undefined;\n\nfunction withSentryDebugId(config: MetroConfig): MetroConfig {\n const customSerializer = createSentryMetroSerializer(\n config.serializer?.customSerializer || undefined,\n ) as MetroCustomSerializer;\n // MetroConfig types customSerializers as async only, but sync returns are also supported\n // The default serializer is sync\n\n return {\n ...config,\n serializer: {\n ...config.serializer,\n customSerializer,\n },\n };\n}\n\n// Based on: https://github.com/facebook/metro/blob/c21daba415ea26511e157f794689caab9abe8236/packages/metro-resolver/src/resolve.js#L86-L91\ntype CustomResolverBeforeMetro068 = (\n context: CustomResolutionContext,\n realModuleName: string,\n platform: string | null,\n moduleName?: string,\n) => Resolution;\n\n/**\n * Includes `@sentry/replay` packages based on the `includeWebReplay` flag and current bundle `platform`.\n */\nexport function withSentryResolver(config: MetroConfig, includeWebReplay: boolean | undefined): MetroConfig {\n const originalResolver = config.resolver?.resolveRequest as CustomResolver | CustomResolverBeforeMetro068 | undefined;\n\n const sentryResolverRequest: CustomResolver = (\n context: CustomResolutionContext,\n moduleName: string,\n platform: string | null,\n oldMetroModuleName?: string,\n ) => {\n if (\n (includeWebReplay === false ||\n (includeWebReplay === undefined && (platform === 'android' || platform === 'ios'))) &&\n !!(oldMetroModuleName ?? moduleName).match(/@sentry(?:-internal)?\\/replay/)\n ) {\n return { type: 'empty' } as Resolution;\n }\n if (originalResolver) {\n return oldMetroModuleName\n ? originalResolver(context, moduleName, platform, oldMetroModuleName)\n : originalResolver(context, moduleName, platform);\n }\n\n // Prior 0.68, resolve context.resolveRequest is sentryResolver itself, where on later version it is the default resolver.\n if (context.resolveRequest === sentryResolverRequest) {\n // eslint-disable-next-line no-console\n console.error(\n `Error: [@sentry/react-native/metro] Can not resolve the defaultResolver on Metro older than 0.68.\nPlease follow one of the following options:\n- Include your resolverRequest on your metroconfig.\n- Update your Metro version to 0.68 or higher.\n- Set includeWebReplay as true on your metro config.\n- If you are still facing issues, report the issue at http://www.github.com/getsentry/sentry-react-native/issues`,\n );\n // Return required for test.\n return process.exit(-1);\n }\n\n return context.resolveRequest(context, moduleName, platform);\n };\n\n return {\n ...config,\n resolver: {\n ...config.resolver,\n resolveRequest: sentryResolverRequest,\n },\n };\n}\n\ntype MetroFrame = Parameters<Required<Required<MetroConfig>['symbolicator']>['customizeFrame']>[0];\ntype MetroCustomizeFrame = { readonly collapse?: boolean };\ntype MetroCustomizeFrameReturnValue =\n | ReturnType<Required<Required<MetroConfig>['symbolicator']>['customizeFrame']>\n | undefined;\n\n/**\n * Collapses Sentry internal frames from the stack trace view in LogBox.\n */\nexport function withSentryFramesCollapsed(config: MetroConfig): MetroConfig {\n const originalCustomizeFrame = config.symbolicator?.customizeFrame;\n const collapseSentryInternalFrames = (frame: MetroFrame): boolean =>\n typeof frame.file === 'string' &&\n (frame.file.includes('node_modules/@sentry/core/cjs/instrument.js') ||\n frame.file.includes('node_modules/@sentry/core/cjs/logger.js'));\n\n const customizeFrame = (frame: MetroFrame): MetroCustomizeFrameReturnValue => {\n const originalOrSentryCustomizeFrame = (\n originalCustomization: MetroCustomizeFrame | undefined,\n ): MetroCustomizeFrame => ({\n ...originalCustomization,\n collapse: (originalCustomization && originalCustomization.collapse) || collapseSentryInternalFrames(frame),\n });\n\n const maybePromiseCustomization = (originalCustomizeFrame && originalCustomizeFrame(frame)) || undefined;\n\n if (maybePromiseCustomization !== undefined && 'then' in maybePromiseCustomization) {\n return maybePromiseCustomization.then<MetroCustomizeFrame>(originalCustomization =>\n originalOrSentryCustomizeFrame(originalCustomization),\n );\n }\n\n return originalOrSentryCustomizeFrame(maybePromiseCustomization);\n };\n\n return {\n ...config,\n symbolicator: {\n ...config.symbolicator,\n customizeFrame,\n },\n };\n}\n\n/**\n * Sets the `___SENTRY_METRO_DEV_SERVER___` environment flag.\n * This is used to determine if the SDK is running in Node in Metro Dev Server.\n * For example during static routes generation in `expo-router`.\n */\nfunction setSentryMetroDevServerEnvFlag(): void {\n env.___SENTRY_METRO_DEV_SERVER___ = 'true';\n}\n"]}
|
|
@@ -42,10 +42,31 @@ export interface ExpoDevice {
|
|
|
42
42
|
osVersion?: string;
|
|
43
43
|
totalMemory?: number;
|
|
44
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* Interface from the Expo SDK defined here
|
|
47
|
+
* (we are describing the native module
|
|
48
|
+
* the TS typing is only guideline)
|
|
49
|
+
*
|
|
50
|
+
* https://github.com/expo/expo/blob/8b7165ad2c6751c741f588c72dac50fb3a814dcc/packages/expo-updates/src/Updates.ts
|
|
51
|
+
*/
|
|
52
|
+
export interface ExpoUpdates {
|
|
53
|
+
isEnabled?: boolean;
|
|
54
|
+
updateId?: string | null;
|
|
55
|
+
channel?: string | null;
|
|
56
|
+
runtimeVersion?: string | null;
|
|
57
|
+
checkAutomatically?: string | null;
|
|
58
|
+
isEmergencyLaunch?: boolean;
|
|
59
|
+
emergencyLaunchReason?: string | null;
|
|
60
|
+
launchDuration?: number | null;
|
|
61
|
+
isEmbeddedLaunch?: boolean;
|
|
62
|
+
isUsingEmbeddedAssets?: boolean;
|
|
63
|
+
createdAt?: Date | null;
|
|
64
|
+
}
|
|
45
65
|
export interface ExpoGlobalObject {
|
|
46
66
|
modules?: {
|
|
47
67
|
ExponentConstants?: ExpoConstants;
|
|
48
68
|
ExpoDevice?: ExpoDevice;
|
|
69
|
+
ExpoUpdates?: ExpoUpdates;
|
|
49
70
|
};
|
|
50
71
|
}
|
|
51
72
|
//# sourceMappingURL=expoglobalobject.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expoglobalobject.d.ts","sourceRoot":"","sources":["../../../src/js/utils/expoglobalobject.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,WAAW,aAAa;IAC5B,YAAY,CAAC,EAAE,YAAY,GAAG,MAAM,GAAG,OAAO,CAAC;IAC/C;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,QAAQ,CAAC,EAAE,IAAI,GAAG;QAChB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;QACvB;;;WAGG;QACH,cAAc,CAAC,EAAE,MAAM,CAAC;KACzB,CAAC;CACH;AAED;;;;;;GAMG;AACH,MAAM,WAAW,UAAU;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,EAAE;QACR,iBAAiB,CAAC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AC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;CACzB;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,EAAE;QACR,iBAAiB,CAAC,EAAE,aAAa,CAAC;QAClC,UAAU,CAAC,EAAE,UAAU,CAAC;QACxB,WAAW,CAAC,EAAE,WAAW,CAAC;KAC3B,CAAC;CACH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expoglobalobject.js","sourceRoot":"","sources":["../../../src/js/utils/expoglobalobject.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Interface from the Expo SDK defined here\n * (we are describing the native Module\n * the TS typing is only guideline):\n *\n * https://github.com/expo/expo/blob/b51b5139f2caa2a9495e4132437d7ca612276158/packages/expo-constants/src/Constants.ts\n * https://github.com/expo/expo/blob/b51b5139f2caa2a9495e4132437d7ca612276158/packages/expo-manifests/src/Manifests.ts\n */\nexport interface ExpoConstants {\n appOwnership?: 'standalone' | 'expo' | 'guest';\n /**\n * Deprecated. But until removed we can use it as user ID to match the native SDKs.\n */\n installationId?: string;\n /**\n * Version of the Expo Go app\n */\n expoVersion?: string | null;\n manifest?: null | {\n [key: string]: unknown;\n /**\n * Expo SDK version should match `expo` version from the app `package.json`.\n * Example \"exposdk:50.0.0\"\n */\n runtimeVersion?: string;\n };\n}\n\n/**\n * Interface from the Expo SDK defined here\n * (we are describing the native module\n * the TS typing is only guideline)\n *\n * https://github.com/expo/expo/blob/5d1153e6ae7c497fa1281ffee85fabe90d2321c2/packages/expo-device/src/Device.ts\n */\nexport interface ExpoDevice {\n deviceName?: string;\n isDevice?: boolean;\n manufacturer?: string;\n modelName?: string;\n osName?: string;\n osBuildId?: string;\n osVersion?: string;\n totalMemory?: number;\n}\n\nexport interface ExpoGlobalObject {\n modules?: {\n ExponentConstants?: ExpoConstants;\n ExpoDevice?: ExpoDevice;\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"expoglobalobject.js","sourceRoot":"","sources":["../../../src/js/utils/expoglobalobject.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Interface from the Expo SDK defined here\n * (we are describing the native Module\n * the TS typing is only guideline):\n *\n * https://github.com/expo/expo/blob/b51b5139f2caa2a9495e4132437d7ca612276158/packages/expo-constants/src/Constants.ts\n * https://github.com/expo/expo/blob/b51b5139f2caa2a9495e4132437d7ca612276158/packages/expo-manifests/src/Manifests.ts\n */\nexport interface ExpoConstants {\n appOwnership?: 'standalone' | 'expo' | 'guest';\n /**\n * Deprecated. But until removed we can use it as user ID to match the native SDKs.\n */\n installationId?: string;\n /**\n * Version of the Expo Go app\n */\n expoVersion?: string | null;\n manifest?: null | {\n [key: string]: unknown;\n /**\n * Expo SDK version should match `expo` version from the app `package.json`.\n * Example \"exposdk:50.0.0\"\n */\n runtimeVersion?: string;\n };\n}\n\n/**\n * Interface from the Expo SDK defined here\n * (we are describing the native module\n * the TS typing is only guideline)\n *\n * https://github.com/expo/expo/blob/5d1153e6ae7c497fa1281ffee85fabe90d2321c2/packages/expo-device/src/Device.ts\n */\nexport interface ExpoDevice {\n deviceName?: string;\n isDevice?: boolean;\n manufacturer?: string;\n modelName?: string;\n osName?: string;\n osBuildId?: string;\n osVersion?: string;\n totalMemory?: number;\n}\n\n/**\n * Interface from the Expo SDK defined here\n * (we are describing the native module\n * the TS typing is only guideline)\n *\n * https://github.com/expo/expo/blob/8b7165ad2c6751c741f588c72dac50fb3a814dcc/packages/expo-updates/src/Updates.ts\n */\nexport interface ExpoUpdates {\n isEnabled?: boolean;\n updateId?: string | null;\n channel?: string | null;\n runtimeVersion?: string | null;\n checkAutomatically?: string | null;\n isEmergencyLaunch?: boolean;\n emergencyLaunchReason?: string | null;\n launchDuration?: number | null;\n isEmbeddedLaunch?: boolean;\n isUsingEmbeddedAssets?: boolean;\n createdAt?: Date | null;\n}\n\nexport interface ExpoGlobalObject {\n modules?: {\n ExponentConstants?: ExpoConstants;\n ExpoDevice?: ExpoDevice;\n ExpoUpdates?: ExpoUpdates;\n };\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ExpoConstants, ExpoDevice } from './expoglobalobject';
|
|
1
|
+
import type { ExpoConstants, ExpoDevice, ExpoUpdates } from './expoglobalobject';
|
|
2
2
|
/**
|
|
3
3
|
* Returns the Expo Constants module if present
|
|
4
4
|
*/
|
|
@@ -7,4 +7,8 @@ export declare function getExpoConstants(): ExpoConstants | undefined;
|
|
|
7
7
|
* Returns the Expo Device module if present
|
|
8
8
|
*/
|
|
9
9
|
export declare function getExpoDevice(): ExpoDevice | undefined;
|
|
10
|
+
/**
|
|
11
|
+
* Returns the Expo Updates module if present
|
|
12
|
+
*/
|
|
13
|
+
export declare function getExpoUpdates(): ExpoUpdates | undefined;
|
|
10
14
|
//# sourceMappingURL=expomodules.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expomodules.d.ts","sourceRoot":"","sources":["../../../src/js/utils/expomodules.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"expomodules.d.ts","sourceRoot":"","sources":["../../../src/js/utils/expomodules.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGjF;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,aAAa,GAAG,SAAS,CAE5D;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,UAAU,GAAG,SAAS,CAEtD;AAED;;GAEG;AACH,wBAAgB,cAAc,IAAI,WAAW,GAAG,SAAS,CAExD"}
|
|
@@ -3,12 +3,21 @@ import { RN_GLOBAL_OBJ } from './worldwide';
|
|
|
3
3
|
* Returns the Expo Constants module if present
|
|
4
4
|
*/
|
|
5
5
|
export function getExpoConstants() {
|
|
6
|
-
|
|
6
|
+
var _a, _b, _c;
|
|
7
|
+
return (_c = (_b = (_a = RN_GLOBAL_OBJ.expo) === null || _a === void 0 ? void 0 : _a.modules) === null || _b === void 0 ? void 0 : _b.ExponentConstants) !== null && _c !== void 0 ? _c : undefined;
|
|
7
8
|
}
|
|
8
9
|
/**
|
|
9
10
|
* Returns the Expo Device module if present
|
|
10
11
|
*/
|
|
11
12
|
export function getExpoDevice() {
|
|
12
|
-
|
|
13
|
+
var _a, _b, _c;
|
|
14
|
+
return (_c = (_b = (_a = RN_GLOBAL_OBJ.expo) === null || _a === void 0 ? void 0 : _a.modules) === null || _b === void 0 ? void 0 : _b.ExpoDevice) !== null && _c !== void 0 ? _c : undefined;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Returns the Expo Updates module if present
|
|
18
|
+
*/
|
|
19
|
+
export function getExpoUpdates() {
|
|
20
|
+
var _a, _b, _c;
|
|
21
|
+
return (_c = (_b = (_a = RN_GLOBAL_OBJ.expo) === null || _a === void 0 ? void 0 : _a.modules) === null || _b === void 0 ? void 0 : _b.ExpoUpdates) !== null && _c !== void 0 ? _c : undefined;
|
|
13
22
|
}
|
|
14
23
|
//# sourceMappingURL=expomodules.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expomodules.js","sourceRoot":"","sources":["../../../src/js/utils/expomodules.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C;;GAEG;AACH,MAAM,UAAU,gBAAgB
|
|
1
|
+
{"version":3,"file":"expomodules.js","sourceRoot":"","sources":["../../../src/js/utils/expomodules.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C;;GAEG;AACH,MAAM,UAAU,gBAAgB;;IAC9B,OAAO,MAAA,MAAA,MAAA,aAAa,CAAC,IAAI,0CAAE,OAAO,0CAAE,iBAAiB,mCAAI,SAAS,CAAC;AACrE,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,aAAa;;IAC3B,OAAO,MAAA,MAAA,MAAA,aAAa,CAAC,IAAI,0CAAE,OAAO,0CAAE,UAAU,mCAAI,SAAS,CAAC;AAC9D,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,cAAc;;IAC5B,OAAO,MAAA,MAAA,MAAA,aAAa,CAAC,IAAI,0CAAE,OAAO,0CAAE,WAAW,mCAAI,SAAS,CAAC;AAC/D,CAAC","sourcesContent":["import type { ExpoConstants, ExpoDevice, ExpoUpdates } from './expoglobalobject';\nimport { RN_GLOBAL_OBJ } from './worldwide';\n\n/**\n * Returns the Expo Constants module if present\n */\nexport function getExpoConstants(): ExpoConstants | undefined {\n return RN_GLOBAL_OBJ.expo?.modules?.ExponentConstants ?? undefined;\n}\n\n/**\n * Returns the Expo Device module if present\n */\nexport function getExpoDevice(): ExpoDevice | undefined {\n return RN_GLOBAL_OBJ.expo?.modules?.ExpoDevice ?? undefined;\n}\n\n/**\n * Returns the Expo Updates module if present\n */\nexport function getExpoUpdates(): ExpoUpdates | undefined {\n return RN_GLOBAL_OBJ.expo?.modules?.ExpoUpdates ?? undefined;\n}\n"]}
|
package/dist/js/version.d.ts
CHANGED
package/dist/js/version.js
CHANGED
package/dist/js/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/js/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG,0BAA0B,CAAC;AAC3D,MAAM,CAAC,MAAM,QAAQ,GAAG,gCAAgC,CAAC;AACzD,MAAM,CAAC,MAAM,WAAW,GAAG,QAAQ,CAAC","sourcesContent":["export const SDK_PACKAGE_NAME = 'npm:@sentry/react-native';\nexport const SDK_NAME = 'sentry.javascript.react-native';\nexport const SDK_VERSION = '6.
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/js/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG,0BAA0B,CAAC;AAC3D,MAAM,CAAC,MAAM,QAAQ,GAAG,gCAAgC,CAAC;AACzD,MAAM,CAAC,MAAM,WAAW,GAAG,QAAQ,CAAC","sourcesContent":["export const SDK_PACKAGE_NAME = 'npm:@sentry/react-native';\nexport const SDK_NAME = 'sentry.javascript.react-native';\nexport const SDK_VERSION = '6.12.0';\n"]}
|
package/ios/RNSentryVersion.m
CHANGED
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
NSString *const NATIVE_SDK_NAME = @"sentry.cocoa.react-native";
|
|
4
4
|
NSString *const REACT_NATIVE_SDK_NAME = @"sentry.javascript.react-native";
|
|
5
5
|
NSString *const REACT_NATIVE_SDK_PACKAGE_NAME = @"npm:@sentry/react-native";
|
|
6
|
-
NSString *const REACT_NATIVE_SDK_PACKAGE_VERSION = @"6.
|
|
6
|
+
NSString *const REACT_NATIVE_SDK_PACKAGE_VERSION = @"6.12.0";
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@sentry/react-native",
|
|
3
3
|
"homepage": "https://github.com/getsentry/sentry-react-native",
|
|
4
4
|
"repository": "https://github.com/getsentry/sentry-react-native",
|
|
5
|
-
"version": "6.
|
|
5
|
+
"version": "6.12.0",
|
|
6
6
|
"description": "Official Sentry SDK for react-native",
|
|
7
7
|
"typings": "dist/js/index.d.ts",
|
|
8
8
|
"types": "dist/js/index.d.ts",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"dependencies": {
|
|
68
68
|
"@sentry/babel-plugin-component-annotate": "3.3.1",
|
|
69
69
|
"@sentry/browser": "8.54.0",
|
|
70
|
-
"@sentry/cli": "2.43.
|
|
70
|
+
"@sentry/cli": "2.43.1",
|
|
71
71
|
"@sentry/core": "8.54.0",
|
|
72
72
|
"@sentry/react": "8.54.0",
|
|
73
73
|
"@sentry/types": "8.54.0",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"@sentry-internal/eslint-config-sdk": "8.54.0",
|
|
82
82
|
"@sentry-internal/eslint-plugin-sdk": "8.54.0",
|
|
83
83
|
"@sentry-internal/typescript": "8.54.0",
|
|
84
|
-
"@sentry/wizard": "4.
|
|
84
|
+
"@sentry/wizard": "4.8.0",
|
|
85
85
|
"@testing-library/react-native": "^12.7.2",
|
|
86
86
|
"@types/jest": "^29.5.13",
|
|
87
87
|
"@types/node": "^20.9.3",
|
|
@@ -22,5 +22,5 @@ export { userInteractionIntegration } from '../tracing/integrations/userInteract
|
|
|
22
22
|
export { createReactNativeRewriteFrames } from './rewriteframes';
|
|
23
23
|
export { appRegistryIntegration } from './appRegistry';
|
|
24
24
|
export { timeToDisplayIntegration } from '../tracing/integrations/timeToDisplayIntegration';
|
|
25
|
-
export { breadcrumbsIntegration, browserApiErrorsIntegration, dedupeIntegration, functionToStringIntegration, globalHandlersIntegration as browserGlobalHandlersIntegration, httpClientIntegration, httpContextIntegration, inboundFiltersIntegration, linkedErrorsIntegration as browserLinkedErrorsIntegration, rewriteFramesIntegration, } from '@sentry/react';
|
|
25
|
+
export { breadcrumbsIntegration, browserApiErrorsIntegration, dedupeIntegration, functionToStringIntegration, globalHandlersIntegration as browserGlobalHandlersIntegration, httpClientIntegration, httpContextIntegration, inboundFiltersIntegration, linkedErrorsIntegration as browserLinkedErrorsIntegration, rewriteFramesIntegration, extraErrorDataIntegration, } from '@sentry/react';
|
|
26
26
|
//# sourceMappingURL=exports.d.ts.map
|
|
@@ -42,10 +42,31 @@ export interface ExpoDevice {
|
|
|
42
42
|
osVersion?: string;
|
|
43
43
|
totalMemory?: number;
|
|
44
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* Interface from the Expo SDK defined here
|
|
47
|
+
* (we are describing the native module
|
|
48
|
+
* the TS typing is only guideline)
|
|
49
|
+
*
|
|
50
|
+
* https://github.com/expo/expo/blob/8b7165ad2c6751c741f588c72dac50fb3a814dcc/packages/expo-updates/src/Updates.ts
|
|
51
|
+
*/
|
|
52
|
+
export interface ExpoUpdates {
|
|
53
|
+
isEnabled?: boolean;
|
|
54
|
+
updateId?: string | null;
|
|
55
|
+
channel?: string | null;
|
|
56
|
+
runtimeVersion?: string | null;
|
|
57
|
+
checkAutomatically?: string | null;
|
|
58
|
+
isEmergencyLaunch?: boolean;
|
|
59
|
+
emergencyLaunchReason?: string | null;
|
|
60
|
+
launchDuration?: number | null;
|
|
61
|
+
isEmbeddedLaunch?: boolean;
|
|
62
|
+
isUsingEmbeddedAssets?: boolean;
|
|
63
|
+
createdAt?: Date | null;
|
|
64
|
+
}
|
|
45
65
|
export interface ExpoGlobalObject {
|
|
46
66
|
modules?: {
|
|
47
67
|
ExponentConstants?: ExpoConstants;
|
|
48
68
|
ExpoDevice?: ExpoDevice;
|
|
69
|
+
ExpoUpdates?: ExpoUpdates;
|
|
49
70
|
};
|
|
50
71
|
}
|
|
51
72
|
//# sourceMappingURL=expoglobalobject.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ExpoConstants, ExpoDevice } from './expoglobalobject';
|
|
1
|
+
import type { ExpoConstants, ExpoDevice, ExpoUpdates } from './expoglobalobject';
|
|
2
2
|
/**
|
|
3
3
|
* Returns the Expo Constants module if present
|
|
4
4
|
*/
|
|
@@ -7,4 +7,8 @@ export declare function getExpoConstants(): ExpoConstants | undefined;
|
|
|
7
7
|
* Returns the Expo Device module if present
|
|
8
8
|
*/
|
|
9
9
|
export declare function getExpoDevice(): ExpoDevice | undefined;
|
|
10
|
+
/**
|
|
11
|
+
* Returns the Expo Updates module if present
|
|
12
|
+
*/
|
|
13
|
+
export declare function getExpoUpdates(): ExpoUpdates | undefined;
|
|
10
14
|
//# sourceMappingURL=expomodules.d.ts.map
|