@dev-anywhere/relay 0.5.30 → 0.5.32

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.
@@ -44,7 +44,7 @@
44
44
  <link rel="icon" type="image/svg+xml" href="/brand-icon.svg" />
45
45
  <link rel="icon" type="image/png" sizes="64x64" href="/pwa-64x64.png" />
46
46
  <link rel="apple-touch-icon" href="/apple-touch-icon-180x180.png" />
47
- <script type="module" crossorigin src="/assets/index-9-GJJ9SK.js"></script>
47
+ <script type="module" crossorigin src="/assets/index-hnXM3rAx.js"></script>
48
48
  <link rel="stylesheet" crossorigin href="/assets/index-BHCaxl7W.css">
49
49
  <link rel="manifest" href="/manifest.webmanifest"><script id="vite-plugin-pwa:register-sw" src="/registerSW.js"></script></head>
50
50
  <body class="bg-background text-foreground">
package/assets/web/sw.js CHANGED
@@ -1 +1 @@
1
- if(!self.define){let e,s={};const i=(i,n)=>(i=new URL(i+".js",n).href,s[i]||new Promise(s=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=s,document.head.appendChild(e)}else e=i,importScripts(i),s()}).then(()=>{let e=s[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e}));self.define=(n,r)=>{const t=e||("document"in self?document.currentScript.src:"")||location.href;if(s[t])return;let o={};const f=e=>i(e,t),c={module:{uri:t},exports:o,require:f};s[t]=Promise.all(n.map(e=>c[e]||f(e))).then(e=>(r(...e),o))}}define(["./workbox-10a3128e"],function(e){"use strict";importScripts("notification-sw.js"),self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"registerSW.js",revision:"1872c500de691dce40960bb85481de07"},{url:"notification-sw.js",revision:"ee0be62f4c1f36625b92680b3060becb"},{url:"index.html",revision:"fdcbf955a538772aefb282664cbe32ec"},{url:"assets/index-BHCaxl7W.css",revision:null},{url:"assets/index-9-GJJ9SK.js",revision:null},{url:"assets/fvad-xd_70pC7.js",revision:null},{url:"assets/fvad-DYxbW2my.wasm",revision:null},{url:"assets/__vite-browser-external-BIHI7g3E.js",revision:null},{url:"brand-icon.svg",revision:"efe8505a7b7ef12cbb3a4bcd286254bd"},{url:"maskable-icon-512x512.png",revision:"e762ff07cdedcd78f8650f59c6881727"},{url:"pwa-192x192.png",revision:"4e4603ce0f22528eded553ba7f2ffbc5"},{url:"pwa-512x512.png",revision:"e762ff07cdedcd78f8650f59c6881727"},{url:"pwa-64x64.png",revision:"d322160ad1dc08ba9e133cb3d296ae63"},{url:"manifest.webmanifest",revision:"4daa295c44052f4ce59a1fcfd6f06ab8"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("/index.html"),{denylist:[/^\/proxy(\/|$|\?)/,/^\/client(\/|$|\?)/,/^\/voice(\/|$|\?)/,/^\/fonts\//,/^\/health/,/^\/status/,/^\/api\//]})),e.registerRoute(/^\/fonts\/.*\.(woff2|woff|ttf|otf|css)$/,new e.CacheFirst({cacheName:"dev-anywhere-fonts",plugins:[new e.ExpirationPlugin({maxEntries:40,maxAgeSeconds:15552e3})]}),"GET")});
1
+ if(!self.define){let e,s={};const i=(i,n)=>(i=new URL(i+".js",n).href,s[i]||new Promise(s=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=s,document.head.appendChild(e)}else e=i,importScripts(i),s()}).then(()=>{let e=s[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e}));self.define=(n,r)=>{const t=e||("document"in self?document.currentScript.src:"")||location.href;if(s[t])return;let o={};const f=e=>i(e,t),c={module:{uri:t},exports:o,require:f};s[t]=Promise.all(n.map(e=>c[e]||f(e))).then(e=>(r(...e),o))}}define(["./workbox-10a3128e"],function(e){"use strict";importScripts("notification-sw.js"),self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"registerSW.js",revision:"1872c500de691dce40960bb85481de07"},{url:"notification-sw.js",revision:"ee0be62f4c1f36625b92680b3060becb"},{url:"index.html",revision:"1892df0166941d34b65ba64b4e62be06"},{url:"assets/index-hnXM3rAx.js",revision:null},{url:"assets/index-BHCaxl7W.css",revision:null},{url:"assets/fvad-DYxbW2my.wasm",revision:null},{url:"assets/fvad-CcwWLESS.js",revision:null},{url:"assets/__vite-browser-external-BIHI7g3E.js",revision:null},{url:"brand-icon.svg",revision:"efe8505a7b7ef12cbb3a4bcd286254bd"},{url:"maskable-icon-512x512.png",revision:"e762ff07cdedcd78f8650f59c6881727"},{url:"pwa-192x192.png",revision:"4e4603ce0f22528eded553ba7f2ffbc5"},{url:"pwa-512x512.png",revision:"e762ff07cdedcd78f8650f59c6881727"},{url:"pwa-64x64.png",revision:"d322160ad1dc08ba9e133cb3d296ae63"},{url:"manifest.webmanifest",revision:"4daa295c44052f4ce59a1fcfd6f06ab8"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("/index.html"),{denylist:[/^\/proxy(\/|$|\?)/,/^\/client(\/|$|\?)/,/^\/voice(\/|$|\?)/,/^\/fonts\//,/^\/health/,/^\/status/,/^\/api\//]})),e.registerRoute(/^\/fonts\/.*\.(woff2|woff|ttf|otf|css)$/,new e.CacheFirst({cacheName:"dev-anywhere-fonts",plugins:[new e.ExpirationPlugin({maxEntries:40,maxAgeSeconds:15552e3})]}),"GET")});
@@ -4343,7 +4343,7 @@ var RemoteFileBridge = class {
4343
4343
  import compression from "compression";
4344
4344
  import express from "express";
4345
4345
  import { existsSync as existsSync2 } from "fs";
4346
- import { basename, join as join3 } from "path";
4346
+ import { basename, join as join3, relative } from "path";
4347
4347
  var IMMUTABLE_CACHE_SECONDS = 365 * 24 * 60 * 60;
4348
4348
  var SHORT_CACHE_SECONDS = 60 * 60;
4349
4349
  var RELAY_ROUTE_ROOTS = /* @__PURE__ */ new Set([
@@ -4361,10 +4361,10 @@ function isRelayRoute(pathname) {
4361
4361
  }
4362
4362
  return false;
4363
4363
  }
4364
- function setStaticCacheHeaders(response, filePath) {
4364
+ function setStaticCacheHeaders(response, filePath, webAssetDir) {
4365
4365
  const fileName = basename(filePath);
4366
- const normalizedPath = filePath.replaceAll("\\", "/");
4367
- if (normalizedPath.includes("/assets/") || /^workbox-.+\.js$/.test(fileName)) {
4366
+ const relativePath = relative(webAssetDir, filePath).replaceAll("\\", "/");
4367
+ if (relativePath.startsWith("assets/") || /^workbox-.+\.js$/.test(fileName)) {
4368
4368
  response.setHeader("Cache-Control", `public, max-age=${IMMUTABLE_CACHE_SECONDS}, immutable`);
4369
4369
  return;
4370
4370
  }
@@ -4386,7 +4386,7 @@ function mountWebApp(app, options) {
4386
4386
  express.static(webAssetDir, {
4387
4387
  index: false,
4388
4388
  fallthrough: true,
4389
- setHeaders: setStaticCacheHeaders
4389
+ setHeaders: (response, filePath) => setStaticCacheHeaders(response, filePath, webAssetDir)
4390
4390
  })
4391
4391
  );
4392
4392
  app.use((request, response, next) => {
@@ -4679,4 +4679,4 @@ export {
4679
4679
  parseRelayChaosFromEnv,
4680
4680
  createRelayServer
4681
4681
  };
4682
- //# sourceMappingURL=chunk-KREYSOOZ.js.map
4682
+ //# sourceMappingURL=chunk-JV6RDQ6G.js.map