From 09d647968148fe9b93e19f87c4436b8cee42abeb Mon Sep 17 00:00:00 2001 From: zenglingbiao Date: Sun, 7 Jun 2026 00:14:12 +0800 Subject: [PATCH] fix(build): ship export session html assets Align the export-session template asset copy step and build-all cache output with the runtime lookup path so published packages include the HTML export assets at `dist/export-html`. Adds a focused build-all regression assertion for the output path contract. Fixes #90843 --- scripts/build-all.mjs | 2 +- scripts/copy-export-html-templates.ts | 8 +------- test/scripts/build-all.test.ts | 6 ++++++ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/build-all.mjs b/scripts/build-all.mjs index 888e8b9054c..6fb4eb08f29 100644 --- a/scripts/build-all.mjs +++ b/scripts/build-all.mjs @@ -132,7 +132,7 @@ export const BUILD_ALL_STEPS = [ "scripts/lib/copy-assets.ts", "src/auto-reply/reply/export-html", ], - outputs: ["dist/auto-reply/reply/export-html"], + outputs: ["dist/export-html"], }, }, { diff --git a/scripts/copy-export-html-templates.ts b/scripts/copy-export-html-templates.ts index a1e4cda544b..6bb084da695 100644 --- a/scripts/copy-export-html-templates.ts +++ b/scripts/copy-export-html-templates.ts @@ -16,13 +16,7 @@ const exportHtmlSrcDir = path.join( "reply", "export-html", ); -const exportHtmlDistDir = path.join( - context.projectRoot, - "dist", - "auto-reply", - "reply", - "export-html", -); +const exportHtmlDistDir = path.join(context.projectRoot, "dist", "export-html"); function copyExportHtmlTemplates() { if (!fs.existsSync(exportHtmlSrcDir)) { diff --git a/test/scripts/build-all.test.ts b/test/scripts/build-all.test.ts index 2105512e8f5..1f314c4d365 100644 --- a/test/scripts/build-all.test.ts +++ b/test/scripts/build-all.test.ts @@ -173,6 +173,12 @@ describe("resolveBuildAllStep", () => { expect(step.cache?.inputs).toEqual(expect.arrayContaining(["npm-shrinkwrap.json"])); expect(step.cache?.outputs).toEqual(expect.arrayContaining(["dist/plugin-sdk/packages"])); }); + + it("keeps export-html build output aligned with runtime template lookup", () => { + const step = getBuildAllStep("copy-export-html-templates"); + + expect(step.cache?.outputs).toEqual(["dist/export-html"]); + }); }); describe("resolveBuildAllSteps", () => {