front-page.ts
This file
Path
packages/protocol/src/domain/front-page.ts
39 lines · 1.3 KiB · TypeScript
Last changed by
Merge redesign into mainoscabrielbefore adoptioncaedd21
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–5why, one step back1import { Schema } from "effect";23import { ProjectName } from "../ids.ts";4import { Posture } from "../posture.ts";5import { AskListing } from "./ask.ts";Merge redesign into mainoscabrielbefore adoptioncaedd21
line 6why, one step back6import { NoneOrMore } from "./common.ts";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 7–16why, one step back78export const FrontPageEntry = Schema.Struct({9 ask: AskListing,10 posture: Posture,11 project: ProjectName,12 takeable: Schema.Boolean,13});1415export type FrontPageEntry = typeof FrontPageEntry.Type;16Merge redesign into mainoscabrielbefore adoptioncaedd21
lines 17–28why, one step back17/** A description longer than this is cut where it is made, so a card holds one line. */18export const PROJECT_DESCRIPTION_CAP = 160;1920/** One line about a project: its README's first paragraph, as plain text. */21export const ProjectDescription = Schema.String.check(22 Schema.isNonEmpty(),23 Schema.isTrimmed(),24 Schema.isMaxLength(PROJECT_DESCRIPTION_CAP)25).pipe(Schema.brand("ProjectDescription"));2627export type ProjectDescription = typeof ProjectDescription.Type;28Merge build/614-env-service: deciders set write-only values for @sensitive items, the public sees the env shape, and checks see only placeholdersoscabrielbefore adoption678c8b8
line 29why, one step back29export const ProjectListing = Schema.Struct({Merge redesign into mainoscabrielbefore adoptioncaedd21
line 30why, one step back30 description: Schema.optionalKey(ProjectDescription),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
line 31why, one step back31 landedAt: Schema.optionalKey(Schema.DateTimeUtcFromString),Merge redesign into mainoscabrielbefore adoptioncaedd21
lines 32–33why, one step back32 /** How many landings the platform has made on the project's main; absent when not read. */33 landings: Schema.optionalKey(NoneOrMore),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 34–39why, one step back34 openAsks: Schema.Int,35 posture: Posture,36 project: ProjectName,37});3839export type ProjectListing = typeof ProjectListing.Type;