dsh-plugin 1.6.12 → 2.0.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/README.en.md +13 -13
- package/README.md +13 -13
- package/client/client.js +791 -761
- package/client/client.js.map +1 -1
- package/lib/http/catalog.js +2 -3
- package/lib/http/diagnostics.js +6 -7
- package/lib/http/install.js +47 -213
- package/lib/http/logs.js +1 -2
- package/lib/http/npm-release-age.js +42 -0
- package/lib/http/routes.js +8 -7
- package/lib/http/settings.js +2 -2
- package/lib/http/shared.js +2 -2
- package/lib/http/task.js +1 -2
- package/lib/index.js +5 -6
- package/lib/services/install/install-types.js +4 -4
- package/lib/services/install/install.js +1 -1
- package/lib/services/install/npm-check.js +3 -2
- package/lib/services/install/npm-resolve.js +9 -96
- package/lib/services/install/operation-log.js +53 -1
- package/lib/services/install/package-entry.js +6 -11
- package/lib/services/install/registry-check.js +2 -2
- package/lib/services/install/release-target.js +8 -9
- package/lib/services/install/task-queue.js +44 -48
- package/lib/services/npm-release-age.js +119 -0
- package/lib/services/probe.js +4 -4
- package/lib/services/profile/installed-versions.js +15 -21
- package/lib/services/profile/profile.js +16 -44
- package/lib/services/profile/progress.js +8 -11
- package/lib/services/settings.js +2 -5
- package/lib/types/http/catalog.d.ts +1 -1
- package/lib/types/http/install.d.ts +2 -2
- package/lib/types/http/npm-release-age.d.ts +2 -0
- package/lib/types/http/routes.d.ts +10 -12
- package/lib/types/http/shared.d.ts +5 -6
- package/lib/types/index.d.ts +7 -8
- package/lib/types/services/install/install-types.d.ts +12 -13
- package/lib/types/services/install/install.d.ts +1 -1
- package/lib/types/services/install/npm-resolve.d.ts +4 -16
- package/lib/types/services/install/operation-log.d.ts +9 -0
- package/lib/types/services/install/package-entry.d.ts +6 -11
- package/lib/types/services/install/release-target.d.ts +7 -8
- package/lib/types/services/install/task-queue.d.ts +25 -30
- package/lib/types/services/npm-release-age.d.ts +15 -0
- package/lib/types/services/probe.d.ts +4 -4
- package/lib/types/services/profile/installed-versions.d.ts +5 -7
- package/lib/types/services/profile/profile.d.ts +14 -18
- package/lib/types/services/profile/progress.d.ts +7 -10
- package/lib/types/services/settings.d.ts +0 -4
- package/package.json +1 -1
- package/src/client/components/PluginHubSection.tsx +26 -22
- package/src/client/components/catalog/CatalogList.tsx +2 -4
- package/src/client/components/catalog/PluginCard.tsx +2 -3
- package/src/client/components/layout/CatalogControls.tsx +5 -6
- package/src/client/components/layout/CatalogHeader.tsx +1 -2
- package/src/client/components/layout/CategoryTabs.tsx +2 -3
- package/src/client/components/layout/SectionTabs.tsx +3 -5
- package/src/client/components/modals/ConfirmDialog.tsx +4 -6
- package/src/client/components/modals/InstalledDetailModal.tsx +3 -6
- package/src/client/components/modals/LogsModal.tsx +7 -12
- package/src/client/components/modals/NotificationsModal.tsx +74 -24
- package/src/client/components/modals/ProgressView.tsx +3 -4
- package/src/client/components/modals/modals.tsx +75 -26
- package/src/client/components/ui/Dropdown.tsx +4 -6
- package/src/client/components/ui/Toggle.tsx +2 -3
- package/src/client/components/ui/icons.tsx +1 -2
- package/src/client/components/views/CustomInstallView.tsx +20 -178
- package/src/client/components/views/DiagnosticsView.tsx +3 -6
- package/src/client/components/views/InstalledView.tsx +6 -11
- package/src/client/components/views/MarketView.tsx +2 -4
- package/src/client/components/views/SettingsView.tsx +9 -32
- package/src/client/css-modules.d.ts +1 -1
- package/src/client/data/catalog.ts +2 -3
- package/src/client/data/host.ts +26 -3
- package/src/client/data/hub.ts +2 -3
- package/src/client/hooks/useCatalog.ts +79 -24
- package/src/client/hooks/useIncrementalList.ts +3 -5
- package/src/client/hooks/useLanguage.ts +4 -6
- package/src/client/hooks/useSettings.ts +4 -11
- package/src/client/hooks/useTaskQueue.ts +36 -42
- package/src/client/index.tsx +2 -3
- package/src/client/locales.ts +187 -114
- package/src/client/logic/constants.ts +1 -2
- package/src/client/logic/ensure-plugin-css.ts +8 -12
- package/src/client/logic/failures.ts +20 -19
- package/src/client/logic/format.ts +1 -1
- package/src/client/logic/install-command.ts +14 -35
- package/src/client/logic/installed.ts +15 -10
- package/src/client/logic/normalize.ts +3 -3
- package/src/client/logic/release-age.ts +19 -0
- package/src/client/logic/urls.ts +24 -21
- package/src/client/styles/CustomInstallView.module.css +3 -30
- package/src/client/styles/DiagnosticsView.module.css +3 -5
- package/src/client/styles/Dropdown.module.css +2 -4
- package/src/client/styles/Header.module.css +6 -7
- package/src/client/styles/InstalledView.module.css +4 -7
- package/src/client/styles/List.module.css +4 -5
- package/src/client/styles/LogsView.module.css +2 -3
- package/src/client/styles/Modal.module.css +46 -6
- package/src/client/styles/SectionTabs.module.css +2 -4
- package/src/client/styles/SettingsView.module.css +3 -5
- package/src/client/styles/Toggle.module.css +2 -4
- package/src/client/styles/tokens.module.css +14 -18
- package/src/client/types.ts +11 -11
- package/src/server/http/catalog.ts +2 -3
- package/src/server/http/diagnostics.ts +6 -7
- package/src/server/http/install.ts +47 -208
- package/src/server/http/logs.ts +1 -2
- package/src/server/http/npm-release-age.ts +42 -0
- package/src/server/http/routes.ts +12 -12
- package/src/server/http/settings.ts +2 -2
- package/src/server/http/shared.ts +5 -6
- package/src/server/http/task.ts +1 -2
- package/src/server/index.ts +7 -8
- package/src/server/services/install/install-types.ts +12 -13
- package/src/server/services/install/install.ts +0 -1
- package/src/server/services/install/npm-check.ts +3 -2
- package/src/server/services/install/npm-resolve.ts +9 -99
- package/src/server/services/install/operation-log.ts +47 -1
- package/src/server/services/install/package-entry.ts +6 -11
- package/src/server/services/install/registry-check.ts +2 -2
- package/src/server/services/install/release-target.ts +8 -9
- package/src/server/services/install/task-queue.ts +51 -54
- package/src/server/services/npm-release-age.ts +107 -0
- package/src/server/services/probe.ts +4 -4
- package/src/server/services/profile/installed-versions.ts +16 -22
- package/src/server/services/profile/profile.ts +16 -42
- package/src/server/services/profile/progress.ts +8 -11
- package/src/server/services/settings.ts +2 -9
- package/lib/services/install/preflight.js +0 -178
- package/lib/types/services/install/preflight.d.ts +0 -23
- package/src/server/services/install/preflight.ts +0 -184
package/client/client.js
CHANGED
|
@@ -11,7 +11,7 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
11
11
|
* Website: https://dsh-plugin.org
|
|
12
12
|
* GitHub: https://github.com/dshplugin/dsh-plugin-hub
|
|
13
13
|
*
|
|
14
|
-
* zh/en
|
|
14
|
+
* 插件中心设置板块的 zh/en 字典。
|
|
15
15
|
*/
|
|
16
16
|
const zh = {
|
|
17
17
|
nav: "插件市场",
|
|
@@ -46,34 +46,23 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
46
46
|
viewSettings: "设置",
|
|
47
47
|
viewMarketHint: "浏览与发现插件",
|
|
48
48
|
viewInstalledHint: "管理已安装插件",
|
|
49
|
-
viewCustomHint: "手动安装 NPM
|
|
49
|
+
viewCustomHint: "手动安装 NPM 包",
|
|
50
50
|
viewSettingsHint: "网络通道与偏好设置",
|
|
51
51
|
installedEmpty: "还没有安装插件",
|
|
52
|
-
installedEmptyDesc: "可以去「自定义安装」,手动安装 NPM
|
|
52
|
+
installedEmptyDesc: "可以去「自定义安装」,手动安装 NPM 包",
|
|
53
53
|
npmInstallLabel: "NPM 包 / 命令",
|
|
54
54
|
npmInstallPlaceholder: "npm install <包名> 或直接输包名",
|
|
55
55
|
npmInstallExample: "支持原生命令:npm install lodash、npm i lodash、pnpm add @scope/pkg",
|
|
56
56
|
npmInstallExample2: "全局安装 CLI:npm install -g @scope/cli;或直接输入包名 lodash",
|
|
57
57
|
npmInstallInvalid: "请输入 npm 包名(如 lodash、@scope/pkg),或原生安装命令(如 npm install lodash、npm i lodash、pnpm add @scope/pkg、npm install -g @scope/cli)",
|
|
58
|
-
gitInstallLabel: "GitHub 源码",
|
|
59
|
-
gitInstallPlaceholder: "输入仓库地址",
|
|
60
|
-
gitInstallExample: "例如:owner/repo 或 https://github.com/owner/repo",
|
|
61
|
-
gitInstallInvalid: "请输入 GitHub 仓库地址,例如:owner/repo 或 https://github.com/owner/repo",
|
|
62
|
-
dshCmdLabel: "DeepSeek Harness 命令",
|
|
63
|
-
dshCmdPlaceholder: "粘贴官方 dsh plugin 命令",
|
|
64
|
-
dshCmdInsertHubUpdate: "插入更新命令",
|
|
65
|
-
dshCmdExample: "例如:dsh plugin --profile {profile} add github:owner/repo,或 dsh plugin --profile {profile} update dsh-plugin",
|
|
66
|
-
dshCmdInvalid: "请输入官方 dsh plugin 命令(--profile 必填,支持 add / update)。例如:dsh plugin --profile {profile} update dsh-plugin",
|
|
67
58
|
installHelp: "帮助",
|
|
68
59
|
helpModalTitle: "支持的命令格式",
|
|
69
60
|
npmInstallHelp: "lodash、@scope/pkg 直接输入包名\nnpm install lodash\nnpm i lodash\npnpm add @scope/pkg\npnpm i @scope/pkg\nnpm install -g @scope/cli 全局安装 CLI 工具,不进「已安装」列表",
|
|
70
|
-
gitInstallHelp: "owner/repo\nhttps://github.com/owner/repo\ngithub:owner/repo\ngit+https://github.com/owner/repo.git\ngit@github.com:owner/repo.git",
|
|
71
|
-
dshCmdHelp: "dsh plugin --profile {profile} add <目标> 安装\ndsh plugin --profile {profile} update <目标> 更新已安装目标到最新版本\ndsh plugin --profile={profile} add <目标>\ndsh plugin --profile={profile} update <目标>\n --profile 必填(此处已填当前 profile),官方 CLI 无 -p 简写;<目标> 可为 npm 包名或 github:owner/repo;卸载请用「已安装」列表",
|
|
72
61
|
globalNpmHint: "将全局安装 CLI 工具(npm install -g),不会出现在「已安装」列表,无需重启宿主",
|
|
73
62
|
installCliBtn: "安装",
|
|
74
63
|
channelDisabledHint: "该安装通道已关闭,请在「设置 → 安全信任」中打开开关",
|
|
75
64
|
goToSettings: "前往设置",
|
|
76
|
-
customViewDesc: "手动安装目录外的 NPM
|
|
65
|
+
customViewDesc: "手动安装目录外的 NPM 包。装完的条目会出现在「已安装」列表,并标记为自定义安装。",
|
|
77
66
|
customLabel: "自定义安装",
|
|
78
67
|
installedSearch: "搜索已安装的插件…",
|
|
79
68
|
installedFilterCatalog: "目录插件",
|
|
@@ -125,13 +114,9 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
125
114
|
mirrorTencent: "腾讯云镜像",
|
|
126
115
|
mirrorTsinghua: "清华大学 TUNA 镜像",
|
|
127
116
|
settingsSecurity: "安全信任",
|
|
128
|
-
settingsSecurityDesc: "
|
|
117
|
+
settingsSecurityDesc: "命令行安装的开关:NPM 包",
|
|
129
118
|
settingsEnableNpm: "启用 NPM 安装",
|
|
130
119
|
settingsEnableNpmDesc: "允许通过命令行安装 npm 包;关闭后输入包名安装会被拦截",
|
|
131
|
-
settingsEnableGit: "启用 GitHub 源码安装",
|
|
132
|
-
settingsEnableGitDesc: "允许通过命令行安装 GitHub 源码;关闭后输入仓库地址安装会被拦截",
|
|
133
|
-
settingsEnableDsh: "启用 DSH 命令安装",
|
|
134
|
-
settingsEnableDshDesc: "允许通过命令行粘贴 dsh plugin 命令安装;关闭后命令输入会被禁用",
|
|
135
120
|
settingsDiagnostics: "系统诊断",
|
|
136
121
|
settingsDiagnosticsDesc: "检测 npm 源 / GitHub / 目录站点等安装通道的连通状态",
|
|
137
122
|
settingsLogs: "系统日志",
|
|
@@ -300,11 +285,11 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
300
285
|
failTimeoutHint: "本次操作耗时超过本地上限、已被中断 —— 但很可能其实已经生效了(安装器在超时后会先核对本地已安装列表)。请刷新页面确认当前状态;若确实没生效,可在终端手动执行一次对应命令查看完整输出。这不是插件本身的问题。",
|
|
301
286
|
failProfileLockHint: "DSH 在写入插件清单时等不到文件锁、超时中止 —— 通常是同时有另一个 DSH 进程或安装任务在写同一个 profile(也可能是上一次的进程没退干净留下的锁)。请先关掉其他 dsh 窗口或正在跑的命令,再重试一次;若反复出现,重启一次 DSH。这不是插件本身的问题,也不需要重复{action}。",
|
|
302
287
|
failHostCliSpawnHint: "DSH 没能启动自身来完成这次操作(系统报「找不到可执行文件」):通常是因为 DSH 的安装目录被移动或正在更新,或该 profile 目录还不存在。请重启一次 DSH 后重试;若反复出现,重新安装 DSH。这不是插件本身的问题,换别的插件也一样。",
|
|
303
|
-
failPrepareHint: "该插件安装时的构建脚本执行失败(
|
|
288
|
+
failPrepareHint: "该插件安装时的构建脚本执行失败(npm 分发物不完整),属插件打包分发问题。请向作者仓库提交 Issue 反馈。",
|
|
304
289
|
failMisjudgeHint: "如果这个插件其实能正常安装(上面这个判定是插件中心误报的),请反馈给插件中心:文字提示里的判据由市场自身产出,误报只有靠你的反馈才能被发现。",
|
|
305
290
|
failMisjudgeLink: "插件能装却被拦下?反馈给插件中心",
|
|
306
|
-
failPackagingHint: "
|
|
307
|
-
failIgnoredBuild: "该插件(或其依赖)需要在安装时执行构建脚本,被 pnpm 的安全白名单(allowBuilds)默认拦截,本次操作因此失败(如原生模块 node-pty,或 git 安装时插件自己的 prepare 脚本)。安装器已自动放行该 key
|
|
291
|
+
failPackagingHint: "该插件的 npm 分发物不完整:缺少它需要的文件(`main` / `exports` 声明的入口、补丁按本包名 mount 的入口,或 `dsh.bundle.patch` 声明的补丁)。请到作者仓库提交 Issue 反馈,请其发布包含完整构建产物的 npm 包。",
|
|
292
|
+
failIgnoredBuild: "该插件(或其依赖)需要在安装时执行构建脚本,被 pnpm 的安全白名单(allowBuilds)默认拦截,本次操作因此失败(如原生模块 node-pty,或 git 安装时插件自己的 prepare 脚本)。安装器已自动放行该 key 并重试过一次;仍失败说明构建本身没通过、任何用户都装不上。可先在终端手动执行一次安装命令查看完整构建错误;这属插件的构建/分发问题,请到作者仓库反馈:建议作者预置构建产物、发布含构建产物的 npm 包或提供预构建 .tgz。",
|
|
308
293
|
failNpmTooLow: "怀疑本机 npm 版本过低:npm 解析插件依赖时内部崩溃(这是 npm 自身的已知缺陷,不是插件问题)。请升级 npm 后重试:npm install -g npm@latest",
|
|
309
294
|
failNpmTooLowV: "本机 npm 版本过低(当前 v{v}):npm 解析插件依赖时内部崩溃(这是 npm 自身的已知缺陷,不是插件问题)。请升级 npm 后重试:npm install -g npm@latest",
|
|
310
295
|
failNetworkHint: "{action}前检测到网络不通:无法连接到安装源(可能是断网、DNS 解析失败、被防火墙拦截,或代理配置有问题)。这不是插件本身的问题 —— 请检查网络连接,或到「设置」里确认 HTTP 代理配置,再到「系统诊断」运行一次连通性检测,然后重试。",
|
|
@@ -323,6 +308,61 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
323
308
|
failRegistryMirrorLagHint: "安装器调用 pnpm 时报「包不存在」(ERR_PNPM_FETCH_404):该包在官方 npm 源上是有的,但你本机配置的 npm/pnpm 源(registry 或镜像)没有同步到它。请把 npm/pnpm 的 registry 指回官方源 https://registry.npmjs.org(或换一个已同步该包的镜像)后重试。这不是插件本身的问题。",
|
|
324
309
|
failPluginMissingDepTarget: "{pkg} 在官方 npm 源上不存在",
|
|
325
310
|
failPluginMissingDepHint: "该插件依赖的包在官方 npm 源上并不存在(已删除或从未发布):这是插件作者侧的依赖问题,不是你环境的问题。请向插件作者仓库反馈,请作者补上或修正该依赖,或改为随插件一起分发。",
|
|
311
|
+
failHostIncompatibleKind: "插件不支持当前的 DSH 版本",
|
|
312
|
+
failHostIncompatibleReason: "当前 DSH {version} 不在该插件的兼容清单里,宿主在安装前就拒绝了 —— 什么都没装。",
|
|
313
|
+
failHostIncompatibleHint: "① 请作者把该版本加入兼容清单后发新版(下方按钮直达作者仓库)\n② 在桌面应用的插件管理器里为这个精确版本授权(宿主会提示崩溃/数据风险)",
|
|
314
|
+
failKind_npmTooOld: "本机 npm 版本过低",
|
|
315
|
+
failReason_npmTooOld: "当前 npm 版本处理不了这个包的依赖树,安装被中断。",
|
|
316
|
+
failKind_dshMissing: "本机缺少 dsh",
|
|
317
|
+
failReason_dshMissing: "安装器需要调用 dsh,但在你的机器上找不到它。",
|
|
318
|
+
failKind_gitMissing: "本机缺少 git",
|
|
319
|
+
failReason_gitMissing: "这个包的依赖需要 git,但机器上找不到 git。",
|
|
320
|
+
failKind_pnpmMissing: "本机缺少 pnpm",
|
|
321
|
+
failReason_pnpmMissing: "安装器通过 pnpm 安装插件,但机器上找不到 pnpm。",
|
|
322
|
+
failKind_npmMissing: "本机缺少 npm",
|
|
323
|
+
failReason_npmMissing: "安装流程需要 npm,但机器上找不到它。",
|
|
324
|
+
failKind_pnpmStore: "pnpm store 版本不匹配",
|
|
325
|
+
failReason_pnpmStore: "profile 里的依赖由另一大版本的 pnpm 生成,当前 pnpm 不认。",
|
|
326
|
+
failKind_pnpmWorkspace: "workspace 根校验阻止了安装",
|
|
327
|
+
failReason_pnpmWorkspace: "profile 被当作 workspace 根,但没有声明根操作,pnpm 中止了安装。",
|
|
328
|
+
failKind_originRejected: "本地服务的来源校验未通过",
|
|
329
|
+
failReason_originRejected: "请求根本没进安装流程:本地服务拒绝了它的来源。",
|
|
330
|
+
failKind_pnpmPolicy: "被 pnpm 供应链策略拦截",
|
|
331
|
+
failReason_pnpmPolicy: "版本未满最小发布年龄,或缺完整性校验 / 来源不可信。",
|
|
332
|
+
failKind_pnpmUnusedPatch: "profile 残留旧补丁声明",
|
|
333
|
+
failReason_pnpmUnusedPatch: "profile 里留着指向旧版本 dsh-plugin 的补丁,pnpm 出于安全中止了安装。",
|
|
334
|
+
failKind_pnpmMissingDep: "依赖包在 registry 上不存在",
|
|
335
|
+
failReason_pnpmMissingDep: "profile 里有一条指向未发布包的依赖,pnpm 每次解析都卡在它上面。",
|
|
336
|
+
failKind_pluginMissingDep: "插件依赖未发布",
|
|
337
|
+
failReason_pluginMissingDep: "插件声明依赖的包在官方 npm 源上不存在(已删除或从未发布)。",
|
|
338
|
+
failKind_registryVersionStale: "该版本在所用源上不存在",
|
|
339
|
+
failReason_registryVersionStale: "实际安装用的源还没同步到这个版本,或版本号写错。",
|
|
340
|
+
failKind_pnpmLinkedDirMissing: "profile 里有失效的本地依赖",
|
|
341
|
+
failReason_pnpmLinkedDirMissing: "有一条指向本机不存在目录的 link/file 依赖,pnpm 每次解析都卡住。",
|
|
342
|
+
failKind_fileLocked: "文件被其他程序占用",
|
|
343
|
+
failReason_fileLocked: "pnpm 无法替换 profile 里的文件:有程序正持有它。",
|
|
344
|
+
failKind_accessDenied: "没有写入权限",
|
|
345
|
+
failReason_accessDenied: "系统拒绝 pnpm 写入 profile 里的文件。",
|
|
346
|
+
failKind_fsUnavailable: "磁盘不可写",
|
|
347
|
+
failReason_fsUnavailable: "磁盘已满、处于只读,或文件句柄耗尽。",
|
|
348
|
+
failKind_pnpmIgnoredBuild: "原生模块构建被拦截",
|
|
349
|
+
failReason_pnpmIgnoredBuild: "插件依赖需要在你的机器上现场编译,pnpm 默认拦住构建脚本。",
|
|
350
|
+
failKind_pluginPrepare: "插件分发不完整",
|
|
351
|
+
failReason_pluginPrepare: "作者发布的包里缺文件,或构建脚本执行失败。",
|
|
352
|
+
failKind_hostIncompatible: "插件不支持当前的 DSH 版本({version})",
|
|
353
|
+
failReason_hostIncompatible: "插件声明的兼容清单里没有你正在运行的 DSH 版本。",
|
|
354
|
+
failKind_network: "网络连接失败",
|
|
355
|
+
failReason_network: "安装过程中连不上 npm 源或代理,请求没有完成。",
|
|
356
|
+
failKind_hostCliSpawn: "无法启动 DSH 宿主",
|
|
357
|
+
failReason_hostCliSpawn: "解析到的宿主入口起不来,安装命令没有真正执行。",
|
|
358
|
+
failKind_hubState: "插件中心状态不同步",
|
|
359
|
+
failReason_hubState: "本地记录的安装状态与实际不一致,这次操作没有生效。",
|
|
360
|
+
failKind_timeout: "操作超时",
|
|
361
|
+
failReason_timeout: "安装耗时超过上限仍未完成,已经中止。",
|
|
362
|
+
failKind_profileLock: "profile 被其他进程占用",
|
|
363
|
+
failReason_profileLock: "另一个 dsh 进程正在使用这个 profile。",
|
|
364
|
+
failKind_hub: "出现未知错误",
|
|
365
|
+
failReason_hub: "我们还没能识别这条报错,你可以一键反馈给我们。",
|
|
326
366
|
failRegistryVersionStaleHint: "安装器调用 pnpm 时报「找不到匹配的版本」(ERR_PNPM_NO_MATCHING_VERSION):要装的这个版本在实际执行安装的 npm 源里查不到。常见原因是你设置的 npmRegistry 与本机 ~/.npmrc 用的不是同一个源——官方源刚发布、镜像还没同步上来(快则几分钟、慢则几小时),也可能只是版本号写错了。这不是插件本身的问题。可在插件市场设置里把 npmRegistry 改成与本机 ~/.npmrc 一致(或反过来),或那一次显式走官方源(https://registry.npmjs.org)、改用离线包后重试;若该版本刚发布不久,等镜像同步后重试即可。",
|
|
327
367
|
failPnpmLinkedDirMissingHint: "安装器调用 pnpm 时报「要安装的目录不存在」(ERR_PNPM_LINKED_PKG_DIR_NOT_FOUND):你的 profile 里留着一条指向本机不存在目录的本地依赖(link: / file: 形式,例如用 dsh plugin add <本地路径> 装过开发中的插件,之后那个目录被删除或移动了)。pnpm 每次解析 profile 依赖都会先卡在它上面,因此任何插件都装不进来。这不是插件本身的问题——请在 profile 目录(~/.dsh/profiles/<profile>)的 package.json 里删除该本地依赖条目(同时删掉对应的 pnpm-lock.yaml 条目或整个锁文件),或把该目录恢复回原路径后重试。",
|
|
328
368
|
failFileLockedHint: "安装过程中 pnpm 无法替换 profile 里的文件:有程序正占用着它(Windows 常见报错 os error 32「另一个程序正在使用此文件」)。通常是 DeepSeek Harness 自身或杀毒软件的实时扫描持有文件句柄。这不是插件本身的问题——请完全退出 DeepSeek Harness(Windows 可在任务管理器确认进程已结束,必要时临时关闭杀毒软件实时防护)后重试。",
|
|
@@ -333,8 +373,6 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
333
373
|
failPnpmPolicyHint: "安装器调用 pnpm 时被其供应链安全策略拦截——装任何插件都会撞墙,不是插件本身的问题。分两种情况处理:① 提示「Minimum release age」(ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION):包发布还不满 24 小时,pnpm 11 出于安全会拒收这种刚发布的新包。可在 pnpm 配置(pnpm-workspace.yaml)里加 minimumReleaseAge: 0 豁免,或等满 24 小时后重试。② 提示「untrusted origin」(ERR_PNPM_UNTRUSTED_ORIGIN):依赖来源不被本机 pnpm 信任,通常是该 profile 里之前用 github: 或非官方 npm 源装过插件,锁文件记录了不受信任的来源。请删除该 profile 目录下的 node_modules 与 pnpm-lock.yaml 后重新安装(可先到「系统日志」或 ~/.dsh/profiles/<profile>/hub.log 查看完整报错)。",
|
|
334
374
|
failPnpmReleaseAgeHint: "安装器调用 pnpm 时被其供应链安全策略拦住了,任何插件装进这个 profile 都会先撞上它——与插件本身无关。原因是这个包发布还不满 24 小时,pnpm 11 出于安全会拒收刚发布的新包,这段时间内该 profile 的安装与卸载都会被拦下。可重试时间:{time}(即该包发布满 24 小时后)。如确需立刻安装,可在 profile 目录(~/.dsh/profiles/<profile>)的 pnpm-workspace.yaml 里加 minimumReleaseAge: 0 豁免,但这会放宽整个 profile 的供应链保护。",
|
|
335
375
|
installChannelNpm: "NPM 包",
|
|
336
|
-
installChannelGit: "GitHub 源码",
|
|
337
|
-
installChannelDsh: "DSH 命令",
|
|
338
376
|
installEntryLine: "安装入口:{c}。",
|
|
339
377
|
reportIssue: "去插件仓库提交 Issue",
|
|
340
378
|
detail: "打开详情",
|
|
@@ -406,34 +444,23 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
406
444
|
viewSettings: "Settings",
|
|
407
445
|
viewMarketHint: "Browse and discover plugins",
|
|
408
446
|
viewInstalledHint: "Manage installed plugins",
|
|
409
|
-
viewCustomHint: "Install npm packages
|
|
447
|
+
viewCustomHint: "Install npm packages manually",
|
|
410
448
|
viewSettingsHint: "Network sources and preferences",
|
|
411
449
|
installedEmpty: "No plugins installed yet",
|
|
412
|
-
installedEmptyDesc: "Go to Custom to add an npm package
|
|
450
|
+
installedEmptyDesc: "Go to Custom to add an npm package manually",
|
|
413
451
|
npmInstallLabel: "npm package / command",
|
|
414
452
|
npmInstallPlaceholder: "npm install <pkg> or a bare package name",
|
|
415
453
|
npmInstallExample: "Native commands: npm install lodash, npm i lodash, pnpm add @scope/pkg",
|
|
416
454
|
npmInstallExample2: "Global CLI: npm install -g @scope/cli; or just type a package name like lodash",
|
|
417
455
|
npmInstallInvalid: "Enter an npm package name (e.g. lodash, @scope/pkg), or a native install command (e.g. npm install lodash, npm i lodash, pnpm add @scope/pkg, npm install -g @scope/cli)",
|
|
418
|
-
gitInstallLabel: "GitHub source",
|
|
419
|
-
gitInstallPlaceholder: "Repository address",
|
|
420
|
-
gitInstallExample: "e.g. owner/repo or https://github.com/owner/repo",
|
|
421
|
-
gitInstallInvalid: "Enter a GitHub repository address, e.g. owner/repo or https://github.com/owner/repo",
|
|
422
|
-
dshCmdLabel: "DeepSeek Harness command",
|
|
423
|
-
dshCmdPlaceholder: "Paste an official dsh plugin command",
|
|
424
|
-
dshCmdInsertHubUpdate: "Insert update command",
|
|
425
|
-
dshCmdExample: "e.g. dsh plugin --profile {profile} add github:owner/repo, or dsh plugin --profile {profile} update dsh-plugin",
|
|
426
|
-
dshCmdInvalid: "Paste an official dsh plugin command (--profile required, add / update), e.g. dsh plugin --profile {profile} update dsh-plugin",
|
|
427
456
|
installHelp: "Help",
|
|
428
457
|
helpModalTitle: "Supported command formats",
|
|
429
458
|
npmInstallHelp: "lodash or @scope/pkg just type the package name\nnpm install lodash\nnpm i lodash\npnpm add @scope/pkg\npnpm i @scope/pkg\nnpm install -g @scope/cli installs the CLI globally, not shown in Installed",
|
|
430
|
-
gitInstallHelp: "owner/repo\nhttps://github.com/owner/repo\ngithub:owner/repo\ngit+https://github.com/owner/repo.git\ngit@github.com:owner/repo.git",
|
|
431
|
-
dshCmdHelp: "dsh plugin --profile {profile} add <target> install\ndsh plugin --profile {profile} update <target> update an installed target to the latest version\ndsh plugin --profile={profile} add <target>\ndsh plugin --profile={profile} update <target>\n --profile is required (prefilled with the current profile here) and there is no -p shorthand; <target> can be an npm package or github:owner/repo; uninstall from the Installed list",
|
|
432
459
|
globalNpmHint: "This installs CLI tools globally (npm install -g). They won't appear in Installed and no host restart is needed.",
|
|
433
460
|
installCliBtn: "Install",
|
|
434
461
|
channelDisabledHint: "This install channel is disabled — enable it in Settings → Security & Trust",
|
|
435
462
|
goToSettings: "Go to Settings",
|
|
436
|
-
customViewDesc: "Manually install an npm package
|
|
463
|
+
customViewDesc: "Manually install an npm package outside the catalog. Finished installs appear in Installed, marked as custom.",
|
|
437
464
|
customLabel: "Custom install",
|
|
438
465
|
installedSearch: "Search installed plugins…",
|
|
439
466
|
installedFilterCatalog: "Catalog",
|
|
@@ -487,13 +514,9 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
487
514
|
mirrorTencent: "Tencent Cloud mirror",
|
|
488
515
|
mirrorTsinghua: "Tsinghua TUNA mirror",
|
|
489
516
|
settingsSecurity: "Security & Trust",
|
|
490
|
-
settingsSecurityDesc: "Toggles for
|
|
517
|
+
settingsSecurityDesc: "Toggles for command-line installs: npm packages",
|
|
491
518
|
settingsEnableNpm: "Enable npm installs",
|
|
492
519
|
settingsEnableNpmDesc: "Allow installing npm packages from the command line; turning this off rejects package-name installs",
|
|
493
|
-
settingsEnableGit: "Enable GitHub source installs",
|
|
494
|
-
settingsEnableGitDesc: "Allow installing from GitHub sources on the command line; turning this off rejects repository-address installs",
|
|
495
|
-
settingsEnableDsh: "Enable DSH command installs",
|
|
496
|
-
settingsEnableDshDesc: "Allow pasting a dsh plugin command to install; turning this off disables the command input",
|
|
497
520
|
settingsDiagnostics: "System Diagnostics",
|
|
498
521
|
settingsDiagnosticsDesc: "Check the connectivity of install channels: npm registry, GitHub and the catalog site",
|
|
499
522
|
settingsLogs: "System Logs",
|
|
@@ -663,11 +686,11 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
663
686
|
failTimeoutHint: "This operation exceeded the local time limit and was interrupted — but it may well have taken effect already (the installer re-checks the installed list after a timeout). Refresh the page to confirm the current state; if it did not take effect, run the corresponding command in a terminal to see the full output. This is not a plugin problem.",
|
|
664
687
|
failProfileLockHint: "DSH timed out waiting for the file lock while writing the plugin list — usually because another DSH process or install task is writing the same profile (sometimes a previous run left the lock behind). Close other dsh windows or running commands, then retry; if it keeps happening, restart DSH once. This is not a plugin problem, and there is no need to repeat the {action}.",
|
|
665
688
|
failHostCliSpawnHint: "DSH could not start itself to perform this operation (the system reported that the executable was not found). This usually means the DSH installation folder has been moved or is being updated, or that the profile directory does not exist yet. Restart DSH and retry; if it keeps happening, reinstall DSH. This is not a plugin problem — other plugins would fail the same way.",
|
|
666
|
-
failPrepareHint: "This plugin failed while running its build scripts during install (
|
|
689
|
+
failPrepareHint: "This plugin failed while running its build scripts during install (the published npm package is incomplete). This is a packaging issue of the plugin itself — please report it to the author repository.",
|
|
667
690
|
failMisjudgeHint: "If this plugin actually installs fine (the verdict above is the Plugin Hub misjudging it), please report it to the Hub: that verdict is produced by the marketplace itself, so a false positive can only be found through your feedback.",
|
|
668
691
|
failMisjudgeLink: "Plugin installs fine but got blocked? Report to the Plugin Hub",
|
|
669
692
|
failPackagingHint: "This plugin does not support the official default install method: its git distribution lacks a file the package needs (the entry from `main` / `exports`, an entry its own patch mounts by name, or the patch declared by `dsh.bundle.patch`), so it has not been adapted to the official install flow. Please file an Issue on the author's repo asking for committed build output, a prebuilt release `.tgz` (`releases/download/<tag>/<asset>.tgz`), or a complete npm release.",
|
|
670
|
-
failIgnoredBuild: "This plugin (or one of its dependencies) needs to run build scripts at install time, which pnpm blocks by default via its allowBuilds allowlist — so this operation fails (e.g. native modules like node-pty, or the plugin's own prepare script on git installs). The installer already auto-allows that key and retries once; if it still fails, the build itself is
|
|
693
|
+
failIgnoredBuild: "This plugin (or one of its dependencies) needs to run build scripts at install time, which pnpm blocks by default via its allowBuilds allowlist — so this operation fails (e.g. native modules like node-pty, or the plugin's own prepare script on git installs). The installer already auto-allows that key and retries once; if it still fails, the build itself is the problem, so no user can install it. Run the install command in a terminal to see the full build error; this is a build/distribution issue of the plugin itself — please report it to the author repository, asking them to ship prebuilt output, a complete npm release, or a prebuilt .tgz.",
|
|
671
694
|
failNpmTooLow: "Your local npm may be too old: npm crashed internally while resolving the plugin's dependencies (a known npm bug — not a plugin issue). Please upgrade npm and retry: npm install -g npm@latest",
|
|
672
695
|
failNpmTooLowV: "Your local npm is too old (v{v}): npm crashed internally while resolving the plugin's dependencies (a known npm bug — not a plugin issue). Please upgrade npm and retry: npm install -g npm@latest",
|
|
673
696
|
failNetworkHint: "The network could not be reached before the {action}: the install source is unreachable (offline, DNS failure, firewall block, or a misconfigured proxy). This is not a problem with the plugin itself — please check your connection, confirm the HTTP proxy in Settings, run a connectivity check under System Diagnostics, then retry.",
|
|
@@ -686,6 +709,61 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
686
709
|
failRegistryMirrorLagHint: "pnpm reported that a package does not exist on the npm registry (ERR_PNPM_FETCH_404): that package does exist on the official npm registry, but the npm/pnpm registry (or mirror) configured on your machine has not synced it. Point the npm/pnpm registry back at the official one (https://registry.npmjs.org), or switch to a mirror that has the package, then retry. This is not a problem with the plugin itself.",
|
|
687
710
|
failPluginMissingDepTarget: "{pkg} does not exist on the official npm registry",
|
|
688
711
|
failPluginMissingDepHint: "A package this plugin depends on does not exist on the official npm registry (removed, or never published). This is a dependency problem on the plugin author side, not a problem with your environment. Please report it to the plugin repository so the author can fix that dependency or ship it together with the plugin.",
|
|
712
|
+
failHostIncompatibleKind: "Plugin does not support the DSH version in use",
|
|
713
|
+
failHostIncompatibleReason: "The current DSH ({version}) is not in this plugin's compatibility list, so the host refused before installing anything.",
|
|
714
|
+
failHostIncompatibleHint: "① Ask the author to extend the supported dsh versions and publish a release (button below).\n② Grant an exact-version exemption in the plugin manager of the desktop app (the host warns about crash / data-loss risk).",
|
|
715
|
+
failKind_npmTooOld: "npm on this machine is too old",
|
|
716
|
+
failReason_npmTooOld: "The installed npm cannot resolve the dependency tree of this package, so it aborted.",
|
|
717
|
+
failKind_dshMissing: "dsh is not installed on this machine",
|
|
718
|
+
failReason_dshMissing: "The installer needs to call dsh, but it cannot be found on your machine.",
|
|
719
|
+
failKind_gitMissing: "git is not installed on this machine",
|
|
720
|
+
failReason_gitMissing: "A dependency of this package needs git, but git cannot be found.",
|
|
721
|
+
failKind_pnpmMissing: "pnpm is not installed on this machine",
|
|
722
|
+
failReason_pnpmMissing: "The installer uses pnpm to add plugins, but pnpm cannot be found.",
|
|
723
|
+
failKind_npmMissing: "npm is not installed on this machine",
|
|
724
|
+
failReason_npmMissing: "The install flow needs npm, but it cannot be found.",
|
|
725
|
+
failKind_pnpmStore: "pnpm store version mismatch",
|
|
726
|
+
failReason_pnpmStore: "The profile dependencies were written by a different pnpm major, which the current pnpm does not accept.",
|
|
727
|
+
failKind_pnpmWorkspace: "workspace-root check blocked the install",
|
|
728
|
+
failReason_pnpmWorkspace: "The profile is treated as a workspace root without a root operation declared, so pnpm aborted.",
|
|
729
|
+
failKind_originRejected: "request origin rejected by the local service",
|
|
730
|
+
failReason_originRejected: "The request never reached the install flow: the local service rejected its origin.",
|
|
731
|
+
failKind_pnpmPolicy: "blocked by the pnpm supply-chain policy",
|
|
732
|
+
failReason_pnpmPolicy: "The version is younger than the minimum release age, or an integrity / trust check failed.",
|
|
733
|
+
failKind_pnpmUnusedPatch: "stale patch entry in the profile",
|
|
734
|
+
failReason_pnpmUnusedPatch: "The profile keeps a patch for an older dsh-plugin version, so pnpm aborted for safety.",
|
|
735
|
+
failKind_pnpmMissingDep: "a dependency does not exist on the registry",
|
|
736
|
+
failReason_pnpmMissingDep: "The profile keeps a dependency on an unpublished package, which pnpm hits on every resolve.",
|
|
737
|
+
failKind_pluginMissingDep: "plugin dependency is not published",
|
|
738
|
+
failReason_pluginMissingDep: "A package the plugin depends on does not exist on the official npm registry.",
|
|
739
|
+
failKind_registryVersionStale: "this version is not available on the registry in use",
|
|
740
|
+
failReason_registryVersionStale: "The registry that actually performs the install has not synced this version yet, or the version is mistyped.",
|
|
741
|
+
failKind_pnpmLinkedDirMissing: "dangling local dependency in the profile",
|
|
742
|
+
failReason_pnpmLinkedDirMissing: "A link/file dependency points at a directory that no longer exists, so pnpm stalls on it.",
|
|
743
|
+
failKind_fileLocked: "a file is held by another program",
|
|
744
|
+
failReason_fileLocked: "pnpm could not replace a file inside the profile because another program is holding it.",
|
|
745
|
+
failKind_accessDenied: "write access denied",
|
|
746
|
+
failReason_accessDenied: "The system denied pnpm write access to files inside the profile.",
|
|
747
|
+
failKind_fsUnavailable: "the disk is not writable",
|
|
748
|
+
failReason_fsUnavailable: "The disk is full or read-only, or file handles are exhausted.",
|
|
749
|
+
failKind_pnpmIgnoredBuild: "native build scripts blocked",
|
|
750
|
+
failReason_pnpmIgnoredBuild: "A plugin dependency has to be compiled on your machine, and pnpm blocks build scripts by default.",
|
|
751
|
+
failKind_pluginPrepare: "plugin distribution is incomplete",
|
|
752
|
+
failReason_pluginPrepare: "The published package is missing files, or its build script failed.",
|
|
753
|
+
failKind_hostIncompatible: "plugin does not support the DSH version in use ({version})",
|
|
754
|
+
failReason_hostIncompatible: "The plugin's declared compatibility list does not include the DSH version you are running.",
|
|
755
|
+
failKind_network: "network connection failed",
|
|
756
|
+
failReason_network: "The install could not reach the npm registry or the proxy, so the request never completed.",
|
|
757
|
+
failKind_hostCliSpawn: "the DSH host could not be launched",
|
|
758
|
+
failReason_hostCliSpawn: "The resolved host entry point would not start, so the install command never ran.",
|
|
759
|
+
failKind_hubState: "plugin hub state is out of sync",
|
|
760
|
+
failReason_hubState: "The locally recorded install state does not match reality, so this operation had no effect.",
|
|
761
|
+
failKind_timeout: "operation timed out",
|
|
762
|
+
failReason_timeout: "The install exceeded the time limit and was aborted.",
|
|
763
|
+
failKind_profileLock: "profile is locked by another process",
|
|
764
|
+
failReason_profileLock: "Another dsh process is using this profile right now.",
|
|
765
|
+
failKind_hub: "unknown error",
|
|
766
|
+
failReason_hub: "We could not identify this error yet — you can report it to us in one click.",
|
|
689
767
|
failRegistryVersionStaleHint: "pnpm reported that no matching version was found (ERR_PNPM_NO_MATCHING_VERSION): the version being installed does not exist in the npm registry that actually performs the install. This usually means the npmRegistry configured in the hub differs from the source in your local ~/.npmrc — the official registry has published it but the mirror has not synced yet (it can take minutes to hours) — or the version number was simply mistyped. This is not a problem with the plugin itself. Align the hub's npmRegistry with your local ~/.npmrc (or the other way round), or explicitly use the official registry (https://registry.npmjs.org) for that one install, or use an offline package, then retry; if the version was published only recently, waiting for the mirror to sync is enough.",
|
|
690
768
|
failPnpmLinkedDirMissingHint: "pnpm reported that a directory it needs to install from does not exist (ERR_PNPM_LINKED_PKG_DIR_NOT_FOUND): your profile keeps a local dependency (a link: / file: entry, e.g. from `dsh plugin add <local path>`) whose target directory has since been deleted or moved. pnpm hits it every time it resolves profile dependencies, so no plugin can be installed into that profile. This is not a problem with the plugin itself. Remove that local dependency from package.json inside the profile directory (~/.dsh/profiles/<profile>) — along with its entry in pnpm-lock.yaml, or the lockfile itself — or restore the directory to its original path, then retry.",
|
|
691
769
|
failFileLockedHint: "During install, pnpm could not replace a file inside the profile because another program is holding it (on Windows this shows as os error 32, \"the process cannot access the file because it is being used by another process\"). Usually DeepSeek Harness itself or a real-time antivirus scan holds the handle. This is not a problem with the plugin itself — fully quit DeepSeek Harness (on Windows, confirm in Task Manager that the process has ended, and temporarily disable real-time antivirus protection if needed), then retry.",
|
|
@@ -696,8 +774,6 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
696
774
|
failPnpmPolicyHint: "The installer was blocked by pnpm supply-chain security policy — every plugin install would hit the same wall, so this is not a problem with the plugin itself. Two cases: ① \"Minimum release age\" (ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION): the package was published less than 24 hours ago, and pnpm 11 refuses freshly-published packages for safety. Add minimumReleaseAge: 0 to your pnpm config (pnpm-workspace.yaml) to opt out, or wait until the 24 hours have passed and retry. ② \"untrusted origin\" (ERR_PNPM_UNTRUSTED_ORIGIN): a dependency source is not trusted by this machine, usually because plugins were previously installed via github: or a non-official npm registry, so the lockfile records an untrusted source. Delete node_modules and pnpm-lock.yaml under the profile directory (see System Logs or ~/.dsh/profiles/<profile>/hub.log for the full output), then reinstall.",
|
|
697
775
|
failPnpmReleaseAgeHint: "The installer was blocked by pnpm supply-chain security policy, and every plugin installed into this profile would hit the same wall — this is not a problem with the plugin itself. The package was published less than 24 hours ago, and pnpm 11 refuses freshly-published packages for safety, so both installs and removals are blocked for this profile in the meantime. Retry after: {time} (i.e. 24 hours after the package was published). If you must install right now, add minimumReleaseAge: 0 to pnpm-workspace.yaml inside the profile directory (~/.dsh/profiles/<profile>) to opt out, but that loosens supply-chain protection for the whole profile.",
|
|
698
776
|
installChannelNpm: "NPM package",
|
|
699
|
-
installChannelGit: "GitHub source",
|
|
700
|
-
installChannelDsh: "DSH command",
|
|
701
777
|
installEntryLine: "Install entry: {c}.",
|
|
702
778
|
reportIssue: "Report an Issue to the plugin repo",
|
|
703
779
|
detail: "Open details",
|
|
@@ -752,46 +828,46 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
752
828
|
css: css$11
|
|
753
829
|
});
|
|
754
830
|
var Header_module_css_default = {
|
|
755
|
-
"
|
|
756
|
-
"
|
|
757
|
-
"
|
|
758
|
-
"
|
|
831
|
+
"githubLink": "qikqja_githubLink",
|
|
832
|
+
"segBtn": "qikqja_segBtn",
|
|
833
|
+
"segBtnActive": "qikqja_segBtnActive",
|
|
834
|
+
"segLabel": "qikqja_segLabel",
|
|
759
835
|
"logoIcon": "qikqja_logoIcon",
|
|
760
|
-
"tab": "qikqja_tab",
|
|
761
|
-
"adText": "qikqja_adText",
|
|
762
836
|
"versionBtn": "qikqja_versionBtn",
|
|
763
|
-
"segGroup": "qikqja_segGroup",
|
|
764
|
-
"headerRight": "qikqja_headerRight",
|
|
765
|
-
"segLabel": "qikqja_segLabel",
|
|
766
|
-
"adBadge": "qikqja_adBadge",
|
|
767
|
-
"controls": "qikqja_controls",
|
|
768
|
-
"tabCount": "qikqja_tabCount",
|
|
769
837
|
"adArrow": "qikqja_adArrow",
|
|
770
|
-
"
|
|
771
|
-
"version": "qikqja_version",
|
|
772
|
-
"segBtnActive": "qikqja_segBtnActive",
|
|
838
|
+
"headerRight": "qikqja_headerRight",
|
|
773
839
|
"tabActive": "qikqja_tabActive",
|
|
774
|
-
"
|
|
775
|
-
"
|
|
776
|
-
"langBtn": "qikqja_langBtn",
|
|
840
|
+
"brandTitle": "qikqja_brandTitle",
|
|
841
|
+
"tab": "qikqja_tab",
|
|
777
842
|
"githubIcon": "qikqja_githubIcon",
|
|
778
|
-
"
|
|
843
|
+
"title": "qikqja_title",
|
|
779
844
|
"tagline": "qikqja_tagline",
|
|
780
|
-
"
|
|
845
|
+
"tabCount": "qikqja_tabCount",
|
|
846
|
+
"hubUpdateBadge": "qikqja_hubUpdateBadge",
|
|
847
|
+
"adBadge": "qikqja_adBadge",
|
|
848
|
+
"headerTitleRow": "qikqja_headerTitleRow",
|
|
849
|
+
"copyIcon": "qikqja_copyIcon",
|
|
850
|
+
"resultSeg": "qikqja_resultSeg",
|
|
781
851
|
"root": "qikqja_root",
|
|
852
|
+
"search": "qikqja_search",
|
|
853
|
+
"sortGroup": "qikqja_sortGroup",
|
|
854
|
+
"searchRow": "qikqja_searchRow",
|
|
782
855
|
"resultCount": "qikqja_resultCount",
|
|
856
|
+
"aboutBtn": "qikqja_aboutBtn",
|
|
783
857
|
"header": "qikqja_header",
|
|
784
|
-
"adBanner": "qikqja_adBanner",
|
|
785
|
-
"tabsRow": "qikqja_tabsRow",
|
|
786
858
|
"tabs": "qikqja_tabs",
|
|
787
|
-
"
|
|
788
|
-
"
|
|
789
|
-
"
|
|
790
|
-
"
|
|
859
|
+
"tabsRow": "qikqja_tabsRow",
|
|
860
|
+
"adBanner": "qikqja_adBanner",
|
|
861
|
+
"version": "qikqja_version",
|
|
862
|
+
"adText": "qikqja_adText",
|
|
863
|
+
"controls": "qikqja_controls",
|
|
864
|
+
"taglineLink": "qikqja_taglineLink",
|
|
865
|
+
"langBtn": "qikqja_langBtn",
|
|
866
|
+
"segGroup": "qikqja_segGroup"
|
|
791
867
|
};
|
|
792
868
|
//#endregion
|
|
793
869
|
//#region \0dsh-css:src/client/styles/Modal.module.css.mjs
|
|
794
|
-
const css$10 = ".BiQ1zG_overlay{z-index:998;-webkit-user-select:none;user-select:none;background:#00000061;justify-content:center;align-items:center;animation:.16s ease-out BiQ1zG_overlayIn;display:flex;position:fixed;top:0;bottom:0;left:0;right:0}.BiQ1zG_modal,.BiQ1zG_errorModal{background:var(--hub-bg-1);border:1px solid var(--hub-border-2);border-radius:10px;flex-direction:column;gap:10px;width:540px;max-width:calc(100vw - 32px);max-height:calc(100vh - 64px);padding:14px 16px;animation:.18s ease-out BiQ1zG_modalIn;display:flex;box-shadow:0 12px 40px #0000003d}.BiQ1zG_errorModal{width:720px;max-width:calc(100vw - 48px)}.BiQ1zG_modalWide{width:640px;max-width:calc(100vw - 48px)}.BiQ1zG_helpModal{width:760px;max-width:calc(100vw - 48px)}.BiQ1zG_logModal{width:820px;max-width:calc(100vw - 48px);height:min(540px,100vh - 64px)}.BiQ1zG_modalHead{flex-shrink:0;justify-content:space-between;align-items:center;gap:8px;display:flex}.BiQ1zG_modalTitle{color:var(--hub-text-primary);font-size:14px;font-weight:600;line-height:20px}.BiQ1zG_modalTitleBusy{color:var(--hub-brand)}.BiQ1zG_modalTitleQueued{color:var(--hub-warning)}.BiQ1zG_modalClose{width:24px;height:24px;color:var(--hub-text-tertiary);cursor:pointer;-webkit-user-select:none;user-select:none;background:0 0;border:none;border-radius:6px;flex-shrink:0;justify-content:center;align-items:center;font-size:16px;line-height:1;display:inline-flex}.BiQ1zG_modalClose:hover{color:var(--hub-text-primary);background:var(--hub-bg-hover)}.BiQ1zG_modalCloseIcon{flex-shrink:0;width:14px;height:14px}.BiQ1zG_confirmIconWrap{justify-content:center;padding:2px 0 6px;display:flex}.BiQ1zG_confirmIcon{background:var(--hub-brand);border-radius:50%;flex:none;justify-content:center;align-items:center;width:48px;height:48px;display:inline-flex;box-shadow:0 4px 12px #4f6ef747}.BiQ1zG_confirmIconDanger{background:var(--hub-danger);box-shadow:0 4px 12px #d1242f4d}.BiQ1zG_dangerConfirm{color:#fff;background:var(--hub-danger);border:1px solid var(--hub-danger);cursor:pointer;-webkit-user-select:none;user-select:none;border-radius:6px;flex:none;height:28px;padding:0 14px;font-size:12px;font-weight:600;transition:background-color .12s,border-color .12s}.BiQ1zG_dangerConfirm:hover:not(:disabled){background:var(--hub-danger-hover);border-color:var(--hub-danger-hover)}.BiQ1zG_dangerConfirm:disabled{opacity:.55;cursor:default}.BiQ1zG_confirmPrimary{color:#fff;background:var(--hub-brand);border:1px solid var(--hub-brand);cursor:pointer;-webkit-user-select:none;user-select:none;border-radius:6px;flex:none;height:28px;padding:0 14px;font-size:12px;font-weight:600;transition:filter .12s}.BiQ1zG_confirmPrimary:hover:not(:disabled){filter:brightness(1.08)}.BiQ1zG_confirmPrimary:disabled{opacity:.55;cursor:default}.BiQ1zG_modalDesc{color:var(--hub-text-secondary);font-size:12px;line-height:18px}.BiQ1zG_trustHint{color:var(--hub-danger-text);background:var(--hub-danger-tint);border:1px solid var(--hub-danger-border-soft);border-radius:6px;padding:6px 10px;font-size:12px;font-weight:500;line-height:18px}.BiQ1zG_cliOnlyHint{color:var(--hub-text-secondary);background:var(--hub-bg-hover);border-radius:6px;padding:6px 10px;font-size:12px;line-height:18px}.BiQ1zG_failedCopyHint{color:var(--hub-danger-text);background:var(--hub-danger-tint);border:1px solid var(--hub-danger-border-soft);border-radius:6px;padding:6px 10px;font-size:12px;font-weight:500;line-height:18px}.BiQ1zG_modalRow{align-items:baseline;gap:8px;min-width:0;font-size:12px;line-height:18px;display:flex}.BiQ1zG_modalLabel{min-width:64px;color:var(--hub-text-tertiary);flex-shrink:0}.BiQ1zG_modalValue{text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--hub-text-primary);font-weight:500;overflow:hidden}.BiQ1zG_modalLink{text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--hub-brand);cursor:pointer;-webkit-user-select:none;user-select:none;align-items:center;gap:4px;font-weight:500;text-decoration:none;transition:color .12s;display:inline-flex;overflow:hidden}.BiQ1zG_modalLink:hover{color:var(--hub-brand-hover);text-decoration:underline}.BiQ1zG_linkIcon{flex-shrink:0}.BiQ1zG_modalCmd{color:var(--hub-text-primary);background:var(--hub-bg-2);border:1px solid var(--hub-border-2);cursor:pointer;-webkit-user-select:none;user-select:none;border-radius:6px;justify-content:space-between;align-items:center;gap:8px;padding:6px 6px 6px 10px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:11px;line-height:18px;transition:border-color .12s,background .12s;display:flex}.BiQ1zG_modalCmd:hover{border-color:var(--hub-border-ghost);background:var(--hub-bg-3)}.BiQ1zG_modalCmdText{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.BiQ1zG_modalCmdCopy{color:var(--hub-brand);cursor:pointer;-webkit-user-select:none;user-select:none;background:0 0;border:none;border-radius:4px;flex-shrink:0;align-items:center;gap:3px;padding:1px 7px;font-family:inherit;font-size:11px;line-height:16px;transition:color .12s,background .12s;display:inline-flex}.BiQ1zG_modalCmdCopy:hover{color:var(--hub-brand-hover);background:var(--hub-bg-2)}.BiQ1zG_modalActions{justify-content:flex-end;align-items:center;gap:8px;margin-top:2px;display:flex}.BiQ1zG_modalBody{flex-direction:column;flex:auto;gap:10px;min-height:0;display:flex;overflow-y:auto}.BiQ1zG_toast{z-index:1000;background:var(--hub-btn-fill);color:var(--hub-text-on-fill);pointer-events:none;white-space:nowrap;border:none;border-radius:8px;padding:10px 16px;font-size:12px;font-weight:500;line-height:18px;animation:.22s ease-out BiQ1zG_toastIn;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);box-shadow:0 6px 24px #00000047}@keyframes BiQ1zG_toastIn{0%{opacity:0;transform:translate(-50%,-44%)}to{opacity:1;transform:translate(-50%,-50%)}}.BiQ1zG_toastFail{background:var(--hub-danger);color:#fff;border-color:#ffffff3d}.BiQ1zG_queueSection{flex-direction:column;gap:6px;display:flex}.BiQ1zG_queueSectionTitle{color:var(--hub-text-secondary);padding:4px 2px 0;font-size:12px;font-weight:600;line-height:18px}.BiQ1zG_pendingRowStatus{color:var(--hub-warn);flex-shrink:0;font-weight:500}.BiQ1zG_pendingRowActions{flex-shrink:0;gap:8px;margin-left:auto;display:flex}.BiQ1zG_queueRow{border:1px solid var(--hub-border-2);background:var(--hub-bg-2);cursor:pointer;-webkit-user-select:none;user-select:none;border-radius:8px;flex-direction:column;gap:5px;padding:8px 10px;font-size:12px;line-height:18px;transition:background .12s;display:flex}.BiQ1zG_queueRow:hover{background:var(--hub-brand-tint)}.BiQ1zG_queueRowHead{align-items:center;gap:10px;display:flex}.BiQ1zG_queueRowTarget{text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--hub-text-primary);flex:1;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;overflow:hidden}.BiQ1zG_queueRowDesc{color:var(--hub-text-tertiary);-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.BiQ1zG_queueRowBody{align-items:center;gap:8px;display:flex}.BiQ1zG_queueRowStatus{color:var(--hub-brand);flex-shrink:0;font-weight:500}.BiQ1zG_queueRowTrack{flex:1;min-width:0}.BiQ1zG_queueRowPct{color:var(--hub-text-tertiary);font-variant-numeric:tabular-nums;flex-shrink:0}.BiQ1zG_stripCancel{color:var(--hub-text-secondary);cursor:pointer;-webkit-user-select:none;user-select:none;background:0 0;border:none;border-radius:6px;flex-shrink:0;padding:2px 10px;font-size:12px;line-height:18px;transition:background .12s,color .12s}.BiQ1zG_stripCancel:hover{background:var(--hub-danger-tint);color:var(--hub-danger-text)}.BiQ1zG_stripCancel:disabled{opacity:.45;cursor:default}.BiQ1zG_queuedHint{color:var(--hub-brand);background:var(--hub-brand-tint);border:1px solid var(--hub-brand-border-soft);border-radius:6px;padding:5px 10px;font-size:12px;line-height:18px}.BiQ1zG_errorTitle{color:var(--hub-danger-text);font-size:14px;font-weight:600;line-height:20px}.BiQ1zG_errorBox{border:1px solid var(--hub-danger-border);background:var(--hub-danger-tint-weak);max-height:240px;color:var(--hub-text-primary);white-space:pre-wrap;word-break:break-word;-webkit-user-select:none;user-select:none;border-radius:6px;margin:0;padding:10px 12px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:11px;line-height:17px;overflow:auto}.BiQ1zG_errorCopySoft{color:var(--hub-text-tertiary);cursor:pointer;-webkit-user-select:none;user-select:none;background:0 0;border:none;border-radius:4px;flex-shrink:0;align-items:center;padding:2px 8px;font-size:11px;line-height:16px;transition:color .12s,background .12s;display:inline-flex}.BiQ1zG_errorCopySoft:hover{color:var(--hub-text-secondary);background:var(--hub-bg-2)}.BiQ1zG_errorHint{color:var(--hub-text-tertiary);font-size:12px;line-height:18px}.BiQ1zG_modalCancel,.BiQ1zG_modalCopy{color:var(--hub-text-secondary);cursor:pointer;-webkit-user-select:none;user-select:none;background:0 0;border:none;border-radius:6px;padding:5px 14px;font-size:12px;line-height:18px;transition:color .12s,background .12s}.BiQ1zG_modalCancel:hover,.BiQ1zG_modalCopy:hover{color:var(--hub-text-primary);background:var(--hub-bg-hover)}.BiQ1zG_modalInstall{color:var(--hub-text-on-fill);background:var(--hub-btn-fill);cursor:pointer;-webkit-user-select:none;user-select:none;border:none;border-radius:6px;padding:5px 14px;font-size:12px;font-weight:600;line-height:18px;transition:background .12s}.BiQ1zG_modalInstall:hover{background:var(--hub-btn-hover)}.BiQ1zG_modalCopy:disabled,.BiQ1zG_modalInstall:disabled,.BiQ1zG_modalCancel:disabled,.BiQ1zG_modalClose:disabled,.BiQ1zG_uninstallConfirm:disabled{opacity:.55;cursor:not-allowed;pointer-events:none}.BiQ1zG_uninstallConfirm{color:#fff;background:var(--hub-danger);cursor:pointer;-webkit-user-select:none;user-select:none;border:none;border-radius:6px;padding:5px 14px;font-size:12px;font-weight:600;line-height:18px;transition:background .12s}.BiQ1zG_uninstallConfirm:hover{background:var(--hub-danger-hover)}.BiQ1zG_result{text-align:center;flex-direction:column;align-items:center;gap:5px;padding:10px 0 2px;display:flex}.BiQ1zG_resultCheck{background:var(--hub-success-tint);width:40px;height:40px;color:var(--hub-success);border-radius:50%;justify-content:center;align-items:center;margin-bottom:3px;display:inline-flex}.BiQ1zG_resultCheckIcon{flex-shrink:0;width:20px;height:20px}.BiQ1zG_resultTitle{color:var(--hub-text-primary);font-size:13px;font-weight:600;line-height:20px}.BiQ1zG_resultDesc{color:var(--hub-text-secondary);font-size:12px;line-height:18px}.BiQ1zG_resultRestarting{color:var(--hub-text-tertiary);padding:12px 0 6px;font-size:12px;line-height:18px}.BiQ1zG_restartLater{color:var(--hub-text-secondary);cursor:pointer;-webkit-user-select:none;user-select:none;background:0 0;border:none;border-radius:6px;padding:5px 14px;font-size:12px;line-height:18px;transition:color .12s,background .12s}.BiQ1zG_restartLater:hover{color:var(--hub-text-primary);background:var(--hub-bg-hover)}.BiQ1zG_restartNow{color:var(--hub-text-on-fill);background:var(--hub-btn-fill);cursor:pointer;-webkit-user-select:none;user-select:none;border:none;border-radius:6px;padding:5px 14px;font-size:12px;font-weight:600;line-height:18px;transition:background .12s}.BiQ1zG_restartNow:hover{background:var(--hub-btn-hover)}.BiQ1zG_restartNow:disabled{opacity:.55;cursor:not-allowed;pointer-events:none}.BiQ1zG_restartNowWarning{color:#fff;background:var(--hub-warning);cursor:pointer;-webkit-user-select:none;user-select:none;border:none;border-radius:6px;padding:5px 14px;font-size:12px;font-weight:600;line-height:18px;transition:background .12s}.BiQ1zG_restartNowWarning:hover{background:var(--hub-warning-hover)}.BiQ1zG_restartNowWarning:disabled{opacity:.55;cursor:not-allowed;pointer-events:none}.BiQ1zG_result .BiQ1zG_modalActions{justify-content:center;gap:10px;margin-top:0;padding:6px 0 2px}.BiQ1zG_result .BiQ1zG_modalActions .BiQ1zG_restartLater,.BiQ1zG_result .BiQ1zG_modalActions .BiQ1zG_restartNow,.BiQ1zG_result .BiQ1zG_modalActions .BiQ1zG_restartNowWarning{min-width:100px}.BiQ1zG_progress{margin:10px 0 2px}.BiQ1zG_progressHead{justify-content:flex-end;align-items:center;margin-bottom:3px;display:flex}.BiQ1zG_progressText{color:var(--hub-text-secondary);font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:11px;line-height:14px}.BiQ1zG_progressTrack{background:var(--hub-border-2);border-radius:2px;height:4px;overflow:hidden}.BiQ1zG_progressFill{background:var(--hub-brand);border-radius:2px;height:100%;transition:width .32s}.BiQ1zG_progressFillFail{background:var(--hub-danger)}@keyframes BiQ1zG_overlayIn{0%{opacity:0}to{opacity:1}}@keyframes BiQ1zG_modalIn{0%{opacity:0;transform:translateY(6px)scale(.98)}to{opacity:1;transform:translateY(0)scale(1)}}.BiQ1zG_failList{flex-direction:column;gap:12px;padding-right:2px;display:flex}.BiQ1zG_failRow{border:1px solid var(--hub-border-2);background:var(--hub-bg-2);border-radius:8px;flex-direction:column;gap:8px;padding:10px 12px;display:flex}.BiQ1zG_failHead{align-items:center;gap:8px;min-width:0;display:flex}.BiQ1zG_noticeList{flex-direction:column;gap:10px;padding-right:2px;display:flex}.BiQ1zG_noticeRow{border:1px solid var(--hub-border-2);background:var(--hub-bg-2);border-radius:8px;flex-direction:column;align-items:stretch;gap:6px;padding:10px 12px;display:flex}.BiQ1zG_noticeRowMain{align-items:center;gap:10px;width:100%;min-width:0;display:flex}.BiQ1zG_noticeBadgeOk,.BiQ1zG_noticeBadgeFail{border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;width:28px;height:28px;display:inline-flex;box-shadow:0 2px 6px #0000002e}.BiQ1zG_noticeBadgeOk{background:var(--hub-success)}.BiQ1zG_noticeBadgeFail{background:var(--hub-danger)}.BiQ1zG_noticeBadgeIcon{flex-shrink:0;width:12px;height:12px}.BiQ1zG_noticeMain{flex-direction:column;flex:1;gap:8px;min-width:0;display:flex}.BiQ1zG_noticeHead{align-items:center;gap:8px;min-width:0;display:flex}.BiQ1zG_noticeTextOk{color:var(--hub-success);flex-shrink:0;font-size:12px;font-weight:600;line-height:18px}.BiQ1zG_noticeTextFail{color:var(--hub-danger-text);flex-shrink:0;font-size:12px;font-weight:600;line-height:18px}.BiQ1zG_noticeFoot{justify-content:flex-end;align-items:center;display:flex}.BiQ1zG_noticeTime{color:var(--hub-text-tertiary);font-variant-numeric:tabular-nums;flex-shrink:0;font-size:11px;line-height:16px}.BiQ1zG_noticeRemove{width:22px;height:22px;color:var(--hub-text-tertiary);cursor:pointer;-webkit-user-select:none;user-select:none;background:0 0;border:none;border-radius:5px;flex-shrink:0;justify-content:center;align-items:center;margin-left:auto;transition:color .12s,background .12s;display:inline-flex}.BiQ1zG_noticeRemove:hover{color:var(--hub-danger-text);background:var(--hub-danger-tint)}.BiQ1zG_noticeRowOk .BiQ1zG_noticeRemove{margin-left:0}.BiQ1zG_noticeRowOk .BiQ1zG_noticeTime{margin-left:auto}.BiQ1zG_noticeRowUpdate{cursor:pointer;transition:border-color .12s,background .12s}.BiQ1zG_noticeRowUpdate:hover{border-color:var(--hub-brand);background:var(--hub-brand-tint)}.BiQ1zG_noticeVersion{color:var(--hub-brand);background:var(--hub-brand-tint);border:1px solid var(--hub-brand-border);font-variant-numeric:tabular-nums;border-radius:5px;flex-shrink:0;padding:0 6px;font-size:11px;font-weight:600;line-height:18px}.BiQ1zG_noticeUpdateGo{color:#fff;background:var(--hub-brand);cursor:pointer;-webkit-user-select:none;user-select:none;border:none;border-radius:5px;flex-shrink:0;margin-left:2px;padding:2px 8px;font-size:11px;font-weight:600;line-height:16px;transition:background .12s}.BiQ1zG_noticeUpdateGo:hover{background:var(--hub-brand-hover)}.BiQ1zG_noticeIgnore{color:var(--hub-text-secondary);border:1px solid var(--hub-border-2);cursor:pointer;-webkit-user-select:none;user-select:none;background:0 0;border-radius:5px;flex-shrink:0;margin-left:2px;padding:1px 8px;font-size:11px;font-weight:500;line-height:16px;transition:color .12s,border-color .12s,background .12s}.BiQ1zG_noticeIgnore:hover{color:var(--hub-danger-text);border-color:var(--hub-danger-border);background:var(--hub-danger-tint)}.BiQ1zG_failKind{border:1px solid #0000;border-radius:4px;flex-shrink:0;padding:0 6px;font-size:10px;font-weight:500;line-height:16px}.BiQ1zG_failKindInstall{color:var(--hub-danger-text);border-color:var(--hub-danger-border);background:var(--hub-danger-tint)}.BiQ1zG_failKindUninstall{color:var(--hub-warn);border-color:var(--hub-warn-border);background:var(--hub-warn-tint)}.BiQ1zG_failRepo{text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--hub-brand);cursor:pointer;-webkit-user-select:none;user-select:none;flex:1;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12px;line-height:18px;text-decoration:none;overflow:hidden}.BiQ1zG_failRepo:hover{text-decoration:underline}.BiQ1zG_failCopy{color:var(--hub-text-tertiary);cursor:pointer;-webkit-user-select:none;user-select:none;background:0 0;border:none;border-radius:4px;flex-shrink:0;align-items:center;padding:2px 8px;font-size:11px;line-height:16px;transition:color .12s,background .12s;display:inline-flex}.BiQ1zG_failCopy:hover{color:var(--hub-text-secondary);background:var(--hub-bg-2)}.BiQ1zG_failEmpty{text-align:center;color:var(--hub-text-tertiary);padding:24px 0;font-size:12px;line-height:18px}.BiQ1zG_failClear{color:var(--hub-danger);cursor:pointer;-webkit-user-select:none;user-select:none;background:0 0;border:none;border-radius:6px;padding:5px 14px;font-size:12px;line-height:18px;transition:color .12s,background .12s}.BiQ1zG_failClear:hover{color:#fff;background:var(--hub-danger)}.BiQ1zG_failBigIssue{box-sizing:border-box;text-align:center;color:#fff;background:var(--hub-danger);border:1px solid var(--hub-danger);cursor:pointer;-webkit-user-select:none;user-select:none;border-radius:8px;width:100%;margin-top:4px;padding:3px 16px;font-size:13px;font-weight:600;line-height:18px;text-decoration:none;transition:background .12s,border-color .12s,box-shadow .12s;display:block}.BiQ1zG_failBigIssue:hover{background:var(--hub-danger-hover);border-color:var(--hub-danger-hover);box-shadow:0 3px 10px #d1242f59}.BiQ1zG_failPrepareHint{color:var(--hub-warning);background:var(--hub-warning-tint);border:1px solid var(--hub-warning-border);border-radius:6px;margin-top:6px;padding:8px 12px;font-size:12px;line-height:18px}.BiQ1zG_failDiagBtn{box-sizing:border-box;text-align:center;width:100%;color:var(--hub-text-on-fill);background:var(--hub-btn-fill);cursor:pointer;-webkit-user-select:none;user-select:none;border:none;border-radius:8px;margin-top:8px;padding:5px 16px;font-size:13px;font-weight:600;line-height:18px;transition:background .12s,box-shadow .12s;display:block}.BiQ1zG_failDiagBtn:hover{background:var(--hub-btn-hover);box-shadow:0 3px 10px #0000001f}.BiQ1zG_failMisjudgeLink{color:var(--hub-text-tertiary);cursor:pointer;margin-top:6px;font-size:12px;line-height:18px;text-decoration:underline;display:inline-block}.BiQ1zG_failMisjudgeLink:hover{color:var(--hub-text-secondary)}.BiQ1zG_failNetworkTarget{word-break:break-all;color:var(--hub-danger);background:var(--hub-danger-tint);border:1px solid var(--hub-danger-border);border-radius:6px;margin-top:6px;padding:8px 12px;font-size:13px;font-weight:700;line-height:20px}.BiQ1zG_aboutModal{width:560px;max-width:calc(100vw - 48px)}.BiQ1zG_aboutContent{min-height:0;max-height:340px;color:var(--hub-text-secondary);background:var(--hub-bg-2);border:1px solid var(--hub-border-2);border-radius:8px;flex:auto;padding:10px 12px;font-size:12px;line-height:18px;overflow-y:auto}.BiQ1zG_aboutContent>:first-child{margin-top:0}.BiQ1zG_aboutContent>:last-child{margin-bottom:0}.BiQ1zG_aboutContent h2,.BiQ1zG_aboutContent h3,.BiQ1zG_aboutContent h4,.BiQ1zG_aboutContent h5{color:var(--hub-text-primary);margin:10px 0 4px;font-size:13px;font-weight:600;line-height:20px}.BiQ1zG_aboutContent h2{font-size:14px}.BiQ1zG_aboutContent p{margin:4px 0}.BiQ1zG_aboutContent ul,.BiQ1zG_aboutContent ol{margin:4px 0;padding-left:18px}.BiQ1zG_aboutContent li{margin:2px 0}.BiQ1zG_aboutContent code{background:var(--hub-bg-hover);color:var(--hub-text-primary);border-radius:4px;padding:1px 4px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:11px}.BiQ1zG_aboutContent pre{background:var(--hub-bg-1);border:1px solid var(--hub-border-2);border-radius:6px;margin:6px 0;padding:8px 10px;overflow-x:auto}.BiQ1zG_aboutContent pre code{background:0 0;border-radius:0;padding:0}.BiQ1zG_aboutContent blockquote{border-left:3px solid var(--hub-brand);background:var(--hub-bg-hover);color:var(--hub-text-tertiary);border-radius:0 6px 6px 0;margin:6px 0;padding:2px 10px}.BiQ1zG_aboutContent a{color:var(--hub-brand);text-decoration:none}.BiQ1zG_aboutContent a:hover{color:var(--hub-brand-hover);text-decoration:underline}.BiQ1zG_aboutContent img{border-radius:8px;max-width:100%;max-height:220px;margin:8px auto;display:block;box-shadow:0 2px 8px #0000001f}.BiQ1zG_aboutContent img[width=\"100\"]{object-fit:contain;width:100px;height:100px;max-height:100px}.BiQ1zG_aboutMeta{color:var(--hub-text-tertiary);font-size:11px;line-height:16px}.BiQ1zG_hubUpdateModal{width:620px;max-width:calc(100vw - 48px)}.BiQ1zG_hubUpdateMeta{flex-wrap:wrap;align-items:center;gap:4px 14px;font-size:12px;line-height:18px;display:flex}.BiQ1zG_hubUpdateMetaItem{color:var(--hub-text-tertiary)}.BiQ1zG_hubUpdateNotes{min-height:0;max-height:300px;color:var(--hub-text-secondary);background:var(--hub-bg-2);border:1px solid var(--hub-border-2);border-radius:8px;flex:auto;padding:10px 12px;font-size:12px;line-height:18px;overflow-y:auto}.BiQ1zG_hubUpdateNotes>:first-child{margin-top:0}.BiQ1zG_hubUpdateNotes>:last-child{margin-bottom:0}.BiQ1zG_hubUpdateNotes h2,.BiQ1zG_hubUpdateNotes h3,.BiQ1zG_hubUpdateNotes h4,.BiQ1zG_hubUpdateNotes h5{color:var(--hub-text-primary);margin:10px 0 4px;font-size:13px;font-weight:600;line-height:20px}.BiQ1zG_hubUpdateNotes h2{font-size:14px}.BiQ1zG_hubUpdateNotes p{margin:4px 0}.BiQ1zG_hubUpdateNotes ul,.BiQ1zG_hubUpdateNotes ol{margin:4px 0;padding-left:18px}.BiQ1zG_hubUpdateNotes li{margin:2px 0}.BiQ1zG_hubUpdateNotes code{background:var(--hub-bg-hover);color:var(--hub-text-primary);border-radius:4px;padding:1px 4px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:11px}.BiQ1zG_hubUpdateNotes pre{background:var(--hub-bg-1);border:1px solid var(--hub-border-2);border-radius:6px;margin:6px 0;padding:8px 10px;overflow-x:auto}.BiQ1zG_hubUpdateNotes pre code{background:0 0;border-radius:0;padding:0}.BiQ1zG_hubUpdateNotes blockquote{border-left:3px solid var(--hub-brand);background:var(--hub-bg-hover);color:var(--hub-text-tertiary);border-radius:0 6px 6px 0;margin:6px 0;padding:2px 10px}.BiQ1zG_hubUpdateNotes a{color:var(--hub-brand);text-decoration:none}.BiQ1zG_hubUpdateNotes a:hover{color:var(--hub-brand-hover);text-decoration:underline}.BiQ1zG_detailModal{width:580px;max-width:calc(100vw - 48px)}.BiQ1zG_detailUpdateHint{color:var(--hub-brand);background:var(--hub-brand-tint);border:1px solid var(--hub-brand-border-soft);border-radius:6px;padding:6px 10px;font-size:12px;line-height:18px}.BiQ1zG_detailGrid{flex-direction:column;gap:6px;display:flex}.BiQ1zG_detailRow{align-items:baseline;gap:10px;min-width:0;font-size:12px;line-height:20px;display:flex}.BiQ1zG_detailLabel{text-align:right;width:76px;color:var(--hub-text-tertiary);flex-shrink:0}.BiQ1zG_detailValue{min-width:0;color:var(--hub-text-primary);flex-wrap:wrap;flex:auto;align-items:baseline;gap:4px 6px;font-weight:500;display:flex}.BiQ1zG_detailMono{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:11px;font-weight:500}.BiQ1zG_detailArrow{color:var(--hub-text-tertiary);align-items:baseline;gap:4px;display:inline-flex}.BiQ1zG_detailDim{color:var(--hub-text-tertiary);font-size:11px;font-weight:400}.BiQ1zG_detailLink{min-width:0;color:var(--hub-brand);cursor:pointer;-webkit-user-select:none;user-select:none;align-items:center;gap:4px;font-weight:500;text-decoration:none;transition:color .12s;display:inline-flex}.BiQ1zG_detailLink:hover{color:var(--hub-brand-hover);text-decoration:underline}.BiQ1zG_detailStars{color:#b45309;font-weight:600}.BiQ1zG_detailPath{min-width:0;color:var(--hub-text-primary);background:var(--hub-bg-2);border:1px solid var(--hub-border-2);border-radius:6px;flex:auto;justify-content:space-between;align-items:center;gap:6px;padding:3px 3px 3px 8px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:11px;line-height:18px;transition:border-color .12s,background .12s;display:flex}.BiQ1zG_detailPath:hover{border-color:var(--hub-border-ghost);background:var(--hub-bg-3)}.BiQ1zG_detailPathText{text-overflow:ellipsis;white-space:nowrap;cursor:pointer;-webkit-user-select:none;user-select:none;min-width:0;overflow:hidden}.BiQ1zG_detailPathActions{flex-shrink:0;align-items:center;gap:4px;display:inline-flex}.BiQ1zG_detailPathBtn{width:28px;height:28px;color:var(--hub-brand);background:var(--hub-brand-tint);border:1px solid var(--hub-brand-border-soft);cursor:pointer;-webkit-user-select:none;user-select:none;border-radius:6px;justify-content:center;align-items:center;transition:color .12s,background .12s,border-color .12s;display:inline-flex}.BiQ1zG_detailPathBtn svg{width:15px;height:15px}.BiQ1zG_detailPathBtn:hover{color:#fff;background:var(--hub-brand);border-color:var(--hub-brand)}.BiQ1zG_detailStatusRunning,.BiQ1zG_detailStatusPending{border-radius:50%;flex-shrink:0;align-self:center;width:8px;height:8px}.BiQ1zG_detailStatusRunning{background:var(--hub-success)}.BiQ1zG_detailStatusPending{background:var(--hub-warning)}.BiQ1zG_detailStatusText{font-weight:500}";
|
|
870
|
+
const css$10 = ".BiQ1zG_overlay{z-index:998;-webkit-user-select:none;user-select:none;background:#00000061;justify-content:center;align-items:center;animation:.16s ease-out BiQ1zG_overlayIn;display:flex;position:fixed;top:0;bottom:0;left:0;right:0}.BiQ1zG_modal,.BiQ1zG_errorModal{background:var(--hub-bg-1);border:1px solid var(--hub-border-2);border-radius:10px;flex-direction:column;gap:10px;width:540px;max-width:calc(100vw - 32px);max-height:calc(100vh - 64px);padding:14px 16px;animation:.18s ease-out BiQ1zG_modalIn;display:flex;box-shadow:0 12px 40px #0000003d}.BiQ1zG_errorModal{width:720px;max-width:calc(100vw - 48px)}.BiQ1zG_modalWide{width:640px;max-width:calc(100vw - 48px)}.BiQ1zG_helpModal{width:760px;max-width:calc(100vw - 48px)}.BiQ1zG_logModal{width:820px;max-width:calc(100vw - 48px);height:min(540px,100vh - 64px)}.BiQ1zG_modalHead{flex-shrink:0;justify-content:space-between;align-items:center;gap:8px;display:flex}.BiQ1zG_modalTitle{color:var(--hub-text-primary);font-size:14px;font-weight:600;line-height:20px}.BiQ1zG_modalTitleBusy{color:var(--hub-brand)}.BiQ1zG_modalTitleQueued{color:var(--hub-warning)}.BiQ1zG_modalClose{width:24px;height:24px;color:var(--hub-text-tertiary);cursor:pointer;-webkit-user-select:none;user-select:none;background:0 0;border:none;border-radius:6px;flex-shrink:0;justify-content:center;align-items:center;font-size:16px;line-height:1;display:inline-flex}.BiQ1zG_modalClose:hover{color:var(--hub-text-primary);background:var(--hub-bg-hover)}.BiQ1zG_modalCloseIcon{flex-shrink:0;width:14px;height:14px}.BiQ1zG_confirmIconWrap{justify-content:center;padding:2px 0 6px;display:flex}.BiQ1zG_confirmIcon{background:var(--hub-brand);border-radius:50%;flex:none;justify-content:center;align-items:center;width:48px;height:48px;display:inline-flex;box-shadow:0 4px 12px #4f6ef747}.BiQ1zG_confirmIconDanger{background:var(--hub-danger);box-shadow:0 4px 12px #d1242f4d}.BiQ1zG_dangerConfirm{color:#fff;background:var(--hub-danger);border:1px solid var(--hub-danger);cursor:pointer;-webkit-user-select:none;user-select:none;border-radius:6px;flex:none;height:28px;padding:0 14px;font-size:12px;font-weight:600;transition:background-color .12s,border-color .12s}.BiQ1zG_dangerConfirm:hover:not(:disabled){background:var(--hub-danger-hover);border-color:var(--hub-danger-hover)}.BiQ1zG_dangerConfirm:disabled{opacity:.55;cursor:default}.BiQ1zG_confirmPrimary{color:#fff;background:var(--hub-brand);border:1px solid var(--hub-brand);cursor:pointer;-webkit-user-select:none;user-select:none;border-radius:6px;flex:none;height:28px;padding:0 14px;font-size:12px;font-weight:600;transition:filter .12s}.BiQ1zG_confirmPrimary:hover:not(:disabled){filter:brightness(1.08)}.BiQ1zG_confirmPrimary:disabled{opacity:.55;cursor:default}.BiQ1zG_modalDesc{color:var(--hub-text-secondary);font-size:12px;line-height:18px}.BiQ1zG_trustHint{color:var(--hub-danger-text);background:var(--hub-danger-tint);border:1px solid var(--hub-danger-border-soft);border-radius:6px;padding:6px 10px;font-size:12px;font-weight:500;line-height:18px}.BiQ1zG_cliOnlyHint{color:var(--hub-text-secondary);background:var(--hub-bg-hover);border-radius:6px;padding:6px 10px;font-size:12px;line-height:18px}.BiQ1zG_failedCopyHint{color:var(--hub-danger-text);background:var(--hub-danger-tint);border:1px solid var(--hub-danger-border-soft);border-radius:6px;padding:6px 10px;font-size:12px;font-weight:500;line-height:18px}.BiQ1zG_modalRow{align-items:baseline;gap:8px;min-width:0;font-size:12px;line-height:18px;display:flex}.BiQ1zG_modalLabel{min-width:64px;color:var(--hub-text-tertiary);flex-shrink:0}.BiQ1zG_modalValue{text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--hub-text-primary);font-weight:500;overflow:hidden}.BiQ1zG_modalLink{text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--hub-brand);cursor:pointer;-webkit-user-select:none;user-select:none;align-items:center;gap:4px;font-weight:500;text-decoration:none;transition:color .12s;display:inline-flex;overflow:hidden}.BiQ1zG_modalLink:hover{color:var(--hub-brand-hover);text-decoration:underline}.BiQ1zG_linkIcon{flex-shrink:0}.BiQ1zG_modalCmd{color:var(--hub-text-primary);background:var(--hub-bg-2);border:1px solid var(--hub-border-2);cursor:pointer;-webkit-user-select:none;user-select:none;border-radius:6px;justify-content:space-between;align-items:center;gap:8px;padding:6px 6px 6px 10px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:11px;line-height:18px;transition:border-color .12s,background .12s;display:flex}.BiQ1zG_modalCmd:hover{border-color:var(--hub-border-ghost);background:var(--hub-bg-3)}.BiQ1zG_modalCmdText{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.BiQ1zG_modalCmdCopy{color:var(--hub-brand);cursor:pointer;-webkit-user-select:none;user-select:none;background:0 0;border:none;border-radius:4px;flex-shrink:0;align-items:center;gap:3px;padding:1px 7px;font-family:inherit;font-size:11px;line-height:16px;transition:color .12s,background .12s;display:inline-flex}.BiQ1zG_modalCmdCopy:hover{color:var(--hub-brand-hover);background:var(--hub-bg-2)}.BiQ1zG_modalActions{justify-content:flex-end;align-items:center;gap:8px;margin-top:2px;display:flex}.BiQ1zG_modalBody{flex-direction:column;flex:auto;gap:10px;min-height:0;display:flex;overflow-y:auto}.BiQ1zG_toast{z-index:1000;background:var(--hub-btn-fill);color:var(--hub-text-on-fill);pointer-events:none;white-space:nowrap;border:none;border-radius:8px;padding:10px 16px;font-size:12px;font-weight:500;line-height:18px;animation:.22s ease-out BiQ1zG_toastIn;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);box-shadow:0 6px 24px #00000047}@keyframes BiQ1zG_toastIn{0%{opacity:0;transform:translate(-50%,-44%)}to{opacity:1;transform:translate(-50%,-50%)}}.BiQ1zG_toastFail{background:var(--hub-danger);color:#fff;border-color:#ffffff3d}.BiQ1zG_queueSection{flex-direction:column;gap:6px;display:flex}.BiQ1zG_queueSectionTitle{color:var(--hub-text-secondary);padding:4px 2px 0;font-size:12px;font-weight:600;line-height:18px}.BiQ1zG_pendingRowStatus{color:var(--hub-warn);flex-shrink:0;font-weight:500}.BiQ1zG_pendingRowActions{flex-shrink:0;gap:8px;margin-left:auto;display:flex}.BiQ1zG_queueRow{border:1px solid var(--hub-border-2);background:var(--hub-bg-2);cursor:pointer;-webkit-user-select:none;user-select:none;border-radius:8px;flex-direction:column;gap:5px;padding:8px 10px;font-size:12px;line-height:18px;transition:background .12s;display:flex}.BiQ1zG_queueRow:hover{background:var(--hub-brand-tint)}.BiQ1zG_queueRowHead{align-items:center;gap:10px;display:flex}.BiQ1zG_queueRowTarget{text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--hub-text-primary);flex:1;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;overflow:hidden}.BiQ1zG_queueRowDesc{color:var(--hub-text-tertiary);-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.BiQ1zG_queueRowBody{align-items:center;gap:8px;display:flex}.BiQ1zG_queueRowStatus{color:var(--hub-brand);flex-shrink:0;font-weight:500}.BiQ1zG_queueRowTrack{flex:1;min-width:0}.BiQ1zG_queueRowPct{color:var(--hub-text-tertiary);font-variant-numeric:tabular-nums;flex-shrink:0}.BiQ1zG_stripCancel{color:var(--hub-text-secondary);cursor:pointer;-webkit-user-select:none;user-select:none;background:0 0;border:none;border-radius:6px;flex-shrink:0;padding:2px 10px;font-size:12px;line-height:18px;transition:background .12s,color .12s}.BiQ1zG_stripCancel:hover{background:var(--hub-danger-tint);color:var(--hub-danger-text)}.BiQ1zG_stripCancel:disabled{opacity:.45;cursor:default}.BiQ1zG_queuedHint{color:var(--hub-brand);background:var(--hub-brand-tint);border:1px solid var(--hub-brand-border-soft);border-radius:6px;padding:5px 10px;font-size:12px;line-height:18px}.BiQ1zG_errorTitle{color:var(--hub-danger-text);font-size:14px;font-weight:600;line-height:20px}.BiQ1zG_errorBox{border:1px solid var(--hub-danger-border);background:var(--hub-danger-tint-weak);max-height:72px;color:var(--hub-text-primary);white-space:pre-wrap;word-break:break-word;-webkit-user-select:none;user-select:none;border-radius:6px;margin:0;padding:10px 12px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:11px;line-height:17px;overflow:auto}.BiQ1zG_errorCopySoft{color:var(--hub-text-tertiary);cursor:pointer;-webkit-user-select:none;user-select:none;background:0 0;border:none;border-radius:4px;flex-shrink:0;align-items:center;padding:2px 8px;font-size:11px;line-height:16px;transition:color .12s,background .12s;display:inline-flex}.BiQ1zG_errorCopySoft:hover{color:var(--hub-text-secondary);background:var(--hub-bg-2)}.BiQ1zG_errorHint{color:var(--hub-text-tertiary);font-size:12px;line-height:18px}.BiQ1zG_modalCancel,.BiQ1zG_modalCopy{color:var(--hub-text-secondary);cursor:pointer;-webkit-user-select:none;user-select:none;background:0 0;border:none;border-radius:6px;padding:5px 14px;font-size:12px;line-height:18px;transition:color .12s,background .12s}.BiQ1zG_modalCancel:hover,.BiQ1zG_modalCopy:hover{color:var(--hub-text-primary);background:var(--hub-bg-hover)}.BiQ1zG_modalInstall{color:var(--hub-text-on-fill);background:var(--hub-btn-fill);cursor:pointer;-webkit-user-select:none;user-select:none;border:none;border-radius:6px;padding:5px 14px;font-size:12px;font-weight:600;line-height:18px;transition:background .12s}.BiQ1zG_modalInstall:hover{background:var(--hub-btn-hover)}.BiQ1zG_modalCopy:disabled,.BiQ1zG_modalInstall:disabled,.BiQ1zG_modalCancel:disabled,.BiQ1zG_modalClose:disabled,.BiQ1zG_uninstallConfirm:disabled{opacity:.55;cursor:not-allowed;pointer-events:none}.BiQ1zG_uninstallConfirm{color:#fff;background:var(--hub-danger);cursor:pointer;-webkit-user-select:none;user-select:none;border:none;border-radius:6px;padding:5px 14px;font-size:12px;font-weight:600;line-height:18px;transition:background .12s}.BiQ1zG_uninstallConfirm:hover{background:var(--hub-danger-hover)}.BiQ1zG_result{text-align:center;flex-direction:column;align-items:center;gap:5px;padding:10px 0 2px;display:flex}.BiQ1zG_resultCheck{background:var(--hub-success-tint);width:40px;height:40px;color:var(--hub-success);border-radius:50%;justify-content:center;align-items:center;margin-bottom:3px;display:inline-flex}.BiQ1zG_resultCheckIcon{flex-shrink:0;width:20px;height:20px}.BiQ1zG_resultTitle{color:var(--hub-text-primary);font-size:13px;font-weight:600;line-height:20px}.BiQ1zG_resultDesc{color:var(--hub-text-secondary);font-size:12px;line-height:18px}.BiQ1zG_resultRestarting{color:var(--hub-text-tertiary);padding:12px 0 6px;font-size:12px;line-height:18px}.BiQ1zG_restartLater{color:var(--hub-text-secondary);cursor:pointer;-webkit-user-select:none;user-select:none;background:0 0;border:none;border-radius:6px;padding:5px 14px;font-size:12px;line-height:18px;transition:color .12s,background .12s}.BiQ1zG_restartLater:hover{color:var(--hub-text-primary);background:var(--hub-bg-hover)}.BiQ1zG_restartNow{color:var(--hub-text-on-fill);background:var(--hub-btn-fill);cursor:pointer;-webkit-user-select:none;user-select:none;border:none;border-radius:6px;padding:5px 14px;font-size:12px;font-weight:600;line-height:18px;transition:background .12s}.BiQ1zG_restartNow:hover{background:var(--hub-btn-hover)}.BiQ1zG_restartNow:disabled{opacity:.55;cursor:not-allowed;pointer-events:none}.BiQ1zG_restartNowWarning{color:#fff;background:var(--hub-warning);cursor:pointer;-webkit-user-select:none;user-select:none;border:none;border-radius:6px;padding:5px 14px;font-size:12px;font-weight:600;line-height:18px;transition:background .12s}.BiQ1zG_restartNowWarning:hover{background:var(--hub-warning-hover)}.BiQ1zG_restartNowWarning:disabled{opacity:.55;cursor:not-allowed;pointer-events:none}.BiQ1zG_result .BiQ1zG_modalActions{justify-content:center;gap:10px;margin-top:0;padding:6px 0 2px}.BiQ1zG_result .BiQ1zG_modalActions .BiQ1zG_restartLater,.BiQ1zG_result .BiQ1zG_modalActions .BiQ1zG_restartNow,.BiQ1zG_result .BiQ1zG_modalActions .BiQ1zG_restartNowWarning{min-width:100px}.BiQ1zG_progress{margin:10px 0 2px}.BiQ1zG_progressHead{justify-content:flex-end;align-items:center;margin-bottom:3px;display:flex}.BiQ1zG_progressText{color:var(--hub-text-secondary);font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:11px;line-height:14px}.BiQ1zG_progressTrack{background:var(--hub-border-2);border-radius:2px;height:4px;overflow:hidden}.BiQ1zG_progressFill{background:var(--hub-brand);border-radius:2px;height:100%;transition:width .32s}.BiQ1zG_progressFillFail{background:var(--hub-danger)}@keyframes BiQ1zG_overlayIn{0%{opacity:0}to{opacity:1}}@keyframes BiQ1zG_modalIn{0%{opacity:0;transform:translateY(6px)scale(.98)}to{opacity:1;transform:translateY(0)scale(1)}}.BiQ1zG_failList{flex-direction:column;gap:12px;padding-right:2px;display:flex}.BiQ1zG_failRow{border:1px solid var(--hub-border-2);background:var(--hub-bg-2);border-radius:8px;flex-direction:column;gap:8px;padding:10px 12px;display:flex}.BiQ1zG_failHead{align-items:center;gap:8px;min-width:0;display:flex}.BiQ1zG_noticeList{flex-direction:column;gap:10px;padding-right:2px;display:flex}.BiQ1zG_noticeRow{border:1px solid var(--hub-border-2);background:var(--hub-bg-2);border-radius:8px;flex-direction:column;align-items:stretch;gap:6px;padding:10px 12px;display:flex}.BiQ1zG_noticeRowMain{align-items:center;gap:10px;width:100%;min-width:0;display:flex}.BiQ1zG_noticeBadgeOk,.BiQ1zG_noticeBadgeFail{border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;width:28px;height:28px;display:inline-flex;box-shadow:0 2px 6px #0000002e}.BiQ1zG_noticeBadgeOk{background:var(--hub-success)}.BiQ1zG_noticeBadgeFail{background:var(--hub-danger)}.BiQ1zG_noticeBadgeIcon{flex-shrink:0;width:12px;height:12px}.BiQ1zG_noticeMain{flex-direction:column;flex:1;gap:8px;min-width:0;display:flex}.BiQ1zG_noticeHead{align-items:center;gap:8px;min-width:0;display:flex}.BiQ1zG_noticeTextOk{color:var(--hub-success);flex-shrink:0;font-size:12px;font-weight:600;line-height:18px}.BiQ1zG_noticeTextFail{color:var(--hub-danger-text);flex-shrink:0;font-size:12px;font-weight:600;line-height:18px}.BiQ1zG_noticeFoot{justify-content:flex-end;align-items:center;display:flex}.BiQ1zG_noticeTime{color:var(--hub-text-tertiary);font-variant-numeric:tabular-nums;flex-shrink:0;font-size:11px;line-height:16px}.BiQ1zG_noticeRemove{width:22px;height:22px;color:var(--hub-text-tertiary);cursor:pointer;-webkit-user-select:none;user-select:none;background:0 0;border:none;border-radius:5px;flex-shrink:0;justify-content:center;align-items:center;margin-left:auto;transition:color .12s,background .12s;display:inline-flex}.BiQ1zG_noticeRemove:hover{color:var(--hub-danger-text);background:var(--hub-danger-tint)}.BiQ1zG_noticeRowOk .BiQ1zG_noticeRemove{margin-left:0}.BiQ1zG_noticeRowOk .BiQ1zG_noticeTime{margin-left:auto}.BiQ1zG_noticeRowUpdate{cursor:pointer;transition:border-color .12s,background .12s}.BiQ1zG_noticeRowUpdate:hover{border-color:var(--hub-brand);background:var(--hub-brand-tint)}.BiQ1zG_noticeVersion{color:var(--hub-brand);background:var(--hub-brand-tint);border:1px solid var(--hub-brand-border);font-variant-numeric:tabular-nums;border-radius:5px;flex-shrink:0;padding:0 6px;font-size:11px;font-weight:600;line-height:18px}.BiQ1zG_noticeUpdateGo{color:#fff;background:var(--hub-brand);cursor:pointer;-webkit-user-select:none;user-select:none;border:none;border-radius:5px;flex-shrink:0;margin-left:2px;padding:2px 8px;font-size:11px;font-weight:600;line-height:16px;transition:background .12s}.BiQ1zG_noticeUpdateGo:hover{background:var(--hub-brand-hover)}.BiQ1zG_noticeIgnore{color:var(--hub-text-secondary);border:1px solid var(--hub-border-2);cursor:pointer;-webkit-user-select:none;user-select:none;background:0 0;border-radius:5px;flex-shrink:0;margin-left:2px;padding:1px 8px;font-size:11px;font-weight:500;line-height:16px;transition:color .12s,border-color .12s,background .12s}.BiQ1zG_noticeIgnore:hover{color:var(--hub-danger-text);border-color:var(--hub-danger-border);background:var(--hub-danger-tint)}.BiQ1zG_failKind{border:1px solid #0000;border-radius:4px;flex-shrink:0;padding:0 6px;font-size:10px;font-weight:500;line-height:16px}.BiQ1zG_failKindInstall{color:var(--hub-danger-text);border-color:var(--hub-danger-border);background:var(--hub-danger-tint)}.BiQ1zG_failKindUninstall{color:var(--hub-warn);border-color:var(--hub-warn-border);background:var(--hub-warn-tint)}.BiQ1zG_failRepo{text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--hub-brand);cursor:pointer;-webkit-user-select:none;user-select:none;flex:1;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12px;line-height:18px;text-decoration:none;overflow:hidden}.BiQ1zG_failRepo:hover{text-decoration:none}a.BiQ1zG_failRepo{color:#2f6feb}.BiQ1zG_failRepoLabel{color:var(--hub-text-secondary)}a.BiQ1zG_failRepo:hover .BiQ1zG_failRepoUrl{text-decoration:underline}.BiQ1zG_failCopy{color:var(--hub-text-tertiary);cursor:pointer;-webkit-user-select:none;user-select:none;background:0 0;border:none;border-radius:4px;flex-shrink:0;align-items:center;padding:2px 8px;font-size:11px;line-height:16px;transition:color .12s,background .12s;display:inline-flex}.BiQ1zG_failCopy:hover{color:var(--hub-text-secondary);background:var(--hub-bg-2)}.BiQ1zG_failEmpty{text-align:center;color:var(--hub-text-tertiary);padding:24px 0;font-size:12px;line-height:18px}.BiQ1zG_failClear{color:var(--hub-danger);cursor:pointer;-webkit-user-select:none;user-select:none;background:0 0;border:none;border-radius:6px;padding:5px 14px;font-size:12px;line-height:18px;transition:color .12s,background .12s}.BiQ1zG_failClear:hover{color:#fff;background:var(--hub-danger)}.BiQ1zG_failBigIssue{box-sizing:border-box;text-align:center;color:#fff;background:var(--hub-danger);border:1px solid var(--hub-danger);cursor:pointer;-webkit-user-select:none;user-select:none;border-radius:8px;width:100%;margin-top:4px;padding:3px 16px;font-size:13px;font-weight:600;line-height:18px;text-decoration:none;transition:background .12s,border-color .12s,box-shadow .12s;display:block}.BiQ1zG_failBigIssue:hover{background:var(--hub-danger-hover);border-color:var(--hub-danger-hover);box-shadow:0 3px 10px #d1242f59}.BiQ1zG_failKindTitle{text-align:left;color:var(--hub-danger-text);margin-top:10px;font-size:15px;font-weight:700;line-height:22px}.BiQ1zG_failReason{white-space:pre-line;text-align:left;color:var(--hub-text-secondary);margin-top:2px;font-size:12.5px;font-weight:400;line-height:19px}.BiQ1zG_failPrepareHint{white-space:pre-line;text-align:left;color:var(--hub-warning);background:var(--hub-warning-tint);border:1px solid var(--hub-warning-border);border-radius:6px;margin-top:6px;margin-bottom:12px;padding:8px 12px;font-size:12px;line-height:18px}.BiQ1zG_failDiagBtn{box-sizing:border-box;text-align:center;width:100%;color:var(--hub-text-on-fill);background:var(--hub-btn-fill);cursor:pointer;-webkit-user-select:none;user-select:none;border:none;border-radius:8px;margin-top:8px;padding:5px 16px;font-size:13px;font-weight:600;line-height:18px;transition:background .12s,box-shadow .12s;display:block}.BiQ1zG_failDiagBtn:hover{background:var(--hub-btn-hover);box-shadow:0 3px 10px #0000001f}.BiQ1zG_failMisjudgeLink{color:var(--hub-text-tertiary);cursor:pointer;margin-top:6px;font-size:12px;line-height:18px;text-decoration:underline;display:inline-block}.BiQ1zG_failMisjudgeLink:hover{color:var(--hub-text-secondary)}.BiQ1zG_failNetworkTarget{word-break:break-all;color:var(--hub-danger);background:var(--hub-danger-tint);border:1px solid var(--hub-danger-border);border-radius:6px;margin-top:6px;padding:8px 12px;font-size:13px;font-weight:700;line-height:20px}.BiQ1zG_aboutModal{width:560px;max-width:calc(100vw - 48px)}.BiQ1zG_aboutContent{min-height:0;max-height:340px;color:var(--hub-text-secondary);background:var(--hub-bg-2);border:1px solid var(--hub-border-2);border-radius:8px;flex:auto;padding:10px 12px;font-size:12px;line-height:18px;overflow-y:auto}.BiQ1zG_aboutContent>:first-child{margin-top:0}.BiQ1zG_aboutContent>:last-child{margin-bottom:0}.BiQ1zG_aboutContent h2,.BiQ1zG_aboutContent h3,.BiQ1zG_aboutContent h4,.BiQ1zG_aboutContent h5{color:var(--hub-text-primary);margin:10px 0 4px;font-size:13px;font-weight:600;line-height:20px}.BiQ1zG_aboutContent h2{font-size:14px}.BiQ1zG_aboutContent p{margin:4px 0}.BiQ1zG_aboutContent ul,.BiQ1zG_aboutContent ol{margin:4px 0;padding-left:18px}.BiQ1zG_aboutContent li{margin:2px 0}.BiQ1zG_aboutContent code{background:var(--hub-bg-hover);color:var(--hub-text-primary);border-radius:4px;padding:1px 4px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:11px}.BiQ1zG_aboutContent pre{background:var(--hub-bg-1);border:1px solid var(--hub-border-2);border-radius:6px;margin:6px 0;padding:8px 10px;overflow-x:auto}.BiQ1zG_aboutContent pre code{background:0 0;border-radius:0;padding:0}.BiQ1zG_aboutContent blockquote{border-left:3px solid var(--hub-brand);background:var(--hub-bg-hover);color:var(--hub-text-tertiary);border-radius:0 6px 6px 0;margin:6px 0;padding:2px 10px}.BiQ1zG_aboutContent a{color:var(--hub-brand);text-decoration:none}.BiQ1zG_aboutContent a:hover{color:var(--hub-brand-hover);text-decoration:underline}.BiQ1zG_aboutContent img{border-radius:8px;max-width:100%;max-height:220px;margin:8px auto;display:block;box-shadow:0 2px 8px #0000001f}.BiQ1zG_aboutContent img[width=\"100\"]{object-fit:contain;width:100px;height:100px;max-height:100px}.BiQ1zG_aboutMeta{color:var(--hub-text-tertiary);font-size:11px;line-height:16px}.BiQ1zG_hubUpdateModal{width:620px;max-width:calc(100vw - 48px)}.BiQ1zG_hubUpdateMeta{flex-wrap:wrap;align-items:center;gap:4px 14px;font-size:12px;line-height:18px;display:flex}.BiQ1zG_hubUpdateMetaItem{color:var(--hub-text-tertiary)}.BiQ1zG_hubUpdateNotes{min-height:0;max-height:300px;color:var(--hub-text-secondary);background:var(--hub-bg-2);border:1px solid var(--hub-border-2);border-radius:8px;flex:auto;padding:10px 12px;font-size:12px;line-height:18px;overflow-y:auto}.BiQ1zG_hubUpdateNotes>:first-child{margin-top:0}.BiQ1zG_hubUpdateNotes>:last-child{margin-bottom:0}.BiQ1zG_hubUpdateNotes h2,.BiQ1zG_hubUpdateNotes h3,.BiQ1zG_hubUpdateNotes h4,.BiQ1zG_hubUpdateNotes h5{color:var(--hub-text-primary);margin:10px 0 4px;font-size:13px;font-weight:600;line-height:20px}.BiQ1zG_hubUpdateNotes h2{font-size:14px}.BiQ1zG_hubUpdateNotes p{margin:4px 0}.BiQ1zG_hubUpdateNotes ul,.BiQ1zG_hubUpdateNotes ol{margin:4px 0;padding-left:18px}.BiQ1zG_hubUpdateNotes li{margin:2px 0}.BiQ1zG_hubUpdateNotes code{background:var(--hub-bg-hover);color:var(--hub-text-primary);border-radius:4px;padding:1px 4px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:11px}.BiQ1zG_hubUpdateNotes pre{background:var(--hub-bg-1);border:1px solid var(--hub-border-2);border-radius:6px;margin:6px 0;padding:8px 10px;overflow-x:auto}.BiQ1zG_hubUpdateNotes pre code{background:0 0;border-radius:0;padding:0}.BiQ1zG_hubUpdateNotes blockquote{border-left:3px solid var(--hub-brand);background:var(--hub-bg-hover);color:var(--hub-text-tertiary);border-radius:0 6px 6px 0;margin:6px 0;padding:2px 10px}.BiQ1zG_hubUpdateNotes a{color:var(--hub-brand);text-decoration:none}.BiQ1zG_hubUpdateNotes a:hover{color:var(--hub-brand-hover);text-decoration:underline}.BiQ1zG_detailModal{width:580px;max-width:calc(100vw - 48px)}.BiQ1zG_detailUpdateHint{color:var(--hub-brand);background:var(--hub-brand-tint);border:1px solid var(--hub-brand-border-soft);border-radius:6px;padding:6px 10px;font-size:12px;line-height:18px}.BiQ1zG_detailGrid{flex-direction:column;gap:6px;display:flex}.BiQ1zG_detailRow{align-items:baseline;gap:10px;min-width:0;font-size:12px;line-height:20px;display:flex}.BiQ1zG_detailLabel{text-align:right;width:76px;color:var(--hub-text-tertiary);flex-shrink:0}.BiQ1zG_detailValue{min-width:0;color:var(--hub-text-primary);flex-wrap:wrap;flex:auto;align-items:baseline;gap:4px 6px;font-weight:500;display:flex}.BiQ1zG_detailMono{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:11px;font-weight:500}.BiQ1zG_detailArrow{color:var(--hub-text-tertiary);align-items:baseline;gap:4px;display:inline-flex}.BiQ1zG_detailDim{color:var(--hub-text-tertiary);font-size:11px;font-weight:400}.BiQ1zG_detailLink{min-width:0;color:var(--hub-brand);cursor:pointer;-webkit-user-select:none;user-select:none;align-items:center;gap:4px;font-weight:500;text-decoration:none;transition:color .12s;display:inline-flex}.BiQ1zG_detailLink:hover{color:var(--hub-brand-hover);text-decoration:underline}.BiQ1zG_detailStars{color:#b45309;font-weight:600}.BiQ1zG_detailPath{min-width:0;color:var(--hub-text-primary);background:var(--hub-bg-2);border:1px solid var(--hub-border-2);border-radius:6px;flex:auto;justify-content:space-between;align-items:center;gap:6px;padding:3px 3px 3px 8px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:11px;line-height:18px;transition:border-color .12s,background .12s;display:flex}.BiQ1zG_detailPath:hover{border-color:var(--hub-border-ghost);background:var(--hub-bg-3)}.BiQ1zG_detailPathText{text-overflow:ellipsis;white-space:nowrap;cursor:pointer;-webkit-user-select:none;user-select:none;min-width:0;overflow:hidden}.BiQ1zG_detailPathActions{flex-shrink:0;align-items:center;gap:4px;display:inline-flex}.BiQ1zG_detailPathBtn{width:28px;height:28px;color:var(--hub-brand);background:var(--hub-brand-tint);border:1px solid var(--hub-brand-border-soft);cursor:pointer;-webkit-user-select:none;user-select:none;border-radius:6px;justify-content:center;align-items:center;transition:color .12s,background .12s,border-color .12s;display:inline-flex}.BiQ1zG_detailPathBtn svg{width:15px;height:15px}.BiQ1zG_detailPathBtn:hover{color:#fff;background:var(--hub-brand);border-color:var(--hub-brand)}.BiQ1zG_detailStatusRunning,.BiQ1zG_detailStatusPending{border-radius:50%;flex-shrink:0;align-self:center;width:8px;height:8px}.BiQ1zG_detailStatusRunning{background:var(--hub-success)}.BiQ1zG_detailStatusPending{background:var(--hub-warning)}.BiQ1zG_detailStatusText{font-weight:500}";
|
|
795
871
|
const tagId$10 = "dsh-plugin/Modal.module.css";
|
|
796
872
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$10) + "]") === null) {
|
|
797
873
|
const tag = document.createElement("style");
|
|
@@ -806,153 +882,157 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
806
882
|
css: css$10
|
|
807
883
|
});
|
|
808
884
|
var Modal_module_css_default = {
|
|
809
|
-
"
|
|
810
|
-
"
|
|
811
|
-
"
|
|
812
|
-
"
|
|
813
|
-
"
|
|
885
|
+
"failKindInstall": "BiQ1zG_failKindInstall",
|
|
886
|
+
"queueRowHead": "BiQ1zG_queueRowHead",
|
|
887
|
+
"modalValue": "BiQ1zG_modalValue",
|
|
888
|
+
"stripCancel": "BiQ1zG_stripCancel",
|
|
889
|
+
"failDiagBtn": "BiQ1zG_failDiagBtn",
|
|
890
|
+
"detailDim": "BiQ1zG_detailDim",
|
|
891
|
+
"failClear": "BiQ1zG_failClear",
|
|
892
|
+
"toastIn": "BiQ1zG_toastIn",
|
|
893
|
+
"aboutContent": "BiQ1zG_aboutContent",
|
|
894
|
+
"detailStatusPending": "BiQ1zG_detailStatusPending",
|
|
895
|
+
"failCopy": "BiQ1zG_failCopy",
|
|
896
|
+
"failRow": "BiQ1zG_failRow",
|
|
897
|
+
"noticeList": "BiQ1zG_noticeList",
|
|
814
898
|
"detailPathBtn": "BiQ1zG_detailPathBtn",
|
|
815
|
-
"
|
|
816
|
-
"
|
|
817
|
-
"
|
|
818
|
-
"
|
|
819
|
-
"
|
|
820
|
-
"
|
|
821
|
-
"
|
|
899
|
+
"helpModal": "BiQ1zG_helpModal",
|
|
900
|
+
"resultRestarting": "BiQ1zG_resultRestarting",
|
|
901
|
+
"failKindUninstall": "BiQ1zG_failKindUninstall",
|
|
902
|
+
"detailStars": "BiQ1zG_detailStars",
|
|
903
|
+
"confirmIconWrap": "BiQ1zG_confirmIconWrap",
|
|
904
|
+
"detailArrow": "BiQ1zG_detailArrow",
|
|
905
|
+
"failedCopyHint": "BiQ1zG_failedCopyHint",
|
|
906
|
+
"progressHead": "BiQ1zG_progressHead",
|
|
907
|
+
"detailLabel": "BiQ1zG_detailLabel",
|
|
822
908
|
"queueRowStatus": "BiQ1zG_queueRowStatus",
|
|
823
|
-
"
|
|
909
|
+
"modalWide": "BiQ1zG_modalWide",
|
|
910
|
+
"failEmpty": "BiQ1zG_failEmpty",
|
|
911
|
+
"overlayIn": "BiQ1zG_overlayIn",
|
|
912
|
+
"failReason": "BiQ1zG_failReason",
|
|
913
|
+
"modalIn": "BiQ1zG_modalIn",
|
|
914
|
+
"modalCancel": "BiQ1zG_modalCancel",
|
|
915
|
+
"modalLabel": "BiQ1zG_modalLabel",
|
|
916
|
+
"logModal": "BiQ1zG_logModal",
|
|
917
|
+
"failMisjudgeLink": "BiQ1zG_failMisjudgeLink",
|
|
918
|
+
"hubUpdateModal": "BiQ1zG_hubUpdateModal",
|
|
919
|
+
"modalTitleBusy": "BiQ1zG_modalTitleBusy",
|
|
920
|
+
"detailGrid": "BiQ1zG_detailGrid",
|
|
921
|
+
"progressFillFail": "BiQ1zG_progressFillFail",
|
|
922
|
+
"detailValue": "BiQ1zG_detailValue",
|
|
923
|
+
"overlay": "BiQ1zG_overlay",
|
|
924
|
+
"modalActions": "BiQ1zG_modalActions",
|
|
925
|
+
"uninstallConfirm": "BiQ1zG_uninstallConfirm",
|
|
926
|
+
"noticeFoot": "BiQ1zG_noticeFoot",
|
|
927
|
+
"pendingRowActions": "BiQ1zG_pendingRowActions",
|
|
928
|
+
"detailLink": "BiQ1zG_detailLink",
|
|
929
|
+
"modalDesc": "BiQ1zG_modalDesc",
|
|
824
930
|
"failPrepareHint": "BiQ1zG_failPrepareHint",
|
|
931
|
+
"hubUpdateNotes": "BiQ1zG_hubUpdateNotes",
|
|
932
|
+
"failNetworkTarget": "BiQ1zG_failNetworkTarget",
|
|
933
|
+
"noticeTime": "BiQ1zG_noticeTime",
|
|
934
|
+
"errorTitle": "BiQ1zG_errorTitle",
|
|
935
|
+
"hubUpdateMetaItem": "BiQ1zG_hubUpdateMetaItem",
|
|
936
|
+
"queueSectionTitle": "BiQ1zG_queueSectionTitle",
|
|
937
|
+
"aboutMeta": "BiQ1zG_aboutMeta",
|
|
938
|
+
"pendingRowStatus": "BiQ1zG_pendingRowStatus",
|
|
825
939
|
"queueRow": "BiQ1zG_queueRow",
|
|
826
|
-
"
|
|
827
|
-
"failList": "BiQ1zG_failList",
|
|
828
|
-
"detailArrow": "BiQ1zG_detailArrow",
|
|
829
|
-
"noticeList": "BiQ1zG_noticeList",
|
|
830
|
-
"failKindUninstall": "BiQ1zG_failKindUninstall",
|
|
831
|
-
"modalLabel": "BiQ1zG_modalLabel",
|
|
940
|
+
"detailPathActions": "BiQ1zG_detailPathActions",
|
|
832
941
|
"errorBox": "BiQ1zG_errorBox",
|
|
833
|
-
"resultCheck": "BiQ1zG_resultCheck",
|
|
834
|
-
"progressTrack": "BiQ1zG_progressTrack",
|
|
835
942
|
"confirmIcon": "BiQ1zG_confirmIcon",
|
|
836
|
-
"modalClose": "BiQ1zG_modalClose",
|
|
837
|
-
"linkIcon": "BiQ1zG_linkIcon",
|
|
838
|
-
"queueSection": "BiQ1zG_queueSection",
|
|
839
|
-
"stripCancel": "BiQ1zG_stripCancel",
|
|
840
|
-
"confirmPrimary": "BiQ1zG_confirmPrimary",
|
|
841
|
-
"progressFill": "BiQ1zG_progressFill",
|
|
842
|
-
"noticeRow": "BiQ1zG_noticeRow",
|
|
843
943
|
"noticeTextOk": "BiQ1zG_noticeTextOk",
|
|
844
|
-
"
|
|
845
|
-
"
|
|
846
|
-
"
|
|
847
|
-
"
|
|
944
|
+
"queueRowTarget": "BiQ1zG_queueRowTarget",
|
|
945
|
+
"restartLater": "BiQ1zG_restartLater",
|
|
946
|
+
"progressTrack": "BiQ1zG_progressTrack",
|
|
947
|
+
"noticeRow": "BiQ1zG_noticeRow",
|
|
948
|
+
"result": "BiQ1zG_result",
|
|
949
|
+
"restartNowWarning": "BiQ1zG_restartNowWarning",
|
|
950
|
+
"cliOnlyHint": "BiQ1zG_cliOnlyHint",
|
|
951
|
+
"resultDesc": "BiQ1zG_resultDesc",
|
|
952
|
+
"noticeBadgeFail": "BiQ1zG_noticeBadgeFail",
|
|
953
|
+
"errorCopySoft": "BiQ1zG_errorCopySoft",
|
|
954
|
+
"failBigIssue": "BiQ1zG_failBigIssue",
|
|
955
|
+
"noticeTextFail": "BiQ1zG_noticeTextFail",
|
|
956
|
+
"detailUpdateHint": "BiQ1zG_detailUpdateHint",
|
|
957
|
+
"confirmIconDanger": "BiQ1zG_confirmIconDanger",
|
|
958
|
+
"modalInstall": "BiQ1zG_modalInstall",
|
|
959
|
+
"modalCmdText": "BiQ1zG_modalCmdText",
|
|
848
960
|
"detailStatusRunning": "BiQ1zG_detailStatusRunning",
|
|
961
|
+
"modal": "BiQ1zG_modal",
|
|
962
|
+
"linkIcon": "BiQ1zG_linkIcon",
|
|
963
|
+
"modalLink": "BiQ1zG_modalLink",
|
|
964
|
+
"queueRowBody": "BiQ1zG_queueRowBody",
|
|
965
|
+
"modalBody": "BiQ1zG_modalBody",
|
|
966
|
+
"noticeRowUpdate": "BiQ1zG_noticeRowUpdate",
|
|
967
|
+
"modalRow": "BiQ1zG_modalRow",
|
|
968
|
+
"progressText": "BiQ1zG_progressText",
|
|
969
|
+
"noticeIgnore": "BiQ1zG_noticeIgnore",
|
|
970
|
+
"noticeBadgeOk": "BiQ1zG_noticeBadgeOk",
|
|
971
|
+
"detailPath": "BiQ1zG_detailPath",
|
|
849
972
|
"modalHead": "BiQ1zG_modalHead",
|
|
850
|
-
"
|
|
851
|
-
"
|
|
852
|
-
"
|
|
853
|
-
"noticeTime": "BiQ1zG_noticeTime",
|
|
854
|
-
"toastFail": "BiQ1zG_toastFail",
|
|
855
|
-
"modalWide": "BiQ1zG_modalWide",
|
|
856
|
-
"hubUpdateMeta": "BiQ1zG_hubUpdateMeta",
|
|
857
|
-
"confirmIconWrap": "BiQ1zG_confirmIconWrap",
|
|
858
|
-
"detailStars": "BiQ1zG_detailStars",
|
|
859
|
-
"queueSectionTitle": "BiQ1zG_queueSectionTitle",
|
|
860
|
-
"resultCheckIcon": "BiQ1zG_resultCheckIcon",
|
|
861
|
-
"noticeBadgeFail": "BiQ1zG_noticeBadgeFail",
|
|
973
|
+
"failKind": "BiQ1zG_failKind",
|
|
974
|
+
"aboutModal": "BiQ1zG_aboutModal",
|
|
975
|
+
"modalCmd": "BiQ1zG_modalCmd",
|
|
862
976
|
"noticeHead": "BiQ1zG_noticeHead",
|
|
863
|
-
"
|
|
864
|
-
"
|
|
865
|
-
"
|
|
866
|
-
"
|
|
867
|
-
"
|
|
868
|
-
"
|
|
869
|
-
"
|
|
977
|
+
"noticeVersion": "BiQ1zG_noticeVersion",
|
|
978
|
+
"dangerConfirm": "BiQ1zG_dangerConfirm",
|
|
979
|
+
"queueSection": "BiQ1zG_queueSection",
|
|
980
|
+
"detailPathText": "BiQ1zG_detailPathText",
|
|
981
|
+
"progress": "BiQ1zG_progress",
|
|
982
|
+
"noticeUpdateGo": "BiQ1zG_noticeUpdateGo",
|
|
983
|
+
"confirmPrimary": "BiQ1zG_confirmPrimary",
|
|
984
|
+
"modalCopy": "BiQ1zG_modalCopy",
|
|
985
|
+
"noticeRemove": "BiQ1zG_noticeRemove",
|
|
986
|
+
"failRepoLabel": "BiQ1zG_failRepoLabel",
|
|
870
987
|
"trustHint": "BiQ1zG_trustHint",
|
|
871
|
-
"
|
|
872
|
-
"
|
|
873
|
-
"
|
|
988
|
+
"queueRowDesc": "BiQ1zG_queueRowDesc",
|
|
989
|
+
"resultTitle": "BiQ1zG_resultTitle",
|
|
990
|
+
"failRepo": "BiQ1zG_failRepo",
|
|
874
991
|
"modalTitle": "BiQ1zG_modalTitle",
|
|
875
|
-
"
|
|
876
|
-
"
|
|
877
|
-
"
|
|
878
|
-
"detailStatusPending": "BiQ1zG_detailStatusPending",
|
|
879
|
-
"failBigIssue": "BiQ1zG_failBigIssue",
|
|
880
|
-
"modalRow": "BiQ1zG_modalRow",
|
|
881
|
-
"noticeFoot": "BiQ1zG_noticeFoot",
|
|
882
|
-
"modalCmdCopy": "BiQ1zG_modalCmdCopy",
|
|
883
|
-
"queueRowPct": "BiQ1zG_queueRowPct",
|
|
884
|
-
"failedCopyHint": "BiQ1zG_failedCopyHint",
|
|
885
|
-
"modalCancel": "BiQ1zG_modalCancel",
|
|
886
|
-
"queueRowBody": "BiQ1zG_queueRowBody",
|
|
887
|
-
"failDiagBtn": "BiQ1zG_failDiagBtn",
|
|
888
|
-
"failMisjudgeLink": "BiQ1zG_failMisjudgeLink",
|
|
889
|
-
"logModal": "BiQ1zG_logModal",
|
|
890
|
-
"cliOnlyHint": "BiQ1zG_cliOnlyHint",
|
|
891
|
-
"failClear": "BiQ1zG_failClear",
|
|
992
|
+
"toast": "BiQ1zG_toast",
|
|
993
|
+
"toastFail": "BiQ1zG_toastFail",
|
|
994
|
+
"failList": "BiQ1zG_failList",
|
|
892
995
|
"noticeRowMain": "BiQ1zG_noticeRowMain",
|
|
996
|
+
"hubUpdateMeta": "BiQ1zG_hubUpdateMeta",
|
|
997
|
+
"detailMono": "BiQ1zG_detailMono",
|
|
998
|
+
"queuedHint": "BiQ1zG_queuedHint",
|
|
999
|
+
"errorHint": "BiQ1zG_errorHint",
|
|
1000
|
+
"queueRowTrack": "BiQ1zG_queueRowTrack",
|
|
1001
|
+
"resultCheck": "BiQ1zG_resultCheck",
|
|
1002
|
+
"restartNow": "BiQ1zG_restartNow",
|
|
1003
|
+
"noticeMain": "BiQ1zG_noticeMain",
|
|
1004
|
+
"failRepoUrl": "BiQ1zG_failRepoUrl",
|
|
1005
|
+
"errorModal": "BiQ1zG_errorModal",
|
|
1006
|
+
"modalClose": "BiQ1zG_modalClose",
|
|
893
1007
|
"detailStatusText": "BiQ1zG_detailStatusText",
|
|
894
|
-
"
|
|
895
|
-
"
|
|
896
|
-
"result": "BiQ1zG_result",
|
|
897
|
-
"noticeTextFail": "BiQ1zG_noticeTextFail",
|
|
1008
|
+
"queueRowPct": "BiQ1zG_queueRowPct",
|
|
1009
|
+
"resultCheckIcon": "BiQ1zG_resultCheckIcon",
|
|
898
1010
|
"failHead": "BiQ1zG_failHead",
|
|
899
|
-
"
|
|
900
|
-
"detailPath": "BiQ1zG_detailPath",
|
|
901
|
-
"hubUpdateModal": "BiQ1zG_hubUpdateModal",
|
|
902
|
-
"failRepo": "BiQ1zG_failRepo",
|
|
903
|
-
"uninstallConfirm": "BiQ1zG_uninstallConfirm",
|
|
904
|
-
"modalBody": "BiQ1zG_modalBody",
|
|
905
|
-
"modalValue": "BiQ1zG_modalValue",
|
|
906
|
-
"helpModal": "BiQ1zG_helpModal",
|
|
907
|
-
"failEmpty": "BiQ1zG_failEmpty",
|
|
908
|
-
"modalCmd": "BiQ1zG_modalCmd",
|
|
1011
|
+
"detailRow": "BiQ1zG_detailRow",
|
|
909
1012
|
"noticeRowOk": "BiQ1zG_noticeRowOk",
|
|
910
|
-
"detailLink": "BiQ1zG_detailLink",
|
|
911
|
-
"modalIn": "BiQ1zG_modalIn",
|
|
912
|
-
"noticeUpdateGo": "BiQ1zG_noticeUpdateGo",
|
|
913
|
-
"confirmIconDanger": "BiQ1zG_confirmIconDanger",
|
|
914
|
-
"overlay": "BiQ1zG_overlay",
|
|
915
|
-
"toastIn": "BiQ1zG_toastIn",
|
|
916
|
-
"queueRowDesc": "BiQ1zG_queueRowDesc",
|
|
917
1013
|
"noticeBadgeIcon": "BiQ1zG_noticeBadgeIcon",
|
|
918
|
-
"
|
|
919
|
-
"
|
|
920
|
-
"
|
|
921
|
-
"
|
|
922
|
-
"
|
|
923
|
-
"
|
|
924
|
-
"failKind": "BiQ1zG_failKind",
|
|
925
|
-
"progressText": "BiQ1zG_progressText",
|
|
926
|
-
"resultRestarting": "BiQ1zG_resultRestarting",
|
|
927
|
-
"failNetworkTarget": "BiQ1zG_failNetworkTarget",
|
|
928
|
-
"modalLink": "BiQ1zG_modalLink",
|
|
929
|
-
"detailGrid": "BiQ1zG_detailGrid",
|
|
930
|
-
"overlayIn": "BiQ1zG_overlayIn",
|
|
931
|
-
"progress": "BiQ1zG_progress",
|
|
932
|
-
"aboutModal": "BiQ1zG_aboutModal",
|
|
933
|
-
"detailLabel": "BiQ1zG_detailLabel",
|
|
934
|
-
"modalTitleQueued": "BiQ1zG_modalTitleQueued",
|
|
935
|
-
"restartLater": "BiQ1zG_restartLater",
|
|
936
|
-
"queueRowTrack": "BiQ1zG_queueRowTrack",
|
|
937
|
-
"queuedHint": "BiQ1zG_queuedHint",
|
|
938
|
-
"modal": "BiQ1zG_modal",
|
|
939
|
-
"detailPathText": "BiQ1zG_detailPathText"
|
|
1014
|
+
"modalCmdCopy": "BiQ1zG_modalCmdCopy",
|
|
1015
|
+
"failKindTitle": "BiQ1zG_failKindTitle",
|
|
1016
|
+
"progressFill": "BiQ1zG_progressFill",
|
|
1017
|
+
"modalCloseIcon": "BiQ1zG_modalCloseIcon",
|
|
1018
|
+
"detailModal": "BiQ1zG_detailModal",
|
|
1019
|
+
"modalTitleQueued": "BiQ1zG_modalTitleQueued"
|
|
940
1020
|
};
|
|
941
1021
|
//#endregion
|
|
942
1022
|
//#region src/server/services/install/release-target.ts
|
|
943
|
-
/**
|
|
944
|
-
const DSH_PLUGIN_CMD_RE
|
|
1023
|
+
/** 完整命令前缀:`dsh plugin --profile <p> add|update <target>`(与 profile.ts installTargetOf 同口径)。 */
|
|
1024
|
+
const DSH_PLUGIN_CMD_RE = /^dsh[ \t]+plugin[ \t]+--profile(?:[ \t]+|=)[A-Za-z0-9_-]+[ \t]+(?:add|update)[ \t]+(.+)$/i;
|
|
945
1025
|
/** 固定形态的 release .tgz 直链:主机、路径段与扩展名全部锁死。 */
|
|
946
1026
|
const RELEASE_URL_RE = /^https:\/\/github\.com\/([A-Za-z0-9._-]+)\/([A-Za-z0-9._-]+)\/releases\/download\/([A-Za-z0-9._+-]+)\/([A-Za-z0-9._+-]+\.tgz)$/;
|
|
947
1027
|
/**
|
|
948
|
-
*
|
|
949
|
-
* @param value -
|
|
1028
|
+
* 解析一个历史安装目标里的 release 直链。
|
|
1029
|
+
* @param value - 完整命令(`dsh plugin --profile web add <url>`)或裸直链。
|
|
950
1030
|
* @returns 命中返回 `{ target, repo }`,否则 null。
|
|
951
1031
|
*/
|
|
952
1032
|
function githubReleaseTarget(value) {
|
|
953
1033
|
const input = typeof value === "string" ? value.trim() : "";
|
|
954
1034
|
if (input === "") return null;
|
|
955
|
-
const command = DSH_PLUGIN_CMD_RE
|
|
1035
|
+
const command = DSH_PLUGIN_CMD_RE.exec(input);
|
|
956
1036
|
const raw = command !== null ? command[1].trim() : input;
|
|
957
1037
|
const match = RELEASE_URL_RE.exec(raw);
|
|
958
1038
|
if (match === null) return null;
|
|
@@ -964,54 +1044,30 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
964
1044
|
}
|
|
965
1045
|
//#endregion
|
|
966
1046
|
//#region src/client/logic/install-command.ts
|
|
967
|
-
/**
|
|
968
|
-
*
|
|
1047
|
+
/** 后端 attempts 按时间先后排列:取最后一次实际执行的命令,取不到再回退到展示用命令。
|
|
1048
|
+
* 这里匹配的是任务队列记录的指令形态,不是要在此执行的命令。
|
|
969
1049
|
*/
|
|
970
1050
|
function executedCommandOf(command, attempts) {
|
|
971
1051
|
if (attempts === void 0) return command;
|
|
972
1052
|
return attempts.slice().reverse().find((attempt) => /^dsh plugin --profile(?:=| )\S+ (?:add|remove|update) \S/.test(attempt) || /^npm install -g \S/.test(attempt));
|
|
973
1053
|
}
|
|
974
1054
|
/**
|
|
975
|
-
*
|
|
976
|
-
* (走 npm registry tarball
|
|
977
|
-
*
|
|
978
|
-
* 都没有 → git 直装。
|
|
979
|
-
* 返回值 target 即传给后端 /install 的安装目标(npm 包名 / release URL / owner/repo)。
|
|
1055
|
+
* 目录条目的安装目标(用户无感知):目录条目必带 npm 包名,直接用该包名安装
|
|
1056
|
+
* (走 npm registry tarball)。
|
|
1057
|
+
* 返回值即传给后端 /install 的安装目标(npm 包名)。
|
|
980
1058
|
*/
|
|
981
1059
|
function installTargetOf(p) {
|
|
982
|
-
|
|
983
|
-
const repo = (p.source?.repo ?? "").trim();
|
|
984
|
-
if (pkg && repo) return {
|
|
985
|
-
target: pkg,
|
|
986
|
-
via: "npm"
|
|
987
|
-
};
|
|
988
|
-
const release = githubReleaseTarget(p.install?.githubCommand ?? "");
|
|
989
|
-
if (release !== null && repo !== "" && release.repo.toLowerCase() === repo.toLowerCase()) return {
|
|
990
|
-
target: release.target,
|
|
991
|
-
via: "release"
|
|
992
|
-
};
|
|
993
|
-
return {
|
|
994
|
-
target: repo,
|
|
995
|
-
via: "github"
|
|
996
|
-
};
|
|
1060
|
+
return (p.source?.npmPackage ?? "").trim();
|
|
997
1061
|
}
|
|
998
1062
|
/** 展示用安装命令(复制/弹窗):目录下发的权威命令优先(CLI-only 插件如 dsh-tui
|
|
999
|
-
* 需专属 profile(--profile dsh-tui),无法从
|
|
1000
|
-
*
|
|
1063
|
+
* 需专属 profile(--profile dsh-tui),无法从 npm 包名推断,必须用官方命令);
|
|
1064
|
+
* 常规插件无目录命令时用 npm 包名回退生成。 */
|
|
1001
1065
|
function installCommandOf(p, withProfile = false) {
|
|
1002
|
-
const
|
|
1003
|
-
if (
|
|
1004
|
-
|
|
1005
|
-
if (cmd) return cmd;
|
|
1006
|
-
} else {
|
|
1007
|
-
const cmd = p.install?.githubCommand;
|
|
1008
|
-
if (cmd) return cmd;
|
|
1009
|
-
}
|
|
1010
|
-
const prefix = `dsh plugin${withProfile ? " --profile web" : ""} add `;
|
|
1011
|
-
if (via === "npm" || via === "release") return `${prefix}${target}`;
|
|
1012
|
-
return `${prefix}git+https://github.com/${target}.git`;
|
|
1066
|
+
const cmd = p.install?.command;
|
|
1067
|
+
if (cmd) return cmd;
|
|
1068
|
+
return `${`dsh plugin${withProfile ? " --profile web" : ""} add `}${installTargetOf(p)}`;
|
|
1013
1069
|
}
|
|
1014
|
-
/**
|
|
1070
|
+
/** 把任务/安装目标归一化为 owner/repo 展示身份。 */
|
|
1015
1071
|
function repoFromInstallTarget(value) {
|
|
1016
1072
|
const input = value.trim();
|
|
1017
1073
|
const release = githubReleaseTarget(input);
|
|
@@ -1050,7 +1106,7 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
1050
1106
|
* tsdown 构建时用 define 把 __PLUGIN_VERSION__ 替换成 package.json 的版本号;
|
|
1051
1107
|
* node --test 直接 import 本模块时该标识符不存在,typeof 守卫兜底为空串。
|
|
1052
1108
|
*/
|
|
1053
|
-
const PLUGIN_VERSION = "
|
|
1109
|
+
const PLUGIN_VERSION = "2.0.1";
|
|
1054
1110
|
const CATEGORY_ORDER = [
|
|
1055
1111
|
"interface",
|
|
1056
1112
|
"session",
|
|
@@ -1169,7 +1225,7 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
1169
1225
|
];
|
|
1170
1226
|
//#endregion
|
|
1171
1227
|
//#region src/client/logic/ensure-plugin-css.ts
|
|
1172
|
-
/**
|
|
1228
|
+
/** 补注入 DOM 中缺失的已登记样式表,幂等。 */
|
|
1173
1229
|
function ensurePluginCss() {
|
|
1174
1230
|
if (typeof document === "undefined") return;
|
|
1175
1231
|
const registry = window.__DSH_PLUGIN_CSS__;
|
|
@@ -1203,6 +1259,22 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
1203
1259
|
return null;
|
|
1204
1260
|
}
|
|
1205
1261
|
}
|
|
1262
|
+
/** 批量查询已安装插件 npm 包的最新版本发布时间(供应链门禁用);失败返回 null(调用方按原逻辑照常提示)。 */
|
|
1263
|
+
async function fetchNpmReleaseAge(packages) {
|
|
1264
|
+
if (packages.length === 0) return {};
|
|
1265
|
+
try {
|
|
1266
|
+
const res = await fetch("/dsh-plugin-hub/npm-release-age", {
|
|
1267
|
+
method: "POST",
|
|
1268
|
+
headers: { "content-type": "application/json" },
|
|
1269
|
+
body: JSON.stringify({ packages }),
|
|
1270
|
+
cache: "no-store"
|
|
1271
|
+
});
|
|
1272
|
+
if (!res.ok) return null;
|
|
1273
|
+
return (await res.json()).packages ?? null;
|
|
1274
|
+
} catch {
|
|
1275
|
+
return null;
|
|
1276
|
+
}
|
|
1277
|
+
}
|
|
1206
1278
|
let envPromise = null;
|
|
1207
1279
|
/** 在系统文件管理器里定位并打开已安装插件的目录(服务端 spawn open,跨平台);失败返回 false。 */
|
|
1208
1280
|
async function revealInstallFolder(name) {
|
|
@@ -1362,13 +1434,32 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
1362
1434
|
}
|
|
1363
1435
|
}
|
|
1364
1436
|
//#endregion
|
|
1437
|
+
//#region src/client/logic/release-age.ts
|
|
1438
|
+
/**
|
|
1439
|
+
* DSH Plugin Hub — the community plugin marketplace for DeepSeek Harness.
|
|
1440
|
+
* Website: https://dsh-plugin.org
|
|
1441
|
+
* GitHub: https://github.com/dshplugin/dsh-plugin-hub
|
|
1442
|
+
*
|
|
1443
|
+
* 供应链门禁的时间判定(纯函数):pnpm 会静默回退发布未满门槛的版本,
|
|
1444
|
+
* 故发布太新的版本不该提示更新。Hub 自身更新与插件更新共用同一门槛。
|
|
1445
|
+
*/
|
|
1446
|
+
/** pnpm 供应链门禁:dsh profile 默认 minimumReleaseAge=1440(分钟);+30 分钟缓冲抵消网络/CDN 边缘时间偏差。 */
|
|
1447
|
+
const MIN_RELEASE_AGE_MS = 882e5;
|
|
1448
|
+
/** 发布时间是否仍在门禁窗口内(太新 → 暂缓提示);无值/解析不出返回 false(不拦真实更新)。 */
|
|
1449
|
+
function isReleaseTooFresh(publishedAt, now) {
|
|
1450
|
+
if (typeof publishedAt !== "string" || publishedAt === "") return false;
|
|
1451
|
+
const ms = Date.parse(publishedAt);
|
|
1452
|
+
if (Number.isNaN(ms)) return false;
|
|
1453
|
+
return now - ms < MIN_RELEASE_AGE_MS;
|
|
1454
|
+
}
|
|
1455
|
+
//#endregion
|
|
1365
1456
|
//#region src/client/logic/installed.ts
|
|
1366
1457
|
/** 安装时记录的目录信号(按仓库小写 key 查表)。 */
|
|
1367
1458
|
function signalOf(repo, versions) {
|
|
1368
1459
|
if (!repo) return null;
|
|
1369
1460
|
return versions[repo.toLowerCase()] ?? null;
|
|
1370
1461
|
}
|
|
1371
|
-
/** 插件是否已安装:匹配 Git spec 中的 owner/repo,或 npm
|
|
1462
|
+
/** 插件是否已安装:匹配 Git spec 中的 owner/repo,或 npm 安装的依赖包名;命中返回 npm 包名。 */
|
|
1372
1463
|
function installedNameOf(plugin, installed, versions) {
|
|
1373
1464
|
const repo = plugin.source?.repo;
|
|
1374
1465
|
if (!repo) return null;
|
|
@@ -1387,6 +1478,12 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
1387
1478
|
if (!repo) return null;
|
|
1388
1479
|
return versions[repo.toLowerCase()]?.version ?? null;
|
|
1389
1480
|
}
|
|
1481
|
+
/** 该插件对应的 npm 包名(目录下发,或安装时持久化的映射);无则 null。决定更新是否走 npm registry。 */
|
|
1482
|
+
function npmPackageOf(plugin, versions) {
|
|
1483
|
+
const repo = plugin.source?.repo;
|
|
1484
|
+
const pkg = (plugin.source?.npmPackage || (repo ? versions[repo.toLowerCase()]?.npmPackage : void 0) || "").trim();
|
|
1485
|
+
return pkg === "" ? null : pkg;
|
|
1486
|
+
}
|
|
1390
1487
|
/**
|
|
1391
1488
|
* 是否有更新:仅对已安装插件有意义。
|
|
1392
1489
|
* 双信号判定——有 release 版本的比版本;无版本(repo 不打 tag)的比仓库最近更新时间
|
|
@@ -1514,14 +1611,15 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
1514
1611
|
* Website: https://dsh-plugin.org
|
|
1515
1612
|
* GitHub: https://github.com/dshplugin/dsh-plugin-hub
|
|
1516
1613
|
*
|
|
1517
|
-
*
|
|
1614
|
+
* 插件中心的数据 + 视图状态。
|
|
1518
1615
|
*
|
|
1519
|
-
*
|
|
1520
|
-
*
|
|
1521
|
-
* state, exposing the derived visible list and per-category counts.
|
|
1616
|
+
* 掌管在线数据管道(从 api.dsh-plugin.org 实时拉取)、本地已装插件表,以及
|
|
1617
|
+
* 筛选/搜索/排序/安装状态等视图状态,对外暴露派生出的可见列表与各分类计数。
|
|
1522
1618
|
*/
|
|
1523
1619
|
/** 插件市场自身仓库:DSH Plugin Hub 不显示在目录里(自己不进自己的插件列表) */
|
|
1524
1620
|
const SELF_REPO = "dshplugin/dsh-plugin-hub";
|
|
1621
|
+
/** 共享的空门禁集合:无暂缓包时复用,避免每次渲染新建 Set。 */
|
|
1622
|
+
const EMPTY_PACKAGES = /* @__PURE__ */ new Set();
|
|
1525
1623
|
/** 市场各排序的默认方向:全部按倒序(Star/Fork 多、更新/收录近的在前) */
|
|
1526
1624
|
const SORT_DEFAULT_DIR$1 = {
|
|
1527
1625
|
sortStars: "desc",
|
|
@@ -1574,7 +1672,7 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
1574
1672
|
/** 当前 profile 已安装插件:npm 包名 -> manifest spec(来自宿主本地路由) */
|
|
1575
1673
|
const [installed, setInstalled] = (0, react.useState)({});
|
|
1576
1674
|
/** 安装时记录的目录信号:repo(小写) -> { version, updatedAt }(来自宿主本地路由);
|
|
1577
|
-
* npmPackage
|
|
1675
|
+
* npmPackage 为安装时记录的包名映射(目录数据未下发时客户端靠它把依赖 key 匹配回仓库) */
|
|
1578
1676
|
const [versions, setVersions] = (0, react.useState)({});
|
|
1579
1677
|
/** 每个依赖在系统上的安装目录(profile/node_modules/<包名>),详情视图展示用 */
|
|
1580
1678
|
const [installPaths, setInstallPaths] = (0, react.useState)(null);
|
|
@@ -1657,18 +1755,20 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
1657
1755
|
cancelled = true;
|
|
1658
1756
|
};
|
|
1659
1757
|
}, [reloadKey]);
|
|
1660
|
-
/** 插件是否已安装:匹配 Git spec 中的 owner/repo,或 npm
|
|
1758
|
+
/** 插件是否已安装:匹配 Git spec 中的 owner/repo,或 npm 安装的依赖包名;命中返回 npm 包名。 */
|
|
1661
1759
|
const installedName = (p) => installedNameOf(p, installed, versions);
|
|
1662
1760
|
/** 该插件安装时记录的目录版本(无记录/未安装 → null)。 */
|
|
1663
1761
|
const installedVersion = (p) => installedVersionOf(p, versions);
|
|
1664
1762
|
/**
|
|
1665
|
-
*
|
|
1666
|
-
*
|
|
1667
|
-
* (repoUpdatedAt,ISO 字符串字典序 = 时间序),更新时间变新说明有新提交。
|
|
1763
|
+
* 供应链门禁状态:包名集合为当前「暂缓提示」的 npm 包(最新版本发布未满门槛)。
|
|
1764
|
+
* key 是这批候选包名的指纹,与已查出的 key 一致才算就绪,避免查询未回来时先显示更新。
|
|
1668
1765
|
*/
|
|
1669
|
-
const
|
|
1670
|
-
|
|
1671
|
-
|
|
1766
|
+
const [releaseAge, setReleaseAge] = (0, react.useState)({
|
|
1767
|
+
key: "",
|
|
1768
|
+
held: EMPTY_PACKAGES
|
|
1769
|
+
});
|
|
1770
|
+
/** 已安装项原始列表(未套门禁):先算出来才能收集需要查发布时间的候选包名。 */
|
|
1771
|
+
const rawInstalledItems = (0, react.useMemo)(() => installedItemsOf(plugins, installed, versions, installPaths, loadedNames, dshCapableNames), [
|
|
1672
1772
|
plugins,
|
|
1673
1773
|
installed,
|
|
1674
1774
|
versions,
|
|
@@ -1676,6 +1776,74 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
1676
1776
|
loadedNames,
|
|
1677
1777
|
dshCapableNames
|
|
1678
1778
|
]);
|
|
1779
|
+
/** 门禁候选:有更新、且有 npm 包名(更新走 npm registry)的已安装插件包名。 */
|
|
1780
|
+
const releaseAgeCandidates = (0, react.useMemo)(() => {
|
|
1781
|
+
const names = /* @__PURE__ */ new Set();
|
|
1782
|
+
for (const item of rawInstalledItems) {
|
|
1783
|
+
if (!item.hasUpdate || !item.plugin) continue;
|
|
1784
|
+
const pkg = npmPackageOf(item.plugin, versions);
|
|
1785
|
+
if (pkg !== null) names.add(pkg);
|
|
1786
|
+
}
|
|
1787
|
+
return [...names].sort();
|
|
1788
|
+
}, [rawInstalledItems, versions]);
|
|
1789
|
+
const releaseAgeKey = releaseAgeCandidates.join("\n");
|
|
1790
|
+
(0, react.useEffect)(() => {
|
|
1791
|
+
if (releaseAgeKey === releaseAge.key) return;
|
|
1792
|
+
if (releaseAgeCandidates.length === 0) {
|
|
1793
|
+
setReleaseAge({
|
|
1794
|
+
key: "",
|
|
1795
|
+
held: EMPTY_PACKAGES
|
|
1796
|
+
});
|
|
1797
|
+
return;
|
|
1798
|
+
}
|
|
1799
|
+
let cancelled = false;
|
|
1800
|
+
fetchNpmReleaseAge(releaseAgeCandidates).then((result) => {
|
|
1801
|
+
if (cancelled) return;
|
|
1802
|
+
const now = Date.now();
|
|
1803
|
+
const held = /* @__PURE__ */ new Set();
|
|
1804
|
+
for (const name of releaseAgeCandidates) {
|
|
1805
|
+
const info = result?.[name];
|
|
1806
|
+
if (info && isReleaseTooFresh(info.publishedAt, now)) held.add(name);
|
|
1807
|
+
}
|
|
1808
|
+
setReleaseAge({
|
|
1809
|
+
key: releaseAgeKey,
|
|
1810
|
+
held
|
|
1811
|
+
});
|
|
1812
|
+
});
|
|
1813
|
+
return () => {
|
|
1814
|
+
cancelled = true;
|
|
1815
|
+
};
|
|
1816
|
+
}, [releaseAgeKey, releaseAge.key]);
|
|
1817
|
+
/** 门禁结果是否已就绪(候选为空也算就绪):未就绪时不写更新提醒,等查询回来再定。 */
|
|
1818
|
+
const releaseAgeReady = releaseAgeKey === releaseAge.key;
|
|
1819
|
+
const heldPackages = releaseAgeReady ? releaseAge.held : EMPTY_PACKAGES;
|
|
1820
|
+
/**
|
|
1821
|
+
* 是否有更新:仅对已安装插件有意义。
|
|
1822
|
+
* 双信号判定——有 release 版本的比版本;无版本(repo 不打 tag)的比仓库最近更新时间
|
|
1823
|
+
* (repoUpdatedAt,ISO 字符串字典序 = 时间序),更新时间变新说明有新提交。
|
|
1824
|
+
* 另加供应链门禁:npm 包最新版本发布未满门槛时视为暂缓,不打更新标记。
|
|
1825
|
+
*/
|
|
1826
|
+
const hasUpdate = (p) => {
|
|
1827
|
+
if (!hasUpdateOf(p, installed, versions)) return false;
|
|
1828
|
+
const pkg = npmPackageOf(p, versions);
|
|
1829
|
+
return pkg === null || !heldPackages.has(pkg);
|
|
1830
|
+
};
|
|
1831
|
+
/** 已安装项统一列表(目录元数据 + 运行时信息合并):门禁命中的去掉更新标记,驱动「已安装」tab。 */
|
|
1832
|
+
const installedItems = (0, react.useMemo)(() => {
|
|
1833
|
+
if (heldPackages.size === 0) return rawInstalledItems;
|
|
1834
|
+
return rawInstalledItems.map((item) => {
|
|
1835
|
+
if (!item.hasUpdate || !item.plugin) return item;
|
|
1836
|
+
const pkg = npmPackageOf(item.plugin, versions);
|
|
1837
|
+
return pkg !== null && heldPackages.has(pkg) ? {
|
|
1838
|
+
...item,
|
|
1839
|
+
hasUpdate: false
|
|
1840
|
+
} : item;
|
|
1841
|
+
});
|
|
1842
|
+
}, [
|
|
1843
|
+
rawInstalledItems,
|
|
1844
|
+
heldPackages,
|
|
1845
|
+
versions
|
|
1846
|
+
]);
|
|
1679
1847
|
/**
|
|
1680
1848
|
* Hub 自身更新状态:Hub 就是当前运行的应用(始终已安装,无需 installedName 命中)。
|
|
1681
1849
|
* 以 Worker 版本控制中心返回的「最新版本」为准,与当前运行的版本号比对——
|
|
@@ -1687,17 +1855,11 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
1687
1855
|
* registry 真实发布时间下发(同源),据此判断最准。门槛命中要单列成 `pending` 而不是
|
|
1688
1856
|
* 落回「无更新」——回落会让弹窗在本机版本落后时谎称「已是最新」。
|
|
1689
1857
|
*/
|
|
1690
|
-
const hubCurrentVersion = "
|
|
1858
|
+
const hubCurrentVersion = "2.0.1";
|
|
1691
1859
|
const hubUpdateState = (() => {
|
|
1692
1860
|
if (!hubUpdateInfo) return "none";
|
|
1693
1861
|
if (hubUpdateInfo.version === hubCurrentVersion) return "latest";
|
|
1694
|
-
|
|
1695
|
-
if (publishedAt) {
|
|
1696
|
-
const publishedMs = Date.parse(publishedAt);
|
|
1697
|
-
if (!Number.isNaN(publishedMs)) {
|
|
1698
|
-
if (Date.now() - publishedMs < 882e5) return "pending";
|
|
1699
|
-
}
|
|
1700
|
-
}
|
|
1862
|
+
if (isReleaseTooFresh(hubUpdateInfo.publishedAt, Date.now())) return "pending";
|
|
1701
1863
|
return "available";
|
|
1702
1864
|
})();
|
|
1703
1865
|
const hubHasUpdate = hubUpdateState === "available";
|
|
@@ -1729,7 +1891,7 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
1729
1891
|
sortDir,
|
|
1730
1892
|
installed
|
|
1731
1893
|
]);
|
|
1732
|
-
/**
|
|
1894
|
+
/** 分类 chip 上展示的各分类插件计数。 */
|
|
1733
1895
|
const categoryCounts = (0, react.useMemo)(() => {
|
|
1734
1896
|
const counts = {};
|
|
1735
1897
|
for (const p of plugins ?? []) if (p.category) counts[p.category] = (counts[p.category] ?? 0) + 1;
|
|
@@ -1751,6 +1913,7 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
1751
1913
|
hasUpdate,
|
|
1752
1914
|
hubHasUpdate,
|
|
1753
1915
|
hubUpdateState,
|
|
1916
|
+
releaseAgeReady,
|
|
1754
1917
|
hubCurrentVersion,
|
|
1755
1918
|
hubUpdateInfo,
|
|
1756
1919
|
hubAboutInfo,
|
|
@@ -1892,7 +2055,7 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
1892
2055
|
if (rec.action !== void 0) return rec.action;
|
|
1893
2056
|
return rec.kind === "uninstall" ? "uninstall" : rec.kind === "update" ? "update" : "install";
|
|
1894
2057
|
}
|
|
1895
|
-
/**
|
|
2058
|
+
/** 只匹配 pnpm 的错误码,不匹配泛泛出现的 checksum / integrity 字样。 */
|
|
1896
2059
|
function missingTarballIntegrity(message) {
|
|
1897
2060
|
return /\bERR_PNPM_MISSING_TARBALL_INTEGRITY\b/.test(message);
|
|
1898
2061
|
}
|
|
@@ -1905,9 +2068,9 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
1905
2068
|
return `${new Date(published + 864e5).toISOString().slice(0, 16)}Z`;
|
|
1906
2069
|
}
|
|
1907
2070
|
/**
|
|
1908
|
-
*
|
|
1909
|
-
*
|
|
1910
|
-
*
|
|
2071
|
+
* 同一策略子类型也用于选择实时/已保存失败的提示文案:minimumReleaseAge 只有在能算出
|
|
2072
|
+
* 可重试时刻时才走专属文案(给出确切的「何时可再试」),算不出时退回通用文案,
|
|
2073
|
+
* 避免出现「预计可重试时间:」后接空值的残缺句子。
|
|
1911
2074
|
*/
|
|
1912
2075
|
function pnpmPolicyHintOf(message) {
|
|
1913
2076
|
if (missingTarballIntegrity(message)) return "failPnpmTarballIntegrityHint";
|
|
@@ -1924,6 +2087,7 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
1924
2087
|
* (只影响这个插件 → 才引导提 Issue)。各分支判定顺序有依赖,见函数内注释。
|
|
1925
2088
|
*/
|
|
1926
2089
|
function classifyFailure(message) {
|
|
2090
|
+
if (/installation rejected:.*incompatible with dsh/i.test(message)) return "hostIncompatible";
|
|
1927
2091
|
if (/\[npm-too-low\]|edgesOut/i.test(message)) return "npmTooOld";
|
|
1928
2092
|
if (/\[pnpm-missing\]|pnpm not found|pnpm: command not found|spawn pnpm ENOENT|'pnpm' 不是内部或外部命令|"pnpm" 不是内部或外部命令|pnpm['"]?\s*is not recognized/i.test(message)) return "pnpmMissing";
|
|
1929
2093
|
if (/\[git-missing\]|spawn git ENOENT|'git' 不是内部或外部命令|"git" 不是内部或外部命令|git['"]?\s*is not recognized|git: command not found/i.test(message)) return "gitMissing";
|
|
@@ -1938,7 +2102,7 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
1938
2102
|
if (/os error 5\b|ERROR_ACCESS_DENIED|\bEPERM\b|\bEACCES\b|access is denied/i.test(message)) return "accessDenied";
|
|
1939
2103
|
if (/os error 112\b|os error 19\b|ERROR_DISK_FULL|ERROR_WRITE_PROTECT|\bENOSPC\b|\bEROFS\b|\bEMFILE\b|\bENFILE\b|no space left on device|read-only file system|too many open files/i.test(message)) return "fsUnavailable";
|
|
1940
2104
|
if (/ERR_PNPM_IGNORED_BUILDS|Ignored build scripts:|ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED/i.test(message)) return "pnpmIgnoredBuild";
|
|
1941
|
-
if (/\[network\]|ERR_PNPM_GIT_FETCH_FAILED|ETIMEDOUT|ECONNREFUSED|ECONNRESET|ENOTFOUND|EAI_AGAIN|EPIPE|EHOSTUNREACH|ENETUNREACH|getaddrinfo|Could not connect|Could not resolve host|Network unreachable|Failed to connect|socket hang up|CERT_HAS_EXPIRED|SSL certificate problem|\bTLS\b|\bSSL\b|fetch failed|failed to fetch|\bGET https?:\/\/\S+\.tgz\s+error \(
|
|
2105
|
+
if (/\[network\]|ERR_PNPM_GIT_FETCH_FAILED|ETIMEDOUT|ECONNREFUSED|ECONNRESET|ENOTFOUND|EAI_AGAIN|EPIPE|EHOSTUNREACH|ENETUNREACH|UND_ERR_[A-Z0-9_]+|getaddrinfo|Could not connect|Could not resolve host|Network unreachable|Failed to connect|socket hang up|CERT_HAS_EXPIRED|SSL certificate problem|\bTLS\b|\bSSL\b|fetch failed|failed to fetch|\bGET https?:\/\/\S+\.tgz\s+error \([A-Za-z0-9_]+\)/i.test(message)) return "network";
|
|
1942
2106
|
if (/\[packaging\]|entry file missing/i.test(message)) return "pluginPrepare";
|
|
1943
2107
|
if (/\[registry-missing\]/i.test(message)) return "pluginMissingDep";
|
|
1944
2108
|
if (/ERR_PNPM_FETCH_404|404 Not Found|Not Found - 404/i.test(message)) return "pnpmMissingDep";
|
|
@@ -2008,8 +2172,8 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
2008
2172
|
return m ? m[0].replace(/^\[|\]$/g, "") : null;
|
|
2009
2173
|
}
|
|
2010
2174
|
/** 「包在 registry 不存在」失败的提示变体:服务端用官方源复核过(会注入 `[registry-mirror-lag]`)
|
|
2011
|
-
* 时,说明包在官方源上存在、是本机镜像源未同步 →
|
|
2012
|
-
*
|
|
2175
|
+
* 时,说明包在官方源上存在、是本机镜像源未同步 → 提示换源;否则按「profile 残留依赖」提示
|
|
2176
|
+
* (删掉 profile 里那条依赖即可)。 */
|
|
2013
2177
|
function registryMissingHintOf(message) {
|
|
2014
2178
|
return /\[registry-mirror-lag\]/i.test(message) ? "failRegistryMirrorLagHint" : "failPnpmMissingDepHint";
|
|
2015
2179
|
}
|
|
@@ -2025,7 +2189,7 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
2025
2189
|
}
|
|
2026
2190
|
/**
|
|
2027
2191
|
* 从网络类失败消息里提取「具体连不上的地址」,供弹窗精准提示(你的网络无法访问什么)。
|
|
2028
|
-
* 优先取服务端 [network]
|
|
2192
|
+
* 优先取服务端 [network] 网络探测消息括号里的探测地址(中文「(…)」/ 英文「(…)」),
|
|
2029
2193
|
* 否则取消息里出现的第一个 URL(git fetch 的仓库地址、registry 域名等)。
|
|
2030
2194
|
* 提取不到返回 null —— 调用方据此跳过地址行。
|
|
2031
2195
|
*/
|
|
@@ -2105,6 +2269,7 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
2105
2269
|
case "fsUnavailable": return "local file system unavailable on the user machine";
|
|
2106
2270
|
case "pnpmIgnoredBuild": return "build scripts blocked by pnpm allowlist";
|
|
2107
2271
|
case "pluginPrepare": return "plugin distribution incomplete";
|
|
2272
|
+
case "hostIncompatible": return "plugin does not support the DSH version in use";
|
|
2108
2273
|
case "network": return "network failure on the user side";
|
|
2109
2274
|
case "hostCliSpawn": return "the DSH host could not be launched on the user machine";
|
|
2110
2275
|
case "hubState": return `stale ${word} state in the plugin hub`;
|
|
@@ -2121,7 +2286,7 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
2121
2286
|
* 错误核心摘要(完整日志太长,塞进 URL 会被 GitHub 以「request URL too long」拒绝,
|
|
2122
2287
|
* 故只收集重点)。错误弹窗、失败记录共用此逻辑。
|
|
2123
2288
|
* env 取不到时为 null,链接照常生成、只是少环境段。
|
|
2124
|
-
* attempts
|
|
2289
|
+
* attempts(尝试过的安装方式,实际执行过的命令):作者看到我们试过的命令,
|
|
2125
2290
|
* 组织 scope 与 GitHub 用户名不一致时也能直接指认正确的 npm 包名。
|
|
2126
2291
|
*/
|
|
2127
2292
|
function pluginIssueUrl(repo, message, env, command, attempts, action = "install") {
|
|
@@ -2129,7 +2294,7 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
2129
2294
|
const executed = executedCommandOf(command, attempts);
|
|
2130
2295
|
const zhWord = actionWordZh(action);
|
|
2131
2296
|
const title = `[dsh-plugin.org | dsh-plugin-hub] ${reasonTitleOf(kind, action)}: ${repo}`;
|
|
2132
|
-
const reason = /\[packaging\]/i.test(message) ? "plugin distribution is incomplete — a file the package needs (its entry from main / exports, an entry a bundled patch mounts, or the patch declared by dsh.bundle.patch) is missing from the published
|
|
2297
|
+
const reason = kind === "hostIncompatible" ? "the plugin declares a dsh compatibility range that does not include the runtime in use, so the host rejects it before installing anything; please extend the supported dsh versions or publish a compatible release" : /\[packaging\]/i.test(message) ? "plugin distribution is incomplete — a file the package needs (its entry from main / exports, an entry a bundled patch mounts, or the patch declared by dsh.bundle.patch) is missing from the published npm package; please publish a complete package" : /\[registry-missing\]/i.test(message) ? "a dependency declared by the plugin is not published on the public npm registry (missing, removed, or never released); please publish or correct that dependency, or ship it with the plugin" : kind === "network" ? "network connectivity issue on the user side (DNS, proxy, firewall, or a blocked connection)" : kind === "pluginPrepare" ? "plugin prepare/build script failed during install (packaging/distribution issue)" : kind === "pnpmIgnoredBuild" ? "plugin depends on a native module whose build script pnpm blocks by default (use a prebuilt variant)" : kind === "originRejected" ? "the request never reached the install flow — the local service rejected its origin (local environment issue)" : kind === "pnpmPolicy" ? pnpmPolicyHintOf(message) === "failPnpmTarballIntegrityHint" ? "pnpm rejected a lockfile entry without tarball integrity; inspect and back up the profile lockfile before resolving it again, keeping integrity checks enabled" : "the pnpm supply-chain policy on the user machine blocked the install (minimum release age for freshly published packages / untrusted origin)" : kind === "pnpmUnusedPatch" ? "the profile keeps a pnpm patch entry for an older dsh-plugin version, so pnpm aborted the install (local config issue)" : kind === "fileLocked" ? "a file in the profile is locked by another process on the user machine (local environment issue)" : kind === "accessDenied" ? "the system denied write access to a file in the profile on the user machine (local environment issue)" : kind === "fsUnavailable" ? "the local file system could not accept the write — no space left, read-only volume, or too many open file handles on the user machine (local environment issue)" : "plugin-side install failure";
|
|
2133
2298
|
const code = coreErrorCode(message);
|
|
2134
2299
|
const build = (coreChars) => {
|
|
2135
2300
|
const body = [
|
|
@@ -2149,7 +2314,7 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
2149
2314
|
.../\[packaging\]/i.test(message) ? [
|
|
2150
2315
|
"",
|
|
2151
2316
|
"## 安装方式说明",
|
|
2152
|
-
"
|
|
2317
|
+
"当前插件的 npm 分发物缺少它需要的文件(`main` / `exports` 声明的入口、补丁按本包名 mount 的入口,或 `dsh.bundle.patch` 声明的补丁)。请发布包含完整构建产物的 npm 包后重试。"
|
|
2153
2318
|
] : [],
|
|
2154
2319
|
"",
|
|
2155
2320
|
"## Environment",
|
|
@@ -2206,7 +2371,7 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
2206
2371
|
`- Auto-classified cause: ${reasonTitleOf(kind, action)}`,
|
|
2207
2372
|
`- Target plugin: \`${repo}\``,
|
|
2208
2373
|
...code ? [`- Key error: \`${code}\``] : [],
|
|
2209
|
-
...variant === "misjudge" ? ["- Filed from:
|
|
2374
|
+
...variant === "misjudge" ? ["- Filed from: a branch that normally routes to the plugin repo — filed here because that verdict may be our own misjudgment.", "- Source of that verdict: produced by dsh-plugin-hub's own check or its auto-allow retry, not by plain pnpm output."] : ["- Why filed here: the installer only routes a failure to the plugin repo when the cause is demonstrably the plugin's own build/distribution (pluginPrepare, or build scripts pnpm blocks that even an auto-allow retry cannot get past). This failure does not match that, so it is routed here for triage."],
|
|
2210
2375
|
"",
|
|
2211
2376
|
`## [DSH Plugin 插件市场](${SITE_URL}) · ${zhWord} Plugin 失败错误信息`,
|
|
2212
2377
|
`本错误信息由 [dsh-plugin-hub](${GITHUB_URL}) 插件市场的安装程序自动生成,随本次${zhWord}失败一并提交。`,
|
|
@@ -2266,11 +2431,9 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
2266
2431
|
* Website: https://dsh-plugin.org
|
|
2267
2432
|
* GitHub: https://github.com/dshplugin/dsh-plugin-hub
|
|
2268
2433
|
*
|
|
2269
|
-
*
|
|
2270
|
-
*
|
|
2271
|
-
*
|
|
2272
|
-
* together instead of drifting apart. Exposes the localized dictionary lookup
|
|
2273
|
-
* `t()` plus the zh/en language flag and the /zh/ URL path prefix.
|
|
2434
|
+
* 板块的语言状态:Hub 与宿主(系统)locale 共用 —— 头部语言开关通过 setLocale 写入
|
|
2435
|
+
* 宿主语言偏好,让宿主界面(左侧菜单、设置弹窗)与 Hub 面板一起切换、不会各说各话。
|
|
2436
|
+
* 对外暴露本地化字典查询 `t()`、zh/en 语言标记与 /zh/ URL 路径前缀。
|
|
2274
2437
|
*/
|
|
2275
2438
|
function useLanguage(locale) {
|
|
2276
2439
|
const [, setRev] = (0, react.useState)(0);
|
|
@@ -2298,19 +2461,16 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
2298
2461
|
* Website: https://dsh-plugin.org
|
|
2299
2462
|
* GitHub: https://github.com/dshplugin/dsh-plugin-hub
|
|
2300
2463
|
*
|
|
2301
|
-
*
|
|
2302
|
-
*
|
|
2303
|
-
*
|
|
2304
|
-
*
|
|
2305
|
-
* the defaults and keeps working (settings simply do not persist).
|
|
2464
|
+
* 插件中心设置状态:从宿主本地 /settings 路由加载一次(持久化在
|
|
2465
|
+
* ~/.dsh/profiles/<profile>/hub-settings.json),并按乐观方式更新。
|
|
2466
|
+
* 每次改动立即 POST 补丁,切换过的开关刷新后仍在;宿主未挂服务端路由时退回默认值
|
|
2467
|
+
* 继续可用(设置不持久化而已)。
|
|
2306
2468
|
*/
|
|
2307
2469
|
const DEFAULT_SETTINGS = {
|
|
2308
2470
|
checkUpdatesOnStart: true,
|
|
2309
2471
|
proxy: "",
|
|
2310
2472
|
npmRegistry: "",
|
|
2311
2473
|
enableNpmInstall: true,
|
|
2312
|
-
enableGitInstall: true,
|
|
2313
|
-
enableDshInstall: true,
|
|
2314
2474
|
logPath: ""
|
|
2315
2475
|
};
|
|
2316
2476
|
async function loadRemote() {
|
|
@@ -2374,20 +2534,17 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
2374
2534
|
* Website: https://dsh-plugin.org
|
|
2375
2535
|
* GitHub: https://github.com/dshplugin/dsh-plugin-hub
|
|
2376
2536
|
*
|
|
2377
|
-
*
|
|
2537
|
+
* 插件中心的后台安装/卸载任务队列。
|
|
2378
2538
|
*
|
|
2379
|
-
*
|
|
2380
|
-
*
|
|
2381
|
-
* uninstall, cancel) plus the modal task lookups used by the dialogs.
|
|
2539
|
+
* 通过轮询 /active 镜像服务端 FIFO 活动队列,对消失的任务用 /status 收尾,并暴露
|
|
2540
|
+
* 队列动作(安装、卸载、取消)以及弹窗用的任务查找。
|
|
2382
2541
|
*/
|
|
2383
|
-
/** 安装/卸载请求超时(ms
|
|
2384
|
-
*
|
|
2542
|
+
/** 安装/卸载请求超时(ms):服务端入队前要做目录包校验与网络探测(各自有超时,合计可达十几秒),
|
|
2543
|
+
* 给足余量;超时主动中止,避免服务端网络挂起时前端永久卡「安装中 0%」。 */
|
|
2385
2544
|
const REQUEST_TIMEOUT_MS = 6e4;
|
|
2386
|
-
/** 入口渠道的 i18n key:NPM 包 / GitHub 源码 / DSH 命令。 */
|
|
2387
|
-
const channelKeyOf = (channel) => channel === "git" ? "installChannelGit" : channel === "dsh" ? "installChannelDsh" : "installChannelNpm";
|
|
2388
2545
|
/** 失败消息的入口溯源前缀:自定义安装(带渠道)在错误正文顶部精准指出从哪张卡片发起;
|
|
2389
2546
|
* 目录插件安装(无渠道)返回 null,错误正文保持原样。 */
|
|
2390
|
-
const entryLineOf = (t, channel) => channel ? t("installEntryLine", { c: t(
|
|
2547
|
+
const entryLineOf = (t, channel) => channel ? t("installEntryLine", { c: t("installChannelNpm") }) : null;
|
|
2391
2548
|
function useTaskQueue(opts) {
|
|
2392
2549
|
const { t, langKey, refreshInstalled, onInstallDone, onUninstallDone, onError, installPlugin, installCustomTarget, installGlobalTarget, uninstallPlugin, uninstallName, installedName, resolvePending } = opts;
|
|
2393
2550
|
const [queue, setQueue] = (0, react.useState)([]);
|
|
@@ -2604,7 +2761,7 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
2604
2761
|
lines: Array.isArray(a.lines) ? a.lines : prevTask?.lines ?? [],
|
|
2605
2762
|
attempts: Array.isArray(a.attempts) ? a.attempts : prevTask?.attempts ?? [],
|
|
2606
2763
|
needsRestart: typeof a.needsRestart === "boolean" ? a.needsRestart : prevTask?.needsRestart ?? true,
|
|
2607
|
-
channel: a.installChannel === "npm"
|
|
2764
|
+
channel: a.installChannel === "npm" ? "npm" : prevTask?.channel
|
|
2608
2765
|
});
|
|
2609
2766
|
}
|
|
2610
2767
|
const keepOpt = prev.filter((q) => q.optimistic && !next.some((x) => x.id === q.id));
|
|
@@ -2650,7 +2807,7 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
2650
2807
|
lines: Array.isArray(a.lines) ? a.lines : [],
|
|
2651
2808
|
attempts: Array.isArray(a.attempts) ? a.attempts : [],
|
|
2652
2809
|
needsRestart: typeof a.needsRestart === "boolean" ? a.needsRestart : true,
|
|
2653
|
-
channel: a.installChannel === "npm"
|
|
2810
|
+
channel: a.installChannel === "npm" ? "npm" : void 0
|
|
2654
2811
|
};
|
|
2655
2812
|
});
|
|
2656
2813
|
if (items.length > 0 || pendingRef.current.length > 0) {
|
|
@@ -2667,7 +2824,7 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
2667
2824
|
/** 弹窗动作:直接安装。请求宿主本地路由,任务进入服务端队列(FIFO),弹窗内实时显示进度。 */
|
|
2668
2825
|
/** 安装入队核心:目录插件(catalog,后端走目录白名单)与命令行安装(custom,
|
|
2669
2826
|
* 受安全开关控制)共用。队列条目一律用仓库名(repo)展示/防重,只有发给后端的
|
|
2670
|
-
* 实际安装目标(target
|
|
2827
|
+
* 实际安装目标(target)为 npm 包名。 */
|
|
2671
2828
|
const submitInstall = async (input) => {
|
|
2672
2829
|
if (queueRef.current.some((q) => q.kind === "install" && q.target === input.repo)) return;
|
|
2673
2830
|
if (submittingRef.current.has(input.repo)) return;
|
|
@@ -2743,11 +2900,11 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
2743
2900
|
setSubmitting(false);
|
|
2744
2901
|
}
|
|
2745
2902
|
};
|
|
2746
|
-
/**
|
|
2903
|
+
/** 目录插件安装:安装目标取目录数据的 npm 包名,走 catalog 白名单。 */
|
|
2747
2904
|
const installNow = async (p, opts) => {
|
|
2748
2905
|
const repo = p.source?.repo ?? "";
|
|
2749
2906
|
if (!repo) return;
|
|
2750
|
-
const
|
|
2907
|
+
const target = installTargetOf(p);
|
|
2751
2908
|
if (!target) return;
|
|
2752
2909
|
await submitInstall({
|
|
2753
2910
|
target,
|
|
@@ -2760,12 +2917,11 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
2760
2917
|
update: opts?.update
|
|
2761
2918
|
});
|
|
2762
2919
|
};
|
|
2763
|
-
/** 命令行安装:用户手输 npm
|
|
2920
|
+
/** 命令行安装:用户手输 npm 包名,走 custom 源(受安全开关控制)。
|
|
2764
2921
|
* update=true 时对已安装目标放行覆盖重装(与目录插件「更新」同一语义)。
|
|
2765
|
-
* channel=入口渠道(NPM
|
|
2766
|
-
*
|
|
2767
|
-
*
|
|
2768
|
-
* 弹窗目标匹配同口径,npm 包名透传不受影响。 */
|
|
2922
|
+
* channel=入口渠道(NPM 包卡片):上报服务端落日志,失败弹窗/通知据此精准溯源。
|
|
2923
|
+
* 队列展示/防重一律用归一化身份:与服务端 /active 合并、弹窗目标匹配同口径,
|
|
2924
|
+
* npm 包名透传不受影响。 */
|
|
2769
2925
|
const installCustom = async (raw, opts) => {
|
|
2770
2926
|
const target = raw.trim();
|
|
2771
2927
|
if (!target) return;
|
|
@@ -2898,8 +3054,7 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
2898
3054
|
* Website: https://dsh-plugin.org
|
|
2899
3055
|
* GitHub: https://github.com/dshplugin/dsh-plugin-hub
|
|
2900
3056
|
*
|
|
2901
|
-
*
|
|
2902
|
-
* they adapt to themes and disabled states automatically.
|
|
3057
|
+
* 客户端各处使用的内联 SVG 图标。图标继承 currentColor,自动适配主题与禁用态。
|
|
2903
3058
|
*/
|
|
2904
3059
|
/** 弹窗右上角关闭按钮图标:内联 SVG 十字(stroke 继承 currentColor),随按钮禁用态一起变淡。 */
|
|
2905
3060
|
function CloseIcon() {
|
|
@@ -3387,10 +3542,9 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
3387
3542
|
* Website: https://dsh-plugin.org
|
|
3388
3543
|
* GitHub: https://github.com/dshplugin/dsh-plugin-hub
|
|
3389
3544
|
*
|
|
3390
|
-
*
|
|
3391
|
-
*
|
|
3392
|
-
*
|
|
3393
|
-
* empty for most of the run; failures surface their full output in ErrorModal.
|
|
3545
|
+
* 安装与卸载弹窗共用的内联进度块:真实百分比进度条(服务端估算、客户端轮询)。
|
|
3546
|
+
* 不做实时终端窗口 —— pnpm 在 git clone/构建期间几乎无输出,日志面板大部分时间是空的;
|
|
3547
|
+
* 失败时完整输出在 ErrorModal 里展示。
|
|
3394
3548
|
*/
|
|
3395
3549
|
function ProgressView({ task }) {
|
|
3396
3550
|
return (0, react.createElement)("div", { className: Modal_module_css_default.progress }, (0, react.createElement)("div", { className: Modal_module_css_default.progressHead }, (0, react.createElement)("span", { className: Modal_module_css_default.progressText }, `${Math.round(task.progress)}%`)), (0, react.createElement)("div", { className: Modal_module_css_default.progressTrack }, (0, react.createElement)("div", {
|
|
@@ -3405,11 +3559,9 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
3405
3559
|
* Website: https://dsh-plugin.org
|
|
3406
3560
|
* GitHub: https://github.com/dshplugin/dsh-plugin-hub
|
|
3407
3561
|
*
|
|
3408
|
-
*
|
|
3409
|
-
*
|
|
3410
|
-
*
|
|
3411
|
-
* the common case (the page refreshes on close so the change applies), or a
|
|
3412
|
-
* single "restart now" for the rare changes a refresh cannot pick up.
|
|
3562
|
+
* 插件中心的弹窗层:安装确认弹窗、卸载弹窗与全局 Toast。两个弹窗在变更执行期间
|
|
3563
|
+
* 自我锁定,随后切到只有一个动作的结果视图 —— 常见情况给「完成」(关闭时刷新页面即生效),
|
|
3564
|
+
* 刷新解决不了的少数情况才给单个「立即重启」。
|
|
3413
3565
|
*/
|
|
3414
3566
|
/** 完成结果视图:绿色对勾 + 标题/描述;
|
|
3415
3567
|
* 终态只有两种:
|
|
@@ -3572,16 +3724,19 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
3572
3724
|
className: Modal_module_css_default.modalClose,
|
|
3573
3725
|
"aria-label": t("errorClose"),
|
|
3574
3726
|
onClick: onClose
|
|
3575
|
-
}, (0, react.createElement)(CloseIcon))), (0, react.createElement)("div", { className: Modal_module_css_default.modalBody }, (0, react.createElement)("div", { className: Modal_module_css_default.failRow }, (0, react.createElement)("div", { className: Modal_module_css_default.failHead },
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
|
|
3727
|
+
}, (0, react.createElement)(CloseIcon))), (0, react.createElement)("div", { className: Modal_module_css_default.modalBody }, (0, react.createElement)("div", { className: Modal_module_css_default.failRow }, (0, react.createElement)("div", { className: Modal_module_css_default.failHead }, repo ? (() => {
|
|
3728
|
+
const url = pluginSiteUrl(repo);
|
|
3729
|
+
return (0, react.createElement)("a", {
|
|
3730
|
+
className: Modal_module_css_default.failRepo,
|
|
3731
|
+
href: url,
|
|
3732
|
+
target: "_blank",
|
|
3733
|
+
rel: "noopener noreferrer",
|
|
3734
|
+
title: url
|
|
3735
|
+
}, (0, react.createElement)("span", { className: Modal_module_css_default.failRepoLabel }, `${t("detailTitle")} · `), (0, react.createElement)("span", { className: Modal_module_css_default.failRepoUrl }, url.replace(/^https?:\/\//, "").split("?")[0]));
|
|
3736
|
+
})() : null, (0, react.createElement)("button", {
|
|
3582
3737
|
className: Modal_module_css_default.errorCopySoft,
|
|
3583
3738
|
onClick: () => onCopy(copyText)
|
|
3584
|
-
}, t("errorCopy"))), (0, react.createElement)("pre", { className: Modal_module_css_default.errorBox }, message), failureKind === "npmTooOld" ? (0, react.createElement)("div", { className: Modal_module_css_default.failPrepareHint }, t(npmVersion ? "failNpmTooLowV" : "failNpmTooLow", npmVersion ? { v: npmVersion } : void 0)) : failureKind === "dshMissing" ? (0, react.createElement)("div", { className: Modal_module_css_default.failPrepareHint }, t("failDshMissingHint")) : failureKind === "gitMissing" ? (0, react.createElement)("div", { className: Modal_module_css_default.failPrepareHint }, t("failGitMissingHint")) : failureKind === "pnpmMissing" ? (0, react.createElement)("div", { className: Modal_module_css_default.failPrepareHint }, t("failPnpmMissingHint")) : failureKind === "npmMissing" ? (0, react.createElement)("div", { className: Modal_module_css_default.failPrepareHint }, t("failNpmMissingHint")) : failureKind === "pnpmWorkspace" ? (0, react.createElement)("div", { className: Modal_module_css_default.failPrepareHint }, t("failPnpmWorkspaceHint")) : failureKind === "pnpmStore" ? (0, react.createElement)("div", { className: Modal_module_css_default.failPrepareHint }, t("failPnpmStoreHint")) : failureKind === "pnpmPolicy" ? (0, react.createElement)("div", { className: Modal_module_css_default.failPrepareHint }, t(pnpmPolicyHintOf(message), pnpmPolicyHintParams(message))) : failureKind === "pnpmUnusedPatch" ? (0, react.createElement)("div", { className: Modal_module_css_default.failPrepareHint }, t("failPnpmUnusedPatchHint")) : failureKind === "pnpmMissingDep" ? (0, react.createElement)("div", null, [(() => {
|
|
3739
|
+
}, t("errorCopy"))), (0, react.createElement)("pre", { className: Modal_module_css_default.errorBox }, message), (0, react.createElement)("div", { className: Modal_module_css_default.failKindTitle }, t(`failKind_${failureKind}`, failureKind === "hostIncompatible" ? { version: /incompatible with dsh\s+([^\s:;,]+)/i.exec(message)?.[1] ?? "" } : void 0)), failureKind === "hostIncompatible" ? null : (0, react.createElement)("div", { className: Modal_module_css_default.failReason }, t(`failReason_${failureKind}`)), failureKind === "npmTooOld" ? (0, react.createElement)("div", { className: Modal_module_css_default.failPrepareHint }, t(npmVersion ? "failNpmTooLowV" : "failNpmTooLow", npmVersion ? { v: npmVersion } : void 0)) : failureKind === "dshMissing" ? (0, react.createElement)("div", { className: Modal_module_css_default.failPrepareHint }, t("failDshMissingHint")) : failureKind === "gitMissing" ? (0, react.createElement)("div", { className: Modal_module_css_default.failPrepareHint }, t("failGitMissingHint")) : failureKind === "pnpmMissing" ? (0, react.createElement)("div", { className: Modal_module_css_default.failPrepareHint }, t("failPnpmMissingHint")) : failureKind === "npmMissing" ? (0, react.createElement)("div", { className: Modal_module_css_default.failPrepareHint }, t("failNpmMissingHint")) : failureKind === "pnpmWorkspace" ? (0, react.createElement)("div", { className: Modal_module_css_default.failPrepareHint }, t("failPnpmWorkspaceHint")) : failureKind === "pnpmStore" ? (0, react.createElement)("div", { className: Modal_module_css_default.failPrepareHint }, t("failPnpmStoreHint")) : failureKind === "pnpmPolicy" ? (0, react.createElement)("div", { className: Modal_module_css_default.failPrepareHint }, t(pnpmPolicyHintOf(message), pnpmPolicyHintParams(message))) : failureKind === "pnpmUnusedPatch" ? (0, react.createElement)("div", { className: Modal_module_css_default.failPrepareHint }, t("failPnpmUnusedPatchHint")) : failureKind === "pnpmMissingDep" ? (0, react.createElement)("div", null, [(() => {
|
|
3585
3740
|
const pkg = missingRegistryPackageOf(message);
|
|
3586
3741
|
return pkg ? (0, react.createElement)("div", { className: Modal_module_css_default.failNetworkTarget }, t("failPnpmMissingDepTarget", { pkg })) : null;
|
|
3587
3742
|
})(), (0, react.createElement)("div", { className: Modal_module_css_default.failPrepareHint }, t(registryMissingHintOf(message)))]) : failureKind === "pluginMissingDep" ? (0, react.createElement)("div", null, [
|
|
@@ -3597,7 +3752,16 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
3597
3752
|
rel: "noopener noreferrer",
|
|
3598
3753
|
title: t("failIssueHint")
|
|
3599
3754
|
}, t("failIssueBig")) : null
|
|
3600
|
-
]) : failureKind === "
|
|
3755
|
+
]) : failureKind === "hostIncompatible" ? (0, react.createElement)("div", null, [(() => {
|
|
3756
|
+
const version = /incompatible with dsh\s+([^\s:;,]+)/i.exec(message)?.[1] ?? "";
|
|
3757
|
+
return (0, react.createElement)("div", null, [(0, react.createElement)("div", { className: Modal_module_css_default.failReason }, t("failHostIncompatibleReason", { version })), (0, react.createElement)("div", { className: Modal_module_css_default.failPrepareHint }, t("failHostIncompatibleHint"))]);
|
|
3758
|
+
})(), repo ? (0, react.createElement)("a", {
|
|
3759
|
+
className: Modal_module_css_default.failBigIssue,
|
|
3760
|
+
href: pluginIssueUrl(repo, message, env, command, attempts, action),
|
|
3761
|
+
target: "_blank",
|
|
3762
|
+
rel: "noopener noreferrer",
|
|
3763
|
+
title: t("failIssueHint")
|
|
3764
|
+
}, t("failIssueBig")) : null]) : failureKind === "registryVersionStale" ? (0, react.createElement)("div", { className: Modal_module_css_default.failPrepareHint }, t("failRegistryVersionStaleHint")) : failureKind === "pnpmLinkedDirMissing" ? (0, react.createElement)("div", { className: Modal_module_css_default.failPrepareHint }, t("failPnpmLinkedDirMissingHint")) : failureKind === "fileLocked" ? (0, react.createElement)("div", { className: Modal_module_css_default.failPrepareHint }, t("failFileLockedHint")) : failureKind === "accessDenied" ? (0, react.createElement)("div", { className: Modal_module_css_default.failPrepareHint }, t("failAccessDeniedHint")) : failureKind === "fsUnavailable" ? (0, react.createElement)("div", { className: Modal_module_css_default.failPrepareHint }, t("failFsUnavailableHint")) : failureKind === "originRejected" ? (0, react.createElement)("div", { className: Modal_module_css_default.failPrepareHint }, t("failOriginRejectedHint", { profile: env?.profile ?? "<profile>" })) : failureKind === "network" ? (0, react.createElement)("div", null, [
|
|
3601
3765
|
(() => {
|
|
3602
3766
|
const target = unreachableTargetOf(message);
|
|
3603
3767
|
return target ? (0, react.createElement)("div", { className: Modal_module_css_default.failNetworkTarget }, t("failNetworkTarget", { url: target })) : null;
|
|
@@ -3627,7 +3791,23 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
3627
3791
|
rel: "noopener noreferrer",
|
|
3628
3792
|
title: t("failHubIssueHint")
|
|
3629
3793
|
}, t("failMisjudgeLink"))]) : null
|
|
3630
|
-
]) : failureKind === "hubState" ? (0, react.createElement)("div", null, [(0, react.createElement)("div", { className: Modal_module_css_default.failPrepareHint }, t("failHubStateHint", { action: actionWord }))]) : failureKind === "timeout" ? (0, react.createElement)("div", null, [(0, react.createElement)("div", { className: Modal_module_css_default.failPrepareHint }, t("failTimeoutHint"))]) : failureKind === "profileLock" ? (0, react.createElement)("div", null, [(0, react.createElement)("div", { className: Modal_module_css_default.failPrepareHint }, t("failProfileLockHint", { action: actionWord }))]) : failureKind === "hostCliSpawn" ? (0, react.createElement)("div", null, [(0, react.createElement)("div", { className: Modal_module_css_default.failPrepareHint }, t("failHostCliSpawnHint"))]) :
|
|
3794
|
+
]) : failureKind === "hubState" ? (0, react.createElement)("div", null, [(0, react.createElement)("div", { className: Modal_module_css_default.failPrepareHint }, t("failHubStateHint", { action: actionWord }))]) : failureKind === "timeout" ? (0, react.createElement)("div", null, [(0, react.createElement)("div", { className: Modal_module_css_default.failPrepareHint }, t("failTimeoutHint"))]) : failureKind === "profileLock" ? (0, react.createElement)("div", null, [(0, react.createElement)("div", { className: Modal_module_css_default.failPrepareHint }, t("failProfileLockHint", { action: actionWord }))]) : failureKind === "hostCliSpawn" ? (0, react.createElement)("div", null, [(0, react.createElement)("div", { className: Modal_module_css_default.failPrepareHint }, t("failHostCliSpawnHint"))]) : failureKind === "pnpmIgnoredBuild" ? (0, react.createElement)("div", null, [
|
|
3795
|
+
(0, react.createElement)("div", { className: Modal_module_css_default.failPrepareHint }, t("failIgnoredBuild")),
|
|
3796
|
+
repo ? (0, react.createElement)("a", {
|
|
3797
|
+
className: Modal_module_css_default.failBigIssue,
|
|
3798
|
+
href: pluginIssueUrl(repo, message, env, command, attempts, action),
|
|
3799
|
+
target: "_blank",
|
|
3800
|
+
rel: "noopener noreferrer",
|
|
3801
|
+
title: t("failIssueHint")
|
|
3802
|
+
}, t("failIssueBig")) : null,
|
|
3803
|
+
repo ? (0, react.createElement)("div", null, [(0, react.createElement)("div", { className: Modal_module_css_default.failPrepareHint }, t("failMisjudgeHint")), (0, react.createElement)("a", {
|
|
3804
|
+
className: Modal_module_css_default.failMisjudgeLink,
|
|
3805
|
+
href: hubIssueUrl(repo, message, env, command, attempts, "misjudge", action),
|
|
3806
|
+
target: "_blank",
|
|
3807
|
+
rel: "noopener noreferrer",
|
|
3808
|
+
title: t("failHubIssueHint")
|
|
3809
|
+
}, t("failMisjudgeLink"))]) : null
|
|
3810
|
+
]) : (0, react.createElement)("div", null, [(0, react.createElement)("div", { className: Modal_module_css_default.failPrepareHint }, t("failUnclassifiedHint", { action: actionWord })), (0, react.createElement)("a", {
|
|
3631
3811
|
className: Modal_module_css_default.failBigIssue,
|
|
3632
3812
|
href: hubIssueUrl(repo, message, env, command, attempts, "triage", action),
|
|
3633
3813
|
target: "_blank",
|
|
@@ -3899,12 +4079,9 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
3899
4079
|
* Website: https://dsh-plugin.org
|
|
3900
4080
|
* GitHub: https://github.com/dshplugin/dsh-plugin-hub
|
|
3901
4081
|
*
|
|
3902
|
-
*
|
|
3903
|
-
*
|
|
3904
|
-
*
|
|
3905
|
-
* latest version) merged with the host runtime facts (install path, installed
|
|
3906
|
-
* version, install time, last update). Update / uninstall actions are
|
|
3907
|
-
* offered from here too, mirroring the row actions.
|
|
4082
|
+
* 已安装插件详情弹窗:从「已安装」视图打开(行点击或详情按钮),展示我们对某个已安装项
|
|
4083
|
+
* 掌握的全部信息 —— 目录元数据(分类、收录入口、Star/Fork、最新版本)与宿主运行时事实
|
|
4084
|
+
* (安装路径、已装版本、安装时间、最后更新)合并呈现。此处的更新/卸载动作与行内动作一致。
|
|
3908
4085
|
*/
|
|
3909
4086
|
/** ISO 安装时间 → 本地可读;非法值返回 null(行内不显示)。 */
|
|
3910
4087
|
function fmtDate(iso, lang) {
|
|
@@ -3981,13 +4158,11 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
3981
4158
|
* Website: https://dsh-plugin.org
|
|
3982
4159
|
* GitHub: https://github.com/dshplugin/dsh-plugin-hub
|
|
3983
4160
|
*
|
|
3984
|
-
*
|
|
3985
|
-
*
|
|
3986
|
-
* in-button double-click.
|
|
4161
|
+
* 通用确认弹窗 —— 应用里所有「确定吗?」问题的唯一入口。规则:任何询问都必须是
|
|
4162
|
+
* 弹窗,绝不用按钮内双击。
|
|
3987
4163
|
*
|
|
3988
|
-
*
|
|
3989
|
-
*
|
|
3990
|
-
* action glyph for destructive ones (clear / delete / uninstall / reset).
|
|
4164
|
+
* 中间的图标一眼说明类型:常规确认(安装/更新/重启/忽略)用蓝色问号,
|
|
4165
|
+
* 危险操作(清空/删除/卸载/重置)用红色动作图形。
|
|
3991
4166
|
*/
|
|
3992
4167
|
/** 通用确认弹窗:标题 + 类型图标 + 描述 + 取消/确认按钮。
|
|
3993
4168
|
* type='question' → 蓝问号 + 品牌蓝确认按钮;危险类型 → 红图形 + 红色确认按钮。 */
|
|
@@ -4026,15 +4201,11 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
4026
4201
|
* Website: https://dsh-plugin.org
|
|
4027
4202
|
* GitHub: https://github.com/dshplugin/dsh-plugin-hub
|
|
4028
4203
|
*
|
|
4029
|
-
*
|
|
4030
|
-
* remove task — successes and failures alike.
|
|
4204
|
+
* 通知中心弹窗:每个已结算的安装/卸载任务(成功与失败)的持久化清单。
|
|
4031
4205
|
*
|
|
4032
|
-
*
|
|
4033
|
-
*
|
|
4034
|
-
*
|
|
4035
|
-
* success, red cross for failure) with white glyph and message text;
|
|
4036
|
-
* failures keep their copy / fix / file-an-issue actions. Opened from the
|
|
4037
|
-
* header entry button (after the Settings tab).
|
|
4206
|
+
* 记录在结算时写入 localStorage(见 logic/failures.ts),即使弹窗被关闭或用户离开,
|
|
4207
|
+
* 结果也不会丢失。每条带圆形状态徽标(成功绿勾、失败红叉,白色图形)与消息文本;
|
|
4208
|
+
* 失败项保留复制/修复/提 Issue 动作。由头部入口按钮(「设置」tab 之后)打开。
|
|
4038
4209
|
*/
|
|
4039
4210
|
/** 记录时间完整展示:YYYY-MM-DD HH:mm:ss(每条通知都带精确到秒的时间戳)。 */
|
|
4040
4211
|
function fmtTime(at) {
|
|
@@ -4128,13 +4299,16 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
4128
4299
|
}, `v${r.version}`) : null, r.repo ? isUpdate ? (0, react.createElement)("span", {
|
|
4129
4300
|
className: Modal_module_css_default.failRepo,
|
|
4130
4301
|
title: r.repo
|
|
4131
|
-
}, r.repo) : shownRepo ? (
|
|
4132
|
-
|
|
4133
|
-
|
|
4134
|
-
|
|
4135
|
-
|
|
4136
|
-
|
|
4137
|
-
|
|
4302
|
+
}, r.repo) : shownRepo ? (() => {
|
|
4303
|
+
const url = pluginSiteUrl(shownRepo);
|
|
4304
|
+
return (0, react.createElement)("a", {
|
|
4305
|
+
className: Modal_module_css_default.failRepo,
|
|
4306
|
+
href: url,
|
|
4307
|
+
target: "_blank",
|
|
4308
|
+
rel: "noopener noreferrer",
|
|
4309
|
+
title: url
|
|
4310
|
+
}, (0, react.createElement)("span", { className: Modal_module_css_default.failRepoLabel }, `${t("detailTitle")} · `), (0, react.createElement)("span", { className: Modal_module_css_default.failRepoUrl }, url.replace(/^https?:\/\//, "").split("?")[0]));
|
|
4311
|
+
})() : (0, react.createElement)("span", {
|
|
4138
4312
|
className: Modal_module_css_default.failRepo,
|
|
4139
4313
|
title: r.repo
|
|
4140
4314
|
}, r.repo) : null, !r.ok && (0, react.createElement)("button", {
|
|
@@ -4164,6 +4338,9 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
4164
4338
|
setConfirmRemoveId(r.id);
|
|
4165
4339
|
}
|
|
4166
4340
|
}, (0, react.createElement)(CloseIcon))), !r.ok && (() => {
|
|
4341
|
+
const k = classifyFailure(r.message);
|
|
4342
|
+
return (0, react.createElement)("div", null, [(0, react.createElement)("div", { className: Modal_module_css_default.failKindTitle }, t(`failKind_${k}`, k === "hostIncompatible" ? { version: /incompatible with dsh\s+([^\s:;,]+)/i.exec(r.message ?? "")?.[1] ?? "" } : void 0)), k === "hostIncompatible" ? null : (0, react.createElement)("div", { className: Modal_module_css_default.failReason }, t(`failReason_${k}`))]);
|
|
4343
|
+
})(), !r.ok && (() => {
|
|
4167
4344
|
const kind = classifyFailure(r.message);
|
|
4168
4345
|
const action = actionOfRecord(r);
|
|
4169
4346
|
const actionWord = t(action === "uninstall" ? "actionUninstall" : action === "update" ? "actionUpdate" : "actionInstall");
|
|
@@ -4197,6 +4374,20 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
4197
4374
|
}, t("failIssueBig")) : null
|
|
4198
4375
|
]);
|
|
4199
4376
|
}
|
|
4377
|
+
if (kind === "hostIncompatible") {
|
|
4378
|
+
const version = /incompatible with dsh\s+([^\s:;,]+)/i.exec(r.message ?? "")?.[1] ?? "";
|
|
4379
|
+
return (0, react.createElement)("div", null, [
|
|
4380
|
+
(0, react.createElement)("div", { className: Modal_module_css_default.failReason }, t("failHostIncompatibleReason", { version })),
|
|
4381
|
+
(0, react.createElement)("div", { className: Modal_module_css_default.failPrepareHint }, t("failHostIncompatibleHint")),
|
|
4382
|
+
r.repo && shownRepo ? (0, react.createElement)("a", {
|
|
4383
|
+
className: Modal_module_css_default.failBigIssue,
|
|
4384
|
+
href: pluginIssueUrl(shownRepo, r.message, env, r.command, r.attempts, action),
|
|
4385
|
+
target: "_blank",
|
|
4386
|
+
rel: "noopener noreferrer",
|
|
4387
|
+
title: t("failIssueHint")
|
|
4388
|
+
}, t("failIssueBig")) : null
|
|
4389
|
+
]);
|
|
4390
|
+
}
|
|
4200
4391
|
if (kind === "registryVersionStale") return (0, react.createElement)("div", { className: Modal_module_css_default.failPrepareHint }, t("failRegistryVersionStaleHint"));
|
|
4201
4392
|
if (kind === "pnpmLinkedDirMissing") return (0, react.createElement)("div", { className: Modal_module_css_default.failPrepareHint }, t("failPnpmLinkedDirMissingHint"));
|
|
4202
4393
|
if (kind === "fileLocked") return (0, react.createElement)("div", { className: Modal_module_css_default.failPrepareHint }, t("failFileLockedHint"));
|
|
@@ -4239,7 +4430,24 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
4239
4430
|
if (kind === "timeout") return (0, react.createElement)("div", null, [(0, react.createElement)("div", { className: Modal_module_css_default.failPrepareHint }, t("failTimeoutHint"))]);
|
|
4240
4431
|
if (kind === "profileLock") return (0, react.createElement)("div", null, [(0, react.createElement)("div", { className: Modal_module_css_default.failPrepareHint }, t("failProfileLockHint", { action: actionWord }))]);
|
|
4241
4432
|
if (kind === "hostCliSpawn") return (0, react.createElement)("div", null, [(0, react.createElement)("div", { className: Modal_module_css_default.failPrepareHint }, t("failHostCliSpawnHint"))]);
|
|
4242
|
-
|
|
4433
|
+
if (kind === "pnpmIgnoredBuild") return (0, react.createElement)("div", null, [
|
|
4434
|
+
(0, react.createElement)("div", { className: Modal_module_css_default.failPrepareHint }, t("failIgnoredBuild")),
|
|
4435
|
+
r.repo && shownRepo ? (0, react.createElement)("a", {
|
|
4436
|
+
className: Modal_module_css_default.failBigIssue,
|
|
4437
|
+
href: pluginIssueUrl(shownRepo, r.message, env, r.command, r.attempts, action),
|
|
4438
|
+
target: "_blank",
|
|
4439
|
+
rel: "noopener noreferrer",
|
|
4440
|
+
title: t("failIssueHint")
|
|
4441
|
+
}, t("failIssueBig")) : null,
|
|
4442
|
+
r.repo && shownRepo ? (0, react.createElement)("div", null, [(0, react.createElement)("div", { className: Modal_module_css_default.failPrepareHint }, t("failMisjudgeHint")), (0, react.createElement)("a", {
|
|
4443
|
+
className: Modal_module_css_default.failMisjudgeLink,
|
|
4444
|
+
href: hubIssueUrl(shownRepo, r.message, env, r.command, r.attempts, "misjudge", action),
|
|
4445
|
+
target: "_blank",
|
|
4446
|
+
rel: "noopener noreferrer",
|
|
4447
|
+
title: t("failHubIssueHint")
|
|
4448
|
+
}, t("failMisjudgeLink"))]) : null
|
|
4449
|
+
]);
|
|
4450
|
+
return (0, react.createElement)("div", null, [(0, react.createElement)("div", { className: Modal_module_css_default.failPrepareHint }, t("failUnclassifiedHint", { action: actionWord })), (0, react.createElement)("a", {
|
|
4243
4451
|
className: Modal_module_css_default.failBigIssue,
|
|
4244
4452
|
href: hubIssueUrl(shownRepo || r.repo, r.message, env, r.command, r.attempts, "triage", action),
|
|
4245
4453
|
target: "_blank",
|
|
@@ -4287,8 +4495,7 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
4287
4495
|
* Website: https://dsh-plugin.org
|
|
4288
4496
|
* GitHub: https://github.com/dshplugin/dsh-plugin-hub
|
|
4289
4497
|
*
|
|
4290
|
-
*
|
|
4291
|
-
* by the purple ad banner that promotes the catalog stats.
|
|
4498
|
+
* 板块头部:品牌标题行(H1 + 官网入口按钮)+ 副标题,其后是宣传目录统计的紫色广告条。
|
|
4292
4499
|
*/
|
|
4293
4500
|
function CatalogHeader({ t, langPath, statsTotal, statsVerified, onToggleLang, hubUpdate, onVersionClick, onAboutClick }) {
|
|
4294
4501
|
return (0, react.createElement)(react.Fragment, null, (0, react.createElement)("div", { className: Header_module_css_default.header }, (0, react.createElement)("div", { className: Header_module_css_default.headerTitleRow }, (0, react.createElement)("a", {
|
|
@@ -4349,9 +4556,8 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
4349
4556
|
* Website: https://dsh-plugin.org
|
|
4350
4557
|
* GitHub: https://github.com/dshplugin/dsh-plugin-hub
|
|
4351
4558
|
*
|
|
4352
|
-
*
|
|
4353
|
-
*
|
|
4354
|
-
* carry no counts so their widths stay uniform.
|
|
4559
|
+
* 分类 Tab:先是「全部」chip,其后每个目录分类一个 chip。「全部」chip 带插件总数,
|
|
4560
|
+
* 各分类 chip 不带计数以保持宽度一致。
|
|
4355
4561
|
*/
|
|
4356
4562
|
function CategoryTabs({ category, setCategory, allLabel, totalCount, langKey }) {
|
|
4357
4563
|
return (0, react.createElement)("div", { className: Header_module_css_default.tabs }, (0, react.createElement)("button", {
|
|
@@ -4371,12 +4577,11 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
4371
4577
|
* Website: https://dsh-plugin.org
|
|
4372
4578
|
* GitHub: https://github.com/dshplugin/dsh-plugin-hub
|
|
4373
4579
|
*
|
|
4374
|
-
*
|
|
4375
|
-
*
|
|
4376
|
-
*
|
|
4377
|
-
*
|
|
4378
|
-
*
|
|
4379
|
-
* button shows an up/down arrow for the current direction).
|
|
4580
|
+
* 市场列表上方的工具栏:
|
|
4581
|
+
* 第一行 —— 整行宽的搜索框;
|
|
4582
|
+
* 第二行 —— 左侧结果计数,右侧排序分段控件
|
|
4583
|
+
* (与已安装视图一致:点同一排序切换正/倒序,点新排序用其默认方向;
|
|
4584
|
+
* 激活按钮显示当前方向的上/下箭头)。
|
|
4380
4585
|
*/
|
|
4381
4586
|
/** 单选按钮组中的一个按钮(segmented control,与已安装视图排序按钮同款) */
|
|
4382
4587
|
function SegBtn$1({ active, onClick, label, icon }) {
|
|
@@ -4426,40 +4631,40 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
4426
4631
|
css: css$9
|
|
4427
4632
|
});
|
|
4428
4633
|
var List_module_css_default = {
|
|
4429
|
-
"
|
|
4430
|
-
"
|
|
4431
|
-
"
|
|
4432
|
-
"topics": "_3XaZHa_topics",
|
|
4433
|
-
"cardSide": "_3XaZHa_cardSide",
|
|
4434
|
-
"state": "_3XaZHa_state",
|
|
4435
|
-
"stateDesc": "_3XaZHa_stateDesc",
|
|
4436
|
-
"retryBtn": "_3XaZHa_retryBtn",
|
|
4437
|
-
"stateActions": "_3XaZHa_stateActions",
|
|
4438
|
-
"versionBadge": "_3XaZHa_versionBadge",
|
|
4634
|
+
"stats": "_3XaZHa_stats",
|
|
4635
|
+
"cardHead": "_3XaZHa_cardHead",
|
|
4636
|
+
"installBtn": "_3XaZHa_installBtn",
|
|
4439
4637
|
"cardTitle": "_3XaZHa_cardTitle",
|
|
4440
|
-
"desc": "_3XaZHa_desc",
|
|
4441
|
-
"stateTitle": "_3XaZHa_stateTitle",
|
|
4442
|
-
"fork": "_3XaZHa_fork",
|
|
4443
|
-
"installBtnInstalled": "_3XaZHa_installBtnInstalled",
|
|
4444
4638
|
"installBtnUpdate": "_3XaZHa_installBtnUpdate",
|
|
4445
|
-
"
|
|
4446
|
-
"
|
|
4447
|
-
"diagBtn": "_3XaZHa_diagBtn",
|
|
4448
|
-
"footLink": "_3XaZHa_footLink",
|
|
4449
|
-
"actions": "_3XaZHa_actions",
|
|
4639
|
+
"topics": "_3XaZHa_topics",
|
|
4640
|
+
"fork": "_3XaZHa_fork",
|
|
4450
4641
|
"moreSentinel": "_3XaZHa_moreSentinel",
|
|
4451
|
-
"
|
|
4452
|
-
"
|
|
4453
|
-
"footer": "_3XaZHa_footer",
|
|
4454
|
-
"cardMain": "_3XaZHa_cardMain",
|
|
4455
|
-
"cardHead": "_3XaZHa_cardHead",
|
|
4642
|
+
"star": "_3XaZHa_star",
|
|
4643
|
+
"card": "_3XaZHa_card",
|
|
4456
4644
|
"topic": "_3XaZHa_topic",
|
|
4457
|
-
"date": "_3XaZHa_date",
|
|
4458
|
-
"stats": "_3XaZHa_stats",
|
|
4459
4645
|
"updateBadge": "_3XaZHa_updateBadge",
|
|
4460
|
-
"
|
|
4646
|
+
"installBtnCopied": "_3XaZHa_installBtnCopied",
|
|
4647
|
+
"state": "_3XaZHa_state",
|
|
4648
|
+
"date": "_3XaZHa_date",
|
|
4649
|
+
"desc": "_3XaZHa_desc",
|
|
4650
|
+
"cardMain": "_3XaZHa_cardMain",
|
|
4651
|
+
"diagBtn": "_3XaZHa_diagBtn",
|
|
4652
|
+
"stateActions": "_3XaZHa_stateActions",
|
|
4653
|
+
"detailBtn": "_3XaZHa_detailBtn",
|
|
4654
|
+
"footer": "_3XaZHa_footer",
|
|
4655
|
+
"footLink": "_3XaZHa_footLink",
|
|
4461
4656
|
"categoryBadge": "_3XaZHa_categoryBadge",
|
|
4462
|
-
"
|
|
4657
|
+
"versionBadge": "_3XaZHa_versionBadge",
|
|
4658
|
+
"list": "_3XaZHa_list",
|
|
4659
|
+
"retryBtn": "_3XaZHa_retryBtn",
|
|
4660
|
+
"verified": "_3XaZHa_verified",
|
|
4661
|
+
"uninstallBtn": "_3XaZHa_uninstallBtn",
|
|
4662
|
+
"stateTitle": "_3XaZHa_stateTitle",
|
|
4663
|
+
"stateDesc": "_3XaZHa_stateDesc",
|
|
4664
|
+
"body": "_3XaZHa_body",
|
|
4665
|
+
"cardSide": "_3XaZHa_cardSide",
|
|
4666
|
+
"installBtnInstalled": "_3XaZHa_installBtnInstalled",
|
|
4667
|
+
"actions": "_3XaZHa_actions"
|
|
4463
4668
|
};
|
|
4464
4669
|
//#endregion
|
|
4465
4670
|
//#region src/client/hooks/useIncrementalList.ts
|
|
@@ -4468,11 +4673,9 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
4468
4673
|
* Website: https://dsh-plugin.org
|
|
4469
4674
|
* GitHub: https://github.com/dshplugin/dsh-plugin-hub
|
|
4470
4675
|
*
|
|
4471
|
-
*
|
|
4472
|
-
*
|
|
4473
|
-
*
|
|
4474
|
-
* The items reference is the list identity — category / search / sort
|
|
4475
|
-
* changes produce a new array, which resets the window to the first batch.
|
|
4676
|
+
* 增量列表:只渲染(可能很大的)结果集的第一批,末尾哨兵滚入视口时就追加下一批,
|
|
4677
|
+
* 让插件市场绝不一次性挂载成千上万张卡片。
|
|
4678
|
+
* items 引用即列表身份 —— 分类/搜索/排序变化会产出新数组,窗口随之重置回第一批。
|
|
4476
4679
|
*/
|
|
4477
4680
|
/** 首批渲染条数 & 每次滚到底追加的增量(单卡约 80px 高,100 条已远超一屏) */
|
|
4478
4681
|
const PAGE_SIZE = 100;
|
|
@@ -4506,9 +4709,8 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
4506
4709
|
* Website: https://dsh-plugin.org
|
|
4507
4710
|
* GitHub: https://github.com/dshplugin/dsh-plugin-hub
|
|
4508
4711
|
*
|
|
4509
|
-
*
|
|
4510
|
-
*
|
|
4511
|
-
* uninstall actions.
|
|
4712
|
+
* 目录列表里的单张插件卡片:名称/分类/verified 徽标、描述 + 标签、Star/Fork/日期
|
|
4713
|
+
* 统计,以及详情/安装/卸载动作。
|
|
4512
4714
|
*/
|
|
4513
4715
|
function PluginCard({ plugin: p, copied, installedName, installedVersion, hasUpdate, t, langKey, langPath, onInstall, onUninstall }) {
|
|
4514
4716
|
const repo = p.source?.repo ?? "";
|
|
@@ -4557,10 +4759,8 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
4557
4759
|
* Website: https://dsh-plugin.org
|
|
4558
4760
|
* GitHub: https://github.com/dshplugin/dsh-plugin-hub
|
|
4559
4761
|
*
|
|
4560
|
-
*
|
|
4561
|
-
*
|
|
4562
|
-
* the category or install-status filter changes so the replaced content is
|
|
4563
|
-
* not mistaken for a no-op update.
|
|
4762
|
+
* 目录列表:承载加载/失败/空三态、插件卡片与计数页脚的滚动容器。分类或安装状态
|
|
4763
|
+
* 筛选变化时重置滚动位置,避免替换后的内容被误当成「没变化」。
|
|
4564
4764
|
*/
|
|
4565
4765
|
function CatalogList({ plugins, failed, visible, total, t, langPath, reload, category, copied, installedName, installedVersion, hasUpdate, langKey, onInstall, onUninstall, hasProxy, onOpenDiagnostics }) {
|
|
4566
4766
|
/** 列表滚动容器:分类/搜索切换后列表内容替换但 scrollTop 保留,会让用户误以为列表没更新,需重置回顶部 */
|
|
@@ -4609,10 +4809,8 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
4609
4809
|
* Website: https://dsh-plugin.org
|
|
4610
4810
|
* GitHub: https://github.com/dshplugin/dsh-plugin-hub
|
|
4611
4811
|
*
|
|
4612
|
-
*
|
|
4613
|
-
*
|
|
4614
|
-
* it wires catalog state (query/sort/filter/category) to the small
|
|
4615
|
-
* presentational components so PluginHubSection stays free of view internals.
|
|
4812
|
+
* 市场视图:目录的浏览体验 —— 分类 Tab、搜索/排序/安装状态控件与插件列表。自身不持有状态,
|
|
4813
|
+
* 只把目录状态(query/sort/filter/category)接到小型展示组件上,让 PluginHubSection 不掺视图细节。
|
|
4616
4814
|
*/
|
|
4617
4815
|
function MarketView({ catalog, t, langPath, langKey, copied, resultText, onInstall, onUninstall, hasProxy, onOpenDiagnostics }) {
|
|
4618
4816
|
return (0, react.createElement)(react.Fragment, null, (0, react.createElement)(CategoryTabs, {
|
|
@@ -4666,15 +4864,15 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
4666
4864
|
css: css$8
|
|
4667
4865
|
});
|
|
4668
4866
|
var SectionTabs_module_css_default = {
|
|
4669
|
-
"
|
|
4867
|
+
"noticeCount": "_7tvizq_noticeCount",
|
|
4670
4868
|
"tabIcon": "_7tvizq_tabIcon",
|
|
4671
|
-
"noticeBtn": "_7tvizq_noticeBtn",
|
|
4672
|
-
"tab": "_7tvizq_tab",
|
|
4673
|
-
"root": "_7tvizq_root",
|
|
4674
4869
|
"tabCountActive": "_7tvizq_tabCountActive",
|
|
4675
4870
|
"noticeIcon": "_7tvizq_noticeIcon",
|
|
4676
|
-
"
|
|
4677
|
-
"
|
|
4871
|
+
"noticeBtn": "_7tvizq_noticeBtn",
|
|
4872
|
+
"root": "_7tvizq_root",
|
|
4873
|
+
"tab": "_7tvizq_tab",
|
|
4874
|
+
"tabActive": "_7tvizq_tabActive",
|
|
4875
|
+
"tabCount": "_7tvizq_tabCount"
|
|
4678
4876
|
};
|
|
4679
4877
|
//#endregion
|
|
4680
4878
|
//#region src/client/components/layout/SectionTabs.tsx
|
|
@@ -4683,11 +4881,9 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
4683
4881
|
* Website: https://dsh-plugin.org
|
|
4684
4882
|
* GitHub: https://github.com/dshplugin/dsh-plugin-hub
|
|
4685
4883
|
*
|
|
4686
|
-
*
|
|
4687
|
-
*
|
|
4688
|
-
*
|
|
4689
|
-
* Kept visually distinct from the category chips so the hierarchy reads:
|
|
4690
|
-
* section → category → plugin.
|
|
4884
|
+
* 一级导航:紧凑分段控件,在四个顶层板块间切换 —— 市场(浏览)、已安装(管理)、
|
|
4885
|
+
* 自定义(手动命令安装)与设置(网络源与偏好)。与分类 chip 视觉上区分开,
|
|
4886
|
+
* 让层级清晰:板块 → 分类 → 插件。
|
|
4691
4887
|
*/
|
|
4692
4888
|
const ORDER = [
|
|
4693
4889
|
{
|
|
@@ -4751,42 +4947,42 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
4751
4947
|
css: css$7
|
|
4752
4948
|
});
|
|
4753
4949
|
var InstalledView_module_css_default = {
|
|
4754
|
-
"
|
|
4755
|
-
"rowDetail": "_1nXeGW_rowDetail",
|
|
4756
|
-
"empty": "_1nXeGW_empty",
|
|
4757
|
-
"exampleRow": "_1nXeGW_exampleRow",
|
|
4758
|
-
"rowCategory": "_1nXeGW_rowCategory",
|
|
4950
|
+
"segGroup": "_1nXeGW_segGroup",
|
|
4759
4951
|
"list": "_1nXeGW_list",
|
|
4760
|
-
"
|
|
4761
|
-
"rowActions": "_1nXeGW_rowActions",
|
|
4762
|
-
"emptyTitle": "_1nXeGW_emptyTitle",
|
|
4763
|
-
"exampleBadge": "_1nXeGW_exampleBadge",
|
|
4764
|
-
"rowTitle": "_1nXeGW_rowTitle",
|
|
4765
|
-
"root": "_1nXeGW_root",
|
|
4766
|
-
"segBtnActive": "_1nXeGW_segBtnActive",
|
|
4767
|
-
"rowRestart": "_1nXeGW_rowRestart",
|
|
4768
|
-
"rowMain": "_1nXeGW_rowMain",
|
|
4769
|
-
"row": "_1nXeGW_row",
|
|
4770
|
-
"rowRepo": "_1nXeGW_rowRepo",
|
|
4952
|
+
"rowDesc": "_1nXeGW_rowDesc",
|
|
4771
4953
|
"statusInactive": "_1nXeGW_statusInactive",
|
|
4772
|
-
"versionBadge": "_1nXeGW_versionBadge",
|
|
4773
|
-
"segRow": "_1nXeGW_segRow",
|
|
4774
|
-
"segGroup": "_1nXeGW_segGroup",
|
|
4775
|
-
"rowSourceTag": "_1nXeGW_rowSourceTag",
|
|
4776
4954
|
"rowSourceTagHub": "_1nXeGW_rowSourceTagHub",
|
|
4777
|
-
"
|
|
4778
|
-
"updateBadge": "_1nXeGW_updateBadge",
|
|
4779
|
-
"searchInput": "_1nXeGW_searchInput",
|
|
4780
|
-
"toolbar": "_1nXeGW_toolbar",
|
|
4781
|
-
"rowTitleLine": "_1nXeGW_rowTitleLine",
|
|
4782
|
-
"statusDot": "_1nXeGW_statusDot",
|
|
4955
|
+
"row": "_1nXeGW_row",
|
|
4783
4956
|
"emptyDesc": "_1nXeGW_emptyDesc",
|
|
4784
|
-
"
|
|
4785
|
-
"
|
|
4957
|
+
"rowSourceTag": "_1nXeGW_rowSourceTag",
|
|
4958
|
+
"rowCategory": "_1nXeGW_rowCategory",
|
|
4786
4959
|
"segLabel": "_1nXeGW_segLabel",
|
|
4960
|
+
"rowRestart": "_1nXeGW_rowRestart",
|
|
4961
|
+
"rowTitleLine": "_1nXeGW_rowTitleLine",
|
|
4962
|
+
"toolbar": "_1nXeGW_toolbar",
|
|
4963
|
+
"searchInput": "_1nXeGW_searchInput",
|
|
4964
|
+
"rowTitle": "_1nXeGW_rowTitle",
|
|
4787
4965
|
"segBtn": "_1nXeGW_segBtn",
|
|
4966
|
+
"rowMain": "_1nXeGW_rowMain",
|
|
4788
4967
|
"statusPending": "_1nXeGW_statusPending",
|
|
4789
|
-
"
|
|
4968
|
+
"rowDetail": "_1nXeGW_rowDetail",
|
|
4969
|
+
"rowSourceTagManual": "_1nXeGW_rowSourceTagManual",
|
|
4970
|
+
"statusDot": "_1nXeGW_statusDot",
|
|
4971
|
+
"rowActions": "_1nXeGW_rowActions",
|
|
4972
|
+
"rowRepo": "_1nXeGW_rowRepo",
|
|
4973
|
+
"rowMeta": "_1nXeGW_rowMeta",
|
|
4974
|
+
"versionBadge": "_1nXeGW_versionBadge",
|
|
4975
|
+
"updateBadge": "_1nXeGW_updateBadge",
|
|
4976
|
+
"emptyTitle": "_1nXeGW_emptyTitle",
|
|
4977
|
+
"root": "_1nXeGW_root",
|
|
4978
|
+
"rowUninstall": "_1nXeGW_rowUninstall",
|
|
4979
|
+
"segRow": "_1nXeGW_segRow",
|
|
4980
|
+
"searchWrap": "_1nXeGW_searchWrap",
|
|
4981
|
+
"segBtnActive": "_1nXeGW_segBtnActive",
|
|
4982
|
+
"exampleRow": "_1nXeGW_exampleRow",
|
|
4983
|
+
"empty": "_1nXeGW_empty",
|
|
4984
|
+
"exampleBadge": "_1nXeGW_exampleBadge",
|
|
4985
|
+
"rowUpdate": "_1nXeGW_rowUpdate"
|
|
4790
4986
|
};
|
|
4791
4987
|
//#endregion
|
|
4792
4988
|
//#region src/client/components/views/InstalledView.tsx
|
|
@@ -4795,18 +4991,13 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
4795
4991
|
* Website: https://dsh-plugin.org
|
|
4796
4992
|
* GitHub: https://github.com/dshplugin/dsh-plugin-hub
|
|
4797
4993
|
*
|
|
4798
|
-
*
|
|
4799
|
-
*
|
|
4800
|
-
*
|
|
4801
|
-
*
|
|
4802
|
-
*
|
|
4803
|
-
* search box plus two segmented radio-button groups: source filter
|
|
4804
|
-
* (all / catalog / custom) and sort (name / recently installed / stars / forks).
|
|
4805
|
-
* Each row carries restart (when pending), update and uninstall actions
|
|
4806
|
-
* and opens a detail modal with the full install metadata.
|
|
4994
|
+
* 已安装视图:管理安装进当前 profile 的插件。沿用主流扩展管理器模式(VSCode 已安装 tab)——
|
|
4995
|
+
* 可搜索、可排序的已安装清单,混排目录插件(完整元数据)与命令行自定义安装(目录之外,
|
|
4996
|
+
* 只有运行时信息,打「自定义」徽标)。工具栏含搜索框与两组分段单选:来源筛选
|
|
4997
|
+
* (全部/目录/自定义)与排序(名称/最近安装/Star/Fork)。每行带重启(待重启时)、更新与
|
|
4998
|
+
* 卸载动作,并打开含完整安装元数据的详情弹窗。
|
|
4807
4999
|
*
|
|
4808
|
-
*
|
|
4809
|
-
* model arrives from the catalog hook and actions bubble up via callbacks.
|
|
5000
|
+
* 纯展示组件:只持有本地搜索/排序状态;InstalledItem 模型来自目录 hook,动作经回调上抛。
|
|
4810
5001
|
*/
|
|
4811
5002
|
const INSTALLED_SORTS = [
|
|
4812
5003
|
"sortName",
|
|
@@ -5020,7 +5211,7 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
5020
5211
|
}
|
|
5021
5212
|
//#endregion
|
|
5022
5213
|
//#region \0dsh-css:src/client/styles/CustomInstallView.module.css.mjs
|
|
5023
|
-
const css$6 = ".zISxCG_root{flex-direction:column;gap:10px;min-width:0;max-width:560px;display:flex}.zISxCG_desc{color:var(--hub-text-tertiary);margin:0;font-size:12px;line-height:18px}.zISxCG_installCards{flex-direction:column;flex-shrink:0;gap:10px;min-width:0;display:flex}.zISxCG_installCard{background:var(--hub-bg-1);border:1px solid var(--hub-border-1);border-radius:8px;flex-direction:column;gap:8px;min-width:0;padding:10px 12px;display:flex}.zISxCG_installCardHead{align-items:center;min-width:0;display:flex}.zISxCG_installLabel{color:var(--hub-text-primary);font-size:12px;font-weight:600;line-height:18px}.zISxCG_installHelpBtn{width:18px;height:18px;color:var(--hub-text-tertiary);cursor:pointer;-webkit-user-select:none;user-select:none;background:0 0;border:1px solid #0000;border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;margin-left:6px;padding:0;transition:color .12s,background .12s,border-color .12s;display:inline-flex}.zISxCG_installHelpBtn:hover{color:var(--hub-brand);background:var(--hub-brand-tint);border-color:var(--hub-brand-border-soft)}.
|
|
5214
|
+
const css$6 = ".zISxCG_root{flex-direction:column;gap:10px;min-width:0;max-width:560px;display:flex}.zISxCG_desc{color:var(--hub-text-tertiary);margin:0;font-size:12px;line-height:18px}.zISxCG_installCards{flex-direction:column;flex-shrink:0;gap:10px;min-width:0;display:flex}.zISxCG_installCard{background:var(--hub-bg-1);border:1px solid var(--hub-border-1);border-radius:8px;flex-direction:column;gap:8px;min-width:0;padding:10px 12px;display:flex}.zISxCG_installCardHead{align-items:center;min-width:0;display:flex}.zISxCG_installLabel{color:var(--hub-text-primary);font-size:12px;font-weight:600;line-height:18px}.zISxCG_installHelpBtn{width:18px;height:18px;color:var(--hub-text-tertiary);cursor:pointer;-webkit-user-select:none;user-select:none;background:0 0;border:1px solid #0000;border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;margin-left:6px;padding:0;transition:color .12s,background .12s,border-color .12s;display:inline-flex}.zISxCG_installHelpBtn:hover{color:var(--hub-brand);background:var(--hub-brand-tint);border-color:var(--hub-brand-border-soft)}.zISxCG_installExample{color:var(--hub-text-tertiary);white-space:nowrap;text-overflow:ellipsis;min-width:0;font-size:11px;line-height:16px;overflow:hidden}.zISxCG_installRow{align-items:center;gap:8px;min-width:0;display:flex}.zISxCG_installInput{min-width:0;height:28px;color:var(--hub-text-primary);border:1px solid var(--hub-border-2);background:0 0;border-radius:6px;outline:none;flex:auto;padding:0 9px;font-size:12px;line-height:26px;transition:border-color .12s}.zISxCG_installInput::placeholder{color:var(--hub-text-tertiary)}.zISxCG_installInput:focus{border-color:var(--hub-brand)}.zISxCG_installInputError,.zISxCG_installInputError:focus{border-color:var(--hub-danger-text)}.zISxCG_installBtn{color:#fff;background:var(--hub-brand);cursor:pointer;-webkit-user-select:none;user-select:none;border:none;border-radius:6px;flex-shrink:0;padding:5px 14px;font-family:inherit;font-size:12px;font-weight:500;line-height:18px;transition:background .12s,opacity .12s}.zISxCG_installBtn:hover{background:var(--hub-brand-hover)}.zISxCG_installBtn:disabled{opacity:.45;cursor:default}.zISxCG_installCardDisabled{opacity:.8}.zISxCG_channelOff{min-width:0;color:var(--hub-warn);background:var(--hub-warn-tint);border:1px solid var(--hub-warn-border);border-radius:6px;justify-content:space-between;align-items:center;gap:8px;padding:6px 9px;font-size:12px;line-height:16px;display:flex}.zISxCG_channelOffText{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.zISxCG_channelOffBtn{color:var(--hub-warn-strong);border:1px solid var(--hub-warn-border);cursor:pointer;white-space:nowrap;background:0 0;border-radius:6px;flex-shrink:0;padding:3px 10px;font-family:inherit;font-size:12px;font-weight:500;line-height:18px;transition:background .12s,color .12s}.zISxCG_channelOffBtn:hover{background:var(--hub-warn-tint);color:var(--hub-warn)}.zISxCG_installError{color:var(--hub-danger-text);background:var(--hub-danger-tint);border:1px solid var(--hub-danger-border);border-radius:6px;padding:5px 8px;font-size:12px;line-height:16px}.zISxCG_helpBody{flex-direction:column;gap:7px;padding:4px 2px;display:flex}.zISxCG_helpLine{align-items:baseline;gap:12px;min-width:0;font-size:12px;line-height:20px;display:flex}.zISxCG_helpCmd{color:var(--hub-text-primary);white-space:nowrap;flex-shrink:0;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:11px}.zISxCG_helpNote{min-width:0;color:var(--hub-text-tertiary);font-size:11px}";
|
|
5024
5215
|
const tagId$6 = "dsh-plugin/CustomInstallView.module.css";
|
|
5025
5216
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$6) + "]") === null) {
|
|
5026
5217
|
const tag = document.createElement("style");
|
|
@@ -5035,28 +5226,27 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
5035
5226
|
css: css$6
|
|
5036
5227
|
});
|
|
5037
5228
|
var CustomInstallView_module_css_default = {
|
|
5038
|
-
"
|
|
5039
|
-
"
|
|
5040
|
-
"helpLine": "zISxCG_helpLine",
|
|
5229
|
+
"installExample": "zISxCG_installExample",
|
|
5230
|
+
"installInput": "zISxCG_installInput",
|
|
5041
5231
|
"channelOffText": "zISxCG_channelOffText",
|
|
5042
5232
|
"installError": "zISxCG_installError",
|
|
5043
|
-
"
|
|
5233
|
+
"installInputError": "zISxCG_installInputError",
|
|
5234
|
+
"helpNote": "zISxCG_helpNote",
|
|
5235
|
+
"helpBody": "zISxCG_helpBody",
|
|
5044
5236
|
"root": "zISxCG_root",
|
|
5237
|
+
"installCardHead": "zISxCG_installCardHead",
|
|
5045
5238
|
"desc": "zISxCG_desc",
|
|
5046
|
-
"
|
|
5239
|
+
"helpCmd": "zISxCG_helpCmd",
|
|
5047
5240
|
"installCards": "zISxCG_installCards",
|
|
5048
|
-
"
|
|
5049
|
-
"
|
|
5241
|
+
"installBtn": "zISxCG_installBtn",
|
|
5242
|
+
"installLabel": "zISxCG_installLabel",
|
|
5243
|
+
"helpLine": "zISxCG_helpLine",
|
|
5050
5244
|
"channelOff": "zISxCG_channelOff",
|
|
5245
|
+
"installHelpBtn": "zISxCG_installHelpBtn",
|
|
5051
5246
|
"installCard": "zISxCG_installCard",
|
|
5052
|
-
"
|
|
5053
|
-
"installCardHead": "zISxCG_installCardHead",
|
|
5247
|
+
"channelOffBtn": "zISxCG_channelOffBtn",
|
|
5054
5248
|
"installCardDisabled": "zISxCG_installCardDisabled",
|
|
5055
|
-
"
|
|
5056
|
-
"installInput": "zISxCG_installInput",
|
|
5057
|
-
"installInputError": "zISxCG_installInputError",
|
|
5058
|
-
"installExample": "zISxCG_installExample",
|
|
5059
|
-
"channelOffBtn": "zISxCG_channelOffBtn"
|
|
5249
|
+
"installRow": "zISxCG_installRow"
|
|
5060
5250
|
};
|
|
5061
5251
|
//#endregion
|
|
5062
5252
|
//#region src/client/components/views/CustomInstallView.tsx
|
|
@@ -5065,47 +5255,21 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
5065
5255
|
* Website: https://dsh-plugin.org
|
|
5066
5256
|
* GitHub: https://github.com/dshplugin/dsh-plugin-hub
|
|
5067
5257
|
*
|
|
5068
|
-
*
|
|
5069
|
-
*
|
|
5070
|
-
*
|
|
5071
|
-
* npm/pnpm install command, including the official global `npm install -g`),
|
|
5072
|
-
* GitHub source and the official `dsh plugin ... add <target>` command —
|
|
5073
|
-
* each with a placeholder example above the input and its own format check.
|
|
5074
|
-
* The cards stay separate so a user never has to guess which format goes
|
|
5075
|
-
* where. Finished installs surface in the Installed view, marked as custom.
|
|
5258
|
+
* 自定义安装视图:独立一级板块,用于手动安装目录之外的 npm 包。安装卡片接受裸包名或完整的
|
|
5259
|
+
* npm/pnpm 安装命令(含官方全局 `npm install -g`),输入框上方带示例并自带格式校验。
|
|
5260
|
+
* 装完的插件出现在「已安装」视图,标记为自定义安装。
|
|
5076
5261
|
*
|
|
5077
|
-
*
|
|
5078
|
-
*
|
|
5079
|
-
* via onInstallCustom.
|
|
5262
|
+
* 纯展示组件:只持有本地输入/错误状态;真正的安装(custom 源,受安全开关控制)经
|
|
5263
|
+
* onInstallCustom 上抛。
|
|
5080
5264
|
*/
|
|
5081
|
-
/** GitHub 地址(带前缀形态):github:、https://github.com/、git+https://github.com/、git@github.com: */
|
|
5082
|
-
const GITHUB_URL_RE = /^(?:github:|https?:\/\/github\.com\/|git\+https?:\/\/github\.com\/|git@github\.com:)([A-Za-z0-9._-]+)\/([A-Za-z0-9._-]+?)(?:\.git)?$/;
|
|
5083
|
-
/** 裸 owner/repo(npm 包名只有 @scope/pkg 才带斜杠,无 @ 前缀的 a/b 一定是 GitHub 仓库) */
|
|
5084
|
-
const GITHUB_BARE_RE = /^[A-Za-z0-9._-]+\/[A-Za-z0-9._-]+$/;
|
|
5085
5265
|
/** npm 包名(含 @scope/pkg) */
|
|
5086
5266
|
const NPM_PACKAGE_RE = /^(?:@[a-z0-9._-]+\/)?[a-z0-9._-]+$/;
|
|
5087
|
-
/** DSH 命令行前缀(官方唯一形式 `dsh plugin --profile <name> <add|update> <target>`)—— 提取其中的动作与目标。
|
|
5088
|
-
* 官方 CLI(apps/cli/src/args.ts,commander):--profile 为必填长选项(无 -p 简写,省略即报错),
|
|
5089
|
-
* 支持 `--profile=<name>` 等号形式;命令大小写不敏感。update = 已安装目标覆盖更新到最新;
|
|
5090
|
-
* remove 不走这里(卸载由「已安装」列表的卸载按钮执行,命令框不认卸载动词)。
|
|
5091
|
-
* 与 server 端 installTargetOf 口径一致。 */
|
|
5092
|
-
const DSH_PLUGIN_CMD_RE = /^dsh\s+plugin\s+--profile(?:\s+|=)\S+\s+(add|update)\s+(.+)$/i;
|
|
5093
5267
|
/** npm 全局安装命令(官方 README 格式,如 `npm install -g @deepseek-ai/dsh @deepseek-harness-tui/dsh-tui`)——
|
|
5094
5268
|
* 提取 -g 之后的包列表;任一包名非法返回 null(交给格式错误提示)。与 server 端 globalNpmPackagesOf 口径一致。 */
|
|
5095
5269
|
const NPM_GLOBAL_CMD_RE = /^npm\s+(?:install|i)\s+(?:-g|--global)\s+(.+)$/i;
|
|
5096
5270
|
/** 常规 npm/pnpm 安装命令(装进当前 profile,如 `npm install lodash`、`pnpm add @scope/pkg`)——
|
|
5097
5271
|
* 提取命令后的包列表;包列表在 splitPackages 里逐个校验。 */
|
|
5098
5272
|
const NPM_INSTALL_CMD_RE = /^(?:npm\s+(?:install|i)|pnpm\s+(?:add|i|install))\s+(.+)$/i;
|
|
5099
|
-
/** 解析 DSH 命令:返回 { action, target };非官方命令返回 null(交给格式错误提示)。 */
|
|
5100
|
-
function parseDshCommand(raw) {
|
|
5101
|
-
const input = raw.trim();
|
|
5102
|
-
const match = DSH_PLUGIN_CMD_RE.exec(input);
|
|
5103
|
-
if (match === null) return null;
|
|
5104
|
-
return {
|
|
5105
|
-
action: match[1].toLowerCase(),
|
|
5106
|
-
target: match[2].trim()
|
|
5107
|
-
};
|
|
5108
|
-
}
|
|
5109
5273
|
/** 空格分隔的包列表:逐个按 npm 包名语法校验 + 拒绝以 - 开头的 token(npm 会把 --xxx 当参数而非包名),
|
|
5110
5274
|
* 任一非法返回 null(交给格式错误提示)。与 server 端 globalNpmPackagesOf 同口径。 */
|
|
5111
5275
|
function splitPackages(raw) {
|
|
@@ -5139,36 +5303,16 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
5139
5303
|
}
|
|
5140
5304
|
return null;
|
|
5141
5305
|
}
|
|
5142
|
-
|
|
5143
|
-
|
|
5144
|
-
|
|
5145
|
-
|
|
5146
|
-
|
|
5147
|
-
|
|
5148
|
-
npm: {
|
|
5149
|
-
titleKey: "npmInstallLabel",
|
|
5150
|
-
contentKey: "npmInstallHelp"
|
|
5151
|
-
},
|
|
5152
|
-
git: {
|
|
5153
|
-
titleKey: "gitInstallLabel",
|
|
5154
|
-
contentKey: "gitInstallHelp"
|
|
5155
|
-
},
|
|
5156
|
-
cmd: {
|
|
5157
|
-
titleKey: "dshCmdLabel",
|
|
5158
|
-
contentKey: "dshCmdHelp"
|
|
5159
|
-
}
|
|
5160
|
-
};
|
|
5161
|
-
function CustomInstallView({ t, onInstallCustom, enableNpm, enableGit, enableDsh, onOpenSettings, profile }) {
|
|
5306
|
+
/** 卡片标题旁的「帮助」弹窗:该卡片的标题与格式清单语言包 key。 */
|
|
5307
|
+
const HELP_CARDS = { npm: {
|
|
5308
|
+
titleKey: "npmInstallLabel",
|
|
5309
|
+
contentKey: "npmInstallHelp"
|
|
5310
|
+
} };
|
|
5311
|
+
function CustomInstallView({ t, onInstallCustom, enableNpm, onOpenSettings }) {
|
|
5162
5312
|
/** 自定义安装:NPM 包输入与格式错误('' = 无错误) */
|
|
5163
5313
|
const [npmQuery, setNpmQuery] = (0, react.useState)("");
|
|
5164
5314
|
const [npmError, setNpmError] = (0, react.useState)("");
|
|
5165
|
-
/**
|
|
5166
|
-
const [gitQuery, setGitQuery] = (0, react.useState)("");
|
|
5167
|
-
const [gitError, setGitError] = (0, react.useState)("");
|
|
5168
|
-
/** 自定义安装:DSH 命令输入与格式错误('' = 无错误) */
|
|
5169
|
-
const [cmdQuery, setCmdQuery] = (0, react.useState)("");
|
|
5170
|
-
const [cmdError, setCmdError] = (0, react.useState)("");
|
|
5171
|
-
/** 卡片标题旁「帮助」弹窗:null = 未打开;'npm' | 'git' | 'cmd' = 打开对应卡片的格式清单 */
|
|
5315
|
+
/** 卡片标题旁「帮助」弹窗:null = 未打开;'npm' = 打开该卡片的格式清单 */
|
|
5172
5316
|
const [helpFor, setHelpFor] = (0, react.useState)(null);
|
|
5173
5317
|
/** 通道关闭提示行:开关关掉后替代示例与输入行,引导去设置打开 */
|
|
5174
5318
|
const channelOffRow = (0, react.createElement)("div", { className: CustomInstallView_module_css_default.channelOff }, (0, react.createElement)("span", { className: CustomInstallView_module_css_default.channelOffText }, t("channelDisabledHint")), (0, react.createElement)("button", {
|
|
@@ -5192,34 +5336,6 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
5192
5336
|
setNpmQuery("");
|
|
5193
5337
|
setNpmError("");
|
|
5194
5338
|
};
|
|
5195
|
-
const submitGit = () => {
|
|
5196
|
-
const target = gitQuery.trim();
|
|
5197
|
-
if (!target) return;
|
|
5198
|
-
if (!isGitHubInput(target)) {
|
|
5199
|
-
setGitError(t("gitInstallInvalid"));
|
|
5200
|
-
return;
|
|
5201
|
-
}
|
|
5202
|
-
onInstallCustom(target, { installChannel: "git" });
|
|
5203
|
-
setGitQuery("");
|
|
5204
|
-
setGitError("");
|
|
5205
|
-
};
|
|
5206
|
-
const submitCmd = () => {
|
|
5207
|
-
const raw = cmdQuery.trim();
|
|
5208
|
-
if (!raw) return;
|
|
5209
|
-
const parsed = parseDshCommand(raw);
|
|
5210
|
-
if (parsed === null) {
|
|
5211
|
-
setCmdError(t("dshCmdInvalid", { profile }));
|
|
5212
|
-
return;
|
|
5213
|
-
}
|
|
5214
|
-
onInstallCustom(parsed.target, { installChannel: "dsh" });
|
|
5215
|
-
setCmdQuery("");
|
|
5216
|
-
setCmdError("");
|
|
5217
|
-
};
|
|
5218
|
-
/** 一键插入 DSH Plugin Hub 自身的更新命令:按当前 profile 拼官方命令填进输入框,用户确认后提交 */
|
|
5219
|
-
const insertHubUpdate = () => {
|
|
5220
|
-
setCmdQuery(`dsh plugin --profile ${profile} update dsh-plugin`);
|
|
5221
|
-
setCmdError("");
|
|
5222
|
-
};
|
|
5223
5339
|
return (0, react.createElement)("div", { className: CustomInstallView_module_css_default.root }, (0, react.createElement)("p", { className: CustomInstallView_module_css_default.desc }, t("customViewDesc")), (0, react.createElement)("div", { className: CustomInstallView_module_css_default.installCards }, (0, react.createElement)("div", { className: enableNpm ? CustomInstallView_module_css_default.installCard : `${CustomInstallView_module_css_default.installCard} ${CustomInstallView_module_css_default.installCardDisabled}` }, (0, react.createElement)("div", { className: CustomInstallView_module_css_default.installCardHead }, (0, react.createElement)("span", { className: CustomInstallView_module_css_default.installLabel }, t("npmInstallLabel")), (0, react.createElement)("button", {
|
|
5224
5340
|
type: "button",
|
|
5225
5341
|
className: CustomInstallView_module_css_default.installHelpBtn,
|
|
@@ -5248,66 +5364,6 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
5248
5364
|
onClick: submitNpm
|
|
5249
5365
|
}, t("installCliBtn"))),
|
|
5250
5366
|
npmError ? (0, react.createElement)("div", { className: CustomInstallView_module_css_default.installError }, npmError) : null
|
|
5251
|
-
]), (0, react.createElement)("div", { className: enableGit ? CustomInstallView_module_css_default.installCard : `${CustomInstallView_module_css_default.installCard} ${CustomInstallView_module_css_default.installCardDisabled}` }, (0, react.createElement)("div", { className: CustomInstallView_module_css_default.installCardHead }, (0, react.createElement)("span", { className: CustomInstallView_module_css_default.installLabel }, t("gitInstallLabel")), (0, react.createElement)("button", {
|
|
5252
|
-
type: "button",
|
|
5253
|
-
className: CustomInstallView_module_css_default.installHelpBtn,
|
|
5254
|
-
title: t("installHelp"),
|
|
5255
|
-
"aria-label": t("installHelp"),
|
|
5256
|
-
onClick: () => setHelpFor("git")
|
|
5257
|
-
}, (0, react.createElement)(HelpIcon))), !enableGit ? channelOffRow : [
|
|
5258
|
-
(0, react.createElement)("div", { className: CustomInstallView_module_css_default.installExample }, t("gitInstallExample")),
|
|
5259
|
-
(0, react.createElement)("div", { className: CustomInstallView_module_css_default.installRow }, (0, react.createElement)("input", {
|
|
5260
|
-
className: gitError ? `${CustomInstallView_module_css_default.installInput} ${CustomInstallView_module_css_default.installInputError}` : CustomInstallView_module_css_default.installInput,
|
|
5261
|
-
type: "text",
|
|
5262
|
-
placeholder: t("gitInstallPlaceholder"),
|
|
5263
|
-
value: gitQuery,
|
|
5264
|
-
spellCheck: false,
|
|
5265
|
-
onInput: (e) => {
|
|
5266
|
-
setGitQuery(e.target.value);
|
|
5267
|
-
setGitError("");
|
|
5268
|
-
},
|
|
5269
|
-
onKeyDown: (e) => {
|
|
5270
|
-
if (e.key === "Enter") submitGit();
|
|
5271
|
-
}
|
|
5272
|
-
}), (0, react.createElement)("button", {
|
|
5273
|
-
className: CustomInstallView_module_css_default.installBtn,
|
|
5274
|
-
type: "button",
|
|
5275
|
-
disabled: gitQuery.trim() === "",
|
|
5276
|
-
onClick: submitGit
|
|
5277
|
-
}, t("installCliBtn"))),
|
|
5278
|
-
gitError ? (0, react.createElement)("div", { className: CustomInstallView_module_css_default.installError }, gitError) : null
|
|
5279
|
-
]), (0, react.createElement)("div", { className: enableDsh ? CustomInstallView_module_css_default.installCard : `${CustomInstallView_module_css_default.installCard} ${CustomInstallView_module_css_default.installCardDisabled}` }, (0, react.createElement)("div", { className: CustomInstallView_module_css_default.installCardHead }, (0, react.createElement)("span", { className: CustomInstallView_module_css_default.installLabel }, t("dshCmdLabel")), (0, react.createElement)("button", {
|
|
5280
|
-
type: "button",
|
|
5281
|
-
className: CustomInstallView_module_css_default.installHelpBtn,
|
|
5282
|
-
title: t("installHelp"),
|
|
5283
|
-
"aria-label": t("installHelp"),
|
|
5284
|
-
onClick: () => setHelpFor("cmd")
|
|
5285
|
-
}, (0, react.createElement)(HelpIcon)), enableDsh ? (0, react.createElement)("button", {
|
|
5286
|
-
type: "button",
|
|
5287
|
-
className: CustomInstallView_module_css_default.installInsertBtn,
|
|
5288
|
-
onClick: insertHubUpdate
|
|
5289
|
-
}, t("dshCmdInsertHubUpdate")) : null), !enableDsh ? channelOffRow : [
|
|
5290
|
-
(0, react.createElement)("div", { className: CustomInstallView_module_css_default.installExample }, t("dshCmdExample", { profile })),
|
|
5291
|
-
(0, react.createElement)("div", { className: CustomInstallView_module_css_default.installRow }, (0, react.createElement)("input", {
|
|
5292
|
-
className: cmdError ? `${CustomInstallView_module_css_default.installInput} ${CustomInstallView_module_css_default.installInputError}` : CustomInstallView_module_css_default.installInput,
|
|
5293
|
-
type: "text",
|
|
5294
|
-
placeholder: t("dshCmdPlaceholder"),
|
|
5295
|
-
value: cmdQuery,
|
|
5296
|
-
spellCheck: false,
|
|
5297
|
-
onInput: (e) => {
|
|
5298
|
-
setCmdQuery(e.target.value);
|
|
5299
|
-
setCmdError("");
|
|
5300
|
-
},
|
|
5301
|
-
onKeyDown: (e) => {
|
|
5302
|
-
if (e.key === "Enter") submitCmd();
|
|
5303
|
-
}
|
|
5304
|
-
}), (0, react.createElement)("button", {
|
|
5305
|
-
className: CustomInstallView_module_css_default.installBtn,
|
|
5306
|
-
type: "button",
|
|
5307
|
-
disabled: cmdQuery.trim() === "",
|
|
5308
|
-
onClick: submitCmd
|
|
5309
|
-
}, t("installCliBtn"))),
|
|
5310
|
-
cmdError ? (0, react.createElement)("div", { className: CustomInstallView_module_css_default.installError }, cmdError) : null
|
|
5311
5367
|
])), helpFor !== null ? (0, react.createElement)("div", {
|
|
5312
5368
|
className: Modal_module_css_default.overlay,
|
|
5313
5369
|
onClick: (e) => {
|
|
@@ -5321,7 +5377,7 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
5321
5377
|
className: Modal_module_css_default.modalClose,
|
|
5322
5378
|
"aria-label": t("errorClose"),
|
|
5323
5379
|
onClick: () => setHelpFor(null)
|
|
5324
|
-
}, (0, react.createElement)(CloseIcon))), (0, react.createElement)("div", { className: Modal_module_css_default.modalBody }, (0, react.createElement)("div", { className: CustomInstallView_module_css_default.helpBody }, t(HELP_CARDS[helpFor].contentKey
|
|
5380
|
+
}, (0, react.createElement)(CloseIcon))), (0, react.createElement)("div", { className: Modal_module_css_default.modalBody }, (0, react.createElement)("div", { className: CustomInstallView_module_css_default.helpBody }, t(HELP_CARDS[helpFor].contentKey).split("\n").map((line, i) => {
|
|
5325
5381
|
const [cmd, note] = line.split(" ");
|
|
5326
5382
|
return (0, react.createElement)("div", {
|
|
5327
5383
|
key: i,
|
|
@@ -5346,30 +5402,30 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
5346
5402
|
css: css$5
|
|
5347
5403
|
});
|
|
5348
5404
|
var SettingsView_module_css_default = {
|
|
5349
|
-
"settingRowStack": "_506LLG_settingRowStack",
|
|
5350
|
-
"content": "_506LLG_content",
|
|
5351
|
-
"settingTitle": "_506LLG_settingTitle",
|
|
5352
5405
|
"navItemActive": "_506LLG_navItemActive",
|
|
5353
|
-
"
|
|
5354
|
-
"card": "_506LLG_card",
|
|
5355
|
-
"proxyHintOk": "_506LLG_proxyHintOk",
|
|
5356
|
-
"root": "_506LLG_root",
|
|
5406
|
+
"pageHeader": "_506LLG_pageHeader",
|
|
5357
5407
|
"navIcon": "_506LLG_navIcon",
|
|
5408
|
+
"proxyHintFail": "_506LLG_proxyHintFail",
|
|
5409
|
+
"proxyHint": "_506LLG_proxyHint",
|
|
5410
|
+
"proxyHintOk": "_506LLG_proxyHintOk",
|
|
5411
|
+
"resetBtn": "_506LLG_resetBtn",
|
|
5412
|
+
"navItem": "_506LLG_navItem",
|
|
5358
5413
|
"settingControlStack": "_506LLG_settingControlStack",
|
|
5414
|
+
"sidebar": "_506LLG_sidebar",
|
|
5415
|
+
"settingRowStack": "_506LLG_settingRowStack",
|
|
5416
|
+
"root": "_506LLG_root",
|
|
5417
|
+
"content": "_506LLG_content",
|
|
5418
|
+
"settingRow": "_506LLG_settingRow",
|
|
5359
5419
|
"textInput": "_506LLG_textInput",
|
|
5360
5420
|
"proxyControl": "_506LLG_proxyControl",
|
|
5361
|
-
"
|
|
5421
|
+
"pageTitle": "_506LLG_pageTitle",
|
|
5422
|
+
"settingTitle": "_506LLG_settingTitle",
|
|
5423
|
+
"card": "_506LLG_card",
|
|
5362
5424
|
"settingLabel": "_506LLG_settingLabel",
|
|
5363
5425
|
"settingDesc": "_506LLG_settingDesc",
|
|
5364
5426
|
"controlDropdown": "_506LLG_controlDropdown",
|
|
5365
|
-
"resetBtn": "_506LLG_resetBtn",
|
|
5366
|
-
"pageHeader": "_506LLG_pageHeader",
|
|
5367
|
-
"settingRow": "_506LLG_settingRow",
|
|
5368
|
-
"navItem": "_506LLG_navItem",
|
|
5369
|
-
"pageTitle": "_506LLG_pageTitle",
|
|
5370
5427
|
"settingControl": "_506LLG_settingControl",
|
|
5371
|
-
"
|
|
5372
|
-
"proxyHintFail": "_506LLG_proxyHintFail"
|
|
5428
|
+
"pageDesc": "_506LLG_pageDesc"
|
|
5373
5429
|
};
|
|
5374
5430
|
//#endregion
|
|
5375
5431
|
//#region \0dsh-css:src/client/styles/Dropdown.module.css.mjs
|
|
@@ -5388,18 +5444,18 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
5388
5444
|
css: css$4
|
|
5389
5445
|
});
|
|
5390
5446
|
var Dropdown_module_css_default = {
|
|
5391
|
-
"dropdownBtn": "B_Gxsq_dropdownBtn",
|
|
5392
|
-
"dropdownFill": "B_Gxsq_dropdownFill",
|
|
5393
|
-
"dropdownCount": "B_Gxsq_dropdownCount",
|
|
5394
|
-
"dropdownCountActive": "B_Gxsq_dropdownCountActive",
|
|
5395
5447
|
"dropdown": "B_Gxsq_dropdown",
|
|
5396
|
-
"dropdownItem": "B_Gxsq_dropdownItem",
|
|
5397
|
-
"dropdownItemLabel": "B_Gxsq_dropdownItemLabel",
|
|
5398
|
-
"dropdownArrowOpen": "B_Gxsq_dropdownArrowOpen",
|
|
5399
5448
|
"dropdownLabel": "B_Gxsq_dropdownLabel",
|
|
5400
|
-
"
|
|
5449
|
+
"dropdownItemLabel": "B_Gxsq_dropdownItemLabel",
|
|
5450
|
+
"dropdownCount": "B_Gxsq_dropdownCount",
|
|
5451
|
+
"dropdownItem": "B_Gxsq_dropdownItem",
|
|
5452
|
+
"dropdownCountActive": "B_Gxsq_dropdownCountActive",
|
|
5453
|
+
"dropdownFill": "B_Gxsq_dropdownFill",
|
|
5401
5454
|
"dropdownItemActive": "B_Gxsq_dropdownItemActive",
|
|
5402
|
-
"
|
|
5455
|
+
"dropdownPanel": "B_Gxsq_dropdownPanel",
|
|
5456
|
+
"dropdownArrow": "B_Gxsq_dropdownArrow",
|
|
5457
|
+
"dropdownBtn": "B_Gxsq_dropdownBtn",
|
|
5458
|
+
"dropdownArrowOpen": "B_Gxsq_dropdownArrowOpen"
|
|
5403
5459
|
};
|
|
5404
5460
|
//#endregion
|
|
5405
5461
|
//#region \0dsh-css:src/client/styles/Toggle.module.css.mjs
|
|
@@ -5418,8 +5474,8 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
5418
5474
|
css: css$3
|
|
5419
5475
|
});
|
|
5420
5476
|
var Toggle_module_css_default = {
|
|
5421
|
-
"toggleOn": "k-cD4G_toggleOn",
|
|
5422
5477
|
"toggle": "k-cD4G_toggle",
|
|
5478
|
+
"toggleOn": "k-cD4G_toggleOn",
|
|
5423
5479
|
"knob": "k-cD4G_knob"
|
|
5424
5480
|
};
|
|
5425
5481
|
//#endregion
|
|
@@ -5429,9 +5485,8 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
5429
5485
|
* Website: https://dsh-plugin.org
|
|
5430
5486
|
* GitHub: https://github.com/dshplugin/dsh-plugin-hub
|
|
5431
5487
|
*
|
|
5432
|
-
*
|
|
5433
|
-
*
|
|
5434
|
-
* by the --hub-* tokens (on = brand fill, off = neutral track).
|
|
5488
|
+
* 设置行用的紧凑开关。基于原生 button,可键盘聚焦并通过 aria-checked 播报状态;
|
|
5489
|
+
* 样式由 --hub-* 变量驱动(开 = 品牌填充,关 = 中性轨道)。
|
|
5435
5490
|
*/
|
|
5436
5491
|
function Toggle({ checked, onChange, title, disabled }) {
|
|
5437
5492
|
return (0, react.createElement)("button", {
|
|
@@ -5451,13 +5506,11 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
5451
5506
|
* Website: https://dsh-plugin.org
|
|
5452
5507
|
* GitHub: https://github.com/dshplugin/dsh-plugin-hub
|
|
5453
5508
|
*
|
|
5454
|
-
*
|
|
5509
|
+
* 按钮式下拉框(替代原生 <select>)。
|
|
5455
5510
|
*
|
|
5456
|
-
*
|
|
5457
|
-
*
|
|
5458
|
-
*
|
|
5459
|
-
* outside or pressing Esc closes the panel; options get a hover fill and
|
|
5460
|
-
* the active one a brand highlight, all driven by the --hub-* tokens.
|
|
5511
|
+
* 触发器是紧凑的工具栏按钮 —— 细边框 + 淡灰填充 + 当前值 + 箭头 —— 与其它工具栏按钮
|
|
5512
|
+
* 并排自然,只占一格横向空间。点击外部或按 Esc 关闭面板;选项有 hover 填充、
|
|
5513
|
+
* 激活项为品牌高亮,全部由 --hub-* 变量驱动。
|
|
5461
5514
|
*/
|
|
5462
5515
|
function Dropdown({ value, options, onChange, title, className }) {
|
|
5463
5516
|
const [open, setOpen] = (0, react.useState)(false);
|
|
@@ -5520,29 +5573,29 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
5520
5573
|
css: css$2
|
|
5521
5574
|
});
|
|
5522
5575
|
var DiagnosticsView_module_css_default = {
|
|
5523
|
-
"
|
|
5576
|
+
"badgeRunning": "k9eRya_badgeRunning",
|
|
5577
|
+
"summaryRunning": "k9eRya_summaryRunning",
|
|
5578
|
+
"badgeFail": "k9eRya_badgeFail",
|
|
5579
|
+
"diagPulse": "k9eRya_diagPulse",
|
|
5524
5580
|
"runBtn": "k9eRya_runBtn",
|
|
5525
|
-
"
|
|
5526
|
-
"badgeOk": "k9eRya_badgeOk",
|
|
5527
|
-
"summaryFail": "k9eRya_summaryFail",
|
|
5528
|
-
"panel": "k9eRya_panel",
|
|
5529
|
-
"badgeIdle": "k9eRya_badgeIdle",
|
|
5530
|
-
"envDesc": "k9eRya_envDesc",
|
|
5531
|
-
"envRow": "k9eRya_envRow",
|
|
5532
|
-
"display": "k9eRya_display",
|
|
5581
|
+
"summaryOk": "k9eRya_summaryOk",
|
|
5533
5582
|
"envCopyBtn": "k9eRya_envCopyBtn",
|
|
5534
|
-
"diagPulse": "k9eRya_diagPulse",
|
|
5535
5583
|
"summary": "k9eRya_summary",
|
|
5536
5584
|
"row": "k9eRya_row",
|
|
5537
|
-
"
|
|
5538
|
-
"
|
|
5585
|
+
"display": "k9eRya_display",
|
|
5586
|
+
"envRow": "k9eRya_envRow",
|
|
5587
|
+
"badgeOk": "k9eRya_badgeOk",
|
|
5539
5588
|
"head": "k9eRya_head",
|
|
5540
|
-
"
|
|
5541
|
-
"badgeFail": "k9eRya_badgeFail",
|
|
5589
|
+
"badgeIdle": "k9eRya_badgeIdle",
|
|
5542
5590
|
"envLabel": "k9eRya_envLabel",
|
|
5543
|
-
"
|
|
5591
|
+
"headHint": "k9eRya_headHint",
|
|
5592
|
+
"summaryFail": "k9eRya_summaryFail",
|
|
5593
|
+
"envTitle": "k9eRya_envTitle",
|
|
5594
|
+
"panel": "k9eRya_panel",
|
|
5595
|
+
"envDesc": "k9eRya_envDesc",
|
|
5596
|
+
"name": "k9eRya_name",
|
|
5544
5597
|
"badge": "k9eRya_badge",
|
|
5545
|
-
"
|
|
5598
|
+
"meta": "k9eRya_meta"
|
|
5546
5599
|
};
|
|
5547
5600
|
//#endregion
|
|
5548
5601
|
//#region src/client/components/views/DiagnosticsView.tsx
|
|
@@ -5551,12 +5604,9 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
5551
5604
|
* Website: https://dsh-plugin.org
|
|
5552
5605
|
* GitHub: https://github.com/dshplugin/dsh-plugin-hub
|
|
5553
5606
|
*
|
|
5554
|
-
*
|
|
5555
|
-
*
|
|
5556
|
-
*
|
|
5557
|
-
* automatically when the page opens; every row is a button that re-probes
|
|
5558
|
-
* just that channel, so a click always yields visible feedback
|
|
5559
|
-
* (row pulses → badge flips → latency refreshes).
|
|
5607
|
+
* 系统诊断列表:每个连通性通道(npm registry / GitHub API / 目录站点)一行,各带实时
|
|
5608
|
+
* 状态徽标 —— 200 OK 绿、不可达红、探测中显示「检测中…」。页面打开时自动跑一轮;
|
|
5609
|
+
* 每行都是按钮,点击只重测该通道,因此点击总有可见反馈(行脉冲 → 徽标翻转 → 延迟刷新)。
|
|
5560
5610
|
*/
|
|
5561
5611
|
/** 系统版本文本:提交 Issue 时粘贴到正文,方便作者复现。 */
|
|
5562
5612
|
function formatEnv(env) {
|
|
@@ -5720,57 +5770,57 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
5720
5770
|
css: css$1
|
|
5721
5771
|
});
|
|
5722
5772
|
var LogsView_module_css_default = {
|
|
5723
|
-
"
|
|
5724
|
-
"
|
|
5725
|
-
"
|
|
5726
|
-
"
|
|
5727
|
-
"catUpdate": "_3j77BW_catUpdate",
|
|
5773
|
+
"pathText": "_3j77BW_pathText",
|
|
5774
|
+
"footPath": "_3j77BW_footPath",
|
|
5775
|
+
"clearBtn": "_3j77BW_clearBtn",
|
|
5776
|
+
"pathDialogFoot": "_3j77BW_pathDialogFoot",
|
|
5728
5777
|
"moreEnd": "_3j77BW_moreEnd",
|
|
5729
|
-
"
|
|
5730
|
-
"badgeDebug": "_3j77BW_badgeDebug",
|
|
5731
|
-
"actions": "_3j77BW_actions",
|
|
5732
|
-
"badgeInfo": "_3j77BW_badgeInfo",
|
|
5778
|
+
"footCount": "_3j77BW_footCount",
|
|
5733
5779
|
"pathLabel": "_3j77BW_pathLabel",
|
|
5734
|
-
"catInstall": "_3j77BW_catInstall",
|
|
5735
|
-
"entry": "_3j77BW_entry",
|
|
5736
|
-
"badgeSuccess": "_3j77BW_badgeSuccess",
|
|
5737
|
-
"pathDialogHint": "_3j77BW_pathDialogHint",
|
|
5738
|
-
"empty": "_3j77BW_empty",
|
|
5739
5780
|
"filterChipActive": "_3j77BW_filterChipActive",
|
|
5740
5781
|
"btn": "_3j77BW_btn",
|
|
5741
|
-
"
|
|
5742
|
-
"
|
|
5743
|
-
"
|
|
5744
|
-
"
|
|
5782
|
+
"catBadge": "_3j77BW_catBadge",
|
|
5783
|
+
"entry": "_3j77BW_entry",
|
|
5784
|
+
"badgeDebug": "_3j77BW_badgeDebug",
|
|
5785
|
+
"pathDialog": "_3j77BW_pathDialog",
|
|
5786
|
+
"pathDialogReset": "_3j77BW_pathDialogReset",
|
|
5787
|
+
"previewRow": "_3j77BW_previewRow",
|
|
5788
|
+
"catSystem": "_3j77BW_catSystem",
|
|
5789
|
+
"badge": "_3j77BW_badge",
|
|
5745
5790
|
"pathDialogRow": "_3j77BW_pathDialogRow",
|
|
5746
|
-
"
|
|
5747
|
-
"headActions": "_3j77BW_headActions",
|
|
5748
|
-
"pathDialogDesc": "_3j77BW_pathDialogDesc",
|
|
5749
|
-
"pathRow": "_3j77BW_pathRow",
|
|
5791
|
+
"pathDialogHint": "_3j77BW_pathDialogHint",
|
|
5750
5792
|
"linkBtn": "_3j77BW_linkBtn",
|
|
5751
|
-
"
|
|
5793
|
+
"more": "_3j77BW_more",
|
|
5794
|
+
"pathDraft": "_3j77BW_pathDraft",
|
|
5795
|
+
"footActions": "_3j77BW_footActions",
|
|
5752
5796
|
"catUninstall": "_3j77BW_catUninstall",
|
|
5753
|
-
"
|
|
5797
|
+
"badgeError": "_3j77BW_badgeError",
|
|
5798
|
+
"catUpdate": "_3j77BW_catUpdate",
|
|
5799
|
+
"catSettings": "_3j77BW_catSettings",
|
|
5754
5800
|
"catDiagnostics": "_3j77BW_catDiagnostics",
|
|
5755
|
-
"pathDialogFoot": "_3j77BW_pathDialogFoot",
|
|
5756
|
-
"clearBtn": "_3j77BW_clearBtn",
|
|
5757
|
-
"logList": "_3j77BW_logList",
|
|
5758
|
-
"badge": "_3j77BW_badge",
|
|
5759
5801
|
"message": "_3j77BW_message",
|
|
5760
|
-
"
|
|
5802
|
+
"head": "_3j77BW_head",
|
|
5803
|
+
"list": "_3j77BW_list",
|
|
5761
5804
|
"searchInput": "_3j77BW_searchInput",
|
|
5762
|
-
"more": "_3j77BW_more",
|
|
5763
|
-
"filterChip": "_3j77BW_filterChip",
|
|
5764
5805
|
"headHint": "_3j77BW_headHint",
|
|
5765
|
-
"
|
|
5766
|
-
"
|
|
5767
|
-
"
|
|
5806
|
+
"badgeInfo": "_3j77BW_badgeInfo",
|
|
5807
|
+
"pathRow": "_3j77BW_pathRow",
|
|
5808
|
+
"foot": "_3j77BW_foot",
|
|
5809
|
+
"badgeSuccess": "_3j77BW_badgeSuccess",
|
|
5810
|
+
"time": "_3j77BW_time",
|
|
5768
5811
|
"footFail": "_3j77BW_footFail",
|
|
5769
|
-
"
|
|
5812
|
+
"search": "_3j77BW_search",
|
|
5813
|
+
"panel": "_3j77BW_panel",
|
|
5814
|
+
"headActions": "_3j77BW_headActions",
|
|
5815
|
+
"pathDialogDesc": "_3j77BW_pathDialogDesc",
|
|
5816
|
+
"event": "_3j77BW_event",
|
|
5817
|
+
"filterChip": "_3j77BW_filterChip",
|
|
5818
|
+
"empty": "_3j77BW_empty",
|
|
5819
|
+
"filterBar": "_3j77BW_filterBar",
|
|
5820
|
+
"actions": "_3j77BW_actions",
|
|
5770
5821
|
"badgeWarn": "_3j77BW_badgeWarn",
|
|
5771
|
-
"
|
|
5772
|
-
"
|
|
5773
|
-
"foot": "_3j77BW_foot"
|
|
5822
|
+
"logList": "_3j77BW_logList",
|
|
5823
|
+
"catInstall": "_3j77BW_catInstall"
|
|
5774
5824
|
};
|
|
5775
5825
|
//#endregion
|
|
5776
5826
|
//#region src/client/components/modals/LogsModal.tsx
|
|
@@ -5779,20 +5829,15 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
5779
5829
|
* Website: https://dsh-plugin.org
|
|
5780
5830
|
* GitHub: https://github.com/dshplugin/dsh-plugin-hub
|
|
5781
5831
|
*
|
|
5782
|
-
*
|
|
5783
|
-
*
|
|
5784
|
-
* ~/.dsh/profiles/<profile>/hub.log) straight from the server, one page at
|
|
5785
|
-
* a time.
|
|
5832
|
+
* 内置日志查看器弹窗:无需外部软件 —— 应用自己开窗,从服务端直接分页加载本地系统日志
|
|
5833
|
+
* (JSONL,位于 ~/.dsh/profiles/<profile>/hub.log)。
|
|
5786
5834
|
*
|
|
5787
|
-
*
|
|
5788
|
-
*
|
|
5789
|
-
*
|
|
5790
|
-
* say, only install errors — so the exact incompatible step of an install
|
|
5791
|
-
* (or uninstall) is easy to spot. Search narrows by event code or message.
|
|
5835
|
+
* 每行双重归类:功能域(安装/卸载/更新/诊断/设置/系统)与严重级别(debug/info/success/
|
|
5836
|
+
* warn/error)。两轴筛选可只盯某类,比如只看安装错误 —— 便于定位安装(或卸载)中真正
|
|
5837
|
+
* 卡住的那一步;搜索按事件码或消息缩小范围。
|
|
5792
5838
|
*
|
|
5793
|
-
*
|
|
5794
|
-
*
|
|
5795
|
-
* real file location and reveals it in the system file manager.
|
|
5839
|
+
* 服务端分页:GET /dsh-plugin-hub/logs?offset=&limit=&category=&level=&query=
|
|
5840
|
+
* → { entries, total, hasMore, path }。底部展示日志真实路径并可在系统文件管理器中定位。
|
|
5796
5841
|
*/
|
|
5797
5842
|
const PAGE = 100;
|
|
5798
5843
|
/** 类别筛选标签:值 → 语言包 key(弹窗内 chip 与行内类别徽章共用)。 */
|
|
@@ -6329,17 +6374,14 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
6329
6374
|
* Website: https://dsh-plugin.org
|
|
6330
6375
|
* GitHub: https://github.com/dshplugin/dsh-plugin-hub
|
|
6331
6376
|
*
|
|
6332
|
-
*
|
|
6333
|
-
*
|
|
6334
|
-
* active section's rows. New settings only add rows, new areas only add a
|
|
6335
|
-
* sidebar entry.
|
|
6377
|
+
* 设置视图:桌面设置式导航 —— 固定左侧栏列出各分组(图标 + 名称,点击切换),
|
|
6378
|
+
* 右侧面板展示当前分组的设置行。新增设置只加行,新增区域只加一条侧栏项。
|
|
6336
6379
|
*
|
|
6337
|
-
*
|
|
6338
|
-
*
|
|
6339
|
-
*
|
|
6340
|
-
*
|
|
6341
|
-
*
|
|
6342
|
-
* Logs — system log viewer + storage location
|
|
6380
|
+
* 各分组对应本地服务端实际强制的行为:
|
|
6381
|
+
* 更新与源 —— 启动检查更新 / npm 镜像 / HTTP 代理(都接进安装命令链路)
|
|
6382
|
+
* 安全与信任 —— 受限的自定义安装(服务端 403 门禁)
|
|
6383
|
+
* 诊断 —— 实时连通性探测 + 环境快照
|
|
6384
|
+
* 日志 —— 系统日志查看器 + 存放位置
|
|
6343
6385
|
*/
|
|
6344
6386
|
/** npm 镜像源预设:空串 = 未配置(跟随用户本机 npm 配置,本插件不注入任何 registry)。
|
|
6345
6387
|
* 只提供常见国内顶级镜像下拉,不做自定义输入 —— 想用其它镜像直接在 ~/.npmrc 配置即可。 */
|
|
@@ -6505,22 +6547,6 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
6505
6547
|
onChange: (v) => update({ enableNpmInstall: v }),
|
|
6506
6548
|
title: t("settingsEnableNpm")
|
|
6507
6549
|
})
|
|
6508
|
-
}), (0, react.createElement)(SettingRow, {
|
|
6509
|
-
title: t("settingsEnableGit"),
|
|
6510
|
-
desc: t("settingsEnableGitDesc"),
|
|
6511
|
-
children: (0, react.createElement)(Toggle, {
|
|
6512
|
-
checked: settings.enableGitInstall,
|
|
6513
|
-
onChange: (v) => update({ enableGitInstall: v }),
|
|
6514
|
-
title: t("settingsEnableGit")
|
|
6515
|
-
})
|
|
6516
|
-
}), (0, react.createElement)(SettingRow, {
|
|
6517
|
-
title: t("settingsEnableDsh"),
|
|
6518
|
-
desc: t("settingsEnableDshDesc"),
|
|
6519
|
-
children: (0, react.createElement)(Toggle, {
|
|
6520
|
-
checked: settings.enableDshInstall,
|
|
6521
|
-
onChange: (v) => update({ enableDshInstall: v }),
|
|
6522
|
-
title: t("settingsEnableDsh")
|
|
6523
|
-
})
|
|
6524
6550
|
}));
|
|
6525
6551
|
const diagnosticsCard = (0, react.createElement)("div", { className: SettingsView_module_css_default.card }, (0, react.createElement)(DiagnosticsView, {
|
|
6526
6552
|
t,
|
|
@@ -6586,10 +6612,8 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
6586
6612
|
* Website: https://dsh-plugin.org
|
|
6587
6613
|
* GitHub: https://github.com/dshplugin/dsh-plugin-hub
|
|
6588
6614
|
*
|
|
6589
|
-
*
|
|
6590
|
-
*
|
|
6591
|
-
* rendering is delegated to the small presentational components in this
|
|
6592
|
-
* folder; it hosts the dialogs/toast and the section-level copy actions.
|
|
6615
|
+
* 插件中心板块:把目录数据管道、后台任务队列与反馈状态接在一起。数据/队列逻辑在 hooks/,
|
|
6616
|
+
* 渲染交给本目录下的小型展示组件;本文件托管各弹窗/Toast 与板块级复制动作。
|
|
6593
6617
|
*/
|
|
6594
6618
|
function PluginHubSection({ t: _hostT, locale }) {
|
|
6595
6619
|
const { lang, langKey, langPath, t, toggleLang } = useLanguage(locale);
|
|
@@ -6627,10 +6651,10 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
6627
6651
|
const [confirmPlugin, setConfirmPlugin] = (0, react.useState)(null);
|
|
6628
6652
|
/** 弹窗动作是否为「更新」:已安装插件点「更新」→ 走同一条 add 命令原位覆盖重装,文案区分安装/更新 */
|
|
6629
6653
|
const [confirmIsUpdate, setConfirmIsUpdate] = (0, react.useState)(false);
|
|
6630
|
-
/** 命令行安装确认弹窗:记录待安装的裸目标(npm
|
|
6654
|
+
/** 命令行安装确认弹窗:记录待安装的裸目标(npm 包名)——
|
|
6631
6655
|
* 与应用商店同一套确认/进度/结果弹窗,提供时 plugin 传 null 走 customTarget 模式 */
|
|
6632
6656
|
const [confirmCustomTarget, setConfirmCustomTarget] = (0, react.useState)(null);
|
|
6633
|
-
/**
|
|
6657
|
+
/** 自定义安装入口渠道(NPM 包卡片):随确认弹窗记录,提交时上报服务端,
|
|
6634
6658
|
* 报错/日志据此精准溯源「从哪个入口发起」(npm 全局安装固定为 'npm') */
|
|
6635
6659
|
const [confirmCustomChannel, setConfirmCustomChannel] = (0, react.useState)(null);
|
|
6636
6660
|
/** 全局 npm 安装确认弹窗(官方 `npm install -g <pkgs>`):记录原始命令 + 解析出的包列表,
|
|
@@ -6726,6 +6750,14 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
6726
6750
|
}));
|
|
6727
6751
|
},
|
|
6728
6752
|
onError: (message, repo, kind, command, attempts, update) => {
|
|
6753
|
+
setInstallDone(false);
|
|
6754
|
+
setUninstallDone(false);
|
|
6755
|
+
setConfirmPlugin(null);
|
|
6756
|
+
setConfirmCustomTarget(null);
|
|
6757
|
+
setConfirmCustomChannel(null);
|
|
6758
|
+
setConfirmGlobalNpm(null);
|
|
6759
|
+
setUninstallPlugin(null);
|
|
6760
|
+
setUninstallItem(null);
|
|
6729
6761
|
const issueRepo = issueRepoOf(repo ?? "", catalog.installedItems, catalog.plugins);
|
|
6730
6762
|
setErrorMsg({
|
|
6731
6763
|
message,
|
|
@@ -6779,6 +6811,7 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
6779
6811
|
(0, react.useEffect)(() => {
|
|
6780
6812
|
if (startupCheckedRef.current) return;
|
|
6781
6813
|
if (!settingsReady || catalog.plugins === null || catalog.failed) return;
|
|
6814
|
+
if (!catalog.releaseAgeReady) return;
|
|
6782
6815
|
startupCheckedRef.current = true;
|
|
6783
6816
|
if (!hubSettings.checkUpdatesOnStart) return;
|
|
6784
6817
|
syncUpdateNotices();
|
|
@@ -6788,6 +6821,7 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
6788
6821
|
catalog.plugins,
|
|
6789
6822
|
catalog.failed,
|
|
6790
6823
|
catalog.installedItems,
|
|
6824
|
+
catalog.releaseAgeReady,
|
|
6791
6825
|
queue
|
|
6792
6826
|
]);
|
|
6793
6827
|
(0, react.useEffect)(() => {
|
|
@@ -6862,7 +6896,7 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
6862
6896
|
const pkg = repo.replace(/@[^@]*$/, "").toLowerCase();
|
|
6863
6897
|
return catalog.installedItems.some((i) => i.name.toLowerCase() === pkg) || Object.keys(catalog.installed).some((k) => k.toLowerCase() === pkg);
|
|
6864
6898
|
};
|
|
6865
|
-
/** 弹窗动作一:复制安装命令到剪贴板,引导去终端粘贴执行(npm
|
|
6899
|
+
/** 弹窗动作一:复制安装命令到剪贴板,引导去终端粘贴执行(npm 安装显示包名命令)。 */
|
|
6866
6900
|
const copyCommand = async (p) => {
|
|
6867
6901
|
const repo = p.source?.repo ?? "";
|
|
6868
6902
|
if (await doCopy(installCommandOf(p))) {
|
|
@@ -6956,7 +6990,7 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
6956
6990
|
t,
|
|
6957
6991
|
noticeCount: notifications.length + queue.queue.length + queue.pendingRestarts.length,
|
|
6958
6992
|
onOpenNotifications: () => {
|
|
6959
|
-
if (hubSettings.checkUpdatesOnStart) syncUpdateNotices();
|
|
6993
|
+
if (hubSettings.checkUpdatesOnStart && catalog.releaseAgeReady) syncUpdateNotices();
|
|
6960
6994
|
setShowNotifications(true);
|
|
6961
6995
|
}
|
|
6962
6996
|
})), view === "market" ? (0, react.createElement)(MarketView, {
|
|
@@ -7007,10 +7041,7 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
7007
7041
|
}) : view === "custom" ? (0, react.createElement)(CustomInstallView, {
|
|
7008
7042
|
t,
|
|
7009
7043
|
enableNpm: hubSettings.enableNpmInstall,
|
|
7010
|
-
enableGit: hubSettings.enableGitInstall,
|
|
7011
|
-
enableDsh: hubSettings.enableDshInstall,
|
|
7012
7044
|
onOpenSettings: () => setView("settings"),
|
|
7013
|
-
profile: env?.profile ?? "web",
|
|
7014
7045
|
onInstallCustom: (raw, opts) => {
|
|
7015
7046
|
const target = raw.trim();
|
|
7016
7047
|
if (!target) return;
|
|
@@ -7047,7 +7078,7 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
7047
7078
|
openSection: settingsSection,
|
|
7048
7079
|
onConsumedOpenSection: () => setSettingsSection(null)
|
|
7049
7080
|
}), showHubUpdate && (0, react.createElement)(HubUpdateModal, {
|
|
7050
|
-
info: catalog.hubUpdateInfo ?? { version: "
|
|
7081
|
+
info: catalog.hubUpdateInfo ?? { version: "2.0.1" },
|
|
7051
7082
|
state: catalog.hubUpdateState,
|
|
7052
7083
|
currentVersion: catalog.hubCurrentVersion,
|
|
7053
7084
|
lang,
|
|
@@ -7318,9 +7349,8 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
7318
7349
|
* Website: https://dsh-plugin.org
|
|
7319
7350
|
* GitHub: https://github.com/dshplugin/dsh-plugin-hub
|
|
7320
7351
|
*
|
|
7321
|
-
* dsh-plugin
|
|
7322
|
-
*
|
|
7323
|
-
* PluginHubSection; this file only performs the cordis apply wiring.
|
|
7352
|
+
* dsh-plugin 客户端入口:通过模块加载器 bundle(见 tsdown.config.ts)把插件中心接入宿主设置。
|
|
7353
|
+
* 全部 UI 逻辑都在 PluginHubSection;本文件只做 cordis apply 接线。
|
|
7324
7354
|
*/
|
|
7325
7355
|
const NS = "dsh-plugin";
|
|
7326
7356
|
const name = NS;
|