@sentry/react-native 5.15.1 → 5.16.0-alpha.2

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.
Files changed (95) hide show
  1. package/CHANGELOG.md +68 -0
  2. package/app.plugin.js +1 -0
  3. package/dist/js/NativeRNSentry.d.ts +1 -1
  4. package/dist/js/NativeRNSentry.d.ts.map +1 -1
  5. package/dist/js/NativeRNSentry.js.map +1 -1
  6. package/dist/js/index.js +1 -1
  7. package/dist/js/index.js.map +1 -1
  8. package/dist/js/integrations/debugsymbolicator.d.ts.map +1 -1
  9. package/dist/js/integrations/debugsymbolicator.js +12 -10
  10. package/dist/js/integrations/debugsymbolicator.js.map +1 -1
  11. package/dist/js/integrations/reactnativeerrorhandlers.d.ts.map +1 -1
  12. package/dist/js/integrations/reactnativeerrorhandlers.js +9 -6
  13. package/dist/js/integrations/reactnativeerrorhandlers.js.map +1 -1
  14. package/dist/js/integrations/reactnativeinfo.d.ts +1 -1
  15. package/dist/js/integrations/reactnativeinfo.d.ts.map +1 -1
  16. package/dist/js/integrations/reactnativeinfo.js.map +1 -1
  17. package/dist/js/measurements.d.ts +0 -7
  18. package/dist/js/measurements.d.ts.map +1 -1
  19. package/dist/js/measurements.js +0 -56
  20. package/dist/js/measurements.js.map +1 -1
  21. package/dist/js/profiling/constants.d.ts +2 -0
  22. package/dist/js/profiling/constants.d.ts.map +1 -0
  23. package/dist/js/profiling/constants.js +2 -0
  24. package/dist/js/profiling/constants.js.map +1 -0
  25. package/dist/js/profiling/convertHermesProfile.d.ts.map +1 -1
  26. package/dist/js/profiling/convertHermesProfile.js +1 -1
  27. package/dist/js/profiling/convertHermesProfile.js.map +1 -1
  28. package/dist/js/profiling/integration.d.ts +0 -1
  29. package/dist/js/profiling/integration.d.ts.map +1 -1
  30. package/dist/js/profiling/integration.js +1 -1
  31. package/dist/js/profiling/integration.js.map +1 -1
  32. package/dist/js/sdk.d.ts.map +1 -1
  33. package/dist/js/sdk.js +9 -8
  34. package/dist/js/sdk.js.map +1 -1
  35. package/dist/js/tools/sentryMetroSerializer.d.ts +7 -0
  36. package/dist/js/tools/sentryMetroSerializer.d.ts.map +1 -1
  37. package/dist/js/tools/sentryMetroSerializer.js +27 -1
  38. package/dist/js/tools/sentryMetroSerializer.js.map +1 -1
  39. package/dist/js/touchevents.js +5 -8
  40. package/dist/js/touchevents.js.map +1 -1
  41. package/dist/js/tracing/addTracingExtensions.d.ts +8 -0
  42. package/dist/js/tracing/addTracingExtensions.d.ts.map +1 -0
  43. package/dist/js/tracing/addTracingExtensions.js +58 -0
  44. package/dist/js/tracing/addTracingExtensions.js.map +1 -0
  45. package/dist/js/tracing/reactnativenavigation.d.ts +1 -1
  46. package/dist/js/tracing/reactnativenavigation.d.ts.map +1 -1
  47. package/dist/js/tracing/reactnativenavigation.js.map +1 -1
  48. package/dist/js/utils/environment.d.ts +1 -1
  49. package/dist/js/utils/environment.d.ts.map +1 -1
  50. package/dist/js/utils/environment.js +5 -1
  51. package/dist/js/utils/environment.js.map +1 -1
  52. package/dist/js/utils/rnlibraries.d.ts +3 -0
  53. package/dist/js/utils/rnlibraries.d.ts.map +1 -0
  54. package/dist/js/utils/rnlibraries.js +29 -0
  55. package/dist/js/utils/rnlibraries.js.map +1 -0
  56. package/dist/js/utils/rnlibraries.web.d.ts +3 -0
  57. package/dist/js/utils/rnlibraries.web.d.ts.map +1 -0
  58. package/dist/js/utils/rnlibraries.web.js +2 -0
  59. package/dist/js/utils/rnlibraries.web.js.map +1 -0
  60. package/dist/js/utils/rnlibrariesinterface.d.ts +19 -0
  61. package/dist/js/utils/rnlibrariesinterface.d.ts.map +1 -0
  62. package/dist/js/utils/rnlibrariesinterface.js +8 -0
  63. package/dist/js/utils/rnlibrariesinterface.js.map +1 -0
  64. package/dist/js/version.d.ts +1 -1
  65. package/dist/js/version.d.ts.map +1 -1
  66. package/dist/js/version.js +1 -1
  67. package/dist/js/version.js.map +1 -1
  68. package/expo.d.ts +1 -0
  69. package/expo.js +1 -0
  70. package/package.json +20 -6
  71. package/plugin/build/index.d.ts +3 -0
  72. package/plugin/build/index.js +6 -0
  73. package/plugin/build/utils.d.ts +7 -0
  74. package/plugin/build/utils.js +39 -0
  75. package/plugin/build/withSentry.d.ts +10 -0
  76. package/plugin/build/withSentry.js +50 -0
  77. package/plugin/build/withSentryAndroid.d.ts +7 -0
  78. package/plugin/build/withSentryAndroid.js +68 -0
  79. package/plugin/build/withSentryIOS.d.ts +8 -0
  80. package/plugin/build/withSentryIOS.js +71 -0
  81. package/scripts/sentry-xcode-debug-files.sh +5 -1
  82. package/scripts/sentry-xcode.sh +7 -2
  83. package/src/js/NativeRNSentry.ts +2 -1
  84. package/ts3.8/dist/js/NativeRNSentry.d.ts +1 -1
  85. package/ts3.8/dist/js/integrations/reactnativeinfo.d.ts +1 -1
  86. package/ts3.8/dist/js/measurements.d.ts +0 -7
  87. package/ts3.8/dist/js/profiling/constants.d.ts +2 -0
  88. package/ts3.8/dist/js/profiling/integration.d.ts +0 -1
  89. package/ts3.8/dist/js/tracing/addTracingExtensions.d.ts +8 -0
  90. package/ts3.8/dist/js/tracing/reactnativenavigation.d.ts +1 -1
  91. package/ts3.8/dist/js/utils/environment.d.ts +1 -1
  92. package/ts3.8/dist/js/utils/rnlibraries.d.ts +3 -0
  93. package/ts3.8/dist/js/utils/rnlibraries.web.d.ts +3 -0
  94. package/ts3.8/dist/js/utils/rnlibrariesinterface.d.ts +19 -0
  95. package/ts3.8/dist/js/version.d.ts +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"addTracingExtensions.js","sourceRoot":"","sources":["../../../src/js/tracing/addTracingExtensions.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAGnF,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAEnE;;G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CAAC,kBAAkB,CAAC,CAAC;QAE9E,IAAI,kBAAkB,EAAE;YACtB,kBAAkB,CAAC,kBAAkB,CAAC,WAAW,CAAC,CAAC;YAEnD,6DAA6D;YAC7D,MAAM,cAAc,GAAG,WAAW,CAAC,MAAM,CAAC;YAE1C,WAAW,CAAC,MAAM,GAAG,CAAC,YAAgC,EAAE,EAAE;gBACxD,IAAI,kBAAkB,EAAE;oBACtB,kBAAkB,CAAC,mBAAmB,CAAC,WAAW,CAAC,CAAC;iBACrD;gBAED,OAAO,cAAc,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC;YAC3D,CAAC,CAAC;SACH;QAED,OAAO,WAAW,CAAC;IACrB,CAAC;IAED,OAAO,iBAAiB,CAAC;AAC3B,CAAC,CAAC","sourcesContent":["import type { Hub, Transaction } from '@sentry/core';\nimport { addTracingExtensions, getCurrentHub, getMainCarrier } from '@sentry/core';\nimport type { CustomSamplingContext, Span, SpanContext, TransactionContext } from '@sentry/types';\n\nimport { DEFAULT } from '../tracing/ops';\nimport { ReactNativeTracing } from '../tracing/reactnativetracing';\n\n/**\n * Adds React Native's extensions. Needs to be called before any transactions are created.\n */\nexport function _addTracingExtensions(): void {\n addTracingExtensions();\n const carrier = getMainCarrier();\n if (carrier.__SENTRY__) {\n carrier.__SENTRY__.extensions = carrier.__SENTRY__.extensions || {};\n if (carrier.__SENTRY__.extensions.startTransaction) {\n const originalStartTransaction = carrier.__SENTRY__.extensions.startTransaction as StartTransactionFunction;\n\n /*\n Overwrites the transaction start and finish to start and finish stall tracking.\n Preferably instead of overwriting add a callback method for this in the Transaction itself.\n */\n const _startTransaction = _patchStartTransaction(originalStartTransaction);\n\n carrier.__SENTRY__.extensions.startTransaction = _startTransaction;\n }\n }\n}\n\nexport type StartTransactionFunction = (\n this: Hub,\n transactionContext: TransactionContext,\n customSamplingContext?: CustomSamplingContext,\n) => Transaction;\n\n/**\n * Overwrite the startTransaction extension method to start and end stall tracking.\n */\nconst _patchStartTransaction = (originalStartTransaction: StartTransactionFunction): StartTransactionFunction => {\n /**\n * Method to overwrite with\n */\n function _startTransaction(\n this: Hub,\n transactionContext: TransactionContext,\n customSamplingContext?: CustomSamplingContext,\n ): Transaction {\n // Native SDKs require op to be set - for JS Relay sets `default`\n if (!transactionContext.op) {\n transactionContext.op = DEFAULT;\n }\n\n const transaction: Transaction = originalStartTransaction.apply(this, [transactionContext, customSamplingContext]);\n const originalStartChild: Transaction['startChild'] = transaction.startChild.bind(transaction);\n transaction.startChild = (\n spanContext?: Pick<SpanContext, Exclude<keyof SpanContext, 'sampled' | 'traceId' | 'parentSpanId'>>,\n ): Span => {\n return originalStartChild({\n ...spanContext,\n // Native SDKs require op to be set\n op: spanContext?.op || DEFAULT,\n });\n };\n\n const reactNativeTracing = getCurrentHub().getIntegration(ReactNativeTracing);\n\n if (reactNativeTracing) {\n reactNativeTracing.onTransactionStart(transaction);\n\n // eslint-disable-next-line @typescript-eslint/unbound-method\n const originalFinish = transaction.finish;\n\n transaction.finish = (endTimestamp: number | undefined) => {\n if (reactNativeTracing) {\n reactNativeTracing.onTransactionFinish(transaction);\n }\n\n return originalFinish.apply(transaction, [endTimestamp]);\n };\n }\n\n return transaction;\n }\n\n return _startTransaction;\n};\n"]}
