create-fleetbo-project 1.2.27 → 1.2.28

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.
@@ -44,15 +44,20 @@ if (GENERATOR_COMMANDS.includes(command)) {
44
44
  const UPDATE_NETWORK_URL = 'https://us-central1-myapp-259bf.cloudfunctions.net/updateDeveloperNetwork';
45
45
  const PORT = 3000;
46
46
 
47
- // Gestion des processus système (Mac/Linux)
47
+ // Définir la redirection nulle selon l'OS
48
+ const NULL_DEV = process.platform === 'win32' ? '>nul 2>&1' : '2>/dev/null';
49
+
50
+ // Gestion des processus système (Mac/Linux/Windows)
48
51
  function killProcessOnPort(port) {
49
52
  try {
50
53
  if (process.platform !== 'win32') {
51
- const pid = execSync(\`lsof -ti:\${port} 2>/dev/null\`).toString().trim();
54
+ const pid = execSync(\`lsof -ti:\${port} \${NULL_DEV}\`).toString().trim();
52
55
  if (pid) {
53
- execSync(\`kill -9 \${pid.split('\\n').join(' ')} 2>/dev/null\`);
56
+ execSync(\`kill -9 \${pid.split('\\n').join(' ')} \${NULL_DEV}\`);
54
57
  }
55
58
  }
59
+ // Pas de kill port spécifique Windows ici car géré par le kill global souvent,
60
+ // ou nécessiterait netstat complexe. On laisse faire pour l'instant.
56
61
  } catch (e) {}
57
62
  }
58
63
 
@@ -60,7 +65,7 @@ function killProcessOnPort(port) {
60
65
  function killNetworkService() {
61
66
  try {
62
67
  const cmd = process.platform === 'win32' ? 'taskkill /IM cloudflared.exe /F' : 'pkill cloudflared';
63
- execSync(cmd + ' 2>/dev/null');
68
+ execSync(cmd + ' ' + NULL_DEV); // Utilisation de la variable adaptée
64
69
  } catch (e) {}
65
70
  }
66
71
 
@@ -117,6 +122,7 @@ async function runDevEnvironment() {
117
122
 
118
123
  const devServer = spawn(npmCmd, ['start'], {
119
124
  stdio: ['ignore', 'pipe', 'pipe'],
125
+ shell: true,
120
126
  env: { ...process.env, BROWSER: 'none', PORT: PORT.toString() }
121
127
  });
122
128
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-fleetbo-project",
3
- "version": "1.2.27",
3
+ "version": "1.2.28",
4
4
  "description": "Creates a new Fleetbo project.",
5
5
  "main": "install-react-template.js",
6
6
  "bin": {