/** * Runtime scope for one expanded composite function call. * * Composite functions are flattened into the workflow, but inner steps still need composite-function-local semantics: * `${{ steps.read }}` must mean the inner `read` step, not a workflow step with the same id. * This class overlays a `steps` view built from the call's own children on top of the global interpolation context. * success()/failure() use global workflow status (GitHub composite action parity). */ import { JobInterpolationContext } from '@expo/eas-build-job'; import type { BuildStepOutputAccessor } from './BuildStep'; import { BuildStepGlobalContext } from './BuildStepContext'; import { BuildStepEnv } from './BuildStepEnv'; import { BuildStepInput } from './BuildStepInput'; export type EvaluateIfExpression = (expression: string, context: JobInterpolationContext) => boolean; export declare class BuildStepCompositeFunctionScope { readonly parent?: BuildStepCompositeFunctionScope; readonly env?: BuildStepEnv; private readonly ctx; private readonly ifCondition?; private readonly compositeFunctionPath; private readonly inputs; private readonly providedInputKeys; private readonly childrenByLocalId; private cachedIsActive?; private readonly resolvingInputs; constructor({ ctx, parent, ifCondition, env, compositeFunctionPath, inputs, providedInputKeys, childrenByLocalId, }: { ctx: BuildStepGlobalContext; parent?: BuildStepCompositeFunctionScope; ifCondition?: string; env?: BuildStepEnv; compositeFunctionPath: string; inputs: Map; providedInputKeys: ReadonlySet; childrenByLocalId: Map; }); /** * Walks the parent chain; the call-site `if` gates the whole composite function call, not individual inner steps. * Memoized: global status can change mid-expansion, and re-evaluating would flip a passed * success() gate and skip remaining always()/failure() inner steps. */ isActive(evaluate: EvaluateIfExpression, runByDefault: boolean): boolean; private evaluateCallIfCondition; getScopedInterpolationContext(base: JobInterpolationContext): JobInterpolationContext; /** Caller scope for `with:` values and call-site env. */ getCallerInterpolationContext(base: JobInterpolationContext): JobInterpolationContext; private resolveScopeEnv; /** Merge call-site env from each scope level, outer to inner; inner keys win. */ resolveInheritedEnv(base: JobInterpolationContext): BuildStepEnv; private buildStepsView; private buildInputsObject; private resolveInputValue; resolveCompositeFunctionBoundaryEnv(base: JobInterpolationContext): BuildStepEnv; }