Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(cli): refactor cli.ts to use UserInput #32760

Draft
wants to merge 19 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions packages/aws-cdk/lib/cdk-toolkit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1729,6 +1729,9 @@ export interface DestroyOptions {
readonly ci?: boolean;
}

export type ActionType = 'print' | 'tag' | 'delete-tagged' | 'full';
export type TypeType = 's3' | 'ecr' | 'all';

/**
* Options for the garbage collection
*/
Expand All @@ -1738,14 +1741,14 @@ export interface GarbageCollectionOptions {
*
* @default 'full'
*/
readonly action: 'print' | 'tag' | 'delete-tagged' | 'full';
readonly action: ActionType;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
readonly action: ActionType;
readonly action: GarbageCollectionAction;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

im reverting these changes. tying them as any as they were before. can revisit in separate PR if we want to handle all cases where we turn a string into an enum in a better way


/**
* The type of the assets to be garbage collected.
*
* @default 'all'
*/
readonly type: 's3' | 'ecr' | 'all';
readonly type: TypeType;
kaizencc marked this conversation as resolved.
Show resolved Hide resolved

/**
* Elapsed time between an asset being marked as isolated and actually deleted.
Expand Down
2 changes: 1 addition & 1 deletion packages/aws-cdk/lib/cli-arguments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ export interface GlobalOptions {
*
* @default - false
*/
readonly verbose?: boolean;
readonly verbose?: number;

/**
* Debug the CDK app. Log additional information during synthesis, such as creation stack traces of tokens (sets CDK_DEBUG, will slow down synthesis)
Expand Down
Loading
Loading