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
This commit is contained in:
zenglingbiao
2026-06-07 00:14:12 +08:00
committed by GitHub
parent 98498f2579
commit 09d6479681
3 changed files with 8 additions and 8 deletions

View File

@@ -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"],
},
},
{

View File

@@ -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)) {

View File

@@ -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", () => {