feat: 完善字体包发行与 Docker 内置字体
This commit is contained in:
@@ -38,6 +38,7 @@ describe("Docker v0.6.0 部署契约", () => {
|
||||
expect(dockerfile).toContain(
|
||||
"/app/packages/docx-engine/assets ./packages/docx-engine/assets"
|
||||
);
|
||||
expect(dockerfile).toContain("COPY tsconfig.base.json product.json ./");
|
||||
});
|
||||
|
||||
it("固定校验 Pandoc 二进制、许可证、版权和最终版本", () => {
|
||||
@@ -61,7 +62,8 @@ describe("Docker v0.6.0 部署契约", () => {
|
||||
);
|
||||
});
|
||||
|
||||
it("只读挂载字体包并排除本地字体资产构建上下文", () => {
|
||||
it("将受校验字体包内置到镜像并取消运行时字体挂载", () => {
|
||||
const dockerfile = readProjectFile("deploy/Dockerfile");
|
||||
const compose = readProjectFile("deploy/compose.yaml");
|
||||
const dockerignore = readProjectFile(
|
||||
"deploy/Dockerfile.dockerignore"
|
||||
@@ -70,14 +72,16 @@ describe("Docker v0.6.0 部署契约", () => {
|
||||
expect(compose).toContain(
|
||||
"FONT_PACK_ROOT: /app/.local/font-packs"
|
||||
);
|
||||
expect(compose).toContain(
|
||||
"${MD_TO_PDF_FONT_PACK_DIR:-../.local/font-packs}:/app/.local/font-packs:ro"
|
||||
expect(compose).not.toContain("MD_TO_PDF_FONT_PACK_DIR");
|
||||
expect(dockerfile).toContain(
|
||||
"COPY --chown=pwuser:pwuser output/font-packs/root /app/.local/font-packs"
|
||||
);
|
||||
expect(dockerfile).toContain("FONT_PACK_ROOT=/app/.local/font-packs");
|
||||
expect(compose).toContain(
|
||||
'APP_VERSION: "${MD_TO_PDF_APP_VERSION:-0.6.0}"'
|
||||
);
|
||||
expect(dockerignore.split(/\r?\n/u)).toContain(".local");
|
||||
expect(dockerignore.split(/\r?\n/u)).toContain("output");
|
||||
expect(dockerignore).toContain("!output/font-packs/root/**");
|
||||
});
|
||||
|
||||
it("提供显式真实 Docker 字体包验收命令", () => {
|
||||
|
||||
Reference in New Issue
Block a user