dsh-plugin 1.4.11 → 1.4.12

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/client/client.js CHANGED
@@ -698,42 +698,42 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
698
698
  css: css$11
699
699
  });
700
700
  var Header_module_css_default = {
701
- "logoIcon": "qikqja_logoIcon",
702
- "segBtn": "qikqja_segBtn",
701
+ "adArrow": "qikqja_adArrow",
703
702
  "aboutBtn": "qikqja_aboutBtn",
704
- "brandTitle": "qikqja_brandTitle",
705
- "versionBtn": "qikqja_versionBtn",
706
- "sortGroup": "qikqja_sortGroup",
707
- "segGroup": "qikqja_segGroup",
703
+ "copyIcon": "qikqja_copyIcon",
704
+ "segBtn": "qikqja_segBtn",
705
+ "header": "qikqja_header",
706
+ "version": "qikqja_version",
707
+ "logoIcon": "qikqja_logoIcon",
708
+ "headerRight": "qikqja_headerRight",
709
+ "adText": "qikqja_adText",
710
+ "githubIcon": "qikqja_githubIcon",
711
+ "taglineLink": "qikqja_taglineLink",
712
+ "resultSeg": "qikqja_resultSeg",
708
713
  "search": "qikqja_search",
709
- "tabCount": "qikqja_tabCount",
710
714
  "searchRow": "qikqja_searchRow",
711
- "githubIcon": "qikqja_githubIcon",
712
715
  "controls": "qikqja_controls",
713
- "headerRight": "qikqja_headerRight",
714
- "tab": "qikqja_tab",
715
- "langBtn": "qikqja_langBtn",
716
- "adBadge": "qikqja_adBadge",
716
+ "resultCount": "qikqja_resultCount",
717
717
  "segLabel": "qikqja_segLabel",
718
- "tabsRow": "qikqja_tabsRow",
719
- "adText": "qikqja_adText",
720
- "tagline": "qikqja_tagline",
718
+ "adBadge": "qikqja_adBadge",
719
+ "githubLink": "qikqja_githubLink",
721
720
  "headerTitleRow": "qikqja_headerTitleRow",
722
- "hubUpdateBadge": "qikqja_hubUpdateBadge",
723
- "adBanner": "qikqja_adBanner",
721
+ "sortGroup": "qikqja_sortGroup",
722
+ "tabActive": "qikqja_tabActive",
723
+ "segGroup": "qikqja_segGroup",
724
724
  "title": "qikqja_title",
725
- "adArrow": "qikqja_adArrow",
726
- "version": "qikqja_version",
725
+ "tagline": "qikqja_tagline",
726
+ "tabsRow": "qikqja_tabsRow",
727
727
  "root": "qikqja_root",
728
+ "langBtn": "qikqja_langBtn",
729
+ "versionBtn": "qikqja_versionBtn",
730
+ "segBtnActive": "qikqja_segBtnActive",
731
+ "adBanner": "qikqja_adBanner",
732
+ "brandTitle": "qikqja_brandTitle",
728
733
  "tabs": "qikqja_tabs",
729
- "tabActive": "qikqja_tabActive",
730
- "resultCount": "qikqja_resultCount",
731
- "taglineLink": "qikqja_taglineLink",
732
- "githubLink": "qikqja_githubLink",
733
- "header": "qikqja_header",
734
- "copyIcon": "qikqja_copyIcon",
735
- "resultSeg": "qikqja_resultSeg",
736
- "segBtnActive": "qikqja_segBtnActive"
734
+ "hubUpdateBadge": "qikqja_hubUpdateBadge",
735
+ "tab": "qikqja_tab",
736
+ "tabCount": "qikqja_tabCount"
737
737
  };
738
738
  //#endregion
739
739
  //#region \0dsh-css:src/client/styles/Modal.module.css.mjs
@@ -752,136 +752,136 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
752
752
  css: css$10
753
753
  });
