Repository navigation
Expand file tree
/
Copy pathpackage.json
More file actions
43 lines (43 loc) · 2.11 KB
/
Copy pathpackage.json
File metadata and controls
43 lines (43 loc) · 2.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
{
"name": "fullstack-typescript-platform",
"version": "0.1.0",
"private": true,
"description": "Auth, RBAC, REST + GraphQL and WebSockets over one domain layer, in TypeScript. Postgres, Redis, Docker, Kubernetes manifests.",
"license": "MIT",
"author": "Nur Afzan Zulaikha",
"repository": {
"type": "git",
"url": "https://github.com/technikky/fullstack-typescript-platform.git"
},
"engines": {
"node": ">=20"
},
"comment:layout": [
"This is a task runner, not an npm workspace root. `server` and `web` are two independent",
"applications that happen to share a repository: they share no code, they talk to each other",
"over HTTP, and each has its own lockfile, its own Dockerfile and its own CI job.",
"",
"It DID declare `workspaces: [server, web]`, and CI proved that wrong immediately. With a",
"workspace root present, npm treats the root as the project and looks for the lockfile there,",
"so `npm ci` inside server/ failed with EUSAGE: 'can only install with an existing",
"package-lock.json'. The per-package lockfiles were still on disk; npm had simply stopped",
"looking at them.",
"",
"Hoisting to a root lockfile was the alternative, but it makes both Dockerfiles worse: each",
"builds from its own directory as context, and a root lockfile would force a repo-root build",
"context plus a workspace-scoped install just to reach it. Two independent packages is what",
"the deployment topology already is, so the manifest now says so."
],
"scripts": {
"install:all": "cd server && npm ci && cd ../web && npm ci",
"typecheck": "cd server && npm run typecheck && cd ../web && npm run typecheck",
"test": "cd server && npm test && cd ../web && npm test",
"test:coverage": "cd server && npm run test:coverage && cd ../web && npm run test:coverage",
"build": "cd server && npm run build && cd ../web && npm run build",
"dev:api": "cd server && npm run dev",
"dev:web": "cd web && npm run dev",
"loadtest": "cd server && npx tsx src/bench/loadtest.ts",
"up": "docker compose up --build",
"down": "docker compose down -v"
}
}