@@ -1,4 +1,4 @@
1
- import type { EmitterSubscription } from 'react-native/Libraries/vendor/emitter/EventEmitter';
1
+ import type { EmitterSubscription } from '../utils/rnlibrariesinterface';
2
2
  import type { OnConfirmRoute, TransactionCreator } from './routingInstrumentation';
3
3
  import { InternalRoutingInstrumentation } from './routingInstrumentation';
4
4
  import type { BeforeNavigate } from './types';
@@ -1 +1 @@
1
- {"version":3,"file":"reactnativenavigation.d.ts","sourceRoot":"","sources":["../../../src/js/tracing/reactnativenavigation.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oDAAoD,CAAC;AAE9F,OAAO,KAAK,EAAE,cAAc,EAAE,kBAAkB,EAAE,M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2D,CAClJ,CAAC;YAEF,YAAY,mCACP,cAAc,KACjB,OAAO,EAAE,KAAK,GACf,CAAC;SACH;QAED,IAAI,YAAY,CAAC,OAAO,KAAK,KAAK,EAAE;YAClC,MAAM,CAAC,GAAG,CACR,IAAI,oCAAoC,CAAC,IAAI,gCAAgC,YAAY,CAAC,IAAI,0BAA0B,CACzH,CAAC;SACH;QAED,OAAO,YAAY,CAAC;IACtB,CAAC;IAED,wEAAwE;IAChE,yBAAyB;QAC/B,IAAI,IAAI,CAAC,kBAAkB,EAAE;YAC3B,IAAI,CAAC,kBAAkB,CAAC,OAAO,GAAG,KAAK,CAAC;YACxC,IAAI,CAAC,kBAAkB,CAAC,MAAM,EAAE,CAAC;YACjC,IAAI,CAAC,kBAAkB,GAAG,SAAS,CAAC;SACrC;QAED,IAAI,CAAC,wBAAwB,EAAE,CAAC;IAClC,CAAC;IAED,wEAAwE;IAChE,wBAAwB;QAC9B,IAAI,OAAO,IAAI,CAAC,mBAAmB,KAAK,WAAW,EAAE;YACnD,YAAY,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;YACvC,IAAI,CAAC,mBAAmB,GAAG,SAAS,CAAC;SACtC;IACH,CAAC;;AAvKa,wDAAmB,GAAW,yBAAyB,CAAC","sourcesContent":["import type { Transaction as TransactionType, TransactionContext } from '@sentry/types';\nimport { logger } from '@sentry/utils';\nimport type { EmitterSubscription } from 'react-native/Libraries/vendor/emitter/EventEmitter';\n\nimport type { OnConfirmRoute, TransactionCreator } from './routingInstrumentation';\nimport { InternalRoutingInstrumentation } from './routingInstrumentation';\nimport type { BeforeNavigate, RouteChangeContextData } from './types';\nimport { customTransactionSource, defaultTransactionSource, getBlankTransactionContext } from './utils';\n\ninterface ReactNativeNavigationOptions {\n /**\n * How long the instrumentation will wait for the route to mount after a change has been initiated,\n * before the transaction is discarded.\n * Time is in ms.\n *\n * Default: 1000\n */\n routeChangeTimeoutMs: number;\n /**\n * Instrumentation will create a transaction on tab change.\n * By default only navigation commands create transactions.\n *\n * Default: true\n */\n enableTabsInstrumentation: boolean;\n}\n\nconst defaultOptions: ReactNativeNavigationOptions = {\n routeChangeTimeoutMs: 1000,\n enableTabsInstrumentation: true,\n};\n\ninterface ComponentEvent {\n componentId: string;\n}\n\ntype ComponentType = 'Component' | 'TopBarTitle' | 'TopBarBackground' | 'TopBarButton';\n\nexport interface ComponentWillAppearEvent extends ComponentEvent {\n componentName: string;\n passProps?: Record<string | number | symbol, unknown>;\n componentType: ComponentType;\n}\n\nexport interface EventSubscription {\n remove(): void;\n}\n\nexport interface BottomTabPressedEvent {\n tabIndex: number;\n}\n\nexport interface EventsRegistry {\n registerComponentWillAppearListener(callback: (event: ComponentWillAppearEvent) => void): EmitterSubscription;\n registerCommandListener(callback: (name: string, params: unknown) => void): EventSubscription;\n registerBottomTabPressedListener(callback: (event: BottomTabPressedEvent) => void): EmitterSubscription;\n}\n\nexport interface NavigationDelegate {\n events: () => EventsRegistry;\n}\n\n/**\n * Instrumentation for React Native Navigation. See docs or sample app for usage.\n *\n * How this works:\n * - `_onCommand` is called every time a commands happens and sets an IdleTransaction on the scope without any route context.\n * - `_onComponentWillAppear` is then called AFTER the state change happens due to a dispatch and sets the route context onto the active transaction.\n * - If `_onComponentWillAppear` isn't called within `options.routeChangeTimeoutMs` of the dispatch, then the transaction is not sampled and finished.\n */\nexport class ReactNativeNavigationInstrumentation extends InternalRoutingInstrumentation {\n public static instrumentationName: string = 'react-native-navigation';\n\n public readonly name: string = ReactNativeNavigationInstrumentation.instrumentationName;\n\n private _navigation: NavigationDelegate;\n private _options: ReactNativeNavigationOptions;\n\n private _prevComponentEvent: ComponentWillAppearEvent | null = null;\n\n private _latestTransaction?: TransactionType;\n private _recentComponentIds: string[] = [];\n private _stateChangeTimeout?: number | undefined;\n\n public constructor(\n /** The react native navigation `NavigationDelegate`. This is usually the import named `Navigation`. */\n navigation: unknown,\n options: Partial<ReactNativeNavigationOptions> = {},\n ) {\n super();\n\n this._navigation = navigation as NavigationDelegate;\n\n this._options = {\n ...defaultOptions,\n ...options,\n };\n }\n\n /**\n * Registers the event listeners for React Native Navigation\n */\n public registerRoutingInstrumentation(\n listener: TransactionCreator,\n beforeNavigate: BeforeNavigate,\n onConfirmRoute: OnConfirmRoute,\n ): void {\n super.registerRoutingInstrumentation(listener, beforeNavigate, onConfirmRoute);\n\n this._navigation.events().registerCommandListener(this._onNavigation.bind(this));\n\n if (this._options.enableTabsInstrumentation) {\n this._navigation.events().registerBottomTabPressedListener(this._onNavigation.bind(this));\n }\n\n this._navigation.events().registerComponentWillAppearListener(this._onComponentWillAppear.bind(this));\n }\n\n /**\n * To be called when a navigation is initiated. (Command, BottomTabSelected, etc.)\n */\n private _onNavigation(): void {\n if (this._latestTransaction) {\n this._discardLatestTransaction();\n }\n\n this._latestTransaction = this.onRouteWillChange(\n getBlankTransactionContext(ReactNativeNavigationInstrumentation.name),\n );\n\n this._stateChangeTimeout = setTimeout(\n this._discardLatestTransaction.bind(this),\n this._options.routeChangeTimeoutMs,\n );\n }\n\n /**\n * To be called AFTER the state has been changed to populate the transaction with the current route.\n */\n private _onComponentWillAppear(event: ComponentWillAppearEvent): void {\n if (!this._latestTransaction) {\n return;\n }\n\n // We ignore actions that pertain to the same screen.\n const isSameComponent = this._prevComponentEvent && event.componentId === this._prevComponentEvent.componentId;\n if (isSameComponent) {\n this._discardLatestTransaction();\n return;\n }\n\n this._clearStateChangeTimeout();\n\n const originalContext = this._latestTransaction.toContext();\n const routeHasBeenSeen = this._recentComponentIds.includes(event.componentId);\n\n const data: RouteChangeContextData = {\n ...originalContext.data,\n route: {\n ...event,\n name: event.componentName,\n hasBeenSeen: routeHasBeenSeen,\n },\n previousRoute: this._prevComponentEvent\n ? {\n ...this._prevComponentEvent,\n name: this._prevComponentEvent?.componentName,\n }\n : null,\n };\n\n const updatedContext = {\n ...originalContext,\n name: event.componentName,\n tags: {\n ...originalContext.tags,\n 'routing.route.name': event.componentName,\n },\n data,\n };\n\n const finalContext = this._prepareFinalContext(updatedContext);\n this._latestTransaction.updateWithContext(finalContext);\n\n const isCustomName = updatedContext.name !== finalContext.name;\n this._latestTransaction.setName(\n finalContext.name,\n isCustomName ? customTransactionSource : defaultTransactionSource,\n );\n\n this._onConfirmRoute?.(finalContext);\n this._prevComponentEvent = event;\n\n this._latestTransaction = undefined;\n }\n\n /** Creates final transaction context before confirmation */\n private _prepareFinalContext(updatedContext: TransactionContext): TransactionContext {\n let finalContext = this._beforeNavigate?.({ ...updatedContext });\n\n // This block is to catch users not returning a transaction context\n if (!finalContext) {\n logger.error(\n `[${ReactNativeNavigationInstrumentation.name}] beforeNavigate returned ${finalContext}, return context.sampled = false to not send transaction.`,\n );\n\n finalContext = {\n ...updatedContext,\n sampled: false,\n };\n }\n\n if (finalContext.sampled === false) {\n logger.log(\n `[${ReactNativeNavigationInstrumentation.name}] Will not send transaction \"${finalContext.name}\" due to beforeNavigate.`,\n );\n }\n\n return finalContext;\n }\n\n /** Cancels the latest transaction so it does not get sent to Sentry. */\n private _discardLatestTransaction(): void {\n if (this._latestTransaction) {\n this._latestTransaction.sampled = false;\n this._latestTransaction.finish();\n this._latestTransaction = undefined;\n }\n\n this._clearStateChangeTimeout();\n }\n\n /** Cancels the latest transaction so it does not get sent to Sentry. */\n private _clearStateChangeTimeout(): void {\n if (typeof this._stateChangeTimeout !== 'undefined') {\n clearTimeout(this._stateChangeTimeout);\n this._stateChangeTimeout = undefined;\n }\n }\n}\n"]}
1
+ {"version":3,"file":"reactnativenavigation.js","sourceRoot":"","sources":["../../../src/js/tracing/reactnativenavigation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAIvC,OAAO,EAAE,8BAA8B,EAAE,MAAM,0BAA0B,CAAC;AAE1E,OAAO,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AAoBxG,MAAM,cAAc,GAAiC;IACnD,oBAAoB,EAAE,IAAI;IAC1B,yB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C,mBAAmB,KAAK,WAAW,EAAE;YACnD,YAAY,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;YACvC,IAAI,CAAC,mBAAmB,GAAG,SAAS,CAAC;SACtC;IACH,CAAC;;AAvKa,wDAAmB,GAAW,yBAAyB,CAAC","sourcesContent":["import type { Transaction as TransactionType, TransactionContext } from '@sentry/types';\nimport { logger } from '@sentry/utils';\n\nimport type { EmitterSubscription } from '../utils/rnlibrariesinterface';\nimport type { OnConfirmRoute, TransactionCreator } from './routingInstrumentation';\nimport { InternalRoutingInstrumentation } from './routingInstrumentation';\nimport type { BeforeNavigate, RouteChangeContextData } from './types';\nimport { customTransactionSource, defaultTransactionSource, getBlankTransactionContext } from './utils';\n\ninterface ReactNativeNavigationOptions {\n /**\n * How long the instrumentation will wait for the route to mount after a change has been initiated,\n * before the transaction is discarded.\n * Time is in ms.\n *\n * Default: 1000\n */\n routeChangeTimeoutMs: number;\n /**\n * Instrumentation will create a transaction on tab change.\n * By default only navigation commands create transactions.\n *\n * Default: true\n */\n enableTabsInstrumentation: boolean;\n}\n\nconst defaultOptions: ReactNativeNavigationOptions = {\n routeChangeTimeoutMs: 1000,\n enableTabsInstrumentation: true,\n};\n\ninterface ComponentEvent {\n componentId: string;\n}\n\ntype ComponentType = 'Component' | 'TopBarTitle' | 'TopBarBackground' | 'TopBarButton';\n\nexport interface ComponentWillAppearEvent extends ComponentEvent {\n componentName: string;\n passProps?: Record<string | number | symbol, unknown>;\n componentType: ComponentType;\n}\n\nexport interface EventSubscription {\n remove(): void;\n}\n\nexport interface BottomTabPressedEvent {\n tabIndex: number;\n}\n\nexport interface EventsRegistry {\n registerComponentWillAppearListener(callback: (event: ComponentWillAppearEvent) => void): EmitterSubscription;\n registerCommandListener(callback: (name: string, params: unknown) => void): EventSubscription;\n registerBottomTabPressedListener(callback: (event: BottomTabPressedEvent) => void): EmitterSubscription;\n}\n\nexport interface NavigationDelegate {\n events: () => EventsRegistry;\n}\n\n/**\n * Instrumentation for React Native Navigation. See docs or sample app for usage.\n *\n * How this works:\n * - `_onCommand` is called every time a commands happens and sets an IdleTransaction on the scope without any route context.\n * - `_onComponentWillAppear` is then called AFTER the state change happens due to a dispatch and sets the route context onto the active transaction.\n * - If `_onComponentWillAppear` isn't called within `options.routeChangeTimeoutMs` of the dispatch, then the transaction is not sampled and finished.\n */\nexport class ReactNativeNavigationInstrumentation extends InternalRoutingInstrumentation {\n public static instrumentationName: string = 'react-native-navigation';\n\n public readonly name: string = ReactNativeNavigationInstrumentation.instrumentationName;\n\n private _navigation: NavigationDelegate;\n private _options: ReactNativeNavigationOptions;\n\n private _prevComponentEvent: ComponentWillAppearEvent | null = null;\n\n private _latestTransaction?: TransactionType;\n private _recentComponentIds: string[] = [];\n private _stateChangeTimeout?: number | undefined;\n\n public constructor(\n /** The react native navigation `NavigationDelegate`. This is usually the import named `Navigation`. */\n navigation: unknown,\n options: Partial<ReactNativeNavigationOptions> = {},\n ) {\n super();\n\n this._navigation = navigation as NavigationDelegate;\n\n this._options = {\n ...defaultOptions,\n ...options,\n };\n }\n\n /**\n * Registers the event listeners for React Native Navigation\n */\n public registerRoutingInstrumentation(\n listener: TransactionCreator,\n beforeNavigate: BeforeNavigate,\n onConfirmRoute: OnConfirmRoute,\n ): void {\n super.registerRoutingInstrumentation(listener, beforeNavigate, onConfirmRoute);\n\n this._navigation.events().registerCommandListener(this._onNavigation.bind(this));\n\n if (this._options.enableTabsInstrumentation) {\n this._navigation.events().registerBottomTabPressedListener(this._onNavigation.bind(this));\n }\n\n this._navigation.events().registerComponentWillAppearListener(this._onComponentWillAppear.bind(this));\n }\n\n /**\n * To be called when a navigation is initiated. (Command, BottomTabSelected, etc.)\n */\n private _onNavigation(): void {\n if (this._latestTransaction) {\n this._discardLatestTransaction();\n }\n\n this._latestTransaction = this.onRouteWillChange(\n getBlankTransactionContext(ReactNativeNavigationInstrumentation.name),\n );\n\n this._stateChangeTimeout = setTimeout(\n this._discardLatestTransaction.bind(this),\n this._options.routeChangeTimeoutMs,\n );\n }\n\n /**\n * To be called AFTER the state has been changed to populate the transaction with the current route.\n */\n private _onComponentWillAppear(event: ComponentWillAppearEvent): void {\n if (!this._latestTransaction) {\n return;\n }\n\n // We ignore actions that pertain to the same screen.\n const isSameComponent = this._prevComponentEvent && event.componentId === this._prevComponentEvent.componentId;\n if (isSameComponent) {\n this._discardLatestTransaction();\n return;\n }\n\n this._clearStateChangeTimeout();\n\n const originalContext = this._latestTransaction.toContext();\n const routeHasBeenSeen = this._recentComponentIds.includes(event.componentId);\n\n const data: RouteChangeContextData = {\n ...originalContext.data,\n route: {\n ...event,\n name: event.componentName,\n hasBeenSeen: routeHasBeenSeen,\n },\n previousRoute: this._prevComponentEvent\n ? {\n ...this._prevComponentEvent,\n name: this._prevComponentEvent?.componentName,\n }\n : null,\n };\n\n const updatedContext = {\n ...originalContext,\n name: event.componentName,\n tags: {\n ...originalContext.tags,\n 'routing.route.name': event.componentName,\n },\n data,\n };\n\n const finalContext = this._prepareFinalContext(updatedContext);\n this._latestTransaction.updateWithContext(finalContext);\n\n const isCustomName = updatedContext.name !== finalContext.name;\n this._latestTransaction.setName(\n finalContext.name,\n isCustomName ? customTransactionSource : defaultTransactionSource,\n );\n\n this._onConfirmRoute?.(finalContext);\n this._prevComponentEvent = event;\n\n this._latestTransaction = undefined;\n }\n\n /** Creates final transaction context before confirmation */\n private _prepareFinalContext(updatedContext: TransactionContext): TransactionContext {\n let finalContext = this._beforeNavigate?.({ ...updatedContext });\n\n // This block is to catch users not returning a transaction context\n if (!finalContext) {\n logger.error(\n `[${ReactNativeNavigationInstrumentation.name}] beforeNavigate returned ${finalContext}, return context.sampled = false to not send transaction.`,\n );\n\n finalContext = {\n ...updatedContext,\n sampled: false,\n };\n }\n\n if (finalContext.sampled === false) {\n logger.log(\n `[${ReactNativeNavigationInstrumentation.name}] Will not send transaction \"${finalContext.name}\" due to beforeNavigate.`,\n );\n }\n\n return finalContext;\n }\n\n /** Cancels the latest transaction so it does not get sent to Sentry. */\n private _discardLatestTransaction(): void {\n if (this._latestTransaction) {\n this._latestTransaction.sampled = false;\n this._latestTransaction.finish();\n this._latestTransaction = undefined;\n }\n\n this._clearStateChangeTimeout();\n }\n\n /** Cancels the latest transaction so it does not get sent to Sentry. */\n private _clearStateChangeTimeout(): void {\n if (typeof this._stateChangeTimeout !== 'undefined') {\n clearTimeout(this._stateChangeTimeout);\n this._stateChangeTimeout = undefined;\n }\n }\n}\n"]}
@@ -5,7 +5,7 @@ export declare function isTurboModuleEnabled(): boolean;
5
5
  /** Checks if the React Native Fabric renderer is running */
6
6
  export declare function isFabricEnabled(): boolean;
7
7
  /** Returns React Native Version as semver string */
8
- export declare function getReactNativeVersion(): string;
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
11
  /** Returns Hermes Version if hermes is present in the runtime */
@@ -1 +1 @@
1
- {"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../../../src/js/utils/environment.ts"],"names":[],"mappings":"AAIA,0DAA0D;AAC1D,wBAAgB,eAAe,IAAI,OAAO,CAEzC;AAED,0DAA0D;AAC1D,wBAAgB,oBAAoB,IAAI,OAAO,CAE9C;AAED,4DAA4D;AAC5D,wBAAgB,eAAe,IAAI,OAAO,CAEzC;AAED,oDAAoD;AACpD,wBAAgB,qBAAqB,IAAI,MAAM,CAE9C;AAED,+CAA+C;AAC/C,wBAAgB,MAAM,IAAI,OAAO,CAEhC;AAED,iEAAiE;AACjE,wBAAgB,gBAAgB,IAAI,MAAM,GAAG,SAAS,CAMrD;AAED,mDAAmD;AACnD,wBAAgB,qBAAqB,IAAI,aAAa,GAAG,YAAY,CAEpE"}
1
+ {"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../../../src/js/utils/environment.ts"],"names":[],"mappings":"AAGA,0DAA0D;AAC1D,wBAAgB,eAAe,IAAI,OAAO,CAEzC;AAED,0DAA0D;AAC1D,wBAAgB,oBAAoB,IAAI,OAAO,CAE9C;AAED,4DAA4D;AAC5D,wBAAgB,eAAe,IAAI,OAAO,CAEzC;AAED,oDAAoD;AACpD,wBAAgB,qBAAqB,IAAI,MAAM,GAAG,SAAS,CAM1D;AAED,+CAA+C;AAC/C,wBAAgB,MAAM,IAAI,OAAO,CAEhC;AAED,iEAAiE;AACjE,wBAAgB,gBAAgB,IAAI,MAAM,GAAG,SAAS,CAMrD;AAED,mDAAmD;AACnD,wBAAgB,qBAAqB,IAAI,aAAa,GAAG,YAAY,CAEpE"}
@@ -1,5 +1,5 @@
1
- import { version as RNV } from 'react-native/Libraries/Core/ReactNativeVersion';
2
1
  import { RN_GLOBAL_OBJ } from '../utils/worldwide';
