New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@runnerty/module-core

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@runnerty/module-core

Runnerty module core classes

Source
npmnpm
Version
3.0.8
Version published
Maintainers
1
Created
Source

Smart Processes Management

NPM version Downloads Dependency Status code style: prettier

Runnerty: Module Core

This module exposes the classes that Runnerty modules should extend from.

Trigger example:

const Trigger = require('@runnerty/module-core').Trigger;

class intervalTrigger extends Trigger {
  constructor(chain, params) {
    super(chain, params);
  }

  start() {
    const checkCalendar = true;
    const inputValues = [];
    const customValues = {};
    setTimeout(() => {
      // Run Chain 🚀:
      try {
        this.startChain(checkCalendar, inputValues, customValues);
      } catch (err) {
        this.logger.error('startChain (intervalTrigger):', err);
      }
    }, this.params.interval);
  }
}

module.exports = intervalTrigger;

Executor example:

const Executor = require('@runnerty/module-core').Executor;

class greetingExecutor extends Executor {
  constructor(process) {
    super(process);
    this.options = {};
    this.endOptions = { end: 'end' };
  }

  async exec(options) {
    this.options = options;
    try {
      // Greeting 👋:
      this.endOptions.messageLog = this.options.greeting;
      this.end(this.endOptions);
    } catch (err) {
      this.endOptions.end = 'error';
      this.endOptions.err_output = err.message;
      this.end(this.endOptions);
    }
  }
}

module.exports = greetingExecutor;

Notifier example:

const Notifier = require('@runnerty/module-core').Notifier;

class consoleNotifier extends Notifier {
  constructor(notification) {
    super(notification);
  }
  // Notification sender 📤:
  send(notification) {
    notification.mode = notification.mode ? notification.mode.toString() : 'info';
    notification.message = notification.message ? notification.message.toString() : '';
    this.logger.log(notification.mode, notification.message);
    this.end();
  }
}

module.exports = consoleNotifier;

Keywords

runnerty

FAQs

Package last updated on 19 Jan 2022

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