754
754
  var Modal_module_css_default = {
755
- "detailStatusPending": "BiQ1zG_detailStatusPending",
756
- "modalCmd": "BiQ1zG_modalCmd",
757
- "progressTrack": "BiQ1zG_progressTrack",
758
- "modalCancel": "BiQ1zG_modalCancel",
759
- "linkIcon": "BiQ1zG_linkIcon",
760
- "errorHint": "BiQ1zG_errorHint",
761
- "noticeMain": "BiQ1zG_noticeMain",
762
- "noticeRemove": "BiQ1zG_noticeRemove",
763
- "uninstallConfirm": "BiQ1zG_uninstallConfirm",
764
- "detailStatusText": "BiQ1zG_detailStatusText",
765
- "failRow": "BiQ1zG_failRow",
766
- "detailGrid": "BiQ1zG_detailGrid",
767
- "confirmIconDanger": "BiQ1zG_confirmIconDanger",
768
- "queueRowBody": "BiQ1zG_queueRowBody",
769
- "noticeFoot": "BiQ1zG_noticeFoot",
770
- "noticeHead": "BiQ1zG_noticeHead",
755
+ "detailPath": "BiQ1zG_detailPath",
756
+ "overlay": "BiQ1zG_overlay",
757
+ "queueRowDesc": "BiQ1zG_queueRowDesc",
758
+ "confirmIcon": "BiQ1zG_confirmIcon",
759
+ "resultDesc": "BiQ1zG_resultDesc",
771
760
  "queueSection": "BiQ1zG_queueSection",
761
+ "modalLabel": "BiQ1zG_modalLabel",
762
+ "resultRestarting": "BiQ1zG_resultRestarting",
763
+ "restartLater": "BiQ1zG_restartLater",
764
+ "restartNowWarning": "BiQ1zG_restartNowWarning",
765
+ "resultCheck": "BiQ1zG_resultCheck",
766
+ "queueSectionTitle": "BiQ1zG_queueSectionTitle",
767
+ "noticeRowOk": "BiQ1zG_noticeRowOk",
768
+ "noticeRowUpdate": "BiQ1zG_noticeRowUpdate",
769
+ "failPrepareHint": "BiQ1zG_failPrepareHint",
770
+ "detailValue": "BiQ1zG_detailValue",
771
+ "failCopy": "BiQ1zG_failCopy",
772
+ "modalCopy": "BiQ1zG_modalCopy",
773
+ "modalClose": "BiQ1zG_modalClose",
774
+ "modalIn": "BiQ1zG_modalIn",
775
+ "queueRowTarget": "BiQ1zG_queueRowTarget",
772
776
  "restartNow": "BiQ1zG_restartNow",
773
- "detailStatusRunning": "BiQ1zG_detailStatusRunning",
777
+ "hubUpdateMetaItem": "BiQ1zG_hubUpdateMetaItem",
778
+ "detailGrid": "BiQ1zG_detailGrid",
779
+ "toastFail": "BiQ1zG_toastFail",
780
+ "progressText": "BiQ1zG_progressText",
774
781
  "detailPathText": "BiQ1zG_detailPathText",
775
- "queueRowTrack": "BiQ1zG_queueRowTrack",
776
- "noticeTextOk": "BiQ1zG_noticeTextOk",
777
782
  "failEmpty": "BiQ1zG_failEmpty",
783
+ "failKindInstall": "BiQ1zG_failKindInstall",
784
+ "pendingRowActions": "BiQ1zG_pendingRowActions",
785
+ "noticeBadgeFail": "BiQ1zG_noticeBadgeFail",
786
+ "noticeHead": "BiQ1zG_noticeHead",
787
+ "modalTitleQueued": "BiQ1zG_modalTitleQueued",
778
788
  "modalActions": "BiQ1zG_modalActions",
779
- "noticeRowOk": "BiQ1zG_noticeRowOk",
780
- "noticeRowMain": "BiQ1zG_noticeRowMain",
781
- "failNetworkTarget": "BiQ1zG_failNetworkTarget",
782
- "restartLater": "BiQ1zG_restartLater",
783
- "dangerConfirm": "BiQ1zG_dangerConfirm",
784
- "hubUpdateModal": "BiQ1zG_hubUpdateModal",
785
- "pendingRowStatus": "BiQ1zG_pendingRowStatus",
786
- "modalIn": "BiQ1zG_modalIn",
787
- "resultCheckIcon": "BiQ1zG_resultCheckIcon",
788
- "modalTitleBusy": "BiQ1zG_modalTitleBusy",
789
- "modalInstall": "BiQ1zG_modalInstall",
790
- "failBigIssue": "BiQ1zG_failBigIssue",
791
- "aboutModal": "BiQ1zG_aboutModal",
792
- "detailLink": "BiQ1zG_detailLink",
793
- "noticeBadgeIcon": "BiQ1zG_noticeBadgeIcon",
794
- "modalCmdCopy": "BiQ1zG_modalCmdCopy",
789
+ "progressFill": "BiQ1zG_progressFill",
790
+ "noticeIgnore": "BiQ1zG_noticeIgnore",
791
+ "cliOnlyHint": "BiQ1zG_cliOnlyHint",
792
+ "detailStatusPending": "BiQ1zG_detailStatusPending",
793
+ "modalCmd": "BiQ1zG_modalCmd",
795
794
  "queueRowPct": "BiQ1zG_queueRowPct",
796
- "modalValue": "BiQ1zG_modalValue",
797
- "failList": "BiQ1zG_failList",
798
- "modalBody": "BiQ1zG_modalBody",
799
- "helpModal": "BiQ1zG_helpModal",
800
- "detailDim": "BiQ1zG_detailDim",
801
- "failedCopyHint": "BiQ1zG_failedCopyHint",
802
- "errorCopySoft": "BiQ1zG_errorCopySoft",
803
- "modalHead": "BiQ1zG_modalHead",
804
- "queuedHint": "BiQ1zG_queuedHint",
805
- "hubUpdateMetaItem": "BiQ1zG_hubUpdateMetaItem",
806
- "failKind": "BiQ1zG_failKind",
807
- "modalCopy": "BiQ1zG_modalCopy",
808
- "confirmPrimary": "BiQ1zG_confirmPrimary",
809
- "failRepo": "BiQ1zG_failRepo",
810
- "overlayIn": "BiQ1zG_overlayIn",
811
- "result": "BiQ1zG_result",
812
- "detailModal": "BiQ1zG_detailModal",
813
- "detailLabel": "BiQ1zG_detailLabel",
814
- "modalCloseIcon": "BiQ1zG_modalCloseIcon",
815
- "modalLabel": "BiQ1zG_modalLabel",
816
- "aboutContent": "BiQ1zG_aboutContent",
817
- "toastIn": "BiQ1zG_toastIn",
818
- "failKindInstall": "BiQ1zG_failKindInstall",
819
795
  "progress": "BiQ1zG_progress",
820
- "confirmIcon": "BiQ1zG_confirmIcon",
796
+ "uninstallConfirm": "BiQ1zG_uninstallConfirm",
797
+ "noticeUpdateGo": "BiQ1zG_noticeUpdateGo",
798
+ "noticeTextFail": "BiQ1zG_noticeTextFail",
799
+ "aboutModal": "BiQ1zG_aboutModal",
821
800
  "failKindUninstall": "BiQ1zG_failKindUninstall",
801
+ "modalRow": "BiQ1zG_modalRow",
802
+ "queueRowHead": "BiQ1zG_queueRowHead",
822
803
  "failHead": "BiQ1zG_failHead",
823
- "restartNowWarning": "BiQ1zG_restartNowWarning",
824
- "progressText": "BiQ1zG_progressText",
825
- "modalTitleQueued": "BiQ1zG_modalTitleQueued",
826
- "failClear": "BiQ1zG_failClear",
827
- "resultDesc": "BiQ1zG_resultDesc",
804
+ "detailModal": "BiQ1zG_detailModal",
805
+ "modalTitleBusy": "BiQ1zG_modalTitleBusy",
806
+ "modalCloseIcon": "BiQ1zG_modalCloseIcon",
807
+ "toastIn": "BiQ1zG_toastIn",
808
+ "hubUpdateMeta": "BiQ1zG_hubUpdateMeta",
809
+ "modal": "BiQ1zG_modal",
810
+ "detailDim": "BiQ1zG_detailDim",
811
+ "modalCmdCopy": "BiQ1zG_modalCmdCopy",
812
+ "detailStatusRunning": "BiQ1zG_detailStatusRunning",
813
+ "errorModal": "BiQ1zG_errorModal",
814
+ "modalTitle": "BiQ1zG_modalTitle",
815
+ "overlayIn": "BiQ1zG_overlayIn",
816
+ "failedCopyHint": "BiQ1zG_failedCopyHint",
817
+ "errorHint": "BiQ1zG_errorHint",
818
+ "progressFillFail": "BiQ1zG_progressFillFail",
819
+ "failBigIssue": "BiQ1zG_failBigIssue",
820
+ "aboutContent": "BiQ1zG_aboutContent",
821
+ "queueRowTrack": "BiQ1zG_queueRowTrack",
822
+ "pendingRowStatus": "BiQ1zG_pendingRowStatus",
823
+ "detailStars": "BiQ1zG_detailStars",
824
+ "detailArrow": "BiQ1zG_detailArrow",
825
+ "queuedHint": "BiQ1zG_queuedHint",
826
+ "progressHead": "BiQ1zG_progressHead",
827
+ "errorTitle": "BiQ1zG_errorTitle",
828
+ "confirmIconDanger": "BiQ1zG_confirmIconDanger",
828
829
  "queueRowStatus": "BiQ1zG_queueRowStatus",
829
- "detailPath": "BiQ1zG_detailPath",
830
- "noticeRowUpdate": "BiQ1zG_noticeRowUpdate",
830
+ "modalWide": "BiQ1zG_modalWide",
831
+ "linkIcon": "BiQ1zG_linkIcon",
832
+ "failClear": "BiQ1zG_failClear",
833
+ "detailLink": "BiQ1zG_detailLink",
834
+ "logModal": "BiQ1zG_logModal",
835
+ "failList": "BiQ1zG_failList",
836
+ "noticeBadgeIcon": "BiQ1zG_noticeBadgeIcon",
837
+ "aboutMeta": "BiQ1zG_aboutMeta",
838
+ "queueRow": "BiQ1zG_queueRow",
839
+ "modalCancel": "BiQ1zG_modalCancel",
840
+ "noticeRowMain": "BiQ1zG_noticeRowMain",
841
+ "hubUpdateNotes": "BiQ1zG_hubUpdateNotes",
842
+ "noticeVersion": "BiQ1zG_noticeVersion",
843
+ "noticeFoot": "BiQ1zG_noticeFoot",
831
844
  "trustHint": "BiQ1zG_trustHint",
832
- "noticeIgnore": "BiQ1zG_noticeIgnore",
845
+ "failRow": "BiQ1zG_failRow",
846
+ "resultTitle": "BiQ1zG_resultTitle",
847
+ "errorCopySoft": "BiQ1zG_errorCopySoft",
848
+ "detailPathBtn": "BiQ1zG_detailPathBtn",
833
849
  "noticeTime": "BiQ1zG_noticeTime",
834
- "noticeVersion": "BiQ1zG_noticeVersion",
835
- "queueRowHead": "BiQ1zG_queueRowHead",
836
- "modalRow": "BiQ1zG_modalRow",
837
- "cliOnlyHint": "BiQ1zG_cliOnlyHint",
850
+ "noticeMain": "BiQ1zG_noticeMain",
851
+ "modalInstall": "BiQ1zG_modalInstall",
838
852
  "noticeRow": "BiQ1zG_noticeRow",
839
- "detailPathActions": "BiQ1zG_detailPathActions",
840
- "stripCancel": "BiQ1zG_stripCancel",
853
+ "detailLabel": "BiQ1zG_detailLabel",
854
+ "noticeTextOk": "BiQ1zG_noticeTextOk",
841
855
  "failDiagBtn": "BiQ1zG_failDiagBtn",
842
- "confirmIconWrap": "BiQ1zG_confirmIconWrap",
843
- "errorBox": "BiQ1zG_errorBox",
844
- "detailRow": "BiQ1zG_detailRow",
845
- "queueRowTarget": "BiQ1zG_queueRowTarget",
846
- "noticeTextFail": "BiQ1zG_noticeTextFail",
847
- "detailValue": "BiQ1zG_detailValue",
848
- "detailArrow": "BiQ1zG_detailArrow",
849
- "resultCheck": "BiQ1zG_resultCheck",
850
- "modalClose": "BiQ1zG_modalClose",
851
- "hubUpdateMeta": "BiQ1zG_hubUpdateMeta",
852
- "modalTitle": "BiQ1zG_modalTitle",
856
+ "failRepo": "BiQ1zG_failRepo",
857
+ "detailPathActions": "BiQ1zG_detailPathActions",
858
+ "progressTrack": "BiQ1zG_progressTrack",
853
859
  "modalCmdText": "BiQ1zG_modalCmdText",
854
- "progressFill": "BiQ1zG_progressFill",
855
- "failCopy": "BiQ1zG_failCopy",
856
- "noticeBadgeOk": "BiQ1zG_noticeBadgeOk",
860
+ "confirmIconWrap": "BiQ1zG_confirmIconWrap",
857
861
  "modalDesc": "BiQ1zG_modalDesc",
858
- "modalLink": "BiQ1zG_modalLink",
859
- "toastFail": "BiQ1zG_toastFail",
860
- "noticeUpdateGo": "BiQ1zG_noticeUpdateGo",
861
- "progressHead": "BiQ1zG_progressHead",
862
- "failPrepareHint": "BiQ1zG_failPrepareHint",
863
- "modal": "BiQ1zG_modal",
864
- "detailMono": "BiQ1zG_detailMono",
865
- "modalWide": "BiQ1zG_modalWide",
866
- "detailPathBtn": "BiQ1zG_detailPathBtn",
867
- "queueRow": "BiQ1zG_queueRow",
868
- "queueSectionTitle": "BiQ1zG_queueSectionTitle",
869
- "overlay": "BiQ1zG_overlay",
870
- "pendingRowActions": "BiQ1zG_pendingRowActions",
871
- "errorModal": "BiQ1zG_errorModal",
872
- "errorTitle": "BiQ1zG_errorTitle",
873
- "noticeBadgeFail": "BiQ1zG_noticeBadgeFail",
874
- "queueRowDesc": "BiQ1zG_queueRowDesc",
875
- "progressFillFail": "BiQ1zG_progressFillFail",
876
- "resultTitle": "BiQ1zG_resultTitle",
877
- "detailUpdateHint": "BiQ1zG_detailUpdateHint",
878
- "hubUpdateNotes": "BiQ1zG_hubUpdateNotes",
879
- "logModal": "BiQ1zG_logModal",
862
+ "queueRowBody": "BiQ1zG_queueRowBody",
863
+ "failNetworkTarget": "BiQ1zG_failNetworkTarget",
864
+ "hubUpdateModal": "BiQ1zG_hubUpdateModal",
865
+ "detailRow": "BiQ1zG_detailRow",
866
+ "errorBox": "BiQ1zG_errorBox",
867
+ "stripCancel": "BiQ1zG_stripCancel",
868
+ "modalValue": "BiQ1zG_modalValue",
869
+ "helpModal": "BiQ1zG_helpModal",
880
870
  "toast": "BiQ1zG_toast",
881
- "resultRestarting": "BiQ1zG_resultRestarting",
882
- "detailStars": "BiQ1zG_detailStars",
883
871
  "noticeList": "BiQ1zG_noticeList",
884
- "aboutMeta": "BiQ1zG_aboutMeta"
872
+ "dangerConfirm": "BiQ1zG_dangerConfirm",
873
+ "modalBody": "BiQ1zG_modalBody",
874
+ "detailMono": "BiQ1zG_detailMono",
875
+ "resultCheckIcon": "BiQ1zG_resultCheckIcon",
876
+ "modalHead": "BiQ1zG_modalHead",
877
+ "detailUpdateHint": "BiQ1zG_detailUpdateHint",
878
+ "failKind": "BiQ1zG_failKind",
879
+ "noticeBadgeOk": "BiQ1zG_noticeBadgeOk",
880
+ "noticeRemove": "BiQ1zG_noticeRemove",
881
+ "detailStatusText": "BiQ1zG_detailStatusText",
882
+ "confirmPrimary": "BiQ1zG_confirmPrimary",
883
+ "result": "BiQ1zG_result",
884
+ "modalLink": "BiQ1zG_modalLink"
885
885
  };
