sentry-cli 2.20.7__tar.gz → 2.21.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.
Files changed (111) hide show
  1. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/Cargo.lock +13 -13
  2. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/Cargo.toml +2 -2
  3. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/PKG-INFO +1 -1
  4. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/sentry_cli.egg-info/PKG-INFO +1 -1
  5. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/commands/debug_files/bundle_jvm.rs +3 -0
  6. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/commands/debug_files/upload.rs +23 -2
  7. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/commands/files/upload.rs +20 -1
  8. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/commands/login.rs +15 -4
  9. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/commands/react_native/appcenter.rs +22 -2
  10. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/commands/react_native/gradle.rs +44 -12
  11. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/commands/react_native/xcode.rs +243 -51
  12. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/commands/sourcemaps/upload.rs +38 -1
  13. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/utils/dif_upload.rs +11 -1
  14. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/utils/file_upload.rs +6 -2
  15. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/utils/sourcemaps.rs +148 -32
  16. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/LICENSE +0 -0
  17. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/MANIFEST.in +0 -0
  18. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/README.md +0 -0
  19. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/build.rs +0 -0
  20. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/pyproject.toml +0 -0
  21. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/sentry_cli.egg-info/SOURCES.txt +0 -0
  22. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/sentry_cli.egg-info/dependency_links.txt +0 -0
  23. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/sentry_cli.egg-info/top_level.txt +0 -0
  24. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/setup.cfg +0 -0
  25. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/setup.py +0 -0
  26. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/api.rs +0 -0
  27. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/bashsupport.sh +0 -0
  28. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/commands/bash_hook.rs +0 -0
  29. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/commands/debug_files/bundle_sources.rs +0 -0
  30. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/commands/debug_files/check.rs +0 -0
  31. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/commands/debug_files/find.rs +0 -0
  32. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/commands/debug_files/mod.rs +0 -0
  33. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/commands/debug_files/print_sources.rs +0 -0
  34. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/commands/deploys/list.rs +0 -0
  35. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/commands/deploys/mod.rs +0 -0
  36. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/commands/deploys/new.rs +0 -0
  37. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/commands/events/list.rs +0 -0
  38. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/commands/events/mod.rs +0 -0
  39. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/commands/files/delete.rs +0 -0
  40. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/commands/files/list.rs +0 -0
  41. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/commands/files/mod.rs +0 -0
  42. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/commands/info.rs +0 -0
  43. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/commands/issues/list.rs +0 -0
  44. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/commands/issues/mod.rs +0 -0
  45. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/commands/issues/mute.rs +0 -0
  46. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/commands/issues/resolve.rs +0 -0
  47. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/commands/issues/unresolve.rs +0 -0
  48. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/commands/mod.rs +0 -0
  49. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/commands/monitors/list.rs +0 -0
  50. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/commands/monitors/mod.rs +0 -0
  51. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/commands/monitors/run.rs +0 -0
  52. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/commands/organizations/list.rs +0 -0
  53. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/commands/organizations/mod.rs +0 -0
  54. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/commands/projects/list.rs +0 -0
  55. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/commands/projects/mod.rs +0 -0
  56. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/commands/react_native/mod.rs +0 -0
  57. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/commands/releases/archive.rs +0 -0
  58. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/commands/releases/delete.rs +0 -0
  59. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/commands/releases/finalize.rs +0 -0
  60. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/commands/releases/info.rs +0 -0
  61. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/commands/releases/list.rs +0 -0
  62. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/commands/releases/mod.rs +0 -0
  63. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/commands/releases/new.rs +0 -0
  64. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/commands/releases/propose_version.rs +0 -0
  65. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/commands/releases/restore.rs +0 -0
  66. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/commands/releases/set_commits.rs +0 -0
  67. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/commands/repos/list.rs +0 -0
  68. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/commands/repos/mod.rs +0 -0
  69. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/commands/send_envelope.rs +0 -0
  70. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/commands/send_event.rs +0 -0
  71. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/commands/sourcemaps/explain.rs +0 -0
  72. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/commands/sourcemaps/inject.rs +0 -0
  73. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/commands/sourcemaps/mod.rs +0 -0
  74. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/commands/sourcemaps/resolve.rs +0 -0
  75. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/commands/uninstall.rs +0 -0
  76. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/commands/update.rs +0 -0
  77. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/commands/upload_dif.rs +0 -0
  78. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/commands/upload_dsym.rs +0 -0
  79. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/commands/upload_proguard.rs +0 -0
  80. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/config.rs +0 -0
  81. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/constants.rs +0 -0
  82. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/main.rs +0 -0
  83. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/utils/android.rs +0 -0
  84. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/utils/appcenter.rs +0 -0
  85. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/utils/args.rs +0 -0
  86. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/utils/chunks.rs +0 -0
  87. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/utils/codepush.rs +0 -0
  88. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/utils/cordova.rs +0 -0
  89. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/utils/dif.rs +0 -0
  90. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/utils/enc.rs +0 -0
  91. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/utils/event.rs +0 -0
  92. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/utils/file_search.rs +0 -0
  93. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/utils/formatting.rs +0 -0
  94. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/utils/fs.rs +0 -0
  95. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/utils/http.rs +0 -0
  96. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/utils/logging.rs +0 -0
  97. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/utils/mod.rs +0 -0
  98. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/utils/progress.rs +0 -0
  99. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/utils/releases.rs +0 -0
  100. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/utils/retry.rs +0 -0
  101. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/utils/snapshots/sentry_cli__utils__vcs__generate_patch_default_twenty.snap +0 -0
  102. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/utils/snapshots/sentry_cli__utils__vcs__generate_patch_ignore_missing.snap +0 -0
  103. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/utils/snapshots/sentry_cli__utils__vcs__generate_patch_set_base.snap +0 -0
  104. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/utils/snapshots/sentry_cli__utils__vcs__generate_patch_set_previous_commit.snap +0 -0
  105. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/utils/snapshots/sentry_cli__utils__vcs__get_commits_from_git.snap +0 -0
  106. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/utils/sourcemaps/inject.rs +0 -0
  107. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/utils/system.rs +0 -0
  108. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/utils/ui.rs +0 -0
  109. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/utils/update.rs +0 -0
  110. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/utils/vcs.rs +0 -0
  111. {sentry_cli-2.20.7 → sentry_cli-2.21.0}/src/utils/xcode.rs +0 -0
