# @sierralabs/nest-workflow

> Sierra Labs Nest Workflow NPM module powered by NestJS, TypeORM, and Postgres.

Latest version **0.1.48** (published 2019-12-17) · Sierra Labs license · 0 weekly downloads

## Install

```sh
npm install @sierralabs/nest-workflow
pnpm add @sierralabs/nest-workflow
yarn add @sierralabs/nest-workflow
bun add @sierralabs/nest-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.48 |
| Published | 2019-12-17 |
| First published | 2019-05-09 |
| Weekly downloads | 0 |
| License | Sierra Labs |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 21 |
| Unpacked size | 500.2 KB |
| Known vulnerabilities | 0 (+11 in 7 direct dependencies) |
| Install scripts | no |
| Author | Sierra Labs |
| Maintainers | charton, csvillegas, eliakimtoluan, hyosores, jpalma, jpperez, jrattana, julieisbx, kchu_sierra, la1255, lshin, mbasnillo-isbx, mgreenwald, pcastillo_isbx, revans05, rvega, rwei-isbx, ryoshioka, thedanchang, tma_isbx |

## Links

- npm: https://www.npmjs.com/package/@sierralabs/nest-workflow
- npm.io page: https://npm.io/package/@sierralabs/nest-workflow

## Dependencies (21)

- [rxjs](https://npm.io/package/rxjs.md) ^6.2.2
- [uuid](https://npm.io/package/uuid.md) ^3.3.2
- [jszip](https://npm.io/package/jszip.md) ^2.6.1
- [dotenv](https://npm.io/package/dotenv.md) ^7.0.0
- [rimraf](https://npm.io/package/rimraf.md) ^2.6.2
- [xstate](https://npm.io/package/xstate.md) ^4.6.2
- [aws-sdk](https://npm.io/package/aws-sdk.md) ^2.413.0
- [express](https://npm.io/package/express.md) ^4.16.4
- [typeorm](https://npm.io/package/typeorm.md) ^0.2.16
- [s3-proxy](https://npm.io/package/s3-proxy.md) ^1.1.1
- [mime-types](https://npm.io/package/mime-types.md) ^2.1.24
- [typescript](https://npm.io/package/typescript.md) ^3.0.1
- [@nestjs/core](https://npm.io/package/@nestjs/core.md) ^5.4.0
- [docxtemplater](https://npm.io/package/docxtemplater.md) ^3.13.6
- [@nestjs/common](https://npm.io/package/@nestjs/common.md) ^5.4.0
- [@nestjs/swagger](https://npm.io/package/@nestjs/swagger.md) ^2.5.1
- [@nestjs/typeorm](https://npm.io/package/@nestjs/typeorm.md) ^5.3.0
- [reflect-metadata](https://npm.io/package/reflect-metadata.md) ^0.1.12
- [class-transformer](https://npm.io/package/class-transformer.md) ^0.2.0
- [@sierralabs/nest-utils](https://npm.io/package/@sierralabs/nest-utils.md) 0.0.16
- [@sierralabs/nest-identity](https://npm.io/package/@sierralabs/nest-identity.md) ^0.2.10

## Recent versions

- 0.1.48 (latest) — 2019-12-17
- 0.2.2 — 2019-12-15
- 0.1.47 — 2019-12-04
- 0.2.1 — 2019-11-25
- 0.2.0 — 2019-11-25
- 0.1.46 — 2019-11-12
- 0.1.45 — 2019-11-06
- 0.1.44 — 2019-11-02
- 0.1.43 — 2019-10-30
- 0.1.42 — 2019-10-09
- 0.1.41 — 2019-10-01
- 0.1.40 — 2019-09-10
- 0.1.39 — 2019-09-03
- 0.1.38 — 2019-09-01
- 0.1.37 — 2019-08-25
- … 34 more at https://npm.io/package/@sierralabs/nest-workflow/versions

## README

# @sierralabs/nest-workflow

Sierra Labs Nest Workflow NPM module powered by NestJS, TypeORM, and Postgres.

# Requirements

Make sure to have the following installed:

- `Node 10.15+ / NPM 6.8+` for application
- `docker` for postgres database
- `jest` for unit testing
- `tslint` for TypeScript linting (tslint in VSCode to automate linting)
- `prettier` for auto formatting in VSCode
- Make sure you setup an [npmjs.com](http://www.npmjs.com) account and request access to the `@sierralabs` private repos for the NPM dependencies.

## Installation

Using your npmjs.com account from above, run:

```bash
$ npm login
$ npm install
```

# Development Guide

## Development Database Setup

```bash
# Rebuilds the database with a new Docker container and executes the migration scripts.
$ npm run db
```

## Run the App

```bash
# development
$ npm run start

# development: watch mode (restarts on changes)
$ npm run start:dev
```

For development, you can explore the API endpoints via Swagger:
http://localhost:3000/explorer/

# Troubleshooting

## Clear persistent NPM packages

Delete you node_modules folder. Then:

```bash
$ npm install
$ npm cache verify
```

## Migrations

This is the preferred way to implement data model schema changes. Create migrations for feature related changes. Try to keep migration scripts as small as possible.

> **NOTE:** When naming migrations, include the operation and affected column/table.

```bash
# TypeORM to generate the migration files automatically
npm run db:migrate:new -- AlterOrderAddTypeColumn
```

After running the above script will create a migration script in `src/migration/`. Check the source of the migration script to make sure only the intended data model changes are applied.

```bash
# Execute the migration on the appropriate environment
npm run db:migrate:up

# Revert the migration on the appropriate environment
npm run db:migrate:down
```

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