splent-cli 1.44.0__tar.gz → 1.46.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.44.0/src/splent_cli.egg-info → splent_cli-1.46.0}/PKG-INFO +1 -1
- {splent_cli-1.44.0 → splent_cli-1.46.0}/pyproject.toml +1 -1
- splent_cli-1.46.0/src/splent_cli/__init__.py +42 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/cli.py +6 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/check/check_env.py +4 -2
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/env/env_set.py +6 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/feature/feature_attach.py +28 -2
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/feature/feature_compat.py +37 -23
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/feature/feature_compile.py +172 -11
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/feature/feature_contract.py +45 -7
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/feature/feature_create.py +58 -4
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/feature/feature_drift.py +6 -4
- splent_cli-1.46.0/src/splent_cli/commands/feature/feature_frontend_init.py +311 -0
- splent_cli-1.46.0/src/splent_cli/commands/feature/feature_npm.py +80 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/feature/feature_release.py +306 -29
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/feature/feature_sync_template.py +7 -4
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/feature/feature_test.py +6 -61
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/feature/feature_unlock.py +35 -2
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/marketplace/marketplace_auth_utils.py +33 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/product/product_build.py +9 -4
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/product/product_config.py +2 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/product/product_console.py +2 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/product/product_derive.py +34 -1
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/product/product_restart.py +8 -1
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/product/product_routes.py +2 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/product/product_signals.py +2 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/product/product_validate.py +132 -31
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/release/release_core.py +7 -1
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/spl/spl_publish.py +16 -3
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/version.py +10 -8
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/services/deploy_bundle.py +6 -6
- splent_cli-1.46.0/src/splent_cli/services/editable_refresh.py +129 -0
- splent_cli-1.46.0/src/splent_cli/services/frontend.py +871 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/services/marketplace_api.py +11 -1
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/services/neutral_app.py +65 -9
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/services/preflight.py +4 -1
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/services/release.py +42 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/services/release_dry_run.py +120 -5
- splent_cli-1.46.0/src/splent_cli/services/web_container.py +146 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/feature/feature_.gitignore.j2 +12 -3
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/feature/feature_MANIFEST.in.j2 +15 -3
- splent_cli-1.46.0/src/splent_cli/templates/feature/feature_frontend.npmrc.j2 +9 -0
- splent_cli-1.46.0/src/splent_cli/templates/feature/feature_frontend_scripts.js.j2 +15 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/product/product_00_core_requirements_dev.sh.j2 +21 -2
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/product/product_00_install_features.sh.j2 +11 -0
- splent_cli-1.46.0/src/splent_cli/templates/product/product_01_compile_assets.sh.j2 +28 -0
- splent_cli-1.46.0/src/splent_cli/templates/product/product_05_0_start_app_dev.sh.j2 +51 -0
- splent_cli-1.46.0/src/splent_cli/templates/product/product_base_template.html +207 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/product/product_docker-compose.dev.yml.j2 +6 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/utils/archetype.py +18 -3
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/utils/ci_workflow.py +17 -0
- splent_cli-1.46.0/src/splent_cli/utils/decorators.py +34 -0
- splent_cli-1.46.0/src/splent_cli/utils/deploy_freshness.py +183 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/utils/forge.py +26 -0
- splent_cli-1.46.0/src/splent_cli/utils/frontend_licenses.py +296 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/utils/integrity.py +5 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/utils/io_utils.py +86 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/utils/menu_keys.py +3 -0
- splent_cli-1.46.0/src/splent_cli/utils/running_version.py +94 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/utils/template_drift.py +24 -1
- splent_cli-1.46.0/src/splent_cli/utils/uvl_diagnosis.py +190 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/utils/uvl_params.py +20 -6
- {splent_cli-1.44.0 → splent_cli-1.46.0/src/splent_cli.egg-info}/PKG-INFO +1 -1
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli.egg-info/SOURCES.txt +9 -0
- splent_cli-1.44.0/src/splent_cli/__init__.py +0 -15
- splent_cli-1.44.0/src/splent_cli/services/web_container.py +0 -69
- splent_cli-1.44.0/src/splent_cli/templates/product/product_01_compile_assets.sh.j2 +0 -16
- splent_cli-1.44.0/src/splent_cli/templates/product/product_05_0_start_app_dev.sh.j2 +0 -18
- splent_cli-1.44.0/src/splent_cli/templates/product/product_base_template.html +0 -163
- splent_cli-1.44.0/src/splent_cli/utils/decorators.py +0 -17
- splent_cli-1.44.0/src/splent_cli/utils/running_version.py +0 -28
- {splent_cli-1.44.0 → splent_cli-1.46.0}/COPYING +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/COPYING.LESSER +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/README.md +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/setup.cfg +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/__main__.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/__init__.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/cache/__init__.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/cache/cache_clear.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/cache/cache_orphans.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/cache/cache_outdated.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/cache/cache_prune.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/cache/cache_size.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/cache/cache_status.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/cache/cache_usage.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/cache/cache_versions.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/check/__init__.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/check/check_contracts.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/check/check_deps.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/check/check_docker.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/check/check_features.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/check/check_github.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/check/check_infra.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/check/check_product.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/check/check_pypi.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/check/check_pyproject.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/check/check_releases.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/check/check_vendor.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/clear/__init__.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/clear/clear_build.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/clear/clear_log.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/clear/clear_uploads.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/command/__init__.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/command/command_create.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/coverage.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/database/db_console.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/database/db_dump.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/database/db_migrate.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/database/db_reset.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/database/db_restore.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/database/db_rollback.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/database/db_seed.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/database/db_status.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/database/db_upgrade.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/doctor.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/env/env_list.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/env/env_show.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/export/__init__.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/export/export_puml.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/feature/feature_add.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/feature/feature_clean.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/feature/feature_clone.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/feature/feature_delete.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/feature/feature_detach.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/feature/feature_discard.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/feature/feature_env.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/feature/feature_fork.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/feature/feature_git.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/feature/feature_hook_add.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/feature/feature_hook_remove.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/feature/feature_hooks.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/feature/feature_impact.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/feature/feature_info.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/feature/feature_inject_config.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/feature/feature_install.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/feature/feature_list.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/feature/feature_order.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/feature/feature_outdated.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/feature/feature_pin.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/feature/feature_pip_install.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/feature/feature_pull.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/feature/feature_refine.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/feature/feature_remove.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/feature/feature_rename.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/feature/feature_search.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/feature/feature_status.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/feature/feature_translate.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/feature/feature_upgrade.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/feature/feature_versions.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/feature/feature_xray.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/lint.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/locust.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/marketplace/login.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/marketplace/logout.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/marketplace/marketplace_index.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/marketplace/whoami.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/product/__init__.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/product/product_auto_require.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/product/product_clean.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/product/product_commands.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/product/product_configure.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/product/product_containers.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/product/product_create.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/product/product_deploy.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/product/product_deselect.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/product/product_down.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/product/product_drift.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/product/product_env.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/product/product_list.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/product/product_logs.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/product/product_missing.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/product/product_params.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/product/product_port.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/product/product_release.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/product/product_resolve.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/product/product_run.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/product/product_select.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/product/product_shell.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/product/product_sync_template.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/product/product_test.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/product/product_up.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/release/__init__.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/release/release_resume.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/selenium.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/spl/__init__.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/spl/spl_add_constraints.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/spl/spl_add_feature.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/spl/spl_compare.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/spl/spl_configurations.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/spl/spl_create.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/spl/spl_deps.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/spl/spl_features.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/spl/spl_fetch.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/spl/spl_info.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/spl/spl_list.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/spl/spl_outdated.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/spl/spl_pin.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/spl/spl_remove_feature.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/spl/spl_utils.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/tokens_setup.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/commands/uvl/uvl_utils.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/services/__init__.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/services/compose.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/services/context.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/services/credentials.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/services/image_registry.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/services/index_refresh.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/services/marketplace.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/services/marketplace_url.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/services/own_commands.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/services/pypi_quota.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/services/registry.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/services/release_gate.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/services/spl_store.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/feature/feature_README.md.j2 +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/feature/feature_commands.py.j2 +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/feature/feature_config.py.j2 +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/feature/feature_docker-compose.dev.yml.j2 +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/feature/feature_docker-compose.prod.yml.j2 +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/feature/feature_docker.env.example.j2 +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/feature/feature_forms.py.j2 +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/feature/feature_hooks.py.j2 +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/feature/feature_init.py.j2 +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/feature/feature_init_config.py.j2 +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/feature/feature_init_light.py.j2 +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/feature/feature_init_service.py.j2 +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/feature/feature_migrations_alembic.ini.j2 +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/feature/feature_migrations_env.py.j2 +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/feature/feature_migrations_script.py.mako.j2 +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/feature/feature_models.py.j2 +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/feature/feature_pyproject.toml.j2 +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/feature/feature_pyproject_minimal.toml.j2 +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/feature/feature_repositories.py.j2 +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/feature/feature_routes.py.j2 +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/feature/feature_scripts.js.j2 +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/feature/feature_seeders.py.j2 +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/feature/feature_services.py.j2 +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/feature/feature_services_service.py.j2 +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/feature/feature_signals.py.j2 +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/feature/feature_templates_index.html.j2 +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/feature/feature_tests_conftest.py.j2 +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/feature/feature_tests_e2e.py.j2 +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/feature/feature_tests_functional.py.j2 +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/feature/feature_tests_integration.py.j2 +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/feature/feature_tests_locustfile.py.j2 +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/feature/feature_tests_unit.py.j2 +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/feature/feature_webpack.config.js.j2 +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/licenses/COPYING +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/licenses/COPYING.LESSER +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/product/product_.env.dev.example.j2 +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/product/product_.env.prod.example.j2 +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/product/product_.gitignore.j2 +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/product/product_02_0_db_wait_connection.sh.j2 +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/product/product_02_1_db_create_db_test.sh.j2 +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/product/product_02_2_db_create_splent_migrations.sh.j2 +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/product/product_03_initialize_migrations.sh.j2 +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/product/product_04_handle_migrations.sh.j2 +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/product/product_05_1_start_app_prod.sh.j2 +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/product/product_400.html +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/product/product_401.html +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/product/product_404.html +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/product/product_500.html +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/product/product_Dockerfile.dev.dockerignore.j2 +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/product/product_Dockerfile.dev.j2 +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/product/product_Dockerfile.prod.dockerignore.j2 +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/product/product_Dockerfile.prod.j2 +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/product/product_README.md.j2 +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/product/product_app.css +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/product/product_app.js +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/product/product_ci_upgrade.yml.j2 +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/product/product_ci_validate.yml.j2 +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/product/product_config.py.j2 +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/product/product_docker-compose.prod.yml.j2 +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/product/product_dropzone.css +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/product/product_entrypoint.dev.sh.j2 +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/product/product_entrypoint.prod.sh.j2 +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/product/product_errors.py.j2 +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/product/product_favicon.svg +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/product/product_init.py.j2 +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/product/product_logging.py.j2 +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/product/product_own.css +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/product/product_package.json.j2 +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/product/product_pyproject.toml.j2 +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/templates/product/product_uvl.j2 +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/utils/__init__.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/utils/cache_utils.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/utils/ci_services.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/utils/command_loader.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/utils/contract_freshness.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/utils/db_client.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/utils/db_utils.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/utils/dynamic_imports.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/utils/feature_installer.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/utils/feature_naming.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/utils/feature_params.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/utils/feature_requirements.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/utils/feature_resolution.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/utils/feature_utils.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/utils/git_url.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/utils/lifecycle.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/utils/manifest.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/utils/migration_lock.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/utils/path_utils.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/utils/proc.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/utils/redact.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/utils/refinement_facts.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/utils/toml_edit.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli/utils/upgrade_plan.py +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli.egg-info/dependency_links.txt +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli.egg-info/entry_points.txt +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.0}/src/splent_cli.egg-info/requires.txt +0 -0
- {splent_cli-1.44.0 → splent_cli-1.46.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()
|
|
@@ -199,6 +199,12 @@ class SPLENTCLI(click.Group):
|
|
|
199
199
|
from splent_cli.utils.dynamic_imports import get_app
|
|
200
200
|
from splent_cli.utils.db_utils import check_db_connection
|
|
201
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
|
+
|
|
202
208
|
# For another product than the selection the CLI's container stays
|
|
203
209
|
# on the selection's network (compose.attach_self_to_network), so
|
|
204
210
|
# what reaches this product's services runs where they are.
|
|
@@ -6,16 +6,18 @@ import os
|
|
|
6
6
|
import sys
|
|
7
7
|
|
|
8
8
|
import click
|
|
9
|
-
import importlib.metadata
|
|
10
9
|
|
|
11
10
|
from splent_cli.services import context
|
|
12
11
|
from splent_cli.services.release_gate import pypi_credentials
|
|
13
12
|
from splent_cli.utils import forge
|
|
13
|
+
from splent_cli.utils.running_version import installed_version
|
|
14
14
|
|
|
15
15
|
|
|
16
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.
|
|
17
19
|
try:
|
|
18
|
-
return
|
|
20
|
+
return installed_version(name)
|
|
19
21
|
except Exception:
|
|
20
22
|
return None
|
|
21
23
|
|
|
@@ -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
|
|
|
@@ -6,7 +6,7 @@ import subprocess
|
|
|
6
6
|
|
|
7
7
|
import click
|
|
8
8
|
|
|
9
|
-
from splent_cli.services import compose, context
|
|
9
|
+
from splent_cli.services import compose, context, frontend
|
|
10
10
|
from splent_cli.utils.proc import run
|
|
11
11
|
from splent_cli.utils.feature_utils import (
|
|
12
12
|
get_features_from_pyproject,
|
|
@@ -196,17 +196,67 @@ def webpack_container(product: str, env: str, workspace: str) -> tuple[str | Non
|
|
|
196
196
|
"assets/dist, and fail when the feature has nothing to build. "
|
|
197
197
|
"feature:release runs it.",
|
|
198
198
|
)
|
|
199
|
-
|
|
199
|
+
@click.option(
|
|
200
|
+
"--verify",
|
|
201
|
+
is_flag=True,
|
|
202
|
+
help="Build nothing: check that assets/meta/manifest.json matches the "
|
|
203
|
+
"files of assets/dist and the lock, for each feature with frontend/.",
|
|
204
|
+
)
|
|
205
|
+
def feature_compile(feature_name, watch, env_dev, env_prod, release_build, verify):
|
|
200
206
|
if release_build and watch:
|
|
201
207
|
raise click.UsageError("--release builds the bundle once; drop --watch.")
|
|
208
|
+
if verify and (watch or release_build):
|
|
209
|
+
raise click.UsageError("--verify builds nothing; drop --watch and --release.")
|
|
202
210
|
production = (
|
|
203
211
|
os.getenv("FLASK_ENV", "develop") == "production" or env_prod or release_build
|
|
204
212
|
)
|
|
213
|
+
workspace = str(context.workspace())
|
|
205
214
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
)
|
|
215
|
+
# A feature with frontend/ of its own builds in the SPLENT toolchain and
|
|
216
|
+
# needs no product at all, so naming one is enough.
|
|
217
|
+
if feature_name and _frontend_root(workspace, _feature_ref(feature_name)):
|
|
218
|
+
features = [_feature_ref(feature_name)]
|
|
219
|
+
else:
|
|
220
|
+
features = (
|
|
221
|
+
[_feature_ref(feature_name)]
|
|
222
|
+
if feature_name
|
|
223
|
+
else get_features_from_pyproject()
|
|
224
|
+
)
|
|
225
|
+
|
|
226
|
+
if verify:
|
|
227
|
+
raise SystemExit(_verify_features(features, workspace))
|
|
228
|
+
|
|
229
|
+
frontend_features = [f for f in features if _frontend_root(workspace, f)]
|
|
230
|
+
legacy_features = [f for f in features if f not in frontend_features]
|
|
231
|
+
failed = [
|
|
232
|
+
feature
|
|
233
|
+
for feature in frontend_features
|
|
234
|
+
if not _compile_frontend(
|
|
235
|
+
_frontend_root(workspace, feature),
|
|
236
|
+
feature,
|
|
237
|
+
watch=watch,
|
|
238
|
+
production=production,
|
|
239
|
+
release_build=release_build,
|
|
240
|
+
)
|
|
241
|
+
]
|
|
242
|
+
|
|
243
|
+
if legacy_features:
|
|
244
|
+
failed += _compile_legacy(
|
|
245
|
+
legacy_features, watch, production, env_dev, env_prod, release_build
|
|
246
|
+
)
|
|
247
|
+
if failed and not watch:
|
|
248
|
+
click.secho(
|
|
249
|
+
f"Compilation failed for {len(failed)} feature(s): {', '.join(failed)}",
|
|
250
|
+
fg="red",
|
|
251
|
+
err=True,
|
|
252
|
+
)
|
|
253
|
+
raise SystemExit(1)
|
|
209
254
|
|
|
255
|
+
|
|
256
|
+
def _compile_legacy(features, watch, production, env_dev, env_prod, release_build):
|
|
257
|
+
"""Compile features without frontend/ (legacy mode): their own
|
|
258
|
+
webpack.config.js, run in the product's web container against the
|
|
259
|
+
product's node_modules. The features that failed."""
|
|
210
260
|
env = context.resolve_env(env_dev, env_prod)
|
|
211
261
|
product = context.require_app()
|
|
212
262
|
workspace = str(context.workspace())
|
|
@@ -218,7 +268,7 @@ def feature_compile(feature_name, watch, env_dev, env_prod, release_build):
|
|
|
218
268
|
# Every feature is attempted, so one run reports every broken bundle, and
|
|
219
269
|
# the exit code then says whether any failed: the production Dockerfile
|
|
220
270
|
# chains `splent feature:compile && ...` and must stop on a failure.
|
|
221
|
-
|
|
271
|
+
return [
|
|
222
272
|
feature
|
|
223
273
|
for feature in features
|
|
224
274
|
if not _compile_in_container(
|
|
@@ -232,13 +282,124 @@ def feature_compile(feature_name, watch, env_dev, env_prod, release_build):
|
|
|
232
282
|
release_build=release_build,
|
|
233
283
|
)
|
|
234
284
|
]
|
|
235
|
-
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
def _split_ref(feature: str) -> tuple[str, str, str | None]:
|
|
288
|
+
"""``(namespace, name, version)`` of a feature ref, splent_io by default."""
|
|
289
|
+
parts = feature.split("/")
|
|
290
|
+
if len(parts) == 2:
|
|
291
|
+
org_raw, name_version = parts
|
|
292
|
+
org_safe = normalize_namespace(org_raw)
|
|
293
|
+
else:
|
|
294
|
+
org_safe, name_version = "splent_io", parts[0]
|
|
295
|
+
base_name, _, version = name_version.partition("@")
|
|
296
|
+
return org_safe, base_name, version or None
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
def _frontend_root(workspace: str, feature: str) -> str | None:
|
|
300
|
+
"""The working copy at the workspace root of an unpinned FEATURE when it
|
|
301
|
+
has frontend/ of its own, else None. A pinned one is never compiled."""
|
|
302
|
+
_, base_name, version = _split_ref(feature)
|
|
303
|
+
if version:
|
|
304
|
+
return None
|
|
305
|
+
root = os.path.join(workspace, base_name)
|
|
306
|
+
return root if frontend.declares(root) else None
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
def _compile_frontend(root, feature, *, watch, production, release_build) -> bool:
|
|
310
|
+
"""Build one feature's frontend/ in the SPLENT toolchain. False only
|
|
311
|
+
when the build failed or could not run.
|
|
312
|
+
|
|
313
|
+
Inside the product's web container there is no Docker daemon to run the
|
|
314
|
+
toolchain in. Its startup script compiles every feature with --watch,
|
|
315
|
+
and a feature with frontend/ is left to the CLI there, with a note.
|
|
316
|
+
"""
|
|
317
|
+
namespace, base_name, _ = _split_ref(feature)
|
|
318
|
+
if _is_product_container() and not release_build:
|
|
236
319
|
click.secho(
|
|
237
|
-
f"
|
|
238
|
-
|
|
239
|
-
|
|
320
|
+
f" {feature} builds in the SPLENT toolchain, not in this container: "
|
|
321
|
+
f"run splent feature:compile {base_name} --watch from the CLI.",
|
|
322
|
+
fg="bright_black",
|
|
240
323
|
)
|
|
241
|
-
|
|
324
|
+
return True
|
|
325
|
+
|
|
326
|
+
mode = "production" if production else "development"
|
|
327
|
+
click.echo(
|
|
328
|
+
click.style(f"🚀 Compiling {feature} in the SPLENT toolchain...", fg="cyan")
|
|
329
|
+
)
|
|
330
|
+
try:
|
|
331
|
+
image = frontend.ensure_toolchain()
|
|
332
|
+
frontend.install(root, image=image, force=release_build)
|
|
333
|
+
result = frontend.build(
|
|
334
|
+
root,
|
|
335
|
+
namespace,
|
|
336
|
+
base_name,
|
|
337
|
+
mode=mode,
|
|
338
|
+
watch=watch and not production,
|
|
339
|
+
image=image,
|
|
340
|
+
)
|
|
341
|
+
except click.ClickException as e:
|
|
342
|
+
click.secho(f"❌ Error compiling {feature}: {e.format_message()}", fg="red")
|
|
343
|
+
return False
|
|
344
|
+
if watch and not production:
|
|
345
|
+
if result.returncode != 0:
|
|
346
|
+
click.secho(
|
|
347
|
+
f"❌ The watch container of {feature} did not start:\n"
|
|
348
|
+
f"{(result.stderr or '').strip()}",
|
|
349
|
+
fg="red",
|
|
350
|
+
)
|
|
351
|
+
return False
|
|
352
|
+
name = frontend.watch_container(base_name)
|
|
353
|
+
click.echo(click.style(f"👀 Watching {feature} in {mode} mode...", fg="blue"))
|
|
354
|
+
click.echo(
|
|
355
|
+
click.style(
|
|
356
|
+
f" log: docker logs -f {name} stop: docker stop {name}",
|
|
357
|
+
fg="bright_black",
|
|
358
|
+
)
|
|
359
|
+
)
|
|
360
|
+
return True
|
|
361
|
+
if result.returncode != 0:
|
|
362
|
+
click.secho(f"❌ Error compiling {feature}: the build failed", fg="red")
|
|
363
|
+
return False
|
|
364
|
+
click.echo(
|
|
365
|
+
click.style(f"✅ Successfully compiled {feature} in {mode} mode!", fg="green")
|
|
366
|
+
)
|
|
367
|
+
return True
|
|
368
|
+
|
|
369
|
+
|
|
370
|
+
def _verify_features(features, workspace: str) -> int:
|
|
371
|
+
"""feature:compile --verify: 1 when the manifest of any feature with
|
|
372
|
+
frontend/ does not match its files, else 0. A pinned feature is checked
|
|
373
|
+
in the copy the product links, which is what its app serves."""
|
|
374
|
+
failed = 0
|
|
375
|
+
for feature in features:
|
|
376
|
+
namespace, base_name, version = _split_ref(feature)
|
|
377
|
+
if version:
|
|
378
|
+
product = context.require_app()
|
|
379
|
+
root = os.path.join(
|
|
380
|
+
workspace, product, "features", namespace, f"{base_name}@{version}"
|
|
381
|
+
)
|
|
382
|
+
else:
|
|
383
|
+
root = os.path.join(workspace, base_name)
|
|
384
|
+
if not frontend.declares(root):
|
|
385
|
+
click.echo(
|
|
386
|
+
click.style(
|
|
387
|
+
f" {feature} has no frontend/, nothing to verify.",
|
|
388
|
+
fg="bright_black",
|
|
389
|
+
)
|
|
390
|
+
)
|
|
391
|
+
continue
|
|
392
|
+
problems = frontend.verify(root, namespace, base_name)
|
|
393
|
+
if problems:
|
|
394
|
+
failed += 1
|
|
395
|
+
click.secho(
|
|
396
|
+
f"❌ {feature}: the bundle does not match its manifest", fg="red"
|
|
397
|
+
)
|
|
398
|
+
for problem in problems:
|
|
399
|
+
click.secho(f" {problem}", fg="red")
|
|
400
|
+
else:
|
|
401
|
+
click.secho(f"✅ {feature}: the bundle matches its manifest", fg="green")
|
|
402
|
+
return 1 if failed else 0
|
|
242
403
|
|
|
243
404
|
|
|
244
405
|
def _feature_ref(name: str) -> str:
|
|
@@ -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
|
)
|