nitro-nightly 4.0.0-20251030-091344-d4418b98 → 4.0.0-20251030-121649-98b56dfe

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 (334) hide show
  1. package/dist/_build/common.mjs +763 -0
  2. package/dist/_build/rolldown.mjs +216 -0
  3. package/dist/_build/rollup.mjs +359 -0
  4. package/dist/_build/vite.build.mjs +67 -0
  5. package/dist/_build/vite.plugin.mjs +747 -0
  6. package/dist/_chunks/B-7HiF0V.mjs +1303 -0
  7. package/dist/_chunks/B3asVbT4.mjs +151 -0
  8. package/dist/_chunks/B5ooyfLk.mjs +372 -0
  9. package/dist/_chunks/DXMHy5ca.mjs +43 -0
  10. package/dist/_dev.d.mts +12 -0
  11. package/dist/_dev.mjs +675 -0
  12. package/dist/_libs/acorn.mjs +5034 -0
  13. package/dist/_libs/c12.mjs +2798 -0
  14. package/dist/_libs/chokidar.mjs +1560 -0
  15. package/dist/_libs/citty.mjs +333 -0
  16. package/dist/_libs/commondir.mjs +22 -0
  17. package/dist/_libs/compatx.mjs +46 -0
  18. package/dist/_libs/confbox.mjs +2920 -0
  19. package/dist/_libs/debug.mjs +848 -0
  20. package/dist/_libs/deepmerge.mjs +86 -0
  21. package/dist/_libs/depd.mjs +314 -0
  22. package/dist/_libs/dot-prop.mjs +138 -0
  23. package/dist/_libs/duplexer.mjs +71 -0
  24. package/dist/_libs/ee-first.mjs +68 -0
  25. package/dist/_libs/encodeurl.mjs +49 -0
  26. package/dist/_libs/escape-html.mjs +58 -0
  27. package/dist/_libs/escape-string-regexp.mjs +8 -0
  28. package/dist/_libs/estree-walker.mjs +330 -0
  29. package/dist/_libs/etag.mjs +75 -0
  30. package/dist/{_chunks/_deps → _libs}/fdir.mjs +49 -104
  31. package/dist/_libs/fresh.mjs +85 -0
  32. package/dist/_libs/function-bind.mjs +63 -0
  33. package/dist/_libs/gen-mapping.mjs +612 -0
  34. package/dist/_libs/giget.mjs +19076 -0
  35. package/dist/_libs/gzip-size.mjs +21 -0
  36. package/dist/_libs/hasown.mjs +14 -0
  37. package/dist/_libs/http-errors.mjs +436 -0
  38. package/dist/_libs/httpxy.mjs +410 -0
  39. package/dist/_libs/is-core-module.mjs +220 -0
  40. package/dist/_libs/is-module.mjs +13 -0
  41. package/dist/_libs/is-reference.mjs +32 -0
  42. package/dist/{_chunks/_deps → _libs}/js-tokens.mjs +83 -112
  43. package/dist/_libs/klona.mjs +90 -0
  44. package/dist/_libs/knitwork.mjs +124 -0
  45. package/dist/_libs/local-pkg.mjs +1686 -0
  46. package/dist/{_chunks/_deps → _libs}/magic-string.mjs +272 -629
  47. package/dist/_libs/mime-db.mjs +7642 -0
  48. package/dist/_libs/mime-types.mjs +162 -0
  49. package/dist/_libs/mime.mjs +1391 -0
  50. package/dist/_libs/node-fetch-native.mjs +173 -0
  51. package/dist/_libs/on-finished.mjs +170 -0
  52. package/dist/_libs/parseurl.mjs +103 -0
  53. package/dist/_libs/path-parse.mjs +47 -0
  54. package/dist/_libs/pathe.mjs +41 -0
  55. package/dist/_libs/picomatch.mjs +1673 -0
  56. package/dist/_libs/plugin-alias.mjs +64 -0
  57. package/dist/_libs/plugin-commonjs.mjs +1489 -0
  58. package/dist/_libs/plugin-inject.mjs +135 -0
  59. package/dist/_libs/plugin-json.mjs +36 -0
  60. package/dist/_libs/plugin-node-resolve.mjs +1553 -0
  61. package/dist/_libs/plugin-replace.mjs +104 -0
  62. package/dist/_libs/pretty-bytes.mjs +116 -0
  63. package/dist/_libs/range-parser.mjs +102 -0
  64. package/dist/_libs/remapping.mjs +117 -0
  65. package/dist/{_chunks/_deps → _libs}/rou3.mjs +7 -22
  66. package/dist/_libs/send.mjs +857 -0
  67. package/dist/_libs/serve-static.mjs +124 -0
  68. package/dist/_libs/std-env.mjs +158 -0
  69. package/dist/_libs/strip-literal.mjs +51 -0
  70. package/dist/{_chunks/_deps → _libs}/tinyglobby.mjs +32 -33
  71. package/dist/_libs/ultrahtml.mjs +138 -0
  72. package/dist/_libs/unimport.mjs +3520 -0
  73. package/dist/_libs/untyped.mjs +271 -0
  74. package/dist/_libs/unwasm.mjs +5825 -0
  75. package/dist/{_chunks/_deps/@pi0 → _libs}/vite-plugin-fullstack.mjs +28 -42
  76. package/dist/_presets.mjs +1723 -0
  77. package/dist/builder.d.mts +37 -35
  78. package/dist/builder.mjs +45 -117
  79. package/dist/cli/_chunks/build.mjs +43 -0
  80. package/dist/cli/_chunks/common.mjs +15 -0
  81. package/dist/cli/_chunks/detect-acorn.mjs +12 -0
  82. package/dist/cli/_chunks/dev.mjs +79 -0
  83. package/dist/cli/_chunks/dist.mjs +3 -0
  84. package/dist/cli/_chunks/dist2.mjs +4 -0
  85. package/dist/cli/_chunks/esm.mjs +3 -0
  86. package/dist/cli/_chunks/json5.mjs +4 -0
  87. package/dist/cli/_chunks/jsonc.mjs +4 -0
  88. package/dist/cli/_chunks/list.mjs +27 -0
  89. package/dist/cli/_chunks/multipart-parser.mjs +6 -0
  90. package/dist/cli/_chunks/prepare.mjs +19 -0
  91. package/dist/cli/_chunks/run.mjs +55 -0
  92. package/dist/cli/_chunks/task.mjs +16 -0
  93. package/dist/cli/_chunks/toml.mjs +4 -0
  94. package/dist/cli/_chunks/yaml.mjs +4 -0
  95. package/dist/cli/index.d.mts +1 -1
  96. package/dist/cli/index.mjs +19 -18
  97. package/dist/presets/_nitro/runtime/nitro-dev.d.mts +1 -0
  98. package/dist/presets/_nitro/runtime/nitro-dev.mjs +42 -33
  99. package/dist/presets/_nitro/runtime/nitro-prerenderer.d.mts +2 -2
  100. package/dist/presets/_nitro/runtime/nitro-prerenderer.mjs +4 -8
  101. package/dist/presets/_nitro/runtime/service-worker.d.mts +1 -0
  102. package/dist/presets/_nitro/runtime/service-worker.mjs +14 -11
  103. package/dist/presets/aws-amplify/runtime/aws-amplify.d.mts +1 -0
  104. package/dist/presets/aws-amplify/runtime/aws-amplify.mjs +6 -5
  105. package/dist/presets/aws-lambda/runtime/_utils.d.mts +8 -13
  106. package/dist/presets/aws-lambda/runtime/_utils.mjs +95 -81
  107. package/dist/presets/aws-lambda/runtime/aws-lambda-streaming.d.mts +1 -2
  108. package/dist/presets/aws-lambda/runtime/aws-lambda-streaming.mjs +25 -27
  109. package/dist/presets/aws-lambda/runtime/aws-lambda.mjs +7 -7
  110. package/dist/presets/azure/runtime/_utils.mjs +43 -43
  111. package/dist/presets/azure/runtime/azure-swa.d.mts +2 -2
  112. package/dist/presets/azure/runtime/azure-swa.mjs +22 -21
  113. package/dist/presets/bun/runtime/bun.d.mts +1 -0
  114. package/dist/presets/bun/runtime/bun.mjs +18 -17
  115. package/dist/presets/cloudflare/runtime/_module-handler.d.mts +10 -7
  116. package/dist/presets/cloudflare/runtime/_module-handler.mjs +78 -87
  117. package/dist/presets/cloudflare/runtime/cloudflare-durable.d.mts +6 -14
  118. package/dist/presets/cloudflare/runtime/cloudflare-durable.mjs +53 -58
  119. package/dist/presets/cloudflare/runtime/cloudflare-module.d.mts +1 -7
  120. package/dist/presets/cloudflare/runtime/cloudflare-module.mjs +12 -14
  121. package/dist/presets/cloudflare/runtime/cloudflare-pages.d.mts +12 -12
  122. package/dist/presets/cloudflare/runtime/cloudflare-pages.mjs +35 -39
  123. package/dist/presets/cloudflare/runtime/plugin.dev.d.mts +2 -2
  124. package/dist/presets/cloudflare/runtime/plugin.dev.mjs +86 -76
  125. package/dist/presets/deno/runtime/deno-deploy.d.mts +1 -0
  126. package/dist/presets/deno/runtime/deno-deploy.mjs +12 -11
  127. package/dist/presets/deno/runtime/deno-server.d.mts +2 -1
  128. package/dist/presets/deno/runtime/deno-server.mjs +31 -39
  129. package/dist/presets/netlify/runtime/netlify-edge.d.mts +2 -1
  130. package/dist/presets/netlify/runtime/netlify-edge.mjs +14 -11
  131. package/dist/presets/netlify/runtime/netlify.mjs +11 -17
  132. package/dist/presets/node/runtime/node-cluster.mjs +49 -48
  133. package/dist/presets/node/runtime/node-middleware.d.mts +3 -2
  134. package/dist/presets/node/runtime/node-middleware.mjs +7 -6
  135. package/dist/presets/node/runtime/node-server.mjs +33 -23
  136. package/dist/presets/standard/runtime/server.d.mts +1 -3
  137. package/dist/presets/standard/runtime/server.mjs +1 -3
  138. package/dist/presets/stormkit/runtime/stormkit.d.mts +13 -13
  139. package/dist/presets/stormkit/runtime/stormkit.mjs +20 -20
  140. package/dist/presets/vercel/runtime/vercel.d.mts +3 -3
  141. package/dist/presets/vercel/runtime/vercel.mjs +15 -14
  142. package/dist/presets/winterjs/runtime/winterjs.d.mts +2 -0
  143. package/dist/presets/winterjs/runtime/winterjs.mjs +72 -68
  144. package/dist/presets/zeabur/runtime/zeabur.d.mts +1 -1
  145. package/dist/runtime/index.d.mts +12 -1
  146. package/dist/runtime/index.mjs +12 -7
  147. package/dist/runtime/internal/app.mjs +175 -162
  148. package/dist/runtime/internal/cache.d.mts +10 -4
  149. package/dist/runtime/internal/cache.mjs +247 -216
  150. package/dist/runtime/internal/context.d.mts +9 -9
  151. package/dist/runtime/internal/context.mjs +17 -10
  152. package/dist/runtime/internal/database.mjs +8 -10
  153. package/dist/runtime/internal/error/dev.d.mts +5 -4
  154. package/dist/runtime/internal/error/dev.mjs +106 -105
  155. package/dist/runtime/internal/error/prod.d.mts +2 -2
  156. package/dist/runtime/internal/error/prod.mjs +48 -52
  157. package/dist/runtime/internal/error/utils.d.mts +4 -4
  158. package/dist/runtime/internal/error/utils.mjs +1 -1
  159. package/dist/runtime/internal/index.d.mts +2 -0
  160. package/dist/runtime/internal/index.mjs +2 -0
  161. package/dist/runtime/internal/lib/http-graceful-shutdown.d.mts +14 -14
  162. package/dist/runtime/internal/lib/http-graceful-shutdown.mjs +248 -209
  163. package/dist/runtime/internal/meta.d.mts +1 -1
  164. package/dist/runtime/internal/meta.mjs +1 -1
  165. package/dist/runtime/internal/plugin.d.mts +2 -2
  166. package/dist/runtime/internal/plugin.mjs +1 -1
  167. package/dist/runtime/internal/renderer.mjs +39 -31
  168. package/dist/runtime/internal/route-rules.d.mts +8 -8
  169. package/dist/runtime/internal/route-rules.mjs +53 -51
  170. package/dist/runtime/internal/routes/dev-tasks.d.mts +1 -30
  171. package/dist/runtime/internal/routes/dev-tasks.mjs +15 -17
  172. package/dist/runtime/internal/routes/openapi.d.mts +1 -0
  173. package/dist/runtime/internal/routes/openapi.mjs +81 -87
  174. package/dist/runtime/internal/routes/renderer-template.d.mts +1 -1
  175. package/dist/runtime/internal/routes/renderer-template.dev.d.mts +1 -2
  176. package/dist/runtime/internal/routes/renderer-template.dev.mjs +10 -17
  177. package/dist/runtime/internal/routes/renderer-template.mjs +1 -1
  178. package/dist/runtime/internal/routes/scalar.d.mts +1 -0
  179. package/dist/runtime/internal/routes/scalar.mjs +22 -23
  180. package/dist/runtime/internal/routes/swagger.d.mts +1 -0
  181. package/dist/runtime/internal/routes/swagger.mjs +9 -11
  182. package/dist/runtime/internal/runtime-config.d.mts +4 -4
  183. package/dist/runtime/internal/runtime-config.mjs +40 -35
  184. package/dist/runtime/internal/shutdown.d.mts +2 -7
  185. package/dist/runtime/internal/shutdown.mjs +30 -29
  186. package/dist/runtime/internal/static.mjs +63 -74
  187. package/dist/runtime/internal/storage.mjs +2 -2
  188. package/dist/runtime/internal/task.d.mts +6 -6
  189. package/dist/runtime/internal/task.mjs +56 -59
  190. package/dist/runtime/internal/utils.d.mts +1 -1
  191. package/dist/runtime/internal/utils.mjs +4 -10
  192. package/dist/types/index.d.mts +2566 -3851
  193. package/dist/types/index.mjs +1 -1
  194. package/dist/vite.d.mts +56 -52
  195. package/dist/vite.mjs +55 -132
  196. package/package.json +10 -10
  197. package/dist/_build/build.mjs +0 -368
  198. package/dist/_build/build2.mjs +0 -556
  199. package/dist/_build/info.mjs +0 -1002
  200. package/dist/_build/prepare.mjs +0 -1511
  201. package/dist/_build/snapshot.mjs +0 -185
  202. package/dist/_build/vite.mjs +0 -959
  203. package/dist/_build/vite2.mjs +0 -149
  204. package/dist/_chunks/_deps/@jridgewell/gen-mapping.mjs +0 -189
  205. package/dist/_chunks/_deps/@jridgewell/remapping.mjs +0 -137
  206. package/dist/_chunks/_deps/@jridgewell/resolve-uri.mjs +0 -231
  207. package/dist/_chunks/_deps/@jridgewell/sourcemap-codec.mjs +0 -173
  208. package/dist/_chunks/_deps/@jridgewell/trace-mapping.mjs +0 -170
  209. package/dist/_chunks/_deps/@rollup/plugin-alias.mjs +0 -89
  210. package/dist/_chunks/_deps/@rollup/plugin-commonjs.mjs +0 -2376
  211. package/dist/_chunks/_deps/@rollup/plugin-inject.mjs +0 -212
  212. package/dist/_chunks/_deps/@rollup/plugin-json.mjs +0 -37
  213. package/dist/_chunks/_deps/@rollup/plugin-node-resolve.mjs +0 -1386
  214. package/dist/_chunks/_deps/@rollup/plugin-replace.mjs +0 -133
  215. package/dist/_chunks/_deps/@rollup/pluginutils.mjs +0 -346
  216. package/dist/_chunks/_deps/acorn.mjs +0 -6225
  217. package/dist/_chunks/_deps/c12.mjs +0 -510
  218. package/dist/_chunks/_deps/chokidar.mjs +0 -1428
  219. package/dist/_chunks/_deps/citty.mjs +0 -460
  220. package/dist/_chunks/_deps/commondir.mjs +0 -77
  221. package/dist/_chunks/_deps/compatx.mjs +0 -76
  222. package/dist/_chunks/_deps/confbox.mjs +0 -300
  223. package/dist/_chunks/_deps/debug.mjs +0 -885
  224. package/dist/_chunks/_deps/deepmerge.mjs +0 -147
  225. package/dist/_chunks/_deps/depd.mjs +0 -550
  226. package/dist/_chunks/_deps/dot-prop.mjs +0 -282
  227. package/dist/_chunks/_deps/dotenv.mjs +0 -555
  228. package/dist/_chunks/_deps/duplexer.mjs +0 -1
  229. package/dist/_chunks/_deps/ee-first.mjs +0 -104
  230. package/dist/_chunks/_deps/encodeurl.mjs +0 -69
  231. package/dist/_chunks/_deps/escape-html.mjs +0 -87
  232. package/dist/_chunks/_deps/escape-string-regexp.mjs +0 -13
  233. package/dist/_chunks/_deps/estree-walker.mjs +0 -433
  234. package/dist/_chunks/_deps/etag.mjs +0 -147
  235. package/dist/_chunks/_deps/exsolve.mjs +0 -1416
  236. package/dist/_chunks/_deps/fresh.mjs +0 -145
  237. package/dist/_chunks/_deps/function-bind.mjs +0 -106
  238. package/dist/_chunks/_deps/giget.mjs +0 -451
  239. package/dist/_chunks/_deps/gzip-size.mjs +0 -19
  240. package/dist/_chunks/_deps/hasown.mjs +0 -19
  241. package/dist/_chunks/_deps/http-errors.mjs +0 -307
  242. package/dist/_chunks/_deps/httpxy.mjs +0 -580
  243. package/dist/_chunks/_deps/inherits.mjs +0 -57
  244. package/dist/_chunks/_deps/is-core-module.mjs +0 -596
  245. package/dist/_chunks/_deps/is-module.mjs +0 -25
  246. package/dist/_chunks/_deps/is-reference.mjs +0 -31
  247. package/dist/_chunks/_deps/klona.mjs +0 -137
  248. package/dist/_chunks/_deps/knitwork.mjs +0 -172
  249. package/dist/_chunks/_deps/local-pkg.mjs +0 -163
  250. package/dist/_chunks/_deps/mime-db.mjs +0 -11685
  251. package/dist/_chunks/_deps/mime-types.mjs +0 -287
  252. package/dist/_chunks/_deps/mime.mjs +0 -1172
  253. package/dist/_chunks/_deps/mlly.mjs +0 -2413
  254. package/dist/_chunks/_deps/ms.mjs +0 -172
  255. package/dist/_chunks/_deps/node-fetch-native.mjs +0 -3
  256. package/dist/_chunks/_deps/nypm.mjs +0 -219
  257. package/dist/_chunks/_deps/on-finished.mjs +0 -246
  258. package/dist/_chunks/_deps/parseurl.mjs +0 -168
  259. package/dist/_chunks/_deps/path-parse.mjs +0 -85
  260. package/dist/_chunks/_deps/pathe.mjs +0 -251
  261. package/dist/_chunks/_deps/perfect-debounce.mjs +0 -88
  262. package/dist/_chunks/_deps/picomatch.mjs +0 -2144
  263. package/dist/_chunks/_deps/pkg-types.mjs +0 -247
  264. package/dist/_chunks/_deps/pretty-bytes.mjs +0 -180
  265. package/dist/_chunks/_deps/quansync.mjs +0 -99
  266. package/dist/_chunks/_deps/range-parser.mjs +0 -171
  267. package/dist/_chunks/_deps/rc9.mjs +0 -219
  268. package/dist/_chunks/_deps/readdirp.mjs +0 -245
  269. package/dist/_chunks/_deps/resolve.mjs +0 -1260
  270. package/dist/_chunks/_deps/send.mjs +0 -1022
  271. package/dist/_chunks/_deps/serve-static.mjs +0 -228
  272. package/dist/_chunks/_deps/setprototypeof.mjs +0 -26
  273. package/dist/_chunks/_deps/statuses.mjs +0 -457
  274. package/dist/_chunks/_deps/std-env.mjs +0 -3
  275. package/dist/_chunks/_deps/strip-literal.mjs +0 -67
  276. package/dist/_chunks/_deps/supports-color.mjs +0 -44
  277. package/dist/_chunks/_deps/tinyexec.mjs +0 -552
  278. package/dist/_chunks/_deps/toidentifier.mjs +0 -41
  279. package/dist/_chunks/_deps/ultrahtml.mjs +0 -3
  280. package/dist/_chunks/_deps/unimport.mjs +0 -2267
  281. package/dist/_chunks/_deps/unplugin-utils.mjs +0 -65
  282. package/dist/_chunks/_deps/unplugin.mjs +0 -1294
  283. package/dist/_chunks/_deps/untyped.mjs +0 -375
  284. package/dist/_chunks/_deps/unwasm.mjs +0 -6959
  285. package/dist/_chunks/_deps/webpack-virtual-modules.mjs +0 -360
  286. package/dist/_chunks/_presets/_all.mjs +0 -59
  287. package/dist/_chunks/_presets/_nitro.mjs +0 -74
  288. package/dist/_chunks/_presets/_resolve.mjs +0 -64
  289. package/dist/_chunks/_presets/_static.mjs +0 -69
  290. package/dist/_chunks/_presets/_types.mjs +0 -3
  291. package/dist/_chunks/_presets/_utils.mjs +0 -31
  292. package/dist/_chunks/_presets/alwaysdata.mjs +0 -17
  293. package/dist/_chunks/_presets/aws-amplify.mjs +0 -111
  294. package/dist/_chunks/_presets/aws-lambda.mjs +0 -23
  295. package/dist/_chunks/_presets/azure.mjs +0 -162
  296. package/dist/_chunks/_presets/bun.mjs +0 -19
  297. package/dist/_chunks/_presets/cleavr.mjs +0 -15
  298. package/dist/_chunks/_presets/cloudflare.mjs +0 -608
  299. package/dist/_chunks/_presets/deno.mjs +0 -196
  300. package/dist/_chunks/_presets/digitalocean.mjs +0 -14
  301. package/dist/_chunks/_presets/firebase.mjs +0 -47
  302. package/dist/_chunks/_presets/flightcontrol.mjs +0 -14
  303. package/dist/_chunks/_presets/genezio.mjs +0 -13
  304. package/dist/_chunks/_presets/heroku.mjs +0 -14
  305. package/dist/_chunks/_presets/iis.mjs +0 -194
  306. package/dist/_chunks/_presets/index.mjs +0 -62
  307. package/dist/_chunks/_presets/koyeb.mjs +0 -14
  308. package/dist/_chunks/_presets/netlify.mjs +0 -241
  309. package/dist/_chunks/_presets/node.mjs +0 -54
  310. package/dist/_chunks/_presets/platform.mjs +0 -14
  311. package/dist/_chunks/_presets/render.mjs +0 -14
  312. package/dist/_chunks/_presets/standard.mjs +0 -23
  313. package/dist/_chunks/_presets/stormkit.mjs +0 -18
  314. package/dist/_chunks/_presets/vercel.mjs +0 -375
  315. package/dist/_chunks/_presets/winterjs.mjs +0 -22
  316. package/dist/_chunks/_presets/zeabur.mjs +0 -69
  317. package/dist/_chunks/_presets/zerops.mjs +0 -27
  318. package/dist/_chunks/app.mjs +0 -600
  319. package/dist/_chunks/builder.mjs +0 -648
  320. package/dist/_chunks/server.mjs +0 -256
  321. package/dist/_cli/build.mjs +0 -49
  322. package/dist/_cli/common.mjs +0 -13
  323. package/dist/_cli/dev.mjs +0 -121
  324. package/dist/_cli/index.mjs +0 -16
  325. package/dist/_cli/list.mjs +0 -33
  326. package/dist/_cli/prepare.mjs +0 -23
  327. package/dist/_cli/run.mjs +0 -59
  328. package/dist/presets/cloudflare/runtime/shims/workers.dev.d.mts +0 -21
  329. package/dist/runtime/internal/empty.d.mts +0 -0
  330. package/dist/runtime/internal/vite/dev-entry.d.mts +0 -1
  331. package/dist/runtime/internal/vite/dev-worker.d.mts +0 -1
  332. package/dist/runtime/internal/vite/prod-setup.d.mts +0 -4
  333. package/dist/runtime/internal/vite/ssr-renderer.d.mts +0 -4
  334. /package/lib/{indexd.mts → index.d.mts} +0 -0
