Files
iwb-plugins-desktop/image-annotate/package.json
T
qiqi 320cd6e4d0 fix(image-annotate): loadImage 不再 fetch(dataURL)(宿主 CSP connect-src 不含 data:)
带 CSP 的真站 e2e 抓出:编辑器 loadImage 用 fetch(dataURL) 转 blob URL,被
connect-src 'self' https: … 拦下 → 每次打开编辑器都产生一次 CSP 违规
(靠上游 catch 回退才没坏,功能正常、只在控制台报错)。mock 页无 CSP,永远测不出。

改为纯本地解码 atob → Uint8Array → Blob → blobURL,行为与上游一致(同样拿到
blob URL、同样载入后 revoke),且不依赖 CSP/网络。这是相对上游编辑器唯一的移植改动。

版本 1.0.0 → 1.0.1(产物字节已变,按语义升版并已在 KV 重新发布)。

顺带:
- 新增 tools/e2e-site.mjs:带 CSP 真站端到端(真 KV + 浏览器 SRI + 漂浮菜单 →
  编辑器 → 覆盖/新建)。开发用,不进 CI(CI 仍只跑 npm run validate)。
- README:写清唯一的移植改动与原因;发布段补实测踩到的坑——发布器用传入文件
  「重建」清单,必须把所有插件文件一起传,否则别的插件会被挤掉。
2026-10-19 14:13:44 +08:00

12 lines
295 B
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"name": "@iwb-plugin/image-annotate",
"private": true,
"version": "1.0.1",
"description": "IWB 插件:图片标注 / 修图(编辑器移植自 iwb-plaus 扩展,纯 Canvas 2D)",
"ibwPlugin": {
"id": "image-annotate",
"entry": "src/index.js",
"apiVersion": 1
}
}