mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 17:00:50 +00:00
fix(feishu): keep setup entry off runtime SDK (#70339)
Load Feishu setup surfaces through a setup-only barrel so onboarding does not import the Lark SDK before bundled runtime deps are staged.\n\nThanks @andrejtr.\n\nCo-authored-by: andrejtr <64274971+andrejtr@users.noreply.github.com>
This commit is contained in:
@@ -1,2 +1,3 @@
|
||||
export { feishuPlugin } from "./src/channel.js";
|
||||
export { feishuSetupAdapter } from "./src/setup-core.js";
|
||||
export { feishuSetupWizard } from "./src/setup-surface.js";
|
||||
|
||||
14
extensions/feishu/setup-entry.test.ts
Normal file
14
extensions/feishu/setup-entry.test.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
|
||||
vi.mock("@larksuiteoapi/node-sdk", () => {
|
||||
throw new Error("setup entry must not load the Feishu SDK");
|
||||
});
|
||||
|
||||
describe("feishu setup entry", () => {
|
||||
it("loads the setup plugin without importing Feishu runtime dependencies", async () => {
|
||||
const { default: setupEntry } = await import("./setup-entry.js");
|
||||
|
||||
expect(setupEntry.kind).toBe("bundled-channel-setup-entry");
|
||||
expect(setupEntry.loadSetupPlugin({ installRuntimeDeps: false })?.id).toBe("feishu");
|
||||
});
|
||||
});
|
||||
@@ -3,7 +3,7 @@ import { defineBundledChannelSetupEntry } from "openclaw/plugin-sdk/channel-entr
|
||||
export default defineBundledChannelSetupEntry({
|
||||
importMetaUrl: import.meta.url,
|
||||
plugin: {
|
||||
specifier: "./api.js",
|
||||
specifier: "./setup-api.js",
|
||||
exportName: "feishuPlugin",
|
||||
},
|
||||
secrets: {
|
||||
|
||||
Reference in New Issue
Block a user