Skip to main content

@svatah/yam-service

Local HTTP and event-stream service (yam serve)

Exports

ExportKindSignature
CompileOutcomeinterfaceexport interface CompileOutcome
createServicefunctionexport async function createService(options: ServeOptions): Promise<RunningService>
EventBusclassexport class EventBusFan-out to whoever is listening.
keepRedactedfunctionexport function keepRedacted(Merge an edited data tree over the file's own, keeping every secret as it was.
MissingInputinterfaceexport interface MissingInputOne input a story declared and the run did not supply.
missingInputsfunctionexport function missingInputs(The declared inputs with no default that the run did not supply.
OPENAPI_VERSIONvariableOPENAPI_VERSION = "3.1.0"
openApiDocumentfunctionexport function openApiDocument(version: string): Record<string, unknown>Every path the service serves, in LLD §13.5's order.
ProjectHandleinterfaceexport interface ProjectHandleA project, as the CLI loaded it. Structural, so the service imports nothing.
REDACTEDvariableREDACTED = "«redacted»"What GET /data puts where a resolved secret was.
RunningServiceinterfaceexport interface RunningService
RunOutcomeinterfaceexport interface RunOutcome
ServeOptionsinterfaceexport interface ServeOptions
SERVICE_EVENT_KINDSvariableSERVICE_EVENT_KINDS = [
ServiceApiinterfaceexport interface ServiceApiThe functions a handler may call. Every one of them is the CLI's own.
ServiceEventtypealiasexport type ServiceEvent
storiesInvokedDirectlyfunctionexport function storiesInvokedDirectly(The stories a run invokes directly (Draft 2.4, LLD §13.5).