diff --git a/.agents/skills/use-fairygui-maker/SKILL.md b/.agents/skills/use-fairygui-maker/SKILL.md index 60bb500..2307113 100644 --- a/.agents/skills/use-fairygui-maker/SKILL.md +++ b/.agents/skills/use-fairygui-maker/SKILL.md @@ -138,4 +138,4 @@ State: Do not present build or type-check success as browser-runtime evidence. -This folder is portable: keep `SKILL.md`, `agents/` and `references/` together. The local reference contains CLI/Host startup details. Extended product documentation ships in the installed `fairygui-maker/docs/` directory; online copies are the [README](https://github.com/OpenFairyGUI/FairyGUI-Maker/blob/main/README.md), [architecture](https://github.com/OpenFairyGUI/FairyGUI-Maker/blob/main/docs/architecture.md), and [Workbench contract](https://github.com/OpenFairyGUI/FairyGUI-Maker/blob/main/docs/workbench.md). Match the installed version when consulting online documentation. +This folder is portable: keep `SKILL.md`, `agents/` and `references/` together. The local reference contains CLI/Host startup details. Extended product documentation ships in the installed `node_modules/@openfairygui/fairygui-maker/docs/` directory; online copies are the [README](https://github.com/OpenFairyGUI/FairyGUI-Maker/blob/main/README.md), [architecture](https://github.com/OpenFairyGUI/FairyGUI-Maker/blob/main/docs/architecture.md), and [Workbench contract](https://github.com/OpenFairyGUI/FairyGUI-Maker/blob/main/docs/workbench.md). Match the installed version when consulting online documentation. diff --git a/.agents/skills/use-fairygui-maker/references/import-workflows.md b/.agents/skills/use-fairygui-maker/references/import-workflows.md index 5abf6b5..1bf44a1 100644 --- a/.agents/skills/use-fairygui-maker/references/import-workflows.md +++ b/.agents/skills/use-fairygui-maker/references/import-workflows.md @@ -1,6 +1,6 @@ # Local CLI and Import Draft workflows -Use an installed `fairygui-maker` binary, or `node /scripts/fairygui-maker.mjs` after building the source checkout. Run `--version` and `--help` first. Version 0.1.0 was an unpublished candidate at the September 2026 audit; use a supplied tarball/source checkout until registry availability is confirmed. Do not repeatedly run npx against an unavailable version. +Use the `fairygui-maker` binary from the `@openfairygui/fairygui-maker` package, or `node /scripts/fairygui-maker.mjs` after building the source checkout. Run `--version` and `--help` first. Confirm the requested version is available in the registry; otherwise use a supplied tarball/source checkout. Do not repeatedly run npx against an unavailable version. ## Commands and writes diff --git a/README.md b/README.md index 07f648a..d8e7ff8 100644 --- a/README.md +++ b/README.md @@ -42,13 +42,13 @@ Viewer 不能作为发布结果的证明;最终 `.fui` 行为应在 Player 中 ## 快速开始 -截至 2026-09-04,`0.1.0` 仍是未发布候选版本,npm registry 查询 `fairygui-maker` 返回 404。首次发布前请按[本地开发](#本地开发)从源码启动;以下 npm 命令供发布后使用。发布状态与验收要求见[发布检查清单](./docs/release-checklist.md)。 +npm 包名为 `@openfairygui/fairygui-maker`,CLI 命令仍为 `fairygui-maker`。以下命令使用 `0.1.1`;如果 npm registry 尚未提供该版本,请按[本地开发](#本地开发)从源码启动。发布状态以 registry 为准,验收要求见[发布检查清单](./docs/release-checklist.md)。 使用 npm 包只需要 Node.js `>=22.18`: ```powershell $env:FAIRYGUI_MAKER_TOKEN = "replace-with-at-least-24-characters" -npx fairygui-maker@0.1.0 +npx @openfairygui/fairygui-maker@0.1.1 ``` 服务默认监听 `127.0.0.1:3847`。终端会输出: @@ -61,13 +61,13 @@ npx fairygui-maker@0.1.0 修改端口: ```powershell -npx fairygui-maker@0.1.0 --port 3900 +npx @openfairygui/fairygui-maker@0.1.1 --port 3900 ``` 把 Artifact 与运行状态放到明确的私有目录: ```powershell -npx fairygui-maker@0.1.0 --data-dir E:\FairyGUI\maker-data +npx @openfairygui/fairygui-maker@0.1.1 --data-dir E:\FairyGUI\maker-data ``` 相对 `--data-dir` 以启动命令的当前目录为基准;未传入时默认使用当前目录下的 `.fairygui-maker`。环境变量 `FAIRYGUI_MAKER_DATA_DIR` 提供相同能力,CLI 参数优先。 @@ -142,17 +142,17 @@ Claude 文件只负责转到同一份通用 Skill,避免两套指南漂移。 ### 在其他工程中安装 Skill -先在目标工程安装已验证的 tarball(例如 `npm install --no-save E:\Artifacts\fairygui-maker-0.1.0.tgz`;正式发布后可改用确切 npm 版本)。然后复制包内的完整通用 Skill: +先在目标工程安装已验证的 tarball(例如 `npm install --no-save E:\Artifacts\openfairygui-fairygui-maker-0.1.1.tgz`;正式发布后可改用确切 npm 版本)。然后复制包内的完整通用 Skill: ```powershell -$skillSource = Join-Path (npm root) "fairygui-maker/.agents/skills/use-fairygui-maker" +$skillSource = Join-Path (npm root) "@openfairygui/fairygui-maker/.agents/skills/use-fairygui-maker" $skillTarget = Join-Path (Get-Location) ".agents/skills/use-fairygui-maker" if (Test-Path -LiteralPath $skillTarget) { throw "Skill already exists; review it before replacing" } New-Item -ItemType Directory -Force -Path (Split-Path -Parent $skillTarget) | Out-Null Copy-Item -LiteralPath $skillSource -Destination $skillTarget -Recurse ``` -Claude 工程使用 `.claude/skills/use-fairygui-maker` 作为目标目录,仍复制上面同一份通用 Skill;不要单独复制仓库内依赖相对转发路径的 Claude wrapper。源码用户也可将 `$skillSource` 改为 Maker checkout 中 `.agents/skills/use-fairygui-maker` 的绝对路径。保留 `references/` 和 `agents/`;本地工作流引用均位于 Skill 自身目录内,完整产品文档同时随包放在 `node_modules/fairygui-maker/docs/`。 +Claude 工程使用 `.claude/skills/use-fairygui-maker` 作为目标目录,仍复制上面同一份通用 Skill;不要单独复制仓库内依赖相对转发路径的 Claude wrapper。源码用户也可将 `$skillSource` 改为 Maker checkout 中 `.agents/skills/use-fairygui-maker` 的绝对路径。保留 `references/` 和 `agents/`;本地工作流引用均位于 Skill 自身目录内,完整产品文档同时随包放在 `node_modules/@openfairygui/fairygui-maker/docs/`。 在目标工程重新开启 Agent 任务,显式调用 `$use-fairygui-maker`,例如“检查 `E:\Design\hud.fig` 的转换诊断,暂不物化工程”。先检查 Agent 是否发现 Skill,再分别检查所需 CLI 或 MCP:安装 Skill 本身不会启动 Host,也不会建立 MCP 连接;本地 import/reimport 不以 MCP 在线为前提。 @@ -189,7 +189,7 @@ Artifact 同内容只存一份字节,每次导入独立保留名称、来源 Agent、批处理和视觉回归可以显式授权一个工程根目录: ```powershell -npx fairygui-maker@0.1.0 view E:\Projects\MyFairyGUIProject +npx @openfairygui/fairygui-maker@0.1.1 view E:\Projects\MyFairyGUIProject # 全局安装后也可以使用: fairygui-maker view E:\Projects\MyFairyGUIProject @@ -275,7 +275,7 @@ pnpm verify:release 每次浏览器测试在 `test-results/browser/run-*/` 留存 reference/actual/diff、阈值、来源/组件/Broker 版本和诊断报告;CI 成败均上传并保留 14 天。未预期 Console/CSP/网络错误阻断测试。Viewer 的真实 FIG、Player 原生图形与 T5 新增的固定字体文字/按钮四态/List 使用独立零差异 Golden,不覆盖任意系统字体保真。详见[证据闭环](./docs/workbench.md#214-视觉与故障证据闭环批次-19)与[T5 字体、布局、组件库和栅格策略](./docs/import-fidelity.md)。 -测试固定使用 ANGLE/SwiftShader,以统一 Windows/Linux 的图形栅格化;不改变正常 Workbench 浏览器的 GPU 配置,也不放宽像素阈值。发布验收必须记录同一个提交的本地结果和完整 CI 矩阵,不能用不同提交的绿灯拼接通过。 +测试固定使用 ANGLE/SwiftShader;含文字的语义截图使用 Windows/Linux 独立基线,以容纳系统字体栅格化差异。测试不改变正常 Workbench 浏览器的 GPU 配置,也不放宽零像素差异阈值。发布验收必须记录同一个提交的本地结果和完整 CI 矩阵,不能用不同提交的绿灯拼接通过。 仅当渲染变化符合预期时显式生成新基线;CI 禁止该开关,功能或诊断检查失败不会写回 Golden。更新后审查图片并关闭开关重跑: @@ -293,16 +293,16 @@ Artifact Store 启动时会重新校验 manifest、文件大小、SHA-256、整 建议 Agent 和 CI 固定精确版本,并在验证后显式升级: ```powershell -npx -y fairygui-maker@0.1.0 --version -npm install --global fairygui-maker@0.1.0 -npm uninstall --global fairygui-maker +npx -y @openfairygui/fairygui-maker@0.1.1 --version +npm install --global @openfairygui/fairygui-maker@0.1.1 +npm uninstall --global @openfairygui/fairygui-maker ``` `npx` 使用者没有全局包需要卸载。卸载不会删除 `--data-dir` 或 `.fairygui-maker`;确认不再需要其中的 Artifact 后再由用户手动删除该目录。 ## 发布 npm 包 -FairyGUI Maker 自身采用 [MIT License](./LICENSE),公开仓库为 [OpenFairyGUI/FairyGUI-Maker](https://github.com/OpenFairyGUI/FairyGUI-Maker)。npm 包名为无 scope 的 `fairygui-maker`,发布者登录有权发布该包的 npm 账号后执行: +FairyGUI Maker 自身采用 [MIT License](./LICENSE),公开仓库为 [OpenFairyGUI/FairyGUI-Maker](https://github.com/OpenFairyGUI/FairyGUI-Maker)。npm 包名为 `@openfairygui/fairygui-maker`,发布者登录在 npm `openfairygui` 组织中有发布权限的账号后执行: ```powershell pnpm install --frozen-lockfile @@ -312,7 +312,7 @@ npm publish --access public GitHub CI 会在 Windows/Linux 与 Node.js 22/24 上执行 runtime 校验、构建和单元测试,并在 Linux Chromium 中运行同一套发布门禁。发布工作流只响应人工发布的 `v` GitHub Release;首发采用临时 token,完成配置后采用 npm Trusted Publishing,并请求生成 provenance。 -首次发布前需确认 `fairygui-maker` 名称仍然可用。首次 GitHub Release 需要发布者临时配置可发布该包的 granular `NPM_TOKEN` repository secret。首次发布成功后,在 npm package settings 中把 `OpenFairyGUI/FairyGUI-Maker` 和 `release.yml` 配置为允许 `npm publish` 的 trusted publisher,并删除该 secret;后续发布由 OIDC 认证,不再保存长期 npm token。 +首次发布前需确认 `@openfairygui/fairygui-maker` 名称仍然可用,并核对 npm 组织发布权限。首次 GitHub Release 需要发布者临时配置可发布该 scope、启用 Bypass 2FA 的 granular `NPM_TOKEN` repository secret。首次发布成功后,在 npm package settings 中把 `OpenFairyGUI/FairyGUI-Maker` 和 `release.yml` 配置为允许 `npm publish` 的 trusted publisher,并删除该 secret、撤销临时 token;后续发布由 OIDC 认证,不再保存长期 npm token。 ## 文档 diff --git a/docs/import-fidelity.md b/docs/import-fidelity.md index c6ebbef..7413c1a 100644 --- a/docs/import-fidelity.md +++ b/docs/import-fidelity.md @@ -90,11 +90,13 @@ FIG Prototype Interaction Intent 保留有界的 trigger/action/原始 JSON 到 `scripts/semantic-fidelity-smoke.ts` 纳入 `pnpm test:browser`:同一导入计划生成可编辑工程供 Viewer 使用,再经 Core 发布真实 `.fui` 与 PNG atlas,由独立原生 Player 加载。 工程背景使用原生 Graph(Core 的 component bgColor 是编辑器属性,发布 FUI 不渲染);Viewer 保留按钮源标题、使用正确的文字垂直对齐属性,并且只有声明描边颜色时才启用文字描边。 -新增 8 张 460×350 独立 Golden:两种 Runtime × 四种按钮状态,包含真实订单标题、金额、按钮文字和双行 List。 +每个平台各有 8 张 460×350 独立 Golden:两种 Runtime × 四种按钮状态,包含真实订单标题、金额、按钮文字和双行 List。Windows 沿用 `semantic--.png`,Linux 使用同名 `.linux.png`;固定 SwiftShader 与字体文件仍不能消除系统字体栅格化差异。 通过既有 Broker 切页并检查仅当前背景可见、文字存在、单行未溢出、List 两项,以及四页图片不同。 测试预载已安装 `@fontsource-variable/geist@5.3.0` 的 Latin variable WOFF2(SHA-256 `19f9c92546aa300c312235e3125af1b81394d8db9a4bc4a425cd5b641d2d54e1`),无远程字体请求。 每种 Runtime 各自零像素差异/零 MAE,保存 reference/actual/diff 与版本证据;并不要求两个 Runtime 相互像素一致。 固定字体只覆盖此 Latin fixture,不覆盖任意系统字体、中文、复杂脚本或 Photoshop 合成保真。 Windows/Linux 的字体栅格化仍需同提交 CI 证据;本地通过不能代替完整 CI 矩阵。 +首批 Linux 基线原样取自 [CI 34192023956](https://github.com/OpenFairyGUI/FairyGUI-Maker/actions/runs/34192023956) 的 8 张 actual PNG(提交 `81b052c4af92ba364a1fea9f26281da0788f7c3d`,Ubuntu 24.04、Playwright 1.62.1、Chromium 151.0.7922.34)。人工检查文字、按钮四态和 List 后加入;Windows 基线保持原样,两个平台都要求零像素差异。 + 基线更新沿用显式 `UPDATE_VISUAL_GOLDENS=1`、CI 禁止更新、所有功能/诊断通过后才写回的机制;更新后审查图片,并关闭更新重跑。 diff --git a/docs/maker-import-bundle-v1.md b/docs/maker-import-bundle-v1.md index b89ca69..e48671e 100644 --- a/docs/maker-import-bundle-v1.md +++ b/docs/maker-import-bundle-v1.md @@ -8,7 +8,7 @@ ImportDocument,不定义第二套设计模型,也不包含 Agent 推断的 B 安装包随附 [minimal-bundle](./examples/minimal-bundle/maker-import.json):完整的 [fixture.json](./examples/minimal-bundle/fixture.json)、[manifest](./examples/minimal-bundle/maker-import.json) 和 [SVG 资源](./examples/minimal-bundle/assets/000001.svg),可直接导入,无需源码或测试夹具。 ```powershell -$bundle = Join-Path (npm root) "fairygui-maker/docs/examples/minimal-bundle" +$bundle = Join-Path (npm root) "@openfairygui/fairygui-maker/docs/examples/minimal-bundle" fairygui-maker import inspect $bundle --data-dir .maker-example-data fairygui-maker import plan $bundle --out example-plan.json --data-dir .maker-example-data fairygui-maker import $bundle --dry-run --data-dir .maker-example-data diff --git a/docs/release-checklist.md b/docs/release-checklist.md index ecfe33d..4919bc8 100644 --- a/docs/release-checklist.md +++ b/docs/release-checklist.md @@ -4,7 +4,7 @@ ## 固定输入 -- `package.json` 中包名为 `fairygui-maker`、许可证为 MIT,repository/homepage/issues 指向 `OpenFairyGUI/FairyGUI-Maker`;发布 tag 必须为 `v`。 +- `package.json` 中包名为 `@openfairygui/fairygui-maker`、许可证为 MIT,repository/homepage/issues 指向 `OpenFairyGUI/FairyGUI-Maker`;发布 tag 必须为 `v`。CLI 名称仍为 `fairygui-maker`。 - `vendor-runtime.lock.json` 是三个浏览器 runtime 文件来源、完整 commit、源路径、字节数和 SHA-256 的单一清单。第三方声明与 tarball 内 `dist/web/viewer-runtime/` 必须与它一致。 - runtime 直接复制自清单指定的 `FairyGUI-Editor-Online` 预编译资产,不做构建或改写。按 `source.repository`、`source.commit` 和每个 `sourcePath` 获取原始文件,保持字节原样;不要用文本写入命令或换行转换重存。`.gitattributes` 禁止这些文件的 Git 文本转换。 - 该来源链只能复现分发的预编译字节,不证明 LayaAir/FairyGUI 原始源码构建可复现。若以后需要重建引擎,必须另行固定引擎源码 commit、工具链与构建命令,不能从版本标签推断。 @@ -23,21 +23,21 @@ pnpm verify:release 1. 干净 checkout 的完整 SHA 已记录;依赖采用 frozen lockfile。 2. 本地 `pnpm verify:release` 全程退出 0,包括生产依赖审计和全新 tarball 消费测试。 3. 同一 SHA 的 CI 四个单元测试组合(Windows/Linux × Node 22.18/24)与 Linux `release-smoke` 全部通过。超时、进行中、旧 SHA 和部分绿灯均不能算通过。 -4. 浏览器证据保留 reference/actual/diff、运行环境与诊断报告。合成图形使用固定 SwiftShader,Viewer/Player 的像素阈值仍为 0;更新 Golden 必须人工检查图片,并在关闭更新开关后重跑完整门禁。 +4. 浏览器证据保留 reference/actual/diff、运行环境与诊断报告。合成图形使用固定 SwiftShader;含文字的语义截图分别使用 Windows/Linux 基线,Viewer/Player 的像素阈值仍为 0。更新 Golden 必须人工检查图片,并在关闭更新开关后重跑完整门禁。 5. 所有变更审查完成;实际发布前再核对 npm 包状态与发布权限。任意文件改变都需要以新 SHA 重新验收。 CI 单元测试 job 限时 20 分钟,完整发布门禁限时 30 分钟;时间限制只用于暴露挂起,不代表挂起原因已经解决。GitHub 浏览器证据默认保留 14 天,需要长期归档时由发布者另行保留。 ## npm 首发与后续发布 -2026-09-04 只读核查:npm registry 的 `fairygui-maker` 返回 404,GitHub Release 列表为空,repository secrets 列表为空。404 不代表包名已预留或当前账号有权发布;repository secrets 列表也不能证明没有组织级凭据。 +2026-09-08 首发准备快照:候选包为 `@openfairygui/fairygui-maker@0.1.1`,该包的公开 registry 查询返回 404,repository secret `NPM_TOKEN` 已配置(未读取值)。已有 `v0.1.0` 标签与同名 Release 草稿指向旧提交 `48435c4573ed4d47e061a2cb41362118e8c0d37e`,不要发布旧草稿或覆盖该标签。此快照不代表当前 registry 状态;404 不代表包名已预留或账号有权发布,secret 存在也不证明其发布权限有效。 -首次发布尚未执行,Trusted Publisher 的真实认证链尚未验收。步骤为: +首次发布和后续 Trusted Publisher 认证必须分别验收。步骤为: 1. 发布者确认包名可用、账号有发布权,并明确批准首发。 2. 临时配置仅用于首发的 granular `NPM_TOKEN` repository secret;从已验收提交创建版本 tag/GitHub Release,由 `release.yml` 执行门禁和带 provenance 的发布。 -3. 首发成功后,在 npm package settings 配置 GitHub Trusted Publisher:organization/user 为 `OpenFairyGUI`,repository 为 `FairyGUI-Maker`,workflow filename 为 `release.yml`。当前工作流未配置 GitHub Environment,不应填写不匹配的 environment。 +3. 首发成功后,在 npm package settings 配置 GitHub Trusted Publisher:organization/user 为 `OpenFairyGUI`,repository 为 `FairyGUI-Maker`,workflow filename 为 `release.yml`,允许直接 `npm publish`。当前工作流未配置 GitHub Environment,不应填写不匹配的 environment。 4. 删除 GitHub 的 bootstrap secret 并撤销 npm token。下一次经授权的版本发布必须在没有该 token 的情况下成功,才能证明 OIDC 路径闭环;仅存在 `id-token: write` 不算验证成功。 -5. 实际发布后,核对 npm 版本、tarball 和 provenance,再更新 README 中的“未发布”状态。 +5. 实际发布后,核对 `npm view @openfairygui/fairygui-maker@0.1.1 version dist.integrity`、registry tarball 和 provenance;包名、版本、tag、Release、CI 和产物必须一致。 现有 `release.yml` 使用 GitHub-hosted Ubuntu、Node 24 和 npm 11.18.0;npm 优先尝试 OIDC,并支持 token fallback。认证与配置要求以 [npm Trusted Publishing 官方文档](https://docs.npmjs.com/trusted-publishers/)为准。不要为验证流程直接发布一个无人批准的版本。 diff --git a/package.json b/package.json index 6335cd1..3ec0454 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "fairygui-maker", - "version": "0.1.0", + "name": "@openfairygui/fairygui-maker", + "version": "0.1.1", "description": "AI agent toolkit and preview workspace for FairyGUI projects and published artifacts.", "license": "MIT", "repository": { diff --git a/scripts/semantic-fidelity-smoke.ts b/scripts/semantic-fidelity-smoke.ts index 7606946..8d5c448 100644 --- a/scripts/semantic-fidelity-smoke.ts +++ b/scripts/semantic-fidelity-smoke.ts @@ -45,6 +45,7 @@ export async function semanticFidelitySmoke(context: BrowserContext, origin: str void face.load(); }, [...font]); const captures: Record = {}; + const visualErrors: Error[] = []; try { await page.goto(`${origin}/imports/${draft.draftId}`); await page.getByText('AGENT READY', { exact: true }).waitFor(); @@ -79,10 +80,16 @@ export async function semanticFidelitySmoke(context: BrowserContext, origin: str const image = captured.body.result.content.find((item: any) => item.type === 'image'); const png = Buffer.from(image.data, 'base64'); const name = `semantic-${mode}-${buttonState}`; - goldens.push(await saveVisualGolden(page, evidence.directory, name, png, captured.value, - { mode, sourceId, sourceRevision: captured.value.sourceRevision, packageId, componentId }, - path.join(process.cwd(), `test/fixtures/design-import/${name}.png`), - path.join(process.cwd(), 'test/fixtures/design-import/semantic-fidelity-baseline.json'))); + try { + goldens.push(await saveVisualGolden(page, evidence.directory, name, png, captured.value, + { mode, sourceId, sourceRevision: captured.value.sourceRevision, packageId, componentId }, + path.join(process.cwd(), `test/fixtures/design-import/${name}${process.platform === 'linux' ? '.linux' : ''}.png`), + path.join(process.cwd(), 'test/fixtures/design-import/semantic-fidelity-baseline.json'))); + } catch (error) { + // Retain all eight diffs for review; a pixel mismatch still fails the entire gate. + if (!(error instanceof assert.AssertionError) || !error.message.startsWith('Visual baseline changed:')) throw error; + visualErrors.push(new Error(`${name}: ${error.message}`)); + } const objectTree = captured.value.value.observation.objectTree; const flatten = (node: any): any[] => [node, ...(node.children ?? []).flatMap(flatten)]; const objects = flatten(objectTree); @@ -135,6 +142,7 @@ export async function semanticFidelitySmoke(context: BrowserContext, origin: str await page.getByText('AGENT READY', { exact: true }).waitFor(); await installFont('player'); await captureStates('player', artifact.artifactId, await callTool('render_artifact_component', { artifactId: artifact.artifactId, packageId, componentId, requestId: randomUUID(), capture: false })); + if (visualErrors.length) throw new AggregateError(visualErrors, visualErrors.map((error) => error.message).join('\n')); return { goldens: 8, buttonStates: 4, editableSourceRoundTrip: true, pinnedFontSha256: sha256(font), captures }; } finally { await page.close(); } } diff --git a/scripts/verify-release-inputs.mjs b/scripts/verify-release-inputs.mjs index bcec3a1..07b084d 100644 --- a/scripts/verify-release-inputs.mjs +++ b/scripts/verify-release-inputs.mjs @@ -10,7 +10,7 @@ const repository = "OpenFairyGUI/FairyGUI-Maker" export async function verifyReleaseInputs(root, { upstream = false, githubRepository = process.env.GITHUB_REPOSITORY } = {}) { const metadata = JSON.parse(await readFile(path.join(root, "package.json"), "utf8")) const url = `https://github.com/${repository}` - assert.equal(metadata.name, "fairygui-maker", "Release package name changed") + assert.equal(metadata.name, "@openfairygui/fairygui-maker", "Release package name changed") assert.equal(metadata.license, "MIT", "Release license changed") assert.equal(metadata.repository?.url, `${url}.git`, "Release repository metadata disagrees") assert.equal(metadata.homepage, `${url}#readme`, "Release homepage disagrees") diff --git a/test/design-import/reimport.test.ts b/test/design-import/reimport.test.ts index aa7173c..e4d2fdb 100644 --- a/test/design-import/reimport.test.ts +++ b/test/design-import/reimport.test.ts @@ -40,7 +40,8 @@ const component = (project: UamProject) => { }; async function setup(t: TestContext, children = [text('keep'), text('change'), text('remove')]) { - const parent = await mkdtemp(join(tmpdir(), 'maker-reimport-')); + // Windows TEMP can use an 8.3 alias; match Backend's canonical directory-swap paths. + const parent = await fs.realpath(await mkdtemp(join(tmpdir(), 'maker-reimport-'))); t.after(() => rm(parent, { recursive: true, force: true })); const source = join(parent, 'bundle'), output = join(parent, 'project'); const writeSource = async (nodes: ImportNode[], bindings = {}) => { diff --git a/test/fixtures/design-import/semantic-player-disabled.linux.png b/test/fixtures/design-import/semantic-player-disabled.linux.png new file mode 100644 index 0000000..1078d01 Binary files /dev/null and b/test/fixtures/design-import/semantic-player-disabled.linux.png differ diff --git a/test/fixtures/design-import/semantic-player-down.linux.png b/test/fixtures/design-import/semantic-player-down.linux.png new file mode 100644 index 0000000..901ac6d Binary files /dev/null and b/test/fixtures/design-import/semantic-player-down.linux.png differ diff --git a/test/fixtures/design-import/semantic-player-over.linux.png b/test/fixtures/design-import/semantic-player-over.linux.png new file mode 100644 index 0000000..283ae1c Binary files /dev/null and b/test/fixtures/design-import/semantic-player-over.linux.png differ diff --git a/test/fixtures/design-import/semantic-player-up.linux.png b/test/fixtures/design-import/semantic-player-up.linux.png new file mode 100644 index 0000000..f57e846 Binary files /dev/null and b/test/fixtures/design-import/semantic-player-up.linux.png differ diff --git a/test/fixtures/design-import/semantic-viewer-disabled.linux.png b/test/fixtures/design-import/semantic-viewer-disabled.linux.png new file mode 100644 index 0000000..1078d01 Binary files /dev/null and b/test/fixtures/design-import/semantic-viewer-disabled.linux.png differ diff --git a/test/fixtures/design-import/semantic-viewer-down.linux.png b/test/fixtures/design-import/semantic-viewer-down.linux.png new file mode 100644 index 0000000..901ac6d Binary files /dev/null and b/test/fixtures/design-import/semantic-viewer-down.linux.png differ diff --git a/test/fixtures/design-import/semantic-viewer-over.linux.png b/test/fixtures/design-import/semantic-viewer-over.linux.png new file mode 100644 index 0000000..283ae1c Binary files /dev/null and b/test/fixtures/design-import/semantic-viewer-over.linux.png differ diff --git a/test/fixtures/design-import/semantic-viewer-up.linux.png b/test/fixtures/design-import/semantic-viewer-up.linux.png new file mode 100644 index 0000000..f57e846 Binary files /dev/null and b/test/fixtures/design-import/semantic-viewer-up.linux.png differ diff --git a/test/release-inputs.test.mjs b/test/release-inputs.test.mjs index e3f0d67..81f1dea 100644 --- a/test/release-inputs.test.mjs +++ b/test/release-inputs.test.mjs @@ -39,6 +39,8 @@ test("release inputs reject runtime, provenance, notice and repository drift", a await writeFile(noticePath, notices) const metadataPath = path.join(root, "package.json") const metadata = JSON.parse(await readFile(metadataPath, "utf8")) + await writeFile(metadataPath, JSON.stringify({ ...metadata, name: "fairygui-maker" })) + await assert.rejects(verify(), /package name changed/) metadata.repository.url = "https://github.com/somebody/another-repository.git" await writeFile(metadataPath, JSON.stringify(metadata)) await assert.rejects(verify(), /repository metadata/)