@sentry/cli
Advanced tools
Comparing version 1.30.0 to 1.30.1
# Changelog | ||
## sentry-cli 1.30.1 | ||
* Expose `execute` on SentryCli js wrapper | ||
## sentry-cli 1.30.0 | ||
@@ -4,0 +8,0 @@ |
@@ -128,14 +128,25 @@ 'use strict'; | ||
* @param {string[]} args Command line arguments passed to `sentry-cli`. | ||
* @param {boolean} live We inherit stdio to display `sentry-cli` output directly. | ||
* @returns {Promise.<string>} A promise that resolves to the standard output. | ||
*/ | ||
function execute(args) { | ||
function execute(args, live) { | ||
const env = Object.assign({}, process.env); | ||
return new Promise((resolve, reject) => { | ||
childProcess.execFile(getPath(), args, { env }, (err, stdout) => { | ||
if (err) { | ||
reject(err); | ||
} else { | ||
resolve(stdout); | ||
} | ||
}); | ||
if (live === true) { | ||
const pid = childProcess.spawn(getPath(), args, { | ||
env, | ||
stdio: 'inherit', | ||
}); | ||
pid.on('exit', () => { | ||
resolve(); | ||
}); | ||
} else { | ||
childProcess.execFile(getPath(), args, { env }, (err, stdout) => { | ||
if (err) { | ||
reject(err); | ||
} else { | ||
resolve(stdout); | ||
} | ||
}); | ||
} | ||
}); | ||
@@ -142,0 +153,0 @@ } |
@@ -51,2 +51,12 @@ 'use strict'; | ||
} | ||
/** | ||
* See {helper.execute} docs. | ||
* @param {string[]} args Command line arguments passed to `sentry-cli`. | ||
* @param {boolean} live We inherit stdio to display `sentry-cli` output directly. | ||
* @returns {Promise.<string>} A promise that resolves to the standard output. | ||
*/ | ||
execute(args, live) { | ||
return this.helper.execute(args, live); | ||
} | ||
} | ||
@@ -53,0 +63,0 @@ |
{ | ||
"name": "@sentry/cli", | ||
"version": "1.30.0", | ||
"version": "1.30.1", | ||
"description": "A command line utility to work with Sentry. https://docs.sentry.io/hosted/learn/cli/", | ||
@@ -5,0 +5,0 @@ "scripts": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
39431
459