create-fleetbo-project 1.2.32 → 1.2.33
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.
|
@@ -11,6 +11,7 @@ const branchName = 'master';
|
|
|
11
11
|
const archiveUrl = `https://github.com/${repoOwner}/${repoName}/archive/refs/heads/${branchName}.tar.gz`;
|
|
12
12
|
const bootstrapUrl = 'https://us-central1-myapp-259bf.cloudfunctions.net/bootstrapProject';
|
|
13
13
|
|
|
14
|
+
// --- CONTENU DU CLI INJECTÉ (MISE À JOUR) ---
|
|
14
15
|
const CLI_SCRIPT_CONTENT = `#!/usr/bin/env node
|
|
15
16
|
|
|
16
17
|
const { spawn, execSync } = require('child_process');
|
|
@@ -45,6 +46,7 @@ if (GENERATOR_COMMANDS.includes(command)) {
|
|
|
45
46
|
const UPDATE_NETWORK_URL = 'https://us-central1-myapp-259bf.cloudfunctions.net/updateDeveloperNetwork';
|
|
46
47
|
const PORT = 3000;
|
|
47
48
|
|
|
49
|
+
// Définir la redirection nulle selon l'OS
|
|
48
50
|
const NULL_DEV = process.platform === 'win32' ? '>nul 2>&1' : '2>/dev/null';
|
|
49
51
|
|
|
50
52
|
function killProcessOnPort(port) {
|
|
@@ -85,6 +87,7 @@ async function syncFirebase(keyApp, networkUrl, testerEmail) {
|
|
|
85
87
|
console.log('\\n[Fleetbo] ---------------------------------------------------');
|
|
86
88
|
console.log(\`[Fleetbo] ✅ Uplink Status: Online for \${testerEmail}\`);
|
|
87
89
|
console.log(\`[Fleetbo] 🚀 Simulator: https://fleetbo.io/studio/view/\${keyApp}\`);
|
|
90
|
+
console.log(\'[Fleetbo] 👉 Your studio is ready. You can now open the link above.\n');
|
|
88
91
|
console.log('[Fleetbo] ---------------------------------------------------\\n');
|
|
89
92
|
} catch (err) {
|
|
90
93
|
console.error(\`[Fleetbo] ⚠️ Sync Error: \${err.message}\`);
|
|
@@ -94,6 +97,7 @@ async function syncFirebase(keyApp, networkUrl, testerEmail) {
|
|
|
94
97
|
async function runDevEnvironment() {
|
|
95
98
|
console.log(\`[Fleetbo] 🛡️ Initializing Developer Environment on \${os.platform()}...\`);
|
|
96
99
|
|
|
100
|
+
// 1. NETTOYAGE PRÉVENTIF
|
|
97
101
|
killNetworkService();
|
|
98
102
|
killProcessOnPort(PORT);
|
|
99
103
|
|
|
@@ -111,6 +115,7 @@ async function runDevEnvironment() {
|
|
|
111
115
|
process.exit(1);
|
|
112
116
|
}
|
|
113
117
|
|
|
118
|
+
// 2. DÉMARRAGE DU SERVEUR LOCAL
|
|
114
119
|
console.log(\`[Fleetbo] 📦 Starting Local Server...\`);
|
|
115
120
|
const npmCmd = process.platform === 'win32' ? 'npm.cmd' : 'npm';
|
|
116
121
|
|
|
@@ -131,9 +136,13 @@ async function runDevEnvironment() {
|
|
|
131
136
|
if (!connectionStarted && (output.includes('Local:') || output.includes('Compiled successfully'))) {
|
|
132
137
|
connectionStarted = true;
|
|
133
138
|
console.log(\`\\n[Fleetbo] 🔗 Local Server Ready. Establishing Secure Uplink...\`);
|
|
139
|
+
console.log(\`\\n[Fleetbo] 🛑 STOP! DO NOT open the Studio yet.\`);
|
|
140
|
+
console.log(\`\\n[Fleetbo] ⏳ Establishing Secure Uplink... Please wait...\`);
|
|
134
141
|
|
|
142
|
+
// 3. DÉMARRAGE DE LA LIAISON (UPLINK)
|
|
135
143
|
const npxCmd = process.platform === 'win32' ? 'npx.cmd' : 'npx';
|
|
136
144
|
|
|
145
|
+
// --- MODIFICATION : Ajout de { shell: true } pour Windows ---
|
|
137
146
|
const uplink = spawn(npxCmd, ['cloudflared', 'tunnel', '--url', \`http://localhost:\${PORT}\`], { shell: true });
|
|
138
147
|
|
|
139
148
|
uplink.stderr.on('data', (chunk) => {
|