@wabot-dev/create 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/create-project.mjs +7 -3
- package/package.json +1 -1
package/lib/create-project.mjs
CHANGED
|
@@ -350,9 +350,13 @@ async function writeEnvFile(targetDir, setup, t) {
|
|
|
350
350
|
|
|
351
351
|
lines.push(t('env.providersComment'))
|
|
352
352
|
for (const provider of AI_PROVIDERS) {
|
|
353
|
+
const apiKey = setup.providerKeys[provider.envKey]
|
|
353
354
|
const selected = setup.providers.includes(provider.value)
|
|
354
|
-
|
|
355
|
-
|
|
355
|
+
// The framework refuses to boot on a key that is defined but empty, so a
|
|
356
|
+
// provider chosen without a key ships commented out like an unchosen one —
|
|
357
|
+
// the project still runs, and printNextSteps warns which keys to fill in.
|
|
358
|
+
if (selected && apiKey) {
|
|
359
|
+
lines.push(`${provider.envKey}=${apiKey}`)
|
|
356
360
|
} else {
|
|
357
361
|
lines.push(`# ${provider.envKey}=`)
|
|
358
362
|
}
|
|
@@ -449,6 +453,6 @@ function printNextSteps(projectName, setup, t) {
|
|
|
449
453
|
console.log(chalk.cyan(`\n cd ${projectName}`))
|
|
450
454
|
console.log(chalk.cyan(' npm run dev:watch'))
|
|
451
455
|
console.log(t('next.cmdChannelHint'))
|
|
452
|
-
console.log(chalk.cyan('\n npm run cmd
|
|
456
|
+
console.log(chalk.cyan('\n npm run cmd'))
|
|
453
457
|
console.log(t('next.happy'))
|
|
454
458
|
}
|