fleetbo-cockpit-cli 1.0.186 → 1.0.187

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.
Files changed (2) hide show
  1. package/cli.js +10 -6
  2. package/package.json +1 -1
package/cli.js CHANGED
@@ -786,8 +786,12 @@ else if (command === 'rm') {
786
786
  console.log(`\n\x1b[33m🗑️ Annihilating module: ${moduleName}...\x1b[0m`);
787
787
 
788
788
  // 1. Define physical paths
789
- const ktPath = path.join(process.cwd(), 'public', 'native', 'android', `${moduleName}.kt`);
790
- const jsxPath = path.join(process.cwd(), 'src', 'app', 'mocks', `${moduleName}.jsx`);
789
+ const ktPath = path.join(process.cwd(), 'public', 'native', 'android', `${moduleName}.kt`);
790
+ // 🟢 AGNOSTIQUE — cherche .jsx (React) puis .vue (Vue)
791
+ const jsxPath = path.join(process.cwd(), 'src', 'app', 'mocks', `${moduleName}.jsx`);
792
+ const vuePath = path.join(process.cwd(), 'src', 'app', 'mocks', `${moduleName}.vue`);
793
+ const mockPath = fs.existsSync(jsxPath) ? jsxPath : fs.existsSync(vuePath) ? vuePath : null;
794
+ const mockExt = mockPath ? path.extname(mockPath) : '';
791
795
 
792
796
  let actionsDone = 0;
793
797
 
@@ -798,10 +802,10 @@ else if (command === 'rm') {
798
802
  actionsDone++;
799
803
  }
800
804
 
801
- // 3. Eradicate Virtual Twin (Mock JSX)
802
- if (fs.existsSync(jsxPath)) {
803
- fs.unlinkSync(jsxPath);
804
- console.log(` \x1b[32m[Deleted]\x1b[0m Virtual Twin (.jsx) eradicated.`);
805
+ // 3. Eradicate Virtual Twin (Mock JSX or Vue)
806
+ if (mockPath) {
807
+ fs.unlinkSync(mockPath);
808
+ console.log(` \x1b[32m[Deleted]\x1b[0m Virtual Twin (${mockExt}) eradicated.`);
805
809
  actionsDone++;
806
810
  }
807
811
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fleetbo-cockpit-cli",
3
- "version": "1.0.186",
3
+ "version": "1.0.187",
4
4
  "description": "Fleetbo CLI - Build native mobile apps with React",
5
5
  "author": "Fleetbo",
6
6
  "license": "MIT",