Skip to content

chore(toolkit): watch action#32951

Merged
mrgrain merged 12 commits intomrgrain/toolkit-pocfrom
conroy/watch2
Jan 15, 2025
Merged

chore(toolkit): watch action#32951
mrgrain merged 12 commits intomrgrain/toolkit-pocfrom
conroy/watch2

Conversation

@kaizencc
Copy link
Copy Markdown
Contributor

cdk watch builds in toolkit


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@aws-cdk-automation aws-cdk-automation requested a review from a team January 15, 2025 15:52
@github-actions github-actions bot added the p2 label Jan 15, 2025
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Jan 15, 2025
import { asSdkLogger, withAction, Timer, confirm, data, error, highlight, info, success, warn, ActionAwareIoHost } from './api/io/private';
import { asSdkLogger, withAction, Timer, confirm, data, error, highlight, info, success, warn, ActionAwareIoHost, debug } from './api/io/private';

const PROJECT_CONFIG = 'cdk.json';
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We can import this I think

Comment on lines +470 to +471
const rootDir = path.dirname(path.resolve(PROJECT_CONFIG));
await ioHost.notify(debug(`root directory used for 'watch' is: ${rootDir}`));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This should just become an option on the interface

Base automatically changed from conroy/watchoptions to mrgrain/toolkit-poc January 15, 2025 15:58
public async watch(cx: ICloudAssemblySource, options: WatchOptions): Promise<void> {
const ioHost = withAction(this.ioHost, 'watch');
throw new Error('Not implemented yet');
const rootDir = options.rootDir ?? path.dirname(path.resolve(PROJECT_CONFIG));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't think this line is doing what it claims to do path.resolve is just appending cdk.json to the CWD and then we take the dirname of that. Which is also just the CWD.

@mrgrain mrgrain merged commit 2684562 into mrgrain/toolkit-poc Jan 15, 2025
@mrgrain mrgrain deleted the conroy/watch2 branch January 15, 2025 16:57
@github-actions
Copy link
Copy Markdown
Contributor

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

contribution/core This is a PR that came from AWS. p2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants