kstlib 3.1.0__tar.gz → 3.2.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.
- {kstlib-3.1.0/src/kstlib.egg-info → kstlib-3.2.0}/PKG-INFO +2 -1
- {kstlib-3.1.0 → kstlib-3.2.0}/pyproject.toml +6 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/cli/commands/rapi/__init__.py +15 -13
- kstlib-3.2.0/src/kstlib/cli/commands/rapi/call.py +1004 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/kstlib.conf.yml +15 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/meta.py +1 -1
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/rapi/client.py +384 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/rapi/config.py +62 -2
- {kstlib-3.1.0 → kstlib-3.2.0/src/kstlib.egg-info}/PKG-INFO +2 -1
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib.egg-info/requires.txt +1 -0
- kstlib-3.1.0/src/kstlib/cli/commands/rapi/call.py +0 -537
- {kstlib-3.1.0 → kstlib-3.2.0}/LICENSE.md +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/MANIFEST.in +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/README.md +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/setup.cfg +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/__init__.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/__main__.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/_shared/__init__.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/_shared/jinja.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/_shared/redaction.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/alerts/__init__.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/alerts/channels/__init__.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/alerts/channels/base.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/alerts/channels/email.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/alerts/channels/slack.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/alerts/exceptions.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/alerts/manager.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/alerts/models.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/alerts/throttle.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/auth/__init__.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/auth/callback.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/auth/check.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/auth/config.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/auth/errors.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/auth/models.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/auth/providers/__init__.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/auth/providers/base.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/auth/providers/oauth2.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/auth/providers/oidc.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/auth/session.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/auth/token.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/cache/__init__.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/cache/decorator.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/cache/strategies.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/cli/__init__.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/cli/app.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/cli/commands/__init__.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/cli/commands/auth/__init__.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/cli/commands/auth/check.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/cli/commands/auth/common.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/cli/commands/auth/login.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/cli/commands/auth/logout.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/cli/commands/auth/providers.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/cli/commands/auth/status.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/cli/commands/auth/token.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/cli/commands/auth/whoami.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/cli/commands/config.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/cli/commands/ops/__init__.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/cli/commands/ops/attach.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/cli/commands/ops/common.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/cli/commands/ops/list_sessions.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/cli/commands/ops/logs.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/cli/commands/ops/start.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/cli/commands/ops/status.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/cli/commands/ops/stop.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/cli/commands/rapi/list.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/cli/commands/rapi/show.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/cli/commands/secrets/__init__.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/cli/commands/secrets/common.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/cli/commands/secrets/decrypt.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/cli/commands/secrets/doctor.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/cli/commands/secrets/encrypt.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/cli/commands/secrets/shred.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/cli/common.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/config/__init__.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/config/exceptions.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/config/export.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/config/loader.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/config/sops.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/db/__init__.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/db/aiosqlcipher.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/db/cipher.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/db/database.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/db/exceptions.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/db/pool.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/helpers/__init__.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/helpers/exceptions.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/helpers/time_trigger.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/limits.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/logging/__init__.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/logging/manager.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/mail/__init__.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/mail/_helpers.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/mail/builder.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/mail/collector.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/mail/exceptions.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/mail/filesystem.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/mail/throttle.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/mail/transport.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/mail/transports/__init__.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/mail/transports/gmail.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/mail/transports/resend.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/mail/transports/ses.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/mail/transports/smtp.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/metrics/__init__.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/metrics/decorators.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/metrics/exceptions.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/monitoring/__init__.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/monitoring/_styles.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/monitoring/cell.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/monitoring/config.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/monitoring/delivery.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/monitoring/exceptions.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/monitoring/image.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/monitoring/kv.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/monitoring/list.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/monitoring/metric.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/monitoring/monitoring.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/monitoring/renderer.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/monitoring/service.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/monitoring/table.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/monitoring/types.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/ops/__init__.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/ops/base.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/ops/container.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/ops/exceptions.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/ops/manager.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/ops/models.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/ops/tmux.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/ops/validators.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/pipeline/__init__.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/pipeline/base.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/pipeline/exceptions.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/pipeline/models.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/pipeline/runner.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/pipeline/steps/__init__.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/pipeline/steps/_base.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/pipeline/steps/_helpers.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/pipeline/steps/callable.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/pipeline/steps/python.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/pipeline/steps/shell.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/pipeline/validators.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/py.typed +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/rapi/__init__.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/rapi/credentials.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/rapi/exceptions.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/resilience/__init__.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/resilience/circuit_breaker.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/resilience/exceptions.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/resilience/heartbeat.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/resilience/rate_limiter.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/resilience/shutdown.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/resilience/watchdog.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/secrets/__init__.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/secrets/exceptions.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/secrets/models.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/secrets/providers/__init__.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/secrets/providers/base.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/secrets/providers/environment.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/secrets/providers/keyring.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/secrets/providers/kms.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/secrets/providers/kwargs.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/secrets/providers/sops.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/secrets/resolver.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/secrets/sensitive.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/secure/__init__.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/secure/fs.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/secure/passwords.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/secure/permissions.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/ssl.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/transform/__init__.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/transform/chain.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/transform/config.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/transform/exceptions.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/transform/primitives.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/transform/validators.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/ui/__init__.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/ui/exceptions.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/ui/panels.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/ui/spinner.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/ui/tables.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/utils/__init__.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/utils/dict.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/utils/formatting.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/utils/http_trace.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/utils/lazy.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/utils/secure_delete.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/utils/serialization.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/utils/text.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/utils/validators.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/websocket/__init__.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/websocket/exceptions.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/websocket/manager.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib/websocket/models.py +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib.egg-info/SOURCES.txt +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib.egg-info/dependency_links.txt +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib.egg-info/entry_points.txt +0 -0
- {kstlib-3.1.0 → kstlib-3.2.0}/src/kstlib.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: kstlib
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.2.0
|
|
4
4
|
Summary: Config-driven helpers for Python projects (dynamic config, secure secrets, preset logging, and more…)
|
|
5
5
|
Author-email: Michel TRUONG <michel.truong@gmail.com>
|
|
6
6
|
Maintainer-email: Michel TRUONG <michel.truong@gmail.com>
|
|
@@ -32,6 +32,7 @@ Requires-Dist: tomli-w<2,>=1.0
|
|
|
32
32
|
Requires-Dist: python-box<8,>=7.3
|
|
33
33
|
Requires-Dist: platformdirs<5,>=4.0
|
|
34
34
|
Requires-Dist: defusedxml<1,>=0.7
|
|
35
|
+
Requires-Dist: jmespath<2,>=1.0
|
|
35
36
|
Requires-Dist: typer<1,>=0.19
|
|
36
37
|
Requires-Dist: click<9,>=8.3
|
|
37
38
|
Requires-Dist: rich<15,>=14.2
|
|
@@ -38,6 +38,7 @@ dependencies = [
|
|
|
38
38
|
"python-box>=7.3,<8", # Dot-access dicts (Box, BoxList, ConfigBox)
|
|
39
39
|
"platformdirs>=4.0,<5", # Cross-platform system config dirs (XDG on Linux, native on Mac/Windows)
|
|
40
40
|
"defusedxml>=0.7,<1", # XXE-safe XML parsing for kstlib.transform (CVE protection)
|
|
41
|
+
"jmespath>=1.0,<2", # JMESPath query for rapi extraction (and transform patches).
|
|
41
42
|
|
|
42
43
|
# --- CLI & Output Interface ---
|
|
43
44
|
"typer>=0.19,<1", # CLI framework (based on Click)
|
|
@@ -465,6 +466,11 @@ module = ["httpx", "httpx.*"]
|
|
|
465
466
|
# httpx type stubs not always installed
|
|
466
467
|
ignore_missing_imports = true
|
|
467
468
|
|
|
469
|
+
[[tool.mypy.overrides]]
|
|
470
|
+
module = ["jmespath", "jmespath.*"]
|
|
471
|
+
# jmespath ships no type stubs (no py.typed marker, no types-jmespath)
|
|
472
|
+
ignore_missing_imports = true
|
|
473
|
+
|
|
468
474
|
[[tool.mypy.overrides]]
|
|
469
475
|
module = ["authlib", "authlib.*"]
|
|
470
476
|
# authlib has no type stubs (no types-Authlib package exists)
|
|
@@ -4,7 +4,6 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
from typing import TYPE_CHECKING
|
|
6
6
|
|
|
7
|
-
import click
|
|
8
7
|
import typer
|
|
9
8
|
from typer.core import TyperGroup
|
|
10
9
|
|
|
@@ -12,6 +11,8 @@ from kstlib.cli.common import console
|
|
|
12
11
|
from kstlib.rapi import load_rapi_config
|
|
13
12
|
|
|
14
13
|
if TYPE_CHECKING:
|
|
14
|
+
import click
|
|
15
|
+
|
|
15
16
|
from kstlib.rapi.config import RapiConfigManager
|
|
16
17
|
|
|
17
18
|
# Known subcommands that should not be treated as endpoints
|
|
@@ -40,7 +41,7 @@ def _load_config_or_exit() -> RapiConfigManager:
|
|
|
40
41
|
|
|
41
42
|
# Sub-command imports come AFTER _load_config_or_exit so the callers
|
|
42
43
|
# can import it without triggering a circular-import failure.
|
|
43
|
-
from .call import call # noqa: E402
|
|
44
|
+
from .call import _CallCommand, call # noqa: E402
|
|
44
45
|
from .list import list_endpoints # noqa: E402
|
|
45
46
|
from .show import show_endpoint # noqa: E402
|
|
46
47
|
|
|
@@ -54,15 +55,15 @@ class RapiGroup(TyperGroup):
|
|
|
54
55
|
args: list[str],
|
|
55
56
|
) -> tuple[str | None, click.Command | None, list[str]]:
|
|
56
57
|
"""Override command resolution to treat unknown commands as endpoints."""
|
|
57
|
-
#
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
58
|
+
# Rewrite BEFORE resolution instead of catching the resolution error:
|
|
59
|
+
# Typer 0.26+ ships a vendored click whose UsageError is a distinct
|
|
60
|
+
# class from click.UsageError, so an except-based fallback never
|
|
61
|
+
# matches there. get_command() returning None for unknown names is
|
|
62
|
+
# the contract that holds across all supported Typer versions.
|
|
63
|
+
if args and args[0] not in _SUBCOMMANDS and "." in args[0] and self.get_command(ctx, args[0]) is None:
|
|
64
|
+
# Treat as implicit call: prepend "call" to args
|
|
65
|
+
args = ["call", *args]
|
|
66
|
+
return super().resolve_command(ctx, args)
|
|
66
67
|
|
|
67
68
|
|
|
68
69
|
rapi_app = typer.Typer(
|
|
@@ -73,8 +74,9 @@ rapi_app = typer.Typer(
|
|
|
73
74
|
# Register explicit commands
|
|
74
75
|
rapi_app.command(name="list")(list_endpoints)
|
|
75
76
|
rapi_app.command(name="show")(show_endpoint)
|
|
76
|
-
# Keep "call" for explicit usage (shown in help)
|
|
77
|
-
|
|
77
|
+
# Keep "call" for explicit usage (shown in help). The custom command class
|
|
78
|
+
# gives --show-extracted its optional-value behavior (token normalization).
|
|
79
|
+
rapi_app.command(name="call", hidden=False, cls=_CallCommand)(call)
|
|
78
80
|
|
|
79
81
|
|
|
80
82
|
def register_cli(app: typer.Typer) -> None:
|