(exec)
| 8 | |
| 9 | const executor = { |
| 10 | async windows (exec) { |
| 11 | const ret = await exec(['npm config list --json'], { type: 'cmd' }) |
| 12 | if (ret != null) { |
| 13 | const json = ret.substring(ret.indexOf('{')) |
| 14 | return jsonApi.parse(json) |
| 15 | } |
| 16 | return {} |
| 17 | }, |
| 18 | async linux (exec, { port }) { |
| 19 | throw new Error('暂未实现此功能') |
| 20 | }, |