Skip to content

Commit b89c7c6

Browse files
authored
Merge pull request #258 from PaulJPhilp/codex/ep-admin-runtime-foundation
fix(ep-admin): restore runtime foundation for auth + scoped commands
2 parents 9406fae + 7e7f600 commit b89c7c6

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

packages/ep-admin/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ const extractErrorMessage = (error: unknown, argv: ReadonlyArray<string>): strin
381381

382382
export const createAdminProgram = (
383383
argv: ReadonlyArray<string> = process.argv
384-
) => adminCliRunner(argv);
384+
) => Effect.scoped(adminCliRunner(argv));
385385

386386
export const runCli = (
387387
argv: ReadonlyArray<string> = process.argv

packages/ep-admin/src/runtime/production.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
import { StateStore } from "@effect-patterns/pipeline-state";
1414
import { FetchHttpClient } from "@effect/platform";
15+
import { NodeContext } from "@effect/platform-node";
1516
import { layer as NodeFileSystemLayer } from "@effect/platform-node/NodeFileSystem";
1617
import { Effect, Layer, ManagedRuntime } from "effect";
1718
import { envLayer } from "../config/env.js";
@@ -43,6 +44,7 @@ const AutofixLayer = Layer.provide(
4344
);
4445

4546
export const ProductionLayer = Layer.mergeAll(
47+
NodeContext.layer,
4648
envLayer, // Environment configuration (must be early)
4749
NodeFileSystemLayer,
4850
Auth.Default,

0 commit comments

Comments
 (0)