1import * as Console from "effect/Console";
2import * as Effect from "effect/Effect";
3import { Command, Flag } from "effect/cli";
4
5import { runServicePreflight } from "../cloud/servicePreflight.ts";
6
7export 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);