@codapult/cli 0.10.1 → 0.10.2
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/dist/commands/setup.js +5 -6
- package/package.json +1 -1
package/dist/commands/setup.js
CHANGED
|
@@ -4,10 +4,12 @@ import { createInterface } from 'node:readline';
|
|
|
4
4
|
import { findProjectRoot } from '../utils/project.js';
|
|
5
5
|
import { ENV_EXAMPLE_FILE_NAME, ENV_FILE_NAME, } from '../utils/project-env.js';
|
|
6
6
|
import { heading, success, fail, info, dim, ask, confirm } from '../utils/ui.js';
|
|
7
|
-
async function selectPrompt(iface, question, options) {
|
|
7
|
+
async function selectPrompt(iface, question, options, lastEmptyLine = false) {
|
|
8
8
|
console.log(`\n ${question}`);
|
|
9
9
|
options.forEach((opt, i) => console.log(` ${i + 1}. ${opt}`));
|
|
10
10
|
const answer = await ask(iface, 'Choose', '1');
|
|
11
|
+
if (lastEmptyLine)
|
|
12
|
+
console.log();
|
|
11
13
|
const idx = parseInt(answer, 10) - 1;
|
|
12
14
|
return options[Math.max(0, Math.min(idx, options.length - 1))];
|
|
13
15
|
}
|
|
@@ -606,12 +608,9 @@ async function interactiveSetup() {
|
|
|
606
608
|
authProvider,
|
|
607
609
|
paymentProvider: await selectPrompt(iface, 'Payment provider:', ['stripe', 'lemonsqueezy']),
|
|
608
610
|
storageProvider: await selectPrompt(iface, 'Storage provider:', ['local', 's3']),
|
|
609
|
-
jobProvider: await selectPrompt(iface, 'Background jobs:', [
|
|
610
|
-
'memory',
|
|
611
|
-
'bullmq',
|
|
612
|
-
]),
|
|
611
|
+
jobProvider: await selectPrompt(iface, 'Background jobs:', ['memory', 'bullmq'], true),
|
|
613
612
|
enableAuth: authEnabled,
|
|
614
|
-
enableAI: await confirm(iface, '
|
|
613
|
+
enableAI: await confirm(iface, 'Enable AI Chat module?'),
|
|
615
614
|
enableBlog: await confirm(iface, 'Enable Blog module?'),
|
|
616
615
|
enableTeams: authEnabled && (await confirm(iface, 'Enable Teams/Organizations?')),
|
|
617
616
|
enableWaitlist: await confirm(iface, 'Enable Waitlist page?'),
|