agent-claw: automated task changes

This commit is contained in:
daniel
2026-05-06 18:55:16 -05:00
parent 38905bb1e9
commit 732b00fb66
8494 changed files with 2018127 additions and 4 deletions

View File

@@ -0,0 +1,13 @@
/**
* Type of the asset that is being published
*/
export declare enum AssetType {
/**
* A file
*/
FILE = "file",
/**
* A Docker image
*/
DOCKER_IMAGE = "docker-image"
}

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.AssetType=void 0;var AssetType;(function(AssetType2){AssetType2.FILE="file",AssetType2.DOCKER_IMAGE="docker-image"})(AssetType||(exports.AssetType=AssetType={}));

View File

@@ -0,0 +1,48 @@
import type { Step } from './step';
/**
* A set of files traveling through the deployment pipeline
*
* Individual steps in the pipeline produce or consume
* `FileSet`s.
*/
export declare class FileSet implements IFileSetProducer {
/** Human-readable descriptor for this file set (does not need to be unique) */
readonly id: string;
/**
* The primary output of a file set producer
*
* The primary output of a FileSet is itself.
*/
readonly primaryOutput?: FileSet;
private _producer?;
constructor(
/** Human-readable descriptor for this file set (does not need to be unique) */
id: string, producer?: Step);
/**
* The Step that produces this FileSet
*/
get producer(): Step;
/**
* Mark the given Step as the producer for this FileSet
*
* This method can only be called once.
*/
producedBy(producer?: Step): void;
/**
* Return a string representation of this FileSet
*/
toString(): string;
}
/**
* Any class that produces, or is itself, a `FileSet`
*
* Steps implicitly produce a primary FileSet as an output.
*/
export interface IFileSetProducer {
/**
* The `FileSet` produced by this file set producer
*
* @default - This producer doesn't produce any file set
*/
readonly primaryOutput?: FileSet;
}

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.FileSet=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},literal_string_1=()=>{var tmp=require("../../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp};class FileSet{id;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.pipelines.FileSet",version:"2.252.0"};primaryOutput=this;_producer;constructor(id,producer){this.id=id;try{jsiiDeprecationWarnings().aws_cdk_lib_pipelines_Step(producer)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,FileSet),error}this._producer=producer}get producer(){if(!this._producer)throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`FilesetDoesnTProducerCall`,`FileSet '${this.id}' doesn't have a producer; call 'fileSet.producedBy()'`);return this._producer}producedBy(producer){try{jsiiDeprecationWarnings().aws_cdk_lib_pipelines_Step(producer)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.producedBy),error}if(this._producer)throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`FilesetAlreadyProducerWhile`,`FileSet '${this.id}' already has a producer (${this._producer}) while setting producer: ${producer}`);this._producer=producer}toString(){return`FileSet(${this.id})`}}exports.FileSet=FileSet;

View File

@@ -0,0 +1,8 @@
export * from './asset-type';
export * from './file-set';
export * from './shell-step';
export * from './stack-deployment';
export * from './stage-deployment';
export * from './step';
export * from './wave';
export * from './manual-approval';

View File

@@ -0,0 +1 @@
"use strict";var __createBinding=exports&&exports.__createBinding||(Object.create?(function(o,m,k,k2){k2===void 0&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);(!desc||("get"in desc?!m.__esModule:desc.writable||desc.configurable))&&(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}):(function(o,m,k,k2){k2===void 0&&(k2=k),o[k2]=m[k]})),__exportStar=exports&&exports.__exportStar||function(m,exports2){for(var p in m)p!=="default"&&!Object.prototype.hasOwnProperty.call(exports2,p)&&__createBinding(exports2,m,p)};Object.defineProperty(exports,"__esModule",{value:!0});var _noFold;exports.AssetType=void 0,Object.defineProperty(exports,_noFold="AssetType",{enumerable:!0,configurable:!0,get:()=>{var value=require("./asset-type").AssetType;return Object.defineProperty(exports,_noFold="AssetType",{enumerable:!0,configurable:!0,value}),value}}),exports.FileSet=void 0,Object.defineProperty(exports,_noFold="FileSet",{enumerable:!0,configurable:!0,get:()=>{var value=require("./file-set").FileSet;return Object.defineProperty(exports,_noFold="FileSet",{enumerable:!0,configurable:!0,value}),value}}),exports.ShellStep=void 0,Object.defineProperty(exports,_noFold="ShellStep",{enumerable:!0,configurable:!0,get:()=>{var value=require("./shell-step").ShellStep;return Object.defineProperty(exports,_noFold="ShellStep",{enumerable:!0,configurable:!0,value}),value}}),exports.StackOutputReference=void 0,Object.defineProperty(exports,_noFold="StackOutputReference",{enumerable:!0,configurable:!0,get:()=>{var value=require("./shell-step").StackOutputReference;return Object.defineProperty(exports,_noFold="StackOutputReference",{enumerable:!0,configurable:!0,value}),value}}),exports.StackDeployment=void 0,Object.defineProperty(exports,_noFold="StackDeployment",{enumerable:!0,configurable:!0,get:()=>{var value=require("./stack-deployment").StackDeployment;return Object.defineProperty(exports,_noFold="StackDeployment",{enumerable:!0,configurable:!0,value}),value}}),exports.StageDeployment=void 0,Object.defineProperty(exports,_noFold="StageDeployment",{enumerable:!0,configurable:!0,get:()=>{var value=require("./stage-deployment").StageDeployment;return Object.defineProperty(exports,_noFold="StageDeployment",{enumerable:!0,configurable:!0,value}),value}}),exports.Step=void 0,Object.defineProperty(exports,_noFold="Step",{enumerable:!0,configurable:!0,get:()=>{var value=require("./step").Step;return Object.defineProperty(exports,_noFold="Step",{enumerable:!0,configurable:!0,value}),value}}),exports.Wave=void 0,Object.defineProperty(exports,_noFold="Wave",{enumerable:!0,configurable:!0,get:()=>{var value=require("./wave").Wave;return Object.defineProperty(exports,_noFold="Wave",{enumerable:!0,configurable:!0,value}),value}}),exports.ManualApprovalStep=void 0,Object.defineProperty(exports,_noFold="ManualApprovalStep",{enumerable:!0,configurable:!0,get:()=>{var value=require("./manual-approval").ManualApprovalStep;return Object.defineProperty(exports,_noFold="ManualApprovalStep",{enumerable:!0,configurable:!0,value}),value}});

