@sentry/react-native 6.0.0-alpha.0 → 6.0.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 (87) hide show
  1. package/RNSentry.podspec +22 -15
  2. package/android/src/main/java/io/sentry/react/RNSentryModuleImpl.java +4 -0
  3. package/android/src/newarch/java/io/sentry/react/RNSentryModule.java +5 -0
  4. package/android/src/oldarch/java/io/sentry/react/RNSentryModule.java +5 -0
  5. package/dist/js/NativeRNSentry.d.ts +1 -0
  6. package/dist/js/NativeRNSentry.d.ts.map +1 -1
  7. package/dist/js/NativeRNSentry.js.map +1 -1
  8. package/dist/js/index.d.ts +1 -1
  9. package/dist/js/index.d.ts.map +1 -1
  10. package/dist/js/index.js +1 -1
  11. package/dist/js/index.js.map +1 -1
  12. package/dist/js/integrations/default.d.ts.map +1 -1
  13. package/dist/js/integrations/default.js +4 -4
  14. package/dist/js/integrations/default.js.map +1 -1
  15. package/dist/js/integrations/exports.d.ts +2 -1
  16. package/dist/js/integrations/exports.d.ts.map +1 -1
  17. package/dist/js/integrations/exports.js +2 -1
  18. package/dist/js/integrations/exports.js.map +1 -1
  19. package/dist/js/options.d.ts +6 -2
  20. package/dist/js/options.d.ts.map +1 -1
  21. package/dist/js/options.js.map +1 -1
  22. package/dist/js/profiling/integration.js.map +1 -1
  23. package/dist/js/replay/networkUtils.d.ts +0 -1
  24. package/dist/js/replay/networkUtils.d.ts.map +1 -1
  25. package/dist/js/sdk.d.ts +4 -0
  26. package/dist/js/sdk.d.ts.map +1 -1
  27. package/dist/js/sdk.js +8 -0
  28. package/dist/js/sdk.js.map +1 -1
  29. package/dist/js/tools/metroconfig.d.ts +1 -1
  30. package/dist/js/tools/metroconfig.d.ts.map +1 -1
  31. package/dist/js/tools/metroconfig.js.map +1 -1
  32. package/dist/js/tools/sentryMetroSerializer.d.ts.map +1 -1
  33. package/dist/js/tools/sentryMetroSerializer.js +1 -0
  34. package/dist/js/tools/sentryMetroSerializer.js.map +1 -1
  35. package/dist/js/tools/utils.d.ts.map +1 -1
  36. package/dist/js/tools/utils.js +1 -1
  37. package/dist/js/tools/utils.js.map +1 -1
  38. package/dist/js/tools/vendor/metro/utils.d.ts.map +1 -1
  39. package/dist/js/tools/vendor/metro/utils.js +3 -0
  40. package/dist/js/tools/vendor/metro/utils.js.map +1 -1
  41. package/dist/js/tracing/integrations/nativeFrames.d.ts +1 -0
  42. package/dist/js/tracing/integrations/nativeFrames.d.ts.map +1 -1
  43. package/dist/js/tracing/integrations/nativeFrames.js +132 -193
  44. package/dist/js/tracing/integrations/nativeFrames.js.map +1 -1
  45. package/dist/js/tracing/reactnativetracing.js +1 -1
  46. package/dist/js/tracing/reactnativetracing.js.map +1 -1
  47. package/dist/js/tracing/reactnavigation.d.ts.map +1 -1
  48. package/dist/js/tracing/reactnavigation.js.map +1 -1
  49. package/dist/js/tracing/timetodisplaynative.types.d.ts +0 -1
  50. package/dist/js/tracing/timetodisplaynative.types.d.ts.map +1 -1
  51. package/dist/js/utils/AsyncExpiringMap.d.ts +56 -0
  52. package/dist/js/utils/AsyncExpiringMap.d.ts.map +1 -0
  53. package/dist/js/utils/AsyncExpiringMap.js +130 -0
  54. package/dist/js/utils/AsyncExpiringMap.js.map +1 -0
  55. package/dist/js/vendor/react-native/index.d.ts +0 -1
  56. package/dist/js/vendor/react-native/index.d.ts.map +1 -1
  57. package/dist/js/vendor/react-native/index.js.map +1 -1
  58. package/dist/js/version.d.ts +1 -1
  59. package/dist/js/version.js +1 -1
  60. package/dist/js/version.js.map +1 -1
  61. package/dist/js/wrapper.d.ts +1 -0
  62. package/dist/js/wrapper.d.ts.map +1 -1
  63. package/dist/js/wrapper.js +12 -0
  64. package/dist/js/wrapper.js.map +1 -1
  65. package/ios/RNSentry.mm +6 -4
  66. package/ios/RNSentryReplay.m +4 -0
  67. package/package.json +24 -26
  68. package/plugin/build/utils.js +6 -6
  69. package/plugin/build/withSentry.js +2 -2
  70. package/plugin/build/withSentryAndroid.js +2 -2
  71. package/plugin/build/withSentryIOS.js +3 -3
  72. package/src/js/NativeRNSentry.ts +1 -0
  73. package/ts3.8/dist/js/NativeRNSentry.d.ts +1 -0
  74. package/ts3.8/dist/js/index.d.ts +1 -1
  75. package/ts3.8/dist/js/integrations/exports.d.ts +2 -1
  76. package/ts3.8/dist/js/options.d.ts +6 -2
  77. package/ts3.8/dist/js/replay/networkUtils.d.ts +0 -1
  78. package/ts3.8/dist/js/sdk.d.ts +4 -0
  79. package/ts3.8/dist/js/tracing/integrations/nativeFrames.d.ts +1 -0
  80. package/ts3.8/dist/js/tracing/timetodisplaynative.types.d.ts +0 -1
  81. package/ts3.8/dist/js/utils/AsyncExpiringMap.d.ts +56 -0
  82. package/ts3.8/dist/js/vendor/react-native/index.d.ts +0 -1
  83. package/ts3.8/dist/js/version.d.ts +1 -1
  84. package/ts3.8/dist/js/wrapper.d.ts +1 -0
  85. package/CHANGELOG.md +0 -3332
  86. package/android/.gitignore +0 -302
  87. package/samples/react-native/react-native.config.js +0 -17
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@sentry/react-native",
3
3
  "homepage": "https://github.com/getsentry/sentry-react-native",
