vako 1.3.5 → 1.3.7
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.
|
|
24
|
+
.version('1.3.7');
|
|
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
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
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
|
-
}
|
|
171
|
-
console.error('
|
|
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
|
File without changes
|