fix(release): preserve shipped channel surfaces in npm tar (#52913)

* fix(channels): ship official channel catalog (#52838)

* fix(release): keep shipped bundles in npm tar (#52838)

* build(release): fix rebased release-check helpers (#52838)
This commit is contained in:
Nimrod Gutman
2026-03-23 17:39:22 +02:00
committed by GitHub
parent 7299b42e2a
commit b84a130788
14 changed files with 483 additions and 23 deletions

View File

@@ -325,6 +325,46 @@ describe("channel plugin catalog", () => {
expect(entry?.install.npmSpec).toBe("@openclaw/whatsapp");
expect(entry?.pluginId).toBe("whatsapp");
});
it("includes shipped official channel catalog entries when bundled metadata is omitted", () => {
const dir = fs.mkdtempSync(path.join(os.tmpdir(), "openclaw-official-catalog-"));
const catalogPath = path.join(dir, "channel-catalog.json");
fs.writeFileSync(
catalogPath,
JSON.stringify({
entries: [
{
name: "@openclaw/whatsapp",
openclaw: {
channel: {
id: "whatsapp",
label: "WhatsApp",
selectionLabel: "WhatsApp (QR link)",
detailLabel: "WhatsApp Web",
docsPath: "/channels/whatsapp",
blurb: "works with your own number; recommend a separate phone + eSIM.",
},
install: {
npmSpec: "@openclaw/whatsapp",
defaultChoice: "npm",
},
},
},
],
}),
);
const entry = listChannelPluginCatalogEntries({
env: {
...process.env,
OPENCLAW_BUNDLED_PLUGINS_DIR: "/nonexistent/bundled/plugins",
},
officialCatalogPaths: [catalogPath],
}).find((item) => item.id === "whatsapp");
expect(entry?.install.npmSpec).toBe("@openclaw/whatsapp");
expect(entry?.pluginId).toBeUndefined();
});
});
const emptyRegistry = createTestRegistry([]);