(yes)
| 148 | } |
| 149 | |
| 150 | async confirmOperation (yes) { |
| 151 | // Ask for confirmation unless --yes flag is set |
| 152 | if (yes === true) { |
| 153 | return |
| 154 | } |
| 155 | if (yes === false) { |
| 156 | throw new Error('User cancelled operation') |
| 157 | } |
| 158 | const confirm = await input.read( |
| 159 | () => _read({ prompt: 'Do you want to proceed? (y/N) ', default: 'n' }) |
| 160 | ) |
| 161 | const normalized = confirm.toLowerCase() |
| 162 | if (['y', 'yes'].includes(normalized)) { |
| 163 | return |
| 164 | } |
| 165 | throw new Error('User cancelled operation') |
| 166 | } |
| 167 | |
| 168 | getFrontendUrl ({ pkgName }) { |
| 169 | if (this.registryIsDefault) { |
no test coverage detected