@serwist/turbopack 9.5.7 → 9.5.8
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/dist/chunks/index.schema-RVDaKxz4.js +189 -0
- package/dist/chunks/index.schema-RVDaKxz4.js.map +1 -0
- package/dist/index.d.mts +96 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +166 -0
- package/dist/index.mjs.map +1 -0
- package/dist/index.react.d.mts +42 -0
- package/dist/index.react.d.mts.map +1 -0
- package/dist/index.react.mjs +73 -0
- package/dist/index.react.mjs.map +1 -0
- package/dist/index.schema.d.mts +311 -0
- package/dist/index.schema.d.mts.map +1 -0
- package/dist/index.schema.mjs +2 -0
- package/dist/index.worker.d.mts +18 -0
- package/dist/index.worker.d.mts.map +1 -0
- package/dist/index.worker.mjs +227 -0
- package/dist/index.worker.mjs.map +1 -0
- package/package.json +31 -32
- package/dist/chunks/index.schema.js +0 -185
- package/dist/index.d.ts +0 -22
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -190
- package/dist/index.react.d.ts +0 -25
- package/dist/index.react.d.ts.map +0 -1
- package/dist/index.react.js +0 -88
- package/dist/index.schema.d.ts +0 -301
- package/dist/index.schema.d.ts.map +0 -1
- package/dist/index.schema.js +0 -8
- package/dist/index.worker.d.ts +0 -14
- package/dist/index.worker.d.ts.map +0 -1
- package/dist/index.worker.js +0 -261
- package/dist/lib/constants.d.ts +0 -2
- package/dist/lib/constants.d.ts.map +0 -1
- package/dist/lib/context.d.ts +0 -7
- package/dist/lib/context.d.ts.map +0 -1
- package/dist/lib/index.d.ts +0 -3
- package/dist/lib/index.d.ts.map +0 -1
- package/dist/lib/logger.d.ts +0 -8
- package/dist/lib/logger.d.ts.map +0 -1
- package/dist/lib/utils.d.ts +0 -3
- package/dist/lib/utils.d.ts.map +0 -1
- package/dist/types.d.ts +0 -72
- package/dist/types.d.ts.map +0 -1
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
import z$1 from "zod";
|
|
2
|
+
import * as _$next_dist_server_config_shared_js0 from "next/dist/server/config-shared.js";
|
|
3
|
+
import * as _$next_dist_lib_load_custom_routes_js0 from "next/dist/lib/load-custom-routes.js";
|
|
4
|
+
import * as _$next_dist_shared_lib_image_config_js0 from "next/dist/shared/lib/image-config.js";
|
|
5
|
+
|
|
6
|
+
//#region src/index.schema.d.ts
|
|
7
|
+
declare const turboPartial: z$1.ZodObject<{
|
|
8
|
+
cwd: z$1.ZodPrefault<z$1.ZodString>;
|
|
9
|
+
nextConfig: z$1.ZodOptional<z$1.ZodObject<{
|
|
10
|
+
assetPrefix: z$1.ZodOptional<z$1.ZodString>;
|
|
11
|
+
basePath: z$1.ZodOptional<z$1.ZodString>;
|
|
12
|
+
distDir: z$1.ZodOptional<z$1.ZodString>;
|
|
13
|
+
}, z$1.z.core.$strip>>;
|
|
14
|
+
useNativeEsbuild: z$1.ZodPrefault<z$1.ZodBoolean>;
|
|
15
|
+
rebuildOnChange: z$1.ZodPrefault<z$1.ZodBoolean>;
|
|
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
|
+
}, z$1.z.core.$strict>;
|
|
18
|
+
declare const injectManifestOptions: z$1.ZodPipe<z$1.ZodObject<{
|
|
19
|
+
additionalPrecacheEntries: z$1.ZodOptional<z$1.ZodArray<z$1.ZodUnion<readonly [z$1.ZodString, z$1.ZodObject<{
|
|
20
|
+
integrity: z$1.ZodOptional<z$1.ZodString>;
|
|
21
|
+
revision: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
22
|
+
url: z$1.ZodString;
|
|
23
|
+
}, z$1.z.core.$strict>]>>>;
|
|
24
|
+
dontCacheBustURLsMatching: z$1.ZodOptional<z$1.ZodCustom<RegExp, RegExp>>;
|
|
25
|
+
manifestTransforms: z$1.ZodOptional<z$1.ZodArray<z$1.ZodPipe<z$1.ZodCustom<z$1.z.core.$InferInnerFunctionTypeAsync<z$1.ZodTuple<[z$1.ZodArray<z$1.ZodObject<{
|
|
26
|
+
size: z$1.ZodNumber;
|
|
27
|
+
integrity: z$1.ZodOptional<z$1.ZodString>;
|
|
28
|
+
revision: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
29
|
+
url: z$1.ZodString;
|
|
30
|
+
}, z$1.z.core.$strip>>, z$1.ZodOptional<z$1.ZodUnknown>], null>, z$1.ZodObject<{
|
|
31
|
+
manifest: z$1.ZodArray<z$1.ZodObject<{
|
|
32
|
+
size: z$1.ZodNumber;
|
|
33
|
+
integrity: z$1.ZodOptional<z$1.ZodString>;
|
|
34
|
+
revision: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
35
|
+
url: z$1.ZodString;
|
|
36
|
+
}, z$1.z.core.$strip>>;
|
|
37
|
+
warnings: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
|
|
38
|
+
}, z$1.z.core.$strict>>, z$1.z.core.$InferInnerFunctionTypeAsync<z$1.ZodTuple<[z$1.ZodArray<z$1.ZodObject<{
|
|
39
|
+
size: z$1.ZodNumber;
|
|
40
|
+
integrity: z$1.ZodOptional<z$1.ZodString>;
|
|
41
|
+
revision: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
42
|
+
url: z$1.ZodString;
|
|
43
|
+
}, z$1.z.core.$strip>>, z$1.ZodOptional<z$1.ZodUnknown>], null>, z$1.ZodObject<{
|
|
44
|
+
manifest: z$1.ZodArray<z$1.ZodObject<{
|
|
45
|
+
size: z$1.ZodNumber;
|
|
46
|
+
integrity: z$1.ZodOptional<z$1.ZodString>;
|
|
47
|
+
revision: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
48
|
+
url: z$1.ZodString;
|
|
49
|
+
}, z$1.z.core.$strip>>;
|
|
50
|
+
warnings: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
|
|
51
|
+
}, z$1.z.core.$strict>>>, z$1.ZodTransform<z$1.z.core.$InferOuterFunctionTypeAsync<z$1.ZodTuple<[z$1.ZodArray<z$1.ZodObject<{
|
|
52
|
+
size: z$1.ZodNumber;
|
|
53
|
+
integrity: z$1.ZodOptional<z$1.ZodString>;
|
|
54
|
+
revision: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
55
|
+
url: z$1.ZodString;
|
|
56
|
+
}, z$1.z.core.$strip>>, z$1.ZodOptional<z$1.ZodUnknown>], null>, z$1.ZodObject<{
|
|
57
|
+
manifest: z$1.ZodArray<z$1.ZodObject<{
|
|
58
|
+
size: z$1.ZodNumber;
|
|
59
|
+
integrity: z$1.ZodOptional<z$1.ZodString>;
|
|
60
|
+
revision: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
61
|
+
url: z$1.ZodString;
|
|
62
|
+
}, z$1.z.core.$strip>>;
|
|
63
|
+
warnings: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
|
|
64
|
+
}, z$1.z.core.$strict>>, z$1.z.core.$InferInnerFunctionTypeAsync<z$1.ZodTuple<[z$1.ZodArray<z$1.ZodObject<{
|
|
65
|
+
size: z$1.ZodNumber;
|
|
66
|
+
integrity: z$1.ZodOptional<z$1.ZodString>;
|
|
67
|
+
revision: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
68
|
+
url: z$1.ZodString;
|
|
69
|
+
}, z$1.z.core.$strip>>, z$1.ZodOptional<z$1.ZodUnknown>], null>, z$1.ZodObject<{
|
|
70
|
+
manifest: z$1.ZodArray<z$1.ZodObject<{
|
|
71
|
+
size: z$1.ZodNumber;
|
|
72
|
+
integrity: z$1.ZodOptional<z$1.ZodString>;
|
|
73
|
+
revision: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
74
|
+
url: z$1.ZodString;
|
|
75
|
+
}, z$1.z.core.$strip>>;
|
|
76
|
+
warnings: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
|
|
77
|
+
}, z$1.z.core.$strict>>>>>>;
|
|
78
|
+
maximumFileSizeToCacheInBytes: z$1.ZodDefault<z$1.ZodNumber>;
|
|
79
|
+
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
|
+
}, z$1.z.core.$strict>, z$1.ZodTransform<{
|
|
98
|
+
swSrc: string;
|
|
99
|
+
globPatterns: string[];
|
|
100
|
+
globDirectory: string;
|
|
101
|
+
dontCacheBustURLsMatching: RegExp;
|
|
102
|
+
nextConfig: {
|
|
103
|
+
distDir: string;
|
|
104
|
+
basePath: string;
|
|
105
|
+
assetPrefix: string;
|
|
106
|
+
output: "standalone" | "export";
|
|
107
|
+
allowedDevOrigins: string[];
|
|
108
|
+
exportPathMap: (defaultMap: _$next_dist_server_config_shared_js0.ExportPathMap, ctx: {
|
|
109
|
+
dev: boolean;
|
|
110
|
+
dir: string;
|
|
111
|
+
outDir: string | null;
|
|
112
|
+
distDir: string;
|
|
113
|
+
buildId: string;
|
|
114
|
+
}) => Promise<_$next_dist_server_config_shared_js0.ExportPathMap> | _$next_dist_server_config_shared_js0.ExportPathMap;
|
|
115
|
+
i18n: _$next_dist_server_config_shared_js0.I18NConfig | null;
|
|
116
|
+
typescript: _$next_dist_server_config_shared_js0.TypeScriptConfig;
|
|
117
|
+
typedRoutes: boolean;
|
|
118
|
+
headers: () => Promise<_$next_dist_lib_load_custom_routes_js0.Header[]> | _$next_dist_lib_load_custom_routes_js0.Header[];
|
|
119
|
+
rewrites: () => Promise<_$next_dist_lib_load_custom_routes_js0.Rewrite[] | {
|
|
120
|
+
beforeFiles?: _$next_dist_lib_load_custom_routes_js0.Rewrite[];
|
|
121
|
+
afterFiles?: _$next_dist_lib_load_custom_routes_js0.Rewrite[];
|
|
122
|
+
fallback?: _$next_dist_lib_load_custom_routes_js0.Rewrite[];
|
|
123
|
+
}> | _$next_dist_lib_load_custom_routes_js0.Rewrite[] | {
|
|
124
|
+
beforeFiles?: _$next_dist_lib_load_custom_routes_js0.Rewrite[];
|
|
125
|
+
afterFiles?: _$next_dist_lib_load_custom_routes_js0.Rewrite[];
|
|
126
|
+
fallback?: _$next_dist_lib_load_custom_routes_js0.Rewrite[];
|
|
127
|
+
};
|
|
128
|
+
redirects: () => Promise<_$next_dist_lib_load_custom_routes_js0.Redirect[]> | _$next_dist_lib_load_custom_routes_js0.Redirect[];
|
|
129
|
+
excludeDefaultMomentLocales: boolean;
|
|
130
|
+
webpack: _$next_dist_server_config_shared_js0.NextJsWebpackConfig | null;
|
|
131
|
+
trailingSlash: boolean;
|
|
132
|
+
env: Record<string, string | undefined>;
|
|
133
|
+
cleanDistDir: boolean;
|
|
134
|
+
cacheHandler: string;
|
|
135
|
+
adapterPath: string;
|
|
136
|
+
cacheHandlers: {
|
|
137
|
+
default?: string;
|
|
138
|
+
remote?: string;
|
|
139
|
+
static?: string;
|
|
140
|
+
[handlerName: string]: string | undefined;
|
|
141
|
+
};
|
|
142
|
+
cacheMaxMemorySize: number;
|
|
143
|
+
useFileSystemPublicRoutes: boolean;
|
|
144
|
+
generateBuildId: () => string | null | Promise<string | null>;
|
|
145
|
+
generateEtags: boolean;
|
|
146
|
+
pageExtensions: string[];
|
|
147
|
+
compress: boolean;
|
|
148
|
+
poweredByHeader: boolean;
|
|
149
|
+
images: Partial<_$next_dist_shared_lib_image_config_js0.ImageConfigComplete> & Required<_$next_dist_shared_lib_image_config_js0.ImageConfigComplete>;
|
|
150
|
+
devIndicators: false | {
|
|
151
|
+
position?: "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
152
|
+
};
|
|
153
|
+
onDemandEntries: {
|
|
154
|
+
maxInactiveAge?: number;
|
|
155
|
+
pagesBufferLength?: number;
|
|
156
|
+
};
|
|
157
|
+
deploymentId: string;
|
|
158
|
+
sassOptions: {
|
|
159
|
+
implementation?: string;
|
|
160
|
+
[key: string]: any;
|
|
161
|
+
};
|
|
162
|
+
productionBrowserSourceMaps: boolean;
|
|
163
|
+
reactCompiler: boolean | _$next_dist_server_config_shared_js0.ReactCompilerOptions;
|
|
164
|
+
reactProductionProfiling: boolean;
|
|
165
|
+
reactStrictMode: boolean | null;
|
|
166
|
+
reactMaxHeadersLength: number;
|
|
167
|
+
httpAgentOptions: {
|
|
168
|
+
keepAlive?: boolean;
|
|
169
|
+
};
|
|
170
|
+
staticPageGenerationTimeout: number;
|
|
171
|
+
crossOrigin: "anonymous" | "use-credentials";
|
|
172
|
+
compiler: {
|
|
173
|
+
reactRemoveProperties?: boolean | {
|
|
174
|
+
properties?: string[];
|
|
175
|
+
};
|
|
176
|
+
relay?: {
|
|
177
|
+
src: string;
|
|
178
|
+
artifactDirectory?: string;
|
|
179
|
+
language?: "typescript" | "javascript" | "flow";
|
|
180
|
+
eagerEsModules?: boolean;
|
|
181
|
+
};
|
|
182
|
+
removeConsole?: boolean | {
|
|
183
|
+
exclude?: string[];
|
|
184
|
+
};
|
|
185
|
+
styledComponents?: boolean | _$next_dist_server_config_shared_js0.StyledComponentsConfig;
|
|
186
|
+
emotion?: boolean | _$next_dist_server_config_shared_js0.EmotionConfig;
|
|
187
|
+
styledJsx?: boolean | {
|
|
188
|
+
useLightningcss?: boolean;
|
|
189
|
+
};
|
|
190
|
+
define?: Record<string, string | number | boolean>;
|
|
191
|
+
defineServer?: Record<string, string | number | boolean>;
|
|
192
|
+
runAfterProductionCompile?: (metadata: {
|
|
193
|
+
projectDir: string;
|
|
194
|
+
distDir: string;
|
|
195
|
+
}) => Promise<void>;
|
|
196
|
+
};
|
|
197
|
+
transpilePackages: string[];
|
|
198
|
+
turbopack: _$next_dist_server_config_shared_js0.TurbopackOptions;
|
|
199
|
+
skipMiddlewareUrlNormalize: boolean;
|
|
200
|
+
skipProxyUrlNormalize: boolean;
|
|
201
|
+
skipTrailingSlashRedirect: boolean;
|
|
202
|
+
modularizeImports: Record<string, {
|
|
203
|
+
transform: string | Record<string, string>;
|
|
204
|
+
preventFullImport?: boolean;
|
|
205
|
+
skipDefaultConversion?: boolean;
|
|
206
|
+
}>;
|
|
207
|
+
logging: _$next_dist_server_config_shared_js0.LoggingConfig | false;
|
|
208
|
+
enablePrerenderSourceMaps: boolean;
|
|
209
|
+
cacheComponents: boolean;
|
|
210
|
+
cacheLife: {
|
|
211
|
+
[profile: string]: {
|
|
212
|
+
stale?: number;
|
|
213
|
+
revalidate?: number;
|
|
214
|
+
expire?: number;
|
|
215
|
+
};
|
|
216
|
+
};
|
|
217
|
+
expireTime: number;
|
|
218
|
+
experimental: _$next_dist_server_config_shared_js0.ExperimentalConfig & {
|
|
219
|
+
prefetchInlining?: _$next_dist_server_config_shared_js0.PrefetchInliningConfig;
|
|
220
|
+
};
|
|
221
|
+
bundlePagesRouterDependencies: boolean;
|
|
222
|
+
serverExternalPackages: string[];
|
|
223
|
+
outputFileTracingRoot: string;
|
|
224
|
+
outputFileTracingExcludes: Record<string, string[]>;
|
|
225
|
+
outputFileTracingIncludes: Record<string, string[]>;
|
|
226
|
+
watchOptions: {
|
|
227
|
+
pollIntervalMs?: number;
|
|
228
|
+
};
|
|
229
|
+
htmlLimitedBots: RegExp & string;
|
|
230
|
+
configFile: string | undefined;
|
|
231
|
+
configFileName: string;
|
|
232
|
+
distDirRoot: string;
|
|
233
|
+
} | {
|
|
234
|
+
distDir: string;
|
|
235
|
+
basePath: string;
|
|
236
|
+
assetPrefix: string;
|
|
237
|
+
};
|
|
238
|
+
maximumFileSizeToCacheInBytes: number;
|
|
239
|
+
globFollow: boolean;
|
|
240
|
+
globIgnores: string[];
|
|
241
|
+
globStrict: boolean;
|
|
242
|
+
injectionPoint: string;
|
|
243
|
+
cwd: string;
|
|
244
|
+
useNativeEsbuild: boolean;
|
|
245
|
+
rebuildOnChange: boolean;
|
|
246
|
+
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>>;
|
|
247
|
+
additionalPrecacheEntries?: (string | {
|
|
248
|
+
url: string;
|
|
249
|
+
integrity?: string | undefined;
|
|
250
|
+
revision?: string | null | undefined;
|
|
251
|
+
})[] | undefined;
|
|
252
|
+
manifestTransforms?: z$1.z.core.$InferOuterFunctionTypeAsync<z$1.ZodTuple<[z$1.ZodArray<z$1.ZodObject<{
|
|
253
|
+
size: z$1.ZodNumber;
|
|
254
|
+
integrity: z$1.ZodOptional<z$1.ZodString>;
|
|
255
|
+
revision: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
256
|
+
url: z$1.ZodString;
|
|
257
|
+
}, z$1.z.core.$strip>>, z$1.ZodOptional<z$1.ZodUnknown>], null>, z$1.ZodObject<{
|
|
258
|
+
manifest: z$1.ZodArray<z$1.ZodObject<{
|
|
259
|
+
size: z$1.ZodNumber;
|
|
260
|
+
integrity: z$1.ZodOptional<z$1.ZodString>;
|
|
261
|
+
revision: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
262
|
+
url: z$1.ZodString;
|
|
263
|
+
}, z$1.z.core.$strip>>;
|
|
264
|
+
warnings: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
|
|
265
|
+
}, z$1.z.core.$strict>>[] | undefined;
|
|
266
|
+
modifyURLPrefix?: Record<string, string> | undefined;
|
|
267
|
+
templatedURLs?: Record<string, string | string[]> | undefined;
|
|
268
|
+
}, {
|
|
269
|
+
maximumFileSizeToCacheInBytes: number;
|
|
270
|
+
globFollow: boolean;
|
|
271
|
+
globIgnores: string[];
|
|
272
|
+
globStrict: boolean;
|
|
273
|
+
injectionPoint: string;
|
|
274
|
+
swSrc: string;
|
|
275
|
+
cwd: string;
|
|
276
|
+
useNativeEsbuild: boolean;
|
|
277
|
+
rebuildOnChange: boolean;
|
|
278
|
+
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>>;
|
|
279
|
+
additionalPrecacheEntries?: (string | {
|
|
280
|
+
url: string;
|
|
281
|
+
integrity?: string | undefined;
|
|
282
|
+
revision?: string | null | undefined;
|
|
283
|
+
})[] | undefined;
|
|
284
|
+
dontCacheBustURLsMatching?: RegExp | undefined;
|
|
285
|
+
manifestTransforms?: z$1.z.core.$InferOuterFunctionTypeAsync<z$1.ZodTuple<[z$1.ZodArray<z$1.ZodObject<{
|
|
286
|
+
size: z$1.ZodNumber;
|
|
287
|
+
integrity: z$1.ZodOptional<z$1.ZodString>;
|
|
288
|
+
revision: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
289
|
+
url: z$1.ZodString;
|
|
290
|
+
}, z$1.z.core.$strip>>, z$1.ZodOptional<z$1.ZodUnknown>], null>, z$1.ZodObject<{
|
|
291
|
+
manifest: z$1.ZodArray<z$1.ZodObject<{
|
|
292
|
+
size: z$1.ZodNumber;
|
|
293
|
+
integrity: z$1.ZodOptional<z$1.ZodString>;
|
|
294
|
+
revision: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
295
|
+
url: z$1.ZodString;
|
|
296
|
+
}, z$1.z.core.$strip>>;
|
|
297
|
+
warnings: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
|
|
298
|
+
}, z$1.z.core.$strict>>[] | undefined;
|
|
299
|
+
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
|
+
}>>;
|
|
309
|
+
//#endregion
|
|
310
|
+
export { injectManifestOptions, turboPartial };
|
|
311
|
+
//# sourceMappingURL=index.schema.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.schema.d.mts","names":[],"sources":["../src/index.schema.ts"],"mappings":";;;;;;cASa,YAAA,EAAY,GAAA,CAAA,SAAA;;;;;;;;;;;cAcZ,qBAAA,EAAqB,GAAA,CAAA,OAAA,CAAA,GAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2DA8Cq3gC,OAAA;mBAAA,sCAAA,CAAgC,OAAA;iBAAA,sCAAA,CAA8B,OAAA;IAAA;2DAAwD,OAAA;mBAAA,sCAAA,CAAgC,OAAA;iBAAA,sCAAA,CAA8B,OAAA;IAAA;6BAAA,sCAAA,CAAA,QAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wEAA0wQ,sBAAA;0BAAA,oCAAA,CAAoD,aAAA;;;;eAAqR,MAAA;qBAA0P,MAAA;mCAA+S,QAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;8DAvClrzC,sBAAA;IAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { RuntimeCaching } from "serwist";
|
|
2
|
+
|
|
3
|
+
//#region src/index.worker.d.ts
|
|
4
|
+
declare const PAGES_CACHE_NAME: {
|
|
5
|
+
readonly rscPrefetch: "pages-rsc-prefetch";
|
|
6
|
+
readonly rsc: "pages-rsc";
|
|
7
|
+
readonly html: "pages";
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* The default, recommended list of caching strategies for applications
|
|
11
|
+
* built with Next.js.
|
|
12
|
+
*
|
|
13
|
+
* @see https://serwist.pages.dev/docs/next/worker-exports#default-cache
|
|
14
|
+
*/
|
|
15
|
+
declare const defaultCache: RuntimeCaching[];
|
|
16
|
+
//#endregion
|
|
17
|
+
export { PAGES_CACHE_NAME, defaultCache };
|
|
18
|
+
//# sourceMappingURL=index.worker.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.worker.d.mts","names":[],"sources":["../src/index.worker.ts"],"mappings":";;;cAGa,gBAAA;EAAA;;;;;;;;;;cAYA,YAAA,EAAc,cAAA"}
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
import { CacheFirst, ExpirationPlugin, NetworkFirst, NetworkOnly, RangeRequestsPlugin, StaleWhileRevalidate } from "serwist";
|
|
2
|
+
//#region src/index.worker.ts
|
|
3
|
+
const PAGES_CACHE_NAME = {
|
|
4
|
+
rscPrefetch: "pages-rsc-prefetch",
|
|
5
|
+
rsc: "pages-rsc",
|
|
6
|
+
html: "pages"
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* The default, recommended list of caching strategies for applications
|
|
10
|
+
* built with Next.js.
|
|
11
|
+
*
|
|
12
|
+
* @see https://serwist.pages.dev/docs/next/worker-exports#default-cache
|
|
13
|
+
*/
|
|
14
|
+
const defaultCache = process.env.NODE_ENV !== "production" ? [{
|
|
15
|
+
matcher: /.*/i,
|
|
16
|
+
handler: new NetworkOnly()
|
|
17
|
+
}] : [
|
|
18
|
+
{
|
|
19
|
+
matcher: /^https:\/\/fonts\.(?:gstatic)\.com\/.*/i,
|
|
20
|
+
handler: new CacheFirst({
|
|
21
|
+
cacheName: "google-fonts-webfonts",
|
|
22
|
+
plugins: [new ExpirationPlugin({
|
|
23
|
+
maxEntries: 4,
|
|
24
|
+
maxAgeSeconds: 365 * 24 * 60 * 60,
|
|
25
|
+
maxAgeFrom: "last-used"
|
|
26
|
+
})]
|
|
27
|
+
})
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
matcher: /^https:\/\/fonts\.(?:googleapis)\.com\/.*/i,
|
|
31
|
+
handler: new StaleWhileRevalidate({
|
|
32
|
+
cacheName: "google-fonts-stylesheets",
|
|
33
|
+
plugins: [new ExpirationPlugin({
|
|
34
|
+
maxEntries: 4,
|
|
35
|
+
maxAgeSeconds: 10080 * 60,
|
|
36
|
+
maxAgeFrom: "last-used"
|
|
37
|
+
})]
|
|
38
|
+
})
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
matcher: /\.(?:eot|otf|ttc|ttf|woff|woff2|font.css)$/i,
|
|
42
|
+
handler: new StaleWhileRevalidate({
|
|
43
|
+
cacheName: "static-font-assets",
|
|
44
|
+
plugins: [new ExpirationPlugin({
|
|
45
|
+
maxEntries: 4,
|
|
46
|
+
maxAgeSeconds: 10080 * 60,
|
|
47
|
+
maxAgeFrom: "last-used"
|
|
48
|
+
})]
|
|
49
|
+
})
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
matcher: /\.(?:jpg|jpeg|gif|png|svg|ico|webp)$/i,
|
|
53
|
+
handler: new StaleWhileRevalidate({
|
|
54
|
+
cacheName: "static-image-assets",
|
|
55
|
+
plugins: [new ExpirationPlugin({
|
|
56
|
+
maxEntries: 64,
|
|
57
|
+
maxAgeSeconds: 720 * 60 * 60,
|
|
58
|
+
maxAgeFrom: "last-used"
|
|
59
|
+
})]
|
|
60
|
+
})
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
matcher: /\/_next\/static.+\.js$/i,
|
|
64
|
+
handler: new CacheFirst({
|
|
65
|
+
cacheName: "next-static-js-assets",
|
|
66
|
+
plugins: [new ExpirationPlugin({
|
|
67
|
+
maxEntries: 64,
|
|
68
|
+
maxAgeSeconds: 1440 * 60,
|
|
69
|
+
maxAgeFrom: "last-used"
|
|
70
|
+
})]
|
|
71
|
+
})
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
matcher: /\/_next\/image\?url=.+$/i,
|
|
75
|
+
handler: new StaleWhileRevalidate({
|
|
76
|
+
cacheName: "next-image",
|
|
77
|
+
plugins: [new ExpirationPlugin({
|
|
78
|
+
maxEntries: 64,
|
|
79
|
+
maxAgeSeconds: 1440 * 60,
|
|
80
|
+
maxAgeFrom: "last-used"
|
|
81
|
+
})]
|
|
82
|
+
})
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
matcher: /\.(?:mp3|wav|ogg)$/i,
|
|
86
|
+
handler: new CacheFirst({
|
|
87
|
+
cacheName: "static-audio-assets",
|
|
88
|
+
plugins: [new ExpirationPlugin({
|
|
89
|
+
maxEntries: 32,
|
|
90
|
+
maxAgeSeconds: 1440 * 60,
|
|
91
|
+
maxAgeFrom: "last-used"
|
|
92
|
+
}), new RangeRequestsPlugin()]
|
|
93
|
+
})
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
matcher: /\.(?:mp4|webm)$/i,
|
|
97
|
+
handler: new CacheFirst({
|
|
98
|
+
cacheName: "static-video-assets",
|
|
99
|
+
plugins: [new ExpirationPlugin({
|
|
100
|
+
maxEntries: 32,
|
|
101
|
+
maxAgeSeconds: 1440 * 60,
|
|
102
|
+
maxAgeFrom: "last-used"
|
|
103
|
+
}), new RangeRequestsPlugin()]
|
|
104
|
+
})
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
matcher: /\.(?:js)$/i,
|
|
108
|
+
handler: new StaleWhileRevalidate({
|
|
109
|
+
cacheName: "static-js-assets",
|
|
110
|
+
plugins: [new ExpirationPlugin({
|
|
111
|
+
maxEntries: 48,
|
|
112
|
+
maxAgeSeconds: 1440 * 60,
|
|
113
|
+
maxAgeFrom: "last-used"
|
|
114
|
+
})]
|
|
115
|
+
})
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
matcher: /\.(?:css|less)$/i,
|
|
119
|
+
handler: new StaleWhileRevalidate({
|
|
120
|
+
cacheName: "static-style-assets",
|
|
121
|
+
plugins: [new ExpirationPlugin({
|
|
122
|
+
maxEntries: 32,
|
|
123
|
+
maxAgeSeconds: 1440 * 60,
|
|
124
|
+
maxAgeFrom: "last-used"
|
|
125
|
+
})]
|
|
126
|
+
})
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
matcher: /\/_next\/data\/.+\/.+\.json$/i,
|
|
130
|
+
handler: new NetworkFirst({
|
|
131
|
+
cacheName: "next-data",
|
|
132
|
+
plugins: [new ExpirationPlugin({
|
|
133
|
+
maxEntries: 32,
|
|
134
|
+
maxAgeSeconds: 1440 * 60,
|
|
135
|
+
maxAgeFrom: "last-used"
|
|
136
|
+
})]
|
|
137
|
+
})
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
matcher: /\.(?:json|xml|csv)$/i,
|
|
141
|
+
handler: new NetworkFirst({
|
|
142
|
+
cacheName: "static-data-assets",
|
|
143
|
+
plugins: [new ExpirationPlugin({
|
|
144
|
+
maxEntries: 32,
|
|
145
|
+
maxAgeSeconds: 1440 * 60,
|
|
146
|
+
maxAgeFrom: "last-used"
|
|
147
|
+
})]
|
|
148
|
+
})
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
matcher: /\/api\/auth\/.*/,
|
|
152
|
+
handler: new NetworkOnly({ networkTimeoutSeconds: 10 })
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
matcher: ({ sameOrigin, url: { pathname } }) => sameOrigin && pathname.startsWith("/api/"),
|
|
156
|
+
method: "GET",
|
|
157
|
+
handler: new NetworkFirst({
|
|
158
|
+
cacheName: "apis",
|
|
159
|
+
plugins: [new ExpirationPlugin({
|
|
160
|
+
maxEntries: 16,
|
|
161
|
+
maxAgeSeconds: 1440 * 60,
|
|
162
|
+
maxAgeFrom: "last-used"
|
|
163
|
+
})],
|
|
164
|
+
networkTimeoutSeconds: 10
|
|
165
|
+
})
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
matcher: ({ request, url: { pathname }, sameOrigin }) => request.headers.get("RSC") === "1" && request.headers.get("Next-Router-Prefetch") === "1" && sameOrigin && !pathname.startsWith("/api/"),
|
|
169
|
+
handler: new NetworkFirst({
|
|
170
|
+
cacheName: PAGES_CACHE_NAME.rscPrefetch,
|
|
171
|
+
plugins: [new ExpirationPlugin({
|
|
172
|
+
maxEntries: 32,
|
|
173
|
+
maxAgeSeconds: 1440 * 60
|
|
174
|
+
})]
|
|
175
|
+
})
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
matcher: ({ request, url: { pathname }, sameOrigin }) => request.headers.get("RSC") === "1" && sameOrigin && !pathname.startsWith("/api/"),
|
|
179
|
+
handler: new NetworkFirst({
|
|
180
|
+
cacheName: PAGES_CACHE_NAME.rsc,
|
|
181
|
+
plugins: [new ExpirationPlugin({
|
|
182
|
+
maxEntries: 32,
|
|
183
|
+
maxAgeSeconds: 1440 * 60
|
|
184
|
+
})]
|
|
185
|
+
})
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
matcher: ({ request, url: { pathname }, sameOrigin }) => request.headers.get("Content-Type")?.includes("text/html") && sameOrigin && !pathname.startsWith("/api/"),
|
|
189
|
+
handler: new NetworkFirst({
|
|
190
|
+
cacheName: PAGES_CACHE_NAME.html,
|
|
191
|
+
plugins: [new ExpirationPlugin({
|
|
192
|
+
maxEntries: 32,
|
|
193
|
+
maxAgeSeconds: 1440 * 60
|
|
194
|
+
})]
|
|
195
|
+
})
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
matcher: ({ url: { pathname }, sameOrigin }) => sameOrigin && !pathname.startsWith("/api/"),
|
|
199
|
+
handler: new NetworkFirst({
|
|
200
|
+
cacheName: "others",
|
|
201
|
+
plugins: [new ExpirationPlugin({
|
|
202
|
+
maxEntries: 32,
|
|
203
|
+
maxAgeSeconds: 1440 * 60
|
|
204
|
+
})]
|
|
205
|
+
})
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
matcher: ({ sameOrigin }) => !sameOrigin,
|
|
209
|
+
handler: new NetworkFirst({
|
|
210
|
+
cacheName: "cross-origin",
|
|
211
|
+
plugins: [new ExpirationPlugin({
|
|
212
|
+
maxEntries: 32,
|
|
213
|
+
maxAgeSeconds: 3600
|
|
214
|
+
})],
|
|
215
|
+
networkTimeoutSeconds: 10
|
|
216
|
+
})
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
matcher: /.*/i,
|
|
220
|
+
method: "GET",
|
|
221
|
+
handler: new NetworkOnly()
|
|
222
|
+
}
|
|
223
|
+
];
|
|
224
|
+
//#endregion
|
|
225
|
+
export { PAGES_CACHE_NAME, defaultCache };
|
|
226
|
+
|
|
227
|
+
//# sourceMappingURL=index.worker.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.worker.mjs","names":[],"sources":["../src/index.worker.ts"],"sourcesContent":["import type { RuntimeCaching } from \"serwist\";\nimport { CacheFirst, ExpirationPlugin, NetworkFirst, NetworkOnly, RangeRequestsPlugin, StaleWhileRevalidate } from \"serwist\";\n\nexport const PAGES_CACHE_NAME = {\n rscPrefetch: \"pages-rsc-prefetch\",\n rsc: \"pages-rsc\",\n html: \"pages\",\n} as const;\n\n/**\n * The default, recommended list of caching strategies for applications\n * built with Next.js.\n *\n * @see https://serwist.pages.dev/docs/next/worker-exports#default-cache\n */\nexport const defaultCache: RuntimeCaching[] =\n process.env.NODE_ENV !== \"production\"\n ? [\n {\n matcher: /.*/i,\n handler: new NetworkOnly(),\n },\n ]\n : [\n {\n matcher: /^https:\\/\\/fonts\\.(?:gstatic)\\.com\\/.*/i,\n handler: new CacheFirst({\n cacheName: \"google-fonts-webfonts\",\n plugins: [\n new ExpirationPlugin({\n maxEntries: 4,\n maxAgeSeconds: 365 * 24 * 60 * 60, // 365 days\n maxAgeFrom: \"last-used\",\n }),\n ],\n }),\n },\n {\n matcher: /^https:\\/\\/fonts\\.(?:googleapis)\\.com\\/.*/i,\n handler: new StaleWhileRevalidate({\n cacheName: \"google-fonts-stylesheets\",\n plugins: [\n new ExpirationPlugin({\n maxEntries: 4,\n maxAgeSeconds: 7 * 24 * 60 * 60, // 7 days\n maxAgeFrom: \"last-used\",\n }),\n ],\n }),\n },\n {\n matcher: /\\.(?:eot|otf|ttc|ttf|woff|woff2|font.css)$/i,\n handler: new StaleWhileRevalidate({\n cacheName: \"static-font-assets\",\n plugins: [\n new ExpirationPlugin({\n maxEntries: 4,\n maxAgeSeconds: 7 * 24 * 60 * 60, // 7 days\n maxAgeFrom: \"last-used\",\n }),\n ],\n }),\n },\n {\n matcher: /\\.(?:jpg|jpeg|gif|png|svg|ico|webp)$/i,\n handler: new StaleWhileRevalidate({\n cacheName: \"static-image-assets\",\n plugins: [\n new ExpirationPlugin({\n maxEntries: 64,\n maxAgeSeconds: 30 * 24 * 60 * 60, // 30 days\n maxAgeFrom: \"last-used\",\n }),\n ],\n }),\n },\n {\n matcher: /\\/_next\\/static.+\\.js$/i,\n handler: new CacheFirst({\n cacheName: \"next-static-js-assets\",\n plugins: [\n new ExpirationPlugin({\n maxEntries: 64,\n maxAgeSeconds: 24 * 60 * 60, // 24 hours\n maxAgeFrom: \"last-used\",\n }),\n ],\n }),\n },\n {\n matcher: /\\/_next\\/image\\?url=.+$/i,\n handler: new StaleWhileRevalidate({\n cacheName: \"next-image\",\n plugins: [\n new ExpirationPlugin({\n maxEntries: 64,\n maxAgeSeconds: 24 * 60 * 60, // 24 hours\n maxAgeFrom: \"last-used\",\n }),\n ],\n }),\n },\n {\n matcher: /\\.(?:mp3|wav|ogg)$/i,\n handler: new CacheFirst({\n cacheName: \"static-audio-assets\",\n plugins: [\n new ExpirationPlugin({\n maxEntries: 32,\n maxAgeSeconds: 24 * 60 * 60, // 24 hours\n maxAgeFrom: \"last-used\",\n }),\n new RangeRequestsPlugin(),\n ],\n }),\n },\n {\n matcher: /\\.(?:mp4|webm)$/i,\n handler: new CacheFirst({\n cacheName: \"static-video-assets\",\n plugins: [\n new ExpirationPlugin({\n maxEntries: 32,\n maxAgeSeconds: 24 * 60 * 60, // 24 hours\n maxAgeFrom: \"last-used\",\n }),\n new RangeRequestsPlugin(),\n ],\n }),\n },\n {\n matcher: /\\.(?:js)$/i,\n handler: new StaleWhileRevalidate({\n cacheName: \"static-js-assets\",\n plugins: [\n new ExpirationPlugin({\n maxEntries: 48,\n maxAgeSeconds: 24 * 60 * 60, // 24 hours\n maxAgeFrom: \"last-used\",\n }),\n ],\n }),\n },\n {\n matcher: /\\.(?:css|less)$/i,\n handler: new StaleWhileRevalidate({\n cacheName: \"static-style-assets\",\n plugins: [\n new ExpirationPlugin({\n maxEntries: 32,\n maxAgeSeconds: 24 * 60 * 60, // 24 hours\n maxAgeFrom: \"last-used\",\n }),\n ],\n }),\n },\n {\n matcher: /\\/_next\\/data\\/.+\\/.+\\.json$/i,\n handler: new NetworkFirst({\n cacheName: \"next-data\",\n plugins: [\n new ExpirationPlugin({\n maxEntries: 32,\n maxAgeSeconds: 24 * 60 * 60, // 24 hours\n maxAgeFrom: \"last-used\",\n }),\n ],\n }),\n },\n {\n matcher: /\\.(?:json|xml|csv)$/i,\n handler: new NetworkFirst({\n cacheName: \"static-data-assets\",\n plugins: [\n new ExpirationPlugin({\n maxEntries: 32,\n maxAgeSeconds: 24 * 60 * 60, // 24 hours\n maxAgeFrom: \"last-used\",\n }),\n ],\n }),\n },\n {\n // Exclude /api/auth/* to fix auth callback\n // https://github.com/serwist/serwist/discussions/28\n matcher: /\\/api\\/auth\\/.*/,\n handler: new NetworkOnly({\n networkTimeoutSeconds: 10, // fallback to cache if API does not response within 10 seconds\n }),\n },\n {\n matcher: ({ sameOrigin, url: { pathname } }) => sameOrigin && pathname.startsWith(\"/api/\"),\n method: \"GET\",\n handler: new NetworkFirst({\n cacheName: \"apis\",\n plugins: [\n new ExpirationPlugin({\n maxEntries: 16,\n maxAgeSeconds: 24 * 60 * 60, // 24 hours\n maxAgeFrom: \"last-used\",\n }),\n ],\n networkTimeoutSeconds: 10, // fallback to cache if API does not response within 10 seconds\n }),\n },\n {\n matcher: ({ request, url: { pathname }, sameOrigin }) =>\n request.headers.get(\"RSC\") === \"1\" && request.headers.get(\"Next-Router-Prefetch\") === \"1\" && sameOrigin && !pathname.startsWith(\"/api/\"),\n handler: new NetworkFirst({\n cacheName: PAGES_CACHE_NAME.rscPrefetch,\n plugins: [\n new ExpirationPlugin({\n maxEntries: 32,\n maxAgeSeconds: 24 * 60 * 60, // 24 hours\n }),\n ],\n }),\n },\n {\n matcher: ({ request, url: { pathname }, sameOrigin }) => request.headers.get(\"RSC\") === \"1\" && sameOrigin && !pathname.startsWith(\"/api/\"),\n handler: new NetworkFirst({\n cacheName: PAGES_CACHE_NAME.rsc,\n plugins: [\n new ExpirationPlugin({\n maxEntries: 32,\n maxAgeSeconds: 24 * 60 * 60, // 24 hours\n }),\n ],\n }),\n },\n {\n matcher: ({ request, url: { pathname }, sameOrigin }) =>\n request.headers.get(\"Content-Type\")?.includes(\"text/html\") && sameOrigin && !pathname.startsWith(\"/api/\"),\n handler: new NetworkFirst({\n cacheName: PAGES_CACHE_NAME.html,\n plugins: [\n new ExpirationPlugin({\n maxEntries: 32,\n maxAgeSeconds: 24 * 60 * 60, // 24 hours\n }),\n ],\n }),\n },\n {\n matcher: ({ url: { pathname }, sameOrigin }) => sameOrigin && !pathname.startsWith(\"/api/\"),\n handler: new NetworkFirst({\n cacheName: \"others\",\n plugins: [\n new ExpirationPlugin({\n maxEntries: 32,\n maxAgeSeconds: 24 * 60 * 60, // 24 hours\n }),\n ],\n }),\n },\n {\n matcher: ({ sameOrigin }) => !sameOrigin,\n handler: new NetworkFirst({\n cacheName: \"cross-origin\",\n plugins: [\n new ExpirationPlugin({\n maxEntries: 32,\n maxAgeSeconds: 60 * 60, // 1 hour\n }),\n ],\n networkTimeoutSeconds: 10,\n }),\n },\n {\n matcher: /.*/i,\n method: \"GET\",\n handler: new NetworkOnly(),\n },\n ];\n"],"mappings":";;AAGA,MAAa,mBAAmB;CAC9B,aAAa;CACb,KAAK;CACL,MAAM;CACP;;;;;;;AAQD,MAAa,eACX,QAAQ,IAAI,aAA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