Skip to content
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

feat(lambda-nodejs): command hooks #11583

Merged
merged 7 commits into from
Nov 29, 2020

Conversation

jogold
Copy link
Contributor

@jogold jogold commented Nov 19, 2020

Add support for running additional commands before bundling, before node
modules installation and after bundling.

Closes #11468


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

Add support for running additional commands before bundling, before node
modules installation and after bundling.

Closes aws#11468
@gitpod-io
Copy link

gitpod-io bot commented Nov 19, 2020

eladb
eladb previously requested changes Nov 23, 2020
*
* Commands are chained with `&&`.
*/
beforeBundling?(inputDir: string, outputDir: string): string[];
Copy link
Contributor

Choose a reason for hiding this comment

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

Does these optional methods work with jsii?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It builds but in the .jsii I don't see any optional: true added to the method's type definition.
Also this pattern is nowhere to be seen in the codebase currently.

Does it mean that it will work for TS but other languages will have to define the 3 methods if commandHooks is specified? Can we live with that?

Copy link
Contributor

Choose a reason for hiding this comment

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

@RomainMuller thought?

Copy link
Contributor

Choose a reason for hiding this comment

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

Optional methods are not a thing in most languages, so we can't really support that. This is a TypeScript syntax I hadn't seen before... so I guess this is why the compiler does not complain...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@eladb should we make the methods mandatory then or leave it like that?

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's make them mandatory so all languages will have a similar experience.

@gitpod-io
Copy link

gitpod-io bot commented Nov 25, 2020

@mergify mergify bot dismissed eladb’s stale review November 25, 2020 15:32

Pull request has been modified.

eladb
eladb previously approved these changes Nov 29, 2020
@mergify
Copy link
Contributor

mergify bot commented Nov 29, 2020

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot dismissed eladb’s stale review November 29, 2020 19:02

Pull request has been modified.

@jogold
Copy link
Contributor Author

jogold commented Nov 29, 2020

resolved the merge conflict

@jogold jogold requested a review from eladb November 29, 2020 19:02
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: 324304e
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify
Copy link
Contributor

mergify bot commented Nov 29, 2020

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit 0608670 into aws:master Nov 29, 2020
@ryanholte
Copy link

@jogold @eladb I'm hoping to use these changes on a project I'm working on. Do you know when these changes will be releasing?

@eladb
Copy link
Contributor

eladb commented Dec 3, 2020

@ryanholte we are currently blocked from releasing new versions until re:invent is over. Sorry :-(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[lambda-nodejs] Deploy additional files alongside bundled output
5 participants