mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-06 05:51:15 +08:00
fix(build): externalize optional baileys image backends
This commit is contained in:
@@ -51,6 +51,7 @@ Docs: https://docs.openclaw.ai
|
||||
- Release/CI/E2E: print heartbeat progress during centralized Docker builds while keeping successful build logs quiet.
|
||||
- Release/CI/E2E: avoid heartbeat-tail delays in Docker E2E log wrappers while reporting captured log bytes during long runs.
|
||||
- Control UI: lazy-load the usage view so the initial app bundle stays below the chunk warning threshold.
|
||||
- Build: keep Baileys optional image backends external so source builds do not warn about missing `jimp` or `sharp`.
|
||||
- Build: render independent CLI startup metadata help snapshots concurrently to cut cold build-all metadata time.
|
||||
- Plugins: stop timed-out package-boundary prep steps by process group so descendant TypeScript/helper processes do not survive local check cleanup.
|
||||
- Control UI: serve static assets asynchronously after safe-open checks so large UI files do not block Gateway request handling.
|
||||
|
||||
@@ -222,8 +222,10 @@ describe("tsdown config", () => {
|
||||
expect(neverBundle("@slack/bolt")).toBe(true);
|
||||
expect(neverBundle("@slack/web-api")).toBe(true);
|
||||
expect(neverBundle("@vitest/expect")).toBe(true);
|
||||
expect(neverBundle("jimp")).toBe(true);
|
||||
expect(neverBundle("matrix-js-sdk/lib/client.js")).toBe(true);
|
||||
expect(neverBundle("qrcode-terminal/lib/main.js")).toBe(true);
|
||||
expect(neverBundle("sharp")).toBe(true);
|
||||
expect(neverBundle("vitest")).toBe(true);
|
||||
expect(neverBundle("not-a-runtime-dependency")).toBe(false);
|
||||
} else {
|
||||
@@ -235,8 +237,10 @@ describe("tsdown config", () => {
|
||||
"@slack/bolt",
|
||||
"@slack/web-api",
|
||||
"@vitest/expect",
|
||||
"jimp",
|
||||
"matrix-js-sdk",
|
||||
"qrcode-terminal",
|
||||
"sharp",
|
||||
"vitest",
|
||||
]) {
|
||||
expect(neverBundle).toContain(dependency);
|
||||
@@ -246,7 +250,9 @@ describe("tsdown config", () => {
|
||||
throw new Error("expected unified graph external predicate");
|
||||
}
|
||||
const externalize = external;
|
||||
expect(externalize("jimp", undefined, false)).toBe(true);
|
||||
expect(externalize("qrcode-terminal/lib/main.js", undefined, false)).toBe(true);
|
||||
expect(externalize("sharp", undefined, false)).toBe(true);
|
||||
});
|
||||
|
||||
it("always bundles plugin SDK package-local runtime dependencies", () => {
|
||||
|
||||
@@ -198,9 +198,11 @@ const explicitNeverBundleDependencies = [
|
||||
"@larksuiteoapi/node-sdk",
|
||||
"@matrix-org/matrix-sdk-crypto-nodejs",
|
||||
"@vitest/expect",
|
||||
"jimp",
|
||||
"matrix-js-sdk",
|
||||
"prism-media",
|
||||
"qrcode-terminal",
|
||||
"sharp",
|
||||
"typescript",
|
||||
"vitest",
|
||||
].toSorted((left, right) => left.localeCompare(right));
|
||||
|
||||
Reference in New Issue
Block a user