From bd7f3c7f94de44f9af0911334c0533f3a4ad3149 Mon Sep 17 00:00:00 2001 From: Salah-Eddine Saakoun Date: Wed, 19 Aug 2026 23:24:31 +0200 Subject: [PATCH 1/5] feat(platform-api-docs): add `root-messenger` strategy --- packages/platform-api-docs/README.md | 51 +- packages/platform-api-docs/src/cli.test.ts | 171 +++++ packages/platform-api-docs/src/cli.ts | 77 +- .../platform-api-docs/src/extraction.test.ts | 38 + packages/platform-api-docs/src/extraction.ts | 125 ++-- .../platform-api-docs/src/generate.test.ts | 236 ++++++ packages/platform-api-docs/src/generate.ts | 141 +++- .../src/root-messenger-discovery.test.ts | 683 ++++++++++++++++++ .../src/root-messenger-discovery.ts | 301 ++++++++ 9 files changed, 1764 insertions(+), 59 deletions(-) create mode 100644 packages/platform-api-docs/src/root-messenger-discovery.test.ts create mode 100644 packages/platform-api-docs/src/root-messenger-discovery.ts diff --git a/packages/platform-api-docs/README.md b/packages/platform-api-docs/README.md index 2abc7e405b1..a85710ba948 100644 --- a/packages/platform-api-docs/README.md +++ b/packages/platform-api-docs/README.md @@ -35,12 +35,61 @@ Options: --build Generate docs and build static site --serve Generate docs, build, and serve static site --dev Generate docs and start dev server with hot reload - --scan-dir Extra source directory to scan (repeatable) + --strategy How to find actions and events: "scan" (default) or + "root-messenger" (see below) + --scan-dir Extra source directory to scan (repeatable; --strategy scan only) + --root-actions Type aliasing the union of every action, as "#" + (required with --strategy root-messenger) + --root-events Type aliasing the union of every event, as "#" + (required with --strategy root-messenger) --output Output directory (default: /.platform-api-docs) --project-label