✨ Close SDK gaps found auditing three production Nuxt sites - #13
Merged
Conversation
An explicit `-o` is resolved against the working directory again. Only the default output path is placed under a Nuxt 4 `app/` rootDir, so `-o ./app/b10cks/types` no longer lands in `app/app/…`. Each generated block interface carries a literal `block: 'slug'`, narrowing `B10cksItem`'s `block: string`, so a heterogeneous body array can be discriminated without a cast. A schema field named `block` is skipped, since it would redeclare the discriminant.
`contents.get`, `create`, `update`, `move`, `publish`, `unpublish` and
`schedule` declared a bare `Content` but resolved to `{ data: Content }`, so
callers had to branch on the shape themselves. They now unwrap, making the
declared type true. An already-bare response passes through untouched.
- `@b10cks/client`: `rv` is part of `IBBaseQueryParams`, so pinning a request to a revision no longer needs an `as object` cast. `getDataEntries` takes a typed `IBDataEntryParams` with `dimension`. `GetConfigOptions.language` is deprecated in favour of `language_iso`; both still work. - `@b10cks/client`: `renderSitemapXml` and `filterSitemapEntries` take a `localePrefix` strategy (`auto` | `always` | `never` | `except-default`), defaulting to `auto`. A mono-lingual space previously emitted `/en/about` for a page served at `/about`, making every sitemap URL a 404 or redirect. - `@b10cks/nuxt`: `useB10cksConfig` watches `language_iso` as well as `language`. New `useB10cksServerApi()` gives Nitro routes the full `B10cksDataApi`, and `useB10cksVersion()` normalizes `?b10cks_vid`. - `@b10cks/richtext`: new `isRichTextEmpty(document)`, re-exported from `@b10cks/vue/rich-text` and `@b10cks/nuxt`, so a field an editor cleared can skip its wrapper markup.
badmike
force-pushed
the
fix/preview-scoped-updates
branch
from
August 24, 2026 20:51
bdd54af to
0a032af
Compare
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Wiring three production Nuxt sites against the SDK turned up a set of small gaps where the packages made you work around them: casts for typed params, hand-rolled paginated fetches in Nitro routes, a sitemap that emitted the wrong URLs for a mono-lingual space, and a
generate typesoutput path that doubledapp/.Each one is fixed at the source rather than in the sites.
@b10cks/clientrvis part ofIBBaseQueryParams, so pinning a request to a revision no longer needs anas objectcast.getDataEntriestakes a typedIBDataEntryParamswithdimension.GetConfigOptions.languageis deprecated in favour oflanguage_iso, matching every other content param. Both still work.renderSitemapXmlandfilterSitemapEntriestake alocalePrefixstrategy (auto|always|never|except-default), defaulting toauto. A mono-lingual space previously emitted/en/aboutfor a page served at/about, making every sitemap URL a 404 or a redirect.@b10cks/nuxtuseB10cksConfigwatcheslanguage_isoas well aslanguage, so a config passedlanguage_isorefetches on a locale change instead of going stale.useB10cksServerApi(), auto-imported in the server bundle: Nitro routes get the fullB10cksDataApiinstead of hand-rolled paginated fetches and TTL caches.useB10cksVersion(), normalizing?b10cks_vidto a version string defaulting topublished.@b10cks/richtextisRichTextEmpty(document), re-exported from@b10cks/vue/rich-textand@b10cks/nuxt. A field an editor cleared usually leaves an empty paragraph behind; this lets you skip the wrapper markup.@b10cks/cli(separate commit)-ois resolved against the working directory again, so-o ./app/b10cks/typesno longer lands inapp/app/….block: 'slug', so a heterogeneous body array can be discriminated onblockwithout a cast.@b10cks/mgmt-client(separate commit)Contentbut resolved to{ data: Content }. They now unwrap, making the declared type true.Changesets included. Typecheck, lint and tests pass.
🤖 Generated with Claude Code