@visulima/crud 3.0.0-alpha.14 → 3.0.0-alpha.16

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.
Files changed (144) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/LICENSE.md +32 -0
  3. package/dist/index.cjs +1 -13
  4. package/dist/index.d.cts +121 -6
  5. package/dist/index.d.mts +121 -6
  6. package/dist/index.d.ts +121 -6
  7. package/dist/index.mjs +1 -3
  8. package/dist/next/index.cjs +1 -11
  9. package/dist/next/index.d.cts +1747 -2
  10. package/dist/next/index.d.mts +1742 -2
  11. package/dist/next/index.d.ts +1742 -2
  12. package/dist/next/index.mjs +1 -2
  13. package/dist/packem_shared/PrismaAdapter-D0WRtRlB.cjs +1 -0
  14. package/dist/packem_shared/PrismaAdapter-EuQr18sT.mjs +1 -0
  15. package/dist/packem_shared/RouteType-BQ2RxFPE.mjs +1 -0
  16. package/dist/packem_shared/RouteType-DLV_OhhD.cjs +1 -0
  17. package/dist/packem_shared/base-crud-handler-B6xOUGDj.cjs +1 -0
  18. package/dist/packem_shared/base-crud-handler-DNKq7uog.mjs +1 -0
  19. package/dist/packem_shared/edgeHandler-CaIWVXt-.cjs +1 -0
  20. package/dist/packem_shared/edgeHandler-Deds33h_.mjs +1 -0
  21. package/dist/packem_shared/get-accessible-routes-DLLL11KB.cjs +1 -0
  22. package/dist/packem_shared/get-accessible-routes-xHYBQ_6q.mjs +1 -0
  23. package/dist/packem_shared/models-to-route-names-Dh2b_kIL.cjs +1 -0
  24. package/dist/packem_shared/models-to-route-names-UU1lZmbK.mjs +1 -0
  25. package/dist/packem_shared/modelsToOpenApi-CsQL5VTy.cjs +1 -0
  26. package/dist/packem_shared/modelsToOpenApi-ocNrUF5p.mjs +1 -0
  27. package/dist/packem_shared/nodeHandler-CeBCrxYT.mjs +1 -0
  28. package/dist/packem_shared/nodeHandler-D7AuOmUo.cjs +1 -0
  29. package/dist/packem_shared/types.d-C_XaTdLA.d.cts +126 -0
  30. package/dist/packem_shared/types.d-C_XaTdLA.d.mts +126 -0
  31. package/dist/packem_shared/types.d-C_XaTdLA.d.ts +126 -0
  32. package/package.json +6 -6
  33. package/dist/adapter/prisma/index.d.cts +0 -39
  34. package/dist/adapter/prisma/index.d.mts +0 -39
  35. package/dist/adapter/prisma/index.d.ts +0 -39
  36. package/dist/adapter/prisma/types.d.cts +0 -31
  37. package/dist/adapter/prisma/types.d.mts +0 -31
  38. package/dist/adapter/prisma/types.d.ts +0 -31
  39. package/dist/adapter/prisma/utils/models-to-route-names.d.cts +0 -5
  40. package/dist/adapter/prisma/utils/models-to-route-names.d.mts +0 -5
  41. package/dist/adapter/prisma/utils/models-to-route-names.d.ts +0 -5
  42. package/dist/adapter/prisma/utils/parse-cursor.d.cts +0 -3
  43. package/dist/adapter/prisma/utils/parse-cursor.d.mts +0 -3
  44. package/dist/adapter/prisma/utils/parse-cursor.d.ts +0 -3
  45. package/dist/adapter/prisma/utils/parse-order-by.d.cts +0 -4
  46. package/dist/adapter/prisma/utils/parse-order-by.d.mts +0 -4
  47. package/dist/adapter/prisma/utils/parse-order-by.d.ts +0 -4
  48. package/dist/adapter/prisma/utils/parse-recursive.d.cts +0 -4
  49. package/dist/adapter/prisma/utils/parse-recursive.d.mts +0 -4
  50. package/dist/adapter/prisma/utils/parse-recursive.d.ts +0 -4
  51. package/dist/adapter/prisma/utils/parse-where.d.cts +0 -4
  52. package/dist/adapter/prisma/utils/parse-where.d.mts +0 -4
  53. package/dist/adapter/prisma/utils/parse-where.d.ts +0 -4
  54. package/dist/base-crud-handler.d.cts +0 -9
  55. package/dist/base-crud-handler.d.mts +0 -9
  56. package/dist/base-crud-handler.d.ts +0 -9
  57. package/dist/handler/create.d.cts +0 -3
  58. package/dist/handler/create.d.mts +0 -3
  59. package/dist/handler/create.d.ts +0 -3
  60. package/dist/handler/delete.d.cts +0 -3
  61. package/dist/handler/delete.d.mts +0 -3
  62. package/dist/handler/delete.d.ts +0 -3
  63. package/dist/handler/list.d.cts +0 -3
  64. package/dist/handler/list.d.mts +0 -3
  65. package/dist/handler/list.d.ts +0 -3
  66. package/dist/handler/read.d.cts +0 -3
  67. package/dist/handler/read.d.mts +0 -3
  68. package/dist/handler/read.d.ts +0 -3
  69. package/dist/handler/update.d.cts +0 -3
  70. package/dist/handler/update.d.mts +0 -3
  71. package/dist/handler/update.d.ts +0 -3
  72. package/dist/next/api/edge/index.d.cts +0 -3
  73. package/dist/next/api/edge/index.d.mts +0 -3
  74. package/dist/next/api/edge/index.d.ts +0 -3
  75. package/dist/next/api/node/index.d.cts +0 -4
  76. package/dist/next/api/node/index.d.mts +0 -4
  77. package/dist/next/api/node/index.d.ts +0 -4
  78. package/dist/packem_shared/PrismaAdapter-Bd2bxZfN.mjs +0 -318
  79. package/dist/packem_shared/PrismaAdapter-BondygJ8.cjs +0 -324
  80. package/dist/packem_shared/RouteType-Bk3uAK0x.cjs +0 -14
  81. package/dist/packem_shared/RouteType-CB2xrWdf.mjs +0 -10
  82. package/dist/packem_shared/base-crud-handler-Cg8r7S9C.mjs +0 -587
  83. package/dist/packem_shared/base-crud-handler-DSlkMYL6.cjs +0 -572
  84. package/dist/packem_shared/edgeHandler-DFuv_tsd.cjs +0 -18
  85. package/dist/packem_shared/edgeHandler-l0sBgF0s.mjs +0 -16
  86. package/dist/packem_shared/get-accessible-routes-C6NF9Iry.cjs +0 -16
  87. package/dist/packem_shared/get-accessible-routes-sV5SDdFn.mjs +0 -14
  88. package/dist/packem_shared/models-to-route-names-CdwsK0V1.mjs +0 -9
  89. package/dist/packem_shared/models-to-route-names-Dv94PzhE.cjs +0 -11
  90. package/dist/packem_shared/modelsToOpenApi-DypKlIy4.cjs +0 -708
  91. package/dist/packem_shared/modelsToOpenApi-qs_cqTsd.mjs +0 -706
  92. package/dist/packem_shared/nodeHandler-BlXQahKv.cjs +0 -16
  93. package/dist/packem_shared/nodeHandler-R76tfOc6.mjs +0 -14
  94. package/dist/query-parser.d.cts +0 -3
  95. package/dist/query-parser.d.mts +0 -3
  96. package/dist/query-parser.d.ts +0 -3
  97. package/dist/swagger/adapter/prisma/index.d.cts +0 -22
  98. package/dist/swagger/adapter/prisma/index.d.mts +0 -22
  99. package/dist/swagger/adapter/prisma/index.d.ts +0 -22
  100. package/dist/swagger/json-schema-parser.d.cts +0 -18
  101. package/dist/swagger/json-schema-parser.d.mts +0 -18
  102. package/dist/swagger/json-schema-parser.d.ts +0 -18
  103. package/dist/swagger/parameters.d.cts +0 -5
  104. package/dist/swagger/parameters.d.mts +0 -5
  105. package/dist/swagger/parameters.d.ts +0 -5
  106. package/dist/swagger/types.d.cts +0 -39
  107. package/dist/swagger/types.d.mts +0 -39
  108. package/dist/swagger/types.d.ts +0 -39
  109. package/dist/swagger/utils/format-example-ref.d.cts +0 -2
  110. package/dist/swagger/utils/format-example-ref.d.mts +0 -2
  111. package/dist/swagger/utils/format-example-ref.d.ts +0 -2
  112. package/dist/swagger/utils/format-schema-ref.d.cts +0 -2
  113. package/dist/swagger/utils/format-schema-ref.d.mts +0 -2
  114. package/dist/swagger/utils/format-schema-ref.d.ts +0 -2
  115. package/dist/swagger/utils/get-models-accessible-routes.d.cts +0 -4
  116. package/dist/swagger/utils/get-models-accessible-routes.d.mts +0 -4
  117. package/dist/swagger/utils/get-models-accessible-routes.d.ts +0 -4
  118. package/dist/swagger/utils/get-swagger-paths.d.cts +0 -12
  119. package/dist/swagger/utils/get-swagger-paths.d.mts +0 -12
  120. package/dist/swagger/utils/get-swagger-paths.d.ts +0 -12
  121. package/dist/swagger/utils/get-swagger-tags.d.cts +0 -4
  122. package/dist/swagger/utils/get-swagger-tags.d.mts +0 -4
  123. package/dist/swagger/utils/get-swagger-tags.d.ts +0 -4
  124. package/dist/types.d.cts +0 -131
  125. package/dist/types.d.mts +0 -131
  126. package/dist/types.d.ts +0 -131
  127. package/dist/utils/format-resource-id.d.cts +0 -2
  128. package/dist/utils/format-resource-id.d.mts +0 -2
  129. package/dist/utils/format-resource-id.d.ts +0 -2
  130. package/dist/utils/get-accessible-routes.d.cts +0 -3
  131. package/dist/utils/get-accessible-routes.d.mts +0 -3
  132. package/dist/utils/get-accessible-routes.d.ts +0 -3
  133. package/dist/utils/get-resource-name-from-url.d.cts +0 -5
  134. package/dist/utils/get-resource-name-from-url.d.mts +0 -5
  135. package/dist/utils/get-resource-name-from-url.d.ts +0 -5
  136. package/dist/utils/get-route-type.d.cts +0 -7
  137. package/dist/utils/get-route-type.d.mts +0 -7
  138. package/dist/utils/get-route-type.d.ts +0 -7
  139. package/dist/utils/is-primitive.d.cts +0 -2
  140. package/dist/utils/is-primitive.d.mts +0 -2
  141. package/dist/utils/is-primitive.d.ts +0 -2
  142. package/dist/utils/validate-adapter-methods.d.cts +0 -3
  143. package/dist/utils/validate-adapter-methods.d.mts +0 -3
  144. package/dist/utils/validate-adapter-methods.d.ts +0 -3