2
+ import { ReactNativeLibraries } from './rnlibraries';
3
3
  /** Checks if the React Native Hermes engine is running */
4
4
  export function isHermesEnabled() {
5
5
  return !!RN_GLOBAL_OBJ.HermesInternal;
@@ -14,6 +14,10 @@ export function isFabricEnabled() {
14
14
  }
15
15
  /** Returns React Native Version as semver string */
16
16
  export function getReactNativeVersion() {
17
+ if (!ReactNativeLibraries.ReactNativeVersion) {
18
+ return undefined;
19
+ }
20
+ const RNV = ReactNativeLibraries.ReactNativeVersion.version;
17
21
  return `${RNV.major}.${RNV.minor}.${RNV.patch}${RNV.prerelease != null ? `-${RNV.prerelease}` : ''}`;
18
22
  }
19
23
  /** Checks if Expo is present in the runtime */
@@ -1 +1 @@
1
- {"version":3,"file":"environment.js","sourceRoot":"","sources":["../../../src/js/utils/environment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,gDAAgD,CAAC;AAEhF,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,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,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 { version as RNV } from 'react-native/Libraries/Core/ReactNativeVersion';\n\nimport { RN_GLOBAL_OBJ } from '../utils/worldwide';\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 {\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,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"]}
@@ -0,0 +1,3 @@
1
+ import type { ReactNativeLibrariesInterface } from './rnlibrariesinterface';
2
+ export declare const ReactNativeLibraries: Required<ReactNativeLibrariesInterface>;
3
+ //# sourceMappingURL=rnlibraries.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rnlibraries.d.ts","sourceRoot":"","sources":["../../../src/js/utils/rnlibraries.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,wBAAwB,CAAC;AAE5E,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,6BAA6B,CA4BxE,CAAC"}
@@ -0,0 +1,29 @@
1
+ /* eslint-disable @typescript-eslint/no-var-requires */
2
+ import { version as RNV } from 'react-native/Libraries/Core/ReactNativeVersion';
3
+ export const ReactNativeLibraries = {
4
+ Devtools: {
5
+ parseErrorStack: (errorStack) => {
6
+ const parseErrorStack = require('react-native/Libraries/Core/Devtools/parseErrorStack');
7
+ return parseErrorStack(errorStack);
8
+ },
9
+ symbolicateStackTrace: (stack, extraData) => {
10
+ const symbolicateStackTrace = require('react-native/Libraries/Core/Devtools/symbolicateStackTrace');
11
+ return symbolicateStackTrace(stack, extraData);
12
+ },
13
+ getDevServer: () => {
14
+ const getDevServer = require('react-native/Libraries/Core/Devtools/getDevServer');
15
+ return getDevServer();
16
+ },
17
+ },
18
+ Promise: require('react-native/Libraries/Promise'),
19
+ Utilities: {
20
+ polyfillGlobal: (name, getValue) => {
21
+ const { polyfillGlobal } = require('react-native/Libraries/Utilities/PolyfillFunctions');
22
+ polyfillGlobal(name, getValue);
23
+ },
24
+ },
25
+ ReactNativeVersion: {
26
+ version: RNV,
27
+ },
28
+ };
29
+ //# sourceMappingURL=rnlibraries.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rnlibraries.js","sourceRoot":"","sources":["../../../src/js/utils/rnlibraries.ts"],"names":[],"mappings":"AAAA,uDAAuD;AAEvD,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,gDAAgD,CAAC;AAKhF,MAAM,CAAC,MAAM,oBAAoB,GAA4C;IAC3E,QAAQ,EAAE;QACR,eAAe,EAAE,CAAC,UAAkB,EAAiC,EAAE;YACrE,MAAM,eAAe,GAAG,OAAO,CAAC,sDAAsD,CAAC,CAAC;YACxF,OAAO,eAAe,CAAC,UAAU,CAAC,CAAC;QACrC,CAAC;QACD,qBAAqB,EAAE,CACrB,KAAoC,EACpC,SAAmC,EACU,EAAE;YAC/C,MAAM,qBAAqB,GAAG,OAAO,CAAC,4DAA4D,CAAC,CAAC;YACpG,OAAO,qBAAqB,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;QACjD,CAAC;QACD,YAAY,EAAE,GAA8B,EAAE;YAC5C,MAAM,YAAY,GAAG,OAAO,CAAC,mDAAmD,CAAC,CAAC;YAClF,OAAO,YAAY,EAAE,CAAC;QACxB,CAAC;KACF;IACD,OAAO,EAAE,OAAO,CAAC,gCAAgC,CAAC;IAClD,SAAS,EAAE;QACT,cAAc,EAAE,CAAI,IAAY,EAAE,QAAiB,EAAQ,EAAE;YAC3D,MAAM,EAAE,cAAc,EAAE,GAAG,OAAO,CAAC,oDAAoD,CAAC,CAAC;YACzF,cAAc,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QACjC,CAAC;KACF;IACD,kBAAkB,EAAE;QAClB,OAAO,EAAE,GAAG;KACb;CACF,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/no-var-requires */\n\nimport { version as RNV } from 'react-native/Libraries/Core/ReactNativeVersion';\n\nimport type * as ReactNative from '../vendor/react-native';\nimport type { ReactNativeLibrariesInterface } from './rnlibrariesinterface';\n\nexport const ReactNativeLibraries: Required<ReactNativeLibrariesInterface> = {\n Devtools: {\n parseErrorStack: (errorStack: string): Array<ReactNative.StackFrame> => {\n const parseErrorStack = require('react-native/Libraries/Core/Devtools/parseErrorStack');\n return parseErrorStack(errorStack);\n },\n symbolicateStackTrace: (\n stack: Array<ReactNative.StackFrame>,\n extraData?: Record<string, unknown>,\n ): Promise<ReactNative.SymbolicatedStackTrace> => {\n const symbolicateStackTrace = require('react-native/Libraries/Core/Devtools/symbolicateStackTrace');\n return symbolicateStackTrace(stack, extraData);\n },\n getDevServer: (): ReactNative.DevServerInfo => {\n const getDevServer = require('react-native/Libraries/Core/Devtools/getDevServer');\n return getDevServer();\n },\n },\n Promise: require('react-native/Libraries/Promise'),\n Utilities: {\n polyfillGlobal: <T>(name: string, getValue: () => T): void => {\n const { polyfillGlobal } = require('react-native/Libraries/Utilities/PolyfillFunctions');\n polyfillGlobal(name, getValue);\n },\n },\n ReactNativeVersion: {\n version: RNV,\n },\n};\n"]}
@@ -0,0 +1,3 @@
1
+ import type { ReactNativeLibrariesInterface } from './rnlibrariesinterface';
2
+ export declare const ReactNativeLibraries: ReactNativeLibrariesInterface;
3
+ //# sourceMappingURL=rnlibraries.web.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rnlibraries.web.d.ts","sourceRoot":"","sources":["../../../src/js/utils/rnlibraries.web.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,wBAAwB,CAAC;AAE5E,eAAO,MAAM,oBAAoB,EAAE,6BAAkC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export const ReactNativeLibraries = {};
2
+ //# sourceMappingURL=rnlibraries.web.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rnlibraries.web.js","sourceRoot":"","sources":["../../../src/js/utils/rnlibraries.web.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,oBAAoB,GAAkC,EAAE,CAAC","sourcesContent":["import type { ReactNativeLibrariesInterface } from './rnlibrariesinterface';\n\nexport const ReactNativeLibraries: ReactNativeLibrariesInterface = {};\n"]}
@@ -0,0 +1,19 @@
1
+ import type { version as RNV } from 'react-native/Libraries/Core/ReactNativeVersion';
2
+ import type * as ReactNative from '../vendor/react-native';
3
+ export type { UnsafeObject } from 'react-native/Libraries/Types/CodegenTypes';
4
+ export type { EmitterSubscription } from 'react-native/Libraries/vendor/emitter/EventEmitter';
5
+ export interface ReactNativeLibrariesInterface {
6
+ Devtools?: {
7
+ parseErrorStack: (errorStack: string) => Array<ReactNative.StackFrame>;
8
+ symbolicateStackTrace: (stack: Array<ReactNative.StackFrame>, extraData?: Record<string, unknown>) => Promise<ReactNative.SymbolicatedStackTrace>;
9
+ getDevServer: () => ReactNative.DevServerInfo;
10
+ };
11
+ Utilities?: {
12
+ polyfillGlobal: <T>(name: string, getValue: () => T) => void;
13
+ };
14
+ Promise?: typeof Promise;
15
+ ReactNativeVersion?: {
16
+ version: typeof RNV;
17
+ };
18
+ }
19
+ //# sourceMappingURL=rnlibrariesinterface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rnlibrariesinterface.d.ts","sourceRoot":"","sources":["../../../src/js/utils/rnlibrariesinterface.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,gDAAgD,CAAC;AAErF,OAAO,KAAK,KAAK,WAAW,MAAM,wBAAwB,CAAC;AAE3D,YAAY,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AAC9E,YAAY,EAAE,mBAAmB,EAAE,MAAM,oDAAoD,CAAC;AAE9F,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,EAAE;QACT,eAAe,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,KAAK,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;QACvE,qBAAqB,EAAE,CACrB,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,UAAU,CAAC,EACpC,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAChC,OAAO,CAAC,WAAW,CAAC,sBAAsB,CAAC,CAAC;QACjD,YAAY,EAAE,MAAM,WAAW,CAAC,aAAa,CAAC;KAC/C,CAAC;IACF,SAAS,CAAC,EAAE;QACV,cAAc,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,KAAK,IAAI,CAAC;KAC9D,CAAC;IACF,OAAO,CAAC,EAAE,OAAO,OAAO,CAAC;IACzB,kBAAkB,CAAC,EAAE;QACnB,OAAO,EAAE,OAAO,GAAG,CAAC;KACrB,CAAC;CACH"}
@@ -0,0 +1,8 @@
1
+ //
2
+ // This interface contains all of react-native internals Libraries used in Sentry RN SDK.
3
+ //
4
+ // Containing the internals in one place enables us to handle platforms
5
+ // that don't have all the internals available. For example react-native-web.
6
+ //
7
+ export {};
8
+ //# sourceMappingURL=rnlibrariesinterface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rnlibrariesinterface.js","sourceRoot":"","sources":["../../../src/js/utils/rnlibrariesinterface.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,yFAAyF;AACzF,EAAE;AACF,uEAAuE;AACvE,6EAA6E;AAC7E,EAAE","sourcesContent":["//\n// This interface contains all of react-native internals Libraries used in Sentry RN SDK.\n//\n// Containing the internals in one place enables us to handle platforms\n// that don't have all the internals available. For example react-native-web.\n//\n\nimport type { version as RNV } from 'react-native/Libraries/Core/ReactNativeVersion';\n\nimport type * as ReactNative from '../vendor/react-native';\n\nexport type { UnsafeObject } from 'react-native/Libraries/Types/CodegenTypes';\nexport type { EmitterSubscription } from 'react-native/Libraries/vendor/emitter/EventEmitter';\n\nexport interface ReactNativeLibrariesInterface {\n Devtools?: {\n parseErrorStack: (errorStack: string) => Array<ReactNative.StackFrame>;\n symbolicateStackTrace: (\n stack: Array<ReactNative.StackFrame>,\n extraData?: Record<string, unknown>,\n ) => Promise<ReactNative.SymbolicatedStackTrace>;\n getDevServer: () => ReactNative.DevServerInfo;\n };\n Utilities?: {\n polyfillGlobal: <T>(name: string, getValue: () => T) => void;\n };\n Promise?: typeof Promise;\n ReactNativeVersion?: {\n version: typeof RNV;\n };\n}\n"]}
@@ -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.15.1";
3
+ export declare const SDK_VERSION = "5.16.0-alpha.2";
4
4
  //# sourceMappingURL=version.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/js/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,6BAA6B,CAAC;AAC3D,eAAO,MAAM,QAAQ,mCAAmC,CAAC;AACzD,eAAO,MAAM,WAAW,WAAW,CAAC"}
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/js/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,6BAA6B,CAAC;AAC3D,eAAO,MAAM,QAAQ,mCAAmC,CAAC;AACzD,eAAO,MAAM,WAAW,mBAAmB,CAAC"}
@@ -1,4 +1,4 @@
1
1
  export const SDK_PACKAGE_NAME = 'npm:@sentry/react-native';
2
2
  export const SDK_NAME = 'sentry.javascript.react-native';
3
- export const SDK_VERSION = '5.15.1';
3
+ export const SDK_VERSION = '5.16.0-alpha.2';
4
4
  //# sourceMappingURL=version.js.map
@@ -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 = '5.15.1';\n"]}
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.2';\n"]}
package/expo.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './plugin/build';
package/expo.js ADDED
@@ -0,0 +1 @@
1
+ module.exports = require('./plugin/build');
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.15.1",
5
+ "version": "5.16.0-alpha.2",
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",
@@ -18,21 +18,24 @@
18
18
  },
