()
| 15 | const DEV_FRONTEND_URL = 'http://127.0.0.1:3000/' |
| 16 | |
| 17 | async function runNpmLogin(): Promise<boolean> { |
| 18 | const { command, args } = resolveNpmProcessCommand(['login', `--registry=${NPM_REGISTRY_URL}`]) |
| 19 | const child = spawn(command, args, { stdio: 'inherit' }) |
| 20 | |
| 21 | const { promise, resolve } = Promise.withResolvers<boolean>() |
| 22 | |
| 23 | child.on('close', code => { |
| 24 | resolve(code === 0) |
| 25 | }) |
| 26 | |
| 27 | child.on('error', () => { |
| 28 | resolve(false) |
| 29 | }) |
| 30 | |
| 31 | return promise |
| 32 | } |
| 33 | |
| 34 | const main = defineCommand({ |
| 35 | meta: { |
no test coverage detected