dsh-config-manager 0.3.0 → 0.4.0
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 +33 -1
- package/lib/client.js +1063 -838
- package/lib/core/env-lock-lifecycle.d.ts +45 -0
- package/lib/core/env-lock-lifecycle.js +43 -0
- package/lib/core/history-prune.d.ts +34 -0
- package/lib/core/history-prune.js +43 -0
- package/lib/core/index.d.ts +1 -1
- package/lib/core/index.js +1 -1
- package/lib/core/migration-history.d.ts +28 -2
- package/lib/core/migration-history.js +41 -4
- package/lib/index.d.ts +2 -2
- package/lib/index.js +24 -6
- package/lib/routes/history.js +70 -5
- package/lib/routes/index.d.ts +1 -1
- package/lib/routes/kit.d.ts +2 -2
- package/lib/routes/messages.d.ts +1 -0
- package/lib/routes/messages.js +3 -0
- package/lib/sync/autosync-scheduler.js +6 -0
- package/lib/sync/backup-scheduler.js +6 -0
- package/lib/sync/s3/oss4-verify.js +21 -6
- package/lib/sync/s3/s3-providers.d.ts +13 -0
- package/lib/sync/s3/s3-providers.js +6 -0
- package/lib/sync/s3/s3-transport.d.ts +22 -0
- package/lib/sync/s3/s3-transport.js +89 -18
- package/lib/sync/ui-prefs.d.ts +8 -0
- package/lib/sync/ui-prefs.js +8 -0
- package/lib/utils/env-lock.d.ts +55 -1
- package/lib/utils/env-lock.js +131 -2
- package/lib/utils/messages-utils.d.ts +3 -0
- package/lib/utils/messages-utils.js +6 -0
- package/package.json +1 -1
- package/src/client/common/InfoHint.tsx +12 -3
- package/src/client/common/Skeleton.tsx +45 -8
- package/src/client/common/info-hint-guard.test.ts +196 -0
- package/src/client/common/routes.ts +3 -1
- package/src/client/common/skeleton-guard.test.ts +58 -0
- package/src/client/common/ui.tsx +17 -4
- package/src/client/config-manager.module.css +256 -27
- package/src/client/css-motion-guard.test.ts +230 -0
- package/src/client/environment/EnvironmentPanel.tsx +41 -29
- package/src/client/environment/maintenance/DiskUsageCard.tsx +28 -33
- package/src/client/environment/profiles-incomplete-ui.test.ts +9 -5
- package/src/client/export/ExportView.tsx +6 -6
- package/src/client/history/HistoryPanel.tsx +87 -2
- package/src/client/history/history-api.ts +49 -3
- package/src/client/history/history-locales.ts +30 -0
- package/src/client/home/HomePanel.tsx +55 -23
- package/src/client/market/MyConfigsWizard.tsx +12 -3
- package/src/client/recovery/RecoveryPanel.tsx +93 -92
- package/src/client/recovery/RollbackCard.tsx +25 -16
- package/src/client/sync/AutosyncCard.tsx +12 -6
- package/src/client/sync/ChannelConfigDialog.tsx +45 -45
- package/src/client/sync/DecryptPasswordCard.tsx +3 -3
- package/src/client/sync/SecurityOptionsCard.tsx +3 -3
- package/src/client/sync/SyncSectionPickerDialog.tsx +3 -3
- package/src/core/env-lock-lifecycle.ts +73 -0
- package/src/core/history-prune.test.ts +115 -0
- package/src/core/history-prune.ts +61 -0
- package/src/core/index.ts +2 -0
- package/src/core/migration-history.test.ts +78 -0
- package/src/core/migration-history.ts +46 -4
- package/src/index.ts +25 -6
- package/src/routes/history.ts +81 -4
- package/src/routes/index.ts +1 -1
- package/src/routes/kit.ts +2 -2
- package/src/routes/messages.ts +3 -0
- package/src/sync/autosync-scheduler.ts +3 -0
- package/src/sync/backup-scheduler.ts +3 -0
- package/src/sync/s3/oss4-verify.ts +22 -6
- package/src/sync/s3/s3-conditional-write.test.ts +153 -3
- package/src/sync/s3/s3-providers.ts +20 -0
- package/src/sync/s3/s3-transport.oss4-server.test.ts +48 -0
- package/src/sync/s3/s3-transport.ts +98 -17
- package/src/sync/ui-prefs.test.ts +32 -0
- package/src/sync/ui-prefs.ts +16 -0
- package/src/utils/env-lock.test.ts +107 -0
- package/src/utils/env-lock.ts +124 -2
- package/src/utils/messages-utils.ts +6 -0
package/lib/client.d.ts
CHANGED
|
@@ -4856,6 +4856,32 @@ interface HistoryListResult {
|
|
|
4856
4856
|
entries: StoredMigrationHistoryEntry[];
|
|
4857
4857
|
stats: MigrationHistoryStats;
|
|
4858
4858
|
corrupted: string[];
|
|
4859
|
+
/** 目录内合法历史文件总数(含被 limit 窗口挡在外的旧条目;老宿主可能不返回)。 */
|
|
4860
|
+
total?: number;
|
|
4861
|
+
/** 本次实际读取条数(= 窗口大小;用于「仅显示最近 N 条」提示)。 */
|
|
4862
|
+
scanned?: number;
|
|
4863
|
+
/** 本次生效的 limit(0 = 全量)。 */
|
|
4864
|
+
limit?: number;
|
|
4865
|
+
}
|
|
4866
|
+
/** 自动清理策略现状(GET /history/retention)。 */
|
|
4867
|
+
interface HistoryRetentionState {
|
|
4868
|
+
ok: boolean;
|
|
4869
|
+
/** 当前保留上限;0 = 不限制。 */
|
|
4870
|
+
maxEntries: number;
|
|
4871
|
+
/** 目录内当前条数。 */
|
|
4872
|
+
total: number;
|
|
4873
|
+
/** 缺省上限(UI「恢复默认」用)。 */
|
|
4874
|
+
defaultMaxEntries: number;
|
|
4875
|
+
allowedMin: number;
|
|
4876
|
+
allowedMax: number;
|
|
4877
|
+
}
|
|
4878
|
+
/** 保存策略后的结果(POST /history/retention)。 */
|
|
4879
|
+
interface HistoryRetentionResult {
|
|
4880
|
+
ok: boolean;
|
|
4881
|
+
maxEntries: number;
|
|
4882
|
+
/** 本次立即清理删除的条数。 */
|
|
4883
|
+
removed: number;
|
|
4884
|
+
total: number;
|
|
4859
4885
|
}
|
|
4860
4886
|
/** 导出 JSON 返回体(markdown 走附件下载,不返回 JSON body)。 */
|
|
4861
4887
|
interface HistoryExportJsonResult {
|
|
@@ -4876,7 +4902,13 @@ declare class HistoryApi {
|
|
|
4876
4902
|
from?: number;
|
|
4877
4903
|
to?: number;
|
|
4878
4904
|
sections?: string[];
|
|
4905
|
+
/** 只读最近 N 条(缺省/0 = 全量;首页只取几十条避免全量读+回传)。 */
|
|
4906
|
+
limit?: number;
|
|
4879
4907
|
}): Promise<HistoryListResult>;
|
|
4908
|
+
/** GET /history/retention:当前自动清理策略 + 目录现状。 */
|
|
4909
|
+
getRetention(): Promise<HistoryRetentionState>;
|
|
4910
|
+
/** POST /history/retention:改保留上限并立即清理一次(0 = 不限制)。 */
|
|
4911
|
+
setRetention(maxEntries: number): Promise<HistoryRetentionResult>;
|
|
4880
4912
|
/**
|
|
4881
4913
|
* 导出历史报告(markdown → 下载附件;json → { text })。
|
|
4882
4914
|
* 过滤参数与 list 相同。
|
|
@@ -6939,7 +6971,7 @@ declare const zh$1: {
|
|
|
6939
6971
|
type RecoveryKey = keyof typeof zh$1;
|
|
6940
6972
|
type KindKey = `history.kind.${MigrationKind}`;
|
|
6941
6973
|
type ResultKey = `history.result.${MigrationResult}`;
|
|
6942
|
-
type CommonKey = 'history.subtitle' | 'history.empty' | 'history.loading' | 'history.corruptedBanner' | 'history.corruptedCount' | 'history.stats.total' | 'history.stats.success' | 'history.stats.failed' | 'history.stats.skipped' | 'history.filter.kind' | 'history.filter.result' | 'history.filter.recent' | 'history.filter.recent.all' | 'history.filter.recent.50' | 'history.filter.recent.200' | 'history.search.placeholder' | 'history.export.json' | 'history.export.markdown' | 'history.exported' | 'history.exporting' | 'history.exportError' | 'history.refresh' | 'history.refreshError' |
|
|
6974
|
+
type CommonKey = 'history.subtitle' | 'history.empty' | 'history.loading' | 'history.corruptedBanner' | 'history.corruptedCount' | 'history.stats.total' | 'history.stats.success' | 'history.stats.failed' | 'history.stats.skipped' | 'history.filter.kind' | 'history.filter.result' | 'history.filter.recent' | 'history.filter.recent.all' | 'history.filter.recent.50' | 'history.filter.recent.200' | 'history.search.placeholder' | 'history.export.json' | 'history.export.markdown' | 'history.exported' | 'history.exporting' | 'history.exportError' | 'history.refresh' | 'history.refreshError' | 'history.retention.label' | 'history.retention.hint' | 'history.retention.unlimited' | 'history.retention.units' | 'history.retention.current' | 'history.retention.runNow' | 'history.retention.running' | 'history.retention.cleaned' | 'history.retention.noop' | 'history.retention.saveError' |
|
|
6943
6975
|
/** ⓘ 说明按钮的可访问名(与主字典 / market / sync / recovery 同口径,见 info-hint-guard t6-4) */
|
|
6944
6976
|
'common.infoHint';
|
|
6945
6977
|
type HistoryKey = KindKey | ResultKey | CommonKey;
|