| 64 | ].join('\n'); |
| 65 | |
| 66 | async function selectScope(options: InitOptions, lang: string): Promise<InstallScope> { |
| 67 | if (options.scope) return options.scope; |
| 68 | if (options.yes) return 'project'; |
| 69 | |
| 70 | return select({ |
| 71 | message: t(lang, 'installScope'), |
| 72 | choices: [ |
| 73 | { name: t(lang, 'scopeProject'), value: 'project' as const }, |
| 74 | { name: t(lang, 'scopeGlobal'), value: 'global' as const }, |
| 75 | ], |
| 76 | }); |
| 77 | } |
| 78 | |
| 79 | async function selectLanguage(options: InitOptions): Promise<LanguageConfig> { |
| 80 | if (options.language) { |