886
886
  //#endregion
887
887
  //#region src/client/logic/install-command.ts
@@ -951,7 +951,7 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
951
951
  * tsdown 构建时用 define 把 __PLUGIN_VERSION__ 替换成 package.json 的版本号;
952
952
  * node --test 直接 import 本模块时该标识符不存在,typeof 守卫兜底为空串。
953
953
  */
954
- const PLUGIN_VERSION = "1.4.11";
954
+ const PLUGIN_VERSION = "1.4.12";
955
955
  const CATEGORY_ORDER = [
956
956
  "interface",
957
957
  "session",
@@ -1588,7 +1588,7 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
1588
1588
  */
1589
1589
  const hubHasUpdate = (() => {
1590
1590
  if (!hubUpdateInfo) return false;
1591
- if (hubUpdateInfo.version === "1.4.11") return false;
1591
+ if (hubUpdateInfo.version === "1.4.12") return false;
1592
1592
  const publishedAt = hubUpdateInfo.publishedAt;
1593
1593
  if (publishedAt) {
1594
1594
  const publishedMs = Date.parse(publishedAt);
@@ -4167,40 +4167,40 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
4167
4167
  css: css$9
4168
4168
  });
4169
4169
  var List_module_css_default = {
4170
- "date": "_3XaZHa_date",
4171
- "installBtnInstalled": "_3XaZHa_installBtnInstalled",
4172
- "fork": "_3XaZHa_fork",
4173
- "stateDesc": "_3XaZHa_stateDesc",
4174
- "cardMain": "_3XaZHa_cardMain",
4175
- "cardHead": "_3XaZHa_cardHead",
4176
- "diagBtn": "_3XaZHa_diagBtn",
4177
- "star": "_3XaZHa_star",
4178
- "verified": "_3XaZHa_verified",
4179
- "categoryBadge": "_3XaZHa_categoryBadge",
4180
- "versionBadge": "_3XaZHa_versionBadge",
4181
4170
  "state": "_3XaZHa_state",
4182
- "actions": "_3XaZHa_actions",
4183
- "cardTitle": "_3XaZHa_cardTitle",
4184
- "topics": "_3XaZHa_topics",
4185
- "moreSentinel": "_3XaZHa_moreSentinel",
4186
4171
  "desc": "_3XaZHa_desc",
4172
+ "stats": "_3XaZHa_stats",
4173
+ "star": "_3XaZHa_star",
4174
+ "cardTitle": "_3XaZHa_cardTitle",
4175
+ "stateActions": "_3XaZHa_stateActions",
4187
4176
  "uninstallBtn": "_3XaZHa_uninstallBtn",
4188
- "detailBtn": "_3XaZHa_detailBtn",
4177
+ "body": "_3XaZHa_body",
4178
+ "categoryBadge": "_3XaZHa_categoryBadge",
4179
+ "fork": "_3XaZHa_fork",
4180
+ "actions": "_3XaZHa_actions",
4189
4181
  "retryBtn": "_3XaZHa_retryBtn",
4190
- "footer": "_3XaZHa_footer",
4182
+ "footLink": "_3XaZHa_footLink",
4183
+ "installBtnUpdate": "_3XaZHa_installBtnUpdate",
4191
4184
  "list": "_3XaZHa_list",
4192
- "installBtn": "_3XaZHa_installBtn",
4193
- "cardSide": "_3XaZHa_cardSide",
4194
- "topic": "_3XaZHa_topic",
4195
- "body": "_3XaZHa_body",
4196
- "stateTitle": "_3XaZHa_stateTitle",
4197
4185
  "card": "_3XaZHa_card",
4198
- "stats": "_3XaZHa_stats",
4199
- "stateActions": "_3XaZHa_stateActions",
4186
+ "cardMain": "_3XaZHa_cardMain",
4187
+ "versionBadge": "_3XaZHa_versionBadge",
4188
+ "stateTitle": "_3XaZHa_stateTitle",
4189
+ "date": "_3XaZHa_date",
4190
+ "installBtn": "_3XaZHa_installBtn",
4191
+ "detailBtn": "_3XaZHa_detailBtn",
4200
4192
  "updateBadge": "_3XaZHa_updateBadge",
4193
+ "topic": "_3XaZHa_topic",
4194
+ "cardSide": "_3XaZHa_cardSide",
4195
+ "footer": "_3XaZHa_footer",
4196
+ "verified": "_3XaZHa_verified",
4197
+ "stateDesc": "_3XaZHa_stateDesc",
4198
+ "cardHead": "_3XaZHa_cardHead",
4201
4199
  "installBtnCopied": "_3XaZHa_installBtnCopied",
4202
- "footLink": "_3XaZHa_footLink",
4203
- "installBtnUpdate": "_3XaZHa_installBtnUpdate"
4200
+ "diagBtn": "_3XaZHa_diagBtn",
4201
+ "topics": "_3XaZHa_topics",
4202
+ "moreSentinel": "_3XaZHa_moreSentinel",
4203
+ "installBtnInstalled": "_3XaZHa_installBtnInstalled"
4204
4204
  };
4205
4205
  //#endregion
4206
4206
  //#region src/client/hooks/useIncrementalList.ts
@@ -4407,15 +4407,15 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
4407
4407
  css: css$8
4408
4408
  });
