Repair two rendering defects in the SDK reference - #275
Closed
daniellekorn wants to merge 1 commit into
Closed
Conversation
🚀 Package Preview Available!Install this PR's preview build with npm: npm i @base44-preview/sdk@0.8.46-pr.275.68973a5Prefer not to change any import paths? Install using npm alias so your code still imports npm i "@base44/sdk@npm:@base44-preview/sdk@0.8.46-pr.275.68973a5"Or add it to your {
"dependencies": {
"@base44/sdk": "npm:@base44-preview/sdk@0.8.46-pr.275.68973a5"
}
}
Preview published to npm registry — try new features instantly! |
1. Four auth examples and two integrations examples lost their first line of code. The pipeline promotes a leading // comment to the Mintlify code-block title, and an example without one has its first real line consumed instead. inviteUser, resetPasswordRequest, resetPassword and changePassword each published a try block with no try, and an orphaned closing brace. These six are live on the site today. Each now opens with a comment that describes the example. 2. connectors.callApi() published its query parameter as Record<string, ... | ... | ... | ... | ...>. TypeDoc truncates long inline unions, so the union is given a name, ConnectorApiQueryValue, and appended into the connectors page. It renders as Record<string, ConnectorApiQueryValue> with the definition alongside the method. Both fix the cause. Neither touches the post-processing pipeline.
daniellekorn
force-pushed
the
sdk-render-fixes
branch
from
September 6, 2026 08:23
3f722f1 to
e3daa45
Compare
Collaborator
Author
|
Folded into #272 as |
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.
Two ways the generated reference renders wrong. The first is live on the site today.
Note
Based on
sdk-jsdoc-style(#272), notmain. Merge #272 first and this retargets automatically.Both fix the cause. Neither touches the post-processing pipeline.
1. Six examples are missing their first line of code (live now)
The pipeline promotes a leading
//comment to the Mintlify code-block title. An example without one has its first real line of code consumed as the title instead.Four
authexamples start withtry {, so what publishes is atryblock with notry, plus an orphaned closing brace:Affected:
inviteUser,resetPasswordRequest,resetPassword,changePassword, and twointegrationsexamples. Each now opens with a comment describing what the example does, which fixes the code and gives the block a useful title.2. A truncated union on
connectors.callApi()The
queryparameter published as:TypeDoc truncates long inline unions, so the union is given a name:
It now renders as
Record<string, ConnectorApiQueryValue>, and the type is appended into the connectors page so the definition sits alongside the method rather than being a name the reader cannot resolve. Purely a naming change: the accepted values are identical and there is no runtime effect.This is not live yet. It would have shipped with the next regeneration.
Deliberately not fixed: the
Picktruncationentities.list()andfilter()render their return type as:which is malformed, since the trailing
[]and one>are lost and the angle brackets do not balance.An earlier revision of this PR patched it with a regex in
file-processing.js. That has been removed, for two reasons.It was silently unsafe. TypeDoc's truncation drops the
[], soPromise<Pick<T,K>>andPromise<Pick<T,K>[]>collapse to the same string. A regex cannot tell them apart. Hardcoding the replacement asPromise<T[]>is right for the two methods that hit it today and would quietly publish a wrong type for any future method returning a single picked record.It was the wrong layer.
file-processing.jsalready carries twelve regex patches against TypeDoc's output (Fix 1,Fix 2 & 3,Fix 4,Fix 4b,Fix 5,Fix 6twice,Fix 7,7a,7b,7c). Adding a thirteenth trades a visible defect for an invisible one and grows a pile that should be shrinking.Leaving it visible is the honest state. The real fix belongs in the TypeDoc plugin, alongside a look at whether those twelve patches can be replaced by something more durable.
Verification
npx tsc --noEmitcleangrep -rn '```typescript [^A-Z]' docs/content/returns nothing, so no example is losing a linequeryrenders asRecord<string, ConnectorApiQueryValue>git diffagainst Fix the SDK reference at the source: em dashes, stray type pages, nav order, broken examples #272 touches no pipeline codeAlso not fixed here
Eleven more examples in the source lack a leading comment, but none currently reaches a published page. They sit in internal files (
client.ts,axios-client.ts,auth-utils.types.ts), inanalytics.types.tswhere the block renders differently, or inactors.types.ts, which #273 holds back.