@sentry/react-native 5.9.1 → 5.9.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 (96) hide show
  1. package/CHANGELOG.md +21 -1
  2. package/RNSentry.podspec +1 -1
  3. package/android/build.gradle +1 -1
  4. package/dist/js/NativeRNSentry.d.ts +8 -8
  5. package/dist/js/NativeRNSentry.d.ts.map +1 -1
  6. package/dist/js/breadcrumb.d.ts +1 -1
  7. package/dist/js/breadcrumb.d.ts.map +1 -1
  8. package/dist/js/client.js.map +1 -1
  9. package/dist/js/integrations/debugsymbolicator.d.ts +1 -1
  10. package/dist/js/integrations/debugsymbolicator.d.ts.map +1 -1
  11. package/dist/js/integrations/debugsymbolicator.js +2 -2
  12. package/dist/js/integrations/debugsymbolicator.js.map +1 -1
  13. package/dist/js/integrations/devicecontext.js.map +1 -1
  14. package/dist/js/integrations/eventorigin.js.map +1 -1
  15. package/dist/js/integrations/release.js.map +1 -1
  16. package/dist/js/integrations/rewriteframes.d.ts.map +1 -1
  17. package/dist/js/integrations/rewriteframes.js +9 -1
  18. package/dist/js/integrations/rewriteframes.js.map +1 -1
  19. package/dist/js/integrations/sdkinfo.d.ts +1 -1
  20. package/dist/js/integrations/sdkinfo.d.ts.map +1 -1
  21. package/dist/js/measurements.d.ts +1 -1
  22. package/dist/js/measurements.d.ts.map +1 -1
  23. package/dist/js/misc.d.ts +1 -1
  24. package/dist/js/misc.d.ts.map +1 -1
  25. package/dist/js/misc.js.map +1 -1
  26. package/dist/js/options.d.ts +1 -2
  27. package/dist/js/options.d.ts.map +1 -1
  28. package/dist/js/options.js.map +1 -1
  29. package/dist/js/profiling/hermes.d.ts +2 -2
  30. package/dist/js/profiling/hermes.d.ts.map +1 -1
  31. package/dist/js/profiling/integration.d.ts +4 -1
  32. package/dist/js/profiling/integration.d.ts.map +1 -1
  33. package/dist/js/profiling/integration.js +20 -13
  34. package/dist/js/profiling/integration.js.map +1 -1
  35. package/dist/js/profiling/utils.js +1 -1
  36. package/dist/js/profiling/utils.js.map +1 -1
  37. package/dist/js/sdk.js +4 -4
  38. package/dist/js/sdk.js.map +1 -1
  39. package/dist/js/tools/ModulesCollector.js +8 -8
  40. package/dist/js/tools/ModulesCollector.js.map +1 -1
  41. package/dist/js/touchevents.d.ts +2 -2
  42. package/dist/js/touchevents.d.ts.map +1 -1
  43. package/dist/js/touchevents.js.map +1 -1
  44. package/dist/js/tracing/gesturetracing.js.map +1 -1
  45. package/dist/js/tracing/nativeframes.js.map +1 -1
  46. package/dist/js/tracing/reactnativenavigation.d.ts +1 -1
  47. package/dist/js/tracing/reactnativenavigation.d.ts.map +1 -1
  48. package/dist/js/tracing/reactnativenavigation.js.map +1 -1
  49. package/dist/js/tracing/reactnativetracing.d.ts.map +1 -1
  50. package/dist/js/tracing/reactnativetracing.js +4 -6
  51. package/dist/js/tracing/reactnativetracing.js.map +1 -1
  52. package/dist/js/tracing/reactnavigation.js.map +1 -1
  53. package/dist/js/tracing/reactnavigationv4.js.map +1 -1
  54. package/dist/js/tracing/routingInstrumentation.d.ts +2 -2
  55. package/dist/js/tracing/routingInstrumentation.d.ts.map +1 -1
  56. package/dist/js/tracing/routingInstrumentation.js.map +1 -1
  57. package/dist/js/tracing/stalltracking.d.ts +1 -1
  58. package/dist/js/tracing/stalltracking.d.ts.map +1 -1
  59. package/dist/js/tracing/stalltracking.js.map +1 -1
  60. package/dist/js/tracing/transaction.d.ts +1 -1
  61. package/dist/js/tracing/transaction.d.ts.map +1 -1
  62. package/dist/js/tracing/transaction.js.map +1 -1
  63. package/dist/js/tracing/types.d.ts +2 -2
  64. package/dist/js/tracing/types.d.ts.map +1 -1
  65. package/dist/js/transports/native.d.ts +1 -1
  66. package/dist/js/transports/native.d.ts.map +1 -1
  67. package/dist/js/user.d.ts +1 -1
  68. package/dist/js/user.d.ts.map +1 -1
  69. package/dist/js/utils/safe.d.ts +1 -1
  70. package/dist/js/utils/safe.d.ts.map +1 -1
  71. package/dist/js/version.d.ts +1 -1
  72. package/dist/js/version.js +1 -1
  73. package/dist/js/version.js.map +1 -1
  74. package/dist/js/wrapper.js +1 -1
  75. package/dist/js/wrapper.js.map +1 -1
  76. package/ios/RNSentry.mm +1 -1
  77. package/package.json +15 -15
  78. package/ts3.8/dist/js/NativeRNSentry.d.ts +8 -8
  79. package/ts3.8/dist/js/breadcrumb.d.ts +1 -1
  80. package/ts3.8/dist/js/integrations/debugsymbolicator.d.ts +1 -1
  81. package/ts3.8/dist/js/integrations/sdkinfo.d.ts +1 -1
  82. package/ts3.8/dist/js/measurements.d.ts +1 -1
  83. package/ts3.8/dist/js/misc.d.ts +1 -1
  84. package/ts3.8/dist/js/options.d.ts +1 -2
  85. package/ts3.8/dist/js/profiling/hermes.d.ts +2 -2
  86. package/ts3.8/dist/js/profiling/integration.d.ts +4 -1
  87. package/ts3.8/dist/js/touchevents.d.ts +2 -2
  88. package/ts3.8/dist/js/tracing/reactnativenavigation.d.ts +1 -1
  89. package/ts3.8/dist/js/tracing/routingInstrumentation.d.ts +2 -2
  90. package/ts3.8/dist/js/tracing/stalltracking.d.ts +1 -1
  91. package/ts3.8/dist/js/tracing/transaction.d.ts +1 -1
  92. package/ts3.8/dist/js/tracing/types.d.ts +2 -2
  93. package/ts3.8/dist/js/transports/native.d.ts +1 -1
  94. package/ts3.8/dist/js/user.d.ts +1 -1
  95. package/ts3.8/dist/js/utils/safe.d.ts +1 -1
  96. package/ts3.8/dist/js/version.d.ts +1 -1
package/CHANGELOG.md CHANGED
@@ -1,7 +1,27 @@
1
1
  # Changelog
2
2
 