4
4
  "repository": "https://github.com/getsentry/sentry-react-native",
5
- "version": "6.0.0-alpha.0",
5
+ "version": "6.0.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,30 +18,28 @@
18
18
  },
19
19
  "main": "dist/js/index.js",
20
20
  "scripts": {
21
- "build": "yarn build:sdk && yarn downlevel && yarn build:tools && yarn build:plugin",
21
+ "build": "npx run-s build:sdk downlevel build:tools 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
25
  "build:tools:watch": "tsc -p tsconfig.build.tools.json -w --preserveWatchOutput",
26
26
  "build:plugin": "EXPO_NONINTERACTIVE=true expo-module build plugin",
27
+ "build:tarball": "bash scripts/build-tarball.sh",
27
28
  "downlevel": "downlevel-dts dist ts3.8/dist --to=3.8",
28
29
  "clean": "rimraf dist coverage && yarn clean:plugin",
29
30
  "clean:plugin": "expo-module clean plugin",
30
31
  "circularDepCheck": "madge --circular dist/js/index.js && madge --circular metro.js && madge --circular expo.js",
31
32
  "test": "yarn test:sdk && yarn test:tools",
32
- "test:sdk": "jest",
33
- "test:tools": "jest --config jest.config.tools.js",
34
- "fix": "yarn fix:eslint && yarn fix:prettier",
33
+ "test:sdk": "npx jest",
34
+ "test:tools": "npx jest --config jest.config.tools.js",
35
+ "test:watch": "npx jest --watch",
36
+ "yalc:add:sentry-javascript": "yalc add @sentry/browser @sentry/core @sentry/react @sentry/types @sentry/utils",
37
+ "fix": "npx run-s fix:eslint fix:prettier",
35
38
  "fix:eslint": "eslint --config .eslintrc.js --fix .",
36
- "fix:prettier": "prettier --write \"{src,test,scripts,plugin/src}/**/**.ts\"",
37
- "lint": "yarn lint:eslint && yarn lint:prettier",
39
+ "fix:prettier": "prettier --config ../../.prettierrc.json --ignore-path ../../.prettierignore --write \"{src,test,scripts,plugin/src}/**/**.ts\"",
40
+ "lint": "npx run-s lint:eslint lint:prettier",
38
41
  "lint:eslint": "eslint --config .eslintrc.js .",
39
- "lint:prettier": "prettier --check \"{src,test,scripts,plugin/src}/**/**.ts\"",
40
- "test:watch": "jest --watch",
41
- "run-ios": "cd samples/react-native && yarn react-native run-ios",
42
- "run-android": "cd samples/react-native && yarn react-native run-android",
43
- "yalc:add:sentry-javascript": "yalc add @sentry/browser @sentry/core @sentry/react @sentry/types @sentry/utils",
44
- "set-version-samples": "bash scripts/set-version-samples.sh"
42
+ "lint:prettier": "prettier --config ../../.prettierrc.json --ignore-path ../../.prettierignore --check \"{src,test,scripts,plugin/src}/**/**.ts\""
45
43
  },
