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