






















@@ -7,6 +7,10 @@ import {
7788const repoRoot = path.resolve(import.meta.dirname, "..");
9910+function expectDistRelativePaths(paths: string[]) {
11+expect(paths.filter((entry) => !entry.startsWith("./dist/"))).toEqual([]);
12+}
13+1014describe("plugin npm runtime build planning", () => {
1115it("plans package-local runtime entries for every publishable plugin package", () => {
1216const packageDirs = listPublishablePluginPackageDirs({ repoRoot });
@@ -23,8 +27,8 @@ describe("plugin npm runtime build planning", () => {
2327);
2428for (const plan of plans) {
2529expect(plan?.outDir).toBe(path.join(plan?.packageDir ?? "", "dist"));
26-expect(plan?.runtimeExtensions.every((entry) => entry.startsWith("./dist/"))).toBe(true);
27-expect(plan?.runtimeBuildOutputs.every((entry) => entry.startsWith("./dist/"))).toBe(true);
30+expectDistRelativePaths(plan?.runtimeExtensions ?? []);
31+expectDistRelativePaths(plan?.runtimeBuildOutputs ?? []);
2832expect(plan?.packageFiles).toContain("dist/**");
2933expect(plan?.packagePeerMetadata.peerDependencies.openclaw).toBe(
3034plan?.packageJson.openclaw.compat.pluginApi,
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。