4409
4409
  var SectionTabs_module_css_default = {
4410
- "tabCountActive": "_7tvizq_tabCountActive",
4411
- "noticeCount": "_7tvizq_noticeCount",
4412
- "noticeIcon": "_7tvizq_noticeIcon",
4413
4410
  "noticeBtn": "_7tvizq_noticeBtn",
4414
- "tabCount": "_7tvizq_tabCount",
4415
4411
  "tabIcon": "_7tvizq_tabIcon",
4416
- "tabActive": "_7tvizq_tabActive",
4412
+ "tabCountActive": "_7tvizq_tabCountActive",
4413
+ "noticeCount": "_7tvizq_noticeCount",
4417
4414
  "root": "_7tvizq_root",
4418
- "tab": "_7tvizq_tab"
4415
+ "tab": "_7tvizq_tab",
4416
+ "tabActive": "_7tvizq_tabActive",
4417
+ "tabCount": "_7tvizq_tabCount",
4418
+ "noticeIcon": "_7tvizq_noticeIcon"
4419
4419
  };
4420
4420
  //#endregion
4421
4421
  //#region src/client/components/layout/SectionTabs.tsx
@@ -4492,42 +4492,42 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
4492
4492
  css: css$7
4493
4493
  });
4494
4494
  var InstalledView_module_css_default = {
4495
- "updateBadge": "_1nXeGW_updateBadge",
4496
- "rowDetail": "_1nXeGW_rowDetail",
4497
- "toolbar": "_1nXeGW_toolbar",
4498
- "rowDesc": "_1nXeGW_rowDesc",
4499
- "rowUninstall": "_1nXeGW_rowUninstall",
4500
- "rowSourceTag": "_1nXeGW_rowSourceTag",
4501
- "segLabel": "_1nXeGW_segLabel",
4502
- "rowUpdate": "_1nXeGW_rowUpdate",
4503
- "statusInactive": "_1nXeGW_statusInactive",
4495
+ "rowTitle": "_1nXeGW_rowTitle",
4504
4496
  "segRow": "_1nXeGW_segRow",
4505
- "rowMain": "_1nXeGW_rowMain",
4506
- "exampleBadge": "_1nXeGW_exampleBadge",
4497
+ "segLabel": "_1nXeGW_segLabel",
4507
4498
  "segGroup": "_1nXeGW_segGroup",
4508
- "searchInput": "_1nXeGW_searchInput",
4509
- "segBtn": "_1nXeGW_segBtn",
4510
- "rowRepo": "_1nXeGW_rowRepo",
4511
- "emptyTitle": "_1nXeGW_emptyTitle",
4512
- "versionBadge": "_1nXeGW_versionBadge",
4513
- "rowRestart": "_1nXeGW_rowRestart",
4514
- "statusDot": "_1nXeGW_statusDot",
4515
- "empty": "_1nXeGW_empty",
4516
- "root": "_1nXeGW_root",
4517
- "segBtnActive": "_1nXeGW_segBtnActive",
4499
+ "rowUninstall": "_1nXeGW_rowUninstall",
4500
+ "rowMeta": "_1nXeGW_rowMeta",
4501
+ "rowSourceTagManual": "_1nXeGW_rowSourceTagManual",
4502
+ "list": "_1nXeGW_list",
4518
4503
  "rowTitleLine": "_1nXeGW_rowTitleLine",
4504
+ "exampleRow": "_1nXeGW_exampleRow",
4505
+ "rowSourceTag": "_1nXeGW_rowSourceTag",
4519
4506
  "statusPending": "_1nXeGW_statusPending",
4520
4507
  "rowSourceTagHub": "_1nXeGW_rowSourceTagHub",
4521
- "exampleRow": "_1nXeGW_exampleRow",
4508
+ "segBtnActive": "_1nXeGW_segBtnActive",
4509
+ "rowDesc": "_1nXeGW_rowDesc",
4510
+ "versionBadge": "_1nXeGW_versionBadge",
4511
+ "segBtn": "_1nXeGW_segBtn",
4522
4512
  "rowActions": "_1nXeGW_rowActions",
4513
+ "rowDetail": "_1nXeGW_rowDetail",
4514
+ "rowRestart": "_1nXeGW_rowRestart",
4515
+ "toolbar": "_1nXeGW_toolbar",
4516
+ "updateBadge": "_1nXeGW_updateBadge",
4517
+ "rowCategory": "_1nXeGW_rowCategory",
4518
+ "statusInactive": "_1nXeGW_statusInactive",
4523
4519
  "searchWrap": "_1nXeGW_searchWrap",
4524
- "rowMeta": "_1nXeGW_rowMeta",
4525
- "list": "_1nXeGW_list",
4526
- "rowTitle": "_1nXeGW_rowTitle",
4527
- "emptyDesc": "_1nXeGW_emptyDesc",
4520
+ "rowMain": "_1nXeGW_rowMain",
4521
+ "rowUpdate": "_1nXeGW_rowUpdate",
4522
+ "statusDot": "_1nXeGW_statusDot",
4523
+ "empty": "_1nXeGW_empty",
4524
+ "emptyTitle": "_1nXeGW_emptyTitle",
4525
+ "rowRepo": "_1nXeGW_rowRepo",
4526
+ "exampleBadge": "_1nXeGW_exampleBadge",
4528
4527
  "row": "_1nXeGW_row",
4529
- "rowSourceTagManual": "_1nXeGW_rowSourceTagManual",
4530
- "rowCategory": "_1nXeGW_rowCategory"
4528
+ "emptyDesc": "_1nXeGW_emptyDesc",
4529
+ "root": "_1nXeGW_root",
4530
+ "searchInput": "_1nXeGW_searchInput"
4531
4531
  };
