# lyra-workflow

> Lyra Workflow Back-end for TypeScript

Latest version **0.1.2** (published 2019-07-01) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install lyra-workflow
pnpm add lyra-workflow
yarn add lyra-workflow
bun add lyra-workflow
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2019-07-01 |
| First published | 2019-02-13 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 11 |
| Unpacked size | 336.7 KB |
| Known vulnerabilities | 0 (+11 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Puppet Inc. |
| Maintainers | thallgren |

## Links

- npm: https://www.npmjs.com/package/lyra-workflow
- Repository: https://github.com/lyraproj/ts-workflow
- Homepage: https://github.com/lyraproj/ts-workflow#readme
- Issues: https://github.com/lyraproj/lyra/issues
- npm.io page: https://npm.io/package/lyra-workflow

## Dependencies (11)

- [net](https://npm.io/package/net.md) ^1.0.2
- [grpc](https://npm.io/package/grpc.md) ^1.19.0
- [protobufjs](https://npm.io/package/protobufjs.md) ^6.8.8
- [typescript](https://npm.io/package/typescript.md) ~3.1.0
- [@types/node](https://npm.io/package/@types/node.md) ^10.14.4
- [google-protobuf](https://npm.io/package/google-protobuf.md) ^3.7.1
- [@types/sprintf-js](https://npm.io/package/@types/sprintf-js.md) ^1.1.2
- [source-map-resolve](https://npm.io/package/source-map-resolve.md) ^0.5.2
- [require-from-string](https://npm.io/package/require-from-string.md) ^2.0.2
- [grpc-ts-health-check](https://npm.io/package/grpc-ts-health-check.md) ^1.0.11
- [@types/google-protobuf](https://npm.io/package/@types/google-protobuf.md) ^3.2.7

## Recent versions

- 0.1.2 (latest) — 2019-07-01
- 0.1.2-rc.1 — 2019-05-20
- 0.1.2-rc.0 — 2019-05-07
- 0.1.2-beta.8 — 2019-04-30
- 0.1.2-beta.6 — 2019-04-12
- 0.1.2-beta.5 — 2019-03-26
- 0.1.2-beta.4 — 2019-02-26
- 0.1.2-beta.3 — 2019-02-21
- 0.1.2-beta.2 — 2019-02-20
- 0.1.2-beta.1 — 2019-02-20
- 0.1.2-alpha — 2019-02-18
- 0.1.0 — 2019-02-13
- 0.0.0 — 2019-02-13

## README

# 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](lib/examples) folder, and more in the [lyra repo](https://github.com/lyraproj/lyra/tree/master/examples/ts-samples/src).

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](https://github.com/lyraproj/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](test) 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](https://github.com/lyraproj/data-protobuf) data format, allowing transport of generic, deeply-nested data structures.

[lib/pcore]() - this is the TypeScript implementation of the [pcore](https://github.com/lyraproj/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:

```TypeScript
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:

```sh
npm test
```

Or

```sh
./node_modules/pre-commit/hook
```

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

```sh
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.

* Edit the version in package.json
* Run `npm login`
* Run `npm publish`
* Update [the package dependency in the lyra repo](https://github.com/lyraproj/lyra/blob/a76740105e0ab65c40ead015e9cd8acf2c666e29/examples/ts-samples/package.json#L28) to the new version.

---
_Source: https://npm.io/package/lyra-workflow · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
