-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(cli): cleanup of CLI code (#7041)
More CLI refactorings in preparation for "convention mode" deployments. * Move remaining routines from `cdk.ts` (the `main()` function) into the `CdkToolkit` class so that the implementation of all CLI functionality lives in the same place. * `ISDK` now can be interrogated about its "current" account/region (which are different from the `SdkProvider`s "default" account/region). * Split `AppStacks` into 2 distinct classes: `CloudExecutable`, responsible for producing a `CloudAssembly`, which contains routines for operating upon the cloud assembly (selecting stacks, processing error messages). * Get rid of many repeated low-level CloudFormation `DescribeStacks` (et. al.) API calls by folding them into a `CloudFormationStack` object which contains (and can be interrogated about) the state of a deployed stack. * CloudFormation parameters: treat parameters as a map of string->string for as long as possible, translating only to API objects at the very last moment. This simplifies functions dealing with CloudFormation parameters all-around. * Get rid of the premature abstraction of `class CloudFormationTarget implements IDeploymentTarget`, demote it to a simple CloudFormation helper class called `CloudFormationDeployments` (its responsibilities are pretty weak right now and it could probably be removed, but for now I didn't do that). * Turn `loadToolkitInfo` into `ToolkitInfo.lookup()` which is a nice idiom we should be using in more places.
- Loading branch information
Showing
38 changed files
with
2,045 additions
and
1,983 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.