-
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.
chore(toolkit): capture all output from an app (#33259)
### Issue #32997 Relates to #32997 ### Reason for this change When a CDK app is invoked by a sub-shell, we need to capture all output by lines and send it to the IoHost. ### Description of changes Adds an `EventPublisher` interface to the `execInChildProcess` helper. This is getting passed in a publisher that uses the IoHost. Inspired from the [ShellEventPublisher in cdk-assets](https://github.com/cdklabs/cdk-assets/blame/8751d206ea3fa6dbb6156125c64d0ea0e8df289e/lib/private/shell.ts#L6). ### Describe any new or updated permissions being added n/a ### Description of how you validated changes <!--Have you added any unit tests and/or integration tests?--> ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
- Loading branch information
1 parent
af44791
commit c83d4ca
Showing
10 changed files
with
116 additions
and
32 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
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
9 changes: 9 additions & 0 deletions
9
packages/@aws-cdk/toolkit/test/_fixtures/console-output/app.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import * as cdk from 'aws-cdk-lib/core'; | ||
|
||
console.log('line one'); | ||
const app = new cdk.App(); | ||
console.log('line two'); | ||
new cdk.Stack(app, 'Stack1'); | ||
console.log('line three'); | ||
app.synth(); | ||
console.log('line four'); |
11 changes: 11 additions & 0 deletions
11
packages/@aws-cdk/toolkit/test/_fixtures/validation-error/app.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import * as cdk from 'aws-cdk-lib/core'; | ||
import * as sqs from 'aws-cdk-lib/aws-sqs'; | ||
|
||
const app = new cdk.App(); | ||
const stack = new cdk.Stack(app, 'Stack1'); | ||
new sqs.Queue(stack, 'Queue1', { | ||
queueName: "Queue1", | ||
fifo: true, | ||
}); | ||
|
||
app.synth(); |
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