Skip to content
Myr

memory.ts

This file

Path

packages/visibility/src/env-schema/memory.ts

24 lines · 656 bytes · TypeScript

Last changed by

Merge build/comments-packages-rest into mainoscabrielbefore adoption38cd503

History of this file

Take it

The walk stopped after 200 commits: lines older than 678c8b8 point at it.

Merge build/614-env-service: deciders set write-only values for @sensitive items, the public sees the env shape, and checks see only placeholdersoscabrielbefore adoption678c8b8

lines 1–24why, one step back
1import type { RepoPath } from "@repo/protocol/ids";
2import { Effect, Layer } from "effect";34import {5 EnvSchemaParser,6 EnvSchemaUnreadable,7 withImports,8} from "../env-schema.ts";9import type { ParsedEnvSchema } from "../env-schema.ts";1011export const EnvSchemaParserMemory = (12 parsed: ReadonlyMap<RepoPath, ParsedEnvSchema>13): Layer.Layer<EnvSchemaParser> =>14 Layer.succeed(EnvSchemaParser, {15 parse: (file) => {16 const schema = parsed.get(file);1718 return schema === undefined19 ? Effect.fail(20 new EnvSchemaUnreadable({ file, reason: "no such schema" })21 )22 : withImports(file, schema);23 },24 });