dsh-config-manager 0.1.29 → 0.1.30

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
@@ -2145,108 +2145,108 @@ if (typeof document !== "undefined" && document.querySelector("style[data-tag=\"
2145
2145
  document.head.appendChild(tag);
2146
2146
  }
2147
2147
  var config_manager_module_css_default = {
2148
- "groupHeader": "_367UGW_groupHeader",
2149
- "reportFooter": "_367UGW_reportFooter",
2150
- "viewTabs": "_367UGW_viewTabs",
2151
- "spinnerLabel": "_367UGW_spinnerLabel",
2152
- "dshCmSpin": "_367UGW_dshCmSpin",
2153
- "formError": "_367UGW_formError",
2154
- "primaryButton": "_367UGW_primaryButton",
2155
- "ghostButton": "_367UGW_ghostButton",
2156
- "pathNew": "_367UGW_pathNew",
2157
- "errorItem": "_367UGW_errorItem",
2158
- "snapshotRow": "_367UGW_snapshotRow",
2159
- "field": "_367UGW_field",
2160
- "card": "_367UGW_card",
2148
+ "reportScroll": "_367UGW_reportScroll",
2149
+ "confirmScroll": "_367UGW_confirmScroll",
2150
+ "banner": "_367UGW_banner",
2151
+ "kindTag": "_367UGW_kindTag",
2152
+ "reportView": "_367UGW_reportView",
2153
+ "hiddenFile": "_367UGW_hiddenFile",
2161
2154
  "errorReason": "_367UGW_errorReason",
2162
- "checkboxRow": "_367UGW_checkboxRow",
2163
- "errorBanner": "_367UGW_errorBanner",
2164
- "diffScroll": "_367UGW_diffScroll",
2165
- "snapshotList": "_367UGW_snapshotList",
2166
- "rowActions": "_367UGW_rowActions",
2167
- "groupNote": "_367UGW_groupNote",
2168
- "fieldLabel": "_367UGW_fieldLabel",
2169
- "sectionTitleBlock": "_367UGW_sectionTitleBlock",
2170
- "groupList": "_367UGW_groupList",
2171
2155
  "conflictId": "_367UGW_conflictId",
2172
- "progressLabel": "_367UGW_progressLabel",
2173
- "progressBadgeCount": "_367UGW_progressBadgeCount",
2174
- "severityError": "_367UGW_severityError",
2175
- "pathIssueKind": "_367UGW_pathIssueKind",
2176
- "hint": "_367UGW_hint",
2177
- "progressTrack": "_367UGW_progressTrack",
2178
- "conflictList": "_367UGW_conflictList",
2179
- "empty": "_367UGW_empty",
2180
- "hiddenFile": "_367UGW_hiddenFile",
2181
- "badgeOk": "_367UGW_badgeOk",
2182
- "categoryItem": "_367UGW_categoryItem",
2183
- "conflictOptions": "_367UGW_conflictOptions",
2184
- "pathValue": "_367UGW_pathValue",
2185
- "reportScroll": "_367UGW_reportScroll",
2186
- "progressPercent": "_367UGW_progressPercent",
2187
- "radioLabel": "_367UGW_radioLabel",
2188
- "categoryName": "_367UGW_categoryName",
2189
- "section": "_367UGW_section",
2190
- "progressDetail": "_367UGW_progressDetail",
2156
+ "dshCmSpin": "_367UGW_dshCmSpin",
2157
+ "reportList": "_367UGW_reportList",
2158
+ "errorTitle": "_367UGW_errorTitle",
2159
+ "pullScroll": "_367UGW_pullScroll",
2160
+ "groupNote": "_367UGW_groupNote",
2161
+ "optionsCard": "_367UGW_optionsCard",
2162
+ "modeHint": "_367UGW_modeHint",
2191
2163
  "input": "_367UGW_input",
2164
+ "radioLabel": "_367UGW_radioLabel",
2192
2165
  "modeTab": "_367UGW_modeTab",
2193
- "statRow": "_367UGW_statRow",
2194
- "rollbackBox": "_367UGW_rollbackBox",
2195
- "errorAction": "_367UGW_errorAction",
2196
- "errorFooter": "_367UGW_errorFooter",
2197
- "conflictItem": "_367UGW_conflictItem",
2198
- "planScroll": "_367UGW_planScroll",
2199
- "badgeWarn": "_367UGW_badgeWarn",
2200
- "confirmScroll": "_367UGW_confirmScroll",
2201
- "pathMappingList": "_367UGW_pathMappingList",
2202
2166
  "groupLabel": "_367UGW_groupLabel",
2203
- "secretFields": "_367UGW_secretFields",
2204
- "warnList": "_367UGW_warnList",
2205
- "progressBadgeSection": "_367UGW_progressBadgeSection",
2206
- "kindTag": "_367UGW_kindTag",
2207
- "badgeError": "_367UGW_badgeError",
2208
- "dshCmIndeterminate": "_367UGW_dshCmIndeterminate",
2209
- "pullScroll": "_367UGW_pullScroll",
2210
- "errorTitle": "_367UGW_errorTitle",
2211
- "errorList": "_367UGW_errorList",
2212
- "reportText": "_367UGW_reportText",
2213
- "progressBadge": "_367UGW_progressBadge",
2214
- "banner": "_367UGW_banner",
2215
- "progressIndeterminate": "_367UGW_progressIndeterminate",
2216
- "badge": "_367UGW_badge",
2217
- "categoryDesc": "_367UGW_categoryDesc",
2167
+ "progressDetail": "_367UGW_progressDetail",
2168
+ "planScroll": "_367UGW_planScroll",
2218
2169
  "sectionTitle": "_367UGW_sectionTitle",
2219
- "actionRow": "_367UGW_actionRow",
2220
2170
  "progressMeta": "_367UGW_progressMeta",
2171
+ "reportFooter": "_367UGW_reportFooter",
2172
+ "progressBadgeSection": "_367UGW_progressBadgeSection",
2221
2173
  "progressBarDone": "_367UGW_progressBarDone",
2222
- "reportView": "_367UGW_reportView",
2223
- "conflictDetail": "_367UGW_conflictDetail",
2224
- "secretsList": "_367UGW_secretsList",
2225
- "modeHint": "_367UGW_modeHint",
2226
- "progressBlock": "_367UGW_progressBlock",
2174
+ "viewTabs": "_367UGW_viewTabs",
2175
+ "empty": "_367UGW_empty",
2227
2176
  "warnText": "_367UGW_warnText",
2228
- "viewBody": "_367UGW_viewBody",
2229
- "pathOld": "_367UGW_pathOld",
2230
- "dangerButton": "_367UGW_dangerButton",
2231
- "spinner": "_367UGW_spinner",
2232
- "groupCard": "_367UGW_groupCard",
2233
- "optionsCard": "_367UGW_optionsCard",
2234
- "pathRow": "_367UGW_pathRow",
2235
- "errorLine": "_367UGW_errorLine",
2236
- "groupItems": "_367UGW_groupItems",
2177
+ "badgeError": "_367UGW_badgeError",
2237
2178
  "conflictHead": "_367UGW_conflictHead",
2238
- "sectionBody": "_367UGW_sectionBody",
2179
+ "groupCard": "_367UGW_groupCard",
2180
+ "severityError": "_367UGW_severityError",
2239
2181
  "spinnerWrap": "_367UGW_spinnerWrap",
2240
- "reportList": "_367UGW_reportList",
2241
- "badgeInfo": "_367UGW_badgeInfo",
2242
- "sectionHeader": "_367UGW_sectionHeader",
2182
+ "reportText": "_367UGW_reportText",
2183
+ "spinner": "_367UGW_spinner",
2184
+ "progressBadgeCount": "_367UGW_progressBadgeCount",
2243
2185
  "viewTab": "_367UGW_viewTab",
2186
+ "sectionTitleBlock": "_367UGW_sectionTitleBlock",
2187
+ "badge": "_367UGW_badge",
2188
+ "progressBar": "_367UGW_progressBar",
2189
+ "card": "_367UGW_card",
2190
+ "ghostButton": "_367UGW_ghostButton",
2191
+ "groupList": "_367UGW_groupList",
2192
+ "errorBanner": "_367UGW_errorBanner",
2193
+ "conflictItem": "_367UGW_conflictItem",
2194
+ "spinnerLabel": "_367UGW_spinnerLabel",
2195
+ "sectionBody": "_367UGW_sectionBody",
2196
+ "pathOld": "_367UGW_pathOld",
2197
+ "badgeWarn": "_367UGW_badgeWarn",
2198
+ "progressPercent": "_367UGW_progressPercent",
2199
+ "primaryButton": "_367UGW_primaryButton",
2200
+ "viewBody": "_367UGW_viewBody",
2201
+ "rollbackBox": "_367UGW_rollbackBox",
2202
+ "checkboxRow": "_367UGW_checkboxRow",
2203
+ "errorFooter": "_367UGW_errorFooter",
2204
+ "rowActions": "_367UGW_rowActions",
2205
+ "progressBlock": "_367UGW_progressBlock",
2206
+ "pathValue": "_367UGW_pathValue",
2207
+ "progressBadge": "_367UGW_progressBadge",
2208
+ "snapshotRowHeader": "_367UGW_snapshotRowHeader",
2209
+ "actionRow": "_367UGW_actionRow",
2210
+ "errorItem": "_367UGW_errorItem",
2211
+ "conflictDetail": "_367UGW_conflictDetail",
2212
+ "progressLabel": "_367UGW_progressLabel",
2213
+ "progressIndeterminate": "_367UGW_progressIndeterminate",
2214
+ "diffScroll": "_367UGW_diffScroll",
2215
+ "dshCmIndeterminate": "_367UGW_dshCmIndeterminate",
2216
+ "categoryDesc": "_367UGW_categoryDesc",
2217
+ "pathNew": "_367UGW_pathNew",
2244
2218
  "sectionSubtitle": "_367UGW_sectionSubtitle",
2219
+ "groupHeader": "_367UGW_groupHeader",
2220
+ "snapshotRow": "_367UGW_snapshotRow",
2245
2221
  "select": "_367UGW_select",
2246
- "progressBar": "_367UGW_progressBar",
2247
- "errorActionLabel": "_367UGW_errorActionLabel",
2222
+ "fieldLabel": "_367UGW_fieldLabel",
2248
2223
  "modeTabs": "_367UGW_modeTabs",
2249
- "snapshotRowHeader": "_367UGW_snapshotRowHeader"
2224
+ "errorLine": "_367UGW_errorLine",
2225
+ "field": "_367UGW_field",
2226
+ "categoryItem": "_367UGW_categoryItem",
2227
+ "errorList": "_367UGW_errorList",
2228
+ "hint": "_367UGW_hint",
2229
+ "secretFields": "_367UGW_secretFields",
2230
+ "badgeInfo": "_367UGW_badgeInfo",
2231
+ "sectionHeader": "_367UGW_sectionHeader",
2232
+ "badgeOk": "_367UGW_badgeOk",
2233
+ "conflictList": "_367UGW_conflictList",
2234
+ "pathMappingList": "_367UGW_pathMappingList",
2235
+ "progressTrack": "_367UGW_progressTrack",
2236
+ "statRow": "_367UGW_statRow",
2237
+ "pathRow": "_367UGW_pathRow",
2238
+ "dangerButton": "_367UGW_dangerButton",
2239
+ "section": "_367UGW_section",
2240
+ "pathIssueKind": "_367UGW_pathIssueKind",
2241
+ "warnList": "_367UGW_warnList",
2242
+ "groupItems": "_367UGW_groupItems",
2243
+ "errorActionLabel": "_367UGW_errorActionLabel",
2244
+ "categoryName": "_367UGW_categoryName",
2245
+ "formError": "_367UGW_formError",
2246
+ "errorAction": "_367UGW_errorAction",
2247
+ "conflictOptions": "_367UGW_conflictOptions",
2248
+ "secretsList": "_367UGW_secretsList",
2249
+ "snapshotList": "_367UGW_snapshotList"
2250
2250
  };
2251
2251
  //#endregion
2252
2252
  //#region src/client/common/ui.tsx
@@ -6037,11 +6037,17 @@ function intervalLabel(iv, t) {
6037
6037
  *
6038
6038
  * 运行时可经 `DSH_CONFIG_MARKET_URL` 覆盖(便于维护者切换/预览其他仓库),默认指向
6039
6039
  * 官方公开市场。公开仓库:无需任何凭据(继承 m-market 的“无 secret”硬不变式)。
6040
+ *
6041
+ * ⚠️ 浏览器安全:本模块会被 web 端(MarketPanel)直接打包加载,浏览器没有 Node 的
6042
+ * `process` 全局。因此在模块顶层读取环境变量时必须用 `typeof process !== 'undefined'`
6043
+ * 防御,否则会抛 `ReferenceError: process is not defined` 导致插件加载失败。
6040
6044
  */
6041
- const BUILTIN_MARKET_URL = (process.env.DSH_CONFIG_MARKET_URL ?? "https://github.com/xiajiajun516/dsh-config-market.git").trim();
6042
- /** 内置市场是否为默认官方地址(用于 UI 展示「内置 / 官方」徽章与文案)。 */
6045
+ const DEFAULT_MARKET_URL = "https://github.com/xiajiajun516/dsh-config-market.git";
6046
+ /** 内置市场仓库 URL(host/Node 端可经 `DSH_CONFIG_MARKET_URL` 覆盖;web 端安全回退默认官方地址)。 */
6047
+ const BUILTIN_MARKET_URL = (typeof process !== "undefined" && process.env?.DSH_CONFIG_MARKET_URL ? process.env.DSH_CONFIG_MARKET_URL : DEFAULT_MARKET_URL).trim();
6048
+ /** 内置市场是否为默认官方地址(固定默认值比较,不随 env 覆盖变化,保证 UI 判断稳定)。 */
6043
6049
  function isOfficialMarket(url) {
6044
- return url.trim() === BUILTIN_MARKET_URL;
6050
+ return url.trim() === DEFAULT_MARKET_URL;
6045
6051
  }
6046
6052
  //#endregion
6047
6053
  //#region src/market/view.ts