owlservable 0.2.4 → 0.2.5
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/dashboard.html +2 -1
- package/index.cjs +1 -0
- package/index.js +1 -0
- package/package.json +1 -1
package/dashboard.html
CHANGED
|
@@ -303,6 +303,7 @@ document.getElementById('btn-clear').addEventListener('click',function(){
|
|
|
303
303
|
|
|
304
304
|
function handleMsg(msg){
|
|
305
305
|
if(msg.type==='init'){
|
|
306
|
+
reset();
|
|
306
307
|
msg.requests.slice().reverse().forEach(function(r){addRow(r,false);});
|
|
307
308
|
renderSave(msg.save);
|
|
308
309
|
}else if(msg.type==='request'){
|
|
@@ -344,7 +345,7 @@ function connect(){
|
|
|
344
345
|
btnPause.title='Resume ('+pauseBuffer.length+' buffered)';
|
|
345
346
|
return;
|
|
346
347
|
}
|
|
347
|
-
handleMsg(msg);
|
|
348
|
+
try{handleMsg(msg);}catch(_){}
|
|
348
349
|
});
|
|
349
350
|
}
|
|
350
351
|
connect();
|
package/index.cjs
CHANGED
|
@@ -317,6 +317,7 @@ function startDashboard(port) {
|
|
|
317
317
|
const urlPath = req.url?.split('?')[0] || '/'
|
|
318
318
|
|
|
319
319
|
if (urlPath === '/events') {
|
|
320
|
+
try { req.socket.setNoDelay(true) } catch (_) {}
|
|
320
321
|
res.writeHead(200, { 'Content-Type': 'text/event-stream', 'Cache-Control': 'no-cache', 'Connection': 'keep-alive' })
|
|
321
322
|
const send = d => { try { res.write('data: ' + JSON.stringify(d) + '\n\n') } catch (_) {} }
|
|
322
323
|
send({ type: 'init', requests: getRequests(), save: getSaveInfo() })
|
package/index.js
CHANGED
|
@@ -317,6 +317,7 @@ function startDashboard(port) {
|
|
|
317
317
|
const urlPath = req.url?.split('?')[0] || '/'
|
|
318
318
|
|
|
319
319
|
if (urlPath === '/events') {
|
|
320
|
+
try { req.socket.setNoDelay(true) } catch (_) {}
|
|
320
321
|
res.writeHead(200, { 'Content-Type': 'text/event-stream', 'Cache-Control': 'no-cache', 'Connection': 'keep-alive' })
|
|
321
322
|
const send = d => { try { res.write('data: ' + JSON.stringify(d) + '\n\n') } catch (_) {} }
|
|
322
323
|
send({ type: 'init', requests: getRequests(), save: getSaveInfo() })
|