4e8b5af6c4
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4.0 KiB
4.0 KiB
name, kind, lang, domain, version, purity, signature, description, tags, uses_functions, uses_types, returns, returns_optional, error_type, imports, tested, tests, test_file_path, file_path, params, output
| name | kind | lang | domain | version | purity | signature | description | tags | uses_functions | uses_types | returns | returns_optional | error_type | imports | tested | tests | test_file_path | file_path | params | output | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| redeploy_cpp_app_windows | pipeline | bash | pipelines | 1.0.0 | impure | redeploy_cpp_app_windows(app_name: string, app_dir: string, [--build]) -> void | Pipeline orquestador para redeployar una app C++ en Windows desde WSL2 en un solo comando. Reemplaza la secuencia manual taskkill+copy+launch+verify. |
|
|
false | error_go_core | false | bash/functions/pipelines/redeploy_cpp_app_windows.sh |
|
Imprime 'OK: <app_name> redeployed (build=yes/no, PID=N)' en stdout. Exit 1 en cualquier paso fallido con mensaje de error indicando el paso. |
Ejemplo
# Solo redeploy (asume build ya hecho)
redeploy_cpp_app_windows "registry_dashboard" "/home/lucas/fn_registry/projects/fn_monitoring/apps/registry_dashboard"
# Con build previo
redeploy_cpp_app_windows "chart_demo" "/home/lucas/fn_registry/cpp/apps/chart_demo" --build
Comportamiento
- Parsear flag
--build(default off, opt-in). - Si
--build: invocarbuild_cpp_windows <app_name>para compilarcpp/build/windows/apps/<app_name>/<app_name>.exe. Si falla, exit 1 sin tocar el Desktop. - Deploy: invocar
deploy_cpp_exe_to_windows "<app_name>" "<app_dir>". Esta función mata el proceso si está vivo (taskkill.exe pre-autorizado), copia exe + DLLs + assets + runtime + enrichers, y preservalocal_files/. - Launch: invocar
launch_cpp_app_windows "<app_name>"para arrancar la app en Windows. - Wait:
sleep 1— espera arranque corto. - Verify: invocar
is_cpp_app_running_windows "<app_name>". Si NO está vivo → exit 1 con mensaje claro. - Stdout final:
OK: <app_name> redeployed (build=yes/no, PID=N).
Argumentos
app_name— obligatorio. Nombre corto de la app.app_dir— obligatorio. Ruta absoluta al directorio fuente (donde viveapp.md,enrichers/,runtime/).--build— opcional. Activa la compilación antes del deploy.
Errores
Cada paso es punto de fallo independiente. En caso de error el pipeline imprime a stderr indicando qué paso falló y hace exit 1:
ERROR [build]: build_cpp_windows falló— fallo de compilación.ERROR [deploy]: deploy_cpp_exe_to_windows falló— fallo al copiar archivos.ERROR [launch]: launch_cpp_app_windows falló— la app no arrancó.ERROR [verify]: <app> no está corriendo— la app arrancó pero murió antes de 1s.
Notas
- Ahorra ~6 comandos manuales por redeploy (taskkill + cp + cd + start + sleep + tasklist). Motivación: issue 0086 — maximizar
Reg %registrando esta secuencia como pipeline trazable. - Cada
fn run redeploy_cpp_app_windows_bash_pipelinesqueda registrado encall_monitor/operations.db, alimentando las métricas del bucle reactivo. launch_cpp_app_windows_bash_infraeis_cpp_app_running_windows_bash_infrason creadas por un fn-constructor paralelo. Si aún no existen en el registry al indexar, el indexer lo registra como advertencia pero el pipeline es válido structuralmente.- Tag
launcherincluido: este pipeline tiene sentido en el Pipeline Launcher TUI (apps/pipeline_launcher) — es un workflow interactivo lanzable con argumentos.