orchestron
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

Orchestron

Package version

Organize project commands into one managable interface

What is it about?

Orchestron allows to add commands (aka processes) to any project, and provides interface to manage them through websockets.

Using built-in interface is not the requirement, if you can provide your own.

Example processes configuration

// orchestron.config.json
{
  "processes": [
    {
      "name": "Regenerate",
      "command": "./scripts/regenerate.sh",
      "arguments": ["*"]
    },
    {
      "name": "Build",
      "command": "npm",
      "arguments": ["run build"]
    }
  ]
}

Example processes interface

Installation

npm install --only=prod --save-dev orchestron

yarn add --dev orchestron

Usage

Orchestron can be used as standalone application, or in conjuction with already created app.

  1. In both cases you need to create orchestron.config.json file in your working directory.
  2. Then, you need to import Orchestron, and launch it:
const orchestron = require('orchestron'); // Orchestron may also be imported as any UMD-compatible module system, like ES6
const port = 9999; // select port to start app on (default is 8123)
const configLocation = '../my-config.json'; // select config lcation (default is orchestron.config.json)
orchestron({ port, configLocation });
  1. Navigate to localhost:<port> and fiddle with built-in interface.

Configuration

Orchestron after launching will look for orchestron.config.json file in working directory, that means, directory from which script is executing (not the directory the script is contained in).

Orchestron performs configuration file validation, and if it's invalid, process won't start and user will be informed about error.

Example configuration:

{
  "processes": [ // Array of processes objects
    {
      "name": "Build", // Name of the process, needs to be unique.
      "command": "npm", // Command to launch. It may be important to keep it as single-word/path.
      "arguments": ["run build"], // Array of arguments, that command will be provided with
      "autostart": false // Default: false. If set to true command will autolaunch on Orchestron launch
    }
  ]
}

Custom interface

Official documentation

One can also see how built-in interface communicates with backend via websockets in ./src/frontend/services/Api.ts file.

Known issues

For list of all known issues see GitLab Issues

Readme

Keywords

none

Package Sidebar

Install

npm i orchestron

Weekly Downloads

3

Version

0.2.0

License

MIT

Unpacked Size

267 kB

Total Files

32

Last publish

Collaborators

  • soanvig