MCPcopy
hub / github.com/coder/mux / shouldExposeLaunchProject

Function shouldExposeLaunchProject

src/cli/launchProject.ts:3–14  ·  view source on GitHub ↗
(
  projects: Array<[string, ProjectConfig]> | null | undefined
)

Source from the content-addressed store, hash-verified

1import type { ProjectConfig } from "@/common/types/project";
2
3export 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}

Callers 2

initializeProjectDirectFunction · 0.90
server.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected