Compare commits
2 Commits
3131df2b71
...
6a5f43d50e
| Author | SHA1 | Date | |
|---|---|---|---|
| 6a5f43d50e | |||
| 91c86172e4 |
+1
-1
@@ -23,7 +23,7 @@
|
||||
"prepublishOnly": "npm run build"
|
||||
},
|
||||
"bin": {
|
||||
"zen-db": "./dist/cli/database.js"
|
||||
"zen-db": "./dist/core/database/cli.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@headlessui/react": "^2.0.0",
|
||||
|
||||
@@ -16,9 +16,9 @@ dotenv.config({ path: resolve(process.cwd(), '.env.local') });
|
||||
// The CLI always runs locally, so default to development to use ZEN_DATABASE_URL_DEV if set
|
||||
process.env.NODE_ENV = process.env.NODE_ENV || 'development';
|
||||
|
||||
import { testConnection, closePool } from '../core/database/index.js';
|
||||
import { testConnection, closePool } from './index.js';
|
||||
import readline from 'readline';
|
||||
import { step, done, warn, fail } from '../shared/lib/logger.js';
|
||||
import { step, done, warn, fail } from '../../shared/lib/logger.js';
|
||||
|
||||
function printHelp() {
|
||||
console.log(`
|
||||
@@ -66,7 +66,7 @@ async function runCLI() {
|
||||
case 'init': {
|
||||
step('Initializing database...');
|
||||
|
||||
const { initFeatures } = await import('../features/init.js');
|
||||
const { initFeatures } = await import('../../features/init.js');
|
||||
const featuresResult = await initFeatures();
|
||||
|
||||
done(`DB ready — ${featuresResult.created.length} tables created, ${featuresResult.skipped.length} skipped`);
|
||||
@@ -89,7 +89,7 @@ async function runCLI() {
|
||||
process.stdout.write(' Type "yes" to confirm or Ctrl+C to cancel...\n');
|
||||
const answer = await askConfirmation('Confirm (yes/no): ');
|
||||
if (answer === 'yes') {
|
||||
const { dropFeatures } = await import('../features/init.js');
|
||||
const { dropFeatures } = await import('../../features/init.js');
|
||||
await dropFeatures();
|
||||
done('Tables dropped successfully');
|
||||
} else {
|
||||
+1
-1
@@ -17,7 +17,7 @@ export default defineConfig([
|
||||
'src/core/api/route-handler.js',
|
||||
'src/core/cron/index.js',
|
||||
'src/core/database/index.js',
|
||||
'src/cli/database.js',
|
||||
'src/core/database/cli.js',
|
||||
'src/core/email/index.js',
|
||||
'src/core/email/templates/index.js',
|
||||
'src/core/storage/index.js',
|
||||
|
||||
Reference in New Issue
Block a user