@sentry/react-native 8.3.0 → 8.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/RNSentry.podspec +1 -1
- package/android/build.gradle +2 -2
- package/android/libs/replay-stubs.jar +0 -0
- package/android/replay-stubs/build.gradle +1 -1
- package/android/src/main/java/io/sentry/react/RNSentryModuleImpl.java +56 -4
- package/android/src/main/java/io/sentry/react/RNSentryStart.java +13 -0
- package/android/src/main/java/io/sentry/react/RNSentryVersion.java +1 -1
- package/android/src/newarch/java/io/sentry/react/RNSentryModule.java +10 -0
- package/android/src/oldarch/java/io/sentry/react/RNSentryModule.java +10 -0
- package/dist/js/NativeRNSentry.d.ts +2 -0
- package/dist/js/NativeRNSentry.d.ts.map +1 -1
- package/dist/js/NativeRNSentry.js.map +1 -1
- package/dist/js/feedback/FeedbackWidgetManager.d.ts +3 -1
- package/dist/js/feedback/FeedbackWidgetManager.d.ts.map +1 -1
- package/dist/js/feedback/FeedbackWidgetManager.js +15 -1
- package/dist/js/feedback/FeedbackWidgetManager.js.map +1 -1
- package/dist/js/feedback/FeedbackWidgetProvider.d.ts +3 -2
- package/dist/js/feedback/FeedbackWidgetProvider.d.ts.map +1 -1
- package/dist/js/feedback/FeedbackWidgetProvider.js +12 -4
- package/dist/js/feedback/FeedbackWidgetProvider.js.map +1 -1
- package/dist/js/feedback/ShakeToReportBug.d.ts +27 -0
- package/dist/js/feedback/ShakeToReportBug.d.ts.map +1 -0
- package/dist/js/feedback/ShakeToReportBug.js +83 -0
- package/dist/js/feedback/ShakeToReportBug.js.map +1 -0
- package/dist/js/feedback/integration.d.ts +11 -0
- package/dist/js/feedback/integration.d.ts.map +1 -1
- package/dist/js/feedback/integration.js +7 -1
- package/dist/js/feedback/integration.js.map +1 -1
- package/dist/js/index.d.ts +3 -3
- package/dist/js/index.d.ts.map +1 -1
- package/dist/js/index.js +2 -2
- package/dist/js/index.js.map +1 -1
- package/dist/js/integrations/debugsymbolicator.js +3 -1
- package/dist/js/integrations/debugsymbolicator.js.map +1 -1
- package/dist/js/integrations/default.d.ts.map +1 -1
- package/dist/js/integrations/default.js +2 -1
- package/dist/js/integrations/default.js.map +1 -1
- package/dist/js/integrations/expocontext.d.ts.map +1 -1
- package/dist/js/integrations/expocontext.js +35 -1
- package/dist/js/integrations/expocontext.js.map +1 -1
- package/dist/js/integrations/exports.d.ts +1 -0
- package/dist/js/integrations/exports.d.ts.map +1 -1
- package/dist/js/integrations/exports.js +1 -0
- package/dist/js/integrations/exports.js.map +1 -1
- package/dist/js/integrations/expoupdateslistener.d.ts +38 -0
- package/dist/js/integrations/expoupdateslistener.d.ts.map +1 -0
- package/dist/js/integrations/expoupdateslistener.js +130 -0
- package/dist/js/integrations/expoupdateslistener.js.map +1 -0
- package/dist/js/misc.js +2 -2
- package/dist/js/misc.js.map +1 -1
- package/dist/js/options.d.ts +12 -0
- package/dist/js/options.d.ts.map +1 -1
- package/dist/js/options.js.map +1 -1
- package/dist/js/sdk.d.ts.map +1 -1
- package/dist/js/sdk.js +3 -2
- package/dist/js/sdk.js.map +1 -1
- package/dist/js/tools/metroconfig.d.ts +4 -0
- package/dist/js/tools/metroconfig.d.ts.map +1 -1
- package/dist/js/tools/metroconfig.js +46 -1
- package/dist/js/tools/metroconfig.js.map +1 -1
- package/dist/js/tools/utils.d.ts.map +1 -1
- package/dist/js/tools/utils.js +2 -3
- package/dist/js/tools/utils.js.map +1 -1
- package/dist/js/tracing/expoAsset.d.ts +42 -0
- package/dist/js/tracing/expoAsset.d.ts.map +1 -0
- package/dist/js/tracing/expoAsset.js +60 -0
- package/dist/js/tracing/expoAsset.js.map +1 -0
- package/dist/js/tracing/expoImage.d.ts +61 -0
- package/dist/js/tracing/expoImage.d.ts.map +1 -0
- package/dist/js/tracing/expoImage.js +101 -0
- package/dist/js/tracing/expoImage.js.map +1 -0
- package/dist/js/tracing/index.d.ts +4 -0
- package/dist/js/tracing/index.d.ts.map +1 -1
- package/dist/js/tracing/index.js +2 -0
- package/dist/js/tracing/index.js.map +1 -1
- package/dist/js/tracing/integrations/appStart.d.ts +8 -0
- package/dist/js/tracing/integrations/appStart.d.ts.map +1 -1
- package/dist/js/tracing/integrations/appStart.js +56 -7
- package/dist/js/tracing/integrations/appStart.js.map +1 -1
- package/dist/js/tracing/integrations/nativeFrames.d.ts.map +1 -1
- package/dist/js/tracing/integrations/nativeFrames.js +32 -22
- package/dist/js/tracing/integrations/nativeFrames.js.map +1 -1
- package/dist/js/tracing/integrations/timeToDisplayIntegration.d.ts.map +1 -1
- package/dist/js/tracing/integrations/timeToDisplayIntegration.js +1 -0
- package/dist/js/tracing/integrations/timeToDisplayIntegration.js.map +1 -1
- package/dist/js/tracing/origin.d.ts +2 -0
- package/dist/js/tracing/origin.d.ts.map +1 -1
- package/dist/js/tracing/origin.js +2 -0
- package/dist/js/tracing/origin.js.map +1 -1
- package/dist/js/tracing/reactnativenavigation.js +1 -1
- package/dist/js/tracing/reactnativenavigation.js.map +1 -1
- package/dist/js/tracing/reactnavigation.d.ts.map +1 -1
- package/dist/js/tracing/reactnavigation.js +12 -5
- package/dist/js/tracing/reactnavigation.js.map +1 -1
- package/dist/js/tracing/utils.d.ts +27 -1
- package/dist/js/tracing/utils.d.ts.map +1 -1
- package/dist/js/tracing/utils.js +66 -1
- package/dist/js/tracing/utils.js.map +1 -1
- package/dist/js/utils/ignorerequirecyclelogs.js +1 -1
- package/dist/js/utils/ignorerequirecyclelogs.js.map +1 -1
- package/dist/js/utils/safe.d.ts +1 -1
- package/dist/js/utils/safe.d.ts.map +1 -1
- package/dist/js/utils/safe.js.map +1 -1
- package/dist/js/version.d.ts +1 -1
- package/dist/js/version.js +1 -1
- package/dist/js/version.js.map +1 -1
- package/ios/RNSentry.mm +47 -1
- package/ios/RNSentryEvents.h +1 -0
- package/ios/RNSentryEvents.m +1 -0
- package/ios/RNSentryVersion.m +1 -1
- package/package.json +14 -14
- package/plugin/build/utils.d.ts +1 -0
- package/plugin/build/utils.js +19 -1
- package/plugin/build/withSentry.d.ts +1 -0
- package/plugin/build/withSentry.js +29 -1
- package/plugin/build/withSentryAndroidGradlePlugin.d.ts +1 -1
- package/plugin/build/withSentryAndroidGradlePlugin.js +1 -1
- package/scripts/sentry-xcode.sh +14 -0
- package/sentry.gradle +13 -0
- package/src/js/NativeRNSentry.ts +2 -0
- package/ts3.8/dist/js/NativeRNSentry.d.ts +2 -0
- package/ts3.8/dist/js/feedback/FeedbackWidgetManager.d.ts +3 -1
- package/ts3.8/dist/js/feedback/FeedbackWidgetProvider.d.ts +3 -2
- package/ts3.8/dist/js/feedback/ShakeToReportBug.d.ts +27 -0
- package/ts3.8/dist/js/feedback/integration.d.ts +11 -0
- package/ts3.8/dist/js/index.d.ts +3 -3
- package/ts3.8/dist/js/integrations/exports.d.ts +1 -0
- package/ts3.8/dist/js/integrations/expoupdateslistener.d.ts +38 -0
- package/ts3.8/dist/js/options.d.ts +12 -0
- package/ts3.8/dist/js/tracing/expoAsset.d.ts +42 -0
- package/ts3.8/dist/js/tracing/expoImage.d.ts +61 -0
- package/ts3.8/dist/js/tracing/index.d.ts +4 -0
- package/ts3.8/dist/js/tracing/integrations/appStart.d.ts +8 -0
- package/ts3.8/dist/js/tracing/origin.d.ts +2 -0
- package/ts3.8/dist/js/tracing/utils.d.ts +27 -1
- package/ts3.8/dist/js/utils/safe.d.ts +1 -1
- package/ts3.8/dist/js/version.d.ts +1 -1
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": "8.
|
|
5
|
+
"version": "8.5.0",
|
|
6
6
|
"description": "Official Sentry SDK for react-native",
|
|
7
7
|
"typings": "dist/js/index.d.ts",
|
|
8
8
|
"types": "dist/js/index.d.ts",
|
|
@@ -38,10 +38,10 @@
|
|
|
38
38
|
"test:watch": "npx jest --watch",
|
|
39
39
|
"yalc:add:sentry-javascript": "yalc add @sentry/browser @sentry/core @sentry/react @sentry/types",
|
|
40
40
|
"fix": "npx run-s fix:eslint fix:prettier",
|
|
41
|
-
"fix:eslint": "eslint --config .eslintrc.js --fix .",
|
|
41
|
+
"fix:eslint": "ESLINT_USE_FLAT_CONFIG=false eslint --config .eslintrc.js --fix .",
|
|
42
42
|
"fix:prettier": "prettier --config ../../.prettierrc.json --ignore-path ../../.prettierignore --write \"{src,test,scripts,plugin/src}/**/**.ts\"",
|
|
43
43
|
"lint": "npx run-s lint:eslint lint:prettier",
|
|
44
|
-
"lint:eslint": "eslint --config .eslintrc.js .",
|
|
44
|
+
"lint:eslint": "ESLINT_USE_FLAT_CONFIG=false eslint --config .eslintrc.js .",
|
|
45
45
|
"lint:prettier": "prettier --config ../../.prettierrc.json --ignore-path ../../.prettierignore --check \"{src,test,scripts,plugin/src}/**/**.ts\""
|
|
46
46
|
},
|
|
47
47
|
"bin": {
|
|
@@ -72,20 +72,20 @@
|
|
|
72
72
|
},
|
|
73
73
|
"dependencies": {
|
|
74
74
|
"@sentry/babel-plugin-component-annotate": "5.1.1",
|
|
75
|
-
"@sentry/browser": "10.
|
|
76
|
-
"@sentry/cli": "3.3.
|
|
77
|
-
"@sentry/core": "10.
|
|
78
|
-
"@sentry/react": "10.
|
|
79
|
-
"@sentry/types": "10.
|
|
75
|
+
"@sentry/browser": "10.44.0",
|
|
76
|
+
"@sentry/cli": "3.3.3",
|
|
77
|
+
"@sentry/core": "10.44.0",
|
|
78
|
+
"@sentry/react": "10.44.0",
|
|
79
|
+
"@sentry/types": "10.44.0"
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
|
82
82
|
"@babel/core": "^7.26.7",
|
|
83
83
|
"@expo/metro-config": "~0.20.0",
|
|
84
84
|
"@mswjs/interceptors": "^0.25.15",
|
|
85
85
|
"@react-native/babel-preset": "0.80.0",
|
|
86
|
-
"@sentry-internal/eslint-config-sdk": "10.
|
|
87
|
-
"@sentry-internal/eslint-plugin-sdk": "10.
|
|
88
|
-
"@sentry-internal/typescript": "10.
|
|
86
|
+
"@sentry-internal/eslint-config-sdk": "10.44.0",
|
|
87
|
+
"@sentry-internal/eslint-plugin-sdk": "10.44.0",
|
|
88
|
+
"@sentry-internal/typescript": "10.44.0",
|
|
89
89
|
"@sentry/wizard": "6.12.0",
|
|
90
90
|
"@testing-library/react-native": "^13.2.2",
|
|
91
91
|
"@types/jest": "^29.5.13",
|
|
@@ -95,13 +95,13 @@
|
|
|
95
95
|
"@types/uglify-js": "^3.17.2",
|
|
96
96
|
"@types/uuid": "^9.0.4",
|
|
97
97
|
"@types/xmlhttprequest": "^1.8.2",
|
|
98
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
99
|
-
"@typescript-eslint/parser": "^
|
|
98
|
+
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
99
|
+
"@typescript-eslint/parser": "^8.0.0",
|
|
100
100
|
"babel-jest": "^29.6.3",
|
|
101
101
|
"babel-plugin-module-resolver": "^5.0.0",
|
|
102
102
|
"babel-preset-fbjs": "^3.4.0",
|
|
103
103
|
"downlevel-dts": "^0.11.0",
|
|
104
|
-
"eslint": "^
|
|
104
|
+
"eslint": "^9.0.0",
|
|
105
105
|
"eslint-plugin-react": "^7.37.0",
|
|
106
106
|
"eslint-plugin-react-native": "^3.8.1",
|
|
107
107
|
"expo": "^53.0.0",
|
package/plugin/build/utils.d.ts
CHANGED
package/plugin/build/utils.js
CHANGED
|
@@ -23,9 +23,10 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.writeSentryPropertiesTo = void 0;
|
|
26
|
+
exports.writeSentryOptions = exports.writeSentryPropertiesTo = void 0;
|
|
27
27
|
const fs = __importStar(require("fs"));
|
|
28
28
|
const path = __importStar(require("path"));
|
|
29
|
+
const logger_1 = require("./logger");
|
|
29
30
|
function writeSentryPropertiesTo(filepath, sentryProperties) {
|
|
30
31
|
if (!fs.existsSync(filepath)) {
|
|
31
32
|
throw new Error(`Directory '${filepath}' does not exist.`);
|
|
@@ -33,3 +34,20 @@ function writeSentryPropertiesTo(filepath, sentryProperties) {
|
|
|
33
34
|
fs.writeFileSync(path.resolve(filepath, 'sentry.properties'), sentryProperties);
|
|
34
35
|
}
|
|
35
36
|
exports.writeSentryPropertiesTo = writeSentryPropertiesTo;
|
|
37
|
+
const SENTRY_OPTIONS_FILE_NAME = 'sentry.options.json';
|
|
38
|
+
function writeSentryOptions(projectRoot, pluginOptions) {
|
|
39
|
+
const optionsFilePath = path.resolve(projectRoot, SENTRY_OPTIONS_FILE_NAME);
|
|
40
|
+
let existingOptions = {};
|
|
41
|
+
if (fs.existsSync(optionsFilePath)) {
|
|
42
|
+
try {
|
|
43
|
+
existingOptions = JSON.parse(fs.readFileSync(optionsFilePath, 'utf8'));
|
|
44
|
+
}
|
|
45
|
+
catch (e) {
|
|
46
|
+
(0, logger_1.warnOnce)(`Failed to parse ${SENTRY_OPTIONS_FILE_NAME}: ${e}. These options will not be set.`);
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
const mergedOptions = { ...existingOptions, ...pluginOptions };
|
|
51
|
+
fs.writeFileSync(optionsFilePath, `${JSON.stringify(mergedOptions, null, 2)}\n`);
|
|
52
|
+
}
|
|
53
|
+
exports.writeSentryOptions = writeSentryOptions;
|
|
@@ -6,6 +6,7 @@ interface PluginProps {
|
|
|
6
6
|
authToken?: string;
|
|
7
7
|
url?: string;
|
|
8
8
|
useNativeInit?: boolean;
|
|
9
|
+
options?: Record<string, unknown>;
|
|
9
10
|
experimental_android?: SentryAndroidGradlePluginOptions;
|
|
10
11
|
}
|
|
11
12
|
export declare function getSentryProperties(props: PluginProps | void): string | null;
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.withSentry = exports.getSentryProperties = void 0;
|
|
4
4
|
const config_plugins_1 = require("expo/config-plugins");
|
|
5
5
|
const logger_1 = require("./logger");
|
|
6
|
+
const utils_1 = require("./utils");
|
|
6
7
|
const version_1 = require("./version");
|
|
7
8
|
const withSentryAndroid_1 = require("./withSentryAndroid");
|
|
8
9
|
const withSentryAndroidGradlePlugin_1 = require("./withSentryAndroidGradlePlugin");
|
|
@@ -14,6 +15,14 @@ const withSentryPlugin = (config, props) => {
|
|
|
14
15
|
delete props.authToken;
|
|
15
16
|
}
|
|
16
17
|
let cfg = config;
|
|
18
|
+
const pluginOptions = props?.options ? { ...props.options } : {};
|
|
19
|
+
const environment = process.env.SENTRY_ENVIRONMENT;
|
|
20
|
+
if (environment) {
|
|
21
|
+
pluginOptions.environment = environment;
|
|
22
|
+
}
|
|
23
|
+
if (Object.keys(pluginOptions).length > 0) {
|
|
24
|
+
cfg = withSentryOptionsFile(cfg, pluginOptions);
|
|
25
|
+
}
|
|
17
26
|
if (sentryProperties !== null) {
|
|
18
27
|
try {
|
|
19
28
|
cfg = (0, withSentryAndroid_1.withSentryAndroid)(cfg, { sentryProperties, useNativeInit: props?.useNativeInit });
|
|
@@ -22,7 +31,7 @@ const withSentryPlugin = (config, props) => {
|
|
|
22
31
|
(0, logger_1.warnOnce)(`There was a problem with configuring your native Android project: ${e}`);
|
|
23
32
|
}
|
|
24
33
|
// if `enableAndroidGradlePlugin` is provided configure the Sentry Android Gradle Plugin
|
|
25
|
-
if (props?.experimental_android
|
|
34
|
+
if (props?.experimental_android?.enableAndroidGradlePlugin) {
|
|
26
35
|
try {
|
|
27
36
|
cfg = (0, withSentryAndroidGradlePlugin_1.withSentryAndroidGradlePlugin)(cfg, props.experimental_android);
|
|
28
37
|
}
|
|
@@ -61,6 +70,25 @@ ${project ? `defaults.project=${project}` : missingProjectMessage}
|
|
|
61
70
|
${authToken ? `${existingAuthTokenMessage}\nauth.token=${authToken}` : missingAuthTokenMessage}`;
|
|
62
71
|
}
|
|
63
72
|
exports.getSentryProperties = getSentryProperties;
|
|
73
|
+
function withSentryOptionsFile(config, pluginOptions) {
|
|
74
|
+
// withDangerousMod requires a platform key, but sentry.options.json is at the project root.
|
|
75
|
+
// We apply to both platforms so it works with `expo prebuild --platform ios` or `--platform android`.
|
|
76
|
+
let cfg = (0, config_plugins_1.withDangerousMod)(config, [
|
|
77
|
+
'android',
|
|
78
|
+
mod => {
|
|
79
|
+
(0, utils_1.writeSentryOptions)(mod.modRequest.projectRoot, pluginOptions);
|
|
80
|
+
return mod;
|
|
81
|
+
},
|
|
82
|
+
]);
|
|
83
|
+
cfg = (0, config_plugins_1.withDangerousMod)(cfg, [
|
|
84
|
+
'ios',
|
|
85
|
+
mod => {
|
|
86
|
+
(0, utils_1.writeSentryOptions)(mod.modRequest.projectRoot, pluginOptions);
|
|
87
|
+
return mod;
|
|
88
|
+
},
|
|
89
|
+
]);
|
|
90
|
+
return cfg;
|
|
91
|
+
}
|
|
64
92
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
65
93
|
const withSentry = (0, config_plugins_1.createRunOncePlugin)(withSentryPlugin, version_1.PLUGIN_NAME, version_1.PLUGIN_VERSION);
|
|
66
94
|
exports.withSentry = withSentry;
|
|
@@ -9,7 +9,7 @@ export interface SentryAndroidGradlePluginOptions {
|
|
|
9
9
|
includeNativeSources?: boolean;
|
|
10
10
|
includeSourceContext?: boolean;
|
|
11
11
|
}
|
|
12
|
-
export declare const sentryAndroidGradlePluginVersion = "6.
|
|
12
|
+
export declare const sentryAndroidGradlePluginVersion = "6.2.0";
|
|
13
13
|
/**
|
|
14
14
|
* Adds the Sentry Android Gradle Plugin to the project.
|
|
15
15
|
* https://docs.sentry.io/platforms/react-native/manual-setup/manual-setup/#enable-sentry-agp
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.withSentryAndroidGradlePlugin = exports.sentryAndroidGradlePluginVersion = void 0;
|
|
4
4
|
const config_plugins_1 = require("@expo/config-plugins");
|
|
5
5
|
const logger_1 = require("./logger");
|
|
6
|
-
exports.sentryAndroidGradlePluginVersion = '6.
|
|
6
|
+
exports.sentryAndroidGradlePluginVersion = '6.2.0';
|
|
7
7
|
/**
|
|
8
8
|
* Adds the Sentry Android Gradle Plugin to the project.
|
|
9
9
|
* https://docs.sentry.io/platforms/react-native/manual-setup/manual-setup/#enable-sentry-agp
|
package/scripts/sentry-xcode.sh
CHANGED
|
@@ -101,6 +101,20 @@ if [ "$SENTRY_COPY_OPTIONS_FILE" = true ]; then
|
|
|
101
101
|
echo "[Sentry] $SENTRY_OPTIONS_FILE_PATH not found. $SENTRY_OPTIONS_FILE_ERROR_MESSAGE_POSTFIX" 1>&2
|
|
102
102
|
else
|
|
103
103
|
cp "$SENTRY_OPTIONS_FILE_PATH" "$SENTRY_OPTIONS_FILE_DESTINATION_PATH"
|
|
104
|
+
|
|
105
|
+
if [ -n "$SENTRY_ENVIRONMENT" ]; then
|
|
106
|
+
if "$LOCAL_NODE_BINARY" -e "
|
|
107
|
+
var fs = require('fs');
|
|
108
|
+
var destPath = process.argv[1];
|
|
109
|
+
var opts = JSON.parse(fs.readFileSync(destPath, 'utf8'));
|
|
110
|
+
opts.environment = process.env.SENTRY_ENVIRONMENT;
|
|
111
|
+
fs.writeFileSync(destPath, JSON.stringify(opts));
|
|
112
|
+
" -- "$SENTRY_OPTIONS_FILE_DESTINATION_PATH" 2>/dev/null; then
|
|
113
|
+
echo "[Sentry] Overriding 'environment' from SENTRY_ENVIRONMENT environment variable"
|
|
114
|
+
else
|
|
115
|
+
echo "[Sentry] Failed to override environment, copied file as-is." 1>&2
|
|
116
|
+
fi
|
|
117
|
+
fi
|
|
104
118
|
echo "[Sentry] Copied $SENTRY_OPTIONS_FILE_PATH to $SENTRY_OPTIONS_FILE_DESTINATION_PATH"
|
|
105
119
|
fi
|
|
106
120
|
fi
|
package/sentry.gradle
CHANGED
|
@@ -44,6 +44,19 @@ tasks.register("copySentryJsonConfiguration") {
|
|
|
44
44
|
into androidAssetsDir
|
|
45
45
|
rename { String fileName -> configFile }
|
|
46
46
|
}
|
|
47
|
+
|
|
48
|
+
def sentryEnv = System.getenv('SENTRY_ENVIRONMENT')
|
|
49
|
+
if (sentryEnv) {
|
|
50
|
+
try {
|
|
51
|
+
def destFile = new File(androidAssetsDir, configFile)
|
|
52
|
+
def content = new groovy.json.JsonSlurper().parseText(destFile.text)
|
|
53
|
+
content.environment = sentryEnv
|
|
54
|
+
destFile.text = groovy.json.JsonOutput.toJson(content)
|
|
55
|
+
logger.lifecycle("Overriding 'environment' from SENTRY_ENVIRONMENT environment variable")
|
|
56
|
+
} catch (Exception e) {
|
|
57
|
+
logger.warn("Failed to override environment in ${configFile}: ${e.message}. Copied file as-is.")
|
|
58
|
+
}
|
|
59
|
+
}
|
|
47
60
|
logger.lifecycle("Copied ${configFile} to Android assets")
|
|
48
61
|
} else {
|
|
49
62
|
logger.warn("${configFile} not found in app root (${appRoot})")
|
package/src/js/NativeRNSentry.ts
CHANGED
|
@@ -54,6 +54,8 @@ export interface Spec extends TurboModule {
|
|
|
54
54
|
popTimeToDisplayFor(key: string): Promise<number | undefined | null>;
|
|
55
55
|
setActiveSpanId(spanId: string): boolean;
|
|
56
56
|
encodeToBase64(data: number[]): Promise<string | undefined | null>;
|
|
57
|
+
enableShakeDetection(): void;
|
|
58
|
+
disableShakeDetection(): void;
|
|
57
59
|
}
|
|
58
60
|
|
|
59
61
|
export type NativeStackFrame = {
|
|
@@ -50,6 +50,8 @@ export interface Spec extends TurboModule {
|
|
|
50
50
|
popTimeToDisplayFor(key: string): Promise<number | undefined | null>;
|
|
51
51
|
setActiveSpanId(spanId: string): boolean;
|
|
52
52
|
encodeToBase64(data: number[]): Promise<string | undefined | null>;
|
|
53
|
+
enableShakeDetection(): void;
|
|
54
|
+
disableShakeDetection(): void;
|
|
53
55
|
}
|
|
54
56
|
export type NativeStackFrame = {
|
|
55
57
|
platform: string;
|
|
@@ -49,5 +49,7 @@ declare const resetFeedbackButtonManager: () => void;
|
|
|
49
49
|
declare const showScreenshotButton: () => void;
|
|
50
50
|
declare const hideScreenshotButton: () => void;
|
|
51
51
|
declare const resetScreenshotButtonManager: () => void;
|
|
52
|
-
|
|
52
|
+
declare const enableFeedbackOnShake: () => void;
|
|
53
|
+
declare const disableFeedbackOnShake: () => void;
|
|
54
|
+
export { showFeedbackButton, hideFeedbackButton, showFeedbackWidget, enableFeedbackOnShake, disableFeedbackOnShake, showScreenshotButton, hideScreenshotButton, resetFeedbackButtonManager, resetFeedbackWidgetManager, resetScreenshotButtonManager };
|
|
53
55
|
//# sourceMappingURL=FeedbackWidgetManager.d.ts.map
|
|
@@ -21,14 +21,15 @@ export interface FeedbackWidgetProviderState {
|
|
|
21
21
|
export declare class FeedbackWidgetProvider extends React.Component<FeedbackWidgetProviderProps> {
|
|
22
22
|
state: FeedbackWidgetProviderState;
|
|
23
23
|
private _themeListener;
|
|
24
|
+
private _startedShakeListener;
|
|
24
25
|
private _panResponder;
|
|
25
26
|
constructor(props: FeedbackWidgetProviderProps);
|
|
26
27
|
/**
|
|
27
|
-
* Add a listener to the theme change event.
|
|
28
|
+
* Add a listener to the theme change event and start shake detection if configured.
|
|
28
29
|
*/
|
|
29
30
|
componentDidMount(): void;
|
|
30
31
|
/**
|
|
31
|
-
* Clean up the theme listener.
|
|
32
|
+
* Clean up the theme listener and stop shake detection.
|
|
32
33
|
*/
|
|
33
34
|
componentWillUnmount(): void;
|
|
34
35
|
/**
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { NativeModule } from 'react-native';
|
|
2
|
+
import { NativeEventEmitter } from 'react-native';
|
|
3
|
+
export declare const OnShakeEventName = "rn_sentry_on_shake";
|
|
4
|
+
/**
|
|
5
|
+
* Creates a NativeEventEmitter for the given module.
|
|
6
|
+
* Can be overridden in tests via the `createEmitter` parameter.
|
|
7
|
+
*/
|
|
8
|
+
type EmitterFactory = (nativeModule: NativeModule) => NativeEventEmitter;
|
|
9
|
+
/**
|
|
10
|
+
* Starts listening for device shake events and invokes the provided callback when a shake is detected.
|
|
11
|
+
*
|
|
12
|
+
* This starts native shake detection:
|
|
13
|
+
* - iOS: Uses UIKit's motion event detection (no permissions required)
|
|
14
|
+
* - Android: Uses the accelerometer sensor (no permissions required)
|
|
15
|
+
*/
|
|
16
|
+
export declare function startShakeListener(onShake: () => void, createEmitter?: EmitterFactory): boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Stops listening for device shake events.
|
|
19
|
+
*/
|
|
20
|
+
export declare function stopShakeListener(): void;
|
|
21
|
+
/**
|
|
22
|
+
* Returns whether the shake listener is currently active.
|
|
23
|
+
* Exported for testing purposes.
|
|
24
|
+
*/
|
|
25
|
+
export declare function isShakeListenerActive(): boolean;
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=ShakeToReportBug.d.ts.map
|
|
@@ -9,6 +9,7 @@ type FeedbackIntegration = Integration & {
|
|
|
9
9
|
colorScheme?: 'system' | 'light' | 'dark';
|
|
10
10
|
themeLight: Partial<FeedbackWidgetTheme>;
|
|
11
11
|
themeDark: Partial<FeedbackWidgetTheme>;
|
|
12
|
+
enableShakeToReport: boolean;
|
|
12
13
|
};
|
|
13
14
|
export declare const feedbackIntegration: (initOptions?: Partial<FeedbackWidgetProps> & {
|
|
14
15
|
buttonOptions?: FeedbackButtonProps;
|
|
@@ -16,6 +17,15 @@ export declare const feedbackIntegration: (initOptions?: Partial<FeedbackWidgetP
|
|
|
16
17
|
colorScheme?: 'system' | 'light' | 'dark';
|
|
17
18
|
themeLight?: Partial<FeedbackWidgetTheme>;
|
|
18
19
|
themeDark?: Partial<FeedbackWidgetTheme>;
|
|
20
|
+
/**
|
|
21
|
+
* Enable showing the feedback widget when the user shakes the device.
|
|
22
|
+
*
|
|
23
|
+
* - iOS: Uses UIKit's motion event detection (no permissions required)
|
|
24
|
+
* - Android: Uses the accelerometer sensor (no permissions required)
|
|
25
|
+
*
|
|
26
|
+
* @default false
|
|
27
|
+
*/
|
|
28
|
+
enableShakeToReport?: boolean;
|
|
19
29
|
}) => FeedbackIntegration;
|
|
20
30
|
export declare const getFeedbackOptions: () => Partial<FeedbackWidgetProps>;
|
|
21
31
|
export declare const getFeedbackButtonOptions: () => Partial<FeedbackButtonProps>;
|
|
@@ -23,5 +33,6 @@ export declare const getScreenshotButtonOptions: () => Partial<ScreenshotButtonP
|
|
|
23
33
|
export declare const getColorScheme: () => 'system' | 'light' | 'dark';
|
|
24
34
|
export declare const getFeedbackLightTheme: () => Partial<FeedbackWidgetTheme>;
|
|
25
35
|
export declare const getFeedbackDarkTheme: () => Partial<FeedbackWidgetTheme>;
|
|
36
|
+
export declare const isShakeToReportEnabled: () => boolean;
|
|
26
37
|
export {};
|
|
27
38
|
//# sourceMappingURL=integration.d.ts.map
|
package/ts3.8/dist/js/index.d.ts
CHANGED
|
@@ -9,11 +9,11 @@ export type { ReactNativeOptions, NativeLogEntry } from './options';
|
|
|
9
9
|
export { ReactNativeClient } from './client';
|
|
10
10
|
export { init, wrap, nativeCrash, flush, close, withScope, crashedLastRun } from './sdk';
|
|
11
11
|
export { TouchEventBoundary, withTouchEventBoundary } from './touchevents';
|
|
12
|
-
export { reactNativeTracingIntegration, getCurrentReactNativeTracingIntegration, getReactNativeTracingIntegration, reactNavigationIntegration, reactNativeNavigationIntegration, sentryTraceGesture, TimeToInitialDisplay, TimeToFullDisplay, startTimeToInitialDisplaySpan, startTimeToFullDisplaySpan, startIdleNavigationSpan, startIdleSpan, getDefaultIdleNavigationSpanOptions, createTimeToFullDisplay, createTimeToInitialDisplay, wrapExpoRouter, } from './tracing';
|
|
13
|
-
export type { TimeToDisplayProps, ExpoRouter } from './tracing';
|
|
12
|
+
export { reactNativeTracingIntegration, getCurrentReactNativeTracingIntegration, getReactNativeTracingIntegration, reactNavigationIntegration, reactNativeNavigationIntegration, sentryTraceGesture, TimeToInitialDisplay, TimeToFullDisplay, startTimeToInitialDisplaySpan, startTimeToFullDisplaySpan, startIdleNavigationSpan, startIdleSpan, getDefaultIdleNavigationSpanOptions, createTimeToFullDisplay, createTimeToInitialDisplay, wrapExpoRouter, wrapExpoImage, wrapExpoAsset, } from './tracing';
|
|
13
|
+
export type { TimeToDisplayProps, ExpoRouter, ExpoImage, ExpoAsset } from './tracing';
|
|
14
14
|
export { Mask, Unmask } from './replay/CustomMask';
|
|
15
15
|
export { FeedbackButton } from './feedback/FeedbackButton';
|
|
16
16
|
export { FeedbackWidget } from './feedback/FeedbackWidget';
|
|
17
|
-
export { showFeedbackWidget, showFeedbackButton, hideFeedbackButton } from './feedback/FeedbackWidgetManager';
|
|
17
|
+
export { showFeedbackWidget, showFeedbackButton, hideFeedbackButton, enableFeedbackOnShake, disableFeedbackOnShake, } from './feedback/FeedbackWidgetManager';
|
|
18
18
|
export { getDataFromUri } from './wrapper';
|
|
19
19
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -12,6 +12,7 @@ export { screenshotIntegration } from './screenshot';
|
|
|
12
12
|
export { viewHierarchyIntegration } from './viewhierarchy';
|
|
13
13
|
export { expoContextIntegration } from './expocontext';
|
|
14
14
|
export { expoConstantsIntegration } from './expoconstants';
|
|
15
|
+
export { expoUpdatesListenerIntegration } from './expoupdateslistener';
|
|
15
16
|
export { spotlightIntegration } from './spotlight';
|
|
16
17
|
export { mobileReplayIntegration } from '../replay/mobilereplay';
|
|
17
18
|
export { feedbackIntegration } from '../feedback/integration';
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { Integration } from '@sentry/core';
|
|
2
|
+
/**
|
|
3
|
+
* Describes the state machine context from `expo-updates`.
|
|
4
|
+
* We define our own minimal type to avoid a hard dependency on `expo-updates`.
|
|
5
|
+
*/
|
|
6
|
+
interface UpdatesNativeStateMachineContext {
|
|
7
|
+
isChecking: boolean;
|
|
8
|
+
isDownloading: boolean;
|
|
9
|
+
isUpdateAvailable: boolean;
|
|
10
|
+
isUpdatePending: boolean;
|
|
11
|
+
isRestarting: boolean;
|
|
12
|
+
latestManifest?: {
|
|
13
|
+
id?: string;
|
|
14
|
+
};
|
|
15
|
+
downloadedManifest?: {
|
|
16
|
+
id?: string;
|
|
17
|
+
};
|
|
18
|
+
rollback?: {
|
|
19
|
+
commitTime: string;
|
|
20
|
+
};
|
|
21
|
+
checkError?: Error;
|
|
22
|
+
downloadError?: Error;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Listens to Expo Updates native state machine changes and records
|
|
26
|
+
* breadcrumbs for meaningful transitions such as checking for updates,
|
|
27
|
+
* downloading updates, errors, rollbacks, and restarts.
|
|
28
|
+
*/
|
|
29
|
+
export declare const expoUpdatesListenerIntegration: () => Integration;
|
|
30
|
+
/**
|
|
31
|
+
* Compares previous and current state machine contexts and emits
|
|
32
|
+
* breadcrumbs for meaningful transitions (falsy→truthy).
|
|
33
|
+
*
|
|
34
|
+
* @internal Exposed for testing purposes
|
|
35
|
+
*/
|
|
36
|
+
export declare function handleStateChange(previous: Partial<UpdatesNativeStateMachineContext>, current: UpdatesNativeStateMachineContext): void;
|
|
37
|
+
export {};
|
|
38
|
+
//# sourceMappingURL=expoupdateslistener.d.ts.map
|
|
@@ -59,6 +59,18 @@ export interface BaseReactNativeOptions {
|
|
|
59
59
|
* @platform android
|
|
60
60
|
*/
|
|
61
61
|
enableNdkScopeSync?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* When enabled, ANR events whose stacktraces contain only system frames
|
|
64
|
+
* (e.g. `java.lang`, `android.os`) are assigned a static fingerprint and
|
|
65
|
+
* grouped into a single issue instead of creating many separate issues.
|
|
66
|
+
*
|
|
67
|
+
* Enabled by default in the Android SDK since v8.35.0.
|
|
68
|
+
* Set to `false` to restore per-stacktrace ANR grouping.
|
|
69
|
+
*
|
|
70
|
+
* @default true
|
|
71
|
+
* @platform android
|
|
72
|
+
*/
|
|
73
|
+
enableAnrFingerprinting?: boolean;
|
|
62
74
|
/**
|
|
63
75
|
* When enabled, all the threads are automatically attached to all logged events on Android
|
|
64
76
|
*
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal interface for expo-asset's Asset instance.
|
|
3
|
+
* We define this to avoid a hard dependency on expo-asset.
|
|
4
|
+
*/
|
|
5
|
+
export interface ExpoAssetInstance {
|
|
6
|
+
name: string;
|
|
7
|
+
type: string;
|
|
8
|
+
hash: string | null;
|
|
9
|
+
uri: string;
|
|
10
|
+
localUri: string | null;
|
|
11
|
+
width: number | null;
|
|
12
|
+
height: number | null;
|
|
13
|
+
downloaded: boolean;
|
|
14
|
+
downloadAsync(): Promise<ExpoAssetInstance>;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Represents the expo-asset `Asset` class with its static methods.
|
|
18
|
+
* We only describe the methods that we instrument.
|
|
19
|
+
*/
|
|
20
|
+
export interface ExpoAsset {
|
|
21
|
+
loadAsync(moduleId: number | number[] | string | string[]): Promise<ExpoAssetInstance[]>;
|
|
22
|
+
fromModule(virtualAssetModule: number | string): ExpoAssetInstance;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Wraps expo-asset's `Asset` class to add automated performance monitoring.
|
|
26
|
+
*
|
|
27
|
+
* This function instruments `Asset.loadAsync` static method
|
|
28
|
+
* to create performance spans that measure how long asset loading takes.
|
|
29
|
+
*
|
|
30
|
+
* @param assetClass - The `Asset` class from `expo-asset`
|
|
31
|
+
* @returns The same class with instrumented static methods
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```typescript
|
|
35
|
+
* import { Asset } from 'expo-asset';
|
|
36
|
+
* import * as Sentry from '@sentry/react-native';
|
|
37
|
+
*
|
|
38
|
+
* Sentry.wrapExpoAsset(Asset);
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
export declare function wrapExpoAsset<T extends ExpoAsset>(assetClass: T): T;
|
|
42
|
+
//# sourceMappingURL=expoAsset.d.ts.map
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal interface for expo-image's ImageSource.
|
|
3
|
+
* We define this to avoid a hard dependency on expo-image.
|
|
4
|
+
*/
|
|
5
|
+
interface ExpoImageSource {
|
|
6
|
+
uri?: string;
|
|
7
|
+
headers?: Record<string, string>;
|
|
8
|
+
width?: number | null;
|
|
9
|
+
height?: number | null;
|
|
10
|
+
cacheKey?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Internal interface for expo-image's ImageLoadOptions.
|
|
14
|
+
* We define this to avoid a hard dependency on expo-image.
|
|
15
|
+
*/
|
|
16
|
+
interface ExpoImageLoadOptions {
|
|
17
|
+
maxWidth?: number;
|
|
18
|
+
maxHeight?: number;
|
|
19
|
+
onError?(error: Error, retry: () => void): void;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Internal interface for expo-image's ImageRef.
|
|
23
|
+
* We define this to avoid a hard dependency on expo-image.
|
|
24
|
+
*/
|
|
25
|
+
interface ExpoImageRef {
|
|
26
|
+
readonly width: number;
|
|
27
|
+
readonly height: number;
|
|
28
|
+
readonly scale: number;
|
|
29
|
+
readonly mediaType: string | null;
|
|
30
|
+
readonly isAnimated?: boolean;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Represents the expo-image `Image` class with its static methods.
|
|
34
|
+
* We only describe the methods that we instrument.
|
|
35
|
+
*/
|
|
36
|
+
export interface ExpoImage {
|
|
37
|
+
prefetch(urls: string | string[], cachePolicyOrOptions?: any): Promise<boolean>;
|
|
38
|
+
loadAsync(source: ExpoImageSource | string | number, options?: ExpoImageLoadOptions): Promise<ExpoImageRef>;
|
|
39
|
+
clearMemoryCache?(): Promise<boolean>;
|
|
40
|
+
clearDiskCache?(): Promise<boolean>;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Wraps expo-image's `Image` class to add automated performance monitoring.
|
|
44
|
+
*
|
|
45
|
+
* This function instruments `Image.prefetch` and `Image.loadAsync` static methods
|
|
46
|
+
* to create performance spans that measure how long image prefetching and loading take.
|
|
47
|
+
*
|
|
48
|
+
* @param imageClass - The `Image` class from `expo-image`
|
|
49
|
+
* @returns The same class with instrumented static methods
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* ```typescript
|
|
53
|
+
* import { Image } from 'expo-image';
|
|
54
|
+
* import * as Sentry from '@sentry/react-native';
|
|
55
|
+
*
|
|
56
|
+
* Sentry.wrapExpoImage(Image);
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
export declare function wrapExpoImage<T extends ExpoImage>(imageClass: T): T;
|
|
60
|
+
export {};
|
|
61
|
+
//# sourceMappingURL=expoImage.d.ts.map
|
|
@@ -4,6 +4,10 @@ export { reactNavigationIntegration } from './reactnavigation';
|
|
|
4
4
|
export { reactNativeNavigationIntegration } from './reactnativenavigation';
|
|
5
5
|
export { wrapExpoRouter } from './expoRouter';
|
|
6
6
|
export type { ExpoRouter } from './expoRouter';
|
|
7
|
+
export { wrapExpoImage } from './expoImage';
|
|
8
|
+
export type { ExpoImage } from './expoImage';
|
|
9
|
+
export { wrapExpoAsset } from './expoAsset';
|
|
10
|
+
export type { ExpoAsset } from './expoAsset';
|
|
7
11
|
export { startIdleNavigationSpan, startIdleSpan, getDefaultIdleNavigationSpanOptions } from './span';
|
|
8
12
|
export type { ReactNavigationCurrentRoute, ReactNavigationRoute } from './types';
|
|
9
13
|
export { ReactNativeProfiler } from './reactnativeprofiler';
|
|
@@ -37,6 +37,14 @@ export declare function _setRootComponentCreationTimestampMs(timestampMs: number
|
|
|
37
37
|
* @private
|
|
38
38
|
*/
|
|
39
39
|
export declare const _setAppStartEndData: (data: AppStartEndData) => void;
|
|
40
|
+
/**
|
|
41
|
+
* Updates only the endFrames on existing appStartEndData.
|
|
42
|
+
* Used after the async fetchNativeFrames completes to attach frame data
|
|
43
|
+
* without triggering the overwrite warning from _setAppStartEndData.
|
|
44
|
+
*
|
|
45
|
+
* @private
|
|
46
|
+
*/
|
|
47
|
+
export declare const _updateAppStartEndFrames: (endFrames: NativeFramesResponse | null) => void;
|
|
40
48
|
/**
|
|
41
49
|
* For testing purposes only.
|
|
42
50
|
*
|
|
@@ -8,4 +8,6 @@ export declare const SPAN_ORIGIN_AUTO_NAVIGATION_CUSTOM = "auto.navigation.custo
|
|
|
8
8
|
export declare const SPAN_ORIGIN_AUTO_UI_TIME_TO_DISPLAY = "auto.ui.time_to_display";
|
|
9
9
|
export declare const SPAN_ORIGIN_MANUAL_UI_TIME_TO_DISPLAY = "manual.ui.time_to_display";
|
|
10
10
|
export declare const SPAN_ORIGIN_AUTO_EXPO_ROUTER_PREFETCH = "auto.expo_router.prefetch";
|
|
11
|
+
export declare const SPAN_ORIGIN_AUTO_RESOURCE_EXPO_IMAGE = "auto.resource.expo_image";
|
|
12
|
+
export declare const SPAN_ORIGIN_AUTO_RESOURCE_EXPO_ASSET = "auto.resource.expo_asset";
|
|
11
13
|
//# sourceMappingURL=origin.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { MeasurementUnit, Span, SpanJSON, TransactionSource } from '@sentry/core';
|
|
1
|
+
import type { MeasurementUnit, Span, SpanJSON, StartSpanOptions, TransactionSource } from '@sentry/core';
|
|
2
2
|
export declare const defaultTransactionSource: TransactionSource;
|
|
3
3
|
export declare const customTransactionSource: TransactionSource;
|
|
4
4
|
/**
|
|
@@ -42,6 +42,32 @@ export declare function getBundleStartTimestampMs(): number | undefined;
|
|
|
42
42
|
* Creates valid span JSON object from the given data.
|
|
43
43
|
*/
|
|
44
44
|
export declare function createSpanJSON(from: Partial<SpanJSON> & Pick<Required<SpanJSON>, 'description' | 'start_timestamp' | 'timestamp' | 'origin'>): SpanJSON;
|
|
45
|
+
/**
|
|
46
|
+
* Wraps a function call that returns a `Promise` with an inactive span that
|
|
47
|
+
* is automatically ended on success or failure (both sync throws and async
|
|
48
|
+
* rejections).
|
|
49
|
+
*
|
|
50
|
+
* This is the standard pattern for instrumenting async SDK operations such as
|
|
51
|
+
* `Image.loadAsync` and `Asset.loadAsync`.
|
|
52
|
+
*
|
|
53
|
+
* The span status is always set by this utility (`ok` on resolve, `error` on
|
|
54
|
+
* reject or sync throw). If you need custom status logic (e.g. inspecting the
|
|
55
|
+
* resolved value), handle span lifecycle manually instead.
|
|
56
|
+
*
|
|
57
|
+
* @param spanOptions Options forwarded to `startInactiveSpan`.
|
|
58
|
+
* @param fn The function to call.
|
|
59
|
+
* @returns Whatever `fn` returns (the original `Promise`).
|
|
60
|
+
*/
|
|
61
|
+
export declare function traceAsyncOperation<T>(spanOptions: StartSpanOptions, fn: () => Promise<T>): Promise<T>;
|
|
62
|
+
/**
|
|
63
|
+
* Strips query string and fragment from a URL, preserving the scheme, host, and path.
|
|
64
|
+
*/
|
|
65
|
+
export declare function sanitizeUrl(url: string): string;
|
|
66
|
+
/**
|
|
67
|
+
* Extracts a short, human-readable description from a URL by stripping
|
|
68
|
+
* the query string, fragment, and path — returning only the filename.
|
|
69
|
+
*/
|
|
70
|
+
export declare function describeUrl(url: string): string;
|
|
45
71
|
/**
|
|
46
72
|
*
|
|
47
73
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactNativeOptions } from '../options';
|
|
2
|
-
type DangerTypesWithoutCallSignature =
|
|
2
|
+
type DangerTypesWithoutCallSignature = object | null | undefined;
|
|
3
3
|
/**
|
|
4
4
|
* Returns callback factory wrapped with try/catch
|
|
5
5
|
* or the original passed value is it's not a function.
|