MCPcopy Index your code
hub / github.com/react/create-react-app / execaSafe

Function execaSafe

test/fixtures/__shared__/util/scripts.js:7–23  ·  view source on GitHub ↗
(...args)

Source from the content-addressed store, hash-verified

5const waitForLocalhost = require('wait-for-localhost');
6
7function execaSafe(...args) {
8 return execa(...args)
9 .then(({ stdout, stderr, ...rest }) => ({
10 fulfilled: true,
11 rejected: false,
12 stdout: stripAnsi(stdout),
13 stderr: stripAnsi(stderr),
14 ...rest,
15 }))
16 .catch(err => ({
17 fulfilled: false,
18 rejected: true,
19 reason: err,
20 stdout: '',
21 stderr: stripAnsi(err.message.split('\n').slice(2).join('\n')),
22 }));
23}
24
25module.exports = class ReactScripts {
26 constructor(root) {

Callers 3

startMethod · 0.85
buildMethod · 0.85
testMethod · 0.85

Calls

no outgoing calls

Tested by 1

testMethod · 0.68