Skip to content
Myr

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 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–5why, one step back
1import { 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 back
6import { 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 back
7
8export const FrontPageEntry = Schema.Struct({9 ask: AskListing,10 posture: Posture,11 project: ProjectName,12 takeable: Schema.Boolean,13});1415export type FrontPageEntry = typeof FrontPageEntry.Type;16

Merge redesign into mainoscabrielbefore adoptioncaedd21

lines 17–28why, one step back
17/** 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;28

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 29why, one step back
29export const ProjectListing = Schema.Struct({

Merge redesign into mainoscabrielbefore adoptioncaedd21

line 30why, one step back
30 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 back
31 landedAt: Schema.optionalKey(Schema.DateTimeUtcFromString),

Merge redesign into mainoscabrielbefore adoptioncaedd21

lines 32–33why, one step back
32 /** 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 back
34 openAsks: Schema.Int,
35 posture: Posture,36 project: ProjectName,37});3839export type ProjectListing = typeof ProjectListing.Type;