19
19
  "main": "dist/js/index.js",
20
20
  "scripts": {
21
- "build": "yarn build:sdk && yarn downlevel && yarn build:tools",
21
+ "build": "yarn build:sdk && yarn downlevel && yarn build:tools && yarn build:plugin",
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:plugin": "EXPO_NONINTERACTIVE=true expo-module build plugin",
25
26
  "downlevel": "downlevel-dts dist ts3.8/dist --to=3.8",
26
- "clean": "rimraf dist coverage",
27
+ "clean": "rimraf dist coverage && yarn clean:plugin",
28
+ "clean:plugin": "expo-module clean plugin",
29
+ "circularDepCheck": "madge --circular dist/js/index.js && madge --circular metro.js && madge --circular expo.js",
27
30
  "test": "yarn test:sdk && yarn test:tools",
28
31
  "test:sdk": "jest",
29
32
  "test:tools": "jest --config jest.config.tools.js",
30
33
  "fix": "yarn fix:eslint && yarn fix:prettier",
31
34
  "fix:eslint": "eslint --config .eslintrc.js --fix .",
32
- "fix:prettier": "prettier --write \"{src,test,scripts}/**/**.ts\"",
35
+ "fix:prettier": "prettier --write \"{src,test,scripts,plugin/src}/**/**.ts\"",
33
36
  "lint": "yarn lint:eslint && yarn lint:prettier",
34
37
  "lint:eslint": "eslint --config .eslintrc.js .",
35
- "lint:prettier": "prettier --check \"{src,test,scripts}/**/**.ts\"",
38
+ "lint:prettier": "prettier --check \"{src,test,scripts,plugin/src}/**/**.ts\"",
36
39
  "test:watch": "jest --watch",
37
40
  "run-ios": "cd samples/react-native && yarn react-native run-ios",
38
41
  "run-android": "cd samples/react-native && yarn react-native run-android",
@@ -54,6 +57,7 @@
54
57
  "When bumping make sure to update the version of react, i.e: https://github.com/facebook/react-native/blob/v0.56.0/package.json"
55
58
  ],
