fleetbo-cockpit-cli 1.0.84 → 1.0.86
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/cli.js +7 -9
- package/package.json +1 -1
package/cli.js
CHANGED
|
@@ -130,7 +130,6 @@ const injectRouteIntoAppJs = (moduleName, subPath = '') => {
|
|
|
130
130
|
}
|
|
131
131
|
if (modified) {
|
|
132
132
|
fs.writeFileSync(appJsPath, content);
|
|
133
|
-
console.log(` \x1b[32m[Routed]\x1b[0m ${moduleName} injected into App.js safely.`);
|
|
134
133
|
}
|
|
135
134
|
|
|
136
135
|
return modified;
|
|
@@ -386,16 +385,17 @@ if (command === 'alex') {
|
|
|
386
385
|
if (moduleName.length > 40) moduleName = moduleName.substring(0, 40) + "...";
|
|
387
386
|
}
|
|
388
387
|
|
|
389
|
-
console.log(
|
|
388
|
+
console.log(`\n \x1b[90mArchitecting: ${moduleName}\x1b[0m`);
|
|
390
389
|
|
|
391
390
|
const writeFile = (dir, name, content) => {
|
|
392
391
|
const fullPath = path.join(process.cwd(), dir);
|
|
393
392
|
const filePath = path.join(fullPath, name);
|
|
394
393
|
if (!fs.existsSync(fullPath)) fs.mkdirSync(fullPath, { recursive: true });
|
|
395
394
|
fs.writeFileSync(filePath, content);
|
|
396
|
-
console.log(` \x1b[32m[Written]\x1b[0m ${dir}${name}`);
|
|
397
395
|
};
|
|
398
396
|
|
|
397
|
+
// --- SUPPRIME CE BLOC ENTIER ---
|
|
398
|
+
/*
|
|
399
399
|
if (instructions && Array.isArray(instructions) && instructions.length > 0) {
|
|
400
400
|
console.log('\n\x1b[33m--- GUIDE (MCI) ---\x1b[0m');
|
|
401
401
|
instructions.forEach(line => {
|
|
@@ -405,6 +405,7 @@ if (command === 'alex') {
|
|
|
405
405
|
}
|
|
406
406
|
});
|
|
407
407
|
}
|
|
408
|
+
*/
|
|
408
409
|
|
|
409
410
|
if (code && fileName) {
|
|
410
411
|
const folder = fileName.endsWith('.kt') ? 'public/native/android/' : 'src/app/';
|
|
@@ -416,14 +417,11 @@ if (command === 'alex') {
|
|
|
416
417
|
const pageName = mockFileName.replace('.jsx', '');
|
|
417
418
|
writeFile('src/app/mocks/', mockFileName, mockCode);
|
|
418
419
|
const injected = injectRouteIntoAppJs(pageName, 'mocks');
|
|
419
|
-
if (injected) {
|
|
420
|
-
console.log(` \x1b[32m[Routed]\x1b[0m App.js -> /mocks/${pageName.toLowerCase()}`);
|
|
421
|
-
}
|
|
422
420
|
}
|
|
423
421
|
|
|
424
422
|
// --- KERNEL SYNCHRONIZATION ---
|
|
425
423
|
const depsCount = config_offload?.dependencies?.length || 0;
|
|
426
|
-
process.stdout.write(` \x1b[33m[
|
|
424
|
+
process.stdout.write(` \x1b[33m[OS Sync]\x1b[0m Archiving ${moduleName} to OS (${depsCount} libs)...`);
|
|
427
425
|
|
|
428
426
|
try {
|
|
429
427
|
await axios.post(INJECT_DEPS_URL, {
|
|
@@ -674,7 +672,7 @@ else if (command === 'android' || command === 'ios') {
|
|
|
674
672
|
const targetUrl = platform === 'android' ? ANDROID_BUILD_URL : IOS_BUILD_URL;
|
|
675
673
|
|
|
676
674
|
console.log(`\n\x1b[36m⚡ FLEETBO ${platform.toUpperCase()} PROPULSION\x1b[0m`);
|
|
677
|
-
console.log(`\x1b[90m ${nativeFileCount}
|
|
675
|
+
console.log(`\x1b[90m ${nativeFileCount} fleetbo module(s) detected\x1b[0m\n`);
|
|
678
676
|
|
|
679
677
|
try {
|
|
680
678
|
// ==========================================================
|
|
@@ -729,7 +727,7 @@ else if (command === 'android' || command === 'ios') {
|
|
|
729
727
|
}
|
|
730
728
|
|
|
731
729
|
// Étape 2: Créer le ZIP
|
|
732
|
-
console.log(`\n\x1b[33m[2/3]\x1b[0m Packaging bundle +
|
|
730
|
+
console.log(`\n\x1b[33m[2/3]\x1b[0m Packaging bundle + fleetbo modules...`);
|
|
733
731
|
|
|
734
732
|
const zipBuffer = await new Promise((resolve, reject) => {
|
|
735
733
|
const chunks = [];
|