dalsh2

0.0.77 • Public • Published

API

1. constructor()

  • config
    • env
const dalsh = new Dalsh({
  env: {
    PATH: <path array to prepend>
  }
})

2. request()

await dalsh.request(req, callback)
  • req: request object
    • on: globally monitor events at any time
    • sequence: monitor events in a certain sequence.
    • message: command
    • path: execution path
  • callback: streams data from the terminal in realtime

Example

let response = await dalsh.request({
  message: "dls -las",
  on: {
  },
  sequence: {
  },
}, (stream) => {
  console.log(stream)
})

3. prompt()

get the prompt

await dalsh.prompt()

Readme

Keywords

none

Package Sidebar

Install

npm i dalsh2

Weekly Downloads

0

Version

0.0.77

License

MIT

Unpacked Size

65.6 kB

Total Files

13

Last publish

Collaborators

  • cocktailpeanut