Add 'execute' method

master
KaKi87 1 year ago
parent 5d246a82a4
commit 3b5ec4bdfe
  1. 4
      index.js
  2. 2
      yarn.lock

@ -3,6 +3,10 @@ import childProcess from 'child_process';
import signalCliWrapper from 'signal-cli-wrapper';
export default ({ signalCliPath }) => signalCliWrapper({
execute: args => new Promise(resolve => childProcess.exec(
[signalCliPath, ...args].join(' '),
(_, stdout, stderr) => resolve([stdout.trim(), stderr.trim()].join('\n').trim())
)),
spawn: ({
args,
onData

@ -4,4 +4,4 @@
"signal-cli-wrapper@git+https://git.kaki87.net/KaKi87/signal-cli-wrapper.git":
version "0.1.0"
resolved "git+https://git.kaki87.net/KaKi87/signal-cli-wrapper.git#2f915f72e1c9855d358f7303edaefd44ce012622"
resolved "git+https://git.kaki87.net/KaKi87/signal-cli-wrapper.git#c4555736f0314540a4f01011db34ae5c2f9e247e"