@sentry/react-native 5.16.0-alpha.2 → 5.16.0-alpha.4
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/CHANGELOG.md +51 -0
- package/dist/js/integrations/default.d.ts +11 -0
- package/dist/js/integrations/default.d.ts.map +1 -0
- package/dist/js/integrations/default.js +79 -0
- package/dist/js/integrations/default.js.map +1 -0
- package/dist/js/integrations/expocontext.d.ts +17 -0
- package/dist/js/integrations/expocontext.d.ts.map +1 -0
- package/dist/js/integrations/expocontext.js +68 -0
- package/dist/js/integrations/expocontext.js.map +1 -0
- package/dist/js/integrations/reactnativeinfo.d.ts +2 -0
- package/dist/js/integrations/reactnativeinfo.d.ts.map +1 -1
- package/dist/js/integrations/reactnativeinfo.js +9 -1
- package/dist/js/integrations/reactnativeinfo.js.map +1 -1
- package/dist/js/integrations/sdkinfo.d.ts.map +1 -1
- package/dist/js/integrations/sdkinfo.js +5 -2
- package/dist/js/integrations/sdkinfo.js.map +1 -1
- package/dist/js/options.d.ts +6 -0
- package/dist/js/options.d.ts.map +1 -1
- package/dist/js/options.js +23 -1
- package/dist/js/options.js.map +1 -1
- package/dist/js/sdk.d.ts.map +1 -1
- package/dist/js/sdk.js +13 -55
- package/dist/js/sdk.js.map +1 -1
- package/dist/js/tools/sentryMetroSerializer.d.ts +3 -4
- package/dist/js/tools/sentryMetroSerializer.d.ts.map +1 -1
- package/dist/js/tools/sentryMetroSerializer.js +25 -18
- package/dist/js/tools/sentryMetroSerializer.js.map +1 -1
- package/dist/js/tools/vendor/expo/expoconfig.d.ts +24 -0
- package/dist/js/tools/vendor/expo/expoconfig.d.ts.map +1 -0
- package/dist/js/tools/vendor/expo/expoconfig.js +3 -0
- package/dist/js/tools/vendor/expo/expoconfig.js.map +1 -0
- package/dist/js/tracing/reactnavigation.d.ts.map +1 -1
- package/dist/js/tracing/reactnavigation.js +6 -4
- package/dist/js/tracing/reactnavigation.js.map +1 -1
- package/dist/js/tracing/reactnavigationv4.d.ts.map +1 -1
- package/dist/js/tracing/reactnavigationv4.js +4 -3
- package/dist/js/tracing/reactnavigationv4.js.map +1 -1
- package/dist/js/utils/environment.d.ts +8 -0
- package/dist/js/utils/environment.d.ts.map +1 -1
- package/dist/js/utils/environment.js +23 -0
- package/dist/js/utils/environment.js.map +1 -1
- package/dist/js/utils/expoglobalobject.d.ts +51 -0
- package/dist/js/utils/expoglobalobject.d.ts.map +1 -0
- package/dist/js/utils/expoglobalobject.js +2 -0
- package/dist/js/utils/expoglobalobject.js.map +1 -0
- package/dist/js/utils/expomodules.d.ts +10 -0
- package/dist/js/utils/expomodules.d.ts.map +1 -0
- package/dist/js/utils/expomodules.js +14 -0
- package/dist/js/utils/expomodules.js.map +1 -0
- package/dist/js/utils/worldwide.d.ts +2 -1
- package/dist/js/utils/worldwide.d.ts.map +1 -1
- package/dist/js/utils/worldwide.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/package.json +8 -4
- package/samples/react-native/react-native.config.js +5 -0
- package/scripts/expo-upload-sourcemaps.js +160 -0
- package/ts3.8/dist/js/integrations/default.d.ts +11 -0
- package/ts3.8/dist/js/integrations/expocontext.d.ts +17 -0
- package/ts3.8/dist/js/integrations/reactnativeinfo.d.ts +2 -0
- package/ts3.8/dist/js/options.d.ts +6 -0
- package/ts3.8/dist/js/utils/environment.d.ts +8 -0
- package/ts3.8/dist/js/utils/expoglobalobject.d.ts +51 -0
- package/ts3.8/dist/js/utils/expomodules.d.ts +10 -0
- package/ts3.8/dist/js/utils/worldwide.d.ts +2 -1
- package/ts3.8/dist/js/version.d.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"environment.js","sourceRoot":"","sources":["../../../src/js/utils/environment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAErD,0DAA0D;AAC1D,MAAM,UAAU,eAAe;IAC7B,OAAO,CAAC,CAAC,aAAa,CAAC,cAAc,CAAC;AACxC,CAAC;AAED,0DAA0D;AAC1D,MAAM,UAAU,oBAAoB;IAClC,OAAO,aAAa,CAAC,kBAAkB,IAAI,IAAI,CAAC;AAClD,CAAC;AAED,4DAA4D;AAC5D,MAAM,UAAU,eAAe;IAC7B,OAAO,aAAa,CAAC,qBAAqB,IAAI,IAAI,CAAC;AACrD,CAAC;AAED,oDAAoD;AACpD,MAAM,UAAU,qBAAqB;IACnC,IAAI,CAAC,oBAAoB,CAAC,kBAAkB,EAAE;QAC5C,OAAO,SAAS,CAAC;KAClB;IACD,MAAM,GAAG,GAAG,oBAAoB,CAAC,kBAAkB,CAAC,OAAO,CAAC;IAC5D,OAAO,GAAG,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,KAAK,GAAG,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;AACvG,CAAC;AAED,+CAA+C;AAC/C,MAAM,UAAU,MAAM;IACpB,OAAO,aAAa,CAAC,IAAI,IAAI,IAAI,CAAC;AACpC,CAAC;AAED,iEAAiE;AACjE,MAAM,UAAU,gBAAgB;IAC9B,OAAO,CACL,aAAa,CAAC,cAAc;QAC5B,aAAa,CAAC,cAAc,CAAC,oBAAoB;QACjD,aAAa,CAAC,cAAc,CAAC,oBAAoB,EAAE,CAAC,qBAAqB,CAAC,CAC3E,CAAC;AACJ,CAAC;AAED,mDAAmD;AACnD,MAAM,UAAU,qBAAqB;IACnC,OAAO,OAAO,OAAO,KAAK,WAAW,IAAI,OAAO,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,YAAY,CAAC;AAClF,CAAC","sourcesContent":["import { RN_GLOBAL_OBJ } from '../utils/worldwide';\nimport { ReactNativeLibraries } from './rnlibraries';\n\n/** Checks if the React Native Hermes engine is running */\nexport function isHermesEnabled(): boolean {\n return !!RN_GLOBAL_OBJ.HermesInternal;\n}\n\n/** Checks if the React Native TurboModules are enabled */\nexport function isTurboModuleEnabled(): boolean {\n return RN_GLOBAL_OBJ.__turboModuleProxy != null;\n}\n\n/** Checks if the React Native Fabric renderer is running */\nexport function isFabricEnabled(): boolean {\n return RN_GLOBAL_OBJ.nativeFabricUIManager != null;\n}\n\n/** Returns React Native Version as semver string */\nexport function getReactNativeVersion(): string | undefined {\n if (!ReactNativeLibraries.ReactNativeVersion) {\n return undefined;\n }\n const RNV = ReactNativeLibraries.ReactNativeVersion.version;\n return `${RNV.major}.${RNV.minor}.${RNV.patch}${RNV.prerelease != null ? `-${RNV.prerelease}` : ''}`;\n}\n\n/** Checks if Expo is present in the runtime */\nexport function isExpo(): boolean {\n return RN_GLOBAL_OBJ.expo != null;\n}\n\n/** Returns Hermes Version if hermes is present in the runtime */\nexport function getHermesVersion(): string | undefined {\n return (\n RN_GLOBAL_OBJ.HermesInternal &&\n RN_GLOBAL_OBJ.HermesInternal.getRuntimeProperties &&\n RN_GLOBAL_OBJ.HermesInternal.getRuntimeProperties()['OSS Release Version']\n );\n}\n\n/** Returns default environment based on __DEV__ */\nexport function getDefaultEnvironment(): 'development' | 'production' {\n return typeof __DEV__ !== 'undefined' && __DEV__ ? 'development' : 'production';\n}\n"]}
|
|
1
|
+
{"version":3,"file":"environment.js","sourceRoot":"","sources":["../../../src/js/utils/environment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAErD,0DAA0D;AAC1D,MAAM,UAAU,eAAe;IAC7B,OAAO,CAAC,CAAC,aAAa,CAAC,cAAc,CAAC;AACxC,CAAC;AAED,0DAA0D;AAC1D,MAAM,UAAU,oBAAoB;IAClC,OAAO,aAAa,CAAC,kBAAkB,IAAI,IAAI,CAAC;AAClD,CAAC;AAED,4DAA4D;AAC5D,MAAM,UAAU,eAAe;IAC7B,OAAO,aAAa,CAAC,qBAAqB,IAAI,IAAI,CAAC;AACrD,CAAC;AAED,oDAAoD;AACpD,MAAM,UAAU,qBAAqB;IACnC,IAAI,CAAC,oBAAoB,CAAC,kBAAkB,EAAE;QAC5C,OAAO,SAAS,CAAC;KAClB;IACD,MAAM,GAAG,GAAG,oBAAoB,CAAC,kBAAkB,CAAC,OAAO,CAAC;IAC5D,OAAO,GAAG,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,KAAK,GAAG,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;AACvG,CAAC;AAED,+CAA+C;AAC/C,MAAM,UAAU,MAAM;IACpB,OAAO,aAAa,CAAC,IAAI,IAAI,IAAI,CAAC;AACpC,CAAC;AAED,kCAAkC;AAClC,MAAM,UAAU,QAAQ;IACtB,MAAM,aAAa,GAAG,gBAAgB,EAAE,CAAC;IACzC,OAAO,CAAC,aAAa,IAAI,aAAa,CAAC,YAAY,CAAC,KAAK,MAAM,CAAC;AAClE,CAAC;AAED,yCAAyC;AACzC,MAAM,UAAU,gBAAgB;IAC9B,MAAM,aAAa,GAAG,gBAAgB,EAAE,CAAC;IACzC,OAAO,OAAO,CAAA,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,WAAW,CAAA,KAAK,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC;AAChG,CAAC;AAED,4CAA4C;AAC5C,MAAM,UAAU,iBAAiB;;IAC/B,MAAM,aAAa,GAAG,gBAAgB,EAAE,CAAC;IACzC,MAAM,CAAC,EAAE,cAAc,CAAC,GACtB,OAAO,CAAA,MAAA,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,QAAQ,0CAAE,cAAc,CAAA,KAAK,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC,QAAQ,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACtH,OAAO,cAAc,CAAC;AACxB,CAAC;AAED,gDAAgD;AAChD,MAAM,UAAU,MAAM;IACpB,OAAO,QAAQ,CAAC,EAAE,KAAK,KAAK,CAAC;AAC/B,CAAC;AAED,iEAAiE;AACjE,MAAM,UAAU,gBAAgB;IAC9B,OAAO,CACL,aAAa,CAAC,cAAc;QAC5B,aAAa,CAAC,cAAc,CAAC,oBAAoB;QACjD,aAAa,CAAC,cAAc,CAAC,oBAAoB,EAAE,CAAC,qBAAqB,CAAC,CAC3E,CAAC;AACJ,CAAC;AAED,mDAAmD;AACnD,MAAM,UAAU,qBAAqB;IACnC,OAAO,OAAO,OAAO,KAAK,WAAW,IAAI,OAAO,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,YAAY,CAAC;AAClF,CAAC","sourcesContent":["import { Platform } from 'react-native';\n\nimport { RN_GLOBAL_OBJ } from '../utils/worldwide';\nimport { getExpoConstants } from './expomodules';\nimport { ReactNativeLibraries } from './rnlibraries';\n\n/** Checks if the React Native Hermes engine is running */\nexport function isHermesEnabled(): boolean {\n return !!RN_GLOBAL_OBJ.HermesInternal;\n}\n\n/** Checks if the React Native TurboModules are enabled */\nexport function isTurboModuleEnabled(): boolean {\n return RN_GLOBAL_OBJ.__turboModuleProxy != null;\n}\n\n/** Checks if the React Native Fabric renderer is running */\nexport function isFabricEnabled(): boolean {\n return RN_GLOBAL_OBJ.nativeFabricUIManager != null;\n}\n\n/** Returns React Native Version as semver string */\nexport function getReactNativeVersion(): string | undefined {\n if (!ReactNativeLibraries.ReactNativeVersion) {\n return undefined;\n }\n const RNV = ReactNativeLibraries.ReactNativeVersion.version;\n return `${RNV.major}.${RNV.minor}.${RNV.patch}${RNV.prerelease != null ? `-${RNV.prerelease}` : ''}`;\n}\n\n/** Checks if Expo is present in the runtime */\nexport function isExpo(): boolean {\n return RN_GLOBAL_OBJ.expo != null;\n}\n\n/** Check if JS runs in Expo Go */\nexport function isExpoGo(): boolean {\n const expoConstants = getExpoConstants();\n return (expoConstants && expoConstants.appOwnership) === 'expo';\n}\n\n/** Check Expo Go version if available */\nexport function getExpoGoVersion(): string | undefined {\n const expoConstants = getExpoConstants();\n return typeof expoConstants?.expoVersion === 'string' ? expoConstants.expoVersion : undefined;\n}\n\n/** Returns Expo SDK version if available */\nexport function getExpoSdkVersion(): string | undefined {\n const expoConstants = getExpoConstants();\n const [, expoSdkVersion] =\n typeof expoConstants?.manifest?.runtimeVersion === 'string' ? expoConstants.manifest.runtimeVersion.split(':') : [];\n return expoSdkVersion;\n}\n\n/** Checks if the current platform is not web */\nexport function notWeb(): boolean {\n return Platform.OS !== 'web';\n}\n\n/** Returns Hermes Version if hermes is present in the runtime */\nexport function getHermesVersion(): string | undefined {\n return (\n RN_GLOBAL_OBJ.HermesInternal &&\n RN_GLOBAL_OBJ.HermesInternal.getRuntimeProperties &&\n RN_GLOBAL_OBJ.HermesInternal.getRuntimeProperties()['OSS Release Version']\n );\n}\n\n/** Returns default environment based on __DEV__ */\nexport function getDefaultEnvironment(): 'development' | 'production' {\n return typeof __DEV__ !== 'undefined' && __DEV__ ? 'development' : 'production';\n}\n"]}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interface from the Expo SDK defined here
|
|
3
|
+
* (we are describing the native Module
|
|
4
|
+
* the TS typing is only guideline):
|
|
5
|
+
*
|
|
6
|
+
* https://github.com/expo/expo/blob/b51b5139f2caa2a9495e4132437d7ca612276158/packages/expo-constants/src/Constants.ts
|
|
7
|
+
* https://github.com/expo/expo/blob/b51b5139f2caa2a9495e4132437d7ca612276158/packages/expo-manifests/src/Manifests.ts
|
|
8
|
+
*/
|
|
9
|
+
export interface ExpoConstants {
|
|
10
|
+
appOwnership?: 'standalone' | 'expo' | 'guest';
|
|
11
|
+
/**
|
|
12
|
+
* Deprecated. But until removed we can use it as user ID to match the native SDKs.
|
|
13
|
+
*/
|
|
14
|
+
installationId?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Version of the Expo Go app
|
|
17
|
+
*/
|
|
18
|
+
expoVersion?: string | null;
|
|
19
|
+
manifest?: null | {
|
|
20
|
+
[key: string]: unknown;
|
|
21
|
+
/**
|
|
22
|
+
* Expo SDK version should match `expo` version from the app `package.json`.
|
|
23
|
+
* Example "exposdk:50.0.0"
|
|
24
|
+
*/
|
|
25
|
+
runtimeVersion?: string;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Interface from the Expo SDK defined here
|
|
30
|
+
* (we are describing the native module
|
|
31
|
+
* the TS typing is only guideline)
|
|
32
|
+
*
|
|
33
|
+
* https://github.com/expo/expo/blob/5d1153e6ae7c497fa1281ffee85fabe90d2321c2/packages/expo-device/src/Device.ts
|
|
34
|
+
*/
|
|
35
|
+
export interface ExpoDevice {
|
|
36
|
+
deviceName?: string;
|
|
37
|
+
isDevice?: boolean;
|
|
38
|
+
manufacturer?: string;
|
|
39
|
+
modelName?: string;
|
|
40
|
+
osName?: string;
|
|
41
|
+
osBuildId?: string;
|
|
42
|
+
osVersion?: string;
|
|
43
|
+
totalMemory?: number;
|
|
44
|
+
}
|
|
45
|
+
export interface ExpoGlobalObject {
|
|
46
|
+
modules?: {
|
|
47
|
+
ExponentConstants?: ExpoConstants;
|
|
48
|
+
ExpoDevice?: ExpoDevice;
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=expoglobalobject.d.ts.map
|
|
@@ -0,0 +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,EAAE,aAAa,CAAC;QAClC,UAAU,CAAC,EAAE,UAAU,CAAC;KACzB,CAAC;CACH"}
|
|
@@ -0,0 +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"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ExpoConstants, ExpoDevice } from './expoglobalobject';
|
|
2
|
+
/**
|
|
3
|
+
* Returns the Expo Constants module if present
|
|
4
|
+
*/
|
|
5
|
+
export declare function getExpoConstants(): ExpoConstants | undefined;
|
|
6
|
+
/**
|
|
7
|
+
* Returns the Expo Device module if present
|
|
8
|
+
*/
|
|
9
|
+
export declare function getExpoDevice(): ExpoDevice | undefined;
|
|
10
|
+
//# sourceMappingURL=expomodules.d.ts.map
|
|
@@ -0,0 +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;AAGpE;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,aAAa,GAAG,SAAS,CAI5D;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,UAAU,GAAG,SAAS,CAEtD"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { RN_GLOBAL_OBJ } from './worldwide';
|
|
2
|
+
/**
|
|
3
|
+
* Returns the Expo Constants module if present
|
|
4
|
+
*/
|
|
5
|
+
export function getExpoConstants() {
|
|
6
|
+
return ((RN_GLOBAL_OBJ.expo && RN_GLOBAL_OBJ.expo.modules && RN_GLOBAL_OBJ.expo.modules.ExponentConstants) || undefined);
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Returns the Expo Device module if present
|
|
10
|
+
*/
|
|
11
|
+
export function getExpoDevice() {
|
|
12
|
+
return (RN_GLOBAL_OBJ.expo && RN_GLOBAL_OBJ.expo.modules && RN_GLOBAL_OBJ.expo.modules.ExpoDevice) || undefined;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=expomodules.js.map
|
|
@@ -0,0 +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;IAC9B,OAAO,CACL,CAAC,aAAa,CAAC,IAAI,IAAI,aAAa,CAAC,IAAI,CAAC,OAAO,IAAI,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,iBAAiB,CAAC,IAAI,SAAS,CAChH,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,aAAa;IAC3B,OAAO,CAAC,aAAa,CAAC,IAAI,IAAI,aAAa,CAAC,IAAI,CAAC,OAAO,IAAI,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,SAAS,CAAC;AAClH,CAAC","sourcesContent":["import type { ExpoConstants, ExpoDevice } 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 (\n (RN_GLOBAL_OBJ.expo && RN_GLOBAL_OBJ.expo.modules && RN_GLOBAL_OBJ.expo.modules.ExponentConstants) || undefined\n );\n}\n\n/**\n * Returns the Expo Device module if present\n */\nexport function getExpoDevice(): ExpoDevice | undefined {\n return (RN_GLOBAL_OBJ.expo && RN_GLOBAL_OBJ.expo.modules && RN_GLOBAL_OBJ.expo.modules.ExpoDevice) || undefined;\n}\n"]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { InternalGlobal } from '@sentry/utils';
|
|
2
2
|
import type { ErrorUtils } from 'react-native/types';
|
|
3
|
+
import type { ExpoGlobalObject } from './expoglobalobject';
|
|
3
4
|
/** Internal Global object interface with common and Sentry specific properties */
|
|
4
5
|
export interface ReactNativeInternalGlobal extends InternalGlobal {
|
|
5
6
|
__sentry_rn_v4_registered?: boolean;
|
|
@@ -11,7 +12,7 @@ export interface ReactNativeInternalGlobal extends InternalGlobal {
|
|
|
11
12
|
__turboModuleProxy: unknown;
|
|
12
13
|
nativeFabricUIManager: unknown;
|
|
13
14
|
ErrorUtils?: ErrorUtils;
|
|
14
|
-
expo
|
|
15
|
+
expo?: ExpoGlobalObject;
|
|
15
16
|
}
|
|
16
17
|
/** Get's the global object for the current JavaScript runtime */
|
|
17
18
|
export declare const RN_GLOBAL_OBJ: ReactNativeInternalGlobal;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worldwide.d.ts","sourceRoot":"","sources":["../../../src/js/utils/worldwide.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,kFAAkF;AAClF,MAAM,WAAW,yBAA0B,SAAQ,cAAc;IAC/D,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,cAAc,CAAC,EAAE;QACf,oBAAoB,CAAC,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;KACjE,CAAC;IACF,OAAO,EAAE,OAAO,CAAC;IACjB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,qBAAqB,EAAE,OAAO,CAAC;IAC/B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"worldwide.d.ts","sourceRoot":"","sources":["../../../src/js/utils/worldwide.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,kFAAkF;AAClF,MAAM,WAAW,yBAA0B,SAAQ,cAAc;IAC/D,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,cAAc,CAAC,EAAE;QACf,oBAAoB,CAAC,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;KACjE,CAAC;IACF,OAAO,EAAE,OAAO,CAAC;IACjB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,qBAAqB,EAAE,OAAO,CAAC;IAC/B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,IAAI,CAAC,EAAE,gBAAgB,CAAC;CACzB;AAED,iEAAiE;AACjE,eAAO,MAAM,aAAa,2BAA0C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worldwide.js","sourceRoot":"","sources":["../../../src/js/utils/worldwide.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"worldwide.js","sourceRoot":"","sources":["../../../src/js/utils/worldwide.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAmB3C,iEAAiE;AACjE,MAAM,CAAC,MAAM,aAAa,GAAG,UAAuC,CAAC","sourcesContent":["import type { InternalGlobal } from '@sentry/utils';\nimport { GLOBAL_OBJ } from '@sentry/utils';\nimport type { ErrorUtils } from 'react-native/types';\n\nimport type { ExpoGlobalObject } from './expoglobalobject';\n\n/** Internal Global object interface with common and Sentry specific properties */\nexport interface ReactNativeInternalGlobal extends InternalGlobal {\n __sentry_rn_v4_registered?: boolean;\n __sentry_rn_v5_registered?: boolean;\n HermesInternal?: {\n getRuntimeProperties?: () => Record<string, string | undefined>;\n };\n Promise: unknown;\n __turboModuleProxy: unknown;\n nativeFabricUIManager: unknown;\n ErrorUtils?: ErrorUtils;\n expo?: ExpoGlobalObject;\n}\n\n/** Get's the global object for the current JavaScript runtime */\nexport const RN_GLOBAL_OBJ = GLOBAL_OBJ as ReactNativeInternalGlobal;\n"]}
|
package/dist/js/version.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const SDK_PACKAGE_NAME = "npm:@sentry/react-native";
|
|
2
2
|
export declare const SDK_NAME = "sentry.javascript.react-native";
|
|
3
|
-
export declare const SDK_VERSION = "5.16.0-alpha.
|
|
3
|
+
export declare const SDK_VERSION = "5.16.0-alpha.4";
|
|
4
4
|
//# sourceMappingURL=version.d.ts.map
|
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,gBAAgB,CAAC","sourcesContent":["export const SDK_PACKAGE_NAME = 'npm:@sentry/react-native';\nexport const SDK_NAME = 'sentry.javascript.react-native';\nexport const SDK_VERSION = '5.16.0-alpha.
|
|
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,gBAAgB,CAAC","sourcesContent":["export const SDK_PACKAGE_NAME = 'npm:@sentry/react-native';\nexport const SDK_NAME = 'sentry.javascript.react-native';\nexport const SDK_VERSION = '5.16.0-alpha.4';\n"]}
|
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": "5.16.0-alpha.
|
|
5
|
+
"version": "5.16.0-alpha.4",
|
|
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",
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"build:sdk": "tsc -p tsconfig.build.json",
|
|
23
23
|
"build:sdk:watch": "tsc -p tsconfig.build.json -w --preserveWatchOutput",
|
|
24
24
|
"build:tools": "tsc -p tsconfig.build.tools.json",
|
|
25
|
+
"build:tools:watch": "tsc -p tsconfig.build.tools.json -w --preserveWatchOutput",
|
|
25
26
|
"build:plugin": "EXPO_NONINTERACTIVE=true expo-module build plugin",
|
|
26
27
|
"downlevel": "downlevel-dts dist ts3.8/dist --to=3.8",
|
|
27
28
|
"clean": "rimraf dist coverage && yarn clean:plugin",
|
|
@@ -41,6 +42,9 @@
|
|
|
41
42
|
"run-android": "cd samples/react-native && yarn react-native run-android",
|
|
42
43
|
"yalc:add:sentry-javascript": "yalc add @sentry/browser @sentry/core @sentry/hub @sentry/integrations @sentry/react @sentry/types @sentry/utils"
|
|
43
44
|
},
|
|
45
|
+
"bin": {
|
|
46
|
+
"sentry-expo-upload-sourcemaps": "scripts/expo-upload-sourcemaps.js"
|
|
47
|
+
},
|
|
44
48
|
"keywords": [
|
|
45
49
|
"react-native",
|
|
46
50
|
"sentry",
|
|
@@ -73,7 +77,7 @@
|
|
|
73
77
|
},
|
|
74
78
|
"devDependencies": {
|
|
75
79
|
"@babel/core": "^7.23.5",
|
|
76
|
-
"@expo/metro-config": "
|
|
80
|
+
"@expo/metro-config": "0.16.0",
|
|
77
81
|
"@sentry-internal/eslint-config-sdk": "7.81.1",
|
|
78
82
|
"@sentry-internal/eslint-plugin-sdk": "7.81.1",
|
|
79
83
|
"@sentry-internal/typescript": "7.80.0",
|
|
@@ -88,7 +92,7 @@
|
|
|
88
92
|
"eslint": "^7.6.0",
|
|
89
93
|
"eslint-plugin-react": "^7.20.6",
|
|
90
94
|
"eslint-plugin-react-native": "^3.8.1",
|
|
91
|
-
"expo": "
|
|
95
|
+
"expo": "50.0.0-preview.8",
|
|
92
96
|
"expo-module-scripts": "^3.1.0",
|
|
93
97
|
"jest": "^29.6.2",
|
|
94
98
|
"jest-environment-jsdom": "^29.6.2",
|
|
@@ -96,7 +100,7 @@
|
|
|
96
100
|
"metro": "0.76",
|
|
97
101
|
"prettier": "^2.0.5",
|
|
98
102
|
"react": "18.2.0",
|
|
99
|
-
"react-native": "0.
|
|
103
|
+
"react-native": "0.73.2",
|
|
100
104
|
"replace-in-file": "^7.0.1",
|
|
101
105
|
"rimraf": "^4.1.1",
|
|
102
106
|
"ts-jest": "^29.1.1",
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const { execSync } = require('child_process');
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
const process = require('process');
|
|
6
|
+
|
|
7
|
+
const SENTRY_PROJECT = 'SENTRY_PROJECT';
|
|
8
|
+
// The sentry org is inferred from the auth token
|
|
9
|
+
const SENTRY_AUTH_TOKEN = 'SENTRY_AUTH_TOKEN';
|
|
10
|
+
const SENTRY_CLI_EXECUTABLE = 'SENTRY_CLI_EXECUTABLE';
|
|
11
|
+
|
|
12
|
+
function getEnvVar(varname) {
|
|
13
|
+
return process.env[varname];
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function getSentryPluginPropertiesFromExpoConfig() {
|
|
17
|
+
try {
|
|
18
|
+
const stdOutBuffer = execSync('npx expo config --json');
|
|
19
|
+
const config = JSON.parse(stdOutBuffer.toString());
|
|
20
|
+
const plugins = config.plugins;
|
|
21
|
+
if (!plugins) {
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const sentryPlugin = plugins.find(plugin => {
|
|
26
|
+
if (!Array.isArray(plugin) || plugin.length < 2) {
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
const [pluginName] = plugin;
|
|
30
|
+
return pluginName === '@sentry/react-native/expo';
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
if (!sentryPlugin) {
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
const [, pluginConfig] = sentryPlugin;
|
|
37
|
+
return pluginConfig;
|
|
38
|
+
} catch (error) {
|
|
39
|
+
console.error('Error fetching expo config:', error);
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function readAndPrintJSONFile(filePath) {
|
|
45
|
+
if (!fs.existsSync(filePath)) {
|
|
46
|
+
throw new Error(`The file "${filePath}" does not exist.`);
|
|
47
|
+
}
|
|
48
|
+
try {
|
|
49
|
+
const data = fs.readFileSync(filePath, 'utf8');
|
|
50
|
+
return JSON.parse(data);
|
|
51
|
+
} catch (err) {
|
|
52
|
+
console.error('Error reading or parsing JSON file:', err);
|
|
53
|
+
throw err;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function writeJSONFile(filePath, object) {
|
|
58
|
+
// Convert the updated JavaScript object back to a JSON string
|
|
59
|
+
const updatedJsonString = JSON.stringify(object, null, 2);
|
|
60
|
+
fs.writeFileSync(filePath, updatedJsonString, 'utf8', writeErr => {
|
|
61
|
+
if (writeErr) {
|
|
62
|
+
console.error('Error writing to the file:', writeErr);
|
|
63
|
+
} else {
|
|
64
|
+
console.log('File updated successfully.');
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
function isAsset(filename) {
|
|
70
|
+
return filename.endsWith('.map') || filename.endsWith('.js') || filename.endsWith('.hbc');
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
function getAssetPathsSync(directory) {
|
|
74
|
+
const files = [];
|
|
75
|
+
const items = fs.readdirSync(directory, { withFileTypes: true });
|
|
76
|
+
|
|
77
|
+
for (const item of items) {
|
|
78
|
+
const fullPath = path.join(directory, item.name);
|
|
79
|
+
if (item.isDirectory()) {
|
|
80
|
+
// eslint-disable-next-line no-unused-vars
|
|
81
|
+
files.push(...getAssetPathsSync(fullPath));
|
|
82
|
+
} else if (item.isFile() && isAsset(item.name)) {
|
|
83
|
+
files.push(fullPath);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
return files;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
function groupAssets(assetPaths) {
|
|
90
|
+
const groups = {};
|
|
91
|
+
for (const assetPath of assetPaths) {
|
|
92
|
+
const parsedPath = path.parse(assetPath);
|
|
93
|
+
const extname = parsedPath.ext;
|
|
94
|
+
const assetGroupName = extname === '.map' ? path.join(parsedPath.dir, parsedPath.name) : path.format(parsedPath);
|
|
95
|
+
if (!groups[assetGroupName]) {
|
|
96
|
+
groups[assetGroupName] = [assetPath];
|
|
97
|
+
} else {
|
|
98
|
+
groups[assetGroupName].push(assetPath);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
return groups;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
let sentryProject = getEnvVar(SENTRY_PROJECT);
|
|
105
|
+
let authToken = getEnvVar(SENTRY_AUTH_TOKEN);
|
|
106
|
+
const sentryCliBin = getEnvVar(SENTRY_CLI_EXECUTABLE) || require.resolve('@sentry/cli/bin/sentry-cli');
|
|
107
|
+
|
|
108
|
+
if (!sentryProject) {
|
|
109
|
+
console.log(`🐕 Fetching ${SENTRY_PROJECT} from expo config...`);
|
|
110
|
+
const pluginConfig = getSentryPluginPropertiesFromExpoConfig();
|
|
111
|
+
if (!pluginConfig) {
|
|
112
|
+
console.error("Could not fetch '@sentry/react-native' plugin properties from expo config.");
|
|
113
|
+
process.exit(1);
|
|
114
|
+
}
|
|
115
|
+
if (!pluginConfig.project) {
|
|
116
|
+
console.error(
|
|
117
|
+
`Could not resolve sentry project, set it in the environment variable ${SENTRY_PROJECT} or in the '@sentry/react-native' plugin properties in your expo config.`,
|
|
118
|
+
);
|
|
119
|
+
process.exit(1);
|
|
120
|
+
}
|
|
121
|
+
sentryProject = pluginConfig.project;
|
|
122
|
+
console.log(`${SENTRY_PROJECT} resolved to ${sentryProject} from expo config.`);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
if (!authToken) {
|
|
126
|
+
console.error(`${SENTRY_AUTH_TOKEN} environment variable must be set.`);
|
|
127
|
+
process.exit(1);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
const outputDir = process.argv[2];
|
|
131
|
+
if (!outputDir) {
|
|
132
|
+
console.error('Provide the directory with your bundles and sourcemaps as the first argument.');
|
|
133
|
+
console.error('Example: node node_modules/@sentry/react-native/scripts/expo-upload-sourcemaps dist');
|
|
134
|
+
process.exit(1);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
const files = getAssetPathsSync(outputDir);
|
|
138
|
+
const groupedAssets = groupAssets(files);
|
|
139
|
+
|
|
140
|
+
for (const [assetGroupName, assets] of Object.entries(groupedAssets)) {
|
|
141
|
+
const sourceMapPath = assets.find(asset => asset.endsWith('.map'));
|
|
142
|
+
if (sourceMapPath) {
|
|
143
|
+
const sourceMap = readAndPrintJSONFile(sourceMapPath);
|
|
144
|
+
if (sourceMap.debugId) {
|
|
145
|
+
sourceMap.debug_id = sourceMap.debugId;
|
|
146
|
+
}
|
|
147
|
+
writeJSONFile(sourceMapPath, sourceMap);
|
|
148
|
+
}
|
|
149
|
+
console.log(`⬆️ Uploading ${assetGroupName} bundle and sourcemap...`);
|
|
150
|
+
const isHermes = assets.find(asset => asset.endsWith('.hbc'));
|
|
151
|
+
execSync(`${sentryCliBin} sourcemaps upload ${isHermes ? '--debug-id-reference' : ''} ${assets.join(' ')}`, {
|
|
152
|
+
env: {
|
|
153
|
+
...process.env,
|
|
154
|
+
[SENTRY_PROJECT]: sentryProject,
|
|
155
|
+
},
|
|
156
|
+
stdio: 'inherit',
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
console.log('✅ Uploaded bundles and sourcemaps to Sentry successfully.');
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Integration } from '@sentry/types';
|
|
2
|
+
import type { ReactNativeClientOptions } from '../options';
|
|
3
|
+
/**
|
|
4
|
+
* Returns the default ReactNative integrations based on the current environment.
|
|
5
|
+
*
|
|
6
|
+
* Native integrations are only returned when native is enabled.
|
|
7
|
+
*
|
|
8
|
+
* Web integrations are only returned when running on web.
|
|
9
|
+
*/
|
|
10
|
+
export declare function getDefaultIntegrations(options: ReactNativeClientOptions): Integration[];
|
|
11
|
+
//# sourceMappingURL=default.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { EventProcessor, Hub, Integration } from '@sentry/types';
|
|
2
|
+
/** Load device context from expo modules. */
|
|
3
|
+
export declare class ExpoContext implements Integration {
|
|
4
|
+
/**
|
|
5
|
+
* @inheritDoc
|
|
6
|
+
*/
|
|
7
|
+
static id: string;
|
|
8
|
+
/**
|
|
9
|
+
* @inheritDoc
|
|
10
|
+
*/
|
|
11
|
+
name: string;
|
|
12
|
+
/**
|
|
13
|
+
* @inheritDoc
|
|
14
|
+
*/
|
|
15
|
+
setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=expocontext.d.ts.map
|
|
@@ -8,6 +8,8 @@ export interface ReactNativeContext extends Context {
|
|
|
8
8
|
react_native_version?: string;
|
|
9
9
|
component_stack?: string;
|
|
10
10
|
hermes_debug_info?: boolean;
|
|
11
|
+
expo_go_version?: string;
|
|
12
|
+
expo_sdk_version?: string;
|
|
11
13
|
}
|
|
12
14
|
/** Loads React Native context at runtime */
|
|
13
15
|
export declare class ReactNativeInfo implements Integration {
|
|
@@ -155,4 +155,10 @@ export interface ReactNativeWrapperOptions {
|
|
|
155
155
|
/** Props for the root touch event boundary */
|
|
156
156
|
touchEventBoundaryProps?: TouchEventBoundaryProps;
|
|
157
157
|
}
|
|
158
|
+
/**
|
|
159
|
+
* If the user has not explicitly set `enableNativeNagger`
|
|
160
|
+
* the function enables native nagging based on the current
|
|
161
|
+
* environment.
|
|
162
|
+
*/
|
|
163
|
+
export declare function shouldEnableNativeNagger(userOptions: unknown): boolean;
|
|
158
164
|
//# sourceMappingURL=options.d.ts.map
|
|
@@ -8,6 +8,14 @@ export declare function isFabricEnabled(): boolean;
|
|
|
8
8
|
export declare function getReactNativeVersion(): string | undefined;
|
|
9
9
|
/** Checks if Expo is present in the runtime */
|
|
10
10
|
export declare function isExpo(): boolean;
|
|
11
|
+
/** Check if JS runs in Expo Go */
|
|
12
|
+
export declare function isExpoGo(): boolean;
|
|
13
|
+
/** Check Expo Go version if available */
|
|
14
|
+
export declare function getExpoGoVersion(): string | undefined;
|
|
15
|
+
/** Returns Expo SDK version if available */
|
|
16
|
+
export declare function getExpoSdkVersion(): string | undefined;
|
|
17
|
+
/** Checks if the current platform is not web */
|
|
18
|
+
export declare function notWeb(): boolean;
|
|
11
19
|
/** Returns Hermes Version if hermes is present in the runtime */
|
|
12
20
|
export declare function getHermesVersion(): string | undefined;
|
|
13
21
|
/** Returns default environment based on __DEV__ */
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interface from the Expo SDK defined here
|
|
3
|
+
* (we are describing the native Module
|
|
4
|
+
* the TS typing is only guideline):
|
|
5
|
+
*
|
|
6
|
+
* https://github.com/expo/expo/blob/b51b5139f2caa2a9495e4132437d7ca612276158/packages/expo-constants/src/Constants.ts
|
|
7
|
+
* https://github.com/expo/expo/blob/b51b5139f2caa2a9495e4132437d7ca612276158/packages/expo-manifests/src/Manifests.ts
|
|
8
|
+
*/
|
|
9
|
+
export interface ExpoConstants {
|
|
10
|
+
appOwnership?: 'standalone' | 'expo' | 'guest';
|
|
11
|
+
/**
|
|
12
|
+
* Deprecated. But until removed we can use it as user ID to match the native SDKs.
|
|
13
|
+
*/
|
|
14
|
+
installationId?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Version of the Expo Go app
|
|
17
|
+
*/
|
|
18
|
+
expoVersion?: string | null;
|
|
19
|
+
manifest?: null | {
|
|
20
|
+
[key: string]: unknown;
|
|
21
|
+
/**
|
|
22
|
+
* Expo SDK version should match `expo` version from the app `package.json`.
|
|
23
|
+
* Example "exposdk:50.0.0"
|
|
24
|
+
*/
|
|
25
|
+
runtimeVersion?: string;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Interface from the Expo SDK defined here
|
|
30
|
+
* (we are describing the native module
|
|
31
|
+
* the TS typing is only guideline)
|
|
32
|
+
*
|
|
33
|
+
* https://github.com/expo/expo/blob/5d1153e6ae7c497fa1281ffee85fabe90d2321c2/packages/expo-device/src/Device.ts
|
|
34
|
+
*/
|
|
35
|
+
export interface ExpoDevice {
|
|
36
|
+
deviceName?: string;
|
|
37
|
+
isDevice?: boolean;
|
|
38
|
+
manufacturer?: string;
|
|
39
|
+
modelName?: string;
|
|
40
|
+
osName?: string;
|
|
41
|
+
osBuildId?: string;
|
|
42
|
+
osVersion?: string;
|
|
43
|
+
totalMemory?: number;
|
|
44
|
+
}
|
|
45
|
+
export interface ExpoGlobalObject {
|
|
46
|
+
modules?: {
|
|
47
|
+
ExponentConstants?: ExpoConstants;
|
|
48
|
+
ExpoDevice?: ExpoDevice;
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=expoglobalobject.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ExpoConstants, ExpoDevice } from './expoglobalobject';
|
|
2
|
+
/**
|
|
3
|
+
* Returns the Expo Constants module if present
|
|
4
|
+
*/
|
|
5
|
+
export declare function getExpoConstants(): ExpoConstants | undefined;
|
|
6
|
+
/**
|
|
7
|
+
* Returns the Expo Device module if present
|
|
8
|
+
*/
|
|
9
|
+
export declare function getExpoDevice(): ExpoDevice | undefined;
|
|
10
|
+
//# sourceMappingURL=expomodules.d.ts.map
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { InternalGlobal } from '@sentry/utils';
|
|
2
2
|
import type { ErrorUtils } from 'react-native/types';
|
|
3
|
+
import type { ExpoGlobalObject } from './expoglobalobject';
|
|
3
4
|
/** Internal Global object interface with common and Sentry specific properties */
|
|
4
5
|
export interface ReactNativeInternalGlobal extends InternalGlobal {
|
|
5
6
|
__sentry_rn_v4_registered?: boolean;
|
|
@@ -11,7 +12,7 @@ export interface ReactNativeInternalGlobal extends InternalGlobal {
|
|
|
11
12
|
__turboModuleProxy: unknown;
|
|
12
13
|
nativeFabricUIManager: unknown;
|
|
13
14
|
ErrorUtils?: ErrorUtils;
|
|
14
|
-
expo
|
|
15
|
+
expo?: ExpoGlobalObject;
|
|
15
16
|
}
|
|
16
17
|
/** Get's the global object for the current JavaScript runtime */
|
|
17
18
|
export declare const RN_GLOBAL_OBJ: ReactNativeInternalGlobal;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const SDK_PACKAGE_NAME = "npm:@sentry/react-native";
|
|
2
2
|
export declare const SDK_NAME = "sentry.javascript.react-native";
|
|
3
|
-
export declare const SDK_VERSION = "5.16.0-alpha.
|
|
3
|
+
export declare const SDK_VERSION = "5.16.0-alpha.4";
|
|
4
4
|
//# sourceMappingURL=version.d.ts.map
|