fleetbo-cockpit-cli 1.0.175 → 1.0.176

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.
Files changed (2) hide show
  1. package/cli.js +19 -1
  2. package/package.json +1 -1
package/cli.js CHANGED
@@ -48,6 +48,23 @@ const projectId = process.env.VITE_FLEETBO_ENTERPRISE_ID;
48
48
  const keyApp = process.env.VITE_FLEETBO_KEY_APP;
49
49
  const testerEmail = process.env.VITE_FLEETBO_TESTER_EMAIL;
50
50
 
51
+ // ═══════════════════════════════════════════════════════
52
+ // DÉTECTION AUTOMATIQUE DU FRAMEWORK JS (React ou Vue)
53
+ // Lit package.json — aucune configuration manuelle requise
54
+ // ═══════════════════════════════════════════════════════
55
+ const detectFramework = () => {
56
+ try {
57
+ const pkgPath = path.join(process.cwd(), 'package.json');
58
+ if (!fs.existsSync(pkgPath)) return 'react';
59
+ const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
60
+ const deps = { ...pkg.dependencies, ...pkg.devDependencies };
61
+ if (deps['vue'] || deps['@vue/core'] || deps['nuxt']) return 'vue';
62
+ return 'react';
63
+ } catch (e) {
64
+ return 'react';
65
+ }
66
+ };
67
+ const JS_FRAMEWORK = detectFramework();
51
68
 
52
69
  if (!projectId) {
53
70
  console.error('\n\x1b[31m❌ Error: Project ID missing in .env.\x1b[0m\n');
@@ -355,7 +372,7 @@ if (command === 'alex') {
355
372
 
356
373
  const promptWithTime = prompt + `\n\n[SYSTEM INFO: The exact current timestamp is ${exactTime}. Use it STRICTLY for your signature '// ⚡ Forged by Alex on...' at the bottom of your files.]`;
357
374
 
358
- const result = await axios.post(ALEX_ENGINE_URL, { prompt: promptWithTime, projectType: 'android' }, {
375
+ const result = await axios.post(ALEX_ENGINE_URL, { prompt: promptWithTime, projectType: 'android', jsFramework: JS_FRAMEWORK }, {
359
376
  headers: { 'x-project-id': projectId }
360
377
  });
361
378
 
@@ -594,6 +611,7 @@ if (command === 'alex') {
594
611
  // AI ENGINE STATUS
595
612
  console.log('');
596
613
  console.log(`\x1b[32m✓\x1b[0m ${providerLabel} \x1b[90m· ${modelLabel}\x1b[0m`);
614
+ console.log(`\x1b[32m✓\x1b[0m ${JS_FRAMEWORK === 'vue' ? '\x1b[32mVue.js\x1b[0m' : '\x1b[36mReact\x1b[0m'} \x1b[90m· JS Framework detected\x1b[0m`);
597
615
 
598
616
  // FORGE CAPABILITIES
599
617
  console.log('');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fleetbo-cockpit-cli",
3
- "version": "1.0.175",
3
+ "version": "1.0.176",
4
4
  "description": "Fleetbo CLI - Build native mobile apps with React",
5
5
  "author": "Fleetbo",
6
6
  "license": "MIT",