46
44
  "bin": {
47
45
  "sentry-expo-upload-sourcemaps": "scripts/expo-upload-sourcemaps.js"
@@ -68,27 +66,30 @@
68
66
  },
69
67
  "dependencies": {
70
68
  "@sentry/babel-plugin-component-annotate": "2.20.1",
71
- "@sentry/browser": "8.11.0",
72
- "@sentry/cli": "2.31.2",
73
- "@sentry/core": "8.11.0",
74
- "@sentry/react": "8.11.0",
75
- "@sentry/types": "8.11.0",
76
- "@sentry/utils": "8.11.0"
69
+ "@sentry/browser": "8.27.0",
70
+ "@sentry/cli": "2.34.0",
71
+ "@sentry/core": "8.27.0",
72
+ "@sentry/react": "8.27.0",
73
+ "@sentry/types": "8.27.0",
74
+ "@sentry/utils": "8.27.0"
77
75
  },
78
76
  "devDependencies": {
79
77
  "@babel/core": "^7.23.5",
80
78
  "@expo/metro-config": "0.17.5",
81
79
  "@mswjs/interceptors": "^0.25.15",
82
- "@sentry-internal/eslint-config-sdk": "8.11.0",
83
- "@sentry-internal/eslint-plugin-sdk": "8.11.0",
84
- "@sentry-internal/typescript": "8.11.0",
80
+ "@sentry-internal/eslint-config-sdk": "8.27.0",
81
+ "@sentry-internal/eslint-plugin-sdk": "8.27.0",
82
+ "@sentry-internal/typescript": "8.27.0",
85
83
  "@sentry/wizard": "3.16.3",
84
+ "@testing-library/react-native": "^12.6.1",
86
85
  "@types/jest": "^29.5.3",
87
86
  "@types/node": "^20.9.3",
88
87
  "@types/react": "^18.2.64",
89
88
  "@types/uglify-js": "^3.17.2",
90
89
  "@types/uuid": "^9.0.4",
91
90
  "@types/xmlhttprequest": "^1.8.2",
91
+ "@typescript-eslint/eslint-plugin": "^5.48.0",
92
+ "@typescript-eslint/parser": "^5.48.0",
92
93
  "babel-jest": "^29.6.2",
93
94
  "babel-plugin-module-resolver": "^5.0.0",
94
95
  "babel-preset-fbjs": "^3.4.0",
@@ -106,9 +107,7 @@
106
107
  "prettier": "^2.0.5",
107
108
  "react": "18.2.0",
108
109
  "react-native": "0.73.9",
109
- "react-native-version": "^4.0.0",
110
110
  "react-test-renderer": "^18.2.0",
111
- "replace-in-file": "^7.0.1",
112
111
  "rimraf": "^4.1.1",
113
112
  "ts-jest": "^29.1.1",
114
113
  "typescript": "4.9.5",
@@ -128,6 +127,5 @@
128
127
  "expo": {
129
128
  "optional": true
130
129
  }
131
- },
132
- "packageManager": "yarn@1.22.22"
130
+ }
133
131
  }
@@ -23,7 +23,12 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.SDK_PACKAGE_NAME = exports.sdkPackage = exports.bold = exports.yellow = exports.logPrefix = exports.warnOnce = exports.writeSentryPropertiesTo = void 0;
26
+ exports.SDK_PACKAGE_NAME = exports.sdkPackage = void 0;
27
+ exports.writeSentryPropertiesTo = writeSentryPropertiesTo;
28
+ exports.warnOnce = warnOnce;
29
+ exports.logPrefix = logPrefix;
30
+ exports.yellow = yellow;
31
+ exports.bold = bold;
27
32
  const fs = __importStar(require("fs"));
28
33
  const path = __importStar(require("path"));
29
34
  function writeSentryPropertiesTo(filepath, sentryProperties) {
@@ -32,7 +37,6 @@ function writeSentryPropertiesTo(filepath, sentryProperties) {
32
37
  }
33
38
  fs.writeFileSync(path.resolve(filepath, 'sentry.properties'), sentryProperties);
34
39
  }
