fix(release): ship bundled plugins in pack artifacts

This commit is contained in:
Vincent Koc
2026-03-23 08:21:50 -07:00
parent 31675d65d4
commit 70b235f312
10 changed files with 157 additions and 64 deletions

View File

@@ -40,6 +40,9 @@ describe("tsdown config", () => {
"plugin-sdk/compat",
"plugin-sdk/index",
"extensions/openai/index",
"extensions/matrix/index",
"extensions/msteams/index",
"extensions/whatsapp/index",
"bundled/boot-md/handler",
]),
);

View File

@@ -361,4 +361,25 @@ describe("copyBundledPluginMetadata", () => {
expect(fs.existsSync(path.join(repoRoot, "dist", "extensions", "acpx"))).toBe(false);
});
it("still bundles previously released optional plugins without the opt-in env", () => {
const repoRoot = makeRepoRoot("openclaw-bundled-plugin-released-optional-");
const pluginDir = path.join(repoRoot, "extensions", "whatsapp");
fs.mkdirSync(pluginDir, { recursive: true });
writeJson(path.join(pluginDir, "openclaw.plugin.json"), {
id: "whatsapp",
configSchema: { type: "object" },
});
writeJson(path.join(pluginDir, "package.json"), {
name: "@openclaw/whatsapp",
openclaw: {
extensions: ["./index.ts"],
install: { npmSpec: "@openclaw/whatsapp" },
},
});
copyBundledPluginMetadataWithEnv({ repoRoot, env: {} });
expect(fs.existsSync(path.join(repoRoot, "dist", "extensions", "whatsapp"))).toBe(true);
});
});