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: adding cli options commands hooks #11898

Merged
merged 4 commits into from
Feb 14, 2023

Conversation

akshbhu
Copy link
Contributor

@akshbhu akshbhu commented Feb 3, 2023

Description of changes

  • added a field runtime_options to hooks-config.json to pass in cli options with their custom runtime.
  • added logic to pass runtime_options with commands file to run

Issue #11848

Description of how you validated changes

PrePush.js -> console.log('hello')
preload.js -> console.log('this is from preload')

Hooks Config:

Screen Shot 2023-02-03 at 1 17 14 PM

amplify Output:
Screen Shot 2023-02-03 at 1 18 08 PM

amplify-dev output :
Screen Shot 2023-02-03 at 1 19 00 PM

Checklist

  • PR description included
  • yarn test passes
  • Tests are changed or added
  • Relevant documentation is changed or added (and PR referenced)
  • New AWS SDK calls or CloudFormation actions have been added to relevant test and service IAM policies

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

@akshbhu akshbhu requested a review from a team as a code owner February 3, 2023 21:20
@akshbhu akshbhu added do-not-merge PRs that are approved and green, but should not be merged yet and removed do-not-merge PRs that are approved and green, but should not be merged yet labels Feb 3, 2023
@akshbhu akshbhu changed the title feat: adding cli options commands hooks [DO-NOT-MERGE]feat: adding cli options commands hooks Feb 3, 2023
@aws-eddy aws-eddy added the do-not-merge PRs that are approved and green, but should not be merged yet label Feb 3, 2023
packages/amplify-cli-core/API.md Outdated Show resolved Hide resolved
packages/amplify-cli-core/src/hooks/hooksExecutor.ts Outdated Show resolved Hide resolved
packages/amplify-cli-core/src/hooks/hooksExecutor.ts Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

Codecov Report

Merging #11898 (b24965f) into dev (984c0f8) will decrease coverage by 3.45%.
The diff coverage is 60.07%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##              dev   #11898      +/-   ##
==========================================
- Coverage   49.45%   46.00%   -3.45%     
==========================================
  Files         692      819     +127     
  Lines       33424    37676    +4252     
  Branches     6840     7736     +896     
==========================================
+ Hits        16529    17333     +804     
- Misses      15370    18647    +3277     
- Partials     1525     1696     +171     
Impacted Files Coverage Δ
...y-appsync-simulator/src/resolvers/unit-resolver.ts 90.32% <0.00%> (ø)
...ages/amplify-appsync-simulator/src/schema/index.ts 70.68% <0.00%> (-1.25%) ⬇️
...tor/src/velocity/util/transform/dynamodb-filter.ts 4.93% <0.00%> (ø)
...ync-simulator/src/velocity/util/transform/index.ts 21.05% <0.00%> (ø)
...ackages/amplify-category-auth/src/commands/auth.ts 0.00% <0.00%> (ø)
...es/amplify-category-auth/src/commands/auth/help.ts 0.00% <0.00%> (ø)
.../amplify-category-auth/src/commands/auth/import.ts 0.00% <0.00%> (ø)
...c/provider-utils/awscloudformation/import/index.ts 31.02% <ø> (ø)
...vice-walkthrough-types/cognito-user-input-types.ts 100.00% <ø> (ø)
.../awscloudformation/utils/auth-defaults-appliers.ts 91.17% <ø> (ø)
... and 401 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@akshbhu akshbhu changed the title [DO-NOT-MERGE]feat: adding cli options commands hooks feat: adding cli options commands hooks Feb 13, 2023
@akshbhu akshbhu merged commit 6090fbe into aws-amplify:dev Feb 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge PRs that are approved and green, but should not be merged yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants