dsh-config-manager 0.4.1 → 0.4.3
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/README.md +14 -0
- package/lib/cli/actions.js +2 -3
- package/lib/cli/import-source.js +2 -6
- package/lib/cli/index.js +2 -3
- package/lib/client.d.ts +5 -5
- package/lib/client.js +26250 -25872
- package/lib/core/access-mode.d.ts +25 -0
- package/lib/core/access-mode.js +28 -0
- package/lib/core/exporter.js +2 -4
- package/lib/core/host-schedulers/cache-cleanup.d.ts +41 -0
- package/lib/core/host-schedulers/cache-cleanup.js +45 -0
- package/lib/core/host-schedulers/lifecycle-hooks.d.ts +51 -0
- package/lib/core/host-schedulers/lifecycle-hooks.js +78 -0
- package/lib/core/host-schedulers/market-cache.d.ts +40 -0
- package/lib/core/host-schedulers/market-cache.js +92 -0
- package/lib/core/model-tools.js +2 -6
- package/lib/core/restore.d.ts +0 -2
- package/lib/core/restore.js +16 -18
- package/lib/core/verify-recovery.js +4 -7
- package/lib/index.d.ts +3 -22
- package/lib/index.js +74 -330
- package/lib/profiles/dsh-profile-manager.d.ts +23 -1
- package/lib/profiles/dsh-profile-manager.js +70 -2
- package/lib/routes/kit.d.ts +61 -1
- package/lib/routes/kit.js +72 -3
- package/lib/routes/prefs.js +6 -6
- package/lib/routes/recovery.js +25 -41
- package/lib/routes/request-trust.d.ts +28 -0
- package/lib/routes/request-trust.js +65 -0
- package/lib/routes/route-support.d.ts +23 -1
- package/lib/routes/route-support.js +185 -0
- package/lib/routes/snapshots.js +4 -11
- package/lib/routes/sync.js +5 -7
- package/lib/security/redaction.d.ts +5 -1
- package/lib/security/redaction.js +26 -23
- package/lib/sync/backup-scheduler.js +2 -6
- package/lib/ui/backup-inspect.d.ts +1 -1
- package/lib/ui/dsh-profiles-view.d.ts +0 -10
- package/lib/ui/dsh-profiles-view.js +3 -7
- package/lib/ui/snapshots-view.d.ts +0 -14
- package/lib/ui/snapshots-view.js +16 -2
- package/lib/utils/paths.d.ts +20 -4
- package/lib/utils/paths.js +22 -6
- package/lib/utils/time.d.ts +31 -0
- package/lib/utils/time.js +54 -0
- package/package.json +1 -1
- package/src/cli/actions.ts +2 -3
- package/src/cli/import-source.ts +2 -7
- package/src/cli/index.ts +2 -3
- package/src/client/about/AboutPanel.tsx +8 -1
- package/src/client/about/ReleaseBody.tsx +22 -52
- package/src/client/about/ReleaseNotesDialog.tsx +15 -69
- package/src/client/about/release-notes-view.ts +4 -11
- package/src/client/common/access-mode.ts +21 -0
- package/src/client/common/info-hint-guard.test.ts +11 -5
- package/src/client/common/ui.tsx +23 -0
- package/src/client/config-manager.module.css +201 -32
- package/src/client/css-token-guard.test.ts +135 -1
- package/src/client/home/HomePanel.tsx +31 -6
- package/src/client/import/ConflictList.tsx +3 -3
- package/src/client/import/ImportWizardView.tsx +1 -1
- package/src/client/library/ArtifactRow.tsx +2 -2
- package/src/client/library/RestorePlanView.tsx +21 -9
- package/src/client/library/report-dismiss.test.ts +5 -3
- package/src/client/locales/about.ts +103 -0
- package/src/client/locales/backup.ts +141 -0
- package/src/client/locales/common.ts +113 -0
- package/src/client/locales/export.ts +184 -0
- package/src/client/locales/foreign.ts +184 -0
- package/src/client/locales/import-compat.ts +32 -0
- package/src/client/locales/import.ts +192 -0
- package/src/client/locales/next-steps.ts +25 -0
- package/src/client/locales/overview-control.ts +32 -0
- package/src/client/locales/overview.ts +153 -0
- package/src/client/locales/profiles.ts +263 -0
- package/src/client/locales/report.ts +17 -0
- package/src/client/locales/restore.ts +132 -0
- package/src/client/locales/sessions.ts +257 -0
- package/src/client/locales/shell.ts +149 -0
- package/src/client/locales.ts +49 -1783
- package/src/client/market/MarketImportReview.tsx +2 -2
- package/src/client/market/MarketPanel.tsx +1 -1
- package/src/client/market/market-view.ts +3 -5
- package/src/client/recovery/RecoveryPanel.tsx +62 -1054
- package/src/client/recovery/SessionHealthCard.tsx +134 -0
- package/src/client/recovery/SessionHealthDialog.tsx +665 -0
- package/src/client/recovery/SessionLayoutSection.tsx +284 -0
- package/src/client/recovery/recovery-api.ts +10 -1
- package/src/client/recovery/recovery-panel-layout.test.ts +20 -5
- package/src/client/recovery/session-dialog-mount.test.ts +16 -9
- package/src/client/recovery/use-recovery-write.test.ts +90 -0
- package/src/client/recovery/use-recovery-write.ts +53 -0
- package/src/client/run-store.ts +57 -2
- package/src/client/sync/PushPreviewCard.tsx +2 -2
- package/src/client/sync/SyncConfirmView.tsx +5 -5
- package/src/client/sync/SyncLogList.tsx +2 -2
- package/src/client/sync/history-model.ts +4 -5
- package/src/client/sync/sync-view.ts +3 -4
- package/src/core/access-mode.ts +37 -0
- package/src/core/exporter.ts +2 -4
- package/src/core/host-schedulers/cache-cleanup.test.ts +84 -0
- package/src/core/host-schedulers/cache-cleanup.ts +74 -0
- package/src/core/host-schedulers/lifecycle-hooks.test.ts +111 -0
- package/src/core/host-schedulers/lifecycle-hooks.ts +118 -0
- package/src/core/host-schedulers/market-cache.test.ts +93 -0
- package/src/core/host-schedulers/market-cache.ts +116 -0
- package/src/core/model-tools.ts +2 -7
- package/src/core/restore-failure-state.test.ts +210 -0
- package/src/core/restore.ts +16 -18
- package/src/core/verify-recovery.ts +4 -7
- package/src/index.ts +81 -335
- package/src/profiles/dsh-profile-copy-rollback.test.ts +156 -0
- package/src/profiles/dsh-profile-manager.ts +71 -3
- package/src/routes/kit.ts +106 -3
- package/src/routes/prefs.ts +6 -6
- package/src/routes/recovery.ts +25 -42
- package/src/routes/request-trust.ts +97 -0
- package/src/routes/route-support.ts +208 -1
- package/src/routes/snapshots.ts +4 -9
- package/src/routes/sync.ts +4 -7
- package/src/security/redaction.ts +29 -23
- package/src/sync/backup-scheduler.ts +3 -6
- package/src/sync/sync-config.test.ts +24 -13
- package/src/ui/backup-inspect.ts +1 -1
- package/src/ui/dsh-profiles-view.ts +3 -5
- package/src/ui/i18n.test.ts +8 -3
- package/src/ui/snapshots-view.ts +2 -2
- package/src/utils/paths.test.ts +36 -1
- package/src/utils/paths.ts +30 -6
- package/src/utils/time.test.ts +46 -0
- package/src/utils/time.ts +55 -0
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
type MarketPickerFilter, type MarketReviewStep,
|
|
38
38
|
} from '../../ui/market-import.ts'
|
|
39
39
|
import { redact } from '../../security/redaction.ts'
|
|
40
|
-
import { Badge, Banner, Button, Segmented, Stepper } from '../common/ui.tsx'
|
|
40
|
+
import { Badge, Banner, Button, Chip, Segmented, Stepper } from '../common/ui.tsx'
|
|
41
41
|
import { ContentPicker } from '../common/ContentPicker.tsx'
|
|
42
42
|
import { ConflictList } from '../import/ConflictList.tsx'
|
|
43
43
|
import { ConfirmDialog } from '../common/ConfirmDialog.tsx'
|
|
@@ -231,7 +231,7 @@ export function MarketImportReview({
|
|
|
231
231
|
.map((s) => (
|
|
232
232
|
<div key={s.section} className={css.conflictItem}>
|
|
233
233
|
<div className={css.conflictHead}>
|
|
234
|
-
<
|
|
234
|
+
<Chip>{labelOf(s.section)}</Chip>
|
|
235
235
|
<span className={css.pickerCount}>
|
|
236
236
|
{t('review.sectionUnits', { selected: String(s.selectedUnits), total: String(s.totalUnits) })}
|
|
237
237
|
</span>
|
|
@@ -522,7 +522,7 @@ export function MarketPanel({ api, myConfigsApi, importApi, syncApi, t, cmT, ope
|
|
|
522
522
|
</Banner>
|
|
523
523
|
<div className={css.warnList}>
|
|
524
524
|
{detailView.warnings.map((w, i) => (
|
|
525
|
-
<li key={i}
|
|
525
|
+
<li key={i} className={w.kind === 'warn' ? css.warnText : undefined}>
|
|
526
526
|
{w.text}
|
|
527
527
|
</li>
|
|
528
528
|
))}
|
|
@@ -29,6 +29,7 @@ import type { ImportAnalysis, ImportPlan, PlanItemKind } from '../../core/types.
|
|
|
29
29
|
import type { SectionId } from '../../schema/types.ts';
|
|
30
30
|
import type { UiT } from '../../ui/i18n.ts';
|
|
31
31
|
import { isOfficialMarket } from '../../market/builtin.ts';
|
|
32
|
+
import { formatMinuteStamp, parseDateInput } from '../../utils/time.ts';
|
|
32
33
|
|
|
33
34
|
/* ---------------------------------------------------------------- 客户端专属:来源徽章 */
|
|
34
35
|
|
|
@@ -171,11 +172,8 @@ export function collectCachedSections(items: readonly MarketListItem[]): Section
|
|
|
171
172
|
|
|
172
173
|
/** ISO-8601 → 本地可读时间(YYYY-MM-DD HH:mm;非法/空输入原样返回)。 */
|
|
173
174
|
export function formatMarketTime(iso: string): string {
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
if (Number.isNaN(d.getTime())) return iso;
|
|
177
|
-
const pad = (n: number): string => String(n).padStart(2, '0');
|
|
178
|
-
return `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())} ${pad(d.getHours())}:${pad(d.getMinutes())}`;
|
|
175
|
+
const d = parseDateInput(iso);
|
|
176
|
+
return d === null ? iso : formatMinuteStamp(d);
|
|
179
177
|
}
|
|
180
178
|
|
|
181
179
|
/* ---------------------------------------------------------------- 客户端专属:供应链警示着色行 */
|