MCPcopy Create free account
hub / github.com/TanStack/ai / buildSetupPlan

Function buildSetupPlan

packages/ai-sandbox/src/setup-plan.ts:12–25  ·  view source on GitHub ↗
(
  input: SetupInput | undefined,
)

Source from the content-addressed store, hash-verified

10export type SetupInput = Array<string> | ((builder: SetupBuilder) => void)
11
12export function buildSetupPlan(
13 input: SetupInput | undefined,
14): Array<SetupGroup> {
15 if (input === undefined) return []
16 if (Array.isArray(input)) {
17 return input.map((command) => ({ kind: 'serial', command }))
18 }
19 const groups: Array<SetupGroup> = []
20 input({
21 serial: (command) => groups.push({ kind: 'serial', command }),
22 parallel: (commands) => groups.push({ kind: 'parallel', commands }),
23 })
24 return groups
25}

Callers 2

bootstrapWorkspaceFunction · 0.90
setup-plan.test.tsFile · 0.90

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected