Skip to content

fix: add database init entrypoint#5

Open
Ghraven wants to merge 1 commit into
darkzOGx:masterfrom
Ghraven:fix/add-database-init-entrypoint
Open

fix: add database init entrypoint#5
Ghraven wants to merge 1 commit into
darkzOGx:masterfrom
Ghraven:fix/add-database-init-entrypoint

Conversation

@Ghraven

@Ghraven Ghraven commented May 21, 2026

Copy link
Copy Markdown

Summary

Add the missing database/init.js entrypoint used by the existing npm run db:init script.

Bug

package.json defines:

"db:init": "node database/init.js"

but database/init.js did not exist, so the command failed before it could initialize the SQLite database.

Before/After

Before:

npm run db:init
# Error: Cannot find module './database/init.js'

After:

npm run db:init
# Database initialized successfully.

The new entrypoint reuses the existing Database class, initializes the schema/settings, closes the connection, and exits non-zero if initialization fails.

Verification

  • npm ci
  • node -c database/init.js
  • npm run db:init

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant