# bobflux-gen

> Generator for monkey files in bobflux application.

Latest version **0.15.1** (published 2018-11-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install bobflux-gen
pnpm add bobflux-gen
yarn add bobflux-gen
bun add bobflux-gen
```

Provides the command `bfg`.

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.15.1 |
| Published | 2018-11-02 |
| First published | 2016-01-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 187.6 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Karel Steinmetz |
| Maintainers | k.steinmetz |
| Keywords | bobflux, fun-model, bobril |

## Links

- npm: https://www.npmjs.com/package/bobflux-gen
- Repository: https://github.com/karelsteinmetz/bobflux-gen
- Homepage: https://github.com/karelsteinmetz/bobflux-gen#readme
- Issues: https://github.com/karelsteinmetz/bobflux-gen/issues
- npm.io page: https://npm.io/package/bobflux-gen

## Dependencies (3)

- [xml2js](https://npm.io/package/xml2js.md) ^0.4.17
- [commander](https://npm.io/package/commander.md) ^2.9.0
- [typescript](https://npm.io/package/typescript.md) 2.2.0

## Recent versions

- 0.15.1 (latest) — 2018-11-02
- 0.15.0 — 2017-07-25
- 0.14.1 — 2017-06-29
- 0.14.0 — 2017-06-05
- 0.13.0 — 2017-05-05
- 0.11.0 — 2016-09-16
- 0.10.1 — 2016-08-17
- 0.10.0 — 2016-08-17
- 0.9.0 — 2016-07-20
- 0.7.4 — 2016-05-19
- 0.6.4 — 2016-04-04
- 0.6.3 — 2016-03-18
- 0.6.1 — 2016-03-16
- 0.6.0 — 2016-03-16
- 0.5.4 — 2016-03-14
- … 25 more at https://npm.io/package/bobflux-gen/versions

## README

# bobflux-gen
Generator for monkey files in bobflux application.
Inspired by [bobril-build](https://github.com/Bobris/bobril-build/blob/master/README.md)

## How To Generate cursors 
1. Install bobflux-gen:
  ```
  npm i bobflux-gen -g
  ```
2. run generating:
  ```
  bfg c --appStatePath src/states.ts --appStateName YourRootStateName --parentStateKey prefix.of.your.state.in.global.state --recursively 1
    
  ```
  * "-p, --appStatePath <appStatePath>" - defines pattren for state files search (default is ./state.ts)
  * "-n, --appStateName <appStateName>" - defines root name of Application state (default is IApplicationState)
  * "-k, --parentStateKey <parentStateKey>" - defines key of parent state, it's suitable for nested states (default is empty)
  * "-r, --recursively <1/0>" - enables recursively generation for nested states (default is 0)
  * "-d, --debug <1/0>", "enables logging in debug level", /^(true|false|1|0|t|f|y|n)$/i, "0"

3. just look at all *.cursors.ts

## How To Generate functionl cursors 
1. Install bobflux-gen:
  ```
  npm i bobflux-gen -g
  ```
2. run generation:
  ```
  bfg fc --appStatePath src/states.ts --appStateName YourRootStateName --parentStateKey prefix.of.your.state.in.global.state --recursively 1
    
  ```
  * "-p, --appStatePath <appStatePath>" - defines pattren for state files search (default is ./state.ts)
  * "-n, --appStateName <appStateName>" - defines root name of Application state (default is IApplicationState)
  * "-k, --parentStateKey <parentStateKey>" - defines key of parent state, it's suitable for nested states (default is empty)
  * "-r, --recursively <1/0>" - enables recursively generation for nested states (default is 0)

3. just look at all *.f.cursors.ts

## How To Generate StateBuilders for your tests
1. Install bobflux-gen:
  ```
  npm i bobflux-gen -g
  ```
2. run generating:
  ```
  bfg b --appStatePath src/states.ts --appStateName YourRootStateName --specRelativePath ../spec/ --recursively 1
  ```
  * "-p, --appStatePath <appStatePath>" - defines pattren for state files search (default is ./state.ts)
  * "-n, --appStateName <appStateName>" - defines root name of Application state (default is IApplicationState)
  * "-s, --specRelativePath <specRelativePath>" - defines spec directory relative path from appStatePath (default is next to states)
  * "-k, --parentStateKey <parentStateKey>" - defines key of parent state, it's suitable for nested states (default is empty)
  * "-r, --recursively <1/0>" - enables recursively generation for nested states (default is 0)
  * "-d, --debug <1/0>", "enables logging in debug level", /^(true|false|1|0|t|f|y|n)$/i, "0"

3. just look at all *.builders.ts

## How To Generate OData Api
1. Install bobflux-gen:
  ```
  npm i bobflux-gen -g
  ```
2. run generating:
  ```
  bfg o -u http://localhost:8097/api/odata/$metadata -f ./axiosApi.ts
  ```
  * "-u, --metadataUlr <metadataUlr>", "defines odata metadata url
  * "-f, --targetFile <targetFile>", "defines target file where will be odata api generated
  * "-d, --debug <1/0>", "enables logging in debug level", /^(true|false|1|0|t|f|y|n)$/i, "0"

3. just look into ./axiosApi.ts

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