Skip to content
Myr

projection.ts

This file

Path

packages/project/src/projection.ts

28 lines · 831 bytes · TypeScript

Last changed by

Merge build/comments-project into mainoscabrielbefore adoption49efd2a

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–22why, one step back
1import { ProjectEvent } from "@repo/protocol/domain/event";
2import { ProjectName } from "@repo/protocol/ids";3import { Context, Schema } from "effect";4import type { Effect } from "effect";56import type { OutboxRow } from "./project-store/rows.ts";78export const ProjectedEvent = Schema.TaggedStruct("Projected", {9 event: ProjectEvent,10 project: ProjectName,11});1213export type ProjectedEvent = typeof ProjectedEvent.Type;1415export class ProjectionFailed extends Schema.TaggedError<ProjectionFailed>()(16 "ProjectionFailed",17 { reason: Schema.String }18) {}1920export class Projection extends Context.Service<21 Projection,22 {

Merge build/comments-project into mainoscabrielbefore adoption49efd2a

line 23why, one step back
23 /** Retried on failure: idempotent by `(project, event.seq)`. */

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 24–28why, one step back
24 readonly apply: (
25 rows: readonly OutboxRow[]26 ) => Effect.Effect<void, ProjectionFailed>;27 }28>()("project/Projection") {}