vasuzex 2.1.6 → 2.1.8

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.
@@ -146,7 +146,9 @@ export async function dbMigrate(options = {}) {
146
146
 
147
147
  try {
148
148
  await createDatabase();
149
- await runGuruORMCommand('migrate');
149
+ const args = [];
150
+ if (options.force) args.push('--force');
151
+ await runGuruORMCommand('migrate', args);
150
152
  console.log('\n✅ Migrations completed successfully!');
151
153
  } catch (error) {
152
154
  console.error('\n❌ Migration failed:', error.message);
@@ -193,7 +195,9 @@ export async function dbSeed(options = {}) {
193
195
  console.log(seeder ? `🌱 Running seeder: ${seeder}...\n` : '🌱 Running all seeders...\n');
194
196
 
195
197
  try {
196
- const args = seeder ? ['--class', seeder] : [];
198
+ const args = [];
199
+ if (seeder) args.push('--class', seeder);
200
+ if (options.force) args.push('--force');
197
201
  await runGuruORMCommand('db:seed', args);
198
202
  console.log('\n✅ Database seeded successfully!');
199
203
  } catch (error) {
@@ -105,6 +105,7 @@ program
105
105
  program
106
106
  .command('migrate')
107
107
  .description('Run database migrations')
108
+ .option('--force', 'Force the operation to run in production')
108
109
  .action(dbMigrate);
109
110
 
110
111
  program
@@ -122,6 +123,7 @@ program
122
123
  .command('db:seed')
123
124
  .description('Seed the database')
124
125
  .option('-c, --class <class>', 'Specific seeder class to run')
126
+ .option('--force', 'Force the operation to run in production')
125
127
  .action(dbSeed);
126
128
 
127
129
  program
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vasuzex",
3
- "version": "2.1.6",
3
+ "version": "2.1.8",
4
4
  "description": "Laravel-inspired framework for Node.js monorepos - V2 with optimized dependencies",
5
5
  "type": "module",
6
6
  "main": "./framework/index.js",
@@ -100,7 +100,7 @@
100
100
  "chalk": "^4.1.2",
101
101
  "commander": "^12.1.0",
102
102
  "cors": "^2.8.5",
103
- "csrf-csrf": "^4.0.3",
103
+ "csrf-csrf": "^4.0.3",
104
104
  "currency.js": "^2.0.4",
105
105
  "dotenv": "^16.6.1",
106
106
  "express": "^5.2.1",