publishing_event_handler.ts view source
(): CapturingEventHandler Collects events in memory. Used to build the run report and in tests.
returns
CapturingEventHandler Composable sinks for the publishing event stream.
A PublishingEventHandler is anything that can receive a PublishingEvent. Handlers compose: multi_handler fans out, masking_handler redacts secrets then forwards. Emission is best-effort and synchronous — an observability sink must never fail or slow a run. The default sink is null_handler (drops everything).
9 declarations
publishing_event_handler.ts view source
(): CapturingEventHandler Collects events in memory. Used to build the run report and in tests.
CapturingEventHandler publishing_event_handler.ts view source
CapturingEventHandler A capture_handler also exposes the events it has collected.
eventstype Array<PublishingEvent>
publishing_event_handler.ts view source
(event: { event: "run_started"; wetrun: boolean; total: number; } | { event: "iteration_started"; iteration: number; max: number; } | { event: "iteration_finished"; iteration: number; published_count: number; converged: boolean; } | ... 10 more ... | { ...; }): { ...; } | ... 12 more ... | { ...; } Returns a copy of the event with secrets redacted from its string-valued fields.
event{ event: "run_started"; wetrun: boolean; total: number; } | { event: "iteration_started"; iteration: number; max: number; } | { event: "iteration_finished"; iteration: number; published_count: number; converged: boolean; } | ... 10 more ... | { ...; }{ event: "run_started"; wetrun: boolean; total: number; } | { event: "iteration_started"; iteration: number; max: number; } | { event: "iteration_finished"; iteration: number; published_count: number; converged: boolean; } | ... 10 more ... | { ...; } publishing_event_handler.ts view source
(inner: PublishingEventHandler, mask?: (event: { event: "run_started"; wetrun: boolean; total: number; } | { event: "iteration_started"; iteration: number; max: number; } | ... 11 more ... | { ...; }) => { ...; } | ... 12 more ... | { ...; }): PublishingEventHandler Wraps a handler, masking secrets in each event's string fields before forwarding.
innerthe handler to forward masked events to
maskthe masking function, defaults to mask_secrets
(event: { event: "run_started"; wetrun: boolean; total: number; } | { event: "iteration_started"; iteration: number; max: number; } | { event: "iteration_finished"; iteration: number; published_count: number; converged: boolean; } | ... 10 more ... | { ...; }) => { ...; } | ... 12 more ... | { ...; }mask_secretsPublishingEventHandler publishing_event_handler.ts view source
(handlers: PublishingEventHandler[]): PublishingEventHandler Fans an event out to every handler in order.
handlersPublishingEventHandler[]PublishingEventHandler publishing_event_handler.ts view source
(): PublishingEventHandler Drops every event. The default when no handler is supplied.
PublishingEventHandler publishing_event_handler.ts view source
PublishingEventHandler A sink for publishing events.
emittype (event: PublishingEvent) => void
publishing_event_handler.ts view source
(text: string): string Redacts known secret shapes from a string.
textstringstring publishing_event_handler.ts view source
(): PublishingEventHandler Writes each event as one JSON object per line (JSON-lines) to process.stdout.
Write failures are swallowed — the stream is observability, not control flow.
PublishingEventHandler