-
Notifications
You must be signed in to change notification settings - Fork 4.3k
chore(toolkit): register valid message codes #33160
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
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
7ca354c
chore(toolkit): register valid message codes
kaizencc 17f52de
error codes
kaizencc 76363a2
Merge branch 'main' into conroy/coes
kaizencc d2f3593
0000 or OOOO
kaizencc 5cafa62
Apply suggestions from code review
kaizencc bc87527
Merge branch 'main' into conroy/coes
kaizencc 305e43b
pr feedback
kaizencc 719ae89
Merge branch 'main' into conroy/coes
kaizencc a92e215
Merge branch 'main' into conroy/coes
mergify[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| import { IoMessageCode } from '../io-message'; | ||
|
|
||
| export const CODES = { | ||
| // Default codes -- all 0000 codes | ||
| CDK_TOOLKIT_I0000: 'Default toolkit info code', | ||
| CDK_TOOLKIT_E0000: 'Default toolkit error code', | ||
| CDK_TOOLKIT_W0000: 'Default toolkit warning code', | ||
| CDK_SDK_I0000: 'Default sdk info code', | ||
| CDK_SDK_E0000: 'Default sdk error code', | ||
| CDK_SDK_WOOOO: 'Default sdk warning code', | ||
| CDK_ASSETS_I0000: 'Default assets info code', | ||
| CDK_ASSETS_E0000: 'Default assets error code', | ||
| CDK_ASSETS_W0000: 'Default assets warning code', | ||
| CDK_ASSEMBLY_I0000: 'Default assembly info code', | ||
| CDK_ASSEMBLY_E0000: 'Default assembly error code', | ||
| CDK_ASSEMBLY_W0000: 'Default assembly warning code', | ||
|
|
||
| // Toolkit Info codes | ||
| CDK_TOOLKIT_I0001: 'Display stack data', | ||
| CDK_TOOLKIT_I0002: 'Successfully deployed stacks', | ||
| CDK_TOOLKIT_I5001: 'Display synthesis times', | ||
| CDK_TOOLKIT_I5050: 'Confirm rollback', | ||
| CDK_TOOLKIT_I5060: 'Confirm deploy security sensitive changes', | ||
| CDK_TOOLKIT_I7010: 'Confirm destroy stacks', | ||
|
|
||
| // Toolkit Warning codes | ||
|
|
||
| // Toolkit Error codes | ||
|
|
||
| // Assembly Info codes | ||
| CDK_ASSEMBLY_I0042: 'Writing updated context', | ||
| CDK_ASSEMBLY_I0241: 'Fetching missing context', | ||
|
|
||
| // Assembly Warning codes | ||
|
|
||
| // Assembly Error codes | ||
| CDK_ASSEMBLY_E1111: 'Incompatible CDK CLI version. Upgrade needed.', | ||
| }; | ||
|
|
||
| // If we give CODES a type with key: IoMessageCode, | ||
| // this dynamically generated type will generalize to allow all IoMessageCodes. | ||
| // Instead, we will validate that VALID_CODE must be IoMessageCode with the '&'. | ||
| export type VALID_CODE = keyof typeof CODES & IoMessageCode; | ||
This file contains hidden or 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 hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some of these codes could be consolidated and/or their numbers could make a little more sense, but i personally have no idea if there should be any rhyme or reason to the codes. so leaving it as is in this PR