@@ -26,6 +26,29 @@ import { resolveNonInteractiveWorkspaceDir } from "./local/workspace.js";
2626const INSTALL_DAEMON_HEALTH_DEADLINE_MS = 45_000 ;
2727const ATTACH_EXISTING_GATEWAY_HEALTH_DEADLINE_MS = 15_000 ;
2828const INSTALL_DAEMON_HEALTH_PROBE_TIMEOUT_MS = 10_000 ;
29+ const WINDOWS_INSTALL_DAEMON_HEALTH_DEADLINE_MS = 90_000 ;
30+ const WINDOWS_INSTALL_DAEMON_HEALTH_PROBE_TIMEOUT_MS = 15_000 ;
31+ const INSTALL_DAEMON_HEALTH_COMMAND_TIMEOUT_MS = 10_000 ;
32+ const WINDOWS_INSTALL_DAEMON_HEALTH_COMMAND_TIMEOUT_MS = 30_000 ;
33+
34+ function resolveInstallDaemonGatewayHealthTiming ( ) : {
35+ deadlineMs : number ;
36+ probeTimeoutMs : number ;
37+ healthCommandTimeoutMs : number ;
38+ } {
39+ if ( process . platform === "win32" ) {
40+ return {
41+ deadlineMs : WINDOWS_INSTALL_DAEMON_HEALTH_DEADLINE_MS ,
42+ probeTimeoutMs : WINDOWS_INSTALL_DAEMON_HEALTH_PROBE_TIMEOUT_MS ,
43+ healthCommandTimeoutMs : WINDOWS_INSTALL_DAEMON_HEALTH_COMMAND_TIMEOUT_MS ,
44+ } ;
45+ }
46+ return {
47+ deadlineMs : INSTALL_DAEMON_HEALTH_DEADLINE_MS ,
48+ probeTimeoutMs : INSTALL_DAEMON_HEALTH_PROBE_TIMEOUT_MS ,
49+ healthCommandTimeoutMs : INSTALL_DAEMON_HEALTH_COMMAND_TIMEOUT_MS ,
50+ } ;
51+ }
2952
3053async function collectGatewayHealthFailureDiagnostics ( ) : Promise <
3154 GatewayHealthFailureDiagnostics | undefined
@@ -206,13 +229,16 @@ export async function runNonInteractiveLocalSetup(params: {
206229 customBindHost : nextConfig . gateway ?. customBindHost ,
207230 basePath : undefined ,
208231 } ) ;
232+ const installDaemonGatewayHealthTiming = resolveInstallDaemonGatewayHealthTiming ( ) ;
209233 const probe = await waitForGatewayReachable ( {
210234 url : links . wsUrl ,
211235 token : gatewayResult . gatewayToken ,
212236 deadlineMs : opts . installDaemon
213- ? INSTALL_DAEMON_HEALTH_DEADLINE_MS
237+ ? installDaemonGatewayHealthTiming . deadlineMs
214238 : ATTACH_EXISTING_GATEWAY_HEALTH_DEADLINE_MS ,
215- probeTimeoutMs : opts . installDaemon ? INSTALL_DAEMON_HEALTH_PROBE_TIMEOUT_MS : undefined ,
239+ probeTimeoutMs : opts . installDaemon
240+ ? installDaemonGatewayHealthTiming . probeTimeoutMs
241+ : undefined ,
216242 } ) ;
217243 if ( ! probe . ok ) {
218244 const diagnostics = opts . installDaemon
@@ -246,7 +272,15 @@ export async function runNonInteractiveLocalSetup(params: {
246272 runtime . exit ( 1 ) ;
247273 return ;
248274 }
249- await healthCommand ( { json : false , timeoutMs : 10_000 } , runtime ) ;
275+ await healthCommand (
276+ {
277+ json : false ,
278+ timeoutMs : opts . installDaemon
279+ ? installDaemonGatewayHealthTiming . healthCommandTimeoutMs
280+ : 10_000 ,
281+ } ,
282+ runtime ,
283+ ) ;
250284 }
251285
252286 logNonInteractiveOnboardingJson ( {
0 commit comments