Skip to content

v0.0.147

Choose a tag to compare

@github-actions github-actions released this 01 Aug 02:36
  • Emit the generated layout.tsx's Google font options the way Prettier writes them: the font call was assembled on one line with its arrays passed whole through JSON.stringify, which puts no space after a comma, so a fonts.json naming more than one subset or weight produced weight: ["400","500"] inside a file the generator is meant to emit already formatted. Options now go one per line with a trailing comma and every element quoted individually, a shape Prettier preserves as written, and a Google font configured with no options at all emits ({}) rather than the ({ }) the old join left behind
  • Keep the generated site Prettier-clean under test rather than trusting each template to be: the generated package.json gains a format:check script and pnpm smoke:generated runs it against a real generated app after type-check and lint, so a template that drifts from Prettier's output fails the smoke test instead of being quietly rewritten the first time someone runs format. The seven configuration files the generator mirrors byte-for-byte from the project root - analytics.json, config.json, fonts.json, links.json, navigation.json, sections.json, and theme.json - are exempt in the generated .prettierignore, since reformatting a copy would both overrule the author's own formatting and make that copy differ from the source it is fingerprinted against, and a new test pins both halves so a mirrored config added later cannot start failing the check on a file its author never asked to be reformatted
  • Recognize an MDX source by its extension case-insensitively everywhere: the check was spelled out separately in source discovery, the watcher's change filter, the watcher's restart fingerprint, and the Markdown-mirror body reader, and they disagreed about case, so a file saved as Guide.MDX counted towards the fingerprint that decides whether to restart the watchers while being skipped by the scan that generates pages - invisible to the site, but not to the work it caused. All four now route through one isMdxPath helper, and generateSlug strips the extension case-insensitively too, so an uppercase source resolves to the same lowercase route as any other
  • Fail with a usable message when no port is free: findAvailablePort recursed a port at a time with nothing stopping it at the end of the range, so a machine with every port above the configured one taken ended in listen(65536) and a RangeError about an out-of-range option, which explains neither what happened nor what to do about it. The scan is now a loop that stops at 65535 and raises an error naming the range it searched and pointing at the port key in doccupine.json
  • Print a command failure the way a CLI should rather than dumping Node's default stack trace: an error escaping doccupine watch, build, or config reached the top level unhandled, so the trace came first and the sentence telling the reader what to fix was somewhere inside it. Failures now go through reportCliError, which leads with the actionable message, indents each nested Error.cause and every AggregateError member underneath it - shutdown raises exactly that shape when more than one watcher refuses to close - and prints the raw stack only when --verbose was passed, naming --verbose when it was not. The cause walk keeps a seen set so a self-referencing chain cannot hang the command, --verbose is now accepted by build and config as well as watch so the hint is actionable wherever it appears, and a failed command exits 1
  • Render the homepage once per pass instead of twice: reconciling index.mdx called renderHomepage itself and the aggregate pass then wrote the same file again through updatePagesIndex, a leftover from before that pass existed, so every homepage edit paid for two renders and two writes of identical output. The direct call is gone, and the const operation = JSON.parse(...) declaration that carries an endpoint descriptor into a page with an openapi frontmatter field now comes from one shared helper, so the homepage's copy picks the same quoting and line break a normal page's does instead of being double-stringified whatever its width
  • Expand the generated platform documentation: Agent Sync separates asking a question, which the agent answers in the chat without touching your pages, from asking for a change, which starts a run, and states that a run commits itself only when every page it wrote is set to auto-update and untouched by hand - anything else stages the whole change set and waits for review as a unit. Publishing documents the agent badge on files a run staged, the notice that names how many conversations are waiting, and the lock that keeps Deploy and the discard controls disabled while a run is still writing. Analytics and Fonts settings explain that turning a toggle off stages a deletion of the underlying config file rather than saving an empty one, that a hand-authored value outside the offered choices round-trips as Custom rather than snapping back to a default, and each gains a Validation section listing the rules the generator enforces on save
  • Move the generated Chat component's styles into components/ChatStyles.ts and the API playground's helpers into utils/apiPlayground.ts, both registered in the structure map like every other generated file, which leaves Chat.tsx and ApiPlayground.tsx as the components themselves. Regression coverage grows to 314 tests
  • Update generated app dependencies posthog-js to ^1.409.5 and posthog-node to ^5.47.3