create-fleetbo-project 1.2.86 → 1.2.87

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,11 +136,11 @@ 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...');
143
+ console.log(' [5/8] Configuring environment...');
144
144
  const envContent = `REACT_APP_FLEETBO_DB_KEY=${keys.fleetboDBKey}
145
145
  REACT_APP_ENTERPRISE_ID=${keys.enterpriseId}
146
146
  REACT_KEY_APP=${projectName}
@@ -150,7 +150,7 @@ WDS_SOCKET_PORT=0`;
150
150
 
151
151
  fs.writeFileSync(path.join(projectDir, '.env'), envContent, 'utf8');
152
152
 
153
- console.log(' [4.5/6] Securing environment (adding .gitignore)...');
153
+ console.log(' [6/8] Securing environment (adding .gitignore)...');
154
154
  const gitignoreContent = `# Fleetbo Security
155
155
  .env
156
156
  .env.local
@@ -164,27 +164,27 @@ yarn-error.log*
164
164
  `;
165
165
  fs.writeFileSync(path.join(projectDir, '.gitignore'), gitignoreContent, 'utf8');
166
166
 
167
- console.log(' [5/6] Installing dependencies...');
167
+ console.log(' [7/8] Installing dependencies...');
168
168
  execSync('npm install', { stdio: 'inherit' });
169
169
 
170
- // Installer cloudflared comme devDependency (nécessaire pour le tunnel)
170
+ // Installer cloudflared comme devDependency (nécessaire pour le tunnel)
171
171
  execSync('npm install cloudflared --save-dev', { stdio: 'ignore' });
172
172
 
173
- console.log(' [6/6] Finalizing setup...');
173
+ console.log(' [8/8] Finalizing setup...');
174
174
  const packageJsonPath = path.join(projectDir, 'package.json');
175
175
  const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
176
176
  packageJson.name = projectName;
177
177
 
178
- // CHANGEMENT CLÉ : Utilise npx fleetbo-cli au lieu de node scripts/cli.js
178
+ // Configuration pour utiliser le package NPM centralisé
179
179
  packageJson.scripts = {
180
180
  ...packageJson.scripts,
181
- "fleetbo": "npx fleetbo-cli@latest",
182
- "dev": "npx fleetbo-cli@latest"
181
+ "fleetbo": "npx fleetbo-cockpit-cli@latest",
182
+ "dev": "npx fleetbo-cockpit-cli@latest"
183
183
  };
184
184
 
185
185
  fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2), 'utf8');
186
186
 
187
- // Supprimer le dossier scripts s'il existe (plus besoin de cli.js local)
187
+ // Supprimer le dossier scripts local (car on utilise le CLI npm)
188
188
  const scriptsDir = path.join(projectDir, 'scripts');
189
189
  if (fs.existsSync(scriptsDir)) {
190
190
  try {
@@ -210,4 +210,4 @@ yarn-error.log*
210
210
  }
211
211
  }
212
212
 
213
- setupProject();
213
+ 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.87",
4
4
  "description": "Creates a new Fleetbo project.",
5
5
  "main": "install-react-template.js",
6
6
  "bin": {