Refactor item property parsing and centralize utility functions

- Moved `parseItemProps` function to `core/utils.ts` for reuse across modules.
- Updated various services to import and utilize the centralized `parseItemProps`.
- Introduced new utility functions for handling consumable cooldowns and healing calculations.
- Enhanced mob management with a new repository system, allowing for dynamic loading and validation of mob definitions from the database.
- Added admin functions for creating, updating, listing, and deleting mobs, with validation using Zod.
- Implemented tests for mob management functionalities.
- Improved error handling and logging throughout the mob and consumable services.
This commit is contained in:
Shni
2025-10-14 12:57:53 -05:00
parent cd1db9d6eb
commit f36fa24e46
21 changed files with 1483 additions and 439 deletions

View File

@@ -18,6 +18,7 @@
"tsc": "tsc",
"typecheck": "tsc --noEmit",
"seed:minigames": "npx tsx src/game/minigames/seed.ts",
"test:mobs": "npx tsx scripts/testMobData.ts",
"start:optimize-relic": "NODE_ENV=production ENABLE_MEMORY_OPTIMIZER=true NEW_RELIC_APP_NAME=amayo NEW_RELIC_LICENSE_KEY= NODE_OPTIONS='--max-old-space-size=512 --expose-gc' npx tsx --experimental-loader=newrelic/esm-loader.mjs src/main.ts"
},
"keywords": [],
@@ -35,7 +36,8 @@
"ejs": "^3.1.10",
"newrelic": "13.4.0",
"node-appwrite": "19.1.0",
"pino": "9.13.0",
"pino": "9.13.0",
"zod": "4.25.1",
"prisma": "6.16.2",
"redis": "5.8.2"
},