splent-cli 1.43.0__tar.gz → 1.45.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.
- {splent_cli-1.43.0/src/splent_cli.egg-info → splent_cli-1.45.0}/PKG-INFO +1 -1
- {splent_cli-1.43.0 → splent_cli-1.45.0}/pyproject.toml +1 -1
- splent_cli-1.45.0/src/splent_cli/__init__.py +42 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/cli.py +18 -3
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/check/check_env.py +6 -3
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/clear/clear_uploads.py +2 -2
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/database/db_reset.py +1 -1
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/database/db_rollback.py +1 -1
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/database/db_seed.py +3 -3
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/database/db_upgrade.py +1 -1
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/doctor.py +2 -1
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/env/env_set.py +6 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/feature/feature_attach.py +28 -2
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/feature/feature_compat.py +37 -23
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/feature/feature_contract.py +45 -7
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/feature/feature_release.py +158 -7
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/feature/feature_rename.py +2 -3
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/feature/feature_test.py +9 -64
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/feature/feature_unlock.py +13 -1
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/marketplace/marketplace_auth_utils.py +33 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/product/product_build.py +9 -4
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/product/product_commands.py +2 -4
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/product/product_config.py +2 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/product/product_console.py +2 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/product/product_create.py +15 -2
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/product/product_derive.py +34 -1
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/product/product_list.py +1 -2
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/product/product_release.py +1 -2
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/product/product_restart.py +8 -1
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/product/product_routes.py +2 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/product/product_signals.py +2 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/product/product_test.py +1 -1
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/product/product_validate.py +132 -31
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/release/release_core.py +7 -1
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/spl/spl_publish.py +16 -3
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/uvl/uvl_utils.py +4 -11
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/version.py +11 -9
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/services/compose.py +10 -1
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/services/context.py +88 -13
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/services/deploy_bundle.py +6 -6
- splent_cli-1.45.0/src/splent_cli/services/editable_refresh.py +129 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/services/marketplace_api.py +11 -1
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/services/neutral_app.py +65 -9
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/services/preflight.py +4 -1
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/services/release.py +42 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/services/spl_store.py +3 -2
- splent_cli-1.45.0/src/splent_cli/services/web_container.py +146 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/product/product_00_core_requirements_dev.sh.j2 +21 -2
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/product/product_00_install_features.sh.j2 +11 -0
- splent_cli-1.45.0/src/splent_cli/templates/product/product_01_compile_assets.sh.j2 +28 -0
- splent_cli-1.45.0/src/splent_cli/templates/product/product_05_0_start_app_dev.sh.j2 +51 -0
- splent_cli-1.45.0/src/splent_cli/templates/product/product_base_template.html +200 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/product/product_docker-compose.dev.yml.j2 +6 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/utils/archetype.py +18 -3
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/utils/ci_workflow.py +20 -1
- splent_cli-1.45.0/src/splent_cli/utils/decorators.py +34 -0
- splent_cli-1.45.0/src/splent_cli/utils/deploy_freshness.py +183 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/utils/dynamic_imports.py +3 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/utils/forge.py +26 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/utils/integrity.py +5 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/utils/io_utils.py +86 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/utils/menu_keys.py +3 -0
- splent_cli-1.45.0/src/splent_cli/utils/running_version.py +94 -0
- splent_cli-1.45.0/src/splent_cli/utils/uvl_diagnosis.py +190 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/utils/uvl_params.py +20 -6
- {splent_cli-1.43.0 → splent_cli-1.45.0/src/splent_cli.egg-info}/PKG-INFO +1 -1
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli.egg-info/SOURCES.txt +3 -0
- splent_cli-1.43.0/src/splent_cli/__init__.py +0 -15
- splent_cli-1.43.0/src/splent_cli/services/web_container.py +0 -69
- splent_cli-1.43.0/src/splent_cli/templates/product/product_01_compile_assets.sh.j2 +0 -16
- splent_cli-1.43.0/src/splent_cli/templates/product/product_05_0_start_app_dev.sh.j2 +0 -18
- splent_cli-1.43.0/src/splent_cli/templates/product/product_base_template.html +0 -163
- splent_cli-1.43.0/src/splent_cli/utils/decorators.py +0 -17
- splent_cli-1.43.0/src/splent_cli/utils/running_version.py +0 -28
- {splent_cli-1.43.0 → splent_cli-1.45.0}/COPYING +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/COPYING.LESSER +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/README.md +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/setup.cfg +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/__main__.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/__init__.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/cache/__init__.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/cache/cache_clear.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/cache/cache_orphans.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/cache/cache_outdated.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/cache/cache_prune.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/cache/cache_size.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/cache/cache_status.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/cache/cache_usage.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/cache/cache_versions.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/check/__init__.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/check/check_contracts.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/check/check_deps.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/check/check_docker.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/check/check_features.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/check/check_github.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/check/check_infra.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/check/check_product.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/check/check_pypi.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/check/check_pyproject.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/check/check_releases.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/check/check_vendor.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/clear/__init__.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/clear/clear_build.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/clear/clear_log.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/command/__init__.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/command/command_create.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/coverage.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/database/db_console.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/database/db_dump.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/database/db_migrate.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/database/db_restore.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/database/db_status.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/env/env_list.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/env/env_show.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/export/__init__.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/export/export_puml.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/feature/feature_add.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/feature/feature_clean.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/feature/feature_clone.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/feature/feature_compile.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/feature/feature_create.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/feature/feature_delete.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/feature/feature_detach.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/feature/feature_discard.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/feature/feature_drift.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/feature/feature_env.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/feature/feature_fork.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/feature/feature_git.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/feature/feature_hook_add.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/feature/feature_hook_remove.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/feature/feature_hooks.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/feature/feature_impact.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/feature/feature_info.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/feature/feature_inject_config.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/feature/feature_install.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/feature/feature_list.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/feature/feature_order.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/feature/feature_outdated.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/feature/feature_pin.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/feature/feature_pip_install.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/feature/feature_pull.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/feature/feature_refine.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/feature/feature_remove.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/feature/feature_search.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/feature/feature_status.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/feature/feature_sync_template.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/feature/feature_translate.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/feature/feature_upgrade.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/feature/feature_versions.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/feature/feature_xray.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/lint.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/locust.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/marketplace/login.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/marketplace/logout.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/marketplace/marketplace_index.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/marketplace/whoami.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/product/__init__.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/product/product_auto_require.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/product/product_clean.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/product/product_configure.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/product/product_containers.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/product/product_deploy.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/product/product_deselect.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/product/product_down.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/product/product_drift.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/product/product_env.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/product/product_logs.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/product/product_missing.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/product/product_params.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/product/product_port.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/product/product_resolve.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/product/product_run.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/product/product_select.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/product/product_shell.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/product/product_sync_template.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/product/product_up.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/release/__init__.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/release/release_resume.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/selenium.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/spl/__init__.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/spl/spl_add_constraints.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/spl/spl_add_feature.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/spl/spl_compare.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/spl/spl_configurations.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/spl/spl_create.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/spl/spl_deps.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/spl/spl_features.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/spl/spl_fetch.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/spl/spl_info.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/spl/spl_list.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/spl/spl_outdated.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/spl/spl_pin.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/spl/spl_remove_feature.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/spl/spl_utils.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/commands/tokens_setup.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/services/__init__.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/services/credentials.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/services/image_registry.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/services/index_refresh.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/services/marketplace.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/services/marketplace_url.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/services/own_commands.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/services/pypi_quota.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/services/registry.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/services/release_dry_run.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/services/release_gate.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/feature/feature_.gitignore.j2 +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/feature/feature_MANIFEST.in.j2 +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/feature/feature_README.md.j2 +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/feature/feature_commands.py.j2 +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/feature/feature_config.py.j2 +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/feature/feature_docker-compose.dev.yml.j2 +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/feature/feature_docker-compose.prod.yml.j2 +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/feature/feature_docker.env.example.j2 +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/feature/feature_forms.py.j2 +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/feature/feature_hooks.py.j2 +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/feature/feature_init.py.j2 +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/feature/feature_init_config.py.j2 +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/feature/feature_init_light.py.j2 +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/feature/feature_init_service.py.j2 +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/feature/feature_migrations_alembic.ini.j2 +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/feature/feature_migrations_env.py.j2 +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/feature/feature_migrations_script.py.mako.j2 +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/feature/feature_models.py.j2 +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/feature/feature_pyproject.toml.j2 +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/feature/feature_pyproject_minimal.toml.j2 +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/feature/feature_repositories.py.j2 +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/feature/feature_routes.py.j2 +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/feature/feature_scripts.js.j2 +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/feature/feature_seeders.py.j2 +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/feature/feature_services.py.j2 +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/feature/feature_services_service.py.j2 +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/feature/feature_signals.py.j2 +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/feature/feature_templates_index.html.j2 +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/feature/feature_tests_conftest.py.j2 +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/feature/feature_tests_e2e.py.j2 +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/feature/feature_tests_functional.py.j2 +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/feature/feature_tests_integration.py.j2 +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/feature/feature_tests_locustfile.py.j2 +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/feature/feature_tests_unit.py.j2 +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/feature/feature_webpack.config.js.j2 +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/licenses/COPYING +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/licenses/COPYING.LESSER +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/product/product_.env.dev.example.j2 +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/product/product_.env.prod.example.j2 +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/product/product_.gitignore.j2 +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/product/product_02_0_db_wait_connection.sh.j2 +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/product/product_02_1_db_create_db_test.sh.j2 +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/product/product_02_2_db_create_splent_migrations.sh.j2 +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/product/product_03_initialize_migrations.sh.j2 +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/product/product_04_handle_migrations.sh.j2 +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/product/product_05_1_start_app_prod.sh.j2 +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/product/product_400.html +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/product/product_401.html +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/product/product_404.html +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/product/product_500.html +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/product/product_Dockerfile.dev.dockerignore.j2 +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/product/product_Dockerfile.dev.j2 +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/product/product_Dockerfile.prod.dockerignore.j2 +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/product/product_Dockerfile.prod.j2 +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/product/product_README.md.j2 +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/product/product_app.css +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/product/product_app.js +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/product/product_ci_upgrade.yml.j2 +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/product/product_ci_validate.yml.j2 +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/product/product_config.py.j2 +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/product/product_docker-compose.prod.yml.j2 +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/product/product_dropzone.css +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/product/product_entrypoint.dev.sh.j2 +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/product/product_entrypoint.prod.sh.j2 +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/product/product_errors.py.j2 +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/product/product_favicon.svg +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/product/product_init.py.j2 +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/product/product_logging.py.j2 +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/product/product_own.css +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/product/product_package.json.j2 +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/product/product_pyproject.toml.j2 +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/templates/product/product_uvl.j2 +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/utils/__init__.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/utils/cache_utils.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/utils/ci_services.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/utils/command_loader.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/utils/contract_freshness.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/utils/db_client.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/utils/db_utils.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/utils/feature_installer.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/utils/feature_naming.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/utils/feature_params.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/utils/feature_requirements.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/utils/feature_resolution.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/utils/feature_utils.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/utils/git_url.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/utils/lifecycle.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/utils/manifest.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/utils/migration_lock.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/utils/path_utils.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/utils/proc.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/utils/redact.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/utils/refinement_facts.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/utils/template_drift.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/utils/toml_edit.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli/utils/upgrade_plan.py +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli.egg-info/dependency_links.txt +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli.egg-info/entry_points.txt +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli.egg-info/requires.txt +0 -0
- {splent_cli-1.43.0 → splent_cli-1.45.0}/src/splent_cli.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"""The SPLENT command-line interface."""
|
|
2
|
+
|
|
3
|
+
import os as _os
|
|
4
|
+
from types import MappingProxyType as _MappingProxyType
|
|
5
|
+
|
|
6
|
+
# What the operator actually exported, taken before anything reads a .env.
|
|
7
|
+
#
|
|
8
|
+
# This must stay the first thing the package does. cli.py runs load_dotenv(),
|
|
9
|
+
# and so do framework modules it imports (path_utils, configuration), which
|
|
10
|
+
# puts every workspace .env key into os.environ before any command runs. Read
|
|
11
|
+
# afterwards, the shell and the file look identical: env:show could never say
|
|
12
|
+
# "not loaded", env:list never showed "·", and the workspace .env passed for
|
|
13
|
+
# shell values and beat the product's docker/.env. Compare against this
|
|
14
|
+
# instead of os.environ whenever the question is "what did the shell export".
|
|
15
|
+
SHELL_ENV = _MappingProxyType(dict(_os.environ))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def _bytecode_away_from_the_working_copies() -> None:
|
|
19
|
+
"""Write root's bytecode outside the workspace.
|
|
20
|
+
|
|
21
|
+
A ``docker exec`` into the CLI's container runs as root unless it says
|
|
22
|
+
``-u``, and root's __pycache__ directories in the working copies of the
|
|
23
|
+
CLI, the framework and the features were the ones the owner's next
|
|
24
|
+
release could not rewrite. Root's go under /tmp instead; everyone else's
|
|
25
|
+
stay where Python puts them. A PYTHONPYCACHEPREFIX already set wins, and
|
|
26
|
+
so does a workspace root itself owns. What the CLI runs (pytest, the
|
|
27
|
+
release build) inherits it through the environment.
|
|
28
|
+
"""
|
|
29
|
+
import sys
|
|
30
|
+
|
|
31
|
+
if sys.pycache_prefix or not hasattr(_os, "geteuid") or _os.geteuid() != 0:
|
|
32
|
+
return
|
|
33
|
+
try:
|
|
34
|
+
owner = _os.stat(_os.environ.get("WORKING_DIR") or "/workspace").st_uid
|
|
35
|
+
except OSError:
|
|
36
|
+
return
|
|
37
|
+
if owner != 0:
|
|
38
|
+
sys.pycache_prefix = "/tmp/splent-root-pycache"
|
|
39
|
+
_os.environ.setdefault("PYTHONPYCACHEPREFIX", sys.pycache_prefix)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
_bytecode_away_from_the_working_copies()
|
|
@@ -5,10 +5,13 @@ import os
|
|
|
5
5
|
import click
|
|
6
6
|
from dotenv import load_dotenv
|
|
7
7
|
|
|
8
|
+
from splent_cli.services import context
|
|
8
9
|
from splent_cli.utils.command_loader import load_commands
|
|
9
10
|
|
|
10
11
|
# From here on os.environ holds the workspace .env as well. What the shell
|
|
11
12
|
# itself exported is splent_cli.SHELL_ENV, taken before this line ran.
|
|
13
|
+
# Nothing exported is replaced, so a SPLENT_APP given to one command beats
|
|
14
|
+
# the selection in the file (context.active_app has the whole rule).
|
|
12
15
|
load_dotenv()
|
|
13
16
|
|
|
14
17
|
|
|
@@ -122,7 +125,7 @@ class SPLENTCLI(click.Group):
|
|
|
122
125
|
app = get_app()
|
|
123
126
|
with app.app_context():
|
|
124
127
|
self._own_cmds_cache = own_commands.collect(
|
|
125
|
-
|
|
128
|
+
context.active_app(), set(self.commands)
|
|
126
129
|
)
|
|
127
130
|
except Exception as e:
|
|
128
131
|
if debug:
|
|
@@ -170,7 +173,7 @@ class SPLENTCLI(click.Group):
|
|
|
170
173
|
"""
|
|
171
174
|
from splent_cli.services import web_container
|
|
172
175
|
|
|
173
|
-
product =
|
|
176
|
+
product = context.active_app()
|
|
174
177
|
if not product or web_container.is_product_container():
|
|
175
178
|
return
|
|
176
179
|
if not web_container.running(web_container.name(product)):
|
|
@@ -196,6 +199,18 @@ class SPLENTCLI(click.Group):
|
|
|
196
199
|
from splent_cli.utils.dynamic_imports import get_app
|
|
197
200
|
from splent_cli.utils.db_utils import check_db_connection
|
|
198
201
|
|
|
202
|
+
# The environment a command that boots the app builds it in when
|
|
203
|
+
# nothing says which (utils.decorators.boots_the_app).
|
|
204
|
+
boot_env = getattr(command, "boot_env", None)
|
|
205
|
+
if boot_env:
|
|
206
|
+
os.environ.setdefault("SPLENT_ENV", boot_env)
|
|
207
|
+
|
|
208
|
+
# For another product than the selection the CLI's container stays
|
|
209
|
+
# on the selection's network (compose.attach_self_to_network), so
|
|
210
|
+
# what reaches this product's services runs where they are.
|
|
211
|
+
if context.is_override():
|
|
212
|
+
self._delegate_to_the_product(ctx)
|
|
213
|
+
|
|
199
214
|
try:
|
|
200
215
|
app = get_app()
|
|
201
216
|
except Exception as exc:
|
|
@@ -205,7 +220,7 @@ class SPLENTCLI(click.Group):
|
|
|
205
220
|
# Only then: where the app builds here, the command runs here
|
|
206
221
|
# with the tools the CLI image has (ruff formats migrations).
|
|
207
222
|
self._delegate_to_the_product(ctx)
|
|
208
|
-
product =
|
|
223
|
+
product = context.active_app() or "The product"
|
|
209
224
|
raise click.ClickException(
|
|
210
225
|
f"{product}'s features need {missing}, which the product's "
|
|
211
226
|
"image installs and the CLI's does not.\n"
|
|
@@ -6,15 +6,18 @@ import os
|
|
|
6
6
|
import sys
|
|
7
7
|
|
|
8
8
|
import click
|
|
9
|
-
import importlib.metadata
|
|
10
9
|
|
|
10
|
+
from splent_cli.services import context
|
|
11
11
|
from splent_cli.services.release_gate import pypi_credentials
|
|
12
12
|
from splent_cli.utils import forge
|
|
13
|
+
from splent_cli.utils.running_version import installed_version
|
|
13
14
|
|
|
14
15
|
|
|
15
16
|
def _pkg_version(name: str) -> str | None:
|
|
17
|
+
# The checkout's version for an editable install, as `splent version`
|
|
18
|
+
# reports it: pip's metadata keeps the version it was installed at.
|
|
16
19
|
try:
|
|
17
|
-
return
|
|
20
|
+
return installed_version(name)
|
|
18
21
|
except Exception:
|
|
19
22
|
return None
|
|
20
23
|
|
|
@@ -61,7 +64,7 @@ def check_env():
|
|
|
61
64
|
_warn(".env file not found in workspace")
|
|
62
65
|
|
|
63
66
|
# SPLENT_APP
|
|
64
|
-
app =
|
|
67
|
+
app = context.active_app(workspace)
|
|
65
68
|
if app:
|
|
66
69
|
app_path = os.path.join(workspace, app)
|
|
67
70
|
if os.path.isdir(app_path):
|
|
@@ -99,7 +99,7 @@ def resolve_uploads_dir(app=None) -> str:
|
|
|
99
99
|
product or its package, anything holding one of them, or a directory with
|
|
100
100
|
code at its top.
|
|
101
101
|
"""
|
|
102
|
-
product =
|
|
102
|
+
product = context.active_app() or ""
|
|
103
103
|
if not product or product in (".", "..") or os.sep in product or "/" in product:
|
|
104
104
|
raise UploadsDirError(f"'{product}' is not a valid product name.")
|
|
105
105
|
|
|
@@ -279,7 +279,7 @@ def clear_uploads(env_dev, env_prod, yes):
|
|
|
279
279
|
click.echo(click.style("Cannot specify both --dev and --prod.", fg="red"))
|
|
280
280
|
raise SystemExit(1)
|
|
281
281
|
env = context.resolve_env(env_dev, env_prod)
|
|
282
|
-
_run_where_the_uploads_are(
|
|
282
|
+
_run_where_the_uploads_are(context.active_app() or "", env, yes)
|
|
283
283
|
|
|
284
284
|
try:
|
|
285
285
|
uploads_dir = resolve_uploads_dir()
|
|
@@ -199,7 +199,7 @@ def db_reset(feature_name, yes):
|
|
|
199
199
|
"""
|
|
200
200
|
app = current_app
|
|
201
201
|
product_path = PathUtils.get_app_base_dir()
|
|
202
|
-
product_name =
|
|
202
|
+
product_name = context.active_app() or ""
|
|
203
203
|
|
|
204
204
|
if feature_name:
|
|
205
205
|
_reset_one_feature(app, feature_name, yes, product_path, product_name)
|
|
@@ -140,7 +140,7 @@ def _downgrade(directory: str, revision: str) -> None:
|
|
|
140
140
|
def db_rollback(feature, steps, to_base, cascade):
|
|
141
141
|
app = current_app
|
|
142
142
|
product_path = PathUtils.get_app_base_dir()
|
|
143
|
-
product_name =
|
|
143
|
+
product_name = context.active_app() or ""
|
|
144
144
|
|
|
145
145
|
if to_base:
|
|
146
146
|
source = click.get_current_context().get_parameter_source("steps")
|
|
@@ -23,7 +23,7 @@ def _resolve_feature_order(features_raw: list[str]) -> list[str]:
|
|
|
23
23
|
feature it refines (the refinement metadata the boot reads), with or
|
|
24
24
|
without a UVL. Features with neither keep their declared order.
|
|
25
25
|
"""
|
|
26
|
-
splent_app =
|
|
26
|
+
splent_app = context.active_app() or ""
|
|
27
27
|
working_dir = os.getenv("WORKING_DIR", "/workspace")
|
|
28
28
|
product_dir = os.path.join(working_dir, splent_app) if splent_app else ""
|
|
29
29
|
|
|
@@ -112,7 +112,7 @@ def _product_seeders(errors):
|
|
|
112
112
|
They are always loaded, also when a single module is seeded, because
|
|
113
113
|
their ``replaces`` decide which feature seeders may run at all.
|
|
114
114
|
"""
|
|
115
|
-
product =
|
|
115
|
+
product = context.active_app()
|
|
116
116
|
if not product:
|
|
117
117
|
return []
|
|
118
118
|
return _load_seeders(f"{product}.seeders", errors, label="product seeders")
|
|
@@ -154,7 +154,7 @@ def get_installed_seeders(specific_module=None):
|
|
|
154
154
|
)
|
|
155
155
|
|
|
156
156
|
targets = _module_names(specific_module) if specific_module else None
|
|
157
|
-
if targets and
|
|
157
|
+
if targets and context.active_app() in targets:
|
|
158
158
|
return product_seeders, errors
|
|
159
159
|
|
|
160
160
|
seeders = []
|
|
@@ -79,7 +79,7 @@ def _mark_without_migrations(
|
|
|
79
79
|
|
|
80
80
|
def _resolve_product():
|
|
81
81
|
"""Return (product_path, product_name) from env."""
|
|
82
|
-
product =
|
|
82
|
+
product = context.active_app() or ""
|
|
83
83
|
product_path = PathUtils.get_app_base_dir()
|
|
84
84
|
return product_path, product
|
|
85
85
|
|
|
@@ -19,6 +19,7 @@ from splent_cli.commands.check.check_product import check_product
|
|
|
19
19
|
from splent_cli.commands.feature.feature_status import feature_status
|
|
20
20
|
from splent_cli.commands.database.db_status import db_status
|
|
21
21
|
from splent_cli.commands.product.product_containers import product_docker
|
|
22
|
+
from splent_cli.services import context
|
|
22
23
|
|
|
23
24
|
|
|
24
25
|
SECTIONS = [
|
|
@@ -74,7 +75,7 @@ def _check_workspace_precondition():
|
|
|
74
75
|
elif not os.path.isdir(wd):
|
|
75
76
|
problems.append(f"WORKING_DIR points to a missing directory: {wd}")
|
|
76
77
|
|
|
77
|
-
app =
|
|
78
|
+
app = context.active_app(workspace)
|
|
78
79
|
if not app:
|
|
79
80
|
problems.append("SPLENT_APP is not set")
|
|
80
81
|
elif not os.path.isdir(os.path.join(workspace, app)):
|
|
@@ -263,3 +263,9 @@ def run_wizard():
|
|
|
263
263
|
break
|
|
264
264
|
else:
|
|
265
265
|
click.secho("Invalid option. Try again.", fg="red")
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
# The group alone. The loader's fallback registers every command it finds in
|
|
269
|
+
# a module, and found the subcommands too, so `splent forge`, `splent pypi`
|
|
270
|
+
# and `splent github` existed as top-level copies of env:set's.
|
|
271
|
+
cli_command = env_set_group
|
|
@@ -3,6 +3,7 @@ import click
|
|
|
3
3
|
from splent_cli.services import context, compose
|
|
4
4
|
from splent_cli.utils.feature_utils import (
|
|
5
5
|
drop_feature_entries,
|
|
6
|
+
entry_matches_feature,
|
|
6
7
|
find_feature_entries,
|
|
7
8
|
hot_reinstall,
|
|
8
9
|
parse_feature_entry,
|
|
@@ -160,10 +161,35 @@ def feature_attach(feature_identifier, version, env_scope):
|
|
|
160
161
|
|
|
161
162
|
attaching = sorted(declared) != sorted(wanted)
|
|
162
163
|
if attaching:
|
|
163
|
-
|
|
164
|
+
# A list that declares the feature keeps it where it is, so a new pin
|
|
165
|
+
# does not move the entry away from its neighbours and its comment
|
|
166
|
+
# to the end of the list (uvlhub's, after each release --attach).
|
|
167
|
+
# Only a list it is new to gets it at the end, and the lists it
|
|
168
|
+
# leaves lose it.
|
|
169
|
+
keep_in_place: dict[str, int] = {}
|
|
170
|
+
for key, entry in declared:
|
|
171
|
+
if key in target_keys:
|
|
172
|
+
at = read_feature_list(data, key).index(entry)
|
|
173
|
+
keep_in_place[key] = min(at, keep_in_place.get(key, at))
|
|
174
|
+
drop_feature_entries(
|
|
175
|
+
data,
|
|
176
|
+
feature_name,
|
|
177
|
+
namespace=namespace_fs,
|
|
178
|
+
keys=tuple(key for key, _ in declared if key not in keep_in_place),
|
|
179
|
+
)
|
|
164
180
|
for key in target_keys:
|
|
165
181
|
features = read_feature_list(data, key)
|
|
166
|
-
|
|
182
|
+
if key in keep_in_place:
|
|
183
|
+
features = [
|
|
184
|
+
entry
|
|
185
|
+
for entry in features
|
|
186
|
+
if not entry_matches_feature(
|
|
187
|
+
entry, feature_name, namespace=namespace_fs
|
|
188
|
+
)
|
|
189
|
+
]
|
|
190
|
+
features.insert(keep_in_place[key], full_name)
|
|
191
|
+
else:
|
|
192
|
+
features.append(full_name)
|
|
167
193
|
write_features_to_data(data, features, key=key)
|
|
168
194
|
|
|
169
195
|
# ── PyPI name, when it is not the feature's own ──────────────────
|
|
@@ -259,14 +259,22 @@ def _parse_pyproject_entry(entry: str) -> tuple[str, str, str | None]:
|
|
|
259
259
|
return ns, name, version or None
|
|
260
260
|
|
|
261
261
|
|
|
262
|
+
def _product_reader(product_dir: str, pyproject_path: str | None = None):
|
|
263
|
+
"""The reader of the product's pyproject.toml, or of PYPROJECT_PATH, a
|
|
264
|
+
candidate pyproject checked in its place (product:validate --pyproject)."""
|
|
265
|
+
from splent_framework.utils.pyproject_reader import PyprojectReader
|
|
266
|
+
|
|
267
|
+
if pyproject_path:
|
|
268
|
+
return PyprojectReader(pyproject_path)
|
|
269
|
+
return PyprojectReader.for_product(product_dir)
|
|
270
|
+
|
|
271
|
+
|
|
262
272
|
def _resolve_all_product_features(
|
|
263
|
-
product_dir: str, workspace: str
|
|
273
|
+
product_dir: str, workspace: str, pyproject_path: str | None = None
|
|
264
274
|
) -> list[tuple[str, Path]]:
|
|
265
275
|
"""Read all features from the product and resolve to (label, path)."""
|
|
266
|
-
from splent_framework.utils.pyproject_reader import PyprojectReader
|
|
267
|
-
|
|
268
276
|
try:
|
|
269
|
-
features_raw =
|
|
277
|
+
features_raw = _product_reader(product_dir, pyproject_path).features
|
|
270
278
|
except FileNotFoundError:
|
|
271
279
|
raise SystemExit("❌ pyproject.toml not found in product.")
|
|
272
280
|
|
|
@@ -435,7 +443,9 @@ def _contract_env(path: Path) -> str | None:
|
|
|
435
443
|
return data.get("tool", {}).get("splent", {}).get("contract", {}).get("env")
|
|
436
444
|
|
|
437
445
|
|
|
438
|
-
def env_scope_findings(
|
|
446
|
+
def env_scope_findings(
|
|
447
|
+
workspace: str, product_dir: str, pyproject_path: str | None = None
|
|
448
|
+
) -> list[dict]:
|
|
439
449
|
"""Features confined to one environment, in a list that installs them in
|
|
440
450
|
the other.
|
|
441
451
|
|
|
@@ -443,9 +453,7 @@ def env_scope_findings(workspace: str, product_dir: str) -> list[dict]:
|
|
|
443
453
|
list the production image installed them too, phpMyAdmin with autologin
|
|
444
454
|
to the database, and nothing said so.
|
|
445
455
|
"""
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
reader = PyprojectReader.for_product(product_dir)
|
|
456
|
+
reader = _product_reader(product_dir, pyproject_path)
|
|
449
457
|
lists = {
|
|
450
458
|
"features": reader.features,
|
|
451
459
|
"features_dev": reader.features_dev,
|
|
@@ -501,7 +509,9 @@ def _joins_the_shared_network(compose_file: Path) -> bool:
|
|
|
501
509
|
return "SPLENT_NETWORK" not in str(spec.get("name", ""))
|
|
502
510
|
|
|
503
511
|
|
|
504
|
-
def network_findings(
|
|
512
|
+
def network_findings(
|
|
513
|
+
workspace: str, product_dir: str, pyproject_path: str | None = None
|
|
514
|
+
) -> list[dict]:
|
|
505
515
|
"""Feature services the product cannot reach.
|
|
506
516
|
|
|
507
517
|
Each product has a network of its own, and a feature's services join it
|
|
@@ -509,9 +519,7 @@ def network_findings(workspace: str, product_dir: str) -> list[dict]:
|
|
|
509
519
|
instead, so the app could not send mail to Mailhog and phpMyAdmin could
|
|
510
520
|
not reach the database, and nothing said why.
|
|
511
521
|
"""
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
reader = PyprojectReader.for_product(product_dir)
|
|
522
|
+
reader = _product_reader(product_dir, pyproject_path)
|
|
515
523
|
findings = []
|
|
516
524
|
for entry in reader.features + reader.features_dev + reader.features_prod:
|
|
517
525
|
ns, name, version = _parse_pyproject_entry(entry)
|
|
@@ -537,14 +545,14 @@ def network_findings(workspace: str, product_dir: str) -> list[dict]:
|
|
|
537
545
|
return findings
|
|
538
546
|
|
|
539
547
|
|
|
540
|
-
def naming_findings(
|
|
548
|
+
def naming_findings(
|
|
549
|
+
workspace: str, product_dir: str, pyproject_path: str | None = None
|
|
550
|
+
) -> list[dict]:
|
|
541
551
|
"""Features named after a product (auth_uvlhub). A warning, so the debt
|
|
542
552
|
shows in every validation until the product drops them."""
|
|
543
|
-
from splent_framework.utils.pyproject_reader import PyprojectReader
|
|
544
|
-
|
|
545
553
|
from splent_cli.utils.feature_naming import product_suffix, product_suffix_message
|
|
546
554
|
|
|
547
|
-
reader =
|
|
555
|
+
reader = _product_reader(product_dir, pyproject_path)
|
|
548
556
|
findings = []
|
|
549
557
|
for entry in reader.features + reader.features_dev + reader.features_prod:
|
|
550
558
|
_, name, _ = _parse_pyproject_entry(entry)
|
|
@@ -688,16 +696,14 @@ def version_floor_findings(labeled_paths: list[tuple[str, Path]]) -> list[dict]:
|
|
|
688
696
|
|
|
689
697
|
|
|
690
698
|
def _environment_only_features(
|
|
691
|
-
product_dir: str, workspace: str, env: str | None
|
|
699
|
+
product_dir: str, workspace: str, env: str | None, pyproject_path: str | None = None
|
|
692
700
|
) -> list[tuple[str, Path]]:
|
|
693
701
|
"""The features ``features_<env>`` adds to the base list, resolved."""
|
|
694
|
-
from splent_framework.utils.pyproject_reader import PyprojectReader
|
|
695
|
-
|
|
696
702
|
env = context.normalize_env(env)
|
|
697
703
|
if not env:
|
|
698
704
|
return []
|
|
699
705
|
try:
|
|
700
|
-
reader =
|
|
706
|
+
reader = _product_reader(product_dir, pyproject_path)
|
|
701
707
|
base = set(reader.features)
|
|
702
708
|
extra = [e for e in reader.features_for_env(env) if e not in base]
|
|
703
709
|
except (FileNotFoundError, ValueError):
|
|
@@ -706,7 +712,10 @@ def _environment_only_features(
|
|
|
706
712
|
|
|
707
713
|
|
|
708
714
|
def run_all_product_check(
|
|
709
|
-
workspace: str,
|
|
715
|
+
workspace: str,
|
|
716
|
+
product_dir: str,
|
|
717
|
+
env: str | None = None,
|
|
718
|
+
pyproject_path: str | None = None,
|
|
710
719
|
) -> list[dict]:
|
|
711
720
|
"""Run the full product compatibility check. Returns findings list.
|
|
712
721
|
|
|
@@ -714,9 +723,13 @@ def run_all_product_check(
|
|
|
714
723
|
floors are checked across the features the product loads in ``env``
|
|
715
724
|
(SPLENT_ENV when None, ``dev`` when that is unset too), base plus
|
|
716
725
|
``features_dev`` or ``features_prod``, the selection phase 1 checks.
|
|
726
|
+
``pyproject_path`` names a candidate pyproject to read the features
|
|
727
|
+
from instead of the product's.
|
|
717
728
|
"""
|
|
718
729
|
try:
|
|
719
|
-
labeled_paths = _resolve_all_product_features(
|
|
730
|
+
labeled_paths = _resolve_all_product_features(
|
|
731
|
+
product_dir, workspace, pyproject_path
|
|
732
|
+
)
|
|
720
733
|
except SystemExit:
|
|
721
734
|
return []
|
|
722
735
|
if not labeled_paths:
|
|
@@ -725,7 +738,8 @@ def run_all_product_check(
|
|
|
725
738
|
env = os.getenv("SPLENT_ENV") or "dev"
|
|
726
739
|
labeled_contracts = [(lbl, _read_contract(path)) for lbl, path in labeled_paths]
|
|
727
740
|
findings = _analyse_all(labeled_contracts) + version_floor_findings(
|
|
728
|
-
labeled_paths
|
|
741
|
+
labeled_paths
|
|
742
|
+
+ _environment_only_features(product_dir, workspace, env, pyproject_path)
|
|
729
743
|
)
|
|
730
744
|
return sorted(findings, key=lambda f: SEVERITY_ORDER[f["severity"]])
|
|
731
745
|
|
|
@@ -21,6 +21,7 @@ from pathlib import Path
|
|
|
21
21
|
|
|
22
22
|
from splent_cli.services import context
|
|
23
23
|
from splent_cli.commands.feature.feature_release import (
|
|
24
|
+
_interactive,
|
|
24
25
|
infer_contract,
|
|
25
26
|
merge_preserved,
|
|
26
27
|
requirement_problems,
|
|
@@ -341,8 +342,16 @@ def _print_diff(current: dict, inferred: dict) -> bool:
|
|
|
341
342
|
is_flag=True,
|
|
342
343
|
help="Write the inferred contract to pyproject.toml (default: dry-run only).",
|
|
343
344
|
)
|
|
345
|
+
@click.option(
|
|
346
|
+
"--inject-config/--no-inject-config",
|
|
347
|
+
"inject_config",
|
|
348
|
+
default=None,
|
|
349
|
+
help="With --write, run feature:inject-config when config.py is missing or "
|
|
350
|
+
"lacks a variable, without asking. Without a terminal and without either "
|
|
351
|
+
"flag it is not run.",
|
|
352
|
+
)
|
|
344
353
|
@context.requires_product
|
|
345
|
-
def feature_contract(feature_ref, write):
|
|
354
|
+
def feature_contract(feature_ref, write, inject_config):
|
|
346
355
|
"""
|
|
347
356
|
Infer the feature contract from source code at any time during development.
|
|
348
357
|
|
|
@@ -362,6 +371,12 @@ def feature_contract(feature_ref, write):
|
|
|
362
371
|
which a product's config.py may set. The keys of Flask, the framework,
|
|
363
372
|
the extensions it sets up and other features are left out.
|
|
364
373
|
|
|
374
|
+
\b
|
|
375
|
+
When --write finds config.py missing, or missing a variable the feature
|
|
376
|
+
reads, it offers feature:inject-config. --inject-config runs it without
|
|
377
|
+
asking and --no-inject-config never does; without a terminal and
|
|
378
|
+
without either flag it is not run, and the command says how to run it.
|
|
379
|
+
|
|
365
380
|
\b
|
|
366
381
|
FEATURE_REF is a short name (notes), a package name
|
|
367
382
|
(splent_feature_notes), either one under a namespace (splent-io/notes),
|
|
@@ -482,7 +497,7 @@ def feature_contract(feature_ref, write):
|
|
|
482
497
|
click.secho(" ✅ Contract written to pyproject.toml.", fg="green")
|
|
483
498
|
|
|
484
499
|
# Check if config.py needs updating
|
|
485
|
-
_check_config_py(cache_path, ns, name, inferred)
|
|
500
|
+
_check_config_py(cache_path, ns, name, inferred, inject_config)
|
|
486
501
|
|
|
487
502
|
# And whether the settings it reads are declared where a product looks
|
|
488
503
|
_check_declared_config(cache_path, inferred)
|
|
@@ -637,8 +652,29 @@ def _report_params(feature_path, name):
|
|
|
637
652
|
)
|
|
638
653
|
|
|
639
654
|
|
|
640
|
-
def
|
|
641
|
-
"""
|
|
655
|
+
def _wants_inject_config(question: str, name: str, inject: bool | None) -> bool:
|
|
656
|
+
"""Whether to run feature:inject-config: the flag when one was given,
|
|
657
|
+
else the answer to QUESTION. Without a terminal nobody can answer, and
|
|
658
|
+
click.confirm aborted the whole command after the contract was written,
|
|
659
|
+
so it is not asked and not run."""
|
|
660
|
+
if inject is not None:
|
|
661
|
+
return inject
|
|
662
|
+
if not _interactive():
|
|
663
|
+
click.secho(
|
|
664
|
+
f" Not asked without a terminal. Run 'splent feature:inject-config "
|
|
665
|
+
f"{name}', or pass --inject-config.",
|
|
666
|
+
dim=True,
|
|
667
|
+
)
|
|
668
|
+
return False
|
|
669
|
+
return click.confirm(question, default=True)
|
|
670
|
+
|
|
671
|
+
|
|
672
|
+
def _check_config_py(feature_path, ns, name, inferred, inject=None):
|
|
673
|
+
"""Warn if config.py is missing or stale relative to the inferred contract.
|
|
674
|
+
|
|
675
|
+
``inject`` is --inject-config (True), --no-inject-config (False) or
|
|
676
|
+
neither (None), see :func:`_wants_inject_config`.
|
|
677
|
+
"""
|
|
642
678
|
from splent_cli.commands.feature.feature_inject_config import (
|
|
643
679
|
_is_regenerable,
|
|
644
680
|
read_config_env_vars,
|
|
@@ -660,8 +696,8 @@ def _check_config_py(feature_path, ns, name, inferred):
|
|
|
660
696
|
f" ⚠ config.py not found — {len(env_vars)} env var(s) detected but not injected into app.config.",
|
|
661
697
|
fg="yellow",
|
|
662
698
|
)
|
|
663
|
-
if
|
|
664
|
-
" Run feature:inject-config to generate it?",
|
|
699
|
+
if _wants_inject_config(
|
|
700
|
+
" Run feature:inject-config to generate it?", name, inject
|
|
665
701
|
):
|
|
666
702
|
from splent_cli.commands.feature.feature_inject_config import (
|
|
667
703
|
feature_inject_config,
|
|
@@ -691,7 +727,9 @@ def _check_config_py(feature_path, ns, name, inferred):
|
|
|
691
727
|
dim=True,
|
|
692
728
|
)
|
|
693
729
|
return
|
|
694
|
-
if
|
|
730
|
+
if _wants_inject_config(
|
|
731
|
+
" Run feature:inject-config to update it?", name, inject
|
|
732
|
+
):
|
|
695
733
|
from splent_cli.commands.feature.feature_inject_config import (
|
|
696
734
|
feature_inject_config,
|
|
697
735
|
)
|