lyra-workflow
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

ts-workflow

Overview

This repo contains a TypeScript Lyra SDK allowing you to build Lyra workflows in TypeScript. For more information see https://github.com/lyraproj/lyra

Some sample TypeScript workflows can be found in the examples folder, and more in the lyra repo.

Many of these workflows rely on types and state handlers (contained in "typesets") implemented in other languages and made available in typescript (and javascript) via the "lyra generate" CLI command (lyra generate typescript)

We will soon create an example state handler in TypeScript.

Contents

lib/examples - example workflows in typescript, used here for testing only. See the test folder for usage. The lib/examples/vpc_with_subnet.ts is an example workflow which uses the lib/examples/Aws.ts typeset which was, as mentioned above, generated by lyra generate typescript

lib/datapb - this is the TypeScript implementation of the data-protobuf data format, allowing transport of generic, deeply-nested data structures.

lib/pcore - this is the TypeScript implementation of the pcore Puppet Type System. This facilitates language-agnostic interoperability with an entirely native experience, in this case for TypeScript.

lib/servicesdk - this is the only library that workflow writers need to interface with. For example:

import {resource, serveWorkflow} from 'lyra-workflow';

// Import types used in workflow here, i.e. something similar to:
// import * as Aws from './types/Aws';

serveWorkflow({
  source: __filename,
  // define workflow here, see examples for how to do this
});

Testing

To test changes, run:

npm test

Or

./node_modules/pre-commit/hook

This also runs gts check. To fix any linting errors automatically, you can run

npm run fix

Deploying

The package is published here https://www.npmjs.com/package/lyra-workflow and requires an npmjs login and access to be granted by the project team.

Readme

Keywords

none

Package Sidebar

Install

npm i lyra-workflow

Weekly Downloads

14

Version

0.1.2

License

Apache-2.0

Unpacked Size

345 kB

Total Files

72

Last publish

Collaborators

  • thallgren