cloudsmith-cli 1.24.0__tar.gz → 1.26.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 (162) hide show
  1. {cloudsmith_cli-1.24.0/cloudsmith_cli.egg-info → cloudsmith_cli-1.26.0}/PKG-INFO +3 -2
  2. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/__init__.py +0 -2
  3. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/command.py +21 -3
  4. cloudsmith_cli-1.26.0/cloudsmith_cli/cli/commands/__init__.py +6 -0
  5. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/auth.py +16 -16
  6. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/copy.py +17 -3
  7. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/credential_helper/__init__.py +13 -0
  8. cloudsmith_cli-1.26.0/cloudsmith_cli/cli/commands/credential_helper/cargo.py +94 -0
  9. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/credential_helper/docker.py +5 -4
  10. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/credential_helper/generic.py +1 -1
  11. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/credential_helper/manage.py +26 -9
  12. cloudsmith_cli-1.26.0/cloudsmith_cli/cli/commands/credential_helper/pnpm.py +51 -0
  13. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/dependencies.py +9 -10
  14. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/domains.py +17 -15
  15. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/download.py +14 -16
  16. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/entitlements.py +17 -5
  17. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/list_.py +13 -14
  18. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/logout.py +18 -8
  19. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/main.py +3 -0
  20. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/mcp.py +7 -2
  21. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/push.py +30 -1
  22. cloudsmith_cli-1.26.0/cloudsmith_cli/cli/commands/registry.py +59 -0
  23. cloudsmith_cli-1.26.0/cloudsmith_cli/cli/commands/repos.py +1474 -0
  24. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/upstream.py +1 -0
  25. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/whoami.py +12 -6
  26. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/config.py +28 -6
  27. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/decorators.py +18 -8
  28. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/exceptions.py +75 -41
  29. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/saml.py +11 -46
  30. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/table.py +1 -1
  31. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/utils.py +13 -6
  32. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/validators.py +23 -0
  33. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/webserver.py +88 -36
  34. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/api/files.py +1 -1
  35. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/api/packages.py +2 -7
  36. cloudsmith_cli-1.26.0/cloudsmith_cli/core/api/repos.py +176 -0
  37. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/api/version.py +2 -2
  38. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/api/vulnerabilities.py +5 -5
  39. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/cache_utils.py +32 -10
  40. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/credentials/chain.py +12 -9
  41. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/credentials/models.py +3 -2
  42. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/credentials/oidc/detectors/__init__.py +1 -1
  43. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/credentials/oidc/detectors/azure_devops.py +2 -1
  44. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/credentials/oidc/detectors/github_actions.py +2 -1
  45. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/credentials/oidc/exchange.py +1 -1
  46. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/credentials/provider.py +3 -1
  47. cloudsmith_cli-1.26.0/cloudsmith_cli/core/credentials/providers/keyring_provider.py +105 -0
  48. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/credentials/providers/oidc_provider.py +7 -4
  49. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/download.py +6 -7
  50. cloudsmith_cli-1.26.0/cloudsmith_cli/core/keyring.py +329 -0
  51. cloudsmith_cli-1.26.0/cloudsmith_cli/core/macos_keychain.py +168 -0
  52. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/rest.py +2 -119
  53. cloudsmith_cli-1.26.0/cloudsmith_cli/core/session.py +142 -0
  54. cloudsmith_cli-1.26.0/cloudsmith_cli/core/sso.py +49 -0
  55. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/version.py +2 -2
  56. cloudsmith_cli-1.26.0/cloudsmith_cli/credential_helpers/cargo/__init__.py +4 -0
  57. cloudsmith_cli-1.26.0/cloudsmith_cli/credential_helpers/cargo/installer.py +491 -0
  58. cloudsmith_cli-1.26.0/cloudsmith_cli/credential_helpers/cargo/runtime.py +265 -0
  59. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/credential_helpers/common.py +3 -2
  60. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/credential_helpers/custom_domains.py +4 -3
  61. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/credential_helpers/docker/installer.py +13 -10
  62. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/credential_helpers/generic.py +16 -0
  63. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/credential_helpers/launchers.py +19 -9
  64. cloudsmith_cli-1.26.0/cloudsmith_cli/credential_helpers/pnpm/__init__.py +4 -0
  65. cloudsmith_cli-1.26.0/cloudsmith_cli/credential_helpers/pnpm/installer.py +264 -0
  66. cloudsmith_cli-1.26.0/cloudsmith_cli/credential_helpers/pnpm/rc.py +185 -0
  67. cloudsmith_cli-1.26.0/cloudsmith_cli/credential_helpers/pnpm/runtime.py +69 -0
  68. cloudsmith_cli-1.26.0/cloudsmith_cli/data/VERSION +1 -0
  69. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/data/config.ini +3 -0
  70. cloudsmith_cli-1.26.0/cloudsmith_cli/templates/auth_two_factor.html +38 -0
  71. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0/cloudsmith_cli.egg-info}/PKG-INFO +3 -2
  72. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli.egg-info/SOURCES.txt +15 -1
  73. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli.egg-info/requires.txt +2 -1
  74. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/pyproject.toml +41 -7
  75. cloudsmith_cli-1.24.0/cloudsmith_cli/cli/commands/__init__.py +0 -34
  76. cloudsmith_cli-1.24.0/cloudsmith_cli/cli/commands/repos.py +0 -333
  77. cloudsmith_cli-1.24.0/cloudsmith_cli/core/api/repos.py +0 -81
  78. cloudsmith_cli-1.24.0/cloudsmith_cli/core/credentials/providers/keyring_provider.py +0 -59
  79. cloudsmith_cli-1.24.0/cloudsmith_cli/core/keyring.py +0 -204
  80. cloudsmith_cli-1.24.0/cloudsmith_cli/data/VERSION +0 -1
  81. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/LICENSE +0 -0
  82. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/MANIFEST.in +0 -0
  83. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/README.md +0 -0
  84. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/__main__.py +0 -0
  85. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/__init__.py +0 -0
  86. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/check.py +0 -0
  87. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/delete.py +0 -0
  88. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/docs.py +0 -0
  89. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/help_.py +0 -0
  90. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/login.py +0 -0
  91. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/metadata.py +0 -0
  92. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/metrics/__init__.py +0 -0
  93. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/metrics/command.py +0 -0
  94. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/metrics/entitlements.py +0 -0
  95. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/metrics/packages.py +0 -0
  96. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/move.py +0 -0
  97. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/policy/__init__.py +0 -0
  98. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/policy/command.py +0 -0
  99. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/policy/deny.py +0 -0
  100. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/policy/license.py +0 -0
  101. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/policy/vulnerability.py +0 -0
  102. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/quarantine.py +0 -0
  103. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/quota/__init__.py +0 -0
  104. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/quota/command.py +0 -0
  105. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/quota/history.py +0 -0
  106. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/quota/quota.py +0 -0
  107. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/resync.py +0 -0
  108. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/status.py +0 -0
  109. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/tags.py +0 -0
  110. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/tokens.py +0 -0
  111. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/vulnerabilities.py +0 -0
  112. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/dsc_parser.py +0 -0
  113. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/metadata_common.py +0 -0
  114. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/types.py +0 -0
  115. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/conftest.py +0 -0
  116. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/__init__.py +0 -0
  117. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/api/__init__.py +0 -0
  118. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/api/distros.py +0 -0
  119. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/api/entitlements.py +0 -0
  120. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/api/exceptions.py +0 -0
  121. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/api/init.py +0 -0
  122. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/api/metadata.py +0 -0
  123. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/api/metrics.py +0 -0
  124. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/api/orgs.py +0 -0
  125. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/api/quota.py +0 -0
  126. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/api/rates.py +0 -0
  127. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/api/status.py +0 -0
  128. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/api/upstreams.py +0 -0
  129. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/api/user.py +0 -0
  130. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/config.py +0 -0
  131. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/credentials/__init__.py +0 -0
  132. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/credentials/oidc/__init__.py +0 -0
  133. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/credentials/oidc/cache.py +0 -0
  134. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/credentials/oidc/detectors/aws.py +0 -0
  135. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/credentials/oidc/detectors/base.py +0 -0
  136. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/credentials/oidc/detectors/bitbucket_pipelines.py +0 -0
  137. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/credentials/oidc/detectors/circleci.py +0 -0
  138. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/credentials/oidc/detectors/generic.py +0 -0
  139. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/credentials/oidc/detectors/gitlab_ci.py +0 -0
  140. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/credentials/providers/__init__.py +0 -0
  141. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/credentials/providers/cli_flag.py +0 -0
  142. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/credentials/providers/credentials_file.py +0 -0
  143. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/credentials/providers/env_var.py +0 -0
  144. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/mcp/__init__.py +0 -0
  145. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/mcp/data.py +0 -0
  146. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/mcp/server.py +0 -0
  147. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/pagination.py +0 -0
  148. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/ratelimits.py +0 -0
  149. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/utils.py +0 -0
  150. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/credential_helpers/__init__.py +0 -0
  151. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/credential_helpers/backends.py +0 -0
  152. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/credential_helpers/default_domains.py +0 -0
  153. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/credential_helpers/docker/__init__.py +0 -0
  154. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/credential_helpers/docker/runtime.py +0 -0
  155. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/data/credentials.ini +0 -0
  156. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/templates/__init__.py +0 -0
  157. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/templates/auth_error.html +0 -0
  158. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/templates/auth_success.html +0 -0
  159. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli.egg-info/dependency_links.txt +0 -0
  160. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli.egg-info/entry_points.txt +0 -0
  161. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli.egg-info/top_level.txt +0 -0
  162. {cloudsmith_cli-1.24.0 → cloudsmith_cli-1.26.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cloudsmith-cli
3
- Version: 1.24.0
3
+ Version: 1.26.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
@@ -28,7 +28,7 @@ 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.29
31
+ Requires-Dist: cloudsmith-api<3.0,>=2.0.31
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
@@ -40,6 +40,7 @@ Requires-Dist: requests_toolbelt>=1.0.0
40
40
  Requires-Dist: rich>=13.0.0
41
41
  Requires-Dist: semver>=2.7.9
42
42
  Requires-Dist: urllib3>=2.5
43
+ Requires-Dist: tomlkit>=0.15.0
43
44
  Provides-Extra: aws
44
45
  Requires-Dist: boto3[crt]>=1.26.0; extra == "aws"
45
46
  Provides-Extra: all
@@ -3,8 +3,6 @@
3
3
  import warnings
4
4
 
5
5
  import click
6
- import urllib3
7
6
 
8
7
  click.disable_unicode_literals_warning = True
9
- urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
10
8
  warnings.filterwarnings("ignore", category=ResourceWarning)
@@ -1,5 +1,6 @@
1
1
  """CLI - Group/Command classes."""
2
2
 
3
+ import importlib
3
4
  from collections import OrderedDict
4
5
 
5
6
  import click.exceptions
@@ -50,12 +51,25 @@ def _format_click_exception_as_json(exception):
50
51
 
51
52
 
52
53
  class AliasGroup(DYMGroup):
53
- """A command group with DYM and alias support."""
54
+ """A command group with DYM, alias and lazy-subcommand support.
55
+
56
+ ``lazy_commands`` maps a command name to the module that registers it.
57
+ The module is imported on first use, which keeps startup fast because
58
+ an invocation imports only the module of the invoked command.
59
+ ``lazy_aliases`` supplies the alias map for those commands up front.
60
+ """
54
61
 
55
62
  def __init__(self, *args, **kwargs):
63
+ lazy_commands = kwargs.pop("lazy_commands", None)
64
+ lazy_aliases = kwargs.pop("lazy_aliases", None)
56
65
  super().__init__(*args, **kwargs)
66
+ self.lazy_commands = dict(lazy_commands or {})
57
67
  self.aliases = OrderedDict()
58
68
  self.inverse = {}
69
+ for name, aliases in (lazy_aliases or {}).items():
70
+ self.aliases[name] = aliases
71
+ for alias in aliases:
72
+ self.inverse[alias] = name
59
73
 
60
74
  def resolve_command(self, ctx, args):
61
75
  try:
@@ -74,7 +88,7 @@ class AliasGroup(DYMGroup):
74
88
  raise
75
89
 
76
90
  def list_commands(self, ctx):
77
- commands = super().list_commands(ctx)
91
+ commands = sorted(set(super().list_commands(ctx)) | set(self.lazy_commands))
78
92
 
79
93
  if getattr(ctx, "showing_help", False):
80
94
  for k, v in enumerate(commands):
@@ -99,7 +113,11 @@ class AliasGroup(DYMGroup):
99
113
  except KeyError:
100
114
  pass
101
115
 
102
- return super().get_command(ctx, cmd_name)
116
+ cmd = super().get_command(ctx, cmd_name)
117
+ if cmd is None and cmd_name in self.lazy_commands:
118
+ importlib.import_module(self.lazy_commands[cmd_name])
119
+ cmd = super().get_command(ctx, cmd_name)
120
+ return cmd
103
121
 
104
122
  def command(self, *args, **kwargs):
105
123
  def decorator(f):
@@ -0,0 +1,6 @@
1
+ """CLI/Commands.
2
+
3
+ Command modules register themselves with the ``main`` group on import.
4
+ The ``main`` group imports them lazily through ``registry.LAZY_COMMANDS``,
5
+ so this package must not import them here.
6
+ """
@@ -17,7 +17,12 @@ AUTH_SERVER_PORT = 12400
17
17
 
18
18
 
19
19
  def _perform_saml_authentication(
20
- opts, owner, enable_token_creation=False, use_stderr=False, no_browser=False
20
+ opts,
21
+ owner,
22
+ enable_token_creation=False,
23
+ use_stderr=False,
24
+ no_browser=False,
25
+ profile=None,
21
26
  ):
22
27
  """Perform SAML authentication via web browser and local web server."""
23
28
  session = create_configured_session(opts)
@@ -26,7 +31,7 @@ def _perform_saml_authentication(
26
31
  idp_url = get_idp_url(api_host, owner, session=session)
27
32
 
28
33
  click.echo(
29
- f"Your organization's SAML IDP URL is: {click.style(idp_url, bold=True)}",
34
+ f"Your Workspace's SAML IDP URL is: {click.style(idp_url, bold=True)}",
30
35
  err=use_stderr,
31
36
  )
32
37
  click.echo(err=use_stderr)
@@ -63,21 +68,13 @@ def _perform_saml_authentication(
63
68
  debug=opts.debug,
64
69
  refresh_api_on_success=enable_token_creation,
65
70
  api_opts=opts.api_config,
71
+ profile=profile,
66
72
  )
67
73
 
68
74
  auth_server.handle_request()
69
75
 
70
76
 
71
77
  @main.command(aliases=["auth"])
72
- @click.option(
73
- "-o",
74
- "--owner",
75
- metavar="OWNER",
76
- required=True,
77
- callback=validators.validate_owner,
78
- prompt=True,
79
- help="The name of the Cloudsmith organization to authenticate with.",
80
- )
81
78
  @click.option(
82
79
  "-t",
83
80
  "--token",
@@ -126,7 +123,6 @@ def _perform_saml_authentication(
126
123
  def authenticate(
127
124
  ctx,
128
125
  opts,
129
- owner,
130
126
  token,
131
127
  force,
132
128
  save_config,
@@ -134,7 +130,7 @@ def authenticate(
134
130
  request_api_key_flag,
135
131
  no_browser,
136
132
  ):
137
- """Authenticate to Cloudsmith using the org's SAML setup."""
133
+ """Authenticate to Cloudsmith using the Workspace's SAML setup."""
138
134
  # Validate mutual exclusivity
139
135
  if request_api_key_flag and (token or force):
140
136
  raise click.UsageError(
@@ -169,10 +165,13 @@ def authenticate(
169
165
  err=True,
170
166
  )
171
167
 
172
- owner = owner[0].strip("[]'")
168
+ workspace = opts.org or click.prompt("Workspace", err=use_stderr)
169
+ workspace = validators.validate_owner(ctx, None, workspace)[0]
170
+ opts.org = workspace
173
171
 
174
172
  click.echo(
175
- f"Beginning authentication for the {click.style(owner, bold=True)} org ... ",
173
+ "Beginning authentication for the "
174
+ f"{click.style(workspace, bold=True)} Workspace ... ",
176
175
  err=use_stderr,
177
176
  )
178
177
 
@@ -183,10 +182,11 @@ def authenticate(
183
182
  with handle_api_exceptions(ctx, opts=opts, context_msg=context_message):
184
183
  _perform_saml_authentication(
185
184
  opts,
186
- owner,
185
+ workspace,
187
186
  enable_token_creation=enable_token_creation,
188
187
  use_stderr=use_stderr,
189
188
  no_browser=no_browser,
189
+ profile=ctx.meta.get("profile"),
190
190
  )
191
191
 
192
192
  if request_api_key_flag:
@@ -71,14 +71,26 @@ def copy(
71
71
  ),
72
72
  maybe_spinner(opts),
73
73
  ):
74
- _, new_slug = copy_package(
74
+ slug_perm, new_slug = copy_package(
75
75
  owner=owner, repo=source, identifier=slug, destination=destination
76
76
  )
77
77
 
78
78
  click.secho("OK", fg="green", err=use_stderr)
79
79
 
80
+ click.echo(
81
+ "Copied: {owner}/{repo}/{slug} ({slug_perm})".format(
82
+ owner=click.style(owner, fg="magenta"),
83
+ repo=click.style(destination, fg="magenta"),
84
+ slug=click.style(new_slug, fg="green"),
85
+ slug_perm=click.style(slug_perm, bold=True),
86
+ ),
87
+ err=use_stderr,
88
+ )
89
+
80
90
  if no_wait_for_sync:
81
- utils.maybe_print_status_json(opts, {"slug": new_slug, "status": "OK"})
91
+ utils.maybe_print_status_json(
92
+ opts, {"slug": new_slug, "slug_perm": slug_perm, "status": "OK"}
93
+ )
82
94
  return
83
95
 
84
96
  wait_for_package_sync(
@@ -92,4 +104,6 @@ def copy(
92
104
  attempts=sync_attempts,
93
105
  )
94
106
 
95
- utils.maybe_print_status_json(opts, {"slug": new_slug, "status": "OK"})
107
+ utils.maybe_print_status_json(
108
+ opts, {"slug": new_slug, "slug_perm": slug_perm, "status": "OK"}
109
+ )
@@ -9,9 +9,11 @@ that follow their respective credential helper protocols.
9
9
  import click
10
10
 
11
11
  from ..main import main
12
+ from .cargo import cargo as cargo_cmd
12
13
  from .docker import docker as docker_cmd
13
14
  from .generic import generic as generic_cmd
14
15
  from .manage import install_cmd, list_cmd, uninstall_cmd
16
+ from .pnpm import pnpm as pnpm_cmd
15
17
 
16
18
 
17
19
  @click.group()
@@ -27,15 +29,26 @@ def credential_helper():
27
29
  # Install Docker credential helper
28
30
  $ cloudsmith credential-helper install docker
29
31
 
32
+ # Install pnpm credential helper
33
+ $ cloudsmith credential-helper install pnpm
34
+
35
+ # Install cargo credential helper
36
+ $ cloudsmith credential-helper install cargo
37
+
30
38
  # Test Docker credential helper directly
31
39
  $ echo "docker.cloudsmith.io" | cloudsmith credential-helper docker
40
+
41
+ # Test pnpm credential helper directly
42
+ $ cloudsmith credential-helper pnpm npm.cloudsmith.io
32
43
  """
33
44
 
34
45
 
46
+ credential_helper.add_command(pnpm_cmd, name="pnpm")
35
47
  credential_helper.add_command(docker_cmd, name="docker")
36
48
  credential_helper.add_command(generic_cmd, name="generic")
37
49
  credential_helper.add_command(install_cmd, name="install")
38
50
  credential_helper.add_command(uninstall_cmd, name="uninstall")
39
51
  credential_helper.add_command(list_cmd, name="list")
52
+ credential_helper.add_command(cargo_cmd, name="cargo")
40
53
 
41
54
  main.add_command(credential_helper, name="credential-helper")
@@ -0,0 +1,94 @@
1
+ # Copyright 2026 Cloudsmith Ltd
2
+ """
3
+ Cargo credential provider command.
4
+
5
+ Implements the Cargo credential provider protocol for Cloudsmith registries.
6
+
7
+ See: https://doc.rust-lang.org/cargo/reference/credential-provider-protocol.html
8
+ """
9
+
10
+ import sys
11
+
12
+ import click
13
+
14
+ from ....credential_helpers.cargo import execute
15
+ from ...decorators import common_api_auth_options, resolve_credentials
16
+
17
+
18
+ @click.command(context_settings={"ignore_unknown_options": True})
19
+ @click.option(
20
+ "--cargo-plugin",
21
+ is_flag=True,
22
+ default=False,
23
+ hidden=True,
24
+ help="Passed by Cargo when invoking this command as a credential provider.",
25
+ )
26
+ @click.argument("provider_args", nargs=-1, type=click.UNPROCESSED)
27
+ @common_api_auth_options
28
+ @resolve_credentials
29
+ def cargo(opts, cargo_plugin, provider_args): # pylint: disable=unused-argument
30
+ """
31
+ Cargo credential provider for Cloudsmith registries.
32
+
33
+ Speaks the Cargo credential provider protocol: a newline-delimited JSON
34
+ conversation on stdin/stdout, starting with a hello message that announces
35
+ the supported protocol versions, then one response per request.
36
+
37
+ Provides credentials for all Cloudsmith Cargo registries: ``*.cloudsmith.io``,
38
+ ``*.cloudsmith.com``, and any custom domains configured for the Workspace
39
+ (requires a Workspace - ``--workspace``, CLOUDSMITH_WORKSPACE, or
40
+ ``workspace`` in ``config.ini``; legacy aliases are also accepted - and a
41
+ valid API key/token).
42
+
43
+ A registry that is not a Cloudsmith one is answered with
44
+ ``url-not-supported`` so Cargo falls through to the next configured
45
+ credential provider. ``cargo login``/``cargo logout`` are answered with
46
+ ``operation-not-supported``: credentials come from the Cloudsmith CLI's own
47
+ provider chain, so there is nothing to store or clear.
48
+
49
+ \b
50
+ Input (stdin):
51
+ One JSON request per line, e.g.
52
+ {"v":1,"kind":"get","operation":"read",
53
+ "registry":{"index-url":"sparse+https://cargo.cloudsmith.io/org/repo/"}}
54
+
55
+ \b
56
+ Output (stdout):
57
+ {"v":[1]}
58
+ {"Ok":{"kind":"get","token":"<cloudsmith-token>","cache":"session",
59
+ "operation_independent":true}}
60
+
61
+ \b
62
+ Exit codes:
63
+ 0: Session completed
64
+ 1: No credentials available, or the session broke down
65
+
66
+ \b
67
+ Examples:
68
+ # Manual testing
69
+ $ echo '{"v":1,"kind":"get","operation":"read","registry":{"index-url":"sparse+https://cargo.cloudsmith.io/org/repo/"}}' \\
70
+ | cloudsmith credential-helper cargo
71
+
72
+ # Called by Cargo via the launcher
73
+ $ cargo-credential-cloudsmith --cargo-plugin
74
+
75
+ \b
76
+ Environment variables:
77
+ CLOUDSMITH_API_KEY: API key for authentication (optional)
78
+ CLOUDSMITH_WORKSPACE: Workspace slug (CLOUDSMITH_ORG is also accepted)
79
+ """
80
+ # `provider_args` collects the extra arguments Cargo appends from the
81
+ # credential-provider config entry. This provider takes no configuration
82
+ # of its own, so they are accepted and ignored rather than rejected — an
83
+ # unknown-option error would surface as an authentication failure.
84
+ exit_code, stderr = execute(
85
+ sys.stdin,
86
+ sys.stdout,
87
+ credential=opts.credential,
88
+ api_host=opts.api_host,
89
+ org=opts.org,
90
+ )
91
+
92
+ if stderr is not None:
93
+ click.echo(stderr, err=True)
94
+ sys.exit(exit_code)
@@ -28,9 +28,10 @@ def docker(opts, operation):
28
28
  (get/store/erase/list).
29
29
 
30
30
  Provides credentials for all Cloudsmith Docker registries: ``*.cloudsmith.io``,
31
- ``*.cloudsmith.com``, and any custom domains configured for the organisation
32
- (requires an organisation - ``--org``, CLOUDSMITH_ORG or ``org`` in
33
- ``config.ini`` - and a valid API key/token).
31
+ ``*.cloudsmith.com``, and any custom domains configured for the Workspace
32
+ (requires a Workspace - ``--workspace``, CLOUDSMITH_WORKSPACE, or
33
+ ``workspace`` in ``config.ini``; legacy aliases are also accepted - and a
34
+ valid API key/token).
34
35
 
35
36
  Input (stdin):
36
37
  Server URL as plain text (e.g. "docker.cloudsmith.io")
@@ -51,7 +52,7 @@ def docker(opts, operation):
51
52
 
52
53
  Environment variables:
53
54
  CLOUDSMITH_API_KEY: API key for authentication (optional)
54
- CLOUDSMITH_ORG: Organisation slug (required for custom domain support)
55
+ CLOUDSMITH_WORKSPACE: Workspace slug (CLOUDSMITH_ORG is also accepted)
55
56
  """
56
57
  exit_code, stdout, stderr = execute(
57
58
  operation,
@@ -27,7 +27,7 @@ def generic(opts):
27
27
 
28
28
  Resolves a credential through the full provider chain and writes a
29
29
  versioned JSON document to stdout. Takes no arguments: a Cloudsmith token
30
- is organisation-wide, so the host it will be used against does not change
30
+ is Workspace-wide, so the host it will be used against does not change
31
31
  which credential resolves.
32
32
 
33
33
  \b
@@ -12,6 +12,10 @@ import sys
12
12
 
13
13
  import click
14
14
 
15
+ from cloudsmith_cli.credential_helpers.cargo.installer import CargoInstaller
16
+ from cloudsmith_cli.credential_helpers.generic import PartialInstallError
17
+ from cloudsmith_cli.credential_helpers.pnpm.installer import PNPMInstaller
18
+
15
19
  from ....credential_helpers.docker.installer import DockerInstaller
16
20
  from ... import utils
17
21
  from ...decorators import (
@@ -27,6 +31,8 @@ from ...decorators import (
27
31
 
28
32
  _INSTALLERS: dict[str, type] = {
29
33
  "docker": DockerInstaller,
34
+ "pnpm": PNPMInstaller,
35
+ "cargo": CargoInstaller,
30
36
  }
31
37
 
32
38
 
@@ -40,7 +46,7 @@ def _get_installer(name: str):
40
46
 
41
47
  Returns
42
48
  -------
43
- DockerInstaller
49
+ BaseInstaller
44
50
  An instance of the appropriate installer class.
45
51
 
46
52
  Raises
@@ -85,7 +91,7 @@ def _get_installer(name: str):
85
91
  "--no-discover",
86
92
  is_flag=True,
87
93
  default=False,
88
- help="Disable automatic discovery of custom Docker domains.",
94
+ help="Disable automatic discovery of custom domains.",
89
95
  )
90
96
  @click.option(
91
97
  "--refresh",
@@ -110,25 +116,30 @@ def install_cmd(
110
116
  ) -> None:
111
117
  """Install a credential helper launcher and configure the package manager.
112
118
 
113
- HELPER is the name of the credential helper to install (e.g. ``docker``).
119
+ HELPER is the name of the credential helper to install (e.g. ``docker``, ``pnpm``).
120
+
121
+ Important for pnpm: The tokenHelper directive is only honored in the
122
+ user-level ~/.npmrc file, not in a project-level .npmrc. This is a pnpm
123
+ security restriction. The absolute path to the launcher is automatically
124
+ calculated and configured.
114
125
 
115
126
  Examples:
116
127
 
117
128
  \b
118
- # Install Docker credential helper
119
- $ cloudsmith credential-helper install docker
129
+ # Install credential helper
130
+ $ cloudsmith credential-helper install HELPER
120
131
 
121
132
  \b
122
133
  # Install with a custom domain
123
- $ cloudsmith credential-helper install docker --domain my.registry.example.com
134
+ $ cloudsmith credential-helper install HELPER --domain my.registry.example.com
124
135
 
125
136
  \b
126
137
  # Preview without making changes
127
- $ cloudsmith credential-helper install docker --dry-run
138
+ $ cloudsmith credential-helper install HELPER --dry-run
128
139
 
129
140
  \b
130
141
  # Disable automatic custom-domain discovery
131
- $ cloudsmith credential-helper install docker --no-discover
142
+ $ cloudsmith credential-helper install HELPER --no-discover
132
143
  """
133
144
  installer = _get_installer(helper)
134
145
  try:
@@ -146,6 +157,11 @@ def install_cmd(
146
157
  raise click.ClickException(
147
158
  f"Failed to install {helper!r} credential helper: {exc}"
148
159
  )
160
+ except PartialInstallError as exc:
161
+ actions = exc.actions
162
+ ec = exc.exit_code
163
+ else:
164
+ ec = 0
149
165
 
150
166
  use_stderr = utils.should_use_stderr(opts)
151
167
  warnings = [a for a in actions if a.startswith("WARNING")]
@@ -157,7 +173,7 @@ def install_cmd(
157
173
  "warnings": warnings,
158
174
  }
159
175
  if utils.maybe_print_as_json(opts, data):
160
- return
176
+ sys.exit(ec)
161
177
 
162
178
  if dry_run:
163
179
  click.echo("Dry run — no changes will be made:", err=use_stderr)
@@ -165,6 +181,7 @@ def install_cmd(
165
181
  click.echo(f" {action}" if dry_run else action, err=use_stderr)
166
182
  for warning in warnings:
167
183
  click.secho(f" {warning}" if dry_run else warning, err=True, fg="yellow")
184
+ sys.exit(ec)
168
185
 
169
186
 
170
187
  # ---------------------------------------------------------------------------
@@ -0,0 +1,51 @@
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
+
10
+ import click
11
+
12
+ from ....credential_helpers.pnpm import execute
13
+ from ...decorators import common_api_auth_options, resolve_credentials
14
+
15
+
16
+ @click.command()
17
+ @click.argument("repo", required=False, default="npm.cloudsmith.io")
18
+ @common_api_auth_options
19
+ @resolve_credentials
20
+ def pnpm(opts, repo):
21
+ """
22
+ Input (arg, optional):
23
+ Server URL as plain text (e.g. "npm.cloudsmith.io")
24
+
25
+ Output (stdout):
26
+ Text: <cloudsmith-token>
27
+
28
+ \b
29
+ Exit codes:
30
+ 0: Success
31
+ 1: Error (no credentials available, not a Cloudsmith registry, etc.)
32
+
33
+ \b
34
+ Environment variables:
35
+ CLOUDSMITH_API_KEY: API key for authentication (optional)
36
+ CLOUDSMITH_WORKSPACE: Workspace slug (CLOUDSMITH_ORG is also accepted)
37
+ """
38
+
39
+ exit_code, stdout, stderr = execute(
40
+ repo,
41
+ credential=opts.credential,
42
+ api_host=opts.api_host,
43
+ org=opts.org,
44
+ )
45
+
46
+ if stdout is not None:
47
+ click.echo(stdout, nl=False)
48
+ if stderr is not None:
49
+ click.echo(stderr, err=True)
50
+
51
+ sys.exit(exit_code)
@@ -74,16 +74,15 @@ def list_dependencies(ctx, opts, owner_repo_package):
74
74
  return
75
75
 
76
76
  headers = ["Type", "Name", "Operator", "Version"]
77
- rows = []
78
- for dep in deps:
79
- rows.append(
80
- [
81
- click.style(dep["dep_type"], fg="cyan"),
82
- click.style(dep["name"], fg="yellow"),
83
- click.style(dep["operator"], fg="magenta"),
84
- click.style(dep["version"] or "", fg="green"),
85
- ]
86
- )
77
+ rows = [
78
+ [
79
+ click.style(dep["dep_type"], fg="cyan"),
80
+ click.style(dep["name"], fg="yellow"),
81
+ click.style(dep["operator"], fg="magenta"),
82
+ click.style(dep["version"] or "", fg="green"),
83
+ ]
84
+ for dep in deps
85
+ ]
87
86
 
88
87
  if deps:
89
88
  click.echo()
@@ -63,6 +63,7 @@ def _custom_entries(records) -> list[dict]:
63
63
  "format": format_for_backend_kind(record.backend_kind),
64
64
  "type": "custom",
65
65
  "domain_type": record.domain_type.value,
66
+ "workspace": record.org,
66
67
  "org": record.org,
67
68
  "repository": record.repository,
68
69
  "primary": record.primary,
@@ -133,19 +134,19 @@ def list_domains( # pylint: disable=too-many-arguments
133
134
  ``*.cloudsmith.io`` service hosts alongside custom domains, with ``type``
134
135
  distinguishing ``default`` from ``custom`` and ``domain_type`` saying what
135
136
  each host is for: ``download``, ``upload``, or ``native_api`` for a host
136
- speaking one package format's own protocol. An organisation's own custom
137
+ speaking one package format's own protocol. A Workspace's own custom
137
138
  domains are listed ahead of the built-in hosts, which serve as the
138
139
  fallback. Only usable hosts are listed: a custom domain that is disabled or
139
140
  not yet validated serves nothing, so it is left out rather than offered as
140
141
  somewhere to publish to. Check it in the Cloudsmith UI if one you expect is
141
142
  missing here.
142
143
 
143
- Built-in hosts are always listed and need no organisation or authentication.
144
- An organisation from ``--org``, CLOUDSMITH_ORG or ``org`` in ``config.ini``
145
- adds its custom domains, and a failed lookup exits non-zero rather than
146
- rendering as "no domains". With no organisation the command lists whatever
147
- earlier runs cached and makes no API call; ``--refresh`` bypasses that cache
148
- for a configured organisation.
144
+ Built-in hosts are always listed and need no Workspace or authentication.
145
+ A Workspace from ``--workspace``, CLOUDSMITH_WORKSPACE, or ``workspace`` in
146
+ ``config.ini`` adds its custom domains, and a failed lookup exits non-zero
147
+ rather than rendering as "no domains". With no Workspace the command lists
148
+ whatever earlier runs cached and makes no API call; ``--refresh`` bypasses
149
+ that cache for a configured Workspace.
149
150
 
150
151
  Where two custom domains could serve the same request Cloudsmith picks the
151
152
  one bound to the repository in hand, then ``primary`` over secondary, then
@@ -163,7 +164,7 @@ def list_domains( # pylint: disable=too-many-arguments
163
164
 
164
165
  Output (stdout):
165
166
  JSON: {"version": 1, "domains": [{"host": ..., "format": ...,
166
- "type": ..., "domain_type": ..., "org": ..., "repository": ...,
167
+ "type": ..., "domain_type": ..., "workspace": ..., "repository": ...,
167
168
  "primary": ..., "created_at": ...}], "meta": {"pagination": {...}}}
168
169
 
169
170
  "meta" is only present when the result is paginated (i.e. not
@@ -177,16 +178,16 @@ def list_domains( # pylint: disable=too-many-arguments
177
178
  $ cloudsmith domains list
178
179
 
179
180
  \b
180
- # List built-in hosts plus an organisation's custom domains
181
- $ cloudsmith domains list --org my-org
181
+ # List built-in hosts plus a Workspace's custom domains
182
+ $ cloudsmith domains list --workspace my-workspace
182
183
 
183
184
  \b
184
185
  # The hosts usable for one repository, most-preferred first
185
- $ cloudsmith domains list --org my-org --repo my-repo --format maven
186
+ $ cloudsmith domains list --workspace my-workspace --repo my-repo --format maven
186
187
 
187
188
  \b
188
189
  # Where to upload to
189
- $ cloudsmith domains list --org my-org --domain-type upload
190
+ $ cloudsmith domains list --workspace my-workspace --domain-type upload
190
191
  """
191
192
  if not page_all:
192
193
  explicit_sources = {
@@ -229,6 +230,7 @@ def list_domains( # pylint: disable=too-many-arguments
229
230
  "format": domain.format_label,
230
231
  "type": "default",
231
232
  "domain_type": domain.domain_type.value,
233
+ "workspace": None,
232
234
  "org": None,
233
235
  "repository": None,
234
236
  "primary": True,
@@ -257,9 +259,9 @@ def list_domains( # pylint: disable=too-many-arguments
257
259
  else:
258
260
  if refresh:
259
261
  click.secho(
260
- "Warning: --refresh needs an organisation to fetch from, so the "
261
- "cached custom domains below are unchanged. Set --org, "
262
- "CLOUDSMITH_ORG or org in config.ini.",
262
+ "Warning: --refresh needs a Workspace to fetch from, so the "
263
+ "cached custom domains below are unchanged. Set --workspace, "
264
+ "CLOUDSMITH_WORKSPACE, or workspace in config.ini.",
263
265
  fg="yellow",
264
266
  err=True,
265
267
  )