Socket
Socket
Sign inDemoInstall

bootme

Package Overview
Dependencies
1
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

bootme


Version published
Weekly downloads
6
increased by100%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

BootMe

A fully configurable and extendable Task Pipeline

Installation

npx -p bootme

Features

  • Handle nested queues, the order of execution is guaranteed thanks to workq package.
  • Define Before, After, Failure Hooks in the Task or after via Registry access.
  • The recover routine of the task is triggered when nested jobs fail.

Usage

// Create a Task
const task = new Bootme.Task().setName('foo').setConfig({})
task.addHook('onBefore', async function() {})
task.addHook('onAfter', async function() {})
task.addHook('onFailure', async function(err) {})

task.action(async function(parent) {
  // Nested Jobs
  parent.addJob(async function(parent) {
    parent.addJob(async function() {})
  })
})

// Collect and manipulate
const registry = new Bootme.Registry()
registry.addTask(task)
registry.addHook('foo', 'onBefore', () => console.log('Before foo'))
registry.addHook('foo', 'onAfter', () => console.log('After foo'))

// Execute
const pipeline = new Bootme.Pipeline(registry)
pipeline.execute()

Task Template

const Task = require('bootme').Task

class HttpRequestTask extends Task {
  constructor() {
    super()
    // add before, after, failure hooks
  }
  async action(parent) {
    console.log('Do something!')
    parent.addJob(async (parent) => {})
  }
}

FAQs

Last updated on 05 Nov 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc