querysub 0.297.0 → 0.298.0

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "querysub",
3
- "version": "0.297.0",
3
+ "version": "0.298.0",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
6
  "note1": "note on node-forge fork, see https://github.com/digitalbazaar/forge/issues/744 for details",
@@ -37,7 +37,7 @@ export function startEdgeNotifier() {
37
37
  let duration = Date.now() - time;
38
38
  // Refresh 10% earlier, as we don't want clients to refresh RIGHT when the server shutsdown...
39
39
  time = Date.now() + duration * 0.9;
40
- void notifyClients(lastHashServer, time);
40
+ void notifyClients(`forcedupdate-at-${time}`, time);
41
41
  }
42
42
  });
43
43
  })();
@@ -63,6 +63,7 @@ const notifyClients = throttleFunction(timeInMinute, async function notifyClient
63
63
  let currentNotification: { close: () => void } | null = null;
64
64
  let curHash = "";
65
65
  function onLiveHashChange(liveHash: string, refreshThresholdTime: number) {
66
+ console.log(blue(`Client liveHash changed ${liveHash}, prev hash: ${curHash}`));
66
67
  if (liveHash === curHash) return;
67
68
  let prevHash = curHash;
68
69
  // Don't notify the user right away. Hopefully they refresh naturally, and we never have to notify them at all!