create-fleetbo-project 1.2.87 → 1.2.90

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.
@@ -117,23 +117,13 @@ async function setupProject() {
117
117
 
118
118
  process.chdir(projectDir);
119
119
 
120
- console.log(' [3/8] Standardizing Architecture (src/app)...');
120
+ console.log(' [3/8] Standardizing Architecture (Vite)...');
121
+ // Pour Vite, on s'assure juste que l'arborescence de base est correcte.
122
+ // On retire les vieux renommages CRA (App.js) pour éviter de casser App.jsx
121
123
  const oldPath = path.join(projectDir, 'src/pages');
122
124
  const newPath = path.join(projectDir, 'src/app');
123
-
124
125
  if (fs.existsSync(oldPath) && !fs.existsSync(newPath)) {
125
- try {
126
- fs.renameSync(oldPath, newPath);
127
- const appJsPath = path.join(projectDir, 'src/App.js');
128
- if (fs.existsSync(appJsPath)) {
129
- let appContent = fs.readFileSync(appJsPath, 'utf8');
130
- appContent = appContent.replace(/from "\.\/pages\//g, 'from "./app/');
131
- appContent = appContent.replace(/from '\.\/pages\//g, "from './app/");
132
- fs.writeFileSync(appJsPath, appContent);
133
- }
134
- } catch (err) {
135
- console.warn(' Architecture migration warning:', err.message);
136
- }
126
+ try { fs.renameSync(oldPath, newPath); } catch (err) {}
137
127
  }
138
128
 
139
129
  console.log(' [4/8] Authenticating with Fleetbo Cloud...');
@@ -141,12 +131,10 @@ async function setupProject() {
141
131
  if (!keys.enterpriseId) throw new Error("Invalid keys.");
142
132
 
143
133
  console.log(' [5/8] 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`;
134
+ const envContent = `VITE_FLEETBO_DB_KEY=${keys.fleetboDBKey}
135
+ VITE_FLEETBO_ENTERPRISE_ID=${keys.enterpriseId}
136
+ VITE_FLEETBO_KEY_APP=${projectName}
137
+ VITE_FLEETBO_TESTER_EMAIL=${userEmailArg}`;
150
138
 
151
139
  fs.writeFileSync(path.join(projectDir, '.env'), envContent, 'utf8');
152
140
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-fleetbo-project",
3
- "version": "1.2.87",
3
+ "version": "1.2.90",
4
4
  "description": "Creates a new Fleetbo project.",
5
5
  "main": "install-react-template.js",
6
6
  "bin": {
@@ -16,12 +16,14 @@
16
16
  "yargs-parser": "^21.1.1"
17
17
  },
18
18
  "keywords": [
19
- "FLeetbo",
19
+ "Fleetbo",
20
20
  "JavaScript",
21
21
  "Pilots",
22
22
  "fullstack",
23
+ "OS",
24
+ "Cloud",
23
25
  "fleetbo"
24
26
  ],
25
- "author": "Jean Aubain Tcheuffa",
27
+ "author": "Jean Aubain NOUCTI",
26
28
  "license": "ISC"
27
29
  }