| 63 | response = response.data |
| 64 | |
| 65 | function step(name, ctx){ |
| 66 | console.log(chalk.bold(`== ${name} ==`)) |
| 67 | if(ctx.stdout){ |
| 68 | console.log(" ",chalk.bold(`STDOUT`)) |
| 69 | console.log(" ",ctx.stdout.replace(/\n/g,'\n ')) |
| 70 | } |
| 71 | if(ctx.stderr){ |
| 72 | console.log(chalk.bold(`STDERR`)) |
| 73 | console.log(" ",ctx.stderr.replace(/\n/g,'\n ')) |
| 74 | } |
| 75 | |
| 76 | if(ctx.code) |
| 77 | console.log( |
| 78 | chalk.bold(`Exit Code:`), |
| 79 | chalk.bold[ctx.code > 0 ? 'red' : 'green'](ctx.code) |
| 80 | ) |
| 81 | if(ctx.signal) |
| 82 | console.log( |
| 83 | chalk.bold(`Signal:`), |
| 84 | chalk.bold.yellow(ctx.signal) |
| 85 | ) |
| 86 | } |
| 87 | |
| 88 | |
| 89 | |