fix(outbox) : resolve server-only imports in worker
This commit is contained in:
@@ -102,12 +102,23 @@ describe("production deployment contract", () => {
|
||||
"ENV NEXT_PUBLIC_GOOGLE_ADSENSE_CLIENT_ID=${NEXT_PUBLIC_GOOGLE_ADSENSE_CLIENT_ID}",
|
||||
);
|
||||
expect(dockerfile).toContain("backend/discord.ts");
|
||||
expect(dockerfile).toMatch(
|
||||
/bun build scripts\/outbox-worker\.ts[\s\S]*?--conditions=react-server[\s\S]*?--outfile=dist\/outbox-worker\.js/u,
|
||||
);
|
||||
expect(dockerfile).toMatch(
|
||||
/bun build backend\/discord\.ts[\s\S]*?--conditions=react-server[\s\S]*?--outfile=dist\/discord\.js/u,
|
||||
);
|
||||
expect(dockerfile).toContain("./worker/discord.js");
|
||||
});
|
||||
|
||||
it("runs the outbox worker with server-only module resolution locally", async () => {
|
||||
const packageJson = JSON.parse(await repositoryFile("package.json"));
|
||||
|
||||
expect(packageJson.scripts["worker:outbox"]).toBe(
|
||||
"bun --conditions=react-server scripts/outbox-worker.ts",
|
||||
);
|
||||
});
|
||||
|
||||
it("verifies first, publishes immutable images, and migrates before rollout", async () => {
|
||||
const workflow = await repositoryFile(".gitea/workflows/ci.yml");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user