fix(image-annotate): v1.8.1 修复 SRI 加载失败(发布改内容寻址文件名)
线上报「脚本完整性校验失败(integrity 不符或加载失败)」,插件不可用。 根因不在插件代码,在发布通道:scripts/plugins-publish.sh 用固定名 plugin-image-annotate.js,而清单 integrity 随内容每次变化。客户端只要留着 旧字节(浏览器磁盘/内存缓存、中间代理),新 integrity 就对不上,SRI 判失败。 no-cache + ETag 只是「可缓存但须回源校验」,管不住已到手的旧副本。 实测服务器端三处一致(清单 integrity = 线上字节 = 本地字节,355289 B), 证明问题完全在客户端拿到的那份。 修法(宿主仓同步改 scripts/plugins-publish.sh):文件名改为内容寻址 plugin-<id>.<sha256前12位>.js,与 plugins-publish.mjs 的 storedNameOf 对齐。 内容变 ⇒ 名变 ⇒ 新版本必然是新 URL,SRI 必中;同时命中 Functions 的 IMMUTABLE_JS_RE,拿到 public, max-age=31536000, immutable。 插件本体与 1.8.0 逐字相同,产物仅 manifest 版本号不同。 验证:harness 139 项全通、validate 9/9、产物 355289 B。
This commit is contained in:
1 parent
3819048e54
commit
fccb9ae69e
3 files changed
+18
-2
No files matched your search
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@iwb-plugin/image-annotate",
|
||||
"private": true,
|
||||
"version": "1.8.0",
|
||||
"version": "1.8.1",
|
||||
"description": "IWB 插件:图片标注 / 修图(编辑器移植自 iwb-plaus 扩展,纯 Canvas 2D)",
|
||||
"ibwPlugin": {
|
||||
"id": "image-annotate",
|
||||
|
||||
Reference in new issue
Block a user