Skip to content

Commit 7e08ce4

Browse files
amitbardosclaude
andcommitted
docs(platform): leave the Socket messages page to mintlify-docs
The events page documents the service's protocol, so mintlify-docs builds it from the AsyncAPI document production serves, as it does the REST references. events-to-mdx.mjs, create-docs:events and the Events nav category are removed, and the JSDoc links point to /developers/references/platform-sdk/socket-messages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent dd8b394 commit 7e08ce4

7 files changed

Lines changed: 10 additions & 237 deletions

File tree

‎packages/platform/README.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,11 @@ generated file differs from what `asyncapi.json` produces.
136136
## Reference docs
137137

138138
Every exported shape and field has JSDoc. `npm run docs` validates it into `docs`.
139-
`npm run create-docs` runs the app SDK's TypeDoc and Mintlify pipeline for this package, then renders
140-
the builder events page from `asyncapi.json` with `scripts/events-to-mdx.mjs`,
139+
`npm run create-docs` runs the app SDK's TypeDoc and Mintlify pipeline for this package,
141140
and `npm run copy-docs-local -- --target <mintlify-docs>` copies the result into
142141
`developers/references/platform-sdk/docs`. The pipeline's config for this package lives
143-
in `scripts/mintlify-post-processing/`.
142+
in `scripts/mintlify-post-processing/`. The Socket messages page is built in mintlify-docs from
143+
the service's AsyncAPI document, not here.
144144

145145
`PlatformSocketError` extends `Error` with `code` and optional `appId`. Original
146146
exceptions, payloads and credentials are never attached.

‎packages/platform/package.json‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,11 @@
2929
"test:unit": "vitest run",
3030
"test:package": "npm run build && node --test tests/package.test.mjs",
3131
"prepublishOnly": "npm run build",
32-
"create-docs": "npm run create-docs:generate && npm run create-docs:process && npm run create-docs:events",
32+
"create-docs": "npm run create-docs:generate && npm run create-docs:process",
3333
"create-docs-local": "npm run create-docs && npm run copy-docs-local",
3434
"copy-docs-local": "node ../sdk/scripts/mintlify-post-processing/copy-to-local-docs.js --package-dir .",
3535
"create-docs:generate": "node -e \"fs.rmSync('docs',{recursive:true,force:true})\" && typedoc --options typedoc.mintlify.json",
36-
"create-docs:process": "node ../sdk/scripts/mintlify-post-processing/file-processing/file-processing.js --package-dir .",
37-
"create-docs:events": "tsc && node scripts/events-to-mdx.mjs"
36+
"create-docs:process": "node ../sdk/scripts/mintlify-post-processing/file-processing/file-processing.js --package-dir ."
3837
},
3938
"dependencies": {
4039
"socket.io-client": "^4.8.3"

‎packages/platform/scripts/events-to-mdx.mjs‎

Lines changed: 0 additions & 225 deletions
This file was deleted.

‎packages/platform/scripts/mintlify-post-processing/category-map.json‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,5 @@
22
"functions": "Client",
33
"interfaces": "Modules",
44
"type-aliases": "Modules",
5-
"classes": "Errors",
6-
"events": "Events"
5+
"classes": "Errors"
76
}

‎packages/platform/src/modules/builder.events.types.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ export type PlatformEventMap = {
1515
* One live event for a subscribed app.
1616
*
1717
* Check `type` to narrow `data` to that event's payload. A key missing from `data` means the value
18-
* is unchanged, and an explicit `null` clears it. For every event and its payload, see the
19-
* [events reference](/developers/references/platform-sdk/docs/events/builder-events).
18+
* is unchanged, and an explicit `null` clears it. For every event and its payload, see
19+
* [Socket messages](/developers/references/platform-sdk/socket-messages).
2020
*
2121
* @example
2222
* ```typescript

‎packages/platform/src/modules/builder.types.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ export interface SubscriptionOptions {
138138
* Called with each live event, a [`PlatformEvent`](#platformevent). Events for an app arrive one at a time, in order. If the callback
139139
* throws or rejects, the subscription ends with `handler_failed`. New event types can be added at
140140
* any time, so ignore types you don't handle. For every event and its payload,
141-
* see the [events reference](/developers/references/platform-sdk/docs/events/builder-events).
141+
* see [Socket messages](/developers/references/platform-sdk/socket-messages).
142142
*/
143143
onEvent: (event: PlatformEvent) => void | Promise<void>;
144144
/**

‎packages/sdk/writing-docs.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,5 +65,5 @@ The same pipeline documents the Platform SDK (`packages/platform`). Pass `--pack
6565

6666
From `packages/platform`:
6767
* `npm run docs` validates that every export has JSDoc. Its output in `docs` is not published.
68-
* `npm run create-docs` generates the Mintlify reference into `docs/content`, plus the builder events page (`docs/content/events`), rendered from `asyncapi.json` for the events that reach `onEvent`.
68+
* `npm run create-docs` generates the Mintlify reference into `docs/content`.
6969
* `npm run copy-docs-local -- --target <path-to-mintlify-docs>` copies it into `developers/references/platform-sdk/docs` and updates the **Platform SDK** dropdown in `docs.json`.

0 commit comments

Comments
 (0)