fleetbo-cockpit-cli 1.0.64 → 1.0.66

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 +12 -11
  2. package/package.json +1 -1
package/cli.js CHANGED
@@ -335,19 +335,11 @@ if (command === 'alex') {
335
335
  const formattedMsg = wrapText(rawMsg, 85);
336
336
  console.log('\x1b[32mAlex ❯\x1b[0m ' + formattedMsg);
337
337
 
338
- if (aiData.remainingConsultations !== undefined) {
339
- const remaining = aiData.remainingConsultations;
340
- const limit = aiData.consultationLimit || 7;
341
- const tierLabel = aiData.tier === 'senior' ? 'SENIOR' : aiData.tier === 'expert' ? 'EXPERT' : 'JUNIOR';
342
- const percent = Math.round((remaining / limit) * 100);
343
- const energyColor = percent > 20 ? '\x1b[32m' : '\x1b[31m';
344
- console.log(`\n\x1b[36m⚡ Architect Fuel:\x1b[0m ${energyColor}${percent}%\x1b[0m (${remaining}/${limit} instructions left) [${tierLabel}]\n`);
345
- }
346
338
  }
347
339
 
348
340
  // --- FILE CREATION LOGIC ---
349
341
  if (aiData.status === 'success' && aiData.moduleData) {
350
- let { fileName, code, mockFileName, mockCode, moduleName, instructions, config_offload } = aiData.moduleData;
342
+ let { fileName, code, mockFileName, mockCode, moduleName, instructions, config_offload, dataSchema } = aiData.moduleData;
351
343
 
352
344
  // 🛡️ ANTI-DUMP SHIELD (Prevents terminal flooding)
353
345
  if (moduleName) {
@@ -363,7 +355,6 @@ if (command === 'alex') {
363
355
  const filePath = path.join(fullPath, name);
364
356
  if (!fs.existsSync(fullPath)) fs.mkdirSync(fullPath, { recursive: true });
365
357
  fs.writeFileSync(filePath, content);
366
- console.log('');
367
358
  console.log(` \x1b[32m[Written]\x1b[0m ${dir}${name}`);
368
359
  };
369
360
 
@@ -406,7 +397,8 @@ if (command === 'alex') {
406
397
  code: code,
407
398
  mockFileName: mockFileName,
408
399
  mockCode: mockCode,
409
- config_offload: config_offload || { dependencies: [], permissions: [] }
400
+ config_offload: config_offload || { dependencies: [], permissions: [] },
401
+ dataSchema: dataSchema || null // 👈 LA LIGNE MAGIQUE
410
402
  }
411
403
  });
412
404
  process.stdout.write(` \x1b[32mOK\x1b[0m\n`);
@@ -414,6 +406,15 @@ if (command === 'alex') {
414
406
  process.stdout.write(` \x1b[31mFAILED\x1b[0m\n`);
415
407
  console.error(` ⚠️ OS sync failed: ${err.message}`);
416
408
  }
409
+ // 🟢 LE FUEL EST DÉPLACÉ ICI (TOUTE FIN DU TRY)
410
+ if (aiData.remainingConsultations !== undefined) {
411
+ const remaining = aiData.remainingConsultations;
412
+ const limit = aiData.consultationLimit || 7;
413
+ const tierLabel = aiData.tier.toUpperCase();
414
+ const percent = Math.round((remaining / limit) * 100);
415
+ const energyColor = percent > 20 ? '\x1b[32m' : '\x1b[31m';
416
+ console.log(`\n\x1b[36m⚡ Architect Fuel:\x1b[0m ${energyColor}${percent}%\x1b[0m (${remaining}/${limit} instructions left) [${tierLabel}]\n`);
417
+ }
417
418
  } else if (aiData.status === 'success' && !aiData.moduleData) {
418
419
  // SAFETY: If formatting is broken
419
420
  console.log(`\n\x1b[31m⚠️ Error: Alex replied, but source code could not be extracted. Try the command again.\x1b[0m\n`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fleetbo-cockpit-cli",
3
- "version": "1.0.64",
3
+ "version": "1.0.66",
4
4
  "description": "Fleetbo CLI - Build native mobile apps with React",
5
5
  "author": "Fleetbo",
6
6
  "license": "MIT",