@noob-stupid/dsh-plugin-console 0.3.50 → 0.3.51

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/README.md CHANGED
@@ -308,7 +308,7 @@ MIT
308
308
 
309
309
  The layered-refactor preview lives in its **own repository**: [**`Noob-stupid/dsh-plugin-hub-refactor`**](https://github.com/Noob-stupid/dsh-plugin-hub-refactor)
310
310
 
311
- - **What it is**: the monolithic `lib/index.js` (7637 lines) split into layers — `lib/index.js` **142 lines** + `lib/server/**` **36 modules**; **feature-equivalent to `0.3.50`**, maintainability only;
311
+ - **What it is**: the monolithic `lib/index.js` (7637 lines) split into layers — `lib/index.js` **142 lines** + `lib/server/**` **36 modules**; **feature-equivalent to `0.3.51`**, maintainability only;
312
312
  - **Verified**: 18 test suites green · 8 architecture-guard assertions · **47/47 routes identical** (`status` + response fields) against the stable build;
313
313
  - **Not yet exercised**: real framework upgrade / rollback, restart guardian, real install/uninstall, component start/stop, real AI run, Gitee OAuth (~10–25% long-tail risk, subjective);
314
- - **For everyday use** stick to npm `@noob-stupid/dsh-plugin-console@0.3.50`, or `main` of this repo.
314
+ - **For everyday use** stick to npm `@noob-stupid/dsh-plugin-console@0.3.51`, or `main` of this repo.
package/README.zh.md CHANGED
@@ -275,8 +275,8 @@ MIT
275
275
 
276
276
  分层重构预览线在**独立仓库**:[**`Noob-stupid/dsh-plugin-hub-refactor`**](https://github.com/Noob-stupid/dsh-plugin-hub-refactor)
277
277
 
278
- - **它是什么**:把单体 `lib/index.js`(7637 行)拆成分层结构 —— `lib/index.js` **142 行** + `lib/server/**` **36 个模块**,**功能与 `0.3.50` 等价**,只为可维护性;
278
+ - **它是什么**:把单体 `lib/index.js`(7637 行)拆成分层结构 —— `lib/index.js` **142 行** + `lib/server/**` **36 个模块**,**功能与 `0.3.51` 等价**,只为可维护性;
279
279
  - **已验证**:18 套测试全绿 · 8 条架构守卫断言 · 与稳定版逐条对打 **47 条路由,`status` + 响应字段 47/47 一致**;
280
280
  - **尚未实测**:真框架升级 / 真回滚、重启守护链路、真装真卸、组件进程启停、AI 真跑、Gitee OAuth 回调(长尾风险主观估计 **10%~25%**);
281
- - **日常使用请继续用**:npm `@noob-stupid/dsh-plugin-console@0.3.50`,或本仓库 `main`。
281
+ - **日常使用请继续用**:npm `@noob-stupid/dsh-plugin-console@0.3.51`,或本仓库 `main`。
282
282
  - 请多反馈问题
package/lib/index.js CHANGED
@@ -6270,13 +6270,15 @@ async function handle(ctx, req, res) {
6270
6270
  }
6271
6271
  let lastError = null
6272
6272
  let formatError = null
6273
- // 总预算:索引源扩容到 5 个后,逐个 15s 最坏要等 75s(用户只会看到"市场一直转圈")。
6274
- // 单源 8s + 整体 20s 封顶,超预算立刻进入落盘缓存兜底。
6275
- const deadline = Date.now() + 20000
6273
+ // 总预算:索引源扩容到 5 个后必须封顶,否则用户只会看到"市场一直转圈"。
6274
+ // 实测(2026-09-20):fetchJsonUrl 内部是「curl 一次 + node:https 兜底(默认 20s 超时)」,
6275
+ // 单个源最坏要 ~28s,5 个源曾实测到 **65s** 才回退到落盘缓存。
6276
+ // 这里改为**每源单次 curl**(curlJson,8s 硬超时)+ 整体 12s 预算 → 最坏 ≈ 20s,常见 <1s。
6277
+ const deadline = Date.now() + 12000
6276
6278
  for (const src of indexList) {
6277
6279
  if (Date.now() > deadline) break
6278
6280
  try {
6279
- const data = await fetchJsonUrl(src.url, 8000)
6281
+ const data = await curlJson(src.url, 8000)
6280
6282
  if (data && Array.isArray(data.items)) {
6281
6283
  marketIndexCache = { at: Date.now(), data, sourceName: src.name }
6282
6284
  try { await writeFile(MARKET_INDEX_CACHE_FILE, JSON.stringify({ at: Date.now(), data, sourceName: src.name }), 'utf8') } catch {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@noob-stupid/dsh-plugin-console",
3
- "version": "0.3.50",
3
+ "version": "0.3.51",
4
4
  "description": "DSH plugin management panel & marketplace: one-click enable/disable, multi-source market (GitHub/Gitee/custom), static-index market (500+ plugins / 300 skills), skills, suites, and one-click framework upgrade.",
5
5
  "repository": {
6
6
  "type": "git",