(_ui)
| 760 | } |
| 761 | |
| 762 | function ensureUI(_ui) { |
| 763 | let ui = _ui; |
| 764 | |
| 765 | if (!ui) { |
| 766 | // TODO: one UI (lib/cli/index.js also has one for now...) |
| 767 | const UI = require('console-ui'); |
| 768 | ui = new UI({ |
| 769 | inputStream: process.stdin, |
| 770 | outputStream: process.stdout, |
| 771 | ci: process.env.CI || /^(dumb|emacs)$/.test(process.env.TERM), |
| 772 | writeLevel: process.argv.indexOf('--silent') !== -1 ? 'ERROR' : undefined, |
| 773 | }); |
| 774 | } |
| 775 | |
| 776 | return ui; |
| 777 | } |
| 778 | |
| 779 | function findupPath(pathName) { |
| 780 | let pkgPath = findUpSync('package.json', { cwd: pathName }); |
no outgoing calls
no test coverage detected
searching dependent graphs…