dsh-plugin 2.0.5 → 2.1.0
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 +11 -11
- package/README.md +11 -11
- package/client/client.js +418 -317
- package/client/client.js.map +1 -1
- package/lib/http/install.js +42 -11
- package/lib/http/settings.js +1 -1
- package/lib/services/install/decode-output.js +23 -0
- package/lib/services/install/operation-log.js +61 -11
- package/lib/services/install/preflight.js +36 -0
- package/lib/services/install/registry-fallback.js +89 -0
- package/lib/services/install/task-queue.js +84 -34
- package/lib/services/settings.js +1 -0
- package/lib/types/services/install/decode-output.d.ts +4 -0
- package/lib/types/services/install/install-types.d.ts +4 -0
- package/lib/types/services/install/operation-log.d.ts +10 -4
- package/lib/types/services/install/preflight.d.ts +11 -0
- package/lib/types/services/install/registry-fallback.d.ts +18 -0
- package/lib/types/services/install/task-queue.d.ts +18 -0
- package/lib/types/services/settings.d.ts +3 -1
- package/package.json +1 -1
- package/src/client/components/PluginHubSection.tsx +11 -2
- package/src/client/components/modals/NotificationsModal.tsx +8 -1
- package/src/client/components/modals/modals.tsx +9 -1
- package/src/client/components/views/SettingsView.tsx +10 -0
- package/src/client/hooks/useCatalog.ts +10 -8
- package/src/client/hooks/useSettings.ts +4 -1
- package/src/client/hooks/useTaskQueue.ts +7 -1
- package/src/client/locales.ts +12 -0
- package/src/client/logic/failures.ts +17 -1
- package/src/client/logic/installed.ts +10 -6
- package/src/client/logic/release-age.ts +40 -0
- package/src/client/logic/urls.ts +4 -1
- package/src/client/types.ts +13 -0
- package/src/server/http/install.ts +46 -11
- package/src/server/http/settings.ts +1 -1
- package/src/server/services/install/decode-output.ts +22 -0
- package/src/server/services/install/install-types.ts +4 -0
- package/src/server/services/install/operation-log.ts +58 -11
- package/src/server/services/install/preflight.ts +37 -0
- package/src/server/services/install/registry-fallback.ts +89 -0
- package/src/server/services/install/task-queue.ts +91 -32
- package/src/server/services/settings.ts +4 -1
package/client/client.js
CHANGED
|
@@ -110,6 +110,8 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
110
110
|
proxyCheckRevocation: "证书吊销检查受阻(Windows Schannel 取不到 CRL/OCSP),握手被中断;属本机 TLS 环境问题,非代理地址不通",
|
|
111
111
|
settingsMirror: "npm 镜像源",
|
|
112
112
|
settingsMirrorDesc: "默认跟随本机 npm 配置;官方源慢可换国内镜像",
|
|
113
|
+
settingsRegistryFallback: "连不上时自动换源",
|
|
114
|
+
settingsRegistryFallbackDesc: "公共源超时或被拦截时,自动改用下一个镜像重试(最多 3 个);自定义/内网源不会切换,避免私有包名外泄",
|
|
113
115
|
mirrorNone: "未配置(跟随本机 npm 配置)",
|
|
114
116
|
mirrorOfficial: "官方源 registry.npmjs.org",
|
|
115
117
|
mirrorNpmmirror: "阿里云 npmmirror",
|
|
@@ -343,6 +345,8 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
343
345
|
failReason_pluginMissingDep: "插件声明依赖的包在官方 npm 源上不存在(已删除或从未发布)。",
|
|
344
346
|
failKind_registryVersionStale: "该版本在所用源上不存在",
|
|
345
347
|
failReason_registryVersionStale: "实际安装用的源还没同步到这个版本,或版本号写错。",
|
|
348
|
+
failKind_registryAuth: "npm 源拒绝了访问",
|
|
349
|
+
failReason_registryAuth: "registry 返回 401/403:这个源需要登录凭据,或当前网络不被允许。",
|
|
346
350
|
failKind_pnpmLinkedDirMissing: "profile 里有失效的本地依赖",
|
|
347
351
|
failReason_pnpmLinkedDirMissing: "有一条指向本机不存在目录的 link/file 依赖,pnpm 每次解析都卡住。",
|
|
348
352
|
failKind_fileLocked: "文件被其他程序占用",
|
|
@@ -370,6 +374,8 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
370
374
|
failKind_hub: "出现未知错误",
|
|
371
375
|
failReason_hub: "我们还没能识别这条报错,你可以一键反馈给我们。",
|
|
372
376
|
failRegistryVersionStaleHint: "安装器调用 pnpm 时报「找不到匹配的版本」(ERR_PNPM_NO_MATCHING_VERSION):要装的这个版本在实际执行安装的 npm 源里查不到。常见原因是你设置的 npmRegistry 与本机 ~/.npmrc 用的不是同一个源——官方源刚发布、镜像还没同步上来(快则几分钟、慢则几小时),也可能只是版本号写错了。这不是插件本身的问题。可在插件市场设置里把 npmRegistry 改成与本机 ~/.npmrc 一致(或反过来),或那一次显式走官方源(https://registry.npmjs.org)、改用离线包后重试;若该版本刚发布不久,等镜像同步后重试即可。",
|
|
377
|
+
failRegistryAuthHint: "安装器访问 npm 源时被拒绝(HTTP 401/403):这个源需要登录凭据,或不允许当前网络/IP 访问。如果你在用公司或私有源,请先配好认证(npm login,或在 ~/.npmrc 写入 //{host}/:_authToken=…);如果不需要私有源,把 registry 换回官方源 https://registry.npmjs.org,或在插件市场设置里切换到公共镜像后重试。这不是插件本身的问题。",
|
|
378
|
+
failRegistryAuthHintNoHost: "安装器访问 npm 源时被拒绝(HTTP 401/403):这个源需要登录凭据,或不允许当前网络/IP 访问。如果你在用公司或私有源,请先配好认证(npm login,或在 ~/.npmrc 写入 //<registry>/:_authToken=…);如果不需要私有源,把 registry 换回官方源 https://registry.npmjs.org,或在插件市场设置里切换到公共镜像后重试。这不是插件本身的问题。",
|
|
373
379
|
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 条目或整个锁文件),或把该目录恢复回原路径后重试。",
|
|
374
380
|
failFileLockedHint: "安装过程中 pnpm 无法替换 profile 里的文件:有程序正占用着它(Windows 常见报错 os error 32「另一个程序正在使用此文件」)。通常是 DeepSeek Harness 自身或杀毒软件的实时扫描持有文件句柄。这不是插件本身的问题——请完全退出 DeepSeek Harness(Windows 可在任务管理器确认进程已结束,必要时临时关闭杀毒软件实时防护)后重试。",
|
|
375
381
|
failAccessDeniedHint: "安装过程中 pnpm 写入 profile 里的文件被系统拒绝访问(Windows 常见报错 os error 5「拒绝访问」,英文为 Access is denied;Node 下的 EPERM / EACCES 同理)。常见原因是该文件或目录正被其他进程占用、文件带只读属性、目录权限受限,或杀毒软件实时防护拦截了写入——这与「文件正被占用」(os error 32)同属本机文件系统问题,任何插件装进该目录都会一样失败,不是插件本身的问题。请完全退出 DeepSeek Harness(Windows 可在任务管理器确认进程已结束,必要时临时关闭杀毒软件实时防护)后重试;若仍然失败,请检查 profile 目录及其文件是否被设为只读,并以管理员身份重新运行。",
|
|
@@ -517,6 +523,8 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
517
523
|
proxyCheckRevocation: "Certificate revocation check blocked (Windows Schannel could not fetch CRL/OCSP), so the handshake was aborted — a local TLS issue, not a bad proxy address",
|
|
518
524
|
settingsMirror: "npm mirror",
|
|
519
525
|
settingsMirrorDesc: "Unset by default — follows local npm config; pick a domestic mirror if slow",
|
|
526
|
+
settingsRegistryFallback: "Switch mirrors on failure",
|
|
527
|
+
settingsRegistryFallbackDesc: "When a public registry times out or is blocked, retry with the next mirror (up to 3). Custom/intranet registries are never switched, so private package names do not leak.",
|
|
520
528
|
mirrorNone: "Unset (follow local npm config)",
|
|
521
529
|
mirrorOfficial: "Official registry.npmjs.org",
|
|
522
530
|
mirrorNpmmirror: "Alibaba npmmirror",
|
|
@@ -751,6 +759,8 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
751
759
|
failReason_pluginMissingDep: "A package the plugin depends on does not exist on the official npm registry.",
|
|
752
760
|
failKind_registryVersionStale: "this version is not available on the registry in use",
|
|
753
761
|
failReason_registryVersionStale: "The registry that actually performs the install has not synced this version yet, or the version is mistyped.",
|
|
762
|
+
failKind_registryAuth: "the npm registry rejected access",
|
|
763
|
+
failReason_registryAuth: "The registry returned 401/403: it needs credentials, or the current network is not allowed.",
|
|
754
764
|
failKind_pnpmLinkedDirMissing: "dangling local dependency in the profile",
|
|
755
765
|
failReason_pnpmLinkedDirMissing: "A link/file dependency points at a directory that no longer exists, so pnpm stalls on it.",
|
|
756
766
|
failKind_fileLocked: "a file is held by another program",
|
|
@@ -778,6 +788,8 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
778
788
|
failKind_hub: "unknown error",
|
|
779
789
|
failReason_hub: "We could not identify this error yet — you can report it to us in one click.",
|
|
780
790
|
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.",
|
|
791
|
+
failRegistryAuthHint: "The installer was denied access to the npm registry (HTTP 401/403): that registry requires credentials, or it does not allow the current network/IP. If you are using a company or private registry, configure authentication first (npm login, or write //{host}/:_authToken=… into ~/.npmrc). If you do not need a private registry, point the registry back to the official one (https://registry.npmjs.org), or switch to a public mirror in the hub settings, then retry. This is not a problem with the plugin itself.",
|
|
792
|
+
failRegistryAuthHintNoHost: "The installer was denied access to the npm registry (HTTP 401/403): that registry requires credentials, or it does not allow the current network/IP. If you are using a company or private registry, configure authentication first (npm login, or write //<registry>/:_authToken=… into ~/.npmrc). If you do not need a private registry, point the registry back to the official one (https://registry.npmjs.org), or switch to a public mirror in the hub settings, then retry. This is not a problem with the plugin itself.",
|
|
781
793
|
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.",
|
|
782
794
|
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.",
|
|
783
795
|
failAccessDeniedHint: "During install, Windows denied pnpm access to a file inside the profile (this shows as os error 5, \"Access is denied\"; on Node the equivalent codes are EPERM / EACCES). Typical causes: the file or directory is held by another process, the file is marked read-only, the directory permissions are restricted, or a real-time antivirus scan blocked the write. This is the same class of local file-system problem as a locked file (os error 32) — no plugin can be installed into that directory, so it 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. If it still fails, check whether the profile directory or its files are read-only and run as administrator.",
|
|
@@ -842,42 +854,42 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
842
854
|
css: css$11
|
|
843
855
|
});
|
|
844
856
|
var Header_module_css_default = {
|
|
845
|
-
"
|
|
846
|
-
"root": "qikqja_root",
|
|
847
|
-
"controls": "qikqja_controls",
|
|
848
|
-
"headerTitleRow": "qikqja_headerTitleRow",
|
|
849
|
-
"resultCount": "qikqja_resultCount",
|
|
850
|
-
"version": "qikqja_version",
|
|
851
|
-
"adBadge": "qikqja_adBadge",
|
|
857
|
+
"headerRight": "qikqja_headerRight",
|
|
852
858
|
"searchRow": "qikqja_searchRow",
|
|
853
|
-
"
|
|
859
|
+
"controls": "qikqja_controls",
|
|
860
|
+
"tagline": "qikqja_tagline",
|
|
861
|
+
"logoIcon": "qikqja_logoIcon",
|
|
862
|
+
"segBtn": "qikqja_segBtn",
|
|
863
|
+
"tabCount": "qikqja_tabCount",
|
|
854
864
|
"taglineLink": "qikqja_taglineLink",
|
|
855
|
-
"
|
|
865
|
+
"segGroup": "qikqja_segGroup",
|
|
866
|
+
"version": "qikqja_version",
|
|
867
|
+
"adText": "qikqja_adText",
|
|
868
|
+
"header": "qikqja_header",
|
|
869
|
+
"tabs": "qikqja_tabs",
|
|
856
870
|
"tab": "qikqja_tab",
|
|
857
|
-
"githubIcon": "qikqja_githubIcon",
|
|
858
|
-
"sortGroup": "qikqja_sortGroup",
|
|
859
871
|
"hubUpdateBadge": "qikqja_hubUpdateBadge",
|
|
860
|
-
"
|
|
872
|
+
"langBtn": "qikqja_langBtn",
|
|
873
|
+
"headerTitleRow": "qikqja_headerTitleRow",
|
|
874
|
+
"copyIcon": "qikqja_copyIcon",
|
|
875
|
+
"search": "qikqja_search",
|
|
876
|
+
"brandTitle": "qikqja_brandTitle",
|
|
861
877
|
"tabActive": "qikqja_tabActive",
|
|
862
|
-
"
|
|
878
|
+
"title": "qikqja_title",
|
|
879
|
+
"adBanner": "qikqja_adBanner",
|
|
880
|
+
"adBadge": "qikqja_adBadge",
|
|
863
881
|
"githubLink": "qikqja_githubLink",
|
|
882
|
+
"segBtnActive": "qikqja_segBtnActive",
|
|
864
883
|
"versionBtn": "qikqja_versionBtn",
|
|
884
|
+
"resultSeg": "qikqja_resultSeg",
|
|
885
|
+
"adArrow": "qikqja_adArrow",
|
|
886
|
+
"sortGroup": "qikqja_sortGroup",
|
|
887
|
+
"githubIcon": "qikqja_githubIcon",
|
|
888
|
+
"segLabel": "qikqja_segLabel",
|
|
865
889
|
"tabsRow": "qikqja_tabsRow",
|
|
866
890
|
"aboutBtn": "qikqja_aboutBtn",
|
|
867
|
-
"
|
|
868
|
-
"
|
|
869
|
-
"tagline": "qikqja_tagline",
|
|
870
|
-
"segBtn": "qikqja_segBtn",
|
|
871
|
-
"segGroup": "qikqja_segGroup",
|
|
872
|
-
"tabs": "qikqja_tabs",
|
|
873
|
-
"copyIcon": "qikqja_copyIcon",
|
|
874
|
-
"tabCount": "qikqja_tabCount",
|
|
875
|
-
"segLabel": "qikqja_segLabel",
|
|
876
|
-
"headerRight": "qikqja_headerRight",
|
|
877
|
-
"header": "qikqja_header",
|
|
878
|
-
"adBanner": "qikqja_adBanner",
|
|
879
|
-
"segBtnActive": "qikqja_segBtnActive",
|
|
880
|
-
"title": "qikqja_title"
|
|
891
|
+
"resultCount": "qikqja_resultCount",
|
|
892
|
+
"root": "qikqja_root"
|
|
881
893
|
};
|
|
882
894
|
//#endregion
|
|
883
895
|
//#region \0dsh-css:src/client/styles/Modal.module.css.mjs
|
|
@@ -896,142 +908,142 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
896
908
|
css: css$10
|
|
897
909
|
});
|
|
898
910
|
var Modal_module_css_default = {
|
|
899
|
-
"
|
|
900
|
-
"
|
|
901
|
-
"
|
|
911
|
+
"modalCmdCopy": "BiQ1zG_modalCmdCopy",
|
|
912
|
+
"noticeBadgeFail": "BiQ1zG_noticeBadgeFail",
|
|
913
|
+
"resultCheckIcon": "BiQ1zG_resultCheckIcon",
|
|
902
914
|
"queueRowBody": "BiQ1zG_queueRowBody",
|
|
903
|
-
"
|
|
904
|
-
"
|
|
905
|
-
"
|
|
906
|
-
"
|
|
907
|
-
"
|
|
908
|
-
"
|
|
909
|
-
"
|
|
910
|
-
"
|
|
911
|
-
"
|
|
912
|
-
"modalLink": "BiQ1zG_modalLink",
|
|
913
|
-
"aboutContent": "BiQ1zG_aboutContent",
|
|
914
|
-
"modalLabel": "BiQ1zG_modalLabel",
|
|
915
|
-
"queueSection": "BiQ1zG_queueSection",
|
|
915
|
+
"hubUpdateNotes": "BiQ1zG_hubUpdateNotes",
|
|
916
|
+
"modalTitleQueued": "BiQ1zG_modalTitleQueued",
|
|
917
|
+
"detailStatusRunning": "BiQ1zG_detailStatusRunning",
|
|
918
|
+
"noticeUpdateGo": "BiQ1zG_noticeUpdateGo",
|
|
919
|
+
"toastIn": "BiQ1zG_toastIn",
|
|
920
|
+
"errorTitle": "BiQ1zG_errorTitle",
|
|
921
|
+
"restartNowWarning": "BiQ1zG_restartNowWarning",
|
|
922
|
+
"failKindInstall": "BiQ1zG_failKindInstall",
|
|
923
|
+
"modalClose": "BiQ1zG_modalClose",
|
|
916
924
|
"queueRowDesc": "BiQ1zG_queueRowDesc",
|
|
917
|
-
"modalInstall": "BiQ1zG_modalInstall",
|
|
918
|
-
"failHead": "BiQ1zG_failHead",
|
|
919
|
-
"noticeList": "BiQ1zG_noticeList",
|
|
920
|
-
"noticeBadgeIcon": "BiQ1zG_noticeBadgeIcon",
|
|
921
|
-
"aboutModal": "BiQ1zG_aboutModal",
|
|
922
|
-
"detailStatusPending": "BiQ1zG_detailStatusPending",
|
|
923
|
-
"failReason": "BiQ1zG_failReason",
|
|
924
925
|
"modalActions": "BiQ1zG_modalActions",
|
|
925
|
-
"
|
|
926
|
-
"
|
|
927
|
-
"
|
|
926
|
+
"toastFail": "BiQ1zG_toastFail",
|
|
927
|
+
"restartLater": "BiQ1zG_restartLater",
|
|
928
|
+
"modalDesc": "BiQ1zG_modalDesc",
|
|
929
|
+
"modalCmdText": "BiQ1zG_modalCmdText",
|
|
930
|
+
"detailPathText": "BiQ1zG_detailPathText",
|
|
931
|
+
"detailStatusPending": "BiQ1zG_detailStatusPending",
|
|
932
|
+
"aboutModal": "BiQ1zG_aboutModal",
|
|
933
|
+
"failedCopyHint": "BiQ1zG_failedCopyHint",
|
|
934
|
+
"aboutMeta": "BiQ1zG_aboutMeta",
|
|
935
|
+
"errorHint": "BiQ1zG_errorHint",
|
|
936
|
+
"detailLink": "BiQ1zG_detailLink",
|
|
937
|
+
"modalIn": "BiQ1zG_modalIn",
|
|
938
|
+
"noticeList": "BiQ1zG_noticeList",
|
|
939
|
+
"helpModal": "BiQ1zG_helpModal",
|
|
928
940
|
"trustHint": "BiQ1zG_trustHint",
|
|
929
|
-
"
|
|
930
|
-
"
|
|
931
|
-
"
|
|
932
|
-
"
|
|
933
|
-
"
|
|
934
|
-
"
|
|
941
|
+
"queueRowPct": "BiQ1zG_queueRowPct",
|
|
942
|
+
"progressText": "BiQ1zG_progressText",
|
|
943
|
+
"detailDim": "BiQ1zG_detailDim",
|
|
944
|
+
"queueSection": "BiQ1zG_queueSection",
|
|
945
|
+
"modalLabel": "BiQ1zG_modalLabel",
|
|
946
|
+
"noticeFoot": "BiQ1zG_noticeFoot",
|
|
947
|
+
"modalLink": "BiQ1zG_modalLink",
|
|
948
|
+
"queueRow": "BiQ1zG_queueRow",
|
|
935
949
|
"noticeTime": "BiQ1zG_noticeTime",
|
|
936
|
-
"
|
|
937
|
-
"
|
|
938
|
-
"
|
|
950
|
+
"detailStars": "BiQ1zG_detailStars",
|
|
951
|
+
"resultDesc": "BiQ1zG_resultDesc",
|
|
952
|
+
"modalHead": "BiQ1zG_modalHead",
|
|
953
|
+
"progressFill": "BiQ1zG_progressFill",
|
|
939
954
|
"failNetworkTarget": "BiQ1zG_failNetworkTarget",
|
|
940
|
-
"
|
|
941
|
-
"
|
|
942
|
-
"noticeRowOk": "BiQ1zG_noticeRowOk",
|
|
943
|
-
"resultCheck": "BiQ1zG_resultCheck",
|
|
944
|
-
"noticeTextFail": "BiQ1zG_noticeTextFail",
|
|
945
|
-
"detailDim": "BiQ1zG_detailDim",
|
|
946
|
-
"hubUpdateMeta": "BiQ1zG_hubUpdateMeta",
|
|
947
|
-
"aboutMeta": "BiQ1zG_aboutMeta",
|
|
948
|
-
"noticeMain": "BiQ1zG_noticeMain",
|
|
955
|
+
"failMisjudgeLink": "BiQ1zG_failMisjudgeLink",
|
|
956
|
+
"bundleDeselectedHint": "BiQ1zG_bundleDeselectedHint",
|
|
949
957
|
"detailPathActions": "BiQ1zG_detailPathActions",
|
|
950
958
|
"toast": "BiQ1zG_toast",
|
|
959
|
+
"linkIcon": "BiQ1zG_linkIcon",
|
|
960
|
+
"modalRow": "BiQ1zG_modalRow",
|
|
961
|
+
"detailValue": "BiQ1zG_detailValue",
|
|
962
|
+
"progress": "BiQ1zG_progress",
|
|
963
|
+
"modalBody": "BiQ1zG_modalBody",
|
|
951
964
|
"resultTitle": "BiQ1zG_resultTitle",
|
|
952
|
-
"
|
|
953
|
-
"
|
|
954
|
-
"
|
|
955
|
-
"
|
|
965
|
+
"noticeRemove": "BiQ1zG_noticeRemove",
|
|
966
|
+
"modalInstall": "BiQ1zG_modalInstall",
|
|
967
|
+
"overlay": "BiQ1zG_overlay",
|
|
968
|
+
"queueRowTarget": "BiQ1zG_queueRowTarget",
|
|
969
|
+
"noticeHead": "BiQ1zG_noticeHead",
|
|
970
|
+
"uninstallConfirm": "BiQ1zG_uninstallConfirm",
|
|
956
971
|
"modalCmd": "BiQ1zG_modalCmd",
|
|
972
|
+
"failRepoLabel": "BiQ1zG_failRepoLabel",
|
|
973
|
+
"cliOnlyHint": "BiQ1zG_cliOnlyHint",
|
|
974
|
+
"confirmIconDanger": "BiQ1zG_confirmIconDanger",
|
|
975
|
+
"modalCancel": "BiQ1zG_modalCancel",
|
|
976
|
+
"queueRowStatus": "BiQ1zG_queueRowStatus",
|
|
977
|
+
"queuedHint": "BiQ1zG_queuedHint",
|
|
978
|
+
"noticeVersion": "BiQ1zG_noticeVersion",
|
|
979
|
+
"failKind": "BiQ1zG_failKind",
|
|
957
980
|
"restartNow": "BiQ1zG_restartNow",
|
|
958
|
-
"
|
|
981
|
+
"detailGrid": "BiQ1zG_detailGrid",
|
|
959
982
|
"detailLabel": "BiQ1zG_detailLabel",
|
|
960
|
-
"
|
|
961
|
-
"
|
|
962
|
-
"
|
|
963
|
-
"
|
|
964
|
-
"
|
|
983
|
+
"failPrepareHint": "BiQ1zG_failPrepareHint",
|
|
984
|
+
"progressFillFail": "BiQ1zG_progressFillFail",
|
|
985
|
+
"confirmIconWrap": "BiQ1zG_confirmIconWrap",
|
|
986
|
+
"hubUpdateMetaItem": "BiQ1zG_hubUpdateMetaItem",
|
|
987
|
+
"noticeBadgeOk": "BiQ1zG_noticeBadgeOk",
|
|
965
988
|
"modalTitle": "BiQ1zG_modalTitle",
|
|
966
|
-
"
|
|
967
|
-
"
|
|
968
|
-
"
|
|
969
|
-
"
|
|
970
|
-
"
|
|
971
|
-
"
|
|
972
|
-
"
|
|
973
|
-
"
|
|
974
|
-
"
|
|
975
|
-
"
|
|
976
|
-
"
|
|
977
|
-
"
|
|
978
|
-
"failMisjudgeLink": "BiQ1zG_failMisjudgeLink",
|
|
979
|
-
"failRepoUrl": "BiQ1zG_failRepoUrl",
|
|
980
|
-
"detailModal": "BiQ1zG_detailModal",
|
|
981
|
-
"linkIcon": "BiQ1zG_linkIcon",
|
|
989
|
+
"logModal": "BiQ1zG_logModal",
|
|
990
|
+
"confirmPrimary": "BiQ1zG_confirmPrimary",
|
|
991
|
+
"resultRestarting": "BiQ1zG_resultRestarting",
|
|
992
|
+
"detailUpdateHint": "BiQ1zG_detailUpdateHint",
|
|
993
|
+
"pendingRowActions": "BiQ1zG_pendingRowActions",
|
|
994
|
+
"hubUpdateMeta": "BiQ1zG_hubUpdateMeta",
|
|
995
|
+
"failBigIssue": "BiQ1zG_failBigIssue",
|
|
996
|
+
"resultCheck": "BiQ1zG_resultCheck",
|
|
997
|
+
"detailPathBtn": "BiQ1zG_detailPathBtn",
|
|
998
|
+
"overlayIn": "BiQ1zG_overlayIn",
|
|
999
|
+
"errorBox": "BiQ1zG_errorBox",
|
|
1000
|
+
"noticeRowOk": "BiQ1zG_noticeRowOk",
|
|
982
1001
|
"detailArrow": "BiQ1zG_detailArrow",
|
|
983
|
-
"
|
|
984
|
-
"noticeRemove": "BiQ1zG_noticeRemove",
|
|
985
|
-
"failKindTitle": "BiQ1zG_failKindTitle",
|
|
986
|
-
"failRepo": "BiQ1zG_failRepo",
|
|
987
|
-
"noticeVersion": "BiQ1zG_noticeVersion",
|
|
1002
|
+
"detailStatusText": "BiQ1zG_detailStatusText",
|
|
988
1003
|
"failClear": "BiQ1zG_failClear",
|
|
989
|
-
"
|
|
990
|
-
"
|
|
991
|
-
"
|
|
992
|
-
"
|
|
993
|
-
"detailPathBtn": "BiQ1zG_detailPathBtn",
|
|
994
|
-
"modalDesc": "BiQ1zG_modalDesc",
|
|
995
|
-
"pendingRowActions": "BiQ1zG_pendingRowActions",
|
|
1004
|
+
"detailRow": "BiQ1zG_detailRow",
|
|
1005
|
+
"failList": "BiQ1zG_failList",
|
|
1006
|
+
"noticeIgnore": "BiQ1zG_noticeIgnore",
|
|
1007
|
+
"stripCancel": "BiQ1zG_stripCancel",
|
|
996
1008
|
"modalValue": "BiQ1zG_modalValue",
|
|
1009
|
+
"failRepo": "BiQ1zG_failRepo",
|
|
1010
|
+
"queueSectionTitle": "BiQ1zG_queueSectionTitle",
|
|
1011
|
+
"noticeRow": "BiQ1zG_noticeRow",
|
|
997
1012
|
"failEmpty": "BiQ1zG_failEmpty",
|
|
998
|
-
"
|
|
999
|
-
"
|
|
1000
|
-
"
|
|
1001
|
-
"resultRestarting": "BiQ1zG_resultRestarting",
|
|
1002
|
-
"hubUpdateModal": "BiQ1zG_hubUpdateModal",
|
|
1003
|
-
"progress": "BiQ1zG_progress",
|
|
1004
|
-
"confirmPrimary": "BiQ1zG_confirmPrimary",
|
|
1005
|
-
"overlayIn": "BiQ1zG_overlayIn",
|
|
1006
|
-
"failList": "BiQ1zG_failList",
|
|
1007
|
-
"modalBody": "BiQ1zG_modalBody",
|
|
1008
|
-
"queuedHint": "BiQ1zG_queuedHint",
|
|
1009
|
-
"errorCopySoft": "BiQ1zG_errorCopySoft",
|
|
1010
|
-
"hubUpdateNotes": "BiQ1zG_hubUpdateNotes",
|
|
1011
|
-
"failBigIssue": "BiQ1zG_failBigIssue",
|
|
1012
|
-
"overlay": "BiQ1zG_overlay",
|
|
1013
|
-
"helpModal": "BiQ1zG_helpModal",
|
|
1013
|
+
"modalWide": "BiQ1zG_modalWide",
|
|
1014
|
+
"failHead": "BiQ1zG_failHead",
|
|
1015
|
+
"result": "BiQ1zG_result",
|
|
1014
1016
|
"noticeRowMain": "BiQ1zG_noticeRowMain",
|
|
1015
|
-
"
|
|
1016
|
-
"cliOnlyHint": "BiQ1zG_cliOnlyHint",
|
|
1017
|
-
"modalTitleBusy": "BiQ1zG_modalTitleBusy",
|
|
1018
|
-
"noticeRow": "BiQ1zG_noticeRow",
|
|
1019
|
-
"noticeIgnore": "BiQ1zG_noticeIgnore",
|
|
1020
|
-
"detailGrid": "BiQ1zG_detailGrid",
|
|
1017
|
+
"failKindTitle": "BiQ1zG_failKindTitle",
|
|
1021
1018
|
"modalCloseIcon": "BiQ1zG_modalCloseIcon",
|
|
1022
|
-
"
|
|
1023
|
-
"
|
|
1019
|
+
"noticeTextFail": "BiQ1zG_noticeTextFail",
|
|
1020
|
+
"noticeBadgeIcon": "BiQ1zG_noticeBadgeIcon",
|
|
1024
1021
|
"confirmIcon": "BiQ1zG_confirmIcon",
|
|
1025
|
-
"
|
|
1026
|
-
"
|
|
1022
|
+
"noticeMain": "BiQ1zG_noticeMain",
|
|
1023
|
+
"failRepoUrl": "BiQ1zG_failRepoUrl",
|
|
1024
|
+
"failReason": "BiQ1zG_failReason",
|
|
1027
1025
|
"failDiagBtn": "BiQ1zG_failDiagBtn",
|
|
1028
|
-
"
|
|
1029
|
-
"
|
|
1030
|
-
"
|
|
1031
|
-
"
|
|
1026
|
+
"dangerConfirm": "BiQ1zG_dangerConfirm",
|
|
1027
|
+
"modalTitleBusy": "BiQ1zG_modalTitleBusy",
|
|
1028
|
+
"failCopy": "BiQ1zG_failCopy",
|
|
1029
|
+
"progressTrack": "BiQ1zG_progressTrack",
|
|
1032
1030
|
"pendingRowStatus": "BiQ1zG_pendingRowStatus",
|
|
1033
|
-
"
|
|
1034
|
-
"
|
|
1031
|
+
"detailPath": "BiQ1zG_detailPath",
|
|
1032
|
+
"errorModal": "BiQ1zG_errorModal",
|
|
1033
|
+
"queueRowTrack": "BiQ1zG_queueRowTrack",
|
|
1034
|
+
"progressHead": "BiQ1zG_progressHead",
|
|
1035
|
+
"failRow": "BiQ1zG_failRow",
|
|
1036
|
+
"aboutContent": "BiQ1zG_aboutContent",
|
|
1037
|
+
"detailMono": "BiQ1zG_detailMono",
|
|
1038
|
+
"noticeTextOk": "BiQ1zG_noticeTextOk",
|
|
1039
|
+
"hubUpdateModal": "BiQ1zG_hubUpdateModal",
|
|
1040
|
+
"errorCopySoft": "BiQ1zG_errorCopySoft",
|
|
1041
|
+
"detailModal": "BiQ1zG_detailModal",
|
|
1042
|
+
"modalCopy": "BiQ1zG_modalCopy",
|
|
1043
|
+
"failKindUninstall": "BiQ1zG_failKindUninstall",
|
|
1044
|
+
"queueRowHead": "BiQ1zG_queueRowHead",
|
|
1045
|
+
"modal": "BiQ1zG_modal",
|
|
1046
|
+
"noticeRowUpdate": "BiQ1zG_noticeRowUpdate"
|
|
1035
1047
|
};
|
|
1036
1048
|
//#endregion
|
|
1037
1049
|
//#region src/server/services/install/release-target.ts
|
|
@@ -1121,7 +1133,7 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
1121
1133
|
* tsdown 构建时用 define 把 __PLUGIN_VERSION__ 替换成 package.json 的版本号;
|
|
1122
1134
|
* node --test 直接 import 本模块时该标识符不存在,typeof 守卫兜底为空串。
|
|
1123
1135
|
*/
|
|
1124
|
-
const PLUGIN_VERSION = "2.0
|
|
1136
|
+
const PLUGIN_VERSION = "2.1.0";
|
|
1125
1137
|
const CATEGORY_ORDER = [
|
|
1126
1138
|
"interface",
|
|
1127
1139
|
"session",
|
|
@@ -1451,14 +1463,6 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
1451
1463
|
}
|
|
1452
1464
|
//#endregion
|
|
1453
1465
|
//#region src/client/logic/release-age.ts
|
|
1454
|
-
/**
|
|
1455
|
-
* DSH Plugin Hub — the community plugin marketplace for DeepSeek Harness.
|
|
1456
|
-
* Website: https://dsh-plugin.org
|
|
1457
|
-
* GitHub: https://github.com/dshplugin/dsh-plugin-hub
|
|
1458
|
-
*
|
|
1459
|
-
* 供应链门禁的时间判定(纯函数):pnpm 会静默回退发布未满门槛的版本,
|
|
1460
|
-
* 故发布太新的版本不该提示更新。Hub 自身更新与插件更新共用同一门槛。
|
|
1461
|
-
*/
|
|
1462
1466
|
/** pnpm 供应链门禁:dsh profile 默认 minimumReleaseAge=1440(分钟);+30 分钟缓冲抵消网络/CDN 边缘时间偏差。 */
|
|
1463
1467
|
const MIN_RELEASE_AGE_MS = 882e5;
|
|
1464
1468
|
/** 发布时间是否仍在门禁窗口内(太新 → 暂缓提示);无值/解析不出返回 false(不拦真实更新)。 */
|
|
@@ -1468,8 +1472,62 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
1468
1472
|
if (Number.isNaN(ms)) return false;
|
|
1469
1473
|
return now - ms < MIN_RELEASE_AGE_MS;
|
|
1470
1474
|
}
|
|
1475
|
+
/** 版本号比较(逐段数字;缺失段按 0)。返回负数/0/正数,非法输入按相等处理。 */
|
|
1476
|
+
function compareVersions(a, b) {
|
|
1477
|
+
const parse = (v) => v.split(/[.+-]/).map((part) => Number.parseInt(part, 10)).filter((n) => !Number.isNaN(n));
|
|
1478
|
+
const va = parse(a);
|
|
1479
|
+
const vb = parse(b);
|
|
1480
|
+
const len = Math.max(va.length, vb.length);
|
|
1481
|
+
for (let i = 0; i < len; i++) {
|
|
1482
|
+
const d = (va[i] ?? 0) - (vb[i] ?? 0);
|
|
1483
|
+
if (d !== 0) return d;
|
|
1484
|
+
}
|
|
1485
|
+
return 0;
|
|
1486
|
+
}
|
|
1487
|
+
/**
|
|
1488
|
+
* 选出本次真正该提示的更新版本。
|
|
1489
|
+
*
|
|
1490
|
+
* 只看最新版会漏更新:连续发版时间隔小于供应链门禁时,最新版永远「太新」,
|
|
1491
|
+
* 提示被整体跳过。这里把最新版与 recentVersions 一起当候选,取「高于当前版本且已过门禁」
|
|
1492
|
+
* 的最高版本;一个都没有但仍存在更高版本 → pending(暂缓,不谎称已是最新)。
|
|
1493
|
+
*/
|
|
1494
|
+
function pickHubUpdate(info, currentVersion, now) {
|
|
1495
|
+
if (currentVersion === "") return {
|
|
1496
|
+
state: "latest",
|
|
1497
|
+
target: null
|
|
1498
|
+
};
|
|
1499
|
+
const seen = /* @__PURE__ */ new Set();
|
|
1500
|
+
const candidates = [];
|
|
1501
|
+
for (const entry of [{
|
|
1502
|
+
version: info.version,
|
|
1503
|
+
publishedAt: info.publishedAt,
|
|
1504
|
+
notes: info.notes
|
|
1505
|
+
}, ...info.recentVersions ?? []]) {
|
|
1506
|
+
if (typeof entry.version !== "string" || entry.version === "" || seen.has(entry.version)) continue;
|
|
1507
|
+
seen.add(entry.version);
|
|
1508
|
+
candidates.push(entry);
|
|
1509
|
+
}
|
|
1510
|
+
const higher = candidates.filter((c) => compareVersions(c.version, currentVersion) > 0).sort((a, b) => compareVersions(b.version, a.version));
|
|
1511
|
+
if (higher.length === 0) return {
|
|
1512
|
+
state: "latest",
|
|
1513
|
+
target: null
|
|
1514
|
+
};
|
|
1515
|
+
const ready = higher.find((c) => !isReleaseTooFresh(c.publishedAt, now));
|
|
1516
|
+
return ready !== void 0 ? {
|
|
1517
|
+
state: "available",
|
|
1518
|
+
target: ready
|
|
1519
|
+
} : {
|
|
1520
|
+
state: "pending",
|
|
1521
|
+
target: higher[0]
|
|
1522
|
+
};
|
|
1523
|
+
}
|
|
1471
1524
|
//#endregion
|
|
1472
1525
|
//#region src/client/logic/installed.ts
|
|
1526
|
+
/** 本地路径安装(file:/link:/绝对或相对路径):身份在本机,不能按 npm 包名认领目录条目。 */
|
|
1527
|
+
function isLocalSpec(value) {
|
|
1528
|
+
const v = value.trim();
|
|
1529
|
+
return /^(file|link):/i.test(v) || v.startsWith(".") || v.startsWith("/") || /^[A-Za-z]:[\\/]/.test(v);
|
|
1530
|
+
}
|
|
1473
1531
|
/** 安装时记录的目录信号(按仓库小写 key 查表)。 */
|
|
1474
1532
|
function signalOf(repo, versions) {
|
|
1475
1533
|
if (!repo) return null;
|
|
@@ -1483,6 +1541,7 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
1483
1541
|
for (const [name, spec] of Object.entries(installed)) if (repoFromInstallTarget(spec).toLowerCase() === needle) return name;
|
|
1484
1542
|
const pkg = ((plugin.source?.npmPackage || versions[repo.toLowerCase()]?.npmPackage) ?? "").toLowerCase();
|
|
1485
1543
|
if (pkg) for (const [name, spec] of Object.entries(installed)) {
|
|
1544
|
+
if (isLocalSpec(spec)) continue;
|
|
1486
1545
|
if (isRepoLike(repoFromInstallTarget(spec))) continue;
|
|
1487
1546
|
if (name.toLowerCase() === pkg) return name;
|
|
1488
1547
|
}
|
|
@@ -1875,13 +1934,14 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
1875
1934
|
* registry 真实发布时间下发(同源),据此判断最准。门槛命中要单列成 `pending` 而不是
|
|
1876
1935
|
* 落回「无更新」——回落会让弹窗在本机版本落后时谎称「已是最新」。
|
|
1877
1936
|
*/
|
|
1878
|
-
const hubCurrentVersion = "2.0
|
|
1879
|
-
const
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1937
|
+
const hubCurrentVersion = "2.1.0";
|
|
1938
|
+
const hubUpdateResult = hubUpdateInfo === null ? {
|
|
1939
|
+
state: "none",
|
|
1940
|
+
target: null
|
|
1941
|
+
} : pickHubUpdate(hubUpdateInfo, hubCurrentVersion, Date.now());
|
|
1942
|
+
const hubUpdateState = hubUpdateResult.state;
|
|
1943
|
+
/** 本次提示的目标版本(available 时有值;pending 时是暂缓中的最高版本) */
|
|
1944
|
+
const hubUpdateTarget = hubUpdateResult.target;
|
|
1885
1945
|
const hubHasUpdate = hubUpdateState === "available";
|
|
1886
1946
|
(0, react.useMemo)(() => {
|
|
1887
1947
|
if (!plugins) return [];
|
|
@@ -1939,6 +1999,7 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
1939
1999
|
hasUpdate,
|
|
1940
2000
|
hubHasUpdate,
|
|
1941
2001
|
hubUpdateState,
|
|
2002
|
+
hubUpdateTarget,
|
|
1942
2003
|
releaseAgeReady,
|
|
1943
2004
|
hubCurrentVersion,
|
|
1944
2005
|
hubUpdateInfo,
|
|
@@ -2135,6 +2196,7 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
2135
2196
|
if (/os error 5\b|ERROR_ACCESS_DENIED|\bEPERM\b|\bEACCES\b|access is denied/i.test(message)) return "accessDenied";
|
|
2136
2197
|
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";
|
|
2137
2198
|
if (/ERR_PNPM_IGNORED_BUILDS|Ignored build scripts:|ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED/i.test(message)) return "pnpmIgnoredBuild";
|
|
2199
|
+
if (/ERR_PNPM_FETCH_40[13]\b|\bE40[13]\b|(?:Unauthorized|Forbidden)\s*-\s*40[13]\b/i.test(message)) return "registryAuth";
|
|
2138
2200
|
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";
|
|
2139
2201
|
if (/\[request-timeout\]/i.test(message)) return "network";
|
|
2140
2202
|
if (/\[packaging\]|entry file missing/i.test(message)) return "pluginPrepare";
|
|
@@ -2204,6 +2266,8 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
2204
2266
|
}
|
|
2205
2267
|
let out;
|
|
2206
2268
|
if (core.length === 0) {
|
|
2269
|
+
const whole = message.trim();
|
|
2270
|
+
if (whole.length <= maxChars) return whole;
|
|
2207
2271
|
const tail = message.trimEnd().slice(-1e3);
|
|
2208
2272
|
const sep = "\n…\n";
|
|
2209
2273
|
const headBudget = Math.max(maxChars - tail.length - 3, 0);
|
|
@@ -2270,6 +2334,14 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
2270
2334
|
const host = m[1].replace(/:\d+$/, "");
|
|
2271
2335
|
return PUBLIC_REGISTRY_HOSTS.has(host) ? null : host;
|
|
2272
2336
|
}
|
|
2337
|
+
/**
|
|
2338
|
+
* 鉴权失败(401/403)时被拒绝的源主机名:从 `ERR_PNPM_FETCH_401 GET https://host/pkg: Unauthorized - 401`
|
|
2339
|
+
* 里取,取不到返回 null(提示文案退回通用说法,不拼出残缺句子)。
|
|
2340
|
+
*/
|
|
2341
|
+
function authRegistryHostOf(message) {
|
|
2342
|
+
const m = /ERR_PNPM_FETCH_40[13]\s+GET\s+https?:\/\/([^\s/:]+)/i.exec(message) ?? /GET\s+https?:\/\/([^\s/:]+)\S*\s*:?\s*(?:Unauthorized|Forbidden)\s*-\s*40[13]/i.exec(message);
|
|
2343
|
+
return m === null ? null : m[1];
|
|
2344
|
+
}
|
|
2273
2345
|
//#endregion
|
|
2274
2346
|
//#region src/client/logic/urls.ts
|
|
2275
2347
|
/** dsh-plugin.org 中文页挂在 /zh/ 前缀下,英文在根路径。 */
|
|
@@ -2310,7 +2382,8 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
2310
2382
|
case "pnpmPolicy": return `pnpm supply-chain policy blocked the ${word} on the user machine`;
|
|
2311
2383
|
case "pnpmUnusedPatch": return "stale pnpm patch entry on the user machine";
|
|
2312
2384
|
case "pnpmMissingDep": return "dependency not found on the npm registry on the user machine";
|
|
2313
|
-
case "registryVersionStale": return
|
|
2385
|
+
case "registryVersionStale": return `requested version not available on the npm registry in use on the user machine`;
|
|
2386
|
+
case "registryAuth": return `npm registry rejected the credentials for this ${word} on the user machine`;
|
|
2314
2387
|
case "pnpmLinkedDirMissing": return "dangling local (link:) dependency in the user profile";
|
|
2315
2388
|
case "fileLocked": return "file locked by another process on the user machine";
|
|
2316
2389
|
case "accessDenied": return "file write access denied on the user machine";
|
|
@@ -2342,7 +2415,7 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
2342
2415
|
const executed = executedCommandOf(command, attempts);
|
|
2343
2416
|
const zhWord = actionWordZh(action);
|
|
2344
2417
|
const title = `[dsh-plugin.org | dsh-plugin-hub] ${reasonTitleOf(kind, action)}: ${repo}`;
|
|
2345
|
-
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";
|
|
2418
|
+
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 === "registryAuth" ? "the npm registry rejected the request with 401/403 — the configured registry needs credentials or blocks this network (local environment issue)" : 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";
|
|
2346
2419
|
const code = coreErrorCode(message);
|
|
2347
2420
|
const build = (coreChars) => {
|
|
2348
2421
|
const body = [
|
|
@@ -2518,6 +2591,7 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
2518
2591
|
checkUpdatesOnStart: true,
|
|
2519
2592
|
proxy: "",
|
|
2520
2593
|
npmRegistry: "",
|
|
2594
|
+
registryFallback: true,
|
|
2521
2595
|
enableNpmInstall: true,
|
|
2522
2596
|
logPath: ""
|
|
2523
2597
|
};
|
|
@@ -2914,6 +2988,7 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
2914
2988
|
display: input.repo,
|
|
2915
2989
|
source: input.source,
|
|
2916
2990
|
mode: input.update ? "update" : void 0,
|
|
2991
|
+
...input.pinVersion ? { version: input.pinVersion } : {},
|
|
2917
2992
|
...langKey ? { lang: langKey } : {},
|
|
2918
2993
|
...input.channel ? { installChannel: input.channel } : {},
|
|
2919
2994
|
...input.globalNpm && input.globalNpm.length > 0 ? { globalNpm: input.globalNpm } : {}
|
|
@@ -2966,7 +3041,8 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
2966
3041
|
updatedAt: p.dates?.repoUpdatedAt,
|
|
2967
3042
|
command: installCommandOf(p, true),
|
|
2968
3043
|
source: "catalog",
|
|
2969
|
-
update: opts?.update
|
|
3044
|
+
update: opts?.update,
|
|
3045
|
+
pinVersion: opts?.pinVersion
|
|
2970
3046
|
});
|
|
2971
3047
|
};
|
|
2972
3048
|
/** 命令行安装:用户手输 npm 包名,走 custom 源(受安全开关控制)。
|
|
@@ -3815,7 +3891,10 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
3815
3891
|
target: "_blank",
|
|
3816
3892
|
rel: "noopener noreferrer",
|
|
3817
3893
|
title: t("failIssueHint")
|
|
3818
|
-
}, 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 === "
|
|
3894
|
+
}, 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 === "registryAuth" ? (() => {
|
|
3895
|
+
const host = authRegistryHostOf(message);
|
|
3896
|
+
return (0, react.createElement)("div", { className: Modal_module_css_default.failPrepareHint }, t(host ? "failRegistryAuthHint" : "failRegistryAuthHintNoHost", host ? { host } : void 0));
|
|
3897
|
+
})() : failureKind === "network" ? (0, react.createElement)("div", null, [
|
|
3819
3898
|
(() => {
|
|
3820
3899
|
const target = unreachableTargetOf(message);
|
|
3821
3900
|
return target ? (0, react.createElement)("div", { className: Modal_module_css_default.failNetworkTarget }, t("failNetworkTarget", { url: target })) : null;
|
|
@@ -4449,6 +4528,10 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
4449
4528
|
if (kind === "accessDenied") return (0, react.createElement)("div", { className: Modal_module_css_default.failPrepareHint }, t("failAccessDeniedHint"));
|
|
4450
4529
|
if (kind === "fsUnavailable") return (0, react.createElement)("div", { className: Modal_module_css_default.failPrepareHint }, t("failFsUnavailableHint"));
|
|
4451
4530
|
if (kind === "originRejected") return (0, react.createElement)("div", { className: Modal_module_css_default.failPrepareHint }, t("failOriginRejectedHint", { profile: env?.profile ?? "<profile>" }));
|
|
4531
|
+
if (kind === "registryAuth") {
|
|
4532
|
+
const host = authRegistryHostOf(r.message);
|
|
4533
|
+
return (0, react.createElement)("div", { className: Modal_module_css_default.failPrepareHint }, t(host ? "failRegistryAuthHint" : "failRegistryAuthHintNoHost", host ? { host } : void 0));
|
|
4534
|
+
}
|
|
4452
4535
|
if (kind === "network") return (0, react.createElement)("div", null, [
|
|
4453
4536
|
(() => {
|
|
4454
4537
|
const target = unreachableTargetOf(r.message);
|
|
@@ -4686,40 +4769,40 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
4686
4769
|
css: css$9
|
|
4687
4770
|
});
|
|
4688
4771
|
var List_module_css_default = {
|
|
4689
|
-
"topics": "_3XaZHa_topics",
|
|
4690
|
-
"topic": "_3XaZHa_topic",
|
|
4691
|
-
"cardHead": "_3XaZHa_cardHead",
|
|
4692
|
-
"card": "_3XaZHa_card",
|
|
4693
4772
|
"versionBadge": "_3XaZHa_versionBadge",
|
|
4694
|
-
"
|
|
4695
|
-
"
|
|
4696
|
-
"
|
|
4697
|
-
"cardSide": "_3XaZHa_cardSide",
|
|
4698
|
-
"detailBtn": "_3XaZHa_detailBtn",
|
|
4773
|
+
"stateActions": "_3XaZHa_stateActions",
|
|
4774
|
+
"moreSentinel": "_3XaZHa_moreSentinel",
|
|
4775
|
+
"categoryBadge": "_3XaZHa_categoryBadge",
|
|
4699
4776
|
"installBtnInstalled": "_3XaZHa_installBtnInstalled",
|
|
4700
|
-
"
|
|
4777
|
+
"updateBadge": "_3XaZHa_updateBadge",
|
|
4778
|
+
"topics": "_3XaZHa_topics",
|
|
4701
4779
|
"installBtnUpdate": "_3XaZHa_installBtnUpdate",
|
|
4702
|
-
"verified": "_3XaZHa_verified",
|
|
4703
|
-
"star": "_3XaZHa_star",
|
|
4704
|
-
"fork": "_3XaZHa_fork",
|
|
4705
4780
|
"retryBtn": "_3XaZHa_retryBtn",
|
|
4706
|
-
"
|
|
4707
|
-
"
|
|
4708
|
-
"
|
|
4709
|
-
"footer": "_3XaZHa_footer",
|
|
4710
|
-
"desc": "_3XaZHa_desc",
|
|
4711
|
-
"categoryBadge": "_3XaZHa_categoryBadge",
|
|
4781
|
+
"footer": "_3XaZHa_footer",
|
|
4782
|
+
"stateTitle": "_3XaZHa_stateTitle",
|
|
4783
|
+
"cardTitle": "_3XaZHa_cardTitle",
|
|
4712
4784
|
"list": "_3XaZHa_list",
|
|
4713
|
-
"moreSentinel": "_3XaZHa_moreSentinel",
|
|
4714
|
-
"installBtnCopied": "_3XaZHa_installBtnCopied",
|
|
4715
4785
|
"uninstallBtn": "_3XaZHa_uninstallBtn",
|
|
4716
|
-
"
|
|
4786
|
+
"actions": "_3XaZHa_actions",
|
|
4787
|
+
"stateDesc": "_3XaZHa_stateDesc",
|
|
4788
|
+
"body": "_3XaZHa_body",
|
|
4789
|
+
"cardMain": "_3XaZHa_cardMain",
|
|
4790
|
+
"installBtnCopied": "_3XaZHa_installBtnCopied",
|
|
4791
|
+
"desc": "_3XaZHa_desc",
|
|
4792
|
+
"detailBtn": "_3XaZHa_detailBtn",
|
|
4717
4793
|
"state": "_3XaZHa_state",
|
|
4794
|
+
"footLink": "_3XaZHa_footLink",
|
|
4795
|
+
"verified": "_3XaZHa_verified",
|
|
4796
|
+
"stats": "_3XaZHa_stats",
|
|
4797
|
+
"cardHead": "_3XaZHa_cardHead",
|
|
4798
|
+
"fork": "_3XaZHa_fork",
|
|
4718
4799
|
"diagBtn": "_3XaZHa_diagBtn",
|
|
4719
|
-
"
|
|
4800
|
+
"cardSide": "_3XaZHa_cardSide",
|
|
4801
|
+
"topic": "_3XaZHa_topic",
|
|
4802
|
+
"star": "_3XaZHa_star",
|
|
4803
|
+
"installBtn": "_3XaZHa_installBtn",
|
|
4720
4804
|
"date": "_3XaZHa_date",
|
|
4721
|
-
"
|
|
4722
|
-
"stats": "_3XaZHa_stats"
|
|
4805
|
+
"card": "_3XaZHa_card"
|
|
4723
4806
|
};
|
|
4724
4807
|
//#endregion
|
|
4725
4808
|
//#region src/client/hooks/useIncrementalList.ts
|
|
@@ -4924,16 +5007,16 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
4924
5007
|
css: css$8
|
|
4925
5008
|
});
|
|
4926
5009
|
var SectionTabs_module_css_default = {
|
|
4927
|
-
"
|
|
4928
|
-
"
|
|
4929
|
-
"
|
|
5010
|
+
"tabCount": "_7tvizq_tabCount",
|
|
5011
|
+
"root": "_7tvizq_root",
|
|
5012
|
+
"tab": "_7tvizq_tab",
|
|
5013
|
+
"tabLabel": "_7tvizq_tabLabel",
|
|
4930
5014
|
"noticeBtn": "_7tvizq_noticeBtn",
|
|
5015
|
+
"tabActive": "_7tvizq_tabActive",
|
|
4931
5016
|
"noticeIcon": "_7tvizq_noticeIcon",
|
|
4932
|
-
"tabLabel": "_7tvizq_tabLabel",
|
|
4933
5017
|
"noticeCount": "_7tvizq_noticeCount",
|
|
4934
|
-
"
|
|
4935
|
-
"
|
|
4936
|
-
"root": "_7tvizq_root"
|
|
5018
|
+
"tabCountActive": "_7tvizq_tabCountActive",
|
|
5019
|
+
"tabIcon": "_7tvizq_tabIcon"
|
|
4937
5020
|
};
|
|
4938
5021
|
//#endregion
|
|
4939
5022
|
//#region src/client/components/layout/SectionTabs.tsx
|
|
@@ -5009,42 +5092,42 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
5009
5092
|
css: css$7
|
|
5010
5093
|
});
|
|
5011
5094
|
var InstalledView_module_css_default = {
|
|
5012
|
-
"
|
|
5013
|
-
"
|
|
5095
|
+
"rowCategory": "_1nXeGW_rowCategory",
|
|
5096
|
+
"rowActions": "_1nXeGW_rowActions",
|
|
5097
|
+
"empty": "_1nXeGW_empty",
|
|
5098
|
+
"rowSourceTagHub": "_1nXeGW_rowSourceTagHub",
|
|
5099
|
+
"versionBadge": "_1nXeGW_versionBadge",
|
|
5100
|
+
"row": "_1nXeGW_row",
|
|
5101
|
+
"rowTitle": "_1nXeGW_rowTitle",
|
|
5102
|
+
"rowSourceTag": "_1nXeGW_rowSourceTag",
|
|
5103
|
+
"rowDetail": "_1nXeGW_rowDetail",
|
|
5014
5104
|
"rowMain": "_1nXeGW_rowMain",
|
|
5105
|
+
"updateBadge": "_1nXeGW_updateBadge",
|
|
5106
|
+
"rowUpdate": "_1nXeGW_rowUpdate",
|
|
5107
|
+
"searchInput": "_1nXeGW_searchInput",
|
|
5108
|
+
"list": "_1nXeGW_list",
|
|
5109
|
+
"emptyDesc": "_1nXeGW_emptyDesc",
|
|
5110
|
+
"segBtnActive": "_1nXeGW_segBtnActive",
|
|
5015
5111
|
"rowDesc": "_1nXeGW_rowDesc",
|
|
5112
|
+
"rowRepo": "_1nXeGW_rowRepo",
|
|
5113
|
+
"rowMeta": "_1nXeGW_rowMeta",
|
|
5114
|
+
"rowSourceTagManual": "_1nXeGW_rowSourceTagManual",
|
|
5016
5115
|
"statusDot": "_1nXeGW_statusDot",
|
|
5017
|
-
"toolbar": "_1nXeGW_toolbar",
|
|
5018
|
-
"rowSourceTag": "_1nXeGW_rowSourceTag",
|
|
5019
|
-
"segBtnActive": "_1nXeGW_segBtnActive",
|
|
5020
5116
|
"segGroup": "_1nXeGW_segGroup",
|
|
5021
|
-
"searchWrap": "_1nXeGW_searchWrap",
|
|
5022
|
-
"searchInput": "_1nXeGW_searchInput",
|
|
5023
|
-
"empty": "_1nXeGW_empty",
|
|
5024
5117
|
"exampleBadge": "_1nXeGW_exampleBadge",
|
|
5025
|
-
"list": "_1nXeGW_list",
|
|
5026
|
-
"segLabel": "_1nXeGW_segLabel",
|
|
5027
|
-
"rowSourceTagHub": "_1nXeGW_rowSourceTagHub",
|
|
5028
5118
|
"statusInactive": "_1nXeGW_statusInactive",
|
|
5029
|
-
"
|
|
5030
|
-
"rowTitleLine": "_1nXeGW_rowTitleLine",
|
|
5031
|
-
"rowTitle": "_1nXeGW_rowTitle",
|
|
5119
|
+
"statusPending": "_1nXeGW_statusPending",
|
|
5032
5120
|
"emptyTitle": "_1nXeGW_emptyTitle",
|
|
5033
|
-
"
|
|
5034
|
-
"
|
|
5035
|
-
"
|
|
5121
|
+
"rowRestart": "_1nXeGW_rowRestart",
|
|
5122
|
+
"searchWrap": "_1nXeGW_searchWrap",
|
|
5123
|
+
"root": "_1nXeGW_root",
|
|
5124
|
+
"exampleRow": "_1nXeGW_exampleRow",
|
|
5036
5125
|
"segRow": "_1nXeGW_segRow",
|
|
5037
|
-
"
|
|
5038
|
-
"
|
|
5039
|
-
"rowUpdate": "_1nXeGW_rowUpdate",
|
|
5126
|
+
"segLabel": "_1nXeGW_segLabel",
|
|
5127
|
+
"segBtn": "_1nXeGW_segBtn",
|
|
5040
5128
|
"rowUninstall": "_1nXeGW_rowUninstall",
|
|
5041
|
-
"
|
|
5042
|
-
"
|
|
5043
|
-
"rowDetail": "_1nXeGW_rowDetail",
|
|
5044
|
-
"rowRepo": "_1nXeGW_rowRepo",
|
|
5045
|
-
"rowMeta": "_1nXeGW_rowMeta",
|
|
5046
|
-
"exampleRow": "_1nXeGW_exampleRow",
|
|
5047
|
-
"rowSourceTagManual": "_1nXeGW_rowSourceTagManual"
|
|
5129
|
+
"toolbar": "_1nXeGW_toolbar",
|
|
5130
|
+
"rowTitleLine": "_1nXeGW_rowTitleLine"
|
|
5048
5131
|
};
|
|
5049
5132
|
//#endregion
|
|
5050
5133
|
//#region src/client/components/views/InstalledView.tsx
|
|
@@ -5288,27 +5371,27 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
5288
5371
|
css: css$6
|
|
5289
5372
|
});
|
|
5290
5373
|
var CustomInstallView_module_css_default = {
|
|
5291
|
-
"
|
|
5292
|
-
"
|
|
5293
|
-
"
|
|
5294
|
-
"installExample": "zISxCG_installExample",
|
|
5374
|
+
"installRow": "zISxCG_installRow",
|
|
5375
|
+
"installInputError": "zISxCG_installInputError",
|
|
5376
|
+
"channelOffText": "zISxCG_channelOffText",
|
|
5295
5377
|
"channelOffBtn": "zISxCG_channelOffBtn",
|
|
5296
|
-
"
|
|
5378
|
+
"helpBody": "zISxCG_helpBody",
|
|
5379
|
+
"helpCmd": "zISxCG_helpCmd",
|
|
5380
|
+
"installCards": "zISxCG_installCards",
|
|
5297
5381
|
"desc": "zISxCG_desc",
|
|
5298
|
-
"installBtn": "zISxCG_installBtn",
|
|
5299
5382
|
"installCardHead": "zISxCG_installCardHead",
|
|
5300
|
-
"
|
|
5383
|
+
"installExample": "zISxCG_installExample",
|
|
5384
|
+
"installInput": "zISxCG_installInput",
|
|
5385
|
+
"helpNote": "zISxCG_helpNote",
|
|
5386
|
+
"channelOff": "zISxCG_channelOff",
|
|
5387
|
+
"installHelpBtn": "zISxCG_installHelpBtn",
|
|
5301
5388
|
"installLabel": "zISxCG_installLabel",
|
|
5302
|
-
"
|
|
5303
|
-
"
|
|
5389
|
+
"installCardDisabled": "zISxCG_installCardDisabled",
|
|
5390
|
+
"installBtn": "zISxCG_installBtn",
|
|
5304
5391
|
"helpLine": "zISxCG_helpLine",
|
|
5305
|
-
"
|
|
5306
|
-
"helpBody": "zISxCG_helpBody",
|
|
5392
|
+
"root": "zISxCG_root",
|
|
5307
5393
|
"installError": "zISxCG_installError",
|
|
5308
|
-
"
|
|
5309
|
-
"installInputError": "zISxCG_installInputError",
|
|
5310
|
-
"channelOffText": "zISxCG_channelOffText",
|
|
5311
|
-
"installHelpBtn": "zISxCG_installHelpBtn"
|
|
5394
|
+
"installCard": "zISxCG_installCard"
|
|
5312
5395
|
};
|
|
5313
5396
|
//#endregion
|
|
5314
5397
|
//#region src/client/components/views/CustomInstallView.tsx
|
|
@@ -5464,30 +5547,30 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
5464
5547
|
css: css$5
|
|
5465
5548
|
});
|
|
5466
5549
|
var SettingsView_module_css_default = {
|
|
5467
|
-
"
|
|
5468
|
-
"resetBtn": "_506LLG_resetBtn",
|
|
5469
|
-
"settingControlStack": "_506LLG_settingControlStack",
|
|
5470
|
-
"proxyHintFail": "_506LLG_proxyHintFail",
|
|
5471
|
-
"navIcon": "_506LLG_navIcon",
|
|
5472
|
-
"proxyControl": "_506LLG_proxyControl",
|
|
5473
|
-
"settingTitle": "_506LLG_settingTitle",
|
|
5550
|
+
"root": "_506LLG_root",
|
|
5474
5551
|
"navItem": "_506LLG_navItem",
|
|
5475
|
-
"settingRow": "_506LLG_settingRow",
|
|
5476
5552
|
"sidebar": "_506LLG_sidebar",
|
|
5477
|
-
"
|
|
5478
|
-
"
|
|
5479
|
-
"
|
|
5480
|
-
"pageHeader": "_506LLG_pageHeader",
|
|
5481
|
-
"pageTitle": "_506LLG_pageTitle",
|
|
5482
|
-
"settingLabel": "_506LLG_settingLabel",
|
|
5483
|
-
"textInput": "_506LLG_textInput",
|
|
5553
|
+
"navIcon": "_506LLG_navIcon",
|
|
5554
|
+
"navItemActive": "_506LLG_navItemActive",
|
|
5555
|
+
"proxyControl": "_506LLG_proxyControl",
|
|
5484
5556
|
"settingDesc": "_506LLG_settingDesc",
|
|
5485
|
-
"settingControl": "_506LLG_settingControl",
|
|
5486
|
-
"pageDesc": "_506LLG_pageDesc",
|
|
5487
5557
|
"card": "_506LLG_card",
|
|
5558
|
+
"settingControl": "_506LLG_settingControl",
|
|
5559
|
+
"settingControlStack": "_506LLG_settingControlStack",
|
|
5488
5560
|
"proxyHintOk": "_506LLG_proxyHintOk",
|
|
5489
5561
|
"content": "_506LLG_content",
|
|
5490
|
-
"
|
|
5562
|
+
"controlDropdown": "_506LLG_controlDropdown",
|
|
5563
|
+
"settingRow": "_506LLG_settingRow",
|
|
5564
|
+
"textInput": "_506LLG_textInput",
|
|
5565
|
+
"pageHeader": "_506LLG_pageHeader",
|
|
5566
|
+
"settingLabel": "_506LLG_settingLabel",
|
|
5567
|
+
"settingTitle": "_506LLG_settingTitle",
|
|
5568
|
+
"pageDesc": "_506LLG_pageDesc",
|
|
5569
|
+
"settingRowStack": "_506LLG_settingRowStack",
|
|
5570
|
+
"proxyHint": "_506LLG_proxyHint",
|
|
5571
|
+
"resetBtn": "_506LLG_resetBtn",
|
|
5572
|
+
"proxyHintFail": "_506LLG_proxyHintFail",
|
|
5573
|
+
"pageTitle": "_506LLG_pageTitle"
|
|
5491
5574
|
};
|
|
5492
5575
|
//#endregion
|
|
5493
5576
|
//#region \0dsh-css:src/client/styles/Dropdown.module.css.mjs
|
|
@@ -5506,18 +5589,18 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
5506
5589
|
css: css$4
|
|
5507
5590
|
});
|
|
5508
5591
|
var Dropdown_module_css_default = {
|
|
5509
|
-
"
|
|
5510
|
-
"
|
|
5592
|
+
"dropdownCount": "B_Gxsq_dropdownCount",
|
|
5593
|
+
"dropdownArrowOpen": "B_Gxsq_dropdownArrowOpen",
|
|
5594
|
+
"dropdownPanel": "B_Gxsq_dropdownPanel",
|
|
5511
5595
|
"dropdownLabel": "B_Gxsq_dropdownLabel",
|
|
5596
|
+
"dropdownArrow": "B_Gxsq_dropdownArrow",
|
|
5597
|
+
"dropdownFill": "B_Gxsq_dropdownFill",
|
|
5512
5598
|
"dropdownItemActive": "B_Gxsq_dropdownItemActive",
|
|
5513
|
-
"
|
|
5599
|
+
"dropdownItemLabel": "B_Gxsq_dropdownItemLabel",
|
|
5514
5600
|
"dropdownCountActive": "B_Gxsq_dropdownCountActive",
|
|
5515
|
-
"dropdownArrow": "B_Gxsq_dropdownArrow",
|
|
5516
|
-
"dropdownItem": "B_Gxsq_dropdownItem",
|
|
5517
|
-
"dropdownArrowOpen": "B_Gxsq_dropdownArrowOpen",
|
|
5518
|
-
"dropdownBtn": "B_Gxsq_dropdownBtn",
|
|
5519
5601
|
"dropdown": "B_Gxsq_dropdown",
|
|
5520
|
-
"
|
|
5602
|
+
"dropdownItem": "B_Gxsq_dropdownItem",
|
|
5603
|
+
"dropdownBtn": "B_Gxsq_dropdownBtn"
|
|
5521
5604
|
};
|
|
5522
5605
|
//#endregion
|
|
5523
5606
|
//#region \0dsh-css:src/client/styles/Toggle.module.css.mjs
|
|
@@ -5635,29 +5718,29 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
5635
5718
|
css: css$2
|
|
5636
5719
|
});
|
|
5637
5720
|
var DiagnosticsView_module_css_default = {
|
|
5638
|
-
"
|
|
5721
|
+
"meta": "k9eRya_meta",
|
|
5722
|
+
"summaryRunning": "k9eRya_summaryRunning",
|
|
5723
|
+
"summaryOk": "k9eRya_summaryOk",
|
|
5724
|
+
"row": "k9eRya_row",
|
|
5725
|
+
"summary": "k9eRya_summary",
|
|
5726
|
+
"badgeFail": "k9eRya_badgeFail",
|
|
5639
5727
|
"head": "k9eRya_head",
|
|
5728
|
+
"envRow": "k9eRya_envRow",
|
|
5729
|
+
"diagPulse": "k9eRya_diagPulse",
|
|
5730
|
+
"runBtn": "k9eRya_runBtn",
|
|
5640
5731
|
"envTitle": "k9eRya_envTitle",
|
|
5641
|
-
"
|
|
5642
|
-
"
|
|
5643
|
-
"panel": "k9eRya_panel",
|
|
5732
|
+
"envLabel": "k9eRya_envLabel",
|
|
5733
|
+
"envDesc": "k9eRya_envDesc",
|
|
5644
5734
|
"headHint": "k9eRya_headHint",
|
|
5645
|
-
"diagPulse": "k9eRya_diagPulse",
|
|
5646
5735
|
"envCopyBtn": "k9eRya_envCopyBtn",
|
|
5736
|
+
"display": "k9eRya_display",
|
|
5647
5737
|
"badgeIdle": "k9eRya_badgeIdle",
|
|
5738
|
+
"badgeOk": "k9eRya_badgeOk",
|
|
5648
5739
|
"summaryFail": "k9eRya_summaryFail",
|
|
5649
|
-
"
|
|
5650
|
-
"name": "k9eRya_name",
|
|
5651
|
-
"meta": "k9eRya_meta",
|
|
5652
|
-
"badgeFail": "k9eRya_badgeFail",
|
|
5653
|
-
"row": "k9eRya_row",
|
|
5654
|
-
"envDesc": "k9eRya_envDesc",
|
|
5655
|
-
"display": "k9eRya_display",
|
|
5656
|
-
"runBtn": "k9eRya_runBtn",
|
|
5740
|
+
"panel": "k9eRya_panel",
|
|
5657
5741
|
"badgeRunning": "k9eRya_badgeRunning",
|
|
5658
|
-
"
|
|
5659
|
-
"
|
|
5660
|
-
"summaryRunning": "k9eRya_summaryRunning"
|
|
5742
|
+
"name": "k9eRya_name",
|
|
5743
|
+
"badge": "k9eRya_badge"
|
|
5661
5744
|
};
|
|
5662
5745
|
//#endregion
|
|
5663
5746
|
//#region src/client/components/views/DiagnosticsView.tsx
|
|
@@ -5832,57 +5915,57 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
5832
5915
|
css: css$1
|
|
5833
5916
|
});
|
|
5834
5917
|
var LogsView_module_css_default = {
|
|
5835
|
-
"
|
|
5836
|
-
"
|
|
5918
|
+
"footFail": "_3j77BW_footFail",
|
|
5919
|
+
"pathDialogHint": "_3j77BW_pathDialogHint",
|
|
5837
5920
|
"message": "_3j77BW_message",
|
|
5921
|
+
"pathDialogReset": "_3j77BW_pathDialogReset",
|
|
5922
|
+
"previewRow": "_3j77BW_previewRow",
|
|
5923
|
+
"moreEnd": "_3j77BW_moreEnd",
|
|
5924
|
+
"badgeSuccess": "_3j77BW_badgeSuccess",
|
|
5925
|
+
"entry": "_3j77BW_entry",
|
|
5926
|
+
"searchInput": "_3j77BW_searchInput",
|
|
5838
5927
|
"more": "_3j77BW_more",
|
|
5839
|
-
"badgeWarn": "_3j77BW_badgeWarn",
|
|
5840
|
-
"badgeInfo": "_3j77BW_badgeInfo",
|
|
5841
|
-
"time": "_3j77BW_time",
|
|
5842
|
-
"pathDialogRow": "_3j77BW_pathDialogRow",
|
|
5843
5928
|
"headHint": "_3j77BW_headHint",
|
|
5844
|
-
"
|
|
5845
|
-
"filterChip": "_3j77BW_filterChip",
|
|
5846
|
-
"searchInput": "_3j77BW_searchInput",
|
|
5847
|
-
"pathText": "_3j77BW_pathText",
|
|
5848
|
-
"footActions": "_3j77BW_footActions",
|
|
5929
|
+
"footPath": "_3j77BW_footPath",
|
|
5849
5930
|
"badgeError": "_3j77BW_badgeError",
|
|
5850
|
-
"list": "_3j77BW_list",
|
|
5851
|
-
"pathDialogHint": "_3j77BW_pathDialogHint",
|
|
5852
|
-
"previewRow": "_3j77BW_previewRow",
|
|
5853
|
-
"filterChipActive": "_3j77BW_filterChipActive",
|
|
5854
|
-
"entry": "_3j77BW_entry",
|
|
5855
|
-
"pathLabel": "_3j77BW_pathLabel",
|
|
5856
5931
|
"catUninstall": "_3j77BW_catUninstall",
|
|
5857
|
-
"
|
|
5932
|
+
"headActions": "_3j77BW_headActions",
|
|
5933
|
+
"footCount": "_3j77BW_footCount",
|
|
5934
|
+
"clearBtn": "_3j77BW_clearBtn",
|
|
5935
|
+
"filterChipActive": "_3j77BW_filterChipActive",
|
|
5936
|
+
"badgeInfo": "_3j77BW_badgeInfo",
|
|
5937
|
+
"foot": "_3j77BW_foot",
|
|
5938
|
+
"catBadge": "_3j77BW_catBadge",
|
|
5939
|
+
"badge": "_3j77BW_badge",
|
|
5940
|
+
"time": "_3j77BW_time",
|
|
5858
5941
|
"empty": "_3j77BW_empty",
|
|
5859
|
-
"
|
|
5942
|
+
"pathDialogFoot": "_3j77BW_pathDialogFoot",
|
|
5860
5943
|
"logList": "_3j77BW_logList",
|
|
5861
|
-
"
|
|
5862
|
-
"
|
|
5944
|
+
"list": "_3j77BW_list",
|
|
5945
|
+
"pathDraft": "_3j77BW_pathDraft",
|
|
5946
|
+
"pathDialogRow": "_3j77BW_pathDialogRow",
|
|
5947
|
+
"head": "_3j77BW_head",
|
|
5948
|
+
"badgeWarn": "_3j77BW_badgeWarn",
|
|
5949
|
+
"pathText": "_3j77BW_pathText",
|
|
5863
5950
|
"search": "_3j77BW_search",
|
|
5864
|
-
"
|
|
5865
|
-
"
|
|
5866
|
-
"
|
|
5951
|
+
"badgeDebug": "_3j77BW_badgeDebug",
|
|
5952
|
+
"pathDialogDesc": "_3j77BW_pathDialogDesc",
|
|
5953
|
+
"linkBtn": "_3j77BW_linkBtn",
|
|
5954
|
+
"catInstall": "_3j77BW_catInstall",
|
|
5955
|
+
"catUpdate": "_3j77BW_catUpdate",
|
|
5867
5956
|
"catSettings": "_3j77BW_catSettings",
|
|
5868
|
-
"
|
|
5869
|
-
"
|
|
5957
|
+
"filterChip": "_3j77BW_filterChip",
|
|
5958
|
+
"footActions": "_3j77BW_footActions",
|
|
5870
5959
|
"catDiagnostics": "_3j77BW_catDiagnostics",
|
|
5960
|
+
"pathDialog": "_3j77BW_pathDialog",
|
|
5871
5961
|
"event": "_3j77BW_event",
|
|
5872
|
-
"pathDialogReset": "_3j77BW_pathDialogReset",
|
|
5873
|
-
"actions": "_3j77BW_actions",
|
|
5874
|
-
"linkBtn": "_3j77BW_linkBtn",
|
|
5875
|
-
"pathDraft": "_3j77BW_pathDraft",
|
|
5876
|
-
"headActions": "_3j77BW_headActions",
|
|
5877
|
-
"catBadge": "_3j77BW_catBadge",
|
|
5878
|
-
"footCount": "_3j77BW_footCount",
|
|
5879
|
-
"btn": "_3j77BW_btn",
|
|
5880
5962
|
"catSystem": "_3j77BW_catSystem",
|
|
5881
|
-
"footPath": "_3j77BW_footPath",
|
|
5882
|
-
"head": "_3j77BW_head",
|
|
5883
|
-
"badge": "_3j77BW_badge",
|
|
5884
5963
|
"panel": "_3j77BW_panel",
|
|
5885
|
-
"
|
|
5964
|
+
"pathLabel": "_3j77BW_pathLabel",
|
|
5965
|
+
"filterBar": "_3j77BW_filterBar",
|
|
5966
|
+
"btn": "_3j77BW_btn",
|
|
5967
|
+
"actions": "_3j77BW_actions",
|
|
5968
|
+
"pathRow": "_3j77BW_pathRow"
|
|
5886
5969
|
};
|
|
5887
5970
|
//#endregion
|
|
5888
5971
|
//#region src/client/components/modals/LogsModal.tsx
|
|
@@ -6588,6 +6671,14 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
6588
6671
|
title: t("settingsMirror"),
|
|
6589
6672
|
className: `${SettingsView_module_css_default.controlDropdown} ${Dropdown_module_css_default.dropdownFill}`
|
|
6590
6673
|
})
|
|
6674
|
+
}), (0, react.createElement)(SettingRow, {
|
|
6675
|
+
title: t("settingsRegistryFallback"),
|
|
6676
|
+
desc: t("settingsRegistryFallbackDesc"),
|
|
6677
|
+
children: (0, react.createElement)(Toggle, {
|
|
6678
|
+
checked: settings.registryFallback,
|
|
6679
|
+
onChange: (v) => update({ registryFallback: v }),
|
|
6680
|
+
title: t("settingsRegistryFallback")
|
|
6681
|
+
})
|
|
6591
6682
|
}), (0, react.createElement)(SettingRow, {
|
|
6592
6683
|
title: t("settingsProxy"),
|
|
6593
6684
|
desc: t("settingsProxyDesc"),
|
|
@@ -6713,6 +6804,9 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
6713
6804
|
const [confirmPlugin, setConfirmPlugin] = (0, react.useState)(null);
|
|
6714
6805
|
/** 弹窗动作是否为「更新」:已安装插件点「更新」→ 走同一条 add 命令原位覆盖重装,文案区分安装/更新 */
|
|
6715
6806
|
const [confirmIsUpdate, setConfirmIsUpdate] = (0, react.useState)(false);
|
|
6807
|
+
/** Hub 自我更新指定的精确版本:连续发版时提示的是「已过供应链门禁」的旧一版,
|
|
6808
|
+
* 安装必须钉在该版本上,否则又会被 @latest 带回门禁内的最新版。 */
|
|
6809
|
+
const [confirmPinVersion, setConfirmPinVersion] = (0, react.useState)(null);
|
|
6716
6810
|
/** 命令行安装确认弹窗:记录待安装的裸目标(npm 包名)——
|
|
6717
6811
|
* 与应用商店同一套确认/进度/结果弹窗,提供时 plugin 传 null 走 customTarget 模式 */
|
|
6718
6812
|
const [confirmCustomTarget, setConfirmCustomTarget] = (0, react.useState)(null);
|
|
@@ -7068,6 +7162,7 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
7068
7162
|
onInstall: (p, opts) => {
|
|
7069
7163
|
setInstallDone(false);
|
|
7070
7164
|
setConfirmIsUpdate(opts?.update ?? false);
|
|
7165
|
+
setConfirmPinVersion(null);
|
|
7071
7166
|
queue.clearModalTask();
|
|
7072
7167
|
setConfirmPlugin(p);
|
|
7073
7168
|
},
|
|
@@ -7093,6 +7188,7 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
7093
7188
|
setDetailItem(null);
|
|
7094
7189
|
setInstallDone(false);
|
|
7095
7190
|
setConfirmIsUpdate(true);
|
|
7191
|
+
setConfirmPinVersion(null);
|
|
7096
7192
|
queue.clearModalTask();
|
|
7097
7193
|
setConfirmPlugin(item.plugin);
|
|
7098
7194
|
},
|
|
@@ -7143,7 +7239,7 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
7143
7239
|
openSection: settingsSection,
|
|
7144
7240
|
onConsumedOpenSection: () => setSettingsSection(null)
|
|
7145
7241
|
}), showHubUpdate && (0, react.createElement)(HubUpdateModal, {
|
|
7146
|
-
info: catalog.hubUpdateInfo ?? { version: "2.0
|
|
7242
|
+
info: catalog.hubUpdateTarget ?? catalog.hubUpdateInfo ?? { version: "2.1.0" },
|
|
7147
7243
|
state: catalog.hubUpdateState,
|
|
7148
7244
|
currentVersion: catalog.hubCurrentVersion,
|
|
7149
7245
|
lang,
|
|
@@ -7154,6 +7250,7 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
7154
7250
|
if (hubEntry) {
|
|
7155
7251
|
setInstallDone(false);
|
|
7156
7252
|
setConfirmIsUpdate(true);
|
|
7253
|
+
setConfirmPinVersion(catalog.hubUpdateTarget?.version ?? null);
|
|
7157
7254
|
queue.clearModalTask();
|
|
7158
7255
|
setConfirmPlugin(hubEntry);
|
|
7159
7256
|
}
|
|
@@ -7185,6 +7282,7 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
7185
7282
|
setShowNotifications(false);
|
|
7186
7283
|
setInstallDone(false);
|
|
7187
7284
|
setConfirmIsUpdate(true);
|
|
7285
|
+
setConfirmPinVersion(null);
|
|
7188
7286
|
queue.clearModalTask();
|
|
7189
7287
|
setConfirmPlugin(plugin);
|
|
7190
7288
|
},
|
|
@@ -7243,7 +7341,10 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
7243
7341
|
if (reload) window.location.reload();
|
|
7244
7342
|
},
|
|
7245
7343
|
onCopy: () => copyCommand(confirmPlugin),
|
|
7246
|
-
onInstall: () => queue.installNow(confirmPlugin, confirmIsUpdate ? {
|
|
7344
|
+
onInstall: () => queue.installNow(confirmPlugin, confirmIsUpdate ? {
|
|
7345
|
+
update: true,
|
|
7346
|
+
pinVersion: confirmPinVersion ?? void 0
|
|
7347
|
+
} : void 0),
|
|
7247
7348
|
onRestart: () => setShowRestartConfirm(true)
|
|
7248
7349
|
}), confirmCustomTarget && (0, react.createElement)(InstallModal, {
|
|
7249
7350
|
plugin: null,
|