vinext 0.0.29 → 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 (428) 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 -567
  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 -366
  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 +618 -343
  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 +229 -207
  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 -3125
  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 +563 -659
  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 -13
  112. package/dist/server/dev-server.js +547 -874
  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 +183 -200
  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 +109 -126
  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 +277 -286
  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 +98 -65
  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 +276 -363
  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 +58 -0
  142. package/dist/server/pages-i18n.js +125 -0
  143. package/dist/server/pages-i18n.js.map +1 -0
  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 +21 -43
  162. package/dist/shims/cache-runtime.js +271 -405
  163. package/dist/shims/cache-runtime.js.map +1 -1
  164. package/dist/shims/cache.d.ts +131 -119
  165. package/dist/shims/cache.js +339 -418
  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 -165
  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 +26 -10
  191. package/dist/shims/fetch-cache.js +443 -586
  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 +9 -10
  208. package/dist/shims/head-state.js +25 -39
  209. package/dist/shims/head-state.js.map +1 -1
  210. package/dist/shims/head.d.ts +16 -18
  211. package/dist/shims/head.js +185 -153
  212. package/dist/shims/head.js.map +1 -1
  213. package/dist/shims/headers.d.ts +84 -71
  214. package/dist/shims/headers.js +447 -583
  215. package/dist/shims/headers.js.map +1 -1
  216. package/dist/shims/i18n-context.d.ts +23 -0
  217. package/dist/shims/i18n-context.js +44 -0
  218. package/dist/shims/i18n-context.js.map +1 -0
  219. package/dist/shims/i18n-state.d.ts +14 -0
  220. package/dist/shims/i18n-state.js +45 -0
  221. package/dist/shims/i18n-state.js.map +1 -0
  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 -44
  226. package/dist/shims/image.js +284 -301
  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 -36
  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 +262 -382
  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 -544
  258. package/dist/shims/metadata.js.map +1 -1
  259. package/dist/shims/navigation-state.d.ts +19 -13
  260. package/dist/shims/navigation-state.js +68 -58
  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 +508 -690
  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 -51
  272. package/dist/shims/request-context.js.map +1 -1
  273. package/dist/shims/request-state-types.d.ts +11 -0
  274. package/dist/shims/request-state-types.js +1 -0
  275. package/dist/shims/router-state.d.ts +15 -1
  276. package/dist/shims/router-state.js +34 -41
  277. package/dist/shims/router-state.js.map +1 -1
  278. package/dist/shims/router.d.ts +81 -81
  279. package/dist/shims/router.js +517 -543
  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 -157
  287. package/dist/shims/server.js +462 -432
  288. package/dist/shims/server.js.map +1 -1
  289. package/dist/shims/unified-request-context.d.ts +66 -0
  290. package/dist/shims/unified-request-context.js +98 -0
  291. package/dist/shims/unified-request-context.js.map +1 -0
  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 +26 -0
  305. package/dist/utils/domain-locale.js +44 -0
  306. package/dist/utils/domain-locale.js.map +1 -0
  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 +11 -10
  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/prod-server.d.ts.map +0 -1
  367. package/dist/server/request-log.d.ts.map +0 -1
  368. package/dist/server/request-pipeline.d.ts.map +0 -1
  369. package/dist/server/worker-utils.d.ts.map +0 -1
  370. package/dist/shims/amp.d.ts.map +0 -1
  371. package/dist/shims/app.d.ts.map +0 -1
  372. package/dist/shims/app.js.map +0 -1
  373. package/dist/shims/cache-runtime.d.ts.map +0 -1
  374. package/dist/shims/cache.d.ts.map +0 -1
  375. package/dist/shims/client-only.d.ts.map +0 -1
  376. package/dist/shims/client-only.js.map +0 -1
  377. package/dist/shims/compat-router.d.ts.map +0 -1
  378. package/dist/shims/config.d.ts.map +0 -1
  379. package/dist/shims/constants.d.ts.map +0 -1
  380. package/dist/shims/document.d.ts.map +0 -1
  381. package/dist/shims/dynamic.d.ts.map +0 -1
  382. package/dist/shims/error-boundary.d.ts.map +0 -1
  383. package/dist/shims/error.d.ts.map +0 -1
  384. package/dist/shims/fetch-cache.d.ts.map +0 -1
  385. package/dist/shims/font-google-base.d.ts.map +0 -1
  386. package/dist/shims/font-google.d.ts.map +0 -1
  387. package/dist/shims/font-google.generated.d.ts.map +0 -1
  388. package/dist/shims/font-google.js.map +0 -1
  389. package/dist/shims/font-local.d.ts.map +0 -1
  390. package/dist/shims/form.d.ts.map +0 -1
  391. package/dist/shims/head-state.d.ts.map +0 -1
  392. package/dist/shims/head.d.ts.map +0 -1
  393. package/dist/shims/headers.d.ts.map +0 -1
  394. package/dist/shims/image-config.d.ts.map +0 -1
  395. package/dist/shims/image.d.ts.map +0 -1
  396. package/dist/shims/internal/api-utils.d.ts.map +0 -1
  397. package/dist/shims/internal/api-utils.js.map +0 -1
  398. package/dist/shims/internal/app-router-context.d.ts.map +0 -1
  399. package/dist/shims/internal/cookies.d.ts.map +0 -1
  400. package/dist/shims/internal/cookies.js.map +0 -1
  401. package/dist/shims/internal/parse-cookie-header.d.ts.map +0 -1
  402. package/dist/shims/internal/router-context.d.ts.map +0 -1
  403. package/dist/shims/internal/utils.d.ts.map +0 -1
  404. package/dist/shims/internal/work-unit-async-storage.d.ts.map +0 -1
  405. package/dist/shims/layout-segment-context.d.ts.map +0 -1
  406. package/dist/shims/legacy-image.d.ts.map +0 -1
  407. package/dist/shims/link.d.ts.map +0 -1
  408. package/dist/shims/metadata.d.ts.map +0 -1
  409. package/dist/shims/navigation-state.d.ts.map +0 -1
  410. package/dist/shims/navigation.d.ts.map +0 -1
  411. package/dist/shims/og.d.ts.map +0 -1
  412. package/dist/shims/og.js.map +0 -1
  413. package/dist/shims/readonly-url-search-params.d.ts.map +0 -1
  414. package/dist/shims/request-context.d.ts.map +0 -1
  415. package/dist/shims/router-state.d.ts.map +0 -1
  416. package/dist/shims/router.d.ts.map +0 -1
  417. package/dist/shims/script.d.ts.map +0 -1
  418. package/dist/shims/server-only.d.ts.map +0 -1
  419. package/dist/shims/server-only.js.map +0 -1
  420. package/dist/shims/server.d.ts.map +0 -1
  421. package/dist/shims/url-safety.d.ts.map +0 -1
  422. package/dist/shims/url-utils.d.ts.map +0 -1
  423. package/dist/shims/web-vitals.d.ts.map +0 -1
  424. package/dist/utils/base-path.d.ts.map +0 -1
  425. package/dist/utils/hash.d.ts.map +0 -1
  426. package/dist/utils/manifest-paths.d.ts.map +0 -1
  427. package/dist/utils/project.d.ts.map +0 -1
  428. package/dist/utils/query.d.ts.map +0 -1
@@ -1,3 +1,4 @@
1
+ //#region src/shims/web-vitals.d.ts
1
2
  /**
2
3
  * next/web-vitals shim
3
4
  *
@@ -6,12 +7,12 @@
6
7
  * Apps can use the web-vitals library directly instead.
7
8
  */
8
9
  interface WebVitalsMetric {
9
- id: string;
10
- name: string;
11
- value: number;
12
- rating?: "good" | "needs-improvement" | "poor";
13
- delta: number;
14
- navigationType?: "navigate" | "reload" | "back-forward" | "prerender";
10
+ id: string;
11
+ name: string;
12
+ value: number;
13
+ rating?: "good" | "needs-improvement" | "poor";
14
+ delta: number;
15
+ navigationType?: "navigate" | "reload" | "back-forward" | "prerender";
15
16
  }
16
17
  type ReportWebVitalsCallback = (metric: WebVitalsMetric) => void;
17
18
  /**
@@ -19,6 +20,7 @@ type ReportWebVitalsCallback = (metric: WebVitalsMetric) => void;
19
20
  * No-op in our implementation — use the `web-vitals` library directly
20
21
  * for production metrics collection.
21
22
  */
22
- export declare function useReportWebVitals(_callback: ReportWebVitalsCallback): void;
23
- export type { WebVitalsMetric, ReportWebVitalsCallback };
23
+ declare function useReportWebVitals(_callback: ReportWebVitalsCallback): void;
24
+ //#endregion
25
+ export { type ReportWebVitalsCallback, type WebVitalsMetric, useReportWebVitals };
24
26
  //# sourceMappingURL=web-vitals.d.ts.map
@@ -1,17 +1,11 @@
1
+ //#region src/shims/web-vitals.ts
1
2
  /**
2
- * next/web-vitals shim
3
- *
4
- * Provides useReportWebVitals() a no-op hook for compatibility.
5
- * In real Next.js, this sends Core Web Vitals to an analytics endpoint.
6
- * Apps can use the web-vitals library directly instead.
7
- */
8
- /**
9
- * Register a callback to receive Core Web Vitals metrics.
10
- * No-op in our implementation — use the `web-vitals` library directly
11
- * for production metrics collection.
12
- */
13
- export function useReportWebVitals(_callback) {
14
- // No-op — apps should use the web-vitals library directly
15
- // or their own analytics integration.
16
- }
3
+ * Register a callback to receive Core Web Vitals metrics.
4
+ * No-op in our implementation — use the `web-vitals` library directly
5
+ * for production metrics collection.
6
+ */
7
+ function useReportWebVitals(_callback) {}
8
+ //#endregion
9
+ export { useReportWebVitals };
10
+
17
11
  //# sourceMappingURL=web-vitals.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"web-vitals.js","sourceRoot":"","sources":["../../src/shims/web-vitals.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAaH;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,CAAC,SAAkC;IACnE,0DAA0D;IAC1D,sCAAsC;AACxC,CAAC","sourcesContent":["/**\n * next/web-vitals shim\n *\n * Provides useReportWebVitals() — a no-op hook for compatibility.\n * In real Next.js, this sends Core Web Vitals to an analytics endpoint.\n * Apps can use the web-vitals library directly instead.\n */\n\ninterface WebVitalsMetric {\n id: string;\n name: string;\n value: number;\n rating?: \"good\" | \"needs-improvement\" | \"poor\";\n delta: number;\n navigationType?: \"navigate\" | \"reload\" | \"back-forward\" | \"prerender\";\n}\n\ntype ReportWebVitalsCallback = (metric: WebVitalsMetric) => void;\n\n/**\n * Register a callback to receive Core Web Vitals metrics.\n * No-op in our implementation — use the `web-vitals` library directly\n * for production metrics collection.\n */\nexport function useReportWebVitals(_callback: ReportWebVitalsCallback): void {\n // No-op — apps should use the web-vitals library directly\n // or their own analytics integration.\n}\n\nexport type { WebVitalsMetric, ReportWebVitalsCallback };\n"]}
1
+ {"version":3,"file":"web-vitals.js","names":[],"sources":["../../src/shims/web-vitals.ts"],"sourcesContent":["/**\n * next/web-vitals shim\n *\n * Provides useReportWebVitals() — a no-op hook for compatibility.\n * In real Next.js, this sends Core Web Vitals to an analytics endpoint.\n * Apps can use the web-vitals library directly instead.\n */\n\ninterface WebVitalsMetric {\n id: string;\n name: string;\n value: number;\n rating?: \"good\" | \"needs-improvement\" | \"poor\";\n delta: number;\n navigationType?: \"navigate\" | \"reload\" | \"back-forward\" | \"prerender\";\n}\n\ntype ReportWebVitalsCallback = (metric: WebVitalsMetric) => void;\n\n/**\n * Register a callback to receive Core Web Vitals metrics.\n * No-op in our implementation — use the `web-vitals` library directly\n * for production metrics collection.\n */\nexport function useReportWebVitals(_callback: ReportWebVitalsCallback): void {\n // No-op — apps should use the web-vitals library directly\n // or their own analytics integration.\n}\n\nexport type { WebVitalsMetric, ReportWebVitalsCallback };\n"],"mappings":";;;;;;AAwBA,SAAgB,mBAAmB,WAA0C"}
@@ -1,3 +1,4 @@
1
+ //#region src/utils/base-path.d.ts
1
2
  /**
2
3
  * Shared basePath helpers.
3
4
  *
@@ -8,10 +9,12 @@
8
9
  /**
9
10
  * Check whether a pathname is inside the configured basePath.
10
11
  */
11
- export declare function hasBasePath(pathname: string, basePath: string): boolean;
12
+ declare function hasBasePath(pathname: string, basePath: string): boolean;
12
13
  /**
13
14
  * Strip the basePath prefix from a pathname when it matches on a segment
14
15
  * boundary. Returns the original pathname when it is outside the basePath.
15
16
  */
16
- export declare function stripBasePath(pathname: string, basePath: string): string;
17
+ declare function stripBasePath(pathname: string, basePath: string): string;
18
+ //#endregion
19
+ export { hasBasePath, stripBasePath };
17
20
  //# sourceMappingURL=base-path.d.ts.map
@@ -1,25 +1,27 @@
1
+ //#region src/utils/base-path.ts
1
2
  /**
2
- * Shared basePath helpers.
3
- *
4
- * Next.js only treats a pathname as being under basePath when it is an exact
5
- * match ("/app") or starts with the basePath followed by a path separator
6
- * ("/app/..."). Prefix-only matches like "/application" must be left intact.
7
- */
3
+ * Shared basePath helpers.
4
+ *
5
+ * Next.js only treats a pathname as being under basePath when it is an exact
6
+ * match ("/app") or starts with the basePath followed by a path separator
7
+ * ("/app/..."). Prefix-only matches like "/application" must be left intact.
8
+ */
8
9
  /**
9
- * Check whether a pathname is inside the configured basePath.
10
- */
11
- export function hasBasePath(pathname, basePath) {
12
- if (!basePath)
13
- return false;
14
- return pathname === basePath || pathname.startsWith(basePath + "/");
10
+ * Check whether a pathname is inside the configured basePath.
11
+ */
12
+ function hasBasePath(pathname, basePath) {
13
+ if (!basePath) return false;
14
+ return pathname === basePath || pathname.startsWith(basePath + "/");
15
15
  }
16
16
  /**
17
- * Strip the basePath prefix from a pathname when it matches on a segment
18
- * boundary. Returns the original pathname when it is outside the basePath.
19
- */
20
- export function stripBasePath(pathname, basePath) {
21
- if (!hasBasePath(pathname, basePath))
22
- return pathname;
23
- return pathname.slice(basePath.length) || "/";
17
+ * Strip the basePath prefix from a pathname when it matches on a segment
18
+ * boundary. Returns the original pathname when it is outside the basePath.
19
+ */
20
+ function stripBasePath(pathname, basePath) {
21
+ if (!hasBasePath(pathname, basePath)) return pathname;
22
+ return pathname.slice(basePath.length) || "/";
24
23
  }
24
+ //#endregion
25
+ export { hasBasePath, stripBasePath };
26
+
25
27
  //# sourceMappingURL=base-path.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"base-path.js","sourceRoot":"","sources":["../../src/utils/base-path.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;GAEG;AACH,MAAM,UAAU,WAAW,CAAC,QAAgB,EAAE,QAAgB;IAC5D,IAAI,CAAC,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC5B,OAAO,QAAQ,KAAK,QAAQ,IAAI,QAAQ,CAAC,UAAU,CAAC,QAAQ,GAAG,GAAG,CAAC,CAAC;AACtE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,QAAgB,EAAE,QAAgB;IAC9D,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,QAAQ,CAAC;QAAE,OAAO,QAAQ,CAAC;IACtD,OAAO,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,GAAG,CAAC;AAChD,CAAC","sourcesContent":["/**\n * Shared basePath helpers.\n *\n * Next.js only treats a pathname as being under basePath when it is an exact\n * match (\"/app\") or starts with the basePath followed by a path separator\n * (\"/app/...\"). Prefix-only matches like \"/application\" must be left intact.\n */\n\n/**\n * Check whether a pathname is inside the configured basePath.\n */\nexport function hasBasePath(pathname: string, basePath: string): boolean {\n if (!basePath) return false;\n return pathname === basePath || pathname.startsWith(basePath + \"/\");\n}\n\n/**\n * Strip the basePath prefix from a pathname when it matches on a segment\n * boundary. Returns the original pathname when it is outside the basePath.\n */\nexport function stripBasePath(pathname: string, basePath: string): string {\n if (!hasBasePath(pathname, basePath)) return pathname;\n return pathname.slice(basePath.length) || \"/\";\n}\n"]}
1
+ {"version":3,"file":"base-path.js","names":[],"sources":["../../src/utils/base-path.ts"],"sourcesContent":["/**\n * Shared basePath helpers.\n *\n * Next.js only treats a pathname as being under basePath when it is an exact\n * match (\"/app\") or starts with the basePath followed by a path separator\n * (\"/app/...\"). Prefix-only matches like \"/application\" must be left intact.\n */\n\n/**\n * Check whether a pathname is inside the configured basePath.\n */\nexport function hasBasePath(pathname: string, basePath: string): boolean {\n if (!basePath) return false;\n return pathname === basePath || pathname.startsWith(basePath + \"/\");\n}\n\n/**\n * Strip the basePath prefix from a pathname when it matches on a segment\n * boundary. Returns the original pathname when it is outside the basePath.\n */\nexport function stripBasePath(pathname: string, basePath: string): string {\n if (!hasBasePath(pathname, basePath)) return pathname;\n return pathname.slice(basePath.length) || \"/\";\n}\n"],"mappings":";;;;;;;;;;;AAWA,SAAgB,YAAY,UAAkB,UAA2B;AACvE,KAAI,CAAC,SAAU,QAAO;AACtB,QAAO,aAAa,YAAY,SAAS,WAAW,WAAW,IAAI;;;;;;AAOrE,SAAgB,cAAc,UAAkB,UAA0B;AACxE,KAAI,CAAC,YAAY,UAAU,SAAS,CAAE,QAAO;AAC7C,QAAO,SAAS,MAAM,SAAS,OAAO,IAAI"}
@@ -0,0 +1,26 @@
1
+ import { NextI18nConfig } from "../config/next-config.js";
2
+
3
+ //#region src/utils/domain-locale.d.ts
4
+ type DomainLocale = NonNullable<NextI18nConfig["domains"]>[number];
5
+ declare function normalizeDomainHostname(hostname: string | null | undefined): string | undefined;
6
+ /**
7
+ * Match a configured domain either by hostname or locale.
8
+ * When both are provided, the checks intentionally use OR semantics so the
9
+ * same helper can cover Next.js's hostname lookup and preferred-locale lookup.
10
+ * If both are passed, the first domain matching either input wins, so callers
11
+ * should pass hostname or detectedLocale, not both.
12
+ */
13
+ declare function detectDomainLocale(domainItems?: readonly DomainLocale[], hostname?: string, detectedLocale?: string): DomainLocale | undefined;
14
+ declare function addLocalePrefix(path: string, locale: string, localeDefault: string): string;
15
+ declare function getDomainLocaleUrl(url: string, locale: string, {
16
+ basePath,
17
+ currentHostname,
18
+ domainItems
19
+ }: {
20
+ basePath?: string;
21
+ currentHostname?: string | null;
22
+ domainItems?: readonly DomainLocale[];
23
+ }): string | undefined;
24
+ //#endregion
25
+ export { DomainLocale, addLocalePrefix, detectDomainLocale, getDomainLocaleUrl, normalizeDomainHostname };
26
+ //# sourceMappingURL=domain-locale.d.ts.map
@@ -0,0 +1,44 @@
1
+ //#region src/utils/domain-locale.ts
2
+ function normalizeDomainHostname(hostname) {
3
+ if (!hostname) return void 0;
4
+ return hostname.split(",", 1)[0]?.trim().split(":", 1)[0]?.toLowerCase() || void 0;
5
+ }
6
+ /**
7
+ * Match a configured domain either by hostname or locale.
8
+ * When both are provided, the checks intentionally use OR semantics so the
9
+ * same helper can cover Next.js's hostname lookup and preferred-locale lookup.
10
+ * If both are passed, the first domain matching either input wins, so callers
11
+ * should pass hostname or detectedLocale, not both.
12
+ */
13
+ function detectDomainLocale(domainItems, hostname, detectedLocale) {
14
+ if (!domainItems?.length) return void 0;
15
+ const normalizedHostname = normalizeDomainHostname(hostname);
16
+ const normalizedLocale = detectedLocale?.toLowerCase();
17
+ for (const item of domainItems) if (normalizedHostname === normalizeDomainHostname(item.domain) || normalizedLocale === item.defaultLocale.toLowerCase() || item.locales?.some((locale) => locale.toLowerCase() === normalizedLocale)) return item;
18
+ }
19
+ function addLocalePrefix(path, locale, localeDefault) {
20
+ const normalizedLocale = locale.toLowerCase();
21
+ if (normalizedLocale === localeDefault.toLowerCase()) return path;
22
+ const pathWithLeadingSlash = path.startsWith("/") ? path : `/${path}`;
23
+ const normalizedPathname = (pathWithLeadingSlash.split(/[?#]/, 1)[0] ?? pathWithLeadingSlash).toLowerCase();
24
+ const localePrefix = `/${normalizedLocale}`;
25
+ if (normalizedPathname === localePrefix || normalizedPathname.startsWith(`${localePrefix}/`)) return path.startsWith("/") ? path : pathWithLeadingSlash;
26
+ return `/${locale}${pathWithLeadingSlash}`;
27
+ }
28
+ function withBasePath(path, basePath = "") {
29
+ if (!basePath) return path;
30
+ return basePath + path;
31
+ }
32
+ function getDomainLocaleUrl(url, locale, { basePath, currentHostname, domainItems }) {
33
+ if (!domainItems?.length) return void 0;
34
+ const targetDomain = detectDomainLocale(domainItems, void 0, locale);
35
+ if (!targetDomain) return void 0;
36
+ const currentDomain = detectDomainLocale(domainItems, currentHostname ?? void 0);
37
+ const localizedPath = addLocalePrefix(url, locale, targetDomain.defaultLocale);
38
+ if (currentDomain && normalizeDomainHostname(currentDomain.domain) === normalizeDomainHostname(targetDomain.domain)) return;
39
+ return `${`http${targetDomain.http ? "" : "s"}://`}${targetDomain.domain}${withBasePath(localizedPath, basePath)}`;
40
+ }
41
+ //#endregion
42
+ export { addLocalePrefix, detectDomainLocale, getDomainLocaleUrl, normalizeDomainHostname };
43
+
44
+ //# sourceMappingURL=domain-locale.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"domain-locale.js","names":[],"sources":["../../src/utils/domain-locale.ts"],"sourcesContent":["import type { NextI18nConfig } from \"../config/next-config.js\";\n\nexport type DomainLocale = NonNullable<NextI18nConfig[\"domains\"]>[number];\n\nexport function normalizeDomainHostname(hostname: string | null | undefined): string | undefined {\n if (!hostname) return undefined;\n return hostname.split(\",\", 1)[0]?.trim().split(\":\", 1)[0]?.toLowerCase() || undefined;\n}\n\n/**\n * Match a configured domain either by hostname or locale.\n * When both are provided, the checks intentionally use OR semantics so the\n * same helper can cover Next.js's hostname lookup and preferred-locale lookup.\n * If both are passed, the first domain matching either input wins, so callers\n * should pass hostname or detectedLocale, not both.\n */\nexport function detectDomainLocale(\n domainItems?: readonly DomainLocale[],\n hostname?: string,\n detectedLocale?: string,\n): DomainLocale | undefined {\n if (!domainItems?.length) return undefined;\n\n const normalizedHostname = normalizeDomainHostname(hostname);\n const normalizedLocale = detectedLocale?.toLowerCase();\n\n for (const item of domainItems) {\n const domainHostname = normalizeDomainHostname(item.domain);\n if (\n normalizedHostname === domainHostname ||\n normalizedLocale === item.defaultLocale.toLowerCase() ||\n item.locales?.some((locale) => locale.toLowerCase() === normalizedLocale)\n ) {\n return item;\n }\n }\n\n return undefined;\n}\n\nexport function addLocalePrefix(path: string, locale: string, localeDefault: string): string {\n const normalizedLocale = locale.toLowerCase();\n if (normalizedLocale === localeDefault.toLowerCase()) return path;\n\n const pathWithLeadingSlash = path.startsWith(\"/\") ? path : `/${path}`;\n const pathname = pathWithLeadingSlash.split(/[?#]/, 1)[0] ?? pathWithLeadingSlash;\n const normalizedPathname = pathname.toLowerCase();\n const localePrefix = `/${normalizedLocale}`;\n\n if (normalizedPathname === localePrefix || normalizedPathname.startsWith(`${localePrefix}/`)) {\n return path.startsWith(\"/\") ? path : pathWithLeadingSlash;\n }\n\n return `/${locale}${pathWithLeadingSlash}`;\n}\n\nfunction withBasePath(path: string, basePath = \"\"): string {\n if (!basePath) return path;\n return basePath + path;\n}\n\nexport function getDomainLocaleUrl(\n url: string,\n locale: string,\n {\n basePath,\n currentHostname,\n domainItems,\n }: {\n basePath?: string;\n currentHostname?: string | null;\n domainItems?: readonly DomainLocale[];\n },\n): string | undefined {\n if (!domainItems?.length) return undefined;\n\n const targetDomain = detectDomainLocale(domainItems, undefined, locale);\n if (!targetDomain) return undefined;\n\n const currentDomain = detectDomainLocale(domainItems, currentHostname ?? undefined);\n const localizedPath = addLocalePrefix(url, locale, targetDomain.defaultLocale);\n\n if (\n currentDomain &&\n normalizeDomainHostname(currentDomain.domain) === normalizeDomainHostname(targetDomain.domain)\n ) {\n // Same-domain switches fall back to the caller's standard locale-prefix\n // logic. This relies on __VINEXT_DEFAULT_LOCALE__ matching the current\n // domain's defaultLocale, which the server entry keeps in sync.\n return undefined;\n }\n\n const scheme = `http${targetDomain.http ? \"\" : \"s\"}://`;\n return `${scheme}${targetDomain.domain}${withBasePath(localizedPath, basePath)}`;\n}\n"],"mappings":";AAIA,SAAgB,wBAAwB,UAAyD;AAC/F,KAAI,CAAC,SAAU,QAAO,KAAA;AACtB,QAAO,SAAS,MAAM,KAAK,EAAE,CAAC,IAAI,MAAM,CAAC,MAAM,KAAK,EAAE,CAAC,IAAI,aAAa,IAAI,KAAA;;;;;;;;;AAU9E,SAAgB,mBACd,aACA,UACA,gBAC0B;AAC1B,KAAI,CAAC,aAAa,OAAQ,QAAO,KAAA;CAEjC,MAAM,qBAAqB,wBAAwB,SAAS;CAC5D,MAAM,mBAAmB,gBAAgB,aAAa;AAEtD,MAAK,MAAM,QAAQ,YAEjB,KACE,uBAFqB,wBAAwB,KAAK,OAAO,IAGzD,qBAAqB,KAAK,cAAc,aAAa,IACrD,KAAK,SAAS,MAAM,WAAW,OAAO,aAAa,KAAK,iBAAiB,CAEzE,QAAO;;AAOb,SAAgB,gBAAgB,MAAc,QAAgB,eAA+B;CAC3F,MAAM,mBAAmB,OAAO,aAAa;AAC7C,KAAI,qBAAqB,cAAc,aAAa,CAAE,QAAO;CAE7D,MAAM,uBAAuB,KAAK,WAAW,IAAI,GAAG,OAAO,IAAI;CAE/D,MAAM,sBADW,qBAAqB,MAAM,QAAQ,EAAE,CAAC,MAAM,sBACzB,aAAa;CACjD,MAAM,eAAe,IAAI;AAEzB,KAAI,uBAAuB,gBAAgB,mBAAmB,WAAW,GAAG,aAAa,GAAG,CAC1F,QAAO,KAAK,WAAW,IAAI,GAAG,OAAO;AAGvC,QAAO,IAAI,SAAS;;AAGtB,SAAS,aAAa,MAAc,WAAW,IAAY;AACzD,KAAI,CAAC,SAAU,QAAO;AACtB,QAAO,WAAW;;AAGpB,SAAgB,mBACd,KACA,QACA,EACE,UACA,iBACA,eAMkB;AACpB,KAAI,CAAC,aAAa,OAAQ,QAAO,KAAA;CAEjC,MAAM,eAAe,mBAAmB,aAAa,KAAA,GAAW,OAAO;AACvE,KAAI,CAAC,aAAc,QAAO,KAAA;CAE1B,MAAM,gBAAgB,mBAAmB,aAAa,mBAAmB,KAAA,EAAU;CACnF,MAAM,gBAAgB,gBAAgB,KAAK,QAAQ,aAAa,cAAc;AAE9E,KACE,iBACA,wBAAwB,cAAc,OAAO,KAAK,wBAAwB,aAAa,OAAO,CAK9F;AAIF,QAAO,GADQ,OAAO,aAAa,OAAO,KAAK,IAAI,OAChC,aAAa,SAAS,aAAa,eAAe,SAAS"}
@@ -1,6 +1,9 @@
1
+ //#region src/utils/hash.d.ts
1
2
  /**
2
3
  * FNV-1a hash producing a 64-bit result (two 32-bit rounds with different seeds).
3
4
  * Used for deterministic key generation where collisions must be rare.
4
5
  */
5
- export declare function fnv1a64(input: string): string;
6
+ declare function fnv1a64(input: string): string;
7
+ //#endregion
8
+ export { fnv1a64 };
6
9
  //# sourceMappingURL=hash.d.ts.map
@@ -1,20 +1,22 @@
1
+ //#region src/utils/hash.ts
1
2
  /**
2
- * FNV-1a hash producing a 64-bit result (two 32-bit rounds with different seeds).
3
- * Used for deterministic key generation where collisions must be rare.
4
- */
5
- export function fnv1a64(input) {
6
- // First 32-bit round with standard FNV offset basis
7
- let h1 = 0x811c9dc5;
8
- for (let i = 0; i < input.length; i++) {
9
- h1 ^= input.charCodeAt(i);
10
- h1 = (h1 * 0x01000193) >>> 0;
11
- }
12
- // Second 32-bit round with different seed
13
- let h2 = 0x050c5d1f;
14
- for (let i = 0; i < input.length; i++) {
15
- h2 ^= input.charCodeAt(i);
16
- h2 = (h2 * 0x01000193) >>> 0;
17
- }
18
- return h1.toString(36) + h2.toString(36);
3
+ * FNV-1a hash producing a 64-bit result (two 32-bit rounds with different seeds).
4
+ * Used for deterministic key generation where collisions must be rare.
5
+ */
6
+ function fnv1a64(input) {
7
+ let h1 = 2166136261;
8
+ for (let i = 0; i < input.length; i++) {
9
+ h1 ^= input.charCodeAt(i);
10
+ h1 = h1 * 16777619 >>> 0;
11
+ }
12
+ let h2 = 84696351;
13
+ for (let i = 0; i < input.length; i++) {
14
+ h2 ^= input.charCodeAt(i);
15
+ h2 = h2 * 16777619 >>> 0;
16
+ }
17
+ return h1.toString(36) + h2.toString(36);
19
18
  }
19
+ //#endregion
20
+ export { fnv1a64 };
21
+
20
22
  //# sourceMappingURL=hash.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"hash.js","sourceRoot":"","sources":["../../src/utils/hash.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,UAAU,OAAO,CAAC,KAAa;IACnC,oDAAoD;IACpD,IAAI,EAAE,GAAG,UAAU,CAAC;IACpB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACtC,EAAE,IAAI,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QAC1B,EAAE,GAAG,CAAC,EAAE,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC;IACD,0CAA0C;IAC1C,IAAI,EAAE,GAAG,UAAU,CAAC;IACpB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACtC,EAAE,IAAI,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QAC1B,EAAE,GAAG,CAAC,EAAE,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC;IACD,OAAO,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;AAC3C,CAAC","sourcesContent":["/**\n * FNV-1a hash producing a 64-bit result (two 32-bit rounds with different seeds).\n * Used for deterministic key generation where collisions must be rare.\n */\nexport function fnv1a64(input: string): string {\n // First 32-bit round with standard FNV offset basis\n let h1 = 0x811c9dc5;\n for (let i = 0; i < input.length; i++) {\n h1 ^= input.charCodeAt(i);\n h1 = (h1 * 0x01000193) >>> 0;\n }\n // Second 32-bit round with different seed\n let h2 = 0x050c5d1f;\n for (let i = 0; i < input.length; i++) {\n h2 ^= input.charCodeAt(i);\n h2 = (h2 * 0x01000193) >>> 0;\n }\n return h1.toString(36) + h2.toString(36);\n}\n"]}
1
+ {"version":3,"file":"hash.js","names":[],"sources":["../../src/utils/hash.ts"],"sourcesContent":["/**\n * FNV-1a hash producing a 64-bit result (two 32-bit rounds with different seeds).\n * Used for deterministic key generation where collisions must be rare.\n */\nexport function fnv1a64(input: string): string {\n // First 32-bit round with standard FNV offset basis\n let h1 = 0x811c9dc5;\n for (let i = 0; i < input.length; i++) {\n h1 ^= input.charCodeAt(i);\n h1 = (h1 * 0x01000193) >>> 0;\n }\n // Second 32-bit round with different seed\n let h2 = 0x050c5d1f;\n for (let i = 0; i < input.length; i++) {\n h2 ^= input.charCodeAt(i);\n h2 = (h2 * 0x01000193) >>> 0;\n }\n return h1.toString(36) + h2.toString(36);\n}\n"],"mappings":";;;;;AAIA,SAAgB,QAAQ,OAAuB;CAE7C,IAAI,KAAK;AACT,MAAK,IAAI,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK;AACrC,QAAM,MAAM,WAAW,EAAE;AACzB,OAAM,KAAK,aAAgB;;CAG7B,IAAI,KAAK;AACT,MAAK,IAAI,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK;AACrC,QAAM,MAAM,WAAW,EAAE;AACzB,OAAM,KAAK,aAAgB;;AAE7B,QAAO,GAAG,SAAS,GAAG,GAAG,GAAG,SAAS,GAAG"}
@@ -1,4 +1,7 @@
1
- export declare function normalizeManifestFile(file: string): string;
2
- export declare function manifestFileWithBase(file: string, base: string): string;
3
- export declare function manifestFilesWithBase(files: string[], base: string): string[];
1
+ //#region src/utils/manifest-paths.d.ts
2
+ declare function normalizeManifestFile(file: string): string;
3
+ declare function manifestFileWithBase(file: string, base: string): string;
4
+ declare function manifestFilesWithBase(files: string[], base: string): string[];
5
+ //#endregion
6
+ export { manifestFileWithBase, manifestFilesWithBase, normalizeManifestFile };
4
7
  //# sourceMappingURL=manifest-paths.d.ts.map
@@ -1,20 +1,19 @@
1
- export function normalizeManifestFile(file) {
2
- return file.startsWith("/") ? file.slice(1) : file;
1
+ //#region src/utils/manifest-paths.ts
2
+ function normalizeManifestFile(file) {
3
+ return file.startsWith("/") ? file.slice(1) : file;
3
4
  }
4
- export function manifestFileWithBase(file, base) {
5
- const normalizedFile = normalizeManifestFile(file);
6
- if (!base || base === "/")
7
- return normalizedFile;
8
- // Vite's SSR manifest stores base-prefixed paths without a leading slash,
9
- // e.g. "docs/assets/app.js" for base "/docs/".
10
- const normalizedBase = normalizeManifestFile(base).replace(/\/+$/, "");
11
- if (!normalizedBase)
12
- return normalizedFile;
13
- if (normalizedFile.startsWith(normalizedBase + "/"))
14
- return normalizedFile;
15
- return normalizedBase + "/" + normalizedFile;
5
+ function manifestFileWithBase(file, base) {
6
+ const normalizedFile = normalizeManifestFile(file);
7
+ if (!base || base === "/") return normalizedFile;
8
+ const normalizedBase = normalizeManifestFile(base).replace(/\/+$/, "");
9
+ if (!normalizedBase) return normalizedFile;
10
+ if (normalizedFile.startsWith(normalizedBase + "/")) return normalizedFile;
11
+ return normalizedBase + "/" + normalizedFile;
16
12
  }
17
- export function manifestFilesWithBase(files, base) {
18
- return files.map((file) => manifestFileWithBase(file, base));
13
+ function manifestFilesWithBase(files, base) {
14
+ return files.map((file) => manifestFileWithBase(file, base));
19
15
  }
16
+ //#endregion
17
+ export { manifestFileWithBase, manifestFilesWithBase, normalizeManifestFile };
18
+
20
19
  //# sourceMappingURL=manifest-paths.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"manifest-paths.js","sourceRoot":"","sources":["../../src/utils/manifest-paths.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,qBAAqB,CAAC,IAAY;IAChD,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACrD,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,IAAY,EAAE,IAAY;IAC7D,MAAM,cAAc,GAAG,qBAAqB,CAAC,IAAI,CAAC,CAAC;IACnD,IAAI,CAAC,IAAI,IAAI,IAAI,KAAK,GAAG;QAAE,OAAO,cAAc,CAAC;IAEjD,0EAA0E;IAC1E,+CAA+C;IAC/C,MAAM,cAAc,GAAG,qBAAqB,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IACvE,IAAI,CAAC,cAAc;QAAE,OAAO,cAAc,CAAC;IAC3C,IAAI,cAAc,CAAC,UAAU,CAAC,cAAc,GAAG,GAAG,CAAC;QAAE,OAAO,cAAc,CAAC;IAC3E,OAAO,cAAc,GAAG,GAAG,GAAG,cAAc,CAAC;AAC/C,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,KAAe,EAAE,IAAY;IACjE,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,oBAAoB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;AAC/D,CAAC","sourcesContent":["export function normalizeManifestFile(file: string): string {\n return file.startsWith(\"/\") ? file.slice(1) : file;\n}\n\nexport function manifestFileWithBase(file: string, base: string): string {\n const normalizedFile = normalizeManifestFile(file);\n if (!base || base === \"/\") return normalizedFile;\n\n // Vite's SSR manifest stores base-prefixed paths without a leading slash,\n // e.g. \"docs/assets/app.js\" for base \"/docs/\".\n const normalizedBase = normalizeManifestFile(base).replace(/\\/+$/, \"\");\n if (!normalizedBase) return normalizedFile;\n if (normalizedFile.startsWith(normalizedBase + \"/\")) return normalizedFile;\n return normalizedBase + \"/\" + normalizedFile;\n}\n\nexport function manifestFilesWithBase(files: string[], base: string): string[] {\n return files.map((file) => manifestFileWithBase(file, base));\n}\n"]}
1
+ {"version":3,"file":"manifest-paths.js","names":[],"sources":["../../src/utils/manifest-paths.ts"],"sourcesContent":["export function normalizeManifestFile(file: string): string {\n return file.startsWith(\"/\") ? file.slice(1) : file;\n}\n\nexport function manifestFileWithBase(file: string, base: string): string {\n const normalizedFile = normalizeManifestFile(file);\n if (!base || base === \"/\") return normalizedFile;\n\n // Vite's SSR manifest stores base-prefixed paths without a leading slash,\n // e.g. \"docs/assets/app.js\" for base \"/docs/\".\n const normalizedBase = normalizeManifestFile(base).replace(/\\/+$/, \"\");\n if (!normalizedBase) return normalizedFile;\n if (normalizedFile.startsWith(normalizedBase + \"/\")) return normalizedFile;\n return normalizedBase + \"/\" + normalizedFile;\n}\n\nexport function manifestFilesWithBase(files: string[], base: string): string[] {\n return files.map((file) => manifestFileWithBase(file, base));\n}\n"],"mappings":";AAAA,SAAgB,sBAAsB,MAAsB;AAC1D,QAAO,KAAK,WAAW,IAAI,GAAG,KAAK,MAAM,EAAE,GAAG;;AAGhD,SAAgB,qBAAqB,MAAc,MAAsB;CACvE,MAAM,iBAAiB,sBAAsB,KAAK;AAClD,KAAI,CAAC,QAAQ,SAAS,IAAK,QAAO;CAIlC,MAAM,iBAAiB,sBAAsB,KAAK,CAAC,QAAQ,QAAQ,GAAG;AACtE,KAAI,CAAC,eAAgB,QAAO;AAC5B,KAAI,eAAe,WAAW,iBAAiB,IAAI,CAAE,QAAO;AAC5D,QAAO,iBAAiB,MAAM;;AAGhC,SAAgB,sBAAsB,OAAiB,MAAwB;AAC7E,QAAO,MAAM,KAAK,SAAS,qBAAqB,MAAM,KAAK,CAAC"}
@@ -1,3 +1,4 @@
1
+ //#region src/utils/project.d.ts
1
2
  /**
2
3
  * Shared project utilities — used by both `vinext init` and `vinext deploy`.
3
4
  *
@@ -8,13 +9,13 @@
8
9
  * Ensure package.json has "type": "module".
9
10
  * Returns true if it was added (i.e. it wasn't already there).
10
11
  */
11
- export declare function ensureESModule(root: string): boolean;
12
+ declare function ensureESModule(root: string): boolean;
12
13
  /**
13
14
  * Rename CJS config files (that use `module.exports`) to .cjs
14
15
  * to avoid breakage when "type": "module" is added.
15
16
  * Returns array of [oldName, newName] pairs that were renamed.
16
17
  */
17
- export declare function renameCJSConfigs(root: string): Array<[string, string]>;
18
+ declare function renameCJSConfigs(root: string): Array<[string, string]>;
18
19
  /**
19
20
  * Ensure the project is configured for ESM before Vite loads vite.config.ts.
20
21
  *
@@ -26,9 +27,9 @@ export declare function renameCJSConfigs(root: string): Array<[string, string]>;
26
27
  *
27
28
  * @returns Object describing what was changed, or null if nothing was done.
28
29
  */
29
- export declare function ensureViteConfigCompatibility(root: string): {
30
- renamed: Array<[string, string]>;
31
- addedTypeModule: boolean;
30
+ declare function ensureViteConfigCompatibility(root: string): {
31
+ renamed: Array<[string, string]>;
32
+ addedTypeModule: boolean;
32
33
  } | null;
33
34
  type PackageManagerName = "pnpm" | "yarn" | "bun" | "npm";
34
35
  /**
@@ -39,12 +40,12 @@ type PackageManagerName = "pnpm" | "yarn" | "bun" | "npm";
39
40
  * 3) invoking CLI user agent (npm_config_user_agent)
40
41
  * 4) npm fallback
41
42
  */
42
- export declare function detectPackageManagerName(root: string, env?: Record<string, string | undefined>): PackageManagerName;
43
+ declare function detectPackageManagerName(root: string, env?: Record<string, string | undefined>): PackageManagerName;
43
44
  /**
44
45
  * Detect which package manager install command to use.
45
46
  * Returns the dev-install command string (e.g. "pnpm add -D").
46
47
  */
47
- export declare function detectPackageManager(root: string): string;
48
+ declare function detectPackageManager(root: string): string;
48
49
  /**
49
50
  * Walk from `start` up to the filesystem root looking for a path inside
50
51
  * node_modules. Returns the first absolute path found, or null.
@@ -56,14 +57,15 @@ export declare function detectPackageManager(root: string): string;
56
57
  * @param subPath - Path relative to a node_modules dir, e.g. ".bin/wrangler"
57
58
  * or "@cloudflare/vite-plugin"
58
59
  */
59
- export declare function findInNodeModules(start: string, subPath: string): string | null;
60
+ declare function findInNodeModules(start: string, subPath: string): string | null;
60
61
  /**
61
62
  * Check if a vite.config file exists in the project root.
62
63
  */
63
- export declare function hasViteConfig(root: string): boolean;
64
+ declare function hasViteConfig(root: string): boolean;
64
65
  /**
65
66
  * Check if the project uses App Router (has an app/ directory).
66
67
  */
67
- export declare function hasAppDir(root: string): boolean;
68
- export {};
68
+ declare function hasAppDir(root: string): boolean;
69
+ //#endregion
70
+ export { detectPackageManager, detectPackageManagerName, ensureESModule, ensureViteConfigCompatibility, findInNodeModules, hasAppDir, hasViteConfig, renameCJSConfigs };
69
71
  //# sourceMappingURL=project.d.ts.map