( projects: Array<[string, ProjectConfig]> | null | undefined )
| 1 | import type { ProjectConfig } from "@/common/types/project"; |
| 2 | |
| 3 | export function shouldExposeLaunchProject( |
| 4 | projects: Array<[string, ProjectConfig]> | null | undefined |
| 5 | ): boolean { |
| 6 | if (!Array.isArray(projects)) { |
| 7 | return false; |
| 8 | } |
| 9 | |
| 10 | // Keep first-user-project detection in a side-effect-free helper so mux server |
| 11 | // still starts when index.ts dispatches via require("./server") while tests can |
| 12 | // exercise the backend gating logic without importing the server entrypoint. |
| 13 | return !projects.some(([, config]) => config.projectKind !== "system"); |
| 14 | } |
no outgoing calls
no test coverage detected