| 1 | import * as Console from "effect/Console"; |
| 2 | import * as Effect from "effect/Effect"; |
| 3 | import { Command, Flag } from "effect/cli"; |
| 4 | |
| 5 | import { runServicePreflight } from "../cloud/servicePreflight.ts"; |
| 6 | |
| 7 | export const servicePreflightCommand = Command.make("__service-preflight", { |
| 8 | databasePath: Flag.String("database-path"), |
| 9 | launcherProtocol: Flag.Int("launcher-protocol"), |
| 10 | }).pipe( |
| 11 | Command.unlisted, |
| 12 | Command.withHandler(({ databasePath, launcherProtocol }) => |
| 13 | Console.log(JSON.stringify(runServicePreflight({ databasePath, launcherProtocol }))).pipe( |
| 14 | Effect.asVoid, |
| 15 | ), |
| 16 | ), |
| 17 | ); |