mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 18:20:44 +00:00
fix(catalog): preserve channel ClawHub specs
This commit is contained in:
@@ -168,6 +168,40 @@ describe("buildOfficialChannelCatalog", () => {
|
||||
expect(installSource.warnings).toEqual(["npm-spec-floating", "npm-spec-missing-integrity"]);
|
||||
});
|
||||
|
||||
it("preserves ClawHub specs when generating publishable channel catalog entries", () => {
|
||||
const repoRoot = makeRepoRoot("openclaw-official-channel-catalog-clawhub-");
|
||||
writeJson(path.join(repoRoot, "extensions", "storepack-chat", "package.json"), {
|
||||
name: "@openclaw/storepack-chat",
|
||||
openclaw: {
|
||||
channel: {
|
||||
id: "storepack-chat",
|
||||
label: "Storepack Chat",
|
||||
selectionLabel: "Storepack Chat",
|
||||
docsPath: "/channels/storepack-chat",
|
||||
blurb: "storepack-first channel",
|
||||
},
|
||||
install: {
|
||||
clawhubSpec: "clawhub:@openclaw/storepack-chat",
|
||||
npmSpec: "@openclaw/storepack-chat",
|
||||
defaultChoice: "clawhub",
|
||||
},
|
||||
release: {
|
||||
publishToNpm: true,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
const entry = buildOfficialChannelCatalog({ repoRoot }).entries.find(
|
||||
(candidate) => candidate.openclaw?.channel?.id === "storepack-chat",
|
||||
);
|
||||
|
||||
expect(entry?.openclaw?.install).toEqual({
|
||||
clawhubSpec: "clawhub:@openclaw/storepack-chat",
|
||||
npmSpec: "@openclaw/storepack-chat",
|
||||
defaultChoice: "clawhub",
|
||||
});
|
||||
});
|
||||
|
||||
it("writes the official catalog under dist", () => {
|
||||
const repoRoot = makeRepoRoot("openclaw-official-channel-catalog-write-");
|
||||
writeJson(path.join(repoRoot, "extensions", "whatsapp", "package.json"), {
|
||||
|
||||
Reference in New Issue
Block a user