@svatah/yam-service
Local HTTP and event-stream service (yam serve)
- Source:
packages/service· README:packages/service/README.md - Install:
npm install @svatah/yam-service - Version 0.1.0 · Apache-2.0
Exports
| Export | Kind | Signature | |
|---|---|---|---|
CompileOutcome | interface | export interface CompileOutcome | |
createService | function | export async function createService(options: ServeOptions): Promise<RunningService> | |
EventBus | class | export class EventBus | Fan-out to whoever is listening. |
keepRedacted | function | export function keepRedacted( | Merge an edited data tree over the file's own, keeping every secret as it was. |
MissingInput | interface | export interface MissingInput | One input a story declared and the run did not supply. |
missingInputs | function | export function missingInputs( | The declared inputs with no default that the run did not supply. |
OPENAPI_VERSION | variable | OPENAPI_VERSION = "3.1.0" | |
openApiDocument | function | export function openApiDocument(version: string): Record<string, unknown> | Every path the service serves, in LLD §13.5's order. |
ProjectHandle | interface | export interface ProjectHandle | A project, as the CLI loaded it. Structural, so the service imports nothing. |
REDACTED | variable | REDACTED = "«redacted»" | What GET /data puts where a resolved secret was. |
RunningService | interface | export interface RunningService | |
RunOutcome | interface | export interface RunOutcome | |
ServeOptions | interface | export interface ServeOptions | |
SERVICE_EVENT_KINDS | variable | SERVICE_EVENT_KINDS = [ | |
ServiceApi | interface | export interface ServiceApi | The functions a handler may call. Every one of them is the CLI's own. |
ServiceEvent | typealias | export type ServiceEvent | |
storiesInvokedDirectly | function | export function storiesInvokedDirectly( | The stories a run invokes directly (Draft 2.4, LLD §13.5). |