@@ -1,231 +0,0 @@
1
- // Matches the scheme of a URL, eg "http://"
2
- const schemeRegex = /^[\w+.-]+:\/\//;
3
- /**
4
- * Matches the parts of a URL:
5
- * 1. Scheme, including ":", guaranteed.
6
- * 2. User/password, including "@", optional.
7
- * 3. Host, guaranteed.
8
- * 4. Port, including ":", optional.
9
- * 5. Path, including "/", optional.
10
- * 6. Query, including "?", optional.
11
- * 7. Hash, including "#", optional.
12
- */
13
- const urlRegex = /^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/;
14
- /**
15
- * File URLs are weird. They dont' need the regular `//` in the scheme, they may or may not start
16
- * with a leading `/`, they can have a domain (but only if they don't start with a Windows drive).
17
- *
18
- * 1. Host, optional.
19
- * 2. Path, which may include "/", guaranteed.
20
- * 3. Query, including "?", optional.
21
- * 4. Hash, including "#", optional.
22
- */
23
- const fileRegex = /^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;
24
- function isAbsoluteUrl(input) {
25
- return schemeRegex.test(input);
26
- }
27
- function isSchemeRelativeUrl(input) {
28
- return input.startsWith('//');
29
- }
30
- function isAbsolutePath(input) {
31
- return input.startsWith('/');
32
- }
33
- function isFileUrl(input) {
34
- return input.startsWith('file:');
35
- }
36
- function isRelative(input) {
37
- return /^[.?#]/.test(input);
38
- }
39
- function parseAbsoluteUrl(input) {
40
- const match = urlRegex.exec(input);
41
- return makeUrl(match[1], match[2] || '', match[3], match[4] || '', match[5] || '/', match[6] || '', match[7] || '');
42
- }
43
- function parseFileUrl(input) {
44
- const match = fileRegex.exec(input);
45
- const path = match[2];
46
- return makeUrl('file:', '', match[1] || '', '', isAbsolutePath(path) ? path : '/' + path, match[3] || '', match[4] || '');
47
- }
48
- function makeUrl(scheme, user, host, port, path, query, hash) {
49
- return {
50
- scheme,
51
- user,
52
- host,
53
- port,
54
- path,
55
- query,
56
- hash,
57
- type: 7 /* Absolute */,
58
- };
59
- }
60
- function parseUrl(input) {
61
- if (isSchemeRelativeUrl(input)) {
62
- const url = parseAbsoluteUrl('http:' + input);
63
- url.scheme = '';
64
- url.type = 6 /* SchemeRelative */;
65
- return url;
66
- }
67
- if (isAbsolutePath(input)) {
68
- const url = parseAbsoluteUrl('http://foo.com' + input);
69
- url.scheme = '';
70
- url.host = '';
71
- url.type = 5 /* AbsolutePath */;
72
- return url;
73
- }
74
- if (isFileUrl(input))
75
- return parseFileUrl(input);
76
- if (isAbsoluteUrl(input))
77
- return parseAbsoluteUrl(input);
78
- const url = parseAbsoluteUrl('http://foo.com/' + input);
79
- url.scheme = '';
80
- url.host = '';
81
- url.type = input
82
- ? input.startsWith('?')
83
- ? 3 /* Query */
84
- : input.startsWith('#')
85
- ? 2 /* Hash */
86
- : 4 /* RelativePath */
87
- : 1 /* Empty */;
88
- return url;
89
- }
90
- function stripPathFilename(path) {
91
- // If a path ends with a parent directory "..", then it's a relative path with excess parent
92
- // paths. It's not a file, so we can't strip it.
93
- if (path.endsWith('/..'))
94
- return path;
95
- const index = path.lastIndexOf('/');
96
- return path.slice(0, index + 1);
97
- }
98
- function mergePaths(url, base) {
99
- normalizePath(base, base.type);
100
- // If the path is just a "/", then it was an empty path to begin with (remember, we're a relative
101
- // path).
102
- if (url.path === '/') {
103
- url.path = base.path;
104
- }
105
- else {
106
- // Resolution happens relative to the base path's directory, not the file.
107
- url.path = stripPathFilename(base.path) + url.path;
108
- }
109
- }
110
- /**
111
- * The path can have empty directories "//", unneeded parents "foo/..", or current directory
112
- * "foo/.". We need to normalize to a standard representation.
113
- */
114
- function normalizePath(url, type) {
115
- const rel = type <= 4 /* RelativePath */;
116
- const pieces = url.path.split('/');
117
- // We need to preserve the first piece always, so that we output a leading slash. The item at
118
- // pieces[0] is an empty string.
119
- let pointer = 1;
120
- // Positive is the number of real directories we've output, used for popping a parent directory.
121
- // Eg, "foo/bar/.." will have a positive 2, and we can decrement to be left with just "foo".
122
- let positive = 0;
123
- // We need to keep a trailing slash if we encounter an empty directory (eg, splitting "foo/" will
124
- // generate `["foo", ""]` pieces). And, if we pop a parent directory. But once we encounter a
125
- // real directory, we won't need to append, unless the other conditions happen again.
126
- let addTrailingSlash = false;
127
- for (let i = 1; i < pieces.length; i++) {
128
- const piece = pieces[i];
129
- // An empty directory, could be a trailing slash, or just a double "//" in the path.
130
- if (!piece) {
131
- addTrailingSlash = true;
132
- continue;
133
- }
134
- // If we encounter a real directory, then we don't need to append anymore.
135
- addTrailingSlash = false;
136
- // A current directory, which we can always drop.
137
- if (piece === '.')
138
- continue;
139
- // A parent directory, we need to see if there are any real directories we can pop. Else, we
140
- // have an excess of parents, and we'll need to keep the "..".
141
- if (piece === '..') {
142
- if (positive) {
143
- addTrailingSlash = true;
144
- positive--;
145
- pointer--;
146
- }
147
- else if (rel) {
148
- // If we're in a relativePath, then we need to keep the excess parents. Else, in an absolute
149
- // URL, protocol relative URL, or an absolute path, we don't need to keep excess.
150
- pieces[pointer++] = piece;
151
- }
152
- continue;
153
- }
154
- // We've encountered a real directory. Move it to the next insertion pointer, which accounts for
155
- // any popped or dropped directories.
156
- pieces[pointer++] = piece;
157
- positive++;
158
- }
159
- let path = '';
160
- for (let i = 1; i < pointer; i++) {
161
- path += '/' + pieces[i];
162
- }
163
- if (!path || (addTrailingSlash && !path.endsWith('/..'))) {
164
- path += '/';
165
- }
166
- url.path = path;
167
- }
168
- /**
169
- * Attempts to resolve `input` URL/path relative to `base`.
170
- */
171
- function resolve(input, base) {
172
- if (!input && !base)
173
- return '';
174
- const url = parseUrl(input);
175
- let inputType = url.type;
176
- if (base && inputType !== 7 /* Absolute */) {
177
- const baseUrl = parseUrl(base);
178
- const baseType = baseUrl.type;
179
- switch (inputType) {
180
- case 1 /* Empty */:
181
- url.hash = baseUrl.hash;
182
- // fall through
183
- case 2 /* Hash */:
184
- url.query = baseUrl.query;
185
- // fall through
186
- case 3 /* Query */:
187
- case 4 /* RelativePath */:
188
- mergePaths(url, baseUrl);
189
- // fall through
190
- case 5 /* AbsolutePath */:
191
- // The host, user, and port are joined, you can't copy one without the others.
192
- url.user = baseUrl.user;
193
- url.host = baseUrl.host;
194
- url.port = baseUrl.port;
195
- // fall through
196
- case 6 /* SchemeRelative */:
197
- // The input doesn't have a schema at least, so we need to copy at least that over.
198
- url.scheme = baseUrl.scheme;
199
- }
200
- if (baseType > inputType)
201
- inputType = baseType;
202
- }
203
- normalizePath(url, inputType);
204
- const queryHash = url.query + url.hash;
205
- switch (inputType) {
206
- // This is impossible, because of the empty checks at the start of the function.
207
- // case UrlType.Empty:
208
- case 2 /* Hash */:
209
- case 3 /* Query */:
210
- return queryHash;
211
- case 4 /* RelativePath */: {
212
- // The first char is always a "/", and we need it to be relative.
213
- const path = url.path.slice(1);
214
- if (!path)
215
- return queryHash || '.';
216
- if (isRelative(base || input) && !isRelative(path)) {
217
- // If base started with a leading ".", or there is no base and input started with a ".",
218
- // then we need to ensure that the relative path starts with a ".". We don't know if
219
- // relative starts with a "..", though, so check before prepending.
220
- return './' + path + queryHash;
221
- }
222
- return path + queryHash;
223
- }
224
- case 5 /* AbsolutePath */:
225
- return url.path + queryHash;
226
- default:
227
- return url.scheme + '//' + url.user + url.host + url.port + url.path + queryHash;
228
- }
229
- }
230
-
231
- export { resolve as r };
@@ -1,173 +0,0 @@
1
- // src/vlq.ts
2
- var comma = ",".charCodeAt(0);
3
- var semicolon = ";".charCodeAt(0);
4
- var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
5
- var intToChar = new Uint8Array(64);
6
- var charToInt = new Uint8Array(128);
7
- for (let i = 0; i < chars.length; i++) {
8
- const c = chars.charCodeAt(i);
9
- intToChar[i] = c;
10
- charToInt[c] = i;
11
- }
12
- function decodeInteger(reader, relative) {
13
- let value = 0;
14
- let shift = 0;
15
- let integer = 0;
16
- do {
17
- const c = reader.next();
18
- integer = charToInt[c];
19
- value |= (integer & 31) << shift;
20
- shift += 5;
21
- } while (integer & 32);
22
- const shouldNegate = value & 1;
23
- value >>>= 1;
24
- if (shouldNegate) {
25
- value = -2147483648 | -value;
26
- }
27
- return relative + value;
28
- }
29
- function encodeInteger(builder, num, relative) {
30
- let delta = num - relative;
31
- delta = delta < 0 ? -delta << 1 | 1 : delta << 1;
32
- do {
33
- let clamped = delta & 31;
34
- delta >>>= 5;
35
- if (delta > 0) clamped |= 32;
36
- builder.write(intToChar[clamped]);
37
- } while (delta > 0);
38
- return num;
39
- }
40
- function hasMoreVlq(reader, max) {
41
- if (reader.pos >= max) return false;
42
- return reader.peek() !== comma;
43
- }
44
-
45
- // src/strings.ts
46
- var bufLength = 1024 * 16;
47
- var td = typeof TextDecoder !== "undefined" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer !== "undefined" ? {
48
- decode(buf) {
49
- const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);
50
- return out.toString();
51
- }
52
- } : {
53
- decode(buf) {
54
- let out = "";
55
- for (let i = 0; i < buf.length; i++) {
56
- out += String.fromCharCode(buf[i]);
57
- }
58
- return out;
59
- }
60
- };
61
- var StringWriter = class {
62
- constructor() {
63
- this.pos = 0;
64
- this.out = "";
65
- this.buffer = new Uint8Array(bufLength);
66
- }
67
- write(v) {
68
- const { buffer } = this;
69
- buffer[this.pos++] = v;
70
- if (this.pos === bufLength) {
71
- this.out += td.decode(buffer);
72
- this.pos = 0;
73
- }
74
- }
75
- flush() {
76
- const { buffer, out, pos } = this;
77
- return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out;
78
- }
79
- };
80
- var StringReader = class {
81
- constructor(buffer) {
82
- this.pos = 0;
83
- this.buffer = buffer;
84
- }
85
- next() {
86
- return this.buffer.charCodeAt(this.pos++);
87
- }
88
- peek() {
89
- return this.buffer.charCodeAt(this.pos);
90
- }
91
- indexOf(char) {
92
- const { buffer, pos } = this;
93
- const idx = buffer.indexOf(char, pos);
94
- return idx === -1 ? buffer.length : idx;
95
- }
96
- };
97
-
98
- // src/sourcemap-codec.ts
99
- function decode(mappings) {
100
- const { length } = mappings;
101
- const reader = new StringReader(mappings);
102
- const decoded = [];
103
- let genColumn = 0;
104
- let sourcesIndex = 0;
105
- let sourceLine = 0;
106
- let sourceColumn = 0;
107
- let namesIndex = 0;
108
- do {
109
- const semi = reader.indexOf(";");
110
- const line = [];
111
- let sorted = true;
112
- let lastCol = 0;
113
- genColumn = 0;
114
- while (reader.pos < semi) {
115
- let seg;
116
- genColumn = decodeInteger(reader, genColumn);
117
- if (genColumn < lastCol) sorted = false;
118
- lastCol = genColumn;
119
- if (hasMoreVlq(reader, semi)) {
120
- sourcesIndex = decodeInteger(reader, sourcesIndex);
121
- sourceLine = decodeInteger(reader, sourceLine);
122
- sourceColumn = decodeInteger(reader, sourceColumn);
123
- if (hasMoreVlq(reader, semi)) {
124
- namesIndex = decodeInteger(reader, namesIndex);
125
- seg = [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex];
126
- } else {
127
- seg = [genColumn, sourcesIndex, sourceLine, sourceColumn];
128
- }
129
- } else {
130
- seg = [genColumn];
131
- }
132
- line.push(seg);
133
- reader.pos++;
134
- }
135
- if (!sorted) sort(line);
136
- decoded.push(line);
137
- reader.pos = semi + 1;
138
- } while (reader.pos <= length);
139
- return decoded;
140
- }
141
- function sort(line) {
142
- line.sort(sortComparator);
143
- }
144
- function sortComparator(a, b) {
145
- return a[0] - b[0];
146
- }
147
- function encode(decoded) {
148
- const writer = new StringWriter();
149
- let sourcesIndex = 0;
150
- let sourceLine = 0;
151
- let sourceColumn = 0;
152
- let namesIndex = 0;
153
- for (let i = 0; i < decoded.length; i++) {
154
- const line = decoded[i];
155
- if (i > 0) writer.write(semicolon);
156
- if (line.length === 0) continue;
157
- let genColumn = 0;
158
- for (let j = 0; j < line.length; j++) {
159
- const segment = line[j];
160
- if (j > 0) writer.write(comma);
161
- genColumn = encodeInteger(writer, segment[0], genColumn);
162
- if (segment.length === 1) continue;
163
- sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex);
164
- sourceLine = encodeInteger(writer, segment[2], sourceLine);
165
- sourceColumn = encodeInteger(writer, segment[3], sourceColumn);
166
- if (segment.length === 4) continue;
167
- namesIndex = encodeInteger(writer, segment[4], namesIndex);
168
- }
169
- }
170
- return writer.flush();
171
- }
172
-
173
- export { decode as d, encode as e };
@@ -1,170 +0,0 @@
1
- import { d as decode } from './sourcemap-codec.mjs';
2
- import { r as resolve } from './resolve-uri.mjs';
3
-
4
- // src/trace-mapping.ts
5
-
6
- // src/strip-filename.ts
7
- function stripFilename(path) {
8
- if (!path) return "";
9
- const index = path.lastIndexOf("/");
10
- return path.slice(0, index + 1);
11
- }
12
-
13
- // src/resolve.ts
14
- function resolver(mapUrl, sourceRoot) {
15
- const from = stripFilename(mapUrl);
16
- const prefix = sourceRoot ? sourceRoot + "/" : "";
17
- return (source) => resolve(prefix + (source || ""), from);
18
- }
19
-
20
- // src/sourcemap-segment.ts
21
- var COLUMN = 0;
22
-
23
- // src/sort.ts
24
- function maybeSort(mappings, owned) {
25
- const unsortedIndex = nextUnsortedSegmentLine(mappings, 0);
26
- if (unsortedIndex === mappings.length) return mappings;
27
- if (!owned) mappings = mappings.slice();
28
- for (let i = unsortedIndex; i < mappings.length; i = nextUnsortedSegmentLine(mappings, i + 1)) {
29
- mappings[i] = sortSegments(mappings[i], owned);
30
- }
31
- return mappings;
32
- }
33
- function nextUnsortedSegmentLine(mappings, start) {
34
- for (let i = start; i < mappings.length; i++) {
35
- if (!isSorted(mappings[i])) return i;
36
- }
37
- return mappings.length;
38
- }
39
- function isSorted(line) {
40
- for (let j = 1; j < line.length; j++) {
41
- if (line[j][COLUMN] < line[j - 1][COLUMN]) {
42
- return false;
43
- }
44
- }
45
- return true;
46
- }
47
- function sortSegments(line, owned) {
48
- if (!owned) line = line.slice();
49
- return line.sort(sortComparator);
50
- }
51
- function sortComparator(a, b) {
52
- return a[COLUMN] - b[COLUMN];
53
- }
54
-
55
- // src/binary-search.ts
56
- var found = false;
57
- function binarySearch(haystack, needle, low, high) {
58
- while (low <= high) {
59
- const mid = low + (high - low >> 1);
60
- const cmp = haystack[mid][COLUMN] - needle;
61
- if (cmp === 0) {
62
- found = true;
63
- return mid;
64
- }
65
- if (cmp < 0) {
66
- low = mid + 1;
67
- } else {
68
- high = mid - 1;
69
- }
70
- }
71
- found = false;
72
- return low - 1;
73
- }
74
- function lowerBound(haystack, needle, index) {
75
- for (let i = index - 1; i >= 0; index = i--) {
76
- if (haystack[i][COLUMN] !== needle) break;
77
- }
78
- return index;
79
- }
80
- function memoizedState() {
81
- return {
82
- lastKey: -1,
83
- lastNeedle: -1,
84
- lastIndex: -1
85
- };
86
- }
87
- function memoizedBinarySearch(haystack, needle, state, key) {
88
- const { lastKey, lastNeedle, lastIndex } = state;
89
- let low = 0;
90
- let high = haystack.length - 1;
91
- if (key === lastKey) {
92
- if (needle === lastNeedle) {
93
- found = lastIndex !== -1 && haystack[lastIndex][COLUMN] === needle;
94
- return lastIndex;
95
- }
96
- if (needle >= lastNeedle) {
97
- low = lastIndex === -1 ? 0 : lastIndex;
98
- } else {
99
- high = lastIndex;
100
- }
101
- }
102
- state.lastKey = key;
103
- state.lastNeedle = needle;
104
- return state.lastIndex = binarySearch(haystack, needle, low, high);
105
- }
106
-
107
- // src/types.ts
108
- function parse(map) {
109
- return typeof map === "string" ? JSON.parse(map) : map;
110
- }
111
- var TraceMap = class {
112
- constructor(map, mapUrl) {
113
- const isString = typeof map === "string";
114
- if (!isString && map._decodedMemo) return map;
115
- const parsed = parse(map);
116
- const { version, file, names, sourceRoot, sources, sourcesContent } = parsed;
117
- this.version = version;
118
- this.file = file;
119
- this.names = names || [];
120
- this.sourceRoot = sourceRoot;
121
- this.sources = sources;
122
- this.sourcesContent = sourcesContent;
123
- this.ignoreList = parsed.ignoreList || parsed.x_google_ignoreList || void 0;
124
- const resolve = resolver(mapUrl, sourceRoot);
125
- this.resolvedSources = sources.map(resolve);
126
- const { mappings } = parsed;
127
- if (typeof mappings === "string") {
128
- this._encoded = mappings;
129
- this._decoded = void 0;
130
- } else if (Array.isArray(mappings)) {
131
- this._encoded = void 0;
132
- this._decoded = maybeSort(mappings, isString);
133
- } else if (parsed.sections) {
134
- throw new Error(`TraceMap passed sectioned source map, please use FlattenMap export instead`);
135
- } else {
136
- throw new Error(`invalid source map: ${JSON.stringify(parsed)}`);
137
- }
138
- this._decodedMemo = memoizedState();
139
- this._bySources = void 0;
140
- this._bySourceMemos = void 0;
141
- }
142
- };
143
- function cast(map) {
144
- return map;
145
- }
146
- function decodedMappings(map) {
147
- var _a;
148
- return (_a = cast(map))._decoded || (_a._decoded = decode(cast(map)._encoded));
149
- }
150
- function traceSegment(map, line, column) {
151
- const decoded = decodedMappings(map);
152
- if (line >= decoded.length) return null;
153
- const segments = decoded[line];
154
- const index = traceSegmentInternal(
155
- segments,
156
- cast(map)._decodedMemo,
157
- line,
158
- column);
159
- return index === -1 ? null : segments[index];
160
- }
161
- function traceSegmentInternal(segments, memo, line, column, bias) {
162
- let index = memoizedBinarySearch(segments, column, memo, line);
163
- if (found) {
164
- index = (lowerBound)(segments, column, index);
165
- }
166
- if (index === -1 || index === segments.length) return -1;
167
- return index;
168
- }
169
-
170
- export { TraceMap as T, decodedMappings as d, traceSegment as t };
@@ -1,89 +0,0 @@
1
- import path from 'node:path';
2
-
3
- function matches(pattern, importee) {
4
- if (pattern instanceof RegExp) {
5
- return pattern.test(importee);
6
- }
7
- if (importee.length < pattern.length) {
8
- return false;
9
- }
10
- if (importee === pattern) {
11
- return true;
12
- }
13
- // eslint-disable-next-line prefer-template
14
- return importee.startsWith(pattern + '/');
15
- }
16
- function getEntries({ entries, customResolver }) {
17
- if (!entries) {
18
- return [];
19
- }
20
- const resolverFunctionFromOptions = resolveCustomResolver(customResolver);
21
- if (Array.isArray(entries)) {
22
- return entries.map((entry) => {
23
- return {
24
- find: entry.find,
25
- replacement: entry.replacement,
26
- resolverFunction: resolveCustomResolver(entry.customResolver) || resolverFunctionFromOptions
27
- };
28
- });
29
- }
30
- return Object.entries(entries).map(([key, value]) => {
31
- return { find: key, replacement: value, resolverFunction: resolverFunctionFromOptions };
32
- });
33
- }
34
- function getHookFunction(hook) {
35
- if (typeof hook === 'function') {
36
- return hook;
37
- }
38
- if (hook && 'handler' in hook && typeof hook.handler === 'function') {
39
- return hook.handler;
40
- }
41
- return null;
42
- }
43
- function resolveCustomResolver(customResolver) {
44
- if (typeof customResolver === 'function') {
45
- return customResolver;
46
- }
47
- if (customResolver) {
48
- return getHookFunction(customResolver.resolveId);
49
- }
50
- return null;
51
- }
52
- function alias(options = {}) {
53
- const entries = getEntries(options);
54
- if (entries.length === 0) {
55
- return {
56
- name: 'alias',
57
- resolveId: () => null
58
- };
59
- }
60
- return {
61
- name: 'alias',
62
- async buildStart(inputOptions) {
63
- await Promise.all([...(Array.isArray(options.entries) ? options.entries : []), options].map(({ customResolver }) => customResolver && getHookFunction(customResolver.buildStart)?.call(this, inputOptions)));
64
- },
65
- resolveId(importee, importer, resolveOptions) {
66
- // First match is supposed to be the correct one
67
- const matchedEntry = entries.find((entry) => matches(entry.find, importee));
68
- if (!matchedEntry) {
69
- return null;
70
- }
71
- const updatedId = importee.replace(matchedEntry.find, matchedEntry.replacement);
72
- if (matchedEntry.resolverFunction) {
73
- return matchedEntry.resolverFunction.call(this, updatedId, importer, resolveOptions);
74
- }
75
- return this.resolve(updatedId, importer, Object.assign({ skipSelf: true }, resolveOptions)).then((resolved) => {
76
- if (resolved)
77
- return resolved;
78
- if (!path.isAbsolute(updatedId)) {
79
- this.warn(`rewrote ${importee} to ${updatedId} but was not an absolute path and was not handled by other plugins. ` +
80
- `This will lead to duplicated modules for the same path. ` +
81
- `To avoid duplicating modules, you should resolve to an absolute path.`);
82
- }
83
- return { id: updatedId };
84
- });
85
- }
86
- };
87
- }
88
-
89
- export { alias as a };