35
- exports.writeSentryPropertiesTo = writeSentryPropertiesTo;
36
40
  const sdkPackage = require('../../package.json');
37
41
  exports.sdkPackage = sdkPackage;
38
42
  const SDK_PACKAGE_NAME = `${sdkPackage.name}/expo`;
@@ -45,11 +49,9 @@ function warnOnce(message) {
45
49
  console.warn(yellow(`${logPrefix()} ${message}`));
46
50
  }
47
51
  }
48
- exports.warnOnce = warnOnce;
49
52
  function logPrefix() {
50
53
  return `› ${bold('[@sentry/react-native/expo]')}`;
51
54
  }
52
- exports.logPrefix = logPrefix;
53
55
  /**
54
56
  * The same as `chalk.yellow`
55
57
  * This code is part of the SDK, we don't want to introduce a dependency on `chalk` just for this.
@@ -57,7 +59,6 @@ exports.logPrefix = logPrefix;
57
59
  function yellow(message) {
58
60
  return `\x1b[33m${message}\x1b[0m`;
59
61
  }
60
- exports.yellow = yellow;
61
62
  /**
62
63
  * The same as `chalk.bold`
63
64
  * This code is part of the SDK, we don't want to introduce a dependency on `chalk` just for this.
@@ -65,4 +66,3 @@ exports.yellow = yellow;
65
66
  function bold(message) {
66
67
  return `\x1b[1m${message}\x1b[22m`;
67
68
  }
68
- exports.bold = bold;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.withSentry = exports.getSentryProperties = void 0;
3
+ exports.withSentry = void 0;
4
+ exports.getSentryProperties = getSentryProperties;
4
5
  const config_plugins_1 = require("expo/config-plugins");
5
6
  const utils_1 = require("./utils");
6
7
  const withSentryAndroid_1 = require("./withSentryAndroid");
@@ -49,7 +50,6 @@ ${organization ? `defaults.org=${organization}` : missingOrgMessage}
49
50
  ${project ? `defaults.project=${project}` : missingProjectMessage}
50
51
  ${authToken ? `${existingAuthTokenMessage}\nauth.token=${authToken}` : missingAuthTokenMessage}`;
51
52
  }
52
- exports.getSentryProperties = getSentryProperties;
53
53
  // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
54
54
  const withSentry = (0, config_plugins_1.createRunOncePlugin)(withSentryPlugin, utils_1.sdkPackage.name, utils_1.sdkPackage.version);
55
55
  exports.withSentry = withSentry;
@@ -23,7 +23,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.modifyAppBuildGradle = exports.withSentryAndroid = void 0;
26
+ exports.withSentryAndroid = void 0;
27
+ exports.modifyAppBuildGradle = modifyAppBuildGradle;
27
28
  const config_plugins_1 = require("expo/config-plugins");
28
29
  const path = __importStar(require("path"));
29
30
  const utils_1 = require("./utils");
@@ -65,4 +66,3 @@ function modifyAppBuildGradle(buildGradle) {
65
66
  const applyFrom = `apply from: new File(${resolveSentryReactNativePackageJsonPath}, "sentry.gradle")`;
66
67
  return buildGradle.replace(pattern, match => `${applyFrom}\n\n${match}`);
67
68
  }
68
- exports.modifyAppBuildGradle = modifyAppBuildGradle;
@@ -23,7 +23,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.addSentryWithBundledScriptsToBundleShellScript = exports.modifyExistingXcodeBuildScript = exports.withSentryIOS = void 0;
26
+ exports.withSentryIOS = void 0;
27
+ exports.modifyExistingXcodeBuildScript = modifyExistingXcodeBuildScript;
28
+ exports.addSentryWithBundledScriptsToBundleShellScript = addSentryWithBundledScriptsToBundleShellScript;
27
29
  const config_plugins_1 = require("expo/config-plugins");
28
30
  const path = __importStar(require("path"));
29
31
  const utils_1 = require("./utils");
@@ -71,10 +73,8 @@ Run npx expo prebuild --clean`);
71
73
  const code = JSON.parse(script.shellScript);
72
74
  script.shellScript = JSON.stringify(addSentryWithBundledScriptsToBundleShellScript(code));
73
75
  }
74
- exports.modifyExistingXcodeBuildScript = modifyExistingXcodeBuildScript;
75
76
  function addSentryWithBundledScriptsToBundleShellScript(script) {
76
77
  return script.replace(/^.*?(packager|scripts)\/react-native-xcode\.sh\s*(\\'\\\\")?/m,
77
78
  // eslint-disable-next-line no-useless-escape
78
79
  (match) => `/bin/sh ${SENTRY_REACT_NATIVE_XCODE_PATH} ${match}`);
79
80
  }
80
- exports.addSentryWithBundledScriptsToBundleShellScript = addSentryWithBundledScriptsToBundleShellScript;
@@ -46,6 +46,7 @@ export interface Spec extends TurboModule {
46
46
  initNativeReactNavigationNewFrameTracking(): Promise<void>;
47
47
  captureReplay(isHardCrash: boolean): Promise<string | undefined | null>;
48
48
  getCurrentReplayId(): string | undefined | null;
49
+ crashedLastRun(): Promise<boolean | undefined | null>;
49
50
  }
50
51
 
51
52
  export type NativeStackFrame = {
@@ -41,6 +41,7 @@ export interface Spec extends TurboModule {
41
41
  initNativeReactNavigationNewFrameTracking(): Promise<void>;
42
42
  captureReplay(isHardCrash: boolean): Promise<string | undefined | null>;
43
43
  getCurrentReplayId(): string | undefined | null;
44
+ crashedLastRun(): Promise<boolean | undefined | null>;
44
45
  }
45
46
  export type NativeStackFrame = {
46
47
  platform: string;
@@ -5,7 +5,7 @@ export * from './integrations/exports';
5
5
  export { SDK_NAME, SDK_VERSION } from './version';
6
6
  export type { ReactNativeOptions } from './options';
7
7
  export { ReactNativeClient } from './client';
8
- export { init, wrap, nativeCrash, flush, close, captureUserFeedback, withScope } from './sdk';
8
+ export { init, wrap, nativeCrash, flush, close, captureUserFeedback, withScope, crashedLastRun } from './sdk';
9
9
  export { TouchEventBoundary, withTouchEventBoundary } from './touchevents';
10
10
  export { reactNativeTracingIntegration, getCurrentReactNativeTracingIntegration, getReactNativeTracingIntegration, reactNavigationIntegration, reactNativeNavigationIntegration, sentryTraceGesture, TimeToInitialDisplay, TimeToFullDisplay, startTimeToInitialDisplaySpan, startTimeToFullDisplaySpan, startIdleNavigationSpan, startIdleSpan, getDefaultIdleNavigationSpanOptions, } from './tracing';
11
11
  export type { TimeToDisplayProps } from './tracing';
@@ -14,8 +14,9 @@ export { expoContextIntegration } from './expocontext';
14
14
  export { spotlightIntegration } from './spotlight';
15
15
  export { mobileReplayIntegration } from '../replay/mobilereplay';
16
16
  export { appStartIntegration } from '../tracing/integrations/appStart';
17
- export { nativeFramesIntegration } from '../tracing/integrations/nativeFrames';
17
+ export { nativeFramesIntegration, createNativeFramesIntegrations } from '../tracing/integrations/nativeFrames';
18
18
  export { stallTrackingIntegration } from '../tracing/integrations/stalltracking';
19
19
  export { userInteractionIntegration } from '../tracing/integrations/userInteraction';
20
+ export { createReactNativeRewriteFrames } from './rewriteframes';
20
21
  export { breadcrumbsIntegration, browserApiErrorsIntegration, dedupeIntegration, functionToStringIntegration, globalHandlersIntegration as browserGlobalHandlersIntegration, httpClientIntegration, httpContextIntegration, inboundFiltersIntegration, linkedErrorsIntegration as browserLinkedErrorsIntegration, rewriteFramesIntegration, replayIntegration as browserReplayIntegration, } from '@sentry/react';
21
22
  //# sourceMappingURL=exports.d.ts.map
@@ -1,7 +1,10 @@
1
- import type { BrowserTransportOptions } from '@sentry/browser/types/transports/types';
2
- import type { ProfilerProps } from '@sentry/react/types/profiler';
1
+ import type { makeFetchTransport } from '@sentry/browser';
2
+ import type { Profiler } from '@sentry/react';
3
3
  import type { CaptureContext, ClientOptions, Event, EventHint, Options } from '@sentry/types';
4
+ import type * as React from 'react';
4
5
  import type { TouchEventBoundaryProps } from './touchevents';
6
+ type ProfilerProps = React.ComponentProps<typeof Profiler>;
7
+ type BrowserTransportOptions = Parameters<typeof makeFetchTransport>[0];
5
8
  export interface BaseReactNativeOptions {
6
9
  /**
7
10
  * Enables native transport + device info + offline caching.
@@ -258,4 +261,5 @@ export interface ReactNativeWrapperOptions {
258
261
  * environment.
259
262
  */
