mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-27 04:47:03 -06:00
2b06180bb5
* fix(package): externalize diffs build outputs * chore: remove release-owned changelog entry * fix(build): generate selected plugin assets before Docker staging --------- Co-authored-by: Dallin Romney <dallinromney@gmail.com>
55 lines
1.7 KiB
TypeScript
55 lines
1.7 KiB
TypeScript
import { describe, expect, it } from "vitest";
|
|
import {
|
|
buildExternalPluginLocalDist,
|
|
listExternalPluginLocalDistPackageDirs,
|
|
} from "../../scripts/build-external-plugin-local-dist.mts";
|
|
import {
|
|
collectRootPackageExcludedExtensionDirs,
|
|
DOCKER_SELECTED_PLUGIN_BUILD_IDS_ENV,
|
|
} from "../../scripts/lib/bundled-plugin-build-entries.mjs";
|
|
|
|
describe("external plugin local dist build", () => {
|
|
it("selects every externalized first-party plugin behind a package exclusion", () => {
|
|
const packageDirs = listExternalPluginLocalDistPackageDirs();
|
|
const excludedPluginIds = collectRootPackageExcludedExtensionDirs();
|
|
|
|
expect(packageDirs).toHaveLength(63);
|
|
expect(packageDirs).toEqual(
|
|
expect.arrayContaining([
|
|
"extensions/diffs",
|
|
"extensions/diffs-language-pack",
|
|
"extensions/slack",
|
|
"extensions/sms",
|
|
"extensions/mxc",
|
|
]),
|
|
);
|
|
expect(packageDirs).not.toContain("extensions/whatsapp");
|
|
expect(
|
|
packageDirs.every((packageDir) => excludedPluginIds.has(packageDir.split("/").at(-1) ?? "")),
|
|
).toBe(true);
|
|
});
|
|
|
|
it("leaves Docker-selected external plugin compilation on the unified build path", () => {
|
|
expect(
|
|
listExternalPluginLocalDistPackageDirs({
|
|
env: {
|
|
...process.env,
|
|
[DOCKER_SELECTED_PLUGIN_BUILD_IDS_ENV]: "slack",
|
|
},
|
|
}),
|
|
).toEqual([]);
|
|
});
|
|
|
|
it("performs no writes when Docker owns the selected build", async () => {
|
|
await expect(
|
|
buildExternalPluginLocalDist({
|
|
env: {
|
|
...process.env,
|
|
[DOCKER_SELECTED_PLUGIN_BUILD_IDS_ENV]: "slack",
|
|
},
|
|
logLevel: "silent",
|
|
}),
|
|
).resolves.toMatchObject({ pluginDirs: [] });
|
|
});
|
|
});
|