3
+ ## 5.9.2
4
+
5
+ ### Fixes
6
+
7
+ - Create profiles for start up transactions ([#3281](https://github.com/getsentry/sentry-react-native/pull/3281))
8
+ - Fix Hermes Bytecode Symbolication one line off ([#3283](https://github.com/getsentry/sentry-react-native/pull/3283))
9
+
3
10
  ### Dependencies
4
11
 
12
+ - Bump CLI from v2.20.5 to v2.20.7 ([#3265](https://github.com/getsentry/sentry-react-native/pull/3265), [#3273](https://github.com/getsentry/sentry-react-native/pull/3273))
13
+ - [changelog](https://github.com/getsentry/sentry-cli/blob/master/CHANGELOG.md#2207)
14
+ - [diff](https://github.com/getsentry/sentry-cli/compare/2.20.5...2.20.7)
15
+ - Bump Cocoa SDK from v8.10.0 to v8.11.0 ([#3245](https://github.com/getsentry/sentry-react-native/pull/3245))
16
+ - [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8110)
17
+ - [diff](https://github.com/getsentry/sentry-cocoa/compare/8.10.0...8.11.0)
18
+ - Bump JavaScript SDK from v7.63.0 to v7.69.0 ([#3277](https://github.com/getsentry/sentry-react-native/pull/3277), [#3247](https://github.com/getsentry/sentry-react-native/pull/3247))
19
+ - [changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md#7690)
20
+ - [diff](https://github.com/getsentry/sentry-javascript/compare/7.63.0...7.69.0)
21
+ - Bump Android SDK from v6.28.0 to v6.29.0 ([#3271](https://github.com/getsentry/sentry-react-native/pull/3271))
22
+ - [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#6290)
23
+ - [diff](https://github.com/getsentry/sentry-java/compare/6.28.0...6.29.0)
24
+
5
25
  ## 5.9.1
6
26
 
7
27
  - Bump Cocoa SDK from v8.9.4 to v8.10.0 ([#3250](https://github.com/getsentry/sentry-react-native/pull/3250))
@@ -14,7 +34,7 @@
14
34
  ## Important Note
15
35
 
16
36
  **Do not use this version** if you use CocoaPods with `use_frameworks!` option. It introduces a bug where the project won't compile.
17
- This has been fixed in [version `5.9.1`](https://github.com/getsentry/sentry-cocoa/releases/tag/5.9.1).
37
+ This has been fixed in [version `5.9.1`](https://github.com/getsentry/sentry-react-native/releases/tag/5.9.1).
18
38
 
19
39
  ### Features
20
40
 
package/RNSentry.podspec CHANGED
@@ -24,7 +24,7 @@ Pod::Spec.new do |s|
24
24
  s.preserve_paths = '*.js'
25
25
 
26
26
  s.dependency 'React-Core'
27
- s.dependency 'Sentry/HybridSDK', '8.10.0'
27
+ s.dependency 'Sentry/HybridSDK', '8.11.0'
28
28
 
29
29
  s.source_files = 'ios/**/*.{h,mm}'
30
30
  s.public_header_files = 'ios/RNSentry.h'
@@ -47,5 +47,5 @@ android {
47
47
 
48
48
  dependencies {
49
49
  implementation 'com.facebook.react:react-native:+'
50
- api 'io.sentry:sentry-android:6.28.0'
50
+ api 'io.sentry:sentry-android:6.29.0'
51
51
  }
@@ -35,7 +35,7 @@ export interface Spec extends TurboModule {
35
35
  fetchNativePackageName(): Promise<string | undefined | null>;
36
36
  fetchNativeStackFramesBy(instructionsAddr: number[]): Promise<NativeStackFrames | undefined | null>;
37
37
  }
38
- export declare type NativeStackFrame = {
38
+ export type NativeStackFrame = {
39
39
  platform: string;
40
40
  /**
41
41
  * The instruction address of this frame.
@@ -61,7 +61,7 @@ export declare type NativeStackFrame = {
61
61
  */
62
62
  symbol_addr?: string;
63
63
  };
64
- export declare type NativeDebugImage = {
64
+ export type NativeDebugImage = {
65
65
  name?: string;
66
66
  type?: string;
67
67
  uuid?: string;
@@ -71,21 +71,21 @@ export declare type NativeDebugImage = {
71
71
  code_file?: string;
72
72
  image_vmaddr?: string;
73
73
  };
74
- export declare type NativeStackFrames = {
74
+ export type NativeStackFrames = {
75
75
  frames: NativeStackFrame[];
76
76
  debugMetaImages?: NativeDebugImage[];
77
77
  };
78
- export declare type NativeAppStartResponse = {
78
+ export type NativeAppStartResponse = {
79
79
  isColdStart: boolean;
80
80
  appStartTime: number;
81
81
  didFetchAppStart: boolean;
82
82
  };
83
- export declare type NativeFramesResponse = {
83
+ export type NativeFramesResponse = {
84
84
  totalFrames: number;
85
85
  slowFrames: number;
86
86
  frozenFrames: number;
87
87
  };
88
- export declare type NativeReleaseResponse = {
88
+ export type NativeReleaseResponse = {
89
89
  build: string;
90
90
  id: string;
91
91
  version: string;
@@ -95,7 +95,7 @@ export declare type NativeReleaseResponse = {
95
95
  * https://github.com/getsentry/sentry-cocoa/blob/master/Sources/Sentry/SentryScope.m
96
96
  * https://github.com/getsentry/sentry-java/blob/a461f7e125b65240004e6162b341f383ce2e1394/sentry-android-core/src/main/java/io/sentry/android/core/InternalSentrySdk.java#L32
97
97
  */
98
- export declare type NativeDeviceContextsResponse = {
98
+ export type NativeDeviceContextsResponse = {
99
99
  [key: string]: unknown;
100
100
  tags?: Record<string, string>;
101
101
  extra?: Record<string, unknown>;
@@ -121,7 +121,7 @@ export declare type NativeDeviceContextsResponse = {
121
121
  data?: Record<string, unknown>;
122
122
  }[];
123
123
  };
124
- export declare type NativeScreenshot = {
124
+ export type NativeScreenshot = {
125
125
  data: number[];
126
126
  contentType: string;
127
127
  filename: string;
@@ -1 +1 @@
1
- {"version":3,"file":"NativeRNSentry.d.ts","sourceRoot":"","sources":["../../src/js/NativeRNSentry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AAI9E,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,aAAa,CAAC,UAAU,EAAE,YAAY,GAAG,IAAI,CAAC;IAC9C,eAAe,CACb,KAAK,EAAE,MAAM,EAAE,EACf,OAAO,EAAE;QACP,KAAK,EAAE,OAAO,CAAC;KAChB,GACA,OAAO,CAAC,OAAO,CAAC,CAAC;IACpB,iBAAiB,IAAI,OAAO,CAAC,gBAAgB,EAAE,GAAG,SAAS,GAAG,IAAI,CAAC,CAAC;IACpE,gBAAgB,IAAI,IAAI,CAAC;IACzB,KAAK,IAAI,IAAI,CAAC;IACd,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAChC,2BAA2B,IAAI,IAAI,CAAC;IACpC,kBAAkB,IAAI,OAAO,CAAC,qBAAqB,CAAC,CAAC;IACrD,kBAAkB,IAAI,OAAO,CAAC,OAAO,GAA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,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAChC,CAAC;IACF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE;QACZ,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAChC,EAAE,CAAC;CACL,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;;AAGF,wBAAkE"}
@@ -1,6 +1,6 @@
1
1
  import type { Breadcrumb, SeverityLevel } from '@sentry/types';
2
2
  export declare const DEFAULT_BREADCRUMB_LEVEL: SeverityLevel;
3
- declare type BreadcrumbCandidate = {
3
+ type BreadcrumbCandidate = {
4
4
  [K in keyof Partial<Breadcrumb>]: unknown;
5
5
  };
6
6
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"breadcrumb.d.ts","sourceRoot":"","sources":["../../src/js/breadcrumb.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAG/D,eAAO,MAAM,wBAAwB,EAAE,aAAsB,CAAC;AAE9D,aAAK,mBAAmB,GAAG;KACxB,CAAC,IAAI,MAAM,OAAO,CAAC,UAAU,CAAC,GAAG,OAAO;CAC1C,CAAC;AAEF;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,mBAAmB,GAAG,UAAU,CA6B/E"}
1
+ {"version":3,"file":"breadcrumb.d.ts","sourceRoot":"","sources":["../../src/js/breadcrumb.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAG/D,eAAO,MAAM,wBAAwB,EAAE,aAAsB,CAAC;AAE9D,KAAK,mBAAmB,GAAG;KACxB,CAAC,IAAI,MAAM,OAAO,CAAC,UAAU,CAAC,GAAG,OAAO;CAC1C,CAAC;AAEF;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,mBAAmB,GAAG,UAAU,CA6B/E"}
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/js/client.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAa1C,OAAO,EAAE,sBAAsB,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5E,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAErC,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,0BAA0B,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC;;;;;GAKG;AACH,MAAM,OAAO,iBAAkB,SAAQ,UAAoC;IAGzE;;;OAGG;I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Aa,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;aAC/D;YAAC,OAAO,CAAC,EAAE;gBACV,IAAI,CAAC,wBAAwB,EAAE,CAAC;aACjC;oBAAS;gBACR,IAAI;oBACF,MAAA,MAAA,IAAI,CAAC,QAAQ,EAAC,OAAO,mDAAG,EAAE,iBAAiB,EAAE,EAAE;iBAChD;gBAAC,OAAO,KAAK,EAAE;oBACd,MAAM,CAAC,KAAK,CAAC,uCAAuC,EAAE,KAAK,CAAC,CAAC;iBAC9D;aACF;;KACF;IAED;;OAEG;IACK,wBAAwB;QAC9B,IAAI,OAAO,IAAI,IAAI,CAAC,QAAQ,CAAC,kBAAkB,EAAE;YAC/C,KAAK,CAAC,KAAK,CACT,QAAQ,EACR,qOAAqO,CACtO,CAAC;SACH;IACH,CAAC;IAED;;OAEG;IACK,qBAAqB,CAAC,QAAmB,EAAE,QAA8B;QAC/E,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE;YACvB,MAAM,gBAAgB,GAAqB;gBACzC,EAAE,IAAI,EAAE,eAAe,EAAE;gBACzB;oBACE,SAAS,EAAE,sBAAsB,EAAE;oBACnC,gBAAgB,EAAE,QAAQ;iBAC3B;aACF,CAAC;YAEF,QAAQ,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;SACxC;IACH,CAAC;CACF","sourcesContent":["import { eventFromException, eventFromMessage } from '@sentry/browser';\nimport { BaseClient } from '@sentry/core';\nimport type {\n ClientReportEnvelope,\n ClientReportItem,\n Envelope,\n Event,\n EventHint,\n Exception,\n Outcome,\n SeverityLevel,\n Thread,\n UserFeedback,\n} from '@sentry/types';\nimport { dateTimestampInSeconds, logger, SentryError } from '@sentry/utils';\nimport { Alert } from 'react-native';\n\nimport { createIntegration } from './integrations/factory';\nimport { Screenshot } from './integrations/screenshot';\nimport { defaultSdkInfo } from './integrations/sdkinfo';\nimport type { ReactNativeClientOptions } from './options';\nimport { ReactNativeTracing } from './tracing';\nimport { createUserFeedbackEnvelope, items } from './utils/envelope';\nimport { ignoreRequireCycleLogs } from './utils/ignorerequirecyclelogs';\nimport { mergeOutcomes } from './utils/outcome';\nimport { NATIVE } from './wrapper';\n\n/**\n * The Sentry React Native SDK Client.\n *\n * @see ReactNativeClientOptions for documentation on configuration options.\n * @see SentryClient for usage documentation.\n */\nexport class ReactNativeClient extends BaseClient<ReactNativeClientOptions> {\n private _outcomesBuffer: Outcome[];\n\n /**\n * Creates a new React Native SDK instance.\n * @param options Configuration options for this SDK.\n */\n public constructor(options: ReactNativeClientOptions) {\n ignoreRequireCycleLogs();\n options._metadata = options._metadata || {};\n options._metadata.sdk = options._metadata.sdk || defaultSdkInfo;\n super(options);\n\n this._outcomesBuffer = [];\n void this._initNativeSdk();\n }\n\n /**\n * @inheritDoc\n */\n public eventFromException(exception: unknown, hint: EventHint = {}): PromiseLike<Event> {\n return Screenshot.attachScreenshotToEventHint(hint, this._options).then(hintWithScreenshot =>\n eventFromException(this._options.stackParser, exception, hintWithScreenshot, this._options.attachStacktrace),\n );\n }\n\n /**\n * @inheritDoc\n */\n public eventFromMessage(message: string, level?: SeverityLevel, hint?: EventHint): PromiseLike<Event> {\n return eventFromMessage(this._options.stackParser, message, level, hint, this._options.attachStacktrace).then(\n (event: Event) => {\n // TMP! Remove this function once JS SDK uses threads for messages\n if (!event.exception?.values || event.exception.values.length <= 0) {\n return event;\n }\n const values = event.exception.values.map(\n (exception: Exception): Thread => ({\n stacktrace: exception.stacktrace,\n }),\n );\n (event as { threads?: { values: Thread[] } }).threads = { values };\n delete event.exception;\n return event;\n },\n );\n }\n\n /**\n * If native client is available it will trigger a native crash.\n * Use this only for testing purposes.\n */\n public nativeCrash(): void {\n NATIVE.nativeCrash();\n }\n\n /**\n * @inheritDoc\n */\n public close(): PromiseLike<boolean> {\n // As super.close() flushes queued events, we wait for that to finish before closing the native SDK.\n return super.close().then((result: boolean) => {\n return NATIVE.closeNativeSdk().then(() => result) as PromiseLike<boolean>;\n });\n }\n\n /**\n * Sends user feedback to Sentry.\n */\n public captureUserFeedback(feedback: UserFeedback): void {\n const envelope = createUserFeedbackEnvelope(feedback, {\n metadata: this._options._metadata,\n dsn: this.getDsn(),\n tunnel: this._options.tunnel,\n });\n this._sendEnvelope(envelope);\n }\n\n /**\n * Sets up the integrations\n */\n public setupIntegrations(): void {\n super.setupIntegrations();\n const tracing = this.getIntegration(ReactNativeTracing);\n const routingName = tracing?.options.routingInstrumentation?.name;\n if (routingName) {\n this.addIntegration(createIntegration(routingName));\n }\n const enableUserInteractionTracing = tracing?.options.enableUserInteractionTracing;\n if (enableUserInteractionTracing) {\n this.addIntegration(createIntegration('ReactNativeUserInteractionTracing'));\n }\n }\n\n /**\n * @inheritdoc\n */\n protected _sendEnvelope(envelope: Envelope): void {\n const outcomes = this._clearOutcomes();\n this._outcomesBuffer = mergeOutcomes(this._outcomesBuffer, outcomes);\n\n if (this._options.sendClientReports) {\n this._attachClientReportTo(this._outcomesBuffer, envelope as ClientReportEnvelope);\n }\n\n let shouldClearOutcomesBuffer = true;\n if (this._transport && this._dsn) {\n this.emit('beforeEnvelope', envelope);\n\n this._transport.send(envelope).then(null, reason => {\n if (reason instanceof SentryError) {\n // SentryError is thrown by SyncPromise\n shouldClearOutcomesBuffer = false;\n // If this is called asynchronously we want the _outcomesBuffer to be cleared\n logger.error('SentryError while sending event, keeping outcomes buffer:', reason);\n } else {\n logger.error('Error while sending event:', reason);\n }\n });\n } else {\n logger.error('Transport disabled');\n }\n\n if (shouldClearOutcomesBuffer) {\n this._outcomesBuffer = []; // if send fails synchronously the _outcomesBuffer will stay intact\n }\n }\n\n /**\n * Starts native client with dsn and options\n */\n private async _initNativeSdk(): Promise<void> {\n let didCallNativeInit = false;\n\n try {\n didCallNativeInit = await NATIVE.initNativeSdk(this._options);\n } catch (_) {\n this._showCannotConnectDialog();\n } finally {\n try {\n this._options.onReady?.({ didCallNativeInit });\n } catch (error) {\n logger.error('The OnReady callback threw an error: ', error);\n }\n }\n }\n\n /**\n * If the user is in development mode, and the native nagger is enabled then it will show an alert.\n */\n private _showCannotConnectDialog(): void {\n if (__DEV__ && this._options.enableNativeNagger) {\n Alert.alert(\n 'Sentry',\n 'Warning, could not connect to Sentry native SDK.\\nIf you do not want to use the native component please pass `enableNative: false` in the options.\\nVisit: https://docs.sentry.io/platforms/react-native/#linking for more details.',\n );\n }\n }\n\n /**\n * Attaches a client report from outcomes to the envelope.\n */\n private _attachClientReportTo(outcomes: Outcome[], envelope: ClientReportEnvelope): void {\n if (outcomes.length > 0) {\n const clientReportItem: ClientReportItem = [\n { type: 'client_report' },\n {\n timestamp: dateTimestampInSeconds(),\n discarded_events: outcomes,\n },\n ];\n\n envelope[items].push(clientReportItem);\n }\n }\n}\n"]}
1
+ {"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/js/client.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAa1C,OAAO,EAAE,sBAAsB,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5E,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAErC,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,0BAA0B,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC;;;;;GAKG;AACH,MAAM,OAA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CAAC;YAE9B,IAAI;gBACF,iBAAiB,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;aAC/D;YAAC,OAAO,CAAC,EAAE;gBACV,IAAI,CAAC,wBAAwB,EAAE,CAAC;aACjC;oBAAS;gBACR,IAAI;oBACF,MAAA,MAAA,IAAI,CAAC,QAAQ,EAAC,OAAO,mDAAG,EAAE,iBAAiB,EAAE,CAAC,CAAC;iBAChD;gBAAC,OAAO,KAAK,EAAE;oBACd,MAAM,CAAC,KAAK,CAAC,uCAAuC,EAAE,KAAK,CAAC,CAAC;iBAC9D;aACF;;KACF;IAED;;OAEG;IACK,wBAAwB;QAC9B,IAAI,OAAO,IAAI,IAAI,CAAC,QAAQ,CAAC,kBAAkB,EAAE;YAC/C,KAAK,CAAC,KAAK,CACT,QAAQ,EACR,qOAAqO,CACtO,CAAC;SACH;IACH,CAAC;IAED;;OAEG;IACK,qBAAqB,CAAC,QAAmB,EAAE,QAA8B;QAC/E,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE;YACvB,MAAM,gBAAgB,GAAqB;gBACzC,EAAE,IAAI,EAAE,eAAe,EAAE;gBACzB;oBACE,SAAS,EAAE,sBAAsB,EAAE;oBACnC,gBAAgB,EAAE,QAAQ;iBAC3B;aACF,CAAC;YAEF,QAAQ,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;SACxC;IACH,CAAC;CACF","sourcesContent":["import { eventFromException, eventFromMessage } from '@sentry/browser';\nimport { BaseClient } from '@sentry/core';\nimport type {\n ClientReportEnvelope,\n ClientReportItem,\n Envelope,\n Event,\n EventHint,\n Exception,\n Outcome,\n SeverityLevel,\n Thread,\n UserFeedback,\n} from '@sentry/types';\nimport { dateTimestampInSeconds, logger, SentryError } from '@sentry/utils';\nimport { Alert } from 'react-native';\n\nimport { createIntegration } from './integrations/factory';\nimport { Screenshot } from './integrations/screenshot';\nimport { defaultSdkInfo } from './integrations/sdkinfo';\nimport type { ReactNativeClientOptions } from './options';\nimport { ReactNativeTracing } from './tracing';\nimport { createUserFeedbackEnvelope, items } from './utils/envelope';\nimport { ignoreRequireCycleLogs } from './utils/ignorerequirecyclelogs';\nimport { mergeOutcomes } from './utils/outcome';\nimport { NATIVE } from './wrapper';\n\n/**\n * The Sentry React Native SDK Client.\n *\n * @see ReactNativeClientOptions for documentation on configuration options.\n * @see SentryClient for usage documentation.\n */\nexport class ReactNativeClient extends BaseClient<ReactNativeClientOptions> {\n private _outcomesBuffer: Outcome[];\n\n /**\n * Creates a new React Native SDK instance.\n * @param options Configuration options for this SDK.\n */\n public constructor(options: ReactNativeClientOptions) {\n ignoreRequireCycleLogs();\n options._metadata = options._metadata || {};\n options._metadata.sdk = options._metadata.sdk || defaultSdkInfo;\n super(options);\n\n this._outcomesBuffer = [];\n void this._initNativeSdk();\n }\n\n /**\n * @inheritDoc\n */\n public eventFromException(exception: unknown, hint: EventHint = {}): PromiseLike<Event> {\n return Screenshot.attachScreenshotToEventHint(hint, this._options).then(hintWithScreenshot =>\n eventFromException(this._options.stackParser, exception, hintWithScreenshot, this._options.attachStacktrace),\n );\n }\n\n /**\n * @inheritDoc\n */\n public eventFromMessage(message: string, level?: SeverityLevel, hint?: EventHint): PromiseLike<Event> {\n return eventFromMessage(this._options.stackParser, message, level, hint, this._options.attachStacktrace).then(\n (event: Event) => {\n // TMP! Remove this function once JS SDK uses threads for messages\n if (!event.exception?.values || event.exception.values.length <= 0) {\n return event;\n }\n const values = event.exception.values.map(\n (exception: Exception): Thread => ({\n stacktrace: exception.stacktrace,\n }),\n );\n (event as { threads?: { values: Thread[] } }).threads = { values };\n delete event.exception;\n return event;\n },\n );\n }\n\n /**\n * If native client is available it will trigger a native crash.\n * Use this only for testing purposes.\n */\n public nativeCrash(): void {\n NATIVE.nativeCrash();\n }\n\n /**\n * @inheritDoc\n */\n public close(): PromiseLike<boolean> {\n // As super.close() flushes queued events, we wait for that to finish before closing the native SDK.\n return super.close().then((result: boolean) => {\n return NATIVE.closeNativeSdk().then(() => result) as PromiseLike<boolean>;\n });\n }\n\n /**\n * Sends user feedback to Sentry.\n */\n public captureUserFeedback(feedback: UserFeedback): void {\n const envelope = createUserFeedbackEnvelope(feedback, {\n metadata: this._options._metadata,\n dsn: this.getDsn(),\n tunnel: this._options.tunnel,\n });\n this._sendEnvelope(envelope);\n }\n\n /**\n * Sets up the integrations\n */\n public setupIntegrations(): void {\n super.setupIntegrations();\n const tracing = this.getIntegration(ReactNativeTracing);\n const routingName = tracing?.options.routingInstrumentation?.name;\n if (routingName) {\n this.addIntegration(createIntegration(routingName));\n }\n const enableUserInteractionTracing = tracing?.options.enableUserInteractionTracing;\n if (enableUserInteractionTracing) {\n this.addIntegration(createIntegration('ReactNativeUserInteractionTracing'));\n }\n }\n\n /**\n * @inheritdoc\n */\n protected _sendEnvelope(envelope: Envelope): void {\n const outcomes = this._clearOutcomes();\n this._outcomesBuffer = mergeOutcomes(this._outcomesBuffer, outcomes);\n\n if (this._options.sendClientReports) {\n this._attachClientReportTo(this._outcomesBuffer, envelope as ClientReportEnvelope);\n }\n\n let shouldClearOutcomesBuffer = true;\n if (this._transport && this._dsn) {\n this.emit('beforeEnvelope', envelope);\n\n this._transport.send(envelope).then(null, reason => {\n if (reason instanceof SentryError) {\n // SentryError is thrown by SyncPromise\n shouldClearOutcomesBuffer = false;\n // If this is called asynchronously we want the _outcomesBuffer to be cleared\n logger.error('SentryError while sending event, keeping outcomes buffer:', reason);\n } else {\n logger.error('Error while sending event:', reason);\n }\n });\n } else {\n logger.error('Transport disabled');\n }\n\n if (shouldClearOutcomesBuffer) {\n this._outcomesBuffer = []; // if send fails synchronously the _outcomesBuffer will stay intact\n }\n }\n\n /**\n * Starts native client with dsn and options\n */\n private async _initNativeSdk(): Promise<void> {\n let didCallNativeInit = false;\n\n try {\n didCallNativeInit = await NATIVE.initNativeSdk(this._options);\n } catch (_) {\n this._showCannotConnectDialog();\n } finally {\n try {\n this._options.onReady?.({ didCallNativeInit });\n } catch (error) {\n logger.error('The OnReady callback threw an error: ', error);\n }\n }\n }\n\n /**\n * If the user is in development mode, and the native nagger is enabled then it will show an alert.\n */\n private _showCannotConnectDialog(): void {\n if (__DEV__ && this._options.enableNativeNagger) {\n Alert.alert(\n 'Sentry',\n 'Warning, could not connect to Sentry native SDK.\\nIf you do not want to use the native component please pass `enableNative: false` in the options.\\nVisit: https://docs.sentry.io/platforms/react-native/#linking for more details.',\n );\n }\n }\n\n /**\n * Attaches a client report from outcomes to the envelope.\n */\n private _attachClientReportTo(outcomes: Outcome[], envelope: ClientReportEnvelope): void {\n if (outcomes.length > 0) {\n const clientReportItem: ClientReportItem = [\n { type: 'client_report' },\n {\n timestamp: dateTimestampInSeconds(),\n discarded_events: outcomes,\n },\n ];\n\n envelope[items].push(clientReportItem);\n }\n }\n}\n"]}
@@ -2,7 +2,7 @@ import type { Integration } from '@sentry/types';
2
2
  /**
3
3
  * React Native Error
4
4
  */
5
- export declare type ReactNativeError = Error & {
5
+ export type ReactNativeError = Error & {
6
6
  framesToPop?: number;
7
7
  jsEngine?: string;
8
8
  preventSymbolication?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"debugsymbolicator.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/debugsymbolicator.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAoB,WAAW,EAAc,MAAM,eAAe,CAAC;AAoB/E;;GAEG;AACH,oBAAY,gBAAgB,GAAG,KAAK,GAAG;IACrC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,6DAA6D;AAC7D,qBAAa,iBAAkB,YAAW,WAAW;IACnD;;OAEG;IACH,OAAc,EAAE,EAAE,MAAM,CAAuB;IAC/C;;OAEG;IACI,IAAI,EAAE,MAAM,CAAwB;IAE3C;;OAEG;IACI,SAAS,IAAI,IAAI;IA6BxB;;;OAGG;YACW,YAAY;IAiC1B;;;OAGG;YACW,uCAAuC;IA+CrD;;;;OAIG;IACH,OAAO,CAAC,qBAAqB;IAW7B;;;;;OAKG;YACW,iBAAiB;CA0BhC"}
1
+ {"version":3,"file":"debugsymbolicator.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/debugsymbolicator.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAoB,WAAW,EAAc,MAAM,eAAe,CAAC;AAoB/E;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG;IACrC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,6DAA6D;AAC7D,qBAAa,iBAAkB,YAAW,WAAW;IACnD;;OAEG;IACH,OAAc,EAAE,EAAE,MAAM,CAAuB;IAC/C;;OAEG;IACI,IAAI,EAAE,MAAM,CAAwB;IAE3C;;OAEG;IACI,SAAS,IAAI,IAAI;IA6BxB;;;OAGG;YACW,YAAY;IAiC1B;;;OAGG;YACW,uCAAuC;IA+CrD;;;;OAIG;IACH,OAAO,CAAC,qBAAqB;IAW7B;;;;;OAKG;YACW,iBAAiB;CA0BhC"}
@@ -99,7 +99,7 @@ export class DebugSymbolicator {
99
99
  function: frame.methodName,
100
100
  in_app: inApp,
101
101
  lineno: inApp ? frame.lineNumber : undefined,
102
- platform: inApp ? 'javascript' : 'node',
102
+ platform: inApp ? 'javascript' : 'node', // :HACK
103
103
  };
104
104
  // The upstream `react-native@0.61` delegates parsing of stacks to `stacktrace-parser`, which is buggy and
105
105
  // leaves a trailing `(address at` in the function name.
@@ -108,7 +108,7 @@ export class DebugSymbolicator {
108
108
  if (newFrame.function) {
109
109
  const addressAtPos = newFrame.function.indexOf('(address at');
110
110
  if (addressAtPos >= 0) {
111
- newFrame.function = newFrame.function.substr(0, addressAtPos).trim();
111
+ newFrame.function = newFrame.function.substring(0, addressAtPos).trim();
112
112
  }
113
113
  }
114
114
  if (inApp) {
@@ -1 +1 @@
1
- {"version":3,"file":"debugsymbolicator.js","sourceRoot":"","sources":["../../../src/js/integrations/debugsymbolicator.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,uBAAuB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAEtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAE1D,MAAM,wBAAwB,GAAG,IAAI,MAAM,CAAC,CAAC,+BAA+B,EAAE,oBAAoB,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AA2B/G,6DAA6D;AAC7D,MAAM,OAAO,iBAAiB;IAA9B;QAKE;;WAEG;QACI,SAAI,GAAW,iBAAiB,CAAC,EAAE,CAAC;IA0K7C,CAAC;IAxKC;;OAEG;IACI,SAAS;QACd,uBAAuB,CAAC,CAAO,KAAY,EAAE,IAAgB,EAAE,EAAE;YAC/D,MAAM,IAAI,GAAG,aAAa,EAAE,CAAC,cAAc,CAAC,iBAAiB,CAAC,CAAC;YAE/D,IAAI,CAAC,IAAI,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,CAAC,iBAAiB,KAAK,SAAS,EAAE;gBACvE,OAAO,KAAK,CAAC;aACd;YAED,MAAM,UAAU,GAAG,IAAI,CAAC,iBAAqC,CAAC;YAE9D,8DAA8D;YAC9D,MAAM,eAAe,GAAG,OAAO,CAAC,sDAAsD,CAAC,CAAC;YAExF,IAAI,KAAK,CAAC;YACV,IAAI;gBACF,KAAK,GAAG,eAAe,CAAC,UAAU,CAAC,CAAC;aACrC;YAAC,OAAO,CAAC,EAAE;gBACV,uDAAuD;gBACvD,KAAK,GAAG,eAAe,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;aAC3C;YAED,MAAM,IAAI,CAAC,YAAY,CAA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AAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;gBACtC,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;gBAElC,iBAAiB,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;aACjC;;KACF;;AAhLD;;GAEG;AACW,oBAAE,GAAW,mBAAmB,CAAC","sourcesContent":["import { addGlobalEventProcessor, getCurrentHub } from '@sentry/core';\nimport type { Event, EventHint, Integration, StackFrame } from '@sentry/types';\nimport { addContextToFrame, logger } from '@sentry/utils';\n\nconst INTERNAL_CALLSITES_REGEX = new RegExp(['ReactNativeRenderer-dev\\\\.js$', 'MessageQueue\\\\.js$'].join('|'));\n\ninterface GetDevServer {\n (): { url: string };\n}\n\n/**\n * React Native Stack Frame\n */\ninterface ReactNativeFrame {\n // arguments: []\n column: number;\n file: string;\n lineNumber: number;\n methodName: string;\n}\n\n/**\n * React Native Error\n */\nexport type ReactNativeError = Error & {\n framesToPop?: number;\n jsEngine?: string;\n preventSymbolication?: boolean;\n componentStack?: string;\n};\n\n/** Tries to symbolicate the JS stack trace on the device. */\nexport class DebugSymbolicator implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'DebugSymbolicator';\n /**\n * @inheritDoc\n */\n public name: string = DebugSymbolicator.id;\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n addGlobalEventProcessor(async (event: Event, hint?: EventHint) => {\n const self = getCurrentHub().getIntegration(DebugSymbolicator);\n\n if (!self || hint === undefined || hint.originalException === undefined) {\n return event;\n }\n\n const reactError = hint.originalException as ReactNativeError;\n\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const parseErrorStack = require('react-native/Libraries/Core/Devtools/parseErrorStack');\n\n let stack;\n try {\n stack = parseErrorStack(reactError);\n } catch (e) {\n // In RN 0.64 `parseErrorStack` now only takes a string\n stack = parseErrorStack(reactError.stack);\n }\n\n await self._symbolicate(event, stack);\n\n event.platform = 'node'; // Setting platform node makes sure we do not show source maps errors\n\n return event;\n });\n }\n\n /**\n * Symbolicates the stack on the device talking to local dev server.\n * Mutates the passed event.\n */\n private async _symbolicate(event: Event, stack: string | undefined): Promise<void> {\n try {\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const symbolicateStackTrace = require('react-native/Libraries/Core/Devtools/symbolicateStackTrace');\n const prettyStack = await symbolicateStackTrace(stack);\n\n if (prettyStack) {\n let newStack = prettyStack;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (prettyStack.stack) {\n // This has been changed in an react-native version so stack is contained in here\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n newStack = prettyStack.stack;\n }\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n const stackWithoutInternalCallsites = newStack.filter(\n (frame: { file?: string }) =>\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n frame.file && frame.file.match(INTERNAL_CALLSITES_REGEX) === null,\n );\n\n const symbolicatedFrames = await this._convertReactNativeFramesToSentryFrames(stackWithoutInternalCallsites);\n this._replaceFramesInEvent(event, symbolicatedFrames);\n } else {\n logger.error('The stack is null');\n }\n } catch (error) {\n if (error instanceof Error) {\n logger.warn(`Unable to symbolicate stack trace: ${error.message}`);\n }\n }\n }\n\n /**\n * Converts ReactNativeFrames to frames in the Sentry format\n * @param frames ReactNativeFrame[]\n */\n private async _convertReactNativeFramesToSentryFrames(frames: ReactNativeFrame[]): Promise<StackFrame[]> {\n let getDevServer: GetDevServer;\n try {\n getDevServer = require('react-native/Libraries/Core/Devtools/getDevServer');\n } catch (_oO) {\n // We can't load devserver URL\n }\n // Below you will find lines marked with :HACK to prevent showing errors in the sentry ui\n // But since this is a debug only feature: This is Fine (TM)\n return Promise.all(\n frames.map(async (frame: ReactNativeFrame): Promise<StackFrame> => {\n let inApp = !!frame.column && !!frame.lineNumber;\n inApp =\n inApp &&\n frame.file !== undefined &&\n !frame.file.includes('node_modules') &&\n !frame.file.includes('native code');\n\n const newFrame: StackFrame = {\n colno: frame.column,\n filename: frame.file,\n function: frame.methodName,\n in_app: inApp,\n lineno: inApp ? frame.lineNumber : undefined, // :HACK\n platform: inApp ? 'javascript' : 'node', // :HACK\n };\n\n // The upstream `react-native@0.61` delegates parsing of stacks to `stacktrace-parser`, which is buggy and\n // leaves a trailing `(address at` in the function name.\n // `react-native@0.62` seems to have custom logic to parse hermes frames specially.\n // Anyway, all we do here is throw away the bogus suffix.\n if (newFrame.function) {\n const addressAtPos = newFrame.function.indexOf('(address at');\n if (addressAtPos >= 0) {\n newFrame.function = newFrame.function.substr(0, addressAtPos).trim();\n }\n }\n\n if (inApp) {\n await this._addSourceContext(newFrame, getDevServer);\n }\n\n return newFrame;\n }),\n );\n }\n\n /**\n * Replaces the frames in the exception of a error.\n * @param event Event\n * @param frames StackFrame[]\n */\n private _replaceFramesInEvent(event: Event, frames: StackFrame[]): void {\n if (\n event.exception &&\n event.exception.values &&\n event.exception.values[0] &&\n event.exception.values[0].stacktrace\n ) {\n event.exception.values[0].stacktrace.frames = frames.reverse();\n }\n }\n\n /**\n * This tries to add source context for in_app Frames\n *\n * @param frame StackFrame\n * @param getDevServer function from RN to get DevServer URL\n */\n private async _addSourceContext(frame: StackFrame, getDevServer?: GetDevServer): Promise<void> {\n let response;\n\n const segments = frame.filename?.split('/') ?? [];\n\n if (getDevServer) {\n for (const idx in segments) {\n if (Object.prototype.hasOwnProperty.call(segments, idx)) {\n response = await fetch(`${getDevServer().url}${segments.slice(-idx).join('/')}`, {\n method: 'GET',\n });\n\n if (response.ok) {\n break;\n }\n }\n }\n }\n\n if (response && response.ok) {\n const content = await response.text();\n const lines = content.split('\\n');\n\n addContextToFrame(lines, frame);\n }\n }\n}\n"]}
1
+ {"version":3,"file":"debugsymbolicator.js","sourceRoot":"","sources":["../../../src/js/integrations/debugsymbolicator.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,uBAAuB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAEtE,OAAO,EAAE,iBAAiB,EAAE,MAAM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from '@sentry/types';\nimport { addContextToFrame, logger } from '@sentry/utils';\n\nconst INTERNAL_CALLSITES_REGEX = new RegExp(['ReactNativeRenderer-dev\\\\.js$', 'MessageQueue\\\\.js$'].join('|'));\n\ninterface GetDevServer {\n (): { url: string };\n}\n\n/**\n * React Native Stack Frame\n */\ninterface ReactNativeFrame {\n // arguments: []\n column: number;\n file: string;\n lineNumber: number;\n methodName: string;\n}\n\n/**\n * React Native Error\n */\nexport type ReactNativeError = Error & {\n framesToPop?: number;\n jsEngine?: string;\n preventSymbolication?: boolean;\n componentStack?: string;\n};\n\n/** Tries to symbolicate the JS stack trace on the device. */\nexport class DebugSymbolicator implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'DebugSymbolicator';\n /**\n * @inheritDoc\n */\n public name: string = DebugSymbolicator.id;\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n addGlobalEventProcessor(async (event: Event, hint?: EventHint) => {\n const self = getCurrentHub().getIntegration(DebugSymbolicator);\n\n if (!self || hint === undefined || hint.originalException === undefined) {\n return event;\n }\n\n const reactError = hint.originalException as ReactNativeError;\n\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const parseErrorStack = require('react-native/Libraries/Core/Devtools/parseErrorStack');\n\n let stack;\n try {\n stack = parseErrorStack(reactError);\n } catch (e) {\n // In RN 0.64 `parseErrorStack` now only takes a string\n stack = parseErrorStack(reactError.stack);\n }\n\n await self._symbolicate(event, stack);\n\n event.platform = 'node'; // Setting platform node makes sure we do not show source maps errors\n\n return event;\n });\n }\n\n /**\n * Symbolicates the stack on the device talking to local dev server.\n * Mutates the passed event.\n */\n private async _symbolicate(event: Event, stack: string | undefined): Promise<void> {\n try {\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const symbolicateStackTrace = require('react-native/Libraries/Core/Devtools/symbolicateStackTrace');\n const prettyStack = await symbolicateStackTrace(stack);\n\n if (prettyStack) {\n let newStack = prettyStack;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (prettyStack.stack) {\n // This has been changed in an react-native version so stack is contained in here\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n newStack = prettyStack.stack;\n }\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n const stackWithoutInternalCallsites = newStack.filter(\n (frame: { file?: string }) =>\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n frame.file && frame.file.match(INTERNAL_CALLSITES_REGEX) === null,\n );\n\n const symbolicatedFrames = await this._convertReactNativeFramesToSentryFrames(stackWithoutInternalCallsites);\n this._replaceFramesInEvent(event, symbolicatedFrames);\n } else {\n logger.error('The stack is null');\n }\n } catch (error) {\n if (error instanceof Error) {\n logger.warn(`Unable to symbolicate stack trace: ${error.message}`);\n }\n }\n }\n\n /**\n * Converts ReactNativeFrames to frames in the Sentry format\n * @param frames ReactNativeFrame[]\n */\n private async _convertReactNativeFramesToSentryFrames(frames: ReactNativeFrame[]): Promise<StackFrame[]> {\n let getDevServer: GetDevServer;\n try {\n getDevServer = require('react-native/Libraries/Core/Devtools/getDevServer');\n } catch (_oO) {\n // We can't load devserver URL\n }\n // Below you will find lines marked with :HACK to prevent showing errors in the sentry ui\n // But since this is a debug only feature: This is Fine (TM)\n return Promise.all(\n frames.map(async (frame: ReactNativeFrame): Promise<StackFrame> => {\n let inApp = !!frame.column && !!frame.lineNumber;\n inApp =\n inApp &&\n frame.file !== undefined &&\n !frame.file.includes('node_modules') &&\n !frame.file.includes('native code');\n\n const newFrame: StackFrame = {\n colno: frame.column,\n filename: frame.file,\n function: frame.methodName,\n in_app: inApp,\n lineno: inApp ? frame.lineNumber : undefined, // :HACK\n platform: inApp ? 'javascript' : 'node', // :HACK\n };\n\n // The upstream `react-native@0.61` delegates parsing of stacks to `stacktrace-parser`, which is buggy and\n // leaves a trailing `(address at` in the function name.\n // `react-native@0.62` seems to have custom logic to parse hermes frames specially.\n // Anyway, all we do here is throw away the bogus suffix.\n if (newFrame.function) {\n const addressAtPos = newFrame.function.indexOf('(address at');\n if (addressAtPos >= 0) {\n newFrame.function = newFrame.function.substring(0, addressAtPos).trim();\n }\n }\n\n if (inApp) {\n await this._addSourceContext(newFrame, getDevServer);\n }\n\n return newFrame;\n }),\n );\n }\n\n /**\n * Replaces the frames in the exception of a error.\n * @param event Event\n * @param frames StackFrame[]\n */\n private _replaceFramesInEvent(event: Event, frames: StackFrame[]): void {\n if (\n event.exception &&\n event.exception.values &&\n event.exception.values[0] &&\n event.exception.values[0].stacktrace\n ) {\n event.exception.values[0].stacktrace.frames = frames.reverse();\n }\n }\n\n /**\n * This tries to add source context for in_app Frames\n *\n * @param frame StackFrame\n * @param getDevServer function from RN to get DevServer URL\n */\n private async _addSourceContext(frame: StackFrame, getDevServer?: GetDevServer): Promise<void> {\n let response;\n\n const segments = frame.filename?.split('/') ?? [];\n\n if (getDevServer) {\n for (const idx in segments) {\n if (Object.prototype.hasOwnProperty.call(segments, idx)) {\n response = await fetch(`${getDevServer().url}${segments.slice(-idx).join('/')}`, {\n method: 'GET',\n });\n\n if (response.ok) {\n break;\n }\n }\n }\n }\n\n if (response && response.ok) {\n const content = await response.text();\n const lines = content.split('\\n');\n\n addContextToFrame(lines, frame);\n }\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"devicecontext.js","sourceRoot":"","sources":["../../../src/js/integrations/devicecontext.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAErD,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEpC,uCAAuC;AACvC,MAAM,OAAO,aAAa;IAA1B;QAME;;WAEG;QACI,SAAI,GAAW,aAAa,CAAC,EAAE,CAAC;IA6EzC,CAAC;IA3EC;;OAEG;IACI,SAAS,CAAC,uBAA2D,EAAE,aAAwB;QACpG,uBAAuB,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';\nimport { logger, severityLevelFromString } from '@sentry/utils';\nimport { AppState } from 'react-native';\n\nimport { breadcrumbFromObject } from '../breadcrumb';\nimport type { NativeDeviceContextsResponse } from '../NativeRNSentry';\nimport { NATIVE } from '../wrapper';\n\n/** Load device context from native. */\nexport class DeviceContext implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'DeviceContext';\n\n /**\n * @inheritDoc\n */\n public name: string = DeviceContext.id;\n\n /**\n * @inheritDoc\n */\n public setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n addGlobalEventProcessor(async (event: Event) => {\n const self = getCurrentHub().getIntegration(DeviceContext);\n if (!self) {\n return event;\n }\n\n let native: NativeDeviceContextsResponse | null = null;\n try {\n native = await NATIVE.fetchNativeDeviceContexts();\n } catch (e) {\n logger.log(`Failed to get device context from native: ${e}`);\n }\n\n if (!native) {\n return event;\n }\n\n const nativeUser = native.user;\n if (!event.user && nativeUser) {\n event.user = nativeUser;\n }\n\n let nativeContexts = native.contexts;\n if (AppState.currentState !== 'unknown') {\n nativeContexts = nativeContexts || {};\n nativeContexts.app = {\n ...nativeContexts.app,\n in_foreground: AppState.currentState === 'active',\n };\n }\n if (nativeContexts) {\n event.contexts = { ...nativeContexts, ...event.contexts };\n }\n\n const nativeTags = native.tags;\n if (nativeTags) {\n event.tags = { ...nativeTags, ...event.tags };\n }\n\n const nativeExtra = native.extra;\n if (nativeExtra) {\n event.extra = { ...nativeExtra, ...event.extra };\n }\n\n const nativeFingerprint = native.fingerprint;\n if (nativeFingerprint) {\n event.fingerprint = (event.fingerprint ?? []).concat(\n nativeFingerprint.filter(item => (event.fingerprint ?? []).indexOf(item) < 0),\n );\n }\n\n const nativeLevel = typeof native['level'] === 'string' ? severityLevelFromString(native['level']) : undefined;\n if (!event.level && nativeLevel) {\n event.level = nativeLevel;\n }\n\n const nativeEnvironment = native['environment'];\n if (!event.environment && nativeEnvironment) {\n event.environment = nativeEnvironment;\n }\n\n const nativeBreadcrumbs = Array.isArray(native['breadcrumbs'])\n ? native['breadcrumbs'].map(breadcrumbFromObject)\n : undefined;\n if (nativeBreadcrumbs) {\n event.breadcrumbs = nativeBreadcrumbs;\n }\n\n return event;\n });\n }\n}\n"]}
1
+ {"version":3,"file":"devicecontext.js","sourceRoot":"","sources":["../../../src/js/integrations/devicecontext.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAErD,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEpC,uCAAuC;AACvC,MAAM,OAAO,aAAa;IAA1B;QAME;;WAEG;QACI,SAAI,GAAW,aAAa,CAAC,EAAE,CAAC;IA6EzC,CAAC;IA3EC;;OAEG;IACI,SAAS,CAAC,uBAA2D,EAAE,aAAwB;QACpG,uBAAuB,CAAC,CAAO,KAAY,EAAE,EAAE;;YAC7C,MAAM,IAAI,GAAG,aAAa,EAAE,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC;YAC3D,IAAI,CAAC,IAAI,EAAE;gBACT,OAAO,KAAK,CAAC;aACd;YAED,IAAI,MAAM,GAAwC,IAAI,CAAC;YACvD,IAAI;gBACF,MAAM,GAAG,MAAM,MAAM,CAAC,yBAAyB,EAAE,CAAC;aACnD;YAAC,OAAO,CAAC,EAAE;gBACV,MAAM,CAAC,GAAG,CAAC,6CAA6C,CAAC,EAAE,CAAC,CAAC;aAC9D;YAED,IAAI,CAAC,MAAM,EAAE;gBACX,OAAO,KAAK,CAAC;aACd;YAED,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC;YAC/B,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,UAAU,EAAE;gBAC7B,KAAK,CAAC,IAAI,GAAG,UAAU,CAAC;aACzB;YAED,IAAI,cAAc,GAAG,MAA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,CAAC,KAAK,GAAG,WAAW,CAAC;aAC3B;YAED,MAAM,iBAAiB,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC;YAChD,IAAI,CAAC,KAAK,CAAC,WAAW,IAAI,iBAAiB,EAAE;gBAC3C,KAAK,CAAC,WAAW,GAAG,iBAAiB,CAAC;aACvC;YAED,MAAM,iBAAiB,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;gBAC5D,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,GAAG,CAAC,oBAAoB,CAAC;gBACjD,CAAC,CAAC,SAAS,CAAC;YACd,IAAI,iBAAiB,EAAE;gBACrB,KAAK,CAAC,WAAW,GAAG,iBAAiB,CAAC;aACvC;YAED,OAAO,KAAK,CAAC;QACf,CAAC,CAAA,CAAC,CAAC;IACL,CAAC;;AApFD;;GAEG;AACW,gBAAE,GAAW,eAAe,CAAC","sourcesContent":["/* eslint-disable complexity */\nimport type { Event, EventProcessor, Hub, Integration } from '@sentry/types';\nimport { logger, severityLevelFromString } from '@sentry/utils';\nimport { AppState } from 'react-native';\n\nimport { breadcrumbFromObject } from '../breadcrumb';\nimport type { NativeDeviceContextsResponse } from '../NativeRNSentry';\nimport { NATIVE } from '../wrapper';\n\n/** Load device context from native. */\nexport class DeviceContext implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'DeviceContext';\n\n /**\n * @inheritDoc\n */\n public name: string = DeviceContext.id;\n\n /**\n * @inheritDoc\n */\n public setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n addGlobalEventProcessor(async (event: Event) => {\n const self = getCurrentHub().getIntegration(DeviceContext);\n if (!self) {\n return event;\n }\n\n let native: NativeDeviceContextsResponse | null = null;\n try {\n native = await NATIVE.fetchNativeDeviceContexts();\n } catch (e) {\n logger.log(`Failed to get device context from native: ${e}`);\n }\n\n if (!native) {\n return event;\n }\n\n const nativeUser = native.user;\n if (!event.user && nativeUser) {\n event.user = nativeUser;\n }\n\n let nativeContexts = native.contexts;\n if (AppState.currentState !== 'unknown') {\n nativeContexts = nativeContexts || {};\n nativeContexts.app = {\n ...nativeContexts.app,\n in_foreground: AppState.currentState === 'active',\n };\n }\n if (nativeContexts) {\n event.contexts = { ...nativeContexts, ...event.contexts };\n }\n\n const nativeTags = native.tags;\n if (nativeTags) {\n event.tags = { ...nativeTags, ...event.tags };\n }\n\n const nativeExtra = native.extra;\n if (nativeExtra) {\n event.extra = { ...nativeExtra, ...event.extra };\n }\n\n const nativeFingerprint = native.fingerprint;\n if (nativeFingerprint) {\n event.fingerprint = (event.fingerprint ?? []).concat(\n nativeFingerprint.filter(item => (event.fingerprint ?? []).indexOf(item) < 0),\n );\n }\n\n const nativeLevel = typeof native['level'] === 'string' ? severityLevelFromString(native['level']) : undefined;\n if (!event.level && nativeLevel) {\n event.level = nativeLevel;\n }\n\n const nativeEnvironment = native['environment'];\n if (!event.environment && nativeEnvironment) {\n event.environment = nativeEnvironment;\n }\n\n const nativeBreadcrumbs = Array.isArray(native['breadcrumbs'])\n ? native['breadcrumbs'].map(breadcrumbFromObject)\n : undefined;\n if (nativeBreadcrumbs) {\n event.breadcrumbs = nativeBreadcrumbs;\n }\n\n return event;\n });\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"eventorigin.js","sourceRoot":"","sources":["../../../src/js/integrations/eventorigin.ts"],"names":[],"mappings":"AAEA,0CAA0C;AAC1C,MAAM,OAAO,WAAW;IAAxB;QAME;;WAEG;QACI,SAAI,GAAW,WAAW,CAAC,EAAE,CAAC;IAevC,CAAC;IAbC;;OAEG;IACI,SAAS,CAAC,uBAAoD;QACnE,uBAAuB,CAAC,KAAK,CAAC,EAAE;;YAC9B,KAAK,CAAC,IAAI,SAAG,KAAK,CAAC,IAAI,mCAAI,EAAE,CAAC;YAE9B,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,GAAG,YAAY,CAAC;YAC1C,KAAK,CAAC,IAAI,CAAC,mBAAmB,CAAC,GAAG,YAAY,CAAC;YAE/C,OAAO,KAAK,CAAC;QACf,CAAC,CAAC,CAAC;IACL,CAAC;;AAtBD;;GAEG;AACW,cAAE,GAAW,aAAa,CAAC","sourcesContent":["import type { EventProcessor, Integration } from '@sentry/types';\n\n/** Default EventOrigin instrumentation */\nexport class EventOrigin implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'EventOrigin';\n\n /**\n * @inheritDoc\n */\n public name: string = EventOrigin.id;\n\n /**\n * @inheritDoc\n */\n public setupOnce(addGlobalEventProcessor: (e: EventProcessor) => void): void {\n addGlobalEventProcessor(event => {\n event.tags = event.tags ?? {};\n\n event.tags['event.origin'] = 'javascript';\n event.tags['event.environment'] = 'javascript';\n\n return event;\n });\n }\n}\n"]}
1
+ {"version":3,"file":"eventorigin.js","sourceRoot":"","sources":["../../../src/js/integrations/eventorigin.ts"],"names":[],"mappings":"AAEA,0CAA0C;AAC1C,MAAM,OAAO,WAAW;IAAxB;QAME;;WAEG;QACI,SAAI,GAAW,WAAW,CAAC,EAAE,CAAC;IAevC,CAAC;IAbC;;OAEG;IACI,SAAS,CAAC,uBAAoD;QACnE,uBAAuB,CAAC,KAAK,CAAC,EAAE;;YAC9B,KAAK,CAAC,IAAI,GAAG,MAAA,KAAK,CAAC,IAAI,mCAAI,EAAE,CAAC;YAE9B,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,GAAG,YAAY,CAAC;YAC1C,KAAK,CAAC,IAAI,CAAC,mBAAmB,CAAC,GAAG,YAAY,CAAC;YAE/C,OAAO,KAAK,CAAC;QACf,CAAC,CAAC,CAAC;IACL,CAAC;;AAtBD;;GAEG;AACW,cAAE,GAAW,aAAa,CAAC","sourcesContent":["import type { EventProcessor, Integration } from '@sentry/types';\n\n/** Default EventOrigin instrumentation */\nexport class EventOrigin implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'EventOrigin';\n\n /**\n * @inheritDoc\n */\n public name: string = EventOrigin.id;\n\n /**\n * @inheritDoc\n */\n public setupOnce(addGlobalEventProcessor: (e: EventProcessor) => void): void {\n addGlobalEventProcessor(event => {\n event.tags = event.tags ?? {};\n\n event.tags['event.origin'] = 'javascript';\n event.tags['event.environment'] = 'javascript';\n\n return event;\n });\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"release.js","sourceRoot":"","sources":["../../../src/js/integrations/release.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,uBAAuB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAGtE,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEpC,iEAAiE;AACjE,MAAM,OAAO,OAAO;IAApB;QAKE;;WAEG;QACI,SAAI,GAAW,OAAO,CAAC,EAAE,CAAC;IAmDnC,CAAC;IAjDC;;OAEG;IACI,SAAS;QACd,uBAAuB,CAAC,CAAO,KAAY,EAAE,EAAE;;YAC7C,MAAM,IAAI,GAAG,aAAa,EAAE,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;YACrD,IAAI,CAAC,IAAI,EAAE;gBACT,OAAO,KAAK,CAAC;aACd;YAED,MAAM,OAAO,SAAG,aAAa,EAAE,CAAC,SAAS,EAAE,0CAAE,UAAU,EAAE,CAAC;YAE1D;;;cAGE;YACF,IAAI,cAAO,KAAK,CAAC,KAAK,0CAAE,gBAAgB,CAAA,KAAK,QAAQ,EAAE;gBACrD,KAAK,CAAC,OAAO,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,gBAAgB,EAAE,CAAC;aACnD;iBAAM,IAAI,QAAO,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,CAAA,KAAK,QAAQ,EAAE;gBAC/C,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;aACjC;YAED,IAAI,cAAO,KAAK,CAAC,KAAK,0CAAE,aAAa,CAAA,KAAK,QAAQ,EAAE;gBAClD,KAAK,CAAC,IAAI,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,aAAa,EAAE,CAAC;aAC7C;iBAAM,IAAI,QAAO,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI,CAAA,KAAK,QAAQ,EAAE;gBAC5C,KAAK,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;aAC3B;YAED,IAAI,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,IAAI,EAAE;gBAC/B,OAAO,KAAK,CAAC;aACd;YAED,IAAI;gBACF,MAAM,aAAa,GAAG,MAAM,MAAM,CAAC,kBAAkB,EAAE,CAAC;gBACxD,IAAI,aAAa,EAAE;oBACjB,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE;wBAClB,KAAK,CAAC,OAAO,GAAG,GAAG,aAAa,CAAC,EAAE,IAAI,aAAa,CAAC,OAAO,IAAI,aAAa,CAAC,KAAK,EAAE,CAAC;qBACvF;oBACD,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE;wBACf,KAAK,CAAC,IAAI,GAAG,GAAG,aAAa,CAAC,KAAK,EAAE,CAAC;qBACvC;iBACF;aACF;YAAC,OAAO,GAAG,EAAE;gBACZ,yCAAyC;aAC1C;YAED,OAAO,KAAK,CAAC;QACf,CAAC,CAAA,CAAC,CAAC;IACL,CAAC;;AAzDD;;GAEG;AACW,UAAE,GAAW,SAAS,CAAC","sourcesContent":["import { addGlobalEventProcessor, getCurrentHub } from '@sentry/core';\nimport type { Event, Integration } from '@sentry/types';\n\nimport { NATIVE } from '../wrapper';\n\n/** Release integration responsible to load release from file. */\nexport class Release implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'Release';\n /**\n * @inheritDoc\n */\n public name: string = Release.id;\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n addGlobalEventProcessor(async (event: Event) => {\n const self = getCurrentHub().getIntegration(Release);\n if (!self) {\n return event;\n }\n\n const options = getCurrentHub().getClient()?.getOptions();\n\n /*\n __sentry_release and __sentry_dist is set by the user with setRelease and setDist. If this is used then this is the strongest.\n Otherwise we check for the release and dist in the options passed on init, as this is stronger than the release/dist from the native build.\n */\n if (typeof event.extra?.__sentry_release === 'string') {\n event.release = `${event.extra.__sentry_release}`;\n } else if (typeof options?.release === 'string') {\n event.release = options.release;\n }\n\n if (typeof event.extra?.__sentry_dist === 'string') {\n event.dist = `${event.extra.__sentry_dist}`;\n } else if (typeof options?.dist === 'string') {\n event.dist = options.dist;\n }\n\n if (event.release && event.dist) {\n return event;\n }\n\n try {\n const nativeRelease = await NATIVE.fetchNativeRelease();\n if (nativeRelease) {\n if (!event.release) {\n event.release = `${nativeRelease.id}@${nativeRelease.version}+${nativeRelease.build}`;\n }\n if (!event.dist) {\n event.dist = `${nativeRelease.build}`;\n }\n }\n } catch (_Oo) {\n // Something went wrong, we just continue\n }\n\n return event;\n });\n }\n}\n"]}
1
+ {"version":3,"file":"release.js","sourceRoot":"","sources":["../../../src/js/integrations/release.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,uBAAuB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAGtE,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEpC,iEAAiE;AACjE,MAAM,OAAO,OAAO;IAApB;QAKE;;WAEG;QACI,SAAI,GAAW,OAAO,CAAC,EAAE,CAAC;IAmDnC,CAAC;IAjDC;;OAEG;IACI,SAAS;QACd,uBAAuB,CAAC,CAAO,KAAY,EAAE,EAAE;;YAC7C,MAAM,IAAI,GAAG,aAAa,EAAE,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;YACrD,IAAI,CAAC,IAAI,EAAE;gBACT,OAAO,KAAK,CAAC;aACd;YAED,MAAM,OAAO,GAAG,MAAA,aAAa,EAAE,CAAC,SAAS,EAAE,0CAAE,UAAU,EAAE,CAAC;YAE1D;;;cAGE;YACF,IAAI,OAAO,CAAA,MAAA,KAAK,CAAC,KAAK,0CAAE,gBAAgB,CAAA,KAAK,QAAQ,EAAE;gBACrD,KAAK,CAAC,OAAO,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,gBAAgB,EAAE,CAAC;aACnD;iBAAM,IAAI,OAAO,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,CAAA,KAAK,QAAQ,EAAE;gBAC/C,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;aACjC;YAED,IAAI,OAAO,CAAA,MAAA,KAAK,CAAC,KAAK,0CAAE,aAAa,CAAA,KAAK,QAAQ,EAAE;gBAClD,KAAK,CAAC,IAAI,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,aAAa,EAAE,CAAC;aAC7C;iBAAM,IAAI,OAAO,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI,CAAA,KAAK,QAAQ,EAAE;gBAC5C,KAAK,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;aAC3B;YAED,IAAI,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,IAAI,EAAE;gBAC/B,OAAO,KAAK,CAAC;aACd;YAED,IAAI;gBACF,MAAM,aAAa,GAAG,MAAM,MAAM,CAAC,kBAAkB,EAAE,CAAC;gBACxD,IAAI,aAAa,EAAE;oBACjB,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE;wBAClB,KAAK,CAAC,OAAO,GAAG,GAAG,aAAa,CAAC,EAAE,IAAI,aAAa,CAAC,OAAO,IAAI,aAAa,CAAC,KAAK,EAAE,CAAC;qBACvF;oBACD,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE;wBACf,KAAK,CAAC,IAAI,GAAG,GAAG,aAAa,CAAC,KAAK,EAAE,CAAC;qBACvC;iBACF;aACF;YAAC,OAAO,GAAG,EAAE;gBACZ,yCAAyC;aAC1C;YAED,OAAO,KAAK,CAAC;QACf,CAAC,CAAA,CAAC,CAAC;IACL,CAAC;;AAzDD;;GAEG;AACW,UAAE,GAAW,SAAS,CAAC","sourcesContent":["import { addGlobalEventProcessor, getCurrentHub } from '@sentry/core';\nimport type { Event, Integration } from '@sentry/types';\n\nimport { NATIVE } from '../wrapper';\n\n/** Release integration responsible to load release from file. */\nexport class Release implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'Release';\n /**\n * @inheritDoc\n */\n public name: string = Release.id;\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n addGlobalEventProcessor(async (event: Event) => {\n const self = getCurrentHub().getIntegration(Release);\n if (!self) {\n return event;\n }\n\n const options = getCurrentHub().getClient()?.getOptions();\n\n /*\n __sentry_release and __sentry_dist is set by the user with setRelease and setDist. If this is used then this is the strongest.\n Otherwise we check for the release and dist in the options passed on init, as this is stronger than the release/dist from the native build.\n */\n if (typeof event.extra?.__sentry_release === 'string') {\n event.release = `${event.extra.__sentry_release}`;\n } else if (typeof options?.release === 'string') {\n event.release = options.release;\n }\n\n if (typeof event.extra?.__sentry_dist === 'string') {\n event.dist = `${event.extra.__sentry_dist}`;\n } else if (typeof options?.dist === 'string') {\n event.dist = options.dist;\n }\n\n if (event.release && event.dist) {\n return event;\n }\n\n try {\n const nativeRelease = await NATIVE.fetchNativeRelease();\n if (nativeRelease) {\n if (!event.release) {\n event.release = `${nativeRelease.id}@${nativeRelease.version}+${nativeRelease.build}`;\n }\n if (!event.dist) {\n event.dist = `${nativeRelease.build}`;\n }\n }\n } catch (_Oo) {\n // Something went wrong, we just continue\n }\n\n return event;\n });\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"rewriteframes.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/rewriteframes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAMrD,eAAO,MAAM,2BAA2B,gCAAgC,CAAC;AACzE,eAAO,MAAM,uBAAuB,yBAAyB,CAAC;AAE9D;;;;;GAKG;AACH,wBAAgB,8BAA8B,IAAI,aAAa,CAyC9D"}
1
+ {"version":3,"file":"rewriteframes.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/rewriteframes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAMrD,eAAO,MAAM,2BAA2B,gCAAgC,CAAC;AACzE,eAAO,MAAM,uBAAuB,yBAAyB,CAAC;AAE9D;;;;;GAKG;AACH,wBAAgB,8BAA8B,IAAI,aAAa,CAkD9D"}
@@ -1,6 +1,6 @@
1
1
  import { RewriteFrames } from '@sentry/integrations';
2
2
  import { Platform } from 'react-native';
3
- import { isExpo } from '../utils/environment';
3
+ import { isExpo, isHermesEnabled } from '../utils/environment';
4
4
  export const ANDROID_DEFAULT_BUNDLE_NAME = 'app:///index.android.bundle';
5
5
  export const IOS_DEFAULT_BUNDLE_NAME = 'app:///main.jsbundle';
6
6
  /**
@@ -28,6 +28,14 @@ export function createReactNativeRewriteFrames() {
28
28
  if (frame.filename === '[native code]' || frame.filename === 'native') {
29
29
  return frame;
30
30
  }
31
+ // Is React Native frame
32
+ // Check Hermes Bytecode Frame and convert to 1-based column
33
+ if (isHermesEnabled() && frame.lineno === 1 && frame.colno !== undefined) {
34
+ // hermes bytecode columns are 0-based, while v8 and jsc are 1-based
35
+ // Hermes frames without debug info have always line = 1 and col points to a bytecode pos
36
+ // https://github.com/facebook/react/issues/21792#issuecomment-873171991
37
+ frame.colno += 1;
38
+ }
31
39
  // Expo adds hash to the end of bundle names
32
40
  if (isExpo() && Platform.OS === 'android') {
33
41
  frame.filename = ANDROID_DEFAULT_BUNDLE_NAME;
@@ -1 +1 @@
1
- {"version":3,"file":"rewriteframes.js","sourceRoot":"","sources":["../../../src/js/integrations/rewriteframes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,MAAM,CAAC,MAAM,2BAA2B,GAAG,6BAA6B,CAAC;AACzE,MAAM,CAAC,MAAM,uBAAuB,GAAG,sBAAsB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SAAS,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC;YACzG,OAAO,KAAK,CAAC;QACf,CAAC;KACF,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { RewriteFrames } from '@sentry/integrations';\nimport type { StackFrame } from '@sentry/types';\nimport { Platform } from 'react-native';\n\nimport { isExpo } from '../utils/environment';\n\nexport const ANDROID_DEFAULT_BUNDLE_NAME = 'app:///index.android.bundle';\nexport const IOS_DEFAULT_BUNDLE_NAME = 'app:///main.jsbundle';\n\n/**\n * Creates React Native default rewrite frames integration\n * which appends app:// to the beginning of the filename\n * and removes file://, 'address at' prefixes, CodePush postfix,\n * and Expo bundle postfix.\n */\nexport function createReactNativeRewriteFrames(): RewriteFrames {\n return new RewriteFrames({\n iteratee: (frame: StackFrame) => {\n if (frame.platform === 'java' || frame.platform === 'cocoa') {\n // Because platform is not required in StackFrame type\n // we assume that if not set it's javascript\n return frame;\n }\n\n if (!frame.filename) {\n return frame;\n }\n delete frame.abs_path;\n\n frame.filename = frame.filename\n .replace(/^file:\\/\\//, '')\n .replace(/^address at /, '')\n .replace(/^.*\\/[^.]+(\\.app|CodePush|.*(?=\\/))/, '');\n\n if (frame.filename === '[native code]' || frame.filename === 'native') {\n return frame;\n }\n\n // Expo adds hash to the end of bundle names\n if (isExpo() && Platform.OS === 'android') {\n frame.filename = ANDROID_DEFAULT_BUNDLE_NAME;\n return frame;\n }\n\n if (isExpo() && Platform.OS === 'ios') {\n frame.filename = IOS_DEFAULT_BUNDLE_NAME;\n return frame;\n }\n\n const appPrefix = 'app://';\n // We always want to have a triple slash\n frame.filename =\n frame.filename.indexOf('/') === 0 ? `${appPrefix}${frame.filename}` : `${appPrefix}/${frame.filename}`;\n return frame;\n },\n });\n}\n"]}
1
+ {"version":3,"file":"rewriteframes.js","sourceRoot":"","sources":["../../../src/js/integrations/rewriteframes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,OAAO,EAAE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G,2BAA2B,CAAC;gBAC7C,OAAO,KAAK,CAAC;aACd;YAED,IAAI,MAAM,EAAE,IAAI,QAAQ,CAAC,EAAE,KAAK,KAAK,EAAE;gBACrC,KAAK,CAAC,QAAQ,GAAG,uBAAuB,CAAC;gBACzC,OAAO,KAAK,CAAC;aACd;YAED,MAAM,SAAS,GAAG,QAAQ,CAAC;YAC3B,wCAAwC;YACxC,KAAK,CAAC,QAAQ;gBACZ,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,GAAG,SAAS,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC;YACzG,OAAO,KAAK,CAAC;QACf,CAAC;KACF,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { RewriteFrames } from '@sentry/integrations';\nimport type { StackFrame } from '@sentry/types';\nimport { Platform } from 'react-native';\n\nimport { isExpo, isHermesEnabled } from '../utils/environment';\n\nexport const ANDROID_DEFAULT_BUNDLE_NAME = 'app:///index.android.bundle';\nexport const IOS_DEFAULT_BUNDLE_NAME = 'app:///main.jsbundle';\n\n/**\n * Creates React Native default rewrite frames integration\n * which appends app:// to the beginning of the filename\n * and removes file://, 'address at' prefixes, CodePush postfix,\n * and Expo bundle postfix.\n */\nexport function createReactNativeRewriteFrames(): RewriteFrames {\n return new RewriteFrames({\n iteratee: (frame: StackFrame) => {\n if (frame.platform === 'java' || frame.platform === 'cocoa') {\n // Because platform is not required in StackFrame type\n // we assume that if not set it's javascript\n return frame;\n }\n\n if (!frame.filename) {\n return frame;\n }\n delete frame.abs_path;\n\n frame.filename = frame.filename\n .replace(/^file:\\/\\//, '')\n .replace(/^address at /, '')\n .replace(/^.*\\/[^.]+(\\.app|CodePush|.*(?=\\/))/, '');\n\n if (frame.filename === '[native code]' || frame.filename === 'native') {\n return frame;\n }\n // Is React Native frame\n\n // Check Hermes Bytecode Frame and convert to 1-based column\n if (isHermesEnabled() && frame.lineno === 1 && frame.colno !== undefined) {\n // hermes bytecode columns are 0-based, while v8 and jsc are 1-based\n // Hermes frames without debug info have always line = 1 and col points to a bytecode pos\n // https://github.com/facebook/react/issues/21792#issuecomment-873171991\n frame.colno += 1;\n }\n\n // Expo adds hash to the end of bundle names\n if (isExpo() && Platform.OS === 'android') {\n frame.filename = ANDROID_DEFAULT_BUNDLE_NAME;\n return frame;\n }\n\n if (isExpo() && Platform.OS === 'ios') {\n frame.filename = IOS_DEFAULT_BUNDLE_NAME;\n return frame;\n }\n\n const appPrefix = 'app://';\n // We always want to have a triple slash\n frame.filename =\n frame.filename.indexOf('/') === 0 ? `${appPrefix}${frame.filename}` : `${appPrefix}/${frame.filename}`;\n return frame;\n },\n });\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  import type { EventProcessor, Integration, SdkInfo as SdkInfoType } from '@sentry/types';
2
- declare type DefaultSdkInfo = Pick<Required<SdkInfoType>, 'name' | 'packages' | 'version'>;
2
+ type DefaultSdkInfo = Pick<Required<SdkInfoType>, 'name' | 'packages' | 'version'>;
3
3
  export declare const defaultSdkInfo: DefaultSdkInfo;
4
4
  /** Default SdkInfo instrumentation */
5
5
  export declare class SdkInfo implements Integration {
@@ -1 +1 @@
1
- {"version":3,"file":"sdkinfo.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/sdkinfo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAW,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AAMlG,aAAK,cAAc,GAAG,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS,CAAC,CAAC;AAEnF,eAAO,MAAM,cAAc,EAAE,cAS5B,CAAC;AAEF,sCAAsC;AACtC,qBAAa,OAAQ,YAAW,WAAW;IACzC;;OAEG;IACH,OAAc,EAAE,EAAE,MAAM,CAAa;IAErC;;OAEG;IACI,IAAI,EAAE,MAAM,CAAc;IAEjC,OAAO,CAAC,iBAAiB,CAAwB;IAEjD;;OAEG;IACI,SAAS,CAAC,uBAAuB,EAAE,CAAC,CAAC,EAAE,cAAc,KAAK,IAAI,GAAG,IAAI;CA4B7E"}
1
+ {"version":3,"file":"sdkinfo.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/sdkinfo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAW,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AAMlG,KAAK,cAAc,GAAG,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS,CAAC,CAAC;AAEnF,eAAO,MAAM,cAAc,EAAE,cAS5B,CAAC;AAEF,sCAAsC;AACtC,qBAAa,OAAQ,YAAW,WAAW;IACzC;;OAEG;IACH,OAAc,EAAE,EAAE,MAAM,CAAa;IAErC;;OAEG;IACI,IAAI,EAAE,MAAM,CAAc;IAEjC,OAAO,CAAC,iBAAiB,CAAwB;IAEjD;;OAEG;IACI,SAAS,CAAC,uBAAuB,EAAE,CAAC,CAAC,EAAE,cAAc,KAAK,IAAI,GAAG,IAAI;CA4B7E"}
@@ -9,5 +9,5 @@ export declare const STALL_LONGEST_TIME = "stall_longest_time";
9
9
  * Adds React Native's extensions. Needs to be called before any transactions are created.
10
10
  */
11
11
  export declare function _addTracingExtensions(): void;
12
- export declare type StartTransactionFunction = (this: Hub, transactionContext: TransactionContext, customSamplingContext?: CustomSamplingContext) => Transaction;
12
+ export type StartTransactionFunction = (this: Hub, transactionContext: TransactionContext, customSamplingContext?: CustomSamplingContext) => Transaction;
13
13
  //# sourceMappingURL=measurements.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"measurements.d.ts","sourceRoot":"","sources":["../../src/js/measurements.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAErD,OAAO,KAAK,EAAE,qBAAqB,EAAqB,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAIlG,eAAO,MAAM,cAAc,mBAAmB,CAAC;AAC/C,eAAO,MAAM,cAAc,mBAAmB,CAAC;AAE/C,eAAO,MAAM,WAAW,gBAAgB,CAAC;AACzC,eAAO,MAAM,gBAAgB,qBAAqB,CAAC;AACnD,eAAO,MAAM,kBAAkB,uBAAuB,CAAC;AAEvD;;GAEG;AACH,wBAAgB,qBAAqB,IAAI,IAAI,CAiB5C;AAED,oBAAY,wBAAwB,GAAG,CACrC,IAAI,EAAE,GAAG,EACT,kBAAkB,EAAE,kBAAkB,EACtC,qBAAqB,CAAC,EAAE,qBAAqB,KAC1C,WAAW,CAAC"}
1
+ {"version":3,"file":"measurements.d.ts","sourceRoot":"","sources":["../../src/js/measurements.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAErD,OAAO,KAAK,EAAE,qBAAqB,EAAqB,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAIlG,eAAO,MAAM,cAAc,mBAAmB,CAAC;AAC/C,eAAO,MAAM,cAAc,mBAAmB,CAAC;AAE/C,eAAO,MAAM,WAAW,gBAAgB,CAAC;AACzC,eAAO,MAAM,gBAAgB,qBAAqB,CAAC;AACnD,eAAO,MAAM,kBAAkB,uBAAuB,CAAC;AAEvD;;GAEG;AACH,wBAAgB,qBAAqB,IAAI,IAAI,CAiB5C;AAED,MAAM,MAAM,wBAAwB,GAAG,CACrC,IAAI,EAAE,GAAG,EACT,kBAAkB,EAAE,kBAAkB,EACtC,qBAAqB,CAAC,EAAE,qBAAqB,KAC1C,WAAW,CAAC"}
package/dist/js/misc.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { EnvelopeItem } from '@sentry/types';
2
- declare type EnvelopeItemPayload = EnvelopeItem[1];
2
+ type EnvelopeItemPayload = EnvelopeItem[1];
3
3
  /**
4
4
  * Extracts the hard crash information from the event exceptions.
5
5
  * No exceptions or undefined handled are not hard crashes.
@@ -1 +1 @@
1
- {"version":3,"file":"misc.d.ts","sourceRoot":"","sources":["../../src/js/misc.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAa,MAAM,eAAe,CAAC;AAE7D,aAAK,mBAAmB,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC;AAE3C;;;GAGG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CASjE"}
1
+ {"version":3,"file":"misc.d.ts","sourceRoot":"","sources":["../../src/js/misc.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAa,MAAM,eAAe,CAAC;AAE7D,KAAK,mBAAmB,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC;AAE3C;;;GAGG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CASjE"}
@@ -1 +1 @@
1
- {"version":3,"file":"misc.js","sourceRoot":"","sources":["../../src/js/misc.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,OAA4B;;IACtD,MAAM,MAAM,GACV,OAAO,OAAO,KAAK,QAAQ,IAAI,WAAW,IAAI,OAAO,WAAI,OAAO,CAAC,SAAS,0CAAE,MAAM,CAAA,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IACrH,KAAK,MAAM,SAAS,IAAI,MAAM,EAAE;QAC9B,IAAI,CAAC,CAAC,OAAA,SAAS,CAAC,SAAS,0CAAE,OAAO,MAAK,KAAK,CAAC,EAAE;YAC7C,OAAO,IAAI,CAAC;SACb;KACF;IACD,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["import type { EnvelopeItem, Exception } from '@sentry/types';\n\ntype EnvelopeItemPayload = EnvelopeItem[1];\n\n/**\n * Extracts the hard crash information from the event exceptions.\n * No exceptions or undefined handled are not hard crashes.\n */\nexport function isHardCrash(payload: EnvelopeItemPayload): boolean {\n const values: Exception[] =\n typeof payload !== 'string' && 'exception' in payload && payload.exception?.values ? payload.exception.values : [];\n for (const exception of values) {\n if (!(exception.mechanism?.handled !== false)) {\n return true;\n }\n }\n return false;\n}\n"]}
1
+ {"version":3,"file":"misc.js","sourceRoot":"","sources":["../../src/js/misc.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,OAA4B;;IACtD,MAAM,MAAM,GACV,OAAO,OAAO,KAAK,QAAQ,IAAI,WAAW,IAAI,OAAO,KAAI,MAAA,OAAO,CAAC,SAAS,0CAAE,MAAM,CAAA,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IACrH,KAAK,MAAM,SAAS,IAAI,MAAM,EAAE;QAC9B,IAAI,CAAC,CAAC,CAAA,MAAA,SAAS,CAAC,SAAS,0CAAE,OAAO,MAAK,KAAK,CAAC,EAAE;YAC7C,OAAO,IAAI,CAAC;SACb;KACF;IACD,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["import type { EnvelopeItem, Exception } from '@sentry/types';\n\ntype EnvelopeItemPayload = EnvelopeItem[1];\n\n/**\n * Extracts the hard crash information from the event exceptions.\n * No exceptions or undefined handled are not hard crashes.\n */\nexport function isHardCrash(payload: EnvelopeItemPayload): boolean {\n const values: Exception[] =\n typeof payload !== 'string' && 'exception' in payload && payload.exception?.values ? payload.exception.values : [];\n for (const exception of values) {\n if (!(exception.mechanism?.handled !== false)) {\n return true;\n }\n }\n return false;\n}\n"]}
@@ -1,7 +1,6 @@
1
1
  import type { BrowserTransportOptions } from '@sentry/browser/types/transports/types';
2
2
  import type { ProfilerProps } from '@sentry/react/types/profiler';
3
- import type { ClientOptions, Options } from '@sentry/types';
4
- import type { CaptureContext } from '@sentry/types/types/scope';
3
+ import type { CaptureContext, ClientOptions, Options } from '@sentry/types';
5
4
  import type { TouchEventBoundaryProps } from './touchevents';
6
5
  export interface BaseReactNativeOptions {
7
6
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/js/options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AACtF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAE7D,MAAM,WAAW,sBAAsB;IACrC;;;;;OAKG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB;;;OAGG;IACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;IAEpC;;;;;;;;;;OAUG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAElC,sDAAsD;IACtD,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAE7B,0DAA0D;IAC1D,yBAAyB,CAAC,EAAE,OAAO,CAAC;IAEpC,uEAAuE;IACvE,6BAA6B,CAAC,EAAE,MAAM,CAAC;IAEvC,oDAAoD;IACpD,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAE7B,+FAA+F;IAC/F,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE;QACnB,yEAAyE;QACzE,iBAAiB,EAAE,OAAO,CAAC;KAC5B,KAAK,IAAI,CAAC;IAEX,uGAAuG;IACvG,4BAA4B,CAAC,EAAE,OAAO,CAAC;IAEvC;;;;;;;;OAQG;IACH,iCAAiC,CAAC,EAAE,OAAO,CAAC;IA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E,OAAO,CAAC;CACvC;AAED,MAAM,WAAW,2BAA4B,SAAQ,uBAAuB;IAC1E;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;GAGG;AAEH,MAAM,WAAW,kBAAmB,SAAQ,OAAO,CAAC,2BAA2B,CAAC,EAAE,sBAAsB;CAAG;AAE3G,MAAM,WAAW,wBAAyB,SAAQ,aAAa,CAAC,2BAA2B,CAAC,EAAE,sBAAsB;CAAG;AAEvH,MAAM,WAAW,yBAAyB;IACxC,wCAAwC;IACxC,aAAa,CAAC,EAAE,aAAa,CAAC;IAE9B,8CAA8C;IAC9C,uBAAuB,CAAC,EAAE,uBAAuB,CAAC;CACnD"}
@@ -1 +1 @@
1
- {"version":3,"file":"options.js","sourceRoot":"","sources":["../../src/js/options.ts"],"names":[],"mappings":"","sourcesContent":["import type { BrowserTransportOptions } from '@sentry/browser/types/transports/types';\nimport type { ProfilerProps } from '@sentry/react/types/profiler';\nimport type { ClientOptions, Options } from '@sentry/types';\nimport type { CaptureContext } from '@sentry/types/types/scope';\n\nimport type { TouchEventBoundaryProps } from './touchevents';\n\nexport interface BaseReactNativeOptions {\n /**\n * Enables native transport + device info + offline caching.\n * Be careful, disabling this also breaks automatic release setting.\n * This means you have to manage setting the release yourself.\n * Defaults to `true`.\n */\n enableNative?: boolean;\n\n /**\n * Enables native crashHandling. This only works if `enableNative` is `true`.\n * Defaults to `true`.\n */\n enableNativeCrashHandling?: boolean;\n\n /**\n * Initializes the native SDK on init.\n * Set this to `false` if you have an existing native SDK and don't want to re-initialize.\n *\n * NOTE: Be careful and only use this if you know what you are doing.\n * If you use this flag, make sure a native SDK is running before the JS Engine initializes or events might not be captured.\n * Also, make sure the DSN on both the React Native side and the native side are the same one.\n * We strongly recommend checking the documentation if you need to use this.\n *\n * @default true\n */\n autoInitializeNativeSdk?: boolean;\n\n /** Should the native nagger alert be shown or not. */\n enableNativeNagger?: boolean;\n\n /** Should sessions be tracked to Sentry Health or not. */\n enableAutoSessionTracking?: boolean;\n\n /** The interval to end a session if the App goes to the background. */\n sessionTrackingIntervalMillis?: number;\n\n /** Enable scope sync from Java to NDK on Android */\n enableNdkScopeSync?: boolean;\n\n /** When enabled, all the threads are automatically attached to all logged events on Android */\n attachThreads?: boolean;\n\n /**\n * When enabled, certain personally identifiable information (PII) is added by active integrations.\n *\n * @default false\n */\n sendDefaultPii?: boolean;\n\n /**\n * Callback that is called after the RN SDK on the JS Layer has made contact with the Native Layer.\n */\n onReady?: (response: {\n /** `true` if the native SDK has been initialized, `false` otherwise. */\n didCallNativeInit: boolean;\n }) => void;\n\n /** Enable auto performance tracking by default. Renamed from `enableAutoPerformanceTracking` in v5. */\n enableAutoPerformanceTracing?: boolean;\n\n /**\n * Enables Out of Memory Tracking for iOS and macCatalyst.\n * See the following link for more information and possible restrictions:\n * https://docs.sentry.io/platforms/apple/guides/ios/configuration/out-of-memory/\n *\n * Renamed from `enableOutOfMemoryTracking` in v5.\n *\n * @default true\n */\n enableWatchdogTerminationTracking?: boolean;\n\n /**\n * Set data to the inital scope\n * @deprecated Use `Sentry.configureScope(...)`\n */\n initialScope?: CaptureContext;\n\n /**\n * When enabled, Sentry will overwrite the global Promise instance to ensure that unhandled rejections are correctly tracked.\n * If you run into issues with Promise polyfills such as `core-js`, make sure you polyfill after Sentry is initialized.\n * Read more at https://docs.sentry.io/platforms/react-native/troubleshooting/#unhandled-promise-rejections\n *\n * When disabled, this option will not disable unhandled rejection tracking. Set `onunhandledrejection: false` on the `ReactNativeErrorHandlers` integration instead.\n *\n * @default true\n */\n patchGlobalPromise?: boolean;\n\n /**\n * The max cache items for capping the number of envelopes.\n *\n * @default 30\n */\n maxCacheItems?: number;\n\n /**\n * When enabled, the SDK tracks when the application stops responding for a specific amount of\n * time defined by the `appHangTimeoutInterval` option.\n *\n * iOS only\n *\n * @default true\n */\n enableAppHangTracking?: boolean;\n\n /**\n * The minimum amount of time an app should be unresponsive to be classified as an App Hanging.\n * The actual amount may be a little longer.\n * Avoid using values lower than 100ms, which may cause a lot of app hangs events being transmitted.\n * Value should be in seconds.\n *\n * iOS only\n *\n * @default 2\n */\n appHangTimeoutInterval?: number;\n\n /**\n * The max queue size for capping the number of envelopes waiting to be sent by Transport.\n */\n maxQueueSize?: number;\n\n /**\n * When enabled and a user experiences an error, Sentry provides the ability to take a screenshot and include it as an attachment.\n *\n * @default false\n */\n attachScreenshot?: boolean;\n\n /**\n * When enabled Sentry includes the current view hierarchy in the error attachments.\n *\n * @default false\n */\n attachViewHierarchy?: boolean;\n\n /**\n * When enabled, Sentry will capture failed XHR/Fetch requests. This option also enabled HTTP Errors on iOS.\n * [Sentry Android Gradle Plugin](https://docs.sentry.io/platforms/android/configuration/integrations/okhttp/)\n * is needed to capture HTTP Errors on Android.\n *\n * @default false\n */\n enableCaptureFailedRequests?: boolean;\n}\n\nexport interface ReactNativeTransportOptions extends BrowserTransportOptions {\n /**\n * @deprecated use `maxQueueSize` in the root of the SDK options.\n */\n bufferSize?: number;\n}\n\n/**\n * Configuration options for the Sentry ReactNative SDK.\n * @see ReactNativeFrontend for more information.\n */\n\nexport interface ReactNativeOptions extends Options<ReactNativeTransportOptions>, BaseReactNativeOptions {}\n\nexport interface ReactNativeClientOptions extends ClientOptions<ReactNativeTransportOptions>, BaseReactNativeOptions {}\n\nexport interface ReactNativeWrapperOptions {\n /** Props for the root React profiler */\n profilerProps?: ProfilerProps;\n\n /** Props for the root touch event boundary */\n touchEventBoundaryProps?: TouchEventBoundaryProps;\n}\n"]}
1
+ {"version":3,"file":"options.js","sourceRoot":"","sources":["../../src/js/options.ts"],"names":[],"mappings":"","sourcesContent":["import type { BrowserTransportOptions } from '@sentry/browser/types/transports/types';\nimport type { ProfilerProps } from '@sentry/react/types/profiler';\nimport type { CaptureContext, ClientOptions, Options } from '@sentry/types';\n\nimport type { TouchEventBoundaryProps } from './touchevents';\n\nexport interface BaseReactNativeOptions {\n /**\n * Enables native transport + device info + offline caching.\n * Be careful, disabling this also breaks automatic release setting.\n * This means you have to manage setting the release yourself.\n * Defaults to `true`.\n */\n enableNative?: boolean;\n\n /**\n * Enables native crashHandling. This only works if `enableNative` is `true`.\n * Defaults to `true`.\n */\n enableNativeCrashHandling?: boolean;\n\n /**\n * Initializes the native SDK on init.\n * Set this to `false` if you have an existing native SDK and don't want to re-initialize.\n *\n * NOTE: Be careful and only use this if you know what you are doing.\n * If you use this flag, make sure a native SDK is running before the JS Engine initializes or events might not be captured.\n * Also, make sure the DSN on both the React Native side and the native side are the same one.\n * We strongly recommend checking the documentation if you need to use this.\n *\n * @default true\n */\n autoInitializeNativeSdk?: boolean;\n\n /** Should the native nagger alert be shown or not. */\n enableNativeNagger?: boolean;\n\n /** Should sessions be tracked to Sentry Health or not. */\n enableAutoSessionTracking?: boolean;\n\n /** The interval to end a session if the App goes to the background. */\n sessionTrackingIntervalMillis?: number;\n\n /** Enable scope sync from Java to NDK on Android */\n enableNdkScopeSync?: boolean;\n\n /** When enabled, all the threads are automatically attached to all logged events on Android */\n attachThreads?: boolean;\n\n /**\n * When enabled, certain personally identifiable information (PII) is added by active integrations.\n *\n * @default false\n */\n sendDefaultPii?: boolean;\n\n /**\n * Callback that is called after the RN SDK on the JS Layer has made contact with the Native Layer.\n */\n onReady?: (response: {\n /** `true` if the native SDK has been initialized, `false` otherwise. */\n didCallNativeInit: boolean;\n }) => void;\n\n /** Enable auto performance tracking by default. Renamed from `enableAutoPerformanceTracking` in v5. */\n enableAutoPerformanceTracing?: boolean;\n\n /**\n * Enables Out of Memory Tracking for iOS and macCatalyst.\n * See the following link for more information and possible restrictions:\n * https://docs.sentry.io/platforms/apple/guides/ios/configuration/out-of-memory/\n *\n * Renamed from `enableOutOfMemoryTracking` in v5.\n *\n * @default true\n */\n enableWatchdogTerminationTracking?: boolean;\n\n /**\n * Set data to the inital scope\n * @deprecated Use `Sentry.configureScope(...)`\n */\n initialScope?: CaptureContext;\n\n /**\n * When enabled, Sentry will overwrite the global Promise instance to ensure that unhandled rejections are correctly tracked.\n * If you run into issues with Promise polyfills such as `core-js`, make sure you polyfill after Sentry is initialized.\n * Read more at https://docs.sentry.io/platforms/react-native/troubleshooting/#unhandled-promise-rejections\n *\n * When disabled, this option will not disable unhandled rejection tracking. Set `onunhandledrejection: false` on the `ReactNativeErrorHandlers` integration instead.\n *\n * @default true\n */\n patchGlobalPromise?: boolean;\n\n /**\n * The max cache items for capping the number of envelopes.\n *\n * @default 30\n */\n maxCacheItems?: number;\n\n /**\n * When enabled, the SDK tracks when the application stops responding for a specific amount of\n * time defined by the `appHangTimeoutInterval` option.\n *\n * iOS only\n *\n * @default true\n */\n enableAppHangTracking?: boolean;\n\n /**\n * The minimum amount of time an app should be unresponsive to be classified as an App Hanging.\n * The actual amount may be a little longer.\n * Avoid using values lower than 100ms, which may cause a lot of app hangs events being transmitted.\n * Value should be in seconds.\n *\n * iOS only\n *\n * @default 2\n */\n appHangTimeoutInterval?: number;\n\n /**\n * The max queue size for capping the number of envelopes waiting to be sent by Transport.\n */\n maxQueueSize?: number;\n\n /**\n * When enabled and a user experiences an error, Sentry provides the ability to take a screenshot and include it as an attachment.\n *\n * @default false\n */\n attachScreenshot?: boolean;\n\n /**\n * When enabled Sentry includes the current view hierarchy in the error attachments.\n *\n * @default false\n */\n attachViewHierarchy?: boolean;\n\n /**\n * When enabled, Sentry will capture failed XHR/Fetch requests. This option also enabled HTTP Errors on iOS.\n * [Sentry Android Gradle Plugin](https://docs.sentry.io/platforms/android/configuration/integrations/okhttp/)\n * is needed to capture HTTP Errors on Android.\n *\n * @default false\n */\n enableCaptureFailedRequests?: boolean;\n}\n\nexport interface ReactNativeTransportOptions extends BrowserTransportOptions {\n /**\n * @deprecated use `maxQueueSize` in the root of the SDK options.\n */\n bufferSize?: number;\n}\n\n/**\n * Configuration options for the Sentry ReactNative SDK.\n * @see ReactNativeFrontend for more information.\n */\n\nexport interface ReactNativeOptions extends Options<ReactNativeTransportOptions>, BaseReactNativeOptions {}\n\nexport interface ReactNativeClientOptions extends ClientOptions<ReactNativeTransportOptions>, BaseReactNativeOptions {}\n\nexport interface ReactNativeWrapperOptions {\n /** Props for the root React profiler */\n profilerProps?: ProfilerProps;\n\n /** Props for the root touch event boundary */\n touchEventBoundaryProps?: TouchEventBoundaryProps;\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  import type { RawThreadCpuProfile } from './types';
2
- export declare type StackFrameId = number;
3
- export declare type MicrosecondsSinceBoot = string;
2
+ export type StackFrameId = number;
3
+ export type MicrosecondsSinceBoot = string;
4
4
  export interface TraceEvent {
5
5
  name: string;
6
6
  ph: string;
@@ -1 +1 @@
1
- {"version":3,"file":"hermes.d.ts","sourceRoot":"","sources":["../../../src/js/profiling/hermes.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEnD,oBAAY,YAAY,GAAG,MAAM,CAAC;AAClC,oBAAY,qBAAqB,GAAG,MAAM,CAAC;AAE3C,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,EAAE,EAAE,qBAAqB,CAAC;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE;QACJ,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;CACH;AAED,MAAM,WAAW,MAAM;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,qBAAqB,CAAC;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,EAAE,EAAE,YAAY,CAAC;CAClB;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;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E,YAAY,CAAC;CAClB;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,OAAO;IACtB,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;CACzC;AAED;;;;GAIG;AACH,wBAAgB,iCAAiC,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAI5E;AAID;;GAEG;AACH,wBAAgB,cAAc,IAAI,MAAM,GAAG,IAAI,CAQ9C;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,mBAAmB,GAAG,IAAI,CAM1D"}
@@ -1,4 +1,5 @@
1
- import type { EventProcessor, Hub, Integration } from '@sentry/types';
1
+ import type { Hub } from '@sentry/core';
2
+ import type { EventProcessor, Integration } from '@sentry/types';
2
3
  export declare const MAX_PROFILE_DURATION_MS: number;
3
4
  /**
4
5
  * Profiling integration creates a profile for each transaction and adds it to the event envelope.
@@ -21,6 +22,8 @@ export declare class HermesProfiling implements Integration {
21
22
  * @inheritDoc
22
23
  */
23
24
  setupOnce(_: (e: EventProcessor) => void, getCurrentHub: () => Hub): void;
25
+ private _startCurrentProfileForActiveTransaction;
26
+ private _startCurrentProfile;
24
27
  private _shouldStartProfiling;
25
28
  /**
26
29
  * Starts a new profile and links it to the transaction.
@@ -1 +1 @@
1
- {"version":3,"file":"integration.d.ts","sourceRoot":"","sources":["../../../src/js/profiling/integration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAmB,cAAc,EAAE,GAAG,EAAE,WA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