cloudsmith-cli 1.30.0__tar.gz → 1.31.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 (183) hide show
  1. {cloudsmith_cli-1.30.0/cloudsmith_cli.egg-info → cloudsmith_cli-1.31.0}/PKG-INFO +8 -7
  2. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/README.md +5 -4
  3. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/command.py +12 -0
  4. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/auth.py +26 -20
  5. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/credential_helper/cargo.py +3 -2
  6. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/credential_helper/docker.py +2 -2
  7. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/credential_helper/manage.py +178 -4
  8. cloudsmith_cli-1.31.0/cloudsmith_cli/cli/commands/credential_helper/pnpm.py +77 -0
  9. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/dependencies.py +10 -6
  10. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/list_.py +3 -2
  11. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/login.py +14 -9
  12. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/main.py +1 -0
  13. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/mcp.py +35 -13
  14. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/push.py +128 -24
  15. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/update.py +2 -2
  16. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/upstream.py +1 -0
  17. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/vulnerabilities.py +27 -8
  18. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/whoami.py +24 -9
  19. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/config.py +181 -16
  20. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/decorators.py +179 -38
  21. cloudsmith_cli-1.31.0/cloudsmith_cli/cli/deprecation.py +211 -0
  22. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/exceptions.py +8 -3
  23. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/saml.py +27 -5
  24. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/utils.py +21 -4
  25. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/validators.py +34 -15
  26. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/conftest.py +7 -0
  27. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/api/exceptions.py +21 -5
  28. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/api/init.py +15 -4
  29. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/api/user.py +3 -1
  30. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/api/v2.py +0 -11
  31. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/api/vulnerabilities.py +31 -17
  32. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/cache_utils.py +59 -34
  33. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/config.py +1 -1
  34. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/credentials/oidc/cache.py +40 -16
  35. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/credentials/providers/oidc_provider.py +12 -3
  36. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/download.py +3 -3
  37. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/keyring.py +37 -13
  38. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/mcp/server.py +33 -4
  39. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/pagination.py +19 -18
  40. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/ratelimits.py +5 -5
  41. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/rest.py +44 -10
  42. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/session.py +34 -9
  43. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/sso.py +23 -4
  44. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/update_check.py +1 -1
  45. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/credential_helpers/cargo/installer.py +42 -14
  46. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/credential_helpers/docker/installer.py +13 -6
  47. cloudsmith_cli-1.31.0/cloudsmith_cli/credential_helpers/gradle/__init__.py +2 -0
  48. cloudsmith_cli-1.31.0/cloudsmith_cli/credential_helpers/gradle/installer.py +63 -0
  49. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/credential_helpers/launchers.py +74 -12
  50. cloudsmith_cli-1.31.0/cloudsmith_cli/credential_helpers/maven/__init__.py +2 -0
  51. cloudsmith_cli-1.31.0/cloudsmith_cli/credential_helpers/maven/extensions.py +136 -0
  52. cloudsmith_cli-1.31.0/cloudsmith_cli/credential_helpers/maven/installer.py +337 -0
  53. cloudsmith_cli-1.31.0/cloudsmith_cli/credential_helpers/maven/mavenrc.py +86 -0
  54. cloudsmith_cli-1.31.0/cloudsmith_cli/credential_helpers/maven_tools.py +317 -0
  55. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/credential_helpers/pnpm/installer.py +23 -23
  56. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/credential_helpers/pnpm/rc.py +14 -7
  57. cloudsmith_cli-1.31.0/cloudsmith_cli/credential_helpers/sbt/__init__.py +2 -0
  58. cloudsmith_cli-1.31.0/cloudsmith_cli/credential_helpers/sbt/installer.py +87 -0
  59. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/credential_helpers/terraform/installer.py +2 -2
  60. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/credential_helpers/terraform/terraformrc.py +38 -7
  61. cloudsmith_cli-1.31.0/cloudsmith_cli/data/VERSION +1 -0
  62. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/data/config.ini +2 -2
  63. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0/cloudsmith_cli.egg-info}/PKG-INFO +8 -7
  64. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli.egg-info/SOURCES.txt +10 -0
  65. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli.egg-info/requires.txt +2 -2
  66. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/pyproject.toml +7 -6
  67. cloudsmith_cli-1.30.0/cloudsmith_cli/cli/commands/credential_helper/pnpm.py +0 -51
  68. cloudsmith_cli-1.30.0/cloudsmith_cli/data/VERSION +0 -1
  69. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/LICENSE +0 -0
  70. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/MANIFEST.in +0 -0
  71. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/__init__.py +0 -0
  72. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/__main__.py +0 -0
  73. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/__init__.py +0 -0
  74. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/__init__.py +0 -0
  75. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/check.py +0 -0
  76. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/copy.py +0 -0
  77. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/credential_helper/__init__.py +0 -0
  78. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/credential_helper/generic.py +0 -0
  79. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/credential_helper/terraform.py +0 -0
  80. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/delete.py +0 -0
  81. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/docs.py +0 -0
  82. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/domains.py +0 -0
  83. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/download.py +0 -0
  84. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/entitlements.py +0 -0
  85. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/help_.py +0 -0
  86. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/logout.py +0 -0
  87. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/metadata.py +0 -0
  88. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/metrics/__init__.py +0 -0
  89. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/metrics/command.py +0 -0
  90. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/metrics/entitlements.py +0 -0
  91. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/metrics/packages.py +0 -0
  92. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/move.py +0 -0
  93. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/policy/__init__.py +0 -0
  94. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/policy/command.py +0 -0
  95. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/policy/deny.py +0 -0
  96. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/policy/license.py +0 -0
  97. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/policy/vulnerability.py +0 -0
  98. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/quarantine.py +0 -0
  99. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/quota/__init__.py +0 -0
  100. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/quota/command.py +0 -0
  101. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/quota/history.py +0 -0
  102. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/quota/quota.py +0 -0
  103. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/registry.py +0 -0
  104. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/repos.py +0 -0
  105. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/resync.py +0 -0
  106. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/status.py +0 -0
  107. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/tags.py +0 -0
  108. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/tokens.py +0 -0
  109. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/dsc_parser.py +0 -0
  110. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/metadata_common.py +0 -0
  111. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/table.py +0 -0
  112. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/types.py +0 -0
  113. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/webserver.py +0 -0
  114. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/__init__.py +0 -0
  115. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/api/__init__.py +0 -0
  116. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/api/distros.py +0 -0
  117. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/api/entitlements.py +0 -0
  118. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/api/files.py +0 -0
  119. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/api/metadata.py +0 -0
  120. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/api/metrics.py +0 -0
  121. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/api/orgs.py +0 -0
  122. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/api/packages.py +0 -0
  123. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/api/quota.py +0 -0
  124. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/api/rates.py +0 -0
  125. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/api/repos.py +0 -0
  126. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/api/status.py +0 -0
  127. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/api/upstreams.py +0 -0
  128. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/api/version.py +0 -0
  129. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/api/workspaces.py +0 -0
  130. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/certificate_errors.py +0 -0
  131. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/credentials/__init__.py +0 -0
  132. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/credentials/chain.py +0 -0
  133. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/credentials/models.py +0 -0
  134. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/credentials/oidc/__init__.py +0 -0
  135. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/credentials/oidc/detectors/__init__.py +0 -0
  136. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/credentials/oidc/detectors/aws.py +0 -0
  137. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/credentials/oidc/detectors/azure_devops.py +0 -0
  138. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/credentials/oidc/detectors/base.py +0 -0
  139. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/credentials/oidc/detectors/bitbucket_pipelines.py +0 -0
  140. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/credentials/oidc/detectors/buildkite.py +0 -0
  141. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/credentials/oidc/detectors/circleci.py +0 -0
  142. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/credentials/oidc/detectors/gcp.py +0 -0
  143. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/credentials/oidc/detectors/generic.py +0 -0
  144. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/credentials/oidc/detectors/github_actions.py +0 -0
  145. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/credentials/oidc/detectors/gitlab_ci.py +0 -0
  146. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/credentials/oidc/exchange.py +0 -0
  147. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/credentials/provider.py +0 -0
  148. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/credentials/providers/__init__.py +0 -0
  149. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/credentials/providers/cli_flag.py +0 -0
  150. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/credentials/providers/credentials_file.py +0 -0
  151. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/credentials/providers/env_var.py +0 -0
  152. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/credentials/providers/keyring_provider.py +0 -0
  153. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/installation.py +0 -0
  154. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/macos_keychain.py +0 -0
  155. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/mcp/__init__.py +0 -0
  156. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/mcp/data.py +0 -0
  157. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/self_update.py +0 -0
  158. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/telemetry.py +0 -0
  159. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/utils.py +0 -0
  160. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/version.py +0 -0
  161. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/credential_helpers/__init__.py +0 -0
  162. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/credential_helpers/backends.py +0 -0
  163. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/credential_helpers/cargo/__init__.py +0 -0
  164. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/credential_helpers/cargo/runtime.py +0 -0
  165. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/credential_helpers/common.py +0 -0
  166. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/credential_helpers/docker/__init__.py +0 -0
  167. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/credential_helpers/docker/runtime.py +0 -0
  168. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/credential_helpers/domains.py +0 -0
  169. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/credential_helpers/generic.py +0 -0
  170. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/credential_helpers/pnpm/__init__.py +0 -0
  171. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/credential_helpers/pnpm/runtime.py +0 -0
  172. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/credential_helpers/terraform/__init__.py +0 -0
  173. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/credential_helpers/terraform/runtime.py +0 -0
  174. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/data/credentials.ini +0 -0
  175. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/templates/__init__.py +0 -0
  176. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/templates/auth_error.html +0 -0
  177. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/templates/auth_success.html +0 -0
  178. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/templates/auth_two_factor.html +0 -0
  179. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli/wrapper.py +0 -0
  180. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli.egg-info/dependency_links.txt +0 -0
  181. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli.egg-info/entry_points.txt +0 -0
  182. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/cloudsmith_cli.egg-info/top_level.txt +0 -0
  183. {cloudsmith_cli-1.30.0 → cloudsmith_cli-1.31.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cloudsmith-cli
3
- Version: 1.30.0
3
+ Version: 1.31.0
4
4
  Summary: Cloudsmith Command-Line Interface (CLI)
5
5
  Author-email: Cloudsmith Ltd <support@cloudsmith.io>
6
6
  License-Expression: Apache-2.0
@@ -22,13 +22,13 @@ Classifier: Topic :: Utilities
22
22
  Requires-Python: >=3.11.0
23
23
  Description-Content-Type: text/markdown
24
24
  License-File: LICENSE
25
- Requires-Dist: certifi>=2024.7.4
25
+ Requires-Dist: certifi>=2026.10.23
26
26
  Requires-Dist: click!=8.3.0,>=8.2
27
27
  Requires-Dist: click-configfile>=0.2.3
28
28
  Requires-Dist: click-didyoumean>=0.0.3
29
29
  Requires-Dist: click-spinner>=0.1.7
30
30
  Requires-Dist: json5>=0.9.0
31
- Requires-Dist: cloudsmith-api<3.0,>=2.0.38
31
+ Requires-Dist: cloudsmith-api<3.0,>=2.0.43
32
32
  Requires-Dist: keyring>=25.4.1
33
33
  Requires-Dist: keyrings-alt>=5.0.2
34
34
  Requires-Dist: keyrings-cryptfile>=1.3.9
@@ -379,10 +379,11 @@ See the [default config](https://raw.githubusercontent.com/cloudsmith-io/cloudsm
379
379
  You can specify the following configuration options:
380
380
 
381
381
  - `api_host`: The API host to connect to.
382
- - `proxy`: The proxy to connect through for all HTTP requests, including API, SAML, upload, download, MCP, update, credential helper, OIDC, and error report connections. Use `--proxy` or `CLOUDSMITH_PROXY` to set it for one command. The config key `api_proxy`, flag `--api-proxy`, and environment variable `CLOUDSMITH_API_PROXY` remain supported for compatibility. In config and environment variables, the new name takes precedence over the alias. Without `proxy`, the CLI uses the `HTTPS_PROXY`, `HTTP_PROXY`, and `NO_PROXY` environment variables. When `proxy` is set, it takes precedence over them.
383
- - `ssl_verify`: Whether or not to verify SSL certificates for HTTPS requests, including API, SAML, uploads, downloads, and MCP (default: `true`). Use `CLOUDSMITH_SSL_VERIFY=1` to enable verification or `CLOUDSMITH_SSL_VERIFY=0` / `--without-ssl-verify` to disable it. Disabling verification is dangerous; prefer disabling only strict checks where possible. The config key `api_ssl_verify`, flag `--without-api-ssl-verify` / `-S`, and environment variable `CLOUDSMITH_WITHOUT_API_SSL_VERIFY` remain supported for compatibility. Command-line settings override environment variables, which override config; within the same source, the new spelling takes precedence.
382
+ - `proxy`: The proxy to connect through for all HTTP requests, including API, SAML, upload, download, MCP, update, credential helper, OIDC, and error report connections. Use `--proxy` or `CLOUDSMITH_PROXY` to set it for one command. The config key `api_proxy`, flag `--api-proxy`, and environment variable `CLOUDSMITH_API_PROXY` still work, but they are deprecated and will be removed in version 2.0.0; the CLI prints a warning when you use them. The new name takes precedence over the old one. Without `proxy`, the CLI uses the `HTTPS_PROXY`, `HTTP_PROXY`, and `NO_PROXY` environment variables. When `proxy` is set, it takes precedence over them.
383
+ - `ssl_verify`: Whether or not to verify SSL certificates for HTTPS requests, including API, SAML, uploads, downloads, and MCP (default: `true`). Use `CLOUDSMITH_SSL_VERIFY=1` to enable verification or `CLOUDSMITH_SSL_VERIFY=0` / `--without-ssl-verify` to disable it. Disabling verification is dangerous; prefer disabling only strict checks where possible. The config key `api_ssl_verify`, flag `--without-api-ssl-verify` / `-S`, and environment variable `CLOUDSMITH_WITHOUT_API_SSL_VERIFY` still work, but they are deprecated and will be removed in version 2.0.0; the CLI prints a warning when you use them. Command-line settings override environment variables, which override config; within the same source, the new spelling takes precedence.
384
384
  - `ssl_verify_strict`: Whether or not to apply strict X.509 certificate verification (`VERIFY_X509_STRICT`, enabled by default on Python 3.13+). Set to `false` (or use `--without-ssl-verify-strict` / `CLOUDSMITH_SSL_VERIFY_STRICT=0`) if a TLS-intercepting proxy issues certificates that fail these checks. `CLOUDSMITH_SSL_VERIFY_STRICT=1` keeps strict verification enabled (the default). Certificates are still verified.
385
385
  - `api_user_agent`: The user agent to use for requests.
386
+ - `workspace`: The Cloudsmith Workspace slug. Use `-w`/`--workspace` or `CLOUDSMITH_WORKSPACE` to set it for one command. The config keys `org`, `organization`, and `oidc_org`, the flags `--org`, `--organization`, `--oidc-org`, `--owner`, and `-o`, and the environment variable `CLOUDSMITH_ORG` still work, but they are deprecated and will be removed in version 2.0.0; the CLI prints a warning when you use them.
386
387
 
387
388
  ### Credentials (credentials.ini)
388
389
 
@@ -401,7 +402,7 @@ You'll need to provide authentication to Cloudsmith for any CLI actions that res
401
402
 
402
403
  You can authenticate using your organization's SAML provider, if configured, with the `cloudsmith auth` command:
403
404
  ```
404
- cloudsmith auth --owner example
405
+ cloudsmith auth --workspace example
405
406
  Beginning authentication for the example org ...
406
407
  Your organization's SAML IDP URL is: https://example.com/some-saml-idp
407
408
 
@@ -413,7 +414,7 @@ Authentication complete
413
414
  The CLI opens the IDP URL in your browser automatically. If it can't (for example in Cygwin or a headless shell), it tells you to open the URL above manually and carries on waiting for the callback. Use `--no-browser` to skip the automatic launch entirely:
414
415
 
415
416
  ```
416
- cloudsmith auth --owner example --no-browser
417
+ cloudsmith auth --workspace example --no-browser
417
418
  ```
418
419
 
419
420
  *Note:* The authentication callback is served on `127.0.0.1`, on the first free port between `12400` and `12404`. The browser you open the URL in must run on the same machine as the CLI.
@@ -323,10 +323,11 @@ See the [default config](https://raw.githubusercontent.com/cloudsmith-io/cloudsm
323
323
  You can specify the following configuration options:
324
324
 
325
325
  - `api_host`: The API host to connect to.
326
- - `proxy`: The proxy to connect through for all HTTP requests, including API, SAML, upload, download, MCP, update, credential helper, OIDC, and error report connections. Use `--proxy` or `CLOUDSMITH_PROXY` to set it for one command. The config key `api_proxy`, flag `--api-proxy`, and environment variable `CLOUDSMITH_API_PROXY` remain supported for compatibility. In config and environment variables, the new name takes precedence over the alias. Without `proxy`, the CLI uses the `HTTPS_PROXY`, `HTTP_PROXY`, and `NO_PROXY` environment variables. When `proxy` is set, it takes precedence over them.
327
- - `ssl_verify`: Whether or not to verify SSL certificates for HTTPS requests, including API, SAML, uploads, downloads, and MCP (default: `true`). Use `CLOUDSMITH_SSL_VERIFY=1` to enable verification or `CLOUDSMITH_SSL_VERIFY=0` / `--without-ssl-verify` to disable it. Disabling verification is dangerous; prefer disabling only strict checks where possible. The config key `api_ssl_verify`, flag `--without-api-ssl-verify` / `-S`, and environment variable `CLOUDSMITH_WITHOUT_API_SSL_VERIFY` remain supported for compatibility. Command-line settings override environment variables, which override config; within the same source, the new spelling takes precedence.
326
+ - `proxy`: The proxy to connect through for all HTTP requests, including API, SAML, upload, download, MCP, update, credential helper, OIDC, and error report connections. Use `--proxy` or `CLOUDSMITH_PROXY` to set it for one command. The config key `api_proxy`, flag `--api-proxy`, and environment variable `CLOUDSMITH_API_PROXY` still work, but they are deprecated and will be removed in version 2.0.0; the CLI prints a warning when you use them. The new name takes precedence over the old one. Without `proxy`, the CLI uses the `HTTPS_PROXY`, `HTTP_PROXY`, and `NO_PROXY` environment variables. When `proxy` is set, it takes precedence over them.
327
+ - `ssl_verify`: Whether or not to verify SSL certificates for HTTPS requests, including API, SAML, uploads, downloads, and MCP (default: `true`). Use `CLOUDSMITH_SSL_VERIFY=1` to enable verification or `CLOUDSMITH_SSL_VERIFY=0` / `--without-ssl-verify` to disable it. Disabling verification is dangerous; prefer disabling only strict checks where possible. The config key `api_ssl_verify`, flag `--without-api-ssl-verify` / `-S`, and environment variable `CLOUDSMITH_WITHOUT_API_SSL_VERIFY` still work, but they are deprecated and will be removed in version 2.0.0; the CLI prints a warning when you use them. Command-line settings override environment variables, which override config; within the same source, the new spelling takes precedence.
328
328
  - `ssl_verify_strict`: Whether or not to apply strict X.509 certificate verification (`VERIFY_X509_STRICT`, enabled by default on Python 3.13+). Set to `false` (or use `--without-ssl-verify-strict` / `CLOUDSMITH_SSL_VERIFY_STRICT=0`) if a TLS-intercepting proxy issues certificates that fail these checks. `CLOUDSMITH_SSL_VERIFY_STRICT=1` keeps strict verification enabled (the default). Certificates are still verified.
329
329
  - `api_user_agent`: The user agent to use for requests.
330
+ - `workspace`: The Cloudsmith Workspace slug. Use `-w`/`--workspace` or `CLOUDSMITH_WORKSPACE` to set it for one command. The config keys `org`, `organization`, and `oidc_org`, the flags `--org`, `--organization`, `--oidc-org`, `--owner`, and `-o`, and the environment variable `CLOUDSMITH_ORG` still work, but they are deprecated and will be removed in version 2.0.0; the CLI prints a warning when you use them.
330
331
 
331
332
  ### Credentials (credentials.ini)
332
333
 
@@ -345,7 +346,7 @@ You'll need to provide authentication to Cloudsmith for any CLI actions that res
345
346
 
346
347
  You can authenticate using your organization's SAML provider, if configured, with the `cloudsmith auth` command:
347
348
  ```
348
- cloudsmith auth --owner example
349
+ cloudsmith auth --workspace example
349
350
  Beginning authentication for the example org ...
350
351
  Your organization's SAML IDP URL is: https://example.com/some-saml-idp
351
352
 
@@ -357,7 +358,7 @@ Authentication complete
357
358
  The CLI opens the IDP URL in your browser automatically. If it can't (for example in Cygwin or a headless shell), it tells you to open the URL above manually and carries on waiting for the callback. Use `--no-browser` to skip the automatic launch entirely:
358
359
 
359
360
  ```
360
- cloudsmith auth --owner example --no-browser
361
+ cloudsmith auth --workspace example --no-browser
361
362
  ```
362
363
 
363
364
  *Note:* The authentication callback is served on `127.0.0.1`, on the first free port between `12400` and `12404`. The browser you open the URL in must run on the same machine as the CLI.
@@ -6,6 +6,11 @@ from collections import OrderedDict
6
6
  import click.exceptions
7
7
  from click_didyoumean import DYMGroup
8
8
 
9
+ try:
10
+ from click.utils import _PacifyFlushWrapper
11
+ except ImportError: # click before 8.2
12
+ from click.utils import PacifyFlushWrapper as _PacifyFlushWrapper
13
+
9
14
  from ..core.certificate_errors import describe_certificate_error
10
15
 
11
16
 
@@ -202,6 +207,13 @@ class AliasGroup(DYMGroup):
202
207
  e.show()
203
208
  _echo_certificate_hint(e)
204
209
  sys.exit(e.exit_code)
210
+ except BrokenPipeError:
211
+ # Click does not catch a failed write in its Ctrl+C handler.
212
+ if not original_standalone_mode:
213
+ raise
214
+ sys.stdout = _PacifyFlushWrapper(sys.stdout)
215
+ sys.stderr = _PacifyFlushWrapper(sys.stderr)
216
+ sys.exit(1)
205
217
  except Exception as e: # pylint: disable=broad-exception-caught
206
218
  # Anything reaching here is unexpected: click's own errors and
207
219
  # handled API errors (which exit via ctx.exit) are dealt with
@@ -10,7 +10,7 @@ from ...core.sso import (
10
10
  get_access_token_expiry,
11
11
  renew_sso_session,
12
12
  )
13
- from .. import decorators, utils, validators
13
+ from .. import decorators, deprecation, utils, validators
14
14
  from ..exceptions import handle_api_exceptions
15
15
  from ..saml import get_idp_url
16
16
  from ..webserver import AuthenticationWebRequestHandler, AuthenticationWebServer
@@ -158,10 +158,28 @@ def _perform_saml_authentication(
158
158
  )
159
159
 
160
160
  auth_server.handle_request()
161
+ return auth_server.sso_access_token is not None
161
162
  finally:
162
163
  auth_server.server_close()
163
164
 
164
165
 
166
+ def _save_workspace(ctx, opts, workspace, use_stderr):
167
+ """Save the Workspace to config.ini, or warn when the CLI cannot write it."""
168
+ try:
169
+ saved_path = opts.get_config_reader().save_workspace(
170
+ workspace, profile=ctx.meta.get("profile"), path=ctx.meta.get("config_file")
171
+ )
172
+ except (OSError, ValueError) as exc:
173
+ click.secho(
174
+ f"Could not save the {workspace} Workspace to config.ini: {exc}",
175
+ fg="yellow",
176
+ err=True,
177
+ )
178
+ return
179
+ if saved_path:
180
+ click.echo(f"Saved the {workspace} Workspace to {saved_path}.", err=use_stderr)
181
+
182
+
165
183
  @main.command(aliases=["auth"])
166
184
  @click.option(
167
185
  "-t",
@@ -230,28 +248,13 @@ def authenticate(
230
248
  use_stderr = request_api_key_flag or json or utils.should_use_stderr(opts)
231
249
 
232
250
  if token:
233
- click.secho(
234
- "DEPRECATION WARNING: The `--token` flag is deprecated and will be removed in a future release. "
235
- "Please use `--request-api-key` instead.",
236
- fg="yellow",
237
- err=True,
238
- )
251
+ deprecation.warn_option("--token", "--request-api-key", ctx=ctx)
239
252
 
240
253
  if force:
241
- click.secho(
242
- "DEPRECATION WARNING: The `--force` flag is deprecated and will be removed in a future release. "
243
- "Please use `--request-api-key` instead (force is implied).",
244
- fg="yellow",
245
- err=True,
246
- )
254
+ deprecation.warn_option("--force", "--request-api-key", ctx=ctx)
247
255
 
248
256
  if json and not utils.should_use_stderr(opts):
249
- click.secho(
250
- "DEPRECATION WARNING: The `--json` flag is deprecated and will be removed in a future release. "
251
- "Please use `--output-format json` instead.",
252
- fg="yellow",
253
- err=True,
254
- )
257
+ deprecation.warn_option("--json", "--output-format json", ctx=ctx)
255
258
 
256
259
  if not force and not token and not request_api_key_flag:
257
260
  session_result = _renew_existing_sso_session(
@@ -276,7 +279,7 @@ def authenticate(
276
279
 
277
280
  context_message = "Failed to authenticate via SAML!"
278
281
  with handle_api_exceptions(ctx, opts=opts, context_msg=context_message):
279
- _perform_saml_authentication(
282
+ authenticated = _perform_saml_authentication(
280
283
  opts,
281
284
  workspace,
282
285
  enable_token_creation=enable_token_creation,
@@ -285,6 +288,9 @@ def authenticate(
285
288
  profile=ctx.meta.get("profile"),
286
289
  )
287
290
 
291
+ if authenticated:
292
+ _save_workspace(ctx, opts, workspace, use_stderr)
293
+
288
294
  if request_api_key_flag:
289
295
  # Non-interactive token retrieval
290
296
  new_token = request_api_key(ctx, opts, save_config=save_config)
@@ -37,7 +37,7 @@ def cargo(opts, cargo_plugin, provider_args): # pylint: disable=unused-argument
37
37
  Provides credentials for all Cloudsmith Cargo registries: ``*.cloudsmith.io``,
38
38
  ``*.cloudsmith.com``, and any custom domains configured for the Workspace
39
39
  (requires a Workspace - ``--workspace``, CLOUDSMITH_WORKSPACE, or
40
- ``workspace`` in ``config.ini``; legacy aliases are also accepted - and a
40
+ ``workspace`` in ``config.ini``; deprecated aliases still work - and a
41
41
  valid API key/token).
42
42
 
43
43
  A registry that is not a Cloudsmith one is answered with
@@ -69,13 +69,14 @@ def cargo(opts, cargo_plugin, provider_args): # pylint: disable=unused-argument
69
69
  $ echo '{"v":1,"kind":"get","operation":"read","registry":{"index-url":"sparse+https://cargo.cloudsmith.io/org/repo/"}}' \\
70
70
  | cloudsmith credential-helper cargo
71
71
 
72
+ \b
72
73
  # Called by Cargo via the launcher
73
74
  $ cargo-credential-cloudsmith --cargo-plugin
74
75
 
75
76
  \b
76
77
  Environment variables:
77
78
  CLOUDSMITH_API_KEY: API key for authentication (optional)
78
- CLOUDSMITH_WORKSPACE: Workspace slug (CLOUDSMITH_ORG is also accepted)
79
+ CLOUDSMITH_WORKSPACE: Workspace slug (the deprecated CLOUDSMITH_ORG still works)
79
80
  """
80
81
  # `provider_args` collects the extra arguments Cargo appends from the
81
82
  # credential-provider config entry. This provider takes no configuration
@@ -30,7 +30,7 @@ def docker(opts, operation):
30
30
  Provides credentials for all Cloudsmith Docker registries: ``*.cloudsmith.io``,
31
31
  ``*.cloudsmith.com``, and any custom domains configured for the Workspace
32
32
  (requires a Workspace - ``--workspace``, CLOUDSMITH_WORKSPACE, or
33
- ``workspace`` in ``config.ini``; legacy aliases are also accepted - and a
33
+ ``workspace`` in ``config.ini``; deprecated aliases still work - and a
34
34
  valid API key/token).
35
35
 
36
36
  \b
@@ -59,7 +59,7 @@ def docker(opts, operation):
59
59
  \b
60
60
  Environment variables:
61
61
  CLOUDSMITH_API_KEY: API key for authentication (optional)
62
- CLOUDSMITH_WORKSPACE: Workspace slug (CLOUDSMITH_ORG is also accepted)
62
+ CLOUDSMITH_WORKSPACE: Workspace slug (the deprecated CLOUDSMITH_ORG still works)
63
63
  """
64
64
  exit_code, stdout, stderr = execute(
65
65
  operation,
@@ -9,13 +9,29 @@ Provides ``credential-helper install``, ``credential-helper uninstall``, and
9
9
  from __future__ import annotations
10
10
 
11
11
  import sys
12
+ from functools import partial
12
13
  from urllib.parse import urlsplit
13
14
 
14
15
  import click
16
+ from click.core import ParameterSource
15
17
 
18
+ from cloudsmith_cli.core.cache_utils import ConfigFileParseError
16
19
  from cloudsmith_cli.credential_helpers.cargo.installer import CargoInstaller
17
20
  from cloudsmith_cli.credential_helpers.generic import PartialInstallError
21
+ from cloudsmith_cli.credential_helpers.gradle.installer import GradleInstaller
22
+ from cloudsmith_cli.credential_helpers.launchers import UnsafeLauncherValue
23
+ from cloudsmith_cli.credential_helpers.maven.extensions import ExtensionsFileError
24
+ from cloudsmith_cli.credential_helpers.maven.installer import (
25
+ MavenInstaller,
26
+ MavenrcNotSupported,
27
+ )
28
+ from cloudsmith_cli.credential_helpers.maven_tools import (
29
+ BuildToolError,
30
+ ConfigFileConflict,
31
+ ProjectNotFound,
32
+ )
18
33
  from cloudsmith_cli.credential_helpers.pnpm.installer import PNPMInstaller
34
+ from cloudsmith_cli.credential_helpers.sbt.installer import SbtInstaller
19
35
  from cloudsmith_cli.credential_helpers.terraform.installer import (
20
36
  TerraformHelperExeNotFound,
21
37
  TerraformInstaller,
@@ -26,6 +42,7 @@ from cloudsmith_cli.credential_helpers.terraform.terraformrc import (
26
42
  TerraformrcConflictError,
27
43
  )
28
44
 
45
+ from ....core.session import create_requests_session
29
46
  from ....credential_helpers.docker.installer import DockerInstaller
30
47
  from ... import utils
31
48
  from ...decorators import (
@@ -44,6 +61,9 @@ _INSTALLERS: dict[str, type] = {
44
61
  "pnpm": PNPMInstaller,
45
62
  "cargo": CargoInstaller,
46
63
  "terraform": TerraformInstaller,
64
+ "maven": MavenInstaller,
65
+ "gradle": GradleInstaller,
66
+ "sbt": SbtInstaller,
47
67
  }
48
68
 
49
69
 
@@ -76,6 +96,42 @@ def _get_installer(name: str):
76
96
  return cls()
77
97
 
78
98
 
99
+ class HelperOption(click.Option):
100
+ """A flag that only the helpers in *helpers* accept."""
101
+
102
+ def __init__(self, *args, helpers: tuple[str, ...], **kwargs):
103
+ super().__init__(*args, **kwargs)
104
+ self.helpers = helpers
105
+
106
+
107
+ def _helper_options(ctx: click.Context, helper: str) -> dict[str, bool]:
108
+ """Return the helper flags that were given, or fail if *helper* does not accept one."""
109
+ given = {}
110
+ for param in ctx.command.params:
111
+ if not isinstance(param, HelperOption) or not ctx.params[param.name]:
112
+ continue
113
+ if helper not in param.helpers:
114
+ raise click.UsageError(
115
+ f"{param.opts[0]} applies only to {' and '.join(param.helpers)}.", ctx
116
+ )
117
+ given[param.name] = True
118
+ return given
119
+
120
+
121
+ def _download_session(opts):
122
+ """Return a session with the proxy and TLS settings of the command.
123
+
124
+ The session goes to the public maven-tools repository, so it does not get
125
+ the --api-headers that are for the API host.
126
+ """
127
+ return create_requests_session(
128
+ proxy=opts.proxy,
129
+ ssl_verify=opts.ssl_verify,
130
+ ssl_verify_strict=opts.ssl_verify_strict,
131
+ user_agent=opts.api_user_agent,
132
+ )
133
+
134
+
79
135
  def _terraform_helper_args(ctx, opts, repo: str | None = None) -> tuple[str, ...]:
80
136
  """Build the terraformrc ``args`` list from the resolved config.
81
137
 
@@ -134,6 +190,52 @@ def _terraform_proxy_next_steps(opts) -> list[str]:
134
190
  ]
135
191
 
136
192
 
193
+ # Other users can read a launcher, so it never holds a secret. A proxy URL can
194
+ # hold credentials.
195
+ _NEVER_KEPT = ("api_key", "api_headers", "keyring_key", "proxy")
196
+
197
+
198
+ def _main_envvar(option) -> str:
199
+ """Return the main environment variable of *option*."""
200
+ names = option.envvar
201
+ return names if isinstance(names, str) else names[0]
202
+
203
+
204
+ def _launcher_settings_from_cli(ctx: click.Context) -> dict[str, str]:
205
+ """Return the ``CLOUDSMITH_*`` settings that a launcher keeps.
206
+
207
+ An option with a ``CLOUDSMITH_*`` environment variable is kept when its
208
+ value came from a flag or from the environment. A value from a config
209
+ file is not kept, because the helper reads that file itself. An option
210
+ of this command replaces the same option of a parent command. A
211
+ deprecated spelling is kept under the environment variable of the option
212
+ that replaces it.
213
+ """
214
+ contexts = []
215
+ while ctx is not None:
216
+ contexts.insert(0, ctx)
217
+ ctx = ctx.parent
218
+
219
+ supplied = (ParameterSource.COMMANDLINE, ParameterSource.ENVIRONMENT)
220
+ settings = {}
221
+ for context in contexts:
222
+ for option in context.command.params:
223
+ if (
224
+ option.name in _NEVER_KEPT
225
+ or option.name not in context.params
226
+ or not option.envvar
227
+ ):
228
+ continue
229
+ envvar = _main_envvar(option)
230
+ source = context.get_parameter_source(option.name)
231
+ if envvar.startswith("CLOUDSMITH_") and source in supplied:
232
+ value = context.params[option.name]
233
+ settings[envvar] = (
234
+ str(value).lower() if isinstance(value, bool) else value
235
+ )
236
+ return settings
237
+
238
+
137
239
  _REPO_FLAGS = ("-r", "--repo", "--repository")
138
240
 
139
241
 
@@ -241,6 +343,24 @@ def _terraform_workspace_next_steps(helper_args: tuple[str, ...]) -> list[str]:
241
343
  "list (as `-r <repo>`) so `terraform init` needs no CLOUDSMITH_REPO env "
242
344
  "var. Terraform does not pass the repository to a credentials helper.",
243
345
  )
346
+ @click.option(
347
+ "--local",
348
+ cls=HelperOption,
349
+ helpers=("maven", "sbt"),
350
+ is_flag=True,
351
+ default=False,
352
+ help="Maven and sbt only: set up the project in the current directory "
353
+ "instead of every build of the user.",
354
+ )
355
+ @click.option(
356
+ "--mavenrc",
357
+ cls=HelperOption,
358
+ helpers=("maven",),
359
+ is_flag=True,
360
+ default=False,
361
+ help="Maven only: load the extension through ~/.mavenrc instead of "
362
+ "~/.m2/extensions.xml. Use it for Maven 3.9 and earlier.",
363
+ )
244
364
  @common_cli_config_options
245
365
  @common_cli_output_options
246
366
  @common_api_auth_options
@@ -256,6 +376,8 @@ def install_cmd(
256
376
  no_discover: bool,
257
377
  refresh: bool,
258
378
  repo: str | None,
379
+ local: bool,
380
+ mavenrc: bool,
259
381
  ) -> None:
260
382
  """Install a credential helper launcher and configure the package manager.
261
383
 
@@ -290,6 +412,9 @@ def install_cmd(
290
412
  $ cloudsmith credential-helper install terraform -w acme --repo my-repo
291
413
  """
292
414
  installer = _get_installer(helper)
415
+ helper_options = _helper_options(ctx, helper)
416
+ if local and mavenrc:
417
+ raise click.UsageError("Use --local or --mavenrc, not both.", ctx)
293
418
 
294
419
  install_kwargs = {
295
420
  "bin_dir": bin_dir,
@@ -300,7 +425,10 @@ def install_cmd(
300
425
  "org": opts.org,
301
426
  "credential": opts.credential,
302
427
  "api_host": opts.api_host,
428
+ **helper_options,
303
429
  }
430
+ if getattr(installer, "downloads_files", False):
431
+ install_kwargs["session"] = _download_session(opts)
304
432
 
305
433
  # Terraform bakes the resolved org/profile into the terraformrc `args` list
306
434
  # so `terraform init` needs neither env vars nor a hand-edited config. The
@@ -310,12 +438,23 @@ def install_cmd(
310
438
  helper_args = _terraform_helper_args(ctx, opts, repo)
311
439
  install_kwargs["helper_args"] = helper_args
312
440
 
441
+ if getattr(installer, "KEEPS_INSTALL_TIME_SETTINGS", False):
442
+ install_kwargs["launcher_env"] = _launcher_settings_from_cli(ctx)
443
+ install_kwargs.update(_progress_option(installer))
444
+
313
445
  try:
314
446
  actions = installer.install(**install_kwargs)
315
447
  except (
448
+ ConfigFileParseError,
316
449
  TerraformrcConflictError,
317
450
  TerraformHelperExeNotFound,
318
451
  TerraformPluginDirError,
452
+ ProjectNotFound,
453
+ ExtensionsFileError,
454
+ ConfigFileConflict,
455
+ UnsafeLauncherValue,
456
+ MavenrcNotSupported,
457
+ BuildToolError,
319
458
  ) as exc:
320
459
  raise click.ClickException(str(exc))
321
460
  except OSError as exc:
@@ -351,7 +490,7 @@ def install_cmd(
351
490
  sys.exit(ec)
352
491
 
353
492
  if dry_run:
354
- click.echo("Dry run — no changes will be made:", err=use_stderr)
493
+ click.echo("Dry run - no changes will be made:", err=use_stderr)
355
494
  for action in normal:
356
495
  click.echo(f" {action}" if dry_run else action, err=use_stderr)
357
496
  for warning in warnings:
@@ -380,10 +519,21 @@ def install_cmd(
380
519
  default=False,
381
520
  help="Show what would be done without making any changes.",
382
521
  )
522
+ @click.option(
523
+ "--local",
524
+ cls=HelperOption,
525
+ helpers=("maven", "sbt"),
526
+ is_flag=True,
527
+ default=False,
528
+ help="Maven and sbt only: remove the setup of the project in the current "
529
+ "directory.",
530
+ )
383
531
  @common_cli_config_options
384
532
  @common_cli_output_options
385
533
  @click.pass_context
386
- def uninstall_cmd(ctx, opts, helper: str, bin_dir: str | None, dry_run: bool) -> None:
534
+ def uninstall_cmd(
535
+ ctx, opts, helper: str, bin_dir: str | None, dry_run: bool, local: bool
536
+ ) -> None:
387
537
  """Uninstall a credential helper launcher and remove its config entries.
388
538
 
389
539
  HELPER is the name of the credential helper to uninstall (e.g. ``docker``).
@@ -400,7 +550,19 @@ def uninstall_cmd(ctx, opts, helper: str, bin_dir: str | None, dry_run: bool) ->
400
550
  """
401
551
  installer = _get_installer(helper)
402
552
  try:
403
- actions = installer.uninstall(bin_dir=bin_dir, dry_run=dry_run)
553
+ actions = installer.uninstall(
554
+ bin_dir=bin_dir,
555
+ dry_run=dry_run,
556
+ **_helper_options(ctx, helper),
557
+ **_progress_option(installer),
558
+ )
559
+ except (
560
+ ConfigFileParseError,
561
+ ProjectNotFound,
562
+ ConfigFileConflict,
563
+ BuildToolError,
564
+ ) as exc:
565
+ raise click.ClickException(str(exc))
404
566
  except OSError as exc:
405
567
  raise click.ClickException(
406
568
  f"Failed to uninstall {helper!r} credential helper: {exc}"
@@ -419,13 +581,20 @@ def uninstall_cmd(ctx, opts, helper: str, bin_dir: str | None, dry_run: bool) ->
419
581
  return
420
582
 
421
583
  if dry_run:
422
- click.echo("Dry run — no changes will be made:", err=use_stderr)
584
+ click.echo("Dry run - no changes will be made:", err=use_stderr)
423
585
  for action in normal:
424
586
  click.echo(f" {action}" if dry_run else action, err=use_stderr)
425
587
  for warning in warnings:
426
588
  click.secho(f" {warning}" if dry_run else warning, err=True, fg="yellow")
427
589
 
428
590
 
591
+ def _progress_option(installer) -> dict:
592
+ """Return the callback that says why the command waits, for an installer that asks a build tool."""
593
+ if getattr(installer, "ASKS_BUILD_TOOL", False):
594
+ return {"progress": partial(click.echo, err=True)}
595
+ return {}
596
+
597
+
429
598
  # ---------------------------------------------------------------------------
430
599
  # list
431
600
  # ---------------------------------------------------------------------------
@@ -441,6 +610,11 @@ def list_cmd(ctx, opts) -> None:
441
610
  Shows which helpers are available, whether their launcher binary is
442
611
  present on PATH, and which registry hosts they are configured for.
443
612
 
613
+ For gradle and sbt, list checks only the default locations: init.d in
614
+ $GRADLE_USER_HOME or ~/.gradle, and ~/.sbt/1.0/plugins. Install and
615
+ uninstall ask Gradle and sbt where they read plugins. If gradle.user.home
616
+ or sbt.global.base moves that location, list shows "not installed".
617
+
444
618
  Example:
445
619
 
446
620
  \b
@@ -0,0 +1,77 @@
1
+ # Copyright 2026 Cloudsmith Ltd
2
+ """
3
+ pnpm credential helper command.
4
+
5
+ Implements the pnpm credential helper protocol for Cloudsmith registries.
6
+ """
7
+
8
+ import sys
9
+ from typing import NoReturn
10
+
11
+ import click
12
+
13
+ from ....credential_helpers.pnpm import execute
14
+ from ...config import Options
15
+ from ...decorators import common_api_auth_options, resolve_credentials
16
+
17
+
18
+ @click.command()
19
+ @click.argument("repo", required=False, default="npm.cloudsmith.io")
20
+ @common_api_auth_options
21
+ @resolve_credentials
22
+ def pnpm(opts: Options, repo: str) -> NoReturn:
23
+ """
24
+ pnpm credential helper for Cloudsmith registries.
25
+
26
+ Prints the authorization value for a pnpm registry. pnpm runs this
27
+ command through the ``tokenHelper`` setting in the user-level ``~/.npmrc``
28
+ file. Use ``cloudsmith credential-helper install pnpm`` to add that
29
+ setting.
30
+
31
+ Provides credentials for all Cloudsmith npm registries: ``*.cloudsmith.io``,
32
+ ``*.cloudsmith.com``, and any custom domains configured for the Workspace
33
+ (requires a Workspace - ``--workspace``, CLOUDSMITH_WORKSPACE, or
34
+ ``workspace`` in ``config.ini``; deprecated aliases still work - and a
35
+ valid API key/token).
36
+
37
+ \b
38
+ Input (argument, optional):
39
+ Registry host (default: "npm.cloudsmith.io")
40
+
41
+ \b
42
+ Output (stdout):
43
+ Text: token <cloudsmith-api-key>, or Bearer <cloudsmith-token>
44
+
45
+ \b
46
+ Exit codes:
47
+ 0: Success
48
+ 1: Error (no credentials available, not a Cloudsmith registry, etc.)
49
+
50
+ \b
51
+ Examples:
52
+ # Manual testing
53
+ $ cloudsmith credential-helper pnpm npm.cloudsmith.io
54
+
55
+ \b
56
+ # Called by pnpm via the launcher
57
+ $ pnpm-credential-cloudsmith
58
+
59
+ \b
60
+ Environment variables:
61
+ CLOUDSMITH_API_KEY: API key for authentication (optional)
62
+ CLOUDSMITH_WORKSPACE: Workspace slug (the deprecated CLOUDSMITH_ORG still works)
63
+ """
64
+
65
+ exit_code, stdout, stderr = execute(
66
+ repo,
67
+ credential=opts.credential,
68
+ api_host=opts.api_host,
69
+ org=opts.org,
70
+ )
71
+
72
+ if stdout is not None:
73
+ click.echo(stdout, nl=False)
74
+ if stderr is not None:
75
+ click.echo(stderr, err=True)
76
+
77
+ sys.exit(exit_code)
@@ -6,6 +6,7 @@ import click
6
6
 
7
7
  from ...core.api.packages import get_package_dependencies
8
8
  from .. import decorators, utils, validators
9
+ from ..config import Options
9
10
  from ..exceptions import handle_api_exceptions
10
11
  from ..utils import maybe_spinner
11
12
  from .main import main
@@ -32,14 +33,17 @@ def list_dependencies_options(f):
32
33
  return wrapper
33
34
 
34
35
 
35
- def list_dependencies(ctx, opts, owner_repo_package):
36
+ def list_dependencies(
37
+ ctx: click.Context, opts: Options, owner_repo_package: tuple[str, str, str]
38
+ ) -> None:
36
39
  """
37
- List direct (non-transitive) dependencies for a package.
40
+ List the direct dependencies of a package.
38
41
 
39
- NOTE: These are not guaranteed to be complete, and only represent the *direct* /
40
- *non-transitive* dependencies of a package. If packages consistently show
41
- no dependencies then it is possible that dependency extraction isn't support
42
- for the package format yet.
42
+ The list does not include transitive dependencies. For each dependency, the
43
+ list shows the type, the name, the version operator and the version.
44
+
45
+ The list can be incomplete. Cloudsmith does not extract dependencies for
46
+ all package formats. For those formats, the list is empty.
43
47
 
44
48
  - OWNER/REPO/PACKAGE: Specify the OWNER namespace (i.e. user or org), the
45
49
  REPO name where the package is stored, and the PACKAGE name (identifier/slug) of the