56
59
  "peerDependencies": {
60
+ "expo": ">=49.0.0",
57
61
  "react": ">=17.0.0",
58
62
  "react-native": ">=0.65.0"
59
63
  },
@@ -68,6 +72,8 @@
68
72
  "@sentry/utils": "7.81.1"
69
73
  },
70
74
  "devDependencies": {
75
+ "@babel/core": "^7.23.5",
76
+ "@expo/metro-config": "^0.10.7",
71
77
  "@sentry-internal/eslint-config-sdk": "7.81.1",
72
78
  "@sentry-internal/eslint-plugin-sdk": "7.81.1",
73
79
  "@sentry-internal/typescript": "7.80.0",
@@ -82,12 +88,15 @@
82
88
  "eslint": "^7.6.0",
83
89
  "eslint-plugin-react": "^7.20.6",
84
90
  "eslint-plugin-react-native": "^3.8.1",
91
+ "expo": "^49.0.21",
92
+ "expo-module-scripts": "^3.1.0",
85
93
  "jest": "^29.6.2",
86
94
  "jest-environment-jsdom": "^29.6.2",
95
+ "madge": "^6.1.0",
87
96
  "metro": "0.76",
88
97
  "prettier": "^2.0.5",
89
98
  "react": "18.2.0",
90
- "react-native": "0.72.4",
99
+ "react-native": "0.72.6",
91
100
  "replace-in-file": "^7.0.1",
92
101
  "rimraf": "^4.1.1",
93
102
  "ts-jest": "^29.1.1",
@@ -110,5 +119,10 @@
110
119
  "android": {
111
120
  "javaPackageName": "io.sentry.react"
112
121
  }
122
+ },
123
+ "peerDependenciesMeta": {
124
+ "expo": {
125
+ "optional": true
126
+ }
113
127
  }
