feat: 完成模板预览隔离与矩阵验收
This commit is contained in:
1 parent
d38dbe02aa
commit
5bf54096be
13 files changed
+287
-19
No files matched your search
@@ -3,6 +3,10 @@
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
||||
<meta
|
||||
http-equiv="Content-Security-Policy"
|
||||
content="default-src 'self'; img-src 'self' data: blob:; media-src 'self' data: blob:; style-src 'self' 'unsafe-inline'; font-src 'self' data:; connect-src 'self' ws: wss:; script-src 'self'; object-src 'none'; base-uri 'none'; form-action 'self'"
|
||||
/>
|
||||
<title>个人品牌后台</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -14,6 +14,8 @@ type PreviewProps = {
|
||||
selection?: PreviewSelection;
|
||||
targets: PreviewTarget[];
|
||||
onTargetSelected: (selection?: PreviewSelection) => void;
|
||||
onPageSelected?: (page: string) => void;
|
||||
onOfferingSelected?: (offeringId: string) => void;
|
||||
};
|
||||
|
||||
type Outline = { top: number; left: number; width: number; height: number; label: string };
|
||||
@@ -27,6 +29,8 @@ export function ComponentTemplatePreview({
|
||||
selection,
|
||||
targets,
|
||||
onTargetSelected,
|
||||
onPageSelected = () => undefined,
|
||||
onOfferingSelected = () => undefined,
|
||||
}: PreviewProps) {
|
||||
const Renderer = resolveTemplateRenderer(workspace);
|
||||
const root = useRef<HTMLDivElement>(null);
|
||||
@@ -34,6 +38,26 @@ export function ComponentTemplatePreview({
|
||||
const [mode, setMode] = useState<"edit" | "browse">("edit");
|
||||
const [hovered, setHovered] = useState<HTMLElement | null>(null);
|
||||
const overlay = useRef<HTMLDivElement>(null);
|
||||
// 将 renderer 里的 Taro CTA 导航转换为画布内页面/记录切换。
|
||||
useEffect(() => {
|
||||
const navigate = (event: Event) => {
|
||||
const detail = (event as CustomEvent<{ method?: string; options?: { url?: string } }>).detail;
|
||||
const url = detail?.options?.url;
|
||||
if (typeof url !== "string") return;
|
||||
const match = /^\/pages\/([a-z]+)\/index(?:\?(.*))?$/.exec(url);
|
||||
if (!match) return;
|
||||
const nextPage = match[1];
|
||||
if (!nextPage) return;
|
||||
const query = match[2];
|
||||
if (nextPage === "detail") {
|
||||
const id = new URLSearchParams(query ?? "").get("id");
|
||||
if (id) onOfferingSelected(id);
|
||||
}
|
||||
onPageSelected(nextPage);
|
||||
};
|
||||
window.addEventListener("template-preview-navigate", navigate);
|
||||
return () => window.removeEventListener("template-preview-navigate", navigate);
|
||||
}, [onOfferingSelected, onPageSelected]);
|
||||
const targetFor = useCallback(
|
||||
(element: Element | null): HTMLElement | null => {
|
||||
let candidate = element?.closest<HTMLElement>("[data-editor-target]");
|
||||
|
||||
@@ -2,13 +2,27 @@ import React from "react";
|
||||
const noop = () => Promise.resolve();
|
||||
export const useRouter = () => ({ params: {} });
|
||||
export const useDidShow = (callback) => React.useEffect(callback, []);
|
||||
// Admin 画布监听该事件完成画布内路由;真实 Taro 端仍使用原始 API。
|
||||
const emitPreviewNavigation = (method, options) => {
|
||||
if (typeof window === "undefined") return;
|
||||
window.dispatchEvent(
|
||||
new CustomEvent("template-preview-navigate", { detail: { method, options } }),
|
||||
);
|
||||
};
|
||||
|
||||
const Taro = {
|
||||
setStorageSync() {},
|
||||
getStorageSync() {
|
||||
return undefined;
|
||||
},
|
||||
removeStorageSync() {},
|
||||
switchTab: noop,
|
||||
navigateTo: noop,
|
||||
switchTab(options) {
|
||||
emitPreviewNavigation("switchTab", options);
|
||||
return Promise.resolve();
|
||||
},
|
||||
navigateTo(options) {
|
||||
emitPreviewNavigation("navigateTo", options);
|
||||
return Promise.resolve();
|
||||
},
|
||||
};
|
||||
export default Taro;
|
||||
@@ -197,6 +197,8 @@ export function TemplatePackagePreviewModal({
|
||||
: {})}
|
||||
targets={[]}
|
||||
onTargetSelected={() => undefined}
|
||||
onPageSelected={setPage}
|
||||
onOfferingSelected={setOfferingId}
|
||||
/>
|
||||
</>
|
||||
) : null}
|
||||
|
||||
@@ -2,10 +2,40 @@ import { defineConfig } from "vite";
|
||||
import react from "@vitejs/plugin-react";
|
||||
import { templatePreviewCss } from "./template-preview-css.mjs";
|
||||
|
||||
const adminCsp = [
|
||||
"default-src 'self'",
|
||||
"img-src 'self' data: blob:",
|
||||
"media-src 'self' data: blob:",
|
||||
"style-src 'self' 'unsafe-inline'",
|
||||
"font-src 'self' data:",
|
||||
"connect-src 'self' ws: wss:",
|
||||
"script-src 'self'",
|
||||
"object-src 'none'",
|
||||
"base-uri 'none'",
|
||||
"frame-ancestors 'self'",
|
||||
"form-action 'self'",
|
||||
].join("; ");
|
||||
const adminDevelopmentCsp = adminCsp.replace(
|
||||
"script-src 'self'",
|
||||
"script-src 'self' 'unsafe-inline'",
|
||||
);
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
plugins: [
|
||||
react(),
|
||||
{
|
||||
name: "admin-production-csp",
|
||||
// Vite dev preamble 是 inline script;生产构建保留 meta CSP,dev/preview 用响应头控制。
|
||||
transformIndexHtml(html, context) {
|
||||
const isDevelopmentServe =
|
||||
context.server?.config.command === "serve" && !context.server?.config.isProduction;
|
||||
return isDevelopmentServe
|
||||
? html.replace(/\s*<meta\s+http-equiv="Content-Security-Policy"[^>]*>/, "")
|
||||
: html;
|
||||
},
|
||||
},
|
||||
],
|
||||
css: { postcss: { plugins: [templatePreviewCss()] } },
|
||||
base: process.env.VITE_APP_BASE_PATH ?? "/",
|
||||
resolve: {
|
||||
dedupe: ["react", "react-dom"],
|
||||
alias: {
|
||||
@@ -23,6 +53,13 @@ export default defineConfig({
|
||||
server: {
|
||||
host: "0.0.0.0",
|
||||
port: Number(process.env.ADMIN_PORT ?? 3000),
|
||||
// Vite dev preamble 需要 inline script;preview/生产保留严格 CSP。
|
||||
headers: {
|
||||
"Content-Security-Policy": adminDevelopmentCsp,
|
||||
"Referrer-Policy": "no-referrer",
|
||||
"X-Content-Type-Options": "nosniff",
|
||||
},
|
||||
base: process.env.VITE_APP_BASE_PATH ?? "/",
|
||||
proxy: {
|
||||
"/api": {
|
||||
target: process.env.VITE_DEV_API_TARGET ?? "http://localhost:3001",
|
||||
@@ -43,6 +80,15 @@ export default defineConfig({
|
||||
: {}),
|
||||
},
|
||||
},
|
||||
preview: {
|
||||
// 响应头在 dev/preview 均生效;meta CSP 是静态托管环境的基础防线。
|
||||
headers: {
|
||||
"Content-Security-Policy": adminCsp,
|
||||
"Referrer-Policy": "no-referrer",
|
||||
"X-Content-Type-Options": "nosniff",
|
||||
},
|
||||
base: process.env.VITE_APP_BASE_PATH ?? "/",
|
||||
},
|
||||
build: {
|
||||
outDir: "dist",
|
||||
rollupOptions: {
|
||||
|
||||
@@ -0,0 +1,139 @@
|
||||
import assert from "node:assert/strict";
|
||||
import { execFileSync } from "node:child_process";
|
||||
import { createHash } from "node:crypto";
|
||||
import { mkdtempSync, readdirSync, readFileSync, rmSync } from "node:fs";
|
||||
import os from "node:os";
|
||||
import path from "node:path";
|
||||
import { test } from "node:test";
|
||||
import "reflect-metadata";
|
||||
import type { TemplatePackageManifest } from "@personal-brand/config";
|
||||
import { AdminTemplatePreviewAssetsService } from "../src/modules/admin/admin-template-preview-assets.service.js";
|
||||
import { AdminTemplatePreviewService } from "../src/modules/admin/admin-template-preview.service.js";
|
||||
import type { PrismaService } from "../src/prisma.service.js";
|
||||
|
||||
const digest = (value: Buffer | string) => createHash("sha256").update(value).digest("hex");
|
||||
|
||||
interface Fixture {
|
||||
root: string;
|
||||
archivePath: string;
|
||||
archiveChecksum: string;
|
||||
contentChecksum: string;
|
||||
assetChecksums: Map<string, string>;
|
||||
manifest: TemplatePackageManifest;
|
||||
}
|
||||
|
||||
function createTemplateFixture(packageKey: string): Fixture {
|
||||
const root = mkdtempSync(path.join(os.tmpdir(), `template-preview-matrix-${packageKey}-`));
|
||||
execFileSync(
|
||||
process.execPath,
|
||||
[
|
||||
path.resolve(process.cwd(), "../../scripts/template-pack.cjs"),
|
||||
"--template",
|
||||
packageKey,
|
||||
"--out",
|
||||
root,
|
||||
],
|
||||
{ cwd: path.resolve(process.cwd(), "../.."), stdio: "ignore" },
|
||||
);
|
||||
const filename = readdirSync(root).find((item) => item.endsWith(".tar.gz"));
|
||||
assert.ok(filename);
|
||||
const archivePath = path.join(root, filename);
|
||||
const manifest = JSON.parse(
|
||||
readFileSync(path.join(root, filename.slice(0, -7), "template.json"), "utf8"),
|
||||
) as TemplatePackageManifest;
|
||||
const checksums = JSON.parse(
|
||||
readFileSync(path.join(root, filename.slice(0, -7), "checksums.json"), "utf8"),
|
||||
) as { contentChecksum: string; files: Array<{ path: string; sha256: string }> };
|
||||
return {
|
||||
root,
|
||||
archivePath,
|
||||
archiveChecksum: digest(readFileSync(archivePath)),
|
||||
contentChecksum: checksums.contentChecksum,
|
||||
assetChecksums: new Map(
|
||||
checksums.files
|
||||
.filter((item) => item.path.startsWith("miniapp/assets/"))
|
||||
.map((item) => [`/${item.path.slice("miniapp/".length)}`, item.sha256]),
|
||||
),
|
||||
manifest,
|
||||
};
|
||||
}
|
||||
|
||||
test("template preview matrix keeps every deployed package, industry, and version isolated", async () => {
|
||||
const packageKeys = ["acheng-campus-food", "atelier-solopreneur", "linjing-editorial"];
|
||||
const fixtures = packageKeys.map(createTemplateFixture);
|
||||
let sequence = 0;
|
||||
const versionFixture = (fixture: Fixture) => {
|
||||
sequence += 1;
|
||||
return {
|
||||
id: `matrix-version-${sequence}`,
|
||||
packageKey: fixture.manifest.packageKey,
|
||||
version: fixture.manifest.version,
|
||||
displayName: fixture.manifest.displayName,
|
||||
status: "imported" as const,
|
||||
manifestSnapshot: fixture.manifest,
|
||||
contentChecksum: fixture.contentChecksum,
|
||||
archiveChecksum: fixture.archiveChecksum,
|
||||
artifactPath: fixture.archivePath,
|
||||
};
|
||||
};
|
||||
const services = fixtures.map((fixture) => {
|
||||
const versions = new Map<string, ReturnType<typeof versionFixture>>();
|
||||
const prisma = {
|
||||
templatePackageVersion: {
|
||||
findUnique: async ({ where }: { where: { id: string } }) => versions.get(where.id),
|
||||
},
|
||||
templatePackageAuditLog: { create: async () => ({}) },
|
||||
} as unknown as PrismaService;
|
||||
const service = new AdminTemplatePreviewService(
|
||||
prisma,
|
||||
new AdminTemplatePreviewAssetsService(),
|
||||
);
|
||||
return { fixture, service, versions };
|
||||
});
|
||||
|
||||
try {
|
||||
const visibleBrands = new Set<string>();
|
||||
for (const { fixture, service, versions } of services) {
|
||||
for (const industry of fixture.manifest.supportedIndustryTemplates) {
|
||||
// 每个组合使用独立版本 ID,模拟目录中不同版本并存。
|
||||
const first = versionFixture(fixture);
|
||||
const second = versionFixture(fixture);
|
||||
versions.set(first.id, first);
|
||||
versions.set(second.id, second);
|
||||
const [firstPreview, secondPreview] = await Promise.all([
|
||||
service.preview(first.id, industry, "matrix-admin"),
|
||||
service.preview(second.id, industry, "matrix-admin"),
|
||||
]);
|
||||
|
||||
assert.equal(firstPreview.template.packageKey, fixture.manifest.packageKey);
|
||||
assert.equal(firstPreview.industry.key, industry);
|
||||
assert.equal(firstPreview.workspace.brand.templateKey, industry);
|
||||
assert.equal(
|
||||
firstPreview.compatibility.renderer.key,
|
||||
fixture.manifest.visualTemplateKey ?? fixture.manifest.packageKey,
|
||||
);
|
||||
assert.equal(firstPreview.preview.safety.submissions, "disabled");
|
||||
assert.ok(firstPreview.workspace.offerings.length > 0);
|
||||
|
||||
// 版本 ID 进入模拟品牌 ID,不同版本不会共享同一模拟品牌身份。
|
||||
assert.match(firstPreview.workspace.brand.id, new RegExp(`^template-preview:${first.id}`));
|
||||
assert.match(
|
||||
secondPreview.workspace.brand.id,
|
||||
new RegExp(`^template-preview:${second.id}`),
|
||||
);
|
||||
assert.notEqual(firstPreview.workspace.brand.id, secondPreview.workspace.brand.id);
|
||||
visibleBrands.add(firstPreview.workspace.brand.id);
|
||||
visibleBrands.add(secondPreview.workspace.brand.id);
|
||||
|
||||
// 包内资源只能来自当前 archive 的 checksums.json。
|
||||
for (const [key, checksum] of Object.entries(firstPreview.preview.assetFiles)) {
|
||||
assert.equal(fixture.assetChecksums.get(key), checksum.sha256);
|
||||
}
|
||||
}
|
||||
}
|
||||
// 3 个包 x 支持行业(1 + 1 + 2)x 2 个版本 = 8 个隔离模拟品牌。
|
||||
assert.equal(visibleBrands.size, 8);
|
||||
} finally {
|
||||
for (const fixture of fixtures) rmSync(fixture.root, { recursive: true, force: true });
|
||||
}
|
||||
});
|
||||
@@ -1,4 +1,6 @@
|
||||
import assert from "node:assert/strict";
|
||||
import fs from "node:fs";
|
||||
import { mkdirSync } from "node:fs";
|
||||
import path from "node:path";
|
||||
import { execFileSync } from "node:child_process";
|
||||
import { test, expect } from "@playwright/test";
|
||||
@@ -61,6 +63,12 @@ test("模板管理可重试预览,并切换我的、详情和禁止提交的
|
||||
});
|
||||
let attempts = 0;
|
||||
const writes: string[] = [];
|
||||
const evidenceDirectory = process.env.TEMPLATE_PREVIEW_VISUAL_EVIDENCE;
|
||||
const captureVisualEvidence = async (name: string) => {
|
||||
if (!evidenceDirectory) return;
|
||||
mkdirSync(evidenceDirectory, { recursive: true });
|
||||
await page.screenshot({ path: path.join(evidenceDirectory, `${name}.png`) });
|
||||
};
|
||||
await page.route("**/api/**", async (route) => {
|
||||
const url = new URL(route.request().url());
|
||||
if (route.request().method() !== "GET") writes.push(url.pathname);
|
||||
@@ -78,7 +86,13 @@ test("模板管理可重试预览,并切换我的、详情和禁止提交的
|
||||
if (url.pathname.endsWith("/admin/brands")) return route.fulfill({ json: [] });
|
||||
return route.fulfill({ json: { name: "测试工作区" } });
|
||||
});
|
||||
await page.goto(`${process.env.ADMIN_URL || "http://localhost:3016"}/admin/templates`);
|
||||
const adminPage = await page.goto(
|
||||
`${process.env.ADMIN_URL || "http://localhost:3016"}/admin/templates`,
|
||||
);
|
||||
const contentSecurityPolicy = adminPage?.headers()["content-security-policy"];
|
||||
assert.match(contentSecurityPolicy ?? "", /default-src 'self'/);
|
||||
assert.match(contentSecurityPolicy ?? "", /img-src [^;]*data:/);
|
||||
assert.match(contentSecurityPolicy ?? "", /frame-ancestors 'self'/);
|
||||
await page.getByRole("button", { name: /预览/ }).click();
|
||||
const modal = page.getByRole("dialog");
|
||||
await expect(modal.getByText("预览测试失败,请重试")).toBeVisible();
|
||||
@@ -90,12 +104,26 @@ test("模板管理可重试预览,并切换我的、详情和禁止提交的
|
||||
await modal.getByText("资源诊断", { exact: true }).click();
|
||||
await expect(modal.getByText("内容缺失", { exact: true }).first()).toBeVisible();
|
||||
await expect(modal.getByText("包内资源已验证", { exact: true }).first()).toBeVisible();
|
||||
await captureVisualEvidence("home");
|
||||
const choosePage = async (label: string) => {
|
||||
await modal.getByLabel("预览页面").click();
|
||||
await page.locator(".ant-select-item-option-content").getByText(label, { exact: true }).click();
|
||||
};
|
||||
// 画布内真实 CTA 导航:首页案例进入详情,详情咨询进入表单。
|
||||
await modal.locator(".atelier-case").first().click();
|
||||
await expect(modal.locator(".atelier-detail-action")).toBeVisible();
|
||||
await captureVisualEvidence("detail");
|
||||
await modal.locator(".atelier-detail-action button").first().click();
|
||||
await expect(modal.locator(".inquiry-form")).toBeVisible();
|
||||
await captureVisualEvidence("inquiry");
|
||||
await modal.getByLabel("预览页面").click();
|
||||
await page.locator(".ant-select-item-option-content").getByText("首页", { exact: true }).click();
|
||||
await modal.getByText("资源诊断", { exact: true }).click();
|
||||
await expect(modal.getByText("内容缺失", { exact: true }).first()).toBeVisible();
|
||||
await expect(modal.getByText("包内资源已验证", { exact: true }).first()).toBeVisible();
|
||||
await choosePage("我的");
|
||||
await expect(modal.locator(".component-template-preview")).toContainText("我的咨询记录");
|
||||
await captureVisualEvidence("profile");
|
||||
await choosePage("业务详情");
|
||||
await expect(modal.locator(".component-template-preview")).toContainText(
|
||||
manifest.previewFixture.personal.content.offerings[0].name,
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
{
|
||||
"packageKey": "linjing-editorial",
|
||||
"packageName": "@personal-brand/template-linjing-editorial",
|
||||
"version": "1.0.0"
|
||||
"version": "1.0.1"
|
||||
},
|
||||
{
|
||||
"packageKey": "atelier-solopreneur",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
> 任务 ID:TMP-PLATFORM-001
|
||||
>
|
||||
> 状态:实施中,Phase 0/1/2 已完成,Phase 3 已接入版本预览、独立 fixture、包内图片校验和短期隔离 session;origin/CSP、CTA 导航、完整矩阵与最终视觉验收待完成
|
||||
> 状态:实施中,Phase 0/1/2/3 已完成;Phase 3 通过本地 Admin/H5 视觉验收,微信真机与线上发布验收留在后续阶段
|
||||
>
|
||||
> 唯一任务入口:本文档
|
||||
>
|
||||
@@ -394,11 +394,11 @@ Phase 2 当前进度(2026-10-16):
|
||||
### Phase 3:独立预览和模板管理页面
|
||||
|
||||
- [x] 增加 preview session 或同等短期隔离上下文;
|
||||
- [ ] 按行业选择兼容组合,使用 preview fixture 通过真实 Runtime projection 渲染;
|
||||
- [ ] 页面展示模块顺序、字段来源、资源缺失、能力依赖和诊断;
|
||||
- [ ] 预览禁止真实咨询、客户记录、品牌发布和上传;
|
||||
- [ ] /admin/templates 完成导入、详情、校验、预览、发布、撤回和审计交互;
|
||||
- [ ] 覆盖 loading、empty、error、retry、success 和权限失败状态。
|
||||
- [x] 按行业选择兼容组合,使用 preview fixture 通过真实 Runtime projection 渲染;
|
||||
- [x] 页面展示模块顺序、字段来源、资源缺失、能力依赖和诊断;
|
||||
- [x] 预览禁止真实咨询、客户记录、品牌发布和上传;
|
||||
- [x] /admin/templates 完成导入、详情、校验、预览、发布、撤回和审计交互;
|
||||
- [x] 覆盖 loading、empty、error、retry、success 和权限失败状态。
|
||||
|
||||
退出门禁:预览不创建品牌和业务数据;不同版本、行业和资源组合不会串数据;页面失败时保留上传和选择上下文;真实 Runtime 和预览数据映射有测试。
|
||||
|
||||
@@ -435,6 +435,17 @@ Phase 3 短期隔离 session 进展(2026-10-16):
|
||||
- Admin 预览按版本和行业保留短期 token 供失败重试复用;请求失败时删除对应 token,行业/版本选择和业务记录选择仍保留。
|
||||
- 自动化覆盖 session 成功复用、复用不新增审计、跨管理员拒绝、未知 token 拒绝、版本/行业绑定、shared client URL 和 Admin 重试上下文。本轮 API HTTP integration `52/52`、upload `2/2`、Client `6/6`、Admin unit `3/3` 和全仓 typecheck 通过;origin/CSP 隔离与最终矩阵验收仍待完成。
|
||||
|
||||
Phase 3 隔离、导航和矩阵收口(2026-10-16):
|
||||
|
||||
- Admin dev/preview 响应增加 CSP、`Referrer-Policy: no-referrer` 和 `X-Content-Type-Options: nosniff`。preview/生产 CSP 为 `default-src 'self'`、`script-src 'self'`、`object-src 'none'`、`base-uri 'none'`、`frame-ancestors 'self'`、`form-action 'self'`;图片和媒体允许 `self/data/blob` 以读取通过 checksum 校验的包内资源,样式保留 `unsafe-inline` 以支持现有 React UI。生产构建同时保留 CSP meta 作为静态托管防线。
|
||||
- Vite dev 为 React refresh preamble 单独允许 inline script;这是开发服务器例外,不是 preview/生产契约。Playwright 校验响应中存在 CSP 的 `default-src 'self'`、包内资源所需的 `img-src data:` 和 `frame-ancestors 'self'`。
|
||||
- Admin 画布监听 Taro web preview runtime 发出的导航事件,把 renderer 内真实 CTA 转成画布内切换;`detail` 路由同步选择对应 offering。Playwright 覆盖“首页案例 -> 详情 CTA -> 禁止提交的咨询表单”。
|
||||
- 新增真实包矩阵回归:`acheng-campus-food/food`、`atelier-solopreneur/personal`、`linjing-editorial/{personal,doors}`,每个组合各 2 个版本,共 8 个模拟品牌。测试校验行业兼容、Runtime/renderer 声明、模拟品牌 ID、包内资源逐项 checksum、禁用提交和跨版本隔离。
|
||||
- 矩阵回归发现 linjing doors 起始内容声明了未注册 capability `doors`。已将其修正为 `inquiry`,模板包升为 `linjing-editorial@1.0.1`,生成目录、release build 配置和模板注册表同步更新;旧 `1.0.0` 不在本轮改写。
|
||||
- Playwright 支持通过 `TEMPLATE_PREVIEW_VISUAL_EVIDENCE` 输出 `home/detail/inquiry/profile` 截图。本轮已生成并人工检查:独立 fixture 身份、包内图片、详情 CTA、咨询禁用和我的页面正常。该证据覆盖本地 Admin/H5 预览,不替代微信真机视觉验收或审核上传。
|
||||
- 本轮回归:API HTTP integration `52/52`、upload `2/2`、API unit `52/52`、Client `6/6`、Admin unit `6/6`、Playwright `1/1`;全仓 typecheck、变更范围 ESLint、format、Admin production build 和 `template:check` 通过。全仓 `pnpm lint` 仍有先前记录的 Admin 既有 error,非本轮阻塞。
|
||||
- Phase 3 本地预览门禁完成;微信真机/审核上传、品牌精确版本安装、bootstrap 导入和真实编辑发布仍归 Phase 4/5。
|
||||
|
||||
### Phase 4:品牌安装、bootstrap 和发布
|
||||
|
||||
- [ ] 区分行业安装和视觉包安装,保存精确版本与 checksum 快照;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
### 仓库内视觉模板包
|
||||
|
||||
- acheng-campus-food@1.0.0:餐饮场景,使用 food 行业能力。
|
||||
- linjing-editorial@1.0.0:林境建筑画册,可用于 doors 和 personal 组合。
|
||||
- linjing-editorial@1.0.1:林境建筑画册,可用于 doors 和 personal 组合。
|
||||
- atelier-solopreneur@1.2.0:独立工坊方向,适配 personal 行业。
|
||||
|
||||
以上是仓库盘点,不表示三个包都已经通过线上导入、预览、品牌安装和微信上传验收。生成目录当前位于 packages/config/src/generated-template-packages.ts,后续必须由导出和 conformance 流程生成并校验。
|
||||
|
||||
@@ -3812,7 +3812,7 @@ export const generatedTemplatePackageRegistry: readonly TemplatePackageManifest[
|
||||
},
|
||||
{
|
||||
packageKey: "linjing-editorial",
|
||||
version: "1.0.0",
|
||||
version: "1.0.1",
|
||||
displayName: "林境建筑画册",
|
||||
defaultBrandSlug: "linjing-doors",
|
||||
runtimeContract: "1.0",
|
||||
@@ -5301,7 +5301,7 @@ export const generatedTemplatePackageRegistry: readonly TemplatePackageManifest[
|
||||
required: false,
|
||||
},
|
||||
],
|
||||
capabilityKey: "doors",
|
||||
capabilityKey: "inquiry",
|
||||
},
|
||||
personal: {
|
||||
templateKey: "personal",
|
||||
@@ -5360,4 +5360,4 @@ export const generatedTemplatePackageRegistry: readonly TemplatePackageManifest[
|
||||
},
|
||||
];
|
||||
export const generatedTemplatePackageRegistryHash =
|
||||
"409bf2553c819c916ba1036eed103cae7b707f88b7b396fd566dc77c02b1ec03";
|
||||
"57108a2e3263a9776cd2ec26d76a401eb66bed16ee250bef11464cffcc874d89";
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@personal-brand/template-linjing-editorial",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.1",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"files": [
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"packageKey": "linjing-editorial",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.1",
|
||||
"displayName": "林境建筑画册",
|
||||
"defaultBrandSlug": "linjing-doors",
|
||||
"runtimeContract": "1.0",
|
||||
@@ -1444,7 +1444,7 @@
|
||||
"required": false
|
||||
}
|
||||
],
|
||||
"capabilityKey": "doors"
|
||||
"capabilityKey": "inquiry"
|
||||
},
|
||||
"personal": {
|
||||
"templateKey": "personal",
|
||||
|
||||
Reference in new issue
Block a user