env.ts
This file
Path
packages/protocol/src/domain/env.ts
40 lines · 1.3 KiB · TypeScript
Last changed by
Merge build/comments-cli-protocol-checks into mainoscabrielbefore adoptionc86204f
History of this fileTake 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–29why, one step back1import { Schema } from "effect";23import { EnvKey, Handle, LandedSha, ProjectName, RepoPath } from "../ids.ts";45export const EnvItem = Schema.Struct({6 deprecated: Schema.optionalKey(Schema.Boolean),7 description: Schema.optionalKey(Schema.String),8 docs: Schema.optionalKey(Schema.String),9 key: EnvKey,10 placeholder: Schema.optionalKey(Schema.String),11 proxy: Schema.optionalKey(12 Schema.Struct({13 block: Schema.optionalKey(Schema.Boolean),14 domains: Schema.NonEmptyArray(Schema.NonEmptyString),15 method: Schema.optionalKey(Schema.String),16 path: Schema.optionalKey(Schema.String),17 })18 ),19 required: Schema.Union([Schema.Boolean, Schema.Literal("depends")]),20 sensitive: Schema.Boolean,21 tags: Schema.Array(Schema.NonEmptyString),22 type: Schema.optionalKey(Schema.NonEmptyString),23 value: Schema.optionalKey(24 Schema.Struct({ setAt: Schema.DateTimeUtcFromString, setBy: Handle })25 ),26});2728export type EnvItem = typeof EnvItem.Type;29Merge build/comments-cli-protocol-checks into mainoscabrielbefore adoptionc86204f
line 30why, one step back30// Named for the file: lint keeps "shape" out of code names.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 31–40why, one step back31export const EnvSchemaView = Schema.Struct({32 at: LandedSha,33 currentEnvKey: Schema.optionalKey(EnvKey),34 file: RepoPath,35 imports: Schema.Array(Schema.String),36 items: Schema.Array(EnvItem),37 project: ProjectName,38});3940export type EnvSchemaView = typeof EnvSchemaView.Type;