@serwist/turbopack 9.5.9 → 9.5.11

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 +1 @@
1
- {"version":3,"file":"index.react.d.mts","names":[],"sources":["../src/lib/context.ts","../src/index.react.tsx"],"mappings":";;;;;UAGiB,oBAAA;EACf,OAAA,EAAS,OAAA;AAAA;AAAA,cAKE,UAAA,QAAU,oBAAA;;;UCJN,oBAAA;EACf,KAAA;EACA,OAAA;EACA,QAAA;EACA,iBAAA;EACA,cAAA;EACA,OAAA,GAAU,mBAAA;EACV,QAAA,GAAW,SAAA;AAAA;AAAA,QAGL,MAAA;EAAA,UACI,MAAA;IACR,OAAA,EAAS,OAAA;EAAA;AAAA;;AAZb;;;;iBAqBgB,eAAA,CAAA;EACd,KAAA;EACA,OAAA;EACA,QAAA;EACA,iBAAA;EACA,cAAA;EACA,OAAA;EACA;AAAA,GACC,oBAAA,GAAoB,oBAAA,CAAA,GAAA,CAAA,OAAA"}
1
+ {"version":3,"file":"index.react.d.mts","names":[],"sources":["../src/lib/context.ts","../src/index.react.tsx"],"mappings":";;;;;UAGiB,oBAAA;EACf,OAAA,EAAS,OAAA;AAAA;AAAA,cAKE,UAAA,QAAU,oBAAA;;;UCHN,oBAAA;EACf,KAAA;EACA,OAAA;EACA,QAAA;EACA,iBAAA;EACA,cAAA;EACA,OAAA,GAAU,mBAAA;EACV,QAAA,GAAW,SAAA;AAAA;AAAA,QAGL,MAAA;EAAA,UACI,MAAA;IACR,OAAA,EAAS,OAAA;EAAA;AAAA;;AAZb;;;;iBAqBgB,eAAA,CAAA;EACd,KAAA;EACA,OAAA;EACA,QAAA;EACA,iBAAA;EACA,cAAA;EACA,OAAA;EACA;AAAA,GACC,oBAAA,GAAoB,oBAAA,CAAA,GAAA,CAAA,OAAA"}
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { c } from "react/compiler-runtime";
2
3
  import { Serwist } from "@serwist/window";
3
4
  import { isCurrentPageOutOfScope } from "@serwist/window/internal";
@@ -1 +1 @@
1
- {"version":3,"file":"index.react.mjs","names":["Serwist","createContext","useContext","SerwistContextValues","serwist","SerwistContext","useSerwist","context","Error","Serwist","isCurrentPageOutOfScope","ReactNode","useEffect","useState","SerwistContext","useSerwist","SerwistProviderProps","swUrl","disable","register","cacheOnNavigation","reloadOnOnline","options","RegistrationOptions","children","global","Window","serwist","SerwistProvider","t0","$","_c","t1","t2","t3","t4","undefined","t5","window","scope","navigator","type","t6","t7","cacheUrls","url","onLine","messageSW","payload","urlsToCache","cacheCurrentPathname","location","pathname","pushState","history","replaceState","t8","args","apply","t9","args_0","addEventListener","removeEventListener","reload","_temp","t10","t11"],"sources":["../src/lib/context.ts","../src/index.react.tsx"],"sourcesContent":["import type { Serwist } from \"@serwist/window\";\nimport { createContext, useContext } from \"react\";\n\nexport interface SerwistContextValues {\n serwist: Serwist | null;\n}\n\nexport const SerwistContext = createContext<SerwistContextValues>(null!);\n\nexport const useSerwist = () => {\n const context = useContext(SerwistContext);\n if (!context) {\n throw new Error(\"[useSerwist]: 'SerwistContext' is not available.\");\n }\n return context;\n};\n","import { Serwist } from \"@serwist/window\";\nimport { isCurrentPageOutOfScope } from \"@serwist/window/internal\";\nimport { type ReactNode, useEffect, useState } from \"react\";\nimport { SerwistContext, useSerwist } from \"./lib/context.js\";\n\nexport interface SerwistProviderProps {\n swUrl: string;\n disable?: boolean;\n register?: boolean;\n cacheOnNavigation?: boolean;\n reloadOnOnline?: boolean;\n options?: RegistrationOptions;\n children?: ReactNode;\n}\n\ndeclare global {\n interface Window {\n serwist: Serwist;\n }\n}\n\n/**\n * `@serwist/window` provider for Next.js apps.\n * @param options\n * @returns\n */\nexport function SerwistProvider({\n swUrl,\n disable = false,\n register = true,\n cacheOnNavigation = true,\n reloadOnOnline = true,\n options,\n children,\n}: SerwistProviderProps) {\n const [serwist] = useState(() => {\n if (typeof window === \"undefined\") return null;\n if (disable) return null;\n const scope = options?.scope || \"/\";\n if (!(window.serwist && window.serwist instanceof Serwist) && \"serviceWorker\" in navigator) {\n window.serwist = new Serwist(swUrl, { ...options, scope, type: options?.type || \"module\" });\n if (register && !isCurrentPageOutOfScope(scope)) {\n void window.serwist.register();\n }\n }\n return window.serwist ?? null;\n });\n useEffect(() => {\n const cacheUrls = async (url?: string | URL | null | undefined) => {\n if (!window.navigator.onLine || !url) {\n return;\n }\n serwist?.messageSW({\n type: \"CACHE_URLS\",\n payload: { urlsToCache: [url] },\n });\n };\n const cacheCurrentPathname = () => cacheUrls(window.location.pathname);\n const pushState = history.pushState;\n const replaceState = history.replaceState;\n\n if (cacheOnNavigation) {\n history.pushState = (...args) => {\n pushState.apply(history, args);\n cacheUrls(args[2]);\n };\n history.replaceState = (...args) => {\n replaceState.apply(history, args);\n cacheUrls(args[2]);\n };\n window.addEventListener(\"online\", cacheCurrentPathname);\n }\n\n return () => {\n history.pushState = pushState;\n history.replaceState = replaceState;\n window.removeEventListener(\"online\", cacheCurrentPathname);\n };\n }, [serwist, cacheOnNavigation]);\n useEffect(() => {\n const reload = () => location.reload();\n if (reloadOnOnline) {\n window.addEventListener(\"online\", reload);\n }\n return () => {\n window.removeEventListener(\"online\", reload);\n };\n }, [reloadOnOnline]);\n return <SerwistContext.Provider value={{ serwist }}>{children}</SerwistContext.Provider>;\n}\n\nexport { useSerwist };\n"],"mappings":";;;;;;AAOA,MAAaK,iBAAiBJ,cAAoC,KAAM;AAExE,MAAaK,mBAAa;CACxB,MAAAC,UAAgBL,WAAWG,eAAe;AAC1C,KAAI,CAACE,QACH,OAAM,IAAIC,MAAM,mDAAmD;AACpE,QACMD;;;;;;;;;ACYT,SAAOqB,gBAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,GAAA;CAAyB,MAAA,EAAAd,OAAAC,SAAAc,IAAAb,UAAAc,IAAAb,mBAAAc,IAAAb,gBAAAc,IAAAb,SAAAE,aAAAK;CAE9B,MAAAX,UAAAc,OAAAI,KAAAA,IAAA,QAAAJ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AAAAM,IAAA,MAAAN;AAAAM,IAAA,MAAAmC;AAAAnC,IAAA,MAAAoC;OAAAA,OAAApC,EAAA;AAAA,QAAjFoC;;AA9DF,SAAAF,QAAA;AAAA,QAsDkBb,SAAQY,QAAS"}
1
+ {"version":3,"file":"index.react.mjs","names":["Serwist","createContext","useContext","SerwistContextValues","serwist","SerwistContext","useSerwist","context","Error","c","_c","Serwist","isCurrentPageOutOfScope","ReactNode","useEffect","useState","SerwistContext","useSerwist","SerwistProviderProps","swUrl","disable","register","cacheOnNavigation","reloadOnOnline","options","RegistrationOptions","children","global","Window","serwist","SerwistProvider","t0","$","t1","t2","t3","t4","undefined","t5","window","scope","navigator","type","t6","t7","cacheUrls","url","onLine","messageSW","payload","urlsToCache","cacheCurrentPathname","location","pathname","pushState","history","replaceState","t8","args","apply","t9","args_0","addEventListener","removeEventListener","reload","_temp","t10","t11"],"sources":["../src/lib/context.ts","../src/index.react.tsx"],"sourcesContent":["import type { Serwist } from \"@serwist/window\";\nimport { createContext, useContext } from \"react\";\n\nexport interface SerwistContextValues {\n serwist: Serwist | null;\n}\n\nexport const SerwistContext = createContext<SerwistContextValues>(null!);\n\nexport const useSerwist = () => {\n const context = useContext(SerwistContext);\n if (!context) {\n throw new Error(\"[useSerwist]: 'SerwistContext' is not available.\");\n }\n return context;\n};\n","\"use client\";\nimport { Serwist } from \"@serwist/window\";\nimport { isCurrentPageOutOfScope } from \"@serwist/window/internal\";\nimport { type ReactNode, useEffect, useState } from \"react\";\nimport { SerwistContext, useSerwist } from \"./lib/context.js\";\n\nexport interface SerwistProviderProps {\n swUrl: string;\n disable?: boolean;\n register?: boolean;\n cacheOnNavigation?: boolean;\n reloadOnOnline?: boolean;\n options?: RegistrationOptions;\n children?: ReactNode;\n}\n\ndeclare global {\n interface Window {\n serwist: Serwist;\n }\n}\n\n/**\n * `@serwist/window` provider for Next.js apps.\n * @param options\n * @returns\n */\nexport function SerwistProvider({\n swUrl,\n disable = false,\n register = true,\n cacheOnNavigation = true,\n reloadOnOnline = true,\n options,\n children,\n}: SerwistProviderProps) {\n const [serwist] = useState(() => {\n if (typeof window === \"undefined\") return null;\n if (disable) return null;\n const scope = options?.scope || \"/\";\n if (!(window.serwist && window.serwist instanceof Serwist) && \"serviceWorker\" in navigator) {\n window.serwist = new Serwist(swUrl, { ...options, scope, type: options?.type || \"module\" });\n if (register && !isCurrentPageOutOfScope(scope)) {\n void window.serwist.register();\n }\n }\n return window.serwist ?? null;\n });\n useEffect(() => {\n const cacheUrls = async (url?: string | URL | null | undefined) => {\n if (!window.navigator.onLine || !url) {\n return;\n }\n serwist?.messageSW({\n type: \"CACHE_URLS\",\n payload: { urlsToCache: [url] },\n });\n };\n const cacheCurrentPathname = () => cacheUrls(window.location.pathname);\n const pushState = history.pushState;\n const replaceState = history.replaceState;\n\n if (cacheOnNavigation) {\n history.pushState = (...args) => {\n pushState.apply(history, args);\n cacheUrls(args[2]);\n };\n history.replaceState = (...args) => {\n replaceState.apply(history, args);\n cacheUrls(args[2]);\n };\n window.addEventListener(\"online\", cacheCurrentPathname);\n }\n\n return () => {\n history.pushState = pushState;\n history.replaceState = replaceState;\n window.removeEventListener(\"online\", cacheCurrentPathname);\n };\n }, [serwist, cacheOnNavigation]);\n useEffect(() => {\n const reload = () => location.reload();\n if (reloadOnOnline) {\n window.addEventListener(\"online\", reload);\n }\n return () => {\n window.removeEventListener(\"online\", reload);\n };\n }, [reloadOnOnline]);\n return <SerwistContext.Provider value={{ serwist }}>{children}</SerwistContext.Provider>;\n}\n\nexport { useSerwist };\n"],"mappings":";;;;;;;AAOA,MAAaK,iBAAiBJ,cAAoC,KAAM;AAExE,MAAaK,mBAAa;CACxB,MAAAC,UAAgBL,WAAWG,eAAe;AAC1C,KAAI,CAACE,QACH,OAAM,IAAIC,MAAM,mDAAmD;AACpE,QACMD;;;;;;;;;ACaT,SAAOuB,gBAAAC,IAAA;CAAA,MAAAC,IAAAtB,EAAA,GAAA;CAAyB,MAAA,EAAAS,OAAAC,S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AAmC;AAAA,KAAAnC,EAAA,QAAAN,YAAAM,EAAA,QAAAkC,KAAA;AAA3CC,QAAA,oBAAA,eAAA,UAAA;GAAgC,OAAAD;GAAcxC;GAAmC,CAAA;AAAAM,IAAA,MAAAN;AAAAM,IAAA,MAAAkC;AAAAlC,IAAA,MAAAmC;OAAAA,OAAAnC,EAAA;AAAA,QAAjFmC;;AA9DF,SAAAF,QAAA;AAAA,QAsDkBb,SAAQY,QAAS"}
@@ -16,6 +16,23 @@ declare const turboPartial: z$1.ZodObject<{
16
16
  esbuildOptions: z$1.ZodPrefault<z$1.ZodRecord<z$1.ZodLiteral<"bundle" | "splitting" | "preserveSymlinks" | "external" | "packages" | "alias" | "loader" | "resolveExtensions" | "mainFields" | "conditions" | "allowOverwrite" | "tsconfig" | "outExtension" | "publicPath" | "inject" | "banner" | "footer" | "plugins" | "sourcemap" | "legalComments" | "sourceRoot" | "sourcesContent" | "format" | "globalName" | "target" | "supported" | "mangleProps" | "reserveProps" | "mangleQuoted" | "mangleCache" | "drop" | "dropLabels" | "minify" | "minifyWhitespace" | "minifyIdentifiers" | "minifySyntax" | "lineLimit" | "charset" | "treeShaking" | "ignoreAnnotations" | "jsx" | "jsxFactory" | "jsxFragment" | "jsxImportSource" | "jsxDev" | "jsxSideEffects" | "define" | "pure" | "keepNames" | "absPaths" | "color" | "logLevel" | "logLimit" | "logOverride" | "tsconfigRaw"> & z$1.z.core.$partial, z$1.ZodAny>>;
17
17
  }, z$1.z.core.$strict>;
18
18
  declare const injectManifestOptions: z$1.ZodPipe<z$1.ZodObject<{
19
+ cwd: z$1.ZodPrefault<z$1.ZodString>;
20
+ nextConfig: z$1.ZodOptional<z$1.ZodObject<{
21
+ assetPrefix: z$1.ZodOptional<z$1.ZodString>;
22
+ basePath: z$1.ZodOptional<z$1.ZodString>;
23
+ distDir: z$1.ZodOptional<z$1.ZodString>;
24
+ }, z$1.z.core.$strip>>;
25
+ useNativeEsbuild: z$1.ZodPrefault<z$1.ZodBoolean>;
26
+ rebuildOnChange: z$1.ZodPrefault<z$1.ZodBoolean>;
27
+ esbuildOptions: z$1.ZodPrefault<z$1.ZodRecord<z$1.ZodLiteral<"bundle" | "splitting" | "preserveSymlinks" | "external" | "packages" | "alias" | "loader" | "resolveExtensions" | "mainFields" | "conditions" | "allowOverwrite" | "tsconfig" | "outExtension" | "publicPath" | "inject" | "banner" | "footer" | "plugins" | "sourcemap" | "legalComments" | "sourceRoot" | "sourcesContent" | "format" | "globalName" | "target" | "supported" | "mangleProps" | "reserveProps" | "mangleQuoted" | "mangleCache" | "drop" | "dropLabels" | "minify" | "minifyWhitespace" | "minifyIdentifiers" | "minifySyntax" | "lineLimit" | "charset" | "treeShaking" | "ignoreAnnotations" | "jsx" | "jsxFactory" | "jsxFragment" | "jsxImportSource" | "jsxDev" | "jsxSideEffects" | "define" | "pure" | "keepNames" | "absPaths" | "color" | "logLevel" | "logLimit" | "logOverride" | "tsconfigRaw"> & z$1.z.core.$partial, z$1.ZodAny>>;
28
+ globPatterns: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
29
+ globDirectory: z$1.ZodOptional<z$1.ZodString>;
30
+ injectionPoint: z$1.ZodDefault<z$1.ZodString>;
31
+ swSrc: z$1.ZodString;
32
+ globFollow: z$1.ZodDefault<z$1.ZodBoolean>;
33
+ globIgnores: z$1.ZodDefault<z$1.ZodArray<z$1.ZodString>>;
34
+ globStrict: z$1.ZodDefault<z$1.ZodBoolean>;
35
+ templatedURLs: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnion<readonly [z$1.ZodString, z$1.ZodArray<z$1.ZodString>]>>>;
19
36
  additionalPrecacheEntries: z$1.ZodOptional<z$1.ZodArray<z$1.ZodUnion<readonly [z$1.ZodString, z$1.ZodObject<{
20
37
  integrity: z$1.ZodOptional<z$1.ZodString>;
21
38
  revision: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
@@ -77,23 +94,6 @@ declare const injectManifestOptions: z$1.ZodPipe<z$1.ZodObject<{
77
94
  }, z$1.z.core.$strict>>>>>>;
78
95
  maximumFileSizeToCacheInBytes: z$1.ZodDefault<z$1.ZodNumber>;
79
96
  modifyURLPrefix: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
80
- globFollow: z$1.ZodDefault<z$1.ZodBoolean>;
81
- globIgnores: z$1.ZodDefault<z$1.ZodArray<z$1.ZodString>>;
82
- globPatterns: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
83
- globStrict: z$1.ZodDefault<z$1.ZodBoolean>;
84
- templatedURLs: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnion<readonly [z$1.ZodString, z$1.ZodArray<z$1.ZodString>]>>>;
85
- injectionPoint: z$1.ZodDefault<z$1.ZodString>;
86
- swSrc: z$1.ZodString;
87
- globDirectory: z$1.ZodOptional<z$1.ZodString>;
88
- cwd: z$1.ZodPrefault<z$1.ZodString>;
89
- nextConfig: z$1.ZodOptional<z$1.ZodObject<{
90
- assetPrefix: z$1.ZodOptional<z$1.ZodString>;
91
- basePath: z$1.ZodOptional<z$1.ZodString>;
92
- distDir: z$1.ZodOptional<z$1.ZodString>;
93
- }, z$1.z.core.$strip>>;
94
- useNativeEsbuild: z$1.ZodPrefault<z$1.ZodBoolean>;
95
- rebuildOnChange: z$1.ZodPrefault<z$1.ZodBoolean>;
96
- esbuildOptions: z$1.ZodPrefault<z$1.ZodRecord<z$1.ZodLiteral<"bundle" | "splitting" | "preserveSymlinks" | "external" | "packages" | "alias" | "loader" | "resolveExtensions" | "mainFields" | "conditions" | "allowOverwrite" | "tsconfig" | "outExtension" | "publicPath" | "inject" | "banner" | "footer" | "plugins" | "sourcemap" | "legalComments" | "sourceRoot" | "sourcesContent" | "format" | "globalName" | "target" | "supported" | "mangleProps" | "reserveProps" | "mangleQuoted" | "mangleCache" | "drop" | "dropLabels" | "minify" | "minifyWhitespace" | "minifyIdentifiers" | "minifySyntax" | "lineLimit" | "charset" | "treeShaking" | "ignoreAnnotations" | "jsx" | "jsxFactory" | "jsxFragment" | "jsxImportSource" | "jsxDev" | "jsxSideEffects" | "define" | "pure" | "keepNames" | "absPaths" | "color" | "logLevel" | "logLimit" | "logOverride" | "tsconfigRaw"> & z$1.z.core.$partial, z$1.ZodAny>>;
97
97
  }, z$1.z.core.$strict>, z$1.ZodTransform<{
98
98
  swSrc: string;
99
99
  globPatterns: string[];
@@ -235,15 +235,16 @@ declare const injectManifestOptions: z$1.ZodPipe<z$1.ZodObject<{
235
235
  basePath: string;
236
236
  assetPrefix: string;
237
237
  };
238
- maximumFileSizeToCacheInBytes: number;
239
- globFollow: boolean;
240
- globIgnores: string[];
241
- globStrict: boolean;
242
- injectionPoint: string;
243
238
  cwd: string;
244
239
  useNativeEsbuild: boolean;
245
240
  rebuildOnChange: boolean;
246
241
  esbuildOptions: Partial<Record<"bundle" | "splitting" | "preserveSymlinks" | "external" | "packages" | "alias" | "loader" | "resolveExtensions" | "mainFields" | "conditions" | "allowOverwrite" | "tsconfig" | "outExtension" | "publicPath" | "inject" | "banner" | "footer" | "plugins" | "sourcemap" | "legalComments" | "sourceRoot" | "sourcesContent" | "format" | "globalName" | "target" | "supported" | "mangleProps" | "reserveProps" | "mangleQuoted" | "mangleCache" | "drop" | "dropLabels" | "minify" | "minifyWhitespace" | "minifyIdentifiers" | "minifySyntax" | "lineLimit" | "charset" | "treeShaking" | "ignoreAnnotations" | "jsx" | "jsxFactory" | "jsxFragment" | "jsxImportSource" | "jsxDev" | "jsxSideEffects" | "define" | "pure" | "keepNames" | "absPaths" | "color" | "logLevel" | "logLimit" | "logOverride" | "tsconfigRaw", any>>;
242
+ injectionPoint: string;
243
+ globFollow: boolean;
244
+ globIgnores: string[];
245
+ globStrict: boolean;
246
+ maximumFileSizeToCacheInBytes: number;
247
+ templatedURLs?: Record<string, string | string[]> | undefined;
247
248
  additionalPrecacheEntries?: (string | {
248
249
  url: string;
249
250
  integrity?: string | undefined;
@@ -264,18 +265,25 @@ declare const injectManifestOptions: z$1.ZodPipe<z$1.ZodObject<{
264
265
  warnings: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
265
266
  }, z$1.z.core.$strict>>[] | undefined;
266
267
  modifyURLPrefix?: Record<string, string> | undefined;
267
- templatedURLs?: Record<string, string | string[]> | undefined;
268
268
  }, {
269
- maximumFileSizeToCacheInBytes: number;
270
- globFollow: boolean;
271
- globIgnores: string[];
272
- globStrict: boolean;
273
- injectionPoint: string;
274
- swSrc: string;
275
269
  cwd: string;
276
270
  useNativeEsbuild: boolean;
277
271
  rebuildOnChange: boolean;
278
272
  esbuildOptions: Partial<Record<"bundle" | "splitting" | "preserveSymlinks" | "external" | "packages" | "alias" | "loader" | "resolveExtensions" | "mainFields" | "conditions" | "allowOverwrite" | "tsconfig" | "outExtension" | "publicPath" | "inject" | "banner" | "footer" | "plugins" | "sourcemap" | "legalComments" | "sourceRoot" | "sourcesContent" | "format" | "globalName" | "target" | "supported" | "mangleProps" | "reserveProps" | "mangleQuoted" | "mangleCache" | "drop" | "dropLabels" | "minify" | "minifyWhitespace" | "minifyIdentifiers" | "minifySyntax" | "lineLimit" | "charset" | "treeShaking" | "ignoreAnnotations" | "jsx" | "jsxFactory" | "jsxFragment" | "jsxImportSource" | "jsxDev" | "jsxSideEffects" | "define" | "pure" | "keepNames" | "absPaths" | "color" | "logLevel" | "logLimit" | "logOverride" | "tsconfigRaw", any>>;
273
+ injectionPoint: string;
274
+ swSrc: string;
275
+ globFollow: boolean;
276
+ globIgnores: string[];
277
+ globStrict: boolean;
278
+ maximumFileSizeToCacheInBytes: number;
279
+ nextConfig?: {
280
+ assetPrefix?: string | undefined;
281
+ basePath?: string | undefined;
282
+ distDir?: string | undefined;
283
+ } | undefined;
284
+ globPatterns?: string[] | undefined;
285
+ globDirectory?: string | undefined;
286
+ templatedURLs?: Record<string, string | string[]> | undefined;
279
287
  additionalPrecacheEntries?: (string | {
280
288
  url: string;
281
289
  integrity?: string | undefined;
@@ -297,14 +305,6 @@ declare const injectManifestOptions: z$1.ZodPipe<z$1.ZodObject<{
297
305
  warnings: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
298
306
  }, z$1.z.core.$strict>>[] | undefined;
299
307
  modifyURLPrefix?: Record<string, string> | undefined;
300
- globPatterns?: string[] | undefined;
301
- templatedURLs?: Record<string, string | string[]> | undefined;
302
- globDirectory?: string | undefined;
303
- nextConfig?: {
304
- assetPrefix?: string | undefined;
305
- basePath?: string | undefined;
306
- distDir?: string | undefined;
307
- } | undefined;
308
308
  }>>;
309
309
  //#endregion
310
310
  export { injectManifestOptions, turboPartial };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@serwist/turbopack",
3
- "version": "9.5.9",
3
+ "version": "9.5.11",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "description": "A module that integrates Serwist into your Next.js / Turbopack application.",
@@ -70,11 +70,11 @@
70
70
  "browserslist": "4.28.2",
71
71
  "kolorist": "1.8.0",
72
72
  "semver": "7.7.4",
73
- "zod": "4.3.6",
74
- "@serwist/utils": "9.5.9",
75
- "serwist": "9.5.9",
76
- "@serwist/window": "9.5.9",
77
- "@serwist/build": "9.5.9"
73
+ "zod": "4.4.1",
74
+ "@serwist/build": "9.5.11",
75
+ "@serwist/utils": "9.5.11",
76
+ "@serwist/window": "9.5.11",
77
+ "serwist": "9.5.11"
78
78
  },
79
79
  "devDependencies": {
80
80
  "@rolldown/plugin-babel": "0.2.3",
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { Serwist } from "@serwist/window";
2
3
  import { isCurrentPageOutOfScope } from "@serwist/window/internal";
3
4
  import { type ReactNode, useEffect, useState } from "react";