View File

@@ -0,0 +1,55 @@
import { Step } from './step';
import type { ITopic } from '../../../aws-sns';
/**
* Construction properties for a `ManualApprovalStep`
*/
export interface ManualApprovalStepProps {
/**
* The comment to display with this manual approval
*
* @default - No comment
*/
readonly comment?: string;
/**
* The URL for review associated with this manual approval
*
* @default - No URL
*/
readonly reviewUrl?: string;
/**
* Optional SNS topic to send notifications to when an approval is pending
*
* @default - No notifications
*/
readonly notificationTopic?: ITopic;
}
/**
* A manual approval step
*
* If this step is added to a Pipeline, the Pipeline will
* be paused waiting for a human to resume it
*
* Only engines that support pausing the deployment will
* support this step type.
*/
export declare class ManualApprovalStep extends Step {
/**
* The comment associated with this manual approval
*
* @default - No comment
*/
readonly comment?: string;
/**
* The URL for review associated with this manual approval
*
* @default - No URL
*/
readonly reviewUrl?: string;
/**
* Optional SNS topic to send notifications
*
* @default - No notifications
*/
readonly notificationTopic?: ITopic;
constructor(id: string, props?: ManualApprovalStepProps);
}

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ManualApprovalStep=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var step_1=()=>{var tmp=require("./step");return step_1=()=>tmp,tmp};class ManualApprovalStep extends step_1().Step{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.pipelines.ManualApprovalStep",version:"2.252.0"};comment;reviewUrl;notificationTopic;constructor(id,props={}){super(id);try{jsiiDeprecationWarnings().aws_cdk_lib_pipelines_ManualApprovalStepProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,ManualApprovalStep),error}this.comment=props.comment,this.reviewUrl=props.reviewUrl,this.notificationTopic=props.notificationTopic,this.discoverReferencedOutputs(props.comment)}}exports.ManualApprovalStep=ManualApprovalStep;

View File

@@ -0,0 +1,186 @@
import type { IFileSetProducer } from './file-set';
import { FileSet } from './file-set';
import type { StackDeployment } from './stack-deployment';
import { Step } from './step';
import type { CfnOutput } from '../../../core';
/**
* Construction properties for a `ShellStep`.
*/
export interface ShellStepProps {
/**
* Commands to run
*/
readonly commands: string[];
/**
* Installation commands to run before the regular commands
*
* For deployment engines that support it, install commands will be classified
* differently in the job history from the regular `commands`.
*
* @default - No installation commands
*/
readonly installCommands?: string[];
/**
* Environment variables to set
*
* @default - No environment variables
*/
readonly env?: Record<string, string>;
/**
* Set environment variables based on Stack Outputs
*
* `ShellStep`s following stack or stage deployments may
* access the `CfnOutput`s of those stacks to get access to
* --for example--automatically generated resource names or
* endpoint URLs.
*
* @default - No environment variables created from stack outputs
*/
readonly envFromCfnOutputs?: Record<string, CfnOutput>;
/**
* FileSet to run these scripts on
*
* The files in the FileSet will be placed in the working directory when
* the script is executed. Use `additionalInputs` to download file sets
* to other directories as well.
*
* @default - No input specified
*/
readonly input?: IFileSetProducer;
/**
* Additional FileSets to put in other directories
*
* Specifies a mapping from directory name to FileSets. During the
* script execution, the FileSets will be available in the directories
* indicated.
*
* The directory names may be relative. For example, you can put
* the main input and an additional input side-by-side with the
* following configuration:
*
* ```ts
* const script = new pipelines.ShellStep('MainScript', {
* commands: ['npm ci','npm run build','npx cdk synth'],
* input: pipelines.CodePipelineSource.gitHub('org/source1', 'main'),
* additionalInputs: {
* '../siblingdir': pipelines.CodePipelineSource.gitHub('org/source2', 'main'),
* }
* });
* ```
*
* @default - No additional inputs
*/
readonly additionalInputs?: Record<string, IFileSetProducer>;
/**
* The directory that will contain the primary output fileset
*
* After running the script, the contents of the given directory
* will be treated as the primary output of this Step.
*
* @default - No primary output
*/
readonly primaryOutputDirectory?: string;
}
/**
* Run shell script commands in the pipeline. This is a generic step designed
* to be deployment engine agnostic.
*/
export declare class ShellStep extends Step {
/**
* Commands to run
*/
readonly commands: string[];
/**
* Installation commands to run before the regular commands
*
* For deployment engines that support it, install commands will be classified
* differently in the job history from the regular `commands`.
*
* @default - No installation commands
*/
readonly installCommands: string[];
/**
* Environment variables to set
*
* @default - No environment variables
*/
readonly env: Record<string, string>;
/**
* Set environment variables based on Stack Outputs
*
* @default - No environment variables created from stack outputs
*/
readonly envFromCfnOutputs: Record<string, StackOutputReference>;
/**
* Input FileSets
*
* A list of `(FileSet, directory)` pairs, which are a copy of the
* input properties. This list should not be modified directly.
*/
readonly inputs: FileSetLocation[];
/**
* Output FileSets
*
* A list of `(FileSet, directory)` pairs, which are a copy of the
* input properties. This list should not be modified directly.
*/
readonly outputs: FileSetLocation[];
private readonly _additionalOutputs;
private _primaryOutputDirectory?;
constructor(id: string, props: ShellStepProps);
/**
* Configure the given output directory as primary output
*
* If no primary output has been configured yet, this directory
* will become the primary output of this ShellStep, otherwise this
* method will throw if the given directory is different than the
* currently configured primary output directory.
*/
primaryOutputDirectory(directory: string): FileSet;
/**
* Add an additional output FileSet based on a directory.
*
*
* After running the script, the contents of the given directory
* will be exported as a `FileSet`. Use the `FileSet` as the
* input to another step.
*
* Multiple calls with the exact same directory name string (not normalized)
* will return the same FileSet.
*/
addOutputDirectory(directory: string): FileSet;
get consumedStackOutputs(): StackOutputReference[];
}
/**
* Location of a FileSet consumed or produced by a ShellStep
*/
export interface FileSetLocation {
/**
* The (relative) directory where the FileSet is found
*/
readonly directory: string;
/**
* The FileSet object
*/
readonly fileSet: FileSet;
}
/**
* A Reference to a Stack Output
*/
export declare class StackOutputReference {
/** A human-readable description of the producing stack */
readonly stackDescription: string;
/** Artifact id of the producing stack */
private readonly stackArtifactId;
/** Output name of the producing stack */
readonly outputName: string;
/**
* Create a StackOutputReference that references the given CfnOutput
*/
static fromCfnOutput(output: CfnOutput): StackOutputReference;
private constructor();
/**
* Whether or not this stack output is being produced by the given Stack deployment
*/
isProducedBy(stack: StackDeployment): boolean;
}

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.StackOutputReference=exports.ShellStep=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var file_set_1=()=>{var tmp=require("./file-set");return file_set_1=()=>tmp,tmp},step_1=()=>{var tmp=require("./step");return step_1=()=>tmp,tmp},core_1=()=>{var tmp=require("../../../core");return core_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp},javascript_1=()=>{var tmp=require("../private/javascript");return javascript_1=()=>tmp,tmp};class ShellStep extends step_1().Step{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.pipelines.ShellStep",version:"2.252.0"};commands;installCommands;env;envFromCfnOutputs;inputs=[];outputs=[];_additionalOutputs={};_primaryOutputDirectory;constructor(id,props){super(id);try{jsiiDeprecationWarnings().aws_cdk_lib_pipelines_ShellStepProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,ShellStep),error}if(this.commands=props.commands,this.installCommands=props.installCommands??[],this.env=props.env??{},this.envFromCfnOutputs=(0,javascript_1().mapValues)(props.envFromCfnOutputs??{},x=>StackOutputReference.fromCfnOutput(x)),this.discoverReferencedOutputs({env:this.env}),props.input){const fileSet=props.input.primaryOutput;if(!fileSet)throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`ShouldBePrimaryInputShould`,`'${id}': primary input should be a step that has produced a file set, got ${props.input}`);this.addDependencyFileSet(fileSet),this.inputs.push({directory:".",fileSet})}for(const[directory,step]of Object.entries(props.additionalInputs??{})){if(directory===".")throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`InputDirectory`,`'${id}': input for directory '.' should be passed via 'input' property`);const fileSet=step.primaryOutput;if(!fileSet)throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`ShouldBeAdditionalinputDirectoryShould`,`'${id}': additionalInput for directory '${directory}' should be a step that has produced a file set, got ${step}`);this.addDependencyFileSet(fileSet),this.inputs.push({directory,fileSet})}if(props.primaryOutputDirectory){this._primaryOutputDirectory=props.primaryOutputDirectory;const fileSet=new(file_set_1()).FileSet("Output",this);this.configurePrimaryOutput(fileSet),this.outputs.push({directory:props.primaryOutputDirectory,fileSet})}}primaryOutputDirectory(directory){if(this._primaryOutputDirectory!==void 0){if(this._primaryOutputDirectory!==directory)throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`PrimaryOutputDirectoryConflict`,`${this}: primaryOutputDirectory is '${this._primaryOutputDirectory}', cannot be changed to '${directory}'`);return this.primaryOutput}this._primaryOutputDirectory=directory;const fileSet=new(file_set_1()).FileSet("Output",this);return this.configurePrimaryOutput(fileSet),this.outputs.push({directory,fileSet}),fileSet}addOutputDirectory(directory){let fileSet=this._additionalOutputs[directory];return fileSet||(fileSet=new(file_set_1()).FileSet(directory,this),this._additionalOutputs[directory]=fileSet,this.outputs.push({directory,fileSet})),fileSet}get consumedStackOutputs(){return Object.values(this.envFromCfnOutputs)}}exports.ShellStep=ShellStep;class StackOutputReference{stackDescription;stackArtifactId;outputName;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.pipelines.StackOutputReference",version:"2.252.0"};static fromCfnOutput(output){try{jsiiDeprecationWarnings().aws_cdk_lib_CfnOutput(output)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.fromCfnOutput),error}const stack=core_1().Stack.of(output);return new StackOutputReference(stack.node.path,stack.artifactId,stack.resolve(output.logicalId))}constructor(stackDescription,stackArtifactId,outputName){this.stackDescription=stackDescription,this.stackArtifactId=stackArtifactId,this.outputName=outputName}isProducedBy(stack){try{jsiiDeprecationWarnings().aws_cdk_lib_pipelines_StackDeployment(stack)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.isProducedBy),error}return stack.stackArtifactId===this.stackArtifactId}}exports.StackOutputReference=StackOutputReference;

