Overview
Ther namespace provides a consistent, fluent API for building all Runner components. It’s the primary way to define tasks, resources, events, hooks, and middleware in your application.
Methods
r.task()
Creates a new task builder.id(string): Unique identifier for the task (e.g., “app.tasks.greet”)
r.resource()
Creates a new resource builder.id(string): Unique identifier for the resource (e.g., “app.database”)
r.event()
Creates a new event builder.id(string): Unique identifier for the event (e.g., “app.events.user.registered”)
r.hook()
Creates a new hook (event listener) builder.id(string): Unique identifier for the hook (e.g., “app.hooks.sendWelcome”)
r.middleware.task()
Creates a task middleware builder.id(string): Unique identifier for the middleware
r.middleware.resource()
Creates a resource middleware builder.id(string): Unique identifier for the middleware
r.tag()
Creates a tag for grouping and filtering components.id(string): Unique identifier for the tag
r.override()
Creates an override to modify existing components.r.asyncContext()
Creates an async context for storing execution-scoped data.id(string): Unique identifier for the context
r.error()
Creates a typed error class.id(string): Unique identifier for the error
Type Information
Related
- run() - Execute a resource and create a runtime
- Task Builder
- Resource Builder
- Event Builder
- Hook Builder
- Middleware Builders