| @@ -344,7 +344,8 @@ Stops background backend/web services started by the install script.`); · 343 unmodified lines |
| 344 | 344 | |
| 345 | 345 | async function runDoctor(args: string[]): Promise<number> { |
| 346 | 346 | const verbose = args.includes("-v") || args.includes("--verbose"); |
| 347 | | − const unknownArgs = args.filter((arg) => arg !== "-v" && arg !== "--verbose"); |
| 347 | + const runtimeOnly = args.includes("--runtime-only"); |
| 348 | + const unknownArgs = args.filter((arg) => arg !== "-v" && arg !== "--verbose" && arg !== "--runtime-only"); |
| 348 | 349 | if (unknownArgs.length > 0) { |
| 349 | 350 | console.log(`Unknown option: ${unknownArgs[0]}`); |
| 350 | 351 | return 1; |
| @@ -358,17 +359,19 @@ async function runDoctor(args: string[]): Promise<number> { · 7 unmodified lines |
| 358 | 359 | const webRunning = await checkHttp(`http://127.0.0.1:${webPort}/`); |
| 359 | 360 | |
| 360 | 361 | let bootstrapState: Awaited<ReturnType<typeof checkBootstrapHealth>> | null = null; |
| 361 | | − if (backendRunning) { |
| 362 | + if (backendRunning && !runtimeOnly) { |
| 362 | 363 | bootstrapState = await checkBootstrapHealth(info); |
| 363 | 364 | } |
| 364 | 365 | |
| 365 | | − const functionsReady = bootstrapState?.state === "ready"; |
| 366 | + const functionsReady = runtimeOnly ? true : bootstrapState?.state === "ready"; |
| 366 | 367 | const healthy = nodeInstalled && webInstalled && backendRunning && webRunning && functionsReady; |
| 367 | 368 | |
| 368 | 369 | console.log(`Executor status: ${healthy ? "ready" : "needs attention"}`); |
| 369 | 370 | console.log(`Dashboard: http://127.0.0.1:${webPort} (${webRunning ? "running" : "not running"})`); |
| 370 | 371 | console.log(`Backend: ${backendRunning ? "running" : "not running"} (${info.convexUrl})`); |
| 371 | | − if (!backendRunning) { |
| 372 | + if (runtimeOnly) { |
| 373 | + console.log("Functions: skipped (runtime-only check)"); |
| 374 | + } else if (!backendRunning) { |
| 372 | 375 | console.log("Functions: unavailable (backend is not running)"); |
| 373 | 376 | } else if (bootstrapState?.state === "ready") { |
| 374 | 377 | console.log("Functions: bootstrapped"); |
| @@ -387,13 +390,13 @@ async function runDoctor(args: string[]): Promise<number> { · 12 unmodified lines |
| 387 | 390 | if (!webRunning) { |
| 388 | 391 | console.log("Next step: run `executor web`"); |
| 389 | 392 | } |
| 390 | | − if (backendRunning && bootstrapState?.state === "no_project") { |
| 393 | + if (!runtimeOnly && backendRunning && bootstrapState?.state === "no_project") { |
| 391 | 394 | console.log("Next step: run from your repo root or set `EXECUTOR_PROJECT_DIR` to a Convex project."); |
| 392 | 395 | } |
| 393 | | − if (backendRunning && bootstrapState?.state === "missing_functions") { |
| 396 | + if (!runtimeOnly && backendRunning && bootstrapState?.state === "missing_functions") { |
| 394 | 397 | console.log("Next step: run `executor up` from your project root to bootstrap functions."); |
| 395 | 398 | } |
| 396 | | − if (backendRunning && bootstrapState?.state === "check_failed") { |
| 399 | + if (!runtimeOnly && backendRunning && bootstrapState?.state === "check_failed") { |
| 397 | 400 | console.log("Next step: run `executor up` and inspect ~/.executor/runtime/logs/backend.log"); |
| 398 | 401 | } |
| 399 | 402 | if (!webInstalled || !nodeInstalled) { |
| @@ -409,7 +412,7 @@ async function runDoctor(args: string[]): Promise<number> { · 9 unmodified lines |
| 409 | 412 | console.log(` convex site: ${info.convexSiteUrl}`); |
| 410 | 413 | console.log(` node runtime: ${nodeInstalled ? info.nodeBin : "missing"}`); |
| 411 | 414 | console.log(` web bundle: ${webInstalled ? info.webServerEntry : "missing"}`); |
| 412 | | − console.log(` functions: ${bootstrapState?.state ?? "unavailable"}`); |
| 415 | + console.log(` functions: ${runtimeOnly ? "skipped" : (bootstrapState?.state ?? "unavailable")}`); |
| 413 | 416 | if (bootstrapState?.detail) { |
| 414 | 417 | console.log(` functions detail: ${bootstrapState.detail}`); |
| 415 | 418 | } |