docs(toolkit-lib): CODE_REGISTRY.md tracks valid codes and their documentation#44
docs(toolkit-lib): CODE_REGISTRY.md tracks valid codes and their documentation#44aws-cdk-automation merged 18 commits intomainfrom
Conversation
| @@ -0,0 +1,29 @@ | |||
| | Code | Description | Level | Data Interface | | |||
| |------|-------------| ----- | -------------- | | |||
| | CDK_TOOLKIT_I1000 | Provides synthesis times. | info | undefined | | |||
There was a problem hiding this comment.
the real interesting stuff is in the Data Interface section, which I haven't approached yet
| @@ -0,0 +1,29 @@ | |||
| | Code | Description | Level | Data Interface | | |||
| |------|-------------| ----- | -------------- | | |||
| | CDK_TOOLKIT_I1000 | Provides synthesis times. | info | undefined | | |||
There was a problem hiding this comment.
probably n/a if no data is send
262b4b6 to
b08ec0e
Compare
b08ec0e to
1d4833f
Compare
| | Code | Description | Level | Data Interface | | ||
| |------|-------------|-------|----------------| | ||
| | CDK_TOOLKIT_I1000 | Provides synthesis times. | info | n/a | | ||
| | CDK_TOOLKIT_I1901 | Provides stack data | result | [StackData](docs/interfaces/StackData.html) | |
There was a problem hiding this comment.
doc pages aren't committed so i don't know exactly what to do here
There was a problem hiding this comment.
I think we can link to the public page once it's available.
There was a problem hiding this comment.
if you're ok with me naming and exposing these values here, then I will add docstrings. I'm also not sure what to do with successfuldeploystackresult because we are using that interface from aws-cdk so it otherwise doesn't show up in the generated docs
| * Creates an info level message. | ||
| */ | ||
| export const info = <T>(message: string, code?: VALID_CODE, payload?: T) => { | ||
| export const info = <T>(message: string, code?: CodeInfo, payload?: T) => { |
There was a problem hiding this comment.
i forgot how we said we wanted to soft enforce that we call info on a code with level info. can you jog my memory @mrgrain ?
| Object.values(codes).forEach((code) => { | ||
| table += `| ${code.code} | ${code.description} | ${code.level} | ${code.interface ? linkInterface(code.interface) : 'n/a'} |\n`; | ||
| }); |
There was a problem hiding this comment.
I think we can check here that the key and code are the same and otherwise throw
Co-authored-by: Momo Kornher <kornherm@amazon.co.uk>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #44 +/- ##
==========================================
- Coverage 84.57% 84.51% -0.06%
==========================================
Files 196 196
Lines 35187 35187
Branches 4522 4524 +2
==========================================
- Hits 29760 29740 -20
- Misses 5281 5301 +20
Partials 146 146
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
closes aws/aws-cdk#33434
generates
CODE_REGISTRY.mdusing information gathered incodes.ts. this pr:codes.tsto have additional information storedCODESobjectCODE_REGISTRY.mdas a post-build stepBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license