4532
4532
  //#endregion
4533
4533
  //#region src/client/components/views/InstalledView.tsx
@@ -4773,28 +4773,28 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
4773
4773
  css: css$6
4774
4774
  });
4775
4775
  var CustomInstallView_module_css_default = {
4776
+ "helpNote": "zISxCG_helpNote",
4777
+ "installCards": "zISxCG_installCards",
4778
+ "installInsertBtn": "zISxCG_installInsertBtn",
4779
+ "installInput": "zISxCG_installInput",
4780
+ "installInputError": "zISxCG_installInputError",
4781
+ "installBtn": "zISxCG_installBtn",
4782
+ "installCard": "zISxCG_installCard",
4783
+ "channelOffText": "zISxCG_channelOffText",
4784
+ "installError": "zISxCG_installError",
4776
4785
  "helpCmd": "zISxCG_helpCmd",
4777
- "installExample": "zISxCG_installExample",
4786
+ "channelOff": "zISxCG_channelOff",
4778
4787
  "installHelpBtn": "zISxCG_installHelpBtn",
4779
4788
  "desc": "zISxCG_desc",
4780
- "channelOffText": "zISxCG_channelOffText",
4781
- "installInsertBtn": "zISxCG_installInsertBtn",
4782
- "root": "zISxCG_root",
4783
- "installCardHead": "zISxCG_installCardHead",
4784
- "installInputError": "zISxCG_installInputError",
4785
- "installRow": "zISxCG_installRow",
4786
- "installCardDisabled": "zISxCG_installCardDisabled",
4787
- "installInput": "zISxCG_installInput",
4788
- "channelOffBtn": "zISxCG_channelOffBtn",
4789
4789
  "installLabel": "zISxCG_installLabel",
4790
+ "channelOffBtn": "zISxCG_channelOffBtn",
4790
4791
  "helpBody": "zISxCG_helpBody",
4791
- "installError": "zISxCG_installError",
4792
- "helpNote": "zISxCG_helpNote",
4793
- "installCard": "zISxCG_installCard",
4792
+ "installExample": "zISxCG_installExample",
4794
4793
  "helpLine": "zISxCG_helpLine",
4795
- "channelOff": "zISxCG_channelOff",
4796
- "installCards": "zISxCG_installCards",
4797
- "installBtn": "zISxCG_installBtn"
4794
+ "root": "zISxCG_root",
4795
+ "installRow": "zISxCG_installRow",
4796
+ "installCardHead": "zISxCG_installCardHead",
4797
+ "installCardDisabled": "zISxCG_installCardDisabled"
4798
4798
  };
4799
4799
  //#endregion
4800
4800
  //#region src/client/components/views/CustomInstallView.tsx
@@ -5085,29 +5085,29 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
5085
5085
  });
5086
5086
  var SettingsView_module_css_default = {
5087
5087
  "settingLabel": "_506LLG_settingLabel",
5088
- "settingRowStack": "_506LLG_settingRowStack",
5089
5088
  "navIcon": "_506LLG_navIcon",
5090
- "proxyHintFail": "_506LLG_proxyHintFail",
5091
- "pageTitle": "_506LLG_pageTitle",
5092
- "settingControlStack": "_506LLG_settingControlStack",
5093
- "controlDropdown": "_506LLG_controlDropdown",
5094
- "settingTitle": "_506LLG_settingTitle",
5089
+ "navItem": "_506LLG_navItem",
5095
5090
  "navItemActive": "_506LLG_navItemActive",
5096
- "pageHeader": "_506LLG_pageHeader",
5091
+ "content": "_506LLG_content",
5097
5092
  "card": "_506LLG_card",
5098
- "root": "_506LLG_root",
5099
- "textInput": "_506LLG_textInput",
5100
- "proxyControl": "_506LLG_proxyControl",
5093
+ "settingControlStack": "_506LLG_settingControlStack",
5094
+ "proxyHint": "_506LLG_proxyHint",
5095
+ "proxyHintFail": "_506LLG_proxyHintFail",
5096
+ "pageHeader": "_506LLG_pageHeader",
5097
+ "settingTitle": "_506LLG_settingTitle",
5098
+ "pageTitle": "_506LLG_pageTitle",
5101
5099
  "sidebar": "_506LLG_sidebar",
5102
- "proxyHintOk": "_506LLG_proxyHintOk",
5103
5100
  "settingDesc": "_506LLG_settingDesc",
5104
- "proxyHint": "_506LLG_proxyHint",
5105
- "content": "_506LLG_content",
5106
- "resetBtn": "_506LLG_resetBtn",
5107
- "settingRow": "_506LLG_settingRow",
5108
5101
  "settingControl": "_506LLG_settingControl",
5102
+ "proxyControl": "_506LLG_proxyControl",
5103
+ "proxyHintOk": "_506LLG_proxyHintOk",
5104
+ "resetBtn": "_506LLG_resetBtn",
5109
5105
  "pageDesc": "_506LLG_pageDesc",
5110
- "navItem": "_506LLG_navItem"
5106
+ "textInput": "_506LLG_textInput",
5107
+ "settingRow": "_506LLG_settingRow",
5108
+ "settingRowStack": "_506LLG_settingRowStack",
5109
+ "controlDropdown": "_506LLG_controlDropdown",
5110
+ "root": "_506LLG_root"
5111
5111
  };
