sentry-cli 2.31.1__tar.gz → 2.31.2__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 (122) hide show
  1. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/Cargo.lock +1 -1
  2. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/Cargo.toml +1 -1
  3. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/PKG-INFO +1 -1
  4. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/sentry_cli.egg-info/PKG-INFO +1 -1
  5. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/api/mod.rs +21 -18
  6. sentry_cli-2.31.2/src/api/pagination.rs +42 -0
  7. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/commands/react_native/xcode.rs +9 -4
  8. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/config.rs +1 -1
  9. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/utils/ui.rs +3 -7
  10. sentry_cli-2.31.1/src/api/pagination.rs +0 -46
  11. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/LICENSE +0 -0
  12. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/MANIFEST.in +0 -0
  13. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/README.md +0 -0
  14. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/build.rs +0 -0
  15. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/pyproject.toml +0 -0
  16. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/sentry_cli.egg-info/SOURCES.txt +0 -0
  17. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/sentry_cli.egg-info/dependency_links.txt +0 -0
  18. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/sentry_cli.egg-info/top_level.txt +0 -0
  19. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/setup.cfg +0 -0
  20. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/setup.py +0 -0
  21. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/api/connection_manager.rs +0 -0
  22. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/api/encoding.rs +0 -0
  23. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/api/errors/api_error.rs +0 -0
  24. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/api/errors/mod.rs +0 -0
  25. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/api/errors/sentry_error.rs +0 -0
  26. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/bashsupport.sh +0 -0
  27. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/commands/bash_hook.rs +0 -0
  28. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/commands/debug_files/bundle_jvm.rs +0 -0
  29. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/commands/debug_files/bundle_sources.rs +0 -0
  30. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/commands/debug_files/check.rs +0 -0
  31. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/commands/debug_files/find.rs +0 -0
  32. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/commands/debug_files/mod.rs +0 -0
  33. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/commands/debug_files/print_sources.rs +0 -0
  34. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/commands/debug_files/upload.rs +0 -0
  35. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/commands/deploys/list.rs +0 -0
  36. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/commands/deploys/mod.rs +0 -0
  37. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/commands/deploys/new.rs +0 -0
  38. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/commands/events/list.rs +0 -0
  39. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/commands/events/mod.rs +0 -0
  40. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/commands/files/delete.rs +0 -0
  41. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/commands/files/list.rs +0 -0
  42. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/commands/files/mod.rs +0 -0
  43. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/commands/files/upload.rs +0 -0
  44. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/commands/info.rs +0 -0
  45. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/commands/issues/list.rs +0 -0
  46. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/commands/issues/mod.rs +0 -0
  47. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/commands/issues/mute.rs +0 -0
  48. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/commands/issues/resolve.rs +0 -0
  49. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/commands/issues/unresolve.rs +0 -0
  50. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/commands/login.rs +0 -0
  51. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/commands/mod.rs +0 -0
  52. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/commands/monitors/list.rs +0 -0
  53. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/commands/monitors/mod.rs +0 -0
  54. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/commands/monitors/run.rs +0 -0
  55. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/commands/organizations/list.rs +0 -0
  56. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/commands/organizations/mod.rs +0 -0
  57. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/commands/projects/list.rs +0 -0
  58. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/commands/projects/mod.rs +0 -0
  59. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/commands/react_native/appcenter.rs +0 -0
  60. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/commands/react_native/gradle.rs +0 -0
  61. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/commands/react_native/mod.rs +0 -0
  62. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/commands/releases/archive.rs +0 -0
  63. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/commands/releases/delete.rs +0 -0
  64. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/commands/releases/finalize.rs +0 -0
  65. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/commands/releases/info.rs +0 -0
  66. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/commands/releases/list.rs +0 -0
  67. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/commands/releases/mod.rs +0 -0
  68. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/commands/releases/new.rs +0 -0
  69. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/commands/releases/propose_version.rs +0 -0
  70. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/commands/releases/restore.rs +0 -0
  71. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/commands/releases/set_commits.rs +0 -0
  72. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/commands/repos/list.rs +0 -0
  73. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/commands/repos/mod.rs +0 -0
  74. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/commands/send_envelope.rs +0 -0
  75. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/commands/send_event.rs +0 -0
  76. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/commands/sourcemaps/explain.rs +0 -0
  77. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/commands/sourcemaps/inject.rs +0 -0
  78. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/commands/sourcemaps/mod.rs +0 -0
  79. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/commands/sourcemaps/resolve.rs +0 -0
  80. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/commands/sourcemaps/upload.rs +0 -0
  81. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/commands/uninstall.rs +0 -0
  82. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/commands/update.rs +0 -0
  83. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/commands/upload_dif.rs +0 -0
  84. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/commands/upload_dsym.rs +0 -0
  85. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/commands/upload_proguard.rs +0 -0
  86. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/constants.rs +0 -0
  87. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/main.rs +0 -0
  88. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/utils/android.rs +0 -0
  89. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/utils/appcenter.rs +0 -0
  90. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/utils/args.rs +0 -0
  91. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/utils/auth_token/auth_token_impl.rs +0 -0
  92. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/utils/auth_token/error.rs +0 -0
  93. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/utils/auth_token/mod.rs +0 -0
  94. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/utils/auth_token/org_auth_token.rs +0 -0
  95. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/utils/auth_token/test.rs +0 -0
  96. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/utils/auth_token/user_auth_token.rs +0 -0
  97. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/utils/chunks.rs +0 -0
  98. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/utils/cordova.rs +0 -0
  99. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/utils/dif.rs +0 -0
  100. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/utils/dif_upload.rs +0 -0
  101. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/utils/event.rs +0 -0
  102. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/utils/file_search.rs +0 -0
  103. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/utils/file_upload.rs +0 -0
  104. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/utils/formatting.rs +0 -0
  105. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/utils/fs.rs +0 -0
  106. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/utils/http.rs +0 -0
  107. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/utils/logging.rs +0 -0
  108. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/utils/mod.rs +0 -0
  109. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/utils/progress.rs +0 -0
  110. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/utils/releases.rs +0 -0
  111. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/utils/retry.rs +0 -0
  112. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/utils/snapshots/sentry_cli__utils__vcs__generate_patch_default_twenty.snap +0 -0
  113. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/utils/snapshots/sentry_cli__utils__vcs__generate_patch_ignore_missing.snap +0 -0
  114. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/utils/snapshots/sentry_cli__utils__vcs__generate_patch_set_base.snap +0 -0
  115. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/utils/snapshots/sentry_cli__utils__vcs__generate_patch_set_previous_commit.snap +0 -0
  116. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/utils/snapshots/sentry_cli__utils__vcs__get_commits_from_git.snap +0 -0
  117. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/utils/sourcemaps/inject.rs +0 -0
  118. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/utils/sourcemaps.rs +0 -0
  119. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/utils/system.rs +0 -0
  120. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/utils/update.rs +0 -0
  121. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/utils/vcs.rs +0 -0
  122. {sentry_cli-2.31.1 → sentry_cli-2.31.2}/src/utils/xcode.rs +0 -0
