Document the migration/seed/API/web workflow in a root README, add an API e2e smoke test that always checks /api/health and additionally exercises the real DatabaseModule/seeded data plus the arrivesAt validation rejection when DATABASE_URL is available, and add a `test:e2e` root script. Also fix `.env` loading so the documented root-level `.env` is actually found: `main.ts` never loaded dotenv at all, and `data-source.ts` loaded it relative to `process.cwd()`, which is `apps/api` (not the repo root) whenever npm runs a `--workspace` script. Both now resolve the repo-root `.env` explicitly. Also narrowed the CLI migrations glob to numeric-prefixed files so it no longer tries to load the colocated `*.migration.spec.ts` as a migration. Verified end-to-end against a real PostgreSQL instance: migrate, seed twice (idempotent), start the API, and exercise every documented route including a rejected POST /api/travel body containing arrivesAt. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
40 lines
1.2 KiB
JSON
40 lines
1.2 KiB
JSON
{
|
|
"name": "ashen-realms",
|
|
"version": "1.0.0",
|
|
"description": "",
|
|
"main": "index.js",
|
|
"directories": {
|
|
"doc": "docs"
|
|
},
|
|
"scripts": {
|
|
"dev:web": "npm run start --workspace=@ashen-realms/web",
|
|
"dev:api": "npm run start:dev --workspace=@ashen-realms/api",
|
|
"build:web": "npm run build --workspace=@ashen-realms/web",
|
|
"build:api": "npm run build --workspace=@ashen-realms/api",
|
|
"build": "npm run build:web && npm run build:api",
|
|
"test": "npm run test --workspaces --if-present",
|
|
"test:e2e": "npm run test:e2e --workspace=@ashen-realms/api --",
|
|
"db:migrate": "npm run typeorm --workspace=@ashen-realms/api -- migration:run -d src/database/data-source.ts",
|
|
"db:revert": "npm run typeorm --workspace=@ashen-realms/api -- migration:revert -d src/database/data-source.ts",
|
|
"db:seed": "npm run seed --workspace=@ashen-realms/api"
|
|
},
|
|
"workspaces": [
|
|
"apps/*",
|
|
"packages/*"
|
|
],
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://gitea.forgecore.work/bastian/ashen-realms.git"
|
|
},
|
|
"keywords": [],
|
|
"author": "",
|
|
"license": "ISC",
|
|
"type": "commonjs",
|
|
"private": "true",
|
|
"devDependencies": {
|
|
"caniuse-lite": "^1.0.30001809",
|
|
"css-tree": "^3.2.1",
|
|
"ts-node": "^10.9.2"
|
|
}
|
|
}
|