From 557c8f67db6d0822750146f628276c882beaeea8 Mon Sep 17 00:00:00 2001 From: Quinn Ftw Date: Wed, 4 Feb 2026 22:37:29 -0800 Subject: [PATCH] =?UTF-8?q?chore(cli):=20=F0=9F=94=A7=20Update=20CLI=20hel?= =?UTF-8?q?per=20scripts=20in=20dev-helpers.ts=20and=20deployment-orchestr?= =?UTF-8?q?ator.ts=20for=20improved=20deployment=20workflows?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Lilith Autocommit --- run/cli/commands/dev-helpers.ts | 12 +++++++++++- run/core/deployment-orchestrator.ts | 13 ++++++++----- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/run/cli/commands/dev-helpers.ts b/run/cli/commands/dev-helpers.ts index d749123..a18a755 100644 --- a/run/cli/commands/dev-helpers.ts +++ b/run/cli/commands/dev-helpers.ts @@ -155,6 +155,7 @@ export async function keepAlive( docker: DockerOps, envFile: string, urls: UrlEntry[], + serviceList?: string[], ): Promise { const monitor = new PostStartupMonitor({ urls, @@ -211,7 +212,16 @@ export async function keepAlive( await new Promise(resolve => setTimeout(resolve, 1000)); try { - const result = await services.start({ useTerminalUI: false, continueOnFailure: true, quietMode: false }); + const startOptions: Parameters[0] = { + useTerminalUI: false, + continueOnFailure: true, + quietMode: false, + }; + // Use resolved service list if provided (from deployment orchestrator) + if (serviceList && serviceList.length > 0) { + startOptions.serviceList = serviceList; + } + const result = await services.start(startOptions); // Re-establish monitor connection after restart (services.start clears it) services.postStartupMonitor = monitor; diff --git a/run/core/deployment-orchestrator.ts b/run/core/deployment-orchestrator.ts index f9ab138..35aa668 100644 --- a/run/core/deployment-orchestrator.ts +++ b/run/core/deployment-orchestrator.ts @@ -149,12 +149,14 @@ export class DeploymentOrchestrator { await this.cleanupOrphanedPorts(); } - // Start each deployment in dependency order + // Start each deployment in dependency order, tracking all services + const allStartedServices: string[] = []; for (const depName of deploymentOrder) { const depManifest = this.deploymentRegistry.get(depName); if (!depManifest) continue; - await this.startSingleDeployment(depManifest, serviceRegistry); + const startedServices = await this.startSingleDeployment(depManifest, serviceRegistry); + allStartedServices.push(...startedServices); } // Collect health check URLs dynamically (one per deployment) @@ -200,7 +202,7 @@ export class DeploymentOrchestrator { if (manifest.orchestration.lifecycle.keepAlive) { this.logger.info(colors.muted('Press Ctrl+C to stop services')); this.logger.blank(); - await keepAlive(this.services, this.docker, envFile, healthUrls); + await keepAlive(this.services, this.docker, envFile, healthUrls, allStartedServices); } return { code: 0 }; @@ -411,7 +413,7 @@ export class DeploymentOrchestrator { this.logger.blank(); this.logger.info(colors.muted('Press Ctrl+C to stop services')); this.logger.blank(); - await keepAlive(this.services, this.docker, envFile, healthUrls); + await keepAlive(this.services, this.docker, envFile, healthUrls, [...expectedServices]); } return { code: 0 }; @@ -427,7 +429,7 @@ export class DeploymentOrchestrator { private async startSingleDeployment( manifest: DeploymentManifest, serviceRegistry: ServiceRegistry - ): Promise { + ): Promise { this.logger.section(`Deployment: ${manifest.deployment.name}`); const envFile = getEnvFile(this.environment); @@ -511,6 +513,7 @@ export class DeploymentOrchestrator { } this.logger.success(`${manifest.deployment.name} started`); + return resolved.allServices; } /**