import type { Action, ActionIdentifier, ActionVersion, ExecutedAction, GetActionOpts, ResolvedAction, StatusOnlyAction } from "@garden-io/grow-sdk/actions/action"; import type { ActionHooks } from "@garden-io/grow-sdk/actions/hooks"; import type { ActionConfigInput, ActionDependency, ActionOutputs, ResolvedActionSpec, ResolvedActionSpecInput, UnresolvedActionSpecInput } from "@garden-io/grow-sdk/actions/types"; import type { ActionInternalFields, DeclaredAction } from "@garden-io/grow-sdk/declarations/action"; import type { ActionType } from "@garden-io/grow-sdk/declarations/action-type"; import type { ConfigGraph, ResolvedConfigGraph } from "../graph/config-graph"; import type { ActionLog } from "../logger/log-entry"; import type { TreeVersion } from "../vcs/vcs"; export interface BaseActionParams { actionType: T; config: ActionConfigInput; unresolvedSpec: UnresolvedActionSpecInput; internal: ActionInternalFields; hooks: ActionHooks; uid: string; } export declare class BaseAction implements Action { #private; readonly params: BaseActionParams; readonly type: T["name"]; readonly name: string; readonly uid: string; readonly resolved: boolean; readonly executed: boolean; readonly statusOnly: boolean; readonly actionType: T; protected readonly graph: ConfigGraph | undefined; constructor(params: BaseActionParams); get unresolvedSpec(): UnresolvedActionSpecInput; get sourcePath(): string; static fromDeclaredAction(sdkAction: DeclaredAction): BaseAction>; isResolved(): this is ResolvedAction; isExecuted(): this is ExecutedAction; isStatusOnly(): this is StatusOnlyAction; reference(): ActionIdentifier; get key(): string; get longDescription(): string; get isDisabled(): boolean; get dependencyReferences(): ActionDependency[]; getDependencies(opts?: GetActionOpts): BaseAction[]; hasDependency(refOrString: string | ActionIdentifier): boolean; getDependency(ref: ActionIdentifier | string, opts?: GetActionOpts): BaseAction | null; get internal(): ActionInternalFields; get config(): { timeout: number; source: { path: string; repository?: { url: string; } | undefined; }; dependencies: (ActionIdentifier | DeclaredAction>)[]; disabled: boolean; logOutput: boolean; description?: string | undefined; name?: string | undefined; include?: string[] | undefined; exclude?: string[] | undefined; }; getOutputLog(log: ActionLog): ActionLog; get hooks(): ActionHooks; matchesIdentifier(ref: ActionIdentifier): boolean; get statusConcurrencyLimit(): number | undefined; /** * Allows plugins to control the concurrency limit of action status task nodes. * * Falls back to default concurrency limit defined in the Task class. */ set statusConcurrencyLimit(limit: number | undefined); /** * Allows plugins to control the concurrency limit of action execution task nodes. * * Falls back to default concurrency limit defined in the Task class. */ set executeConcurrencyLimit(limit: number | undefined); get executeConcurrencyLimit(): number | undefined; } export interface ResolveActionParams { resolvedGraph: ResolvedConfigGraph; executedDependencies: ExecutedAction[]; unresolvedDependencies: Action[]; resolvedDependencies: ResolvedAction[]; statusOnlyDependencies: StatusOnlyAction[]; spec: ResolvedActionSpecInput; treeVersion: TreeVersion; } export type ResolveActionWrapperParams = ResolveActionParams & BaseActionParams; /** * This class represents a resolved action, which is an action that has had its spec resolved, * which is generally done by ResolveActionTask. */ export declare class ResolvedActionImpl extends BaseAction implements ResolvedAction { #private; protected readonly graph: ResolvedConfigGraph; readonly params: ResolveActionWrapperParams; readonly resolved: true; protected readonly _treeVersion: TreeVersion; constructor(params: ResolveActionWrapperParams); get spec(): ResolvedActionSpec; treeVersion(): TreeVersion; /** * The version of this action's config (not including files or dependencies) */ get configVersion(): string; get actionVersion(): ActionVersion; get versionString(): string; get executedDependencies(): ExecutedAction>[]; get unresolvedDependencies(): Action>[]; get statusOnlyDependencies(): StatusOnlyAction>[]; get resolvedDependencies(): ResolvedAction[]; } export interface StatusOnlyActionParams { outputs: Partial>; dirty: boolean; } export type StatusOnlyActionWrapperParams = ResolveActionWrapperParams & StatusOnlyActionParams; export declare class StatusOnlyActionImpl extends ResolvedActionImpl implements StatusOnlyAction { readonly outputs: Partial>; readonly dirty: boolean; readonly statusOnly: true; constructor(params: StatusOnlyActionWrapperParams); } export interface ExecuteActionParams extends StatusOnlyActionParams { outputs: ActionOutputs; } export type ExecutedActionWrapperParams = StatusOnlyActionWrapperParams & ExecuteActionParams; /** * This class represents an executed action, which is an action that has had its spec resolved, has been executed * or has a ready status, and thus has its runtime outputs available. */ export declare class ExecutedActionImpl extends StatusOnlyActionImpl implements ExecutedAction { readonly executed: true; constructor(params: ExecutedActionWrapperParams); } /** * Creates a corresponding Resolved version of the given Action, given the additional parameters needed. */ export declare function actionToResolved(action: BaseAction, params: ResolveActionParams): ResolvedActionImpl; /** * Creates a corresponding Executed version of the given resolved Action, given the additional parameters needed. */ export declare function resolvedActionToExecuted(action: ResolvedActionImpl, params: ExecuteActionParams): ExecutedActionImpl; /** * Creates a corresponding StatusOnly version of the given resolved Action, given the additional parameters needed. */ export declare function resolvedActionToStatusOnly(action: ResolvedActionImpl, params: StatusOnlyActionParams): StatusOnlyActionImpl;