From 994cf76055cfcb3bc29f82037c00a89738e3387c Mon Sep 17 00:00:00 2001 From: mrcfps Date: Thu, 22 Oct 2026 02:17:13 +0800 Subject: [PATCH] fix(docker): stage plugin manifests before native web type checking --- deploy/Dockerfile | 3 ++- e2e/tests/docker-image-content-directories.test.ts | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/deploy/Dockerfile b/deploy/Dockerfile index 100a5b334a..ca4f73320a 100644 --- a/deploy/Dockerfile +++ b/deploy/Dockerfile @@ -33,6 +33,8 @@ RUN corepack enable && \ pnpm install --frozen-lockfile COPY apps ./apps +# The web type check includes tests that import bundled plugin manifests. +COPY plugins/_official ./plugins/_official RUN pnpm --filter @open-design/daemon build && \ pnpm --filter @open-design/web build && \ pnpm --filter @open-design/daemon deploy --legacy --prod /app/deploy/daemon && \ @@ -81,7 +83,6 @@ COPY assets ./assets # image, `loadManifest()` returns `{}` and every plugin silently falls back to # the live-iframe preview path — the exact cost the bakes exist to avoid. COPY data ./data -COPY plugins/_official ./plugins/_official FROM ${RUNTIME_IMAGE} diff --git a/e2e/tests/docker-image-content-directories.test.ts b/e2e/tests/docker-image-content-directories.test.ts index 87e5945dc7..ea027cb5b7 100644 --- a/e2e/tests/docker-image-content-directories.test.ts +++ b/e2e/tests/docker-image-content-directories.test.ts @@ -46,6 +46,15 @@ describe("deploy/Dockerfile content directories", () => { } }); + it("makes bundled plugin manifests available before the web type check", async () => { + const { build } = stageSections(await readFile(dockerfile, "utf8")); + const webBuild = build.indexOf("pnpm --filter @open-design/web build"); + expect(webBuild).toBeGreaterThan(0); + const pluginCopy = build.indexOf("COPY plugins/_official ./plugins/_official"); + expect(pluginCopy).toBeGreaterThanOrEqual(0); + expect(pluginCopy).toBeLessThan(webBuild); + }); + it("ships the checked-in plugin preview manifest", async () => { // Narrower than the directory check above and stated separately: this is the // file whose absence is silent, so it is worth failing on its own terms