create-fleetbo-project 1.2.36 → 1.2.38

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.
@@ -152,13 +152,33 @@ function killNetworkService() {
152
152
  } catch (e) {}
153
153
  }
154
154
 
155
+ // Variable de verrouillage globale
156
+ let isExiting = false;
157
+
155
158
  async function cleanupAndExit(code = 0) {
156
- console.log('\\n[Fleetbo] 🛑 Stopping development environment...');
159
+ // Si on est déjà en train de sortir, on ignore les autres signaux
160
+ if (isExiting) return;
161
+ isExiting = true;
162
+
163
+ console.log('\n[Fleetbo] 🛑 Stopping development environment...');
164
+
165
+ try {
166
+ // Nettoyage de l'Uplink dans Firestore
167
+ await axios.post(UPDATE_NETWORK_URL, {
168
+ keyApp: keyApp,
169
+ networkUrl: '',
170
+ tester: testerEmail
171
+ });
172
+ console.log('[Fleetbo] 🧊 Uplink cleaned successfully.');
173
+ } catch (e) {
174
+ // On ne bloque pas si le réseau échoue à la fermeture
175
+ }
176
+
157
177
  killNetworkService();
158
178
  killProcessOnPort(PORT);
159
179
  process.exit(code);
160
180
  }
161
-
181
+ // Les écouteurs restent les mêmes, mais la fonction gère maintenant le verrou
162
182
  process.on('SIGINT', () => cleanupAndExit(0));
163
183
  process.on('SIGTERM', () => cleanupAndExit(0));
164
184
 
@@ -171,7 +191,7 @@ async function syncFirebase(keyApp, networkUrl, testerEmail) {
171
191
  });
172
192
  console.log('\\n[Fleetbo] ---------------------------------------------------\\n');
173
193
  console.log(\`[Fleetbo] ✅ Uplink Status: Online for \${testerEmail}\`);
174
- console.log(\`[Fleetbo] 🚀 Simulator: https://fleetbo.io/studio/view/\${keyApp}\`);
194
+ console.log(\`[Fleetbo] 🚀 Fleetbo Studio: https://fleetbo.io/studio/\${keyApp}\`);
175
195
  console.log(\'[Fleetbo] 👉 Your studio is ready. You can now open the link above.\');
176
196
  console.log('\\n[Fleetbo] ---------------------------------------------------\\n');
177
197
  } catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-fleetbo-project",
3
- "version": "1.2.36",
3
+ "version": "1.2.38",
4
4
  "description": "Creates a new Fleetbo project.",
5
5
  "main": "install-react-template.js",
6
6
  "bin": {