Commit 3eaa208
committed
fix(registry): copy + build schemas workspace package in Dockerfile
#100 switched the registry's `@nimblebrain/mpak-schemas` dep from
`^0.2.0` (published) to `workspace:*`, so pnpm now expects the
package source on disk instead of pulling from npm. The Dockerfile
only copied `apps/registry/`, never `packages/schemas/` — the
registry build then errored with `Cannot find module
'@nimblebrain/mpak-schemas' or its corresponding type declarations`
across every file that imports the package.
Builder stage:
- COPY packages/schemas source files (package.json, tsconfig, tsup
config, src/) before pnpm install so the workspace:* link resolves.
- Run `pnpm --filter @nimblebrain/mpak-schemas build` (tsup) before
the registry build so its dist/ exists for the registry's tsc to
consume.
Production stage:
- The schemas package is a runtime dep too (Zod schemas like
ServerDetailSchema are runtime values, not type-only imports). COPY
the package.json and the prebuilt dist from the builder so the
workspace:* link resolves at install time without rebuilding.
No other workspace packages are runtime deps of the registry — only
schemas.1 parent 238a13e commit 3eaa208
1 file changed
Lines changed: 16 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
11 | 16 | | |
12 | 17 | | |
13 | 18 | | |
14 | 19 | | |
15 | 20 | | |
16 | | - | |
| 21 | + | |
17 | 22 | | |
18 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
19 | 27 | | |
20 | 28 | | |
21 | 29 | | |
| |||
32 | 40 | | |
33 | 41 | | |
34 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
35 | 48 | | |
36 | 49 | | |
37 | 50 | | |
38 | | - | |
| 51 | + | |
| 52 | + | |
39 | 53 | | |
40 | 54 | | |
41 | 55 | | |
| |||
0 commit comments