test: satisfy plugin contract boundaries · openclaw/openclaw@5de3196
steipete
·
2026-04-28
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -220,7 +220,11 @@ describe("prepareBundledPluginRuntimeRoot", () => {
|
220 | 220 | ); |
221 | 221 | fs.writeFileSync( |
222 | 222 | path.join(runtimePluginRoot, "index.js"), |
223 | | -`export { default } from "../../../dist/extensions/qqbot/index.js";\n`, |
| 223 | +[ |
| 224 | +"export { default } from ", |
| 225 | +JSON.stringify("../../../dist/extensions/qqbot/index.js"), |
| 226 | +";\n", |
| 227 | +].join(""), |
224 | 228 | "utf8", |
225 | 229 | ); |
226 | 230 | fs.writeFileSync( |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -3,12 +3,12 @@ import type { ResolvedTtsConfig, SpeechProviderPlugin } from "openclaw/plugin-sd
|
3 | 3 | import type { OpenClawConfig } from "openclaw/plugin-sdk/testing"; |
4 | 4 | import { |
5 | 5 | createEmptyPluginRegistry, |
| 6 | +pluginRegistrationContractRegistry, |
6 | 7 | setActivePluginRegistry, |
7 | 8 | withEnv, |
8 | 9 | withEnvAsync, |
9 | 10 | } from "openclaw/plugin-sdk/testing"; |
10 | 11 | import { beforeEach, describe, expect, it, vi } from "vitest"; |
11 | | -import { BUNDLED_PLUGIN_CONTRACT_SNAPSHOTS } from "../../../src/plugins/contracts/inventory/bundled-capability-metadata.js"; |
12 | 12 | import { resolveWorkspacePackagePublicModuleUrl } from "./public-surface-loader.js"; |
13 | 13 | |
14 | 14 | type TtsRuntimeModule = typeof import("openclaw/plugin-sdk/tts-runtime"); |
@@ -42,7 +42,7 @@ let sanitizeTtsErrorForLog: TtsRuntimeModule["_test"]["sanitizeTtsErrorForLog"];
|
42 | 42 | |
43 | 43 | const SPEECH_PROVIDER_ENV_KEYS = [ |
44 | 44 | ...new Set( |
45 | | -BUNDLED_PLUGIN_CONTRACT_SNAPSHOTS.flatMap((entry) => |
| 45 | +pluginRegistrationContractRegistry.flatMap((entry) => |
46 | 46 | entry.speechProviderIds.flatMap((providerId) => entry.providerAuthEnvVars[providerId] ?? []), |
47 | 47 | ), |
48 | 48 | ), |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。