fleetbo-cockpit-cli 1.0.16 → 1.0.18

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 +10 -9
  2. package/package.json +1 -1
package/cli.js CHANGED
@@ -163,14 +163,14 @@ if (command === 'alex') {
163
163
  headers: { 'x-project-id': projectId }
164
164
  });
165
165
  let aiData = result.data;
166
+ // --- DEBUG (À SUPPRIMER APRÈS) ---
167
+ console.log('\n[DEBUG-1] typeof result.data:', typeof result.data);
168
+ console.log('[DEBUG-2] first 120 chars:', JSON.stringify(result.data).substring(0, 120));
169
+ // --- FIN DEBUG ---
166
170
  if (typeof aiData === 'string') {
167
171
  try { aiData = JSON.parse(aiData); } catch (_) {}
168
172
  }
169
- // --- DEBUG TEMPORAIRE (à supprimer après) ---
170
- console.log('[DEBUG] typeof aiData:', typeof aiData);
171
- console.log('[DEBUG] typeof message:', typeof aiData?.message);
172
- console.log('[DEBUG] message preview:', String(aiData?.message || aiData).substring(0, 100));
173
- // --- FIN DEBUG ---
173
+
174
174
  process.stdout.write('\r' + ' '.repeat(50) + '\r');
175
175
 
176
176
  if (aiData.status === 'quota_exceeded') {
@@ -204,6 +204,7 @@ console.log('[DEBUG] message preview:', String(aiData?.message || aiData).substr
204
204
  const tierLabel = aiData.tier === 'senior' ? 'SENIOR' : aiData.tier === 'expert' ? 'EXPERT' : 'JUNIOR';
205
205
  const percent = Math.round((remaining / limit) * 100);
206
206
  const energyColor = percent > 20 ? '\x1b[32m' : '\x1b[31m';
207
+ console.log('');
207
208
  console.log(`\x1b[36m⚡ Architect Fuel:\x1b[0m ${energyColor}${percent}%\x1b[0m (${remaining}/${limit} instructions left) [${tierLabel}]`);
208
209
  console.log('');
209
210
  }
@@ -242,12 +243,12 @@ console.log('[DEBUG] message preview:', String(aiData?.message || aiData).substr
242
243
  writeFile('src/app/mocks/', mockFileName, mockCode);
243
244
  const injected = injectRouteIntoAppJs(pageName, 'mocks');
244
245
  if (injected) {
245
- console.log(` \x1b[32m[Routed]\x1b[0m App.js -> /mocks/${pageName.toLowerCase()}`);
246
+ console.log(` \x1b[32m[Routed]\x1b[0m App.js -> /mocks/${pageName.toLowerCase()}`);
246
247
  }
247
248
  }
248
249
 
249
250
  if (config_offload && (config_offload.dependencies?.length > 0 || config_offload.permissions?.length > 0)) {
250
- process.stdout.write(` \x1b[33m[Cloud Inject]\x1b[0m Syncing ${config_offload.dependencies?.length || 0} libs to Factory...`);
251
+ process.stdout.write(` \x1b[33m[Cloud Inject]\x1b[0m Syncing ${config_offload.dependencies?.length || 0} libs to Factory...`);
251
252
  try {
252
253
  await axios.post(INJECT_DEPS_URL, {
253
254
  projectId: projectId,
@@ -256,10 +257,10 @@ console.log('[DEBUG] message preview:', String(aiData?.message || aiData).substr
256
257
  config_offload: config_offload
257
258
  }
258
259
  });
259
- process.stdout.write(` \x1b[32mOK\x1b[0m\n`);
260
+ process.stdout.write(` \x1b[32mOK\x1b[0m\n`);
260
261
  } catch (err) {
261
262
  process.stdout.write(` \x1b[31mFAILED\x1b[0m\n`);
262
- console.error(` ⚠️ Config sync failed: ${err.message}`);
263
+ console.error(` ⚠️ Config sync failed: ${err.message}`);
263
264
  }
264
265
  }
265
266
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fleetbo-cockpit-cli",
3
- "version": "1.0.16",
3
+ "version": "1.0.18",
4
4
  "description": "Fleetbo CLI - Build native mobile apps with React",
5
5
  "author": "Fleetbo",
6
6
  "license": "MIT",