dsh-config-manager 0.1.14 → 0.1.15
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 +97 -88
- package/lib/client.js.map +1 -1
- package/package.json +1 -1
- package/src/client/run-store.test.ts +16 -0
- package/src/client/run-store.ts +15 -6
package/lib/client.js
CHANGED
|
@@ -1220,17 +1220,26 @@ var RunStore = class {
|
|
|
1220
1220
|
this.state = defaultState();
|
|
1221
1221
|
this.load();
|
|
1222
1222
|
}
|
|
1223
|
-
/**
|
|
1224
|
-
subscribe
|
|
1223
|
+
/**
|
|
1224
|
+
* 订阅 store 变化(useSyncExternalStore 的 subscribe)。
|
|
1225
|
+
*
|
|
1226
|
+
* 必须为箭头函数类字段:React 以裸引用(`runStore.subscribe`)调用它,
|
|
1227
|
+
* 无接收者,若为原型方法则 `this` 为 undefined,`this.listeners` 直接崩溃。
|
|
1228
|
+
*/
|
|
1229
|
+
subscribe = (listener) => {
|
|
1225
1230
|
this.listeners.add(listener);
|
|
1226
1231
|
return () => {
|
|
1227
1232
|
this.listeners.delete(listener);
|
|
1228
1233
|
};
|
|
1229
|
-
}
|
|
1230
|
-
/**
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
+
};
|
|
1235
|
+
/**
|
|
1236
|
+
* 当前完整快照(引用稳定:仅在 patch 后替换,适合 useSyncExternalStore)。
|
|
1237
|
+
*
|
|
1238
|
+
* 必须为箭头函数类字段:React 以裸引用(`runStore.getSnapshot`)调用它,
|
|
1239
|
+
* 无接收者,若为原型方法则 `this` 为 undefined,`this.state` 抛 TypeError,
|
|
1240
|
+
* 导致整个 settings.section 槽位渲染崩溃(备份与迁移页空白)。
|
|
1241
|
+
*/
|
|
1242
|
+
getSnapshot = () => this.state;
|
|
1234
1243
|
notify() {
|
|
1235
1244
|
for (const listener of this.listeners) listener();
|
|
1236
1245
|
}
|
|
@@ -1587,102 +1596,102 @@ if (typeof document !== "undefined" && document.querySelector("style[data-tag=\"
|
|
|
1587
1596
|
document.head.appendChild(tag);
|
|
1588
1597
|
}
|
|
1589
1598
|
var config_manager_module_css_default = {
|
|
1590
|
-
"
|
|
1591
|
-
"
|
|
1592
|
-
"
|
|
1593
|
-
"
|
|
1594
|
-
"banner": "_367UGW_banner",
|
|
1595
|
-
"progressPercent": "_367UGW_progressPercent",
|
|
1596
|
-
"dshCmSpin": "_367UGW_dshCmSpin",
|
|
1597
|
-
"reportFooter": "_367UGW_reportFooter",
|
|
1599
|
+
"sectionSubtitle": "_367UGW_sectionSubtitle",
|
|
1600
|
+
"dangerButton": "_367UGW_dangerButton",
|
|
1601
|
+
"progressBadgeCount": "_367UGW_progressBadgeCount",
|
|
1602
|
+
"progressBarDone": "_367UGW_progressBarDone",
|
|
1598
1603
|
"conflictId": "_367UGW_conflictId",
|
|
1599
|
-
"
|
|
1604
|
+
"pathMappingList": "_367UGW_pathMappingList",
|
|
1605
|
+
"badgeOk": "_367UGW_badgeOk",
|
|
1606
|
+
"radioLabel": "_367UGW_radioLabel",
|
|
1607
|
+
"categoryItem": "_367UGW_categoryItem",
|
|
1608
|
+
"groupItems": "_367UGW_groupItems",
|
|
1609
|
+
"progressTrack": "_367UGW_progressTrack",
|
|
1610
|
+
"groupCard": "_367UGW_groupCard",
|
|
1611
|
+
"checkboxRow": "_367UGW_checkboxRow",
|
|
1612
|
+
"groupLabel": "_367UGW_groupLabel",
|
|
1613
|
+
"modeHint": "_367UGW_modeHint",
|
|
1600
1614
|
"card": "_367UGW_card",
|
|
1601
|
-
"
|
|
1602
|
-
"
|
|
1603
|
-
"
|
|
1604
|
-
"
|
|
1615
|
+
"groupNote": "_367UGW_groupNote",
|
|
1616
|
+
"reportText": "_367UGW_reportText",
|
|
1617
|
+
"errorAction": "_367UGW_errorAction",
|
|
1618
|
+
"errorItem": "_367UGW_errorItem",
|
|
1619
|
+
"badgeInfo": "_367UGW_badgeInfo",
|
|
1605
1620
|
"secretsList": "_367UGW_secretsList",
|
|
1621
|
+
"badgeError": "_367UGW_badgeError",
|
|
1622
|
+
"ghostButton": "_367UGW_ghostButton",
|
|
1623
|
+
"dshCmSpin": "_367UGW_dshCmSpin",
|
|
1624
|
+
"empty": "_367UGW_empty",
|
|
1625
|
+
"errorLine": "_367UGW_errorLine",
|
|
1626
|
+
"pathOld": "_367UGW_pathOld",
|
|
1627
|
+
"errorReason": "_367UGW_errorReason",
|
|
1628
|
+
"section": "_367UGW_section",
|
|
1629
|
+
"groupHeader": "_367UGW_groupHeader",
|
|
1630
|
+
"pathValue": "_367UGW_pathValue",
|
|
1631
|
+
"banner": "_367UGW_banner",
|
|
1632
|
+
"snapshotList": "_367UGW_snapshotList",
|
|
1633
|
+
"categoryName": "_367UGW_categoryName",
|
|
1634
|
+
"sectionTitle": "_367UGW_sectionTitle",
|
|
1635
|
+
"progressLabel": "_367UGW_progressLabel",
|
|
1636
|
+
"errorActionLabel": "_367UGW_errorActionLabel",
|
|
1606
1637
|
"errorList": "_367UGW_errorList",
|
|
1607
|
-
"
|
|
1608
|
-
"
|
|
1638
|
+
"progressPercent": "_367UGW_progressPercent",
|
|
1639
|
+
"conflictOptions": "_367UGW_conflictOptions",
|
|
1640
|
+
"spinner": "_367UGW_spinner",
|
|
1609
1641
|
"kindTag": "_367UGW_kindTag",
|
|
1610
|
-
"reportList": "_367UGW_reportList",
|
|
1611
|
-
"statRow": "_367UGW_statRow",
|
|
1612
|
-
"dshCmIndeterminate": "_367UGW_dshCmIndeterminate",
|
|
1613
|
-
"dangerButton": "_367UGW_dangerButton",
|
|
1614
|
-
"progressBar": "_367UGW_progressBar",
|
|
1615
|
-
"badgeInfo": "_367UGW_badgeInfo",
|
|
1616
|
-
"groupCard": "_367UGW_groupCard",
|
|
1617
|
-
"hint": "_367UGW_hint",
|
|
1618
|
-
"warnList": "_367UGW_warnList",
|
|
1619
|
-
"errorAction": "_367UGW_errorAction",
|
|
1620
|
-
"spinnerWrap": "_367UGW_spinnerWrap",
|
|
1621
1642
|
"spinnerLabel": "_367UGW_spinnerLabel",
|
|
1622
|
-
"
|
|
1623
|
-
"
|
|
1624
|
-
"
|
|
1625
|
-
"
|
|
1626
|
-
"sectionTitleBlock": "_367UGW_sectionTitleBlock",
|
|
1627
|
-
"viewTabs": "_367UGW_viewTabs",
|
|
1628
|
-
"progressTrack": "_367UGW_progressTrack",
|
|
1629
|
-
"section": "_367UGW_section",
|
|
1643
|
+
"reportFooter": "_367UGW_reportFooter",
|
|
1644
|
+
"sectionHeader": "_367UGW_sectionHeader",
|
|
1645
|
+
"progressIndeterminate": "_367UGW_progressIndeterminate",
|
|
1646
|
+
"progressMeta": "_367UGW_progressMeta",
|
|
1630
1647
|
"viewBody": "_367UGW_viewBody",
|
|
1631
|
-
"
|
|
1632
|
-
"
|
|
1633
|
-
"
|
|
1634
|
-
"
|
|
1648
|
+
"sectionTitleBlock": "_367UGW_sectionTitleBlock",
|
|
1649
|
+
"hint": "_367UGW_hint",
|
|
1650
|
+
"conflictHead": "_367UGW_conflictHead",
|
|
1651
|
+
"warnList": "_367UGW_warnList",
|
|
1635
1652
|
"modeTabs": "_367UGW_modeTabs",
|
|
1653
|
+
"statRow": "_367UGW_statRow",
|
|
1654
|
+
"field": "_367UGW_field",
|
|
1655
|
+
"pathNew": "_367UGW_pathNew",
|
|
1656
|
+
"viewTabs": "_367UGW_viewTabs",
|
|
1657
|
+
"categoryDesc": "_367UGW_categoryDesc",
|
|
1658
|
+
"progressBar": "_367UGW_progressBar",
|
|
1636
1659
|
"errorFooter": "_367UGW_errorFooter",
|
|
1637
|
-
"
|
|
1638
|
-
"
|
|
1639
|
-
"groupItems": "_367UGW_groupItems",
|
|
1640
|
-
"groupList": "_367UGW_groupList",
|
|
1641
|
-
"sectionSubtitle": "_367UGW_sectionSubtitle",
|
|
1660
|
+
"conflictList": "_367UGW_conflictList",
|
|
1661
|
+
"warnText": "_367UGW_warnText",
|
|
1642
1662
|
"secretFields": "_367UGW_secretFields",
|
|
1643
|
-
"categoryName": "_367UGW_categoryName",
|
|
1644
|
-
"checkboxRow": "_367UGW_checkboxRow",
|
|
1645
|
-
"categoryItem": "_367UGW_categoryItem",
|
|
1646
|
-
"severityError": "_367UGW_severityError",
|
|
1647
|
-
"conflictItem": "_367UGW_conflictItem",
|
|
1648
|
-
"snapshotList": "_367UGW_snapshotList",
|
|
1649
|
-
"progressMeta": "_367UGW_progressMeta",
|
|
1650
|
-
"pathValue": "_367UGW_pathValue",
|
|
1651
|
-
"badgeWarn": "_367UGW_badgeWarn",
|
|
1652
|
-
"progressBadge": "_367UGW_progressBadge",
|
|
1653
|
-
"badgeError": "_367UGW_badgeError",
|
|
1654
|
-
"modeHint": "_367UGW_modeHint",
|
|
1655
|
-
"rollbackBox": "_367UGW_rollbackBox",
|
|
1656
|
-
"empty": "_367UGW_empty",
|
|
1657
|
-
"fieldLabel": "_367UGW_fieldLabel",
|
|
1658
|
-
"reportText": "_367UGW_reportText",
|
|
1659
|
-
"pathOld": "_367UGW_pathOld",
|
|
1660
|
-
"progressLabel": "_367UGW_progressLabel",
|
|
1661
1663
|
"input": "_367UGW_input",
|
|
1662
|
-
"
|
|
1663
|
-
"
|
|
1664
|
-
"
|
|
1665
|
-
"
|
|
1666
|
-
"
|
|
1667
|
-
"pathMappingList": "_367UGW_pathMappingList",
|
|
1668
|
-
"pathRow": "_367UGW_pathRow",
|
|
1669
|
-
"sectionTitle": "_367UGW_sectionTitle",
|
|
1670
|
-
"snapshotRow": "_367UGW_snapshotRow",
|
|
1664
|
+
"primaryButton": "_367UGW_primaryButton",
|
|
1665
|
+
"groupList": "_367UGW_groupList",
|
|
1666
|
+
"actionRow": "_367UGW_actionRow",
|
|
1667
|
+
"dshCmIndeterminate": "_367UGW_dshCmIndeterminate",
|
|
1668
|
+
"badge": "_367UGW_badge",
|
|
1671
1669
|
"hiddenFile": "_367UGW_hiddenFile",
|
|
1672
|
-
"
|
|
1673
|
-
"
|
|
1670
|
+
"optionsCard": "_367UGW_optionsCard",
|
|
1671
|
+
"reportView": "_367UGW_reportView",
|
|
1672
|
+
"rollbackBox": "_367UGW_rollbackBox",
|
|
1673
|
+
"conflictDetail": "_367UGW_conflictDetail",
|
|
1674
1674
|
"pathIssueKind": "_367UGW_pathIssueKind",
|
|
1675
|
-
"
|
|
1676
|
-
"
|
|
1677
|
-
"
|
|
1675
|
+
"viewTab": "_367UGW_viewTab",
|
|
1676
|
+
"errorBanner": "_367UGW_errorBanner",
|
|
1677
|
+
"spinnerWrap": "_367UGW_spinnerWrap",
|
|
1678
1678
|
"progressDetail": "_367UGW_progressDetail",
|
|
1679
|
-
"
|
|
1680
|
-
"
|
|
1679
|
+
"errorTitle": "_367UGW_errorTitle",
|
|
1680
|
+
"severityError": "_367UGW_severityError",
|
|
1681
|
+
"progressBlock": "_367UGW_progressBlock",
|
|
1682
|
+
"sectionBody": "_367UGW_sectionBody",
|
|
1683
|
+
"badgeWarn": "_367UGW_badgeWarn",
|
|
1684
|
+
"fieldLabel": "_367UGW_fieldLabel",
|
|
1685
|
+
"modeTab": "_367UGW_modeTab",
|
|
1686
|
+
"formError": "_367UGW_formError",
|
|
1681
1687
|
"progressBadgeSection": "_367UGW_progressBadgeSection",
|
|
1682
|
-
"
|
|
1683
|
-
"
|
|
1684
|
-
"
|
|
1685
|
-
"
|
|
1688
|
+
"conflictItem": "_367UGW_conflictItem",
|
|
1689
|
+
"snapshotRowHeader": "_367UGW_snapshotRowHeader",
|
|
1690
|
+
"progressBadge": "_367UGW_progressBadge",
|
|
1691
|
+
"snapshotRow": "_367UGW_snapshotRow",
|
|
1692
|
+
"reportList": "_367UGW_reportList",
|
|
1693
|
+
"pathRow": "_367UGW_pathRow",
|
|
1694
|
+
"rowActions": "_367UGW_rowActions"
|
|
1686
1695
|
};
|
|
1687
1696
|
//#endregion
|
|
1688
1697
|
//#region src/client/common/ui.tsx
|