UNPKG

aws-cdk-lib

Version:

Version 2 of the AWS Cloud Development Kit library

2 lines (1 loc) 2.12 kB
"use strict";var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.Step=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var core_1=()=>{var tmp=require("../../../core");return core_1=()=>tmp,tmp},step_output_1=()=>{var tmp=require("../helpers-internal/step-output");return step_output_1=()=>tmp,tmp};class Step{static sequence(steps){for(let i=1;i<steps.length;i++)steps[i].addStepDependency(steps[i-1]);return steps}constructor(id){if(this.id=id,this.dependencyFileSets=[],this.isSource=!1,this._dependencies=new Set,core_1().Token.isUnresolved(id))throw new(core_1()).UnscopedValidationError(`Step id cannot be unresolved, got '${id}'`)}get dependencies(){return Array.from(new Set([...this.dependencyFileSets.map(f=>f.producer),...this._dependencies]))}toString(){return`${this.constructor.name}(${this.id})`}get primaryOutput(){return this._primaryOutput}addStepDependency(step){try{jsiiDeprecationWarnings().aws_cdk_lib_pipelines_Step(step)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.addStepDependency),error}this._dependencies.add(step)}addDependencyFileSet(fs){try{jsiiDeprecationWarnings().aws_cdk_lib_pipelines_FileSet(fs)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.addDependencyFileSet),error}this.dependencyFileSets.push(fs)}configurePrimaryOutput(fs){try{jsiiDeprecationWarnings().aws_cdk_lib_pipelines_FileSet(fs)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.configurePrimaryOutput),error}this._primaryOutput=fs}discoverReferencedOutputs(structure){for(const output of step_output_1().StepOutput.findAll(structure))this._dependencies.add(output.step),step_output_1().StepOutput.recordProducer(output)}get consumedStackOutputs(){return[]}}exports.Step=Step,_a=JSII_RTTI_SYMBOL_1,Step[_a]={fqn:"aws-cdk-lib.pipelines.Step",version:"2.185.0"};