@eclipse-docks/extension-pwa 0.7.95 → 0.7.97

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.
@@ -1,10 +1,47 @@
1
- import { PluginOption } from 'vite';
1
+ import { PluginOption, UserConfig } from 'vite';
2
+ import { RolldownOptions } from 'rolldown';
3
+ /**
4
+ * JSON-serializable options for the SPA `NavigationRoute` (Workbox). Extra keys are kept for
5
+ * forward-compatible SW parsing.
6
+ */
7
+ export type DocksPwaNavigationRouteConfig = {
8
+ /**
9
+ * RegExp **sources** for Workbox `denylist` (matched against pathname + search).
10
+ * Pass `[]` so no paths are denied (SPA shell for all navigations within allowlist).
11
+ */
12
+ denylist?: string[];
13
+ /**
14
+ * RegExp **sources** for Workbox `allowlist`. Omit to use Workbox’s default (`[/. /]`).
15
+ * Set when the SPA shell should only apply to a subset of navigations.
16
+ */
17
+ allowlist?: string[];
18
+ } & Record<string, unknown>;
19
+ /**
20
+ * JSON-serializable bundle injected into the service worker (`define`). Add sections here as
21
+ * the SW gains more build-time tunables; unknown top-level keys are preserved in JSON for
22
+ * forward-compatible workers.
23
+ */
24
+ export type DocksPwaServiceWorkerConfig = {
25
+ /** SPA shell fallback: Workbox `NavigationRoute` for `index.html`. */
26
+ navigationRoute?: DocksPwaNavigationRouteConfig;
27
+ } & Record<string, unknown>;
2
28
  export type CreateDocksPwaPluginOptions = {
3
29
  basePath: string;
4
30
  appName: string;
5
31
  appDescription: string;
6
32
  maximumFileSizeToCacheInBytes: number;
7
33
  shortName?: string;
34
+ /**
35
+ * Serializable object injected into the SW build. No implicit defaults: set `navigationRoute`
36
+ * (e.g. `denylist`) only when your deployment needs it.
37
+ */
38
+ serviceWorkerConfig?: DocksPwaServiceWorkerConfig;
39
+ /** Extra Vite / Rolldown plugins for the injectManifest service worker build only. */
40
+ injectManifestBuildPlugins?: {
41
+ vite?: UserConfig['plugins'];
42
+ /** Rolldown plugins (Vite 8+). Passed through to vite-plugin-pwa as `buildPlugins.rollup`. */
43
+ rolldown?: RolldownOptions['plugins'];
44
+ };
8
45
  };
9
- export declare function createDocksPwaPlugin({ basePath, appName, appDescription, maximumFileSizeToCacheInBytes, shortName, }: CreateDocksPwaPluginOptions): PluginOption;
46
+ export declare function createDocksPwaPlugin({ basePath, appName, appDescription, maximumFileSizeToCacheInBytes, shortName, serviceWorkerConfig, injectManifestBuildPlugins, }: CreateDocksPwaPluginOptions): PluginOption;
10
47
  //# sourceMappingURL=vite-pwa-plugin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"vite-pwa-plugin.d.ts","sourceRoot":"","sources":["../src/vite-pwa-plugin.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAGzC,MAAM,MAAM,2BAA2B,GAAG;IACxC,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,6BAA6B,EAAE,MAAM,CAAC;IACtC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAQF,wBAAgB,oBAAoB,CAAC,EACnC,QAAQ,EACR,OAAO,EACP,cAAc,EACd,6BAA6B,EAC7B,SAAmB,GACpB,EAAE,2BAA2B,GAAG,YAAY,CAwC5C"}
1
+ {"version":3,"file":"vite-pwa-plugin.d.ts","sourceRoot":"","sources":["../src/vite-pwa-plugin.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AACrD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAShD;;;GAGG;AACH,MAAM,MAAM,6BAA6B,GAAG;IAC1C;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE5B;;;;GAIG;AACH,MAAM,MAAM,2BAA2B,GAAG;IACxC,sEAAsE;IACtE,eAAe,CAAC,EAAE,6BAA6B,CAAC;CACjD,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AA0B5B,MAAM,MAAM,2BAA2B,GAAG;IACxC,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,6BAA6B,EAAE,MAAM,CAAC;IACtC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,mBAAmB,CAAC,EAAE,2BAA2B,CAAC;IAClD,sFAAsF;IACtF,0BAA0B,CAAC,EAAE;QAC3B,IAAI,CAAC,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC;QAC7B,8FAA8F;QAC9F,QAAQ,CAAC,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC;KACvC,CAAC;CACH,CAAC;AAQF,wBAAgB,oBAAoB,CAAC,EACnC,QAAQ,EACR,OAAO,EACP,cAAc,EACd,6BAA6B,EAC7B,SAAmB,EACnB,mBAAmB,EACnB,0BAA0B,GAC3B,EAAE,2BAA2B,GAAG,YAAY,CA0D5C"}
@@ -2,6 +2,21 @@ import { fileURLToPath } from "url";
2
2
  import path from "path";
3
3
  import { VitePWA } from "vite-plugin-pwa";
4
4
  //#region src/vite-pwa-plugin.ts
5
+ function stripUndefinedEntries(obj) {
6
+ return Object.fromEntries(Object.entries(obj).filter(([, v]) => v !== void 0));
7
+ }
8
+ function resolveServiceWorkerConfig(user) {
9
+ const u = stripUndefinedEntries(user ?? {});
10
+ const navRaw = u.navigationRoute;
11
+ const rest = Object.fromEntries(Object.entries(u).filter(([k]) => k !== "navigationRoute"));
12
+ if (navRaw === void 0) return rest;
13
+ if (typeof navRaw !== "object" || navRaw === null || Array.isArray(navRaw)) throw new Error("createDocksPwaPlugin.serviceWorkerConfig.navigationRoute must be a plain object");
14
+ const navigationRoute = stripUndefinedEntries(navRaw);
15
+ return {
16
+ ...rest,
17
+ navigationRoute
18
+ };
19
+ }
5
20
  var DEFAULT_GLOB_PATTERNS = ["**/*.{js,css,html,ico,png,svg,webp,woff2,woff,ttf,wasm}"];
6
21
  var DEFAULT_ASSETS = [
7
22
  "favicon.svg",
@@ -11,7 +26,8 @@ var DEFAULT_ASSETS = [
11
26
  var pwaSwPath = fileURLToPath(import.meta.resolve("@eclipse-docks/extension-pwa/sw"));
12
27
  var pwaSwDir = path.dirname(pwaSwPath);
13
28
  var pwaSwFilename = path.basename(pwaSwPath);
14
- function createDocksPwaPlugin({ basePath, appName, appDescription, maximumFileSizeToCacheInBytes, shortName = appName }) {
29
+ function createDocksPwaPlugin({ basePath, appName, appDescription, maximumFileSizeToCacheInBytes, shortName = appName, serviceWorkerConfig, injectManifestBuildPlugins }) {
30
+ const resolvedSwConfig = resolveServiceWorkerConfig(serviceWorkerConfig);
15
31
  return VitePWA({
16
32
  registerType: "autoUpdate",
17
33
  injectRegister: "inline",
@@ -42,7 +58,16 @@ function createDocksPwaPlugin({ basePath, appName, appDescription, maximumFileSi
42
58
  includeAssets: DEFAULT_ASSETS,
43
59
  injectManifest: {
44
60
  maximumFileSizeToCacheInBytes,
45
- globPatterns: DEFAULT_GLOB_PATTERNS
61
+ globPatterns: DEFAULT_GLOB_PATTERNS,
62
+ buildPlugins: {
63
+ vite: [{
64
+ name: "docks-pwa-sw-injected-config",
65
+ config() {
66
+ return { define: { __DOCKS_SW_INJECTED_CONFIG__: JSON.stringify(resolvedSwConfig) } };
67
+ }
68
+ }, ...injectManifestBuildPlugins?.vite ?? []],
69
+ rollup: injectManifestBuildPlugins?.rolldown
70
+ }
46
71
  },
47
72
  devOptions: { enabled: false }
48
73
  });
@@ -1 +1 @@
1
- {"version":3,"file":"vite-pwa-plugin.js","names":[],"sources":["../src/vite-pwa-plugin.ts"],"sourcesContent":["import { fileURLToPath } from 'url';\nimport path from 'path';\nimport type { PluginOption } from 'vite';\nimport { VitePWA } from 'vite-plugin-pwa';\n\nexport type CreateDocksPwaPluginOptions = {\n basePath: string;\n appName: string;\n appDescription: string;\n maximumFileSizeToCacheInBytes: number;\n shortName?: string;\n};\n\nconst DEFAULT_GLOB_PATTERNS = ['**/*.{js,css,html,ico,png,svg,webp,woff2,woff,ttf,wasm}'];\nconst DEFAULT_ASSETS = ['favicon.svg', 'logo.svg', 'logo-loading.svg'];\nconst pwaSwPath = fileURLToPath(import.meta.resolve('@eclipse-docks/extension-pwa/sw'));\nconst pwaSwDir = path.dirname(pwaSwPath);\nconst pwaSwFilename = path.basename(pwaSwPath);\n\nexport function createDocksPwaPlugin({\n basePath,\n appName,\n appDescription,\n maximumFileSizeToCacheInBytes,\n shortName = appName,\n}: CreateDocksPwaPluginOptions): PluginOption {\n return VitePWA({\n registerType: 'autoUpdate',\n injectRegister: 'inline',\n strategies: 'injectManifest',\n srcDir: pwaSwDir,\n filename: pwaSwFilename,\n manifest: {\n name: appName,\n short_name: shortName,\n description: appDescription,\n theme_color: '#1a1a1a',\n background_color: '#1a1a1a',\n display: 'standalone',\n start_url: basePath,\n scope: basePath,\n icons: [\n {\n src: 'logo.svg',\n sizes: 'any',\n type: 'image/svg+xml',\n purpose: 'any',\n },\n {\n src: 'favicon.svg',\n sizes: 'any',\n type: 'image/svg+xml',\n purpose: 'monochrome',\n },\n ],\n },\n includeAssets: DEFAULT_ASSETS,\n injectManifest: {\n maximumFileSizeToCacheInBytes,\n globPatterns: DEFAULT_GLOB_PATTERNS,\n },\n devOptions: {\n enabled: false,\n },\n });\n}\n"],"mappings":";;;;AAaA,IAAM,wBAAwB,CAAC,0DAA0D;AACzF,IAAM,iBAAiB;CAAC;CAAe;CAAY;CAAmB;AACtE,IAAM,YAAY,cAAc,OAAO,KAAK,QAAQ,kCAAkC,CAAC;AACvF,IAAM,WAAW,KAAK,QAAQ,UAAU;AACxC,IAAM,gBAAgB,KAAK,SAAS,UAAU;AAE9C,SAAgB,qBAAqB,EACnC,UACA,SACA,gBACA,+BACA,YAAY,WACgC;AAC5C,QAAO,QAAQ;EACb,cAAc;EACd,gBAAgB;EAChB,YAAY;EACZ,QAAQ;EACR,UAAU;EACV,UAAU;GACR,MAAM;GACN,YAAY;GACZ,aAAa;GACb,aAAa;GACb,kBAAkB;GAClB,SAAS;GACT,WAAW;GACX,OAAO;GACP,OAAO,CACL;IACE,KAAK;IACL,OAAO;IACP,MAAM;IACN,SAAS;IACV,EACD;IACE,KAAK;IACL,OAAO;IACP,MAAM;IACN,SAAS;IACV,CACF;GACF;EACD,eAAe;EACf,gBAAgB;GACd;GACA,cAAc;GACf;EACD,YAAY,EACV,SAAS,OACV;EACF,CAAC"}
1
+ {"version":3,"file":"vite-pwa-plugin.js","names":[],"sources":["../src/vite-pwa-plugin.ts"],"sourcesContent":["import { fileURLToPath } from 'url';\nimport path from 'path';\nimport type { PluginOption, UserConfig } from 'vite';\nimport type { RolldownOptions } from 'rolldown';\nimport { VitePWA } from 'vite-plugin-pwa';\nimport type { CustomInjectManifestOptions } from 'vite-plugin-pwa';\n\n/** vite-plugin-pwa still names this `rollup`; Vite 8’s SW build uses Rolldown. */\ntype VitePwaInjectManifestRollupPlugins = NonNullable<\n NonNullable<CustomInjectManifestOptions['buildPlugins']>['rollup']\n>;\n\n/**\n * JSON-serializable options for the SPA `NavigationRoute` (Workbox). Extra keys are kept for\n * forward-compatible SW parsing.\n */\nexport type DocksPwaNavigationRouteConfig = {\n /**\n * RegExp **sources** for Workbox `denylist` (matched against pathname + search).\n * Pass `[]` so no paths are denied (SPA shell for all navigations within allowlist).\n */\n denylist?: string[];\n /**\n * RegExp **sources** for Workbox `allowlist`. Omit to use Workbox’s default (`[/. /]`).\n * Set when the SPA shell should only apply to a subset of navigations.\n */\n allowlist?: string[];\n} & Record<string, unknown>;\n\n/**\n * JSON-serializable bundle injected into the service worker (`define`). Add sections here as\n * the SW gains more build-time tunables; unknown top-level keys are preserved in JSON for\n * forward-compatible workers.\n */\nexport type DocksPwaServiceWorkerConfig = {\n /** SPA shell fallback: Workbox `NavigationRoute` for `index.html`. */\n navigationRoute?: DocksPwaNavigationRouteConfig;\n} & Record<string, unknown>;\n\nfunction stripUndefinedEntries<T extends Record<string, unknown>>(obj: T): Record<string, unknown> {\n return Object.fromEntries(Object.entries(obj).filter(([, v]) => v !== undefined));\n}\n\nfunction resolveServiceWorkerConfig(user?: DocksPwaServiceWorkerConfig): DocksPwaServiceWorkerConfig {\n const u = stripUndefinedEntries((user ?? {}) as Record<string, unknown>);\n const navRaw = u.navigationRoute;\n const rest = Object.fromEntries(Object.entries(u).filter(([k]) => k !== 'navigationRoute'));\n\n if (navRaw === undefined) {\n return rest as DocksPwaServiceWorkerConfig;\n }\n if (typeof navRaw !== 'object' || navRaw === null || Array.isArray(navRaw)) {\n throw new Error('createDocksPwaPlugin.serviceWorkerConfig.navigationRoute must be a plain object');\n }\n\n const navigationRoute = stripUndefinedEntries(navRaw as Record<string, unknown>) as DocksPwaNavigationRouteConfig;\n\n return {\n ...rest,\n navigationRoute,\n } as DocksPwaServiceWorkerConfig;\n}\n\nexport type CreateDocksPwaPluginOptions = {\n basePath: string;\n appName: string;\n appDescription: string;\n maximumFileSizeToCacheInBytes: number;\n shortName?: string;\n /**\n * Serializable object injected into the SW build. No implicit defaults: set `navigationRoute`\n * (e.g. `denylist`) only when your deployment needs it.\n */\n serviceWorkerConfig?: DocksPwaServiceWorkerConfig;\n /** Extra Vite / Rolldown plugins for the injectManifest service worker build only. */\n injectManifestBuildPlugins?: {\n vite?: UserConfig['plugins'];\n /** Rolldown plugins (Vite 8+). Passed through to vite-plugin-pwa as `buildPlugins.rollup`. */\n rolldown?: RolldownOptions['plugins'];\n };\n};\n\nconst DEFAULT_GLOB_PATTERNS = ['**/*.{js,css,html,ico,png,svg,webp,woff2,woff,ttf,wasm}'];\nconst DEFAULT_ASSETS = ['favicon.svg', 'logo.svg', 'logo-loading.svg'];\nconst pwaSwPath = fileURLToPath(import.meta.resolve('@eclipse-docks/extension-pwa/sw'));\nconst pwaSwDir = path.dirname(pwaSwPath);\nconst pwaSwFilename = path.basename(pwaSwPath);\n\nexport function createDocksPwaPlugin({\n basePath,\n appName,\n appDescription,\n maximumFileSizeToCacheInBytes,\n shortName = appName,\n serviceWorkerConfig,\n injectManifestBuildPlugins,\n}: CreateDocksPwaPluginOptions): PluginOption {\n const resolvedSwConfig = resolveServiceWorkerConfig(serviceWorkerConfig);\n\n return VitePWA({\n registerType: 'autoUpdate',\n injectRegister: 'inline',\n strategies: 'injectManifest',\n srcDir: pwaSwDir,\n filename: pwaSwFilename,\n manifest: {\n name: appName,\n short_name: shortName,\n description: appDescription,\n theme_color: '#1a1a1a',\n background_color: '#1a1a1a',\n display: 'standalone',\n start_url: basePath,\n scope: basePath,\n icons: [\n {\n src: 'logo.svg',\n sizes: 'any',\n type: 'image/svg+xml',\n purpose: 'any',\n },\n {\n src: 'favicon.svg',\n sizes: 'any',\n type: 'image/svg+xml',\n purpose: 'monochrome',\n },\n ],\n },\n includeAssets: DEFAULT_ASSETS,\n injectManifest: {\n maximumFileSizeToCacheInBytes,\n globPatterns: DEFAULT_GLOB_PATTERNS,\n buildPlugins: {\n vite: [\n {\n name: 'docks-pwa-sw-injected-config',\n config() {\n return {\n define: {\n __DOCKS_SW_INJECTED_CONFIG__: JSON.stringify(resolvedSwConfig),\n },\n };\n },\n },\n ...(injectManifestBuildPlugins?.vite ?? []),\n ],\n rollup: injectManifestBuildPlugins?.rolldown as VitePwaInjectManifestRollupPlugins,\n },\n },\n devOptions: {\n enabled: false,\n },\n });\n}\n"],"mappings":";;;;AAuCA,SAAS,sBAAyD,KAAiC;AACjG,QAAO,OAAO,YAAY,OAAO,QAAQ,IAAI,CAAC,QAAQ,GAAG,OAAO,MAAM,KAAA,EAAU,CAAC;;AAGnF,SAAS,2BAA2B,MAAiE;CACnG,MAAM,IAAI,sBAAuB,QAAQ,EAAE,CAA6B;CACxE,MAAM,SAAS,EAAE;CACjB,MAAM,OAAO,OAAO,YAAY,OAAO,QAAQ,EAAE,CAAC,QAAQ,CAAC,OAAO,MAAM,kBAAkB,CAAC;AAE3F,KAAI,WAAW,KAAA,EACb,QAAO;AAET,KAAI,OAAO,WAAW,YAAY,WAAW,QAAQ,MAAM,QAAQ,OAAO,CACxE,OAAM,IAAI,MAAM,kFAAkF;CAGpG,MAAM,kBAAkB,sBAAsB,OAAkC;AAEhF,QAAO;EACL,GAAG;EACH;EACD;;AAsBH,IAAM,wBAAwB,CAAC,0DAA0D;AACzF,IAAM,iBAAiB;CAAC;CAAe;CAAY;CAAmB;AACtE,IAAM,YAAY,cAAc,OAAO,KAAK,QAAQ,kCAAkC,CAAC;AACvF,IAAM,WAAW,KAAK,QAAQ,UAAU;AACxC,IAAM,gBAAgB,KAAK,SAAS,UAAU;AAE9C,SAAgB,qBAAqB,EACnC,UACA,SACA,gBACA,+BACA,YAAY,SACZ,qBACA,8BAC4C;CAC5C,MAAM,mBAAmB,2BAA2B,oBAAoB;AAExE,QAAO,QAAQ;EACb,cAAc;EACd,gBAAgB;EAChB,YAAY;EACZ,QAAQ;EACR,UAAU;EACV,UAAU;GACR,MAAM;GACN,YAAY;GACZ,aAAa;GACb,aAAa;GACb,kBAAkB;GAClB,SAAS;GACT,WAAW;GACX,OAAO;GACP,OAAO,CACL;IACE,KAAK;IACL,OAAO;IACP,MAAM;IACN,SAAS;IACV,EACD;IACE,KAAK;IACL,OAAO;IACP,MAAM;IACN,SAAS;IACV,CACF;GACF;EACD,eAAe;EACf,gBAAgB;GACd;GACA,cAAc;GACd,cAAc;IACZ,MAAM,CACJ;KACE,MAAM;KACN,SAAS;AACP,aAAO,EACL,QAAQ,EACN,8BAA8B,KAAK,UAAU,iBAAiB,EAC/D,EACF;;KAEJ,EACD,GAAI,4BAA4B,QAAQ,EAAE,CAC3C;IACD,QAAQ,4BAA4B;IACrC;GACF;EACD,YAAY,EACV,SAAS,OACV;EACF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eclipse-docks/extension-pwa",
3
- "version": "0.7.95",
3
+ "version": "0.7.97",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "exports": {
@@ -21,6 +21,7 @@
21
21
  "vite-plugin-pwa": "^1.2.0"
22
22
  },
23
23
  "devDependencies": {
24
+ "rolldown": "1.0.0-rc.15",
24
25
  "typescript": "^6.0.0",
25
26
  "vite": "^8.0.0",
26
27
  "vite-plugin-dts": "^4.5.4"
package/src/sw.ts CHANGED
@@ -83,8 +83,41 @@ addPlugins([
83
83
 
84
84
  precacheAndRoute(PRECACHE_MANIFEST);
85
85
 
86
+ /** Injected by `createDocksPwaPlugin` for the SW build only (JSON: `DocksPwaServiceWorkerConfig`). */
87
+ declare const __DOCKS_SW_INJECTED_CONFIG__: Readonly<Record<string, unknown>>;
88
+
89
+ function recordOrEmpty(value: unknown, path: string): Record<string, unknown> {
90
+ if (value === undefined) {
91
+ return {};
92
+ }
93
+ if (typeof value !== 'object' || value === null || Array.isArray(value)) {
94
+ throw new Error(`Docks PWA SW: "${path}" must be a plain object`);
95
+ }
96
+ return value as Record<string, unknown>;
97
+ }
98
+
99
+ function regexpSourcesFromNavConfig(config: Readonly<Record<string, unknown>>, key: string): RegExp[] {
100
+ const raw = config[key];
101
+ if (raw === undefined) {
102
+ return [];
103
+ }
104
+ if (!Array.isArray(raw) || !raw.every((x): x is string => typeof x === 'string')) {
105
+ throw new Error(`Docks PWA SW: navigationRoute.${key} must be string[]`);
106
+ }
107
+ return raw.map((s) => new RegExp(s));
108
+ }
109
+
110
+ const swCfg = __DOCKS_SW_INJECTED_CONFIG__;
86
111
  const indexUrl = new URL('index.html', self.registration.scope).href;
87
- registerRoute(new NavigationRoute(createHandlerBoundToURL(indexUrl)));
112
+ const navCfg = recordOrEmpty(swCfg.navigationRoute, 'navigationRoute');
113
+ const denylist = regexpSourcesFromNavConfig(navCfg, 'denylist');
114
+ const allowlist = regexpSourcesFromNavConfig(navCfg, 'allowlist');
115
+ registerRoute(
116
+ new NavigationRoute(createHandlerBoundToURL(indexUrl), {
117
+ ...(allowlist.length > 0 ? { allowlist } : {}),
118
+ denylist,
119
+ }),
120
+ );
88
121
 
89
122
  self.addEventListener('message', (event) => {
90
123
  if (event.data?.type === 'SKIP_WAITING') {