Co-authored-by: codex <[email protected]> Co-authored-by: Cursor Agent <[email protected]>
18 lines
600 B
TypeScript
18 lines
600 B
TypeScript
import * as NodeRuntime from "@effect/platform-node/NodeRuntime";
|
|
import * as NodeServices from "@effect/platform-node/NodeServices";
|
|
import * as Effect from "effect/Effect";
|
|
import * as Layer from "effect/Layer";
|
|
import { Command } from "effect/unstable/cli";
|
|
|
|
import { NetService } from "@t3tools/shared/Net";
|
|
import { cli } from "./cli";
|
|
import { version } from "../package.json" with { type: "json" };
|
|
|
|
const CliRuntimeLayer = Layer.mergeAll(NodeServices.layer, NetService.layer);
|
|
|
|
Command.run(cli, { version }).pipe(
|
|
Effect.scoped,
|
|
Effect.provide(CliRuntimeLayer),
|
|
NodeRuntime.runMain,
|
|
);
|