openclaw/scripts/write-plugin-sdk-entry-dts.ts
Peter Steinberger 4015f0b046
ci: scope declaration caches to generator inputs (#135559)
* ci: scope declaration caches to generator inputs

Resolve the selected declaration writer and build configuration dependency graph instead of hashing every CI script. Keep explicit schema and metadata inputs, compiler receipts, and fail-closed module resolution in the existing cache owner.

* test(ci): complete declaration ownership fixtures
2026-09-01 15:40:18 -07:00

19 lines
785 B
TypeScript

// CI artifacts use the same SDK declaration partitions as full/package builds.
import fs from "node:fs";
import { listCacheFiles } from "./lib/build-artifact-cache.mts";
import { TSDOWN_PLUGIN_SDK_DTS_CONFIG_GROUPS } from "./lib/tsdown-config-groups.mts";
import { writeTsdownDeclarations } from "./lib/tsdown-declaration-writer.mts";
import { TSDOWN_DECLARATION_EXTENSIONS } from "./tsdown-build.mts";
await writeTsdownDeclarations(
TSDOWN_PLUGIN_SDK_DTS_CONFIG_GROUPS,
"tsdown-plugin-sdk",
(root) =>
// This subset owns flat SDK entries, never other groups' shared root chunks.
listCacheFiles(
root,
[{ path: "dist/plugin-sdk", extensions: TSDOWN_DECLARATION_EXTENSIONS, recursive: false }],
fs,
),
"scripts/write-plugin-sdk-entry-dts.ts",
);