Skip to content

Commit deba51d

Browse files
committed
chore: changeset for #4926
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BbNVKv6KgPzuQ5p76nMgnf
1 parent 7968eb9 commit deba51d

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
'create-objectstack': patch
3+
---
4+
5+
fix(create-objectstack): scaffolding a remote template no longer produces a project that cannot build (#4926)
6+
7+
`npx create-objectstack@latest my-app -t todo` (and `compliance`, `content`,
8+
`contracts`, `procurement`) generated a project that failed `objectstack build`
9+
immediately — 5 of the 6 offered templates. Only the bundled `blank` worked.
10+
11+
The scaffolder read the template's original namespace from
12+
`objectstack.manifest.json`, and that filename names two different documents.
13+
The bundled template's is app-shaped and carries `namespace`; a remote
14+
template's is the template-registry document
15+
(`$schema: …/template-manifest.json`) and carries none — its namespace lives
16+
only in `objectstack.config.ts`. So the value came back `undefined` for every
17+
remote template and the object-name rewrite was skipped, while the config's
18+
`namespace:` was rewritten anyway. The result was `namespace: 'my_app'` sitting
19+
next to `name: 'todo_task'`, which the `${namespace}_${shortName}` rule rejects.
20+
Across the five templates, 74 object names were left unrewritten.
21+
22+
`objectstack.config.ts` is now the authority for the template namespace (it
23+
holds the very literal the scaffolder overwrites, so the two cannot disagree),
24+
with the manifest as fallback. The rewrite also verifies itself: any surviving
25+
stale prefix throws at the scaffold, naming the files and lines, instead of
26+
surfacing as a build failure on the user's first command.

0 commit comments

Comments
 (0)