Skip to content

Commit c7eee8f

Browse files
committed
site(getting-started): verified against 1.0.7; install typescript and show how to typecheck
A cold run of this page against npm 1.0.7 finished every step, including all five REST verbs. Three fixes: - The stamp said the transcripts were verified against 1.0.4; they are re-checked against 1.0.7 (a fresh project's gen --list, the generated Task.ts excerpt). - `meta gen --list` now opens with three lines saying each generator is a reference helper; the transcript shows them. - The CLI's own hint after gen is `npx tsc --noEmit`, but the page never installed typescript or created a tsconfig.json, so a cold reader hit npm's "not the tsc command you are looking for" guard. The install line adds typescript and the Generate section shows `npx tsc --init` then `npx tsc --noEmit` (the cold run typechecked clean that way). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01M1mRRB1K2WdYy82kntMQdx
1 parent 5707655 commit c7eee8f

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

‎www/getting-started.html‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ <h1>One typed model → idiomatic code, in your language.</h1>
5151
for tasks,"</em> <em>"add a priority field and update everything."</em> Because <code>meta&nbsp;init</code> installs
5252
the MetaObjects skills, it knows the model is the source of truth: it edits the model, picks the generators the
5353
job needs, and <strong>generates the code</strong> — it never hand-writes the boilerplate. Every command and
54-
output below is real <span class="real">verified</span>, run against <code>@metaobjectsdev/cli@1.0.4</code>.</p>
54+
output below is real <span class="real">verified</span>, run against <code>@metaobjectsdev/cli@1.0.7</code>.</p>
5555
</section>
5656

5757
<section>
@@ -180,6 +180,9 @@ <h2 class="section-label">5 · Choose your generators</h2>
180180
<em>your</em> metadata and reports how many files each would emit:</p>
181181
<pre class="gs-code">$ npx meta gen --list --probe
182182
Generator catalog — nothing runs until you wire it in `generators: [...]`.
183+
Each generator is a reference helper, not a guarantee: `meta eject &lt;name&gt;` copies it into
184+
your repo and the copy is yours to change. What MetaObjects guarantees (migrate, verify,
185+
render) is not a generator and is not listed here.
183186

184187
model — the entity modules and the constants beside them
185188
barrel — Single index.ts re-exporting every generated entity module. [would emit 1]
@@ -208,7 +211,7 @@ <h2 class="section-label">5 · Choose your generators</h2>
208211
<p class="gs-note">Those five files are the point: they're plain TypeScript in your repo, and <strong>yours to
209212
edit</strong>. <code>meta gen</code> runs those local copies — not the ones inside the package — so changing
210213
the shape of the generated code is an ordinary edit to a file you own. Install what they import:</p>
211-
<pre class="gs-code">npm i -D <span class="s">@metaobjectsdev/codegen-ts</span>
214+
<pre class="gs-code">npm i -D <span class="s">@metaobjectsdev/codegen-ts</span> <span class="s">typescript</span>
212215
npm i <span class="s">@metaobjectsdev/runtime-ts</span> <span class="s">"drizzle-orm@&gt;=0.36.0 &lt;1.0.0"</span> <span class="s">"fastify@&gt;=5.0.0 &lt;6.0.0"</span> <span class="s">"zod@&gt;=3.23.0 &lt;5.0.0"</span></pre>
213216
<p class="gs-note">Then add them to <code>metaobjects.config.ts</code>, with the config keys the routes need. Here's
214217
the file with <code>meta init</code>'s longer comments trimmed:</p>
@@ -279,6 +282,11 @@ <h2 class="section-label">6 · Generate</h2>
279282
status: z.enum([<span class="s">"open"</span>, <span class="s">"active"</span>, <span class="s">"done"</span>]).optional(),
280283
createdAt: z.string(),
281284
});</pre>
285+
<p class="gs-note">To typecheck what was generated, create a <code>tsconfig.json</code> once and run the compiler.
286+
<code>meta init</code> only scaffolds <code>tsconfig.codegen.json</code>, which covers the generators you own,
287+
not <code>src/</code>:</p>
288+
<pre class="gs-code">npx tsc --init
289+
npx tsc --noEmit</pre>
282290
</section>
283291

284292
<section>

0 commit comments

Comments
 (0)