View File

@@ -0,0 +1,212 @@
import { AssetType } from './asset-type';
import type { Step } from './step';
import * as cxapi from '../../../cx-api';
/**
* Properties for a `StackDeployment`
*/
export interface StackDeploymentProps {
/**
* Artifact ID for this stack
*/
readonly stackArtifactId: string;
/**
* Construct path for this stack
*/
readonly constructPath: string;
/**
* Name for this stack
*/
readonly stackName: string;
/**
* Region where the stack should be deployed
*
* @default - Pipeline region
*/
readonly region?: string;
/**
* Account where the stack should be deployed
*
* @default - Pipeline account
*/
readonly account?: string;
/**
* Role to assume before deploying this stack
*
* @default - Don't assume any role
*/
readonly assumeRoleArn?: string;
/**
* Execution role to pass to CloudFormation
*
* @default - No execution role
*/
readonly executionRoleArn?: string;
/**
* Tags to apply to the stack
*
* @default - No tags
*/
readonly tags?: Record<string, string>;
/**
* Template path on disk to cloud assembly (cdk.out)
*/
readonly absoluteTemplatePath: string;
/**
* Assets referenced by this stack
*
* @default - No assets
*/
readonly assets?: StackAsset[];
/**
* The S3 URL which points to the template asset location in the publishing
* bucket.
*
* @default - Stack template is not published
*/
readonly templateS3Uri?: string;
}
/**
* Deployment of a single Stack
*
* You don't need to instantiate this class -- it will
* be automatically instantiated as necessary when you
* add a `Stage` to a pipeline.
*/
export declare class StackDeployment {
/**
* Build a `StackDeployment` from a Stack Artifact in a Cloud Assembly.
*/
static fromArtifact(stackArtifact: cxapi.CloudFormationStackArtifact): StackDeployment;
/**
* Artifact ID for this stack
*/
readonly stackArtifactId: string;
/**
* Construct path for this stack
*/
readonly constructPath: string;
/**
* Name for this stack
*/
readonly stackName: string;
/**
* Region where the stack should be deployed
*
* @default - Pipeline region
*/
readonly region?: string;
/**
* Account where the stack should be deployed
*
* @default - Pipeline account
*/
readonly account?: string;
/**
* Role to assume before deploying this stack
*
* @default - Don't assume any role
*/
readonly assumeRoleArn?: string;
/**
* Execution role to pass to CloudFormation
*
* @default - No execution role
*/
readonly executionRoleArn?: string;
/**
* Tags to apply to the stack
*/
readonly tags: Record<string, string>;
/**
* Assets referenced by this stack
*/
readonly assets: StackAsset[];
/**
* Other stacks this stack depends on
*/
readonly stackDependencies: StackDeployment[];
/**
* The asset that represents the CloudFormation template for this stack.
*/
readonly templateAsset?: StackAsset;
/**
* The S3 URL which points to the template asset location in the publishing
* bucket.
*
* This is `undefined` if the stack template is not published. Use the
* `DefaultStackSynthesizer` to ensure it is.
*
* Example value: `https://bucket.s3.amazonaws.com/object/key`
*/
readonly templateUrl?: string;
/**
* Template path on disk to CloudAssembly
*/
readonly absoluteTemplatePath: string;
/**
* Steps that take place before stack is prepared. If your pipeline engine disables 'prepareStep', then this will happen before stack deploys
*/
readonly pre: Step[];
/**
* Steps that take place after stack is prepared but before stack deploys. Your pipeline engine may not disable `prepareStep`.
*/
readonly changeSet: Step[];
/**
* Steps to execute after stack deploys
*/
readonly post: Step[];
private constructor();
/**
* Add a dependency on another stack
*/
addStackDependency(stackDeployment: StackDeployment): void;
/**
* Adds steps to each phase of the stack
* @param pre steps executed before stack.prepare
* @param changeSet steps executed after stack.prepare and before stack.deploy
* @param post steps executed after stack.deploy
*/
addStackSteps(pre: Step[], changeSet: Step[], post: Step[]): void;
}
/**
* An asset used by a Stack
*/
export interface StackAsset {
/**
* Absolute asset manifest path
*
* This needs to be made relative at a later point in time, but when this
* information is parsed we don't know about the root cloud assembly yet.
*/
readonly assetManifestPath: string;
/**
* Asset identifier
*/
readonly assetId: string;
/**
* Asset selector to pass to `cdk-assets`.
*/
readonly assetSelector: string;
/**
* Type of asset to publish
*/
readonly assetType: AssetType;
/**
* The display name of this asset
*
* @default - Use some generated string as display name
*/
readonly displayName?: string;
/**
* Role ARN to assume to publish
*
* @default - No need to assume any role
*/
readonly assetPublishingRoleArn?: string;
/**
* Does this asset represent the CloudFormation template for the stack
*
* @default false
*/
readonly isTemplate: boolean;
}

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.StackDeployment=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var path=()=>{var tmp=require("path");return path=()=>tmp,tmp},asset_type_1=()=>{var tmp=require("./asset-type");return asset_type_1=()=>tmp,tmp},core_1=()=>{var tmp=require("../../../core");return core_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp},cxapi=()=>{var tmp=require("../../../cx-api");return cxapi=()=>tmp,tmp},asset_manifest_1=()=>{var tmp=require("../private/asset-manifest");return asset_manifest_1=()=>tmp,tmp},cloud_assembly_internals_1=()=>{var tmp=require("../private/cloud-assembly-internals");return cloud_assembly_internals_1=()=>tmp,tmp};class StackDeployment{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.pipelines.StackDeployment",version:"2.252.0"};static fromArtifact(stackArtifact){try{jsiiDeprecationWarnings().aws_cdk_lib_cx_api_CloudFormationStackArtifact(stackArtifact)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.fromArtifact),error}const artRegion=stackArtifact.environment.region,region=artRegion===cxapi().UNKNOWN_REGION?void 0:artRegion,artAccount=stackArtifact.environment.account,account=artAccount===cxapi().UNKNOWN_ACCOUNT?void 0:artAccount;return new StackDeployment({account,region,tags:stackArtifact.tags,stackArtifactId:stackArtifact.id,constructPath:stackArtifact.hierarchicalId,stackName:stackArtifact.stackName,absoluteTemplatePath:path().join(stackArtifact.assembly.directory,stackArtifact.templateFile),assumeRoleArn:stackArtifact.assumeRoleArn,executionRoleArn:stackArtifact.cloudFormationExecutionRoleArn,assets:extractStackAssets(stackArtifact),templateS3Uri:stackArtifact.stackTemplateAssetObjectUrl})}stackArtifactId;constructPath;stackName;region;account;assumeRoleArn;executionRoleArn;tags;assets;stackDependencies=[];templateAsset;templateUrl;absoluteTemplatePath;pre=[];changeSet=[];post=[];constructor(props){this.stackArtifactId=props.stackArtifactId,this.constructPath=props.constructPath,this.account=props.account,this.region=props.region,this.tags=props.tags??{},this.assumeRoleArn=props.assumeRoleArn,this.executionRoleArn=props.executionRoleArn,this.stackName=props.stackName,this.absoluteTemplatePath=props.absoluteTemplatePath,this.templateUrl=props.templateS3Uri?s3UrlFromUri(props.templateS3Uri,props.region):void 0,this.assets=new Array;for(const asset of props.assets??[])asset.isTemplate?this.templateAsset=asset:this.assets.push(asset)}addStackDependency(stackDeployment){try{jsiiDeprecationWarnings().aws_cdk_lib_pipelines_StackDeployment(stackDeployment)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.addStackDependency),error}this.stackDependencies.push(stackDeployment)}addStackSteps(pre,changeSet,post){this.pre.push(...pre),this.changeSet.push(...changeSet),this.post.push(...post)}}exports.StackDeployment=StackDeployment;function extractStackAssets(stackArtifact){const ret=new Array,assetManifests=stackArtifact.dependencies.filter(cloud_assembly_internals_1().isAssetManifest);for(const manifestArtifact of assetManifests){const manifest=asset_manifest_1().AssetManifestReader.fromFile(manifestArtifact.file);for(const entry of manifest.entries){let assetType,isTemplate=!1;if(entry instanceof asset_manifest_1().DockerImageManifestEntry)assetType=asset_type_1().AssetType.DOCKER_IMAGE;else if(entry instanceof asset_manifest_1().FileManifestEntry)isTemplate=entry.source.packaging==="file"&&entry.source.path===stackArtifact.templateFile,assetType=asset_type_1().AssetType.FILE;else throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`UnrecognizedAssetType`,`Unrecognized asset type: ${entry.type}`);ret.push({assetManifestPath:manifestArtifact.file,assetId:entry.id.assetId,assetSelector:entry.id.toString(),assetType,assetPublishingRoleArn:entry.destination.assumeRoleArn,isTemplate,displayName:entry.displayName})}}return ret}function s3UrlFromUri(uri,region){const url=uri.split("/");return`https://${url[2]}.s3.${region?`${region}.`:""}amazonaws.com/${url[3]}`}

View File

@@ -0,0 +1,79 @@
import { StackDeployment } from './stack-deployment';
import type { StackSteps, Step } from './step';
import type * as cdk from '../../../core';
/**
* Properties for a `StageDeployment`
*/
export interface StageDeploymentProps {
/**
* Stage name to use in the pipeline
*
* @default - Use Stage's construct ID
*/
readonly stageName?: string;
/**
* Additional steps to run before any of the stacks in the stage
*
* @default - No additional steps
*/
readonly pre?: Step[];
/**
* Additional steps to run after all of the stacks in the stage
*
* @default - No additional steps
*/
readonly post?: Step[];
/**
* Instructions for additional steps that are run at the stack level
*
* @default - No additional instructions
*/
readonly stackSteps?: StackSteps[];
}
/**
* Deployment of a single `Stage`
*
* A `Stage` consists of one or more `Stacks`, which will be
* deployed in dependency order.
*/
export declare class StageDeployment {
/** The stacks deployed in this stage */
readonly stacks: StackDeployment[];
/**
* Create a new `StageDeployment` from a `Stage`
*
* Synthesizes the target stage, and deployes the stacks found inside
* in dependency order.
*/
static fromStage(stage: cdk.Stage, props?: StageDeploymentProps): StageDeployment;
/**
* The display name of this stage
*/
readonly stageName: string;
/**
* Additional steps that are run before any of the stacks in the stage
*/
readonly pre: Step[];
/**
* Additional steps that are run after all of the stacks in the stage
*/
readonly post: Step[];
/**
* Instructions for additional steps that are run at stack level
*/
readonly stackSteps: StackSteps[];
/**
* Determine if all stacks in stage should be deployed with prepare
* step or not.
*/
readonly prepareStep?: boolean;
private constructor();
/**
* Add an additional step to run before any of the stacks in this stage
*/
addPre(...steps: Step[]): void;
/**
* Add an additional step to run after all of the stacks in this stage
*/
addPost(...steps: Step[]): void;
}

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.StageDeployment=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var stack_deployment_1=()=>{var tmp=require("./stack-deployment");return stack_deployment_1=()=>tmp,tmp},core_1=()=>{var tmp=require("../../../core");return core_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp},cloud_assembly_internals_1=()=>{var tmp=require("../private/cloud-assembly-internals");return cloud_assembly_internals_1=()=>tmp,tmp},construct_internals_1=()=>{var tmp=require("../private/construct-internals");return construct_internals_1=()=>tmp,tmp};class StageDeployment{stacks;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.pipelines.StageDeployment",version:"2.252.0"};static fromStage(stage,props={}){try{jsiiDeprecationWarnings().aws_cdk_lib_Stage(stage),jsiiDeprecationWarnings().aws_cdk_lib_pipelines_StageDeploymentProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.fromStage),error}const assembly=(0,construct_internals_1().pipelineSynth)(stage);if(assembly.stacks.length===0)throw new(core_1()).ValidationError((0,literal_string_1().lit)`GivenStageConstruct`,`The given Stage construct ('${stage.node.path}') should contain at least one Stack`,stage);const stepFromArtifact=new Map;for(const artifact of assembly.stacks){if(artifact.assumeRoleAdditionalOptions?.Tags&&artifact.assumeRoleArn)throw new(core_1()).ValidationError((0,literal_string_1().lit)`DeploymentStack`,`Deployment of stack ${artifact.stackName} requires assuming the role ${artifact.assumeRoleArn} with session tags, but assuming roles with session tags is not supported by CodePipeline.`,stage);const step=stack_deployment_1().StackDeployment.fromArtifact(artifact);stepFromArtifact.set(artifact,step)}if(props.stackSteps)for(const stackstep of props.stackSteps){const stackArtifact=assembly.getStackArtifact(stackstep.stack.artifactId),thisStep=stepFromArtifact.get(stackArtifact);if(!thisStep)throw new(core_1()).ValidationError((0,literal_string_1().lit)`LogicErrorAddedStepArtifact`,"Logic error: we just added a step for this artifact but it disappeared.",stage);thisStep.addStackSteps(stackstep.pre??[],stackstep.changeSet??[],stackstep.post??[])}for(const artifact of assembly.stacks){const thisStep=stepFromArtifact.get(artifact);if(!thisStep)throw new(core_1()).ValidationError((0,literal_string_1().lit)`LogicErrorAddedStepArtifact`,"Logic error: we just added a step for this artifact but it disappeared.",stage);const stackDependencies=artifact.dependencies.filter(cloud_assembly_internals_1().isStackArtifact);for(const dep of stackDependencies){const depStep=stepFromArtifact.get(dep);if(!depStep)throw new(core_1()).ValidationError((0,literal_string_1().lit)`StackDependsStackFound`,`Stack '${artifact.id}' depends on stack not found in same Stage: '${dep.id}'`,stage);thisStep.addStackDependency(depStep)}}return new StageDeployment(Array.from(stepFromArtifact.values()),{stageName:stage.stageName,...props})}stageName;pre;post;stackSteps;prepareStep;constructor(stacks,props={}){this.stacks=stacks,this.stageName=props.stageName??"",this.pre=props.pre??[],this.post=props.post??[],this.stackSteps=props.stackSteps??[]}addPre(...steps){try{jsiiDeprecationWarnings().aws_cdk_lib_pipelines_Step(steps)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.addPre),error}this.pre.push(...steps)}addPost(...steps){try{jsiiDeprecationWarnings().aws_cdk_lib_pipelines_Step(steps)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.addPost),error}this.post.push(...steps)}}exports.StageDeployment=StageDeployment;

View File

@@ -0,0 +1,108 @@
import type { FileSet, IFileSetProducer } from './file-set';
import type { StackOutputReference } from './shell-step';
import type { Stack } from '../../../core';
/**
* A generic Step which can be added to a Pipeline
*
* Steps can be used to add Sources, Build Actions and Validations
* to your pipeline.
*
* This class is abstract. See specific subclasses of Step for
* useful steps to add to your Pipeline
*/
export declare abstract class Step implements IFileSetProducer {
/** Identifier for this step */
readonly id: string;
/**
* Define a sequence of steps to be executed in order.
*
* If you need more fine-grained step ordering, use the `addStepDependency()`
* API. For example, if you want `secondStep` to occur after `firstStep`, call
* `secondStep.addStepDependency(firstStep)`.
*/
static sequence(steps: Step[]): Step[];
/**
* The list of FileSets consumed by this Step
*/
readonly dependencyFileSets: FileSet[];
/**
* Whether or not this is a Source step
*
* What it means to be a Source step depends on the engine.
*/
readonly isSource: boolean;
private _primaryOutput?;
private _dependencies;
constructor(
/** Identifier for this step */
id: string);
/**
* Return the steps this step depends on, based on the FileSets it requires
*/
get dependencies(): Step[];
/**
* Return a string representation of this Step
*/
toString(): string;
/**
* The primary FileSet produced by this Step
*
* Not all steps produce an output FileSet--if they do
* you can substitute the `Step` object for the `FileSet` object.
*/
get primaryOutput(): FileSet | undefined;
/**
* Add a dependency on another step.
*/
addStepDependency(step: Step): void;
/**
* Add an additional FileSet to the set of file sets required by this step
*
* This will lead to a dependency on the producer of that file set.
*/
protected addDependencyFileSet(fs: FileSet): void;
/**
* Configure the given FileSet as the primary output of this step
*/
protected configurePrimaryOutput(fs: FileSet): void;
/**
* Crawl the given structure for references to StepOutputs and add dependencies on all steps found
*
* Should be called in the constructor of subclasses based on what the user
* passes in as construction properties. The format of the structure passed in
* here does not have to correspond exactly to what gets rendered into the
* engine, it just needs to contain the same data.
*/
protected discoverReferencedOutputs(structure: any): void;
/**
* StackOutputReferences this step consumes.
*/
get consumedStackOutputs(): StackOutputReference[];
}
/**
* Instructions for additional steps that are run at stack level
*/
export interface StackSteps {
/**
* The stack you want the steps to run in
*/
readonly stack: Stack;
/**
* Steps that execute before stack is prepared
*
* @default - no additional steps
*/
readonly pre?: Step[];
/**
* Steps that execute after stack is prepared but before stack is deployed
*
* @default - no additional steps
*/
readonly changeSet?: Step[];
/**
* Steps that execute after stack is deployed
*
* @default - no additional steps
*/
readonly post?: Step[];
}

View File

@@ -0,0 +1 @@
"use strict";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},literal_string_1=()=>{var tmp=require("../../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp},step_output_1=()=>{var tmp=require("../helpers-internal/step-output");return step_output_1=()=>tmp,tmp};class Step{id;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.pipelines.Step",version:"2.252.0"};static sequence(steps){for(let i=1;i<steps.length;i++)steps[i].addStepDependency(steps[i-1]);return steps}dependencyFileSets=[];isSource=!1;_primaryOutput;_dependencies=new Set;constructor(id){if(this.id=id,core_1().Token.isUnresolved(id))throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`StepCannotUnresolved`,`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;

View File

@@ -0,0 +1,97 @@
import { StageDeployment } from './stage-deployment';
import type { StackSteps, Step } from './step';
import type * as cdk from '../../../core';
/**
* Construction properties for a `Wave`
*/
export interface WaveProps {
/**
* Additional steps to run before any of the stages in the wave
*
* @default - No additional steps
*/
readonly pre?: Step[];
/**
* Additional steps to run after all of the stages in the wave
*
* @default - No additional steps
*/
readonly post?: Step[];
}
/**
* Multiple stages that are deployed in parallel
*/
export declare class Wave {
/** Identifier for this Wave */
readonly id: string;
/**
* Additional steps that are run before any of the stages in the wave
*/
readonly pre: Step[];
/**
* Additional steps that are run after all of the stages in the wave
*/
readonly post: Step[];
/**
* The stages that are deployed in this wave
*/
readonly stages: StageDeployment[];
constructor(
/** Identifier for this Wave */
id: string, props?: WaveProps);
/**
* Add a Stage to this wave
*
* It will be deployed in parallel with all other stages in this
* wave.
*/
addStage(stage: cdk.Stage, options?: AddStageOpts): StageDeployment;
/**
* Add an additional step to run before any of the stages in this wave
*/
addPre(...steps: Step[]): void;
/**
* Add an additional step to run after all of the stages in this wave
*/
addPost(...steps: Step[]): void;
}
/**
* Options to pass to `addStage`
*/
export interface AddStageOpts {
/**
* Additional steps to run before any of the stacks in the stage
*
* @default - No additional steps
*/
readonly pre?: Step[];
/**
* Additional steps to run after all of the stacks in the stage
*
* @default - No additional steps
*/
readonly post?: Step[];
/**
* Instructions for stack level steps
*
* @default - No additional instructions
*/
readonly stackSteps?: StackSteps[];
}
/**
* Options to pass to `addWave`
*/
export interface WaveOptions {
/**
* Additional steps to run before any of the stages in the wave
*
* @default - No additional steps
*/
readonly pre?: Step[];
/**
* Additional steps to run after all of the stages in the wave
*
* @default - No additional steps
*/
readonly post?: Step[];
}

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Wave=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var stage_deployment_1=()=>{var tmp=require("./stage-deployment");return stage_deployment_1=()=>tmp,tmp};class Wave{id;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.pipelines.Wave",version:"2.252.0"};pre;post;stages=[];constructor(id,props={}){this.id=id;try{jsiiDeprecationWarnings().aws_cdk_lib_pipelines_WaveProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,Wave),error}this.pre=props.pre??[],this.post=props.post??[]}addStage(stage,options={}){try{jsiiDeprecationWarnings().aws_cdk_lib_Stage(stage),jsiiDeprecationWarnings().aws_cdk_lib_pipelines_AddStageOpts(options)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.addStage),error}const ret=stage_deployment_1().StageDeployment.fromStage(stage,options);return this.stages.push(ret),ret}addPre(...steps){try{jsiiDeprecationWarnings().aws_cdk_lib_pipelines_Step(steps)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.addPre),error}this.pre.push(...steps)}addPost(...steps){try{jsiiDeprecationWarnings().aws_cdk_lib_pipelines_Step(steps)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.addPost),error}this.post.push(...steps)}}exports.Wave=Wave;