deployable-awscdk-app-ts
Version:
A projen project for Typescript AWS CDK App
69 lines (68 loc) • 3.17 kB
TypeScript
import { awscdk, Task } from 'projen';
import { DeployableAwsCdkTypeScriptAppOptions, DeployOptions, EnvironmentDeploymentDependencies, EnvironmentOptions } from './types';
export * from './types';
export * as utils from './utils';
export * from './steps';
export declare class DeployableAwsCdkTypeScriptApp extends awscdk.AwsCdkTypeScriptApp {
/**
* If the diff output is enabled, adds a script and a job step to generate the CDK diff output to a file in cdk.out
* @returns void
*/
static addDiffOutputScript(project: awscdk.AwsCdkTypeScriptApp): void;
/**
* Task to deploy your app.
*/
readonly deployWorkflowTask: Task;
private readonly deployable;
private readonly generateNvmrc;
private readonly checkActiveDeployment;
private readonly workflowNodeVersion?;
private readonly codeArtifactOptions?;
private readonly deployJobStrategy;
private readonly diffOutputOptions;
protected deployOptions: DeployOptions;
protected environmentDependencies: EnvironmentDeploymentDependencies | undefined;
constructor(options: DeployableAwsCdkTypeScriptAppOptions);
/**
* return the major node version set for the project
* @default 16
*/
get majorNodeVersion(): number;
private getMethodArgument;
/**
* If the diff output is enabled, adds a script and a job step to generate the CDK diff output to a file in cdk.out
* @returns void
*/
private addDiffOutputScript;
/**
* If the diff output is enabled with annotation, adds the diff output generation step and the annotation steps to the build jobs
* The annotation steps will add a comment to the GitHub PR with the diff output, and also add an annotation to the lines of code that are different between the deployed stack and the changes made on PR
* @returns void
*/
private addDiffAnnotation;
synth(): void;
/**
* Add new environments to the application
* @param items list of environment options
*/
addEnvironments(...items: EnvironmentOptions[]): void;
private updateEnvironments;
/**
* Updates the postDeployWorkflowScript for environments
* @param script the script to be added, for example "post:deploy"
* @param environmentNameFilter the name of environments to add the scripts to, if not provided or empty will update all
*/
updatePostDeployWorkflowScriptToEnvironments(script: string, environmentNameFilter?: string[]): void;
/**
* Updates the preDeployWorkflowScript for environments
* @param script the script to be added, for example "pre:deploy"
* @param environmentNameFilter the name of environments to add the scripts to, if not provided or empty will update all
*/
updatePreDeployWorkflowScriptToEnvironments(script: string, environmentNameFilter?: string[]): void;
private addDeployJobs;
/**
* Update environment deployment dependencies
* @param environmentDependencies an object defining dependencies between environments
*/
updateEnvironmentDeploymentDependencies(environmentDependencies: EnvironmentDeploymentDependencies): void;
}