cloudsmith-cli 1.25.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.
- {cloudsmith_cli-1.25.0/cloudsmith_cli.egg-info → cloudsmith_cli-1.26.0}/PKG-INFO +2 -1
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/__init__.py +0 -2
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/command.py +21 -3
- cloudsmith_cli-1.26.0/cloudsmith_cli/cli/commands/__init__.py +6 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/auth.py +16 -16
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/copy.py +17 -3
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/credential_helper/__init__.py +5 -0
- cloudsmith_cli-1.26.0/cloudsmith_cli/cli/commands/credential_helper/cargo.py +94 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/credential_helper/docker.py +5 -4
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/credential_helper/generic.py +1 -1
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/credential_helper/manage.py +2 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/credential_helper/pnpm.py +1 -1
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/dependencies.py +9 -10
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/domains.py +17 -15
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/download.py +14 -16
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/list_.py +13 -14
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/logout.py +12 -5
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/main.py +3 -0
- cloudsmith_cli-1.26.0/cloudsmith_cli/cli/commands/registry.py +59 -0
- cloudsmith_cli-1.26.0/cloudsmith_cli/cli/commands/repos.py +1474 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/whoami.py +12 -6
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/config.py +27 -5
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/decorators.py +13 -6
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/exceptions.py +75 -41
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/saml.py +9 -45
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/table.py +1 -1
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/utils.py +13 -6
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/webserver.py +26 -28
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/api/files.py +1 -1
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/api/packages.py +2 -7
- cloudsmith_cli-1.26.0/cloudsmith_cli/core/api/repos.py +176 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/api/version.py +2 -2
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/api/vulnerabilities.py +5 -5
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/cache_utils.py +32 -10
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/credentials/chain.py +12 -9
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/credentials/models.py +3 -2
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/credentials/oidc/detectors/__init__.py +1 -1
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/credentials/oidc/detectors/azure_devops.py +2 -1
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/credentials/oidc/detectors/github_actions.py +2 -1
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/credentials/oidc/exchange.py +1 -1
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/credentials/provider.py +3 -1
- cloudsmith_cli-1.26.0/cloudsmith_cli/core/credentials/providers/keyring_provider.py +105 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/credentials/providers/oidc_provider.py +7 -4
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/download.py +6 -7
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/keyring.py +123 -35
- cloudsmith_cli-1.26.0/cloudsmith_cli/core/macos_keychain.py +168 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/rest.py +2 -119
- cloudsmith_cli-1.26.0/cloudsmith_cli/core/session.py +142 -0
- cloudsmith_cli-1.26.0/cloudsmith_cli/core/sso.py +49 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/version.py +2 -2
- cloudsmith_cli-1.26.0/cloudsmith_cli/credential_helpers/cargo/__init__.py +4 -0
- cloudsmith_cli-1.26.0/cloudsmith_cli/credential_helpers/cargo/installer.py +491 -0
- cloudsmith_cli-1.26.0/cloudsmith_cli/credential_helpers/cargo/runtime.py +265 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/credential_helpers/common.py +3 -2
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/credential_helpers/custom_domains.py +4 -3
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/credential_helpers/docker/installer.py +13 -10
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/credential_helpers/pnpm/runtime.py +2 -1
- cloudsmith_cli-1.26.0/cloudsmith_cli/data/VERSION +1 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/data/config.ini +3 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0/cloudsmith_cli.egg-info}/PKG-INFO +2 -1
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli.egg-info/SOURCES.txt +8 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli.egg-info/requires.txt +1 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/pyproject.toml +38 -5
- cloudsmith_cli-1.25.0/cloudsmith_cli/cli/commands/__init__.py +0 -34
- cloudsmith_cli-1.25.0/cloudsmith_cli/cli/commands/repos.py +0 -333
- cloudsmith_cli-1.25.0/cloudsmith_cli/core/api/repos.py +0 -81
- cloudsmith_cli-1.25.0/cloudsmith_cli/core/credentials/providers/keyring_provider.py +0 -59
- cloudsmith_cli-1.25.0/cloudsmith_cli/data/VERSION +0 -1
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/LICENSE +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/MANIFEST.in +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/README.md +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/__main__.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/__init__.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/check.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/delete.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/docs.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/entitlements.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/help_.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/login.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/mcp.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/metadata.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/metrics/__init__.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/metrics/command.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/metrics/entitlements.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/metrics/packages.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/move.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/policy/__init__.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/policy/command.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/policy/deny.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/policy/license.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/policy/vulnerability.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/push.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/quarantine.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/quota/__init__.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/quota/command.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/quota/history.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/quota/quota.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/resync.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/status.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/tags.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/tokens.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/upstream.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/commands/vulnerabilities.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/dsc_parser.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/metadata_common.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/types.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/cli/validators.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/conftest.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/__init__.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/api/__init__.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/api/distros.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/api/entitlements.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/api/exceptions.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/api/init.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/api/metadata.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/api/metrics.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/api/orgs.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/api/quota.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/api/rates.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/api/status.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/api/upstreams.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/api/user.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/config.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/credentials/__init__.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/credentials/oidc/__init__.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/credentials/oidc/cache.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/credentials/oidc/detectors/aws.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/credentials/oidc/detectors/base.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/credentials/oidc/detectors/bitbucket_pipelines.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/credentials/oidc/detectors/circleci.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/credentials/oidc/detectors/generic.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/credentials/oidc/detectors/gitlab_ci.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/credentials/providers/__init__.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/credentials/providers/cli_flag.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/credentials/providers/credentials_file.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/credentials/providers/env_var.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/mcp/__init__.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/mcp/data.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/mcp/server.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/pagination.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/ratelimits.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/core/utils.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/credential_helpers/__init__.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/credential_helpers/backends.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/credential_helpers/default_domains.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/credential_helpers/docker/__init__.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/credential_helpers/docker/runtime.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/credential_helpers/generic.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/credential_helpers/launchers.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/credential_helpers/pnpm/__init__.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/credential_helpers/pnpm/installer.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/credential_helpers/pnpm/rc.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/data/credentials.ini +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/templates/__init__.py +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/templates/auth_error.html +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/templates/auth_success.html +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli/templates/auth_two_factor.html +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli.egg-info/dependency_links.txt +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli.egg-info/entry_points.txt +0 -0
- {cloudsmith_cli-1.25.0 → cloudsmith_cli-1.26.0}/cloudsmith_cli.egg-info/top_level.txt +0 -0
- {cloudsmith_cli-1.25.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.
|
|
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
|
|
@@ -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
|
|
@@ -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
|
|
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
|
-
|
|
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):
|
|
@@ -17,7 +17,12 @@ AUTH_SERVER_PORT = 12400
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
def _perform_saml_authentication(
|
|
20
|
-
opts,
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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(
|
|
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(
|
|
107
|
+
utils.maybe_print_status_json(
|
|
108
|
+
opts, {"slug": new_slug, "slug_perm": slug_perm, "status": "OK"}
|
|
109
|
+
)
|
|
@@ -9,6 +9,7 @@ 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
|
|
@@ -31,6 +32,9 @@ def credential_helper():
|
|
|
31
32
|
# Install pnpm credential helper
|
|
32
33
|
$ cloudsmith credential-helper install pnpm
|
|
33
34
|
|
|
35
|
+
# Install cargo credential helper
|
|
36
|
+
$ cloudsmith credential-helper install cargo
|
|
37
|
+
|
|
34
38
|
# Test Docker credential helper directly
|
|
35
39
|
$ echo "docker.cloudsmith.io" | cloudsmith credential-helper docker
|
|
36
40
|
|
|
@@ -45,5 +49,6 @@ credential_helper.add_command(generic_cmd, name="generic")
|
|
|
45
49
|
credential_helper.add_command(install_cmd, name="install")
|
|
46
50
|
credential_helper.add_command(uninstall_cmd, name="uninstall")
|
|
47
51
|
credential_helper.add_command(list_cmd, name="list")
|
|
52
|
+
credential_helper.add_command(cargo_cmd, name="cargo")
|
|
48
53
|
|
|
49
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
|
|
32
|
-
(requires
|
|
33
|
-
``config.ini
|
|
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
|
-
|
|
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
|
|
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,7 @@ import sys
|
|
|
12
12
|
|
|
13
13
|
import click
|
|
14
14
|
|
|
15
|
+
from cloudsmith_cli.credential_helpers.cargo.installer import CargoInstaller
|
|
15
16
|
from cloudsmith_cli.credential_helpers.generic import PartialInstallError
|
|
16
17
|
from cloudsmith_cli.credential_helpers.pnpm.installer import PNPMInstaller
|
|
17
18
|
|
|
@@ -31,6 +32,7 @@ from ...decorators import (
|
|
|
31
32
|
_INSTALLERS: dict[str, type] = {
|
|
32
33
|
"docker": DockerInstaller,
|
|
33
34
|
"pnpm": PNPMInstaller,
|
|
35
|
+
"cargo": CargoInstaller,
|
|
34
36
|
}
|
|
35
37
|
|
|
36
38
|
|
|
@@ -33,7 +33,7 @@ def pnpm(opts, repo):
|
|
|
33
33
|
\b
|
|
34
34
|
Environment variables:
|
|
35
35
|
CLOUDSMITH_API_KEY: API key for authentication (optional)
|
|
36
|
-
|
|
36
|
+
CLOUDSMITH_WORKSPACE: Workspace slug (CLOUDSMITH_ORG is also accepted)
|
|
37
37
|
"""
|
|
38
38
|
|
|
39
39
|
exit_code, stdout, stderr = execute(
|
|
@@ -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
|
-
|
|
79
|
-
|
|
80
|
-
[
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
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.
|
|
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
|
|
144
|
-
|
|
145
|
-
adds its custom domains, and a failed lookup exits non-zero
|
|
146
|
-
rendering as "no domains". With no
|
|
147
|
-
earlier runs cached and makes no API call; ``--refresh`` bypasses
|
|
148
|
-
for a configured
|
|
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": ..., "
|
|
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
|
|
181
|
-
$ cloudsmith domains list --
|
|
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 --
|
|
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 --
|
|
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
|
|
261
|
-
"cached custom domains below are unchanged. Set --
|
|
262
|
-
"
|
|
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
|
)
|
|
@@ -334,22 +334,20 @@ def _resolve_all_files_items(
|
|
|
334
334
|
f"Output path '{output_dir}' exists but is not a directory."
|
|
335
335
|
)
|
|
336
336
|
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
)
|
|
352
|
-
return items
|
|
337
|
+
return [
|
|
338
|
+
{
|
|
339
|
+
"filename": f["filename"],
|
|
340
|
+
"url": f["cdn_url"],
|
|
341
|
+
"output_path": _safe_join(output_dir, f["filename"]),
|
|
342
|
+
"tag": f.get("tag", "file"),
|
|
343
|
+
"is_primary": f.get("is_primary", False),
|
|
344
|
+
"size": f.get("size", 0),
|
|
345
|
+
"package_name": pkg_name,
|
|
346
|
+
"package_version": pkg_version,
|
|
347
|
+
"status": None,
|
|
348
|
+
}
|
|
349
|
+
for f in sub_files
|
|
350
|
+
]
|
|
353
351
|
|
|
354
352
|
|
|
355
353
|
def _resolve_single_file_item(
|
|
@@ -239,20 +239,19 @@ def packages(ctx, opts, owner_repo, page, page_size, query, sort, page_all):
|
|
|
239
239
|
return
|
|
240
240
|
|
|
241
241
|
headers = ["Name", "Version", "Status", "Owner / Repository (Identifier)"]
|
|
242
|
-
rows = [
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
click.style(
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
)
|
|
242
|
+
rows = [
|
|
243
|
+
[
|
|
244
|
+
click.style(_get_package_name(package), fg="cyan"),
|
|
245
|
+
click.style(_get_package_version(package), fg="yellow"),
|
|
246
|
+
click.style(_get_package_status(package), fg="blue"),
|
|
247
|
+
"{owner_slug}/{repo_slug}/{slug}".format(
|
|
248
|
+
owner_slug=click.style(package["namespace"], fg="magenta"),
|
|
249
|
+
repo_slug=click.style(package["repository"], fg="magenta"),
|
|
250
|
+
slug=click.style(package["slug"], fg="green"),
|
|
251
|
+
),
|
|
252
|
+
]
|
|
253
|
+
for package in sorted(packages_, key=itemgetter("namespace", "slug"))
|
|
254
|
+
]
|
|
256
255
|
|
|
257
256
|
if packages_:
|
|
258
257
|
click.echo()
|
|
@@ -33,8 +33,13 @@ def _clear_credentials(dry_run, use_stderr):
|
|
|
33
33
|
return {"action": action, "files": list(creds_files)}
|
|
34
34
|
|
|
35
35
|
|
|
36
|
-
def _clear_keyring(api_host, dry_run, use_stderr):
|
|
37
|
-
"""Clear SSO tokens from keyring. Returns result dict.
|
|
36
|
+
def _clear_keyring(api_host, dry_run, use_stderr, profile=None):
|
|
37
|
+
"""Clear SSO tokens from keyring. Returns result dict.
|
|
38
|
+
|
|
39
|
+
Remove the profile's own entries. The legacy unscoped entries hold
|
|
40
|
+
the default profile's session, so remove them only when the profile
|
|
41
|
+
has no entries of its own.
|
|
42
|
+
"""
|
|
38
43
|
if not keyring.should_use_keyring():
|
|
39
44
|
click.secho(
|
|
40
45
|
"Keyring is disabled (CLOUDSMITH_NO_KEYRING is set).",
|
|
@@ -43,7 +48,7 @@ def _clear_keyring(api_host, dry_run, use_stderr):
|
|
|
43
48
|
)
|
|
44
49
|
return {"action": "disabled"}
|
|
45
50
|
|
|
46
|
-
if not keyring.has_sso_tokens(api_host):
|
|
51
|
+
if not keyring.has_sso_tokens(api_host, profile=profile):
|
|
47
52
|
click.echo("No SSO tokens found in system keyring.", err=use_stderr)
|
|
48
53
|
return {"action": "not_found"}
|
|
49
54
|
|
|
@@ -51,7 +56,9 @@ def _clear_keyring(api_host, dry_run, use_stderr):
|
|
|
51
56
|
click.echo("Would remove SSO tokens from system keyring.", err=use_stderr)
|
|
52
57
|
return {"action": "would_remove"}
|
|
53
58
|
|
|
54
|
-
deleted = keyring.delete_sso_tokens(api_host)
|
|
59
|
+
deleted = keyring.delete_sso_tokens(api_host, profile=profile, include_legacy=False)
|
|
60
|
+
if not deleted:
|
|
61
|
+
deleted = keyring.delete_sso_tokens(api_host)
|
|
55
62
|
action = "removed" if deleted else "failed"
|
|
56
63
|
msg = f"{'Removed' if deleted else 'Failed to remove'} SSO tokens from system keyring."
|
|
57
64
|
click.secho(msg, fg=None if deleted else "red", err=use_stderr)
|
|
@@ -131,7 +138,7 @@ def logout(ctx, opts, api_host, keyring_only, config_only, dry_run):
|
|
|
131
138
|
else {"action": "skipped", "files": []}
|
|
132
139
|
)
|
|
133
140
|
keyring_result = (
|
|
134
|
-
_clear_keyring(api_host, dry_run, use_stderr)
|
|
141
|
+
_clear_keyring(api_host, dry_run, use_stderr, profile=ctx.meta.get("profile"))
|
|
135
142
|
if not config_only
|
|
136
143
|
else {"action": "skipped"}
|
|
137
144
|
)
|
|
@@ -6,6 +6,7 @@ from ...core.api.version import get_version as get_api_version
|
|
|
6
6
|
from ...core.utils import get_github_website, get_help_website
|
|
7
7
|
from ...core.version import get_version as get_cli_version
|
|
8
8
|
from .. import command, decorators, utils
|
|
9
|
+
from .registry import LAZY_ALIASES, LAZY_COMMANDS
|
|
9
10
|
|
|
10
11
|
CONTEXT_SETTINGS = {"help_option_names": ["-h", "--help"]}
|
|
11
12
|
|
|
@@ -28,6 +29,8 @@ def print_version(opts):
|
|
|
28
29
|
|
|
29
30
|
@click.group(
|
|
30
31
|
cls=command.AliasGroup,
|
|
32
|
+
lazy_commands=LAZY_COMMANDS,
|
|
33
|
+
lazy_aliases=LAZY_ALIASES,
|
|
31
34
|
context_settings=CONTEXT_SETTINGS,
|
|
32
35
|
invoke_without_command=True,
|
|
33
36
|
help="""\b
|