Skip to content

Latest commit

 

History

History
46 lines (32 loc) · 2.11 KB

README.md

File metadata and controls

46 lines (32 loc) · 2.11 KB

senc CI Configuration Types

LICENSE NPM Version latest release

senc-schemastore-ciconfig contains type definitions for various CI configurations so that you can generate CI configuration files using senc.

Types

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

Example usage

Check out how senc uses this to maintain the CircleCI configuration.

Caveat on sub types

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.