vinext 0.0.30 → 0.0.31

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 (435) hide show
  1. package/README.md +12 -6
  2. package/dist/build/prerender.d.ts +188 -0
  3. package/dist/build/prerender.js +675 -0
  4. package/dist/build/prerender.js.map +1 -0
  5. package/dist/build/report.d.ts +45 -46
  6. package/dist/build/report.js +247 -276
  7. package/dist/build/report.js.map +1 -1
  8. package/dist/build/run-prerender.d.ts +62 -0
  9. package/dist/build/run-prerender.js +183 -0
  10. package/dist/build/run-prerender.js.map +1 -0
  11. package/dist/build/server-manifest.d.ts +19 -0
  12. package/dist/build/server-manifest.js +29 -0
  13. package/dist/build/server-manifest.js.map +1 -0
  14. package/dist/build/static-export.d.ts +51 -66
  15. package/dist/build/static-export.js +51 -545
  16. package/dist/build/static-export.js.map +1 -1
  17. package/dist/check.d.ts +26 -24
  18. package/dist/check.js +591 -571
  19. package/dist/check.js.map +1 -1
  20. package/dist/cli.d.ts +1 -15
  21. package/dist/cli.js +430 -491
  22. package/dist/cli.js.map +1 -1
  23. package/dist/client/entry.d.ts +1 -2
  24. package/dist/client/entry.js +49 -62
  25. package/dist/client/entry.js.map +1 -1
  26. package/dist/client/validate-module-path.d.ts +4 -1
  27. package/dist/client/validate-module-path.js +23 -28
  28. package/dist/client/validate-module-path.js.map +1 -1
  29. package/dist/client/vinext-next-data.d.ts +15 -20
  30. package/dist/client/vinext-next-data.js +0 -1
  31. package/dist/cloudflare/index.d.ts +3 -8
  32. package/dist/cloudflare/index.js +3 -8
  33. package/dist/cloudflare/kv-cache-handler.d.ts +95 -105
  34. package/dist/cloudflare/kv-cache-handler.js +354 -380
  35. package/dist/cloudflare/kv-cache-handler.js.map +1 -1
  36. package/dist/cloudflare/tpr.d.ts +36 -34
  37. package/dist/cloudflare/tpr.js +460 -603
  38. package/dist/cloudflare/tpr.js.map +1 -1
  39. package/dist/config/config-matchers.d.ts +31 -40
  40. package/dist/config/config-matchers.js +727 -936
  41. package/dist/config/config-matchers.js.map +1 -1
  42. package/dist/config/dotenv.d.ts +18 -11
  43. package/dist/config/dotenv.js +79 -84
  44. package/dist/config/dotenv.js.map +1 -1
  45. package/dist/config/next-config.d.ts +156 -146
  46. package/dist/config/next-config.js +374 -464
  47. package/dist/config/next-config.js.map +1 -1
  48. package/dist/deploy.d.ts +87 -96
  49. package/dist/deploy.js +490 -628
  50. package/dist/deploy.js.map +1 -1
  51. package/dist/entries/app-browser-entry.d.ts +4 -1
  52. package/dist/entries/app-browser-entry.js +12 -8
  53. package/dist/entries/app-browser-entry.js.map +1 -1
  54. package/dist/entries/app-rsc-entry.d.ts +33 -20
  55. package/dist/entries/app-rsc-entry.js +442 -211
  56. package/dist/entries/app-rsc-entry.js.map +1 -1
  57. package/dist/entries/app-ssr-entry.d.ts +9 -1
  58. package/dist/entries/app-ssr-entry.js +61 -28
  59. package/dist/entries/app-ssr-entry.js.map +1 -1
  60. package/dist/entries/pages-client-entry.d.ts +6 -2
  61. package/dist/entries/pages-client-entry.js +30 -33
  62. package/dist/entries/pages-client-entry.js.map +1 -1
  63. package/dist/entries/pages-entry-helpers.d.ts +5 -1
  64. package/dist/entries/pages-entry-helpers.js +17 -14
  65. package/dist/entries/pages-entry-helpers.js.map +1 -1
  66. package/dist/entries/pages-server-entry.d.ts +6 -2
  67. package/dist/entries/pages-server-entry.js +84 -113
  68. package/dist/entries/pages-server-entry.js.map +1 -1
  69. package/dist/index.d.ts +82 -62
  70. package/dist/index.js +2172 -3133
  71. package/dist/index.js.map +1 -1
  72. package/dist/init.d.ts +40 -37
  73. package/dist/init.js +201 -258
  74. package/dist/init.js.map +1 -1
  75. package/dist/plugins/async-hooks-stub.d.ts +7 -3
  76. package/dist/plugins/async-hooks-stub.js +39 -42
  77. package/dist/plugins/async-hooks-stub.js.map +1 -1
  78. package/dist/plugins/client-reference-dedup.d.ts +7 -3
  79. package/dist/plugins/client-reference-dedup.js +63 -88
  80. package/dist/plugins/client-reference-dedup.js.map +1 -1
  81. package/dist/routing/app-router.d.ts +100 -96
  82. package/dist/routing/app-router.js +560 -670
  83. package/dist/routing/app-router.js.map +1 -1
  84. package/dist/routing/file-matcher.d.ts +18 -15
  85. package/dist/routing/file-matcher.js +65 -65
  86. package/dist/routing/file-matcher.js.map +1 -1
  87. package/dist/routing/pages-router.d.ts +23 -24
  88. package/dist/routing/pages-router.js +147 -172
  89. package/dist/routing/pages-router.js.map +1 -1
  90. package/dist/routing/route-trie.d.ts +23 -20
  91. package/dist/routing/route-trie.js +131 -151
  92. package/dist/routing/route-trie.js.map +1 -1
  93. package/dist/routing/route-validation.d.ts +5 -2
  94. package/dist/routing/route-validation.js +98 -130
  95. package/dist/routing/route-validation.js.map +1 -1
  96. package/dist/routing/utils.d.ts +10 -7
  97. package/dist/routing/utils.js +75 -111
  98. package/dist/routing/utils.js.map +1 -1
  99. package/dist/server/api-handler.d.ts +8 -13
  100. package/dist/server/api-handler.js +161 -193
  101. package/dist/server/api-handler.js.map +1 -1
  102. package/dist/server/app-router-entry.d.ts +6 -16
  103. package/dist/server/app-router-entry.js +26 -54
  104. package/dist/server/app-router-entry.js.map +1 -1
  105. package/dist/server/dev-module-runner.d.ts +11 -64
  106. package/dist/server/dev-module-runner.js +89 -101
  107. package/dist/server/dev-module-runner.js.map +1 -1
  108. package/dist/server/dev-origin-check.d.ts +12 -10
  109. package/dist/server/dev-origin-check.js +98 -108
  110. package/dist/server/dev-origin-check.js.map +1 -1
  111. package/dist/server/dev-server.d.ts +17 -14
  112. package/dist/server/dev-server.js +542 -869
  113. package/dist/server/dev-server.js.map +1 -1
  114. package/dist/server/html.d.ts +4 -1
  115. package/dist/server/html.js +25 -26
  116. package/dist/server/html.js.map +1 -1
  117. package/dist/server/image-optimization.d.ts +31 -28
  118. package/dist/server/image-optimization.js +181 -210
  119. package/dist/server/image-optimization.js.map +1 -1
  120. package/dist/server/instrumentation.d.ts +25 -22
  121. package/dist/server/instrumentation.js +110 -122
  122. package/dist/server/instrumentation.js.map +1 -1
  123. package/dist/server/isr-cache.d.ts +16 -26
  124. package/dist/server/isr-cache.js +106 -128
  125. package/dist/server/isr-cache.js.map +1 -1
  126. package/dist/server/metadata-routes.d.ts +85 -88
  127. package/dist/server/metadata-routes.js +270 -317
  128. package/dist/server/metadata-routes.js.map +1 -1
  129. package/dist/server/middleware-codegen.d.ts +7 -4
  130. package/dist/server/middleware-codegen.js +61 -61
  131. package/dist/server/middleware-codegen.js.map +1 -1
  132. package/dist/server/middleware-request-headers.d.ts +8 -6
  133. package/dist/server/middleware-request-headers.js +47 -65
  134. package/dist/server/middleware-request-headers.js.map +1 -1
  135. package/dist/server/middleware.d.ts +31 -47
  136. package/dist/server/middleware.js +273 -404
  137. package/dist/server/middleware.js.map +1 -1
  138. package/dist/server/normalize-path.d.ts +4 -1
  139. package/dist/server/normalize-path.js +33 -47
  140. package/dist/server/normalize-path.js.map +1 -1
  141. package/dist/server/pages-i18n.d.ts +38 -30
  142. package/dist/server/pages-i18n.js +112 -139
  143. package/dist/server/pages-i18n.js.map +1 -1
  144. package/dist/server/prod-server.d.ts +19 -31
  145. package/dist/server/prod-server.js +714 -945
  146. package/dist/server/prod-server.js.map +1 -1
  147. package/dist/server/request-log.d.ts +18 -12
  148. package/dist/server/request-log.js +45 -52
  149. package/dist/server/request-log.js.map +1 -1
  150. package/dist/server/request-pipeline.d.ts +9 -17
  151. package/dist/server/request-pipeline.js +133 -184
  152. package/dist/server/request-pipeline.js.map +1 -1
  153. package/dist/server/worker-utils.d.ts +4 -1
  154. package/dist/server/worker-utils.js +31 -37
  155. package/dist/server/worker-utils.js.map +1 -1
  156. package/dist/shims/amp.d.ts +5 -2
  157. package/dist/shims/amp.js +19 -15
  158. package/dist/shims/amp.js.map +1 -1
  159. package/dist/shims/app.d.ts +8 -10
  160. package/dist/shims/app.js +0 -1
  161. package/dist/shims/cache-runtime.d.ts +20 -45
  162. package/dist/shims/cache-runtime.js +271 -422
  163. package/dist/shims/cache-runtime.js.map +1 -1
  164. package/dist/shims/cache.d.ts +130 -121
  165. package/dist/shims/cache.js +339 -427
  166. package/dist/shims/cache.js.map +1 -1
  167. package/dist/shims/client-only.d.ts +1 -18
  168. package/dist/shims/client-only.js +0 -17
  169. package/dist/shims/compat-router.d.ts +4 -1
  170. package/dist/shims/compat-router.js +23 -19
  171. package/dist/shims/compat-router.js.map +1 -1
  172. package/dist/shims/config.d.ts +7 -5
  173. package/dist/shims/config.js +16 -23
  174. package/dist/shims/config.js.map +1 -1
  175. package/dist/shims/constants.d.ts +119 -118
  176. package/dist/shims/constants.js +159 -164
  177. package/dist/shims/constants.js.map +1 -1
  178. package/dist/shims/document.d.ts +20 -16
  179. package/dist/shims/document.js +41 -22
  180. package/dist/shims/document.js.map +1 -1
  181. package/dist/shims/dynamic.d.ts +13 -22
  182. package/dist/shims/dynamic.js +122 -136
  183. package/dist/shims/dynamic.js.map +1 -1
  184. package/dist/shims/error-boundary.d.ts +22 -15
  185. package/dist/shims/error-boundary.js +81 -79
  186. package/dist/shims/error-boundary.js.map +1 -1
  187. package/dist/shims/error.d.ts +11 -12
  188. package/dist/shims/error.js +35 -39
  189. package/dist/shims/error.js.map +1 -1
  190. package/dist/shims/fetch-cache.d.ts +16 -14
  191. package/dist/shims/fetch-cache.js +437 -645
  192. package/dist/shims/fetch-cache.js.map +1 -1
  193. package/dist/shims/font-google-base.d.ts +28 -26
  194. package/dist/shims/font-google-base.js +238 -325
  195. package/dist/shims/font-google-base.js.map +1 -1
  196. package/dist/shims/font-google.d.ts +3 -3
  197. package/dist/shims/font-google.generated.d.ts +1928 -1924
  198. package/dist/shims/font-google.generated.js +1928 -2133
  199. package/dist/shims/font-google.generated.js.map +1 -1
  200. package/dist/shims/font-google.js +3 -3
  201. package/dist/shims/font-local.d.ts +28 -26
  202. package/dist/shims/font-local.js +204 -260
  203. package/dist/shims/font-local.js.map +1 -1
  204. package/dist/shims/form.d.ts +13 -27
  205. package/dist/shims/form.js +128 -180
  206. package/dist/shims/form.js.map +1 -1
  207. package/dist/shims/head-state.d.ts +8 -13
  208. package/dist/shims/head-state.js +25 -42
  209. package/dist/shims/head-state.js.map +1 -1
  210. package/dist/shims/head.d.ts +16 -20
  211. package/dist/shims/head.js +172 -250
  212. package/dist/shims/head.js.map +1 -1
  213. package/dist/shims/headers.d.ts +84 -78
  214. package/dist/shims/headers.js +447 -575
  215. package/dist/shims/headers.js.map +1 -1
  216. package/dist/shims/i18n-context.d.ts +16 -20
  217. package/dist/shims/i18n-context.js +35 -48
  218. package/dist/shims/i18n-context.js.map +1 -1
  219. package/dist/shims/i18n-state.d.ts +8 -14
  220. package/dist/shims/i18n-state.js +34 -42
  221. package/dist/shims/i18n-state.js.map +1 -1
  222. package/dist/shims/image-config.d.ts +11 -8
  223. package/dist/shims/image-config.js +50 -83
  224. package/dist/shims/image-config.js.map +1 -1
  225. package/dist/shims/image.d.ts +37 -46
  226. package/dist/shims/image.js +283 -308
  227. package/dist/shims/image.js.map +1 -1
  228. package/dist/shims/internal/api-utils.d.ts +7 -4
  229. package/dist/shims/internal/api-utils.js +0 -6
  230. package/dist/shims/internal/app-router-context.d.ts +22 -17
  231. package/dist/shims/internal/app-router-context.js +17 -13
  232. package/dist/shims/internal/app-router-context.js.map +1 -1
  233. package/dist/shims/internal/cookies.d.ts +2 -9
  234. package/dist/shims/internal/cookies.js +2 -9
  235. package/dist/shims/internal/parse-cookie-header.d.ts +4 -1
  236. package/dist/shims/internal/parse-cookie-header.js +29 -29
  237. package/dist/shims/internal/parse-cookie-header.js.map +1 -1
  238. package/dist/shims/internal/router-context.d.ts +6 -1
  239. package/dist/shims/internal/router-context.js +11 -7
  240. package/dist/shims/internal/router-context.js.map +1 -1
  241. package/dist/shims/internal/utils.d.ts +40 -37
  242. package/dist/shims/internal/utils.js +24 -30
  243. package/dist/shims/internal/utils.js.map +1 -1
  244. package/dist/shims/internal/work-unit-async-storage.d.ts +6 -10
  245. package/dist/shims/internal/work-unit-async-storage.js +14 -11
  246. package/dist/shims/internal/work-unit-async-storage.js.map +1 -1
  247. package/dist/shims/layout-segment-context.d.ts +11 -14
  248. package/dist/shims/layout-segment-context.js +24 -23
  249. package/dist/shims/layout-segment-context.js.map +1 -1
  250. package/dist/shims/legacy-image.d.ts +39 -46
  251. package/dist/shims/legacy-image.js +47 -42
  252. package/dist/shims/legacy-image.js.map +1 -1
  253. package/dist/shims/link.d.ts +32 -36
  254. package/dist/shims/link.js +255 -391
  255. package/dist/shims/link.js.map +1 -1
  256. package/dist/shims/metadata.d.ts +210 -202
  257. package/dist/shims/metadata.js +545 -546
  258. package/dist/shims/metadata.js.map +1 -1
  259. package/dist/shims/navigation-state.d.ts +10 -18
  260. package/dist/shims/navigation-state.js +66 -74
  261. package/dist/shims/navigation-state.js.map +1 -1
  262. package/dist/shims/navigation.d.ts +59 -63
  263. package/dist/shims/navigation.js +505 -704
  264. package/dist/shims/navigation.js.map +1 -1
  265. package/dist/shims/og.d.ts +2 -20
  266. package/dist/shims/og.js +2 -19
  267. package/dist/shims/readonly-url-search-params.d.ts +8 -5
  268. package/dist/shims/readonly-url-search-params.js +26 -22
  269. package/dist/shims/readonly-url-search-params.js.map +1 -1
  270. package/dist/shims/request-context.d.ts +8 -5
  271. package/dist/shims/request-context.js +50 -60
  272. package/dist/shims/request-context.js.map +1 -1
  273. package/dist/shims/request-state-types.d.ts +11 -11
  274. package/dist/shims/request-state-types.js +0 -1
  275. package/dist/shims/router-state.d.ts +13 -10
  276. package/dist/shims/router-state.js +34 -43
  277. package/dist/shims/router-state.js.map +1 -1
  278. package/dist/shims/router.d.ts +81 -85
  279. package/dist/shims/router.js +506 -628
  280. package/dist/shims/router.js.map +1 -1
  281. package/dist/shims/script.d.ts +39 -48
  282. package/dist/shims/script.js +107 -160
  283. package/dist/shims/script.js.map +1 -1
  284. package/dist/shims/server-only.d.ts +1 -19
  285. package/dist/shims/server-only.js +0 -18
  286. package/dist/shims/server.d.ts +175 -164
  287. package/dist/shims/server.js +462 -478
  288. package/dist/shims/server.js.map +1 -1
  289. package/dist/shims/unified-request-context.d.ts +20 -20
  290. package/dist/shims/unified-request-context.js +81 -99
  291. package/dist/shims/unified-request-context.js.map +1 -1
  292. package/dist/shims/url-safety.d.ts +4 -1
  293. package/dist/shims/url-safety.js +15 -11
  294. package/dist/shims/url-safety.js.map +1 -1
  295. package/dist/shims/url-utils.d.ts +8 -5
  296. package/dist/shims/url-utils.js +62 -93
  297. package/dist/shims/url-utils.js.map +1 -1
  298. package/dist/shims/web-vitals.d.ts +10 -8
  299. package/dist/shims/web-vitals.js +9 -15
  300. package/dist/shims/web-vitals.js.map +1 -1
  301. package/dist/utils/base-path.d.ts +5 -2
  302. package/dist/utils/base-path.js +21 -19
  303. package/dist/utils/base-path.js.map +1 -1
  304. package/dist/utils/domain-locale.d.ts +17 -9
  305. package/dist/utils/domain-locale.js +36 -56
  306. package/dist/utils/domain-locale.js.map +1 -1
  307. package/dist/utils/hash.d.ts +4 -1
  308. package/dist/utils/hash.js +19 -17
  309. package/dist/utils/hash.js.map +1 -1
  310. package/dist/utils/manifest-paths.d.ts +6 -3
  311. package/dist/utils/manifest-paths.js +15 -16
  312. package/dist/utils/manifest-paths.js.map +1 -1
  313. package/dist/utils/project.d.ts +13 -11
  314. package/dist/utils/project.js +169 -216
  315. package/dist/utils/project.js.map +1 -1
  316. package/dist/utils/query.d.ts +8 -6
  317. package/dist/utils/query.js +57 -67
  318. package/dist/utils/query.js.map +1 -1
  319. package/package.json +10 -9
  320. package/dist/build/report.d.ts.map +0 -1
  321. package/dist/build/static-export.d.ts.map +0 -1
  322. package/dist/check.d.ts.map +0 -1
  323. package/dist/cli.d.ts.map +0 -1
  324. package/dist/client/entry.d.ts.map +0 -1
  325. package/dist/client/validate-module-path.d.ts.map +0 -1
  326. package/dist/client/vinext-next-data.d.ts.map +0 -1
  327. package/dist/client/vinext-next-data.js.map +0 -1
  328. package/dist/cloudflare/index.d.ts.map +0 -1
  329. package/dist/cloudflare/index.js.map +0 -1
  330. package/dist/cloudflare/kv-cache-handler.d.ts.map +0 -1
  331. package/dist/cloudflare/tpr.d.ts.map +0 -1
  332. package/dist/config/config-matchers.d.ts.map +0 -1
  333. package/dist/config/dotenv.d.ts.map +0 -1
  334. package/dist/config/next-config.d.ts.map +0 -1
  335. package/dist/deploy.d.ts.map +0 -1
  336. package/dist/entries/app-browser-entry.d.ts.map +0 -1
  337. package/dist/entries/app-rsc-entry.d.ts.map +0 -1
  338. package/dist/entries/app-ssr-entry.d.ts.map +0 -1
  339. package/dist/entries/pages-client-entry.d.ts.map +0 -1
  340. package/dist/entries/pages-entry-helpers.d.ts.map +0 -1
  341. package/dist/entries/pages-server-entry.d.ts.map +0 -1
  342. package/dist/index.d.ts.map +0 -1
  343. package/dist/init.d.ts.map +0 -1
  344. package/dist/plugins/async-hooks-stub.d.ts.map +0 -1
  345. package/dist/plugins/client-reference-dedup.d.ts.map +0 -1
  346. package/dist/routing/app-router.d.ts.map +0 -1
  347. package/dist/routing/file-matcher.d.ts.map +0 -1
  348. package/dist/routing/pages-router.d.ts.map +0 -1
  349. package/dist/routing/route-trie.d.ts.map +0 -1
  350. package/dist/routing/route-validation.d.ts.map +0 -1
  351. package/dist/routing/utils.d.ts.map +0 -1
  352. package/dist/server/api-handler.d.ts.map +0 -1
  353. package/dist/server/app-router-entry.d.ts.map +0 -1
  354. package/dist/server/dev-module-runner.d.ts.map +0 -1
  355. package/dist/server/dev-origin-check.d.ts.map +0 -1
  356. package/dist/server/dev-server.d.ts.map +0 -1
  357. package/dist/server/html.d.ts.map +0 -1
  358. package/dist/server/image-optimization.d.ts.map +0 -1
  359. package/dist/server/instrumentation.d.ts.map +0 -1
  360. package/dist/server/isr-cache.d.ts.map +0 -1
  361. package/dist/server/metadata-routes.d.ts.map +0 -1
  362. package/dist/server/middleware-codegen.d.ts.map +0 -1
  363. package/dist/server/middleware-request-headers.d.ts.map +0 -1
  364. package/dist/server/middleware.d.ts.map +0 -1
  365. package/dist/server/normalize-path.d.ts.map +0 -1
  366. package/dist/server/pages-i18n.d.ts.map +0 -1
  367. package/dist/server/prod-server.d.ts.map +0 -1
  368. package/dist/server/request-log.d.ts.map +0 -1
  369. package/dist/server/request-pipeline.d.ts.map +0 -1
  370. package/dist/server/worker-utils.d.ts.map +0 -1
  371. package/dist/shims/amp.d.ts.map +0 -1
  372. package/dist/shims/app.d.ts.map +0 -1
  373. package/dist/shims/app.js.map +0 -1
  374. package/dist/shims/cache-runtime.d.ts.map +0 -1
  375. package/dist/shims/cache.d.ts.map +0 -1
  376. package/dist/shims/client-only.d.ts.map +0 -1
  377. package/dist/shims/client-only.js.map +0 -1
  378. package/dist/shims/compat-router.d.ts.map +0 -1
  379. package/dist/shims/config.d.ts.map +0 -1
  380. package/dist/shims/constants.d.ts.map +0 -1
  381. package/dist/shims/document.d.ts.map +0 -1
  382. package/dist/shims/dynamic.d.ts.map +0 -1
  383. package/dist/shims/error-boundary.d.ts.map +0 -1
  384. package/dist/shims/error.d.ts.map +0 -1
  385. package/dist/shims/fetch-cache.d.ts.map +0 -1
  386. package/dist/shims/font-google-base.d.ts.map +0 -1
  387. package/dist/shims/font-google.d.ts.map +0 -1
  388. package/dist/shims/font-google.generated.d.ts.map +0 -1
  389. package/dist/shims/font-google.js.map +0 -1
  390. package/dist/shims/font-local.d.ts.map +0 -1
  391. package/dist/shims/form.d.ts.map +0 -1
  392. package/dist/shims/head-state.d.ts.map +0 -1
  393. package/dist/shims/head.d.ts.map +0 -1
  394. package/dist/shims/headers.d.ts.map +0 -1
  395. package/dist/shims/i18n-context.d.ts.map +0 -1
  396. package/dist/shims/i18n-state.d.ts.map +0 -1
  397. package/dist/shims/image-config.d.ts.map +0 -1
  398. package/dist/shims/image.d.ts.map +0 -1
  399. package/dist/shims/internal/api-utils.d.ts.map +0 -1
  400. package/dist/shims/internal/api-utils.js.map +0 -1
  401. package/dist/shims/internal/app-router-context.d.ts.map +0 -1
  402. package/dist/shims/internal/cookies.d.ts.map +0 -1
  403. package/dist/shims/internal/cookies.js.map +0 -1
  404. package/dist/shims/internal/parse-cookie-header.d.ts.map +0 -1
  405. package/dist/shims/internal/router-context.d.ts.map +0 -1
  406. package/dist/shims/internal/utils.d.ts.map +0 -1
  407. package/dist/shims/internal/work-unit-async-storage.d.ts.map +0 -1
  408. package/dist/shims/layout-segment-context.d.ts.map +0 -1
  409. package/dist/shims/legacy-image.d.ts.map +0 -1
  410. package/dist/shims/link.d.ts.map +0 -1
  411. package/dist/shims/metadata.d.ts.map +0 -1
  412. package/dist/shims/navigation-state.d.ts.map +0 -1
  413. package/dist/shims/navigation.d.ts.map +0 -1
  414. package/dist/shims/og.d.ts.map +0 -1
  415. package/dist/shims/og.js.map +0 -1
  416. package/dist/shims/readonly-url-search-params.d.ts.map +0 -1
  417. package/dist/shims/request-context.d.ts.map +0 -1
  418. package/dist/shims/request-state-types.d.ts.map +0 -1
  419. package/dist/shims/request-state-types.js.map +0 -1
  420. package/dist/shims/router-state.d.ts.map +0 -1
  421. package/dist/shims/router.d.ts.map +0 -1
  422. package/dist/shims/script.d.ts.map +0 -1
  423. package/dist/shims/server-only.d.ts.map +0 -1
  424. package/dist/shims/server-only.js.map +0 -1
  425. package/dist/shims/server.d.ts.map +0 -1
  426. package/dist/shims/unified-request-context.d.ts.map +0 -1
  427. package/dist/shims/url-safety.d.ts.map +0 -1
  428. package/dist/shims/url-utils.d.ts.map +0 -1
  429. package/dist/shims/web-vitals.d.ts.map +0 -1
  430. package/dist/utils/base-path.d.ts.map +0 -1
  431. package/dist/utils/domain-locale.d.ts.map +0 -1
  432. package/dist/utils/hash.d.ts.map +0 -1
  433. package/dist/utils/manifest-paths.d.ts.map +0 -1
  434. package/dist/utils/project.d.ts.map +0 -1
  435. package/dist/utils/query.d.ts.map +0 -1
