dalsh2
v0.0.77
Published
## 1. constructor()
Downloads
44
Readme
API
1. constructor()
config
env
const dalsh = new Dalsh({
env: {
PATH: <path array to prepend>
}
})
2. request()
await dalsh.request(req, callback)
req
: request objecton
: globally monitor events at any timesequence
: monitor events in a certain sequence.message
: commandpath
: 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()