1.0.2 • Published 2 years ago

@fusectore/actions-yaml v1.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

actions-yaml

Summary

Prototype for porting the Actions workflow parser and template expansion library to TypeScript.

Key aspects:

  • Portability
    • Enables converging on one implementation. JavaScript can be consumed directly within the web UI. Services can consume as a container (REST interface). Also supports command-line interface.
  • Safe to run on servers
    • Memory safeguards are deeply built into expressions and templating libraries
  • Schema-driven; generic underlying expressions and templates library
    • Schema-validating reader which can be used to parse/expand other schemas - e.g. action.yml or stack.yml

Folder structure

  • ./expressions/
    • Generic expression library
  • ./templates/
    • Generic templating library
    • template-reader.ts reads a file
      • reads DOM using ObjectReader interface; convert to TemplateToken; schema validate
    • template-evaluator.ts expands a TemplateToken
      • expands a TemplateToken; schema validates result
  • ./workflows/
    • Parses and expands an Actions workflow.yml

Development setup

npm install # install npm dependencies
npm run build # compile ts -> js
npm run test # run the tests