feat: add accounts and movies tables in migrations
- Created migration for accounts table with fields: id, username, password, role_id, created_at, updated_at. - Created migration for movies table with fields: id, title, overview, poster_path, backdrop_path, release_date, tmdb_id. refactor: update package.json scripts and dependencies - Changed dev script to use bun instead of tsx. - Added build:migrate script for migration. - Updated devDependencies for bun and oxlint. fix: refactor database connection and migration execution - Updated PgDatabase to use SQL from bun. - Refactored migration execution logic to read SQL files and execute them. feat: implement account creation and validation logic - Updated AccountEntity to use username instead of email. - Added validation for username format and password strength. - Implemented account repository methods for finding by username and inserting accounts. test: add tests for account entity, repository, and service - Created tests for AccountEntity to validate username and password. - Added tests for AccountRepository to ensure correct database interactions. - Implemented tests for AccountService to validate registration and login logic. chore: remove outdated tests and files - Deleted old tests related to email-based account management. - Cleaned up unused imports and files to streamline the codebase.
This commit is contained in:
13
package.json
13
package.json
@@ -11,28 +11,25 @@
|
||||
"type": "module",
|
||||
"main": "dist/app.js",
|
||||
"scripts": {
|
||||
"dev": "tsx watch src/app.ts",
|
||||
"dev": "bun run --watch src/app.ts",
|
||||
"lint": "oxlint .",
|
||||
"type": "tsc --noEmit",
|
||||
"build": "bun build --target=bun --outfile dist/app.js src/app.ts",
|
||||
"build:migrate": "bun build --target=bun --outfile dist/migrate.js src/bin/migrate.ts",
|
||||
"tests": "bun test"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@prettier/plugin-oxc": "^0.0.4",
|
||||
"@types/bcrypt": "^6.0.0",
|
||||
"@types/bun": "1.2.23",
|
||||
"@types/node": "^24.2.1",
|
||||
"@types/pg": "^8.15.5",
|
||||
"@types/bun": "latest",
|
||||
"oxlint": "^1.16.0",
|
||||
"oxlint": "^1.19.0",
|
||||
"prettier": "3.6.2",
|
||||
"tsx": "^4.20.5",
|
||||
"prettier-plugin-sql": "^0.19.2",
|
||||
"typescript": "^5.9.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@hono/zod-validator": "^0.7.3",
|
||||
"bcrypt": "^6.0.0",
|
||||
"hono": "^4.9.8",
|
||||
"pg": "^8.16.3",
|
||||
"zod": "^4.1.11"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user