Compare commits

..

2 Commits

Author SHA1 Message Date
hykocx 6a5f43d50e fix: update database CLI entry point path
Move the database CLI entry point from `src/cli/database.js` to
`src/core/database/cli.js` to better reflect its location within
the core database module. Update both the `package.json` bin path
and `tsup.config.js` build entry accordingly.
2026-04-14 19:29:07 -04:00
hykocx 91c86172e4 fix: update database CLI entry point path
Move the database CLI from `src/cli/database.js` to
`src/core/database/cli.js` to better reflect its association
with the database module. Update both the `package.json` bin
path and `tsup.config.js` entry points accordingly.
2026-04-14 19:29:02 -04:00
3 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -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
View File
@@ -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',