create-propelkit 1.0.2 → 1.0.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.
- package/package.json +1 -1
- package/src/index.js +7 -44
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -2,9 +2,8 @@ const chalk = require('chalk');
|
|
|
2
2
|
const path = require('path');
|
|
3
3
|
const fs = require('fs');
|
|
4
4
|
const inquirer = require('inquirer');
|
|
5
|
-
const { detectCLIs, displayCLIStatus, getCLIByName
|
|
5
|
+
const { detectCLIs, displayCLIStatus, getCLIByName } = require('./cli-detector');
|
|
6
6
|
const { handleScenario } = require('./scenarios');
|
|
7
|
-
const { runDesignFlow } = require('./design-flow');
|
|
8
7
|
const { runSetupWizard } = require('./setup-wizard');
|
|
9
8
|
const { launchClaude } = require('./launcher');
|
|
10
9
|
const { validateLicense } = require('./license-validator');
|
|
@@ -14,7 +13,7 @@ async function main() {
|
|
|
14
13
|
// Step 1: Welcome
|
|
15
14
|
messages.welcome();
|
|
16
15
|
|
|
17
|
-
// Step 2: LICENSE VALIDATION
|
|
16
|
+
// Step 2: LICENSE VALIDATION
|
|
18
17
|
console.log('');
|
|
19
18
|
const { licenseKey } = await inquirer.prompt([
|
|
20
19
|
{
|
|
@@ -41,7 +40,7 @@ async function main() {
|
|
|
41
40
|
messages.proLicenseValid();
|
|
42
41
|
}
|
|
43
42
|
|
|
44
|
-
// Step 3: Detect CLIs
|
|
43
|
+
// Step 3: Detect CLIs (quick check)
|
|
45
44
|
messages.detectingCLIs();
|
|
46
45
|
const clis = await detectCLIs();
|
|
47
46
|
displayCLIStatus(clis, chalk);
|
|
@@ -53,25 +52,10 @@ async function main() {
|
|
|
53
52
|
process.exit(1);
|
|
54
53
|
}
|
|
55
54
|
|
|
56
|
-
// Step 5:
|
|
57
|
-
const supabaseCli = getCLIByName(clis, 'supabase');
|
|
58
|
-
const ghCli = getCLIByName(clis, 'gh');
|
|
59
|
-
|
|
60
|
-
if (!supabaseCli.installed) {
|
|
61
|
-
messages.supabaseBenefits();
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
if (!ghCli.installed) {
|
|
65
|
-
messages.githubBenefits();
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
// Step 6: GitHub connection (for Pro tier, or if user wants it for Starter)
|
|
69
|
-
const useGitHub = tier === 'pro' ? await askGitHubConnection(ghCli, chalk) : false;
|
|
70
|
-
|
|
71
|
-
// Step 7: Clone scenario (pass tier first)
|
|
55
|
+
// Step 5: Clone scenario
|
|
72
56
|
let projectDir;
|
|
73
57
|
try {
|
|
74
|
-
projectDir = await handleScenario(tier, clis,
|
|
58
|
+
projectDir = await handleScenario(tier, clis, false); // useGitHub = false, AI PM will handle
|
|
75
59
|
} catch (error) {
|
|
76
60
|
if (error.message === 'Aborted by user') {
|
|
77
61
|
console.log('');
|
|
@@ -81,34 +65,13 @@ async function main() {
|
|
|
81
65
|
throw error;
|
|
82
66
|
}
|
|
83
67
|
|
|
84
|
-
// Step
|
|
68
|
+
// Step 6: TIER-SPECIFIC POST-CLONE FLOW
|
|
85
69
|
if (tier === 'starter') {
|
|
86
70
|
// Starter: Run setup wizard, then done
|
|
87
71
|
await runSetupWizard(projectDir);
|
|
88
72
|
messages.starterWizardComplete();
|
|
89
73
|
} else {
|
|
90
|
-
// Pro:
|
|
91
|
-
console.log('');
|
|
92
|
-
const designResult = await runDesignFlow(
|
|
93
|
-
path.basename(projectDir),
|
|
94
|
-
projectDir
|
|
95
|
-
);
|
|
96
|
-
|
|
97
|
-
// Store design result in config.json
|
|
98
|
-
const configPath = path.join(projectDir, '.planning', 'config.json');
|
|
99
|
-
let config = {};
|
|
100
|
-
if (fs.existsSync(configPath)) {
|
|
101
|
-
config = JSON.parse(fs.readFileSync(configPath, 'utf-8'));
|
|
102
|
-
}
|
|
103
|
-
config.designFlow = designResult;
|
|
104
|
-
|
|
105
|
-
const planningDir = path.dirname(configPath);
|
|
106
|
-
if (!fs.existsSync(planningDir)) {
|
|
107
|
-
fs.mkdirSync(planningDir, { recursive: true });
|
|
108
|
-
}
|
|
109
|
-
fs.writeFileSync(configPath, JSON.stringify(config, null, 2) + '\n');
|
|
110
|
-
|
|
111
|
-
// Launch Claude Code
|
|
74
|
+
// Pro: Launch Claude Code directly - AI PM handles everything
|
|
112
75
|
messages.proLaunchingAIPM(projectDir);
|
|
113
76
|
|
|
114
77
|
// Give user time to read the instructions
|