create-fleetbo-project 1.2.73 → 1.2.75
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/install-react-template.js +25 -11
- package/package.json +1 -1
|
@@ -24,6 +24,7 @@ const UPDATE_NETWORK_URL = 'https://us-central1-myapp-259bf.cloudfunctions.net/u
|
|
|
24
24
|
const ALEX_ENGINE_URL = "https://us-central1-myapp-259bf.cloudfunctions.net/generateNativeModule";
|
|
25
25
|
const APP_JS_PATH = path.join(process.cwd(), 'src/App.js');
|
|
26
26
|
const PORT = 3000;
|
|
27
|
+
let uplinkProcess = null;
|
|
27
28
|
const args = process.argv.slice(2);
|
|
28
29
|
const command = args[0];
|
|
29
30
|
process.env.DOTENV_SILENT = 'true';
|
|
@@ -147,7 +148,7 @@ if (command === 'alex') {
|
|
|
147
148
|
const tierLabel = aiData.tier === 'pro' ? 'SENIOR' : 'JUNIOR';
|
|
148
149
|
const percent = Math.round((remaining / limit) * 100);
|
|
149
150
|
const energyColor = percent > 20 ? '\\x1b[32m' : '\\x1b[31m';
|
|
150
|
-
console.log(\`\\x1b[36m⚡ Architect Fuel:\\x1b[0m \${energyColor}\${percent}%\x1b[0m (\${remaining}/\${limit}
|
|
151
|
+
console.log(\`\\x1b[36m⚡ Architect Fuel:\\x1b[0m \${energyColor}\${percent}%\x1b[0m (\${remaining}/\${limit} instructions left) [\${tierLabel}]\`);
|
|
151
152
|
}
|
|
152
153
|
}
|
|
153
154
|
if (aiData.status === 'success' && aiData.moduleData) {
|
|
@@ -309,12 +310,19 @@ function killProcessOnPort(port) {
|
|
|
309
310
|
}
|
|
310
311
|
} catch (e) {}
|
|
311
312
|
}
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
313
|
+
const killNetworkService = () => {
|
|
314
|
+
// On tue UNIQUEMENT le processus enfant que nous avons lancé
|
|
315
|
+
if (uplinkProcess) {
|
|
316
|
+
try {
|
|
317
|
+
uplinkProcess.kill('SIGINT'); // On demande poliment de s'arrêter
|
|
318
|
+
console.log('[Fleetbo] Engine closed.');
|
|
319
|
+
} catch (e) {
|
|
320
|
+
console.error('[Fleetbo] Error closing tunnel:', e.message);
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
};
|
|
324
|
+
|
|
325
|
+
|
|
318
326
|
let isExiting = false;
|
|
319
327
|
async function cleanupAndExit(code = 0) {
|
|
320
328
|
if (isExiting) return;
|
|
@@ -371,10 +379,16 @@ async function runDevEnvironment() {
|
|
|
371
379
|
console.log('[Fleetbo] ---------------------------------------------------');
|
|
372
380
|
|
|
373
381
|
const npxCmd = process.platform === 'win32' ? 'npx.cmd' : 'npx';
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
382
|
+
uplinkProcess = spawn(npxCmd, [
|
|
383
|
+
'cloudflared',
|
|
384
|
+
'tunnel',
|
|
385
|
+
'--url', \`http://127.0.0.1:\${PORT}\`,
|
|
386
|
+
'--http-host-header', \`127.0.0.1:\${PORT}\`
|
|
387
|
+
], { shell: true });
|
|
388
|
+
uplinkProcess.stderr.on('data', (chunk) => {
|
|
389
|
+
const text = chunk.toString();
|
|
390
|
+
const match = text.match(/https:\\/\\/[a-zA-Z0-9-]+\\.trycloudflare\\.com/);
|
|
391
|
+
if (match) syncFirebase(process.env.REACT_KEY_APP, match[0], process.env.REACT_APP_TESTER_EMAIL);
|
|
378
392
|
});
|
|
379
393
|
}
|
|
380
394
|
});
|