Socket
Socket
Sign inDemoInstall

@01/launcher

Package Overview
Dependencies
9
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @01/launcher

```ts import {launch} from '@1/launcher'


Version published
Weekly downloads
19
increased by1800%
Maintainers
1
Install size
336 kB
Created
Weekly downloads
 

Readme

Source

Nodejs Process Launcher

Usage

import {launch} from '@1/launcher'

await launch({
  cmds:['echo', 'Hello']
})

Options

type Options = {
  env?: string | string[];
  cmds?: string[];
  cwd?: string;
  mode?: LaunchMode;
  exitProcessOnClose?: boolean;
  silent?: boolean;
} & SpawnOptions;

env

Option to pass custom environment variable to child process.

  • env:'ENV_VAR=value'
  • env:['ENV1=v1', 'ENV2=v2']
  • env:'ENV1=v1,ENV2=v2'

cmds

Child process cmd with arguments. First element is the program location or name and remaining elements are it's arguments.

cmds: ['echo', 'Hello']

cwd

Current working directory. Path is absolute if it's starts with slash / otherwise relative.

  • cwd: './relative/path'
  • cwd: '/absolute/path'

mode

Launch mode

  • cli Exit program on exceptions
  • program Throw error on exceptions

exitProcessOnClose

Exit parent node process on close.

silent

Skip verbose logs

Keywords

FAQs

Last updated on 05 Oct 2023

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc