vinext 0.0.30 → 0.0.32

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 +15 -7
  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 +581 -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 +681 -571
  19. package/dist/check.js.map +1 -1
  20. package/dist/cli.d.ts +1 -15
  21. package/dist/cli.js +432 -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 +376 -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 +444 -212
  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 +86 -114
  68. package/dist/entries/pages-server-entry.js.map +1 -1
  69. package/dist/index.d.ts +92 -60
  70. package/dist/index.js +2151 -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 +160 -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 +19 -15
  112. package/dist/server/dev-server.js +543 -871
  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 +34 -59
  121. package/dist/server/instrumentation.js +112 -125
  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 +32 -47
  136. package/dist/server/middleware.js +261 -409
  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 +715 -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 +6 -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 +439 -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 +17 -20
  211. package/dist/shims/head.js +194 -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 +7 -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 +213 -164
  287. package/dist/shims/server.js +545 -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,250 @@
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
+ nextConfig?: {
17
+ basePath?: string;
18
+ i18n?: {
19
+ locales: string[];
20
+ defaultLocale: string;
21
+ };
22
+ };
23
+ });
24
+ get nextUrl(): NextURL;
25
+ get cookies(): RequestCookies;
26
+ /**
27
+ * Client IP address. Prefers Cloudflare's trusted CF-Connecting-IP header
28
+ * over the spoofable X-Forwarded-For. Returns undefined if unavailable.
29
+ */
30
+ get ip(): string | undefined;
31
+ /**
32
+ * Geolocation data. Platform-dependent (e.g., Cloudflare, Vercel).
33
+ * Returns undefined if not available.
34
+ */
35
+ get geo(): {
36
+ city?: string;
37
+ country?: string;
38
+ region?: string;
39
+ latitude?: string;
40
+ longitude?: string;
41
+ } | undefined;
42
+ /**
43
+ * The build ID of the Next.js application.
44
+ * Delegates to `nextUrl.buildId` to match Next.js API surface.
45
+ * Can be used in middleware to detect deployment skew between client and server.
46
+ */
47
+ get buildId(): string | undefined;
48
+ }
49
+ declare class NextResponse<_Body = unknown> extends Response {
50
+ private _cookies;
51
+ constructor(body?: BodyInit | null, init?: ResponseInit);
52
+ get cookies(): ResponseCookies;
53
+ /**
54
+ * Create a JSON response.
55
+ */
56
+ static json<JsonBody>(body: JsonBody, init?: ResponseInit): NextResponse<JsonBody>;
57
+ /**
58
+ * Create a redirect response.
59
+ */
60
+ static redirect(url: string | URL, init?: number | ResponseInit): NextResponse;
61
+ /**
62
+ * Create a rewrite response (middleware pattern).
63
+ * Sets the x-middleware-rewrite header.
64
+ */
65
+ static rewrite(destination: string | URL, init?: MiddlewareResponseInit): NextResponse;
66
+ /**
67
+ * Continue to the next handler (middleware pattern).
68
+ * Sets the x-middleware-next header.
69
+ */
70
+ static next(init?: MiddlewareResponseInit): NextResponse;
39
71
  }
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;
72
+ interface NextURLConfig {
73
+ basePath?: string;
74
+ nextConfig?: {
75
+ i18n?: {
76
+ locales: string[];
77
+ defaultLocale: string;
78
+ };
79
+ };
62
80
  }
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;
81
+ declare class NextURL {
82
+ /** Internal URL stores the pathname WITHOUT basePath or locale prefix. */
83
+ private _url;
84
+ private _basePath;
85
+ private _locale;
86
+ private _defaultLocale;
87
+ private _locales;
88
+ constructor(input: string | URL, base?: string | URL, config?: NextURLConfig);
89
+ /** Strip basePath prefix from the internal pathname. */
90
+ private _stripBasePath;
91
+ /** Extract locale from pathname, stripping it from the internal URL. */
92
+ private _analyzeLocale;
93
+ /**
94
+ * Reconstruct the full pathname with basePath + locale prefix.
95
+ * Mirrors Next.js's internal formatPathname().
96
+ */
97
+ private _formatPathname;
98
+ get href(): string;
99
+ set href(value: string);
100
+ get origin(): string;
101
+ get protocol(): string;
102
+ set protocol(value: string);
103
+ get username(): string;
104
+ set username(value: string);
105
+ get password(): string;
106
+ set password(value: string);
107
+ get host(): string;
108
+ set host(value: string);
109
+ get hostname(): string;
110
+ set hostname(value: string);
111
+ get port(): string;
112
+ set port(value: string);
113
+ /** Returns the pathname WITHOUT basePath or locale prefix. */
114
+ get pathname(): string;
115
+ set pathname(value: string);
116
+ get search(): string;
117
+ set search(value: string);
118
+ get searchParams(): URLSearchParams;
119
+ get hash(): string;
120
+ set hash(value: string);
121
+ get basePath(): string;
122
+ set basePath(value: string);
123
+ get locale(): string;
124
+ set locale(value: string | undefined);
125
+ get defaultLocale(): string | undefined;
126
+ get locales(): string[] | undefined;
127
+ clone(): NextURL;
128
+ toString(): string;
129
+ /**
130
+ * The build ID of the Next.js application.
131
+ * Set from `generateBuildId` in next.config.js, or a random UUID if not configured.
132
+ * Can be used in middleware to detect deployment skew between client and server.
133
+ * Matches the Next.js API: `request.nextUrl.buildId`.
134
+ */
135
+ get buildId(): string | undefined;
97
136
  }
98
137
  interface CookieEntry {
99
- name: string;
100
- value: string;
138
+ name: string;
139
+ value: string;
101
140
  }
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]>;
141
+ declare class RequestCookies {
142
+ private _headers;
143
+ private _parsed;
144
+ constructor(headers: Headers);
145
+ get(name: string): CookieEntry | undefined;
146
+ getAll(nameOrOptions?: string | CookieEntry): CookieEntry[];
147
+ has(name: string): boolean;
148
+ set(nameOrOptions: string | CookieEntry, value?: string): this;
149
+ delete(names: string | string[]): boolean | boolean[];
150
+ clear(): this;
151
+ get size(): number;
152
+ toString(): string;
153
+ private _serialize;
154
+ private _syncHeader;
155
+ [Symbol.iterator](): IterableIterator<[string, CookieEntry]>;
117
156
  }
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]>;
157
+ declare class ResponseCookies {
158
+ private _headers;
159
+ constructor(headers: Headers);
160
+ set(name: string, value: string, options?: CookieOptions): this;
161
+ get(name: string): CookieEntry | undefined;
162
+ has(name: string): boolean;
163
+ getAll(): CookieEntry[];
164
+ delete(name: string): this;
165
+ [Symbol.iterator](): IterableIterator<[string, CookieEntry]>;
126
166
  }
127
167
  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";
168
+ path?: string;
169
+ domain?: string;
170
+ maxAge?: number;
171
+ expires?: Date;
172
+ httpOnly?: boolean;
173
+ secure?: boolean;
174
+ sameSite?: "Strict" | "Lax" | "None";
135
175
  }
136
- export interface MiddlewareResponseInit extends ResponseInit {
137
- request?: {
138
- headers?: Headers;
139
- };
176
+ interface MiddlewareResponseInit extends ResponseInit {
177
+ request?: {
178
+ headers?: Headers;
179
+ };
140
180
  }
141
- export type NextMiddlewareResult = NextResponse | Response | null | undefined | void;
142
- export type NextMiddleware = (request: NextRequest, event: NextFetchEvent) => NextMiddlewareResult | Promise<NextMiddlewareResult>;
181
+ type NextMiddlewareResult = NextResponse | Response | null | undefined | void;
182
+ type NextMiddleware = (request: NextRequest, event: NextFetchEvent) => NextMiddlewareResult | Promise<NextMiddlewareResult>;
143
183
  /**
144
184
  * Minimal NextFetchEvent — extends FetchEvent where available,
145
185
  * otherwise provides the waitUntil pattern standalone.
146
186
  */
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>[]>;
187
+ declare class NextFetchEvent {
188
+ sourcePage: string;
189
+ private _waitUntilPromises;
190
+ constructor(params: {
191
+ page: string;
192
+ });
193
+ waitUntil(promise: Promise<unknown>): void;
194
+ /** Drain all waitUntil promises. Returns a single promise that settles when all are done. */
195
+ drainWaitUntil(): Promise<PromiseSettledResult<unknown>[]>;
156
196
  }
157
197
  /**
158
198
  * Parse user agent string. Minimal implementation — for full UA parsing,
159
199
  * apps should use a dedicated library like `ua-parser-js`.
160
200
  */
161
- export declare function userAgentFromString(ua: string | undefined): UserAgent;
162
- export declare function userAgent({ headers }: {
163
- headers: Headers;
201
+ declare function userAgentFromString(ua: string | undefined): UserAgent;
202
+ declare function userAgent({
203
+ headers
204
+ }: {
205
+ headers: Headers;
164
206
  }): 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
- };
207
+ interface UserAgent {
208
+ isBot: boolean;
209
+ ua: string;
210
+ browser: {
211
+ name?: string;
212
+ version?: string;
213
+ major?: string;
214
+ };
215
+ device: {
216
+ model?: string;
217
+ type?: string;
218
+ vendor?: string;
219
+ };
220
+ engine: {
221
+ name?: string;
222
+ version?: string;
223
+ };
224
+ os: {
225
+ name?: string;
226
+ version?: string;
227
+ };
228
+ cpu: {
229
+ architecture?: string;
230
+ };
189
231
  }
190
232
  /**
191
233
  * 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).
234
+ *
235
+ * Uses the platform's `waitUntil` (via the per-request ExecutionContext) when
236
+ * available so the task survives past the response on Cloudflare Workers.
237
+ * Falls back to a fire-and-forget microtask on runtimes without an execution
238
+ * context (e.g. Node.js dev server).
239
+ *
240
+ * Throws when called inside a cached scope — request-specific
241
+ * side-effects must not leak into cached results.
194
242
  */
195
- export declare function after<T>(task: Promise<T> | (() => T | Promise<T>)): void;
243
+ declare function after<T>(task: Promise<T> | (() => T | Promise<T>)): void;
196
244
  /**
197
245
  * connection() — signals that the response requires a live connection
198
246
  * (not a static/cached response). Opts the page out of ISR caching
199
247
  * and sets Cache-Control: no-store on the response.
200
248
  */
201
- export declare function connection(): Promise<void>;
249
+ declare function connection(): Promise<void>;
202
250
  /**
203
251
  * URLPattern re-export — used in middleware for route matching.
204
252
  * Available natively in Node 20+, Cloudflare Workers, Deno.
205
253
  * Falls back to urlpattern-polyfill if the global is not available.
206
254
  */
207
- export declare const URLPattern: typeof globalThis.URLPattern;
208
- export {};
255
+ declare const URLPattern: typeof globalThis.URLPattern;
256
+ //#endregion
257
+ export { MiddlewareResponseInit, NextFetchEvent, NextMiddleware, NextMiddlewareResult, NextRequest, NextResponse, NextURL, NextURLConfig, RequestCookies, ResponseCookies, URLPattern, UserAgent, after, connection, userAgent, userAgentFromString };
209
258
  //# sourceMappingURL=server.d.ts.map