Skip to content
Français

RecipeComponentContext

import type { RecipeComponentContext } from "@elie-laloum/outpost/recipes";
  • kindOfRequired
    (name: string) => string
    Returns the declared category of a named component without constructing it; unknown references fail.
  • directoryRequired
    string
    Absolute directory containing the local execution YAML; resolve local extension paths from it.
  • signalRequired
    AbortSignal
    Cancellation shared with the active recipe invocation.
  • resolveRequired
    (name: string, kind: string) => Promise<unknown>
    Resolve one named component and require its declared category; repeated requests share its instance.
  • environmentRequired
    (name: string) => string
    Read one explicitly named host environment variable; absent or malformed names fail.
export interface RecipeComponentContext {
  kindOf(name: string): string;
  readonly directory: string;
  readonly signal: AbortSignal;
  resolve(name: string, kind: string): Promise<unknown>;
  environment(name: string): string;
}