vako 1.3.0 → 1.3.4
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/CHANGELOG.md +63 -63
- package/README.md +311 -1661
- package/bin/commands/setup-executor.js +1 -1
- package/bin/commands/setup.js +10 -10
- package/bin/create-veko-app.js +10 -10
- package/bin/vako.js +188 -0
- package/bin/veko-update.js +15 -15
- package/bin/veko.js +13 -13
- package/error/error.ejs +4 -4
- package/lib/adapters/nextjs-adapter.js +241 -241
- package/lib/app.js +10 -10
- package/lib/core/auth-manager.js +2 -2
- package/lib/core/auto-updater.js +50 -50
- package/lib/core/module-installer.js +2 -2
- package/lib/dev/dev-server.js +3 -3
- package/lib/layout/layout-manager.js +3 -3
- package/lib/plugin-manager.js +2 -2
- package/lib/routing/route-manager.js +3 -3
- package/package.json +12 -13
- package/templates/public/js/main.js +1 -1
- package/tsconfig.json +50 -50
- package/types/index.d.ts +238 -238
|
@@ -174,7 +174,7 @@ class SetupExecutor {
|
|
|
174
174
|
try {
|
|
175
175
|
execSync('git init', { cwd: this.projectPath, stdio: 'pipe' });
|
|
176
176
|
execSync('git add .', { cwd: this.projectPath, stdio: 'pipe' });
|
|
177
|
-
execSync('git commit -m "🎉 Initial commit - Created with
|
|
177
|
+
execSync('git commit -m "🎉 Initial commit - Created with Vako"', {
|
|
178
178
|
cwd: this.projectPath,
|
|
179
179
|
stdio: 'pipe'
|
|
180
180
|
});
|
package/bin/commands/setup.js
CHANGED
|
@@ -9,7 +9,7 @@ const path = require('path');
|
|
|
9
9
|
const fs = require('fs').promises;
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
|
-
* Assistant de configuration interactif pour les projets
|
|
12
|
+
* Assistant de configuration interactif pour les projets Vako
|
|
13
13
|
* Fournit une interface utilisateur complète pour la création de projets
|
|
14
14
|
*/
|
|
15
15
|
class SetupWizard {
|
|
@@ -111,7 +111,7 @@ class SetupWizard {
|
|
|
111
111
|
*/
|
|
112
112
|
async showWelcome() {
|
|
113
113
|
try {
|
|
114
|
-
const title = figlet.textSync('
|
|
114
|
+
const title = figlet.textSync('VAKO', {
|
|
115
115
|
font: 'ANSI Shadow',
|
|
116
116
|
horizontalLayout: 'fitted'
|
|
117
117
|
});
|
|
@@ -120,16 +120,16 @@ class SetupWizard {
|
|
|
120
120
|
} catch (error) {
|
|
121
121
|
// Fallback si figlet échoue
|
|
122
122
|
console.log(chalk.cyan.bold('╔══════════════════════════════════╗'));
|
|
123
|
-
console.log(chalk.cyan.bold('║
|
|
123
|
+
console.log(chalk.cyan.bold('║ VAKO ║'));
|
|
124
124
|
console.log(chalk.cyan.bold('╚══════════════════════════════════╝'));
|
|
125
125
|
}
|
|
126
126
|
|
|
127
127
|
console.log(chalk.cyan.bold('\n✨ Interactive Project Setup Wizard ✨\n'));
|
|
128
128
|
|
|
129
129
|
const welcomeBox = boxen(
|
|
130
|
-
chalk.white('🎉 Welcome to
|
|
130
|
+
chalk.white('🎉 Welcome to Vako Setup Wizard!\n\n') +
|
|
131
131
|
chalk.gray('This wizard will guide you through creating a new\n') +
|
|
132
|
-
chalk.gray('
|
|
132
|
+
chalk.gray('Vako project with all the features you need.\n\n') +
|
|
133
133
|
chalk.blue('✓ Templates & Examples\n') +
|
|
134
134
|
chalk.blue('✓ Authentication System\n') +
|
|
135
135
|
chalk.blue('✓ Database Integration\n') +
|
|
@@ -170,14 +170,14 @@ class SetupWizard {
|
|
|
170
170
|
type: 'input',
|
|
171
171
|
name: 'projectName',
|
|
172
172
|
message: '📁 What\'s your project name?',
|
|
173
|
-
default: 'my-
|
|
173
|
+
default: 'my-vako-app',
|
|
174
174
|
validate: (input) => this.validateProjectName(input)
|
|
175
175
|
},
|
|
176
176
|
{
|
|
177
177
|
type: 'input',
|
|
178
178
|
name: 'description',
|
|
179
179
|
message: '📄 Project description:',
|
|
180
|
-
default: 'A modern web application built with
|
|
180
|
+
default: 'A modern web application built with Vako',
|
|
181
181
|
validate: (input) => this.validateDescription(input)
|
|
182
182
|
},
|
|
183
183
|
{
|
|
@@ -587,7 +587,7 @@ ${plugins.map(p => ` ⚡ ${p}`).join('\n') || ' No plugins selected'}
|
|
|
587
587
|
});
|
|
588
588
|
|
|
589
589
|
console.log(completionBox);
|
|
590
|
-
console.log(chalk.rainbow('\n✨ Happy coding with
|
|
590
|
+
console.log(chalk.rainbow('\n✨ Happy coding with Vako! ✨\n'));
|
|
591
591
|
}
|
|
592
592
|
|
|
593
593
|
/**
|
|
@@ -600,10 +600,10 @@ ${plugins.map(p => ` ⚡ ${p}`).join('\n') || ' No plugins selected'}
|
|
|
600
600
|
chalk.gray('Next steps:\n') +
|
|
601
601
|
chalk.white(` 📁 cd ${projectName}\n`) +
|
|
602
602
|
chalk.white(' 🚀 npm run dev\n') +
|
|
603
|
-
chalk.white(' 🌐
|
|
603
|
+
chalk.white(' 🌐 vako dev\n\n`') +
|
|
604
604
|
chalk.gray('Your app will be available at: ') +
|
|
605
605
|
chalk.blue.underline('http://localhost:3000\n\n') +
|
|
606
|
-
chalk.yellow('📚 Documentation: ') + chalk.blue.underline('https://
|
|
606
|
+
chalk.yellow('📚 Documentation: ') + chalk.blue.underline('https://vako.js.org');
|
|
607
607
|
}
|
|
608
608
|
|
|
609
609
|
// === Méthodes de validation sécurisées ===
|
package/bin/create-veko-app.js
CHANGED
|
@@ -8,19 +8,19 @@ const QuickSetup = require('./commands/quick-setup');
|
|
|
8
8
|
const program = new Command();
|
|
9
9
|
|
|
10
10
|
program
|
|
11
|
-
.name('create-
|
|
12
|
-
.description('Create a new
|
|
13
|
-
.version('1.
|
|
11
|
+
.name('create-vako-app')
|
|
12
|
+
.description('Create a new Vako application')
|
|
13
|
+
.version('1.3.0')
|
|
14
14
|
.argument('[project-name]', 'Name of the project')
|
|
15
15
|
.option('--template <template>', 'Template to use')
|
|
16
16
|
.option('--quick', 'Quick setup with minimal questions')
|
|
17
17
|
.option('--wizard', 'Full interactive wizard')
|
|
18
18
|
.action(async (projectName, options) => {
|
|
19
|
-
console.log(chalk.blue.bold('🚀 Create
|
|
19
|
+
console.log(chalk.blue.bold('🚀 Create Vako App\n'));
|
|
20
20
|
|
|
21
21
|
if (!projectName) {
|
|
22
22
|
console.log(chalk.red('❌ Project name is required'));
|
|
23
|
-
console.log(chalk.gray('Usage: npx create-
|
|
23
|
+
console.log(chalk.gray('Usage: npx create-vako-app my-app'));
|
|
24
24
|
process.exit(1);
|
|
25
25
|
}
|
|
26
26
|
|
|
@@ -61,12 +61,12 @@ program
|
|
|
61
61
|
|
|
62
62
|
// Show help if no arguments
|
|
63
63
|
if (process.argv.length <= 2) {
|
|
64
|
-
console.log(chalk.blue.bold('🚀 Create
|
|
64
|
+
console.log(chalk.blue.bold('🚀 Create Vako App\n'));
|
|
65
65
|
console.log(chalk.white('Usage:'));
|
|
66
|
-
console.log(chalk.gray(' npx create-
|
|
67
|
-
console.log(chalk.gray(' npx create-
|
|
68
|
-
console.log(chalk.gray(' npx create-
|
|
69
|
-
console.log(chalk.gray(' npx create-
|
|
66
|
+
console.log(chalk.gray(' npx create-vako-app my-app'));
|
|
67
|
+
console.log(chalk.gray(' npx create-vako-app my-app --template api'));
|
|
68
|
+
console.log(chalk.gray(' npx create-vako-app my-app --wizard'));
|
|
69
|
+
console.log(chalk.gray(' npx create-vako-app my-app --quick'));
|
|
70
70
|
console.log(chalk.white('\nTemplates:'));
|
|
71
71
|
console.log(chalk.gray(' default, api, blog, admin, ecommerce, portfolio\n'));
|
|
72
72
|
process.exit(0);
|
package/bin/vako.js
ADDED
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const { Command } = require('commander');
|
|
4
|
+
const chalk = require('chalk');
|
|
5
|
+
const SetupWizard = require('./commands/setup');
|
|
6
|
+
const DevServer = require('../lib/dev/dev-server');
|
|
7
|
+
const path = require('path');
|
|
8
|
+
const fs = require('fs');
|
|
9
|
+
|
|
10
|
+
// Version du package
|
|
11
|
+
const packageJson = require('../package.json');
|
|
12
|
+
const version = packageJson.version;
|
|
13
|
+
|
|
14
|
+
// Ajouter le chemin vers les modules lib
|
|
15
|
+
const libPath = path.join(__dirname, '..', 'lib');
|
|
16
|
+
process.env.NODE_PATH = `${process.env.NODE_PATH || ''}:${libPath}`;
|
|
17
|
+
require('module')._initPaths();
|
|
18
|
+
|
|
19
|
+
const program = new Command();
|
|
20
|
+
|
|
21
|
+
program
|
|
22
|
+
.name('vako')
|
|
23
|
+
.description('Vako Framework CLI')
|
|
24
|
+
.version('1.3.4');
|
|
25
|
+
|
|
26
|
+
// ============= DEV COMMAND =============
|
|
27
|
+
program
|
|
28
|
+
.command('dev')
|
|
29
|
+
.description('Start development server')
|
|
30
|
+
.option('-p, --port <port>', 'Port number', '3000')
|
|
31
|
+
.option('-f, --file <file>', 'Entry file', 'app.js')
|
|
32
|
+
.option('-w, --watch <dirs>', 'Watch directories', 'views,routes,public')
|
|
33
|
+
.action(async (options) => {
|
|
34
|
+
try {
|
|
35
|
+
const devServer = new DevServer({
|
|
36
|
+
port: parseInt(options.port),
|
|
37
|
+
file: options.file,
|
|
38
|
+
watchDirs: options.watch.split(',')
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
await devServer.start();
|
|
42
|
+
} catch (error) {
|
|
43
|
+
console.error(chalk.red('❌ Error starting dev server:'), error.message);
|
|
44
|
+
process.exit(1);
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
// ============= BUILD COMMAND =============
|
|
49
|
+
program
|
|
50
|
+
.command('build')
|
|
51
|
+
.description('Build for production')
|
|
52
|
+
.action(() => {
|
|
53
|
+
console.log(chalk.blue('🔨 Building for production...'));
|
|
54
|
+
console.log(chalk.green('✅ Build completed!'));
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
// ============= START COMMAND =============
|
|
58
|
+
program
|
|
59
|
+
.command('start')
|
|
60
|
+
.description('Start production server')
|
|
61
|
+
.option('-f, --file <file>', 'Entry file', 'app.js')
|
|
62
|
+
.action((options) => {
|
|
63
|
+
try {
|
|
64
|
+
console.log(chalk.blue('🚀 Starting production server...'));
|
|
65
|
+
execSync(`node ${options.file}`, { stdio: 'inherit' });
|
|
66
|
+
} catch (error) {
|
|
67
|
+
console.error(chalk.red('❌ Error starting server:'), error.message);
|
|
68
|
+
process.exit(1);
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
// ============= SETUP COMMAND (UPDATED) =============
|
|
73
|
+
program
|
|
74
|
+
.command('setup [project-name]')
|
|
75
|
+
.description('🚀 Interactive project setup wizard')
|
|
76
|
+
.option('-q, --quick', 'Quick setup with defaults')
|
|
77
|
+
.option('--template <template>', 'Template (default, api, blog, admin, ecommerce, portfolio)')
|
|
78
|
+
.option('--features <features>', 'Comma-separated features list')
|
|
79
|
+
.option('--auth', 'Enable authentication system')
|
|
80
|
+
.option('--db <database>', 'Database type (sqlite, mysql, mongodb)')
|
|
81
|
+
.option('--styling <framework>', 'CSS framework (bootstrap, tailwind, material)')
|
|
82
|
+
.action(async (projectNameArg, options) => {
|
|
83
|
+
if (options.quick) {
|
|
84
|
+
const quickConfig = {
|
|
85
|
+
projectName: projectNameArg || 'vako-app',
|
|
86
|
+
template: options.template || 'default',
|
|
87
|
+
features: options.features ? options.features.split(',') : ['hotreload', 'layouts'],
|
|
88
|
+
database: options.db || 'sqlite',
|
|
89
|
+
auth: { enabled: options.auth || false },
|
|
90
|
+
styling: options.styling || 'bootstrap',
|
|
91
|
+
git: true,
|
|
92
|
+
install: true
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
const SetupExecutor = require('./commands/setup-executor');
|
|
96
|
+
const executor = new SetupExecutor(quickConfig);
|
|
97
|
+
await executor.execute();
|
|
98
|
+
} else {
|
|
99
|
+
const wizard = new SetupWizard();
|
|
100
|
+
await wizard.start();
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
// ============= NEW COMMANDS =============
|
|
105
|
+
program
|
|
106
|
+
.command('wizard')
|
|
107
|
+
.alias('w')
|
|
108
|
+
.description('🧙♂️ Full interactive setup wizard')
|
|
109
|
+
.action(async () => {
|
|
110
|
+
const wizard = new SetupWizard();
|
|
111
|
+
await wizard.start();
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
program
|
|
115
|
+
.command('create <project-name>')
|
|
116
|
+
.description('🎯 Quick project creation with prompts')
|
|
117
|
+
.option('--template <template>', 'Template to use')
|
|
118
|
+
.action(async (projectName, options) => {
|
|
119
|
+
const QuickSetup = require('./commands/quick-setup');
|
|
120
|
+
const quickSetup = new QuickSetup(projectName, options);
|
|
121
|
+
await quickSetup.start();
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
program
|
|
125
|
+
.command('templates')
|
|
126
|
+
.alias('t')
|
|
127
|
+
.description('📋 List available templates')
|
|
128
|
+
.action(() => {
|
|
129
|
+
const TemplateList = require('./commands/template-list');
|
|
130
|
+
const templateList = new TemplateList();
|
|
131
|
+
templateList.display();
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
program
|
|
135
|
+
.command('plugins')
|
|
136
|
+
.description('🔌 Plugin management')
|
|
137
|
+
.option('--list', 'List available plugins')
|
|
138
|
+
.option('--search <term>', 'Search plugins')
|
|
139
|
+
.action((options) => {
|
|
140
|
+
const PluginManager = require('./commands/plugin-manager-cli');
|
|
141
|
+
const pluginManager = new PluginManager();
|
|
142
|
+
|
|
143
|
+
if (options.list) {
|
|
144
|
+
pluginManager.listPlugins();
|
|
145
|
+
} else if (options.search) {
|
|
146
|
+
pluginManager.searchPlugins(options.search);
|
|
147
|
+
} else {
|
|
148
|
+
pluginManager.showMenu();
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
// Ajout de la commande update qui servira de passerelle vers vako-update
|
|
153
|
+
program
|
|
154
|
+
.command('update')
|
|
155
|
+
.description('Gestionnaire de mise à jour Vako')
|
|
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');
|
|
168
|
+
process.exit(1);
|
|
169
|
+
}
|
|
170
|
+
} else {
|
|
171
|
+
console.error('L\'auto-updater n\'est pas disponible');
|
|
172
|
+
process.exit(1);
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
program.parse(process.argv);
|
|
177
|
+
|
|
178
|
+
if (!process.argv.slice(2).length) {
|
|
179
|
+
console.log('\n🚀 Vako v' + version + ' - Ultra-modern Node.js framework\n');
|
|
180
|
+
console.log('Available commands:');
|
|
181
|
+
console.log(' dev Start development server with hot reload');
|
|
182
|
+
console.log(' setup Set up a new Vako project');
|
|
183
|
+
console.log(' verify Verify code quality and security');
|
|
184
|
+
console.log(' update Gestionnaire de mise à jour Vako');
|
|
185
|
+
console.log('\nRun `vako <command> --help` for more information on specific commands.');
|
|
186
|
+
console.log('\nDocumentation: https://github.com/sdevfr/vako');
|
|
187
|
+
process.exit(0);
|
|
188
|
+
}
|
package/bin/veko-update.js
CHANGED
|
@@ -24,27 +24,27 @@ function emergencyRepair() {
|
|
|
24
24
|
|
|
25
25
|
console.error('✅ package.json trouvé');
|
|
26
26
|
|
|
27
|
-
// Vérifier l'installation de
|
|
27
|
+
// Vérifier l'installation de vako
|
|
28
28
|
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
|
|
29
|
-
const
|
|
30
|
-
packageJson.devDependencies?.
|
|
31
|
-
packageJson.peerDependencies?.
|
|
32
|
-
|
|
33
|
-
if (!
|
|
34
|
-
console.error('⚠️
|
|
35
|
-
console.error('🔧 Installation de
|
|
29
|
+
const vakoVersion = packageJson.dependencies?.vako ||
|
|
30
|
+
packageJson.devDependencies?.vako ||
|
|
31
|
+
packageJson.peerDependencies?.vako;
|
|
32
|
+
|
|
33
|
+
if (!vakoVersion) {
|
|
34
|
+
console.error('⚠️ Vako non trouvé dans package.json');
|
|
35
|
+
console.error('🔧 Installation de vako...');
|
|
36
36
|
|
|
37
37
|
const { execSync } = require('child_process');
|
|
38
38
|
try {
|
|
39
|
-
execSync('npm install
|
|
40
|
-
console.error('✅
|
|
39
|
+
execSync('npm install vako@latest', { stdio: 'inherit' });
|
|
40
|
+
console.error('✅ Vako installé avec succès');
|
|
41
41
|
return true;
|
|
42
42
|
} catch (error) {
|
|
43
43
|
console.error('❌ Échec de l\'installation:', error.message);
|
|
44
44
|
return false;
|
|
45
45
|
}
|
|
46
46
|
} else {
|
|
47
|
-
console.error(`✅
|
|
47
|
+
console.error(`✅ Vako v${vakoVersion.replace(/[\^~>=<]/g, '')} détecté`);
|
|
48
48
|
return true;
|
|
49
49
|
}
|
|
50
50
|
|
|
@@ -135,7 +135,7 @@ async function main() {
|
|
|
135
135
|
console.error('\n🔧 DIAGNOSTIC:');
|
|
136
136
|
console.error('L\'auto-updater semble être corrompu ou incompatible.');
|
|
137
137
|
console.error('\n💡 SOLUTIONS:');
|
|
138
|
-
console.error('1. Réinstallez
|
|
138
|
+
console.error('1. Réinstallez vako: npm install vako@latest');
|
|
139
139
|
console.error('2. Nettoyez le cache npm: npm cache clean --force');
|
|
140
140
|
console.error('3. Supprimez node_modules et réinstallez: rm -rf node_modules && npm install');
|
|
141
141
|
} else if (error.message.includes('Timeout')) {
|
|
@@ -144,10 +144,10 @@ async function main() {
|
|
|
144
144
|
console.error('\n💡 SOLUTIONS:');
|
|
145
145
|
console.error('1. Vérifiez votre connexion internet');
|
|
146
146
|
console.error('2. Essayez à nouveau dans quelques minutes');
|
|
147
|
-
console.error('3. Utilisez:
|
|
147
|
+
console.error('3. Utilisez: vako update fix pour réparer');
|
|
148
148
|
} else {
|
|
149
149
|
console.error('\n💡 Pour réparer automatiquement l\'auto-updater:');
|
|
150
|
-
console.error('npm install
|
|
150
|
+
console.error('npm install vako@latest');
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
if (process.env.DEBUG) {
|
|
@@ -176,7 +176,7 @@ process.on('uncaughtException', (error) => {
|
|
|
176
176
|
|
|
177
177
|
if (error.message && error.message.includes('not a function')) {
|
|
178
178
|
console.error('\n🔧 L\'auto-updater est corrompu.');
|
|
179
|
-
console.error('Exécutez: npm install
|
|
179
|
+
console.error('Exécutez: npm install vako@latest');
|
|
180
180
|
}
|
|
181
181
|
|
|
182
182
|
if (process.env.DEBUG) {
|
package/bin/veko.js
CHANGED
|
@@ -19,9 +19,9 @@ require('module')._initPaths();
|
|
|
19
19
|
const program = new Command();
|
|
20
20
|
|
|
21
21
|
program
|
|
22
|
-
.name('
|
|
23
|
-
.description('
|
|
24
|
-
.version('1.
|
|
22
|
+
.name('vako')
|
|
23
|
+
.description('Vako Framework CLI')
|
|
24
|
+
.version('1.3.3');
|
|
25
25
|
|
|
26
26
|
// ============= DEV COMMAND =============
|
|
27
27
|
program
|
|
@@ -82,7 +82,7 @@ program
|
|
|
82
82
|
.action(async (projectNameArg, options) => {
|
|
83
83
|
if (options.quick) {
|
|
84
84
|
const quickConfig = {
|
|
85
|
-
projectName: projectNameArg || '
|
|
85
|
+
projectName: projectNameArg || 'vako-app',
|
|
86
86
|
template: options.template || 'default',
|
|
87
87
|
features: options.features ? options.features.split(',') : ['hotreload', 'layouts'],
|
|
88
88
|
database: options.db || 'sqlite',
|
|
@@ -149,14 +149,14 @@ program
|
|
|
149
149
|
}
|
|
150
150
|
});
|
|
151
151
|
|
|
152
|
-
// Ajout de la commande update qui servira de passerelle vers
|
|
152
|
+
// Ajout de la commande update qui servira de passerelle vers vako-update
|
|
153
153
|
program
|
|
154
154
|
.command('update')
|
|
155
|
-
.description('Gestionnaire de mise à jour
|
|
155
|
+
.description('Gestionnaire de mise à jour Vako')
|
|
156
156
|
.allowUnknownOption(true)
|
|
157
157
|
.action(() => {
|
|
158
|
-
// Exécuter
|
|
159
|
-
const updateBin = path.join(__dirname, '
|
|
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
160
|
if (fs.existsSync(updateBin)) {
|
|
161
161
|
const { execSync } = require('child_process');
|
|
162
162
|
try {
|
|
@@ -176,13 +176,13 @@ program
|
|
|
176
176
|
program.parse(process.argv);
|
|
177
177
|
|
|
178
178
|
if (!process.argv.slice(2).length) {
|
|
179
|
-
console.log('\n🚀
|
|
179
|
+
console.log('\n🚀 Vako v' + version + ' - Ultra-modern Node.js framework\n');
|
|
180
180
|
console.log('Available commands:');
|
|
181
181
|
console.log(' dev Start development server with hot reload');
|
|
182
|
-
console.log(' setup Set up a new
|
|
182
|
+
console.log(' setup Set up a new Vako project');
|
|
183
183
|
console.log(' verify Verify code quality and security');
|
|
184
|
-
console.log(' update Gestionnaire de mise à jour
|
|
185
|
-
console.log('\nRun `
|
|
186
|
-
console.log('\nDocumentation: https://
|
|
184
|
+
console.log(' update Gestionnaire de mise à jour Vako');
|
|
185
|
+
console.log('\nRun `vako <command> --help` for more information on specific commands.');
|
|
186
|
+
console.log('\nDocumentation: https://github.com/sdevfr/vako');
|
|
187
187
|
process.exit(0);
|
|
188
188
|
}
|
package/error/error.ejs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8">
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
-
<title><%= (locals.lang === 'fr' ? 'Erreur' : 'Error') %> <%= status || 500 %> -
|
|
6
|
+
<title><%= (locals.lang === 'fr' ? 'Erreur' : 'Error') %> <%= status || 500 %> - Vako</title>
|
|
7
7
|
<script src="https://cdn.tailwindcss.com"></script>
|
|
8
8
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
9
9
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
<div class="flex items-center space-x-3 mb-4 sm:mb-0">
|
|
104
104
|
<div class="text-3xl animate-float"><%= errorType?.icon || '❌' %></div>
|
|
105
105
|
<div>
|
|
106
|
-
<h1 class="text-2xl font-bold tracking-tight">
|
|
106
|
+
<h1 class="text-2xl font-bold tracking-tight">Vako</h1>
|
|
107
107
|
<p class="text-sm text-white/70"><%= locals.lang === 'fr' ? 'Framework développement' : 'Development Framework' %></p>
|
|
108
108
|
</div>
|
|
109
109
|
</div>
|
|
@@ -285,7 +285,7 @@
|
|
|
285
285
|
<% } else { %>
|
|
286
286
|
<div class="p-4 bg-white/5 rounded-lg">
|
|
287
287
|
<h4 class="font-medium mb-2"><%= locals.lang === 'fr' ? 'Consulter la documentation' : 'Check the documentation' %></h4>
|
|
288
|
-
<p class="text-white/70"><%= locals.lang === 'fr' ? 'Pour plus d\'informations sur cette erreur et comment la résoudre, consultez la documentation de
|
|
288
|
+
<p class="text-white/70"><%= locals.lang === 'fr' ? 'Pour plus d\'informations sur cette erreur et comment la résoudre, consultez la documentation de Vako.' : 'For more information about this error and how to solve it, check the Vako documentation.' %></p>
|
|
289
289
|
</div>
|
|
290
290
|
<% } %>
|
|
291
291
|
<div class="p-4 bg-white/5 rounded-lg">
|
|
@@ -301,7 +301,7 @@
|
|
|
301
301
|
<!-- Footer -->
|
|
302
302
|
<footer class="py-6 px-4 sm:px-6 lg:px-8 bg-gradient-to-b from-transparent to-black/20">
|
|
303
303
|
<div class="max-w-7xl mx-auto text-center text-sm text-white/50">
|
|
304
|
-
<p>
|
|
304
|
+
<p>Vako Framework • <span class="bg-white/10 px-2 py-1 rounded text-xs"><%= env %></span></p>
|
|
305
305
|
<p class="mt-2 text-xs">
|
|
306
306
|
<%= locals.lang === 'fr' ? 'Pour désactiver cette page d\'erreur détaillée en production, définissez' : 'To disable this detailed error page in production, set' %> <code class="bg-white/10 px-1 rounded">NODE_ENV=production</code>
|
|
307
307
|
</p>
|