0.0.26 • Published 8 years ago

bootme-json-runner v0.0.26

Weekly downloads
6
License
ISC
Repository
github
Last release
8 years ago

bootme-json-runner

Tool to use JSON or Javascript as pipeline definition.

Usage

const JsonRunner = require('bootme-json-runner')
const Bootme = require('bootme')

const registry = new Bootme.Registry()
const pipeline = new Bootme.Pipeline(registry)
const jsonRunner = new JsonRunner(pipeline)

let config = [
  {
    task: 'request',
    info: 'Retrieve the IIS position',
    config: {
      url: 'http://api.open-notify.org/iss-now.json'
    },
    hooks: {
      onInit: async state => {},
      onBefore: async state => {},
      onAfter: async state => {},
      onRollback: async state => {}
    }
  },
  {
    task: 'temp',
    info: 'Create temp file',
    config: {
      type: 'file'
    }
  },
  {
    task: 'request',
    info: 'Start request against google',
    config: {
      url: 'http://google.de',
      contentType: 'text'
    }
  }
]

jsonRunner.run(config)

Usage

  • The runner try to load a NPM module in form bootme-<task>.
  • Any value inside the task key config property is used for the task configuration and is validated.
  • You can define hooks onInit, onRollback, onBefore, onAfter.
  • The info property is used to describe the task and is used for debugging purpose.
0.0.26

8 years ago

0.0.25

8 years ago

0.0.24

8 years ago

0.0.23

8 years ago

0.0.22

8 years ago

0.0.21

8 years ago

0.0.20

8 years ago

0.0.19

8 years ago

0.0.18

8 years ago

0.0.17

8 years ago

0.0.16

8 years ago

0.0.15

8 years ago

0.0.14

8 years ago

0.0.13

8 years ago

0.0.12

8 years ago

0.0.11

8 years ago

0.0.10

8 years ago

0.0.9

8 years ago

0.0.8

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago