@iasiv5/dsh-obmc-web 0.1.4 → 0.1.6

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
@@ -1,7 +1,7 @@
1
1
  # @iasiv5/dsh-obmc-web
2
2
 
3
3
  在 DSH GUI 里使用 **BMC Web UI**(OpenBMC / bmcweb,AST2700 EVB 实测;
4
- 插件本体于 DSH Web `0.1.7-rc.2` 实测)。
4
+ 插件本体于 DSH Web `0.1.7-rc.2` 与 `0.2.1-rc.2` 实测)。
5
5
  host 半身在 DSH web 服务器的 GUI origin 上注册一组同源代理路由,经
6
6
  `obmc-web-relay.service`(SSH 本地转发,仅绑 `127.0.0.1`,端口默认
7
7
  18443、被占自动顺延)抵达 BMC;client 半身仿照 dsh-surf,在「设置」
@@ -44,6 +44,20 @@ hash 模式,因此挂在 `/bmc` 前缀下不会与 SPA 内部导航冲突。DS
44
44
  按「精确表优先、前缀最长者胜」分发,GUI 自身的路由永远优先;重复注册只
45
45
  跳过、不会让插件失败。
46
46
 
47
+ ## DSH 版本兼容
48
+
49
+ - **版本门槛**:`0.2.1` 及以上宿主需 **≥0.1.4**——0.2.1 起宿主移除 `webRuntime`
50
+ 服务(改名 `webStartup`),0.1.0–0.1.3 在其上会静默失效(插件 pending、路由 404)。
51
+ ≥0.1.4 采用非抛双服务解析(`webStartup` → `webRuntime` → `[]`),在
52
+ `0.1.x`–`0.2.1-rc.x` 宿主全线可用。本包不声明 `@deepseek-ai/dsh` 家族
53
+ peer,宿主版本守卫对其不设门槛,兼容范围以本节与市场文案为准。
54
+ - **依赖的宿主契约面**:`webServer.register/registerUpgrade`(exact/prefix、
55
+ 最长前缀分发)、客户端 `settings.section` slot、`slots` 客户端服务、
56
+ `window.__ModuleLoader__` 启动契约。配置走自有 `/bmc-config` 路由持久化,
57
+ 不触宿主 settings/credentials。
58
+ - **失效模式**:契约若在后续宿主版本变更,症状为设置面板消失(客户端 console
59
+ 报错)或路由 404,不会损坏宿主、不会无声改写数据。
60
+
47
61
  ## 安装
48
62
 
