Files
aurorabot/package.json
syntaxbullet aca5538d57
All checks were successful
Deploy to Production / test (push) Successful in 32s
chore: improve DX scripts, fix test suite, and harden tooling
Scripts:
- remote.sh: remove unused open_browser() function
- deploy-remote.sh: add DB backup before deploy, --skip-backup flag, step numbering
- db-backup.sh: fix macOS compat (xargs -r is GNU-only), use portable approach
- db-restore.sh: add safety backup before restore, SQL file validation, file size display
- logs.sh: default to no-follow with --tail=100, order-independent arg parsing
- docker-cleanup.sh: add Docker health check, colored output
- test-sequential.sh: exclude *.integration.test.ts by default, add --integration flag
- simulate-ci.sh: pass --integration flag (has real DB)

Tests:
- db.test.ts: fix mock path from ./DrizzleClient to @shared/db/DrizzleClient
- server.settings.test.ts: rewrite mocks for gameSettingsService (old config/saveConfig removed)
- server.test.ts: add missing config.lootdrop and BotClient mocks, complete DrizzleClient chain
- indexes.test.ts: rename to indexes.integration.test.ts (requires live DB)

Config:
- package.json: test script uses sequential runner, add test:ci and db:restore aliases
- deploy.yml: use --integration flag in CI (has Postgres service)
2026-02-13 14:39:02 +01:00

40 lines
1.5 KiB
JSON

{
"name": "app",
"version": "1.1.4-pre",
"module": "bot/index.ts",
"type": "module",
"private": true,
"devDependencies": {
"@types/bun": "latest",
"drizzle-kit": "^0.31.8"
},
"peerDependencies": {
"typescript": "^5.9.3"
},
"scripts": {
"generate": "docker compose run --rm app drizzle-kit generate",
"migrate": "docker compose run --rm app drizzle-kit migrate",
"db:push": "docker compose run --rm app drizzle-kit push",
"db:push:local": "drizzle-kit push",
"dev": "bun --watch bot/index.ts",
"db:studio": "drizzle-kit studio --port 4983 --host 0.0.0.0",
"db:migrate-config": "docker compose run --rm app bun shared/scripts/migrate-config-to-db.ts",
"db:migrate-game-config": "docker compose run --rm app bun shared/scripts/migrate-game-settings-to-db.ts",
"db:migrate-all": "docker compose run --rm app sh -c 'bun shared/scripts/migrate-config-to-db.ts && bun shared/scripts/migrate-game-settings-to-db.ts'",
"remote": "bash shared/scripts/remote.sh",
"logs": "bash shared/scripts/logs.sh",
"db:backup": "bash shared/scripts/db-backup.sh",
"db:restore": "bash shared/scripts/db-restore.sh",
"test": "bash shared/scripts/test-sequential.sh",
"test:ci": "bash shared/scripts/test-sequential.sh --integration",
"docker:cleanup": "bash shared/scripts/docker-cleanup.sh"
},
"dependencies": {
"@napi-rs/canvas": "^0.1.89",
"discord.js": "^14.25.1",
"dotenv": "^17.2.3",
"drizzle-orm": "^0.44.7",
"postgres": "^3.4.8",
"zod": "^4.3.6"
}
}