mirror of
https://github.com/nexu-io/open-design.git
synced 2026-10-27 09:51:12 +01:00
fix(docker): stage plugin manifests before native web type checking
This commit is contained in:
+2
-1
@@ -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}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user