aGuyNamedJonas / updraft

Practical & Tested cloud components for your CDK stacks.
MIT License
3 stars 0 forks source link

Solidify CLI #77

Closed aGuyNamedJonas closed 4 years ago

aGuyNamedJonas commented 4 years ago

Glob for package.json change detection
https://www.npmjs.com/package/glob

CLI Config
https://oclif.io/docs/config

https://oclif.io/docs/base_class

Specify rules for data
https://www.npmjs.com/package/schema-inspector

aGuyNamedJonas commented 4 years ago

Validation rules & Auto-generation

For validating the package.json file of every module, and for validating the tags of every index.ts, we will define JSON schemas as part of the updraft.config.js.

To do that, it looks like we can use the following library:
https://github.com/ExodusMovement/schemasafe

That means that we can define the validation rules, using the following schema:
https://json-schema.org/specification-links.html#2019-09-formerly-known-as-draft-8

For auto-generation we will still rely on handlebars templates.

👉🏻 Those will have to be added to the cli as well!

aGuyNamedJonas commented 4 years ago

Validation rules are not helping at the moment.

Currently the only validation rules we have are the following:

We can put these into the PR templates - no need to build that into the CLI at the moment.