dsh-plugin-wallpaper-engine-about-notice 1.4.0 → 1.4.1

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/lib/index.js CHANGED
@@ -82,7 +82,7 @@ export function applyImpl(root, _rawConfig, c) {
82
82
  const { base, pluginName, repoSlugFromPkg, pluginDataDir, componentViewFrom, createComponentSession } = c;
83
83
  // 两条装载路径都能这么读:① 组件行自己声明了 `inject = ['webServer', 'wallpaperEngineHost']`;② 门面路径的 `root`
84
84
  // 就是门面的 ctx,而门面同样声明了 `inject = ['webServer']`(主行 `lib/index.js` 的 `inject` 声明)。
85
- const webServer = root && root.webServer;
85
+ const webServer = keys.tolerantWebServer(root && root.webServer);
86
86
  // 与门面 `apply()` 同款早退:服务在、但 register 面还没挂上(或换成了别的 webServer 实现)。
87
87
  if (!webServer || typeof webServer.register !== 'function') return () => {};
88
88
 
@@ -102,7 +102,7 @@ export function applyImpl(root, _rawConfig, c) {
102
102
  // 立刻撞 `webserver: duplicate … route`。收尾失败不掩盖原始错误:teardown 自己吞异常,
103
103
  // 原错照抛(装载失败必须仍然是红的)。
104
104
  try {
105
- // 「关于」页签的仓库 star 数 → lib/routes/github-stars.js。**只读**一条腿:本插件唯一一处
105
+ // 「关于」页签的仓库 star 数 → packages/about-notice/lib/routes/github-stars.js。**只读**一条腿:本插件唯一一处
106
106
  // 出站请求(api.github.com),带 10 分钟 TTL + 落盘缓存兜底;一键 star 不做(GitHub 要点星
107
107
  // 必须有用户凭据,插件不存任何 token)。
108
108
  registerGithubStarsRoutes(webServer, {
@@ -111,7 +111,7 @@ export function applyImpl(root, _rawConfig, c) {
111
111
  log, http: keys.http,
112
112
  });
113
113
 
114
- // 「关于」页签的两张联系方式二维码(静态 PNG,白名单直出)→ lib/routes/about-qr.js。
114
+ // 「关于」页签的两张联系方式二维码(静态 PNG,白名单直出)→ packages/about-notice/lib/routes/about-qr.js。
115
115
  registerAboutQrRoutes(webServer, { ...keys, disposers, base, aboutDir: ABOUT_DIR, serveFile });
116
116
  } catch (error) {
117
117
  teardown();
@@ -54,7 +54,7 @@ function aboutQrFile(name, aboutDir) {
54
54
  // **实测(CI windows-latest)**:前缀写法在 Windows 上必然判 null ——
55
55
  // `resolve()` 产出的是反斜杠路径,而前缀拼的是正斜杠 ⇒ 连白名单命中的图都 404
56
56
  // (本机 macOS 全绿、CI 红,症状就是这个)。
57
- // 这条判据与 lib/routes/fontsets.js 的 `insideDir`、lib/upload-store.js 的 `resolveUploadFile`
57
+ // 这条判据与 packages/fonts/lib/routes/fontsets.js 的 `insideDir`、lib/upload-store.js 的 `resolveUploadFile`
58
58
  // **逐字同一条**。
59
59
  const rel = relative(dir, abs);
60
60
  return rel && !rel.startsWith('..') && !isAbsolute(rel) ? abs : null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-plugin-wallpaper-engine-about-notice",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "description": "About tab host half: repo star count (/star-count) and the two contact QR images (/about-qr).",
5
5
  "icon": "./icon.png",
6
6
  "type": "module",