create-fleetbo-project 1.2.86 → 1.2.88

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.
@@ -103,11 +103,11 @@ async function setupProject() {
103
103
  }
104
104
  fs.mkdirSync(projectDir);
105
105
 
106
- console.log(' [1/6] Downloading Fleetbo Core Engine...');
106
+ console.log(' [1/8] Downloading Fleetbo Core Engine...');
107
107
  const archivePath = path.join(projectDir, 'engine.tar.gz');
108
108
  await downloadEngine(archiveUrl, archivePath);
109
109
 
110
- console.log(' [2/6] Scaffolding project structure...');
110
+ console.log(' [2/8] Scaffolding project structure...');
111
111
  try {
112
112
  execSync(`tar -xf "${archivePath}" -C "${projectDir}" --strip-components=1`, { stdio: 'ignore' });
113
113
  fs.unlinkSync(archivePath);
@@ -117,7 +117,7 @@ async function setupProject() {
117
117
 
118
118
  process.chdir(projectDir);
119
119
 
120
- console.log(' [2.5/6] Standardizing Architecture (src/app)...');
120
+ console.log(' [3/8] Standardizing Architecture (src/app)...');
121
121
  const oldPath = path.join(projectDir, 'src/pages');
122
122
  const newPath = path.join(projectDir, 'src/app');
123
123
 
@@ -136,21 +136,19 @@ async function setupProject() {
136
136
  }
137
137
  }
138
138
 
139
- console.log(' [3/6] Authenticating with Fleetbo Cloud...');
139
+ console.log(' [4/8] Authenticating with Fleetbo Cloud...');
140
140
  const keys = await fetchProjectKeys(bootstrapTokenArg);
141
141
  if (!keys.enterpriseId) throw new Error("Invalid keys.");
142
142
 
143
- console.log(' [4/6] Configuring environment...');
144
- const envContent = `REACT_APP_FLEETBO_DB_KEY=${keys.fleetboDBKey}
145
- REACT_APP_ENTERPRISE_ID=${keys.enterpriseId}
146
- REACT_KEY_APP=${projectName}
147
- REACT_APP_TESTER_EMAIL=${userEmailArg}
148
- DANGEROUSLY_DISABLE_HOST_CHECK=true
149
- WDS_SOCKET_PORT=0`;
143
+ console.log(' [5/8] Configuring environment...');
144
+ const envContent = `FLEETBO_APP_DB_KEY=${keys.fleetboDBKey}
145
+ FLEETBO_APP_ENTERPRISE_ID=${keys.enterpriseId}
146
+ FLEETBO_KEY_APP=${projectName}
147
+ FLEETBO_APP_TESTER_EMAIL=${userEmailArg}`;
150
148
 
151
149
  fs.writeFileSync(path.join(projectDir, '.env'), envContent, 'utf8');
152
150
 
153
- console.log(' [4.5/6] Securing environment (adding .gitignore)...');
151
+ console.log(' [6/8] Securing environment (adding .gitignore)...');
154
152
  const gitignoreContent = `# Fleetbo Security
155
153
  .env
156
154
  .env.local
@@ -164,27 +162,27 @@ yarn-error.log*
164
162
  `;
165
163
  fs.writeFileSync(path.join(projectDir, '.gitignore'), gitignoreContent, 'utf8');
166
164
 
167
- console.log(' [5/6] Installing dependencies...');
165
+ console.log(' [7/8] Installing dependencies...');
168
166
  execSync('npm install', { stdio: 'inherit' });
169
167
 
170
- // Installer cloudflared comme devDependency (nécessaire pour le tunnel)
168
+ // Installer cloudflared comme devDependency (nécessaire pour le tunnel)
171
169
  execSync('npm install cloudflared --save-dev', { stdio: 'ignore' });
172
170
 
173
- console.log(' [6/6] Finalizing setup...');
171
+ console.log(' [8/8] Finalizing setup...');
174
172
  const packageJsonPath = path.join(projectDir, 'package.json');
175
173
  const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
176
174
  packageJson.name = projectName;
177
175
 
178
- // CHANGEMENT CLÉ : Utilise npx fleetbo-cli au lieu de node scripts/cli.js
176
+ // Configuration pour utiliser le package NPM centralisé
179
177
  packageJson.scripts = {
180
178
  ...packageJson.scripts,
181
- "fleetbo": "npx fleetbo-cli@latest",
182
- "dev": "npx fleetbo-cli@latest"
179
+ "fleetbo": "npx fleetbo-cockpit-cli@latest",
180
+ "dev": "npx fleetbo-cockpit-cli@latest"
183
181
  };
184
182
 
185
183
  fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2), 'utf8');
186
184
 
187
- // Supprimer le dossier scripts s'il existe (plus besoin de cli.js local)
185
+ // Supprimer le dossier scripts local (car on utilise le CLI npm)
188
186
  const scriptsDir = path.join(projectDir, 'scripts');
189
187
  if (fs.existsSync(scriptsDir)) {
190
188
  try {
@@ -210,4 +208,4 @@ yarn-error.log*
210
208
  }
211
209
  }
212
210
 
213
- setupProject();
211
+ setupProject();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-fleetbo-project",
3
- "version": "1.2.86",
3
+ "version": "1.2.88",
4
4
  "description": "Creates a new Fleetbo project.",
5
5
  "main": "install-react-template.js",
6
6
  "bin": {