Skip to content

Recognize command extensions from plugins and validate CLI input against result commands schema - #9171

Merged
medikoo merged 8 commits into
masterfrom
0322-recognize-commands-from-plugins
Mar 24, 2021
Merged

medikoo merged 8 commits into
masterfrom
0322-recognize-commands-from-plugins

Conversation

@medikoo

@medikoo medikoo commented Mar 23, 2021

Copy link
Copy Markdown
Contributor

Finalizes 4.0.0 & 5.1.0 from #8364

  • Parse commands and options as provided via external plugins. For that, needed to move lifecycleEvents configuration to config schema, as it's crucial in detecting which AWS provider commands were adapted in context of other provider (note in such cases other provider doesn't have to configure command explicitly, it's enough that it attaches some function to pre-configured command lifecycle events)
  • Finalize resolution of opt variable source (after having all commands schema resolved, last resolution phase was configured to resolve any final properties behind opt sources)
  • Having all commands data, validate unrecognized command in context of main script. Additionally validate unrecognized options, signalling that with next major such usage will throw
  • Maintenance improvements to main process file

@codecov

codecov Bot commented Mar 23, 2021 •

Copy link
Copy Markdown

Codecov Report

Merging #9171 (42c2f3a) into master (316d632) will increase coverage by 0.21%.
The diff coverage is 86.88%.

❗ Current head 42c2f3a differs from pull request most recent head 19135d1. Consider uploading reports for the commit 19135d1 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9171      +/-   ##
==========================================
+ Coverage   86.93%   87.14%   +0.21%     
==========================================
  Files         302      304       +2     
  Lines       11368    11462      +94     
==========================================
+ Hits         9883     9989     +106     
+ Misses       1485     1473      -12     
Impacted Files Coverage Δ
lib/cli/commands-schema/aws-service.js 100.00% <ø> (ø)
.../cli/commands-schema/common-options/aws-service.js 100.00% <ø> (ø)
lib/cli/commands-schema/common-options/service.js 100.00% <ø> (ø)
lib/cli/commands-schema/no-service.js 100.00% <ø> (ø)
lib/cli/commands-schema/service.js 100.00% <ø> (ø)
lib/plugins/aws/configCredentials.js 100.00% <ø> (ø)
lib/plugins/config.js 81.08% <ø> (ø)
lib/plugins/create/create.js 89.18% <ø> (ø)
lib/plugins/deploy.js 100.00% <ø> (ø)
lib/plugins/info.js 100.00% <ø> (ø)
... and 23 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 316d632...19135d1. Read the comment docs.

@medikoo
medikoo force-pushed the 0322-recognize-commands-from-plugins branch from fd850ea to 11db074 Compare March 23, 2021 13:25
@medikoo
medikoo force-pushed the 0322-recognize-commands-from-plugins branch from 11db074 to 19135d1 Compare March 23, 2021 13:34
@medikoo
medikoo requested a review from pgrzesik March 23, 2021 13:45

@pgrzesik pgrzesik left a comment

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.

Looks good - nothing to add 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants