vako 1.3.5 → 1.3.6

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.
package/bin/vako.js CHANGED
@@ -21,7 +21,7 @@ const program = new Command();
21
21
  program
22
22
  .name('vako')
23
23
  .description('Vako Framework CLI')
24
- .version('1.3.5');
24
+ .version('1.3.6');
25
25
 
26
26
  // ============= DEV COMMAND =============
27
27
  program
@@ -154,21 +154,37 @@ program
154
154
  .command('update')
155
155
  .description('Gestionnaire de mise à jour Vako')
156
156
  .allowUnknownOption(true)
157
- .action(() => {
158
- // Exécuter vako-update avec les mêmes arguments
159
- const updateBin = path.join(__dirname, 'vako-update.js'); // Note: fichier garde le nom vako-update.js pour compatibilité
160
- if (fs.existsSync(updateBin)) {
161
- const { execSync } = require('child_process');
162
- try {
163
- execSync(`node "${updateBin}" ${process.argv.slice(3).join(' ')}`, {
164
- stdio: 'inherit'
165
- });
166
- } catch (error) {
167
- console.error('Erreur lors du lancement de l\'auto-updater');
157
+ .action(async () => {
158
+ try {
159
+ // Essayer d'abord avec le fichier vako-update.js
160
+ const updateBin = path.join(__dirname, 'vako-update.js');
161
+ if (fs.existsSync(updateBin)) {
162
+ const { execSync } = require('child_process');
163
+ try {
164
+ execSync(`node "${updateBin}" ${process.argv.slice(3).join(' ')}`, {
165
+ stdio: 'inherit'
166
+ });
167
+ return;
168
+ } catch (error) {
169
+ // Si ça échoue, essayer directement avec AutoUpdater
170
+ }
171
+ }
172
+
173
+ // Fallback: utiliser directement AutoUpdater
174
+ const AutoUpdater = require('../lib/core/auto-updater');
175
+ const args = process.argv.slice(3);
176
+
177
+ if (typeof AutoUpdater.handleCLI === 'function') {
178
+ await AutoUpdater.init();
179
+ await AutoUpdater.handleCLI(args);
180
+ } else {
181
+ console.error('L\'auto-updater n\'est pas disponible');
182
+ console.error('Essayez: npm install -g vako@latest');
168
183
  process.exit(1);
169
184
  }
170
- } else {
171
- console.error('L\'auto-updater n\'est pas disponible');
185
+ } catch (error) {
186
+ console.error('Erreur lors du lancement de l\'auto-updater:', error.message);
187
+ console.error('Essayez: npm install -g vako@latest');
172
188
  process.exit(1);
173
189
  }
174
190
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vako",
3
- "version": "1.3.5",
3
+ "version": "1.3.6",
4
4
  "description": "🚀 Ultra-modern Node.js framework with hot reload, plugins, authentication, TypeScript support, and Next.js integration",
5
5
  "main": "index.js",
6
6
  "types": "types/index.d.ts",
File without changes