glassbox 0.1.3 → 0.1.4
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/cli.js +118 -107
- package/dist/client/app.global.js +8 -8
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1342,67 +1342,73 @@ function DiffView({ file, diff, annotations, mode }) {
|
|
|
1342
1342
|
] });
|
|
1343
1343
|
}
|
|
1344
1344
|
function SplitDiff({ hunks, annotationsByLine }) {
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
"
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
"
|
|
1359
|
-
hunk.
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
"
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
"
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1345
|
+
const lastHunk = hunks[hunks.length - 1];
|
|
1346
|
+
const tailStart = lastHunk ? lastHunk.newStart + lastHunk.newCount : 1;
|
|
1347
|
+
return /* @__PURE__ */ jsx("div", { className: "diff-table-split", children: [
|
|
1348
|
+
hunks.map((hunk, hunkIdx) => {
|
|
1349
|
+
const pairs = pairLines(hunk.lines);
|
|
1350
|
+
return /* @__PURE__ */ jsx("div", { className: "hunk-block", children: [
|
|
1351
|
+
/* @__PURE__ */ jsx(
|
|
1352
|
+
"div",
|
|
1353
|
+
{
|
|
1354
|
+
className: "hunk-separator",
|
|
1355
|
+
"data-hunk-idx": hunkIdx,
|
|
1356
|
+
"data-old-start": hunk.oldStart,
|
|
1357
|
+
"data-old-count": hunk.oldCount,
|
|
1358
|
+
"data-new-start": hunk.newStart,
|
|
1359
|
+
"data-new-count": hunk.newCount,
|
|
1360
|
+
children: [
|
|
1361
|
+
"@@ -",
|
|
1362
|
+
hunk.oldStart,
|
|
1363
|
+
",",
|
|
1364
|
+
hunk.oldCount,
|
|
1365
|
+
" +",
|
|
1366
|
+
hunk.newStart,
|
|
1367
|
+
",",
|
|
1368
|
+
hunk.newCount,
|
|
1369
|
+
" @@"
|
|
1370
|
+
]
|
|
1371
|
+
}
|
|
1372
|
+
),
|
|
1373
|
+
pairs.map((pair) => {
|
|
1374
|
+
const leftAnns = pair.left ? annotationsByLine[`${pair.left.oldNum}:old`] ?? [] : [];
|
|
1375
|
+
const rightAnns = pair.right ? annotationsByLine[`${pair.right.newNum}:new`] ?? [] : [];
|
|
1376
|
+
const allAnns = [...leftAnns, ...rightAnns];
|
|
1377
|
+
return /* @__PURE__ */ jsx("div", { children: [
|
|
1378
|
+
/* @__PURE__ */ jsx("div", { className: "split-row", children: [
|
|
1379
|
+
/* @__PURE__ */ jsx(
|
|
1380
|
+
"div",
|
|
1381
|
+
{
|
|
1382
|
+
className: `diff-line split-left ${pair.left?.type || "empty"}`,
|
|
1383
|
+
"data-line": pair.left?.oldNum ?? "",
|
|
1384
|
+
"data-side": "old",
|
|
1385
|
+
"data-new-line": pair.left?.newNum ?? pair.right?.newNum ?? "",
|
|
1386
|
+
children: [
|
|
1387
|
+
/* @__PURE__ */ jsx("span", { className: "gutter", children: pair.left?.oldNum ?? "" }),
|
|
1388
|
+
/* @__PURE__ */ jsx("span", { className: "code", children: pair.left ? raw(escapeHtml(pair.left.content)) : "" })
|
|
1389
|
+
]
|
|
1390
|
+
}
|
|
1391
|
+
),
|
|
1392
|
+
/* @__PURE__ */ jsx(
|
|
1393
|
+
"div",
|
|
1394
|
+
{
|
|
1395
|
+
className: `diff-line split-right ${pair.right?.type || "empty"}`,
|
|
1396
|
+
"data-line": pair.right?.newNum ?? "",
|
|
1397
|
+
"data-side": "new",
|
|
1398
|
+
children: [
|
|
1399
|
+
/* @__PURE__ */ jsx("span", { className: "gutter", children: pair.right?.newNum ?? "" }),
|
|
1400
|
+
/* @__PURE__ */ jsx("span", { className: "code", children: pair.right ? raw(escapeHtml(pair.right.content)) : "" })
|
|
1401
|
+
]
|
|
1402
|
+
}
|
|
1403
|
+
)
|
|
1404
|
+
] }),
|
|
1405
|
+
allAnns.length > 0 ? /* @__PURE__ */ jsx(AnnotationRows, { annotations: allAnns }) : null
|
|
1406
|
+
] });
|
|
1407
|
+
})
|
|
1408
|
+
] });
|
|
1409
|
+
}),
|
|
1410
|
+
/* @__PURE__ */ jsx("div", { className: "hunk-separator hunk-expander-tail", "data-start": tailStart, children: "\u2195 Show remaining lines" })
|
|
1411
|
+
] });
|
|
1406
1412
|
}
|
|
1407
1413
|
function pairLines(lines) {
|
|
1408
1414
|
const pairs = [];
|
|
@@ -1438,51 +1444,56 @@ function pairLines(lines) {
|
|
|
1438
1444
|
return pairs;
|
|
1439
1445
|
}
|
|
1440
1446
|
function UnifiedDiff({ hunks, annotationsByLine }) {
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
"
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
"
|
|
1453
|
-
hunk.
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
"
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1447
|
+
const lastHunk = hunks[hunks.length - 1];
|
|
1448
|
+
const tailStart = lastHunk ? lastHunk.newStart + lastHunk.newCount : 1;
|
|
1449
|
+
return /* @__PURE__ */ jsx("div", { className: "diff-table-unified", children: [
|
|
1450
|
+
hunks.map((hunk, hunkIdx) => /* @__PURE__ */ jsx("div", { className: "hunk-block", children: [
|
|
1451
|
+
/* @__PURE__ */ jsx(
|
|
1452
|
+
"div",
|
|
1453
|
+
{
|
|
1454
|
+
className: "hunk-separator",
|
|
1455
|
+
"data-hunk-idx": hunkIdx,
|
|
1456
|
+
"data-old-start": hunk.oldStart,
|
|
1457
|
+
"data-old-count": hunk.oldCount,
|
|
1458
|
+
"data-new-start": hunk.newStart,
|
|
1459
|
+
"data-new-count": hunk.newCount,
|
|
1460
|
+
children: [
|
|
1461
|
+
"@@ -",
|
|
1462
|
+
hunk.oldStart,
|
|
1463
|
+
",",
|
|
1464
|
+
hunk.oldCount,
|
|
1465
|
+
" +",
|
|
1466
|
+
hunk.newStart,
|
|
1467
|
+
",",
|
|
1468
|
+
hunk.newCount,
|
|
1469
|
+
" @@"
|
|
1470
|
+
]
|
|
1471
|
+
}
|
|
1472
|
+
),
|
|
1473
|
+
hunk.lines.map((line) => {
|
|
1474
|
+
const lineNum = line.type === "remove" ? line.oldNum : line.newNum;
|
|
1475
|
+
const side = line.type === "remove" ? "old" : "new";
|
|
1476
|
+
const anns = annotationsByLine[`${lineNum}:${side}`] ?? [];
|
|
1477
|
+
return /* @__PURE__ */ jsx("div", { children: [
|
|
1478
|
+
/* @__PURE__ */ jsx(
|
|
1479
|
+
"div",
|
|
1480
|
+
{
|
|
1481
|
+
className: `diff-line ${line.type}${anns.length ? " has-annotation" : ""}`,
|
|
1482
|
+
"data-line": lineNum,
|
|
1483
|
+
"data-side": side,
|
|
1484
|
+
children: [
|
|
1485
|
+
/* @__PURE__ */ jsx("span", { className: "gutter-old", children: line.oldNum ?? "" }),
|
|
1486
|
+
/* @__PURE__ */ jsx("span", { className: "gutter-new", children: line.newNum ?? "" }),
|
|
1487
|
+
/* @__PURE__ */ jsx("span", { className: "code", children: raw(escapeHtml(line.content)) })
|
|
1488
|
+
]
|
|
1489
|
+
}
|
|
1490
|
+
),
|
|
1491
|
+
anns.length > 0 ? /* @__PURE__ */ jsx(AnnotationRows, { annotations: anns }) : null
|
|
1492
|
+
] });
|
|
1493
|
+
})
|
|
1494
|
+
] })),
|
|
1495
|
+
/* @__PURE__ */ jsx("div", { className: "hunk-separator hunk-expander-tail", "data-start": tailStart, children: "\u2195 Show remaining lines" })
|
|
1496
|
+
] });
|
|
1486
1497
|
}
|
|
1487
1498
|
function AnnotationRows({ annotations }) {
|
|
1488
1499
|
return /* @__PURE__ */ jsx("div", { className: "annotation-row", children: annotations.map((a) => /* @__PURE__ */ jsx(
|
|
@@ -2148,7 +2159,7 @@ async function main() {
|
|
|
2148
2159
|
}
|
|
2149
2160
|
const { mode, port, resume, forceUpdateCheck, debug } = parsed;
|
|
2150
2161
|
if (debug) {
|
|
2151
|
-
console.log(`Build timestamp: ${"2026-03-
|
|
2162
|
+
console.log(`Build timestamp: ${"2026-03-06T22:43:31.204Z"}`);
|
|
2152
2163
|
}
|
|
2153
2164
|
await checkForUpdates(forceUpdateCheck);
|
|
2154
2165
|
const cwd = process.cwd();
|