Files
History/package.json
T
kamilkrzywda b237fe8dd4
CI / build + unit + e2e (pull_request) Successful in 2m11s
feat: Resources & Industry — per-region resource profiles + industry LLM lever (v0.36.0, #59)
- scripts/build-region-resources.mjs: deterministic, idempotent builder →
  public/region-resources.json (1,800 entries; FNV-1a hash × area factor, 0–1, 2dp)
- server/regions.ts: hasResources()/resourceOf() optional-manifest loader
- shared/types.ts: RegionResources, IndustryType/INDUSTRY_TYPES, IndustryProject,
  GameState.industry
- shared/protocol.ts: IndustryOps, TurnResult.industry, deriveNationResources
  (area×population-weighted average, 2dp)
- server/engine.ts: isIndustryType, validateIndustryOps, applyIndustryOps
  (per-region SET, first-declared-type wins), applyIndustryEffects
  (INDUSTRY_ECONOMY_BONUS=1, +1 when region industry≥0.5; sole-owner only;
  0/2+ owner regions kept but no boost; re-derive after), system+user prompt
  contract lines, runTurn resourceOf opt, nationResources in user payload
- server/db.ts: legacy-row industry default migration
- server/stub.ts: industry:{projects:[]} in stub result; resources/industry
  in StubPayload (never read)
- server/index.ts: resourceOf wired to jump route
- All test fixtures updated; new describe blocks in engine.test.ts,
  protocol.test.ts, regions.test.ts, db.test.ts
- CHANGELOG.md v0.36.0, AGENTS.md docs, package.json 0.36.0

Fixes #59
2026-10-15 18:23:05 +00:00

82 lines
2.9 KiB
JSON

{
"name": "history",
"version": "0.36.0",
"private": true,
"type": "module",
"description": "AI-driven alternate-history simulator — the LLM is the world engine (Pax Historia style).",
"scripts": {
"dev": "concurrently -n server,client -c blue,magenta \"tsx watch server/index.ts\" \"vite\"",
"build": "vite build && tsup server/index.ts --format esm --target node22 --out-dir server/dist --external better-sqlite3",
"start": "node server/dist/index.js",
"test": "vitest run",
"generate:regions": "node scripts/generate-regions.mjs",
"coarsen:regions": "node scripts/coarsen-regions.mjs",
"cleanup:regions": "node scripts/cleanup-regions.mjs",
"smooth:regions": "node scripts/smooth-regions.mjs",
"fill:regions": "node scripts/fill-gaps.mjs",
"split:regions": "node scripts/split-arkhangel.mjs",
"split:regions:band": "node scripts/split-arkhangel-band.mjs",
"build:region-keys": "node scripts/build-region-keys.mjs",
"build:region-adjacency": "node scripts/build-region-adjacency.mjs",
"build:region-centroids": "node scripts/build-region-centroids.mjs",
"build:region-geo": "node scripts/build-region-geo.mjs",
"build:region-resources": "node scripts/build-region-resources.mjs",
"extract:admin0-pop": "node scripts/extract-admin0-pop.mjs",
"typecheck": "tsc --noEmit",
"lint": "eslint .",
"e2e": "playwright test"
},
"dependencies": {
"@radix-ui/react-dialog": "^1.1.6",
"@radix-ui/react-label": "^2.1.2",
"@radix-ui/react-scroll-area": "^1.2.3",
"@radix-ui/react-select": "^2.1.7",
"@radix-ui/react-tabs": "^1.1.3",
"@radix-ui/react-tooltip": "^1.1.8",
"better-sqlite3": "^11.10.0",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"cn": "^0.4.0",
"express": "^4.21.2",
"lucide-react": "^0.469.0",
"maplibre-gl": "^6.10.0",
"next-themes": "^0.4.6",
"radix-ui": "^1.7.0",
"react": "^19.3.0",
"react-dom": "^19.3.0",
"sonner": "^1.7.4",
"tailwind-merge": "^3.0.0"
},
"devDependencies": {
"@eslint/js": "^9.20.0",
"@playwright/test": "^1.62.1",
"@tailwindcss/vite": "^4.1.4",
"@turf/area": "^7.4.0",
"@turf/bbox": "^7.4.0",
"@turf/boolean-point-in-polygon": "^7.4.0",
"@turf/centroid": "^7.4.0",
"@turf/difference": "^7.4.0",
"@turf/distance": "^7.4.0",
"@turf/simplify": "^7.4.0",
"@turf/turf": "^7.4.0",
"@turf/union": "^7.4.0",
"@types/better-sqlite3": "^7.6.13",
"@types/express": "^4.17.25",
"@types/node": "^22.13.0",
"@types/react": "^19.3.0",
"@types/react-dom": "^19.3.0",
"@vitejs/plugin-react": "^4.4.1",
"concurrently": "^9.1.0",
"eslint": "^9.20.0",
"eslint-plugin-react-hooks": "^5.1.0",
"globals": "^16.0.0",
"tailwindcss": "^4.1.4",
"tsup": "^8.3.5",
"tsx": "^4.19.2",
"typescript": "~5.8.3",
"typescript-eslint": "^8.24.0",
"vite": "^6.3.5",
"vitest": "^3.2.4"
}
}