mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-05 12:30:22 +00:00
refactor: remove plugin sdk facade generator
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
/**
|
||||
* Verifies that the root plugin-sdk runtime surface and generated facade types
|
||||
* are present in the compiled dist output.
|
||||
* Verifies that the root plugin-sdk runtime surface is present in the compiled
|
||||
* dist output.
|
||||
*
|
||||
* Run after `pnpm build` to catch missing root exports or leaked repo-only type
|
||||
* aliases before release.
|
||||
@@ -15,16 +15,6 @@ import { pluginSdkSubpaths } from "./lib/plugin-sdk-entries.mjs";
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||
const distFile = resolve(__dirname, "..", "dist", "plugin-sdk", "index.js");
|
||||
const generatedFacadeTypeMapDts = resolve(
|
||||
__dirname,
|
||||
"..",
|
||||
"dist",
|
||||
"plugin-sdk",
|
||||
"src",
|
||||
"generated",
|
||||
"plugin-sdk-facade-type-map.generated.d.ts",
|
||||
);
|
||||
|
||||
if (!existsSync(distFile)) {
|
||||
console.error("ERROR: dist/plugin-sdk/index.js not found. Run `pnpm build` first.");
|
||||
process.exit(1);
|
||||
@@ -91,21 +81,6 @@ for (const entry of requiredRuntimeShimEntries) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!existsSync(generatedFacadeTypeMapDts)) {
|
||||
console.error(
|
||||
"MISSING GENERATED FACADE TYPE MAP DTS: dist/plugin-sdk/src/generated/plugin-sdk-facade-type-map.generated.d.ts",
|
||||
);
|
||||
missing += 1;
|
||||
} else {
|
||||
const facadeTypeMapContent = readFileSync(generatedFacadeTypeMapDts, "utf-8");
|
||||
if (facadeTypeMapContent.includes("@openclaw/")) {
|
||||
console.error(
|
||||
"INVALID GENERATED FACADE TYPE MAP DTS: dist/plugin-sdk/src/generated/plugin-sdk-facade-type-map.generated.d.ts leaks @openclaw/* imports",
|
||||
);
|
||||
missing += 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (missing > 0) {
|
||||
console.error(
|
||||
`\nERROR: ${missing} required plugin-sdk artifact(s) missing (named exports or subpath files).`,
|
||||
|
||||
Reference in New Issue
Block a user