koishi-plugin-market-next 3.3.1 → 3.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +75 -0
- package/README.md +51 -2
- package/dist/index.js +3 -2
- package/dist/style.css +1 -1
- package/lib/browser/index.mjs +1 -1
- package/lib/browser/index.mjs.map +2 -2
- package/lib/node/deps.d.ts +7 -1
- package/lib/node/index.d.ts +3 -2
- package/lib/node/index.js +420 -61
- package/lib/node/index.js.map +3 -3
- package/lib/node/installer.d.ts +17 -1
- package/lib/node/market.d.ts +33 -1
- package/lib/shared/index.d.ts +14 -0
- package/lib/shared/index.js +1 -1
- package/lib/shared/index.js.map +2 -2
- package/lib/shared/index.mjs +1 -1
- package/lib/shared/index.mjs.map +2 -2
- package/package.json +3 -2
- package/src/node/deps.ts +12 -1
- package/src/node/index.ts +14 -6
- package/src/node/installer.ts +171 -13
- package/src/node/locales/schema.de-DE.yml +3 -0
- package/src/node/locales/schema.en-US.yml +3 -0
- package/src/node/locales/schema.fr-FR.yml +3 -0
- package/src/node/locales/schema.ja-JP.yml +3 -0
- package/src/node/locales/schema.ru-RU.yml +3 -0
- package/src/node/locales/schema.zh-CN.yml +3 -0
- package/src/node/locales/schema.zh-TW.yml +3 -0
- package/src/node/market.ts +247 -32
- package/src/shared/index.ts +16 -1
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
本文件记录 `koishi-plugin-market-next` 已发布到 npm 的版本差异。
|
|
4
|
+
|
|
5
|
+
## 3.3.4
|
|
6
|
+
|
|
7
|
+
- 依赖版本获取新增 loading/error 状态,避免请求中误显示“版本获取失败”。
|
|
8
|
+
- npm registry 版本元数据获取增加备用源自动路由、失败重试和批量并发限制。
|
|
9
|
+
- 自动路由镜像列表参考 Koishi 论坛镜像一览,并按实测可用性补充 Gitee 聚合、itzdrli 备用、腾讯 npm、cnpm 等源。
|
|
10
|
+
- 依赖页和安装弹窗会区分超时、网络失败、镜像未同步、元数据异常等原因。
|
|
11
|
+
- 手动刷新会重新读取本地 `package.json`,清理旧版本请求状态,并重新同步依赖、版本和插件状态。
|
|
12
|
+
|
|
13
|
+
## 3.3.2
|
|
14
|
+
|
|
15
|
+
- 增加本地市场索引缓存优先显示,打开市场时可先显示旧数据并在后台刷新。
|
|
16
|
+
- 使用缓存或旧 payload 时,在市场页面内显示固定提示,而不是只依赖临时消息。
|
|
17
|
+
- 自动路由改为并发竞速,当前源和备用源同时尝试,优先使用最快返回的有效市场索引。
|
|
18
|
+
- 市场列表加入虚拟滚动窗口,减少大量插件卡片同时渲染造成的前端卡顿。
|
|
19
|
+
- 修复插件 reload / dispose 后旧请求继续写回导致的 `context disposed`、`cannot create effect on inactive context`。
|
|
20
|
+
- 修复依赖页空对象访问导致的 `Cannot convert undefined or null to object`。
|
|
21
|
+
- 扩展 debug 日志,输出 endpoint、耗时、fallback、缓存、patch 进度等关键链路。
|
|
22
|
+
- 将缓存写盘移出关键刷新路径,减少 `JSON.stringify` 和文件写入阻塞市场返回。
|
|
23
|
+
- 将列表过滤/排序从渲染 computed 改为调度更新,降低同一轮渲染中的同步压力。
|
|
24
|
+
|
|
25
|
+
## 3.3.1
|
|
26
|
+
|
|
27
|
+
- 新增市场搜索输入防抖,降低输入时的前端重算频率。
|
|
28
|
+
- 新增 `search.logLevel` 多级日志配置:`silent`、`error`、`warn`、`info`、`debug`。
|
|
29
|
+
- 新增 `search.autoRoute` 开关,可关闭备用市场源自动回退。
|
|
30
|
+
- 修复刷新按钮反馈不清晰的问题,刷新时显示 loading,完成后显示成功或失败结果。
|
|
31
|
+
- 修复市场加载失败时错误原因不清楚的问题。
|
|
32
|
+
|
|
33
|
+
## 3.3.0
|
|
34
|
+
|
|
35
|
+
- 默认市场源改为 `https://registry.koishi.t4wefan.pub/index.json`。
|
|
36
|
+
- 优化市场打开速度,市场索引加载不再被依赖刷新阻塞。
|
|
37
|
+
- 新增 ChatLuna 只读市场查询工具 `koishi_plugin_market_search`,可按关键词、分类、状态、时间范围、评分、下载量等条件查询插件。
|
|
38
|
+
- 安装插件后自动尝试补充 config 插件配置节点,减少安装后手动进入依赖页配置的步骤。
|
|
39
|
+
- 插件 homepage / repository 链接优先关联 GitHub 仓库。
|
|
40
|
+
- 修复分类筛选再次点击无法取消、搜索变化后分页停在空页等交互问题。
|
|
41
|
+
|
|
42
|
+
## 3.2.1
|
|
43
|
+
|
|
44
|
+
- 修复安装后插件配置入口同步不完整的问题。
|
|
45
|
+
- 优化插件 homepage / repository 链接展示。
|
|
46
|
+
- 更新 README,突出 market-next 相比原始 market 的体验改进。
|
|
47
|
+
|
|
48
|
+
## 3.2.0
|
|
49
|
+
|
|
50
|
+
- 内置 ChatLuna 插件市场查询 Tool,可通过配置开关启用。
|
|
51
|
+
- Tool 使用当前 market 搜索配置,只读查询市场索引,不安装、不卸载、不写配置。
|
|
52
|
+
- 新增 10 分钟进程内缓存;请求失败但已有缓存时返回 stale 结果。
|
|
53
|
+
- 新增 `@langchain/core`、`zod` 依赖和可选 peer `koishi-plugin-chatluna`。
|
|
54
|
+
|
|
55
|
+
## 3.0.1
|
|
56
|
+
|
|
57
|
+
- 将版本从 3.0.0 升级为 3.0.1。
|
|
58
|
+
- 继续修复刷新按钮无反馈、市场加载失败提示不明确等初版问题。
|
|
59
|
+
|
|
60
|
+
## 3.0.0
|
|
61
|
+
|
|
62
|
+
- 基于 Koishi 原始 market 做 next 分支。
|
|
63
|
+
- 保留原有 `market/refresh`、`market/install`、`market/registry`、`market/package` 事件兼容。
|
|
64
|
+
- 默认使用 t4wefan 市场索引源。
|
|
65
|
+
- 改进刷新、搜索、筛选、依赖管理和安装配置体验。
|
|
66
|
+
|
|
67
|
+
## 2.11.12
|
|
68
|
+
|
|
69
|
+
- npm 历史兼容版本。
|
|
70
|
+
- 该版本早于 market-next 3.x 重构,本仓库不维护完整变更记录。
|
|
71
|
+
|
|
72
|
+
## 2.11.11
|
|
73
|
+
|
|
74
|
+
- npm 历史兼容版本。
|
|
75
|
+
- 该版本早于 market-next 3.x 重构,本仓库不维护完整变更记录。
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# koishi-plugin-market-next
|
|
2
2
|
|
|
3
|
-

|
|
4
4
|

|
|
5
5
|

|
|
6
6
|

|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
- [常见问题](#常见问题)
|
|
21
21
|
- [开发](#开发)
|
|
22
22
|
- [发布包内容](#发布包内容)
|
|
23
|
+
- [版本更新](#版本更新)
|
|
23
24
|
- [许可证](#许可证)
|
|
24
25
|
|
|
25
26
|
## Next 优势
|
|
@@ -82,6 +83,10 @@ plugins:
|
|
|
82
83
|
timeout: 30s
|
|
83
84
|
autoRoute: true
|
|
84
85
|
logLevel: warn
|
|
86
|
+
registry:
|
|
87
|
+
autoRoute: true
|
|
88
|
+
retry: 1
|
|
89
|
+
concurrency: 4
|
|
85
90
|
chatlunaTool: false
|
|
86
91
|
```
|
|
87
92
|
|
|
@@ -89,6 +94,9 @@ plugins:
|
|
|
89
94
|
| --- | --- | --- |
|
|
90
95
|
| `registry.endpoint` | 跟随当前 npm 配置 | 安装插件时使用的软件源。 |
|
|
91
96
|
| `registry.timeout` | `5s` | 获取 npm 包元数据的超时时间。 |
|
|
97
|
+
| `registry.autoRoute` | `true` | 获取依赖版本失败时是否自动尝试备用 npm 源。 |
|
|
98
|
+
| `registry.retry` | `1` | 每个 npm 源获取版本失败后的重试次数。 |
|
|
99
|
+
| `registry.concurrency` | `4` | 批量获取依赖版本时的最大并发数。 |
|
|
92
100
|
| `search.endpoint` | `https://registry.koishi.t4wefan.pub/index.json` | 插件市场索引地址。 |
|
|
93
101
|
| `search.timeout` | `30s` | 获取市场索引的超时时间。 |
|
|
94
102
|
| `search.proxyAgent` | 空 | 请求市场索引时使用的代理。 |
|
|
@@ -109,12 +117,25 @@ plugins:
|
|
|
109
117
|
|
|
110
118
|
- `search.endpoint` 决定市场页面和 ChatLuna Tool 从哪里读取插件列表。
|
|
111
119
|
- `registry.endpoint` 决定安装、更新插件时从哪个 npm registry 下载包。
|
|
120
|
+
- `registry.autoRoute` 只影响 npm 包元数据和依赖版本获取;`search.autoRoute` 只影响市场索引获取。
|
|
112
121
|
|
|
113
122
|
当 `search.endpoint` 获取失败时,`market-next` 会自动尝试以下市场索引,不会把 fallback 写入你的配置文件:
|
|
114
123
|
|
|
115
124
|
- `https://registry.koishi.t4wefan.pub/index.json`
|
|
125
|
+
- `https://gitee.com/shangxueink/koishi-registry-aggregator/raw/gh-pages/market.json`
|
|
116
126
|
- `https://koi.nyan.zone/registry/index.json`
|
|
117
127
|
- `https://kp.itzdrli.cc`
|
|
128
|
+
- `https://koishi.itzdrli.cc`
|
|
129
|
+
- `https://registry.koishi.chat/index.json`
|
|
130
|
+
|
|
131
|
+
当 `registry.endpoint` 获取 npm 包元数据失败时,`registry.autoRoute` 会尝试以下 npm 源:
|
|
132
|
+
|
|
133
|
+
- `https://registry.npmmirror.com`
|
|
134
|
+
- `https://mirrors.cloud.tencent.com/npm`
|
|
135
|
+
- `https://registry.npmjs.org`
|
|
136
|
+
- `https://r.cnpmjs.org`
|
|
137
|
+
|
|
138
|
+
更多社区镜像可参考 [Koishi 论坛镜像一览](https://forum.koishi.xyz/t/topic/4000)。
|
|
118
139
|
|
|
119
140
|
测试单一市场源时可以关闭自动路由:
|
|
120
141
|
|
|
@@ -229,7 +250,7 @@ plugins:
|
|
|
229
250
|
|
|
230
251
|
### 刷新 WebUI 后市场才显示
|
|
231
252
|
|
|
232
|
-
这通常表示后端已经拿到市场索引,但第一次 Console
|
|
253
|
+
这通常表示后端已经拿到市场索引,但第一次 Console 连接时数据没有及时同步到前端,或者依赖刷新、前端过滤占用了较长时间。`3.3.4` 会优先返回缓存或市场索引,并在当前源失败时尝试备用源;手动刷新时也会重新读取本地 `package.json` 并清理旧的依赖版本请求状态。
|
|
233
254
|
|
|
234
255
|
### 网络正常但显示 failed to fetch
|
|
235
256
|
|
|
@@ -295,6 +316,34 @@ lib/ 后端与类型构建产物
|
|
|
295
316
|
|
|
296
317
|
同时 npm 会自动包含 `package.json`、`README.md` 和许可证信息。
|
|
297
318
|
|
|
319
|
+
## 版本更新
|
|
320
|
+
|
|
321
|
+
### 3.3.4
|
|
322
|
+
|
|
323
|
+
- 依赖版本获取新增 loading/error 状态,避免请求中误显示“版本获取失败”。
|
|
324
|
+
- npm registry 版本元数据获取增加备用源自动路由、失败重试和批量并发限制。
|
|
325
|
+
- 自动路由镜像列表参考 Koishi 论坛镜像一览,并按实测可用性补充 Gitee 聚合、itzdrli 备用、腾讯 npm、cnpm 等源。
|
|
326
|
+
- 依赖页和安装弹窗会区分超时、网络失败、镜像未同步、元数据异常等原因。
|
|
327
|
+
- 手动刷新会重新读取本地 `package.json`,清理旧版本请求状态,并重新同步依赖、版本和插件状态。
|
|
328
|
+
|
|
329
|
+
### 3.3.2
|
|
330
|
+
|
|
331
|
+
- 增加本地市场索引缓存优先显示,打开市场时可先显示旧数据并在后台刷新。
|
|
332
|
+
- 使用缓存或旧 payload 时,在市场页面内显示固定提示。
|
|
333
|
+
- 自动路由改为并发竞速,当前源和备用源同时尝试,优先使用最快返回的有效市场索引。
|
|
334
|
+
- 市场列表加入虚拟滚动窗口,减少大量插件卡片同时渲染造成的前端卡顿。
|
|
335
|
+
- 修复插件 reload / dispose 后旧请求继续写回导致的上下文错误。
|
|
336
|
+
- 扩展 debug 日志,输出 endpoint、耗时、fallback、缓存、patch 进度等关键链路。
|
|
337
|
+
|
|
338
|
+
### 3.3.1
|
|
339
|
+
|
|
340
|
+
- 新增市场搜索输入防抖,降低输入时的前端重算频率。
|
|
341
|
+
- 新增 `search.logLevel` 多级日志配置。
|
|
342
|
+
- 新增 `search.autoRoute` 开关,可关闭备用市场源自动回退。
|
|
343
|
+
- 修复刷新按钮反馈不清晰的问题。
|
|
344
|
+
|
|
345
|
+
完整历史记录见 [CHANGELOG.md](./CHANGELOG.md)。
|
|
346
|
+
|
|
298
347
|
## 许可证
|
|
299
348
|
|
|
300
349
|
AGPL-3.0
|