pinokiod 5.3.15 → 5.3.17

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": "pinokiod",
3
- "version": "5.3.15",
3
+ "version": "5.3.17",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/server/index.js CHANGED
@@ -4758,12 +4758,14 @@ class Server {
4758
4758
  this.app.post("/checkpoints/registry", ex(async (req, res) => {
4759
4759
  res.status(404).json({ ok: false, error: "Not found" })
4760
4760
  }))
4761
- this.app.get("/registry/ping.png", ex(async (_req, res) => {
4761
+ const registryPingHandler = ex(async (_req, res) => {
4762
4762
  res.setHeader('Content-Type', 'image/png')
4763
4763
  res.setHeader('Cache-Control', 'no-store')
4764
4764
  res.setHeader('Content-Length', String(REGISTRY_PING_PNG.length))
4765
4765
  res.end(REGISTRY_PING_PNG)
4766
- }))
4766
+ })
4767
+ this.app.get("/registry/healthz.png", registryPingHandler)
4768
+ this.app.get("/registry/ping.png", registryPingHandler)
4767
4769
 
4768
4770
  this.app.get("/registry/checkin", ex(async (req, res) => {
4769
4771
  const repoUrl = typeof req.query.repo === 'string' ? req.query.repo.trim() : ''
@@ -2679,6 +2679,28 @@ const refreshParent = (e) => {
2679
2679
  }
2680
2680
  } catch (_) {}
2681
2681
  }
2682
+
2683
+ if (typeof window !== 'undefined' && !window.__pinokioNavigateListenerInstalled) {
2684
+ try {
2685
+ window.__pinokioNavigateListenerInstalled = true;
2686
+ } catch (_) {}
2687
+ window.addEventListener('message', (event) => {
2688
+ if (!event || !event.data || event.data.e !== 'pinokio:navigate') return;
2689
+ const frame = document.querySelector('iframe.mainframe');
2690
+ if (!frame) return;
2691
+ if (frame.contentWindow && event.source !== frame.contentWindow) return;
2692
+ const rawUrl = typeof event.data.url === 'string' ? event.data.url : '';
2693
+ if (!rawUrl) return;
2694
+ let target;
2695
+ try {
2696
+ target = new URL(rawUrl, window.location.origin);
2697
+ } catch (_) {
2698
+ return;
2699
+ }
2700
+ if (target.origin !== window.location.origin) return;
2701
+ frame.src = target.toString();
2702
+ });
2703
+ }
2682
2704
  let tippyInstances = [];
2683
2705
  const COMPACT_LAYOUT_QUERY = '(max-width: 768px)';
2684
2706
  const compactLayoutMedia = window.matchMedia(COMPACT_LAYOUT_QUERY);
@@ -9722,6 +9722,8 @@ document.addEventListener("DOMContentLoaded", () => {
9722
9722
  return
9723
9723
  }
9724
9724
  footer.classList.add("hidden")
9725
+ // Temporarily keep the snapshot footer hidden while we focus on registry check-ins.
9726
+ return
9725
9727
  const dismissStorageKey = `pinokio.snapshot-footer.dismissed:${workspace}`
9726
9728
  const getDismissedState = () => {
9727
9729
  try {