49
63
  ```bash
@@ -157,3 +171,12 @@ bootstrap),地址仍会写入配置并提示下一步去点「安装并启
157
171
  ## License
158
172
 
159
173
  [MIT](./LICENSE)
174
+
175
+ ## Trademarks
176
+
177
+ `icon.svg` 复用 OpenBMC 项目的官方 logo(圆形徽记,去除字标)。OpenBMC 及其
178
+ logo 版权归 OpenBMC community 所有,以
179
+ [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) 发布(来源:
180
+ [openbmc/webui-vue](https://github.com/openbmc/webui-vue))。此处使用仅用于
181
+ 标识与本插件所对接的 OpenBMC 生态的兼容性,不构成 OpenBMC 项目对本插件的
182
+ 背书;OpenBMC 相关名称与标识的权利归属其各自所有者。
package/icon.svg ADDED
@@ -0,0 +1,19 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="12.2 -25.4 215 215" role="img" aria-label="dsh-obmc-web">
2
+ <!-- dsh-obmc-web:直接复用 OpenBMC 官方 logo 的圆形徽记本体(去除字标与注册商标符号)。
3
+ 来源:https://github.com/openbmc/webui-vue (docs/.vuepress/public/openbmc-logo.svg)
4
+ Copyright © OpenBMC community,Apache License 2.0(https://www.apache.org/licenses/LICENSE-2.0)。
5
+ 路径与渐变未做任何修改;仅通过 viewBox 留白把徽记视觉直径校准到 ≈27.5/36,
6
+ 与 onetree-log(27.1)、quota-watch(26.6)等圆形图标一致。原版全量存档:./reference/openbmc-logo.svg -->
7
+ <title>OpenBMC</title>
8
+ <defs>
9
+ <style>.cls-2{fill:url(#linear-gradient);}.cls-3{fill:url(#linear-gradient-2);}.cls-4{fill:url(#linear-gradient-3);}.cls-5{fill:url(#linear-gradient-4);}</style>
10
+ <linearGradient id="linear-gradient" x1="82.9" y1="11.55" x2="82.9" y2="154.54" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#00b0da"/><stop offset="1" stop-color="#008abf"/></linearGradient>
11
+ <linearGradient id="linear-gradient-2" x1="81.55" y1="27.55" x2="81.55" y2="158.66" xlink:href="#linear-gradient"/>
12
+ <linearGradient id="linear-gradient-3" x1="156.66" y1="51.54" x2="156.66" y2="154.8" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#a5d440"/><stop offset="1" stop-color="#8cce3f"/></linearGradient>
13
+ <linearGradient id="linear-gradient-4" x1="158.41" y1="51.54" x2="158.41" y2="154.8" xlink:href="#linear-gradient-3"/>
14
+ </defs>
15
+ <path class="cls-2" d="M65.85,81.86a53.68,53.68,0,0,0,11.61,33.41c-.1.29-.15.6-.22.9a10.81,10.81,0,0,0-.34,2.57,11,11,0,1,0,11-11,10.75,10.75,0,0,0-1.2.07c-.31,0-.61.08-.91.13A42.82,42.82,0,0,1,99.95,43.86h0V2.07l-.77.21q-3.63.94-7.12,2.2c-1.29.47-2.58,1-3.84,1.48h0V38.19l-.13.1A53.79,53.79,0,0,0,65.85,81.86Z"/>
16
+ <path class="cls-3" d="M120.28,96.58a14.54,14.54,0,0,1-14.55-14.37H93.59v0a26.29,26.29,0,0,0,21,25.65v45.35A71.13,71.13,0,0,1,63.9,38.1c.31.06.63.1,1,.13s.64,0,1,0a10.83,10.83,0,1,0-10.25-7.41,82.23,82.23,0,0,0,64.18,133.6c1.41,0,2.81-.06,4.2-.14l1.63-.09h0V95.57A14.47,14.47,0,0,1,120.28,96.58Z"/>
17
+ <path class="cls-4" d="M171.95,68.54a53.78,53.78,0,0,0-9.85-19.71,11.31,11.31,0,0,0,.32-1.3,10.78,10.78,0,0,0,.24-2.17,11,11,0,1,0-8.89,10.8,42.83,42.83,0,0,1-14.17,64.08V162c1.08-.27,2.14-.56,3.2-.87a82.35,82.35,0,0,0,8.53-3V125.91a53.91,53.91,0,0,0,20.6-57.37Z"/>
18
+ <path class="cls-5" d="M184.63,132.75A82.21,82.21,0,0,0,119.79,0c-1.64,0-3.26.06-4.87.16h-.11V68.55h0A14.53,14.53,0,0,1,120,67.48h.27A14.56,14.56,0,0,1,134.87,82s0,.07,0,.11,0,.08,0,.13h11.08A26.21,26.21,0,0,0,125.81,56.8V11.3A71.14,71.14,0,0,1,176,125.83h-.07a11,11,0,0,0-12.58,10.88,11,11,0,0,0,11,11h0a11,11,0,0,0,10.54-14.13C184.82,133.3,184.73,133,184.63,132.75Z"/>
19
+ </svg>
package/lib/index.js CHANGED
@@ -59,7 +59,7 @@ import os from 'node:os'
59
59
  import path from 'node:path'
60
60
 
61
61
  export const name = '@iasiv5/dsh-obmc-web'
62
- export const inject = ['webServer'] /* LOCAL-PATCH 2026-10-18 (know-how 035): 0.2.1 host removed webRuntime (→webStartup); trusted-hosts now resolved per-request via non-throwing dual-service fallback */
62
+ export const inject = ['webServer'] /* compat (know-how 035, shipped since 0.1.4): 0.2.1 host removed webRuntime (→webStartup); trusted-hosts now resolved per-request via non-throwing dual-service fallback */
63
63
 
64
64
  const UP_HOST = '127.0.0.1'
65
65
  const DEFAULT_RELAY_PORT = 18443
@@ -731,7 +731,7 @@ export function apply(ctx) {
731
731
  if (createdTemplate) ctx.logger?.info?.(`[dsh-obmc-web] first start: wrote a commented config template to ${ENV_FILE} — configure it in Settings → BMC 控制台`)
732
732
  Object.assign(envConfig, readEnvConfig())
733
733
  bmcState.target = envConfig.bmcTarget
734
- /* LOCAL-PATCH 2026-10-18 (know-how 035): was `ctx.webRuntime?.trustedHosts` (0.2.1 host removed webRuntime; cordis Local throws on un-injected property access, `?.` cannot protect). 034 pattern: non-throwing ctx.get lookup, webStartup (0.2.1+) → webRuntime (≤0.2.0) → []. */
734
+ /* compat (know-how 035, shipped since 0.1.4): was `ctx.webRuntime?.trustedHosts` (0.2.1 host removed webRuntime; cordis Local throws on un-injected property access, `?.` cannot protect). 034 pattern: non-throwing ctx.get lookup, webStartup (0.2.1+) → webRuntime (≤0.2.0) → []. */
735
735
  const resolveTrustedHosts = () => {
736
736
  let startup, runtime
737
737
  try { startup = ctx?.get?.('webStartup') } catch {}
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@iasiv5/dsh-obmc-web",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "OpenBMC 控制台入口:设置一级菜单「BMC 控制台」面板一键在顶层标签页打开 BMC Web UI,同源代理经 SSH 本地转发 relay(obmc-web-relay)抵达 BMC,BMC IP 变化自动探测并重定向隧道;需 SSH 跳板机可达 BMC。",
5
+ "icon": "./icon.svg",
5
6
  "type": "module",
6
7
  "main": "./lib/index.js",
7
8
  "exports": {
@@ -14,7 +15,8 @@
14
15
  "cordis.patch.yml",
15
16
  "deploy/",
16
17
  "README.md",
17
- "LICENSE"
18
+ "LICENSE",
19
+ "icon.svg"
18
20
  ],
19
21
  "license": "MIT",
20
22
  "author": "iasiv5",