malept / cross-spawn-promise Goto Github PK
View Code? Open in Web Editor NEWA promisified version of cross-spawn with slightly different behavior & extra options.
Home Page: https://npm.im/@malept/cross-spawn-promise
License: Apache License 2.0
A promisified version of cross-spawn with slightly different behavior & extra options.
Home Page: https://npm.im/@malept/cross-spawn-promise
License: Apache License 2.0
As a user I require the ability to capture stderr
instead of stdout
. More generally I require the ability to provide my own callback to resolve the promise, using data from both stdout
and stderr
.
Similarly, I have a need to override the default rendering of the command within error objects, in addition to what value goes to the logger. Use cases here include redacting sensitive info as well as allowing the user to render in a way that is more visible and useful. The default rendering does not put quotation marks around arg array elements, as example, and I'd prefer to have those, as well as output to more than one line. My ideal implementation would be more like JSON.stringify(args, null, 2)
.
The solution is in my fork, where I have added options for formatOutputCallback
, stringifyCommandCallback
, and returnStderr
.
The changes should necessitate a minor version change bump.
I've updated the readme and tests. I'll need to rebase, but first I'm looking for any feedback.
n/a
No response
When a spawn is launched in background, i've no way to kill it from the parent level.
cross-spawn-promise original npm library was storing in the promise object the childProcess id to let it be doable
const promise crossSpawnPromise.spawn('xxxxxx');
promise.childProcess.kill()
N/A
N/A
No response
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.