diff --git a/scripts/release-check.ts b/scripts/release-check.ts index 2cbb2b619db..8bcf9d81752 100755 --- a/scripts/release-check.ts +++ b/scripts/release-check.ts @@ -329,7 +329,7 @@ function runPackedBundledPluginPostinstall(packageRoot: string): void { }); } -function writePackedBundledPluginActivationConfig(homeDir: string): void { +export function writePackedBundledPluginActivationConfig(homeDir: string): void { const configPath = join(homeDir, ".openclaw", "openclaw.json"); mkdirSync(join(homeDir, ".openclaw"), { recursive: true }); writeFileSync( @@ -342,7 +342,7 @@ function writePackedBundledPluginActivationConfig(homeDir: string): void { }, }, channels: { - feishu: { + matrix: { enabled: true, }, }, @@ -358,7 +358,7 @@ function writePackedBundledPluginActivationConfig(homeDir: string): void { plugins: { enabled: true, entries: { - feishu: { + matrix: { enabled: true, }, }, diff --git a/test/scripts/release-check.test.ts b/test/scripts/release-check.test.ts new file mode 100644 index 00000000000..d759dae3ae4 --- /dev/null +++ b/test/scripts/release-check.test.ts @@ -0,0 +1,27 @@ +import { mkdtempSync, readFileSync, rmSync } from "node:fs"; +import { tmpdir } from "node:os"; +import { join } from "node:path"; +import { describe, expect, it } from "vitest"; +import { writePackedBundledPluginActivationConfig } from "../../scripts/release-check.ts"; + +describe("release-check", () => { + it("seeds packaged activation smoke with an included channel plugin", () => { + const homeDir = mkdtempSync(join(tmpdir(), "openclaw-release-check-test-")); + try { + writePackedBundledPluginActivationConfig(homeDir); + const config = JSON.parse( + readFileSync(join(homeDir, ".openclaw", "openclaw.json"), "utf8"), + ) as { + channels?: Record; + plugins?: { entries?: Record }; + }; + + expect(config.channels).toHaveProperty("matrix"); + expect(config.plugins?.entries).toHaveProperty("matrix"); + expect(config.channels).not.toHaveProperty("feishu"); + expect(config.plugins?.entries).not.toHaveProperty("feishu"); + } finally { + rmSync(homeDir, { recursive: true, force: true }); + } + }); +});