@@ -2432,7 +2432,7 @@ dependencies = [
2432
2432
 
2433
2433
  [[package]]
2434
2434
  name = "sentry-cli"
2435
- version = "2.31.1"
2435
+ version = "2.31.2"
2436
2436
  dependencies = [
2437
2437
  "anyhow",
2438
2438
  "anylog",
@@ -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.31.1"
5
+ version = "2.31.2"
6
6
  edition = "2021"
7
7
  rust-version = "1.65"
8
8
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sentry_cli
3
- Version: 2.31.1
3
+ Version: 2.31.2
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.31.1
3
+ Version: 2.31.2
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
@@ -51,6 +51,7 @@ use crate::utils::retry::{get_default_backoff, DurationAsMilliseconds};
51
51
  use crate::utils::sourcemaps::get_sourcemap_reference_from_headers;
52
52
  use crate::utils::ui::{capitalize_string, make_byte_progress_bar};
53
53
 
54
+ use self::pagination::Pagination;
54
55
  use connection_manager::CurlConnectionManager;
55
56
  use encoding::{PathArg, QueryArg};
56
57
  use errors::{ApiError, ApiErrorKind, ApiResult, SentryError};
@@ -533,9 +534,9 @@ impl<'a> AuthenticatedApi<'a> {
533
534
  }
534
535
  }
535
536
 
536
- let next = resp.next_pagination_cursor();
537
+ let pagination = resp.pagination();
537
538
  rv.extend(resp.convert::<Vec<Artifact>>()?);
538
- if let Some(next) = next {
539
+ if let Some(next) = pagination.into_next_cursor() {
539
540
  cursor = next;
540
541
  } else {
541
542
  break;
@@ -1134,9 +1135,9 @@ impl<'a> AuthenticatedApi<'a> {
1134
1135
  break;
1135
1136
  }
1136
1137
  }
1137
- let next = resp.next_pagination_cursor();
1138
+ let pagination = resp.pagination();
1138
1139
  rv.extend(resp.convert::<Vec<Organization>>()?);
1139
- if let Some(next) = next {
1140
+ if let Some(next) = pagination.into_next_cursor() {
1140
1141
  cursor = next;
1141
1142
  } else {
1142
1143
  break;
@@ -1178,9 +1179,9 @@ impl<'a> AuthenticatedApi<'a> {
1178
1179
  break;
1179
1180
  }
1180
1181
  }
1181
- let next = resp.next_pagination_cursor();
1182
+ let pagination = resp.pagination();
1182
1183
  rv.extend(resp.convert::<Vec<Monitor>>()?);
1183
- if let Some(next) = next {
1184
+ if let Some(next) = pagination.into_next_cursor() {
1184
1185
  cursor = next;
1185
1186
  } else {
1186
1187
  break;
@@ -1206,9 +1207,9 @@ impl<'a> AuthenticatedApi<'a> {
1206
1207
  break;
1207
1208
  }
1208
1209
  }
1209
- let next = resp.next_pagination_cursor();
1210
+ let pagination = resp.pagination();
1210
1211
  rv.extend(resp.convert::<Vec<Project>>()?);
1211
- if let Some(next) = next {
1212
+ if let Some(next) = pagination.into_next_cursor() {
1212
1213
  cursor = next;
1213
1214
  } else {
1214
1215
  break;
@@ -1246,14 +1247,14 @@ impl<'a> AuthenticatedApi<'a> {
1246
1247
  }
1247
1248
  }
1248
1249
 
1249
- let next = resp.next_pagination_cursor();
1250
+ let pagination = resp.pagination();
1250
1251
  rv.extend(resp.convert::<Vec<ProcessedEvent>>()?);
1251
1252
 
1252
1253
  if requests_no == max_pages {
1253
1254
  break;
1254
1255
  }
1255
1256
 
1256
- if let Some(next) = next {
1257
+ if let Some(next) = pagination.into_next_cursor() {
1257
1258
  cursor = next;
1258
1259
  } else {
1259
1260
  break;
@@ -1272,7 +1273,7 @@ impl<'a> AuthenticatedApi<'a> {
1272
1273
  query: Option<String>,
1273
1274
  ) -> ApiResult<Vec<Issue>> {
1274
1275
  let mut rv = vec![];
1275
- let mut cursor = String::from("");
1276
+ let mut cursor = "".to_string();
1276
1277
  let mut requests_no = 0;
1277
1278
 
1278
1279
  let url = if let Some(query) = query {
@@ -1299,14 +1300,14 @@ impl<'a> AuthenticatedApi<'a> {
1299
1300
  }
1300
1301
  }
1301
1302
 
1302
- let next = resp.next_pagination_cursor();
1303
+ let pagination = resp.pagination();
1303
1304
  rv.extend(resp.convert::<Vec<Issue>>()?);
1304
1305
 
1305
1306
  if requests_no == max_pages {
1306
1307
  break;
1307
1308
  }
1308
1309
 
1309
- if let Some(next) = next {
1310
+ if let Some(next) = pagination.into_next_cursor() {
1310
1311
  cursor = next;
1311
1312
  } else {
1312
1313
  break;
@@ -1330,12 +1331,13 @@ impl<'a> AuthenticatedApi<'a> {
1330
1331
  if resp.status() == 404 {
1331
1332
  break;
1332
1333
  } else {
1333
- if let Some(next) = resp.next_pagination_cursor() {
1334
+ let pagination = resp.pagination();
1335
+ rv.extend(resp.convert::<Vec<Repo>>()?);
1336
+ if let Some(next) = pagination.into_next_cursor() {
1334
1337
  cursor = next;
1335
1338
  } else {
1336
1339
  break;
1337
1340
  }
1338
- rv.extend(resp.convert::<Vec<Repo>>()?);
1339
1341
  }
1340
1342
  }
1341
1343
  Ok(rv)
@@ -1968,10 +1970,11 @@ impl ApiResponse {
1968
1970
  None
1969
1971
  }
1970
1972
 
1971
- fn next_pagination_cursor(&self) -> Option<String> {
1973
+ /// Returns the pagination info
1974
+ pub fn pagination(&self) -> Pagination {
1972
1975
  self.get_header("link")
1973
- .and_then(pagination::next_cursor)
1974
- .map(String::from)
1976
+ .and_then(|x| x.parse().ok())
1977
+ .unwrap_or_default()
1975
1978
  }
1976
1979
 
1977
1980
  /// Returns true if the response is JSON.
@@ -0,0 +1,42 @@
1
+ use std::str::FromStr;
2
+
3
+ use crate::utils::http;
4
+
5
+ #[derive(Debug, Clone)]
6
+ pub struct Link {
7
+ results: bool,
8
+ cursor: String,
9
+ }
10
+
11
+ #[derive(Debug, Default, Clone)]
12
+ pub struct Pagination {
13
+ next: Option<Link>,
14
+ }
15
+
16
+ impl Pagination {
17
+ pub fn into_next_cursor(self) -> Option<String> {
18
+ self.next
19
+ .and_then(|x| if x.results { Some(x.cursor) } else { None })
20
+ }
21
+ }
22
+
23
+ impl FromStr for Pagination {
24
+ type Err = ();
25
+
26
+ fn from_str(s: &str) -> Result<Pagination, ()> {
27
+ let mut rv = Pagination::default();
28
+ for item in http::parse_link_header(s) {
29
+ let target = match item.get("rel") {
30
+ Some(&"next") => &mut rv.next,
31
+ _ => continue,
32
+ };
33
+
34
+ *target = Some(Link {
35
+ results: item.get("results") == Some(&"true"),
36
+ cursor: (*item.get("cursor").unwrap_or(&"")).to_string(),
37
+ });
38
+ }
39
+
40
+ Ok(rv)
41
+ }
42
+ }
@@ -373,10 +373,15 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
373
373
  Ok(Some(plist)) => {
374
374
  // Successfully discovered and parsed Info.plist
375
375
  let dist_string = plist.build().to_string();
376
- let release_string = format!("{}@{}+{}", plist.bundle_id(), plist.version(), dist_string);
376
+ let release_string = format!(
377
+ "{}@{}+{}",
378
+ plist.bundle_id(),
379
+ plist.version(),
380
+ dist_string
381
+ );
377
382
  info!("Parse result from Info.plist: {:?}", &plist);
378
383
  (Some(dist_string), Some(release_string))
379
- },
384
+ }
380
385
  _ => {
381
386
  bail!("Info.plist was not found or an parsing error occurred");
382
387
  }
@@ -556,8 +561,8 @@ pub fn wrap_call() -> Result<()> {
556
561
  if let (Ok(packager_sourcemap), Ok(mut hermes_sourcemap)) =
557
562
  (packager_sourcemap_result, hermes_sourcemap_result)
558
563
  {
559
- if hermes_sourcemap.get("debugId").is_none()
560
- && hermes_sourcemap.get("debug_id").is_none()
564
+ if !hermes_sourcemap.contains_key("debugId")
565
+ && !hermes_sourcemap.contains_key("debug_id")
561
566
  {
562
567
  if let Some(debug_id) = packager_sourcemap
563
568
  .get("debugId")
@@ -217,7 +217,7 @@ impl Config {
217
217
  bail!("Two different url values supplied: `{token_url}` (from token), `{url}`.");
218
218
  }
219
219
 
220
- self.cached_base_url = url.to_owned();
220
+ url.clone_into(&mut self.cached_base_url);
221
221
  self.ini
222
222
  .set_to(Some("defaults"), "url".into(), self.cached_base_url.clone());
223
223
  Ok(())
@@ -45,14 +45,10 @@ pub fn capitalize_string(s: &str) -> String {
45
45
  }
46
46
 
47
47
  /// Like ``io::copy`` but advances a progress bar set to bytes.
48
- pub fn copy_with_progress<R: ?Sized, W: ?Sized>(
49
- pb: &ProgressBar,
50
- reader: &mut R,
51
- writer: &mut W,
52
- ) -> io::Result<u64>
48
+ pub fn copy_with_progress<R, W>(pb: &ProgressBar, reader: &mut R, writer: &mut W) -> io::Result<u64>
53
49
  where
54
- R: Read,
55
- W: Write,
50
+ R: Read + ?Sized,
51
+ W: Write + ?Sized,
56
52
  {
57
53
  let mut buf = [0; 16384];
58
54
  let mut written = 0;
@@ -1,46 +0,0 @@
1
- use crate::utils::http;
2
-
3
- pub(super) fn next_cursor(value: &str) -> Option<&str> {
4
- http::parse_link_header(value)
5
- .iter()
6
- .rev() // Reversing is necessary for backwards compatibility with a previous implementation
7
- .find(|item| item.get("rel") == Some(&"next"))
8
- .and_then::<&str, _>(|item| {
9
- if item.get("results") == Some(&"true") {
10
- Some(item.get("cursor").unwrap_or(&""))
11
- } else {
12
- None
13
- }
14
- })
15
- }
16
-
17
- #[cfg(test)]
18
- mod tests {
19
- use super::*;
20
-
21
- #[test]
22
- fn test_pagination_empty_string() {
23
- let result = next_cursor("");
24
- assert_eq!(result, None);
25
- }
26
-
27
- #[test]
28
- fn test_pagination_with_next() {
29
- let result = next_cursor(
30
- "<https://sentry.io/api/0/organizations/sentry/releases/?&cursor=100:-1:1>; \
31
- rel=\"previous\"; results=\"false\"; cursor=\"100:-1:1\", \
32
- <https://sentry.io/api/0/organizations/sentry/releases/?&cursor=100:1:0>; \
33
- rel=\"next\"; results=\"true\"; cursor=\"100:1:0\"",
34
- );
35
- assert_eq!(result, Some("100:1:0"));
36
- }
37
-
38
- #[test]
39
- fn test_pagination_without_next() {
40
- let result = next_cursor(
41
- "<https://sentry.io/api/0/organizations/sentry/releases/?&cursor=100:-1:1>; \
42
- rel=\"previous\"; results=\"false\"; cursor=\"100:-1:1\"",
43
- );
44
- assert_eq!(result, None);
45
- }
46
- }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes