@nonbot/cli 0.9.8 → 0.9.9
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/dist/lib/choir/hub-reducer.js +15 -3
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
const RADAR_BROADCAST_LIMIT = 20;
|
|
2
2
|
const BROADCAST_CAP = 200;
|
|
3
3
|
const TERMINAL_STATUSES = new Set(['complete', 'failed', 'stopped']);
|
|
4
|
+
function toPublicPane(p) {
|
|
5
|
+
return {
|
|
6
|
+
paneId: p.paneId,
|
|
7
|
+
name: p.name,
|
|
8
|
+
branch: p.branch,
|
|
9
|
+
status: p.status,
|
|
10
|
+
mergeReady: p.mergeReady,
|
|
11
|
+
dirtyFiles: p.dirtyFiles,
|
|
12
|
+
commitsAhead: p.commitsAhead,
|
|
13
|
+
createdAt: p.createdAt,
|
|
14
|
+
};
|
|
15
|
+
}
|
|
4
16
|
export function applyAction(state, action) {
|
|
5
17
|
switch (action.type) {
|
|
6
18
|
case 'session-init':
|
|
@@ -131,11 +143,11 @@ export function applyAction(state, action) {
|
|
|
131
143
|
}
|
|
132
144
|
}
|
|
133
145
|
export function selectRadar(state) {
|
|
134
|
-
const
|
|
135
|
-
const active = new Set(
|
|
146
|
+
const activePanes = Object.values(state.panes).filter((p) => !TERMINAL_STATUSES.has(p.status));
|
|
147
|
+
const active = new Set(activePanes.map((p) => p.paneId));
|
|
136
148
|
return {
|
|
137
149
|
sessionId: state.sessionId,
|
|
138
|
-
panes,
|
|
150
|
+
panes: activePanes.map(toPublicPane),
|
|
139
151
|
claims: state.claims.filter((c) => active.has(c.paneId)),
|
|
140
152
|
broadcasts: state.broadcasts.slice(-RADAR_BROADCAST_LIMIT),
|
|
141
153
|
collisions: state.collisions,
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.9.
|
|
1
|
+
export const VERSION = '0.9.9';
|
package/package.json
CHANGED