senc-schemastore-ciconfig
contains type definitions for various CI configurations so that you can generate CI
configuration files using senc.
The type definitions are auto generated from jsonschema defintions provided by SchemaStore using the json-schema-to-typescript utility.
The base types to use for the workflow configuration files are as follows:
- Circle CI:
CircleCIConfig
- GitHub Actions:
GitHubActionsWorkflowConfig
Check out how senc
uses this to maintain the CircleCI
configuration.
There may be situations where you may want to use the sub type in your TypeScript file. Unfortunately, since the types
are auto generated, the sub types may be named oddly (e.g., the json schema for GitHub Actions workflow files contains
repeated names for sub objects, leading to duplicate types with numbers, like Types1
and Types2
in
github.d.ts).
Additionally, the types may not be as rich as you expect due to the dynamic nature of the json config (e.g., use of
patternAttributes
leads to very loose types).
For the best protection, it is recommended to validate the generated config with the raw json schema from SchemaStore.