dsh-config-manager 0.1.51 → 0.1.53

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.js CHANGED
@@ -3073,130 +3073,130 @@ if (typeof document !== "undefined" && document.querySelector("style[data-tag=\"
3073
3073
  document.head.appendChild(tag);
3074
3074
  }
3075
3075
  var config_manager_module_css_default = {
3076
- "planScroll": "_367UGW_planScroll",
3077
- "progressTrack": "_367UGW_progressTrack",
3078
- "categoryDesc": "_367UGW_categoryDesc",
3079
- "conflictOptions": "_367UGW_conflictOptions",
3080
- "pathNew": "_367UGW_pathNew",
3081
- "pathOld": "_367UGW_pathOld",
3076
+ "reportFooter": "_367UGW_reportFooter",
3082
3077
  "optionsHeader": "_367UGW_optionsHeader",
3083
- "modeTabs": "_367UGW_modeTabs",
3084
- "snapshotList": "_367UGW_snapshotList",
3085
- "groupLabel": "_367UGW_groupLabel",
3086
- "dialogBodyScroll": "_367UGW_dialogBodyScroll",
3087
- "snapshotRow": "_367UGW_snapshotRow",
3088
- "viewTabs": "_367UGW_viewTabs",
3089
3078
  "empty": "_367UGW_empty",
3090
- "section": "_367UGW_section",
3091
- "pathRow": "_367UGW_pathRow",
3092
- "conflictId": "_367UGW_conflictId",
3093
- "card": "_367UGW_card",
3094
- "conflictItem": "_367UGW_conflictItem",
3095
- "reportScroll": "_367UGW_reportScroll",
3096
- "spinner": "_367UGW_spinner",
3097
- "progressIndeterminate": "_367UGW_progressIndeterminate",
3098
- "modeHint": "_367UGW_modeHint",
3099
- "progressBar": "_367UGW_progressBar",
3100
- "diffScroll": "_367UGW_diffScroll",
3101
- "banner": "_367UGW_banner",
3102
- "conflictList": "_367UGW_conflictList",
3103
- "errorLine": "_367UGW_errorLine",
3104
- "dialogBody": "_367UGW_dialogBody",
3105
- "actionRow": "_367UGW_actionRow",
3106
- "errorList": "_367UGW_errorList",
3107
- "confirmScroll": "_367UGW_confirmScroll",
3108
- "wizardCard": "_367UGW_wizardCard",
3109
- "sectionTitleBlock": "_367UGW_sectionTitleBlock",
3110
- "groupItems": "_367UGW_groupItems",
3111
- "errorItem": "_367UGW_errorItem",
3112
- "spinnerWrap": "_367UGW_spinnerWrap",
3113
- "progressMeta": "_367UGW_progressMeta",
3114
- "input": "_367UGW_input",
3115
- "hiddenFile": "_367UGW_hiddenFile",
3116
- "logScroll": "_367UGW_logScroll",
3117
- "backupFileMeta": "_367UGW_backupFileMeta",
3118
- "viewTab": "_367UGW_viewTab",
3119
- "errorAction": "_367UGW_errorAction",
3120
- "logPanel": "_367UGW_logPanel",
3121
- "backupFileList": "_367UGW_backupFileList",
3079
+ "hint": "_367UGW_hint",
3080
+ "dialogMask": "_367UGW_dialogMask",
3081
+ "kindTag": "_367UGW_kindTag",
3122
3082
  "dialogHeaderRow": "_367UGW_dialogHeaderRow",
3123
- "sectionTitle": "_367UGW_sectionTitle",
3124
- "pathValue": "_367UGW_pathValue",
3125
- "progressBarDone": "_367UGW_progressBarDone",
3126
- "groupList": "_367UGW_groupList",
3127
- "progressDetail": "_367UGW_progressDetail",
3083
+ "pathIssueKind": "_367UGW_pathIssueKind",
3084
+ "badgeOk": "_367UGW_badgeOk",
3085
+ "errorAction": "_367UGW_errorAction",
3086
+ "pathOld": "_367UGW_pathOld",
3087
+ "hiddenFile": "_367UGW_hiddenFile",
3128
3088
  "backupFileName": "_367UGW_backupFileName",
3129
- "errorTitle": "_367UGW_errorTitle",
3130
3089
  "fieldLabel": "_367UGW_fieldLabel",
3131
- "conflictHead": "_367UGW_conflictHead",
3132
- "reportFooter": "_367UGW_reportFooter",
3133
- "hint": "_367UGW_hint",
3134
- "aboutLinkRow": "_367UGW_aboutLinkRow",
3135
- "progressBadgeSection": "_367UGW_progressBadgeSection",
3136
- "badgeWarn": "_367UGW_badgeWarn",
3090
+ "conflictDetail": "_367UGW_conflictDetail",
3091
+ "snapshotList": "_367UGW_snapshotList",
3092
+ "modeHint": "_367UGW_modeHint",
3093
+ "warnText": "_367UGW_warnText",
3094
+ "planScroll": "_367UGW_planScroll",
3095
+ "pullScroll": "_367UGW_pullScroll",
3096
+ "conflictOptions": "_367UGW_conflictOptions",
3097
+ "section": "_367UGW_section",
3098
+ "reportText": "_367UGW_reportText",
3099
+ "badgeInfo": "_367UGW_badgeInfo",
3100
+ "errorReason": "_367UGW_errorReason",
3101
+ "pathValue": "_367UGW_pathValue",
3102
+ "progressLabel": "_367UGW_progressLabel",
3103
+ "viewBody": "_367UGW_viewBody",
3104
+ "progressBarDone": "_367UGW_progressBarDone",
3105
+ "conflictList": "_367UGW_conflictList",
3106
+ "logEmpty": "_367UGW_logEmpty",
3107
+ "sectionTitleBlock": "_367UGW_sectionTitleBlock",
3137
3108
  "aboutAuthor": "_367UGW_aboutAuthor",
3138
- "errorBanner": "_367UGW_errorBanner",
3109
+ "errorItem": "_367UGW_errorItem",
3139
3110
  "select": "_367UGW_select",
3140
- "kindTag": "_367UGW_kindTag",
3111
+ "groupHeader": "_367UGW_groupHeader",
3112
+ "rollbackBox": "_367UGW_rollbackBox",
3113
+ "sectionHeader": "_367UGW_sectionHeader",
3114
+ "backupFileList": "_367UGW_backupFileList",
3141
3115
  "categoryItem": "_367UGW_categoryItem",
3116
+ "progressBar": "_367UGW_progressBar",
3142
3117
  "reportView": "_367UGW_reportView",
3143
- "spinnerLabel": "_367UGW_spinnerLabel",
3144
- "logLine": "_367UGW_logLine",
3145
- "progressPercent": "_367UGW_progressPercent",
3146
- "badge": "_367UGW_badge",
3147
- "reportText": "_367UGW_reportText",
3118
+ "conflictId": "_367UGW_conflictId",
3119
+ "conflictHead": "_367UGW_conflictHead",
3120
+ "logHeader": "_367UGW_logHeader",
3121
+ "wizardCard": "_367UGW_wizardCard",
3122
+ "input": "_367UGW_input",
3123
+ "progressIndeterminate": "_367UGW_progressIndeterminate",
3124
+ "card": "_367UGW_card",
3125
+ "progressMeta": "_367UGW_progressMeta",
3126
+ "spinnerWrap": "_367UGW_spinnerWrap",
3148
3127
  "dialogWide": "_367UGW_dialogWide",
3149
- "errorReason": "_367UGW_errorReason",
3150
- "formError": "_367UGW_formError",
3151
- "reportList": "_367UGW_reportList",
3152
- "badgeInfo": "_367UGW_badgeInfo",
3128
+ "dialogCard": "_367UGW_dialogCard",
3129
+ "sectionTitle": "_367UGW_sectionTitle",
3130
+ "viewTabs": "_367UGW_viewTabs",
3131
+ "dshCmSpin": "_367UGW_dshCmSpin",
3153
3132
  "dangerButton": "_367UGW_dangerButton",
3133
+ "reportList": "_367UGW_reportList",
3134
+ "progressBadgeCount": "_367UGW_progressBadgeCount",
3135
+ "dshCmIndeterminate": "_367UGW_dshCmIndeterminate",
3136
+ "viewTab": "_367UGW_viewTab",
3137
+ "modeTab": "_367UGW_modeTab",
3138
+ "modeTabs": "_367UGW_modeTabs",
3139
+ "rowActions": "_367UGW_rowActions",
3140
+ "errorBanner": "_367UGW_errorBanner",
3141
+ "statRow": "_367UGW_statRow",
3142
+ "confirmScroll": "_367UGW_confirmScroll",
3143
+ "badgeError": "_367UGW_badgeError",
3144
+ "pathMappingList": "_367UGW_pathMappingList",
3145
+ "sectionSubtitle": "_367UGW_sectionSubtitle",
3146
+ "secretFields": "_367UGW_secretFields",
3147
+ "errorActionLabel": "_367UGW_errorActionLabel",
3148
+ "sectionBody": "_367UGW_sectionBody",
3149
+ "formError": "_367UGW_formError",
3154
3150
  "progressBlock": "_367UGW_progressBlock",
3151
+ "pathRow": "_367UGW_pathRow",
3152
+ "snapshotRowHeader": "_367UGW_snapshotRowHeader",
3153
+ "primaryButton": "_367UGW_primaryButton",
3154
+ "groupLabel": "_367UGW_groupLabel",
3155
+ "dialogBodyScroll": "_367UGW_dialogBodyScroll",
3156
+ "optionsCard": "_367UGW_optionsCard",
3157
+ "badge": "_367UGW_badge",
3158
+ "groupNote": "_367UGW_groupNote",
3159
+ "errorLine": "_367UGW_errorLine",
3160
+ "spinner": "_367UGW_spinner",
3155
3161
  "severityError": "_367UGW_severityError",
3156
- "dialogClose": "_367UGW_dialogClose",
3157
- "pathMappingList": "_367UGW_pathMappingList",
3158
- "progressLabel": "_367UGW_progressLabel",
3159
- "viewBody": "_367UGW_viewBody",
3162
+ "reportScroll": "_367UGW_reportScroll",
3163
+ "groupItems": "_367UGW_groupItems",
3164
+ "progressBadge": "_367UGW_progressBadge",
3160
3165
  "ghostButton": "_367UGW_ghostButton",
3161
- "errorFooter": "_367UGW_errorFooter",
3166
+ "groupList": "_367UGW_groupList",
3167
+ "errorList": "_367UGW_errorList",
3162
3168
  "dialogHeader": "_367UGW_dialogHeader",
3163
- "secretFields": "_367UGW_secretFields",
3169
+ "badgeWarn": "_367UGW_badgeWarn",
3164
3170
  "radioLabel": "_367UGW_radioLabel",
3165
- "logJumpButton": "_367UGW_logJumpButton",
3166
- "statRow": "_367UGW_statRow",
3167
- "groupHeader": "_367UGW_groupHeader",
3168
- "secretsList": "_367UGW_secretsList",
3169
- "checkboxRow": "_367UGW_checkboxRow",
3170
- "pullScroll": "_367UGW_pullScroll",
3171
+ "diffScroll": "_367UGW_diffScroll",
3172
+ "errorFooter": "_367UGW_errorFooter",
3173
+ "conflictItem": "_367UGW_conflictItem",
3174
+ "spinnerLabel": "_367UGW_spinnerLabel",
3175
+ "snapshotRow": "_367UGW_snapshotRow",
3176
+ "progressDetail": "_367UGW_progressDetail",
3177
+ "progressBadgeSection": "_367UGW_progressBadgeSection",
3171
3178
  "backupFileRow": "_367UGW_backupFileRow",
3172
- "sectionHeader": "_367UGW_sectionHeader",
3173
- "progressBadgeCount": "_367UGW_progressBadgeCount",
3174
- "dshCmSpin": "_367UGW_dshCmSpin",
3175
3179
  "field": "_367UGW_field",
3176
- "rollbackBox": "_367UGW_rollbackBox",
3177
- "sectionBody": "_367UGW_sectionBody",
3178
- "groupNote": "_367UGW_groupNote",
3179
- "optionsCard": "_367UGW_optionsCard",
3180
- "dialogCard": "_367UGW_dialogCard",
3181
- "dshCmIndeterminate": "_367UGW_dshCmIndeterminate",
3182
- "errorActionLabel": "_367UGW_errorActionLabel",
3180
+ "dialogBody": "_367UGW_dialogBody",
3181
+ "logScroll": "_367UGW_logScroll",
3183
3182
  "groupCard": "_367UGW_groupCard",
3184
- "warnList": "_367UGW_warnList",
3185
- "progressBadge": "_367UGW_progressBadge",
3186
- "warnText": "_367UGW_warnText",
3187
- "logEmpty": "_367UGW_logEmpty",
3188
- "snapshotRowHeader": "_367UGW_snapshotRowHeader",
3189
- "primaryButton": "_367UGW_primaryButton",
3190
- "conflictDetail": "_367UGW_conflictDetail",
3183
+ "actionRow": "_367UGW_actionRow",
3184
+ "errorTitle": "_367UGW_errorTitle",
3185
+ "pathNew": "_367UGW_pathNew",
3191
3186
  "categoryName": "_367UGW_categoryName",
3192
- "sectionSubtitle": "_367UGW_sectionSubtitle",
3193
- "rowActions": "_367UGW_rowActions",
3194
- "dialogMask": "_367UGW_dialogMask",
3195
- "badgeOk": "_367UGW_badgeOk",
3196
- "modeTab": "_367UGW_modeTab",
3197
- "pathIssueKind": "_367UGW_pathIssueKind",
3198
- "badgeError": "_367UGW_badgeError",
3199
- "logHeader": "_367UGW_logHeader"
3187
+ "logPanel": "_367UGW_logPanel",
3188
+ "aboutLinkRow": "_367UGW_aboutLinkRow",
3189
+ "warnList": "_367UGW_warnList",
3190
+ "dialogClose": "_367UGW_dialogClose",
3191
+ "categoryDesc": "_367UGW_categoryDesc",
3192
+ "logLine": "_367UGW_logLine",
3193
+ "logJumpButton": "_367UGW_logJumpButton",
3194
+ "banner": "_367UGW_banner",
3195
+ "progressPercent": "_367UGW_progressPercent",
3196
+ "checkboxRow": "_367UGW_checkboxRow",
3197
+ "progressTrack": "_367UGW_progressTrack",
3198
+ "backupFileMeta": "_367UGW_backupFileMeta",
3199
+ "secretsList": "_367UGW_secretsList"
3200
3200
  };
3201
3201
  //#endregion
3202
3202
  //#region src/client/common/ui.tsx
@@ -9174,8 +9174,9 @@ function MyConfigsView({ meApi, api, importApi, syncApi, t, myItems, myItemsErro
9174
9174
  await syncApi.githubCancel(flowId);
9175
9175
  } catch {}
9176
9176
  };
9177
- /** 选 zip → upload 受控临时区;upload 模式预填 name 为 zip 文件名(可改);
9178
- * update 模式(更新直达表单页)留在 form 步骤并自动跑校验 */
9177
+ /** 选 zip → upload 受控临时区;upload 模式预填 name 为 zip 文件名(可改)。
9178
+ * 两种模式选完 zip 均**自动**跑校验(analyzeImport dry-run)——通过即直接进表单,
9179
+ * 用户无需再手动点「校验」按钮;失败留在校验步骤展示错误(可重选 zip)。 */
9179
9180
  const onPickFile = async (file) => {
9180
9181
  if (file === void 0) return;
9181
9182
  patchWizard({
@@ -9195,24 +9196,22 @@ function MyConfigsView({ meApi, api, importApi, syncApi, t, myItems, myItemsErro
9195
9196
  validated: false
9196
9197
  });
9197
9198
  await runValidateWith(uploaded.zipPath);
9198
- } else patchWizard({
9199
- ...base,
9200
- step: "validate",
9201
- form: {
9202
- ...wizardRef.current.form,
9203
- name: file.name.replace(/\.zip$/i, "")
9204
- }
9205
- });
9199
+ } else {
9200
+ patchWizard({
9201
+ ...base,
9202
+ step: "validate",
9203
+ form: {
9204
+ ...wizardRef.current.form,
9205
+ name: file.name.replace(/\.zip$/i, "")
9206
+ }
9207
+ });
9208
+ await runValidateWith(uploaded.zipPath);
9209
+ }
9206
9210
  } catch (err) {
9207
9211
  patchWizard({ error: err instanceof Error ? err.message : String(err) });
9208
9212
  }
9209
9213
  };
