Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 47 additions & 47 deletions api/package.json
Original file line number Diff line number Diff line change
@@ -1,49 +1,49 @@
{
"name": "argentumonlineweb-api",
"version": "1.0.0",
"private": true,
"description": "Minimal auth/character API backed by PostgreSQL for Argentum Online Web",
"main": "dist/server.js",
"scripts": {
"clean": "rm -rf dist",
"apply-balance": "tsx src/scripts/applyBalanceToCharacters.ts",
"apply-balance:prod": "node dist/scripts/applyBalanceToCharacters.js",
"cancel-npc-sold-market-listings": "tsx src/scripts/cancelNpcSoldMarketListings.ts",
"cancel-npc-sold-market-listings:prod": "node dist/scripts/cancelNpcSoldMarketListings.js",
"diag:double-login": "tsx src/scripts/diagnoseDoubleLogin.ts",
"balance-snapshot": "tsx src/scripts/reportBalanceSnapshot.ts",
"export-frontend-npcs": "tsx src/scripts/exportFrontendNpcs.ts",
"export-frontend-npcs:frontend": "tsx src/scripts/exportFrontendNpcs.ts --output ../frontend/public/init/npcs.json",
"fix-missing-heads": "tsx src/scripts/fixCharactersMissingHeads.ts",
"fix-missing-heads:prod": "node dist/scripts/fixCharactersMissingHeads.js",
"import-game-data": "tsx src/scripts/importGameData.ts",
"import-game-data:prod": "node dist/scripts/importGameData.js npcs",
"remove-newbie-items": "tsx src/scripts/removeNewbieItemsFromHighLevelCharacters.ts",
"remove-newbie-items:prod": "node dist/scripts/removeNewbieItemsFromHighLevelCharacters.js",
"reset-spell-stats": "tsx src/scripts/resetSpellStats.ts",
"reset-spell-stats:prod": "node dist/scripts/resetSpellStats.js",
"build": "pnpm run clean && tsc && mkdir -p dist/jsons dist/mapas_source && cp src/jsons/*.json dist/jsons/ && cp -R src/mapas_source/. dist/mapas_source/",
"dev": "tsx watch src/server.ts",
"balance-csv": "tsx src/scripts/exportBalanceComparison.ts",
"test": "vitest run",
"test:watch": "vitest",
"test:vaults": "vitest run src/tests/vaults.integration.test.ts",
"migrate": "node dist/migrate.js",
"start": "pnpm run migrate && node dist/server.js"
},
"dependencies": {
"@aws-sdk/client-sesv2": "^3.1048.0",
"bcryptjs": "^3.0.2",
"express": "^5.1.0",
"pg": "^8.16.3",
"zod": "^4.1.11"
},
"devDependencies": {
"@types/express": "^5.0.3",
"@types/node": "^25.8.0",
"@types/pg": "^8.15.5",
"tsx": "^4.22.1",
"typescript": "^6.0.3",
"vitest": "^4.1.6"
}
"name": "argentumonlineweb-api",
"version": "1.0.0",
"private": true,
"description": "Minimal auth/character API backed by PostgreSQL for Argentum Online Web",
"main": "dist/server.js",
"scripts": {
"clean": "rm -rf dist",
"apply-balance": "tsx src/scripts/applyBalanceToCharacters.ts",
"apply-balance:prod": "node dist/scripts/applyBalanceToCharacters.js",
"cancel-npc-sold-market-listings": "tsx src/scripts/cancelNpcSoldMarketListings.ts",
"cancel-npc-sold-market-listings:prod": "node dist/scripts/cancelNpcSoldMarketListings.js",
"diag:double-login": "tsx src/scripts/diagnoseDoubleLogin.ts",
"balance-snapshot": "tsx src/scripts/reportBalanceSnapshot.ts",
"export-frontend-npcs": "tsx src/scripts/exportFrontendNpcs.ts",
"export-frontend-npcs:frontend": "tsx src/scripts/exportFrontendNpcs.ts --output ../frontend/public/init/npcs.json",
"fix-missing-heads": "tsx src/scripts/fixCharactersMissingHeads.ts",
"fix-missing-heads:prod": "node dist/scripts/fixCharactersMissingHeads.js",
"import-game-data": "tsx src/scripts/importGameData.ts",
"import-game-data:prod": "node dist/scripts/importGameData.js npcs",
"remove-newbie-items": "tsx src/scripts/removeNewbieItemsFromHighLevelCharacters.ts",
"remove-newbie-items:prod": "node dist/scripts/removeNewbieItemsFromHighLevelCharacters.js",
"reset-spell-stats": "tsx src/scripts/resetSpellStats.ts",
"reset-spell-stats:prod": "node dist/scripts/resetSpellStats.js",
"build": "pnpm run clean && tsc && echo --- Verifying JSON seed files --- && test -f src/jsons/balance.json && test -f src/jsons/craftingRecipes.json && test -f src/jsons/npcs.json && test -f src/jsons/objs.json && test -f src/jsons/smeltingRecipes.json && test -f src/jsons/spells.json && echo All JSON seed files present && mkdir -p dist/jsons dist/mapas_source && cp src/jsons/balance.json src/jsons/craftingRecipes.json src/jsons/npcs.json src/jsons/objs.json src/jsons/smeltingRecipes.json src/jsons/spells.json dist/jsons/ && cp -R src/mapas_source/. dist/mapas_source/",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Quality: Build whitelist silently drops non-listed jsons/*.json files

The build was changed from cp src/jsons/*.json to an explicit list of 6 files, and each filename now appears twice (in the test -f guard and the cp argument). Any future or generated JSON seed file that is not added to both places will silently be excluded from dist/jsons/. Notably gameData.ts prefers objs.compact.json/npcs.compact.json when present via resolveSeedJsonPath; if those compact variants are ever generated into src/jsons, the old wildcard would have copied them but this new list will not, silently falling back to the full files. Consider keeping the wildcard copy (cp src/jsons/*.json dist/jsons/) for the copy step while retaining the explicit test -f checks only for the required files, so validation stays strict but no file is dropped.

Was this helpful? React with 👍 / 👎

"dev": "tsx watch src/server.ts",
"balance-csv": "tsx src/scripts/exportBalanceComparison.ts",
"test": "vitest run",
"test:watch": "vitest",
"test:vaults": "vitest run src/tests/vaults.integration.test.ts",
"migrate": "node dist/migrate.js",
"start": "pnpm run migrate && node dist/server.js"
},
"dependencies": {
"@aws-sdk/client-sesv2": "^3.1048.0",
"bcryptjs": "^3.0.2",
"express": "^5.1.0",
"pg": "^8.16.3",
"zod": "^4.1.11"
},
"devDependencies": {
"@types/express": "^5.0.3",
"@types/node": "^25.8.0",
"@types/pg": "^8.15.5",
"tsx": "^4.22.1",
"typescript": "^6.0.3",
"vitest": "^4.1.6"
}
}
Loading