Skip to content
Myr

check.ts

This file

Path

packages/protocol/src/domain/check.ts

42 lines · 1.2 KiB · TypeScript

Last changed by

Merge build/comments-cli-protocol-checks into mainoscabrielbefore adoptionc86204f

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–42why, one step back
1import { Schema } from "effect";
23import { RatchetName, RepoPath } from "../ids.ts";4import { Command, JsonPath, SymbolName } from "./common.ts";56export const CheckSpec = Schema.TaggedUnion({7 LintToZero: {8 command: Command,9 rule: Schema.NonEmptyString,10 territory: Schema.optionalKey(Schema.NonEmptyString),11 },12 /** Every use of `from` moves to `to`; `count` prints `{"total": n, "byModule": {...}}`. */13 Migrate: {14 count: Command,15 from: SymbolName,16 to: Schema.optionalKey(SymbolName),17 },18 Ratchet: { ratchet: RatchetName },19 RedThenGreen: { path: RepoPath },20 SymbolAbsent: { count: Command, symbol: SymbolName },21});2223export type CheckSpec = typeof CheckSpec.Type;2425export const Strength = Schema.Literals(["assertion", "nullAnswer"]);2627export type Strength = typeof Strength.Type;2829export const RatchetMeasure = Schema.TaggedUnion({30 Count: { command: Command, rule: Schema.optionalKey(Schema.NonEmptyString) },31 Metric: { command: Command, path: JsonPath },32});3334export type RatchetMeasure = typeof RatchetMeasure.Type;3536export const RatchetSpec = Schema.Struct({37 measure: RatchetMeasure,38 name: RatchetName,39 territory: Schema.optionalKey(Schema.NonEmptyString),40});4142export type RatchetSpec = typeof RatchetSpec.Type;