feat(plugin): 插件数据层 M2 —— ctx.data(原子写 + 串行队列 + 旧数据迁移)v3.25.42
- 新增 src/plugin-data.js:read/write/patch/remove/size;桌面落 plugin-data/<id>.json(tmp+rename), 同一插件读写串行排队,maxBytes 上限(默认 2MiB/最高 16MiB)超限抛错且不破坏已有数据 - storage-file 增加 pluginData 命名空间(read/write/remove/list) - stripLegacy:宿主 init 前同步暂存 iwb_plugins[id].data,插件首次 read 时落盘并清暂存 - 备份携带 items.pluginData 并支持恢复;存储体检显示「插件数据 N 个 / X KB」 - 非桌面环境走 IWBStorageLocal 门面 → 内存兜底(仅测试) - 新增 tests/plugin-data-test.js(串行/上限/迁移/备份)
This commit is contained in:
1 parent
07d1715993
commit
7b1164febb
18 files changed
+424
-15
No files matched your search
@@ -77,6 +77,7 @@ const sourceModules = [
|
||||
'gallery-query.js',
|
||||
'gallery-hydration.js',
|
||||
'ui-components.js',
|
||||
'plugin-data.js',
|
||||
'plugin-host.js',
|
||||
'image-compress.js',
|
||||
'storage-fallback-indexeddb.js',
|
||||
|
||||
Reference in new issue
Block a user