# pactum-flow-plugin

> plugin to publish flows, interactions and run contract tests locally

Latest version **0.1.4** (published 2022-04-11) · ISC license · 0 weekly downloads

## Install

```sh
npm install pactum-flow-plugin
pnpm add pactum-flow-plugin
yarn add pactum-flow-plugin
bun add pactum-flow-plugin
```

## 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.4 |
| Published | 2022-04-11 |
| First published | 2021-01-03 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 23 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Anudeep |
| Maintainers | asaianudeep |
| Keywords | pactum, pactumjs, flow, contract, plugin, reporter |

## Links

- npm: https://www.npmjs.com/package/pactum-flow-plugin
- Repository: https://github.com/pactumjs/pactum-flow-plugin
- Homepage: https://github.com/pactumjs/pactum-flow-plugin#readme
- Issues: https://github.com/pactumjs/pactum-flow-plugin/issues
- npm.io page: https://npm.io/package/pactum-flow-plugin

## Dependencies (3)

- [phin](https://npm.io/package/phin.md) ^3.6.0
- [kleur](https://npm.io/package/kleur.md) ^4.1.4
- [phin-retry](https://npm.io/package/phin-retry.md) ^1.0.3

## Recent versions

- 0.1.4 (latest) — 2022-04-11
- 0.1.3 — 2022-01-09
- 0.1.2 — 2022-01-03
- 0.1.1 — 2022-01-02
- 0.1.0 — 2021-12-28
- 0.0.6 — 2021-12-16
- 0.0.5 — 2021-10-07
- 0.0.4 — 2021-05-14
- 0.0.3 — 2021-02-07
- 0.0.2 — 2021-01-27
- 0.0.1 — 2021-01-03

## README

# pactum-flow-plugin

plugin to publish flows, interactions &amp; run contract tests locally

## Usage

```js

const pf = require('pactum-flow-plugin');
const { reporter } = require('pactum');

// global before block
before(() => {
  pf.config.url = '<pactum-flow-server-url>';
  pf.config.projectId = '<unique-project-id>';
  pf.config.projectName = '<unique-project-name>';
  pf.config.version = '<unique-project-version>';
  pf.config.username = '<username>';
  pf.config.password = '<password>';
  reporter.add(pf.reporter);
});

// global after block
after(async () => {
  await reporter.end();
});

```

### Options

| option                         | type    | description                                   | others                            |
|--------------------------------|---------|-----------------------------------------------|-----------------------------------|
| `url`                          | string  | pactum flow server url                        | required (*if publish is `true`*) |
| `projectId`                    | string  | unique project id                             | required (*if publish is `true`*) |
| `projectName`                  | string  | unique project name                           | required (*if publish is `true`*) |
| `version`                      | string  | unique project version                        | required (*if publish is `true`*) |
| `token`                        | string  | auth token                                    | required (*if publish is `true`*) |
| `username`                     | string  | scanner username                              | required (*if token is `empty`*)  |
| `password`                     | string  | scanner password                              | required (*if token is `empty`*)  |
| `batchSize`                    | number  | pactum flow server url                        | defaults to `10`                  |
| `publish`                      | boolean | enable publishing contracts                   | defaults to `true`                |
| `dir`                          | boolean | save contracts in fs                          | defaults to `false`               |
| `dir`                          | string  | save contracts in custom path                 | defaults to `.pactum/contracts/`  |
| `checkQualityGate`             | boolean | check quality gate                            | defaults to `false`               |
| `checkQualityGateLocal`        | boolean | check quality gate locally without publishing | defaults to `false`               |
| `checkQualityGateTimeout`      | number  | check quality gate timeout                    | defaults to `10000`ms             |
| `checkQualityGateEnvironments` | string  | check quality gate against the given envs     | defaults to all envs              |
| `checkQualityGateDefaultDelay` | number  | default delay to wait for processing analysis | defaults to `2000`ms              |
| `jUnitReporter`                | boolean | enable jUnit reporter                         | defaults to false                 |
| `jUnitReporterPath`            | string  | junit reporter path                           | defaults to `contract-tests`      |

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