Files
ComfyUI_frontend/packages/extension-api/api-snapshot/README.md
Connor Byrne 909bbb660b feat(ext-api/pkg): commit reviewable .d.ts snapshot of public surface
Adds `packages/extension-api/api-snapshot/` containing the generated
`.d.ts` files for every module re-exported from
`@comfyorg/extension-api`:

  index.d.ts       — barrel / entry point
  events.d.ts      — event payload types
  identifiers.d.ts — branded entity ID types
  lifecycle.d.ts   — defineExtension / defineNodeExtension / defineWidgetExtension
  node.d.ts        — NodeHandle and DOM widget options
  shell.d.ts       — sidebar, bottom panel, command, toast types
  types.d.ts       — extension option contracts
  widget.d.ts      — WidgetHandle

`build/` stays gitignored. Snapshot is a separate stable path so
reviewers see exactly what extension authors will consume on a public
API change, without polluting git with runtime `.js` / per-module
internal declaration files. Regenerate via:

  pnpm --filter @comfyorg/extension-api build
  cp packages/extension-api/build/extension-api/*.d.ts \
     packages/extension-api/api-snapshot/

eslint.config.ts: ignore `api-snapshot/**` so the generated declarations
do not need to live in any tsconfig project.

See `packages/extension-api/api-snapshot/README.md` for the contract.
2026-05-21 14:05:21 -07:00

1.7 KiB

API snapshot

Generated .d.ts files for the public surface of @comfyorg/extension-api. Committed to git so reviewers can see exactly what extension authors will consume — without having to build the package locally.

Source of truth

These files are generated from the hand-written sources at src/extension-api/** (in the foundation PR / ComfyUI_frontend root). Do not edit them directly — they are regenerated by:

pnpm --filter @comfyorg/extension-api build

…which writes the same files to packages/extension-api/build/extension-api/. Copy the result into this folder when the public surface changes.

Why a snapshot, not the live build/?

build/ is gitignored (it's a build artifact). Committing a separate snapshot under a stable path gives reviewers a diffable record of any public-API change without polluting git with the runtime .js and declaration files emitted for every internal module.

Files

File Source
index.d.ts src/extension-api/index.ts (barrel — entry point)
events.d.ts src/extension-api/events.ts
identifiers.d.ts src/extension-api/identifiers.ts
lifecycle.d.ts src/extension-api/lifecycle.ts
node.d.ts src/extension-api/node.ts
shell.d.ts src/extension-api/shell.ts
types.d.ts src/extension-api/types.ts
widget.d.ts src/extension-api/widget.ts