publishing_event_handler.ts view source
(): CapturingEventHandler import {capture_handler} from '@fuzdev/fuz_gitops/publishing_event_handler.js'; 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 import {capture_handler} from '@fuzdev/fuz_gitops/publishing_event_handler.js'; Collects events in memory. Used to build the run report and in tests.
CapturingEventHandler publishing_event_handler.ts view source
CapturingEventHandler import type {CapturingEventHandler} from '@fuzdev/fuz_gitops/publishing_event_handler.js'; 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: "package_skipped"; name: string; reason: string; } | { event: "package_completed"; name: string; old_version: string; new_version: string; bump_type: "major" | ... 1 more ... | "patch"; breaking: boolean; commit: string; tag: string; } | ... 6 more ... | { ...; }): { ...; } | ... 8 more ... | { ...; } import {mask_secrets} from '@fuzdev/fuz_gitops/publishing_event_handler.js'; Returns a copy of the event with secrets redacted from its string-valued fields.
event{ event: "run_started"; wetrun: boolean; total: number; } | { event: "package_skipped"; name: string; reason: string; } | { event: "package_completed"; name: string; old_version: string; new_version: string; bump_type: "major" | ... 1 more ... | "patch"; breaking: boolean; commit: string; tag: string; } | ... 6 more...{ event: "run_started"; wetrun: boolean; total: number; } | { event: "package_skipped"; name: string; reason: string; } | { event: "package_completed"; name: string; old_version: string; new_version: string; bump_type: "major" | ... 1 more ... | "patch"; breaking: boolean; commit: string; tag: string; } | ... 6 more... publishing_event_handler.ts view source
(inner: PublishingEventHandler, mask?: (event: { event: "run_started"; wetrun: boolean; total: number; } | { event: "package_skipped"; name: string; reason: string; } | { ...; } | ... 6 more ... | { ...; }) => { ...; } | ... 8 more ... | { ...; }): PublishingEventHandler import {masking_handler} from '@fuzdev/fuz_gitops/publishing_event_handler.js'; 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: "package_skipped"; name: string; reason: string; } | { event: "package_completed"; name: string; old_version: string; new_version: string; bump_type: "major" | ... 1 more ... | "patch"; breaking: boolean; commit: string; tag: string; } | .....mask_secretsPublishingEventHandler publishing_event_handler.ts view source
(handlers: PublishingEventHandler[]): PublishingEventHandler import {multi_handler} from '@fuzdev/fuz_gitops/publishing_event_handler.js'; Fans an event out to every handler in order.
handlersPublishingEventHandler[]PublishingEventHandler publishing_event_handler.ts view source
(): PublishingEventHandler import {null_handler} from '@fuzdev/fuz_gitops/publishing_event_handler.js'; Drops every event. The default when no handler is supplied.
PublishingEventHandler publishing_event_handler.ts view source
PublishingEventHandler import type {PublishingEventHandler} from '@fuzdev/fuz_gitops/publishing_event_handler.js'; A sink for publishing events.
emittype (event: PublishingEvent) => void
publishing_event_handler.ts view source
(text: string): string import {redact_secrets} from '@fuzdev/fuz_gitops/publishing_event_handler.js'; Redacts known secret shapes from a string.
textstringstring publishing_event_handler.ts view source
(): PublishingEventHandler import {stdout_handler} from '@fuzdev/fuz_gitops/publishing_event_handler.js'; 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