dsh-config-manager 0.1.39 → 0.1.40

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/lib/client.d.ts CHANGED
@@ -1184,6 +1184,9 @@ type MyItemStatus = 'not-listed' | 'pr-pending' | 'listed';
1184
1184
  interface MyRepoForm {
1185
1185
  /** 配置名(预填 zip 文件名,可改);id 由其派生稳定 slug */
1186
1186
  name: string;
1187
+ /** 显式目标条目 id(**仅 update 模式**用:由列表「更新」按钮预填,避免靠 name→slug 猜测匹配;
1188
+ * 上传(新条目)时省略;后端校验存在性,缺省回退 name slug 匹配(向后兼容) */
1189
+ id?: string;
1187
1190
  description?: string;
1188
1191
  categories?: string[];
1189
1192
  }
package/lib/client.js CHANGED
@@ -2910,111 +2910,111 @@ if (typeof document !== "undefined" && document.querySelector("style[data-tag=\"
2910
2910
  document.head.appendChild(tag);
2911
2911
  }
2912
2912
  var config_manager_module_css_default = {
2913
- "warnText": "_367UGW_warnText",
2914
- "progressPercent": "_367UGW_progressPercent",
2915
- "planScroll": "_367UGW_planScroll",
2916
- "pullScroll": "_367UGW_pullScroll",
2917
- "pathIssueKind": "_367UGW_pathIssueKind",
2918
- "reportScroll": "_367UGW_reportScroll",
2919
- "primaryButton": "_367UGW_primaryButton",
2920
- "progressMeta": "_367UGW_progressMeta",
2921
- "errorLine": "_367UGW_errorLine",
2922
- "progressBadgeSection": "_367UGW_progressBadgeSection",
2923
- "reportView": "_367UGW_reportView",
2924
- "progressBadge": "_367UGW_progressBadge",
2925
- "snapshotRow": "_367UGW_snapshotRow",
2926
- "groupList": "_367UGW_groupList",
2927
- "badgeInfo": "_367UGW_badgeInfo",
2928
- "statRow": "_367UGW_statRow",
2929
- "sectionSubtitle": "_367UGW_sectionSubtitle",
2930
- "select": "_367UGW_select",
2931
- "errorReason": "_367UGW_errorReason",
2932
- "badgeError": "_367UGW_badgeError",
2933
- "checkboxRow": "_367UGW_checkboxRow",
2934
- "hiddenFile": "_367UGW_hiddenFile",
2935
- "progressLabel": "_367UGW_progressLabel",
2936
- "spinner": "_367UGW_spinner",
2937
- "reportList": "_367UGW_reportList",
2938
2913
  "warnList": "_367UGW_warnList",
2914
+ "pathRow": "_367UGW_pathRow",
2915
+ "field": "_367UGW_field",
2916
+ "rollbackBox": "_367UGW_rollbackBox",
2917
+ "badgeInfo": "_367UGW_badgeInfo",
2918
+ "optionsCard": "_367UGW_optionsCard",
2919
+ "conflictList": "_367UGW_conflictList",
2920
+ "dshCmSpin": "_367UGW_dshCmSpin",
2921
+ "kindTag": "_367UGW_kindTag",
2922
+ "confirmScroll": "_367UGW_confirmScroll",
2939
2923
  "aboutLinkRow": "_367UGW_aboutLinkRow",
2940
- "banner": "_367UGW_banner",
2941
- "badgeOk": "_367UGW_badgeOk",
2942
- "conflictItem": "_367UGW_conflictItem",
2943
- "errorBanner": "_367UGW_errorBanner",
2944
- "conflictId": "_367UGW_conflictId",
2945
- "secretsList": "_367UGW_secretsList",
2946
- "sectionTitleBlock": "_367UGW_sectionTitleBlock",
2947
- "input": "_367UGW_input",
2948
- "spinnerLabel": "_367UGW_spinnerLabel",
2924
+ "viewTabs": "_367UGW_viewTabs",
2925
+ "sectionBody": "_367UGW_sectionBody",
2926
+ "progressMeta": "_367UGW_progressMeta",
2949
2927
  "progressBarDone": "_367UGW_progressBarDone",
2928
+ "pathNew": "_367UGW_pathNew",
2929
+ "progressBadge": "_367UGW_progressBadge",
2930
+ "optionsHeader": "_367UGW_optionsHeader",
2931
+ "reportView": "_367UGW_reportView",
2932
+ "reportText": "_367UGW_reportText",
2933
+ "errorList": "_367UGW_errorList",
2950
2934
  "categoryDesc": "_367UGW_categoryDesc",
2951
- "sectionBody": "_367UGW_sectionBody",
2935
+ "radioLabel": "_367UGW_radioLabel",
2936
+ "aboutAuthor": "_367UGW_aboutAuthor",
2937
+ "hint": "_367UGW_hint",
2938
+ "checkboxRow": "_367UGW_checkboxRow",
2952
2939
  "badge": "_367UGW_badge",
2953
- "groupItems": "_367UGW_groupItems",
2954
- "progressTrack": "_367UGW_progressTrack",
2955
- "conflictDetail": "_367UGW_conflictDetail",
2940
+ "dshCmIndeterminate": "_367UGW_dshCmIndeterminate",
2941
+ "conflictId": "_367UGW_conflictId",
2942
+ "pathValue": "_367UGW_pathValue",
2943
+ "errorAction": "_367UGW_errorAction",
2944
+ "sectionTitle": "_367UGW_sectionTitle",
2945
+ "errorBanner": "_367UGW_errorBanner",
2946
+ "pathMappingList": "_367UGW_pathMappingList",
2947
+ "diffScroll": "_367UGW_diffScroll",
2948
+ "planScroll": "_367UGW_planScroll",
2949
+ "progressPercent": "_367UGW_progressPercent",
2950
+ "errorTitle": "_367UGW_errorTitle",
2951
+ "snapshotRow": "_367UGW_snapshotRow",
2952
+ "conflictItem": "_367UGW_conflictItem",
2953
+ "categoryItem": "_367UGW_categoryItem",
2954
+ "reportScroll": "_367UGW_reportScroll",
2956
2955
  "errorActionLabel": "_367UGW_errorActionLabel",
2957
- "kindTag": "_367UGW_kindTag",
2956
+ "sectionSubtitle": "_367UGW_sectionSubtitle",
2957
+ "pullScroll": "_367UGW_pullScroll",
2958
+ "empty": "_367UGW_empty",
2959
+ "snapshotList": "_367UGW_snapshotList",
2958
2960
  "progressBlock": "_367UGW_progressBlock",
2959
- "badgeWarn": "_367UGW_badgeWarn",
2961
+ "progressTrack": "_367UGW_progressTrack",
2962
+ "dangerButton": "_367UGW_dangerButton",
2960
2963
  "groupNote": "_367UGW_groupNote",
2964
+ "conflictHead": "_367UGW_conflictHead",
2965
+ "formError": "_367UGW_formError",
2961
2966
  "groupHeader": "_367UGW_groupHeader",
2962
- "actionRow": "_367UGW_actionRow",
2963
- "optionsCard": "_367UGW_optionsCard",
2967
+ "hiddenFile": "_367UGW_hiddenFile",
2964
2968
  "pathOld": "_367UGW_pathOld",
2969
+ "snapshotRowHeader": "_367UGW_snapshotRowHeader",
2965
2970
  "errorItem": "_367UGW_errorItem",
2966
- "snapshotList": "_367UGW_snapshotList",
2967
- "pathNew": "_367UGW_pathNew",
2968
- "confirmScroll": "_367UGW_confirmScroll",
2969
- "conflictList": "_367UGW_conflictList",
2970
- "categoryName": "_367UGW_categoryName",
2971
- "groupLabel": "_367UGW_groupLabel",
2972
- "errorList": "_367UGW_errorList",
2973
- "card": "_367UGW_card",
2974
- "sectionTitle": "_367UGW_sectionTitle",
2975
- "optionsHeader": "_367UGW_optionsHeader",
2976
- "aboutAuthor": "_367UGW_aboutAuthor",
2977
- "progressBadgeCount": "_367UGW_progressBadgeCount",
2978
- "fieldLabel": "_367UGW_fieldLabel",
2979
- "reportText": "_367UGW_reportText",
2980
- "severityError": "_367UGW_severityError",
2981
- "formError": "_367UGW_formError",
2982
- "pathMappingList": "_367UGW_pathMappingList",
2983
- "empty": "_367UGW_empty",
2984
- "spinnerWrap": "_367UGW_spinnerWrap",
2985
- "field": "_367UGW_field",
2986
- "secretFields": "_367UGW_secretFields",
2987
- "rollbackBox": "_367UGW_rollbackBox",
2971
+ "progressLabel": "_367UGW_progressLabel",
2988
2972
  "rowActions": "_367UGW_rowActions",
2989
- "dshCmIndeterminate": "_367UGW_dshCmIndeterminate",
2990
- "ghostButton": "_367UGW_ghostButton",
2991
- "diffScroll": "_367UGW_diffScroll",
2992
- "viewTab": "_367UGW_viewTab",
2993
- "modeTab": "_367UGW_modeTab",
2994
- "radioLabel": "_367UGW_radioLabel",
2995
- "groupCard": "_367UGW_groupCard",
2996
2973
  "reportFooter": "_367UGW_reportFooter",
2997
- "sectionHeader": "_367UGW_sectionHeader",
2998
- "pathValue": "_367UGW_pathValue",
2999
- "progressIndeterminate": "_367UGW_progressIndeterminate",
3000
- "dangerButton": "_367UGW_dangerButton",
3001
- "hint": "_367UGW_hint",
3002
- "modeHint": "_367UGW_modeHint",
3003
- "categoryItem": "_367UGW_categoryItem",
3004
- "errorFooter": "_367UGW_errorFooter",
3005
- "pathRow": "_367UGW_pathRow",
3006
- "progressDetail": "_367UGW_progressDetail",
3007
- "progressBar": "_367UGW_progressBar",
3008
- "snapshotRowHeader": "_367UGW_snapshotRowHeader",
3009
- "viewBody": "_367UGW_viewBody",
3010
2974
  "modeTabs": "_367UGW_modeTabs",
3011
- "errorTitle": "_367UGW_errorTitle",
3012
- "errorAction": "_367UGW_errorAction",
3013
- "conflictHead": "_367UGW_conflictHead",
2975
+ "pathIssueKind": "_367UGW_pathIssueKind",
2976
+ "groupCard": "_367UGW_groupCard",
2977
+ "fieldLabel": "_367UGW_fieldLabel",
2978
+ "modeTab": "_367UGW_modeTab",
2979
+ "input": "_367UGW_input",
2980
+ "groupLabel": "_367UGW_groupLabel",
2981
+ "errorFooter": "_367UGW_errorFooter",
3014
2982
  "section": "_367UGW_section",
3015
- "viewTabs": "_367UGW_viewTabs",
2983
+ "sectionHeader": "_367UGW_sectionHeader",
2984
+ "ghostButton": "_367UGW_ghostButton",
2985
+ "viewBody": "_367UGW_viewBody",
2986
+ "statRow": "_367UGW_statRow",
3016
2987
  "conflictOptions": "_367UGW_conflictOptions",
3017
- "dshCmSpin": "_367UGW_dshCmSpin"
2988
+ "secretsList": "_367UGW_secretsList",
2989
+ "card": "_367UGW_card",
2990
+ "primaryButton": "_367UGW_primaryButton",
2991
+ "viewTab": "_367UGW_viewTab",
2992
+ "groupItems": "_367UGW_groupItems",
2993
+ "progressDetail": "_367UGW_progressDetail",
2994
+ "spinnerWrap": "_367UGW_spinnerWrap",
2995
+ "spinner": "_367UGW_spinner",
2996
+ "spinnerLabel": "_367UGW_spinnerLabel",
2997
+ "select": "_367UGW_select",
2998
+ "severityError": "_367UGW_severityError",
2999
+ "warnText": "_367UGW_warnText",
3000
+ "categoryName": "_367UGW_categoryName",
3001
+ "sectionTitleBlock": "_367UGW_sectionTitleBlock",
3002
+ "modeHint": "_367UGW_modeHint",
3003
+ "progressBar": "_367UGW_progressBar",
3004
+ "errorLine": "_367UGW_errorLine",
3005
+ "reportList": "_367UGW_reportList",
3006
+ "badgeOk": "_367UGW_badgeOk",
3007
+ "badgeWarn": "_367UGW_badgeWarn",
3008
+ "groupList": "_367UGW_groupList",
3009
+ "banner": "_367UGW_banner",
3010
+ "progressBadgeCount": "_367UGW_progressBadgeCount",
3011
+ "badgeError": "_367UGW_badgeError",
3012
+ "progressIndeterminate": "_367UGW_progressIndeterminate",
3013
+ "progressBadgeSection": "_367UGW_progressBadgeSection",
3014
+ "secretFields": "_367UGW_secretFields",
3015
+ "errorReason": "_367UGW_errorReason",
3016
+ "conflictDetail": "_367UGW_conflictDetail",
3017
+ "actionRow": "_367UGW_actionRow"
3018
3018
  };
3019
3019
  //#endregion
3020
3020
  //#region src/client/common/ui.tsx
@@ -7242,7 +7242,8 @@ function deriveLoginState(input) {
7242
7242
  const EMPTY_MY_CONFIG_FORM = {
7243
7243
  name: "",
7244
7244
  description: "",
7245
- categories: ""
7245
+ categories: "",
7246
+ id: ""
7246
7247
  };
7247
7248
  /** 表单校验:名称必填(trim 后非空)。描述/类别可选。 */
7248
7249
  function validateMyConfigForm(form, t = zhUiT) {
@@ -7630,7 +7631,7 @@ function initialWizard(mode) {
7630
7631
  error: null
7631
7632
  };
7632
7633
  }
7633
- function MyConfigsView({ meApi, api, importApi, syncApi, t, myItems, myItemsError, onMyItemsChange, onBack }) {
7634
+ function MyConfigsView({ meApi, api, importApi, syncApi, t, myItems, myItemsError, onMyItemsChange }) {
7634
7635
  const uiT = meApi.t;
7635
7636
  const [status, setStatus] = (0, react.useState)(null);
7636
7637
  const [statusLoading, setStatusLoading] = (0, react.useState)(true);
@@ -7840,6 +7841,7 @@ function MyConfigsView({ meApi, api, importApi, syncApi, t, myItems, myItemsErro
7840
7841
  const categories = parseCategories(wizard.form.categories);
7841
7842
  const form = {
7842
7843
  name: wizard.form.name.trim(),
7844
+ ...wizard.mode === "update" && wizard.form.id !== "" ? { id: wizard.form.id } : {},
7843
7845
  ...wizard.form.description.trim() !== "" ? { description: wizard.form.description.trim() } : {},
7844
7846
  ...categories.length > 0 ? { categories } : {}
7845
7847
  };
@@ -7871,11 +7873,12 @@ function MyConfigsView({ meApi, api, importApi, syncApi, t, myItems, myItemsErro
7871
7873
  }));
7872
7874
  }
7873
7875
  };
7874
- /** 行操作:更新 → 打开向导,预填条目信息(name/description/categories */
7876
+ /** 行操作:更新 → 打开向导,预填条目信息(id/name/description/categories;id 供后端精确定位) */
7875
7877
  const startUpdate = (entry) => {
7876
7878
  setWizard({
7877
7879
  ...initialWizard("update"),
7878
7880
  form: {
7881
+ id: entry.id,
7879
7882
  name: entry.name,
7880
7883
  description: entry.description ?? "",
7881
7884
  categories: (entry.categories ?? []).join(", ")
@@ -8485,13 +8488,6 @@ function MyConfigsView({ meApi, api, importApi, syncApi, t, myItems, myItemsErro
8485
8488
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
8486
8489
  className: config_manager_module_css_default.viewBody,
8487
8490
  children: [
8488
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
8489
- className: config_manager_module_css_default.actionRow,
8490
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
8491
- onClick: onBack,
8492
- children: t("myconfigs.back")
8493
- })
8494
- }),
8495
8491
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SectionTitle, {
8496
8492
  title: t("myconfigs.tab.myconfigs"),
8497
8493
  subtitle: t("myconfigs.login.hint")
@@ -8765,9 +8761,6 @@ function MarketPanel({ api, myConfigsApi, importApi, syncApi, t }) {
8765
8761
  myItems: items,
8766
8762
  myItemsError: error
8767
8763
  });
8768
- },
8769
- onBack: () => {
8770
- patch({ subView: "browse" });
8771
8764
  }
8772
8765
  }) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
8773
8766
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SectionTitle, {