create-fleetbo-project 1.2.61 → 1.2.63

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.
@@ -36,6 +36,23 @@ dotenv.config({ path: envPath, quiet: true });
36
36
  const projectId = process.env.REACT_APP_ENTERPRISE_ID;
37
37
  const keyApp = process.env.REACT_KEY_APP;
38
38
  const testerEmail = process.env.REACT_APP_TESTER_EMAIL;
39
+ const wrapText = (text, maxWidth) => {
40
+ if (!text) return "";
41
+ const words = text.split(' ');
42
+ let lines = [];
43
+ let currentLine = words[0];
44
+
45
+ for (let i = 1; i < words.length; i++) {
46
+ if (currentLine.length + 1 + words[i].length <= maxWidth) {
47
+ currentLine += " " + words[i];
48
+ } else {
49
+ lines.push(currentLine);
50
+ currentLine = words[i];
51
+ }
52
+ }
53
+ lines.push(currentLine);
54
+ return lines.join('\n ');
55
+ };
39
56
  const checkGitSecurity = () => {
40
57
  const gitDir = path.join(process.cwd(), '.git');
41
58
  const gitignorePath = path.join(process.cwd(), '.gitignore');
@@ -109,7 +126,8 @@ if (command === 'alex') {
109
126
  }
110
127
  if (aiData.status === 'success' || aiData.status === 'message' || aiData.status === 'complex_refusal') {
111
128
  console.log('');
112
- console.log(\`\\x1b[32mAlex ❯\\x1b[0m \${aiData.message || "I'm ready."}\`);
129
+ const rawMsg = aiData.message || "I'm ready.";
130
+ const formattedMsg = wrapText(rawMsg, 85);
113
131
  if (aiData.remainingTokens !== undefined) {
114
132
  const remaining = aiData.remainingTokens;
115
133
  const limit = aiData.limit || 2500;
@@ -289,23 +307,25 @@ let isExiting = false;
289
307
  async function cleanupAndExit(code = 0) {
290
308
  if (isExiting) return;
291
309
  isExiting = true;
292
- console.log('\\n[Fleetbo] 🛑 Stopping environment...');
310
+ console.log('\\n\\x1b[33m[Fleetbo] 🛑 Stopping environment & Cleaning Uplink...\\x1b[0m');
293
311
  try {
294
312
  await axios.post(UPDATE_NETWORK_URL, { keyApp, networkUrl: '', tester: testerEmail });
295
- } catch (e) {}
313
+ console.log('\\x1b[32m[Fleetbo] Network status reset to offline.\\x1b[0m');
314
+ } catch (e) {
315
+ console.error('[Fleetbo] Network cleanup warning:', e.message);
316
+ }
296
317
  killNetworkService();
297
318
  killProcessOnPort(PORT);
319
+ console.log('[Fleetbo] Bye.');
298
320
  process.exit(code);
299
321
  }
300
322
  process.on('SIGINT', () => cleanupAndExit(0));
301
323
  process.on('SIGTERM', () => cleanupAndExit(0));
302
324
  async function syncFirebase(keyApp, networkUrl, testerEmail) {
303
325
  try {
304
- await axios.post(UPDATE_NETWORK_URL, { keyApp, networkUrl, tester: testerEmail });
305
-
326
+ await axios.post(UPDATE_NETWORK_URL, { keyApp, networkUrl, tester: testerEmail });
306
327
  console.log(\`\\n\\x1b[32m[Fleetbo]\\x1b[0m -------------------------------------------------------------\`);
307
328
  console.log('\\x1b[32m[Fleetbo] GO GO GO ! FLEETBO STUDIO IS READY \\x1b[0m');
308
- console.log(\`\\x1b[32m[Fleetbo] Link: https://fleetbo.io/studio/\${keyApp}\\x1b[0m\`);
309
329
  console.log('\\x1b[32m[Fleetbo] You can now start coding and previewing in Studio. 🚀\\x1b[0m');
310
330
  console.log(\`\\x1b[32m[Fleetbo]\\x1b[0m -------------------------------------------------------------\`);
311
331
  } catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-fleetbo-project",
3
- "version": "1.2.61",
3
+ "version": "1.2.63",
4
4
  "description": "Creates a new Fleetbo project.",
5
5
  "main": "install-react-template.js",
6
6
  "bin": {