9210
- /** 步骤 2:analyzeImport dry-run(零写入)—— 无密钥 + 内容合法才放行;通过后进表单 */
9211
- const runValidate = async () => {
9212
- if (wizard.zipPath === null) return;
9213
- await runValidateWith(wizard.zipPath);
9214
- };
9215
- /** 校验指定 zipPath(update 模式选新 zip 后自动调用;任何异常都落到 validationError 展示,不静默) */
9214
+ /** 校验指定 zipPath(选完 zip 自动调用;任何异常都落到 validationError 展示,不静默) */
9216
9215
  const runValidateWith = async (zipPath) => {
9217
9216
  try {
9218
9217
  patchWizard({
@@ -9654,20 +9653,14 @@ function MyConfigsView({ meApi, api, importApi, syncApi, t, myItems, myItemsErro
9654
9653
  children: t("myconfigs.upload.selected", { name: wizard.fileName })
9655
9654
  })
9656
9655
  }),
9657
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
9656
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
9658
9657
  className: config_manager_module_css_default.actionRow,
9659
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
9658
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
9660
9659
  variant: "primary",
9661
- disabled: wizard.zipPath === null || wizard.validating,
9662
- onClick: () => {
9663
- runValidate();
9664
- },
9665
- children: wizard.validating ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Spinner, { label: t("myconfigs.upload.validating") }) : t("myconfigs.upload.validate")
9666
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
9667
9660
  disabled: wizard.validating,
9668
9661
  onClick: reset,
9669
- children: t("myconfigs.upload.reselect")
9670
- })]
9662
+ children: wizard.validating ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Spinner, { label: t("myconfigs.upload.validating") }) : t("myconfigs.upload.reselect")
9663
+ })
9671
9664
  }),
9672
9665
  wizard.validationError !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Banner, {
9673
9666
  kind: "error",