Skip to content

fix(czdev): meta.json 写入 pool 布局资源路径与 author(修商店无图标/@undefined)#13

Merged
eggfly merged 1 commit into
mainfrom
fix/czdev-meta-pool-layout-6417
Jul 15, 2026
Merged

fix(czdev): meta.json 写入 pool 布局资源路径与 author(修商店无图标/@undefined)#13
eggfly merged 1 commit into
mainfrom
fix/czdev-meta-pool-layout-6417

Conversation

@eggfly

@eggfly eggfly commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

背景

商店(cardputer.cc)上所有经 czdev 提交的应用都不显示图标、作者显示 @undefined。根因有两个,都出在 czdev publish 生成的 meta.json

  1. 资源路径没归一化:publish 会把图标/截图复制进 pool/main/<pkg>/(图标在顶层、截图在 screenshots/ 下),但 meta.json 里保留的还是 app-builder.json源码仓库相对路径share/images/foo.pngpackaging/icon.pngstore/screenshots/a.png),registry 生成器按 pool 路径去拼 raw URL → 全部 404。
  2. 没有 author 字段:registry 输出空对象,前端显示 @undefined

修复

  • meta.json 前把 icon / screenshots 重写为 pool 布局相对路径(basename / screenshots/<basename>);
  • 写入 author{"github": <登录名>, "display_name": <Maintainer 显示名>}app-builder.json 里显式给了 store.author 则优先)。

说明

商店侧的 registry 生成器已经加了兜底(对存量 meta.json 按 basename 归一化 + 从 Maintainer 推导 author,线上 25 个应用已全部恢复图标和作者),所以本 PR 不影响已发布的包;它的意义是让新提交从源头就正确,不再依赖服务端兜底。

验证

  • python3 -m py_compile 通过。

publish copies the icon and screenshots into pool/main/<pkg>/ flat
(icon at <basename>, screenshots under screenshots/<basename>) but
meta.json kept the app-builder.json source-repo paths (e.g.
share/images/foo.png, store/screenshots/a.png), so the store registry
generator resolved them to 404s and every czdev-submitted app rendered
without an icon. Rewrite both fields to the layout the files were
actually copied into.

meta.json also carried no author, which the store showed as
'@undefined'. Emit an author object from the authenticated GitHub login
plus the Maintainer display name, letting an explicit store.author in
app-builder.json take precedence.

(The store's registry generator now also normalizes legacy meta.json on
its side, so previously published packages are already fixed; this
makes new submissions correct at the source.)
@eggfly
eggfly merged commit c4e1547 into main Jul 15, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant