@codapult/cli 0.10.2 → 0.10.3

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.
@@ -4,15 +4,17 @@ 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, lastEmptyLine = false) {
7
+ async function selectPrompt(iface, question, options) {
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();
13
11
  const idx = parseInt(answer, 10) - 1;
14
12
  return options[Math.max(0, Math.min(idx, options.length - 1))];
15
13
  }
14
+ function line() {
15
+ console.log();
16
+ return true;
17
+ }
16
18
  // ---------------------------------------------------------------------------
17
19
  // Built-in presets for non-interactive (CI/CD) setup via --preset flag.
18
20
  // ---------------------------------------------------------------------------
@@ -608,9 +610,12 @@ async function interactiveSetup() {
608
610
  authProvider,
609
611
  paymentProvider: await selectPrompt(iface, 'Payment provider:', ['stripe', 'lemonsqueezy']),
610
612
  storageProvider: await selectPrompt(iface, 'Storage provider:', ['local', 's3']),
611
- jobProvider: await selectPrompt(iface, 'Background jobs:', ['memory', 'bullmq'], true),
613
+ jobProvider: await selectPrompt(iface, 'Background jobs:', [
614
+ 'memory',
615
+ 'bullmq',
616
+ ]),
612
617
  enableAuth: authEnabled,
613
- enableAI: await confirm(iface, 'Enable AI Chat module?'),
618
+ enableAI: line() && (await confirm(iface, 'Enable AI Chat module?')),
614
619
  enableBlog: await confirm(iface, 'Enable Blog module?'),
615
620
  enableTeams: authEnabled && (await confirm(iface, 'Enable Teams/Organizations?')),
616
621
  enableWaitlist: await confirm(iface, 'Enable Waitlist page?'),
@@ -637,7 +642,7 @@ async function interactiveSetup() {
637
642
  enableBranding: authEnabled && (await confirm(iface, 'Enable per-org branding (white-label)?')),
638
643
  enableTwoFactor: authEnabled && (await confirm(iface, 'Enable two-factor authentication (TOTP)?')),
639
644
  enablePlugins: await confirm(iface, 'Enable plugin marketplace (/plugins)?'),
640
- removeUnusedCode: await confirm(iface, '\nRemove unused module code?', false),
645
+ removeUnusedCode: line() && (await confirm(iface, 'Remove unused module code?', false)),
641
646
  };
642
647
  iface.close();
643
648
  return config;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codapult/cli",
3
- "version": "0.10.2",
3
+ "version": "0.10.3",
4
4
  "description": "Codapult CLI — manage, update, and diagnose your Codapult SaaS project",
5
5
  "license": "MIT",
6
6
  "packageManager": "pnpm@11.6.0",