| 36 | |
| 37 | |
| 38 | export function buildInstallPlan(input: BuildInstallPlanInput): InstallPlan { |
| 39 | return { |
| 40 | host: SUPERVISED_SERVER_HOST, |
| 41 | port: input.port, |
| 42 | logLevel: input.logLevel, |
| 43 | program: input.program, |
| 44 | programArguments: [ |
| 45 | input.program, |
| 46 | 'server', |
| 47 | 'run', |
| 48 | '--port', |
| 49 | String(input.port), |
| 50 | '--log-level', |
| 51 | input.logLevel, |
| 52 | '--host', |
| 53 | SUPERVISED_SERVER_HOST, |
| 54 | ], |
| 55 | logPath: input.logPath, |
| 56 | installedAt: input.nowIso ?? new Date().toISOString(), |
| 57 | }; |
| 58 | } |
| 59 | |
| 60 | |
| 61 | export function writeInstallPlan(plan: InstallPlan, path: string = installPlanPath()): void { |