5112
5112
  //#endregion
5113
5113
  //#region \0dsh-css:src/client/styles/Dropdown.module.css.mjs
@@ -5126,18 +5126,18 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
5126
5126
  css: css$4
5127
5127
  });
5128
5128
  var Dropdown_module_css_default = {
5129
- "dropdownArrowOpen": "B_Gxsq_dropdownArrowOpen",
5130
5129
  "dropdownLabel": "B_Gxsq_dropdownLabel",
5131
- "dropdownCount": "B_Gxsq_dropdownCount",
5130
+ "dropdownItemActive": "B_Gxsq_dropdownItemActive",
5131
+ "dropdownArrowOpen": "B_Gxsq_dropdownArrowOpen",
5132
+ "dropdownBtn": "B_Gxsq_dropdownBtn",
5133
+ "dropdownArrow": "B_Gxsq_dropdownArrow",
5132
5134
  "dropdownFill": "B_Gxsq_dropdownFill",
5133
- "dropdown": "B_Gxsq_dropdown",
5134
- "dropdownPanel": "B_Gxsq_dropdownPanel",
5135
+ "dropdownItem": "B_Gxsq_dropdownItem",
5135
5136
  "dropdownItemLabel": "B_Gxsq_dropdownItemLabel",
5137
+ "dropdownPanel": "B_Gxsq_dropdownPanel",
5138
+ "dropdownCount": "B_Gxsq_dropdownCount",
5136
5139
  "dropdownCountActive": "B_Gxsq_dropdownCountActive",
5137
- "dropdownArrow": "B_Gxsq_dropdownArrow",
5138
- "dropdownBtn": "B_Gxsq_dropdownBtn",
5139
- "dropdownItem": "B_Gxsq_dropdownItem",
5140
- "dropdownItemActive": "B_Gxsq_dropdownItemActive"
5140
+ "dropdown": "B_Gxsq_dropdown"
5141
5141
  };
5142
5142
  //#endregion
5143
5143
  //#region \0dsh-css:src/client/styles/Toggle.module.css.mjs
@@ -5156,9 +5156,9 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
5156
5156
  css: css$3
5157
5157
  });
5158
5158
  var Toggle_module_css_default = {
5159
+ "toggle": "k-cD4G_toggle",
5159
5160
  "toggleOn": "k-cD4G_toggleOn",
5160
- "knob": "k-cD4G_knob",
5161
- "toggle": "k-cD4G_toggle"
5161
+ "knob": "k-cD4G_knob"
5162
5162
  };
5163
5163
  //#endregion
5164
5164
  //#region src/client/components/ui/Toggle.tsx
@@ -5258,29 +5258,29 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
5258
5258
  css: css$2
5259
5259
  });
5260
5260
  var DiagnosticsView_module_css_default = {
5261
- "headHint": "k9eRya_headHint",
5262
5261
  "envCopyBtn": "k9eRya_envCopyBtn",
5263
- "envRow": "k9eRya_envRow",
5264
- "envLabel": "k9eRya_envLabel",
5265
- "display": "k9eRya_display",
5266
- "envDesc": "k9eRya_envDesc",
5267
- "runBtn": "k9eRya_runBtn",
5268
- "badgeFail": "k9eRya_badgeFail",
5262
+ "head": "k9eRya_head",
5263
+ "meta": "k9eRya_meta",
5269
5264
  "diagPulse": "k9eRya_diagPulse",
5270
- "badgeIdle": "k9eRya_badgeIdle",
5265
+ "summaryFail": "k9eRya_summaryFail",
5266
+ "runBtn": "k9eRya_runBtn",
5267
+ "envLabel": "k9eRya_envLabel",
5268
+ "headHint": "k9eRya_headHint",
5269
+ "badge": "k9eRya_badge",
5271
5270
  "envTitle": "k9eRya_envTitle",
5272
- "summaryRunning": "k9eRya_summaryRunning",
5273
- "badgeRunning": "k9eRya_badgeRunning",
5271
+ "panel": "k9eRya_panel",
5274
5272
  "row": "k9eRya_row",
5275
- "badge": "k9eRya_badge",
5273
+ "envRow": "k9eRya_envRow",
5274
+ "display": "k9eRya_display",
5275
+ "badgeRunning": "k9eRya_badgeRunning",
5276
+ "badgeIdle": "k9eRya_badgeIdle",
5276
5277
  "badgeOk": "k9eRya_badgeOk",
5278
+ "badgeFail": "k9eRya_badgeFail",
5277
5279
  "summaryOk": "k9eRya_summaryOk",
5278
- "name": "k9eRya_name",
5279
- "meta": "k9eRya_meta",
5280
5280
  "summary": "k9eRya_summary",
5281
- "summaryFail": "k9eRya_summaryFail",
5282
- "panel": "k9eRya_panel",
5283
- "head": "k9eRya_head"
5281
+ "name": "k9eRya_name",
5282
+ "envDesc": "k9eRya_envDesc",
5283
+ "summaryRunning": "k9eRya_summaryRunning"
5284
5284
  };
5285
5285
  //#endregion
5286
5286
  //#region src/client/components/views/DiagnosticsView.tsx
@@ -5458,57 +5458,57 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
5458
5458
  css: css$1
5459
5459
  });
