buildSecretInputSchema was not included in plugin-sdk-entrypoints.json, so it was never emitted to dist/plugin-sdk/secret-input-schema.js. This caused a ReferenceError during onboard when configuring channels that use secret input schemas (matrix, feishu, mattermost, bluebubbles, nextcloud-talk, zalo). Additionally, the Matrix extension's hand-written runtime-api barrel was missing the re-export, unlike other extensions that use `export *` from their plugin-sdk subpath. Co-authored-by: hxy91819 <masonxhuang@icloud.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
22 lines
854 B
TypeScript
22 lines
854 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import * as runtimeApi from "../runtime-api.js";
|
|
|
|
describe("matrix runtime-api", () => {
|
|
it("re-exports createAccountListHelpers as a live runtime value", () => {
|
|
expect(typeof runtimeApi.createAccountListHelpers).toBe("function");
|
|
|
|
const helpers = runtimeApi.createAccountListHelpers("matrix");
|
|
expect(typeof helpers.listAccountIds).toBe("function");
|
|
expect(typeof helpers.resolveDefaultAccountId).toBe("function");
|
|
});
|
|
|
|
it("re-exports buildSecretInputSchema for config schema helpers", () => {
|
|
expect(typeof runtimeApi.buildSecretInputSchema).toBe("function");
|
|
});
|
|
|
|
it("does not re-export setup entrypoints that create extension cycles", () => {
|
|
expect("matrixSetupWizard" in runtimeApi).toBe(false);
|
|
expect("matrixSetupAdapter" in runtimeApi).toBe(false);
|
|
});
|
|
});
|