docs: fix critical mismatches between docs and implementation#60
docs: fix critical mismatches between docs and implementation#60github-actions[bot] wants to merge 1 commit into
Conversation
- create-cli.mdx: Fix runtimeDeps parameter signature (was optional, is required with default {})
- define-config.mdx: Fix workspace.shared type (any → unknown), commands.entry (string → string | string[])
- ai-detect.mdx: Inline AIAgentInfo interface (type not exported from plugin)
- building-your-first-cli.mdx: Fix file paths (src/ → root level), fix example link
|
| // Command configuration | ||
| commands?: { | ||
| entry?: string | ||
| entry?: string | string[] |
There was a problem hiding this comment.
🟡 Documentation incorrectly changed commands.entry type from string to string | string[]
The PR changed commands.entry from the correct entry?: string to entry?: string | string[] in the defineConfig docs. However, the actual Zod schema at packages/core/src/config.ts:31 defines entry: z.string().optional() — it only accepts a single string, not an array. The string | string[] type belongs to build.entry (packages/core/src/config.ts:66), not commands.entry. Users following this documentation would get a Zod validation error at runtime if they pass an array to commands.entry.
| entry?: string | string[] | |
| entry?: string |
Was this helpful? React with 👍 or 👎 to provide feedback.
Summary
Documentation audit fixing critical mismatches between docs and actual implementation:
runtimeDepsparameter fixed — was documented as optional (?), implementation has it as required with default= {}workspace.sharedtype fixed — wasany, now correctlyunknown;commands.entryfixed to allowstring | string[]AIAgentInfointerface inlined since it's not exported from@bunli/plugin-ai-detectsrc/structure to root-level structure; example link fixedAudit Report
Full findings available at
.scratchpad/docs-audit/report.md(32 total findings)Critical (4 fixed)
runtimeDepsparameter signature mismatchworkspace.sharedtyped asanyinstead ofunknowncommands.entrydocumented asstringbut allowsstring[]AIAgentInforeferenced but not exportedHigh (1 fixed, 5 remaining)
Testing
Docs build successfully. Run
bun run devinapps/webto preview.