5460
5460
  var LogsView_module_css_default = {
5461
+ "btn": "_3j77BW_btn",
5462
+ "clearBtn": "_3j77BW_clearBtn",
5461
5463
  "head": "_3j77BW_head",
5462
- "logList": "_3j77BW_logList",
5463
- "event": "_3j77BW_event",
5464
- "headHint": "_3j77BW_headHint",
5465
- "foot": "_3j77BW_foot",
5464
+ "pathDialogDesc": "_3j77BW_pathDialogDesc",
5465
+ "badgeError": "_3j77BW_badgeError",
5466
5466
  "badgeWarn": "_3j77BW_badgeWarn",
5467
- "pathDialogFoot": "_3j77BW_pathDialogFoot",
5468
- "catDiagnostics": "_3j77BW_catDiagnostics",
5469
- "catUpdate": "_3j77BW_catUpdate",
5467
+ "catInstall": "_3j77BW_catInstall",
5468
+ "headHint": "_3j77BW_headHint",
5469
+ "filterBar": "_3j77BW_filterBar",
5470
5470
  "filterChip": "_3j77BW_filterChip",
5471
- "empty": "_3j77BW_empty",
5472
- "more": "_3j77BW_more",
5471
+ "pathDialogRow": "_3j77BW_pathDialogRow",
5472
+ "event": "_3j77BW_event",
5473
+ "footActions": "_3j77BW_footActions",
5474
+ "badgeSuccess": "_3j77BW_badgeSuccess",
5475
+ "actions": "_3j77BW_actions",
5476
+ "pathText": "_3j77BW_pathText",
5473
5477
  "footPath": "_3j77BW_footPath",
5478
+ "pathDraft": "_3j77BW_pathDraft",
5474
5479
  "footCount": "_3j77BW_footCount",
5475
- "pathDialogHint": "_3j77BW_pathDialogHint",
5476
- "headActions": "_3j77BW_headActions",
5477
- "linkBtn": "_3j77BW_linkBtn",
5478
- "time": "_3j77BW_time",
5479
- "pathRow": "_3j77BW_pathRow",
5480
- "pathText": "_3j77BW_pathText",
5480
+ "filterChipActive": "_3j77BW_filterChipActive",
5481
+ "badge": "_3j77BW_badge",
5482
+ "catUpdate": "_3j77BW_catUpdate",
5483
+ "list": "_3j77BW_list",
5484
+ "pathDialogReset": "_3j77BW_pathDialogReset",
5485
+ "catBadge": "_3j77BW_catBadge",
5486
+ "catUninstall": "_3j77BW_catUninstall",
5487
+ "pathDialogFoot": "_3j77BW_pathDialogFoot",
5488
+ "message": "_3j77BW_message",
5481
5489
  "search": "_3j77BW_search",
5490
+ "searchInput": "_3j77BW_searchInput",
5491
+ "time": "_3j77BW_time",
5482
5492
  "moreEnd": "_3j77BW_moreEnd",
5483
- "filterBar": "_3j77BW_filterBar",
5484
- "btn": "_3j77BW_btn",
5485
- "badgeSuccess": "_3j77BW_badgeSuccess",
5486
- "pathDialogReset": "_3j77BW_pathDialogReset",
5487
- "badgeError": "_3j77BW_badgeError",
5488
- "catInstall": "_3j77BW_catInstall",
5489
- "pathDialogDesc": "_3j77BW_pathDialogDesc",
5490
- "pathDialogRow": "_3j77BW_pathDialogRow",
5491
- "pathDialog": "_3j77BW_pathDialog",
5493
+ "logList": "_3j77BW_logList",
5494
+ "catDiagnostics": "_3j77BW_catDiagnostics",
5492
5495
  "badgeInfo": "_3j77BW_badgeInfo",
5493
- "catUninstall": "_3j77BW_catUninstall",
5494
- "catSystem": "_3j77BW_catSystem",
5495
- "badge": "_3j77BW_badge",
5496
- "catBadge": "_3j77BW_catBadge",
5496
+ "footFail": "_3j77BW_footFail",
5497
5497
  "badgeDebug": "_3j77BW_badgeDebug",
5498
- "footActions": "_3j77BW_footActions",
5499
- "message": "_3j77BW_message",
5500
- "actions": "_3j77BW_actions",
5501
- "entry": "_3j77BW_entry",
5502
- "clearBtn": "_3j77BW_clearBtn",
5498
+ "pathDialog": "_3j77BW_pathDialog",
5503
5499
  "catSettings": "_3j77BW_catSettings",
5504
- "pathDraft": "_3j77BW_pathDraft",
5505
- "footFail": "_3j77BW_footFail",
5500
+ "entry": "_3j77BW_entry",
5501
+ "pathDialogHint": "_3j77BW_pathDialogHint",
5502
+ "linkBtn": "_3j77BW_linkBtn",
5503
+ "catSystem": "_3j77BW_catSystem",
5504
+ "pathRow": "_3j77BW_pathRow",
5505
+ "more": "_3j77BW_more",
5506
+ "foot": "_3j77BW_foot",
5506
5507
  "panel": "_3j77BW_panel",
5507
5508
  "pathLabel": "_3j77BW_pathLabel",
5508
- "searchInput": "_3j77BW_searchInput",
5509
- "list": "_3j77BW_list",
5509
+ "headActions": "_3j77BW_headActions",
5510
5510
  "previewRow": "_3j77BW_previewRow",
5511
- "filterChipActive": "_3j77BW_filterChipActive"
5511
+ "empty": "_3j77BW_empty"
5512
5512
  };
5513
5513
  //#endregion
5514
5514
  //#region src/client/components/modals/LogsModal.tsx
@@ -6757,7 +6757,7 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
6757
6757
  openSection: settingsSection,
6758
6758
  onConsumedOpenSection: () => setSettingsSection(null)
6759
6759
  }), showHubUpdate && (0, react.createElement)(HubUpdateModal, {
6760
- info: catalog.hubUpdateInfo ?? { version: "1.4.11" },
6760
+ info: catalog.hubUpdateInfo ?? { version: "1.4.12" },
6761
6761
  lang,
6762
6762
  t,
6763
6763
  hasUpdate: catalog.hubHasUpdate,
@@ -228,26 +228,50 @@ function sendJson(response, status, value) {
228
228
  });
229
229
  response.end(JSON.stringify(value));
230
230
  }
231
+ /** 本机回环主机名:`localhost` / `127.0.0.1` / `[::1]` 指向同一台机器的同一个端口,
232
+ * 字符串不同但同源,必须按同一来源比较(dsh-plugin-hub#72)。 */
233
+ const LOOPBACK_HOSTNAMES = new Set(['localhost', '127.0.0.1', '[::1]']);
234
+ /** 把 `host[:port]` 形式的 authority 归一化成 `loopback:端口` —— 三个回环别名
235
+ * 映射成同一个身份,端口缺省按 http 的 80 补齐;非回环主机名、以及解析不出来的值
236
+ * 都返回 null。 */
237
+ function loopbackAuthority(authority) {
238
+ try {
239
+ const parsed = new URL(`http://${authority}`);
240
+ if (!LOOPBACK_HOSTNAMES.has(parsed.hostname.toLowerCase()))
241
+ return null;
242
+ return `loopback:${parsed.port === '' ? '80' : parsed.port}`;
243
+ }
244
+ catch {
245
+ return null;
246
+ }
247
+ }
231
248
  /** POST mutations are only accepted from the local web server origin or the desktop host page.
232
249
  * Exported for tests (tests/routes.test.ts) — the origin check is the whole CSRF defence. */
