Commit c4ac0e9
docs: aggregate CLI error codes from prisma/prisma-cli (#8184)
* docs: aggregate CLI error codes from prisma/prisma-cli
Extends the error-reference pipeline (generator + daily sync + completeness
check) to a second source repo, following the same pattern used for
prisma/prisma. The CLI gets its own page at /docs/cli/error-reference
because the CLI.* namespace exists in both repos with different meanings
(CLI.PROMPT_REQUIRED collides).
- generate-error-reference.mjs takes --target orm|cli; orm output is
unchanged
- both workflows also check out prisma/prisma-cli and run its own
scripts/list-error-codes.mjs to verify page completeness, exactly as
they do with prisma/prisma's scanner
- the generated CLI page (128 codes) is committed, with a sidebar entry
under the CLI section's Introduction group
- next.config.mjs redirects the path form …/error-reference/<CODE> to
the #<CODE> anchor for both the ORM and CLI pages — the CLI engine
composes docsUrls in path form from a family docsBaseUrl, and the ORM
family's links were 404ing on this before
Companion PR (must merge first): prisma/prisma-cli#234, which adds the
canonical registry and scanner this consumes.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
* docs: regenerate the CLI error page after the upstream cleanup
prisma/prisma-cli#234 removed the code-rewriting boundary layer, so the
registry no longer documents a passthrough rule and no longer carries the
two entries that had no raise site. 128 codes -> 126.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
* docs: sync the ORM error reference with prisma/prisma main
The completeness check caught real upstream drift: MIGRATION.PLAN_ORIGIN_UNKNOWN
shipped in prisma/orm#30122 and the page had not been regenerated since.
Also picks up wording changes in three existing entries.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
* docs: teach the spellchecker the CLI error page's real terms
Two genuine names the dictionary lacked: stricli (the argument parser the
engine wraps) and UNWRITABLE (part of the INIT.CONFIG_UNWRITABLE and
INIT.PACKAGE_JSON_UNWRITABLE codes), alongside the existing UNLOADABLE and
UNPARSEABLE entries.
The page itself is regenerated after prisma/prisma-cli fixed four British
spellings and one invented word at the source, rather than adding those to
the dictionary here.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
* docs: publish the CLI error page with the site's REST API name
The docs site does not reintroduce "Management API" in prose (see
apps/docs/CLAUDE.md); prisma-cli uses that name because the SDK it calls
through is literally `@prisma/management-api-sdk`, which is right in that
repo. The generator already exists to bridge that kind of mismatch for the
ORM target, so the CLI target gets the same treatment: 13 prose occurrences
become "REST API".
The rewrite skips fenced blocks and inline code spans, so identifiers keep
their real names — the exception apps/docs/CLAUDE.md calls out.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
* docs: treat every markdown code form as opaque in the generator
The prose rewriter recognized only triple-backtick fences and single-backtick
spans, so a tilde fence or a multi-backtick span would have had its contents
rewritten — the identifiers the rewrite exists to protect.
assertMdxSafe had the same blind spot from the other direction: a brace inside
a tilde fence looked like unescaped MDX and would have failed the build for
text that is only ever displayed.
Both now read one CODE_SEGMENT covering backtick and tilde fences and spans of
any delimiter length, and the rewriter walks matches instead of splitting, so
it no longer depends on the pattern having exactly one capture group.
Verified against both fence styles, one/two/three-backtick spans, and mixed
prose; both pages regenerate byte-identically.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
---------
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Ankur Datta <64993082+ankur-arch@users.noreply.github.com>1 parent 6c8def2 commit c4ac0e9
8 files changed
Lines changed: 787 additions & 101 deletions
File tree
- .github/workflows
- apps/docs
- content/docs
- cli
- orm/reference
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| 19 | + | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
| |||
43 | 45 | | |
44 | 46 | | |
45 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
46 | 56 | | |
47 | 57 | | |
48 | 58 | | |
49 | 59 | | |
50 | 60 | | |
51 | | - | |
| 61 | + | |
52 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
35 | 43 | | |
36 | 44 | | |
37 | 45 | | |
38 | 46 | | |
39 | 47 | | |
40 | | - | |
| 48 | + | |
41 | 49 | | |
42 | | - | |
| 50 | + | |
43 | 51 | | |
44 | | - | |
| 52 | + | |
45 | 53 | | |
46 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
47 | 62 | | |
48 | 63 | | |
49 | 64 | | |
50 | | - | |
51 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
52 | 68 | | |
53 | 69 | | |
54 | | - | |
| 70 | + | |
55 | 71 | | |
56 | | - | |
| 72 | + | |
57 | 73 | | |
58 | 74 | | |
59 | 75 | | |
| |||
65 | 81 | | |
66 | 82 | | |
67 | 83 | | |
68 | | - | |
| 84 | + | |
69 | 85 | | |
70 | 86 | | |
71 | 87 | | |
| |||
0 commit comments