@@ -1,3 +1,4 @@
1
+ //#region src/shims/server.d.ts
1
2
  /**
2
3
  * next/server shim
3
4
  *
@@ -8,202 +9,212 @@
8
9
  * This is a pragmatic subset — we implement the most commonly used APIs
9
10
  * rather than bug-for-bug parity with Next.js internals.
10
11
  */
11
- export declare class NextRequest extends Request {
12
- private _nextUrl;
13
- private _cookies;
14
- constructor(input: URL | RequestInfo, init?: RequestInit);
15
- get nextUrl(): NextURL;
16
- get cookies(): RequestCookies;
17
- /**
18
- * Client IP address. Prefers Cloudflare's trusted CF-Connecting-IP header
19
- * over the spoofable X-Forwarded-For. Returns undefined if unavailable.
20
- */
21
- get ip(): string | undefined;
22
- /**
23
- * Geolocation data. Platform-dependent (e.g., Cloudflare, Vercel).
24
- * Returns undefined if not available.
25
- */
26
- get geo(): {
27
- city?: string;
28
- country?: string;
29
- region?: string;
30
- latitude?: string;
31
- longitude?: string;
32
- } | undefined;
33
- /**
34
- * The build ID of the Next.js application.
35
- * Delegates to `nextUrl.buildId` to match Next.js API surface.
36
- * Can be used in middleware to detect deployment skew between client and server.
37
- */
38
- get buildId(): string | undefined;
12
+ declare class NextRequest extends Request {
13
+ private _nextUrl;
14
+ private _cookies;
15
+ constructor(input: URL | RequestInfo, init?: RequestInit);
16
+ get nextUrl(): NextURL;
17
+ get cookies(): RequestCookies;
18
+ /**
19
+ * Client IP address. Prefers Cloudflare's trusted CF-Connecting-IP header
20
+ * over the spoofable X-Forwarded-For. Returns undefined if unavailable.
21
+ */
22
+ get ip(): string | undefined;
23
+ /**
24
+ * Geolocation data. Platform-dependent (e.g., Cloudflare, Vercel).
25
+ * Returns undefined if not available.
26
+ */
27
+ get geo(): {
28
+ city?: string;
29
+ country?: string;
30
+ region?: string;
31
+ latitude?: string;
32
+ longitude?: string;
33
+ } | undefined;
34
+ /**
35
+ * The build ID of the Next.js application.
36
+ * Delegates to `nextUrl.buildId` to match Next.js API surface.
37
+ * Can be used in middleware to detect deployment skew between client and server.
38
+ */
39
+ get buildId(): string | undefined;
39
40
  }
40
- export declare class NextResponse<_Body = unknown> extends Response {
41
- private _cookies;
42
- constructor(body?: BodyInit | null, init?: ResponseInit);
43
- get cookies(): ResponseCookies;
44
- /**
45
- * Create a JSON response.
46
- */
47
- static json<JsonBody>(body: JsonBody, init?: ResponseInit): NextResponse<JsonBody>;
48
- /**
49
- * Create a redirect response.
50
- */
51
- static redirect(url: string | URL, init?: number | ResponseInit): NextResponse;
52
- /**
53
- * Create a rewrite response (middleware pattern).
54
- * Sets the x-middleware-rewrite header.
55
- */
56
- static rewrite(destination: string | URL, init?: MiddlewareResponseInit): NextResponse;
57
- /**
58
- * Continue to the next handler (middleware pattern).
59
- * Sets the x-middleware-next header.
60
- */
61
- static next(init?: MiddlewareResponseInit): NextResponse;
41
+ declare class NextResponse<_Body = unknown> extends Response {
42
+ private _cookies;
43
+ constructor(body?: BodyInit | null, init?: ResponseInit);
44
+ get cookies(): ResponseCookies;
45
+ /**
46
+ * Create a JSON response.
47
+ */
48
+ static json<JsonBody>(body: JsonBody, init?: ResponseInit): NextResponse<JsonBody>;
49
+ /**
50
+ * Create a redirect response.
51
+ */
52
+ static redirect(url: string | URL, init?: number | ResponseInit): NextResponse;
53
+ /**
54
+ * Create a rewrite response (middleware pattern).
55
+ * Sets the x-middleware-rewrite header.
56
+ */
57
+ static rewrite(destination: string | URL, init?: MiddlewareResponseInit): NextResponse;
58
+ /**
59
+ * Continue to the next handler (middleware pattern).
60
+ * Sets the x-middleware-next header.
61
+ */
62
+ static next(init?: MiddlewareResponseInit): NextResponse;
62
63
  }
63
- export declare class NextURL {
64
- private _url;
65
- constructor(input: string | URL, base?: string | URL);
66
- get href(): string;
67
- set href(value: string);
68
- get origin(): string;
69
- get protocol(): string;
70
- set protocol(value: string);
71
- get username(): string;
72
- set username(value: string);
73
- get password(): string;
74
- set password(value: string);
75
- get host(): string;
76
- set host(value: string);
77
- get hostname(): string;
78
- set hostname(value: string);
79
- get port(): string;
80
- set port(value: string);
81
- get pathname(): string;
82
- set pathname(value: string);
83
- get search(): string;
84
- set search(value: string);
85
- get searchParams(): URLSearchParams;
86
- get hash(): string;
87
- set hash(value: string);
88
- clone(): NextURL;
89
- toString(): string;
90
- /**
91
- * The build ID of the Next.js application.
92
- * Set from `generateBuildId` in next.config.js, or a random UUID if not configured.
93
- * Can be used in middleware to detect deployment skew between client and server.
94
- * Matches the Next.js API: `request.nextUrl.buildId`.
95
- */
96
- get buildId(): string | undefined;
64
+ declare class NextURL {
65
+ private _url;
66
+ constructor(input: string | URL, base?: string | URL);
67
+ get href(): string;
68
+ set href(value: string);
69
+ get origin(): string;
70
+ get protocol(): string;
71
+ set protocol(value: string);
72
+ get username(): string;
73
+ set username(value: string);
74
+ get password(): string;
75
+ set password(value: string);
76
+ get host(): string;
77
+ set host(value: string);
78
+ get hostname(): string;
79
+ set hostname(value: string);
80
+ get port(): string;
81
+ set port(value: string);
82
+ get pathname(): string;
83
+ set pathname(value: string);
84
+ get search(): string;
85
+ set search(value: string);
86
+ get searchParams(): URLSearchParams;
87
+ get hash(): string;
88
+ set hash(value: string);
89
+ clone(): NextURL;
90
+ toString(): string;
91
+ /**
92
+ * The build ID of the Next.js application.
93
+ * Set from `generateBuildId` in next.config.js, or a random UUID if not configured.
94
+ * Can be used in middleware to detect deployment skew between client and server.
95
+ * Matches the Next.js API: `request.nextUrl.buildId`.
96
+ */
97
+ get buildId(): string | undefined;
97
98
  }
98
99
  interface CookieEntry {
99
- name: string;
100
- value: string;
100
+ name: string;
101
+ value: string;
101
102
  }
102
- export declare class RequestCookies {
103
- private _headers;
104
- private _parsed;
105
- constructor(headers: Headers);
106
- get(name: string): CookieEntry | undefined;
107
- getAll(nameOrOptions?: string | CookieEntry): CookieEntry[];
108
- has(name: string): boolean;
109
- set(nameOrOptions: string | CookieEntry, value?: string): this;
110
- delete(names: string | string[]): boolean | boolean[];
111
- clear(): this;
112
- get size(): number;
113
- toString(): string;
114
- private _serialize;
115
- private _syncHeader;
116
- [Symbol.iterator](): IterableIterator<[string, CookieEntry]>;
103
+ declare class RequestCookies {
104
+ private _headers;
105
+ private _parsed;
106
+ constructor(headers: Headers);
107
+ get(name: string): CookieEntry | undefined;
108
+ getAll(nameOrOptions?: string | CookieEntry): CookieEntry[];
109
+ has(name: string): boolean;
110
+ set(nameOrOptions: string | CookieEntry, value?: string): this;
111
+ delete(names: string | string[]): boolean | boolean[];
112
+ clear(): this;
113
+ get size(): number;
114
+ toString(): string;
115
+ private _serialize;
116
+ private _syncHeader;
117
+ [Symbol.iterator](): IterableIterator<[string, CookieEntry]>;
117
118
  }
118
- export declare class ResponseCookies {
119
- private _headers;
120
- constructor(headers: Headers);
121
- set(name: string, value: string, options?: CookieOptions): this;
122
- get(name: string): CookieEntry | undefined;
123
- getAll(): CookieEntry[];
124
- delete(name: string): this;
125
- [Symbol.iterator](): IterableIterator<[string, CookieEntry]>;
119
+ declare class ResponseCookies {
120
+ private _headers;
121
+ constructor(headers: Headers);
122
+ set(name: string, value: string, options?: CookieOptions): this;
123
+ get(name: string): CookieEntry | undefined;
124
+ has(name: string): boolean;
125
+ getAll(): CookieEntry[];
126
+ delete(name: string): this;
127
+ [Symbol.iterator](): IterableIterator<[string, CookieEntry]>;
126
128
  }
127
129
  interface CookieOptions {
128
- path?: string;
129
- domain?: string;
130
- maxAge?: number;
131
- expires?: Date;
132
- httpOnly?: boolean;
133
- secure?: boolean;
134
- sameSite?: "Strict" | "Lax" | "None";
130
+ path?: string;
131
+ domain?: string;
132
+ maxAge?: number;
133
+ expires?: Date;
134
+ httpOnly?: boolean;
135
+ secure?: boolean;
136
+ sameSite?: "Strict" | "Lax" | "None";
135
137
  }
136
- export interface MiddlewareResponseInit extends ResponseInit {
137
- request?: {
138
- headers?: Headers;
139
- };
138
+ interface MiddlewareResponseInit extends ResponseInit {
139
+ request?: {
140
+ headers?: Headers;
141
+ };
140
142
  }
141
- export type NextMiddlewareResult = NextResponse | Response | null | undefined | void;
142
- export type NextMiddleware = (request: NextRequest, event: NextFetchEvent) => NextMiddlewareResult | Promise<NextMiddlewareResult>;
143
+ type NextMiddlewareResult = NextResponse | Response | null | undefined | void;
144
+ type NextMiddleware = (request: NextRequest, event: NextFetchEvent) => NextMiddlewareResult | Promise<NextMiddlewareResult>;
143
145
  /**
144
146
  * Minimal NextFetchEvent — extends FetchEvent where available,
145
147
  * otherwise provides the waitUntil pattern standalone.
146
148
  */
147
- export declare class NextFetchEvent {
148
- sourcePage: string;
149
- private _waitUntilPromises;
150
- constructor(params: {
151
- page: string;
152
- });
153
- waitUntil(promise: Promise<unknown>): void;
154
- /** Drain all waitUntil promises. Returns a single promise that settles when all are done. */
155
- drainWaitUntil(): Promise<PromiseSettledResult<unknown>[]>;
149
+ declare class NextFetchEvent {
150
+ sourcePage: string;
151
+ private _waitUntilPromises;
152
+ constructor(params: {
153
+ page: string;
154
+ });
155
+ waitUntil(promise: Promise<unknown>): void;
156
+ /** Drain all waitUntil promises. Returns a single promise that settles when all are done. */
157
+ drainWaitUntil(): Promise<PromiseSettledResult<unknown>[]>;
156
158
  }
157
159
  /**
158
160
  * Parse user agent string. Minimal implementation — for full UA parsing,
159
161
  * apps should use a dedicated library like `ua-parser-js`.
160
162
  */
161
- export declare function userAgentFromString(ua: string | undefined): UserAgent;
162
- export declare function userAgent({ headers }: {
163
- headers: Headers;
163
+ declare function userAgentFromString(ua: string | undefined): UserAgent;
164
+ declare function userAgent({
165
+ headers
166
+ }: {
167
+ headers: Headers;
164
168
  }): UserAgent;
165
- export interface UserAgent {
166
- isBot: boolean;
167
- ua: string;
168
- browser: {
169
- name?: string;
170
- version?: string;
171
- major?: string;
172
- };
173
- device: {
174
- model?: string;
175
- type?: string;
176
- vendor?: string;
177
- };
178
- engine: {
179
- name?: string;
180
- version?: string;
181
- };
182
- os: {
183
- name?: string;
184
- version?: string;
185
- };
186
- cpu: {
187
- architecture?: string;
188
- };
169
+ interface UserAgent {
170
+ isBot: boolean;
171
+ ua: string;
172
+ browser: {
173
+ name?: string;
174
+ version?: string;
175
+ major?: string;
176
+ };
177
+ device: {
178
+ model?: string;
179
+ type?: string;
180
+ vendor?: string;
181
+ };
182
+ engine: {
183
+ name?: string;
184
+ version?: string;
185
+ };
186
+ os: {
187
+ name?: string;
188
+ version?: string;
189
+ };
190
+ cpu: {
191
+ architecture?: string;
192
+ };
189
193
  }
190
194
  /**
191
195
  * after() — schedule work after the response is sent.
192
- * In a real server, this would use the platform's waitUntil.
193
- * Here we simply run it as a microtask (best-effort).
196
+ *
197
+ * Uses the platform's `waitUntil` (via the per-request ExecutionContext) when
198
+ * available so the task survives past the response on Cloudflare Workers.
199
+ * Falls back to a fire-and-forget microtask on runtimes without an execution
200
+ * context (e.g. Node.js dev server).
201
+ *
202
+ * Throws when called inside a cached scope — request-specific
203
+ * side-effects must not leak into cached results.
194
204
  */
195
- export declare function after<T>(task: Promise<T> | (() => T | Promise<T>)): void;
205
+ declare function after<T>(task: Promise<T> | (() => T | Promise<T>)): void;
196
206
  /**
197
207
  * connection() — signals that the response requires a live connection
198
208
  * (not a static/cached response). Opts the page out of ISR caching
199
209
  * and sets Cache-Control: no-store on the response.
200
210
  */
201
- export declare function connection(): Promise<void>;
211
+ declare function connection(): Promise<void>;
202
212
  /**
203
213
  * URLPattern re-export — used in middleware for route matching.
204
214
  * Available natively in Node 20+, Cloudflare Workers, Deno.
205
215
  * Falls back to urlpattern-polyfill if the global is not available.
206
216
  */
207
- export declare const URLPattern: typeof globalThis.URLPattern;
208
- export {};
217
+ declare const URLPattern: typeof globalThis.URLPattern;
218
+ //#endregion
219
+ export { MiddlewareResponseInit, NextFetchEvent, NextMiddleware, NextMiddlewareResult, NextRequest, NextResponse, NextURL, RequestCookies, ResponseCookies, URLPattern, UserAgent, after, connection, userAgent, userAgentFromString };
209
220
  //# sourceMappingURL=server.d.ts.map