233
250
  export function isSameOrigin(request) {
234
- const origin = request.headers.origin;
235
- if (origin === undefined)
251
+ // 服务只绑定本机回环地址:Host 不是回环(局域网 IP、被改写的域名)一律拒绝,
252
+ // 顺带挡掉 DNS rebinding(Host 是攻击者域名,即便解析到 127.0.0.1)。
253
+ const host = request.headers.host;
254
+ const hostKey = host === undefined ? null : loopbackAuthority(host);
255
+ if (hostKey === null)
236
256
  return false;
257
+ const origin = request.headers.origin;
258
+ // 桌面端宿主把 `/dsh-plugin-hub/*` 转发给本地 http server 时可能不带 Origin 头,
259
+ // 此时所有 POST 都会被判成 untrusted origin(dsh-plugin-hub#72)。浏览器对 POST 请求
260
+ // 必定携带 Origin(含同源 POST 与跨站表单),能省略该头的只有本机原生客户端,
261
+ // 而它们本来就能伪造任意 Origin,因此放行不扩大 CSRF 面。
262
+ if (origin === undefined || origin === '')
263
+ return true;
237
264
  try {
238
265
  const url = new URL(origin);
239
- // 桌面端(Electron 宿主)的页面跑在宿主自定义协议下,origin 形如 `dsh-app://app`。
240
- // 客户端一律用相对路径请求,宿主把 `/dsh-plugin-hub/*` 转发给本地 http server 时
241
- // Origin 头原样保留,与 Host(如 localhost:3081)不等,因此必须显式放行该协议,
242
- // 否则桌面端全部 POST 都会被判成 untrusted origin。该协议只有宿主自身能产生,
243
- // 外部网页无法把 Origin 伪造成 `dsh-app://…`,放行不扩大 CSRF 面。
266
+ // 桌面端(Electron 宿主)的页面跑在宿主自定义协议下,origin 形如 `dsh-app://app`,
267
+ // 与 Host(如 localhost:3081)必然不等,因此必须显式放行该协议,否则桌面端全部 POST
268
+ // 都会被判成 untrusted origin。该协议只有宿主自身能产生,外部网页无法把 Origin
269
+ // 伪造成 `dsh-app://…`,放行不扩大 CSRF 面。
244
270
  if (url.protocol === 'dsh-app:')
245
271
  return true;
246
- const host = request.headers.host;
247
- if (host === undefined)
248
- return false;
249
- const localHostnames = new Set(['localhost', '127.0.0.1', '[::1]']);
250
- return url.host === host && localHostnames.has(url.hostname);
272
+ // 按归一化后的「主机名:端口」比较:`localhost` / `127.0.0.1` / `[::1]` 不再互相拒绝,
273
+ // 端口仍然必须一致(另一个本机进程不能被当成同一来源)。
274
+ return loopbackAuthority(url.host) === hostKey;
251
275
  }
252
276
  catch {
253
277
  return false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-plugin",
3
- "version": "1.4.11",
3
+ "version": "1.4.12",
4
4
  "description": "A community plugin marketplace for DeepSeek Harness, built to the official plugin spec — browse, search and install 10000+ human-curated community plugins without leaving the app. · DeepSeek Harness 社区插件市场(遵循官方开发规范):10000+ 人工精选社区插件,每日更新。",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -256,23 +256,47 @@ function sendJson(response: ServerResponse, status: number, value: unknown): voi
256
256
  response.end(JSON.stringify(value))
257
257
  }
258
258
 
259
+ /** 本机回环主机名:`localhost` / `127.0.0.1` / `[::1]` 指向同一台机器的同一个端口,
260
+ * 字符串不同但同源,必须按同一来源比较(dsh-plugin-hub#72)。 */
261
+ const LOOPBACK_HOSTNAMES = new Set(['localhost', '127.0.0.1', '[::1]'])
262
+
263
+ /** 把 `host[:port]` 形式的 authority 归一化成 `loopback:端口` —— 三个回环别名
264
+ * 映射成同一个身份,端口缺省按 http 的 80 补齐;非回环主机名、以及解析不出来的值
265
+ * 都返回 null。 */
266
+ function loopbackAuthority(authority: string): string | null {
267
+ try {
268
+ const parsed = new URL(`http://${authority}`)
269
+ if (!LOOPBACK_HOSTNAMES.has(parsed.hostname.toLowerCase())) return null
270
+ return `loopback:${parsed.port === '' ? '80' : parsed.port}`
271
+ } catch {
272
+ return null
273
+ }
274
+ }
275
+
259
276
  /** POST mutations are only accepted from the local web server origin or the desktop host page.
260
277
  * Exported for tests (tests/routes.test.ts) — the origin check is the whole CSRF defence. */
261
278
  export function isSameOrigin(request: IncomingMessage): boolean {
279
+ // 服务只绑定本机回环地址:Host 不是回环(局域网 IP、被改写的域名)一律拒绝,
280
+ // 顺带挡掉 DNS rebinding(Host 是攻击者域名,即便解析到 127.0.0.1)。
281
+ const host = request.headers.host
282
+ const hostKey = host === undefined ? null : loopbackAuthority(host)
283
+ if (hostKey === null) return false
262
284
  const origin = request.headers.origin
263
- if (origin === undefined) return false
285
+ // 桌面端宿主把 `/dsh-plugin-hub/*` 转发给本地 http server 时可能不带 Origin 头,
286
+ // 此时所有 POST 都会被判成 untrusted origin(dsh-plugin-hub#72)。浏览器对 POST 请求
287
+ // 必定携带 Origin(含同源 POST 与跨站表单),能省略该头的只有本机原生客户端,
288
+ // 而它们本来就能伪造任意 Origin,因此放行不扩大 CSRF 面。
289
+ if (origin === undefined || origin === '') return true
264
290
  try {
265
291
  const url = new URL(origin)
266
- // 桌面端(Electron 宿主)的页面跑在宿主自定义协议下,origin 形如 `dsh-app://app`。
267
- // 客户端一律用相对路径请求,宿主把 `/dsh-plugin-hub/*` 转发给本地 http server 时
268
- // Origin 头原样保留,与 Host(如 localhost:3081)不等,因此必须显式放行该协议,
269
- // 否则桌面端全部 POST 都会被判成 untrusted origin。该协议只有宿主自身能产生,
270
- // 外部网页无法把 Origin 伪造成 `dsh-app://…`,放行不扩大 CSRF 面。
292
+ // 桌面端(Electron 宿主)的页面跑在宿主自定义协议下,origin 形如 `dsh-app://app`,
293
+ // 与 Host(如 localhost:3081)必然不等,因此必须显式放行该协议,否则桌面端全部 POST
294
+ // 都会被判成 untrusted origin。该协议只有宿主自身能产生,外部网页无法把 Origin
295
+ // 伪造成 `dsh-app://…`,放行不扩大 CSRF 面。
271
296
  if (url.protocol === 'dsh-app:') return true
272
- const host = request.headers.host
273
- if (host === undefined) return false
274
- const localHostnames = new Set(['localhost', '127.0.0.1', '[::1]'])
275
- return url.host === host && localHostnames.has(url.hostname)
297
+ // 按归一化后的「主机名:端口」比较:`localhost` / `127.0.0.1` / `[::1]` 不再互相拒绝,
298
+ // 端口仍然必须一致(另一个本机进程不能被当成同一来源)。
299
+ return loopbackAuthority(url.host) === hostKey
276
300
  } catch {
277
301
  return false
278
302
  }