@codapult/cli 0.9.5 → 0.10.0
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 +16 -12
- package/package.json +1 -1
package/dist/commands/setup.js
CHANGED
|
@@ -31,8 +31,7 @@ async function selectPrompt(iface, question, options) {
|
|
|
31
31
|
// Built-in presets for non-interactive (CI/CD) setup via --preset flag.
|
|
32
32
|
// ---------------------------------------------------------------------------
|
|
33
33
|
const BUILT_IN_PRESETS = {
|
|
34
|
-
// Showcase / marketing-only site
|
|
35
|
-
// `enableHelpCenter` stays true (powers /docs).
|
|
34
|
+
// Showcase / marketing-only site.
|
|
36
35
|
marketing: {
|
|
37
36
|
authProvider: 'none',
|
|
38
37
|
enableAuth: false,
|
|
@@ -51,17 +50,19 @@ const BUILT_IN_PRESETS = {
|
|
|
51
50
|
enableDripCampaigns: false,
|
|
52
51
|
enableApiDocs: false,
|
|
53
52
|
enableChangelog: false,
|
|
54
|
-
enableBlog: true,
|
|
55
53
|
enableWaitlist: false,
|
|
56
54
|
enableFeatureRequests: false,
|
|
57
|
-
enableCompare: true,
|
|
58
55
|
enableWebhooks: false,
|
|
59
56
|
enableAuditLog: false,
|
|
60
57
|
enableReports: false,
|
|
61
58
|
enableBranding: false,
|
|
62
59
|
enableTwoFactor: false,
|
|
63
|
-
|
|
64
|
-
|
|
60
|
+
enableGraphQL: false,
|
|
61
|
+
enableHelpCenter: true,
|
|
62
|
+
enableBlog: true,
|
|
63
|
+
enablePlugins: true,
|
|
64
|
+
enableCompare: true,
|
|
65
|
+
removeUnusedCode: true,
|
|
65
66
|
},
|
|
66
67
|
demo: {
|
|
67
68
|
authProvider: 'better-auth',
|
|
@@ -102,6 +103,7 @@ const DEFAULT_CONFIG = {
|
|
|
102
103
|
enableBranding: true,
|
|
103
104
|
enableTwoFactor: true,
|
|
104
105
|
enablePlugins: true,
|
|
106
|
+
removeUnusedCode: false,
|
|
105
107
|
};
|
|
106
108
|
function parsePresetValue(raw) {
|
|
107
109
|
const parts = raw
|
|
@@ -476,6 +478,8 @@ const FEATURE_ENV_VARS = {
|
|
|
476
478
|
enableTwoFactor: 'ENABLE_TWO_FACTOR',
|
|
477
479
|
enablePlugins: 'ENABLE_PLUGINS',
|
|
478
480
|
};
|
|
481
|
+
// codapult:prune:start {key}
|
|
482
|
+
// codapult:prune:end {key}
|
|
479
483
|
const PRUNE_MARKER_FILES = [
|
|
480
484
|
'src/app/sitemap.ts',
|
|
481
485
|
'src/app/sitemap.test.ts',
|
|
@@ -637,7 +641,7 @@ async function interactiveSetup() {
|
|
|
637
641
|
enableHelpCenter: await confirmPrompt(iface, 'Enable Documentation module?'),
|
|
638
642
|
enableExperiments: await confirmPrompt(iface, 'Enable A/B Testing?'),
|
|
639
643
|
enableFeatureRequests: await confirmPrompt(iface, 'Enable Feature Request board?'),
|
|
640
|
-
enableCompare: false,
|
|
644
|
+
enableCompare: await confirmPrompt(iface, 'Enable competitor comparison pages (/compare)?', false),
|
|
641
645
|
enableConnect: authEnabled && (await confirmPrompt(iface, 'Enable Stripe Connect (marketplace)?')),
|
|
642
646
|
enableEventStore: await confirmPrompt(iface, 'Enable Event Store (event sourcing)?'),
|
|
643
647
|
enableOtel: await confirmPrompt(iface, 'Enable OpenTelemetry tracing?'),
|
|
@@ -654,10 +658,8 @@ async function interactiveSetup() {
|
|
|
654
658
|
enableBranding: authEnabled && (await confirmPrompt(iface, 'Enable per-org branding (white-label)?')),
|
|
655
659
|
enableTwoFactor: authEnabled && (await confirmPrompt(iface, 'Enable two-factor authentication (TOTP)?')),
|
|
656
660
|
enablePlugins: await confirmPrompt(iface, 'Enable plugin marketplace (/plugins)?'),
|
|
661
|
+
removeUnusedCode: await confirmPrompt(iface, 'Remove unused module code?', false),
|
|
657
662
|
};
|
|
658
|
-
if (await confirmPrompt(iface, 'Remove unused module code?', false)) {
|
|
659
|
-
return config;
|
|
660
|
-
}
|
|
661
663
|
iface.close();
|
|
662
664
|
return config;
|
|
663
665
|
}
|
|
@@ -684,8 +686,10 @@ export async function setupCommand(options) {
|
|
|
684
686
|
else {
|
|
685
687
|
generateEnvFile(root, config);
|
|
686
688
|
}
|
|
687
|
-
|
|
688
|
-
|
|
689
|
+
if (config.removeUnusedCode) {
|
|
690
|
+
heading('Removing unused modules');
|
|
691
|
+
removeModules(root, config);
|
|
692
|
+
}
|
|
689
693
|
heading('Setting up MCP integration');
|
|
690
694
|
generateMcpConfig(root);
|
|
691
695
|
heading('Done!');
|