depwire-cli 0.9.5 → 0.9.6
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.
|
@@ -113,6 +113,22 @@
|
|
|
113
113
|
</main>
|
|
114
114
|
</div>
|
|
115
115
|
|
|
116
|
+
<script>
|
|
117
|
+
// Catch any global errors and prevent them from breaking the page
|
|
118
|
+
window.addEventListener('error', (event) => {
|
|
119
|
+
console.error('Global error caught:', event.error);
|
|
120
|
+
// Prevent default error handling that might crash the page
|
|
121
|
+
event.preventDefault();
|
|
122
|
+
return true;
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
// Catch unhandled promise rejections
|
|
126
|
+
window.addEventListener('unhandledrejection', (event) => {
|
|
127
|
+
console.error('Unhandled promise rejection:', event.reason);
|
|
128
|
+
event.preventDefault();
|
|
129
|
+
return true;
|
|
130
|
+
});
|
|
131
|
+
</script>
|
|
116
132
|
<script src="/temporal.js"></script>
|
|
117
133
|
</body>
|
|
118
134
|
</html>
|
|
@@ -10,7 +10,12 @@ let filePositions = new Map();
|
|
|
10
10
|
async function init() {
|
|
11
11
|
try {
|
|
12
12
|
const response = await fetch('/api/data');
|
|
13
|
+
if (!response.ok) throw new Error(`HTTP ${response.status}`);
|
|
14
|
+
|
|
13
15
|
temporalData = await response.json();
|
|
16
|
+
if (!temporalData || !temporalData.snapshots || temporalData.snapshots.length === 0) {
|
|
17
|
+
throw new Error('No snapshot data received');
|
|
18
|
+
}
|
|
14
19
|
|
|
15
20
|
document.getElementById('projectName').textContent = temporalData.projectName;
|
|
16
21
|
document.getElementById('snapshotCount').textContent = temporalData.snapshots.length;
|
|
@@ -26,7 +31,14 @@ async function init() {
|
|
|
26
31
|
renderSnapshot(currentIndex);
|
|
27
32
|
});
|
|
28
33
|
} catch (error) {
|
|
29
|
-
console.error('Failed to
|
|
34
|
+
console.error('Failed to initialize temporal graph:', error);
|
|
35
|
+
document.body.innerHTML = `
|
|
36
|
+
<div style="display:flex;align-items:center;justify-content:center;height:100vh;background:#0a0f18;color:#fff;flex-direction:column;gap:20px;">
|
|
37
|
+
<h1 style="color:#ff4a4a;">⚠️ Failed to Load Temporal Graph</h1>
|
|
38
|
+
<p style="color:#888;">${error.message}</p>
|
|
39
|
+
<button onclick="location.reload()" style="padding:10px 20px;background:#4a9eff;border:none;color:#fff;border-radius:6px;cursor:pointer;">Reload Page</button>
|
|
40
|
+
</div>
|
|
41
|
+
`;
|
|
30
42
|
}
|
|
31
43
|
}
|
|
32
44
|
|
|
@@ -81,8 +93,14 @@ function setupTimeline() {
|
|
|
81
93
|
|
|
82
94
|
function setupControls() {
|
|
83
95
|
const playBtn = document.getElementById('playBtn');
|
|
96
|
+
|
|
97
|
+
if (!playBtn) {
|
|
98
|
+
console.error('Play button not found in DOM');
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
84
101
|
|
|
85
102
|
playBtn.addEventListener('click', () => {
|
|
103
|
+
console.log('Play button clicked, isPlaying:', isPlaying); // Debug log
|
|
86
104
|
if (isPlaying) {
|
|
87
105
|
pausePlayback();
|
|
88
106
|
} else {
|
|
@@ -130,6 +148,12 @@ function highlightSearchResults(query) {
|
|
|
130
148
|
}
|
|
131
149
|
|
|
132
150
|
function startPlayback() {
|
|
151
|
+
if (!temporalData || !temporalData.snapshots || temporalData.snapshots.length === 0) {
|
|
152
|
+
console.error('Cannot start playback: no temporal data loaded');
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
console.log('Starting playback from index:', currentIndex);
|
|
133
157
|
isPlaying = true;
|
|
134
158
|
document.getElementById('playBtn').innerHTML = `
|
|
135
159
|
<svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor">
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "depwire-cli",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.6",
|
|
4
4
|
"description": "Code cross-reference visualization and AI context engine for TypeScript, JavaScript, Python, Go, Rust, and C. Zero native dependencies — works on Windows, macOS, and Linux.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|