260
263
  export declare function shouldEnableNativeNagger(userOptions: unknown): boolean;
264
+ export {};
261
265
  //# sourceMappingURL=options.d.ts.map
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react-native" />
2
- /// <reference types="react" />
3
2
  /** Convert a Content-Length header to number/undefined. */
4
3
  export declare function parseContentLengthHeader(header: string | null | undefined): number | undefined;
5
4
  export type RequestBody = null | Blob | FormData | URLSearchParams | string | ArrayBuffer | undefined;
@@ -41,4 +41,8 @@ export declare function captureUserFeedback(feedback: UserFeedback): void;
41
41
  * @param callback that will be enclosed into push/popScope.
42
42
  */
43
43
  export declare function withScope<T>(callback: (scope: Scope) => T): T | undefined;
44
+ /**
45
+ * Returns if the app crashed in the last run.
46
+ */
47
+ export declare function crashedLastRun(): Promise<boolean | null>;
44
48
  //# sourceMappingURL=sdk.d.ts.map
@@ -13,6 +13,7 @@ export interface FramesMeasurements extends Measurements {
13
13
  unit: MeasurementUnit;
14
14
  };
15
15
  }
16
+ export declare const createNativeFramesIntegrations: (enable: boolean | undefined) => Integration | undefined;
16
17
  /**
17
18
  * Instrumentation to add native slow/frozen frames measurements onto transactions.
18
19
  */
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export interface RNSentryOnDrawNextFrameEvent {
3
2
  newFrameTimestampInSeconds: number;
4
3
  type: 'initialDisplay' | 'fullDisplay';
@@ -0,0 +1,56 @@
1
+ /**
2
+ * A Map that automatically removes entries after their TTL has expired.
3
+ *
4
+ * The map is Promise-aware, meaning it will start TTL countdown only after the promise has resolved.
5
+ */
6
+ export declare class AsyncExpiringMap<K, V> {
7
+ private _ttl;
8
+ private _cleanupIntervalMs;
9
+ private _map;
10
+ private _cleanupInterval;
11
+ constructor({ cleanupInterval, ttl, }?: {
12
+ cleanupInterval?: number;
13
+ ttl?: number;
14
+ });
15
+ /**
16
+ * Set a key-value pair.
17
+ */
18
+ set(key: K, promise: PromiseLike<V> | V): void;
19
+ /**
20
+ * Pops a key-value pair.
21
+ */
22
+ pop(key: K): PromiseLike<V> | V | undefined;
23
+ /**
24
+ * Get a value by key.
25
+ *
26
+ * If the values is expired it will be returned and removed from the map.
27
+ */
28
+ get(key: K): PromiseLike<V> | V | undefined;
29
+ /**
30
+ * Check if a key exists in the map.
31
+ *
32
+ * If the key is expired it's not present in the map.
33
+ */
34
+ has(key: K): boolean;
35
+ /**
36
+ * Get the remaining time to live of a key.
37
+ */
38
+ ttl(key: K): number | undefined;
39
+ /**
40
+ * Remove expired entries.
41
+ */
42
+ cleanup(): void;
43
+ /**
44
+ * Clear all entries.
45
+ */
46
+ clear(): void;
47
+ /**
48
+ * Stop the cleanup interval.
49
+ */
50
+ stopCleanup(): void;
51
+ /**
52
+ * Start the cleanup interval.
53
+ */
54
+ startCleanup(): void;
55
+ }
56
+ //# sourceMappingURL=AsyncExpiringMap.d.ts.map
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export type StackFrame = {
3
2
  column?: number;
4
3
  file?: string;
@@ -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 = "6.0.0-alpha.0";
3
+ export declare const SDK_VERSION = "6.0.0-alpha.2";
4
4
  //# sourceMappingURL=version.d.ts.map
@@ -69,6 +69,7 @@ interface SentryNativeWrapper {
69
69
  initNativeReactNavigationNewFrameTracking(): Promise<void>;
70
70
  captureReplay(isHardCrash: boolean): Promise<string | null>;
71
71
  getCurrentReplayId(): string | null;
72
+ crashedLastRun(): Promise<boolean | null>;
72
73
  }
73
74
  /**
74
75
  * Our internal interface for calling native functions