ActionContext
Home > @backstage/plugin-scaffolder-node > ActionContext
ActionContext is passed into scaffolder actions.
Signature:
export type ActionContext<TActionInput extends JsonObject, TActionOutput extends JsonObject = JsonObject, _TSchemaType extends 'v2' = 'v2'> = {
    logger: LoggerService;
    secrets?: TaskSecrets;
    workspacePath: string;
    input: TActionInput;
    checkpoint<T extends JsonValue | void>(opts: CheckpointContext<T>): Promise<T>;
    output(name: keyof TActionOutput, value: TActionOutput[keyof TActionOutput]): void;
    createTemporaryDirectory(): Promise<string>;
    getInitiatorCredentials(): Promise<BackstageCredentials>;
    task: {
        id: string;
    };
    templateInfo?: TemplateInfo;
    isDryRun?: boolean;
    user?: {
        entity?: UserEntity;
        ref?: string;
    };
    signal?: AbortSignal;
    each?: JsonObject;
    step?: {
        id?: string;
        name?: string;
    };
};
References: JsonObject, LoggerService, TaskSecrets, JsonValue, BackstageCredentials, TemplateInfo, UserEntity