dsh-plugin 2.0.6 → 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 +421 -326
- 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/registry-fallback.js +89 -0
- package/lib/services/install/task-queue.js +69 -19
- 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/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/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/registry-fallback.ts +89 -0
- package/src/server/services/install/task-queue.ts +78 -19
- 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
|
-
"aboutBtn": "qikqja_aboutBtn",
|
|
846
|
-
"version": "qikqja_version",
|
|
847
|
-
"resultCount": "qikqja_resultCount",
|
|
848
|
-
"taglineLink": "qikqja_taglineLink",
|
|
849
|
-
"resultSeg": "qikqja_resultSeg",
|
|
850
|
-
"title": "qikqja_title",
|
|
851
|
-
"adBanner": "qikqja_adBanner",
|
|
852
|
-
"hubUpdateBadge": "qikqja_hubUpdateBadge",
|
|
853
|
-
"adBadge": "qikqja_adBadge",
|
|
854
|
-
"segLabel": "qikqja_segLabel",
|
|
855
857
|
"headerRight": "qikqja_headerRight",
|
|
856
|
-
"
|
|
857
|
-
"
|
|
858
|
+
"searchRow": "qikqja_searchRow",
|
|
859
|
+
"controls": "qikqja_controls",
|
|
860
|
+
"tagline": "qikqja_tagline",
|
|
861
|
+
"logoIcon": "qikqja_logoIcon",
|
|
862
|
+
"segBtn": "qikqja_segBtn",
|
|
858
863
|
"tabCount": "qikqja_tabCount",
|
|
859
|
-
"
|
|
860
|
-
"
|
|
861
|
-
"
|
|
864
|
+
"taglineLink": "qikqja_taglineLink",
|
|
865
|
+
"segGroup": "qikqja_segGroup",
|
|
866
|
+
"version": "qikqja_version",
|
|
862
867
|
"adText": "qikqja_adText",
|
|
868
|
+
"header": "qikqja_header",
|
|
863
869
|
"tabs": "qikqja_tabs",
|
|
870
|
+
"tab": "qikqja_tab",
|
|
871
|
+
"hubUpdateBadge": "qikqja_hubUpdateBadge",
|
|
864
872
|
"langBtn": "qikqja_langBtn",
|
|
865
873
|
"headerTitleRow": "qikqja_headerTitleRow",
|
|
866
|
-
"
|
|
874
|
+
"copyIcon": "qikqja_copyIcon",
|
|
875
|
+
"search": "qikqja_search",
|
|
867
876
|
"brandTitle": "qikqja_brandTitle",
|
|
868
|
-
"
|
|
869
|
-
"
|
|
877
|
+
"tabActive": "qikqja_tabActive",
|
|
878
|
+
"title": "qikqja_title",
|
|
879
|
+
"adBanner": "qikqja_adBanner",
|
|
880
|
+
"adBadge": "qikqja_adBadge",
|
|
870
881
|
"githubLink": "qikqja_githubLink",
|
|
871
|
-
"
|
|
872
|
-
"tagline": "qikqja_tagline",
|
|
882
|
+
"segBtnActive": "qikqja_segBtnActive",
|
|
873
883
|
"versionBtn": "qikqja_versionBtn",
|
|
874
|
-
"
|
|
875
|
-
"
|
|
884
|
+
"resultSeg": "qikqja_resultSeg",
|
|
885
|
+
"adArrow": "qikqja_adArrow",
|
|
886
|
+
"sortGroup": "qikqja_sortGroup",
|
|
887
|
+
"githubIcon": "qikqja_githubIcon",
|
|
888
|
+
"segLabel": "qikqja_segLabel",
|
|
876
889
|
"tabsRow": "qikqja_tabsRow",
|
|
877
|
-
"
|
|
878
|
-
"
|
|
879
|
-
"
|
|
880
|
-
"logoIcon": "qikqja_logoIcon"
|
|
890
|
+
"aboutBtn": "qikqja_aboutBtn",
|
|
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
|
-
"
|
|
902
|
-
"helpModal": "BiQ1zG_helpModal",
|
|
903
|
-
"failList": "BiQ1zG_failList",
|
|
904
|
-
"detailStars": "BiQ1zG_detailStars",
|
|
905
|
-
"detailPath": "BiQ1zG_detailPath",
|
|
906
|
-
"noticeFoot": "BiQ1zG_noticeFoot",
|
|
911
|
+
"modalCmdCopy": "BiQ1zG_modalCmdCopy",
|
|
912
|
+
"noticeBadgeFail": "BiQ1zG_noticeBadgeFail",
|
|
913
|
+
"resultCheckIcon": "BiQ1zG_resultCheckIcon",
|
|
907
914
|
"queueRowBody": "BiQ1zG_queueRowBody",
|
|
908
|
-
"
|
|
909
|
-
"
|
|
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",
|
|
910
922
|
"failKindInstall": "BiQ1zG_failKindInstall",
|
|
911
|
-
"
|
|
912
|
-
"confirmIcon": "BiQ1zG_confirmIcon",
|
|
913
|
-
"stripCancel": "BiQ1zG_stripCancel",
|
|
914
|
-
"noticeRowOk": "BiQ1zG_noticeRowOk",
|
|
915
|
-
"modalTitleBusy": "BiQ1zG_modalTitleBusy",
|
|
916
|
-
"hubUpdateMetaItem": "BiQ1zG_hubUpdateMetaItem",
|
|
917
|
-
"noticeTextFail": "BiQ1zG_noticeTextFail",
|
|
918
|
-
"noticeRow": "BiQ1zG_noticeRow",
|
|
919
|
-
"restartLater": "BiQ1zG_restartLater",
|
|
920
|
-
"queueRowTarget": "BiQ1zG_queueRowTarget",
|
|
921
|
-
"modalCmd": "BiQ1zG_modalCmd",
|
|
922
|
-
"progressFillFail": "BiQ1zG_progressFillFail",
|
|
923
|
-
"detailRow": "BiQ1zG_detailRow",
|
|
924
|
-
"detailMono": "BiQ1zG_detailMono",
|
|
925
|
-
"overlayIn": "BiQ1zG_overlayIn",
|
|
923
|
+
"modalClose": "BiQ1zG_modalClose",
|
|
926
924
|
"queueRowDesc": "BiQ1zG_queueRowDesc",
|
|
927
|
-
"
|
|
928
|
-
"
|
|
929
|
-
"
|
|
930
|
-
"failRepo": "BiQ1zG_failRepo",
|
|
931
|
-
"detailModal": "BiQ1zG_detailModal",
|
|
932
|
-
"toast": "BiQ1zG_toast",
|
|
933
|
-
"modalLink": "BiQ1zG_modalLink",
|
|
934
|
-
"noticeRowUpdate": "BiQ1zG_noticeRowUpdate",
|
|
925
|
+
"modalActions": "BiQ1zG_modalActions",
|
|
926
|
+
"toastFail": "BiQ1zG_toastFail",
|
|
927
|
+
"restartLater": "BiQ1zG_restartLater",
|
|
935
928
|
"modalDesc": "BiQ1zG_modalDesc",
|
|
936
|
-
"
|
|
937
|
-
"
|
|
938
|
-
"pendingRowActions": "BiQ1zG_pendingRowActions",
|
|
939
|
-
"noticeMain": "BiQ1zG_noticeMain",
|
|
940
|
-
"noticeHead": "BiQ1zG_noticeHead",
|
|
941
|
-
"linkIcon": "BiQ1zG_linkIcon",
|
|
942
|
-
"queueRowHead": "BiQ1zG_queueRowHead",
|
|
929
|
+
"modalCmdText": "BiQ1zG_modalCmdText",
|
|
930
|
+
"detailPathText": "BiQ1zG_detailPathText",
|
|
943
931
|
"detailStatusPending": "BiQ1zG_detailStatusPending",
|
|
944
|
-
"
|
|
945
|
-
"
|
|
946
|
-
"
|
|
947
|
-
"
|
|
948
|
-
"
|
|
949
|
-
"
|
|
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",
|
|
940
|
+
"trustHint": "BiQ1zG_trustHint",
|
|
950
941
|
"queueRowPct": "BiQ1zG_queueRowPct",
|
|
951
|
-
"
|
|
952
|
-
"
|
|
953
|
-
"
|
|
954
|
-
"
|
|
955
|
-
"
|
|
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",
|
|
956
949
|
"noticeTime": "BiQ1zG_noticeTime",
|
|
957
|
-
"
|
|
958
|
-
"hubUpdateModal": "BiQ1zG_hubUpdateModal",
|
|
959
|
-
"errorModal": "BiQ1zG_errorModal",
|
|
960
|
-
"confirmPrimary": "BiQ1zG_confirmPrimary",
|
|
961
|
-
"errorBox": "BiQ1zG_errorBox",
|
|
962
|
-
"failHead": "BiQ1zG_failHead",
|
|
963
|
-
"failBigIssue": "BiQ1zG_failBigIssue",
|
|
964
|
-
"noticeBadgeIcon": "BiQ1zG_noticeBadgeIcon",
|
|
965
|
-
"modalCmdText": "BiQ1zG_modalCmdText",
|
|
966
|
-
"progressTrack": "BiQ1zG_progressTrack",
|
|
967
|
-
"hubUpdateMeta": "BiQ1zG_hubUpdateMeta",
|
|
968
|
-
"detailPathActions": "BiQ1zG_detailPathActions",
|
|
969
|
-
"noticeVersion": "BiQ1zG_noticeVersion",
|
|
970
|
-
"failKind": "BiQ1zG_failKind",
|
|
950
|
+
"detailStars": "BiQ1zG_detailStars",
|
|
971
951
|
"resultDesc": "BiQ1zG_resultDesc",
|
|
972
|
-
"
|
|
973
|
-
"
|
|
974
|
-
"
|
|
975
|
-
"detailStatusRunning": "BiQ1zG_detailStatusRunning",
|
|
976
|
-
"failedCopyHint": "BiQ1zG_failedCopyHint",
|
|
977
|
-
"queueRowTrack": "BiQ1zG_queueRowTrack",
|
|
978
|
-
"uninstallConfirm": "BiQ1zG_uninstallConfirm",
|
|
979
|
-
"resultCheckIcon": "BiQ1zG_resultCheckIcon",
|
|
980
|
-
"failPrepareHint": "BiQ1zG_failPrepareHint",
|
|
952
|
+
"modalHead": "BiQ1zG_modalHead",
|
|
953
|
+
"progressFill": "BiQ1zG_progressFill",
|
|
954
|
+
"failNetworkTarget": "BiQ1zG_failNetworkTarget",
|
|
981
955
|
"failMisjudgeLink": "BiQ1zG_failMisjudgeLink",
|
|
982
|
-
"
|
|
983
|
-
"
|
|
984
|
-
"
|
|
985
|
-
"
|
|
986
|
-
"
|
|
987
|
-
"
|
|
988
|
-
"
|
|
989
|
-
"detailPathText": "BiQ1zG_detailPathText",
|
|
990
|
-
"modalTitleQueued": "BiQ1zG_modalTitleQueued",
|
|
956
|
+
"bundleDeselectedHint": "BiQ1zG_bundleDeselectedHint",
|
|
957
|
+
"detailPathActions": "BiQ1zG_detailPathActions",
|
|
958
|
+
"toast": "BiQ1zG_toast",
|
|
959
|
+
"linkIcon": "BiQ1zG_linkIcon",
|
|
960
|
+
"modalRow": "BiQ1zG_modalRow",
|
|
961
|
+
"detailValue": "BiQ1zG_detailValue",
|
|
962
|
+
"progress": "BiQ1zG_progress",
|
|
991
963
|
"modalBody": "BiQ1zG_modalBody",
|
|
964
|
+
"resultTitle": "BiQ1zG_resultTitle",
|
|
965
|
+
"noticeRemove": "BiQ1zG_noticeRemove",
|
|
966
|
+
"modalInstall": "BiQ1zG_modalInstall",
|
|
992
967
|
"overlay": "BiQ1zG_overlay",
|
|
993
|
-
"
|
|
994
|
-
"
|
|
995
|
-
"
|
|
968
|
+
"queueRowTarget": "BiQ1zG_queueRowTarget",
|
|
969
|
+
"noticeHead": "BiQ1zG_noticeHead",
|
|
970
|
+
"uninstallConfirm": "BiQ1zG_uninstallConfirm",
|
|
971
|
+
"modalCmd": "BiQ1zG_modalCmd",
|
|
972
|
+
"failRepoLabel": "BiQ1zG_failRepoLabel",
|
|
973
|
+
"cliOnlyHint": "BiQ1zG_cliOnlyHint",
|
|
974
|
+
"confirmIconDanger": "BiQ1zG_confirmIconDanger",
|
|
975
|
+
"modalCancel": "BiQ1zG_modalCancel",
|
|
976
|
+
"queueRowStatus": "BiQ1zG_queueRowStatus",
|
|
996
977
|
"queuedHint": "BiQ1zG_queuedHint",
|
|
997
|
-
"
|
|
998
|
-
"
|
|
978
|
+
"noticeVersion": "BiQ1zG_noticeVersion",
|
|
979
|
+
"failKind": "BiQ1zG_failKind",
|
|
980
|
+
"restartNow": "BiQ1zG_restartNow",
|
|
981
|
+
"detailGrid": "BiQ1zG_detailGrid",
|
|
982
|
+
"detailLabel": "BiQ1zG_detailLabel",
|
|
983
|
+
"failPrepareHint": "BiQ1zG_failPrepareHint",
|
|
984
|
+
"progressFillFail": "BiQ1zG_progressFillFail",
|
|
985
|
+
"confirmIconWrap": "BiQ1zG_confirmIconWrap",
|
|
986
|
+
"hubUpdateMetaItem": "BiQ1zG_hubUpdateMetaItem",
|
|
999
987
|
"noticeBadgeOk": "BiQ1zG_noticeBadgeOk",
|
|
1000
|
-
"
|
|
988
|
+
"modalTitle": "BiQ1zG_modalTitle",
|
|
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",
|
|
1001
|
+
"detailArrow": "BiQ1zG_detailArrow",
|
|
1001
1002
|
"detailStatusText": "BiQ1zG_detailStatusText",
|
|
1002
|
-
"
|
|
1003
|
-
"
|
|
1004
|
-
"
|
|
1005
|
-
"
|
|
1006
|
-
"
|
|
1007
|
-
"
|
|
1008
|
-
"
|
|
1009
|
-
"
|
|
1010
|
-
"
|
|
1003
|
+
"failClear": "BiQ1zG_failClear",
|
|
1004
|
+
"detailRow": "BiQ1zG_detailRow",
|
|
1005
|
+
"failList": "BiQ1zG_failList",
|
|
1006
|
+
"noticeIgnore": "BiQ1zG_noticeIgnore",
|
|
1007
|
+
"stripCancel": "BiQ1zG_stripCancel",
|
|
1008
|
+
"modalValue": "BiQ1zG_modalValue",
|
|
1009
|
+
"failRepo": "BiQ1zG_failRepo",
|
|
1010
|
+
"queueSectionTitle": "BiQ1zG_queueSectionTitle",
|
|
1011
|
+
"noticeRow": "BiQ1zG_noticeRow",
|
|
1012
|
+
"failEmpty": "BiQ1zG_failEmpty",
|
|
1011
1013
|
"modalWide": "BiQ1zG_modalWide",
|
|
1012
|
-
"
|
|
1013
|
-
"modalCancel": "BiQ1zG_modalCancel",
|
|
1014
|
-
"detailGrid": "BiQ1zG_detailGrid",
|
|
1015
|
-
"queueRow": "BiQ1zG_queueRow",
|
|
1016
|
-
"logModal": "BiQ1zG_logModal",
|
|
1014
|
+
"failHead": "BiQ1zG_failHead",
|
|
1017
1015
|
"result": "BiQ1zG_result",
|
|
1018
|
-
"
|
|
1019
|
-
"
|
|
1020
|
-
"
|
|
1021
|
-
"
|
|
1022
|
-
"
|
|
1023
|
-
"
|
|
1024
|
-
"
|
|
1016
|
+
"noticeRowMain": "BiQ1zG_noticeRowMain",
|
|
1017
|
+
"failKindTitle": "BiQ1zG_failKindTitle",
|
|
1018
|
+
"modalCloseIcon": "BiQ1zG_modalCloseIcon",
|
|
1019
|
+
"noticeTextFail": "BiQ1zG_noticeTextFail",
|
|
1020
|
+
"noticeBadgeIcon": "BiQ1zG_noticeBadgeIcon",
|
|
1021
|
+
"confirmIcon": "BiQ1zG_confirmIcon",
|
|
1022
|
+
"noticeMain": "BiQ1zG_noticeMain",
|
|
1023
|
+
"failRepoUrl": "BiQ1zG_failRepoUrl",
|
|
1024
|
+
"failReason": "BiQ1zG_failReason",
|
|
1025
|
+
"failDiagBtn": "BiQ1zG_failDiagBtn",
|
|
1026
|
+
"dangerConfirm": "BiQ1zG_dangerConfirm",
|
|
1027
|
+
"modalTitleBusy": "BiQ1zG_modalTitleBusy",
|
|
1028
|
+
"failCopy": "BiQ1zG_failCopy",
|
|
1029
|
+
"progressTrack": "BiQ1zG_progressTrack",
|
|
1030
|
+
"pendingRowStatus": "BiQ1zG_pendingRowStatus",
|
|
1031
|
+
"detailPath": "BiQ1zG_detailPath",
|
|
1032
|
+
"errorModal": "BiQ1zG_errorModal",
|
|
1033
|
+
"queueRowTrack": "BiQ1zG_queueRowTrack",
|
|
1034
|
+
"progressHead": "BiQ1zG_progressHead",
|
|
1025
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",
|
|
1026
1045
|
"modal": "BiQ1zG_modal",
|
|
1027
|
-
"
|
|
1028
|
-
"restartNowWarning": "BiQ1zG_restartNowWarning",
|
|
1029
|
-
"failNetworkTarget": "BiQ1zG_failNetworkTarget",
|
|
1030
|
-
"modalActions": "BiQ1zG_modalActions",
|
|
1031
|
-
"failRepoUrl": "BiQ1zG_failRepoUrl",
|
|
1032
|
-
"trustHint": "BiQ1zG_trustHint",
|
|
1033
|
-
"failEmpty": "BiQ1zG_failEmpty",
|
|
1034
|
-
"modalCmdCopy": "BiQ1zG_modalCmdCopy"
|
|
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,6 +1472,55 @@ 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
|
|
1473
1526
|
/** 本地路径安装(file:/link:/绝对或相对路径):身份在本机,不能按 npm 包名认领目录条目。 */
|
|
@@ -1881,13 +1934,14 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
1881
1934
|
* registry 真实发布时间下发(同源),据此判断最准。门槛命中要单列成 `pending` 而不是
|
|
1882
1935
|
* 落回「无更新」——回落会让弹窗在本机版本落后时谎称「已是最新」。
|
|
1883
1936
|
*/
|
|
1884
|
-
const hubCurrentVersion = "2.0
|
|
1885
|
-
const
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
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;
|
|
1891
1945
|
const hubHasUpdate = hubUpdateState === "available";
|
|
1892
1946
|
(0, react.useMemo)(() => {
|
|
1893
1947
|
if (!plugins) return [];
|
|
@@ -1945,6 +1999,7 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
1945
1999
|
hasUpdate,
|
|
1946
2000
|
hubHasUpdate,
|
|
1947
2001
|
hubUpdateState,
|
|
2002
|
+
hubUpdateTarget,
|
|
1948
2003
|
releaseAgeReady,
|
|
1949
2004
|
hubCurrentVersion,
|
|
1950
2005
|
hubUpdateInfo,
|
|
@@ -2141,6 +2196,7 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
2141
2196
|
if (/os error 5\b|ERROR_ACCESS_DENIED|\bEPERM\b|\bEACCES\b|access is denied/i.test(message)) return "accessDenied";
|
|
2142
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";
|
|
2143
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";
|
|
2144
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";
|
|
2145
2201
|
if (/\[request-timeout\]/i.test(message)) return "network";
|
|
2146
2202
|
if (/\[packaging\]|entry file missing/i.test(message)) return "pluginPrepare";
|
|
@@ -2210,6 +2266,8 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
2210
2266
|
}
|
|
2211
2267
|
let out;
|
|
2212
2268
|
if (core.length === 0) {
|
|
2269
|
+
const whole = message.trim();
|
|
2270
|
+
if (whole.length <= maxChars) return whole;
|
|
2213
2271
|
const tail = message.trimEnd().slice(-1e3);
|
|
2214
2272
|
const sep = "\n…\n";
|
|
2215
2273
|
const headBudget = Math.max(maxChars - tail.length - 3, 0);
|
|
@@ -2276,6 +2334,14 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
2276
2334
|
const host = m[1].replace(/:\d+$/, "");
|
|
2277
2335
|
return PUBLIC_REGISTRY_HOSTS.has(host) ? null : host;
|
|
2278
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
|
+
}
|
|
2279
2345
|
//#endregion
|
|
2280
2346
|
//#region src/client/logic/urls.ts
|
|
2281
2347
|
/** dsh-plugin.org 中文页挂在 /zh/ 前缀下,英文在根路径。 */
|
|
@@ -2316,7 +2382,8 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
2316
2382
|
case "pnpmPolicy": return `pnpm supply-chain policy blocked the ${word} on the user machine`;
|
|
2317
2383
|
case "pnpmUnusedPatch": return "stale pnpm patch entry on the user machine";
|
|
2318
2384
|
case "pnpmMissingDep": return "dependency not found on the npm registry on the user machine";
|
|
2319
|
-
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`;
|
|
2320
2387
|
case "pnpmLinkedDirMissing": return "dangling local (link:) dependency in the user profile";
|
|
2321
2388
|
case "fileLocked": return "file locked by another process on the user machine";
|
|
2322
2389
|
case "accessDenied": return "file write access denied on the user machine";
|
|
@@ -2348,7 +2415,7 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
2348
2415
|
const executed = executedCommandOf(command, attempts);
|
|
2349
2416
|
const zhWord = actionWordZh(action);
|
|
2350
2417
|
const title = `[dsh-plugin.org | dsh-plugin-hub] ${reasonTitleOf(kind, action)}: ${repo}`;
|
|
2351
|
-
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";
|
|
2352
2419
|
const code = coreErrorCode(message);
|
|
2353
2420
|
const build = (coreChars) => {
|
|
2354
2421
|
const body = [
|
|
@@ -2524,6 +2591,7 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
2524
2591
|
checkUpdatesOnStart: true,
|
|
2525
2592
|
proxy: "",
|
|
2526
2593
|
npmRegistry: "",
|
|
2594
|
+
registryFallback: true,
|
|
2527
2595
|
enableNpmInstall: true,
|
|
2528
2596
|
logPath: ""
|
|
2529
2597
|
};
|
|
@@ -2920,6 +2988,7 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
2920
2988
|
display: input.repo,
|
|
2921
2989
|
source: input.source,
|
|
2922
2990
|
mode: input.update ? "update" : void 0,
|
|
2991
|
+
...input.pinVersion ? { version: input.pinVersion } : {},
|
|
2923
2992
|
...langKey ? { lang: langKey } : {},
|
|
2924
2993
|
...input.channel ? { installChannel: input.channel } : {},
|
|
2925
2994
|
...input.globalNpm && input.globalNpm.length > 0 ? { globalNpm: input.globalNpm } : {}
|
|
@@ -2972,7 +3041,8 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
2972
3041
|
updatedAt: p.dates?.repoUpdatedAt,
|
|
2973
3042
|
command: installCommandOf(p, true),
|
|
2974
3043
|
source: "catalog",
|
|
2975
|
-
update: opts?.update
|
|
3044
|
+
update: opts?.update,
|
|
3045
|
+
pinVersion: opts?.pinVersion
|
|
2976
3046
|
});
|
|
2977
3047
|
};
|
|
2978
3048
|
/** 命令行安装:用户手输 npm 包名,走 custom 源(受安全开关控制)。
|
|
@@ -3821,7 +3891,10 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
3821
3891
|
target: "_blank",
|
|
3822
3892
|
rel: "noopener noreferrer",
|
|
3823
3893
|
title: t("failIssueHint")
|
|
3824
|
-
}, 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, [
|
|
3825
3898
|
(() => {
|
|
3826
3899
|
const target = unreachableTargetOf(message);
|
|
3827
3900
|
return target ? (0, react.createElement)("div", { className: Modal_module_css_default.failNetworkTarget }, t("failNetworkTarget", { url: target })) : null;
|
|
@@ -4455,6 +4528,10 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
4455
4528
|
if (kind === "accessDenied") return (0, react.createElement)("div", { className: Modal_module_css_default.failPrepareHint }, t("failAccessDeniedHint"));
|
|
4456
4529
|
if (kind === "fsUnavailable") return (0, react.createElement)("div", { className: Modal_module_css_default.failPrepareHint }, t("failFsUnavailableHint"));
|
|
4457
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
|
+
}
|
|
4458
4535
|
if (kind === "network") return (0, react.createElement)("div", null, [
|
|
4459
4536
|
(() => {
|
|
4460
4537
|
const target = unreachableTargetOf(r.message);
|
|
@@ -4692,40 +4769,40 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
4692
4769
|
css: css$9
|
|
4693
4770
|
});
|
|
4694
4771
|
var List_module_css_default = {
|
|
4695
|
-
"
|
|
4696
|
-
"
|
|
4697
|
-
"
|
|
4698
|
-
"card": "_3XaZHa_card",
|
|
4699
|
-
"date": "_3XaZHa_date",
|
|
4700
|
-
"fork": "_3XaZHa_fork",
|
|
4701
|
-
"footer": "_3XaZHa_footer",
|
|
4702
|
-
"topics": "_3XaZHa_topics",
|
|
4703
|
-
"body": "_3XaZHa_body",
|
|
4772
|
+
"versionBadge": "_3XaZHa_versionBadge",
|
|
4773
|
+
"stateActions": "_3XaZHa_stateActions",
|
|
4774
|
+
"moreSentinel": "_3XaZHa_moreSentinel",
|
|
4704
4775
|
"categoryBadge": "_3XaZHa_categoryBadge",
|
|
4705
|
-
"
|
|
4706
|
-
"star": "_3XaZHa_star",
|
|
4707
|
-
"cardHead": "_3XaZHa_cardHead",
|
|
4708
|
-
"desc": "_3XaZHa_desc",
|
|
4709
|
-
"topic": "_3XaZHa_topic",
|
|
4710
|
-
"list": "_3XaZHa_list",
|
|
4711
|
-
"actions": "_3XaZHa_actions",
|
|
4776
|
+
"installBtnInstalled": "_3XaZHa_installBtnInstalled",
|
|
4712
4777
|
"updateBadge": "_3XaZHa_updateBadge",
|
|
4713
|
-
"
|
|
4714
|
-
"cardTitle": "_3XaZHa_cardTitle",
|
|
4715
|
-
"cardSide": "_3XaZHa_cardSide",
|
|
4716
|
-
"footLink": "_3XaZHa_footLink",
|
|
4717
|
-
"installBtn": "_3XaZHa_installBtn",
|
|
4718
|
-
"stats": "_3XaZHa_stats",
|
|
4719
|
-
"state": "_3XaZHa_state",
|
|
4720
|
-
"stateActions": "_3XaZHa_stateActions",
|
|
4721
|
-
"installBtnCopied": "_3XaZHa_installBtnCopied",
|
|
4778
|
+
"topics": "_3XaZHa_topics",
|
|
4722
4779
|
"installBtnUpdate": "_3XaZHa_installBtnUpdate",
|
|
4723
4780
|
"retryBtn": "_3XaZHa_retryBtn",
|
|
4724
|
-
"
|
|
4725
|
-
"
|
|
4781
|
+
"footer": "_3XaZHa_footer",
|
|
4782
|
+
"stateTitle": "_3XaZHa_stateTitle",
|
|
4783
|
+
"cardTitle": "_3XaZHa_cardTitle",
|
|
4784
|
+
"list": "_3XaZHa_list",
|
|
4726
4785
|
"uninstallBtn": "_3XaZHa_uninstallBtn",
|
|
4786
|
+
"actions": "_3XaZHa_actions",
|
|
4787
|
+
"stateDesc": "_3XaZHa_stateDesc",
|
|
4788
|
+
"body": "_3XaZHa_body",
|
|
4789
|
+
"cardMain": "_3XaZHa_cardMain",
|
|
4790
|
+
"installBtnCopied": "_3XaZHa_installBtnCopied",
|
|
4791
|
+
"desc": "_3XaZHa_desc",
|
|
4727
4792
|
"detailBtn": "_3XaZHa_detailBtn",
|
|
4728
|
-
"
|
|
4793
|
+
"state": "_3XaZHa_state",
|
|
4794
|
+
"footLink": "_3XaZHa_footLink",
|
|
4795
|
+
"verified": "_3XaZHa_verified",
|
|
4796
|
+
"stats": "_3XaZHa_stats",
|
|
4797
|
+
"cardHead": "_3XaZHa_cardHead",
|
|
4798
|
+
"fork": "_3XaZHa_fork",
|
|
4799
|
+
"diagBtn": "_3XaZHa_diagBtn",
|
|
4800
|
+
"cardSide": "_3XaZHa_cardSide",
|
|
4801
|
+
"topic": "_3XaZHa_topic",
|
|
4802
|
+
"star": "_3XaZHa_star",
|
|
4803
|
+
"installBtn": "_3XaZHa_installBtn",
|
|
4804
|
+
"date": "_3XaZHa_date",
|
|
4805
|
+
"card": "_3XaZHa_card"
|
|
4729
4806
|
};
|
|
4730
4807
|
//#endregion
|
|
4731
4808
|
//#region src/client/hooks/useIncrementalList.ts
|
|
@@ -4931,15 +5008,15 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
4931
5008
|
});
|
|
4932
5009
|
var SectionTabs_module_css_default = {
|
|
4933
5010
|
"tabCount": "_7tvizq_tabCount",
|
|
5011
|
+
"root": "_7tvizq_root",
|
|
4934
5012
|
"tab": "_7tvizq_tab",
|
|
4935
|
-
"noticeIcon": "_7tvizq_noticeIcon",
|
|
4936
5013
|
"tabLabel": "_7tvizq_tabLabel",
|
|
4937
|
-
"tabCountActive": "_7tvizq_tabCountActive",
|
|
4938
5014
|
"noticeBtn": "_7tvizq_noticeBtn",
|
|
4939
|
-
"
|
|
4940
|
-
"
|
|
5015
|
+
"tabActive": "_7tvizq_tabActive",
|
|
5016
|
+
"noticeIcon": "_7tvizq_noticeIcon",
|
|
4941
5017
|
"noticeCount": "_7tvizq_noticeCount",
|
|
4942
|
-
"
|
|
5018
|
+
"tabCountActive": "_7tvizq_tabCountActive",
|
|
5019
|
+
"tabIcon": "_7tvizq_tabIcon"
|
|
4943
5020
|
};
|
|
4944
5021
|
//#endregion
|
|
4945
5022
|
//#region src/client/components/layout/SectionTabs.tsx
|
|
@@ -5015,42 +5092,42 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
5015
5092
|
css: css$7
|
|
5016
5093
|
});
|
|
5017
5094
|
var InstalledView_module_css_default = {
|
|
5018
|
-
"rowTitleLine": "_1nXeGW_rowTitleLine",
|
|
5019
|
-
"segBtn": "_1nXeGW_segBtn",
|
|
5020
|
-
"statusInactive": "_1nXeGW_statusInactive",
|
|
5021
|
-
"rowRepo": "_1nXeGW_rowRepo",
|
|
5022
|
-
"rowUninstall": "_1nXeGW_rowUninstall",
|
|
5023
|
-
"root": "_1nXeGW_root",
|
|
5024
|
-
"rowDetail": "_1nXeGW_rowDetail",
|
|
5025
|
-
"toolbar": "_1nXeGW_toolbar",
|
|
5026
|
-
"rowRestart": "_1nXeGW_rowRestart",
|
|
5027
|
-
"emptyTitle": "_1nXeGW_emptyTitle",
|
|
5028
5095
|
"rowCategory": "_1nXeGW_rowCategory",
|
|
5029
|
-
"
|
|
5030
|
-
"
|
|
5031
|
-
"rowUpdate": "_1nXeGW_rowUpdate",
|
|
5096
|
+
"rowActions": "_1nXeGW_rowActions",
|
|
5097
|
+
"empty": "_1nXeGW_empty",
|
|
5032
5098
|
"rowSourceTagHub": "_1nXeGW_rowSourceTagHub",
|
|
5099
|
+
"versionBadge": "_1nXeGW_versionBadge",
|
|
5100
|
+
"row": "_1nXeGW_row",
|
|
5101
|
+
"rowTitle": "_1nXeGW_rowTitle",
|
|
5102
|
+
"rowSourceTag": "_1nXeGW_rowSourceTag",
|
|
5103
|
+
"rowDetail": "_1nXeGW_rowDetail",
|
|
5104
|
+
"rowMain": "_1nXeGW_rowMain",
|
|
5033
5105
|
"updateBadge": "_1nXeGW_updateBadge",
|
|
5034
|
-
"
|
|
5035
|
-
"
|
|
5106
|
+
"rowUpdate": "_1nXeGW_rowUpdate",
|
|
5107
|
+
"searchInput": "_1nXeGW_searchInput",
|
|
5108
|
+
"list": "_1nXeGW_list",
|
|
5109
|
+
"emptyDesc": "_1nXeGW_emptyDesc",
|
|
5110
|
+
"segBtnActive": "_1nXeGW_segBtnActive",
|
|
5036
5111
|
"rowDesc": "_1nXeGW_rowDesc",
|
|
5112
|
+
"rowRepo": "_1nXeGW_rowRepo",
|
|
5037
5113
|
"rowMeta": "_1nXeGW_rowMeta",
|
|
5038
|
-
"segRow": "_1nXeGW_segRow",
|
|
5039
|
-
"rowTitle": "_1nXeGW_rowTitle",
|
|
5040
|
-
"searchWrap": "_1nXeGW_searchWrap",
|
|
5041
|
-
"segGroup": "_1nXeGW_segGroup",
|
|
5042
|
-
"segBtnActive": "_1nXeGW_segBtnActive",
|
|
5043
|
-
"empty": "_1nXeGW_empty",
|
|
5044
|
-
"statusDot": "_1nXeGW_statusDot",
|
|
5045
5114
|
"rowSourceTagManual": "_1nXeGW_rowSourceTagManual",
|
|
5046
|
-
"
|
|
5047
|
-
"
|
|
5048
|
-
"
|
|
5049
|
-
"
|
|
5050
|
-
"
|
|
5051
|
-
"
|
|
5052
|
-
"
|
|
5053
|
-
"
|
|
5115
|
+
"statusDot": "_1nXeGW_statusDot",
|
|
5116
|
+
"segGroup": "_1nXeGW_segGroup",
|
|
5117
|
+
"exampleBadge": "_1nXeGW_exampleBadge",
|
|
5118
|
+
"statusInactive": "_1nXeGW_statusInactive",
|
|
5119
|
+
"statusPending": "_1nXeGW_statusPending",
|
|
5120
|
+
"emptyTitle": "_1nXeGW_emptyTitle",
|
|
5121
|
+
"rowRestart": "_1nXeGW_rowRestart",
|
|
5122
|
+
"searchWrap": "_1nXeGW_searchWrap",
|
|
5123
|
+
"root": "_1nXeGW_root",
|
|
5124
|
+
"exampleRow": "_1nXeGW_exampleRow",
|
|
5125
|
+
"segRow": "_1nXeGW_segRow",
|
|
5126
|
+
"segLabel": "_1nXeGW_segLabel",
|
|
5127
|
+
"segBtn": "_1nXeGW_segBtn",
|
|
5128
|
+
"rowUninstall": "_1nXeGW_rowUninstall",
|
|
5129
|
+
"toolbar": "_1nXeGW_toolbar",
|
|
5130
|
+
"rowTitleLine": "_1nXeGW_rowTitleLine"
|
|
5054
5131
|
};
|
|
5055
5132
|
//#endregion
|
|
5056
5133
|
//#region src/client/components/views/InstalledView.tsx
|
|
@@ -5294,27 +5371,27 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
5294
5371
|
css: css$6
|
|
5295
5372
|
});
|
|
5296
5373
|
var CustomInstallView_module_css_default = {
|
|
5297
|
-
"
|
|
5298
|
-
"
|
|
5374
|
+
"installRow": "zISxCG_installRow",
|
|
5375
|
+
"installInputError": "zISxCG_installInputError",
|
|
5376
|
+
"channelOffText": "zISxCG_channelOffText",
|
|
5299
5377
|
"channelOffBtn": "zISxCG_channelOffBtn",
|
|
5300
|
-
"
|
|
5301
|
-
"
|
|
5302
|
-
"root": "zISxCG_root",
|
|
5378
|
+
"helpBody": "zISxCG_helpBody",
|
|
5379
|
+
"helpCmd": "zISxCG_helpCmd",
|
|
5303
5380
|
"installCards": "zISxCG_installCards",
|
|
5304
|
-
"installInputError": "zISxCG_installInputError",
|
|
5305
5381
|
"desc": "zISxCG_desc",
|
|
5306
|
-
"installHelpBtn": "zISxCG_installHelpBtn",
|
|
5307
|
-
"installBtn": "zISxCG_installBtn",
|
|
5308
|
-
"channelOffText": "zISxCG_channelOffText",
|
|
5309
|
-
"installExample": "zISxCG_installExample",
|
|
5310
|
-
"helpNote": "zISxCG_helpNote",
|
|
5311
|
-
"installRow": "zISxCG_installRow",
|
|
5312
5382
|
"installCardHead": "zISxCG_installCardHead",
|
|
5383
|
+
"installExample": "zISxCG_installExample",
|
|
5313
5384
|
"installInput": "zISxCG_installInput",
|
|
5314
|
-
"
|
|
5315
|
-
"helpLine": "zISxCG_helpLine",
|
|
5385
|
+
"helpNote": "zISxCG_helpNote",
|
|
5316
5386
|
"channelOff": "zISxCG_channelOff",
|
|
5317
|
-
"
|
|
5387
|
+
"installHelpBtn": "zISxCG_installHelpBtn",
|
|
5388
|
+
"installLabel": "zISxCG_installLabel",
|
|
5389
|
+
"installCardDisabled": "zISxCG_installCardDisabled",
|
|
5390
|
+
"installBtn": "zISxCG_installBtn",
|
|
5391
|
+
"helpLine": "zISxCG_helpLine",
|
|
5392
|
+
"root": "zISxCG_root",
|
|
5393
|
+
"installError": "zISxCG_installError",
|
|
5394
|
+
"installCard": "zISxCG_installCard"
|
|
5318
5395
|
};
|
|
5319
5396
|
//#endregion
|
|
5320
5397
|
//#region src/client/components/views/CustomInstallView.tsx
|
|
@@ -5470,30 +5547,30 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
5470
5547
|
css: css$5
|
|
5471
5548
|
});
|
|
5472
5549
|
var SettingsView_module_css_default = {
|
|
5473
|
-
"
|
|
5550
|
+
"root": "_506LLG_root",
|
|
5551
|
+
"navItem": "_506LLG_navItem",
|
|
5552
|
+
"sidebar": "_506LLG_sidebar",
|
|
5553
|
+
"navIcon": "_506LLG_navIcon",
|
|
5474
5554
|
"navItemActive": "_506LLG_navItemActive",
|
|
5475
|
-
"settingLabel": "_506LLG_settingLabel",
|
|
5476
5555
|
"proxyControl": "_506LLG_proxyControl",
|
|
5477
|
-
"pageTitle": "_506LLG_pageTitle",
|
|
5478
|
-
"pageDesc": "_506LLG_pageDesc",
|
|
5479
|
-
"card": "_506LLG_card",
|
|
5480
|
-
"settingTitle": "_506LLG_settingTitle",
|
|
5481
|
-
"settingRow": "_506LLG_settingRow",
|
|
5482
5556
|
"settingDesc": "_506LLG_settingDesc",
|
|
5557
|
+
"card": "_506LLG_card",
|
|
5483
5558
|
"settingControl": "_506LLG_settingControl",
|
|
5484
|
-
"
|
|
5485
|
-
"root": "_506LLG_root",
|
|
5559
|
+
"settingControlStack": "_506LLG_settingControlStack",
|
|
5486
5560
|
"proxyHintOk": "_506LLG_proxyHintOk",
|
|
5561
|
+
"content": "_506LLG_content",
|
|
5487
5562
|
"controlDropdown": "_506LLG_controlDropdown",
|
|
5488
|
-
"
|
|
5489
|
-
"navIcon": "_506LLG_navIcon",
|
|
5490
|
-
"pageHeader": "_506LLG_pageHeader",
|
|
5491
|
-
"settingControlStack": "_506LLG_settingControlStack",
|
|
5492
|
-
"navItem": "_506LLG_navItem",
|
|
5563
|
+
"settingRow": "_506LLG_settingRow",
|
|
5493
5564
|
"textInput": "_506LLG_textInput",
|
|
5494
|
-
"
|
|
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",
|
|
5495
5572
|
"proxyHintFail": "_506LLG_proxyHintFail",
|
|
5496
|
-
"
|
|
5573
|
+
"pageTitle": "_506LLG_pageTitle"
|
|
5497
5574
|
};
|
|
5498
5575
|
//#endregion
|
|
5499
5576
|
//#region \0dsh-css:src/client/styles/Dropdown.module.css.mjs
|
|
@@ -5512,18 +5589,18 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
5512
5589
|
css: css$4
|
|
5513
5590
|
});
|
|
5514
5591
|
var Dropdown_module_css_default = {
|
|
5515
|
-
"dropdownLabel": "B_Gxsq_dropdownLabel",
|
|
5516
|
-
"dropdownItem": "B_Gxsq_dropdownItem",
|
|
5517
|
-
"dropdownItemActive": "B_Gxsq_dropdownItemActive",
|
|
5518
|
-
"dropdownArrow": "B_Gxsq_dropdownArrow",
|
|
5519
5592
|
"dropdownCount": "B_Gxsq_dropdownCount",
|
|
5593
|
+
"dropdownArrowOpen": "B_Gxsq_dropdownArrowOpen",
|
|
5520
5594
|
"dropdownPanel": "B_Gxsq_dropdownPanel",
|
|
5521
|
-
"
|
|
5522
|
-
"
|
|
5595
|
+
"dropdownLabel": "B_Gxsq_dropdownLabel",
|
|
5596
|
+
"dropdownArrow": "B_Gxsq_dropdownArrow",
|
|
5597
|
+
"dropdownFill": "B_Gxsq_dropdownFill",
|
|
5598
|
+
"dropdownItemActive": "B_Gxsq_dropdownItemActive",
|
|
5523
5599
|
"dropdownItemLabel": "B_Gxsq_dropdownItemLabel",
|
|
5524
5600
|
"dropdownCountActive": "B_Gxsq_dropdownCountActive",
|
|
5525
|
-
"
|
|
5526
|
-
"
|
|
5601
|
+
"dropdown": "B_Gxsq_dropdown",
|
|
5602
|
+
"dropdownItem": "B_Gxsq_dropdownItem",
|
|
5603
|
+
"dropdownBtn": "B_Gxsq_dropdownBtn"
|
|
5527
5604
|
};
|
|
5528
5605
|
//#endregion
|
|
5529
5606
|
//#region \0dsh-css:src/client/styles/Toggle.module.css.mjs
|
|
@@ -5542,9 +5619,9 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
5542
5619
|
css: css$3
|
|
5543
5620
|
});
|
|
5544
5621
|
var Toggle_module_css_default = {
|
|
5545
|
-
"
|
|
5622
|
+
"toggle": "k-cD4G_toggle",
|
|
5546
5623
|
"knob": "k-cD4G_knob",
|
|
5547
|
-
"
|
|
5624
|
+
"toggleOn": "k-cD4G_toggleOn"
|
|
5548
5625
|
};
|
|
5549
5626
|
//#endregion
|
|
5550
5627
|
//#region src/client/components/ui/Toggle.tsx
|
|
@@ -5641,29 +5718,29 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
5641
5718
|
css: css$2
|
|
5642
5719
|
});
|
|
5643
5720
|
var DiagnosticsView_module_css_default = {
|
|
5644
|
-
"
|
|
5645
|
-
"envCopyBtn": "k9eRya_envCopyBtn",
|
|
5646
|
-
"panel": "k9eRya_panel",
|
|
5647
|
-
"envRow": "k9eRya_envRow",
|
|
5648
|
-
"envDesc": "k9eRya_envDesc",
|
|
5721
|
+
"meta": "k9eRya_meta",
|
|
5649
5722
|
"summaryRunning": "k9eRya_summaryRunning",
|
|
5723
|
+
"summaryOk": "k9eRya_summaryOk",
|
|
5650
5724
|
"row": "k9eRya_row",
|
|
5651
|
-
"
|
|
5652
|
-
"
|
|
5725
|
+
"summary": "k9eRya_summary",
|
|
5726
|
+
"badgeFail": "k9eRya_badgeFail",
|
|
5653
5727
|
"head": "k9eRya_head",
|
|
5654
|
-
"
|
|
5655
|
-
"
|
|
5728
|
+
"envRow": "k9eRya_envRow",
|
|
5729
|
+
"diagPulse": "k9eRya_diagPulse",
|
|
5656
5730
|
"runBtn": "k9eRya_runBtn",
|
|
5657
|
-
"
|
|
5658
|
-
"badgeIdle": "k9eRya_badgeIdle",
|
|
5659
|
-
"meta": "k9eRya_meta",
|
|
5731
|
+
"envTitle": "k9eRya_envTitle",
|
|
5660
5732
|
"envLabel": "k9eRya_envLabel",
|
|
5661
|
-
"
|
|
5662
|
-
"
|
|
5733
|
+
"envDesc": "k9eRya_envDesc",
|
|
5734
|
+
"headHint": "k9eRya_headHint",
|
|
5735
|
+
"envCopyBtn": "k9eRya_envCopyBtn",
|
|
5736
|
+
"display": "k9eRya_display",
|
|
5737
|
+
"badgeIdle": "k9eRya_badgeIdle",
|
|
5738
|
+
"badgeOk": "k9eRya_badgeOk",
|
|
5663
5739
|
"summaryFail": "k9eRya_summaryFail",
|
|
5664
|
-
"
|
|
5665
|
-
"
|
|
5666
|
-
"name": "k9eRya_name"
|
|
5740
|
+
"panel": "k9eRya_panel",
|
|
5741
|
+
"badgeRunning": "k9eRya_badgeRunning",
|
|
5742
|
+
"name": "k9eRya_name",
|
|
5743
|
+
"badge": "k9eRya_badge"
|
|
5667
5744
|
};
|
|
5668
5745
|
//#endregion
|
|
5669
5746
|
//#region src/client/components/views/DiagnosticsView.tsx
|
|
@@ -5838,57 +5915,57 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
5838
5915
|
css: css$1
|
|
5839
5916
|
});
|
|
5840
5917
|
var LogsView_module_css_default = {
|
|
5841
|
-
"
|
|
5842
|
-
"
|
|
5843
|
-
"
|
|
5844
|
-
"linkBtn": "_3j77BW_linkBtn",
|
|
5918
|
+
"footFail": "_3j77BW_footFail",
|
|
5919
|
+
"pathDialogHint": "_3j77BW_pathDialogHint",
|
|
5920
|
+
"message": "_3j77BW_message",
|
|
5845
5921
|
"pathDialogReset": "_3j77BW_pathDialogReset",
|
|
5846
|
-
"
|
|
5847
|
-
"
|
|
5922
|
+
"previewRow": "_3j77BW_previewRow",
|
|
5923
|
+
"moreEnd": "_3j77BW_moreEnd",
|
|
5924
|
+
"badgeSuccess": "_3j77BW_badgeSuccess",
|
|
5925
|
+
"entry": "_3j77BW_entry",
|
|
5848
5926
|
"searchInput": "_3j77BW_searchInput",
|
|
5849
|
-
"
|
|
5850
|
-
"
|
|
5851
|
-
"pathLabel": "_3j77BW_pathLabel",
|
|
5852
|
-
"clearBtn": "_3j77BW_clearBtn",
|
|
5853
|
-
"footFail": "_3j77BW_footFail",
|
|
5927
|
+
"more": "_3j77BW_more",
|
|
5928
|
+
"headHint": "_3j77BW_headHint",
|
|
5854
5929
|
"footPath": "_3j77BW_footPath",
|
|
5855
|
-
"footCount": "_3j77BW_footCount",
|
|
5856
|
-
"btn": "_3j77BW_btn",
|
|
5857
5930
|
"badgeError": "_3j77BW_badgeError",
|
|
5858
|
-
"
|
|
5859
|
-
"
|
|
5860
|
-
"
|
|
5931
|
+
"catUninstall": "_3j77BW_catUninstall",
|
|
5932
|
+
"headActions": "_3j77BW_headActions",
|
|
5933
|
+
"footCount": "_3j77BW_footCount",
|
|
5934
|
+
"clearBtn": "_3j77BW_clearBtn",
|
|
5861
5935
|
"filterChipActive": "_3j77BW_filterChipActive",
|
|
5862
|
-
"
|
|
5936
|
+
"badgeInfo": "_3j77BW_badgeInfo",
|
|
5937
|
+
"foot": "_3j77BW_foot",
|
|
5938
|
+
"catBadge": "_3j77BW_catBadge",
|
|
5939
|
+
"badge": "_3j77BW_badge",
|
|
5940
|
+
"time": "_3j77BW_time",
|
|
5941
|
+
"empty": "_3j77BW_empty",
|
|
5942
|
+
"pathDialogFoot": "_3j77BW_pathDialogFoot",
|
|
5943
|
+
"logList": "_3j77BW_logList",
|
|
5944
|
+
"list": "_3j77BW_list",
|
|
5863
5945
|
"pathDraft": "_3j77BW_pathDraft",
|
|
5864
|
-
"
|
|
5865
|
-
"entry": "_3j77BW_entry",
|
|
5866
|
-
"catInstall": "_3j77BW_catInstall",
|
|
5867
|
-
"pathDialog": "_3j77BW_pathDialog",
|
|
5868
|
-
"search": "_3j77BW_search",
|
|
5946
|
+
"pathDialogRow": "_3j77BW_pathDialogRow",
|
|
5869
5947
|
"head": "_3j77BW_head",
|
|
5870
|
-
"
|
|
5948
|
+
"badgeWarn": "_3j77BW_badgeWarn",
|
|
5949
|
+
"pathText": "_3j77BW_pathText",
|
|
5950
|
+
"search": "_3j77BW_search",
|
|
5951
|
+
"badgeDebug": "_3j77BW_badgeDebug",
|
|
5871
5952
|
"pathDialogDesc": "_3j77BW_pathDialogDesc",
|
|
5872
|
-
"
|
|
5953
|
+
"linkBtn": "_3j77BW_linkBtn",
|
|
5954
|
+
"catInstall": "_3j77BW_catInstall",
|
|
5955
|
+
"catUpdate": "_3j77BW_catUpdate",
|
|
5956
|
+
"catSettings": "_3j77BW_catSettings",
|
|
5957
|
+
"filterChip": "_3j77BW_filterChip",
|
|
5958
|
+
"footActions": "_3j77BW_footActions",
|
|
5959
|
+
"catDiagnostics": "_3j77BW_catDiagnostics",
|
|
5960
|
+
"pathDialog": "_3j77BW_pathDialog",
|
|
5873
5961
|
"event": "_3j77BW_event",
|
|
5962
|
+
"catSystem": "_3j77BW_catSystem",
|
|
5874
5963
|
"panel": "_3j77BW_panel",
|
|
5875
|
-
"
|
|
5876
|
-
"pathText": "_3j77BW_pathText",
|
|
5964
|
+
"pathLabel": "_3j77BW_pathLabel",
|
|
5877
5965
|
"filterBar": "_3j77BW_filterBar",
|
|
5878
|
-
"
|
|
5879
|
-
"foot": "_3j77BW_foot",
|
|
5880
|
-
"badgeWarn": "_3j77BW_badgeWarn",
|
|
5881
|
-
"pathDialogFoot": "_3j77BW_pathDialogFoot",
|
|
5882
|
-
"pathDialogHint": "_3j77BW_pathDialogHint",
|
|
5883
|
-
"badgeInfo": "_3j77BW_badgeInfo",
|
|
5884
|
-
"list": "_3j77BW_list",
|
|
5885
|
-
"time": "_3j77BW_time",
|
|
5886
|
-
"badgeSuccess": "_3j77BW_badgeSuccess",
|
|
5887
|
-
"catUninstall": "_3j77BW_catUninstall",
|
|
5888
|
-
"badge": "_3j77BW_badge",
|
|
5966
|
+
"btn": "_3j77BW_btn",
|
|
5889
5967
|
"actions": "_3j77BW_actions",
|
|
5890
|
-
"
|
|
5891
|
-
"catSystem": "_3j77BW_catSystem"
|
|
5968
|
+
"pathRow": "_3j77BW_pathRow"
|
|
5892
5969
|
};
|
|
5893
5970
|
//#endregion
|
|
5894
5971
|
//#region src/client/components/modals/LogsModal.tsx
|
|
@@ -6594,6 +6671,14 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
6594
6671
|
title: t("settingsMirror"),
|
|
6595
6672
|
className: `${SettingsView_module_css_default.controlDropdown} ${Dropdown_module_css_default.dropdownFill}`
|
|
6596
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
|
+
})
|
|
6597
6682
|
}), (0, react.createElement)(SettingRow, {
|
|
6598
6683
|
title: t("settingsProxy"),
|
|
6599
6684
|
desc: t("settingsProxyDesc"),
|
|
@@ -6719,6 +6804,9 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
6719
6804
|
const [confirmPlugin, setConfirmPlugin] = (0, react.useState)(null);
|
|
6720
6805
|
/** 弹窗动作是否为「更新」:已安装插件点「更新」→ 走同一条 add 命令原位覆盖重装,文案区分安装/更新 */
|
|
6721
6806
|
const [confirmIsUpdate, setConfirmIsUpdate] = (0, react.useState)(false);
|
|
6807
|
+
/** Hub 自我更新指定的精确版本:连续发版时提示的是「已过供应链门禁」的旧一版,
|
|
6808
|
+
* 安装必须钉在该版本上,否则又会被 @latest 带回门禁内的最新版。 */
|
|
6809
|
+
const [confirmPinVersion, setConfirmPinVersion] = (0, react.useState)(null);
|
|
6722
6810
|
/** 命令行安装确认弹窗:记录待安装的裸目标(npm 包名)——
|
|
6723
6811
|
* 与应用商店同一套确认/进度/结果弹窗,提供时 plugin 传 null 走 customTarget 模式 */
|
|
6724
6812
|
const [confirmCustomTarget, setConfirmCustomTarget] = (0, react.useState)(null);
|
|
@@ -7074,6 +7162,7 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
7074
7162
|
onInstall: (p, opts) => {
|
|
7075
7163
|
setInstallDone(false);
|
|
7076
7164
|
setConfirmIsUpdate(opts?.update ?? false);
|
|
7165
|
+
setConfirmPinVersion(null);
|
|
7077
7166
|
queue.clearModalTask();
|
|
7078
7167
|
setConfirmPlugin(p);
|
|
7079
7168
|
},
|
|
@@ -7099,6 +7188,7 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
7099
7188
|
setDetailItem(null);
|
|
7100
7189
|
setInstallDone(false);
|
|
7101
7190
|
setConfirmIsUpdate(true);
|
|
7191
|
+
setConfirmPinVersion(null);
|
|
7102
7192
|
queue.clearModalTask();
|
|
7103
7193
|
setConfirmPlugin(item.plugin);
|
|
7104
7194
|
},
|
|
@@ -7149,7 +7239,7 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
7149
7239
|
openSection: settingsSection,
|
|
7150
7240
|
onConsumedOpenSection: () => setSettingsSection(null)
|
|
7151
7241
|
}), showHubUpdate && (0, react.createElement)(HubUpdateModal, {
|
|
7152
|
-
info: catalog.hubUpdateInfo ?? { version: "2.0
|
|
7242
|
+
info: catalog.hubUpdateTarget ?? catalog.hubUpdateInfo ?? { version: "2.1.0" },
|
|
7153
7243
|
state: catalog.hubUpdateState,
|
|
7154
7244
|
currentVersion: catalog.hubCurrentVersion,
|
|
7155
7245
|
lang,
|
|
@@ -7160,6 +7250,7 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
7160
7250
|
if (hubEntry) {
|
|
7161
7251
|
setInstallDone(false);
|
|
7162
7252
|
setConfirmIsUpdate(true);
|
|
7253
|
+
setConfirmPinVersion(catalog.hubUpdateTarget?.version ?? null);
|
|
7163
7254
|
queue.clearModalTask();
|
|
7164
7255
|
setConfirmPlugin(hubEntry);
|
|
7165
7256
|
}
|
|
@@ -7191,6 +7282,7 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
7191
7282
|
setShowNotifications(false);
|
|
7192
7283
|
setInstallDone(false);
|
|
7193
7284
|
setConfirmIsUpdate(true);
|
|
7285
|
+
setConfirmPinVersion(null);
|
|
7194
7286
|
queue.clearModalTask();
|
|
7195
7287
|
setConfirmPlugin(plugin);
|
|
7196
7288
|
},
|
|
@@ -7249,7 +7341,10 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
|
|
|
7249
7341
|
if (reload) window.location.reload();
|
|
7250
7342
|
},
|
|
7251
7343
|
onCopy: () => copyCommand(confirmPlugin),
|
|
7252
|
-
onInstall: () => queue.installNow(confirmPlugin, confirmIsUpdate ? {
|
|
7344
|
+
onInstall: () => queue.installNow(confirmPlugin, confirmIsUpdate ? {
|
|
7345
|
+
update: true,
|
|
7346
|
+
pinVersion: confirmPinVersion ?? void 0
|
|
7347
|
+
} : void 0),
|
|
7253
7348
|
onRestart: () => setShowRestartConfirm(true)
|
|
7254
7349
|
}), confirmCustomTarget && (0, react.createElement)(InstallModal, {
|
|
7255
7350
|
plugin: null,
|