splent-cli 1.4.4__tar.gz → 1.4.5__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.4.4/src/splent_cli.egg-info → splent_cli-1.4.5}/PKG-INFO +1 -1
- {splent_cli-1.4.4 → splent_cli-1.4.5}/pyproject.toml +1 -1
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/product/product_derive.py +35 -41
- splent_cli-1.4.5/src/splent_cli/services/preflight.py +70 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5/src/splent_cli.egg-info}/PKG-INFO +1 -1
- splent_cli-1.4.4/src/splent_cli/services/preflight.py +0 -86
- {splent_cli-1.4.4 → splent_cli-1.4.5}/LICENSE +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/README.md +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/setup.cfg +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/__init__.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/__main__.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/cli.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/__init__.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/cache/__init__.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/cache/cache_clear.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/cache/cache_orphans.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/cache/cache_outdated.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/cache/cache_prune.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/cache/cache_size.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/cache/cache_status.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/cache/cache_usage.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/cache/cache_versions.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/check/__init__.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/check/check_deps.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/check/check_docker.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/check/check_env.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/check/check_features.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/check/check_github.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/check/check_infra.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/check/check_product.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/check/check_pypi.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/check/check_pyproject.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/clear_cache.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/clear_log.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/clear_uploads.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/command_create.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/coverage.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/database/db_console.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/database/db_dump.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/database/db_migrate.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/database/db_reset.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/database/db_restore.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/database/db_rollback.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/database/db_seed.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/database/db_status.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/database/db_upgrade.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/doctor.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/env/env_list.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/env/env_set.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/env/env_show.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/export_puml.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/feature/feature_add.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/feature/feature_attach.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/feature/feature_clone.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/feature/feature_contract.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/feature/feature_create.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/feature/feature_delete.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/feature/feature_detach.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/feature/feature_diff.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/feature/feature_discard.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/feature/feature_drift.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/feature/feature_edit.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/feature/feature_env.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/feature/feature_fork.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/feature/feature_git.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/feature/feature_hook_add.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/feature/feature_hook_remove.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/feature/feature_hooks.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/feature/feature_inject_config.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/feature/feature_list.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/feature/feature_order.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/feature/feature_outdated.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/feature/feature_pin.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/feature/feature_pip_install.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/feature/feature_pull.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/feature/feature_release.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/feature/feature_remove.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/feature/feature_rename.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/feature/feature_search.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/feature/feature_status.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/feature/feature_sync_template.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/feature/feature_test.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/feature/feature_translate.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/feature/feature_upgrade.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/feature/feature_versions.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/feature/feature_xray.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/feature_compile.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/linter.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/locust.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/product/__init__.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/product/product_build.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/product/product_clean.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/product/product_commands.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/product/product_complete.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/product/product_config.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/product/product_configure.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/product/product_console.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/product/product_create.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/product/product_deploy.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/product/product_deselect.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/product/product_down.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/product/product_drift.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/product/product_env.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/product/product_list.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/product/product_logs.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/product/product_missing.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/product/product_port.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/product/product_release.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/product/product_restart.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/product/product_routes.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/product/product_run.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/product/product_select.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/product/product_shell.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/product/product_signals.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/product/product_status.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/product/product_sync.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/product/product_sync_template.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/product/product_test.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/product/product_up.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/product/product_validate.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/release/__init__.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/release/release_core.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/selenium.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/spl/__init__.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/spl/spl_add_feature.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/spl/spl_configs.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/spl/spl_create.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/spl/spl_deps.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/spl/spl_features.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/spl/spl_fetch.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/spl/spl_fix.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/spl/spl_info.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/spl/spl_list.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/spl/spl_utils.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/tokens.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/uvl/uvl_utils.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/version.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/services/__init__.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/services/compose.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/services/context.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/services/release.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/utils/__init__.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/utils/cache_utils.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/utils/command_loader.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/utils/contract_freshness.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/utils/db_utils.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/utils/decorators.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/utils/dynamic_imports.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/utils/feature_installer.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/utils/feature_utils.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/utils/git_url.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/utils/integrity.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/utils/lifecycle.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/utils/manifest.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/utils/path_utils.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/utils/template_drift.py +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli.egg-info/SOURCES.txt +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli.egg-info/dependency_links.txt +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli.egg-info/entry_points.txt +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli.egg-info/requires.txt +0 -0
- {splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: splent_cli
|
|
3
|
-
Version: 1.4.
|
|
3
|
+
Version: 1.4.5
|
|
4
4
|
Summary: SPLENT-CLI is a CLI to be able to work on your development more easily.
|
|
5
5
|
Author-email: DiversoLab <diversolab@us.es>
|
|
6
6
|
Project-URL: Homepage, https://github.com/diverso-lab/splent_cli
|
|
@@ -138,23 +138,21 @@ def product_derive(mode):
|
|
|
138
138
|
2. product:deploy — start production containers
|
|
139
139
|
"""
|
|
140
140
|
if not mode:
|
|
141
|
-
click.
|
|
141
|
+
click.secho(" error: you must specify --dev or --prod.", fg="red")
|
|
142
142
|
raise SystemExit(1)
|
|
143
143
|
|
|
144
144
|
workspace = str(context.workspace())
|
|
145
145
|
product = context.require_app()
|
|
146
146
|
product_dir = os.path.join(workspace, product)
|
|
147
147
|
|
|
148
|
-
click.echo(
|
|
149
|
-
|
|
150
|
-
)
|
|
148
|
+
click.echo()
|
|
149
|
+
click.echo(click.style(f" Deriving {product} ({mode})", bold=True))
|
|
150
|
+
click.echo()
|
|
151
151
|
|
|
152
152
|
# ── Pre-flight checks ──────────────────────────────────────────────────
|
|
153
153
|
preflight_failed = not run_preflight(interactive=True)
|
|
154
154
|
|
|
155
|
-
#
|
|
156
|
-
click.echo(click.style(" [3/3] port conflicts", fg="bright_black"))
|
|
157
|
-
|
|
155
|
+
# ports — port conflict check
|
|
158
156
|
def _identify_env(container_name: str) -> str:
|
|
159
157
|
"""Guess whether a container belongs to dev or prod based on naming."""
|
|
160
158
|
if "_deploy" in container_name:
|
|
@@ -193,16 +191,15 @@ def product_derive(mode):
|
|
|
193
191
|
}
|
|
194
192
|
)
|
|
195
193
|
else:
|
|
196
|
-
click.
|
|
197
|
-
"
|
|
194
|
+
click.secho(
|
|
195
|
+
" ports no compose file yet — will be generated by product:build",
|
|
196
|
+
fg="bright_black",
|
|
198
197
|
)
|
|
199
198
|
|
|
200
199
|
if not port_conflicts:
|
|
201
|
-
click.
|
|
200
|
+
click.echo(" ports no conflicts detected")
|
|
202
201
|
else:
|
|
203
|
-
click.secho(
|
|
204
|
-
f" ⚠️ {len(port_conflicts)} port conflict(s) found:\n", fg="yellow"
|
|
205
|
-
)
|
|
202
|
+
click.secho(f" ports {len(port_conflicts)} conflict(s) found:", fg="yellow")
|
|
206
203
|
all_containers: dict[str, str] = {} # id → name
|
|
207
204
|
for conflict in port_conflicts:
|
|
208
205
|
for cid, cname in conflict["containers"]:
|
|
@@ -211,7 +208,7 @@ def product_derive(mode):
|
|
|
211
208
|
f"{n} ({_identify_env(n)})" for _, n in conflict["containers"]
|
|
212
209
|
)
|
|
213
210
|
click.secho(
|
|
214
|
-
f"
|
|
211
|
+
f" port {conflict['port']:>5} <- {conflict['service']}"
|
|
215
212
|
f" (blocked by: {container_list})",
|
|
216
213
|
fg="yellow",
|
|
217
214
|
)
|
|
@@ -222,80 +219,77 @@ def product_derive(mode):
|
|
|
222
219
|
for _, cname in conflict["containers"]:
|
|
223
220
|
blocking_envs_flat.add(_identify_env(cname))
|
|
224
221
|
if mode == "dev" and "prod" in blocking_envs_flat:
|
|
225
|
-
click.
|
|
226
|
-
"
|
|
222
|
+
click.secho(
|
|
223
|
+
" run 'splent product:down --prod' to stop the production deployment first",
|
|
224
|
+
fg="bright_black",
|
|
227
225
|
)
|
|
228
226
|
elif mode == "prod" and "dev" in blocking_envs_flat:
|
|
229
|
-
click.
|
|
230
|
-
"
|
|
227
|
+
click.secho(
|
|
228
|
+
" run 'splent product:down --dev' to stop the development environment first",
|
|
229
|
+
fg="bright_black",
|
|
231
230
|
)
|
|
232
231
|
|
|
233
232
|
click.echo()
|
|
234
233
|
stop_them = click.confirm(
|
|
235
|
-
"
|
|
234
|
+
" Stop and remove the conflicting containers?", default=False
|
|
236
235
|
)
|
|
237
236
|
if stop_them:
|
|
238
237
|
for cid, cname in all_containers.items():
|
|
239
|
-
click.echo(f"
|
|
238
|
+
click.echo(f" ports stopping {cname}...")
|
|
240
239
|
subprocess.run(["docker", "stop", cid], capture_output=True)
|
|
241
240
|
subprocess.run(["docker", "rm", cid], capture_output=True)
|
|
242
|
-
click.
|
|
241
|
+
click.echo(" ports conflicting containers removed")
|
|
243
242
|
else:
|
|
244
243
|
click.secho(
|
|
245
|
-
"
|
|
244
|
+
" ports cannot proceed with conflicts unresolved",
|
|
246
245
|
fg="red",
|
|
247
246
|
)
|
|
248
247
|
preflight_failed = True
|
|
249
|
-
click.echo()
|
|
250
248
|
|
|
251
249
|
if preflight_failed:
|
|
250
|
+
click.echo()
|
|
252
251
|
click.secho(
|
|
253
|
-
"
|
|
252
|
+
" Pre-flight checks failed. Fix the issues above before deriving.",
|
|
254
253
|
fg="red",
|
|
255
|
-
bold=True,
|
|
256
254
|
)
|
|
257
255
|
click.echo()
|
|
258
256
|
raise SystemExit(1)
|
|
259
257
|
|
|
260
|
-
click.echo(
|
|
258
|
+
click.echo()
|
|
261
259
|
|
|
262
260
|
# ── Derivation pipeline ────────────────────────────────────────────────
|
|
263
261
|
ctx = click.get_current_context()
|
|
264
262
|
|
|
265
263
|
if mode == "dev":
|
|
266
|
-
click.echo(
|
|
264
|
+
click.echo(" sync resolving feature symlinks...")
|
|
267
265
|
ctx.invoke(product_sync, force=False)
|
|
268
266
|
|
|
269
|
-
click.echo(
|
|
270
|
-
click.style(
|
|
271
|
-
"\n━━ [2/6] product:env --generate --all --dev", fg="bright_black"
|
|
272
|
-
)
|
|
273
|
-
)
|
|
267
|
+
click.echo(" env generating .env files (dev)")
|
|
274
268
|
ctx.invoke(
|
|
275
269
|
product_env, generate=True, merge=False, env_name="dev", process_all=True
|
|
276
270
|
)
|
|
277
271
|
|
|
278
|
-
click.echo(
|
|
279
|
-
click.style("\n━━ [3/6] product:env --merge --dev", fg="bright_black")
|
|
280
|
-
)
|
|
272
|
+
click.echo(" env merging .env files (dev)")
|
|
281
273
|
ctx.invoke(
|
|
282
274
|
product_env, generate=False, merge=True, env_name="dev", process_all=False
|
|
283
275
|
)
|
|
284
276
|
|
|
285
|
-
click.echo(
|
|
277
|
+
click.echo(" up starting containers (dev)")
|
|
286
278
|
ctx.invoke(product_up, dev=True, prod=False)
|
|
287
279
|
|
|
288
|
-
click.echo(
|
|
280
|
+
click.echo(" run launching application (dev)")
|
|
289
281
|
ctx.invoke(product_runc, env_dev=True, env_prod=False)
|
|
290
282
|
|
|
291
|
-
click.echo(
|
|
283
|
+
click.echo(" ports exposing host ports")
|
|
292
284
|
ctx.invoke(product_port, env_flag="dev")
|
|
293
285
|
|
|
294
286
|
elif mode == "prod":
|
|
295
|
-
click.echo(
|
|
287
|
+
click.echo(" build merging env + compose + Docker image")
|
|
296
288
|
ctx.invoke(product_build, no_image=False, skip_preflight=True)
|
|
297
289
|
|
|
298
|
-
click.echo(
|
|
290
|
+
click.echo(" deploy starting production containers")
|
|
299
291
|
ctx.invoke(product_deploy, down=False)
|
|
300
292
|
|
|
301
|
-
click.echo(
|
|
293
|
+
click.echo()
|
|
294
|
+
click.secho(f" {product} ({mode}) derived successfully.", fg="green")
|
|
295
|
+
click.echo()
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Pre-flight checks shared across product commands (derive, build, deploy).
|
|
3
|
+
|
|
4
|
+
Returns True if all checks pass, False otherwise.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
import os
|
|
8
|
+
|
|
9
|
+
import click
|
|
10
|
+
|
|
11
|
+
from splent_cli.services import context
|
|
12
|
+
from splent_cli.commands.uvl.uvl_utils import run_uvl_check
|
|
13
|
+
from splent_cli.commands.feature.feature_diff import run_all_product_check
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def run_preflight(*, interactive: bool = True) -> bool:
|
|
17
|
+
"""
|
|
18
|
+
Run UVL and feature:diff pre-flight checks.
|
|
19
|
+
|
|
20
|
+
Parameters
|
|
21
|
+
----------
|
|
22
|
+
interactive : bool
|
|
23
|
+
When True, prints output. When False, silent (returns result only).
|
|
24
|
+
|
|
25
|
+
Returns True if all checks pass.
|
|
26
|
+
"""
|
|
27
|
+
workspace = str(context.workspace())
|
|
28
|
+
product = context.require_app()
|
|
29
|
+
product_dir = os.path.join(workspace, product)
|
|
30
|
+
|
|
31
|
+
failed = False
|
|
32
|
+
|
|
33
|
+
# validate — UVL satisfiability
|
|
34
|
+
uvl_ok, uvl_msg = run_uvl_check(workspace)
|
|
35
|
+
if uvl_ok:
|
|
36
|
+
if interactive:
|
|
37
|
+
click.echo(" validate UVL configuration is satisfiable")
|
|
38
|
+
else:
|
|
39
|
+
if interactive:
|
|
40
|
+
click.secho(f" validate {uvl_msg}", fg="red")
|
|
41
|
+
click.secho(
|
|
42
|
+
" run 'splent product:validate' to inspect", fg="bright_black"
|
|
43
|
+
)
|
|
44
|
+
failed = True
|
|
45
|
+
|
|
46
|
+
# contract — feature:diff --all
|
|
47
|
+
findings = run_all_product_check(workspace, product_dir)
|
|
48
|
+
errors = [f for f in findings if f["severity"] == "error"]
|
|
49
|
+
warnings = [f for f in findings if f["severity"] == "warning"]
|
|
50
|
+
|
|
51
|
+
if not errors:
|
|
52
|
+
if interactive:
|
|
53
|
+
if warnings:
|
|
54
|
+
click.echo(
|
|
55
|
+
f" contract no conflicts — {len(warnings)} warning(s), "
|
|
56
|
+
"run 'splent feature:diff --all' to review"
|
|
57
|
+
)
|
|
58
|
+
else:
|
|
59
|
+
click.echo(" contract no conflicts detected")
|
|
60
|
+
else:
|
|
61
|
+
if interactive:
|
|
62
|
+
for err in errors:
|
|
63
|
+
click.secho(f" contract [{err['field']}] {err['message']}", fg="red")
|
|
64
|
+
click.secho(
|
|
65
|
+
" run 'splent feature:diff --all' to inspect",
|
|
66
|
+
fg="bright_black",
|
|
67
|
+
)
|
|
68
|
+
failed = True
|
|
69
|
+
|
|
70
|
+
return not failed
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: splent_cli
|
|
3
|
-
Version: 1.4.
|
|
3
|
+
Version: 1.4.5
|
|
4
4
|
Summary: SPLENT-CLI is a CLI to be able to work on your development more easily.
|
|
5
5
|
Author-email: DiversoLab <diversolab@us.es>
|
|
6
6
|
Project-URL: Homepage, https://github.com/diverso-lab/splent_cli
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Pre-flight checks shared across product commands (derive, build, deploy).
|
|
3
|
-
|
|
4
|
-
Returns True if all checks pass, False otherwise.
|
|
5
|
-
"""
|
|
6
|
-
|
|
7
|
-
import os
|
|
8
|
-
|
|
9
|
-
import click
|
|
10
|
-
|
|
11
|
-
from splent_cli.services import context
|
|
12
|
-
from splent_cli.commands.uvl.uvl_utils import run_uvl_check
|
|
13
|
-
from splent_cli.commands.feature.feature_diff import run_all_product_check
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
def run_preflight(*, interactive: bool = True) -> bool:
|
|
17
|
-
"""
|
|
18
|
-
Run UVL and feature:diff pre-flight checks.
|
|
19
|
-
|
|
20
|
-
Parameters
|
|
21
|
-
----------
|
|
22
|
-
interactive : bool
|
|
23
|
-
When True, prints output. When False, silent (returns result only).
|
|
24
|
-
|
|
25
|
-
Returns True if all checks pass.
|
|
26
|
-
"""
|
|
27
|
-
workspace = str(context.workspace())
|
|
28
|
-
product = context.require_app()
|
|
29
|
-
product_dir = os.path.join(workspace, product)
|
|
30
|
-
|
|
31
|
-
if interactive:
|
|
32
|
-
click.echo(click.style("━━ Pre-flight checks", fg="bright_black", bold=True))
|
|
33
|
-
click.echo()
|
|
34
|
-
|
|
35
|
-
failed = False
|
|
36
|
-
|
|
37
|
-
# [1/2] product:validate
|
|
38
|
-
if interactive:
|
|
39
|
-
click.echo(click.style(" [1/2] product:validate", fg="bright_black"))
|
|
40
|
-
uvl_ok, uvl_msg = run_uvl_check(workspace)
|
|
41
|
-
if uvl_ok:
|
|
42
|
-
if interactive:
|
|
43
|
-
click.secho(" ✅ UVL configuration is satisfiable.", fg="green")
|
|
44
|
-
else:
|
|
45
|
-
if interactive:
|
|
46
|
-
click.secho(f" 🚨 {uvl_msg}", fg="red")
|
|
47
|
-
click.secho(" → Run: splent product:validate", fg="yellow")
|
|
48
|
-
failed = True
|
|
49
|
-
if interactive:
|
|
50
|
-
click.echo()
|
|
51
|
-
|
|
52
|
-
# [2/2] feature:diff --all
|
|
53
|
-
if interactive:
|
|
54
|
-
click.echo(click.style(" [2/2] feature:diff --all", fg="bright_black"))
|
|
55
|
-
findings = run_all_product_check(workspace, product_dir)
|
|
56
|
-
errors = [f for f in findings if f["severity"] == "error"]
|
|
57
|
-
warnings = [f for f in findings if f["severity"] == "warning"]
|
|
58
|
-
|
|
59
|
-
if not errors:
|
|
60
|
-
if interactive:
|
|
61
|
-
if warnings:
|
|
62
|
-
click.secho(
|
|
63
|
-
f" ✅ No conflicts. {len(warnings)} warning(s) — "
|
|
64
|
-
"run 'splent feature:diff --all' to review.",
|
|
65
|
-
fg="green",
|
|
66
|
-
)
|
|
67
|
-
else:
|
|
68
|
-
click.secho(" ✅ No conflicts detected.", fg="green")
|
|
69
|
-
else:
|
|
70
|
-
if interactive:
|
|
71
|
-
for err in errors:
|
|
72
|
-
click.secho(f" 🚨 [{err['field']}] {err['message']}", fg="red")
|
|
73
|
-
click.secho(" → Run: splent feature:diff --all", fg="yellow")
|
|
74
|
-
failed = True
|
|
75
|
-
if interactive:
|
|
76
|
-
click.echo()
|
|
77
|
-
|
|
78
|
-
if failed and interactive:
|
|
79
|
-
click.secho(
|
|
80
|
-
"❌ Pre-flight checks failed. Fix the issues above before proceeding.",
|
|
81
|
-
fg="red",
|
|
82
|
-
bold=True,
|
|
83
|
-
)
|
|
84
|
-
click.echo()
|
|
85
|
-
|
|
86
|
-
return not failed
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/feature/feature_hook_remove.py
RENAMED
|
File without changes
|
|
File without changes
|
{splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/feature/feature_inject_config.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/feature/feature_pip_install.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/feature/feature_sync_template.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{splent_cli-1.4.4 → splent_cli-1.4.5}/src/splent_cli/commands/product/product_sync_template.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|