dsh-git-worktree 0.1.1 → 0.2.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/CHANGELOG.md +59 -0
- package/LICENSE +21 -21
- package/README.md +115 -37
- package/README.zh.md +115 -37
- package/cordis.patch.yml +7 -7
- package/lib/adapters/registry.js +40 -0
- package/lib/adapters/registry.js.map +1 -1
- package/lib/adapters/safe-file.js +34 -4
- package/lib/adapters/safe-file.js.map +1 -1
- package/lib/client/WorktreeCreateRow.d.ts +7 -0
- package/lib/client/WorktreeCreateRow.js +26 -0
- package/lib/client/WorktreeCreateRow.js.map +1 -0
- package/lib/client/WorktreeReviewRow.d.ts +11 -0
- package/lib/client/WorktreeReviewRow.js +67 -0
- package/lib/client/WorktreeReviewRow.js.map +1 -0
- package/lib/client/actions.d.ts +86 -0
- package/lib/client/actions.js +35 -0
- package/lib/client/actions.js.map +1 -0
- package/lib/client/console-remote/adapter.d.ts +3 -0
- package/lib/client/console-remote/adapter.js +59 -0
- package/lib/client/console-remote/adapter.js.map +1 -0
- package/lib/client/console-remote/index.d.ts +18 -0
- package/lib/client/console-remote/index.js +17 -0
- package/lib/client/console-remote/index.js.map +1 -0
- package/lib/client/index.d.ts +17 -0
- package/lib/client/index.js +44 -0
- package/lib/client/index.js.map +1 -0
- package/lib/client/model.d.ts +68 -0
- package/lib/client/model.js +127 -0
- package/lib/client/model.js.map +1 -0
- package/lib/client/pre-session/PreSessionWorktreeToggle.d.ts +16 -0
- package/lib/client/pre-session/PreSessionWorktreeToggle.js +128 -0
- package/lib/client/pre-session/PreSessionWorktreeToggle.js.map +1 -0
- package/lib/client/pre-session/controller.d.ts +42 -0
- package/lib/client/pre-session/controller.js +149 -0
- package/lib/client/pre-session/controller.js.map +1 -0
- package/lib/client/pre-session/index.d.ts +15 -0
- package/lib/client/pre-session/index.js +16 -0
- package/lib/client/pre-session/index.js.map +1 -0
- package/lib/client/review-console/ReviewActions.d.ts +15 -0
- package/lib/client/review-console/ReviewActions.js +219 -0
- package/lib/client/review-console/ReviewActions.js.map +1 -0
- package/lib/client/review-console/WorktreeReviewPanel.d.ts +20 -0
- package/lib/client/review-console/WorktreeReviewPanel.js +75 -0
- package/lib/client/review-console/WorktreeReviewPanel.js.map +1 -0
- package/lib/client/review-console/index.d.ts +8 -0
- package/lib/client/review-console/index.js +22 -0
- package/lib/client/review-console/index.js.map +1 -0
- package/lib/client/review-console/review-console.styles.d.ts +1 -0
- package/lib/client/review-console/review-console.styles.js +81 -0
- package/lib/client/review-console/review-console.styles.js.map +1 -0
- package/lib/client/review-console/status-events.d.ts +3 -0
- package/lib/client/review-console/status-events.js +6 -0
- package/lib/client/review-console/status-events.js.map +1 -0
- package/lib/client/styles.d.ts +1 -0
- package/lib/client/styles.js +78 -0
- package/lib/client/styles.js.map +1 -0
- package/lib/client/target-console/TargetStatusAction.d.ts +7 -0
- package/lib/client/target-console/TargetStatusAction.js +46 -0
- package/lib/client/target-console/TargetStatusAction.js.map +1 -0
- package/lib/client/target-console/WorktreeConsoleView.d.ts +9 -0
- package/lib/client/target-console/WorktreeConsoleView.js +362 -0
- package/lib/client/target-console/WorktreeConsoleView.js.map +1 -0
- package/lib/client/target-console/WorktreeReviewStatus.d.ts +9 -0
- package/lib/client/target-console/WorktreeReviewStatus.js +91 -0
- package/lib/client/target-console/WorktreeReviewStatus.js.map +1 -0
- package/lib/client/target-console/index.d.ts +14 -0
- package/lib/client/target-console/index.js +23 -0
- package/lib/client/target-console/index.js.map +1 -0
- package/lib/client/target-console/target-console.styles.d.ts +1 -0
- package/lib/client/target-console/target-console.styles.js +130 -0
- package/lib/client/target-console/target-console.styles.js.map +1 -0
- package/lib/client.js +6813 -0
- package/lib/commands.d.ts +2 -4
- package/lib/commands.js +54 -28
- package/lib/commands.js.map +1 -1
- package/lib/console-contract.d.ts +236 -0
- package/lib/console-contract.js +86 -0
- package/lib/console-contract.js.map +1 -0
- package/lib/console-host/control-plane.d.ts +29 -0
- package/lib/console-host/control-plane.js +443 -0
- package/lib/console-host/control-plane.js.map +1 -0
- package/lib/console-host/errors.d.ts +6 -0
- package/lib/console-host/errors.js +31 -0
- package/lib/console-host/errors.js.map +1 -0
- package/lib/console-host/projection.d.ts +12 -0
- package/lib/console-host/projection.js +131 -0
- package/lib/console-host/projection.js.map +1 -0
- package/lib/console-host/review-diff.d.ts +18 -0
- package/lib/console-host/review-diff.js +176 -0
- package/lib/console-host/review-diff.js.map +1 -0
- package/lib/console-host/service.d.ts +24 -0
- package/lib/console-host/service.js +131 -0
- package/lib/console-host/service.js.map +1 -0
- package/lib/console-remote/descriptors.d.ts +3 -0
- package/lib/console-remote/descriptors.js +96 -0
- package/lib/console-remote/descriptors.js.map +1 -0
- package/lib/console-remote/remote.d.ts +27 -0
- package/lib/console-remote/remote.js +4 -0
- package/lib/console-remote/remote.js.map +1 -0
- package/lib/console-remote/schemas.d.ts +29 -0
- package/lib/console-remote/schemas.js +143 -0
- package/lib/console-remote/schemas.js.map +1 -0
- package/lib/console-remote/typert.d.ts +3 -0
- package/lib/console-remote/typert.js +14 -0
- package/lib/console-remote/typert.js.map +1 -0
- package/lib/index.d.ts +22 -6
- package/lib/index.js +28 -10
- package/lib/index.js.map +1 -1
- package/lib/managed-worktree-path.d.ts +14 -13
- package/lib/managed-worktree-path.js +32 -22
- package/lib/managed-worktree-path.js.map +1 -1
- package/lib/ports.d.ts +37 -1
- package/lib/session-checkout-apply.d.ts +54 -1
- package/lib/session-checkout-apply.js +318 -28
- package/lib/session-checkout-apply.js.map +1 -1
- package/lib/session-checkout-module.js +853 -33
- package/lib/session-checkout-module.js.map +1 -1
- package/lib/session-target-context.d.ts +6 -0
- package/lib/session-target-context.js +16 -0
- package/lib/session-target-context.js.map +1 -0
- package/lib/tools.d.ts +5 -6
- package/lib/tools.js +43 -233
- package/lib/tools.js.map +1 -1
- package/lib/types.d.ts +57 -11
- package/lib/types.js +6 -6
- package/lib/types.js.map +1 -1
- package/package.json +116 -67
- package/scripts/check-publish.mjs +193 -0
- package/scripts/clean-lib.mjs +7 -0
- package/scripts/dev-dsh-lib.mjs +453 -0
- package/scripts/dev-dsh.mjs +89 -0
- package/scripts/dsh-source-runner.mjs +14 -0
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
export const TARGET_CONSOLE_STYLES = String.raw `
|
|
2
|
+
.dsh-wtc-target-chip {
|
|
3
|
+
--wtc-state: #728096;
|
|
4
|
+
display: inline-flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
gap: 6px;
|
|
7
|
+
min-height: 24px;
|
|
8
|
+
padding: 2px 9px;
|
|
9
|
+
border: 1px solid color-mix(in srgb, var(--wtc-state) 35%, transparent);
|
|
10
|
+
border-radius: 999px;
|
|
11
|
+
background: color-mix(in srgb, var(--wtc-state) 9%, transparent);
|
|
12
|
+
color: inherit;
|
|
13
|
+
font-size: 12px;
|
|
14
|
+
font-weight: 650;
|
|
15
|
+
line-height: 1;
|
|
16
|
+
white-space: nowrap;
|
|
17
|
+
}
|
|
18
|
+
.dsh-wtc-target-dot, .dsh-wtc-state-dot {
|
|
19
|
+
width: 7px;
|
|
20
|
+
height: 7px;
|
|
21
|
+
flex: 0 0 auto;
|
|
22
|
+
border-radius: 999px;
|
|
23
|
+
background: var(--wtc-state);
|
|
24
|
+
box-shadow: 0 0 0 3px color-mix(in srgb, var(--wtc-state) 15%, transparent);
|
|
25
|
+
}
|
|
26
|
+
.dsh-wtc-target-chip[data-target-state="creating"] { --wtc-state: #c47a1c; }
|
|
27
|
+
.dsh-wtc-target-chip[data-target-state="working"] { --wtc-state: #2676dc; }
|
|
28
|
+
.dsh-wtc-target-chip[data-target-state="ready_for_review"] { --wtc-state: #25885d; }
|
|
29
|
+
.dsh-wtc-target-chip[data-target-state="retained"] { --wtc-state: #6b5bd2; }
|
|
30
|
+
.dsh-wtc-target-chip[data-target-state="cleanup_pending"] { --wtc-state: #c47a1c; }
|
|
31
|
+
.dsh-wtc-target-chip[data-target-state="recovery_required"],
|
|
32
|
+
.dsh-wtc-target-chip[data-target-state="error"] { --wtc-state: #c94747; }
|
|
33
|
+
.dsh-wtc-target-chip[data-target-state="delivered"] { opacity: .66; }
|
|
34
|
+
.dsh-wtc-target-expiry { color: color-mix(in srgb, currentColor 62%, transparent); font-weight: 520; }
|
|
35
|
+
|
|
36
|
+
.dsh-wtc-console {
|
|
37
|
+
--wtc-ink: color-mix(in srgb, currentColor 94%, transparent);
|
|
38
|
+
--wtc-muted: color-mix(in srgb, currentColor 58%, transparent);
|
|
39
|
+
--wtc-line: color-mix(in srgb, currentColor 14%, transparent);
|
|
40
|
+
--wtc-panel: color-mix(in srgb, currentColor 4%, transparent);
|
|
41
|
+
--wtc-blue: #2f6fd0;
|
|
42
|
+
--wtc-red: #c44747;
|
|
43
|
+
position: relative;
|
|
44
|
+
display: grid;
|
|
45
|
+
gap: 14px;
|
|
46
|
+
min-width: 0;
|
|
47
|
+
width: 100%;
|
|
48
|
+
padding: 18px clamp(12px, 3vw, 26px) 28px;
|
|
49
|
+
color: var(--wtc-ink);
|
|
50
|
+
box-sizing: border-box;
|
|
51
|
+
}
|
|
52
|
+
.dsh-wtc-console h2, .dsh-wtc-console h3 { margin: 0; letter-spacing: -.025em; }
|
|
53
|
+
.dsh-wtc-console h2 { font-size: clamp(20px, 3vw, 28px); font-weight: 720; }
|
|
54
|
+
.dsh-wtc-console h3 { font-size: 15px; font-weight: 680; }
|
|
55
|
+
.dsh-wtc-console-head, .dsh-wtc-section-head, .dsh-wtc-current,
|
|
56
|
+
.dsh-wtc-row, .dsh-wtc-row-title, .dsh-wtc-row-actions, .dsh-wtc-current-actions {
|
|
57
|
+
display: flex;
|
|
58
|
+
align-items: center;
|
|
59
|
+
}
|
|
60
|
+
.dsh-wtc-console-head, .dsh-wtc-section-head, .dsh-wtc-current, .dsh-wtc-row { justify-content: space-between; }
|
|
61
|
+
.dsh-wtc-console-head { gap: 16px; }
|
|
62
|
+
.dsh-wtc-kicker, .dsh-wtc-label {
|
|
63
|
+
display: block;
|
|
64
|
+
color: var(--wtc-muted);
|
|
65
|
+
font-size: 10px;
|
|
66
|
+
font-weight: 720;
|
|
67
|
+
letter-spacing: .1em;
|
|
68
|
+
text-transform: uppercase;
|
|
69
|
+
}
|
|
70
|
+
.dsh-wtc-kicker { margin-bottom: 3px; }
|
|
71
|
+
.dsh-wtc-current, .dsh-wtc-list-section {
|
|
72
|
+
min-width: 0;
|
|
73
|
+
border: 1px solid var(--wtc-line);
|
|
74
|
+
border-radius: 14px;
|
|
75
|
+
background: linear-gradient(145deg, color-mix(in srgb, currentColor 3%, transparent), transparent 52%);
|
|
76
|
+
}
|
|
77
|
+
.dsh-wtc-current { gap: 16px; padding: 14px 16px; }
|
|
78
|
+
.dsh-wtc-current > div:first-child { min-width: 0; display: grid; gap: 3px; }
|
|
79
|
+
.dsh-wtc-current strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
80
|
+
.dsh-wtc-current-actions, .dsh-wtc-row-actions { gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
|
|
81
|
+
.dsh-wtc-list-section { overflow: hidden; }
|
|
82
|
+
.dsh-wtc-section-head { padding: 12px 14px; border-bottom: 1px solid var(--wtc-line); }
|
|
83
|
+
.dsh-wtc-count { min-width: 26px; padding: 3px 7px; border-radius: 999px; background: var(--wtc-panel); color: var(--wtc-muted); text-align: center; font-size: 11px; }
|
|
84
|
+
.dsh-wtc-list { list-style: none; margin: 0; padding: 0; }
|
|
85
|
+
.dsh-wtc-row { position: relative; gap: 14px; min-width: 0; padding: 12px 14px; border-bottom: 1px solid var(--wtc-line); }
|
|
86
|
+
.dsh-wtc-row:last-child { border-bottom: 0; }
|
|
87
|
+
.dsh-wtc-row-main { min-width: 0; display: grid; gap: 6px; }
|
|
88
|
+
.dsh-wtc-row-title { min-width: 0; gap: 10px; }
|
|
89
|
+
.dsh-wtc-row-id { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 12px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
|
|
90
|
+
.dsh-wtc-state { --wtc-state: #728096; display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; font-size: 12px; font-weight: 680; }
|
|
91
|
+
.dsh-wtc-state[data-target-state="creating"], .dsh-wtc-state[data-target-state="cleanup_pending"] { --wtc-state: #c47a1c; }
|
|
92
|
+
.dsh-wtc-state[data-target-state="working"] { --wtc-state: #2676dc; }
|
|
93
|
+
.dsh-wtc-state[data-target-state="ready_for_review"] { --wtc-state: #25885d; }
|
|
94
|
+
.dsh-wtc-state[data-target-state="retained"] { --wtc-state: #6b5bd2; }
|
|
95
|
+
.dsh-wtc-state[data-target-state="recovery_required"] { --wtc-state: #c94747; }
|
|
96
|
+
.dsh-wtc-state[data-target-state="delivered"] { opacity: .66; }
|
|
97
|
+
.dsh-wtc-facts { display: flex; flex-wrap: wrap; gap: 4px 10px; color: var(--wtc-muted); font-size: 11px; }
|
|
98
|
+
.dsh-wtc-recovery-message { color: var(--wtc-red); font-weight: 620; }
|
|
99
|
+
.dsh-wtc-revision { color: var(--wtc-muted); font: 11px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
|
|
100
|
+
.dsh-wtc-button {
|
|
101
|
+
min-height: 30px;
|
|
102
|
+
border: 1px solid var(--wtc-line);
|
|
103
|
+
border-radius: 8px;
|
|
104
|
+
padding: 5px 9px;
|
|
105
|
+
background: transparent;
|
|
106
|
+
color: inherit;
|
|
107
|
+
font: inherit;
|
|
108
|
+
font-size: 12px;
|
|
109
|
+
font-weight: 650;
|
|
110
|
+
cursor: pointer;
|
|
111
|
+
}
|
|
112
|
+
.dsh-wtc-button:hover:not(:disabled) { background: color-mix(in srgb, currentColor 7%, transparent); border-color: color-mix(in srgb, currentColor 30%, transparent); }
|
|
113
|
+
.dsh-wtc-button:focus-visible { outline: 2px solid #5b8fe8; outline-offset: 2px; }
|
|
114
|
+
.dsh-wtc-button:disabled { opacity: .5; cursor: wait; }
|
|
115
|
+
.dsh-wtc-primary { color: white; border-color: var(--wtc-blue); background: var(--wtc-blue); }
|
|
116
|
+
.dsh-wtc-danger { color: var(--wtc-red); }
|
|
117
|
+
.dsh-wtc-empty, .dsh-wtc-loading { padding: 24px 14px; color: var(--wtc-muted); text-align: center; }
|
|
118
|
+
.dsh-wtc-error { padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--wtc-red) 35%, transparent); border-radius: 10px; background: color-mix(in srgb, var(--wtc-red) 8%, transparent); color: var(--wtc-red); overflow-wrap: anywhere; }
|
|
119
|
+
.dsh-wtc-inspect { flex: 1 0 100%; display: grid; grid-template-columns: minmax(110px, .25fr) minmax(0, 1fr); gap: 5px 12px; min-width: 0; padding: 9px 10px; border-radius: 9px; background: var(--wtc-panel); }
|
|
120
|
+
.dsh-wtc-inspect code { min-width: 0; overflow-wrap: anywhere; font-size: 11px; }
|
|
121
|
+
.dsh-wtc-confirm { position: absolute; z-index: 2; inset: 12px; align-self: start; display: grid; gap: 10px; max-width: 520px; margin: 64px auto 0; padding: 18px; border: 1px solid color-mix(in srgb, var(--wtc-red) 35%, var(--wtc-line)); border-radius: 14px; background: Canvas; color: CanvasText; box-shadow: 0 20px 60px rgba(0,0,0,.24); }
|
|
122
|
+
.dsh-wtc-confirm p { margin: 0; color: color-mix(in srgb, currentColor 68%, transparent); line-height: 1.5; }
|
|
123
|
+
.dsh-wtc-confirm-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
|
|
124
|
+
@media (max-width: 620px) {
|
|
125
|
+
.dsh-wtc-current, .dsh-wtc-row { align-items: flex-start; flex-direction: column; }
|
|
126
|
+
.dsh-wtc-current-actions, .dsh-wtc-row-actions { width: 100%; justify-content: flex-start; }
|
|
127
|
+
.dsh-wtc-inspect { grid-template-columns: 1fr; }
|
|
128
|
+
}
|
|
129
|
+
`;
|
|
130
|
+
//# sourceMappingURL=target-console.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"target-console.styles.js","sourceRoot":"","sources":["../../../src/client/target-console/target-console.styles.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgI9C,CAAA"}
|