114
128
  }
@@ -0,0 +1,3 @@
1
+ import { withSentry } from './withSentry';
2
+ export { withSentry };
3
+ export default withSentry;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.withSentry = void 0;
4
+ const withSentry_1 = require("./withSentry");
5
+ Object.defineProperty(exports, "withSentry", { enumerable: true, get: function () { return withSentry_1.withSentry; } });
6
+ exports.default = withSentry_1.withSentry;
@@ -0,0 +1,7 @@
1
+ export declare function writeSentryPropertiesTo(filepath: string, sentryProperties: string): void;
2
+ declare const sdkPackage: {
3
+ name: string;
4
+ version: string;
5
+ };
6
+ declare const SDK_PACKAGE_NAME: string;
7
+ export { sdkPackage, SDK_PACKAGE_NAME };
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.SDK_PACKAGE_NAME = exports.sdkPackage = exports.writeSentryPropertiesTo = void 0;
27
+ const fs = __importStar(require("fs"));
28
+ const path = __importStar(require("path"));
29
+ function writeSentryPropertiesTo(filepath, sentryProperties) {
30
+ if (!fs.existsSync(filepath)) {
31
+ throw new Error(`Directory '${filepath}' does not exist.`);
32
+ }
33
+ fs.writeFileSync(path.resolve(filepath, 'sentry.properties'), sentryProperties);
34
+ }
35
+ exports.writeSentryPropertiesTo = writeSentryPropertiesTo;
36
+ const sdkPackage = require('../../package.json');
37
+ exports.sdkPackage = sdkPackage;
38
+ const SDK_PACKAGE_NAME = sdkPackage.name;
39
+ exports.SDK_PACKAGE_NAME = SDK_PACKAGE_NAME;
@@ -0,0 +1,10 @@
1
+ import type { ConfigPlugin } from 'expo/config-plugins';
2
+ interface PluginProps {
3
+ organization?: string;
4
+ project?: string;
5
+ authToken?: string;
6
+ url?: string;
7
+ }
8
+ export declare function getSentryProperties(props: PluginProps | void): string | null;
9
+ declare const withSentry: ConfigPlugin<void | PluginProps>;
10
+ export { withSentry };
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.withSentry = exports.getSentryProperties = void 0;
4
+ const config_plugins_1 = require("expo/config-plugins");
5
+ const utils_1 = require("./utils");
6
+ const withSentryAndroid_1 = require("./withSentryAndroid");
7
+ const withSentryIOS_1 = require("./withSentryIOS");
8
+ const withSentryPlugin = (config, props) => {
9
+ const sentryProperties = getSentryProperties(props);
10
+ let cfg = config;
11
+ if (sentryProperties !== null) {
12
+ try {
13
+ cfg = (0, withSentryAndroid_1.withSentryAndroid)(cfg, sentryProperties);
14
+ }
15
+ catch (e) {
16
+ config_plugins_1.WarningAggregator.addWarningAndroid(utils_1.SDK_PACKAGE_NAME, `There was a problem configuring sentry-expo in your native Android project: ${e}`);
17
+ }
18
+ try {
19
+ cfg = (0, withSentryIOS_1.withSentryIOS)(cfg, sentryProperties);
20
+ }
21
+ catch (e) {
22
+ config_plugins_1.WarningAggregator.addWarningIOS(utils_1.SDK_PACKAGE_NAME, `There was a problem configuring sentry-expo in your native iOS project: ${e}`);
23
+ }
24
+ }
25
+ return cfg;
26
+ };
27
+ const missingAuthTokenMessage = '# auth.token is configured through SENTRY_AUTH_TOKEN environment variable';
28
+ const missingProjectMessage = '# no project found, falling back to SENTRY_PROJECT environment variable';
29
+ const missingOrgMessage = '# no org found, falling back to SENTRY_ORG environment variable';
30
+ function getSentryProperties(props) {
31
+ const { organization, project, authToken, url = 'https://sentry.io/' } = props ?? {};
32
+ // eslint-disable-next-line no-prototype-builtins
33
+ const missingProperties = ['organization', 'project'].filter(each => !props?.hasOwnProperty(each));
34
+ if (missingProperties.length) {
35
+ const warningMessage = `Missing Sentry configuration properties: ${missingProperties.join(', ')} in config plugin. Builds will fall back to environment variables. See: https://docs.sentry.io/platforms/react-native/manual-setup/.`;
36
+ config_plugins_1.WarningAggregator.addWarningAndroid(utils_1.SDK_PACKAGE_NAME, warningMessage);
37
+ config_plugins_1.WarningAggregator.addWarningIOS(utils_1.SDK_PACKAGE_NAME, warningMessage);
38
+ }
39
+ return `defaults.url=${url}
40
+ ${organization ? `defaults.org=${organization}` : missingOrgMessage}
41
+ ${project ? `defaults.project=${project}` : missingProjectMessage}
42
+ ${authToken
43
+ ? `# Configure this value through \`SENTRY_AUTH_TOKEN\` environment variable instead. See: https://docs.sentry.io/platforms/react-native/manual-setup/\nauth.token=${authToken}`
44
+ : missingAuthTokenMessage}
45
+ `;
46
+ }
47
+ exports.getSentryProperties = getSentryProperties;
48
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
49
+ const withSentry = (0, config_plugins_1.createRunOncePlugin)(withSentryPlugin, utils_1.sdkPackage.name, utils_1.sdkPackage.version);
50
+ exports.withSentry = withSentry;
@@ -0,0 +1,7 @@
1
+ import type { ConfigPlugin } from 'expo/config-plugins';
2
+ export declare const withSentryAndroid: ConfigPlugin<string>;
3
+ /**
4
+ * Writes to projectDirectory/android/app/build.gradle,
5
+ * adding the relevant @sentry/react-native script.
6
+ */
7
+ export declare function modifyAppBuildGradle(buildGradle: string): string;
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.modifyAppBuildGradle = exports.withSentryAndroid = void 0;
27
+ const config_plugins_1 = require("expo/config-plugins");
28
+ const path = __importStar(require("path"));
29
+ const utils_1 = require("./utils");
30
+ const withSentryAndroid = (config, sentryProperties) => {
31
+ const cfg = (0, config_plugins_1.withAppBuildGradle)(config, config => {
32
+ if (config.modResults.language === 'groovy') {
33
+ config.modResults.contents = modifyAppBuildGradle(config.modResults.contents);
34
+ }
35
+ else {
36
+ throw new Error('Cannot configure Sentry in the app gradle because the build.gradle is not groovy');
37
+ }
38
+ return config;
39
+ });
40
+ return (0, config_plugins_1.withDangerousMod)(cfg, [
41
+ 'android',
42
+ config => {
43
+ (0, utils_1.writeSentryPropertiesTo)(path.resolve(config.modRequest.projectRoot, 'android'), sentryProperties);
44
+ return config;
45
+ },
46
+ ]);
47
+ };
48
+ exports.withSentryAndroid = withSentryAndroid;
49
+ const resolveSentryReactNativePackageJsonPath = '["node", "--print", "require(\'path\').dirname(require.resolve(\'@sentry/react-native/package.json\'))"].execute().text.trim()';
50
+ /**
51
+ * Writes to projectDirectory/android/app/build.gradle,
52
+ * adding the relevant @sentry/react-native script.
53
+ */
54
+ function modifyAppBuildGradle(buildGradle) {
55
+ if (buildGradle.includes('sentry.gradle')) {
56
+ return buildGradle;
57
+ }
58
+ // Use the same location that sentry-wizard uses
59
+ // See: https://github.com/getsentry/sentry-wizard/blob/e9b4522f27a852069c862bd458bdf9b07cab6e33/lib/Steps/Integrations/ReactNative.ts#L232
60
+ const pattern = /^android {/m;
61
+ if (!buildGradle.match(pattern)) {
62
+ config_plugins_1.WarningAggregator.addWarningAndroid(utils_1.SDK_PACKAGE_NAME, 'Could not find `^android {` in `android/app/build.gradle`. Please open a bug report at https://github.com/getsentry/sentry-react-native.');
63
+ return buildGradle;
64
+ }
65
+ const applyFrom = `apply from: new File(${resolveSentryReactNativePackageJsonPath}, "sentry.gradle")`;
66
+ return buildGradle.replace(pattern, match => `${applyFrom}\n\n${match}`);
67
+ }
68
+ exports.modifyAppBuildGradle = modifyAppBuildGradle;
@@ -0,0 +1,8 @@
1
+ import type { ConfigPlugin } from 'expo/config-plugins';
2
+ type BuildPhase = {
3
+ shellScript: string;
4
+ };
5
+ export declare const withSentryIOS: ConfigPlugin<string>;
6
+ export declare function modifyExistingXcodeBuildScript(script: BuildPhase): void;
7
+ export declare function addSentryWithBundledScriptsToBundleShellScript(script: string): string;
8
+ export {};