@@ -1,2 +1,1747 @@
1
- export { default as edgeHandler } from "./api/index.d.cts";
2
- export { default as nodeHandler } from "./api/index.d.cts";
1
+ /// <reference types="node" preserve="true" />
2
+ /// <reference types="react" preserve="true" />
3
+ /// <reference types="react/experimental" preserve="true" />
4
+ /// <reference types="react-dom" preserve="true" />
5
+ /// <reference types="react-dom/experimental" preserve="true" />
6
+ import { a as ParsedQueryParameters, A as Adapter, H as HandlerOptions, E as ExecuteHandler } from "../packem_shared/types.d-C_XaTdLA.cjs";
7
+ import { IncomingMessage, ServerResponse, Agent } from 'http';
8
+ import { Agent as Agent$1 } from 'https';
9
+ import { ParsedUrlQuery } from 'querystring';
10
+ import 'react';
11
+ import 'url';
12
+ import 'stream';
13
+ import 'react/jsx-runtime';
14
+ import 'node:http';
15
+ import 'fs';
16
+ import 'async_hooks';
17
+ import 'node:querystring';
18
+ import 'node:url';
19
+ import 'crypto';
20
+ import 'react/jsx-dev-runtime';
21
+ import 'react/compiler-runtime';
22
+ import { webpack } from 'next/dist/compiled/webpack/webpack';
23
+ import { Env } from '@next/env';
24
+ import 'node:stream';
25
+ declare const handler$1: <T, R extends Request, Context, Q extends ParsedQueryParameters = ParsedQueryParameters, M extends string = string>(adapter: Adapter<T, Q>, options?: HandlerOptions<M>) => Promise<ExecuteHandler<R, Context>>;
26
+ declare const COMPILER_NAMES: {
27
+ readonly client: "client";
28
+ readonly server: "server";
29
+ readonly edgeServer: "edge-server";
30
+ };
31
+ type RouteHas = {
32
+ type: 'header' | 'cookie' | 'query';
33
+ key: string;
34
+ value?: string;
35
+ } | {
36
+ type: 'host';
37
+ key?: undefined;
38
+ value: string;
39
+ };
40
+ type Rewrite = {
41
+ source: string;
42
+ destination: string;
43
+ basePath?: false;
44
+ locale?: false;
45
+ has?: RouteHas[];
46
+ missing?: RouteHas[];
47
+ };
48
+ type Header = {
49
+ source: string;
50
+ basePath?: false;
51
+ locale?: false;
52
+ headers: Array<{
53
+ key: string;
54
+ value: string;
55
+ }>;
56
+ has?: RouteHas[];
57
+ missing?: RouteHas[];
58
+ };
59
+ type Redirect = {
60
+ source: string;
61
+ destination: string;
62
+ basePath?: false;
63
+ locale?: false;
64
+ has?: RouteHas[];
65
+ missing?: RouteHas[];
66
+ priority?: boolean;
67
+ } & ({
68
+ statusCode?: never;
69
+ permanent: boolean;
70
+ } | {
71
+ statusCode: number;
72
+ permanent?: never;
73
+ });
74
+ declare const VALID_LOADERS: readonly ["default", "imgix", "cloudinary", "akamai", "custom"];
75
+ type LoaderValue = (typeof VALID_LOADERS)[number];
76
+ type LocalPattern = {
77
+ /**
78
+ * Can be literal or wildcard.
79
+ * Single `*` matches a single path segment.
80
+ * Double `**` matches any number of path segments.
81
+ */
82
+ pathname?: string;
83
+ /**
84
+ * Can be literal query string such as `?v=1` or
85
+ * empty string meaning no query string.
86
+ */
87
+ search?: string;
88
+ };
89
+ type RemotePattern = {
90
+ /**
91
+ * Must be `http` or `https`.
92
+ */
93
+ protocol?: 'http' | 'https';
94
+ /**
95
+ * Can be literal or wildcard.
96
+ * Single `*` matches a single subdomain.
97
+ * Double `**` matches any number of subdomains.
98
+ */
99
+ hostname: string;
100
+ /**
101
+ * Can be literal port such as `8080` or empty string
102
+ * meaning no port.
103
+ */
104
+ port?: string;
105
+ /**
106
+ * Can be literal or wildcard.
107
+ * Single `*` matches a single path segment.
108
+ * Double `**` matches any number of path segments.
109
+ */
110
+ pathname?: string;
111
+ /**
112
+ * Can be literal query string such as `?v=1` or
113
+ * empty string meaning no query string.
114
+ */
115
+ search?: string;
116
+ };
117
+ type ImageFormat = 'image/avif' | 'image/webp';
118
+ /**
119
+ * Image configurations
120
+ *
121
+ * @see [Image configuration options](https://nextjs.org/docs/api-reference/next/image#configuration-options)
122
+ */
123
+ type ImageConfigComplete = {
124
+ /** @see [Device sizes documentation](https://nextjs.org/docs/api-reference/next/image#device-sizes) */
125
+ deviceSizes: number[];
126
+ /** @see [Image sizing documentation](https://nextjs.org/docs/app/building-your-application/optimizing/images#image-sizing) */
127
+ imageSizes: number[];
128
+ /** @see [Image loaders configuration](https://nextjs.org/docs/api-reference/next/legacy/image#loader) */
129
+ loader: LoaderValue;
130
+ /** @see [Image loader configuration](https://nextjs.org/docs/app/api-reference/components/image#path) */
131
+ path: string;
132
+ /** @see [Image loader configuration](https://nextjs.org/docs/api-reference/next/image#loader-configuration) */
133
+ loaderFile: string;
134
+ /**
135
+ * @deprecated Use `remotePatterns` instead.
136
+ */
137
+ domains: string[];
138
+ /** @see [Disable static image import configuration](https://nextjs.org/docs/api-reference/next/image#disable-static-imports) */
139
+ disableStaticImages: boolean;
140
+ /** @see [Cache behavior](https://nextjs.org/docs/api-reference/next/image#caching-behavior) */
141
+ minimumCacheTTL: number;
142
+ /** @see [Acceptable formats](https://nextjs.org/docs/api-reference/next/image#acceptable-formats) */
143
+ formats: ImageFormat[];
144
+ /** @see [Maximum Disk Cache Size (in bytes)](https://nextjs.org/docs/api-reference/next/image#maximumdiskcachesize) */
145
+ maximumDiskCacheSize: number | undefined;
146
+ /** @see [Maximum Redirects](https://nextjs.org/docs/api-reference/next/image#maximumredirects) */
147
+ maximumRedirects: number;
148
+ /** @see [Maximum Response Body](https://nextjs.org/docs/api-reference/next/image#maximumresponsebody) */
149
+ maximumResponseBody: number;
150
+ /** @see [Dangerously Allow Local IP](https://nextjs.org/docs/api-reference/next/image#dangerously-allow-local-ip) */
151
+ dangerouslyAllowLocalIP: boolean;
152
+ /** @see [Dangerously Allow SVG](https://nextjs.org/docs/api-reference/next/image#dangerously-allow-svg) */
153
+ dangerouslyAllowSVG: boolean;
154
+ /** @see [Content Security Policy](https://nextjs.org/docs/api-reference/next/image#contentsecuritypolicy) */
155
+ contentSecurityPolicy: string;
156
+ /** @see [Content Disposition Type](https://nextjs.org/docs/api-reference/next/image#contentdispositiontype) */
157
+ contentDispositionType: 'inline' | 'attachment';
158
+ /** @see [Remote Patterns](https://nextjs.org/docs/api-reference/next/image#remotepatterns) */
159
+ remotePatterns: Array<URL | RemotePattern>;
160
+ /** @see [Local Patterns](https://nextjs.org/docs/api-reference/next/image#localPatterns) */
161
+ localPatterns: LocalPattern[] | undefined;
162
+ /** @see [Qualities](https://nextjs.org/docs/api-reference/next/image#qualities) */
163
+ qualities: number[] | undefined;
164
+ /** @see [Unoptimized](https://nextjs.org/docs/api-reference/next/image#unoptimized) */
165
+ unoptimized: boolean;
166
+ /**
167
+ * When true, the `cacheHandler` configured in next.config.js will also be used
168
+ * for caching optimized images. When false, images use the default filesystem cache.
169
+ * @see [Image Optimization Caching](https://nextjs.org/docs/app/api-reference/config/next-config-js/cacheHandler#image-optimization-caching)
170
+ */
171
+ customCacheHandler: boolean;
172
+ };
173
+ type ImageConfig = Partial<ImageConfigComplete>;
174
+ type SubresourceIntegrityAlgorithm = 'sha256' | 'sha384' | 'sha512';
175
+ declare const NEXT_RSC_UNION_QUERY: "_rsc";
176
+ /**
177
+ * If set to `incremental`, only those leaf pages that export
178
+ * `experimental_ppr = true` will have partial prerendering enabled. If any
179
+ * page exports this value as `false` or does not export it at all will not
180
+ * have partial prerendering enabled. If set to a boolean, the options for
181
+ * `experimental_ppr` will be ignored.
182
+ */
183
+ type ExperimentalPPRConfig = boolean | 'incremental';
184
+ type ProxyMatcher = {
185
+ regexp: string;
186
+ locale?: false;
187
+ has?: RouteHas[];
188
+ missing?: RouteHas[];
189
+ originalSource: string;
190
+ };
191
+ type StyledString = {
192
+ type: 'text';
193
+ value: string;
194
+ } | {
195
+ type: 'code';
196
+ value: string;
197
+ } | {
198
+ type: 'strong';
199
+ value: string;
200
+ } | {
201
+ type: 'stack';
202
+ value: StyledString[];
203
+ } | {
204
+ type: 'line';
205
+ value: StyledString[];
206
+ };
207
+ /** 0-indexed line and column position within a source file. */
208
+ interface SourcePosition {
209
+ line: number;
210
+ column: number;
211
+ }
212
+ interface IssueSource {
213
+ source: {
214
+ ident: string;
215
+ filePath: string;
216
+ };
217
+ range?: {
218
+ start: SourcePosition;
219
+ end: SourcePosition;
220
+ };
221
+ }
222
+ interface AdditionalIssueSource {
223
+ description: string;
224
+ source: IssueSource;
225
+ /** Pre-rendered code frame from the Rust NAPI layer */
226
+ codeFrame?: string;
227
+ }
228
+ interface Issue {
229
+ severity: string;
230
+ stage: string;
231
+ filePath: string;
232
+ title: StyledString;
233
+ description?: StyledString;
234
+ detail?: StyledString;
235
+ source?: IssueSource;
236
+ additionalSources?: AdditionalIssueSource[];
237
+ documentationLink: string;
238
+ importTraces?: PlainTraceItem[][];
239
+ /** Pre-rendered code frame from the Rust NAPI layer */
240
+ codeFrame?: string;
241
+ }
242
+ interface PlainTraceItem {
243
+ fsName: string;
244
+ path: string;
245
+ rootPath: string;
246
+ layer?: string;
247
+ }
248
+ interface BaseUpdate {
249
+ resource: {
250
+ headers: unknown;
251
+ path: string;
252
+ };
253
+ diagnostics: unknown[];
254
+ issues: Issue[];
255
+ }
256
+ /**
257
+ * IMPORTANT: This type is duplicated in:
258
+ * turbopack/crates/turbopack-ecmascript-runtime/js/src/nodejs/hmr-types.d.ts
259
+ *
260
+ * The runtime file cannot import from this ES module without triggering module semantics,
261
+ * so we maintain a copy there. Please keep both definitions in sync.
262
+ */
263
+ interface NodeJsPartialHmrUpdate extends BaseUpdate {
264
+ type: 'partial';
265
+ instruction: {
266
+ type: 'EcmascriptMergedUpdate';
267
+ entries: Record<string, {
268
+ code: string;
269
+ url: string;
270
+ map?: string | undefined;
271
+ }>;
272
+ chunks?: Record<string, {
273
+ type: 'partial';
274
+ }>;
275
+ };
276
+ }
277
+ declare global {
278
+ interface Window {
279
+ __BUILD_MANIFEST?: Record<string, string[]>;
280
+ __BUILD_MANIFEST_CB?: Function;
281
+ __SERVER_FILES_MANIFEST?: RequiredServerFilesManifest;
282
+ __MIDDLEWARE_MATCHERS?: ProxyMatcher[];
283
+ __MIDDLEWARE_MATCHERS_CB?: Function;
284
+ __REACT_LOADABLE_MANIFEST?: any;
285
+ __DYNAMIC_CSS_MANIFEST?: any;
286
+ __RSC_MANIFEST?: any;
287
+ __RSC_SERVER_MANIFEST?: any;
288
+ __NEXT_FONT_MANIFEST?: any;
289
+ __SUBRESOURCE_INTEGRITY_MANIFEST?: string;
290
+ __INTERCEPTION_ROUTE_REWRITE_MANIFEST?: string;
291
+ }
292
+ }
293
+ declare global {
294
+ interface Window {
295
+ __DEV_MIDDLEWARE_MATCHERS?: ProxyMatcher[];
296
+ __DEV_PAGES_MANIFEST?: {
297
+ pages: string[];
298
+ };
299
+ __SSG_MANIFEST_CB?: () => void;
300
+ __SSG_MANIFEST?: Set<string>;
301
+ }
302
+ }
303
+ declare global {
304
+ interface Window {
305
+ __NEXT_DATA__: NEXT_DATA;
306
+ }
307
+ }
308
+ declare global {
309
+ interface Window {
310
+ __NEXT_PRELOADREADY?: (ids?: (string | number)[]) => Promise<void>;
311
+ }
312
+ }
313
+ declare global {
314
+ var __next_log_error__: undefined | ((err: unknown) => void);
315
+ }
316
+ interface RequiredServerFilesManifest {
317
+ version: number;
318
+ config: NextConfigRuntime;
319
+ appDir: string;
320
+ relativeAppDir: string;
321
+ files: string[];
322
+ ignore: string[];
323
+ }
324
+ declare global {
325
+ var __next__clear_chunk_cache__: (() => void) | null | undefined;
326
+ var __turbopack_clear_chunk_cache__: () => void | null | undefined;
327
+ var __turbopack_server_hmr_apply__: ((update: NodeJsPartialHmrUpdate) => boolean) | undefined;
328
+ }
329
+ type NextQueryMetadata = {
330
+ /**
331
+ * The `_rsc` query parameter used for cache busting to ensure that the RSC
332
+ * requests do not get cached by the browser explicitly.
333
+ */
334
+ [NEXT_RSC_UNION_QUERY]?: string;
335
+ };
336
+ type NextParsedUrlQuery = ParsedUrlQuery & NextQueryMetadata;
337
+ declare const SUPPORTED_TEST_RUNNERS_LIST: readonly ["playwright"];
338
+ type SupportedTestRunners = (typeof SUPPORTED_TEST_RUNNERS_LIST)[number];
339
+ /**
340
+ * Resolved form of the prefetchInlining config after normalization in
341
+ * config.ts. User input (true, partial objects) is converted to this shape.
342
+ */
343
+ type PrefetchInliningConfig = false | {
344
+ maxSize: number;
345
+ maxBundleSize: number;
346
+ };
347
+ type NextConfigComplete = Required<Omit<NextConfig, 'configFile'>> & {
348
+ images: Required<ImageConfigComplete>;
349
+ typescript: TypeScriptConfig;
350
+ configFile: string | undefined;
351
+ configFileName: string;
352
+ htmlLimitedBots: string | undefined;
353
+ experimental: ExperimentalConfig & {
354
+ prefetchInlining?: PrefetchInliningConfig;
355
+ };
356
+ distDirRoot: string;
357
+ };
358
+ type I18NDomains = readonly DomainLocale[];
359
+ interface I18NConfig {
360
+ defaultLocale: string;
361
+ domains?: I18NDomains;
362
+ localeDetection?: false;
363
+ locales: readonly string[];
364
+ }
365
+ interface DomainLocale {
366
+ defaultLocale: string;
367
+ domain: string;
368
+ http?: true;
369
+ locales?: readonly string[];
370
+ }
371
+ interface TypeScriptConfig {
372
+ /** Do not run TypeScript during production builds (`next build`). */
373
+ ignoreBuildErrors?: boolean;
374
+ /** Relative path to a custom tsconfig file */
375
+ tsconfigPath?: string;
376
+ }
377
+ interface EmotionConfig {
378
+ sourceMap?: boolean;
379
+ autoLabel?: 'dev-only' | 'always' | 'never';
380
+ labelFormat?: string;
381
+ importMap?: {
382
+ [importName: string]: {
383
+ [exportName: string]: {
384
+ canonicalImport?: [string, string];
385
+ styledBaseImport?: [string, string];
386
+ };
387
+ };
388
+ };
389
+ }
390
+ interface StyledComponentsConfig {
391
+ /**
392
+ * Enabled by default in development, disabled in production to reduce file size,
393
+ * setting this will override the default for all environments.
394
+ */
395
+ displayName?: boolean;
396
+ topLevelImportPaths?: string[];
397
+ ssr?: boolean;
398
+ fileName?: boolean;
399
+ meaninglessFileNames?: string[];
400
+ minify?: boolean;
401
+ transpileTemplateLiterals?: boolean;
402
+ namespace?: string;
403
+ pure?: boolean;
404
+ cssProp?: boolean;
405
+ }
406
+ type JSONValue = string | number | boolean | JSONValue[] | {
407
+ [k: string]: JSONValue;
408
+ };
409
+ type TurbopackLoaderOptions = Record<string, JSONValue>;
410
+ type TurbopackLoaderItem = string | {
411
+ loader: string;
412
+ options?: TurbopackLoaderOptions;
413
+ };
414
+ type TurbopackLoaderBuiltinCondition = 'browser' | 'foreign' | 'development' | 'production' | 'node' | 'edge-light';
415
+ type TurbopackRuleCondition = {
416
+ all: TurbopackRuleCondition[];
417
+ } | {
418
+ any: TurbopackRuleCondition[];
419
+ } | {
420
+ not: TurbopackRuleCondition;
421
+ } | TurbopackLoaderBuiltinCondition | {
422
+ path?: string | RegExp;
423
+ content?: RegExp;
424
+ query?: string | RegExp;
425
+ contentType?: string | RegExp;
426
+ };
427
+ /**
428
+ * The module type to use for matched files. This determines how files are
429
+ * processed without requiring a custom loader.
430
+ *
431
+ * - `'asset'` - Emit the file and return its URL (like webpack's `asset/resource`)
432
+ * - `'ecmascript'` - Process as JavaScript module
433
+ * - `'typescript'` - Process as TypeScript module
434
+ * - `'css'` - Process as CSS file
435
+ * - `'css-module'` - Process as CSS module
436
+ * - `'wasm'` - Process as WebAssembly module
437
+ * - `'raw'` - Return raw file contents as a string
438
+ * - `'node'` - Process as native Node.js addon
439
+ * - `'bytes'` - Inline file contents as bytes in JavaScript
440
+ *
441
+ * @see [Module Types](https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopack#module-types)
442
+ */
443
+ type TurbopackModuleType = 'asset' | 'ecmascript' | 'typescript' | 'css' | 'css-module' | 'wasm' | 'raw' | 'node' | 'bytes' | 'text';
444
+ type TurbopackRuleConfigItem = {
445
+ /** Loaders to apply to matched files. */
446
+ loaders?: TurbopackLoaderItem[];
447
+ /** Rename the file extension for loader output (e.g., `'*.js'`). */
448
+ as?: string;
449
+ /** Additional conditions for when this rule applies. */
450
+ condition?: TurbopackRuleCondition;
451
+ /**
452
+ * Set the module type directly without using a loader.
453
+ * @see [Module Types](https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopack#module-types)
454
+ */
455
+ type?: TurbopackModuleType;
456
+ };
457
+ /**
458
+ * This can be an object representing a single configuration, or a list of
459
+ * loaders and/or rule configuration objects.
460
+ *
461
+ * - A list of loader path strings or objects is the "shorthand" syntax.
462
+ * - A list of rule configuration objects can be useful when each configuration
463
+ * object has different `condition` fields, but still match the same top-level
464
+ * path glob.
465
+ */
466
+ type TurbopackRuleConfigCollection = TurbopackRuleConfigItem | (TurbopackLoaderItem | TurbopackRuleConfigItem)[];
467
+ interface TurbopackOptions {
468
+ /**
469
+ * (`next --turbopack` only) A mapping of aliased imports to modules to load in their place.
470
+ *
471
+ * @see [Resolve Alias](https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopack#resolving-aliases)
472
+ */
473
+ resolveAlias?: Record<string, string | string[] | Record<string, string | string[]>>;
474
+ /**
475
+ * (`next --turbopack` only) A list of extensions to resolve when importing files.
476
+ *
477
+ * @see [Resolve Extensions](https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopack#resolving-custom-extensions)
478
+ */
479
+ resolveExtensions?: string[];
480
+ /**
481
+ * (`next --turbopack` only) A list of webpack loaders to apply when running with Turbopack.
482
+ *
483
+ * @see [Turbopack Loaders](https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopack#configuring-webpack-loaders)
484
+ */
485
+ rules?: Record<string, TurbopackRuleConfigCollection>;
486
+ /**
487
+ * This is the repo root usually and only files above this
488
+ * directory can be resolved by turbopack.
489
+ */
490
+ root?: string;
491
+ /**
492
+ * Enables generation of debug IDs in JavaScript bundles and source maps.
493
+ * These debug IDs help with debugging and error tracking by providing stable identifiers.
494
+ *
495
+ * @see https://github.com/tc39/ecma426/blob/main/proposals/debug-id.md TC39 Debug ID Proposal
496
+ */
497
+ debugIds?: boolean;
498
+ /**
499
+ * An array of issue filter rules to ignore specific Turbopack issues.
500
+ * Each rule must have a `path` field (mandatory) and optionally `title`
501
+ * and `description`. String paths are treated as glob patterns. String
502
+ * titles/descriptions are exact matches. RegExp values match anywhere
503
+ * within the string (use `^` and `$` anchors for full-string matching).
504
+ */
505
+ ignoreIssue?: Array<{
506
+ path: string | RegExp;
507
+ title?: string | RegExp;
508
+ description?: string | RegExp;
509
+ }>;
510
+ }
511
+ interface WebpackConfigContext {
512
+ /** Next.js root directory */
513
+ dir: string;
514
+ /** Indicates if the compilation will be done in development */
515
+ dev: boolean;
516
+ /** It's `true` for server-side compilation, and `false` for client-side compilation */
517
+ isServer: boolean;
518
+ /** The build id, used as a unique identifier between builds */
519
+ buildId: string;
520
+ /** The next.config.js merged with default values */
521
+ config: NextConfigComplete;
522
+ /** Default loaders used internally by Next.js */
523
+ defaultLoaders: {
524
+ /** Default babel-loader configuration */
525
+ babel: any;
526
+ };
527
+ /** Number of total Next.js pages */
528
+ totalPages: number;
529
+ /** The webpack configuration */
530
+ webpack: any;
531
+ /** The current server runtime */
532
+ nextRuntime?: 'nodejs' | 'edge';
533
+ }
534
+ interface NextJsWebpackConfig {
535
+ (/** Existing Webpack config */config: any, context: WebpackConfigContext): any;
536
+ }
537
+ /**
538
+ * Set of options for React Compiler that Next.js currently supports.
539
+ *
540
+ * These options may be changed in breaking ways at any time without notice
541
+ * while support for React Compiler is experimental.
542
+ *
543
+ * @see https://react.dev/reference/react-compiler/configuration
544
+ */
545
+ interface ReactCompilerOptions {
546
+ /**
547
+ * Controls the strategy for determining which functions the React Compiler
548
+ * will optimize.
549
+ *
550
+ * The default is `'infer'`, which uses intelligent heuristics to identify
551
+ * React components and hooks.
552
+ *
553
+ * When using `infer`, Next.js applies its own heuristics before calling
554
+ * `react-compiler`. This improves compilation performance by avoiding extra
555
+ * invocations of Babel and reducing redundant parsing of code.
556
+ *
557
+ * @see https://react.dev/reference/react-compiler/compilationMode
558
+ */
559
+ compilationMode?: 'infer' | 'annotation' | 'all';
560
+ /**
561
+ * Controls how the React Compiler handles errors during compilation.
562
+ *
563
+ * The default is `'none'`, which skips components which cannot be compiled.
564
+ *
565
+ * @see https://react.dev/reference/react-compiler/panicThreshold
566
+ */
567
+ panicThreshold?: 'none' | 'critical_errors' | 'all_errors';
568
+ }
569
+ interface IncomingRequestLoggingConfig {
570
+ /**
571
+ * A regular expression array to match incoming requests that should not be logged.
572
+ * You can specify multiple patterns to match incoming requests that should not be logged.
573
+ */
574
+ ignore?: RegExp[];
575
+ }
576
+ interface LoggingConfig {
577
+ fetches?: {
578
+ fullUrl?: boolean;
579
+ /**
580
+ * If true, fetch requests that are restored from the HMR cache are logged
581
+ * during an HMR refresh request, i.e. when editing a server component.
582
+ */
583
+ hmrRefreshes?: boolean;
584
+ };
585
+ /**
586
+ * If set to false, incoming request logging is disabled.
587
+ * You can specify a pattern to match incoming requests that should not be logged.
588
+ */
589
+ incomingRequests?: boolean | IncomingRequestLoggingConfig;
590
+ /**
591
+ * If false, Server Function invocation logging is disabled.
592
+ * @default true
593
+ */
594
+ serverFunctions?: boolean;
595
+ /**
596
+ * Forward browser console logs to terminal.
597
+ * - `false`: Disable browser log forwarding
598
+ * - `true`: Forward all browser console output to terminal
599
+ * - `'warn'`: Forward warnings and errors to terminal
600
+ * - `'error'`: Forward only errors to terminal
601
+ */
602
+ browserToTerminal?: boolean | 'error' | 'warn';
603
+ }
604
+ /**
605
+ * All recognized lightningcss feature names.
606
+ * Individual features map 1:1 to lightningcss `Features` bitflags.
607
+ * Composite names (`selectors`, `media-queries`, `colors`) enable a group of
608
+ * related individual features at once.
609
+ *
610
+ * The name→bitmask mapping is duplicated in:
611
+ * - JS: `packages/next/src/build/webpack/loaders/lightningcss-loader/src/features.ts`
612
+ * - Rust: `crates/next-core/src/next_config.rs` (`lightningcss_feature_names_to_mask`)
613
+ */
614
+ declare const LIGHTNINGCSS_FEATURE_NAMES: readonly ["nesting", "not-selector-list", "dir-selector", "lang-selector-list", "is-selector", "text-decoration-thickness-percent", "media-interval-syntax", "media-range-syntax", "custom-media-queries", "clamp-function", "color-function", "oklab-colors", "lab-colors", "p3-colors", "hex-alpha-colors", "space-separated-color-notation", "font-family-system-ui", "double-position-gradients", "vendor-prefixes", "logical-properties", "light-dark", "selectors", "media-queries", "colors"];
615
+ type LightningCssFeature = (typeof LIGHTNINGCSS_FEATURE_NAMES)[number];
616
+ interface LightningCssFeatures {
617
+ include?: LightningCssFeature[];
618
+ exclude?: LightningCssFeature[];
619
+ }
620
+ interface ExperimentalConfig {
621
+ appNewScrollHandler?: boolean;
622
+ useSkewCookie?: boolean;
623
+ /** @deprecated use top-level `cacheHandlers` instead */
624
+ cacheHandlers?: NextConfig['cacheHandlers'];
625
+ multiZoneDraftMode?: boolean;
626
+ appNavFailHandling?: boolean;
627
+ prerenderEarlyExit?: boolean;
628
+ linkNoTouchStart?: boolean;
629
+ caseSensitiveRoutes?: boolean;
630
+ /**
631
+ * The origins that are allowed to write the rewritten headers when
632
+ * performing a non-relative rewrite. When undefined, no non-relative
633
+ * rewrites will get the rewrite headers.
634
+ */
635
+ clientParamParsingOrigins?: string[];
636
+ cachedNavigations?: boolean;
637
+ /**
638
+ * Enables partial fallback shells for cache-components routes while the
639
+ * feature stabilizes.
640
+ */
641
+ partialFallbacks?: boolean;
642
+ dynamicOnHover?: boolean;
643
+ optimisticRouting?: boolean;
644
+ varyParams?: boolean;
645
+ prefetchInlining?: boolean | {
646
+ maxSize?: number;
647
+ maxBundleSize?: number;
648
+ };
649
+ preloadEntriesOnStart?: boolean;
650
+ clientRouterFilter?: boolean;
651
+ clientRouterFilterRedirects?: boolean;
652
+ /**
653
+ * This config can be used to override the cache behavior for the client router.
654
+ * These values indicate the time, in seconds, that the cache should be considered
655
+ * reusable. When the `prefetch` Link prop is left unspecified, this will use the `dynamic` value.
656
+ * When the `prefetch` Link prop is set to `true`, this will use the `static` value.
657
+ */
658
+ staleTimes?: {
659
+ dynamic?: number; /** Must be greater than or equal to 30 seconds, to ensure prefetching is not completely wasteful */
660
+ static?: number;
661
+ };
662
+ /**
663
+ * @deprecated use top-level `cacheLife` instead
664
+ */
665
+ cacheLife?: NextConfig['cacheLife'];
666
+ clientRouterFilterAllowedRate?: number;
667
+ /**
668
+ * @deprecated Use `externalProxyRewritesResolve` instead.
669
+ */
670
+ externalMiddlewareRewritesResolve?: boolean;
671
+ externalProxyRewritesResolve?: boolean;
672
+ /**
673
+ * Exposes the Instant Navigation Testing API in production builds. This
674
+ * API is always available in development mode.
675
+ *
676
+ * The testing API allows e2e tests to control navigation timing, enabling
677
+ * deterministic assertions on prefetched/cached UI before dynamic data
678
+ * streams in.
679
+ *
680
+ * WARNING: This flag is intended for profiling and testing purposes only.
681
+ * Do not enable in user-facing production deployments.
682
+ */
683
+ exposeTestingApiInProductionBuild?: boolean;
684
+ /**
685
+ * Show the Instant Navigation Mode toggle in the dev tools indicator.
686
+ * When enabled, a menu item lets you lock navigations to only show
687
+ * the cached/prefetched state.
688
+ */
689
+ instantNavigationDevToolsToggle?: boolean;
690
+ extensionAlias?: Record<string, any>;
691
+ allowedRevalidateHeaderKeys?: string[];
692
+ fetchCacheKeyPrefix?: string;
693
+ imgOptConcurrency?: number | null;
694
+ imgOptTimeoutInSeconds?: number;
695
+ imgOptMaxInputPixels?: number;
696
+ imgOptSequentialRead?: boolean | null;
697
+ imgOptSkipMetadata?: boolean | null;
698
+ optimisticClientCache?: boolean;
699
+ /**
700
+ * @deprecated use config.expireTime instead
701
+ */
702
+ expireTime?: number;
703
+ /**
704
+ * @deprecated Use `proxyPrefetch` instead.
705
+ */
706
+ middlewarePrefetch?: 'strict' | 'flexible';
707
+ proxyPrefetch?: 'strict' | 'flexible';
708
+ manualClientBasePath?: boolean;
709
+ /**
710
+ * CSS Chunking strategy. Defaults to `true` ("loose" mode), which guesses dependencies
711
+ * between CSS files to keep ordering of them.
712
+ * An alternative is 'strict', which will try to keep correct ordering as
713
+ * much as possible, even when this leads to many requests.
714
+ */
715
+ cssChunking?: boolean | 'strict';
716
+ disablePostcssPresetEnv?: boolean;
717
+ cpus?: number;
718
+ memoryBasedWorkersCount?: boolean;
719
+ proxyTimeout?: number;
720
+ isrFlushToDisk?: boolean;
721
+ workerThreads?: boolean;
722
+ optimizeCss?: boolean | Record<string, unknown>;
723
+ nextScriptWorkers?: boolean;
724
+ scrollRestoration?: boolean;
725
+ externalDir?: boolean;
726
+ disableOptimizedLoading?: boolean;
727
+ /** @deprecated A no-op as of Next 16, size metrics were removed from the build output. */
728
+ gzipSize?: boolean;
729
+ craCompat?: boolean;
730
+ esmExternals?: boolean | 'loose';
731
+ fullySpecified?: boolean;
732
+ urlImports?: NonNullable<webpack.Configuration['experiments']>['buildHttp'];
733
+ swcTraceProfiling?: boolean;
734
+ forceSwcTransforms?: boolean;
735
+ swcPlugins?: Array<[string, Record<string, unknown>]>;
736
+ largePageDataBytes?: number;
737
+ /**
738
+ * If set to `false`, webpack won't fall back to polyfill Node.js modules in the browser
739
+ * Full list of old polyfills is accessible here:
740
+ * [webpack/webpack#ModuleNotoundError.js#L13-L42](https://github.com/webpack/webpack/blob/2a0536cf510768111a3a6dceeb14cb79b9f59273/lib/ModuleNotFoundError.js#L13-L42)
741
+ */
742
+ fallbackNodePolyfills?: false;
743
+ sri?: {
744
+ algorithm?: SubresourceIntegrityAlgorithm;
745
+ };
746
+ webVitalsAttribution?: Array<(typeof WEB_VITALS)[number]>;
747
+ /**
748
+ * Automatically apply the "modularizeImports" optimization to imports of the specified packages.
749
+ */
750
+ optimizePackageImports?: string[];
751
+ /**
752
+ * Optimize React APIs for server builds.
753
+ */
754
+ optimizeServerReact?: boolean;
755
+ /**
756
+ * Type-checks props and return values of pages.
757
+ * Requires literal values for segment config (e.g. `export const dynamic = 'force-static' as const`).
758
+ */
759
+ strictRouteTypes?: boolean;
760
+ /**
761
+ * Displays an indicator when a React Transition has no other indicator rendered.
762
+ * This includes displaying an indicator on client-side navigations.
763
+ */
764
+ transitionIndicator?: boolean;
765
+ /**
766
+ * Enables experimental gesture transition APIs for optimistic client
767
+ * navigations. Requires experimental React.
768
+ */
769
+ gestureTransition?: boolean;
770
+ /**
771
+ * A target memory limit for turbo, in bytes.
772
+ */
773
+ turbopackMemoryLimit?: number;
774
+ /**
775
+ * Selects the runtime backend used by Turbopack for Node.js evaluation.
776
+ */
777
+ turbopackPluginRuntimeStrategy?: 'workerThreads' | 'childProcesses';
778
+ /**
779
+ * Enable minification. Defaults to true in build mode and false in dev mode.
780
+ */
781
+ turbopackMinify?: boolean;
782
+ /**
783
+ * Enable support for `with {type: "bytes"}` for ESM imports.
784
+ */
785
+ turbopackImportTypeBytes?: boolean;
786
+ /**
787
+ * Enable support for `with {type: "text"}` for ESM imports.
788
+ */
789
+ turbopackImportTypeText?: boolean;
790
+ /**
791
+ * Enable scope hoisting. Defaults to true in build mode. Always disabled in development mode.
792
+ */
793
+ turbopackScopeHoisting?: boolean;
794
+ /**
795
+ * Enable nested async chunking for client side assets. Defaults to true in build mode and false in dev mode.
796
+ * This optimization computes all possible paths through dynamic imports in the applications to figure out the modules needed at dynamic imports for every path.
797
+ */
798
+ turbopackClientSideNestedAsyncChunking?: boolean;
799
+ /**
800
+ * Enable nested async chunking for server side assets. Defaults to false in dev and build mode.
801
+ * This optimization computes all possible paths through dynamic imports in the applications to figure out the modules needed at dynamic imports for every path.
802
+ */
803
+ turbopackServerSideNestedAsyncChunking?: boolean;
804
+ /**
805
+ * Enable filesystem cache for the turbopack dev server.
806
+ *
807
+ * Defaults to `true`.
808
+ */
809
+ turbopackFileSystemCacheForDev?: boolean;
810
+ /**
811
+ * Enable filesystem cache for the turbopack build.
812
+ *
813
+ * Defaults to `false`.
814
+ */
815
+ turbopackFileSystemCacheForBuild?: boolean;
816
+ /**
817
+ * Enable source maps. Defaults to true.
818
+ */
819
+ turbopackSourceMaps?: boolean;
820
+ /**
821
+ * Enable extraction of source maps from input files. Defaults to true.
822
+ */
823
+ turbopackInputSourceMaps?: boolean;
824
+ /**
825
+ * Enable tree shaking for the turbopack dev server and build.
826
+ */
827
+ turbopackTreeShaking?: boolean;
828
+ /**
829
+ * Enable removing unused imports for turbopack dev server and build.
830
+ */
831
+ turbopackRemoveUnusedImports?: boolean;
832
+ /**
833
+ * Enable removing unused exports for turbopack dev server and build.
834
+ */
835
+ turbopackRemoveUnusedExports?: boolean;
836
+ /**
837
+ * Enable local analysis to infer side effect free modules. When enabled, Turbopack will
838
+ * analyze module code to determine if it has side effects. This can improve tree shaking
839
+ * and bundle size at the cost of some additional analysis.
840
+ *
841
+ * Defaults to `true`
842
+ */
843
+ turbopackInferModuleSideEffects?: boolean;
844
+ /**
845
+ * Set this to `false` to disable the automatic configuration of the babel loader when a Babel
846
+ * configuration file is present. This option is enabled by default.
847
+ *
848
+ * If this is set to `false`, but `reactCompiler` is `true`, the built-in Babel will
849
+ * still be configured, but any Babel configuration files on disk will be ignored. If you wish to
850
+ * use React Compiler with a different manually-configured `babel-loader`, you should disable both
851
+ * this and `reactCompiler`.
852
+ */
853
+ turbopackUseBuiltinBabel?: boolean;
854
+ /**
855
+ * Set this to `false` to disable the automatic configuration of the sass loader. The sass loader
856
+ * configuration is enabled by default.
857
+ */
858
+ turbopackUseBuiltinSass?: boolean;
859
+ /**
860
+ * The module ID strategy to use for Turbopack.
861
+ * If not set, the default is `'named'` for development and `'deterministic'`
862
+ * for production.
863
+ */
864
+ turbopackModuleIds?: 'named' | 'deterministic';
865
+ /**
866
+ * Enable server-side Fast Refresh (Hot Module Replacement) during development
867
+ * with Turbopack. When set to `false`, server-side HMR is disabled and a full
868
+ * restart is performed on server file changes.
869
+ *
870
+ * Can also be controlled via the `--no-server-fast-refresh` CLI flag.
871
+ * If both are set, the CLI flag takes precedence.
872
+ *
873
+ * @default true
874
+ */
875
+ turbopackServerFastRefresh?: boolean;
876
+ /**
877
+ * For use with `@next/mdx`. Compile MDX files using the new Rust compiler.
878
+ * @see https://nextjs.org/docs/app/api-reference/next-config-js/mdxRs
879
+ */
880
+ mdxRs?: boolean | {
881
+ development?: boolean;
882
+ jsx?: boolean;
883
+ jsxRuntime?: string;
884
+ jsxImportSource?: string;
885
+ providerImportSource?: string;
886
+ mdxType?: 'gfm' | 'commonmark';
887
+ };
888
+ /**
889
+ * Enable type checking for Link and Router.push, etc.
890
+ * @deprecated Use `typedRoutes` instead — this feature is now stable.
891
+ * @see https://nextjs.org/docs/app/api-reference/config/typescript#statically-typed-links
892
+ */
893
+ typedRoutes?: boolean;
894
+ /**
895
+ * Enable type-checking and autocompletion for environment variables.
896
+ *
897
+ * @default false
898
+ */
899
+ typedEnv?: boolean;
900
+ /**
901
+ * Runs the compilations for server and edge in parallel instead of in serial.
902
+ * This will make builds faster if there is enough server and edge functions
903
+ * in the application at the cost of more memory.
904
+ *
905
+ * NOTE: This option is only valid when the build process can use workers. See
906
+ * the documentation for `webpackBuildWorker` for more details.
907
+ */
908
+ parallelServerCompiles?: boolean;
909
+ /**
910
+ * Runs the logic to collect build traces for the server routes in parallel
911
+ * with other work during the compilation. This will increase the speed of
912
+ * the build at the cost of more memory. This option may incur some additional
913
+ * work compared to if the option was disabled since the work is started
914
+ * before data from the client compilation is available to potentially reduce
915
+ * the amount of code that needs to be traced. Despite that, this may still
916
+ * result in faster builds for some applications.
917
+ *
918
+ * Valid values are:
919
+ * - `true`: Collect the server build traces in parallel.
920
+ * - `false`: Do not collect the server build traces in parallel.
921
+ * - `undefined`: Collect server build traces in parallel only in the `experimental-compile` mode.
922
+ *
923
+ * NOTE: This option is only valid when the build process can use workers. See
924
+ * the documentation for `webpackBuildWorker` for more details.
925
+ */
926
+ parallelServerBuildTraces?: boolean;
927
+ /**
928
+ * Run the Webpack build in a separate process to optimize memory usage during build.
929
+ * Valid values are:
930
+ * - `false`: Disable the Webpack build worker
931
+ * - `true`: Enable the Webpack build worker
932
+ * - `undefined`: Enable the Webpack build worker only if the webpack config is not customized
933
+ */
934
+ webpackBuildWorker?: boolean;
935
+ /**
936
+ * Enables optimizations to reduce memory usage in Webpack. This reduces the max size of the heap
937
+ * but may increase compile times slightly.
938
+ * Valid values are:
939
+ * - `false`: Disable Webpack memory optimizations (default).
940
+ * - `true`: Enables Webpack memory optimizations.
941
+ */
942
+ webpackMemoryOptimizations?: boolean;
943
+ /**
944
+ * The array of the meta tags to the client injected by tracing propagation data.
945
+ */
946
+ clientTraceMetadata?: string[];
947
+ /**
948
+ * @deprecated This configuration option has been merged into `cacheComponents`.
949
+ * The Partial Prerendering feature is still available via `cacheComponents`.
950
+ */
951
+ ppr?: ExperimentalPPRConfig;
952
+ /**
953
+ * Enables experimental taint APIs in React.
954
+ * Using this feature will enable the `react@experimental` for the `app` directory.
955
+ */
956
+ taint?: boolean;
957
+ /**
958
+ * Uninstalls all "unhandledRejection" and "uncaughtException" listeners from
959
+ * the global process so that we can override the behavior, which in some
960
+ * runtimes is to exit the process.
961
+ *
962
+ * This is experimental until we've considered the impact in various
963
+ * deployment environments.
964
+ */
965
+ removeUncaughtErrorAndRejectionListeners?: boolean;
966
+ /**
967
+ * During an RSC request, validates that the request headers match the
968
+ * cache-busting search parameter sent by the client.
969
+ */
970
+ validateRSCRequestHeaders?: boolean;
971
+ serverActions?: {
972
+ /**
973
+ * Allows adjusting body parser size limit for server actions.
974
+ */
975
+ bodySizeLimit?: SizeLimit;
976
+ /**
977
+ * Allowed origins that can bypass Server Action's CSRF check. This is helpful
978
+ * when you have reverse proxy in front of your app.
979
+ * @example
980
+ * ["my-app.com", "*.my-app.com"]
981
+ */
982
+ allowedOrigins?: string[];
983
+ };
984
+ /**
985
+ * Allows adjusting the maximum size of the postponed state body for PPR
986
+ * resume requests. This includes the Resume Data Cache (RDC) which may grow
987
+ * large for some applications.
988
+ * @default '100 MB'
989
+ */
990
+ maxPostponedStateSize?: SizeLimit;
991
+ /**
992
+ * enables the minification of server code.
993
+ */
994
+ serverMinification?: boolean;
995
+ /**
996
+ * Enables source maps generation for the server production bundle.
997
+ */
998
+ serverSourceMaps?: boolean;
999
+ useWasmBinary?: boolean;
1000
+ /**
1001
+ * Use lightningcss instead of postcss-loader
1002
+ */
1003
+ useLightningcss?: boolean;
1004
+ /**
1005
+ * Configure which CSS features lightningcss should always transpile
1006
+ * (include) or never transpile (exclude), regardless of browser targets.
1007
+ * Requires `useLightningcss: true`.
1008
+ */
1009
+ lightningCssFeatures?: LightningCssFeatures;
1010
+ /**
1011
+ * Enables view transitions by using the {@link https://react.dev/reference/react/ViewTransition ViewTransition} Component.
1012
+ */
1013
+ viewTransition?: boolean;
1014
+ /**
1015
+ * Enables `fetch` requests to be proxied to the experimental test proxy server
1016
+ */
1017
+ testProxy?: boolean;
1018
+ /**
1019
+ * Set a default test runner to be used by `next experimental-test`.
1020
+ */
1021
+ defaultTestRunner?: SupportedTestRunners;
1022
+ /**
1023
+ * Allow NODE_ENV=development even for `next build`.
1024
+ */
1025
+ allowDevelopmentBuild?: true;
1026
+ /**
1027
+ * @deprecated use `config.bundlePagesRouterDependencies` instead
1028
+ *
1029
+ */
1030
+ bundlePagesExternals?: boolean;
1031
+ /**
1032
+ * @deprecated use `config.serverExternalPackages` instead
1033
+ *
1034
+ */
1035
+ serverComponentsExternalPackages?: string[];
1036
+ /**
1037
+ * When enabled, in dev mode, Next.js will send React's debug info through the
1038
+ * WebSocket connection, instead of including it in the main RSC payload.
1039
+ */
1040
+ reactDebugChannel?: boolean;
1041
+ /**
1042
+ * @deprecated use top-level `cacheComponents` instead
1043
+ */
1044
+ cacheComponents?: boolean;
1045
+ /**
1046
+ * The number of times to retry static generation (per page) before giving up.
1047
+ */
1048
+ staticGenerationRetryCount?: number;
1049
+ /**
1050
+ * The amount of pages to export per worker during static generation.
1051
+ */
1052
+ staticGenerationMaxConcurrency?: number;
1053
+ /**
1054
+ * The minimum number of pages to be chunked into each export worker.
1055
+ */
1056
+ staticGenerationMinPagesPerWorker?: number;
1057
+ /**
1058
+ * Allows previously fetched data to be re-used when editing server components.
1059
+ */
1060
+ serverComponentsHmrCache?: boolean;
1061
+ /**
1062
+ * Render <style> tags inline in the HTML for imported CSS assets.
1063
+ * Supports app-router in production mode only.
1064
+ */
1065
+ inlineCss?: boolean;
1066
+ /**
1067
+ * This config allows you to enable the experimental navigation API `forbidden` and `unauthorized`.
1068
+ */
1069
+ authInterrupts?: boolean;
1070
+ /**
1071
+ * Enables the use of the `"use cache"` directive.
1072
+ */
1073
+ useCache?: boolean;
1074
+ /**
1075
+ * Enables detection and reporting of slow modules during development builds.
1076
+ * Enabling this may impact build performance to ensure accurate measurements.
1077
+ */
1078
+ slowModuleDetection?: {
1079
+ /**
1080
+ * The time threshold in milliseconds for identifying slow modules.
1081
+ * Modules taking longer than this build time threshold will be reported.
1082
+ */
1083
+ buildTimeThresholdMs: number;
1084
+ };
1085
+ /**
1086
+ * Enables using the global-not-found.js file in the app directory
1087
+ *
1088
+ */
1089
+ globalNotFound?: boolean;
1090
+ /**
1091
+ * Enable debug information to be forwarded from browser to dev server stdout/stderr.
1092
+ *
1093
+ * - `'warn'` (default): Forward warnings and errors to terminal
1094
+ * - `'error'`: Forward only errors to terminal
1095
+ * - `'verbose'`: Forward all browser console output to terminal
1096
+ * - `true`: Same as 'verbose' - forward all browser console output to terminal
1097
+ * - `false`: Disable browser log forwarding to terminal
1098
+ * - Object: Enable with custom configuration
1099
+ *
1100
+ * @deprecated Use `logging.browserToTerminal` instead.
1101
+ */
1102
+ browserDebugInfoInTerminal?: boolean | 'error' | 'warn' | 'verbose' | {
1103
+ /**
1104
+ * Minimum log level to show in terminal.
1105
+ * @default 'verbose' (for object config, to preserve backward compatibility)
1106
+ */
1107
+ level?: 'error' | 'warn' | 'verbose';
1108
+ /**
1109
+ * Option to limit stringification at a specific nesting depth when logging circular objects.
1110
+ * @default 5
1111
+ */
1112
+ depthLimit?: number;
1113
+ /**
1114
+ * Maximum number of properties/elements to stringify when logging objects/arrays with circular references.
1115
+ * @default 100
1116
+ */
1117
+ edgeLimit?: number;
1118
+ /**
1119
+ * Whether to include source location information in debug output when available
1120
+ */
1121
+ showSourceLocation?: boolean;
1122
+ };
1123
+ /**
1124
+ * Enable accessing root params via the `next/root-params` module.
1125
+ */
1126
+ rootParams?: boolean;
1127
+ /**
1128
+ * Body size limit for request bodies with middleware configured.
1129
+ * Defaults to 10MB. Can be specified as a number (bytes) or string (e.g. '5mb').
1130
+ *
1131
+ * @deprecated Use `proxyClientMaxBodySize` instead.
1132
+ */
1133
+ middlewareClientMaxBodySize?: SizeLimit;
1134
+ /**
1135
+ * Body size limit for request bodies with proxy configured.
1136
+ * Defaults to 10MB. Can be specified as a number (bytes) or string (e.g. '5mb').
1137
+ */
1138
+ proxyClientMaxBodySize?: SizeLimit;
1139
+ /**
1140
+ * Enable the Model Context Protocol (MCP) server for AI-assisted development.
1141
+ * When enabled, Next.js will expose an MCP server at `/_next/mcp` that provides
1142
+ * code intelligence and project context to AI assistants.
1143
+ *
1144
+ * @default true
1145
+ */
1146
+ mcpServer?: boolean;
1147
+ /**
1148
+ * Acquires a lockfile at `<distDir>/lock` when starting `next dev` or `next
1149
+ * build`. Failing to acquire the lock causes the process to exit with an
1150
+ * error message.
1151
+ *
1152
+ * This is because if multiple processes write to the same `distDir` at the
1153
+ * same time, it can mangle the state of the directory. Disabling this option
1154
+ * is not recommended.
1155
+ *
1156
+ * @default true
1157
+ */
1158
+ lockDistDir?: boolean;
1159
+ /**
1160
+ * Hide logs that occur after a render has already aborted.
1161
+ * This can help reduce noise in the console when dealing with aborted renders.
1162
+ *
1163
+ * @default false
1164
+ */
1165
+ hideLogsAfterAbort?: boolean;
1166
+ /**
1167
+ * Whether `process.env.NEXT_DEPLOYMENT_ID` is available at runtime in the server (and `next
1168
+ * build` doesn't need to embed the deployment ID value into the build output).
1169
+ *
1170
+ * @default false
1171
+ */
1172
+ runtimeServerDeploymentId?: boolean;
1173
+ /**
1174
+ * A different token to use for static assets (as opposed to config.deploymentId) which
1175
+ * doesn't have to be unique per deployment.
1176
+ */
1177
+ immutableAssetToken?: string;
1178
+ /**
1179
+ * An array of paths in app or pages directories that should wait to be processed
1180
+ * until all other entries have been processed. This is useful for deferring
1181
+ * compilation of certain routes during development and build.
1182
+ */
1183
+ deferredEntries?: string[];
1184
+ /**
1185
+ * An async function that is called and awaited before processing deferred entries.
1186
+ * This callback runs after all non-deferred entries have been compiled.
1187
+ */
1188
+ onBeforeDeferredEntries?: () => Promise<void>;
1189
+ /**
1190
+ * Whether to report inlined system environment variables as warnings or errors.
1191
+ * Only supported for Turbopack.
1192
+ */
1193
+ reportSystemEnvInlining?: 'error' | 'warn';
1194
+ }
1195
+ type ExportPathMap = {
1196
+ [path: string]: {
1197
+ page: string;
1198
+ query?: NextParsedUrlQuery;
1199
+ };
1200
+ };
1201
+ /**
1202
+ * Next.js can be configured through a `next.config.js` file in the root of your project directory.
1203
+ *
1204
+ * This can change the behavior, enable experimental features, and configure other advanced options.
1205
+ *
1206
+ * Read more: [Next.js Docs: `next.config.js`](https://nextjs.org/docs/app/api-reference/config/next-config-js)
1207
+ */
1208
+ interface NextConfig {
1209
+ allowedDevOrigins?: string[];
1210
+ exportPathMap?: (defaultMap: ExportPathMap, ctx: {
1211
+ dev: boolean;
1212
+ dir: string;
1213
+ outDir: string | null;
1214
+ distDir: string;
1215
+ buildId: string;
1216
+ }) => Promise<ExportPathMap> | ExportPathMap;
1217
+ /**
1218
+ * Internationalization configuration
1219
+ *
1220
+ * @see [Internationalization docs](https://nextjs.org/docs/advanced-features/i18n-routing)
1221
+ */
1222
+ i18n?: I18NConfig | null;
1223
+ /**
1224
+ * @see [Next.js TypeScript documentation](https://nextjs.org/docs/app/api-reference/config/typescript)
1225
+ */
1226
+ typescript?: TypeScriptConfig;
1227
+ /**
1228
+ * Enable type checking for Link and Router.push, etc.
1229
+ * This feature requires TypeScript in your project.
1230
+ *
1231
+ * @see [Typed Links documentation](https://nextjs.org/docs/app/api-reference/config/typescript#statically-typed-links)
1232
+ */
1233
+ typedRoutes?: boolean;
1234
+ /**
1235
+ * Headers allow you to set custom HTTP headers for an incoming request path.
1236
+ *
1237
+ * @see [Headers configuration documentation](https://nextjs.org/docs/app/api-reference/config/next-config-js/headers)
1238
+ */
1239
+ headers?: () => Promise<Header[]> | Header[];
1240
+ /**
1241
+ * Rewrites allow you to map an incoming request path to a different destination path.
1242
+ *
1243
+ * @see [Rewrites configuration documentation](https://nextjs.org/docs/app/api-reference/config/next-config-js/rewrites)
1244
+ */
1245
+ rewrites?: () => Promise<Rewrite[] | {
1246
+ beforeFiles?: Rewrite[];
1247
+ afterFiles?: Rewrite[];
1248
+ fallback?: Rewrite[];
1249
+ }> | Rewrite[] | {
1250
+ beforeFiles?: Rewrite[];
1251
+ afterFiles?: Rewrite[];
1252
+ fallback?: Rewrite[];
1253
+ };
1254
+ /**
1255
+ * Redirects allow you to redirect an incoming request path to a different destination path.
1256
+ *
1257
+ * @see [Redirects configuration documentation](https://nextjs.org/docs/app/api-reference/config/next-config-js/redirects)
1258
+ */
1259
+ redirects?: () => Promise<Redirect[]> | Redirect[];
1260
+ /**
1261
+ * @see [Moment.js locales excluded by default](https://nextjs.org/docs/upgrading#momentjs-locales-excluded-by-default)
1262
+ */
1263
+ excludeDefaultMomentLocales?: boolean;
1264
+ /**
1265
+ * Before continuing to add custom webpack configuration to your application make sure Next.js doesn't already support your use-case
1266
+ *
1267
+ * @see [Custom Webpack Config documentation](https://nextjs.org/docs/app/api-reference/config/next-config-js/webpack)
1268
+ */
1269
+ webpack?: NextJsWebpackConfig | null;
1270
+ /**
1271
+ * By default Next.js will redirect urls with trailing slashes to their counterpart without a trailing slash.
1272
+ *
1273
+ * @default false
1274
+ * @see [Trailing Slash Configuration](https://nextjs.org/docs/app/api-reference/config/next-config-js/trailingSlash)
1275
+ */
1276
+ trailingSlash?: boolean;
1277
+ /**
1278
+ * Next.js comes with built-in support for environment variables
1279
+ *
1280
+ * @see [Environment Variables documentation](https://nextjs.org/docs/app/api-reference/config/next-config-js/env)
1281
+ */
1282
+ env?: Record<string, string | undefined>;
1283
+ /**
1284
+ * Destination directory (defaults to `.next`)
1285
+ */
1286
+ distDir?: string;
1287
+ /**
1288
+ * The build output directory (defaults to `.next`) is now cleared by default except for the Next.js caches.
1289
+ */
1290
+ cleanDistDir?: boolean;
1291
+ /**
1292
+ * To set up a CDN, you can set up an asset prefix and configure your CDN's origin to resolve to the domain that Next.js is hosted on.
1293
+ *
1294
+ * @see [CDN Support with Asset Prefix](https://nextjs.org/docs/app/api-reference/config/next-config-js/assetPrefix)
1295
+ */
1296
+ assetPrefix?: string;
1297
+ /**
1298
+ * The default cache handler for the Pages and App Router uses the filesystem cache. This requires no configuration, however, you can customize the cache handler if you prefer.
1299
+ *
1300
+ * @see [Configuring Caching](https://nextjs.org/docs/app/building-your-application/deploying#configuring-caching) and the [API Reference](https://nextjs.org/docs/app/api-reference/next-config-js/incrementalCacheHandlerPath).
1301
+ */
1302
+ cacheHandler?: string | undefined;
1303
+ /**
1304
+ * Path to a custom adapter module for deployment platform integration.
1305
+ * Can also be set via the `NEXT_ADAPTER_PATH` environment variable.
1306
+ */
1307
+ adapterPath?: string;
1308
+ cacheHandlers?: {
1309
+ default?: string;
1310
+ remote?: string;
1311
+ static?: string;
1312
+ [handlerName: string]: string | undefined;
1313
+ };
1314
+ /**
1315
+ * Configure the in-memory cache size in bytes. Defaults to 50 MB.
1316
+ * If `cacheMaxMemorySize: 0`, this disables in-memory caching entirely.
1317
+ *
1318
+ * @see [Configuring Caching](https://nextjs.org/docs/app/building-your-application/deploying#configuring-caching).
1319
+ */
1320
+ cacheMaxMemorySize?: number;
1321
+ /**
1322
+ * By default, `Next` will serve each file in the `pages` folder under a pathname matching the filename.
1323
+ * To disable this behavior and prevent routing based set this to `true`.
1324
+ *
1325
+ * @default true
1326
+ * @see [Disabling file-system routing](https://nextjs.org/docs/advanced-features/custom-server#disabling-file-system-routing)
1327
+ */
1328
+ useFileSystemPublicRoutes?: boolean;
1329
+ /**
1330
+ * @see [Configuring the build ID](https://nextjs.org/docs/app/api-reference/config/next-config-js/generateBuildId)
1331
+ */
1332
+ generateBuildId?: () => string | null | Promise<string | null>;
1333
+ /** @see [Disabling ETag Configuration](https://nextjs.org/docs/app/api-reference/config/next-config-js/generateEtags) */
1334
+ generateEtags?: boolean;
1335
+ /** @see [Including non-page files in the pages directory](https://nextjs.org/docs/app/api-reference/config/next-config-js/pageExtensions) */
1336
+ pageExtensions?: string[];
1337
+ /** @see [Compression documentation](https://nextjs.org/docs/app/api-reference/config/next-config-js/compress) */
1338
+ compress?: boolean;
1339
+ /** @see [Disabling x-powered-by](https://nextjs.org/docs/app/api-reference/config/next-config-js/poweredByHeader) */
1340
+ poweredByHeader?: boolean;
1341
+ /** @see [Using the Image Component](https://nextjs.org/docs/app/api-reference/next-config-js/images) */
1342
+ images?: ImageConfig;
1343
+ /** Configure indicators in development environment */
1344
+ devIndicators?: false | {
1345
+ /**
1346
+ * Position of the development tools indicator in the browser window.
1347
+ * @default "bottom-left"
1348
+ * */
1349
+ position?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
1350
+ };
1351
+ /**
1352
+ * Next.js exposes some options that give you some control over how the server will dispose or keep in memory built pages in development.
1353
+ *
1354
+ * @see [Configuring `onDemandEntries`](https://nextjs.org/docs/app/api-reference/config/next-config-js/onDemandEntries)
1355
+ */
1356
+ onDemandEntries?: {
1357
+ /** period (in ms) where the server will keep pages in the buffer */
1358
+ maxInactiveAge?: number;
1359
+ /** number of pages that should be kept simultaneously without being disposed */
1360
+ pagesBufferLength?: number;
1361
+ };
1362
+ /**
1363
+ * A unique identifier for a deployment that will be included in each request's query string or header.
1364
+ */
1365
+ deploymentId?: string;
1366
+ /**
1367
+ * Deploy a Next.js application under a sub-path of a domain
1368
+ *
1369
+ * @see [Base path configuration](https://nextjs.org/docs/app/api-reference/config/next-config-js/basePath)
1370
+ */
1371
+ basePath?: string;
1372
+ /** @see [Customizing sass options](https://nextjs.org/docs/app/api-reference/next-config-js/sassOptions) */
1373
+ sassOptions?: {
1374
+ implementation?: string;
1375
+ [key: string]: any;
1376
+ };
1377
+ /**
1378
+ * Enable browser source map generation during the production build
1379
+ *
1380
+ * @see [Source Maps](https://nextjs.org/docs/advanced-features/source-maps)
1381
+ */
1382
+ productionBrowserSourceMaps?: boolean;
1383
+ /**
1384
+ * Enable {@link https://nextjs.org/docs/app/api-reference/config/next-config-js/reactCompiler React Compiler in Next.js}.
1385
+ * Configuration accepts partial config object of the Compiler.
1386
+ * If provided, the Compiler will be enabled.
1387
+ */
1388
+ reactCompiler?: boolean | ReactCompilerOptions;
1389
+ /**
1390
+ * Enable react profiling in production
1391
+ *
1392
+ */
1393
+ reactProductionProfiling?: boolean;
1394
+ /**
1395
+ * The Next.js runtime is Strict Mode-compliant.
1396
+ *
1397
+ * @see [React Strict Mode](https://nextjs.org/docs/app/api-reference/config/next-config-js/reactStrictMode)
1398
+ */
1399
+ reactStrictMode?: boolean | null;
1400
+ /**
1401
+ * The maximum length of the headers that are emitted by React and added to
1402
+ * the response.
1403
+ *
1404
+ * @see [React Max Headers Length](https://nextjs.org/docs/app/api-reference/config/next-config-js/reactMaxHeadersLength)
1405
+ */
1406
+ reactMaxHeadersLength?: number;
1407
+ /**
1408
+ * Next.js enables HTTP Keep-Alive by default.
1409
+ * You may want to disable HTTP Keep-Alive for certain `fetch()` calls or globally.
1410
+ *
1411
+ * @see [Disabling HTTP Keep-Alive](https://nextjs.org/docs/app/api-reference/next-config-js/httpAgentOptions)
1412
+ */
1413
+ httpAgentOptions?: {
1414
+ keepAlive?: boolean;
1415
+ };
1416
+ /**
1417
+ * Timeout after waiting to generate static pages in seconds
1418
+ *
1419
+ * @default 60
1420
+ */
1421
+ staticPageGenerationTimeout?: number;
1422
+ /**
1423
+ * Add `"crossorigin"` attribute to generated `<script>` elements generated by `<Head />` or `<NextScript />` components
1424
+ *
1425
+ *
1426
+ * @see [`crossorigin` attribute documentation](https://developer.mozilla.org/docs/Web/HTML/Attributes/crossorigin)
1427
+ */
1428
+ crossOrigin?: 'anonymous' | 'use-credentials';
1429
+ /**
1430
+ * Optionally enable compiler transforms
1431
+ *
1432
+ * @see [Supported Compiler Options](https://nextjs.org/docs/advanced-features/compiler#supported-features)
1433
+ */
1434
+ compiler?: {
1435
+ reactRemoveProperties?: boolean | {
1436
+ properties?: string[];
1437
+ };
1438
+ relay?: {
1439
+ src: string;
1440
+ artifactDirectory?: string;
1441
+ language?: 'typescript' | 'javascript' | 'flow';
1442
+ eagerEsModules?: boolean;
1443
+ };
1444
+ removeConsole?: boolean | {
1445
+ exclude?: string[];
1446
+ };
1447
+ styledComponents?: boolean | StyledComponentsConfig;
1448
+ emotion?: boolean | EmotionConfig;
1449
+ styledJsx?: boolean | {
1450
+ useLightningcss?: boolean;
1451
+ };
1452
+ /**
1453
+ * Replaces variables in your code during compile time. Each key will be
1454
+ * replaced with the respective values.
1455
+ */
1456
+ define?: Record<string, string | number | boolean>;
1457
+ /**
1458
+ * Replaces server-only (Node.js and Edge) variables in your code during compile time.
1459
+ * Each key will be replaced with the respective values.
1460
+ */
1461
+ defineServer?: Record<string, string | number | boolean>;
1462
+ /**
1463
+ * A hook function that executes after production build compilation finishes,
1464
+ * but before running post-compilation tasks such as type checking and
1465
+ * static page generation.
1466
+ */
1467
+ runAfterProductionCompile?: (metadata: {
1468
+ /**
1469
+ * The root directory of the project
1470
+ */
1471
+ projectDir: string;
1472
+ /**
1473
+ * The build output directory (defaults to `.next`)
1474
+ */
1475
+ distDir: string;
1476
+ }) => Promise<void>;
1477
+ };
1478
+ /**
1479
+ * The type of build output.
1480
+ * - `undefined`: The default build output, `.next` directory, that works with production mode `next start` or a hosting provider like Vercel
1481
+ * - `'standalone'`: A standalone build output, `.next/standalone` directory, that only includes necessary files/dependencies. Useful for self-hosting in a Docker container.
1482
+ * - `'export'`: An exported build output, `out` directory, that only includes static HTML/CSS/JS. Useful for self-hosting without a Node.js server.
1483
+ * @see [Output File Tracing](https://nextjs.org/docs/advanced-features/output-file-tracing)
1484
+ * @see [Static HTML Export](https://nextjs.org/docs/advanced-features/static-html-export)
1485
+ */
1486
+ output?: 'standalone' | 'export';
1487
+ /**
1488
+ * Automatically transpile and bundle dependencies from local packages (like monorepos) or from external dependencies (`node_modules`). This replaces the
1489
+ * `next-transpile-modules` package.
1490
+ * @see [transpilePackages](https://nextjs.org/docs/advanced-features/compiler#module-transpilation)
1491
+ */
1492
+ transpilePackages?: string[];
1493
+ /**
1494
+ * Options for Turbopack. Temporarily also available as `experimental.turbo` for compatibility.
1495
+ */
1496
+ turbopack?: TurbopackOptions;
1497
+ /**
1498
+ * @deprecated Use `skipProxyUrlNormalize` instead.
1499
+ */
1500
+ skipMiddlewareUrlNormalize?: boolean;
1501
+ skipProxyUrlNormalize?: boolean;
1502
+ skipTrailingSlashRedirect?: boolean;
1503
+ modularizeImports?: Record<string, {
1504
+ transform: string | Record<string, string>;
1505
+ preventFullImport?: boolean;
1506
+ skipDefaultConversion?: boolean;
1507
+ }>;
1508
+ /**
1509
+ * Logging configuration. Set to `false` to disable logging.
1510
+ */
1511
+ logging?: LoggingConfig | false;
1512
+ /**
1513
+ * Enables source maps while generating static pages.
1514
+ * Helps with errors during the prerender phase in `next build`.
1515
+ */
1516
+ enablePrerenderSourceMaps?: boolean;
1517
+ /**
1518
+ * When enabled, in development and build, Next.js will automatically cache
1519
+ * page-level components and functions for faster builds and rendering. This
1520
+ * includes Partial Prerendering support.
1521
+ *
1522
+ * @see [Cache Components documentation](https://nextjs.org/docs/app/api-reference/config/next-config-js/cacheComponents)
1523
+ */
1524
+ cacheComponents?: boolean;
1525
+ cacheLife?: {
1526
+ [profile: string]: {
1527
+ stale?: number;
1528
+ revalidate?: number;
1529
+ expire?: number;
1530
+ };
1531
+ };
1532
+ /**
1533
+ * period (in seconds) where the server allow to serve stale cache
1534
+ */
1535
+ expireTime?: number;
1536
+ /**
1537
+ * Enable experimental features. Note that all experimental features are subject to breaking changes in the future.
1538
+ */
1539
+ experimental?: ExperimentalConfig;
1540
+ /**
1541
+ * Enables the bundling of node_modules packages (externals) for pages server-side bundles.
1542
+ * @see https://nextjs.org/docs/pages/api-reference/next-config-js/bundlePagesRouterDependencies
1543
+ */
1544
+ bundlePagesRouterDependencies?: boolean;
1545
+ /**
1546
+ * A list of packages that should be treated as external in the server build.
1547
+ * @see https://nextjs.org/docs/app/api-reference/next-config-js/serverExternalPackages
1548
+ */
1549
+ serverExternalPackages?: string[];
1550
+ /**
1551
+ * This is the repo root usually and only files above this
1552
+ * directory are traced and included.
1553
+ */
1554
+ outputFileTracingRoot?: string;
1555
+ /**
1556
+ * This allows manually excluding traced files if too many
1557
+ * are included incorrectly on a per-page basis.
1558
+ */
1559
+ outputFileTracingExcludes?: Record<string, string[]>;
1560
+ /**
1561
+ * This allows manually including traced files if some
1562
+ * were not detected on a per-page basis.
1563
+ */
1564
+ outputFileTracingIncludes?: Record<string, string[]>;
1565
+ watchOptions?: {
1566
+ pollIntervalMs?: number;
1567
+ };
1568
+ /**
1569
+ * User Agent of bots that can handle streaming metadata.
1570
+ * Besides the default behavior, Next.js act differently on serving metadata to bots based on their capability.
1571
+ *
1572
+ * @default
1573
+ * /Mediapartners-Google|Slurp|DuckDuckBot|baiduspider|yandex|sogou|bitlybot|tumblr|vkShare|quora link preview|redditbot|ia_archiver|Bingbot|BingPreview|applebot|facebookexternalhit|facebookcatalog|Twitterbot|LinkedInBot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview/i
1574
+ */
1575
+ htmlLimitedBots?: RegExp;
1576
+ }
1577
+ interface NextConfigRuntime {
1578
+ deploymentId?: NextConfigComplete['deploymentId'];
1579
+ configFileName?: string;
1580
+ env?: NextConfigComplete['env'];
1581
+ distDir: NextConfigComplete['distDir'];
1582
+ cacheComponents: NextConfigComplete['cacheComponents'];
1583
+ htmlLimitedBots: NextConfigComplete['htmlLimitedBots'];
1584
+ assetPrefix: NextConfigComplete['assetPrefix'];
1585
+ output: NextConfigComplete['output'];
1586
+ crossOrigin: NextConfigComplete['crossOrigin'];
1587
+ trailingSlash: NextConfigComplete['trailingSlash'];
1588
+ images: NextConfigComplete['images'];
1589
+ reactMaxHeadersLength: NextConfigComplete['reactMaxHeadersLength'];
1590
+ cacheLife: NextConfigComplete['cacheLife'];
1591
+ basePath: NextConfigComplete['basePath'];
1592
+ expireTime: NextConfigComplete['expireTime'];
1593
+ generateEtags: NextConfigComplete['generateEtags'];
1594
+ poweredByHeader: NextConfigComplete['poweredByHeader'];
1595
+ cacheHandler: NextConfigComplete['cacheHandler'];
1596
+ cacheHandlers: NextConfigComplete['cacheHandlers'];
1597
+ cacheMaxMemorySize: NextConfigComplete['cacheMaxMemorySize'];
1598
+ compress: NextConfigComplete['compress'];
1599
+ i18n: NextConfigComplete['i18n'];
1600
+ httpAgentOptions: NextConfigComplete['httpAgentOptions'];
1601
+ skipProxyUrlNormalize: NextConfigComplete['skipProxyUrlNormalize'];
1602
+ pageExtensions: NextConfigComplete['pageExtensions'];
1603
+ useFileSystemPublicRoutes: NextConfigComplete['useFileSystemPublicRoutes'];
1604
+ logging?: NextConfigComplete['logging'];
1605
+ adapterPath?: NextConfigComplete['adapterPath'];
1606
+ experimental: Pick<NextConfigComplete['experimental'], 'ppr' | 'taint' | 'serverActions' | 'staleTimes' | 'dynamicOnHover' | 'optimisticRouting' | 'inlineCss' | 'prefetchInlining' | 'authInterrupts' | 'clientTraceMetadata' | 'clientParamParsingOrigins' | 'allowedRevalidateHeaderKeys' | 'fetchCacheKeyPrefix' | 'isrFlushToDisk' | 'optimizeCss' | 'nextScriptWorkers' | 'disableOptimizedLoading' | 'largePageDataBytes' | 'serverComponentsHmrCache' | 'caseSensitiveRoutes' | 'validateRSCRequestHeaders' | 'sri' | 'useSkewCookie' | 'preloadEntriesOnStart' | 'hideLogsAfterAbort' | 'removeUncaughtErrorAndRejectionListeners' | 'imgOptConcurrency' | 'imgOptMaxInputPixels' | 'imgOptSequentialRead' | 'imgOptSkipMetadata' | 'imgOptTimeoutInSeconds' | 'proxyClientMaxBodySize' | 'proxyTimeout' | 'testProxy' | 'runtimeServerDeploymentId' | 'maxPostponedStateSize' | 'cachedNavigations' | 'partialFallbacks' | 'exposeTestingApiInProductionBuild' | 'immutableAssetToken'> & {};
1607
+ }
1608
+ /**
1609
+ * Web vitals provided to _app.reportWebVitals by Core Web Vitals plugin developed by Google Chrome team.
1610
+ * https://nextjs.org/blog/next-9-4#integrated-web-vitals-reporting
1611
+ */
1612
+ declare const WEB_VITALS: readonly ["CLS", "FCP", "FID", "INP", "LCP", "TTFB"];
1613
+ type NEXT_DATA = {
1614
+ props: Record<string, any>;
1615
+ page: string;
1616
+ query: ParsedUrlQuery;
1617
+ buildId: string;
1618
+ assetPrefix?: string;
1619
+ nextExport?: boolean;
1620
+ autoExport?: boolean;
1621
+ isFallback?: boolean;
1622
+ isExperimentalCompile?: boolean;
1623
+ dynamicIds?: (string | number)[];
1624
+ err?: Error & {
1625
+ statusCode?: number;
1626
+ source?: typeof COMPILER_NAMES.server | typeof COMPILER_NAMES.edgeServer;
1627
+ };
1628
+ gsp?: boolean;
1629
+ gssp?: boolean;
1630
+ customServer?: boolean;
1631
+ gip?: boolean;
1632
+ appGip?: boolean;
1633
+ locale?: string;
1634
+ locales?: readonly string[];
1635
+ defaultLocale?: string;
1636
+ domainLocales?: readonly DomainLocale[];
1637
+ scriptLoader?: any[];
1638
+ isPreview?: boolean;
1639
+ notFoundSrcPage?: string;
1640
+ };
1641
+ /**
1642
+ * Next `API` route request
1643
+ */
1644
+ interface NextApiRequest extends IncomingMessage {
1645
+ /**
1646
+ * Object of `query` values from url
1647
+ */
1648
+ query: Partial<{
1649
+ [key: string]: string | string[];
1650
+ }>;
1651
+ /**
1652
+ * Object of `cookies` from header
1653
+ */
1654
+ cookies: Partial<{
1655
+ [key: string]: string;
1656
+ }>;
1657
+ body: any;
1658
+ env: Env;
1659
+ draftMode?: boolean;
1660
+ preview?: boolean;
1661
+ /**
1662
+ * Preview data set on the request, if any
1663
+ * */
1664
+ previewData?: PreviewData;
1665
+ }
1666
+ /**
1667
+ * Send body of response
1668
+ */
1669
+ type Send<T> = (body: T) => void;
1670
+ /**
1671
+ * Next `API` route response
1672
+ */
1673
+ type NextApiResponse<Data = any> = ServerResponse & {
1674
+ /**
1675
+ * Send data `any` data in response
1676
+ */
1677
+ send: Send<Data>;
1678
+ /**
1679
+ * Send data `json` data in response
1680
+ */
1681
+ json: Send<Data>;
1682
+ status: (statusCode: number) => NextApiResponse<Data>;
1683
+ redirect(url: string): NextApiResponse<Data>;
1684
+ redirect(status: number, url: string): NextApiResponse<Data>;
1685
+ /**
1686
+ * Set draft mode
1687
+ */
1688
+ setDraftMode: (options: {
1689
+ enable: boolean;
1690
+ }) => NextApiResponse<Data>;
1691
+ /**
1692
+ * Set preview data for Next.js' prerender mode
1693
+ */
1694
+ setPreviewData: (data: object | string, options?: {
1695
+ /**
1696
+ * Specifies the number (in seconds) for the preview session to last for.
1697
+ * The given number will be converted to an integer by rounding down.
1698
+ * By default, no maximum age is set and the preview session finishes
1699
+ * when the client shuts down (browser is closed).
1700
+ */
1701
+ maxAge?: number;
1702
+ /**
1703
+ * Specifies the path for the preview session to work under. By default,
1704
+ * the path is considered the "default path", i.e., any pages under "/".
1705
+ */
1706
+ path?: string;
1707
+ }) => NextApiResponse<Data>;
1708
+ /**
1709
+ * Clear preview data for Next.js' prerender mode
1710
+ */
1711
+ clearPreviewData: (options?: {
1712
+ path?: string;
1713
+ }) => NextApiResponse<Data>;
1714
+ /**
1715
+ * Revalidate a specific page and regenerate it using On-Demand Incremental
1716
+ * Static Regeneration.
1717
+ * The path should be an actual path, not a rewritten path. E.g. for
1718
+ * "/blog/[slug]" this should be "/blog/post-1".
1719
+ * @link https://nextjs.org/docs/app/building-your-application/data-fetching/incremental-static-regeneration#on-demand-revalidation-with-revalidatepath
1720
+ */
1721
+ revalidate: (urlPath: string, opts?: {
1722
+ unstable_onlyGenerated?: boolean;
1723
+ }) => Promise<void>;
1724
+ };
1725
+ declare module 'react' {
1726
+ interface ImgHTMLAttributes<T> {
1727
+ fetchPriority?: 'high' | 'low' | 'auto' | undefined;
1728
+ }
1729
+ }
1730
+ declare _0 {
1731
+ interface Crypto {
1732
+ readonly subtle: SubtleCrypto;
1733
+ getRandomValues<T extends Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | null>(array: T): T;
1734
+ randomUUID(): string;
1735
+ }
1736
+ var __NEXT_HTTP_AGENT_OPTIONS: {
1737
+ keepAlive?: boolean;
1738
+ } | undefined;
1739
+ var __NEXT_UNDICI_AGENT_SET: boolean;
1740
+ var __NEXT_HTTP_AGENT: Agent;
1741
+ var __NEXT_HTTPS_AGENT: Agent$1;
1742
+ }
1743
+ type FileSizeSuffix = `${'k' | 'K' | 'm' | 'M' | 'g' | 'G' | 't' | 'T' | 'p' | 'P'}${'b' | 'B'}`;
1744
+ type SizeLimit = number | `${number}${FileSizeSuffix}`;
1745
+ type PreviewData = string | false | object | undefined;
1746
+ declare const handler: <T, Q extends ParsedQueryParameters = ParsedQueryParameters, R extends NextApiRequest = NextApiRequest, Response extends NextApiResponse = NextApiResponse, M extends string = string>(adapter: Adapter<T, Q>, options?: HandlerOptions<M>) => Promise<ExecuteHandler<R, Response>>;
1747
+ export { handler$1 as edgeHandler, handler as nodeHandler };