@shardworks/spider-apparatus 0.1.143 → 0.1.145
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/package.json +8 -8
- package/src/static/spider.js +11 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shardworks/spider-apparatus",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.145",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
"hono": "^4.7.11",
|
|
20
20
|
"yaml": "^2.0.0",
|
|
21
21
|
"zod": "4.3.6",
|
|
22
|
-
"@shardworks/nexus-core": "0.1.
|
|
23
|
-
"@shardworks/fabricator-apparatus": "0.1.
|
|
24
|
-
"@shardworks/stacks-apparatus": "0.1.
|
|
25
|
-
"@shardworks/
|
|
26
|
-
"@shardworks/
|
|
27
|
-
"@shardworks/
|
|
28
|
-
"@shardworks/codexes-apparatus": "0.1.
|
|
22
|
+
"@shardworks/nexus-core": "0.1.145",
|
|
23
|
+
"@shardworks/fabricator-apparatus": "0.1.145",
|
|
24
|
+
"@shardworks/stacks-apparatus": "0.1.145",
|
|
25
|
+
"@shardworks/clerk-apparatus": "0.1.145",
|
|
26
|
+
"@shardworks/tools-apparatus": "0.1.145",
|
|
27
|
+
"@shardworks/animator-apparatus": "0.1.145",
|
|
28
|
+
"@shardworks/codexes-apparatus": "0.1.145"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@types/node": "25.5.0"
|
package/src/static/spider.js
CHANGED
|
@@ -527,6 +527,11 @@
|
|
|
527
527
|
sessionLogSpinner.style.display = '';
|
|
528
528
|
}
|
|
529
529
|
|
|
530
|
+
// Track whether the stream completed normally so the onerror handler
|
|
531
|
+
// (which fires when EventSource auto-reconnects after connection close)
|
|
532
|
+
// does not show a spurious "disconnected" badge.
|
|
533
|
+
var streamDone = false;
|
|
534
|
+
|
|
530
535
|
sessionEventSource = new EventSource(
|
|
531
536
|
'/api/spider/session-stream?sessionId=' + encodeURIComponent(engine.sessionId)
|
|
532
537
|
);
|
|
@@ -562,6 +567,9 @@
|
|
|
562
567
|
sessionEventSource.addEventListener('done', function (e) {
|
|
563
568
|
var data;
|
|
564
569
|
try { data = JSON.parse(e.data); } catch (err) { data = {}; }
|
|
570
|
+
// Mark stream as intentionally done before closing to prevent the
|
|
571
|
+
// onerror handler from showing a spurious "disconnected" badge.
|
|
572
|
+
streamDone = true;
|
|
565
573
|
stopSessionStream();
|
|
566
574
|
if (sessionLogSpinner) {
|
|
567
575
|
sessionLogSpinner.style.display = 'none';
|
|
@@ -582,6 +590,7 @@
|
|
|
582
590
|
});
|
|
583
591
|
|
|
584
592
|
sessionEventSource.addEventListener('error', function (e) {
|
|
593
|
+
if (streamDone) return;
|
|
585
594
|
var data;
|
|
586
595
|
try { data = JSON.parse(/** @type {MessageEvent} */(e).data || '{}'); } catch (err) { data = {}; }
|
|
587
596
|
if (sessionLogSpinner) {
|
|
@@ -594,6 +603,8 @@
|
|
|
594
603
|
|
|
595
604
|
sessionEventSource.onerror = function () {
|
|
596
605
|
// Network-level error (browser fires this on connection failure / premature close).
|
|
606
|
+
// Skip if the stream completed normally — the connection close is expected.
|
|
607
|
+
if (streamDone) return;
|
|
597
608
|
if (sessionEventSource) {
|
|
598
609
|
stopSessionStream();
|
|
599
610
|
if (sessionLogSpinner && sessionLogSpinner.style.display !== 'none') {
|