Commit f01c247
authored
feat: enable Prisma Compute deploys for the NestJS template (#46)
* feat: enable Prisma Compute deploys for the NestJS template
Compute's SDK gained a NestJS build strategy (project-compute #94), so the
nest template can now deploy. Add it to COMPUTE_DEPLOYABLE_TEMPLATES and ship
a prisma.compute.ts with framework "nestjs" (detected, no entrypoint; the
default HTTP port 3000 matches the template's listen port).
The compute:deploy script and README Compute sections wire up automatically
off the deployable gate.
* fix: actually deploy the NestJS template, add its compute-sdk dep
Enabling nest needs three registries, not one. The first PR only added it to
COMPUTE_DEPLOYABLE_TEMPLATES (which gates the deploy prompt), so the prompt
showed but the deploy was skipped:
- DEPLOY_OPTIONS_BY_TEMPLATE gates the actual deploy. Without a nest entry,
collectComputeDeployContext returned null after the user confirmed, so no
deploy ran and no URL was printed.
- computeConfigTemplates adds @prisma/compute-sdk as a devDependency for the
generated prisma.compute.ts types.
nest is a single-app template, so its deploy entry is {} (no configTarget).
* docs: list nest as a Compute-deployable template in the README
* fix: nest build must emit compiled output for deploy (bun/node)
The NestJS deploy strategy compiles and ships dist/, so its build script must
emit. The shared runtimeScript helper used `tsc --noEmit` for bun (and
`deno check` for deno) because those runtimes execute TypeScript directly —
fine for hono/elysia (the SDK bundles their source) but it left nest with no
dist/main.js, so deploys failed with "Build failed locally" under bun.
Add an `emit` option to runtimeScript; nest opts in so its build compiles to
dist on every node-style PM and bun. Deno keeps `deno check` — the Deno nest
variant uses Deno APIs and isn't built for the node-based Compute runtime.1 parent 3cc1dab commit f01c247
8 files changed
Lines changed: 25 additions & 4 deletions
File tree
- src
- constants
- tasks
- templates
- utils
- templates/create/nest
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| 104 | + | |
104 | 105 | | |
105 | 106 | | |
106 | 107 | | |
| |||
152 | 153 | | |
153 | 154 | | |
154 | 155 | | |
155 | | - | |
| 156 | + | |
156 | 157 | | |
157 | 158 | | |
158 | 159 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| 105 | + | |
105 | 106 | | |
106 | 107 | | |
107 | 108 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| 104 | + | |
104 | 105 | | |
105 | 106 | | |
106 | 107 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
17 | 21 | | |
18 | 22 | | |
19 | 23 | | |
| |||
198 | 202 | | |
199 | 203 | | |
200 | 204 | | |
201 | | - | |
| 205 | + | |
202 | 206 | | |
203 | 207 | | |
204 | 208 | | |
| |||
213 | 217 | | |
214 | 218 | | |
215 | 219 | | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
216 | 223 | | |
217 | 224 | | |
218 | 225 | | |
| |||
231 | 238 | | |
232 | 239 | | |
233 | 240 | | |
234 | | - | |
| 241 | + | |
235 | 242 | | |
236 | 243 | | |
237 | 244 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
0 commit comments