sentry-cli 2.47.0__tar.gz → 2.48.0__tar.gz
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.
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/Cargo.lock +1 -1
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/Cargo.toml +3 -2
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/PKG-INFO +1 -1
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/apple-catalog-parsing/build.rs +28 -12
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/sentry_cli.egg-info/PKG-INFO +1 -1
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/api/mod.rs +8 -8
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/api/pagination.rs +1 -1
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/bash_hook.rs +3 -3
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/debug_files/bundle_jvm.rs +1 -1
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/files/upload.rs +2 -2
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/info.rs +1 -1
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/login.rs +1 -1
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/mobile_app/upload.rs +47 -9
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/mod.rs +27 -9
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/monitors/run.rs +4 -4
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/react_native/gradle.rs +1 -3
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/react_native/xcode.rs +9 -9
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/send_event.rs +1 -1
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/send_metric/common_args.rs +1 -1
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/send_metric/mod.rs +1 -1
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/sourcemaps/explain.rs +1 -1
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/config.rs +10 -11
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/utils/android.rs +1 -1
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/utils/appcenter.rs +3 -3
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/utils/args.rs +6 -6
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/utils/dif.rs +1 -1
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/utils/dif_upload/mod.rs +1 -1
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/utils/event.rs +2 -2
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/utils/file_upload.rs +4 -4
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/utils/logging.rs +1 -1
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/utils/sourcemaps/inject.rs +12 -15
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/utils/sourcemaps.rs +9 -10
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/utils/system.rs +1 -1
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/utils/update.rs +2 -2
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/utils/vcs.rs +6 -6
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/utils/xcode.rs +2 -2
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/LICENSE +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/MANIFEST.in +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/README.md +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/apple-catalog-parsing/Cargo.toml +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/apple-catalog-parsing/native/swift/AssetCatalogParser/Package.swift +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/apple-catalog-parsing/native/swift/AssetCatalogParser/Sources/AssetCatalogParser/AssetCatalogReader.swift +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/apple-catalog-parsing/native/swift/AssetCatalogParser/Sources/ObjcSupport/include/safeValueForKey.h +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/apple-catalog-parsing/native/swift/AssetCatalogParser/Sources/ObjcSupport/safeValueForKey.m +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/apple-catalog-parsing/native/swift/AssetCatalogParser/Tests/AssetCatalogParserTests/AssetCatalogParserTests.swift +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/apple-catalog-parsing/native/swift/AssetCatalogParser/Tests/AssetCatalogParserTests/Resources/test.xcarchive/Info.plist +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/apple-catalog-parsing/native/swift/AssetCatalogParser/Tests/AssetCatalogParserTests/Resources/test.xcarchive/Products/Applications/DemoApp.app/Assets.car +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/apple-catalog-parsing/src/asset_catalog.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/apple-catalog-parsing/src/lib.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/build.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/pyproject.toml +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/sentry_cli.egg-info/SOURCES.txt +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/sentry_cli.egg-info/dependency_links.txt +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/sentry_cli.egg-info/top_level.txt +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/setup.cfg +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/setup.py +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/api/connection_manager.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/api/data_types/chunking/artifact.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/api/data_types/chunking/compression.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/api/data_types/chunking/dif.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/api/data_types/chunking/file_state.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/api/data_types/chunking/hash_algorithm.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/api/data_types/chunking/mobile_app.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/api/data_types/chunking/mod.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/api/data_types/chunking/upload/capability.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/api/data_types/chunking/upload/mod.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/api/data_types/chunking/upload/options.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/api/data_types/deploy.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/api/data_types/mod.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/api/encoding.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/api/envelopes_api.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/api/errors/api_error.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/api/errors/mod.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/api/errors/sentry_error.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/bashsupport.sh +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/debug_files/bundle_sources.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/debug_files/check.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/debug_files/find.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/debug_files/mod.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/debug_files/print_sources.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/debug_files/upload.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/deploys/list.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/deploys/mod.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/deploys/new.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/derive_parser.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/events/list.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/events/mod.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/files/delete.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/files/list.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/files/mod.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/issues/list.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/issues/mod.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/issues/mute.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/issues/resolve.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/issues/unresolve.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/mobile_app/mod.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/monitors/list.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/monitors/mod.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/organizations/list.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/organizations/mod.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/projects/list.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/projects/mod.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/react_native/appcenter.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/react_native/mod.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/releases/archive.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/releases/delete.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/releases/finalize.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/releases/info.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/releases/list.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/releases/mod.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/releases/new.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/releases/propose_version.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/releases/restore.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/releases/set_commits.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/repos/list.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/repos/mod.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/send_envelope.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/send_metric/distribution.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/send_metric/gauge.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/send_metric/increment.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/send_metric/set.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/sourcemaps/inject.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/sourcemaps/mod.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/sourcemaps/resolve.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/sourcemaps/upload.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/uninstall.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/update.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/upload_dif.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/upload_dsym.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/commands/upload_proguard.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/constants.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/main.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/utils/auth_token/auth_token_impl.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/utils/auth_token/error.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/utils/auth_token/mod.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/utils/auth_token/org_auth_token.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/utils/auth_token/redacting.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/utils/auth_token/test.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/utils/auth_token/user_auth_token.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/utils/chunks/mod.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/utils/chunks/options.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/utils/chunks/types.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/utils/chunks/upload.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/utils/cordova.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/utils/dif_upload/error.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/utils/file_search.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/utils/formatting.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/utils/fs.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/utils/http.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/utils/metrics.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/utils/mobile_app/apple.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/utils/mobile_app/mod.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/utils/mobile_app/validation.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/utils/mod.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/utils/progress.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/utils/proguard/mapping.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/utils/proguard/mod.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/utils/proguard/upload.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/utils/releases.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/utils/retry.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/utils/snapshots/sentry_cli__utils__vcs__generate_patch_default_twenty.snap +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/utils/snapshots/sentry_cli__utils__vcs__generate_patch_ignore_missing.snap +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/utils/snapshots/sentry_cli__utils__vcs__generate_patch_set_base.snap +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/utils/snapshots/sentry_cli__utils__vcs__generate_patch_set_previous_commit.snap +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/utils/snapshots/sentry_cli__utils__vcs__get_commits_from_git.snap +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/utils/ui.rs +0 -0
- {sentry_cli-2.47.0 → sentry_cli-2.48.0}/src/utils/value_parsers.rs +0 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
authors = ["Armin Ronacher <armin.ronacher@active-4.com>"]
|
|
3
3
|
build = "build.rs"
|
|
4
4
|
name = "sentry-cli"
|
|
5
|
-
version = "2.
|
|
5
|
+
version = "2.48.0"
|
|
6
6
|
edition = "2021"
|
|
7
7
|
rust-version = "1.86"
|
|
8
8
|
|
|
@@ -100,6 +100,8 @@ unstable-mobile-app = ["apple-catalog-parsing"]
|
|
|
100
100
|
|
|
101
101
|
[workspace.lints.clippy]
|
|
102
102
|
allow-attributes = "warn"
|
|
103
|
+
str-to-string = "warn"
|
|
104
|
+
string-to-string = "warn"
|
|
103
105
|
unnecessary-wraps = "warn"
|
|
104
106
|
unwrap-used = "warn"
|
|
105
107
|
|
|
@@ -112,7 +114,6 @@ workspace = true
|
|
|
112
114
|
|
|
113
115
|
[target."cfg(target_os = \"macos\")".dependencies]
|
|
114
116
|
mac-process-info = "0.2.0"
|
|
115
|
-
apple-catalog-parsing = { path = "apple-catalog-parsing" }
|
|
116
117
|
|
|
117
118
|
[target."cfg(unix)"]
|
|
118
119
|
|
|
@@ -2,6 +2,9 @@ use std::env;
|
|
|
2
2
|
use std::process::Command;
|
|
3
3
|
|
|
4
4
|
fn main() {
|
|
5
|
+
/// Environment variable to disable Swift sandboxing.
|
|
6
|
+
const SWIFT_DISABLE_SANDBOX: &str = "SWIFT_DISABLE_SANDBOX";
|
|
7
|
+
|
|
5
8
|
let target = env::var("TARGET").expect("TARGET is set for build scripts");
|
|
6
9
|
let mut target_bits = target.split('-');
|
|
7
10
|
|
|
@@ -20,21 +23,34 @@ fn main() {
|
|
|
20
23
|
|
|
21
24
|
println!("cargo:rerun-if-changed=native/swift/AssetCatalogParser");
|
|
22
25
|
|
|
26
|
+
// Allow swift to be run with `--disable-sandbox` in case cargo has been invoked inside a
|
|
27
|
+
// sandbox already. Nested sandboxes are not allowed on Darwin.
|
|
28
|
+
println!("cargo:rerun-if-env-changed={SWIFT_DISABLE_SANDBOX}");
|
|
29
|
+
|
|
23
30
|
let out_dir = env::var("OUT_DIR").expect("OUT_DIR is set for build scripts");
|
|
24
31
|
|
|
25
32
|
// Compile Swift code
|
|
26
33
|
let status = Command::new("swift")
|
|
27
|
-
.args(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
.args(
|
|
35
|
+
[
|
|
36
|
+
"build",
|
|
37
|
+
"-c",
|
|
38
|
+
"release",
|
|
39
|
+
"--package-path",
|
|
40
|
+
"native/swift/AssetCatalogParser",
|
|
41
|
+
"--scratch-path",
|
|
42
|
+
&format!("{out_dir}/swift-scratch"),
|
|
43
|
+
"--triple",
|
|
44
|
+
&format!("{arch}-apple-macosx10.12"),
|
|
45
|
+
]
|
|
46
|
+
.into_iter()
|
|
47
|
+
.chain(
|
|
48
|
+
env::var(SWIFT_DISABLE_SANDBOX)
|
|
49
|
+
.ok()
|
|
50
|
+
.filter(|s| s == "1")
|
|
51
|
+
.map(|_| "--disable-sandbox"),
|
|
52
|
+
),
|
|
53
|
+
)
|
|
38
54
|
.status()
|
|
39
55
|
.expect("Failed to compile SPM");
|
|
40
56
|
|
|
@@ -73,7 +89,7 @@ fn main() {
|
|
|
73
89
|
let developer_dir_path = String::from_utf8(developer_dir.stdout)
|
|
74
90
|
.expect("Failed to convert developer directory to UTF-8")
|
|
75
91
|
.trim()
|
|
76
|
-
.
|
|
92
|
+
.to_owned();
|
|
77
93
|
|
|
78
94
|
println!(
|
|
79
95
|
"cargo:rustc-link-search={developer_dir_path}/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx"
|
|
@@ -473,7 +473,7 @@ impl<'a> AuthenticatedApi<'a> {
|
|
|
473
473
|
checksums: &[String],
|
|
474
474
|
) -> ApiResult<Vec<Artifact>> {
|
|
475
475
|
let mut rv = vec![];
|
|
476
|
-
let mut cursor = "".
|
|
476
|
+
let mut cursor = "".to_owned();
|
|
477
477
|
loop {
|
|
478
478
|
let mut path = if let Some(project) = project {
|
|
479
479
|
format!(
|
|
@@ -1080,7 +1080,7 @@ impl<'a> AuthenticatedApi<'a> {
|
|
|
1080
1080
|
/// we're issuing a request to a monolith deployment.
|
|
1081
1081
|
pub fn list_organizations(&self, region: Option<&Region>) -> ApiResult<Vec<Organization>> {
|
|
1082
1082
|
let mut rv = vec![];
|
|
1083
|
-
let mut cursor = "".
|
|
1083
|
+
let mut cursor = "".to_owned();
|
|
1084
1084
|
loop {
|
|
1085
1085
|
let current_path = &format!("/organizations/?cursor={}", QueryArg(&cursor));
|
|
1086
1086
|
let resp = if let Some(rg) = region {
|
|
@@ -1128,7 +1128,7 @@ impl<'a> AuthenticatedApi<'a> {
|
|
|
1128
1128
|
/// List all monitors associated with an organization
|
|
1129
1129
|
pub fn list_organization_monitors(&self, org: &str) -> ApiResult<Vec<Monitor>> {
|
|
1130
1130
|
let mut rv = vec![];
|
|
1131
|
-
let mut cursor = "".
|
|
1131
|
+
let mut cursor = "".to_owned();
|
|
1132
1132
|
loop {
|
|
1133
1133
|
let resp = self.get(&format!(
|
|
1134
1134
|
"/organizations/{}/monitors/?cursor={}",
|
|
@@ -1156,7 +1156,7 @@ impl<'a> AuthenticatedApi<'a> {
|
|
|
1156
1156
|
/// List all projects associated with an organization
|
|
1157
1157
|
pub fn list_organization_projects(&self, org: &str) -> ApiResult<Vec<Project>> {
|
|
1158
1158
|
let mut rv = vec![];
|
|
1159
|
-
let mut cursor = "".
|
|
1159
|
+
let mut cursor = "".to_owned();
|
|
1160
1160
|
loop {
|
|
1161
1161
|
let resp = self.get(&format!(
|
|
1162
1162
|
"/organizations/{}/projects/?cursor={}",
|
|
@@ -1189,7 +1189,7 @@ impl<'a> AuthenticatedApi<'a> {
|
|
|
1189
1189
|
max_pages: usize,
|
|
1190
1190
|
) -> ApiResult<Vec<ProcessedEvent>> {
|
|
1191
1191
|
let mut rv = vec![];
|
|
1192
|
-
let mut cursor = "".
|
|
1192
|
+
let mut cursor = "".to_owned();
|
|
1193
1193
|
let mut requests_no = 0;
|
|
1194
1194
|
|
|
1195
1195
|
loop {
|
|
@@ -1236,7 +1236,7 @@ impl<'a> AuthenticatedApi<'a> {
|
|
|
1236
1236
|
query: Option<String>,
|
|
1237
1237
|
) -> ApiResult<Vec<Issue>> {
|
|
1238
1238
|
let mut rv = vec![];
|
|
1239
|
-
let mut cursor = "".
|
|
1239
|
+
let mut cursor = "".to_owned();
|
|
1240
1240
|
let mut requests_no = 0;
|
|
1241
1241
|
|
|
1242
1242
|
let url = if let Some(query) = query {
|
|
@@ -1283,7 +1283,7 @@ impl<'a> AuthenticatedApi<'a> {
|
|
|
1283
1283
|
/// List all repos associated with an organization
|
|
1284
1284
|
pub fn list_organization_repos(&self, org: &str) -> ApiResult<Vec<Repo>> {
|
|
1285
1285
|
let mut rv = vec![];
|
|
1286
|
-
let mut cursor = "".
|
|
1286
|
+
let mut cursor = "".to_owned();
|
|
1287
1287
|
loop {
|
|
1288
1288
|
let path = format!(
|
|
1289
1289
|
"/organizations/{}/repos/?cursor={}",
|
|
@@ -1930,7 +1930,7 @@ fn log_headers(is_response: bool, data: &[u8]) {
|
|
|
1930
1930
|
|
|
1931
1931
|
let replaced = AUTH_RE.replace_all(line, |caps: &Captures<'_>| {
|
|
1932
1932
|
let info = if &caps[1].to_lowercase() == "basic" {
|
|
1933
|
-
caps[3].split(':').next().unwrap().
|
|
1933
|
+
caps[3].split(':').next().unwrap().to_owned()
|
|
1934
1934
|
} else {
|
|
1935
1935
|
format!("{}***", &caps[3][..std::cmp::min(caps[3].len(), 8)])
|
|
1936
1936
|
};
|
|
@@ -117,7 +117,7 @@ fn send_event(
|
|
|
117
117
|
);
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
-
let mut cmd = "unknown".
|
|
120
|
+
let mut cmd = "unknown".to_owned();
|
|
121
121
|
let mut exit_code = 1;
|
|
122
122
|
let mut frames = vec![];
|
|
123
123
|
|
|
@@ -129,7 +129,7 @@ fn send_event(
|
|
|
129
129
|
// meta info
|
|
130
130
|
if line.starts_with('@') {
|
|
131
131
|
if let Some(rest) = line.strip_prefix("@command:") {
|
|
132
|
-
cmd = rest.
|
|
132
|
+
cmd = rest.to_owned();
|
|
133
133
|
} else if let Some(rest) = line.strip_prefix("@exit_code:") {
|
|
134
134
|
exit_code = rest.parse().unwrap_or(exit_code);
|
|
135
135
|
} else {
|
|
@@ -170,7 +170,7 @@ fn send_event(
|
|
|
170
170
|
if let Ok(f) = fs::File::open(filename) {
|
|
171
171
|
let lines: Vec<_> = BufReader::new(f)
|
|
172
172
|
.lines()
|
|
173
|
-
.map(|x| x.unwrap_or_else(|_| "".
|
|
173
|
+
.map(|x| x.unwrap_or_else(|_| "".to_owned()))
|
|
174
174
|
.collect();
|
|
175
175
|
source_caches.insert(filename, lines);
|
|
176
176
|
} else {
|
|
@@ -96,7 +96,7 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
|
|
|
96
96
|
let local_path_jvm_ext = local_path.with_extension("jvm");
|
|
97
97
|
let url = format!("~/{}", path_as_url(&local_path_jvm_ext));
|
|
98
98
|
(
|
|
99
|
-
url.
|
|
99
|
+
url.clone(),
|
|
100
100
|
SourceFile {
|
|
101
101
|
url,
|
|
102
102
|
path: source.path.clone(),
|
|
@@ -143,7 +143,7 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
|
|
|
143
143
|
bail!("Invalid header. Needs to be in key:value format");
|
|
144
144
|
}
|
|
145
145
|
let (key, value) = header.split_once(':').unwrap();
|
|
146
|
-
headers.insert(key.trim().
|
|
146
|
+
headers.insert(key.trim().to_owned(), value.trim().to_owned());
|
|
147
147
|
}
|
|
148
148
|
};
|
|
149
149
|
|
|
@@ -205,7 +205,7 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
|
|
|
205
205
|
let url = format!("{}/{}{}", url_prefix, path_as_url(local_path), url_suffix);
|
|
206
206
|
|
|
207
207
|
(
|
|
208
|
-
url.
|
|
208
|
+
url.clone(),
|
|
209
209
|
SourceFile {
|
|
210
210
|
url,
|
|
211
211
|
path: source.path.clone(),
|
|
@@ -70,7 +70,7 @@ fn get_config_status_json() -> Result<()> {
|
|
|
70
70
|
let (org, project) = config.get_org_and_project_defaults();
|
|
71
71
|
rv.config.org = org;
|
|
72
72
|
rv.config.project = project;
|
|
73
|
-
rv.config.url = Some(config.get_base_url()?.
|
|
73
|
+
rv.config.url = Some(config.get_base_url()?.to_owned());
|
|
74
74
|
|
|
75
75
|
rv.auth.auth_type = config.get_auth().map(|val| match val {
|
|
76
76
|
Auth::Token(_) => "token".into(),
|
|
@@ -153,7 +153,7 @@ fn get_org_from_token(token: &AuthToken) -> Option<&str> {
|
|
|
153
153
|
fn format_org_info(org: Option<&str>) -> String {
|
|
154
154
|
match org {
|
|
155
155
|
Some(org_name) => format!("for organization {org_name}"),
|
|
156
|
-
None => "not tied to any specific organization".
|
|
156
|
+
None => "not tied to any specific organization".to_owned(),
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
159
|
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
use std::borrow::Cow;
|
|
2
|
+
#[cfg(not(windows))]
|
|
3
|
+
use std::fs;
|
|
2
4
|
use std::io::Write;
|
|
5
|
+
#[cfg(not(windows))]
|
|
6
|
+
use std::os::unix::fs::PermissionsExt;
|
|
3
7
|
use std::path::Path;
|
|
4
8
|
|
|
5
9
|
use anyhow::{anyhow, bail, Context as _, Result};
|
|
@@ -34,7 +38,8 @@ pub fn make_command(command: Command) -> Command {
|
|
|
34
38
|
.value_name("PATH")
|
|
35
39
|
.help("The path to the mobile app files to upload. Supported files include Apk, Aab or XCArchive.")
|
|
36
40
|
.num_args(1..)
|
|
37
|
-
.action(ArgAction::Append)
|
|
41
|
+
.action(ArgAction::Append)
|
|
42
|
+
.required(true),
|
|
38
43
|
)
|
|
39
44
|
.arg(
|
|
40
45
|
Arg::new("sha")
|
|
@@ -251,7 +256,14 @@ fn normalize_directory(path: &Path) -> Result<TempFile> {
|
|
|
251
256
|
.filter(|entry| entry.path().is_file())
|
|
252
257
|
.map(|entry| {
|
|
253
258
|
let entry_path = entry.into_path();
|
|
254
|
-
let relative_path = entry_path
|
|
259
|
+
let relative_path = entry_path
|
|
260
|
+
.strip_prefix(path.parent().ok_or_else(|| {
|
|
261
|
+
anyhow!(
|
|
262
|
+
"Cannot determine parent directory for path: {}",
|
|
263
|
+
path.display()
|
|
264
|
+
)
|
|
265
|
+
})?)?
|
|
266
|
+
.to_owned();
|
|
255
267
|
Ok((entry_path, relative_path))
|
|
256
268
|
})
|
|
257
269
|
.collect::<Result<Vec<_>>>()?
|
|
@@ -268,6 +280,10 @@ fn normalize_directory(path: &Path) -> Result<TempFile> {
|
|
|
268
280
|
for (entry_path, relative_path) in entries {
|
|
269
281
|
debug!("Adding file to zip: {}", relative_path.display());
|
|
270
282
|
|
|
283
|
+
#[cfg(not(windows))]
|
|
284
|
+
// On Unix, we need to preserve the file permissions.
|
|
285
|
+
let options = options.unix_permissions(fs::metadata(&entry_path)?.permissions().mode());
|
|
286
|
+
|
|
271
287
|
zip.start_file(relative_path.to_string_lossy(), options)?;
|
|
272
288
|
let file_byteview = ByteView::open(&entry_path)?;
|
|
273
289
|
zip.write_all(file_byteview.as_slice())?;
|
|
@@ -301,14 +317,12 @@ fn upload_file(
|
|
|
301
317
|
build_configuration.unwrap_or("unknown")
|
|
302
318
|
);
|
|
303
319
|
|
|
304
|
-
let chunk_upload_options = api
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
anyhow!(
|
|
308
|
-
"The Sentry server lacks chunked uploading support, which \
|
|
320
|
+
let chunk_upload_options = api.get_chunk_upload_options(org)?.ok_or_else(|| {
|
|
321
|
+
anyhow!(
|
|
322
|
+
"The Sentry server lacks chunked uploading support, which \
|
|
309
323
|
is required for mobile app uploads. {SELF_HOSTED_ERROR_HINT}"
|
|
310
|
-
|
|
311
|
-
|
|
324
|
+
)
|
|
325
|
+
})?;
|
|
312
326
|
|
|
313
327
|
if !chunk_upload_options.supports(ChunkUploadCapability::PreprodArtifacts) {
|
|
314
328
|
bail!(
|
|
@@ -402,3 +416,27 @@ fn poll_assemble(
|
|
|
402
416
|
|
|
403
417
|
Ok(())
|
|
404
418
|
}
|
|
419
|
+
|
|
420
|
+
#[cfg(not(windows))]
|
|
421
|
+
#[cfg(test)]
|
|
422
|
+
mod tests {
|
|
423
|
+
use super::*;
|
|
424
|
+
use std::fs;
|
|
425
|
+
use zip::ZipArchive;
|
|
426
|
+
|
|
427
|
+
#[test]
|
|
428
|
+
fn test_normalize_directory_preserves_top_level_directory_name() -> Result<()> {
|
|
429
|
+
let temp_dir = crate::utils::fs::TempDir::create()?;
|
|
430
|
+
let test_dir = temp_dir.path().join("MyApp.xcarchive");
|
|
431
|
+
fs::create_dir_all(test_dir.join("Products"))?;
|
|
432
|
+
fs::write(test_dir.join("Products").join("app.txt"), "test content")?;
|
|
433
|
+
|
|
434
|
+
let result_zip = normalize_directory(&test_dir)?;
|
|
435
|
+
let zip_file = fs::File::open(result_zip.path())?;
|
|
436
|
+
let mut archive = ZipArchive::new(zip_file)?;
|
|
437
|
+
let file = archive.by_index(0)?;
|
|
438
|
+
let file_path = file.name();
|
|
439
|
+
assert_eq!(file_path, "MyApp.xcarchive/Products/app.txt");
|
|
440
|
+
Ok(())
|
|
441
|
+
}
|
|
442
|
+
}
|
|
@@ -19,7 +19,33 @@ use crate::utils::system::{load_dotenv, print_error, set_panic_hook, QuietExit};
|
|
|
19
19
|
use crate::utils::update::run_sentrycli_update_nagger;
|
|
20
20
|
use crate::utils::value_parsers::auth_token_parser;
|
|
21
21
|
|
|
22
|
+
mod bash_hook;
|
|
23
|
+
mod debug_files;
|
|
24
|
+
mod deploys;
|
|
22
25
|
mod derive_parser;
|
|
26
|
+
mod events;
|
|
27
|
+
mod files;
|
|
28
|
+
mod info;
|
|
29
|
+
mod issues;
|
|
30
|
+
mod login;
|
|
31
|
+
mod mobile_app;
|
|
32
|
+
mod monitors;
|
|
33
|
+
mod organizations;
|
|
34
|
+
mod projects;
|
|
35
|
+
mod react_native;
|
|
36
|
+
mod releases;
|
|
37
|
+
mod repos;
|
|
38
|
+
mod send_envelope;
|
|
39
|
+
mod send_event;
|
|
40
|
+
mod send_metric;
|
|
41
|
+
mod sourcemaps;
|
|
42
|
+
#[cfg(not(feature = "managed"))]
|
|
43
|
+
mod uninstall;
|
|
44
|
+
#[cfg(not(feature = "managed"))]
|
|
45
|
+
mod update;
|
|
46
|
+
mod upload_dif;
|
|
47
|
+
mod upload_dsym;
|
|
48
|
+
mod upload_proguard;
|
|
23
49
|
|
|
24
50
|
macro_rules! each_subcommand {
|
|
25
51
|
($mac:ident) => {
|
|
@@ -53,14 +79,6 @@ macro_rules! each_subcommand {
|
|
|
53
79
|
};
|
|
54
80
|
}
|
|
55
81
|
|
|
56
|
-
macro_rules! import_subcommand {
|
|
57
|
-
($name:ident) => {
|
|
58
|
-
pub mod $name;
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
each_subcommand!(import_subcommand);
|
|
63
|
-
|
|
64
82
|
const ABOUT: &str = "
|
|
65
83
|
Command line utility for Sentry.
|
|
66
84
|
|
|
@@ -88,7 +106,7 @@ const UPDATE_NAGGER_CMDS: &[&str] = &[
|
|
|
88
106
|
const AUTH_TOKEN_ARG: &str = "auth-token";
|
|
89
107
|
|
|
90
108
|
fn print_completions<G: Generator>(gen: G, cmd: &mut Command) {
|
|
91
|
-
generate(gen, cmd, cmd.get_name().
|
|
109
|
+
generate(gen, cmd, cmd.get_name().to_owned(), &mut io::stdout());
|
|
92
110
|
}
|
|
93
111
|
|
|
94
112
|
fn preexecute_hooks() -> Result<bool> {
|
|
@@ -140,10 +140,10 @@ fn execute_checkin(
|
|
|
140
140
|
|
|
141
141
|
let open_checkin = MonitorCheckIn {
|
|
142
142
|
check_in_id,
|
|
143
|
-
monitor_slug: monitor_slug.
|
|
143
|
+
monitor_slug: monitor_slug.to_owned(),
|
|
144
144
|
status: MonitorCheckInStatus::InProgress,
|
|
145
145
|
duration: None,
|
|
146
|
-
environment: Some(environment.
|
|
146
|
+
environment: Some(environment.to_owned()),
|
|
147
147
|
monitor_config,
|
|
148
148
|
};
|
|
149
149
|
|
|
@@ -166,10 +166,10 @@ fn execute_checkin(
|
|
|
166
166
|
|
|
167
167
|
let close_checkin = MonitorCheckIn {
|
|
168
168
|
check_in_id,
|
|
169
|
-
monitor_slug: monitor_slug.
|
|
169
|
+
monitor_slug: monitor_slug.to_owned(),
|
|
170
170
|
status,
|
|
171
171
|
duration,
|
|
172
|
-
environment: Some(environment.
|
|
172
|
+
environment: Some(environment.to_owned()),
|
|
173
173
|
monitor_config: None,
|
|
174
174
|
};
|
|
175
175
|
|
|
@@ -119,9 +119,7 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
|
|
|
119
119
|
|
|
120
120
|
if let Some(version) = version {
|
|
121
121
|
for dist in matches.get_many::<String>("dist").unwrap() {
|
|
122
|
-
println!(
|
|
123
|
-
"Uploading sourcemaps for release {version} distribution {dist}"
|
|
124
|
-
);
|
|
122
|
+
println!("Uploading sourcemaps for release {version} distribution {dist}");
|
|
125
123
|
|
|
126
124
|
processor.upload(&UploadContext {
|
|
127
125
|
org: &org,
|
|
@@ -145,7 +145,7 @@ fn find_hermesc() -> String {
|
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
147
|
|
|
148
|
-
let pods_root_path = env::var("PODS_ROOT").unwrap_or("".
|
|
148
|
+
let pods_root_path = env::var("PODS_ROOT").unwrap_or("".to_owned());
|
|
149
149
|
format!("{pods_root_path}/hermes-engine/destroot/bin/hermesc")
|
|
150
150
|
}
|
|
151
151
|
|
|
@@ -219,10 +219,10 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
|
|
|
219
219
|
let url = url.trim_end_matches('/');
|
|
220
220
|
bundle_file = TempFile::create()?;
|
|
221
221
|
bundle_path = bundle_file.path().to_path_buf();
|
|
222
|
-
bundle_url = "~/index.ios.bundle".
|
|
222
|
+
bundle_url = "~/index.ios.bundle".to_owned();
|
|
223
223
|
sourcemap_file = TempFile::create()?;
|
|
224
224
|
sourcemap_path = sourcemap_file.path().to_path_buf();
|
|
225
|
-
sourcemap_url = "~/index.ios.map".
|
|
225
|
+
sourcemap_url = "~/index.ios.map".to_owned();
|
|
226
226
|
|
|
227
227
|
// wait up to 10 seconds for the server to be up.
|
|
228
228
|
if !api.wait_until_available(url, Duration::seconds(10))? {
|
|
@@ -359,7 +359,7 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
|
|
|
359
359
|
match InfoPlist::discover_from_env() {
|
|
360
360
|
Ok(Some(plist)) => {
|
|
361
361
|
// Successfully discovered and parsed Info.plist
|
|
362
|
-
let dist_string = plist.build().
|
|
362
|
+
let dist_string = plist.build().to_owned();
|
|
363
363
|
let release_string =
|
|
364
364
|
format!("{}@{}+{}", plist.bundle_id(), plist.version(), dist_string);
|
|
365
365
|
info!("Parse result from Info.plist: {:?}", &plist);
|
|
@@ -418,7 +418,7 @@ pub fn wrap_call() -> Result<()> {
|
|
|
418
418
|
let mut sourcemap_path = None;
|
|
419
419
|
let bundle_command = env::var("SENTRY_RN_BUNDLE_COMMAND");
|
|
420
420
|
let compose_source_maps_path = env::var("COMPOSE_SOURCEMAP_PATH");
|
|
421
|
-
let no_debug_id = env::var("SENTRY_RN_NO_DEBUG_ID").unwrap_or("0".
|
|
421
|
+
let no_debug_id = env::var("SENTRY_RN_NO_DEBUG_ID").unwrap_or("0".to_owned()) == "1";
|
|
422
422
|
|
|
423
423
|
let report_file_path = env::var("SENTRY_RN_SOURCEMAP_REPORT").unwrap();
|
|
424
424
|
let mut sourcemap_report: SourceMapReport = if std::path::Path::new(&report_file_path).exists()
|
|
@@ -442,11 +442,11 @@ pub fn wrap_call() -> Result<()> {
|
|
|
442
442
|
if item == "--sourcemap-output" {
|
|
443
443
|
sourcemap_path = iter.next().cloned();
|
|
444
444
|
} else if let Some(rest) = item.strip_prefix("--sourcemap-output=") {
|
|
445
|
-
sourcemap_path = Some(rest.
|
|
445
|
+
sourcemap_path = Some(rest.to_owned());
|
|
446
446
|
} else if item == "--bundle-output" {
|
|
447
447
|
bundle_path = iter.next().cloned();
|
|
448
448
|
} else if let Some(rest) = item.strip_prefix("--bundle-output=") {
|
|
449
|
-
bundle_path = Some(rest.
|
|
449
|
+
bundle_path = Some(rest.to_owned());
|
|
450
450
|
}
|
|
451
451
|
}
|
|
452
452
|
|
|
@@ -551,8 +551,8 @@ pub fn wrap_call() -> Result<()> {
|
|
|
551
551
|
.get("debugId")
|
|
552
552
|
.or_else(|| packager_sourcemap.get("debug_id"))
|
|
553
553
|
{
|
|
554
|
-
hermes_sourcemap.insert("debugId".
|
|
555
|
-
hermes_sourcemap.insert("debug_id".
|
|
554
|
+
hermes_sourcemap.insert("debugId".to_owned(), debug_id.clone());
|
|
555
|
+
hermes_sourcemap.insert("debug_id".to_owned(), debug_id.clone());
|
|
556
556
|
|
|
557
557
|
hermes_sourcemap_file = fs::File::create(hermes_sourcemap_path)?;
|
|
558
558
|
serde_json::to_writer(&mut hermes_sourcemap_file, &hermes_sourcemap)?;
|
|
@@ -316,7 +316,7 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
|
|
|
316
316
|
|
|
317
317
|
if let Some(fingerprint) = matches.get_many::<String>("fingerprint") {
|
|
318
318
|
event.fingerprint = fingerprint
|
|
319
|
-
.map(|x| x.
|
|
319
|
+
.map(|x| x.clone().into())
|
|
320
320
|
.collect::<Vec<_>>()
|
|
321
321
|
.into();
|
|
322
322
|
}
|
|
@@ -51,7 +51,7 @@ impl FromStr for MetricName {
|
|
|
51
51
|
.ok_or_else(|| anyhow!("metric name cannot be empty"))?
|
|
52
52
|
.is_ascii_alphabetic()
|
|
53
53
|
{
|
|
54
|
-
Ok(MetricName(s.
|
|
54
|
+
Ok(MetricName(s.to_owned()))
|
|
55
55
|
} else {
|
|
56
56
|
Err(anyhow!(
|
|
57
57
|
"metric name must start with an alphabetic character"
|
|
@@ -38,7 +38,7 @@ This command will validate input parameters and attempt to send a metric to \
|
|
|
38
38
|
Sentry. Due to network errors and rate limits, the metric is not guaranteed to \
|
|
39
39
|
arrive. Check the debug output for transmission errors by passing --log-level=\
|
|
40
40
|
debug or setting `SENTRY_LOG_LEVEL=debug`."))]
|
|
41
|
-
#[command(hide=true)]
|
|
41
|
+
#[command(hide = true)]
|
|
42
42
|
enum SendMetricSubcommand {
|
|
43
43
|
#[command(about = format!("[DEPRECATED] {INCREMENT_ABOUT}"))]
|
|
44
44
|
#[command(long_about = format!("{DEPRECATION_MESSAGE}{{n}}{{n}}{INCREMENT_ABOUT}"))]
|
|
@@ -333,7 +333,7 @@ fn print_mapped_frame(frame: &Frame) {
|
|
|
333
333
|
fn extract_release(event: &ProcessedEvent) -> Result<String> {
|
|
334
334
|
if let Some(release) = event.release.as_ref() {
|
|
335
335
|
success(format!("Event has release name: {release}"));
|
|
336
|
-
Ok(release.
|
|
336
|
+
Ok(release.clone())
|
|
337
337
|
} else {
|
|
338
338
|
error("Event is missing a release name");
|
|
339
339
|
tip("Configure 'release' option in the SDK.\n \
|
|
@@ -78,7 +78,7 @@ impl Config {
|
|
|
78
78
|
.unwrap_or_default();
|
|
79
79
|
|
|
80
80
|
let url = if token_url.is_empty() {
|
|
81
|
-
manually_configured_url.unwrap_or_else(|| DEFAULT_URL.
|
|
81
|
+
manually_configured_url.unwrap_or_else(|| DEFAULT_URL.to_owned())
|
|
82
82
|
} else {
|
|
83
83
|
warn_about_conflicting_urls(token_url, manually_configured_url.as_deref());
|
|
84
84
|
token_url.into()
|
|
@@ -184,7 +184,7 @@ impl Config {
|
|
|
184
184
|
self.cached_token_data = val.payload().cloned();
|
|
185
185
|
|
|
186
186
|
if let Some(token_url) = self.cached_token_data.as_ref().map(|td| td.url.as_str()) {
|
|
187
|
-
self.cached_base_url = token_url.
|
|
187
|
+
self.cached_base_url = token_url.to_owned();
|
|
188
188
|
}
|
|
189
189
|
|
|
190
190
|
self.ini.set_to(
|
|
@@ -194,8 +194,7 @@ impl Config {
|
|
|
194
194
|
);
|
|
195
195
|
}
|
|
196
196
|
Some(Auth::Key(ref val)) => {
|
|
197
|
-
self.ini
|
|
198
|
-
.set_to(Some("auth"), "api_key".into(), val.to_string());
|
|
197
|
+
self.ini.set_to(Some("auth"), "api_key".into(), val.clone());
|
|
199
198
|
}
|
|
200
199
|
None => {}
|
|
201
200
|
}
|
|
@@ -351,7 +350,7 @@ impl Config {
|
|
|
351
350
|
format_err!("An organization ID or slug is required (provide with --org)")
|
|
352
351
|
}),
|
|
353
352
|
(None, Some(cli_org)) => Ok(cli_org),
|
|
354
|
-
(Some(token_org), None) => Ok(token_org.
|
|
353
|
+
(Some(token_org), None) => Ok(token_org.clone()),
|
|
355
354
|
(Some(token_org), Some(cli_org)) => {
|
|
356
355
|
if cli_org != *token_org {
|
|
357
356
|
log::warn!(
|
|
@@ -381,7 +380,7 @@ impl Config {
|
|
|
381
380
|
// Backward compatibility with `releases files <VERSION>` commands.
|
|
382
381
|
pub fn get_release_with_legacy_fallback(&self, matches: &ArgMatches) -> Result<String> {
|
|
383
382
|
if let Some(version) = matches.get_one::<String>("version") {
|
|
384
|
-
Ok(version.
|
|
383
|
+
Ok(version.clone())
|
|
385
384
|
} else {
|
|
386
385
|
self.get_release(matches)
|
|
387
386
|
}
|
|
@@ -656,7 +655,7 @@ fn load_cli_config() -> Result<(PathBuf, Ini)> {
|
|
|
656
655
|
let ini = Ini::read_from(&mut f).context(format!("Failed to parse {file_desc}"))?;
|
|
657
656
|
for (section, props) in ini.iter() {
|
|
658
657
|
for (key, value) in props.iter() {
|
|
659
|
-
rv.set_to(section, key.
|
|
658
|
+
rv.set_to(section, key.to_owned(), value.to_owned());
|
|
660
659
|
}
|
|
661
660
|
}
|
|
662
661
|
(project_config_path, rv)
|
|
@@ -681,7 +680,7 @@ fn load_cli_config() -> Result<(PathBuf, Ini)> {
|
|
|
681
680
|
let mut iter = key.rsplitn(2, '.');
|
|
682
681
|
if let Some(key) = iter.next() {
|
|
683
682
|
let section = iter.next();
|
|
684
|
-
rv.set_to(section, key.
|
|
683
|
+
rv.set_to(section, key.to_owned(), value);
|
|
685
684
|
} else {
|
|
686
685
|
debug!("Incorrect properties file key: {}", key);
|
|
687
686
|
}
|
|
@@ -780,9 +779,9 @@ fn get_default_vcs_remote(ini: &Ini) -> String {
|
|
|
780
779
|
if let Ok(remote) = env::var("SENTRY_VCS_REMOTE") {
|
|
781
780
|
remote
|
|
782
781
|
} else if let Some(remote) = ini.get_from(Some("defaults"), "vcs_remote") {
|
|
783
|
-
remote.
|
|
782
|
+
remote.to_owned()
|
|
784
783
|
} else {
|
|
785
|
-
"origin".
|
|
784
|
+
"origin".to_owned()
|
|
786
785
|
}
|
|
787
786
|
}
|
|
788
787
|
|
|
@@ -799,7 +798,7 @@ mod tests {
|
|
|
799
798
|
process_bound: false,
|
|
800
799
|
ini: Default::default(),
|
|
801
800
|
cached_auth: None,
|
|
802
|
-
cached_base_url: "https://sentry.io/".
|
|
801
|
+
cached_base_url: "https://sentry.io/".to_owned(),
|
|
803
802
|
cached_headers: None,
|
|
804
803
|
cached_log_level: LevelFilter::Off,
|
|
805
804
|
cached_vcs_remote: String::new(),
|