@satanwagen/reviewkit 0.1.0 → 0.1.1
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/cli/emblema-sync.mjs +12 -3
- package/package.json +1 -1
package/cli/emblema-sync.mjs
CHANGED
|
@@ -86,8 +86,10 @@ export function toFinding(item, seq) {
|
|
|
86
86
|
};
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
/** Emblema status -> ReviewKit ItemStatus.
|
|
90
|
-
|
|
89
|
+
/** Emblema status -> ReviewKit ItemStatus. `open` REOPENS a finding (a fix
|
|
90
|
+
was abandoned or resolved by mistake) — written into the room, so the
|
|
91
|
+
site pin reverts live. */
|
|
92
|
+
export const STATUS_MAP = { open: 'open', accepted: 'accepted', dismissed: 'rejected', fixed: 'applied' };
|
|
91
93
|
|
|
92
94
|
function statePath(cwd) {
|
|
93
95
|
return join(cwd, STATE_DIR, STATE_FILE);
|
|
@@ -472,6 +474,13 @@ export function cmdServe(cwd) {
|
|
|
472
474
|
url: state.url,
|
|
473
475
|
lastAck: state.lastAck ?? null,
|
|
474
476
|
findings: findings.size,
|
|
477
|
+
// Additive: realtime-bridge health for status UIs. "off" = no
|
|
478
|
+
// syncToken configured (bridge disabled by design), "connected" =
|
|
479
|
+
// at least one room socket joined, "connecting" = configured but
|
|
480
|
+
// not joined (booting, reconnect backoff, or a bad token).
|
|
481
|
+
realtime: !state.settings.syncToken
|
|
482
|
+
? { state: 'off', rooms: 0 }
|
|
483
|
+
: { state: sockets.size > 0 ? 'connected' : 'connecting', rooms: sockets.size },
|
|
475
484
|
});
|
|
476
485
|
return;
|
|
477
486
|
}
|
|
@@ -546,7 +555,7 @@ export function cmdServe(cwd) {
|
|
|
546
555
|
return send(res, 400, { ok: false, error: 'invalid JSON' });
|
|
547
556
|
}
|
|
548
557
|
const mapped = STATUS_MAP[status];
|
|
549
|
-
if (!mapped) return send(res, 400, { ok: false, error: 'status must be accepted|dismissed|fixed' });
|
|
558
|
+
if (!mapped) return send(res, 400, { ok: false, error: 'status must be open|accepted|dismissed|fixed' });
|
|
550
559
|
const finding = findings.get(decodeURIComponent(statusMatch[1]));
|
|
551
560
|
if (!finding) return send(res, 404, { ok: false, error: 'unknown finding' });
|
|
552
561
|
const ws = sockets.get(finding._route);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@satanwagen/reviewkit",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Drop-in visual review & feedback layer for React sites. Reviewers annotate the live page; nothing is ever applied \u2014 changes are recorded as a portable session for a coding agent.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|