Skip to content

Commit

Permalink
chore: self mutation
Browse files Browse the repository at this point in the history
Signed-off-by: github-actions <github-actions@github.com>
  • Loading branch information
github-actions committed Feb 23, 2025
1 parent f0dd065 commit 28ecc6a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 19 deletions.
33 changes: 16 additions & 17 deletions packages/@aws-cdk/toolkit-lib/lib/actions/bootstrap/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Tag } from '../../api/aws-cdk';
* Options for Bootstrap
*/
export interface BootstrapOptions {

/**
* Bootstrap environment parameters for CloudFormation used when deploying the bootstrap stack
* @default BootstrapEnvironmentParameters.onlyExisting()
Expand Down Expand Up @@ -146,31 +146,30 @@ export class BootstrapEnvironmentParameters {
/**
* Use only existing parameters on the stack.
*/
public static onlyExisting() {
return new BootstrapEnvironmentParameters({}, true);
}
public static onlyExisting() {
return new BootstrapEnvironmentParameters({}, true);
}

/**
* Use exactly these parameters and remove any other existing parameters from the stack.
*/
public static exactly(params: BootstrapParameterValues) {
return new BootstrapEnvironmentParameters(params, false);
}
/**
* Define additional parameters for the stack, while keeping existing parameters for unspecified values.
*/
public static withExisting(params: BootstrapParameterValues) {
return new BootstrapEnvironmentParameters(params, true);
}
public static exactly(params: BootstrapParameterValues) {
return new BootstrapEnvironmentParameters(params, false);
}

/**
* Define additional parameters for the stack, while keeping existing parameters for unspecified values.
*/
public static withExisting(params: BootstrapParameterValues) {
return new BootstrapEnvironmentParameters(params, true);
}

/**
* The parameters as a Map for easy access and manipulation
*/
public readonly parameters?: BootstrapParameterValues;
public readonly keepExistingParameters: boolean;


private constructor(params?: BootstrapParameterValues, usePreviousParameters = true) {
this.keepExistingParameters = usePreviousParameters;
this.parameters = params;
Expand Down
4 changes: 2 additions & 2 deletions packages/@aws-cdk/toolkit-lib/lib/toolkit/toolkit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import * as chalk from 'chalk';
import * as chokidar from 'chokidar';
import * as fs from 'fs-extra';
import { ToolkitServices } from './private';
import { environmentsFromDescriptors } from '../actions/bootstrap/private';
import { BootstrapOptions, BootstrapSource } from '../actions/bootstrap';
import { environmentsFromDescriptors } from '../actions/bootstrap/private';
import { AssetBuildTime, type DeployOptions, RequireApproval } from '../actions/deploy';
import { type ExtendedDeployOptions, buildParameterMap, createHotswapPropertyOverrides, removePublishedAssets } from '../actions/deploy/private';
import { type DestroyOptions } from '../actions/destroy';
Expand Down Expand Up @@ -235,7 +235,7 @@ export class Toolkit extends CloudAssemblySourceBuilder implements AsyncDisposab
toolkitStackName,
source: source.render(),
parameters: parameters?.parameters,
usePreviousParameters: parameters?.keepExistingParameters
usePreviousParameters: parameters?.keepExistingParameters,
},
);
const message = bootstrapResult.noOp
Expand Down

0 comments on commit 28ecc6a

Please sign in to comment.