Closed aGuyNamedJonas closed 4 years ago
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!
Validation rules are not helping at the moment.
Currently the only validation rules we have are the following:
package.json
package scope needs to be "@updraft"package.json
package name needs to be of the form aws-xxx-xxx
since aws is the only provider at the momentpackage.json
package name needs to be identical with folder namepackage.json
author
should be set and afterwards not changed (except for the email etc.) and contributors
can only be extended, not taken away fromWe can put these into the PR templates - no need to build that into the CLI at the moment.
--verbose
)Add ncu -u && npm install
to build step (unfortunately neccessary to avoid constant incompatibilities)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