cloudsmith-cli 1.30.1__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.
- {cloudsmith_cli-1.30.1/cloudsmith_cli.egg-info → cloudsmith_cli-1.31.0}/PKG-INFO +7 -6
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/README.md +5 -4
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/command.py +12 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/auth.py +4 -19
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/credential_helper/cargo.py +3 -2
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/credential_helper/docker.py +2 -2
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/credential_helper/manage.py +176 -2
- cloudsmith_cli-1.31.0/cloudsmith_cli/cli/commands/credential_helper/pnpm.py +77 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/dependencies.py +10 -6
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/list_.py +3 -2
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/login.py +14 -9
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/mcp.py +25 -6
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/push.py +128 -24
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/upstream.py +1 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/whoami.py +24 -9
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/config.py +116 -19
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/decorators.py +119 -38
- cloudsmith_cli-1.31.0/cloudsmith_cli/cli/deprecation.py +211 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/exceptions.py +8 -3
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/saml.py +27 -5
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/utils.py +21 -4
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/validators.py +23 -10
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/api/v2.py +0 -11
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/cache_utils.py +59 -34
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/config.py +1 -1
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/credentials/oidc/cache.py +29 -7
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/credentials/providers/oidc_provider.py +12 -3
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/mcp/server.py +33 -4
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/pagination.py +3 -5
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/ratelimits.py +5 -5
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/rest.py +44 -10
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/session.py +34 -9
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/sso.py +21 -2
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/credential_helpers/cargo/installer.py +42 -14
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/credential_helpers/docker/installer.py +6 -3
- cloudsmith_cli-1.31.0/cloudsmith_cli/credential_helpers/gradle/__init__.py +2 -0
- cloudsmith_cli-1.31.0/cloudsmith_cli/credential_helpers/gradle/installer.py +63 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/credential_helpers/launchers.py +74 -12
- cloudsmith_cli-1.31.0/cloudsmith_cli/credential_helpers/maven/__init__.py +2 -0
- cloudsmith_cli-1.31.0/cloudsmith_cli/credential_helpers/maven/extensions.py +136 -0
- cloudsmith_cli-1.31.0/cloudsmith_cli/credential_helpers/maven/installer.py +337 -0
- cloudsmith_cli-1.31.0/cloudsmith_cli/credential_helpers/maven/mavenrc.py +86 -0
- cloudsmith_cli-1.31.0/cloudsmith_cli/credential_helpers/maven_tools.py +317 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/credential_helpers/pnpm/installer.py +18 -16
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/credential_helpers/pnpm/rc.py +7 -3
- cloudsmith_cli-1.31.0/cloudsmith_cli/credential_helpers/sbt/__init__.py +2 -0
- cloudsmith_cli-1.31.0/cloudsmith_cli/credential_helpers/sbt/installer.py +87 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/credential_helpers/terraform/installer.py +2 -2
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/credential_helpers/terraform/terraformrc.py +38 -7
- cloudsmith_cli-1.31.0/cloudsmith_cli/data/VERSION +1 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/data/config.ini +2 -2
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0/cloudsmith_cli.egg-info}/PKG-INFO +7 -6
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli.egg-info/SOURCES.txt +10 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli.egg-info/requires.txt +1 -1
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/pyproject.toml +5 -5
- cloudsmith_cli-1.30.1/cloudsmith_cli/cli/commands/credential_helper/pnpm.py +0 -51
- cloudsmith_cli-1.30.1/cloudsmith_cli/data/VERSION +0 -1
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/LICENSE +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/MANIFEST.in +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/__init__.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/__main__.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/__init__.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/__init__.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/check.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/copy.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/credential_helper/__init__.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/credential_helper/generic.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/credential_helper/terraform.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/delete.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/docs.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/domains.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/download.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/entitlements.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/help_.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/logout.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/main.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/metadata.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/metrics/__init__.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/metrics/command.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/metrics/entitlements.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/metrics/packages.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/move.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/policy/__init__.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/policy/command.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/policy/deny.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/policy/license.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/policy/vulnerability.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/quarantine.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/quota/__init__.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/quota/command.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/quota/history.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/quota/quota.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/registry.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/repos.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/resync.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/status.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/tags.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/tokens.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/update.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/commands/vulnerabilities.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/dsc_parser.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/metadata_common.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/table.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/types.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/cli/webserver.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/conftest.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/__init__.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/api/__init__.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/api/distros.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/api/entitlements.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/api/exceptions.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/api/files.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/api/init.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/api/metadata.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/api/metrics.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/api/orgs.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/api/packages.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/api/quota.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/api/rates.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/api/repos.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/api/status.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/api/upstreams.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/api/user.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/api/version.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/api/vulnerabilities.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/api/workspaces.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/certificate_errors.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/credentials/__init__.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/credentials/chain.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/credentials/models.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/credentials/oidc/__init__.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/credentials/oidc/detectors/__init__.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/credentials/oidc/detectors/aws.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/credentials/oidc/detectors/azure_devops.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/credentials/oidc/detectors/base.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/credentials/oidc/detectors/bitbucket_pipelines.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/credentials/oidc/detectors/buildkite.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/credentials/oidc/detectors/circleci.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/credentials/oidc/detectors/gcp.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/credentials/oidc/detectors/generic.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/credentials/oidc/detectors/github_actions.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/credentials/oidc/detectors/gitlab_ci.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/credentials/oidc/exchange.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/credentials/provider.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/credentials/providers/__init__.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/credentials/providers/cli_flag.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/credentials/providers/credentials_file.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/credentials/providers/env_var.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/credentials/providers/keyring_provider.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/download.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/installation.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/keyring.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/macos_keychain.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/mcp/__init__.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/mcp/data.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/self_update.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/telemetry.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/update_check.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/utils.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/core/version.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/credential_helpers/__init__.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/credential_helpers/backends.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/credential_helpers/cargo/__init__.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/credential_helpers/cargo/runtime.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/credential_helpers/common.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/credential_helpers/docker/__init__.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/credential_helpers/docker/runtime.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/credential_helpers/domains.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/credential_helpers/generic.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/credential_helpers/pnpm/__init__.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/credential_helpers/pnpm/runtime.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/credential_helpers/terraform/__init__.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/credential_helpers/terraform/runtime.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/data/credentials.ini +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/templates/__init__.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/templates/auth_error.html +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/templates/auth_success.html +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/templates/auth_two_factor.html +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli/wrapper.py +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli.egg-info/dependency_links.txt +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli.egg-info/entry_points.txt +0 -0
- {cloudsmith_cli-1.30.1 → cloudsmith_cli-1.31.0}/cloudsmith_cli.egg-info/top_level.txt +0 -0
- {cloudsmith_cli-1.30.1 → 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.
|
|
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
|
|
@@ -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.
|
|
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`
|
|
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`
|
|
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 --
|
|
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 --
|
|
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`
|
|
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`
|
|
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 --
|
|
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 --
|
|
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
|
|
@@ -248,28 +248,13 @@ def authenticate(
|
|
|
248
248
|
use_stderr = request_api_key_flag or json or utils.should_use_stderr(opts)
|
|
249
249
|
|
|
250
250
|
if token:
|
|
251
|
-
|
|
252
|
-
"DEPRECATION WARNING: The `--token` flag is deprecated and will be removed in a future release. "
|
|
253
|
-
"Please use `--request-api-key` instead.",
|
|
254
|
-
fg="yellow",
|
|
255
|
-
err=True,
|
|
256
|
-
)
|
|
251
|
+
deprecation.warn_option("--token", "--request-api-key", ctx=ctx)
|
|
257
252
|
|
|
258
253
|
if force:
|
|
259
|
-
|
|
260
|
-
"DEPRECATION WARNING: The `--force` flag is deprecated and will be removed in a future release. "
|
|
261
|
-
"Please use `--request-api-key` instead (force is implied).",
|
|
262
|
-
fg="yellow",
|
|
263
|
-
err=True,
|
|
264
|
-
)
|
|
254
|
+
deprecation.warn_option("--force", "--request-api-key", ctx=ctx)
|
|
265
255
|
|
|
266
256
|
if json and not utils.should_use_stderr(opts):
|
|
267
|
-
|
|
268
|
-
"DEPRECATION WARNING: The `--json` flag is deprecated and will be removed in a future release. "
|
|
269
|
-
"Please use `--output-format json` instead.",
|
|
270
|
-
fg="yellow",
|
|
271
|
-
err=True,
|
|
272
|
-
)
|
|
257
|
+
deprecation.warn_option("--json", "--output-format json", ctx=ctx)
|
|
273
258
|
|
|
274
259
|
if not force and not token and not request_api_key_flag:
|
|
275
260
|
session_result = _renew_existing_sso_session(
|
|
@@ -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``;
|
|
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
|
|
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``;
|
|
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
|
|
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:
|
|
@@ -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(
|
|
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(
|
|
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}"
|
|
@@ -426,6 +588,13 @@ def uninstall_cmd(ctx, opts, helper: str, bin_dir: str | None, dry_run: bool) ->
|
|
|
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(
|
|
36
|
+
def list_dependencies(
|
|
37
|
+
ctx: click.Context, opts: Options, owner_repo_package: tuple[str, str, str]
|
|
38
|
+
) -> None:
|
|
36
39
|
"""
|
|
37
|
-
List direct
|
|
40
|
+
List the direct dependencies of a package.
|
|
38
41
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
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
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import functools
|
|
4
4
|
from operator import itemgetter
|
|
5
|
+
from typing import Any
|
|
5
6
|
|
|
6
7
|
import click
|
|
7
8
|
|
|
@@ -32,9 +33,9 @@ def list_(ctx, opts): # pylint: disable=unused-argument
|
|
|
32
33
|
|
|
33
34
|
@list_.command(name="dependencies", aliases=["deps"])
|
|
34
35
|
@dependencies.list_dependencies_options
|
|
35
|
-
@functools.wraps(
|
|
36
|
+
@functools.wraps(dependencies.list_dependencies)
|
|
36
37
|
@click.pass_context
|
|
37
|
-
def dependencies_(*args, **kwargs): # pylint: disable=missing-docstring
|
|
38
|
+
def dependencies_(*args: Any, **kwargs: Any) -> None: # pylint: disable=missing-docstring
|
|
38
39
|
return dependencies.list_dependencies(*args, **kwargs)
|
|
39
40
|
|
|
40
41
|
|
|
@@ -6,7 +6,7 @@ import cloudsmith_api
|
|
|
6
6
|
from ...core.api.exceptions import TwoFactorRequiredException
|
|
7
7
|
from ...core.api.user import get_user_token
|
|
8
8
|
from ...core.config import create_config_files, new_config_messaging
|
|
9
|
-
from .. import decorators, utils
|
|
9
|
+
from .. import decorators, deprecation, utils
|
|
10
10
|
from ..exceptions import handle_api_exceptions
|
|
11
11
|
from ..utils import maybe_spinner
|
|
12
12
|
from .main import main
|
|
@@ -26,9 +26,12 @@ API_KEY_DOCS_URL = (
|
|
|
26
26
|
"https://docs.cloudsmith.com/developer-tools/cli#getting-your-api-key"
|
|
27
27
|
)
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
"
|
|
31
|
-
"
|
|
29
|
+
DEPRECATION_REMOVAL = (
|
|
30
|
+
"will stop working on November 20, 2026, when Cloudsmith disables username "
|
|
31
|
+
"and password login"
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
DEPRECATION_DETAIL = (
|
|
32
35
|
"See https://cloudsmith.com/changelog\n"
|
|
33
36
|
"Use an API key or SAML instead: set `CLOUDSMITH_API_KEY` to an API key from "
|
|
34
37
|
"the Cloudsmith web app (your user menu, then Personal API Keys), or run "
|
|
@@ -64,11 +67,13 @@ class DeprecatedLoginCommand(click.Command):
|
|
|
64
67
|
def parse_args(self, ctx, args):
|
|
65
68
|
# Click prompts for --login and --password while parsing, so the
|
|
66
69
|
# warning must be printed here rather than in the command body.
|
|
67
|
-
# Shell completion also parses (resiliently)
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
# Shell completion also parses (resiliently); the warning skips it.
|
|
71
|
+
deprecation.warn(
|
|
72
|
+
f"`cloudsmith {ctx.info_name}`",
|
|
73
|
+
removal=DEPRECATION_REMOVAL,
|
|
74
|
+
detail=DEPRECATION_DETAIL,
|
|
75
|
+
ctx=ctx,
|
|
76
|
+
)
|
|
72
77
|
return super().parse_args(ctx, args)
|
|
73
78
|
|
|
74
79
|
|