@@ -2212,7 +2212,7 @@ dependencies = [
2212
2212
 
2213
2213
  [[package]]
2214
2214
  name = "sentry-cli"
2215
- version = "2.20.7"
2215
+ version = "2.21.0"
2216
2216
  dependencies = [
2217
2217
  "anyhow",
2218
2218
  "anylog",
@@ -2541,9 +2541,9 @@ checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601"
2541
2541
 
2542
2542
  [[package]]
2543
2543
  name = "symbolic"
2544
- version = "12.4.0"
2544
+ version = "12.4.1"
2545
2545
  source = "registry+https://github.com/rust-lang/crates.io-index"
2546
- checksum = "d3b5247a96aeefec188691938459892bffd23f1c3e9900dc08ac5248fe3bf08e"
2546
+ checksum = "2a912286ceb858457147868b59790ba9296ae3b178b01de8d628da71c2ddb800"
2547
2547
  dependencies = [
2548
2548
  "symbolic-common",
2549
2549
  "symbolic-debuginfo",
@@ -2553,9 +2553,9 @@ dependencies = [
2553
2553
 
2554
2554
  [[package]]
2555
2555
  name = "symbolic-common"
2556
- version = "12.4.0"
2556
+ version = "12.4.1"
2557
2557
  source = "registry+https://github.com/rust-lang/crates.io-index"
2558
- checksum = "9e0e9bc48b3852f36a84f8d0da275d50cb3c2b88b59b9ec35fdd8b7fa239e37d"
2558
+ checksum = "fac08504d60cf5bdffeb8a6a028f1a4868a5da1098bb19eb46239440039163fb"
2559
2559
  dependencies = [
2560
2560
  "debugid",
2561
2561
  "memmap2",
@@ -2566,9 +2566,9 @@ dependencies = [
2566
2566
 
2567
2567
  [[package]]
2568
2568
  name = "symbolic-debuginfo"
2569
- version = "12.4.0"
2569
+ version = "12.4.1"
2570
2570
  source = "registry+https://github.com/rust-lang/crates.io-index"
2571
- checksum = "7ef9a1b95a8ea7b5afb550da0d93ecc706de3ce869a9674fc3bc51fadc019feb"
2571
+ checksum = "7f197ae562da1dec76244875041cbd244e517bf6bc88a9537ae874c555b019c7"
2572
2572
  dependencies = [
2573
2573
  "debugid",
2574
2574
  "dmsort",
@@ -2598,9 +2598,9 @@ dependencies = [
2598
2598
 
2599
2599
  [[package]]
2600
2600
  name = "symbolic-il2cpp"
2601
- version = "12.4.0"
2601
+ version = "12.4.1"
2602
2602
  source = "registry+https://github.com/rust-lang/crates.io-index"
2603
- checksum = "efaaade4f5b4815046bc327fe7c56f255c18f57de222efaa8212b554319e7303"
2603
+ checksum = "ed26a4b1f8891a17ce1962d2c38093431dce2741078f5e7d7efcd13741ca2ff6"
2604
2604
  dependencies = [
2605
2605
  "indexmap 2.0.0",
2606
2606
  "serde_json",
@@ -2610,9 +2610,9 @@ dependencies = [
2610
2610
 
2611
2611
  [[package]]
2612
2612
  name = "symbolic-ppdb"
2613
- version = "12.4.0"
2613
+ version = "12.4.1"
2614
2614
  source = "registry+https://github.com/rust-lang/crates.io-index"
2615
- checksum = "b95399a30236ac95fd9ce69a008b8a18e58859e9780a13bcb16fda545802f876"
2615
+ checksum = "13d6a54ddbea124f82a17564effd044078054f8bab037eb9fcdfee776d5bfbde"
2616
2616
  dependencies = [
2617
2617
  "flate2",
2618
2618
  "indexmap 1.9.2",
@@ -2626,9 +2626,9 @@ dependencies = [
2626
2626
 
2627
2627
  [[package]]
2628
2628
  name = "symbolic-symcache"
2629
- version = "12.4.0"
2629
+ version = "12.4.1"
2630
2630
  source = "registry+https://github.com/rust-lang/crates.io-index"
2631
- checksum = "4339f37007c0fd6d6dddaf6f04619a4a5d6308e71eabbd45c30e0af124014259"
2631
+ checksum = "ea05762ece95fa2bd2b06b389e953fdf7392cf8cbab06314892df71f54815bc6"
2632
2632
  dependencies = [
2633
2633
  "indexmap 2.0.0",
2634
2634
  "symbolic-common",
@@ -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.20.7"
5
+ version = "2.21.0"
6
6
  edition = "2021"
7
7
  rust-version = "1.65"
8
8
 
@@ -66,7 +66,7 @@ serde = { version = "1.0.152", features = ["derive"] }
66
66
  serde_json = "1.0.93"
67
67
  sha1_smol = { version = "1.0.0", features = ["serde"] }
68
68
  sourcemap = { version = "7.0.0", features = ["ram_bundle"] }
69
- symbolic = { version = "12.4.0", features = ["debuginfo-serde", "il2cpp"] }
69
+ symbolic = { version = "12.4.1", features = ["debuginfo-serde", "il2cpp"] }
70
70
  thiserror = "1.0.38"
71
71
  url = "2.3.1"
72
72
  username = "0.2.0"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sentry_cli
3
- Version: 2.20.7
3
+ Version: 2.21.0
4
4
  Summary: A command line utility to work with Sentry.
5
5
  Home-page: https://github.com/getsentry/sentry-cli
6
6
  Author: Sentry
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sentry-cli
3
- Version: 2.20.7
3
+ Version: 2.21.0
4
4
  Summary: A command line utility to work with Sentry.
5
5
  Home-page: https://github.com/getsentry/sentry-cli
6
6
  Author: Sentry
@@ -1,5 +1,6 @@
1
1
  use crate::api::Api;
2
2
  use crate::config::Config;
3
+ use crate::constants::DEFAULT_MAX_WAIT;
3
4
  use crate::utils::args::ArgExt;
4
5
  use crate::utils::file_search::ReleaseFileSearch;
5
6
  use crate::utils::file_upload::{FileUpload, SourceFile, UploadContext};
@@ -52,6 +53,7 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
52
53
  let project = config.get_project(matches).ok();
53
54
  let api = Api::current();
54
55
  let chunk_upload_options = api.get_chunk_upload_options(&org)?;
56
+
55
57
  let context = &UploadContext {
56
58
  org: &org,
57
59
  project: project.as_deref(),
@@ -59,6 +61,7 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
59
61
  dist: None,
60
62
  note: None,
61
63
  wait: true,
64
+ max_wait: DEFAULT_MAX_WAIT,
62
65
  dedupe: false,
63
66
  chunk_upload_options: chunk_upload_options.as_ref(),
64
67
  };
@@ -1,5 +1,6 @@
1
1
  use std::collections::BTreeSet;
2
2
  use std::str::{self, FromStr};
3
+ use std::time::Duration;
3
4
 
4
5
  use anyhow::{bail, format_err, Result};
5
6
  use clap::{builder::PossibleValuesParser, Arg, ArgAction, ArgMatches, Command};
@@ -11,6 +12,7 @@ use symbolic::debuginfo::FileFormat;
11
12
 
12
13
  use crate::api::Api;
13
14
  use crate::config::Config;
15
+ use crate::constants::DEFAULT_MAX_WAIT;
14
16
  use crate::utils::args::ArgExt;
15
17
  use crate::utils::dif::{DifType, ObjectDifFeatures};
16
18
  use crate::utils::dif_upload::{DifFormat, DifUpload};
@@ -182,9 +184,23 @@ pub fn make_command(command: Command) -> Command {
182
184
  Arg::new("wait")
183
185
  .long("wait")
184
186
  .action(ArgAction::SetTrue)
187
+ .conflicts_with("wait_for")
185
188
  .help(
186
189
  "Wait for the server to fully process uploaded files. Errors \
187
- can only be displayed if --wait is specified, but this will \
190
+ can only be displayed if --wait or --wait-for is specified, but this will \
191
+ significantly slow down the upload process.",
192
+ ),
193
+ )
194
+ .arg(
195
+ Arg::new("wait_for")
196
+ .long("wait-for")
197
+ .value_name("SECS")
198
+ .value_parser(clap::value_parser!(u64))
199
+ .conflicts_with("wait")
200
+ .help(
201
+ "Wait for the server to fully process uploaded files, \
202
+ but at most for the given number of seconds. Errors \
203
+ can only be displayed if --wait or --wait-for is specified, but this will \
188
204
  significantly slow down the upload process.",
189
205
  ),
190
206
  )
@@ -217,10 +233,15 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
217
233
  org, project
218
234
  );
219
235
 
236
+ let wait_for_secs = matches.get_one::<u64>("wait_for").copied();
237
+ let wait = matches.get_flag("wait") || wait_for_secs.is_some();
238
+ let max_wait = wait_for_secs.map_or(DEFAULT_MAX_WAIT, Duration::from_secs);
239
+
220
240
  // Build generic upload parameters
221
241
  let mut upload = DifUpload::new(org.clone(), project.clone());
222
242
  upload
223
- .wait(matches.get_flag("wait"))
243
+ .wait(wait)
244
+ .max_wait(max_wait)
224
245
  .search_paths(matches.get_many::<String>("paths").unwrap_or_default())
225
246
  .allow_zips(!matches.get_flag("no_zips"))
226
247
  .filter_ids(ids);
@@ -3,6 +3,7 @@ use std::ffi::OsStr;
3
3
  use std::fs;
4
4
  use std::io::Read;
5
5
  use std::path::Path;
6
+ use std::time::Duration;
6
7
 
7
8
  use anyhow::{bail, format_err, Result};
8
9
  use clap::{Arg, ArgAction, ArgMatches, Command};
@@ -11,6 +12,7 @@ use symbolic::debuginfo::sourcebundle::SourceFileType;
11
12
 
12
13
  use crate::api::{Api, ProgressBarMode};
13
14
  use crate::config::Config;
15
+ use crate::constants::DEFAULT_MAX_WAIT;
14
16
  use crate::utils::args::validate_distribution;
15
17
  use crate::utils::file_search::ReleaseFileSearch;
16
18
  use crate::utils::file_upload::{
@@ -52,8 +54,20 @@ pub fn make_command(command: Command) -> Command {
52
54
  Arg::new("wait")
53
55
  .long("wait")
54
56
  .action(ArgAction::SetTrue)
57
+ .conflicts_with("wait_for")
55
58
  .help("Wait for the server to fully process uploaded files."),
56
59
  )
60
+ .arg(
61
+ Arg::new("wait_for")
62
+ .long("wait-for")
63
+ .value_name("SECS")
64
+ .value_parser(clap::value_parser!(u64))
65
+ .conflicts_with("wait")
66
+ .help(
67
+ "Wait for the server to fully process uploaded files, \
68
+ but at most for the given number of seconds.",
69
+ ),
70
+ )
57
71
  .arg(
58
72
  Arg::new("file-headers")
59
73
  .long("file-header")
@@ -127,13 +141,18 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
127
141
  }
128
142
  };
129
143
 
144
+ let wait_for_secs = matches.get_one::<u64>("wait_for").copied();
145
+ let wait = matches.get_flag("wait") || wait_for_secs.is_some();
146
+ let max_wait = wait_for_secs.map_or(DEFAULT_MAX_WAIT, Duration::from_secs);
147
+
130
148
  let context = &UploadContext {
131
149
  org: &org,
132
150
  project: project.as_deref(),
133
151
  release: Some(&release),
134
152
  dist,
135
153
  note: None,
136
- wait: matches.get_flag("wait"),
154
+ wait,
155
+ max_wait,
137
156
  dedupe: false,
138
157
  chunk_upload_options: chunk_upload_options.as_ref(),
139
158
  };
@@ -27,7 +27,10 @@ fn update_config(config: &Config, token: &str) -> Result<()> {
27
27
 
28
28
  pub fn execute(matches: &ArgMatches) -> Result<()> {
29
29
  let config = Config::current();
30
- let token_url = format!("{}/api/", config.get_base_url()?);
30
+ let token_url = format!(
31
+ "{}/orgredirect/organizations/:orgslug/settings/auth-tokens/",
32
+ config.get_base_url()?
33
+ );
31
34
  let predefined_token = matches.get_one::<String>("auth_token");
32
35
  let has_predefined_token = predefined_token.is_some();
33
36
 
@@ -68,11 +71,19 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
68
71
  cfg.set_auth(Auth::Token(token.to_string()))?;
69
72
  Ok(())
70
73
  })?;
74
+
71
75
  match Api::with_config(test_cfg).get_auth_info() {
72
76
  Ok(info) => {
73
- // we can unwrap here somewhat safely because we do not permit
74
- // signing in with legacy non user bound api keys here.
75
- println!("Valid token for user {}", info.user.unwrap().email);
77
+ match info.user {
78
+ Some(user) => {
79
+ // Old school user auth token
80
+ println!("Valid token for user {}", user.email);
81
+ }
82
+ None => {
83
+ // New org auth token
84
+ println!("Valid org token");
85
+ }
86
+ }
76
87
  break;
77
88
  }
78
89
  Err(err) => {
@@ -1,6 +1,7 @@
1
1
  use std::env;
2
2
  use std::ffi::OsStr;
3
3
  use std::fs;
4
+ use std::time::Duration;
4
5
 
5
6
  use anyhow::{anyhow, Result};
6
7
  use clap::{Arg, ArgAction, ArgMatches, Command};
@@ -10,6 +11,7 @@ use log::info;
10
11
 
11
12
  use crate::api::Api;
12
13
  use crate::config::Config;
14
+ use crate::constants::DEFAULT_MAX_WAIT;
13
15
  use crate::utils::appcenter::{get_appcenter_package, get_react_native_appcenter_release};
14
16
  use crate::utils::args::{validate_distribution, ArgExt};
15
17
  use crate::utils::file_search::ReleaseFileSearch;
@@ -90,8 +92,20 @@ pub fn make_command(command: Command) -> Command {
90
92
  Arg::new("wait")
91
93
  .long("wait")
92
94
  .action(ArgAction::SetTrue)
95
+ .conflicts_with("wait_for")
93
96
  .help("Wait for the server to fully process uploaded files."),
94
97
  )
98
+ .arg(
99
+ Arg::new("wait_for")
100
+ .long("wait-for")
101
+ .value_name("SECS")
102
+ .value_parser(clap::value_parser!(u64))
103
+ .conflicts_with("wait")
104
+ .help(
105
+ "Wait for the server to fully process uploaded files, \
106
+ but at most for the given number of seconds.",
107
+ ),
108
+ )
95
109
  }
96
110
 
97
111
  pub fn execute(matches: &ArgMatches) -> Result<()> {
@@ -168,6 +182,10 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
168
182
 
169
183
  let chunk_upload_options = api.get_chunk_upload_options(&org)?;
170
184
 
185
+ let wait_for_secs = matches.get_one::<u64>("wait_for").copied();
186
+ let wait = matches.get_flag("wait") || wait_for_secs.is_some();
187
+ let max_wait = wait_for_secs.map_or(DEFAULT_MAX_WAIT, Duration::from_secs);
188
+
171
189
  match matches.get_many::<String>("dist") {
172
190
  None => {
173
191
  println!(
@@ -181,7 +199,8 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
181
199
  release: Some(&release),
182
200
  dist: None,
183
201
  note: None,
184
- wait: matches.get_flag("wait"),
202
+ wait,
203
+ max_wait,
185
204
  dedupe: false,
186
205
  chunk_upload_options: chunk_upload_options.as_ref(),
187
206
  })?;
@@ -199,7 +218,8 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
199
218
  release: Some(&release),
200
219
  dist: Some(dist),
201
220
  note: None,
202
- wait: matches.get_flag("wait"),
221
+ wait,
222
+ max_wait,
203
223
  dedupe: false,
204
224
  chunk_upload_options: chunk_upload_options.as_ref(),
205
225
  })?;
@@ -1,5 +1,6 @@
1
1
  use std::env;
2
2
  use std::path::PathBuf;
3
+ use std::time::Duration;
3
4
 
4
5
  use anyhow::Result;
5
6
  use clap::{Arg, ArgAction, ArgMatches, Command};
@@ -8,6 +9,7 @@ use sourcemap::ram_bundle::RamBundle;
8
9
 
9
10
  use crate::api::Api;
10
11
  use crate::config::Config;
12
+ use crate::constants::DEFAULT_MAX_WAIT;
11
13
  use crate::utils::args::{validate_distribution, ArgExt};
12
14
  use crate::utils::file_search::ReleaseFileSearch;
13
15
  use crate::utils::file_upload::UploadContext;
@@ -36,14 +38,12 @@ pub fn make_command(command: Command) -> Command {
36
38
  Arg::new("release")
37
39
  .long("release")
38
40
  .value_name("RELEASE")
39
- .required(true)
40
41
  .help("The name of the release to publish."),
41
42
  )
42
43
  .arg(
43
44
  Arg::new("dist")
44
45
  .long("dist")
45
46
  .value_name("DISTRIBUTION")
46
- .required(true)
47
47
  .action(ArgAction::Append)
48
48
  .value_parser(validate_distribution)
49
49
  .help("The names of the distributions to publish. Can be supplied multiple times."),
@@ -52,8 +52,20 @@ pub fn make_command(command: Command) -> Command {
52
52
  Arg::new("wait")
53
53
  .long("wait")
54
54
  .action(ArgAction::SetTrue)
55
+ .conflicts_with("wait_for")
55
56
  .help("Wait for the server to fully process uploaded files."),
56
57
  )
58
+ .arg(
59
+ Arg::new("wait_for")
60
+ .long("wait-for")
61
+ .value_name("SECS")
62
+ .value_parser(clap::value_parser!(u64))
63
+ .conflicts_with("wait")
64
+ .help(
65
+ "Wait for the server to fully process uploaded files, \
66
+ but at most for the given number of seconds.",
67
+ ),
68
+ )
57
69
  }
58
70
 
59
71
  pub fn execute(matches: &ArgMatches) -> Result<()> {
@@ -98,24 +110,44 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
98
110
 
99
111
  processor.rewrite(&[base.to_str().unwrap()])?;
100
112
  processor.add_sourcemap_references()?;
113
+ processor.add_debug_id_references()?;
101
114
 
102
- // TODO: make this optional
103
- let version = matches.get_one::<String>("release").unwrap().to_string();
115
+ let version = matches.get_one::<String>("release");
104
116
  let chunk_upload_options = api.get_chunk_upload_options(&org)?;
105
117
 
106
- for dist in matches.get_many::<String>("dist").unwrap() {
107
- println!(
108
- "Uploading sourcemaps for release {} distribution {}",
109
- &version, dist
110
- );
118
+ let wait_for_secs = matches.get_one::<u64>("wait_for").copied();
119
+ let wait = matches.get_flag("wait") || wait_for_secs.is_some();
120
+ let max_wait = wait_for_secs.map_or(DEFAULT_MAX_WAIT, Duration::from_secs);
121
+
122
+ if let Some(version) = version {
123
+ for dist in matches.get_many::<String>("dist").unwrap() {
124
+ println!(
125
+ "Uploading sourcemaps for release {} distribution {}",
126
+ version, dist
127
+ );
111
128
 
129
+ processor.upload(&UploadContext {
130
+ org: &org,
131
+ project: Some(&project),
132
+ release: Some(version),
133
+ dist: Some(dist),
134
+ note: None,
135
+ wait,
136
+ max_wait,
137
+ dedupe: false,
138
+ chunk_upload_options: chunk_upload_options.as_ref(),
139
+ })?;
140
+ }
141
+ } else {
142
+ // Debug Id Upload
112
143
  processor.upload(&UploadContext {
113
144
  org: &org,
114
145
  project: Some(&project),
115
- release: Some(&version),
116
- dist: Some(dist),
146
+ release: None,
147
+ dist: None,
117
148
  note: None,
118
- wait: matches.get_flag("wait"),
149
+ wait,
150
+ max_wait,
119
151
  dedupe: false,
120
152
  chunk_upload_options: chunk_upload_options.as_ref(),
121
153
  })?;