@depup/nitro 3.0.260311-beta-depup.0

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 (370) hide show
  1. package/LICENSE +27 -0
  2. package/README.md +32 -0
  3. package/changes.json +14 -0
  4. package/dist/THIRD-PARTY-LICENSES.md +1646 -0
  5. package/dist/_build/common.mjs +29361 -0
  6. package/dist/_build/rolldown.mjs +173 -0
  7. package/dist/_build/rollup.mjs +194 -0
  8. package/dist/_build/vite.build.mjs +18 -0
  9. package/dist/_chunks/nitro.mjs +1159 -0
  10. package/dist/_chunks/nitro2.mjs +102 -0
  11. package/dist/_chunks/nitro3.mjs +129 -0
  12. package/dist/_chunks/utils.mjs +272 -0
  13. package/dist/_common.mjs +35 -0
  14. package/dist/_dev.d.mts +12 -0
  15. package/dist/_dev.mjs +519 -0
  16. package/dist/_libs/_.mjs +3 -0
  17. package/dist/_libs/_2.mjs +2 -0
  18. package/dist/_libs/_3.mjs +3 -0
  19. package/dist/_libs/_4.mjs +2 -0
  20. package/dist/_libs/_5.mjs +3 -0
  21. package/dist/_libs/_6.mjs +4 -0
  22. package/dist/_libs/_7.mjs +5 -0
  23. package/dist/_libs/c12+rc9.mjs +812 -0
  24. package/dist/_libs/c12+readdirp+chokidar.d.mts +230 -0
  25. package/dist/_libs/citty.mjs +361 -0
  26. package/dist/_libs/commondir+is-reference.mjs +1311 -0
  27. package/dist/_libs/compatx.d.mts +47 -0
  28. package/dist/_libs/compatx.mjs +45 -0
  29. package/dist/_libs/esbuild.d.mts +20 -0
  30. package/dist/_libs/escape-string-regexp.mjs +7 -0
  31. package/dist/_libs/estree+pluginutils.d.mts +241 -0
  32. package/dist/_libs/estree-walker.mjs +184 -0
  33. package/dist/_libs/exsolve.d.mts +1 -0
  34. package/dist/_libs/hasown+resolve+deepmerge.mjs +1949 -0
  35. package/dist/_libs/httpxy.d.mts +82 -0
  36. package/dist/_libs/httpxy.mjs +671 -0
  37. package/dist/_libs/js-tokens.d.mts +1 -0
  38. package/dist/_libs/klona.mjs +37 -0
  39. package/dist/_libs/magic-string.d.mts +220 -0
  40. package/dist/_libs/mlly.d.mts +57 -0
  41. package/dist/_libs/nypm+tinyexec.mjs +845 -0
  42. package/dist/_libs/perfect-debounce.mjs +88 -0
  43. package/dist/_libs/pkg-types.d.mts +23 -0
  44. package/dist/_libs/plugin-alias.mjs +64 -0
  45. package/dist/_libs/plugin-inject.mjs +131 -0
  46. package/dist/_libs/plugin-json.mjs +34 -0
  47. package/dist/_libs/pluginutils.mjs +646 -0
  48. package/dist/_libs/readdirp+chokidar.mjs +1606 -0
  49. package/dist/_libs/remapping.mjs +115 -0
  50. package/dist/_libs/resolve-uri+gen-mapping.mjs +442 -0
  51. package/dist/_libs/rou3.d.mts +44 -0
  52. package/dist/_libs/rou3.mjs +496 -0
  53. package/dist/_libs/std-env.d.mts +12 -0
  54. package/dist/_libs/strip-literal.d.mts +1 -0
  55. package/dist/_libs/tsconfck.mjs +813 -0
  56. package/dist/_libs/ultrahtml.mjs +127 -0
  57. package/dist/_libs/unimport+unplugin.mjs +1684 -0
  58. package/dist/_libs/unplugin+unimport.d.mts +423 -0
  59. package/dist/_libs/unwasm.d.mts +29 -0
  60. package/dist/_presets.mjs +1759 -0
  61. package/dist/builder.d.mts +64 -0
  62. package/dist/builder.mjs +15 -0
  63. package/dist/cli/_chunks/build.mjs +47 -0
  64. package/dist/cli/_chunks/common.mjs +14 -0
  65. package/dist/cli/_chunks/deploy.mjs +40 -0
  66. package/dist/cli/_chunks/dev.mjs +62 -0
  67. package/dist/cli/_chunks/docs.mjs +30 -0
  68. package/dist/cli/_chunks/list.mjs +25 -0
  69. package/dist/cli/_chunks/prepare.mjs +17 -0
  70. package/dist/cli/_chunks/preview.mjs +51 -0
  71. package/dist/cli/_chunks/run.mjs +53 -0
  72. package/dist/cli/_chunks/task.mjs +14 -0
  73. package/dist/cli/index.d.mts +1 -0
  74. package/dist/cli/index.mjs +22 -0
  75. package/dist/node_modules/@poppinss/colors/build/index.js +139 -0
  76. package/dist/node_modules/@poppinss/colors/package.json +118 -0
  77. package/dist/node_modules/@poppinss/dumper/build/chunk-26HALFTP.js +602 -0
  78. package/dist/node_modules/@poppinss/dumper/build/formatters/console/main.js +441 -0
  79. package/dist/node_modules/@poppinss/dumper/build/formatters/html/main.js +725 -0
  80. package/dist/node_modules/@poppinss/dumper/package.json +122 -0
  81. package/dist/node_modules/@poppinss/exception/build/index.js +44 -0
  82. package/dist/node_modules/@poppinss/exception/package.json +109 -0
  83. package/dist/node_modules/@sindresorhus/is/distribution/index.js +1354 -0
  84. package/dist/node_modules/@sindresorhus/is/distribution/utilities.js +3 -0
  85. package/dist/node_modules/@sindresorhus/is/package.json +81 -0
  86. package/dist/node_modules/@speed-highlight/core/dist/index.js +4 -0
  87. package/dist/node_modules/@speed-highlight/core/dist/terminal.js +2 -0
  88. package/dist/node_modules/@speed-highlight/core/package.json +94 -0
  89. package/dist/node_modules/cookie-es/dist/index.mjs +262 -0
  90. package/dist/node_modules/cookie-es/package.json +37 -0
  91. package/dist/node_modules/croner/dist/croner.js +1 -0
  92. package/dist/node_modules/croner/package.json +73 -0
  93. package/dist/node_modules/defu/dist/defu.mjs +69 -0
  94. package/dist/node_modules/defu/package.json +43 -0
  95. package/dist/node_modules/destr/dist/index.mjs +72 -0
  96. package/dist/node_modules/destr/package.json +47 -0
  97. package/dist/node_modules/error-stack-parser-es/dist/index.mjs +38 -0
  98. package/dist/node_modules/error-stack-parser-es/dist/lite.mjs +167 -0
  99. package/dist/node_modules/error-stack-parser-es/package.json +83 -0
  100. package/dist/node_modules/get-port-please/dist/index.mjs +430 -0
  101. package/dist/node_modules/get-port-please/package.json +39 -0
  102. package/dist/node_modules/kleur/index.mjs +110 -0
  103. package/dist/node_modules/kleur/package.json +51 -0
  104. package/dist/node_modules/rendu/dist/index.mjs +380 -0
  105. package/dist/node_modules/rendu/package.json +47 -0
  106. package/dist/node_modules/scule/dist/index.mjs +80 -0
  107. package/dist/node_modules/scule/package.json +43 -0
  108. package/dist/node_modules/source-map/lib/array-set.js +100 -0
  109. package/dist/node_modules/source-map/lib/base64-vlq.js +94 -0
  110. package/dist/node_modules/source-map/lib/base64.js +19 -0
  111. package/dist/node_modules/source-map/lib/binary-search.js +113 -0
  112. package/dist/node_modules/source-map/lib/mapping-list.js +83 -0
  113. package/dist/node_modules/source-map/lib/mappings.wasm +0 -0
  114. package/dist/node_modules/source-map/lib/read-wasm.js +27 -0
  115. package/dist/node_modules/source-map/lib/source-map-consumer.js +1081 -0
  116. package/dist/node_modules/source-map/lib/source-map-generator.js +439 -0
  117. package/dist/node_modules/source-map/lib/source-node.js +430 -0
  118. package/dist/node_modules/source-map/lib/url.js +13 -0
  119. package/dist/node_modules/source-map/lib/util.js +444 -0
  120. package/dist/node_modules/source-map/lib/wasm.js +138 -0
  121. package/dist/node_modules/source-map/package.json +79 -0
  122. package/dist/node_modules/source-map/source-map.js +10 -0
  123. package/dist/node_modules/supports-color/index.js +202 -0
  124. package/dist/node_modules/supports-color/package.json +64 -0
  125. package/dist/node_modules/ufo/dist/index.mjs +645 -0
  126. package/dist/node_modules/ufo/package.json +48 -0
  127. package/dist/node_modules/unctx/dist/index.mjs +131 -0
  128. package/dist/node_modules/unctx/package.json +67 -0
  129. package/dist/node_modules/youch/build/helpers-B9BQYaS6.js +23 -0
  130. package/dist/node_modules/youch/build/index.js +212 -0
  131. package/dist/node_modules/youch/build/public/error_cause/style.css +5 -0
  132. package/dist/node_modules/youch/build/public/error_info/script.js +13 -0
  133. package/dist/node_modules/youch/build/public/error_info/style.css +145 -0
  134. package/dist/node_modules/youch/build/public/error_metadata/style.css +3 -0
  135. package/dist/node_modules/youch/build/public/error_stack/script.js +72 -0
  136. package/dist/node_modules/youch/build/public/error_stack/style.css +219 -0
  137. package/dist/node_modules/youch/build/public/error_stack_source/style.css +123 -0
  138. package/dist/node_modules/youch/build/public/header/script.js +14 -0
  139. package/dist/node_modules/youch/build/public/header/style.css +56 -0
  140. package/dist/node_modules/youch/build/public/layout/script.js +12 -0
  141. package/dist/node_modules/youch/build/public/layout/style.css +435 -0
  142. package/dist/node_modules/youch/build/public_dir-C5bujZKB.js +25 -0
  143. package/dist/node_modules/youch/build/src/templates/error_cause/main.js +44 -0
  144. package/dist/node_modules/youch/build/src/templates/error_info/main.js +72 -0
  145. package/dist/node_modules/youch/build/src/templates/error_metadata/main.js +65 -0
  146. package/dist/node_modules/youch/build/src/templates/error_stack/main.js +152 -0
  147. package/dist/node_modules/youch/build/src/templates/error_stack_source/main.js +46 -0
  148. package/dist/node_modules/youch/build/src/templates/header/main.js +24 -0
  149. package/dist/node_modules/youch/build/src/templates/layout/main.js +27 -0
  150. package/dist/node_modules/youch/package.json +135 -0
  151. package/dist/node_modules/youch-core/build/index.js +316 -0
  152. package/dist/node_modules/youch-core/package.json +124 -0
  153. package/dist/presets/_nitro/runtime/nitro-dev.mjs +20 -0
  154. package/dist/presets/_nitro/runtime/nitro-prerenderer.mjs +15 -0
  155. package/dist/presets/_nitro/runtime/service-worker.mjs +23 -0
  156. package/dist/presets/aws-amplify/runtime/aws-amplify.mjs +14 -0
  157. package/dist/presets/aws-lambda/runtime/_utils.mjs +116 -0
  158. package/dist/presets/aws-lambda/runtime/aws-lambda-streaming.mjs +31 -0
  159. package/dist/presets/aws-lambda/runtime/aws-lambda.mjs +13 -0
  160. package/dist/presets/azure/runtime/_utils.mjs +50 -0
  161. package/dist/presets/azure/runtime/azure-swa.mjs +30 -0
  162. package/dist/presets/bun/runtime/bun.mjs +40 -0
  163. package/dist/presets/cloudflare/runtime/_module-handler.mjs +87 -0
  164. package/dist/presets/cloudflare/runtime/cloudflare-durable.mjs +72 -0
  165. package/dist/presets/cloudflare/runtime/cloudflare-module.mjs +17 -0
  166. package/dist/presets/cloudflare/runtime/cloudflare-pages.mjs +39 -0
  167. package/dist/presets/cloudflare/runtime/plugin.dev.mjs +96 -0
  168. package/dist/presets/cloudflare/runtime/shims/workers.dev.mjs +27 -0
  169. package/dist/presets/deno/runtime/deno-deploy.mjs +19 -0
  170. package/dist/presets/deno/runtime/deno-server.mjs +39 -0
  171. package/dist/presets/netlify/runtime/netlify-edge.mjs +20 -0
  172. package/dist/presets/netlify/runtime/netlify.mjs +20 -0
  173. package/dist/presets/node/runtime/node-cluster.mjs +54 -0
  174. package/dist/presets/node/runtime/node-middleware.mjs +14 -0
  175. package/dist/presets/node/runtime/node-server.mjs +47 -0
  176. package/dist/presets/standard/runtime/server.mjs +4 -0
  177. package/dist/presets/stormkit/runtime/stormkit.mjs +27 -0
  178. package/dist/presets/vercel/runtime/cron-handler.mjs +25 -0
  179. package/dist/presets/vercel/runtime/isr.mjs +19 -0
  180. package/dist/presets/vercel/runtime/vercel.node.mjs +24 -0
  181. package/dist/presets/vercel/runtime/vercel.web.mjs +23 -0
  182. package/dist/presets/winterjs/runtime/winterjs.mjs +91 -0
  183. package/dist/presets/zeabur/runtime/zeabur.mjs +4 -0
  184. package/dist/presets/zephyr/runtime/server.mjs +3 -0
  185. package/dist/runtime/app.d.mts +1 -0
  186. package/dist/runtime/app.mjs +1 -0
  187. package/dist/runtime/cache.d.mts +1 -0
  188. package/dist/runtime/cache.mjs +1 -0
  189. package/dist/runtime/config.d.mts +3 -0
  190. package/dist/runtime/config.mjs +4 -0
  191. package/dist/runtime/context.d.mts +1 -0
  192. package/dist/runtime/context.mjs +1 -0
  193. package/dist/runtime/database.d.mts +1 -0
  194. package/dist/runtime/database.mjs +1 -0
  195. package/dist/runtime/internal/app.d.mts +16 -0
  196. package/dist/runtime/internal/app.mjs +208 -0
  197. package/dist/runtime/internal/cache.d.mts +7 -0
  198. package/dist/runtime/internal/cache.mjs +41 -0
  199. package/dist/runtime/internal/context.d.mts +14 -0
  200. package/dist/runtime/internal/context.mjs +24 -0
  201. package/dist/runtime/internal/database.d.mts +2 -0
  202. package/dist/runtime/internal/database.mjs +12 -0
  203. package/dist/runtime/internal/empty.mjs +0 -0
  204. package/dist/runtime/internal/error/dev.d.mts +10 -0
  205. package/dist/runtime/internal/error/dev.mjs +121 -0
  206. package/dist/runtime/internal/error/hooks.d.mts +1 -0
  207. package/dist/runtime/internal/error/hooks.mjs +9 -0
  208. package/dist/runtime/internal/error/prod.d.mts +6 -0
  209. package/dist/runtime/internal/error/prod.mjs +40 -0
  210. package/dist/runtime/internal/error/utils.d.mts +8 -0
  211. package/dist/runtime/internal/error/utils.mjs +3 -0
  212. package/dist/runtime/internal/meta.d.mts +2 -0
  213. package/dist/runtime/internal/meta.mjs +3 -0
  214. package/dist/runtime/internal/plugin.d.mts +3 -0
  215. package/dist/runtime/internal/plugin.mjs +4 -0
  216. package/dist/runtime/internal/route-rules.d.mts +9 -0
  217. package/dist/runtime/internal/route-rules.mjs +72 -0
  218. package/dist/runtime/internal/routes/dev-tasks.d.mts +3 -0
  219. package/dist/runtime/internal/routes/dev-tasks.mjs +25 -0
  220. package/dist/runtime/internal/routes/openapi.d.mts +3 -0
  221. package/dist/runtime/internal/routes/openapi.mjs +94 -0
  222. package/dist/runtime/internal/routes/renderer-template.d.mts +2 -0
  223. package/dist/runtime/internal/routes/renderer-template.dev.d.mts +3 -0
  224. package/dist/runtime/internal/routes/renderer-template.dev.mjs +19 -0
  225. package/dist/runtime/internal/routes/renderer-template.mjs +4 -0
  226. package/dist/runtime/internal/routes/scalar.d.mts +3 -0
  227. package/dist/runtime/internal/routes/scalar.mjs +193 -0
  228. package/dist/runtime/internal/routes/swagger.d.mts +3 -0
  229. package/dist/runtime/internal/routes/swagger.mjs +42 -0
  230. package/dist/runtime/internal/runtime-config.d.mts +9 -0
  231. package/dist/runtime/internal/runtime-config.mjs +54 -0
  232. package/dist/runtime/internal/static.d.mts +3 -0
  233. package/dist/runtime/internal/static.mjs +67 -0
  234. package/dist/runtime/internal/storage.d.mts +2 -0
  235. package/dist/runtime/internal/storage.mjs +6 -0
  236. package/dist/runtime/internal/task.d.mts +19 -0
  237. package/dist/runtime/internal/task.mjs +69 -0
  238. package/dist/runtime/internal/vite/dev-entry.mjs +18 -0
  239. package/dist/runtime/internal/vite/dev-worker.mjs +264 -0
  240. package/dist/runtime/internal/vite/ssr-renderer.mjs +6 -0
  241. package/dist/runtime/meta.d.mts +5 -0
  242. package/dist/runtime/meta.mjs +27 -0
  243. package/dist/runtime/nitro.d.mts +11 -0
  244. package/dist/runtime/nitro.mjs +34 -0
  245. package/dist/runtime/runtime-config.d.mts +1 -0
  246. package/dist/runtime/runtime-config.mjs +1 -0
  247. package/dist/runtime/storage.d.mts +1 -0
  248. package/dist/runtime/storage.mjs +1 -0
  249. package/dist/runtime/task.d.mts +1 -0
  250. package/dist/runtime/task.mjs +1 -0
  251. package/dist/runtime/virtual/_runtime_warn.d.mts +1 -0
  252. package/dist/runtime/virtual/_runtime_warn.mjs +5 -0
  253. package/dist/runtime/virtual/database.d.mts +8 -0
  254. package/dist/runtime/virtual/database.mjs +2 -0
  255. package/dist/runtime/virtual/error-handler.d.mts +6 -0
  256. package/dist/runtime/virtual/error-handler.mjs +9 -0
  257. package/dist/runtime/virtual/feature-flags.d.mts +7 -0
  258. package/dist/runtime/virtual/feature-flags.mjs +7 -0
  259. package/dist/runtime/virtual/plugins.d.mts +3 -0
  260. package/dist/runtime/virtual/plugins.mjs +2 -0
  261. package/dist/runtime/virtual/polyfills.d.mts +3 -0
  262. package/dist/runtime/virtual/polyfills.mjs +2 -0
  263. package/dist/runtime/virtual/public-assets.d.mts +9 -0
  264. package/dist/runtime/virtual/public-assets.mjs +8 -0
  265. package/dist/runtime/virtual/renderer-template.d.mts +4 -0
  266. package/dist/runtime/virtual/renderer-template.mjs +7 -0
  267. package/dist/runtime/virtual/routing-meta.d.mts +7 -0
  268. package/dist/runtime/virtual/routing-meta.mjs +2 -0
  269. package/dist/runtime/virtual/routing.d.mts +8 -0
  270. package/dist/runtime/virtual/routing.mjs +11 -0
  271. package/dist/runtime/virtual/runtime-config.d.mts +3 -0
  272. package/dist/runtime/virtual/runtime-config.mjs +5 -0
  273. package/dist/runtime/virtual/server-assets.d.mts +7 -0
  274. package/dist/runtime/virtual/server-assets.mjs +12 -0
  275. package/dist/runtime/virtual/storage.d.mts +3 -0
  276. package/dist/runtime/virtual/storage.mjs +5 -0
  277. package/dist/runtime/virtual/tasks.d.mts +10 -0
  278. package/dist/runtime/virtual/tasks.mjs +3 -0
  279. package/dist/runtime/vite.d.mts +8 -0
  280. package/dist/runtime/vite.mjs +9 -0
  281. package/dist/types/index.d.mts +3010 -0
  282. package/dist/types/index.mjs +1 -0
  283. package/dist/vite.d.mts +52 -0
  284. package/dist/vite.mjs +740 -0
  285. package/lib/h3.d.mts +1 -0
  286. package/lib/h3.mjs +1 -0
  287. package/lib/tsconfig.json +27 -0
  288. package/lib/vite.types.d.mts +26 -0
  289. package/lib/vite.types.mjs +2 -0
  290. package/package.json +256 -0
  291. package/skills/nitro/SKILL.md +10 -0
  292. package/skills/nitro/docs/TOC.md +83 -0
  293. package/skills/nitro/docs/_navigation.json +679 -0
  294. package/skills/nitro/docs/config/index.md +1147 -0
  295. package/skills/nitro/docs/deploy/index.md +64 -0
  296. package/skills/nitro/docs/deploy/providers/alwaysdata.md +50 -0
  297. package/skills/nitro/docs/deploy/providers/aws-amplify.md +81 -0
  298. package/skills/nitro/docs/deploy/providers/aws.md +47 -0
  299. package/skills/nitro/docs/deploy/providers/azure.md +72 -0
  300. package/skills/nitro/docs/deploy/providers/cleavr.md +33 -0
  301. package/skills/nitro/docs/deploy/providers/cloudflare.md +375 -0
  302. package/skills/nitro/docs/deploy/providers/deno-deploy.md +66 -0
  303. package/skills/nitro/docs/deploy/providers/digitalocean.md +46 -0
  304. package/skills/nitro/docs/deploy/providers/firebase.md +32 -0
  305. package/skills/nitro/docs/deploy/providers/flightcontrol.md +67 -0
  306. package/skills/nitro/docs/deploy/providers/genezio.md +67 -0
  307. package/skills/nitro/docs/deploy/providers/github-pages.md +68 -0
  308. package/skills/nitro/docs/deploy/providers/gitlab-pages.md +37 -0
  309. package/skills/nitro/docs/deploy/providers/heroku.md +84 -0
  310. package/skills/nitro/docs/deploy/providers/iis.md +38 -0
  311. package/skills/nitro/docs/deploy/providers/koyeb.md +109 -0
  312. package/skills/nitro/docs/deploy/providers/netlify.md +47 -0
  313. package/skills/nitro/docs/deploy/providers/platform-sh.md +37 -0
  314. package/skills/nitro/docs/deploy/providers/render.md +37 -0
  315. package/skills/nitro/docs/deploy/providers/stormkit.md +24 -0
  316. package/skills/nitro/docs/deploy/providers/vercel.md +179 -0
  317. package/skills/nitro/docs/deploy/providers/zeabur.md +19 -0
  318. package/skills/nitro/docs/deploy/providers/zephyr.md +99 -0
  319. package/skills/nitro/docs/deploy/providers/zerops.md +102 -0
  320. package/skills/nitro/docs/deploy/runtimes/bun.md +15 -0
  321. package/skills/nitro/docs/deploy/runtimes/deno.md +19 -0
  322. package/skills/nitro/docs/deploy/runtimes/node.md +63 -0
  323. package/skills/nitro/docs/docs/assets.md +166 -0
  324. package/skills/nitro/docs/docs/cache.md +408 -0
  325. package/skills/nitro/docs/docs/configuration.md +256 -0
  326. package/skills/nitro/docs/docs/database.md +185 -0
  327. package/skills/nitro/docs/docs/index.md +56 -0
  328. package/skills/nitro/docs/docs/lifecycle.md +204 -0
  329. package/skills/nitro/docs/docs/migration.md +215 -0
  330. package/skills/nitro/docs/docs/nightly.md +31 -0
  331. package/skills/nitro/docs/docs/plugins.md +164 -0
  332. package/skills/nitro/docs/docs/quick-start.md +110 -0
  333. package/skills/nitro/docs/docs/renderer.md +322 -0
  334. package/skills/nitro/docs/docs/routing.md +711 -0
  335. package/skills/nitro/docs/docs/server-entry.md +239 -0
  336. package/skills/nitro/docs/docs/storage.md +261 -0
  337. package/skills/nitro/docs/docs/tasks.md +277 -0
  338. package/skills/nitro/docs/examples/api-routes.md +145 -0
  339. package/skills/nitro/docs/examples/auto-imports.md +93 -0
  340. package/skills/nitro/docs/examples/cached-handler.md +81 -0
  341. package/skills/nitro/docs/examples/custom-error-handler.md +98 -0
  342. package/skills/nitro/docs/examples/database.md +157 -0
  343. package/skills/nitro/docs/examples/elysia.md +70 -0
  344. package/skills/nitro/docs/examples/express.md +78 -0
  345. package/skills/nitro/docs/examples/fastify.md +79 -0
  346. package/skills/nitro/docs/examples/hello-world.md +68 -0
  347. package/skills/nitro/docs/examples/hono.md +74 -0
  348. package/skills/nitro/docs/examples/import-alias.md +100 -0
  349. package/skills/nitro/docs/examples/index.md +3 -0
  350. package/skills/nitro/docs/examples/middleware.md +91 -0
  351. package/skills/nitro/docs/examples/mono-jsx.md +68 -0
  352. package/skills/nitro/docs/examples/nano-jsx.md +70 -0
  353. package/skills/nitro/docs/examples/plugins.md +91 -0
  354. package/skills/nitro/docs/examples/renderer.md +113 -0
  355. package/skills/nitro/docs/examples/runtime-config.md +97 -0
  356. package/skills/nitro/docs/examples/server-fetch.md +87 -0
  357. package/skills/nitro/docs/examples/shiki.md +198 -0
  358. package/skills/nitro/docs/examples/virtual-routes.md +74 -0
  359. package/skills/nitro/docs/examples/vite-nitro-plugin.md +79 -0
  360. package/skills/nitro/docs/examples/vite-rsc.md +1041 -0
  361. package/skills/nitro/docs/examples/vite-ssr-html.md +217 -0
  362. package/skills/nitro/docs/examples/vite-ssr-preact.md +247 -0
  363. package/skills/nitro/docs/examples/vite-ssr-react.md +226 -0
  364. package/skills/nitro/docs/examples/vite-ssr-solid.md +256 -0
  365. package/skills/nitro/docs/examples/vite-ssr-tsr-react.md +442 -0
  366. package/skills/nitro/docs/examples/vite-ssr-tss-react.md +444 -0
  367. package/skills/nitro/docs/examples/vite-ssr-vue-router.md +616 -0
  368. package/skills/nitro/docs/examples/vite-trpc.md +335 -0
  369. package/skills/nitro/docs/examples/websocket.md +282 -0
  370. package/skills/nitro/docs/index.md +121 -0
@@ -0,0 +1,3010 @@
1
+ import { t as commonjs } from "../_libs/estree+pluginutils.mjs";
2
+ import { a as WatchConfigOptions, i as ResolvedConfig, n as ConfigWatcher, o as ChokidarOptions, r as DotenvOptions, t as C12InputConfig } from "../_libs/c12+readdirp+chokidar.mjs";
3
+ import { n as CompatibilityDates, r as DateString, t as CompatibilityDateSpec } from "../_libs/compatx.mjs";
4
+ import { t as ProxyServerOptions } from "../_libs/httpxy.mjs";
5
+ import { t as TSConfig } from "../_libs/pkg-types.mjs";
6
+ import { n as Unimport, t as UnimportPluginOptions } from "../_libs/unplugin+unimport.mjs";
7
+ import { t as UnwasmPluginOptions } from "../_libs/unwasm.mjs";
8
+ import { n as RouterContext, t as RouterCompilerOptions } from "../_libs/rou3.mjs";
9
+ import { t as ProviderName } from "../_libs/std-env.mjs";
10
+ import { ConsolaInstance, LogLevel } from "consola";
11
+ import { Hookable, HookableCore, NestedHooks } from "hookable";
12
+ import { version } from "nitro/meta";
13
+ import { EnvRunner, EnvRunnerData, FetchHandler, RunnerMessageListener, RunnerName, RunnerRPCHooks, UpgradeHandler, WorkerAddress, WorkerHooks } from "env-runner";
14
+ import { BasicAuthOptions, H3Core, HTTPError, HTTPEvent, HTTPHandler, HTTPMethod, Middleware, ProxyOptions } from "h3";
15
+ import { ServerRequest, ServerRequest as ServerRequest$1 } from "srvx";
16
+ import { Preset } from "unenv";
17
+ import { ConnectorName } from "db0";
18
+ import { BuiltinDriverName } from "unstorage";
19
+ import { InputOptions, MinifyOptions, OutputOptions, TransformOptions } from "rolldown";
20
+ import { InputOptions as InputOptions$1, OutputOptions as OutputOptions$1 } from "rollup";
21
+ import { Nitro as Nitro$1 } from "nitro/types";
22
+ import { FetchOptions, FetchRequest, FetchResponse } from "ofetch";
23
+ import * as ocache from "ocache";
24
+ import { CacheEntry, CacheOptions, ResponseCacheEntry } from "ocache";
25
+ import { ExecutionContext, ForwardableEmailMessage, MessageBatch, ScheduledController, TraceItem } from "@cloudflare/workers-types";
26
+ import { DurableObject } from "cloudflare:workers";
27
+
28
+ //#region src/types/fetch/fetch.d.ts
29
+ interface InternalApi {}
30
+ type RouterMethod = Lowercase<HTTPMethod>;
31
+ type NitroFetchRequest = Exclude<keyof InternalApi, `/_${string}` | `/api/_${string}`> | Exclude<FetchRequest, string> | (string & {});
32
+ type MiddlewareOf<Route extends string, Method extends RouterMethod | "default"> = Method extends keyof InternalApi[MatchedRoutes<Route>] ? InternalApi[MatchedRoutes<Route>][Method] : never;
33
+ type TypedInternalResponse<Route, Default = unknown, Method extends RouterMethod = RouterMethod> = Default extends string | boolean | number | null | void | object ? Default : Route extends string ? MiddlewareOf<Route, Method> extends never ? MiddlewareOf<Route, "default"> extends never ? Default : MiddlewareOf<Route, "default"> : MiddlewareOf<Route, Method> : Default;
34
+ type AvailableRouterMethod<R extends NitroFetchRequest> = R extends string ? keyof InternalApi[MatchedRoutes<R>] extends undefined ? RouterMethod : Extract<keyof InternalApi[MatchedRoutes<R>], "default"> extends undefined ? Extract<RouterMethod, keyof InternalApi[MatchedRoutes<R>]> : RouterMethod : RouterMethod;
35
+ interface NitroFetchOptions<R extends NitroFetchRequest, M extends AvailableRouterMethod<R> = AvailableRouterMethod<R>> extends FetchOptions {
36
+ method?: Uppercase<M> | M;
37
+ }
38
+ type ExtractedRouteMethod<R extends NitroFetchRequest, O extends NitroFetchOptions<R>> = O extends undefined ? "get" : Lowercase<Exclude<O["method"], undefined>> extends RouterMethod ? Lowercase<Exclude<O["method"], undefined>> : "get";
39
+ type Base$Fetch<DefaultT = unknown, DefaultR extends NitroFetchRequest = NitroFetchRequest> = <T = DefaultT, R extends NitroFetchRequest = DefaultR, O extends NitroFetchOptions<R> = NitroFetchOptions<R>>(request: R, opts?: O) => Promise<TypedInternalResponse<R, T, NitroFetchOptions<R> extends O ? "get" : ExtractedRouteMethod<R, O>>>;
40
+ interface $Fetch<DefaultT = unknown, DefaultR extends NitroFetchRequest = NitroFetchRequest> extends Base$Fetch<DefaultT, DefaultR> {
41
+ raw<T = DefaultT, R extends NitroFetchRequest = DefaultR, O extends NitroFetchOptions<R> = NitroFetchOptions<R>>(request: R, opts?: O): Promise<FetchResponse<TypedInternalResponse<R, T, NitroFetchOptions<R> extends O ? "get" : ExtractedRouteMethod<R, O>>>>;
42
+ create<T = DefaultT, R extends NitroFetchRequest = DefaultR>(defaults: FetchOptions): $Fetch<T, R>;
43
+ }
44
+ //#endregion
45
+ //#region src/types/fetch/_match.d.ts
46
+ type MatchResult<Key extends string, Exact extends boolean = false, Score extends any[] = [], catchAll extends boolean = false> = { [k in Key]: {
47
+ key: k;
48
+ exact: Exact;
49
+ score: Score;
50
+ catchAll: catchAll;
51
+ } }[Key];
52
+ type Subtract<Minuend extends any[] = [], Subtrahend extends any[] = []> = Minuend extends [...Subtrahend, ...infer Remainder] ? Remainder : never;
53
+ type TupleIfDiff<First extends string, Second extends string, Tuple extends any[] = []> = First extends `${Second}${infer Diff}` ? (Diff extends "" ? [] : Tuple) : [];
54
+ type MaxTuple<N extends any[] = [], T extends any[] = []> = {
55
+ current: T;
56
+ result: MaxTuple<N, ["", ...T]>;
57
+ }[[N["length"]] extends [Partial<T>["length"]] ? "current" : "result"];
58
+ type CalcMatchScore<Key extends string, Route extends string, Score extends any[] = [], Init extends boolean = false, FirstKeySegMatcher extends string = (Init extends true ? ":Invalid:" : "")> = `${Key}/` extends `${infer KeySeg}/${infer KeyRest}` ? KeySeg extends FirstKeySegMatcher ? Subtract<[...Score, ...TupleIfDiff<Route, Key, ["", ""]>], TupleIfDiff<Key, Route, ["", ""]>> : `${Route}/` extends `${infer RouteSeg}/${infer RouteRest}` ? `${RouteSeg}?` extends `${infer RouteSegWithoutQuery}?${string}` ? RouteSegWithoutQuery extends KeySeg ? CalcMatchScore<KeyRest, RouteRest, [...Score, "", ""]> : KeySeg extends `:${string}` ? RouteSegWithoutQuery extends "" ? never : CalcMatchScore<KeyRest, RouteRest, [...Score, ""]> : KeySeg extends RouteSegWithoutQuery ? CalcMatchScore<KeyRest, RouteRest, [...Score, ""]> : never : never : never : never;
59
+ type _MatchedRoutes<Route extends string, MatchedResultUnion extends MatchResult<string> = MatchResult<keyof InternalApi>> = MatchedResultUnion["key"] extends infer MatchedKeys ? MatchedKeys extends string ? Route extends MatchedKeys ? MatchResult<MatchedKeys, true> : MatchedKeys extends `${infer Root}/**${string}` ? MatchedKeys extends `${string}/**` ? Route extends `${Root}/${string}` ? MatchResult<MatchedKeys, false, [], true> : never : MatchResult<MatchedKeys, false, CalcMatchScore<Root, Route, [], true>> : MatchResult<MatchedKeys, false, CalcMatchScore<MatchedKeys, Route, [], true>> : never : never;
60
+ type MatchedRoutes<Route extends string, MatchedKeysResult extends MatchResult<string> = MatchResult<keyof InternalApi>, Matches extends MatchResult<string> = _MatchedRoutes<Route, MatchedKeysResult>> = Route extends "/" ? keyof InternalApi : Extract<Matches, {
61
+ exact: true;
62
+ }> extends never ? Extract<Exclude<Matches, {
63
+ score: never;
64
+ }>, {
65
+ score: MaxTuple<Matches["score"]>;
66
+ }>["key"] | Extract<Matches, {
67
+ catchAll: true;
68
+ }>["key"] : Extract<Matches, {
69
+ exact: true;
70
+ }>["key"];
71
+ //#endregion
72
+ //#region src/types/fetch/_serialize.d.ts
73
+ /**
74
+ * @link https://github.com/remix-run/remix/blob/2248669ed59fd716e267ea41df5d665d4781f4a9/packages/remix-server-runtime/serialize.ts
75
+ */
76
+ type JsonPrimitive = string | number | boolean | string | number | boolean | null;
77
+ type NonJsonPrimitive = undefined | Function | symbol;
78
+ type IsAny<T> = 0 extends 1 & T ? true : false;
79
+ type FilterKeys<TObj extends object, TFilter> = { [TKey in keyof TObj]: TObj[TKey] extends TFilter ? TKey : never }[keyof TObj];
80
+ type Serialize<T> = IsAny<T> extends true ? any : T extends JsonPrimitive | undefined ? T : T extends Map<any, any> | Set<any> ? Record<string, never> : T extends NonJsonPrimitive ? never : T extends {
81
+ toJSON(): infer U;
82
+ } ? U : T extends [] ? [] : T extends [unknown, ...unknown[]] ? SerializeTuple<T> : T extends ReadonlyArray<infer U> ? (U extends NonJsonPrimitive ? null : Serialize<U>)[] : T extends object ? SerializeObject<T> : never;
83
+ /** JSON serialize [tuples](https://www.typescriptlang.org/docs/handbook/2/objects.html#tuple-types) */
84
+ type SerializeTuple<T extends [unknown, ...unknown[]]> = { [k in keyof T]: T[k] extends NonJsonPrimitive ? null : Serialize<T[k]> };
85
+ /** JSON serialize objects (not including arrays) and classes */
86
+ type SerializeObject<T extends object> = { [k in keyof Omit<T, FilterKeys<T, NonJsonPrimitive>>]: Serialize<T[k]> };
87
+ /**
88
+ * @see https://github.com/ianstormtaylor/superstruct/blob/7973400cd04d8ad92bbdc2b6f35acbfb3c934079/src/utils.ts#L323-L325
89
+ */
90
+ type Simplify<TType> = TType extends any[] | Date ? TType : { [K in keyof TType]: Simplify<TType[K]> };
91
+ //#endregion
92
+ //#region src/types/runtime/asset.d.ts
93
+ interface PublicAsset {
94
+ type: string;
95
+ etag: string;
96
+ mtime: string;
97
+ path: string;
98
+ size: number;
99
+ encoding?: string;
100
+ data?: string;
101
+ }
102
+ interface AssetMeta {
103
+ type?: string;
104
+ etag?: string;
105
+ mtime?: string;
106
+ }
107
+ //#endregion
108
+ //#region src/types/runtime/cache.d.ts
109
+ interface CachedEventHandlerOptions extends Omit<ocache.CachedEventHandlerOptions<HTTPEvent & ocache.HTTPEvent>, "toResponse" | "createResponse" | "handleCacheHeaders"> {}
110
+ //#endregion
111
+ //#region src/types/runtime/nitro.d.ts
112
+ interface NitroApp {
113
+ fetch: (req: Request) => Response | Promise<Response>;
114
+ h3?: H3Core;
115
+ hooks?: HookableCore<NitroRuntimeHooks>;
116
+ captureError?: CaptureError;
117
+ }
118
+ interface NitroAppPlugin {
119
+ (nitro: NitroApp & {
120
+ hooks: NonNullable<NitroApp["hooks"]>;
121
+ }): void;
122
+ }
123
+ interface NitroAsyncContext {
124
+ request: ServerRequest$1;
125
+ }
126
+ interface RenderResponse {
127
+ body: any;
128
+ status: number;
129
+ statusText: string;
130
+ headers: Record<string, string>;
131
+ }
132
+ type RenderHandler = (event: HTTPEvent) => Partial<RenderResponse> | Promise<Partial<RenderResponse>>;
133
+ interface RenderContext {
134
+ event: HTTPEvent;
135
+ render: RenderHandler;
136
+ response?: Partial<RenderResponse>;
137
+ }
138
+ interface CapturedErrorContext {
139
+ event?: HTTPEvent;
140
+ tags?: string[];
141
+ }
142
+ type CaptureError = (error: Error, context: CapturedErrorContext) => void;
143
+ interface NitroRuntimeHooks {
144
+ close: () => void;
145
+ error: CaptureError;
146
+ request: (event: HTTPEvent) => void | Promise<void>;
147
+ response: (res: Response, event: HTTPEvent) => void | Promise<void>;
148
+ }
149
+ //#endregion
150
+ //#region src/types/runtime/task.d.ts
151
+ type MaybePromise$1<T> = T | Promise<T>;
152
+ /** @experimental */
153
+ interface TaskContext {}
154
+ /** @experimental */
155
+ interface TaskPayload {
156
+ [key: string]: unknown;
157
+ }
158
+ /** @experimental */
159
+ interface TaskMeta {
160
+ name?: string;
161
+ description?: string;
162
+ }
163
+ /** @experimental */
164
+ interface TaskEvent {
165
+ name: string;
166
+ payload: TaskPayload;
167
+ context: TaskContext;
168
+ }
169
+ /** @experimental */
170
+ interface TaskResult<RT = unknown> {
171
+ result?: RT;
172
+ }
173
+ /** @experimental */
174
+ interface Task<RT = unknown> {
175
+ meta?: TaskMeta;
176
+ run(event: TaskEvent): MaybePromise$1<{
177
+ result?: RT;
178
+ }>;
179
+ }
180
+ /** @experimental */
181
+ interface TaskRunnerOptions {
182
+ cwd?: string;
183
+ buildDir?: string;
184
+ }
185
+ //#endregion
186
+ //#region src/presets/aws-amplify/types.d.ts
187
+ type AmplifyImageSettings = {
188
+ /** Array of supported image widths */sizes: number[];
189
+ /**
190
+ * Array of allowed external domains that can use Image Optimization.
191
+ * Leave empty for only allowing the deployment domain to use Image Optimization.
192
+ */
193
+ domains: string[];
194
+ /**
195
+ * Array of allowed external patterns that can use Image Optimization.
196
+ * Similar to `domains` but provides more control with RegExp.
197
+ */
198
+ remotePatterns: {
199
+ /** The protocol of the allowed remote pattern. Can be `http` or `https`. */protocol?: "http" | "https";
200
+ /**
201
+ * The hostname of the allowed remote pattern.
202
+ * Can be literal or wildcard. Single `*` matches a single subdomain.
203
+ * Double `**` matches any number of subdomains.
204
+ * We will disallow blanket wildcards of `**` with nothing else.
205
+ */
206
+ hostname: string; /** The port of the allowed remote pattern. */
207
+ port?: string; /** The pathname of the allowed remote pattern. */
208
+ pathname?: string;
209
+ }[]; /** Array of allowed output image formats. */
210
+ formats: ("image/avif" | "image/webp" | "image/gif" | "image/png" | "image/jpeg")[]; /** Cache duration (in seconds) for the optimized images. */
211
+ minimumCacheTTL: number; /** Allow SVG input image URLs. This is disabled by default for security purposes. */
212
+ dangerouslyAllowSVG: boolean;
213
+ };
214
+ interface AWSAmplifyOptions {
215
+ catchAllStaticFallback?: boolean;
216
+ imageOptimization?: {
217
+ path?: string;
218
+ cacheControl?: string;
219
+ };
220
+ imageSettings?: AmplifyImageSettings;
221
+ runtime?: "nodejs20.x" | "nodejs22.x";
222
+ }
223
+ //#endregion
224
+ //#region src/presets/aws-lambda/types.d.ts
225
+ interface AwsLambdaOptions {
226
+ streaming?: boolean;
227
+ }
228
+ //#endregion
229
+ //#region src/presets/azure/types.d.ts
230
+ interface AzureOptions {
231
+ config?: {
232
+ platform?: {
233
+ apiRuntime?: string;
234
+ [key: string]: unknown;
235
+ };
236
+ navigationFallback?: {
237
+ rewrite?: string;
238
+ [key: string]: unknown;
239
+ };
240
+ [key: string]: unknown;
241
+ };
242
+ }
243
+ //#endregion
244
+ //#region src/presets/cloudflare/wrangler/environment.d.ts
245
+ /**
246
+ * Copyright (c) 2020 Cloudflare, Inc. <wrangler@cloudflare.com>
247
+ * https://github.com/cloudflare/workers-sdk/blob/main/LICENSE-MIT
248
+ * https://github.com/cloudflare/workers-sdk/blob/main/LICENSE-APACHE
249
+ *
250
+ * Source: https://github.com/cloudflare/workers-sdk/blob/main/packages/wrangler/src/config/environment.ts
251
+ */
252
+ /**
253
+ * The `Environment` interface declares all the configuration fields that
254
+ * can be specified for an environment.
255
+ *
256
+ * This could be the top-level default environment, or a specific named environment.
257
+ */
258
+ interface Environment extends EnvironmentInheritable, EnvironmentNonInheritable {}
259
+ type SimpleRoute = string;
260
+ type ZoneIdRoute = {
261
+ pattern: string;
262
+ zone_id: string;
263
+ custom_domain?: boolean;
264
+ };
265
+ type ZoneNameRoute = {
266
+ pattern: string;
267
+ zone_name: string;
268
+ custom_domain?: boolean;
269
+ };
270
+ type CustomDomainRoute = {
271
+ pattern: string;
272
+ custom_domain: boolean;
273
+ };
274
+ type Route$1 = SimpleRoute | ZoneIdRoute | ZoneNameRoute | CustomDomainRoute;
275
+ /**
276
+ * Configuration in wrangler for Cloudchamber
277
+ */
278
+ type CloudchamberConfig = {
279
+ image?: string;
280
+ location?: string;
281
+ instance_type?: "dev" | "basic" | "standard";
282
+ vcpu?: number;
283
+ memory?: string;
284
+ ipv4?: boolean;
285
+ };
286
+ /**
287
+ * Configuration for a container application
288
+ */
289
+ type ContainerApp = {
290
+ /**
291
+ * Name of the application
292
+ * @optional Defaults to `worker_name-class_name` if not specified.
293
+ */
294
+ name?: string;
295
+ /**
296
+ * Number of application instances
297
+ * @deprecated
298
+ * @hidden
299
+ */
300
+ instances?: number;
301
+ /**
302
+ * Number of maximum application instances.
303
+ * @optional
304
+ */
305
+ max_instances?: number;
306
+ /**
307
+ * The path to a Dockerfile, or an image URI for the Cloudflare registry.
308
+ */
309
+ image: string;
310
+ /**
311
+ * Build context of the application.
312
+ * @optional - defaults to the directory of `image`.
313
+ */
314
+ image_build_context?: string;
315
+ /**
316
+ * Image variables to be passed along the image at build time.
317
+ * @optional
318
+ */
319
+ image_vars?: Record<string, string>;
320
+ /**
321
+ * The class name of the Durable Object the container is connected to.
322
+ */
323
+ class_name: string;
324
+ /**
325
+ * The scheduling policy of the application
326
+ * @optional
327
+ * @default "default"
328
+ */
329
+ scheduling_policy?: "regional" | "moon" | "default";
330
+ /**
331
+ * The instance type to be used for the container. This sets preconfigured options for vcpu and memory
332
+ * @optional
333
+ */
334
+ instance_type?: "dev" | "basic" | "standard";
335
+ /**
336
+ * @deprecated Use top level `containers` fields instead.
337
+ * `configuration.image` should be `image`
338
+ * `configuration.disk` should be set via `instance_type`
339
+ * @hidden
340
+ */
341
+ configuration?: {
342
+ image?: string;
343
+ labels?: {
344
+ name: string;
345
+ value: string;
346
+ }[];
347
+ secrets?: {
348
+ name: string;
349
+ type: "env";
350
+ secret: string;
351
+ }[];
352
+ disk?: {
353
+ size: string;
354
+ };
355
+ };
356
+ /**
357
+ * Scheduling constraints
358
+ * @hidden
359
+ */
360
+ constraints?: {
361
+ regions?: string[];
362
+ cities?: string[];
363
+ tier?: number;
364
+ };
365
+ /**
366
+ * @deprecated use the `class_name` field instead.
367
+ * @hidden
368
+ */
369
+ durable_objects?: {
370
+ namespace_id: string;
371
+ };
372
+ /**
373
+ * How a rollout should be done, defining the size of it
374
+ * @optional
375
+ * @default 25
376
+ * */
377
+ rollout_step_percentage?: number;
378
+ /**
379
+ * How a rollout should be created. It supports the following modes:
380
+ * - full_auto: The container application will be rolled out fully automatically.
381
+ * - none: The container application won't have a roll out or update.
382
+ * - manual: The container application will be rollout fully by manually actioning progress steps.
383
+ * @optional
384
+ * @default "full_auto"
385
+ */
386
+ rollout_kind?: "full_auto" | "none" | "full_manual";
387
+ };
388
+ /**
389
+ * Configuration in wrangler for Durable Object Migrations
390
+ */
391
+ type DurableObjectMigration = {
392
+ /** A unique identifier for this migration. */tag: string; /** The new Durable Objects being defined. */
393
+ new_classes?: string[]; /** The new SQLite Durable Objects being defined. */
394
+ new_sqlite_classes?: string[]; /** The Durable Objects being renamed. */
395
+ renamed_classes?: {
396
+ from: string;
397
+ to: string;
398
+ }[]; /** The Durable Objects being removed. */
399
+ deleted_classes?: string[];
400
+ };
401
+ /**
402
+ * The `EnvironmentInheritable` interface declares all the configuration fields for an environment
403
+ * that can be inherited (and overridden) from the top-level environment.
404
+ */
405
+ interface EnvironmentInheritable {
406
+ /**
407
+ * The name of your Worker. Alphanumeric + dashes only.
408
+ *
409
+ * @inheritable
410
+ */
411
+ name: string | undefined;
412
+ /**
413
+ * This is the ID of the account associated with your zone.
414
+ * You might have more than one account, so make sure to use
415
+ * the ID of the account associated with the zone/route you
416
+ * provide, if you provide one. It can also be specified through
417
+ * the CLOUDFLARE_ACCOUNT_ID environment variable.
418
+ *
419
+ * @inheritable
420
+ */
421
+ account_id: string | undefined;
422
+ /**
423
+ * A date in the form yyyy-mm-dd, which will be used to determine
424
+ * which version of the Workers runtime is used.
425
+ *
426
+ * More details at https://developers.cloudflare.com/workers/configuration/compatibility-dates
427
+ *
428
+ * @inheritable
429
+ */
430
+ compatibility_date: string | undefined;
431
+ /**
432
+ * A list of flags that enable features from upcoming features of
433
+ * the Workers runtime, usually used together with compatibility_date.
434
+ *
435
+ * More details at https://developers.cloudflare.com/workers/configuration/compatibility-flags/
436
+ *
437
+ * @default []
438
+ * @inheritable
439
+ */
440
+ compatibility_flags: string[];
441
+ /**
442
+ * The entrypoint/path to the JavaScript file that will be executed.
443
+ *
444
+ * @inheritable
445
+ */
446
+ main: string | undefined;
447
+ /**
448
+ * If true then Wrangler will traverse the file tree below `base_dir`;
449
+ * Any files that match `rules` will be included in the deployed Worker.
450
+ * Defaults to true if `no_bundle` is true, otherwise false.
451
+ *
452
+ * @inheritable
453
+ */
454
+ find_additional_modules: boolean | undefined;
455
+ /**
456
+ * Determines whether Wrangler will preserve bundled file names.
457
+ * Defaults to false.
458
+ * If left unset, files will be named using the pattern ${fileHash}-${basename},
459
+ * for example, `34de60b44167af5c5a709e62a4e20c4f18c9e3b6-favicon.ico`.
460
+ *
461
+ * @inheritable
462
+ */
463
+ preserve_file_names: boolean | undefined;
464
+ /**
465
+ * The directory in which module rules should be evaluated when including additional files into a Worker deployment.
466
+ * This defaults to the directory containing the `main` entry point of the Worker if not specified.
467
+ *
468
+ * @inheritable
469
+ */
470
+ base_dir: string | undefined;
471
+ /**
472
+ * Whether we use <name>.<subdomain>.workers.dev to
473
+ * test and deploy your Worker.
474
+ *
475
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#workersdev
476
+ *
477
+ * @default true
478
+ * @breaking
479
+ * @inheritable
480
+ */
481
+ workers_dev: boolean | undefined;
482
+ /**
483
+ * Whether we use <version>-<name>.<subdomain>.workers.dev to
484
+ * serve Preview URLs for your Worker.
485
+ *
486
+ * @default true
487
+ * @inheritable
488
+ */
489
+ preview_urls: boolean | undefined;
490
+ /**
491
+ * A list of routes that your Worker should be published to.
492
+ * Only one of `routes` or `route` is required.
493
+ *
494
+ * Only required when workers_dev is false, and there's no scheduled Worker (see `triggers`)
495
+ *
496
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#types-of-routes
497
+ *
498
+ * @inheritable
499
+ */
500
+ routes: Route$1[] | undefined;
501
+ /**
502
+ * A route that your Worker should be published to. Literally
503
+ * the same as routes, but only one.
504
+ * Only one of `routes` or `route` is required.
505
+ *
506
+ * Only required when workers_dev is false, and there's no scheduled Worker
507
+ *
508
+ * @inheritable
509
+ */
510
+ route: Route$1 | undefined;
511
+ /**
512
+ * Path to a custom tsconfig
513
+ *
514
+ * @inheritable
515
+ */
516
+ tsconfig: string | undefined;
517
+ /**
518
+ * The function to use to replace jsx syntax.
519
+ *
520
+ * @default "React.createElement"
521
+ * @inheritable
522
+ */
523
+ jsx_factory: string;
524
+ /**
525
+ * The function to use to replace jsx fragment syntax.
526
+ *
527
+ * @default "React.Fragment"
528
+ * @inheritable
529
+ */
530
+ jsx_fragment: string;
531
+ /**
532
+ * A list of migrations that should be uploaded with your Worker.
533
+ *
534
+ * These define changes in your Durable Object declarations.
535
+ *
536
+ * More details at https://developers.cloudflare.com/workers/learning/using-durable-objects#configuring-durable-object-classes-with-migrations
537
+ *
538
+ * @default []
539
+ * @inheritable
540
+ */
541
+ migrations: DurableObjectMigration[];
542
+ /**
543
+ * "Cron" definitions to trigger a Worker's "scheduled" function.
544
+ *
545
+ * Lets you call Workers periodically, much like a cron job.
546
+ *
547
+ * More details here https://developers.cloudflare.com/workers/platform/cron-triggers
548
+ *
549
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#triggers
550
+ *
551
+ * @default {crons: undefined}
552
+ * @inheritable
553
+ */
554
+ triggers: {
555
+ crons: string[] | undefined;
556
+ };
557
+ /**
558
+ * Specify limits for runtime behavior.
559
+ * Only supported for the "standard" Usage Model
560
+ *
561
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#limits
562
+ *
563
+ * @inheritable
564
+ */
565
+ limits: UserLimits | undefined;
566
+ /**
567
+ * An ordered list of rules that define which modules to import,
568
+ * and what type to import them as. You will need to specify rules
569
+ * to use Text, Data, and CompiledWasm modules, or when you wish to
570
+ * have a .js file be treated as an ESModule instead of CommonJS.
571
+ *
572
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#bundling
573
+ *
574
+ * @inheritable
575
+ */
576
+ rules: Rule[];
577
+ /**
578
+ * Configures a custom build step to be run by Wrangler when building your Worker.
579
+ *
580
+ * Refer to the [custom builds documentation](https://developers.cloudflare.com/workers/cli-wrangler/configuration#build)
581
+ * for more details.
582
+ *
583
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#custom-builds
584
+ *
585
+ * @default {watch_dir:"./src"}
586
+ */
587
+ build: {
588
+ /** The command used to build your Worker. On Linux and macOS, the command is executed in the `sh` shell and the `cmd` shell for Windows. The `&&` and `||` shell operators may be used. */command?: string; /** The directory in which the command is executed. */
589
+ cwd?: string; /** The directory to watch for changes while using wrangler dev, defaults to the current working directory */
590
+ watch_dir?: string | string[];
591
+ };
592
+ /**
593
+ * Skip internal build steps and directly deploy script
594
+ * @inheritable
595
+ */
596
+ no_bundle: boolean | undefined;
597
+ /**
598
+ * Minify the script before uploading.
599
+ * @inheritable
600
+ */
601
+ minify: boolean | undefined;
602
+ /**
603
+ * Set the `name` property to the original name for functions and classes renamed during minification.
604
+ *
605
+ * See https://esbuild.github.io/api/#keep-names
606
+ *
607
+ * @default true
608
+ * @inheritable
609
+ */
610
+ keep_names: boolean | undefined;
611
+ /**
612
+ * Designates this Worker as an internal-only "first-party" Worker.
613
+ *
614
+ * @inheritable
615
+ */
616
+ first_party_worker: boolean | undefined;
617
+ /**
618
+ * List of bindings that you will send to logfwdr
619
+ *
620
+ * @default {bindings:[]}
621
+ * @inheritable
622
+ */
623
+ logfwdr: {
624
+ bindings: {
625
+ /** The binding name used to refer to logfwdr */name: string; /** The destination for this logged message */
626
+ destination: string;
627
+ }[];
628
+ };
629
+ /**
630
+ * Send Trace Events from this Worker to Workers Logpush.
631
+ *
632
+ * This will not configure a corresponding Logpush job automatically.
633
+ *
634
+ * For more information about Workers Logpush, see:
635
+ * https://blog.cloudflare.com/logpush-for-workers/
636
+ *
637
+ * @inheritable
638
+ */
639
+ logpush: boolean | undefined;
640
+ /**
641
+ * Include source maps when uploading this worker.
642
+ *
643
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#source-maps
644
+ *
645
+ * @inheritable
646
+ */
647
+ upload_source_maps: boolean | undefined;
648
+ /**
649
+ * Specify how the Worker should be located to minimize round-trip time.
650
+ *
651
+ * More details: https://developers.cloudflare.com/workers/platform/smart-placement/
652
+ *
653
+ * @inheritable
654
+ */
655
+ placement: {
656
+ mode: "off" | "smart";
657
+ hint?: string;
658
+ } | undefined;
659
+ /**
660
+ * Specify the directory of static assets to deploy/serve
661
+ *
662
+ * More details at https://developers.cloudflare.com/workers/frameworks/
663
+ *
664
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#assets
665
+ *
666
+ * @inheritable
667
+ */
668
+ assets: Assets | undefined;
669
+ /**
670
+ * Specify the observability behavior of the Worker.
671
+ *
672
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#observability
673
+ *
674
+ * @inheritable
675
+ */
676
+ observability: Observability | undefined;
677
+ /**
678
+ * Specify the compliance region mode of the Worker.
679
+ *
680
+ * Although if the user does not specify a compliance region, the default is `public`,
681
+ * it can be set to `undefined` in configuration to delegate to the CLOUDFLARE_COMPLIANCE_REGION environment variable.
682
+ */
683
+ compliance_region: "public" | "fedramp_high" | undefined;
684
+ }
685
+ type DurableObjectBindings = {
686
+ /** The name of the binding used to refer to the Durable Object */name: string; /** The exported class name of the Durable Object */
687
+ class_name: string; /** The script where the Durable Object is defined (if it's external to this Worker) */
688
+ script_name?: string; /** The service environment of the script_name to bind to */
689
+ environment?: string;
690
+ }[];
691
+ type WorkflowBinding = {
692
+ /** The name of the binding used to refer to the Workflow */binding: string; /** The name of the Workflow */
693
+ name: string; /** The exported class name of the Workflow */
694
+ class_name: string; /** The script where the Workflow is defined (if it's external to this Worker) */
695
+ script_name?: string; /** Whether the Workflow should be remote or not (only available under `--x-remote-bindings`) */
696
+ experimental_remote?: boolean;
697
+ };
698
+ /**
699
+ * The `EnvironmentNonInheritable` interface declares all the configuration fields for an environment
700
+ * that cannot be inherited from the top-level environment, and must be defined specifically.
701
+ *
702
+ * If any of these fields are defined at the top-level then they should also be specifically defined
703
+ * for each named environment.
704
+ */
705
+ interface EnvironmentNonInheritable {
706
+ /**
707
+ * A map of values to substitute when deploying your Worker.
708
+ *
709
+ * NOTE: This field is not automatically inherited from the top level environment,
710
+ * and so must be specified in every named environment.
711
+ *
712
+ * @default {}
713
+ * @nonInheritable
714
+ */
715
+ define: Record<string, string>;
716
+ /**
717
+ * A map of environment variables to set when deploying your Worker.
718
+ *
719
+ * NOTE: This field is not automatically inherited from the top level environment,
720
+ * and so must be specified in every named environment.
721
+ *
722
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#environment-variables
723
+ *
724
+ * @default {}
725
+ * @nonInheritable
726
+ */
727
+ vars: Record<string, unknown>;
728
+ /**
729
+ * A list of durable objects that your Worker should be bound to.
730
+ *
731
+ * For more information about Durable Objects, see the documentation at
732
+ * https://developers.cloudflare.com/workers/learning/using-durable-objects
733
+ *
734
+ * NOTE: This field is not automatically inherited from the top level environment,
735
+ * and so must be specified in every named environment.
736
+ *
737
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#durable-objects
738
+ *
739
+ * @default {bindings:[]}
740
+ * @nonInheritable
741
+ */
742
+ durable_objects: {
743
+ bindings: DurableObjectBindings;
744
+ };
745
+ /**
746
+ * A list of workflows that your Worker should be bound to.
747
+ *
748
+ * NOTE: This field is not automatically inherited from the top level environment,
749
+ * and so must be specified in every named environment.
750
+ *
751
+ * @default []
752
+ * @nonInheritable
753
+ */
754
+ workflows: WorkflowBinding[];
755
+ /**
756
+ * Cloudchamber configuration
757
+ *
758
+ * NOTE: This field is not automatically inherited from the top level environment,
759
+ * and so must be specified in every named environment.
760
+ *
761
+ * @default {}
762
+ * @nonInheritable
763
+ */
764
+ cloudchamber: CloudchamberConfig;
765
+ /**
766
+ * Container related configuration
767
+ *
768
+ * NOTE: This field is not automatically inherited from the top level environment,
769
+ * and so must be specified in every named environment.
770
+ *
771
+ * @default []
772
+ * @nonInheritable
773
+ */
774
+ containers?: ContainerApp[];
775
+ /**
776
+ * These specify any Workers KV Namespaces you want to
777
+ * access from inside your Worker.
778
+ *
779
+ * To learn more about KV Namespaces,
780
+ * see the documentation at https://developers.cloudflare.com/workers/learning/how-kv-works
781
+ *
782
+ * NOTE: This field is not automatically inherited from the top level environment,
783
+ * and so must be specified in every named environment.
784
+ *
785
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#kv-namespaces
786
+ *
787
+ * @default []
788
+ * @nonInheritable
789
+ */
790
+ kv_namespaces: {
791
+ /** The binding name used to refer to the KV Namespace */binding: string; /** The ID of the KV namespace */
792
+ id?: string; /** The ID of the KV namespace used during `wrangler dev` */
793
+ preview_id?: string; /** Whether the KV namespace should be remote or not (only available under `--x-remote-bindings`) */
794
+ experimental_remote?: boolean;
795
+ }[];
796
+ /**
797
+ * These specify bindings to send email from inside your Worker.
798
+ *
799
+ * NOTE: This field is not automatically inherited from the top level environment,
800
+ * and so must be specified in every named environment.
801
+ *
802
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#email-bindings
803
+ *
804
+ * @default []
805
+ * @nonInheritable
806
+ */
807
+ send_email: {
808
+ /** The binding name used to refer to the this binding */name: string; /** If this binding should be restricted to a specific verified address */
809
+ destination_address?: string; /** If this binding should be restricted to a set of verified addresses */
810
+ allowed_destination_addresses?: string[];
811
+ }[];
812
+ /**
813
+ * Specifies Queues that are bound to this Worker environment.
814
+ *
815
+ * NOTE: This field is not automatically inherited from the top level environment,
816
+ * and so must be specified in every named environment.
817
+ *
818
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#queues
819
+ *
820
+ * @default {consumers:[],producers:[]}
821
+ * @nonInheritable
822
+ */
823
+ queues: {
824
+ /** Producer bindings */producers?: {
825
+ /** The binding name used to refer to the Queue in the Worker. */binding: string; /** The name of this Queue. */
826
+ queue: string; /** The number of seconds to wait before delivering a message */
827
+ delivery_delay?: number; /** Whether the Queue producer should be remote or not (only available under `--x-remote-bindings`) */
828
+ experimental_remote?: boolean;
829
+ }[]; /** Consumer configuration */
830
+ consumers?: {
831
+ /** The name of the queue from which this consumer should consume. */queue: string; /** The consumer type, e.g., worker, http-pull, r2-bucket, etc. Default is worker. */
832
+ type?: string; /** The maximum number of messages per batch */
833
+ max_batch_size?: number; /** The maximum number of seconds to wait to fill a batch with messages. */
834
+ max_batch_timeout?: number; /** The maximum number of retries for each message. */
835
+ max_retries?: number; /** The queue to send messages that failed to be consumed. */
836
+ dead_letter_queue?: string; /** The maximum number of concurrent consumer Worker invocations. Leaving this unset will allow your consumer to scale to the maximum concurrency needed to keep up with the message backlog. */
837
+ max_concurrency?: number | null; /** The number of milliseconds to wait for pulled messages to become visible again */
838
+ visibility_timeout_ms?: number; /** The number of seconds to wait before retrying a message */
839
+ retry_delay?: number;
840
+ }[];
841
+ };
842
+ /**
843
+ * Specifies R2 buckets that are bound to this Worker environment.
844
+ *
845
+ * NOTE: This field is not automatically inherited from the top level environment,
846
+ * and so must be specified in every named environment.
847
+ *
848
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#r2-buckets
849
+ *
850
+ * @default []
851
+ * @nonInheritable
852
+ */
853
+ r2_buckets: {
854
+ /** The binding name used to refer to the R2 bucket in the Worker. */binding: string; /** The name of this R2 bucket at the edge. */
855
+ bucket_name?: string; /** The preview name of this R2 bucket at the edge. */
856
+ preview_bucket_name?: string; /** The jurisdiction that the bucket exists in. Default if not present. */
857
+ jurisdiction?: string; /** Whether the R2 bucket should be remote or not (only available under `--x-remote-bindings`) */
858
+ experimental_remote?: boolean;
859
+ }[];
860
+ /**
861
+ * Specifies D1 databases that are bound to this Worker environment.
862
+ *
863
+ * NOTE: This field is not automatically inherited from the top level environment,
864
+ * and so must be specified in every named environment.
865
+ *
866
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#d1-databases
867
+ *
868
+ * @default []
869
+ * @nonInheritable
870
+ */
871
+ d1_databases: {
872
+ /** The binding name used to refer to the D1 database in the Worker. */binding: string; /** The name of this D1 database. */
873
+ database_name?: string; /** The UUID of this D1 database (not required). */
874
+ database_id?: string; /** The UUID of this D1 database for Wrangler Dev (if specified). */
875
+ preview_database_id?: string; /** The name of the migrations table for this D1 database (defaults to 'd1_migrations'). */
876
+ migrations_table?: string; /** The path to the directory of migrations for this D1 database (defaults to './migrations'). */
877
+ migrations_dir?: string; /** Internal use only. */
878
+ database_internal_env?: string; /** Whether the D1 database should be remote or not (only available under `--x-remote-bindings`) */
879
+ experimental_remote?: boolean;
880
+ }[];
881
+ /**
882
+ * Specifies Vectorize indexes that are bound to this Worker environment.
883
+ *
884
+ * NOTE: This field is not automatically inherited from the top level environment,
885
+ * and so must be specified in every named environment.
886
+ *
887
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#vectorize-indexes
888
+ *
889
+ * @default []
890
+ * @nonInheritable
891
+ */
892
+ vectorize: {
893
+ /** The binding name used to refer to the Vectorize index in the Worker. */binding: string; /** The name of the index. */
894
+ index_name: string; /** Whether the Vectorize index should be remote or not (only available under `--x-remote-bindings`) */
895
+ experimental_remote?: boolean;
896
+ }[];
897
+ /**
898
+ * Specifies Hyperdrive configs that are bound to this Worker environment.
899
+ *
900
+ * NOTE: This field is not automatically inherited from the top level environment,
901
+ * and so must be specified in every named environment.
902
+ *
903
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#hyperdrive
904
+ *
905
+ * @default []
906
+ * @nonInheritable
907
+ */
908
+ hyperdrive: {
909
+ /** The binding name used to refer to the project in the Worker. */binding: string; /** The id of the database. */
910
+ id: string; /** The local database connection string for `wrangler dev` */
911
+ localConnectionString?: string;
912
+ }[];
913
+ /**
914
+ * Specifies service bindings (Worker-to-Worker) that are bound to this Worker environment.
915
+ *
916
+ * NOTE: This field is not automatically inherited from the top level environment,
917
+ * and so must be specified in every named environment.
918
+ *
919
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#service-bindings
920
+ *
921
+ * @default []
922
+ * @nonInheritable
923
+ */
924
+ services: {
925
+ /** The binding name used to refer to the bound service. */binding: string; /** The name of the service. */
926
+ service: string; /** The environment of the service (e.g. production, staging, etc). */
927
+ environment?: string; /** Optionally, the entrypoint (named export) of the service to bind to. */
928
+ entrypoint?: string; /** Optional properties that will be made available to the service via ctx.props. */
929
+ props?: Record<string, unknown>; /** Whether the service binding should be remote or not (only available under `--x-remote-bindings`) */
930
+ experimental_remote?: boolean;
931
+ }[] | undefined;
932
+ /**
933
+ * Specifies analytics engine datasets that are bound to this Worker environment.
934
+ *
935
+ * NOTE: This field is not automatically inherited from the top level environment,
936
+ * and so must be specified in every named environment.
937
+ *
938
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#analytics-engine-datasets
939
+ *
940
+ * @default []
941
+ * @nonInheritable
942
+ */
943
+ analytics_engine_datasets: {
944
+ /** The binding name used to refer to the dataset in the Worker. */binding: string; /** The name of this dataset to write to. */
945
+ dataset?: string;
946
+ }[];
947
+ /**
948
+ * A browser that will be usable from the Worker.
949
+ *
950
+ * NOTE: This field is not automatically inherited from the top level environment,
951
+ * and so must be specified in every named environment.
952
+ *
953
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#browser-rendering
954
+ *
955
+ * @default {}
956
+ * @nonInheritable
957
+ */
958
+ browser: {
959
+ binding: string; /** Whether the Browser binding should be remote or not (only available under `--x-remote-bindings`) */
960
+ experimental_remote?: boolean;
961
+ } | undefined;
962
+ /**
963
+ * Binding to the AI project.
964
+ *
965
+ * NOTE: This field is not automatically inherited from the top level environment,
966
+ * and so must be specified in every named environment.
967
+ *
968
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#workers-ai
969
+ *
970
+ * @default {}
971
+ * @nonInheritable
972
+ */
973
+ ai: {
974
+ binding: string;
975
+ staging?: boolean; /** Whether the AI binding should be remote or not (only available under `--x-remote-bindings`) */
976
+ experimental_remote?: boolean;
977
+ } | undefined;
978
+ /**
979
+ * Binding to Cloudflare Images
980
+ *
981
+ * NOTE: This field is not automatically inherited from the top level environment,
982
+ * and so must be specified in every named environment.
983
+ *
984
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#images
985
+ *
986
+ * @default {}
987
+ * @nonInheritable
988
+ */
989
+ images: {
990
+ binding: string; /** Whether the Images binding should be remote or not (only available under `--x-remote-bindings`) */
991
+ experimental_remote?: boolean;
992
+ } | undefined;
993
+ /**
994
+ * Binding to the Worker Version's metadata
995
+ */
996
+ version_metadata: {
997
+ binding: string;
998
+ } | undefined;
999
+ /**
1000
+ * "Unsafe" tables for features that aren't directly supported by wrangler.
1001
+ *
1002
+ * NOTE: This field is not automatically inherited from the top level environment,
1003
+ * and so must be specified in every named environment.
1004
+ *
1005
+ * @default {}
1006
+ * @nonInheritable
1007
+ */
1008
+ unsafe: {
1009
+ /**
1010
+ * A set of bindings that should be put into a Worker's upload metadata without changes. These
1011
+ * can be used to implement bindings for features that haven't released and aren't supported
1012
+ * directly by wrangler or miniflare.
1013
+ */
1014
+ bindings?: {
1015
+ name: string;
1016
+ type: string;
1017
+ [key: string]: unknown;
1018
+ }[];
1019
+ /**
1020
+ * Arbitrary key/value pairs that will be included in the uploaded metadata. Values specified
1021
+ * here will always be applied to metadata last, so can add new or override existing fields.
1022
+ */
1023
+ metadata?: {
1024
+ [key: string]: unknown;
1025
+ };
1026
+ /**
1027
+ * Used for internal capnp uploads for the Workers runtime
1028
+ */
1029
+ capnp?: {
1030
+ base_path: string;
1031
+ source_schemas: string[];
1032
+ compiled_schema?: never;
1033
+ } | {
1034
+ base_path?: never;
1035
+ source_schemas?: never;
1036
+ compiled_schema: string;
1037
+ };
1038
+ };
1039
+ /**
1040
+ * Specifies a list of mTLS certificates that are bound to this Worker environment.
1041
+ *
1042
+ * NOTE: This field is not automatically inherited from the top level environment,
1043
+ * and so must be specified in every named environment.
1044
+ *
1045
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#mtls-certificates
1046
+ *
1047
+ * @default []
1048
+ * @nonInheritable
1049
+ */
1050
+ mtls_certificates: {
1051
+ /** The binding name used to refer to the certificate in the Worker */binding: string; /** The uuid of the uploaded mTLS certificate */
1052
+ certificate_id: string; /** Whether the mtls fetcher should be remote or not (only available under `--x-remote-bindings`) */
1053
+ experimental_remote?: boolean;
1054
+ }[];
1055
+ /**
1056
+ * Specifies a list of Tail Workers that are bound to this Worker environment
1057
+ *
1058
+ * NOTE: This field is not automatically inherited from the top level environment,
1059
+ * and so must be specified in every named environment.
1060
+ *
1061
+ * @default []
1062
+ * @nonInheritable
1063
+ */
1064
+ tail_consumers?: TailConsumer[];
1065
+ /**
1066
+ * Specifies namespace bindings that are bound to this Worker environment.
1067
+ *
1068
+ * NOTE: This field is not automatically inherited from the top level environment,
1069
+ * and so must be specified in every named environment.
1070
+ *
1071
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#dispatch-namespace-bindings-workers-for-platforms
1072
+ *
1073
+ * @default []
1074
+ * @nonInheritable
1075
+ */
1076
+ dispatch_namespaces: {
1077
+ /** The binding name used to refer to the bound service. */binding: string; /** The namespace to bind to. */
1078
+ namespace: string; /** Details about the outbound Worker which will handle outbound requests from your namespace */
1079
+ outbound?: DispatchNamespaceOutbound; /** Whether the Dispatch Namespace should be remote or not (only available under `--x-remote-bindings`) */
1080
+ experimental_remote?: boolean;
1081
+ }[];
1082
+ /**
1083
+ * Specifies list of Pipelines bound to this Worker environment
1084
+ *
1085
+ * NOTE: This field is not automatically inherited from the top level environment,
1086
+ * and so must be specified in every named environment.
1087
+ *
1088
+ * @default []
1089
+ * @nonInheritable
1090
+ */
1091
+ pipelines: {
1092
+ /** The binding name used to refer to the bound service. */binding: string; /** Name of the Pipeline to bind */
1093
+ pipeline: string;
1094
+ }[];
1095
+ /**
1096
+ * Specifies Secret Store bindings that are bound to this Worker environment.
1097
+ *
1098
+ * NOTE: This field is not automatically inherited from the top level environment,
1099
+ * and so must be specified in every named environment.
1100
+ *
1101
+ * @default []
1102
+ * @nonInheritable
1103
+ */
1104
+ secrets_store_secrets: {
1105
+ /** The binding name used to refer to the bound service. */binding: string; /** Id of the secret store */
1106
+ store_id: string; /** Name of the secret */
1107
+ secret_name: string;
1108
+ }[];
1109
+ /**
1110
+ * **DO NOT USE**. Hello World Binding Config to serve as an explanatory example.
1111
+ *
1112
+ * NOTE: This field is not automatically inherited from the top level environment,
1113
+ * and so must be specified in every named environment.
1114
+ *
1115
+ * @default []
1116
+ * @nonInheritable
1117
+ */
1118
+ unsafe_hello_world: {
1119
+ /** The binding name used to refer to the bound service. */binding: string; /** Whether the timer is enabled */
1120
+ enable_timer?: boolean;
1121
+ }[];
1122
+ }
1123
+ /**
1124
+ * A bundling resolver rule, defining the modules type for paths that match the specified globs.
1125
+ */
1126
+ type Rule = {
1127
+ type: ConfigModuleRuleType;
1128
+ globs: string[];
1129
+ fallthrough?: boolean;
1130
+ };
1131
+ /**
1132
+ * The possible types for a `Rule`.
1133
+ */
1134
+ type ConfigModuleRuleType = "ESModule" | "CommonJS" | "CompiledWasm" | "Text" | "Data" | "PythonModule" | "PythonRequirement";
1135
+ type TailConsumer = {
1136
+ /** The name of the service tail events will be forwarded to. */service: string; /** (Optional) The environment of the service. */
1137
+ environment?: string;
1138
+ };
1139
+ interface DispatchNamespaceOutbound {
1140
+ /** Name of the service handling the outbound requests */
1141
+ service: string;
1142
+ /** (Optional) Name of the environment handling the outbound requests. */
1143
+ environment?: string;
1144
+ /** (Optional) List of parameter names, for sending context from your dispatch Worker to the outbound handler */
1145
+ parameters?: string[];
1146
+ }
1147
+ interface UserLimits {
1148
+ /** Maximum allowed CPU time for a Worker's invocation in milliseconds */
1149
+ cpu_ms: number;
1150
+ }
1151
+ type Assets = {
1152
+ /** Absolute path to assets directory */directory?: string; /** Name of `env` binding property in the User Worker. */
1153
+ binding?: string; /** How to handle HTML requests. */
1154
+ html_handling?: "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash" | "none"; /** How to handle requests that do not match an asset. */
1155
+ not_found_handling?: "single-page-application" | "404-page" | "none";
1156
+ /**
1157
+ * Matches will be routed to the User Worker, and matches to negative rules will go to the Asset Worker.
1158
+ *
1159
+ * Can also be `true`, indicating that every request should be routed to the User Worker.
1160
+ */
1161
+ run_worker_first?: string[] | boolean;
1162
+ };
1163
+ interface Observability {
1164
+ /** If observability is enabled for this Worker */
1165
+ enabled?: boolean;
1166
+ /** The sampling rate */
1167
+ head_sampling_rate?: number;
1168
+ logs?: {
1169
+ enabled?: boolean; /** The sampling rate */
1170
+ head_sampling_rate?: number; /** Set to false to disable invocation logs */
1171
+ invocation_logs?: boolean;
1172
+ };
1173
+ }
1174
+ //#endregion
1175
+ //#region src/presets/cloudflare/wrangler/config.d.ts
1176
+ /**
1177
+ * This is the static type definition for the configuration object.
1178
+ *
1179
+ * It reflects a normalized and validated version of the configuration that you can write in a Wrangler configuration file,
1180
+ * and optionally augment with arguments passed directly to wrangler.
1181
+ *
1182
+ * For more information about the configuration object, see the
1183
+ * documentation at https://developers.cloudflare.com/workers/cli-wrangler/configuration
1184
+ *
1185
+ * Notes:
1186
+ *
1187
+ * - Fields that are only specified in `ConfigFields` and not `Environment` can only appear
1188
+ * in the top level config and should not appear in any environments.
1189
+ * - Fields that are specified in `PagesConfigFields` are only relevant for Pages projects
1190
+ * - All top level fields in config and environments are optional in the Wrangler configuration file.
1191
+ *
1192
+ * Legend for the annotations:
1193
+ *
1194
+ * - `@breaking`: the deprecation/optionality is a breaking change from Wrangler v1.
1195
+ * - `@todo`: there's more work to be done (with details attached).
1196
+ */
1197
+ type Config = ComputedFields & ConfigFields<DevConfig> & PagesConfigFields & Environment;
1198
+ interface ComputedFields {
1199
+ /** The path to the Wrangler configuration file (if any, and possibly redirected from the user Wrangler configuration) used to create this configuration. */
1200
+ configPath: string | undefined;
1201
+ /** The path to the user's Wrangler configuration file (if any), which may have been redirected to another file that used to create this configuration. */
1202
+ userConfigPath: string | undefined;
1203
+ /**
1204
+ * The original top level name for the Worker in the raw configuration.
1205
+ *
1206
+ * When a raw configuration has been flattened to a single environment the worker name may have been replaced or transformed.
1207
+ * It can be useful to know what the top-level name was before the flattening.
1208
+ */
1209
+ topLevelName: string | undefined;
1210
+ }
1211
+ interface ConfigFields<Dev extends RawDevConfig> {
1212
+ /**
1213
+ * A boolean to enable "legacy" style wrangler environments (from Wrangler v1).
1214
+ * These have been superseded by Services, but there may be projects that won't
1215
+ * (or can't) use them. If you're using a legacy environment, you can set this
1216
+ * to `true` to enable it.
1217
+ */
1218
+ legacy_env: boolean;
1219
+ /**
1220
+ * Whether Wrangler should send usage metrics to Cloudflare for this project.
1221
+ *
1222
+ * When defined this will override any user settings.
1223
+ * Otherwise, Wrangler will use the user's preference.
1224
+ */
1225
+ send_metrics: boolean | undefined;
1226
+ /**
1227
+ * Options to configure the development server that your worker will use.
1228
+ */
1229
+ dev: Dev;
1230
+ /**
1231
+ * The definition of a Worker Site, a feature that lets you upload
1232
+ * static assets with your Worker.
1233
+ *
1234
+ * More details at https://developers.cloudflare.com/workers/platform/sites
1235
+ */
1236
+ site: {
1237
+ /**
1238
+ * The directory containing your static assets.
1239
+ *
1240
+ * It must be a path relative to your Wrangler configuration file.
1241
+ * Example: bucket = "./public"
1242
+ *
1243
+ * If there is a `site` field then it must contain this `bucket` field.
1244
+ */
1245
+ bucket: string;
1246
+ /**
1247
+ * The location of your Worker script.
1248
+ *
1249
+ * @deprecated DO NOT use this (it's a holdover from Wrangler v1.x). Either use the top level `main` field, or pass the path to your entry file as a command line argument.
1250
+ * @breaking
1251
+ */
1252
+ "entry-point"?: string;
1253
+ /**
1254
+ * An exclusive list of .gitignore-style patterns that match file
1255
+ * or directory names from your bucket location. Only matched
1256
+ * items will be uploaded. Example: include = ["upload_dir"]
1257
+ *
1258
+ * @optional
1259
+ * @default []
1260
+ */
1261
+ include?: string[];
1262
+ /**
1263
+ * A list of .gitignore-style patterns that match files or
1264
+ * directories in your bucket that should be excluded from
1265
+ * uploads. Example: exclude = ["ignore_dir"]
1266
+ *
1267
+ * @optional
1268
+ * @default []
1269
+ */
1270
+ exclude?: string[];
1271
+ } | undefined;
1272
+ /**
1273
+ * Old behaviour of serving a folder of static assets with your Worker,
1274
+ * without any additional code.
1275
+ * This can either be a string, or an object with additional config
1276
+ * fields.
1277
+ * Will be deprecated in the near future in favor of `assets`.
1278
+ */
1279
+ legacy_assets: {
1280
+ bucket: string;
1281
+ include: string[];
1282
+ exclude: string[];
1283
+ browser_TTL: number | undefined;
1284
+ serve_single_page_app: boolean;
1285
+ } | string | undefined;
1286
+ /**
1287
+ * A list of wasm modules that your worker should be bound to. This is
1288
+ * the "legacy" way of binding to a wasm module. ES module workers should
1289
+ * do proper module imports.
1290
+ */
1291
+ wasm_modules: {
1292
+ [key: string]: string;
1293
+ } | undefined;
1294
+ /**
1295
+ * A list of text files that your worker should be bound to. This is
1296
+ * the "legacy" way of binding to a text file. ES module workers should
1297
+ * do proper module imports.
1298
+ */
1299
+ text_blobs: {
1300
+ [key: string]: string;
1301
+ } | undefined;
1302
+ /**
1303
+ * A list of data files that your worker should be bound to. This is
1304
+ * the "legacy" way of binding to a data file. ES module workers should
1305
+ * do proper module imports.
1306
+ */
1307
+ data_blobs: {
1308
+ [key: string]: string;
1309
+ } | undefined;
1310
+ /**
1311
+ * A map of module aliases. Lets you swap out a module for any others.
1312
+ * Corresponds with esbuild's `alias` config
1313
+ */
1314
+ alias: {
1315
+ [key: string]: string;
1316
+ } | undefined;
1317
+ /**
1318
+ * By default, the Wrangler configuration file is the source of truth for your environment configuration, like a terraform file.
1319
+ *
1320
+ * If you change your vars in the dashboard, wrangler *will* override/delete them on its next deploy.
1321
+ *
1322
+ * If you want to keep your dashboard vars when wrangler deploys, set this field to true.
1323
+ *
1324
+ * @default false
1325
+ * @nonInheritable
1326
+ */
1327
+ keep_vars?: boolean;
1328
+ }
1329
+ interface PagesConfigFields {
1330
+ /**
1331
+ * The directory of static assets to serve.
1332
+ *
1333
+ * The presence of this field in a Wrangler configuration file indicates a Pages project,
1334
+ * and will prompt the handling of the configuration file according to the
1335
+ * Pages-specific validation rules.
1336
+ */
1337
+ pages_build_output_dir?: string;
1338
+ }
1339
+ interface DevConfig {
1340
+ /**
1341
+ * IP address for the local dev server to listen on,
1342
+ *
1343
+ * @default localhost
1344
+ */
1345
+ ip: string;
1346
+ /**
1347
+ * Port for the local dev server to listen on
1348
+ *
1349
+ * @default 8787
1350
+ */
1351
+ port: number | undefined;
1352
+ /**
1353
+ * Port for the local dev server's inspector to listen on
1354
+ *
1355
+ * @default 9229
1356
+ */
1357
+ inspector_port: number | undefined;
1358
+ /**
1359
+ * Protocol that local wrangler dev server listens to requests on.
1360
+ *
1361
+ * @default http
1362
+ */
1363
+ local_protocol: "http" | "https";
1364
+ /**
1365
+ * Protocol that wrangler dev forwards requests on
1366
+ *
1367
+ * Setting this to `http` is not currently implemented for remote mode.
1368
+ * See https://github.com/cloudflare/workers-sdk/issues/583
1369
+ *
1370
+ * @default https
1371
+ */
1372
+ upstream_protocol: "https" | "http";
1373
+ /**
1374
+ * Host to forward requests to, defaults to the host of the first route of project
1375
+ */
1376
+ host: string | undefined;
1377
+ }
1378
+ type RawDevConfig = Partial<DevConfig>;
1379
+ //#endregion
1380
+ //#region src/presets/cloudflare/types.d.ts
1381
+ type WranglerConfig = Partial<Omit<Config, keyof ComputedFields>>;
1382
+ /**
1383
+ * https://developers.cloudflare.com/pages/platform/functions/routing/#functions-invocation-routes
1384
+ */
1385
+ interface CloudflarePagesRoutes {
1386
+ /** Defines the version of the schema. Currently there is only one version of the schema (version 1), however, we may add more in the future and aim to be backwards compatible. */
1387
+ version?: 1;
1388
+ /** Defines routes that will be invoked by Functions. Accepts wildcard behavior. */
1389
+ include?: string[];
1390
+ /** Defines routes that will not be invoked by Functions. Accepts wildcard behavior. `exclude` always take priority over `include`. */
1391
+ exclude?: string[];
1392
+ }
1393
+ interface CloudflareOptions {
1394
+ /**
1395
+ * Configuration for the Cloudflare Deployments.
1396
+ *
1397
+ * **NOTE:** This option is only effective if `deployConfig` is enabled.
1398
+ */
1399
+ wrangler?: WranglerConfig;
1400
+ /**
1401
+ * Enable automatic generation of `.wrangler/deploy/config.json`.
1402
+ *
1403
+ * **IMPORTANT:** Enabling this option will cause settings from cloudflare dashboard (including environment variables) to be disabled and discarded.
1404
+ *
1405
+ * More info: https://developers.cloudflare.com/workers/wrangler/configuration#generated-wrangler-configuration
1406
+ */
1407
+ deployConfig?: boolean;
1408
+ /**
1409
+ * Enable native Node.js compatibility support.
1410
+ *
1411
+ * If this option disabled, pure unenv polyfills will be used instead.
1412
+ *
1413
+ * If not set, will be auto enabled if `nodejs_compat` or `nodejs_compat_v2` is detected in `wrangler.toml` or `wrangler.json`.
1414
+ */
1415
+ nodeCompat?: boolean;
1416
+ /**
1417
+ * Options for dev emulation.
1418
+ */
1419
+ dev?: {
1420
+ configPath?: string;
1421
+ environment?: string;
1422
+ persistDir?: string;
1423
+ };
1424
+ pages?: {
1425
+ /**
1426
+ * Nitro will automatically generate a `_routes.json` that controls which files get served statically and
1427
+ * which get served by the Worker. Using this config will override the automatic `_routes.json`. Or, if the
1428
+ * `merge` options is set, it will merge the user-set routes with the auto-generated ones, giving priority
1429
+ * to the user routes.
1430
+ *
1431
+ * @see https://developers.cloudflare.com/pages/platform/functions/routing/#functions-invocation-routes
1432
+ *
1433
+ * There are a maximum of 100 rules, and you must have at least one include rule. Wildcards are accepted.
1434
+ *
1435
+ * If any fields are unset, they default to:
1436
+ *
1437
+ * ```json
1438
+ * {
1439
+ * "version": 1,
1440
+ * "include": ["/*"],
1441
+ * "exclude": []
1442
+ * }
1443
+ * ```
1444
+ */
1445
+ routes?: CloudflarePagesRoutes;
1446
+ /**
1447
+ * If set to `false`, nitro will disable the automatically generated `_routes.json` and instead use the user-set only ones.
1448
+ *
1449
+ * @default true
1450
+ */
1451
+ defaultRoutes?: boolean;
1452
+ };
1453
+ /**
1454
+ * Custom Cloudflare exports additional classes such as WorkflowEntrypoint.
1455
+ */
1456
+ exports?: string;
1457
+ }
1458
+ type DurableObjectState = ConstructorParameters<typeof DurableObject>[0];
1459
+ declare module "nitro/types" {
1460
+ interface NitroRuntimeHooks {
1461
+ "cloudflare:scheduled": (_: {
1462
+ controller: ScheduledController;
1463
+ env: unknown;
1464
+ context: ExecutionContext;
1465
+ }) => void;
1466
+ "cloudflare:email": (_: {
1467
+ message: ForwardableEmailMessage; /** @deprecated please use `message` */
1468
+ event: ForwardableEmailMessage;
1469
+ env: unknown;
1470
+ context: ExecutionContext;
1471
+ }) => void;
1472
+ "cloudflare:queue": (_: {
1473
+ batch: MessageBatch; /** @deprecated please use `batch` */
1474
+ event: MessageBatch;
1475
+ env: unknown;
1476
+ context: ExecutionContext;
1477
+ }) => void;
1478
+ "cloudflare:tail": (_: {
1479
+ traces: TraceItem[];
1480
+ env: unknown;
1481
+ context: ExecutionContext;
1482
+ }) => void;
1483
+ "cloudflare:trace": (_: {
1484
+ traces: TraceItem[];
1485
+ env: unknown;
1486
+ context: ExecutionContext;
1487
+ }) => void;
1488
+ "cloudflare:durable:init": (durable: DurableObject, _: {
1489
+ state: DurableObjectState;
1490
+ env: unknown;
1491
+ }) => void;
1492
+ "cloudflare:durable:alarm": (durable: DurableObject) => void;
1493
+ }
1494
+ }
1495
+ //#endregion
1496
+ //#region src/presets/firebase/types.d.ts
1497
+ interface FirebaseOptions {
1498
+ appHosting: Partial<AppHostingOutputBundleConfig["runConfig"]>;
1499
+ }
1500
+ interface AppHostingOutputBundleConfig {
1501
+ version: "v1";
1502
+ runConfig: {
1503
+ /** Command to start the server (e.g. "node dist/index.js"). Assume this command is run from the root dir of the workspace. */runCommand: string; /** Environment variables set when the app is run. */
1504
+ environmentVariables?: Array<{
1505
+ /** Name of the variable. */variable: string; /** Value associated with the variable. */
1506
+ value: string; /** Where the variable will be available, for now only RUNTIME is supported. */
1507
+ availability: "RUNTIME"[];
1508
+ }>; /** The maximum number of concurrent requests that each server instance can receive. */
1509
+ concurrency?: number; /** The number of CPUs used in a single server instance. */
1510
+ cpu?: number; /** The amount of memory available for a server instance. */
1511
+ memoryMiB?: number; /** The limit on the minimum number of function instances that may coexist at a given time. */
1512
+ minInstances?: number; /** The limit on the maximum number of function instances that may coexist at a given time. */
1513
+ maxInstances?: number;
1514
+ };
1515
+ metadata: {
1516
+ adapterPackageName: string;
1517
+ adapterVersion: string;
1518
+ framework: string;
1519
+ frameworkVersion?: string;
1520
+ };
1521
+ outputFiles?: {
1522
+ /** serverApp holds a list of directories + files relative to the app root dir that frameworks need to deploy to the App Hosting server. */serverApp: {
1523
+ include: string[];
1524
+ };
1525
+ };
1526
+ }
1527
+ //#endregion
1528
+ //#region src/presets/netlify/types.d.ts
1529
+ interface NetlifyOptions {
1530
+ /** @deprecated Use `config.images` */
1531
+ images?: NetlifyImagesConfig;
1532
+ config?: NetlifyConfigJson;
1533
+ }
1534
+ interface NetlifyConfigJson {
1535
+ edge_functions?: NetlifyEdgeFunctionDeclaration[];
1536
+ functions?: NetlifyFunctionsConfig | NetlifyFunctionsConfigByPattern;
1537
+ headers?: NetlifyHeaderRule[];
1538
+ images?: NetlifyImagesConfig;
1539
+ redirects?: NetlifyRedirectRule[];
1540
+ "redirects!"?: NetlifyRedirectRule[];
1541
+ }
1542
+ interface NetlifyEdgeFunctionDeclaration {
1543
+ function: string;
1544
+ path?: string;
1545
+ pattern?: string;
1546
+ excludedPath?: string;
1547
+ excludedPattern?: string;
1548
+ cache?: string;
1549
+ [key: string]: unknown;
1550
+ }
1551
+ interface NetlifyFunctionsConfig extends NetlifyFunctionInlineConfig {
1552
+ directory?: string;
1553
+ }
1554
+ type NetlifyFunctionsConfigByPattern = Record<string, NetlifyFunctionInlineConfig>;
1555
+ interface NetlifyFunctionInlineConfig {
1556
+ included_files?: string[];
1557
+ [key: string]: unknown;
1558
+ }
1559
+ interface NetlifyHeaderRule {
1560
+ for: string;
1561
+ values: Record<string, string>;
1562
+ [key: string]: unknown;
1563
+ }
1564
+ interface NetlifyImagesConfig {
1565
+ remote_images?: string[];
1566
+ [key: string]: unknown;
1567
+ }
1568
+ interface NetlifyRedirectRule {
1569
+ from: string;
1570
+ to: string;
1571
+ status?: number;
1572
+ force?: boolean;
1573
+ conditions?: Record<string, string[]>;
1574
+ query?: Record<string, string>;
1575
+ [key: string]: unknown;
1576
+ }
1577
+ //#endregion
1578
+ //#region src/presets/vercel/types.d.ts
1579
+ /**
1580
+ * Vercel Build Output Configuration
1581
+ * @see https://vercel.com/docs/build-output-api/v3
1582
+ */
1583
+ interface VercelBuildConfigV3 {
1584
+ version: 3;
1585
+ routes?: ({
1586
+ src: string;
1587
+ dest?: string;
1588
+ headers?: Record<string, string>;
1589
+ continue?: boolean;
1590
+ status?: number;
1591
+ } | {
1592
+ handle: string;
1593
+ })[];
1594
+ images?: {
1595
+ sizes: number[];
1596
+ domains: string[];
1597
+ remotePatterns?: {
1598
+ protocol?: "http" | "https";
1599
+ hostname: string;
1600
+ port?: string;
1601
+ pathname?: string;
1602
+ }[];
1603
+ minimumCacheTTL?: number;
1604
+ formats?: ("image/avif" | "image/webp")[];
1605
+ dangerouslyAllowSVG?: boolean;
1606
+ contentSecurityPolicy?: string;
1607
+ };
1608
+ wildcard?: Array<{
1609
+ domain: string;
1610
+ value: string;
1611
+ }>;
1612
+ overrides?: Record<string, {
1613
+ path?: string;
1614
+ contentType?: string;
1615
+ }>;
1616
+ cache?: string[];
1617
+ bypassToken?: string;
1618
+ framework?: {
1619
+ version: string;
1620
+ };
1621
+ crons?: {
1622
+ path: string;
1623
+ schedule: string;
1624
+ }[];
1625
+ }
1626
+ /**
1627
+ * https://vercel.com/docs/build-output-api/primitives#serverless-function-configuration
1628
+ * https://vercel.com/docs/build-output-api/primitives#node.js-config
1629
+ */
1630
+ interface VercelServerlessFunctionConfig {
1631
+ /**
1632
+ * Amount of memory (RAM in MB) that will be allocated to the Serverless Function.
1633
+ */
1634
+ memory?: number;
1635
+ /**
1636
+ * Specifies the instruction set "architecture" the Vercel Function supports.
1637
+ *
1638
+ * Either `x86_64` or `arm64`. The default value is `x86_64`
1639
+ */
1640
+ architecture?: "x86_64" | "arm64";
1641
+ /**
1642
+ * Maximum execution duration (in seconds) that will be allowed for the Serverless Function.
1643
+ */
1644
+ maxDuration?: number;
1645
+ /**
1646
+ * Map of additional environment variables that will be available to the Vercel Function,
1647
+ * in addition to the env vars specified in the Project Settings.
1648
+ */
1649
+ environment?: Record<string, string>;
1650
+ /**
1651
+ * List of Vercel Regions where the Vercel Function will be deployed to.
1652
+ */
1653
+ regions?: string[];
1654
+ /**
1655
+ * True if a custom runtime has support for Lambda runtime wrappers.
1656
+ */
1657
+ supportsWrapper?: boolean;
1658
+ /**
1659
+ * When true, the Serverless Function will stream the response to the client.
1660
+ */
1661
+ supportsResponseStreaming?: boolean;
1662
+ /**
1663
+ * Enables source map generation.
1664
+ */
1665
+ shouldAddSourcemapSupport?: boolean;
1666
+ /**
1667
+ * The runtime to use. Defaults to the auto-detected Node.js version.
1668
+ */
1669
+ runtime?: "nodejs20.x" | "nodejs22.x" | "bun1.x" | (string & {});
1670
+ [key: string]: unknown;
1671
+ }
1672
+ interface VercelOptions {
1673
+ config?: VercelBuildConfigV3;
1674
+ /**
1675
+ * If you have enabled skew protection in the Vercel dashboard, it will
1676
+ * be enabled by default.
1677
+ *
1678
+ * You can disable the Nitro integration by setting this option to `false`.
1679
+ */
1680
+ skewProtection?: boolean;
1681
+ /**
1682
+ * If you are using `vercel-edge`, you can specify the region(s) for your edge function.
1683
+ * @see https://vercel.com/docs/concepts/functions/edge-functions#edge-function-regions
1684
+ */
1685
+ regions?: string[];
1686
+ functions?: VercelServerlessFunctionConfig;
1687
+ /**
1688
+ * Handler format to use for Vercel Serverless Functions.
1689
+ *
1690
+ * Using `node` format enables compatibility with Node.js specific APIs in your Nitro application (e.g., `req.runtime.node`).
1691
+ *
1692
+ * Possible values are: `web` (default) and `node`.
1693
+ */
1694
+ entryFormat?: "web" | "node";
1695
+ /**
1696
+ * The route path for the Vercel cron handler endpoint.
1697
+ *
1698
+ * When `experimental.tasks` and `scheduledTasks` are configured,
1699
+ * Nitro registers a cron handler at this path that Vercel invokes
1700
+ * on each scheduled cron trigger.
1701
+ *
1702
+ * @default "/_vercel/cron"
1703
+ * @see https://vercel.com/docs/cron-jobs
1704
+ */
1705
+ cronHandlerRoute?: string;
1706
+ }
1707
+ //#endregion
1708
+ //#region src/presets/zephyr/types.d.ts
1709
+ interface ZephyrOptions {
1710
+ /**
1711
+ * Deploy to Zephyr during `nitro build` when using the `zephyr` preset.
1712
+ *
1713
+ * @default false
1714
+ */
1715
+ deployOnBuild?: boolean;
1716
+ }
1717
+ //#endregion
1718
+ //#region src/presets/_types.gen.d.ts
1719
+ interface PresetOptions {
1720
+ awsAmplify?: AWSAmplifyOptions;
1721
+ awsLambda?: AwsLambdaOptions;
1722
+ azure?: AzureOptions;
1723
+ cloudflare?: CloudflareOptions;
1724
+ firebase?: FirebaseOptions;
1725
+ netlify?: NetlifyOptions;
1726
+ vercel?: VercelOptions;
1727
+ zephyr?: ZephyrOptions;
1728
+ }
1729
+ type PresetName = "alwaysdata" | "aws-amplify" | "aws-lambda" | "azure-swa" | "base-worker" | "bun" | "cleavr" | "cloudflare-dev" | "cloudflare-durable" | "cloudflare-module" | "cloudflare-pages" | "cloudflare-pages-static" | "deno" | "deno-deploy" | "deno-server" | "digital-ocean" | "firebase-app-hosting" | "flight-control" | "genezio" | "github-pages" | "gitlab-pages" | "heroku" | "iis-handler" | "iis-node" | "koyeb" | "netlify" | "netlify-edge" | "netlify-static" | "nitro-dev" | "nitro-prerender" | "node" | "node-cluster" | "node-middleware" | "node-server" | "platform-sh" | "render-com" | "standard" | "static" | "stormkit" | "vercel" | "vercel-static" | "winterjs" | "zeabur" | "zeabur-static" | "zephyr" | "zerops" | "zerops-static";
1730
+ type PresetNameInput = "alwaysdata" | "aws-amplify" | "awsAmplify" | "aws_amplify" | "aws-lambda" | "awsLambda" | "aws_lambda" | "azure-swa" | "azureSwa" | "azure_swa" | "base-worker" | "baseWorker" | "base_worker" | "bun" | "cleavr" | "cloudflare-dev" | "cloudflareDev" | "cloudflare_dev" | "cloudflare-durable" | "cloudflareDurable" | "cloudflare_durable" | "cloudflare-module" | "cloudflareModule" | "cloudflare_module" | "cloudflare-pages" | "cloudflarePages" | "cloudflare_pages" | "cloudflare-pages-static" | "cloudflarePagesStatic" | "cloudflare_pages_static" | "deno" | "deno-deploy" | "denoDeploy" | "deno_deploy" | "deno-server" | "denoServer" | "deno_server" | "digital-ocean" | "digitalOcean" | "digital_ocean" | "firebase-app-hosting" | "firebaseAppHosting" | "firebase_app_hosting" | "flight-control" | "flightControl" | "flight_control" | "genezio" | "github-pages" | "githubPages" | "github_pages" | "gitlab-pages" | "gitlabPages" | "gitlab_pages" | "heroku" | "iis-handler" | "iisHandler" | "iis_handler" | "iis-node" | "iisNode" | "iis_node" | "koyeb" | "netlify" | "netlify-edge" | "netlifyEdge" | "netlify_edge" | "netlify-static" | "netlifyStatic" | "netlify_static" | "nitro-dev" | "nitroDev" | "nitro_dev" | "nitro-prerender" | "nitroPrerender" | "nitro_prerender" | "node" | "node-cluster" | "nodeCluster" | "node_cluster" | "node-middleware" | "nodeMiddleware" | "node_middleware" | "node-server" | "nodeServer" | "node_server" | "platform-sh" | "platformSh" | "platform_sh" | "render-com" | "renderCom" | "render_com" | "standard" | "static" | "stormkit" | "vercel" | "vercel-static" | "vercelStatic" | "vercel_static" | "winterjs" | "zeabur" | "zeabur-static" | "zeaburStatic" | "zeabur_static" | "zephyr" | "zerops" | "zerops-static" | "zeropsStatic" | "zerops_static" | (string & {});
1731
+ //#endregion
1732
+ //#region src/types/openapi-ts.d.ts
1733
+ /**
1734
+ Source: (inlined because of install size concernes)
1735
+
1736
+ https://github.com/openapi-ts/openapi-typescript/blob/fc3f7/packages/openapi-typescript/src/types.ts
1737
+
1738
+ MIT License
1739
+
1740
+ Copyright (c) 2020 Drew Powers
1741
+
1742
+ Permission is hereby granted, free of charge, to any person obtaining a copy
1743
+ of this software and associated documentation files (the "Software"), to deal
1744
+ in the Software without restriction, including without limitation the rights
1745
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1746
+ copies of the Software, and to permit persons to whom the Software is
1747
+ furnished to do so, subject to the following conditions:
1748
+
1749
+ The above copyright notice and this permission notice shall be included in all
1750
+ copies or substantial portions of the Software.
1751
+
1752
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1753
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1754
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1755
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1756
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1757
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1758
+ SOFTWARE.
1759
+ */
1760
+ interface Extensable {
1761
+ [key: `x-${string}`]: any;
1762
+ }
1763
+ /**
1764
+ * [4.8] Schema
1765
+ * @see https://spec.openapis.org/oas/v3.1.0#schema
1766
+ */
1767
+ interface OpenAPI3 extends Extensable {
1768
+ /** REQUIRED. This string MUST be the version number of the OpenAPI Specification that the OpenAPI document uses. The openapi field SHOULD be used by tooling to interpret the OpenAPI document. This is not related to the API info.version string. */
1769
+ openapi: string;
1770
+ /** REQUIRED. Provides metadata about the API. The metadata MAY be used by tooling as required. */
1771
+ info: InfoObject;
1772
+ /** The default value for the $schema keyword within Schema Objects contained within this OAS document. This MUST be in the form of a URI. */
1773
+ jsonSchemaDialect?: string;
1774
+ /** An array of Server Objects, which provide connectivity information to a target server. If the servers property is not provided, or is an empty array, the default value would be a Server Object with a url value of /. */
1775
+ servers?: ServerObject[];
1776
+ /** The available paths and operations for the API. */
1777
+ paths?: PathsObject;
1778
+ /** The incoming webhooks that MAY be received as part of this API and that the API consumer MAY choose to implement. Closely related to the callbacks feature, this section describes requests initiated other than by an API call, for example by an out of band registration. The key name is a unique string to refer to each webhook, while the (optionally referenced) Path Item Object describes a request that may be initiated by the API provider and the expected responses. An example is available. */
1779
+ webhooks?: {
1780
+ [id: string]: PathItemObject | ReferenceObject;
1781
+ };
1782
+ /** An element to hold various schemas for the document. */
1783
+ components?: ComponentsObject;
1784
+ /** A declaration of which security mechanisms can be used across the API. The list of values includes alternative security requirement objects that can be used. Only one of the security requirement objects need to be satisfied to authorize a request. Individual operations can override this definition. To make security optional, an empty security requirement ({}) can be included in the array. */
1785
+ security?: SecurityRequirementObject[];
1786
+ /** A list of tags used by the document with additional metadata. The order of the tags can be used to reflect on their order by the parsing tools. Not all tags that are used by the Operation Object must be declared. The tags that are not declared MAY be organized randomly or based on the tools’ logic. Each tag name in the list MUST be unique. */
1787
+ tags?: TagObject[];
1788
+ /** Additional external documentation. */
1789
+ externalDocs?: ExternalDocumentationObject;
1790
+ $defs?: $defs;
1791
+ }
1792
+ /**
1793
+ * [4.8.2] Info Object
1794
+ * The object provides metadata about the API.
1795
+ */
1796
+ interface InfoObject extends Extensable {
1797
+ /** REQUIRED. The title of the API. */
1798
+ title: string;
1799
+ /** A short summary of the API. */
1800
+ summary?: string;
1801
+ /** A description of the API. CommonMark syntax MAY be used for rich text representation. */
1802
+ description?: string;
1803
+ /** A URL to the Terms of Service for the API. This MUST be in the form of a URL. */
1804
+ termsOfService?: string;
1805
+ /** The contact information for the exposed API. */
1806
+ contact?: ContactObject;
1807
+ /** The license information for the exposed API. */
1808
+ license?: LicenseObject;
1809
+ /** REQUIRED. The version of the OpenAPI document (which is distinct from the OpenAPI Specification version or the API implementation version). */
1810
+ version: string;
1811
+ }
1812
+ /**
1813
+ * [4.8.3] Contact Object
1814
+ * Contact information for the exposed API.
1815
+ */
1816
+ interface ContactObject extends Extensable {
1817
+ /** The identifying name of the contact person/organization. */
1818
+ name?: string;
1819
+ /** The URL pointing to the contact information. This MUST be in the form of a URL. */
1820
+ url?: string;
1821
+ /** The email address of the contact person/organization. This MUST be in the form of an email address. */
1822
+ email?: string;
1823
+ }
1824
+ /**
1825
+ * [4.8.4] License object
1826
+ * License information for the exposed API.
1827
+ */
1828
+ interface LicenseObject extends Extensable {
1829
+ /** REQUIRED. The license name used for the API. */
1830
+ name: string;
1831
+ /** An SPDX license expression for the API. The identifier field is mutually exclusive of the url field. */
1832
+ identifier: string;
1833
+ /** A URL to the license used for the API. This MUST be in the form of a URL. The url field is mutually exclusive of the identifier field. */
1834
+ url: string;
1835
+ }
1836
+ /**
1837
+ * [4.8.5] Server Object
1838
+ * An object representing a Server.
1839
+ */
1840
+ interface ServerObject extends Extensable {
1841
+ /** REQUIRED. A URL to the target host. This URL supports Server Variables and MAY be relative, to indicate that the host location is relative to the location where the OpenAPI document is being served. Variable substitutions will be made when a variable is named in {brackets}. */
1842
+ url: string;
1843
+ /** An optional string describing the host designated by the URL. CommonMark syntax MAY be used for rich text representation. */
1844
+ description: string;
1845
+ /** A map between a variable name and its value. The value is used for substitution in the server’s URL template. */
1846
+ variables: {
1847
+ [name: string]: ServerVariableObject;
1848
+ };
1849
+ }
1850
+ /**
1851
+ * [4.8.6] Server Variable Object
1852
+ * An object representing a Server Variable for server URL template substitution.
1853
+ */
1854
+ interface ServerVariableObject extends Extensable {
1855
+ /** An enumeration of string values to be used if the substitution options are from a limited set. The array MUST NOT be empty. */
1856
+ enum?: string[];
1857
+ /** REQUIRED. The default value to use for substitution, which SHALL be sent if an alternate value is not supplied. Note this behavior is different than the Schema Object’s treatment of default values, because in those cases parameter values are optional. If the enum is defined, the value MUST exist in the enum’s values. */
1858
+ default: string;
1859
+ /** An optional description for the server variable. CommonMark syntax MAY be used for rich text representation. */
1860
+ description?: string;
1861
+ }
1862
+ /**
1863
+ * [4.8.7] Components Object
1864
+ * Holds a set of reusable objects for different aspects of the OAS.
1865
+ */
1866
+ interface ComponentsObject extends Extensable {
1867
+ /** An object to hold reusable Schema Objects.*/
1868
+ schemas?: Record<string, SchemaObject>;
1869
+ /** An object to hold reusable Response Objects. */
1870
+ responses?: Record<string, ResponseObject | ReferenceObject>;
1871
+ /** An object to hold reusable Parameter Objects. */
1872
+ parameters?: Record<string, ParameterObject | ReferenceObject>;
1873
+ /** An object to hold reusable Example Objects. */
1874
+ examples?: Record<string, ExampleObject | ReferenceObject>;
1875
+ /** An object to hold reusable Request Body Objects. */
1876
+ requestBodies?: Record<string, RequestBodyObject | ReferenceObject>;
1877
+ /** An object to hold reusable Header Objects. */
1878
+ headers?: Record<string, HeaderObject | ReferenceObject>;
1879
+ /** An object to hold reusable Security Scheme Objects. */
1880
+ securitySchemes?: Record<string, SecuritySchemeObject | ReferenceObject>;
1881
+ /** An object to hold reusable Link Objects. */
1882
+ links?: Record<string, LinkObject | ReferenceObject>;
1883
+ /** An object to hold reusable Callback Objects. */
1884
+ callbacks?: Record<string, CallbackObject | ReferenceObject>;
1885
+ /** An object to hold reusable Path Item Objects. */
1886
+ pathItems?: Record<string, PathItemObject | ReferenceObject>;
1887
+ }
1888
+ /**
1889
+ * [4.8.8] Paths Object
1890
+ * Holds the relative paths to the individual endpoints and their operations. The path is appended to the URL from the Server Object in order to construct the full URL. The Paths MAY be empty, due to Access Control List (ACL) constraints.
1891
+ */
1892
+ interface PathsObject {
1893
+ [pathname: string]: PathItemObject | ReferenceObject;
1894
+ }
1895
+ /**
1896
+ * [4.8.9] Path Item Object
1897
+ * Describes the operations available on a single path. A Path Item MAY be empty, due to ACL constraints. The path itself is still exposed to the documentation viewer but they will not know which operations and parameters are available.
1898
+ */
1899
+ interface PathItemObject extends Extensable {
1900
+ /** A definition of a GET operation on this path. */
1901
+ get?: OperationObject | ReferenceObject;
1902
+ /** A definition of a PUT operation on this path. */
1903
+ put?: OperationObject | ReferenceObject;
1904
+ /** A definition of a POST operation on this path. */
1905
+ post?: OperationObject | ReferenceObject;
1906
+ /** A definition of a DELETE operation on this path. */
1907
+ delete?: OperationObject | ReferenceObject;
1908
+ /** A definition of a OPTIONS operation on this path. */
1909
+ options?: OperationObject | ReferenceObject;
1910
+ /** A definition of a HEAD operation on this path. */
1911
+ head?: OperationObject | ReferenceObject;
1912
+ /** A definition of a PATCH operation on this path. */
1913
+ patch?: OperationObject | ReferenceObject;
1914
+ /** A definition of a TRACE operation on this path. */
1915
+ trace?: OperationObject | ReferenceObject;
1916
+ /** An alternative server array to service all operations in this path. */
1917
+ servers?: ServerObject[];
1918
+ /** A list of parameters that are applicable for all the operations described under this path. These parameters can be overridden at the operation level, but cannot be removed there. The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a name and location. The list can use the Reference Object to link to parameters that are defined at the OpenAPI Object’s components/parameters. */
1919
+ parameters?: (ParameterObject | ReferenceObject)[];
1920
+ }
1921
+ /**
1922
+ * [4.8.10] Operation Object
1923
+ * Describes a single API operation on a path.
1924
+ */
1925
+ interface OperationObject extends Extensable {
1926
+ /** A list of tags for API documentation control. Tags can be used for logical grouping of operations by resources or any other qualifier. */
1927
+ tags?: string[];
1928
+ /** A short summary of what the operation does. */
1929
+ summary?: string;
1930
+ /** A verbose explanation of the operation behavior. CommonMark syntax MAY be used for rich text representation. */
1931
+ description?: string;
1932
+ /** Additional external documentation for this operation. */
1933
+ externalDocs?: ExternalDocumentationObject;
1934
+ /** Unique string used to identify the operation. The id MUST be unique among all operations described in the API. The operationId value is case-sensitive. Tools and libraries MAY use the operationId to uniquely identify an operation, therefore, it is RECOMMENDED to follow common programming naming conventions. */
1935
+ operationId?: string;
1936
+ /** A list of parameters that are applicable for this operation. If a parameter is already defined at the Path Item, the new definition will override it but can never remove it. The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a name and location. The list can use the Reference Object to link to parameters that are defined at the OpenAPI Object’s components/parameters. */
1937
+ parameters?: (ParameterObject | ReferenceObject)[];
1938
+ /** The request body applicable for this operation. The requestBody is fully supported in HTTP methods where the HTTP 1.1 specification [RFC7231] has explicitly defined semantics for request bodies. In other cases where the HTTP spec is vague (such as GET, HEAD and DELETE), requestBody is permitted but does not have well-defined semantics and SHOULD be avoided if possible. */
1939
+ requestBody?: RequestBodyObject | ReferenceObject;
1940
+ /** The list of possible responses as they are returned from executing this operation. */
1941
+ responses?: ResponsesObject;
1942
+ /** A map of possible out-of band callbacks related to the parent operation. The key is a unique identifier for the Callback Object. Each value in the map is a Callback Object that describes a request that may be initiated by the API provider and the expected responses. */
1943
+ callbacks?: Record<string, CallbackObject | ReferenceObject>;
1944
+ /** Declares this operation to be deprecated. Consumers SHOULD refrain from usage of the declared operation. Default value is false. */
1945
+ deprecated?: boolean;
1946
+ /** A declaration of which security mechanisms can be used for this operation. The list of values includes alternative security requirement objects that can be used. Only one of the security requirement objects need to be satisfied to authorize a request. To make security optional, an empty security requirement ({}) can be included in the array. This definition overrides any declared top-level security. To remove a top-level security declaration, an empty array can be used. */
1947
+ security?: SecurityRequirementObject[];
1948
+ /** An alternative server array to service this operation. If an alternative server object is specified at the Path Item Object or Root level, it will be overridden by this value. */
1949
+ servers?: ServerObject[];
1950
+ }
1951
+ /**
1952
+ * [4.8.11] External Documentation Object
1953
+ * Allows referencing an external resource for extended documentation.
1954
+ */
1955
+ interface ExternalDocumentationObject extends Extensable {
1956
+ /** A description of the target documentation. CommonMark syntax MAY be used for rich text representation. */
1957
+ description?: string;
1958
+ /** REQUIRED. The URL for the target documentation. This MUST be in the form of a URL. */
1959
+ url: string;
1960
+ }
1961
+ /**
1962
+ * [4.8.12] Parameter Object
1963
+ * Describes a single operation parameter.
1964
+ * A unique parameter is defined by a combination of a name and location.
1965
+ */
1966
+ interface ParameterObject extends Extensable {
1967
+ /**
1968
+ * REQUIRED. The name of the parameter. Parameter names are case sensitive.
1969
+ *
1970
+ * - If `in` is `"path"`, the `name` field MUST correspond to a template expression occurring within the path field in the Paths Object. See Path Templating for further information.
1971
+ * - If `in` is `"header"` and the `name` field is `"Accept"`, `"Content-Type"` or `"Authorization"`, the parameter definition SHALL be ignored.
1972
+ * - For all other cases, the `name` corresponds to the parameter name used by the `in` property.
1973
+ */
1974
+ name: string;
1975
+ /** REQUIRED. The location of the parameter. Possible values are "query", "header", "path" or "cookie".*/
1976
+ in: "query" | "header" | "path" | "cookie";
1977
+ /** A brief description of the parameter. This could contain examples of use. CommonMark syntax MAY be used for rich text representation. */
1978
+ description?: string;
1979
+ /** Determines whether this parameter is mandatory. If the parameter location is "path", this property is REQUIRED and its value MUST be true. Otherwise, the property MAY be included and its default value is false. */
1980
+ required?: boolean;
1981
+ /** Specifies that a parameter is deprecated and SHOULD be transitioned out of usage. Default value is false. */
1982
+ deprecated?: boolean;
1983
+ /** Sets the ability to pass empty-valued parameters. This is valid only for query parameters and allows sending a parameter with an empty value. Default value is false. If style is used, and if behavior is n/a (cannot be serialized), the value of allowEmptyValue SHALL be ignored. Use of this property is NOT RECOMMENDED, as it is likely to be removed in a later revision. */
1984
+ allowEmptyValue?: boolean;
1985
+ /** Describes how the parameter value will be serialized depending on the type of the parameter value. Default values (based on value of in): for query - form; for path - simple; for header - simple; for cookie - form. */
1986
+ style?: string;
1987
+ /** When this is true, parameter values of type `array` or `object` generate separate parameters for each value of the array or key-value pair of the map. For other types of parameters this property has no effect. When `style` is `form`, the default value is `true`. For all other styles, the default value is `false`. */
1988
+ explode?: boolean;
1989
+ /** Determines whether the parameter value SHOULD allow reserved characters, as defined by [RFC3986] `:/?#[]@!$&'()*+,;=` to be included without percent-encoding. This property only applies to parameters with an `in` value of `query`. The default value is `false`. */
1990
+ allowReserved?: boolean;
1991
+ /** The schema defining the type used for the parameter. */
1992
+ schema?: SchemaObject;
1993
+ /** Example of the parameter’s potential value. */
1994
+ example?: any;
1995
+ /** Examples of the parameter’s potential value. */
1996
+ examples?: {
1997
+ [name: string]: ExampleObject | ReferenceObject;
1998
+ };
1999
+ /** A map containing the representations for the parameter. */
2000
+ content?: {
2001
+ [contentType: string]: MediaTypeObject | ReferenceObject;
2002
+ };
2003
+ }
2004
+ /**
2005
+ * [4.8.13] Request Body Object
2006
+ * Describes a single request body.
2007
+ */
2008
+ interface RequestBodyObject extends Extensable {
2009
+ /** A brief description of the request body. This could contain examples of use. CommonMark syntax MAY be used for rich text representation. */
2010
+ description?: string;
2011
+ /** REQUIRED. The content of the request body. The key is a media type or media type range and the value describes it. For requests that match multiple keys, only the most specific key is applicable. e.g. text/plain overrides text */
2012
+ content: {
2013
+ [contentType: string]: MediaTypeObject | ReferenceObject;
2014
+ };
2015
+ /** Determines if the request body is required in the request. Defaults to false. */
2016
+ required?: boolean;
2017
+ }
2018
+ /**
2019
+ * [4.8.14] Media Type Object
2020
+ */
2021
+ interface MediaTypeObject extends Extensable {
2022
+ /** The schema defining the content of the request, response, or parameter. */
2023
+ schema?: SchemaObject | ReferenceObject;
2024
+ /** Example of the media type. The example object SHOULD be in the correct format as specified by the media type. The example field is mutually exclusive of the examples field. Furthermore, if referencing a schema which contains an example, the example value SHALL override the example provided by the schema. */
2025
+ example?: any;
2026
+ /** Examples of the media type. Each example object SHOULD match the media type and specified schema if present. The examples field is mutually exclusive of the example field. Furthermore, if referencing a schema which contains an example, the examples value SHALL override the example provided by the schema. */
2027
+ examples?: {
2028
+ [name: string]: ExampleObject | ReferenceObject;
2029
+ };
2030
+ /** A map between a property name and its encoding information. The key, being the property name, MUST exist in the schema as a property. The encoding object SHALL only apply to requestBody objects when the media type is multipart or application/x-www-form-urlencoded. */
2031
+ encoding?: {
2032
+ [propertyName: string]: EncodingObject;
2033
+ };
2034
+ }
2035
+ /**
2036
+ * [4.8.15] Encoding Object
2037
+ * A single encoding definition applied to a single schema property.
2038
+ */
2039
+ interface EncodingObject extends Extensable {
2040
+ /** The Content-Type for encoding a specific property. Default value depends on the property type: for object - application/json; for array – the default is defined based on the inner type; for all other cases the default is application/octet-stream. The value can be a specific media type (e.g. application/json), a wildcard media type (e.g. image/*), or a comma-separated list of the two types. */
2041
+ contentType?: string;
2042
+ /** A map allowing additional information to be provided as headers, for example Content-Disposition. Content-Type is described separately and SHALL be ignored in this section. This property SHALL be ignored if the request body media type is not a multipart. */
2043
+ headers?: {
2044
+ [name: string]: HeaderObject | ReferenceObject;
2045
+ };
2046
+ /** Describes how a specific property value will be serialized depending on its type. See Parameter Object for details on the style property. The behavior follows the same values as query parameters, including default values. This property SHALL be ignored if the request body media type is not application/x-www-form-urlencoded or multipart/form-data. If a value is explicitly defined, then the value of contentType (implicit or explicit) SHALL be ignored. */
2047
+ style?: string;
2048
+ /** When this is true, property values of type array or object generate separate parameters for each value of the array, or key-value-pair of the map. For other types of properties this property has no effect. When style is form, the default value is true. For all other styles, the default value is false. This property SHALL be ignored if the request body media type is not application/x-www-form-urlencoded or multipart/form-data. If a value is explicitly defined, then the value of contentType (implicit or explicit) SHALL be ignored. */
2049
+ explode?: string;
2050
+ /** Determines whether the parameter value SHOULD allow reserved characters, as defined by [RFC3986] :/?#[]@!$&'()*+,;= to be included without percent-encoding. The default value is false. This property SHALL be ignored if the request body media type is not application/x-www-form-urlencoded or multipart/form-data. If a value is explicitly defined, then the value of contentType (implicit or explicit) SHALL be ignored. */
2051
+ allowReserved?: string;
2052
+ }
2053
+ /**
2054
+ * [4.8.16] Responses Object
2055
+ * A container for the expected responses of an operation. The container maps a HTTP response code to the expected response.
2056
+ */
2057
+ type ResponsesObject = {
2058
+ [responseCode: string]: ResponseObject | ReferenceObject;
2059
+ } & {
2060
+ /** The documentation of responses other than the ones declared for specific HTTP response codes. Use this field to cover undeclared responses. */default?: ResponseObject | ReferenceObject;
2061
+ };
2062
+ /**
2063
+ * [4.8.17] Response Object
2064
+ * Describes a single response from an API Operation, including design-time, static links to operations based on the response.
2065
+ */
2066
+ interface ResponseObject extends Extensable {
2067
+ /** REQUIRED. A description of the response. CommonMark syntax MAY be used for rich text representation. */
2068
+ description: string;
2069
+ /** Maps a header name to its definition. [RFC7230] states header names are case insensitive. If a response header is defined with the name "Content-Type", it SHALL be ignored. */
2070
+ headers?: {
2071
+ [name: string]: HeaderObject | ReferenceObject;
2072
+ };
2073
+ /** A map containing descriptions of potential response payloads. The key is a media type or media type range and the value describes it. For responses that match multiple keys, only the most specific key is applicable. e.g. text/plain overrides text */
2074
+ content?: {
2075
+ [contentType: string]: MediaTypeObject;
2076
+ };
2077
+ /** A map of operations links that can be followed from the response. The key of the map is a short name for the link, following the naming constraints of the names for Component Objects. */
2078
+ links?: {
2079
+ [name: string]: LinkObject | ReferenceObject;
2080
+ };
2081
+ }
2082
+ /**
2083
+ * [4.8.18] Callback Object
2084
+ * A map of possible out-of band callbacks related to the parent operation. Each value in the map is a Path Item Object that describes a set of requests that may be initiated by the API provider and the expected responses. The key value used to identify the path item object is an expression, evaluated at runtime, that identifies a URL to use for the callback operation.
2085
+ */
2086
+ type CallbackObject = Record<string, PathItemObject>;
2087
+ /**
2088
+ * [4.8.19[ Example Object
2089
+ */
2090
+ interface ExampleObject extends Extensable {
2091
+ /** Short description for the example. */
2092
+ summary?: string;
2093
+ /** Long description for the example. CommonMark syntax MAY be used for rich text representation. */
2094
+ description?: string;
2095
+ /** Embedded literal example. The value field and externalValue field are mutually exclusive. To represent examples of media types that cannot naturally represented in JSON or YAML, use a string value to contain the example, escaping where necessary. */
2096
+ value?: any;
2097
+ /** A URI that points to the literal example. This provides the capability to reference examples that cannot easily be included in JSON or YAML documents. The value field and externalValue field are mutually exclusive. See the rules for resolving Relative References. */
2098
+ externalValue?: string;
2099
+ }
2100
+ /**
2101
+ * [4.8.20] Link Object
2102
+ * The Link object represents a possible design-time link for a response. The presence of a link does not guarantee the caller’s ability to successfully invoke it, rather it provides a known relationship and traversal mechanism between responses and other operations.
2103
+ */
2104
+ interface LinkObject extends Extensable {
2105
+ /** A relative or absolute URI reference to an OAS operation. This field is mutually exclusive of the operationId field, and MUST point to an Operation Object. Relative operationRef values MAY be used to locate an existing Operation Object in the OpenAPI definition. See the rules for resolving Relative References. */
2106
+ operationRef?: string;
2107
+ /** The name of an existing, resolvable OAS operation, as defined with a unique operationId. This field is mutually exclusive of the operationRef field. */
2108
+ operationId?: string;
2109
+ /** A map representing parameters to pass to an operation as specified with operationId or identified via operationRef. The key is the parameter name to be used, whereas the value can be a constant or an expression to be evaluated and passed to the linked operation. The parameter name can be qualified using the parameter location [{in}.]{name} for operations that use the same parameter name in different locations (e.g. path.id). */
2110
+ parameters?: {
2111
+ [name: string]: `$${string}`;
2112
+ };
2113
+ /** A literal value or {expression} to use as a request body when calling the target operation. */
2114
+ requestBody?: `$${string}`;
2115
+ /** A description of the link. CommonMark syntax MAY be used for rich text representation. */
2116
+ description?: string;
2117
+ /** A server object to be used by the target operation. */
2118
+ server?: ServerObject;
2119
+ }
2120
+ /**
2121
+ * [4.8.21] Header Object
2122
+ * The Header Object follows the structure of the Parameter Object with the following changes:
2123
+ *
2124
+ * 1. `name` MUST NOT be specified, it is given in the corresponding `headers` map.
2125
+ * 2. `in` MUST NOT be specified, it is implicitly in `header`.
2126
+ * 3. All traits that are affected by the location MUST be applicable to a location of `heade`r (for example, `style`).
2127
+ */
2128
+ type HeaderObject = Omit<ParameterObject, "name" | "in">;
2129
+ /**
2130
+ * [4.8.22] Tag Object
2131
+ * Adds metadata to a single tag that is used by the Operation Object. It is not mandatory to have a Tag Object per tag defined in the Operation Object instances.
2132
+ */
2133
+ interface TagObject extends Extensable {
2134
+ /** REQUIRED. The name of the tag. */
2135
+ name: string;
2136
+ /** A description for the tag. CommonMark syntax MAY be used for rich text representation. */
2137
+ description?: string;
2138
+ /** Additional external documentation for this tag. */
2139
+ externalDocs?: ExternalDocumentationObject;
2140
+ }
2141
+ /**
2142
+ * [4.8.23] Reference Object
2143
+ * A simple object to allow referencing other components in the OpenAPI document, internally and externally. The $ref string value contains a URI [RFC3986], which identifies the location of the value being referenced. See the rules for resolving Relative References.
2144
+ */
2145
+ interface ReferenceObject extends Extensable {
2146
+ /** REQUIRED. The reference identifier. This MUST be in the form of a URI. */
2147
+ $ref: string;
2148
+ /** A short summary which by default SHOULD override that of the referenced component. If the referenced object-type does not allow a summary field, then this field has no effect. */
2149
+ summary?: string;
2150
+ /** A description which by default SHOULD override that of the referenced component. CommonMark syntax MAY be used for rich text representation. If the referenced object-type does not allow a description field, then this field has no effect. */
2151
+ description?: string;
2152
+ }
2153
+ /**
2154
+ * [4.8.24] Schema Object
2155
+ * The Schema Object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. This object is a superset of the JSON Schema Specification Draft 2020-12.
2156
+ */
2157
+ type SchemaObject = {
2158
+ /** The Schema Object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. This object is a superset of the JSON Schema Specification Draft 2020-12. */discriminator?: DiscriminatorObject; /** MAY be used only on properties schemas. It has no effect on root schemas. Adds additional metadata to describe the XML representation of this property. */
2159
+ xml?: XMLObject; /** Additional external documentation for this schema. */
2160
+ externalDocs?: ExternalDocumentationObject; /** @deprecated */
2161
+ example?: any;
2162
+ title?: string;
2163
+ description?: string;
2164
+ $comment?: string;
2165
+ deprecated?: boolean;
2166
+ readOnly?: boolean;
2167
+ writeOnly?: boolean;
2168
+ enum?: unknown[]; /** Use of this keyword is functionally equivalent to an "enum" (Section 6.1.2) with a single value. */
2169
+ const?: unknown;
2170
+ default?: unknown;
2171
+ format?: string; /** @deprecated in 3.1 (still valid for 3.0) */
2172
+ nullable?: boolean;
2173
+ oneOf?: (SchemaObject | ReferenceObject)[];
2174
+ allOf?: (SchemaObject | ReferenceObject)[];
2175
+ anyOf?: (SchemaObject | ReferenceObject)[];
2176
+ required?: string[];
2177
+ [key: `x-${string}`]: any;
2178
+ } & (StringSubtype | NumberSubtype | IntegerSubtype | ArraySubtype | BooleanSubtype | NullSubtype | ObjectSubtype | {
2179
+ type: ("string" | "number" | "integer" | "array" | "boolean" | "null" | "object")[];
2180
+ });
2181
+ interface StringSubtype {
2182
+ type: "string" | ["string", "null"];
2183
+ enum?: (string | ReferenceObject)[];
2184
+ }
2185
+ interface NumberSubtype {
2186
+ type: "number" | ["number", "null"];
2187
+ minimum?: number;
2188
+ maximum?: number;
2189
+ enum?: (number | ReferenceObject)[];
2190
+ }
2191
+ interface IntegerSubtype {
2192
+ type: "integer" | ["integer", "null"];
2193
+ minimum?: number;
2194
+ maximum?: number;
2195
+ enum?: (number | ReferenceObject)[];
2196
+ }
2197
+ interface ArraySubtype {
2198
+ type: "array" | ["array", "null"];
2199
+ prefixItems?: (SchemaObject | ReferenceObject)[];
2200
+ items?: SchemaObject | ReferenceObject | (SchemaObject | ReferenceObject)[];
2201
+ minItems?: number;
2202
+ maxItems?: number;
2203
+ enum?: (SchemaObject | ReferenceObject)[];
2204
+ }
2205
+ interface BooleanSubtype {
2206
+ type: "boolean" | ["boolean", "null"];
2207
+ enum?: (boolean | ReferenceObject)[];
2208
+ }
2209
+ interface NullSubtype {
2210
+ type: "null";
2211
+ }
2212
+ interface ObjectSubtype {
2213
+ type: "object" | ["object", "null"];
2214
+ properties?: {
2215
+ [name: string]: SchemaObject | ReferenceObject;
2216
+ };
2217
+ additionalProperties?: boolean | Record<string, never> | SchemaObject | ReferenceObject;
2218
+ required?: string[];
2219
+ allOf?: (SchemaObject | ReferenceObject)[];
2220
+ anyOf?: (SchemaObject | ReferenceObject)[];
2221
+ enum?: (SchemaObject | ReferenceObject)[];
2222
+ $defs?: $defs;
2223
+ }
2224
+ /**
2225
+ * [4.8.25] Discriminator Object
2226
+ * When request bodies or response payloads may be one of a number of different schemas, a discriminator object can be used to aid in serialization, deserialization, and validation. The discriminator is a specific object in a schema which is used to inform the consumer of the document of an alternative schema based on the value associated with it.
2227
+ */
2228
+ interface DiscriminatorObject {
2229
+ /** REQUIRED. The name of the property in the payload that will hold the discriminator value. */
2230
+ propertyName: string;
2231
+ /** An object to hold mappings between payload values and schema names or references. */
2232
+ mapping?: Record<string, string>;
2233
+ /** If this exists, then a discriminator type should be added to objects matching this path */
2234
+ oneOf?: string[];
2235
+ }
2236
+ /**
2237
+ * [4.8.26] XML Object
2238
+ * A metadata object that allows for more fine-tuned XML model definitions. When using arrays, XML element names are not inferred (for singular/plural forms) and the `name` property SHOULD be used to add that information. See examples for expected behavior.
2239
+ */
2240
+ interface XMLObject extends Extensable {
2241
+ /** Replaces the name of the element/attribute used for the described schema property. When defined within `items`, it will affect the name of the individual XML elements within the list. When defined alongside `type` being `array` (outside the `items`), it will affect the wrapping element and only if `wrapped` is `true`. If `wrapped` is `false`, it will be ignored. */
2242
+ name?: string;
2243
+ /** The URI of the namespace definition. This MUST be in the form of an absolute URI. */
2244
+ namespace?: string;
2245
+ /** The prefix to be used for the name. */
2246
+ prefix?: string;
2247
+ /** Declares whether the property definition translates to an attribute instead of an element. Default value is `false`. */
2248
+ attribute?: boolean;
2249
+ /** MAY be used only for an array definition. Signifies whether the array is wrapped (for example, `<books><book/><book/></books>`) or unwrapped (`<book/><book/>`). Default value is `false`. The definition takes effect only when defined alongside `type` being `array` (outside the `items`). */
2250
+ wrapped?: boolean;
2251
+ }
2252
+ /**
2253
+ * [4.8.27] Security Scheme Object
2254
+ * Defines a security scheme that can be used by the operations.
2255
+ */
2256
+ type SecuritySchemeObject = {
2257
+ /** A description for security scheme. CommonMark syntax MAY be used for rich text representation. */description?: string;
2258
+ [key: `x-${string}`]: any;
2259
+ } & ({
2260
+ /** REQUIRED. The type of the security scheme. */type: "apiKey"; /** REQUIRED. The name of the header, query or cookie parameter to be used. */
2261
+ name: string; /** REQUIRED. The location of the API key. */
2262
+ in: "query" | "header" | "cookie";
2263
+ } | {
2264
+ /** REQUIRED. The type of the security scheme. */type: "http"; /** REQUIRED. The name of the HTTP Authorization scheme to be used in the Authorization header as defined in [RFC7235]. The values used SHOULD be registered in the IANA Authentication Scheme registry. */
2265
+ scheme: string; /** A hint to the client to identify how the bearer token is formatted. Bearer tokens are usually generated by an authorization server, so this information is primarily for documentation purposes. */
2266
+ bearer?: string;
2267
+ } | {
2268
+ /** REQUIRED. The type of the security scheme. */type: "mutualTLS";
2269
+ } | {
2270
+ /** REQUIRED. Tye type of the security scheme. */type: "oauth2"; /** REQUIRED. An object containing configuration information for the flow types supported. */
2271
+ flows: OAuthFlowsObject;
2272
+ } | {
2273
+ /** REQUIRED. Tye type of the security scheme. */type: "openIdConnect"; /** REQUIRED. OpenId Connect URL to discover OAuth2 configuration values. This MUST be in the form of a URL. The OpenID Connect standard requires the use of TLS. */
2274
+ openIdConnectUrl: string;
2275
+ });
2276
+ /**
2277
+ * [4.8.26] OAuth Flows Object
2278
+ * Allows configuration of the supported OAuth Flows.
2279
+ */
2280
+ interface OAuthFlowsObject extends Extensable {
2281
+ /** Configuration for the OAuth Implicit flow */
2282
+ implicit?: OAuthFlowObject;
2283
+ /** Configuration for the OAuth Resource Owner Password flow */
2284
+ password?: OAuthFlowObject;
2285
+ /** Configuration for the OAuth Client Credentials flow. Previously called `application` in OpenAPI 2.0. */
2286
+ clientCredentials?: OAuthFlowObject;
2287
+ /** Configuration for the OAuth Authorization Code flow. Previously called `accessCode` in OpenAPI 2.0. */
2288
+ authorizationCode?: OAuthFlowObject;
2289
+ }
2290
+ /**
2291
+ * [4.8.29] OAuth Flow Object
2292
+ * Configuration details for a supported OAuth Flow
2293
+ */
2294
+ interface OAuthFlowObject extends Extensable {
2295
+ /** REQUIRED. The authorization URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS. */
2296
+ authorizationUrl: string;
2297
+ /** REQUIRED. The token URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS. */
2298
+ tokenUrl: string;
2299
+ /** The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS. */
2300
+ refreshUrl: string;
2301
+ /** REQUIRED. The available scopes for the OAuth2 security scheme. A map between the scope name and a short description for it. The map MAY be empty. */
2302
+ scopes: {
2303
+ [name: string]: string;
2304
+ };
2305
+ }
2306
+ /**
2307
+ * [4.8.30] Security Requirements Object
2308
+ * Lists the required security schemes to execute this operation. The name used for each property MUST correspond to a security scheme declared in the Security Schemes under the Components Object.
2309
+ */
2310
+ type SecurityRequirementObject = { [P in keyof ComponentsObject["securitySchemes"]]?: string[] };
2311
+ type $defs = Record<string, SchemaObject>;
2312
+ //#endregion
2313
+ //#region src/types/handler.d.ts
2314
+ type MaybeArray$1<T> = T | T[];
2315
+ /** @experimental */
2316
+ interface NitroRouteMeta {
2317
+ openAPI?: OperationObject & {
2318
+ $global?: Pick<OpenAPI3, "components"> & Extensable;
2319
+ };
2320
+ }
2321
+ interface NitroHandlerCommon {
2322
+ /**
2323
+ * HTTP pathname pattern to match
2324
+ *
2325
+ * Examples: `/test`, `/api/:id`, `/blog/**`
2326
+ */
2327
+ route: string;
2328
+ /**
2329
+ * HTTP method to match
2330
+ */
2331
+ method?: HTTPMethod;
2332
+ /**
2333
+ * Run handler as a middleware before other route handlings
2334
+ */
2335
+ middleware?: boolean;
2336
+ /**
2337
+ * Extra Meta
2338
+ */
2339
+ meta?: NitroRouteMeta;
2340
+ }
2341
+ type EventHandlerFormat = "web" | "node";
2342
+ interface NitroEventHandler extends NitroHandlerCommon {
2343
+ /**
2344
+ * Use lazy loading to import handler
2345
+ */
2346
+ lazy?: boolean;
2347
+ /**
2348
+ * Path to event handler
2349
+ */
2350
+ handler: string;
2351
+ /**
2352
+ * Event handler type.
2353
+ *
2354
+ * Default is `"web"`. If set to `"node"`, the handler will be converted into a web compatible handler.
2355
+ */
2356
+ format?: EventHandlerFormat;
2357
+ env?: MaybeArray$1<"dev" | "prod" | "prerender" | PresetName | (string & {})>;
2358
+ }
2359
+ interface NitroDevEventHandler extends NitroHandlerCommon {
2360
+ /**
2361
+ * Event handler function
2362
+ */
2363
+ handler: HTTPHandler;
2364
+ }
2365
+ type MaybePromise<T> = T | Promise<T>;
2366
+ type NitroErrorHandler = (error: HTTPError, event: HTTPEvent, _: {
2367
+ defaultHandler: (error: HTTPError, event: HTTPEvent, opts?: {
2368
+ silent?: boolean;
2369
+ json?: boolean;
2370
+ }) => MaybePromise<{
2371
+ status?: number;
2372
+ statusText?: string;
2373
+ headers?: HeadersInit;
2374
+ body?: string | Record<string, any>;
2375
+ }>;
2376
+ }) => MaybePromise<Response | void>;
2377
+ //#endregion
2378
+ //#region src/types/prerender.d.ts
2379
+ interface PrerenderRoute {
2380
+ route: string;
2381
+ contents?: string;
2382
+ data?: ArrayBuffer;
2383
+ fileName?: string;
2384
+ error?: Partial<HTTPError>;
2385
+ generateTimeMS?: number;
2386
+ skip?: boolean;
2387
+ contentType?: string;
2388
+ }
2389
+ /** @deprecated Internal type will be removed in future versions */
2390
+ type PrerenderGenerateRoute = PrerenderRoute;
2391
+ //#endregion
2392
+ //#region src/routing.d.ts
2393
+ interface Route<T = unknown> {
2394
+ route: string;
2395
+ method: string;
2396
+ data: T;
2397
+ }
2398
+ declare class Router<T> {
2399
+ _routes?: Route<T>[];
2400
+ _router?: RouterContext<T>;
2401
+ _compiled?: Record<string, string>;
2402
+ _baseURL: string;
2403
+ constructor(baseURL?: string);
2404
+ get routes(): Route<T>[];
2405
+ _update(routes: Route<T>[], opts?: {
2406
+ merge?: boolean;
2407
+ }): void;
2408
+ hasRoutes(): boolean;
2409
+ compileToString(opts?: RouterCompilerOptions<T>): string;
2410
+ match(method: string, path: string): undefined | T;
2411
+ matchAll(method: string, path: string): T[];
2412
+ }
2413
+ //#endregion
2414
+ //#region src/types/_utils.d.ts
2415
+ type Enumerate<N extends number, Acc extends number[] = []> = Acc["length"] extends N ? Acc[number] : Enumerate<N, [...Acc, Acc["length"]]>;
2416
+ type IntRange<F extends number, T extends number> = Exclude<Enumerate<T>, Enumerate<F>>;
2417
+ type ExcludeFunctions<G extends Record<string, any>> = Pick<G, { [P in keyof G]: NonNullable<G[P]> extends Function ? never : P }[keyof G]>;
2418
+ //#endregion
2419
+ //#region src/types/route-rules.d.ts
2420
+ type HTTPstatus = IntRange<100, 600>;
2421
+ interface NitroRouteConfig {
2422
+ cache?: ExcludeFunctions<CachedEventHandlerOptions> | false;
2423
+ headers?: Record<string, string>;
2424
+ redirect?: string | {
2425
+ to: string;
2426
+ status?: HTTPstatus;
2427
+ };
2428
+ prerender?: boolean;
2429
+ proxy?: string | ({
2430
+ to: string;
2431
+ } & ProxyOptions);
2432
+ isr?: number | boolean | VercelISRConfig;
2433
+ basicAuth?: Pick<BasicAuthOptions, "password" | "username" | "realm"> | false;
2434
+ cors?: boolean;
2435
+ swr?: boolean | number;
2436
+ static?: boolean | number;
2437
+ }
2438
+ interface NitroRouteRules extends Omit<NitroRouteConfig, "redirect" | "cors" | "swr" | "static"> {
2439
+ redirect?: {
2440
+ to: string;
2441
+ status: HTTPstatus;
2442
+ };
2443
+ proxy?: {
2444
+ to: string;
2445
+ } & ProxyOptions;
2446
+ [key: string]: any;
2447
+ }
2448
+ type MatchedRouteRule<K extends keyof NitroRouteRules = "custom"> = {
2449
+ name: K;
2450
+ options: Exclude<NitroRouteRules[K], false>;
2451
+ route: string;
2452
+ params?: Record<string, string>;
2453
+ handler?: (opts: unknown) => Middleware;
2454
+ };
2455
+ type MatchedRouteRules = { [K in keyof NitroRouteRules]: MatchedRouteRule<K> };
2456
+ interface VercelISRConfig {
2457
+ /**
2458
+ * (vercel)
2459
+ * Expiration time (in seconds) before the cached asset will be re-generated by invoking the Serverless Function.
2460
+ * Setting the value to `false` (or `isr: true` route rule) means it will never expire.
2461
+ */
2462
+ expiration?: number | false;
2463
+ /**
2464
+ * (vercel)
2465
+ * Group number of the asset.
2466
+ * Prerender assets with the same group number will all be re-validated at the same time.
2467
+ */
2468
+ group?: number;
2469
+ /**
2470
+ * (vercel)
2471
+ * List of query string parameter names that will be cached independently.
2472
+ * - If an empty array, query values are not considered for caching.
2473
+ * - If undefined each unique query value is cached independently
2474
+ * - For wildcard `/**` route rules, `url` is always added.
2475
+ */
2476
+ allowQuery?: string[];
2477
+ /**
2478
+ * (vercel)
2479
+ * When `true`, the query string will be present on the `request` argument passed to the invoked function. The `allowQuery` filter still applies.
2480
+ */
2481
+ passQuery?: boolean;
2482
+ /**
2483
+ * (vercel)
2484
+ *
2485
+ * When `true`, expose the response body regardless of status code including error status codes. (default `false`)
2486
+ */
2487
+ exposeErrBody?: boolean;
2488
+ }
2489
+ //#endregion
2490
+ //#region src/types/nitro.d.ts
2491
+ type MaybeArray<T> = T | T[];
2492
+ interface Nitro {
2493
+ options: NitroOptions;
2494
+ scannedHandlers: NitroEventHandler[];
2495
+ vfs: Map<string, {
2496
+ render: () => string | Promise<string>;
2497
+ }>;
2498
+ hooks: Hookable<NitroHooks>;
2499
+ unimport?: Unimport;
2500
+ logger: ConsolaInstance;
2501
+ fetch: (input: Request) => Response | Promise<Response>;
2502
+ close: () => Promise<void>;
2503
+ updateConfig: (config: NitroDynamicConfig) => void | Promise<void>;
2504
+ routing: Readonly<{
2505
+ sync: () => void;
2506
+ routeRules: Router<NitroRouteRules & {
2507
+ _route: string;
2508
+ }>;
2509
+ routes: Router<MaybeArray<NitroEventHandler & {
2510
+ _importHash: string;
2511
+ }>>;
2512
+ globalMiddleware: (NitroEventHandler & {
2513
+ _importHash: string;
2514
+ })[];
2515
+ routedMiddleware: Router<NitroEventHandler & {
2516
+ _importHash: string;
2517
+ }>;
2518
+ }>;
2519
+ _prerenderedRoutes?: PrerenderRoute[];
2520
+ _prerenderMeta?: Record<string, {
2521
+ contentType?: string;
2522
+ }>;
2523
+ }
2524
+ type NitroDynamicConfig = Pick<NitroConfig, "runtimeConfig" | "routeRules">;
2525
+ type NitroTypes = {
2526
+ routes: Record<string, Partial<Record<HTTPMethod | "default", string[]>>>;
2527
+ tsConfig?: TSConfig;
2528
+ };
2529
+ interface NitroFrameworkInfo {
2530
+ name?: "nitro" | (string & {});
2531
+ version?: string;
2532
+ }
2533
+ /** Build info written to `.output/nitro.json` or `.nitro/dev/nitro.json` */
2534
+ interface NitroBuildInfo {
2535
+ date: string;
2536
+ preset: PresetName;
2537
+ framework: NitroFrameworkInfo;
2538
+ versions: {
2539
+ nitro: string;
2540
+ [key: string]: string;
2541
+ };
2542
+ commands?: {
2543
+ preview?: string;
2544
+ deploy?: string;
2545
+ };
2546
+ serverEntry?: string;
2547
+ publicDir?: string;
2548
+ dev?: {
2549
+ pid: number;
2550
+ workerAddress?: WorkerAddress;
2551
+ };
2552
+ config?: Partial<PresetOptions>;
2553
+ }
2554
+ //#endregion
2555
+ //#region src/types/build.d.ts
2556
+ type RollupConfig = InputOptions$1 & {
2557
+ output?: OutputOptions$1;
2558
+ };
2559
+ type RolldownConfig = InputOptions & {
2560
+ output?: OutputOptions;
2561
+ };
2562
+ interface OXCOptions {
2563
+ minify?: MinifyOptions;
2564
+ transform?: Omit<TransformOptions, "jsx"> & {
2565
+ jsx?: Exclude<TransformOptions["jsx"], false | string>;
2566
+ };
2567
+ }
2568
+ //#endregion
2569
+ //#region src/types/hooks.d.ts
2570
+ type HookResult = void | Promise<void>;
2571
+ interface NitroHooks {
2572
+ "types:extend": (types: NitroTypes) => HookResult;
2573
+ "build:before": (nitro: Nitro) => HookResult;
2574
+ "rollup:before": (nitro: Nitro, config: RollupConfig) => HookResult;
2575
+ compiled: (nitro: Nitro) => HookResult;
2576
+ "dev:reload": (payload?: {
2577
+ entry?: string;
2578
+ workerData?: EnvRunnerData;
2579
+ }) => HookResult;
2580
+ "dev:start": () => HookResult;
2581
+ "dev:error": (cause?: unknown) => HookResult;
2582
+ "rollup:reload": () => HookResult;
2583
+ restart: () => HookResult;
2584
+ close: () => HookResult;
2585
+ "prerender:routes": (routes: Set<string>) => HookResult;
2586
+ "prerender:config": (config: NitroConfig) => HookResult;
2587
+ "prerender:init": (prerenderer: Nitro) => HookResult;
2588
+ "prerender:generate": (route: PrerenderRoute, nitro: Nitro) => HookResult;
2589
+ "prerender:route": (route: PrerenderRoute) => HookResult;
2590
+ "prerender:done": (result: {
2591
+ prerenderedRoutes: PrerenderRoute[];
2592
+ failedRoutes: PrerenderRoute[];
2593
+ }) => HookResult;
2594
+ }
2595
+ //#endregion
2596
+ //#region src/types/module.d.ts
2597
+ type NitroModuleInput = string | NitroModule | NitroModule["setup"] | {
2598
+ nitro: NitroModule;
2599
+ };
2600
+ interface NitroModule {
2601
+ name?: string;
2602
+ setup: (this: void, nitro: Nitro) => void | Promise<void>;
2603
+ }
2604
+ //#endregion
2605
+ //#region src/types/openapi.d.ts
2606
+ /**
2607
+ * Nitro OpenAPI configuration
2608
+ */
2609
+ interface NitroOpenAPIConfig {
2610
+ /**
2611
+ * OpenAPI meta information
2612
+ */
2613
+ meta?: {
2614
+ title?: string;
2615
+ description?: string;
2616
+ version?: string;
2617
+ };
2618
+ /**
2619
+ * OpenAPI json route
2620
+ *
2621
+ * Default is `/_openapi.json`
2622
+ */
2623
+ route?: string;
2624
+ /**
2625
+ * Enable OpenAPI generation for production builds
2626
+ */
2627
+ production?: false | "runtime" | "prerender";
2628
+ /**
2629
+ * UI configurations
2630
+ */
2631
+ ui?: {
2632
+ /**
2633
+ * Scalar UI configuration
2634
+ */
2635
+ scalar?: false | (Partial<unknown> & {
2636
+ /**
2637
+ * Scalar UI route
2638
+ *
2639
+ * Default is `/_scalar`
2640
+ */
2641
+ route?: string;
2642
+ });
2643
+ /**
2644
+ * Swagger UI configuration
2645
+ */
2646
+ swagger?: false | {
2647
+ /**
2648
+ * Swagger UI route
2649
+ *
2650
+ * Default is `/_swagger`
2651
+ */
2652
+ route?: string;
2653
+ };
2654
+ };
2655
+ }
2656
+ //#endregion
2657
+ //#region src/types/preset.d.ts
2658
+ type NitroPreset = NitroConfig | (() => NitroConfig);
2659
+ interface NitroPresetMeta$1 {
2660
+ name: string;
2661
+ stdName?: ProviderName;
2662
+ aliases?: string[];
2663
+ static?: boolean;
2664
+ dev?: boolean;
2665
+ compatibilityDate?: DateString;
2666
+ }
2667
+ //#endregion
2668
+ //#region src/types/config.d.ts
2669
+ type RollupCommonJSOptions = NonNullable<Parameters<typeof commonjs.default>[0]>;
2670
+ /**
2671
+ * Nitro normalized options (nitro.options)
2672
+ */
2673
+ interface NitroOptions extends PresetOptions {
2674
+ _config: NitroConfig;
2675
+ _c12: ResolvedConfig<NitroConfig> | ConfigWatcher<NitroConfig>;
2676
+ _cli?: {
2677
+ command?: string;
2678
+ };
2679
+ compatibilityDate: CompatibilityDates;
2680
+ debug: boolean;
2681
+ preset: PresetName;
2682
+ static: boolean;
2683
+ logLevel: LogLevel;
2684
+ runtimeConfig: NitroRuntimeConfig;
2685
+ workspaceDir: string;
2686
+ rootDir: string;
2687
+ serverDir: string | false;
2688
+ scanDirs: string[];
2689
+ apiDir: string;
2690
+ routesDir: string;
2691
+ buildDir: string;
2692
+ output: {
2693
+ dir: string;
2694
+ serverDir: string;
2695
+ publicDir: string;
2696
+ };
2697
+ /** @deprecated migrate to `serverDir` */
2698
+ srcDir: string;
2699
+ storage: StorageMounts;
2700
+ devStorage: StorageMounts;
2701
+ database: DatabaseConnectionConfigs;
2702
+ devDatabase: DatabaseConnectionConfigs;
2703
+ renderer?: {
2704
+ handler?: string;
2705
+ static?: boolean;
2706
+ template?: string;
2707
+ };
2708
+ ssrRoutes: string[];
2709
+ serveStatic: boolean | "node" | "deno" | "inline";
2710
+ noPublicDir: boolean;
2711
+ manifest?: {
2712
+ deploymentId?: string;
2713
+ };
2714
+ features: {
2715
+ /**
2716
+ * Enable runtime hooks for request and response.
2717
+ *
2718
+ * By default this feature will be enabled if there is at least one nitro plugin.
2719
+ */
2720
+ runtimeHooks?: boolean;
2721
+ /**
2722
+ * Enable WebSocket support
2723
+ */
2724
+ websocket?: boolean;
2725
+ };
2726
+ /**
2727
+ *
2728
+ * @see https://github.com/unjs/unwasm
2729
+ */
2730
+ wasm?: false | UnwasmPluginOptions;
2731
+ openAPI?: NitroOpenAPIConfig;
2732
+ experimental: {
2733
+ openAPI?: boolean;
2734
+ /**
2735
+ * See https://github.com/microsoft/TypeScript/pull/51669
2736
+ */
2737
+ typescriptBundlerResolution?: boolean;
2738
+ /**
2739
+ * Enable native async context support for useRequest()
2740
+ */
2741
+ asyncContext?: boolean;
2742
+ /**
2743
+ * Disable Experimental Sourcemap Minification
2744
+ */
2745
+ sourcemapMinify?: false;
2746
+ /**
2747
+ * Allow env expansion in runtime config
2748
+ *
2749
+ * @see https://github.com/nitrojs/nitro/pull/2043
2750
+ */
2751
+ envExpansion?: boolean;
2752
+ /**
2753
+ * Enable WebSocket support
2754
+ *
2755
+ * @see https://nitro.build/guide/websocket
2756
+ *
2757
+ * @deprecated use `features.websocket` instead.
2758
+ */
2759
+ websocket?: boolean;
2760
+ /**
2761
+ * Enable experimental Database support
2762
+ *
2763
+ * @see https://nitro.build/guide/database
2764
+ */
2765
+ database?: boolean;
2766
+ /**
2767
+ * Enable experimental Tasks support
2768
+ *
2769
+ * @see https://nitro.build/guide/tasks
2770
+ */
2771
+ tasks?: boolean;
2772
+ /**
2773
+ * Infer path aliases from tsconfig.json
2774
+ *
2775
+ * @default true
2776
+ */
2777
+ tsconfigPaths?: boolean;
2778
+ };
2779
+ future: {
2780
+ nativeSWR?: boolean;
2781
+ };
2782
+ serverAssets: ServerAssetDir[];
2783
+ publicAssets: PublicAssetDir[];
2784
+ imports: Partial<UnimportPluginOptions> | false;
2785
+ modules?: NitroModuleInput[];
2786
+ plugins: string[];
2787
+ tasks: {
2788
+ [name: string]: {
2789
+ handler?: string;
2790
+ description?: string;
2791
+ };
2792
+ };
2793
+ scheduledTasks: {
2794
+ [cron: string]: string | string[];
2795
+ };
2796
+ virtual: Record<string, string | (() => string | Promise<string>)>;
2797
+ compressPublicAssets: boolean | CompressOptions;
2798
+ ignore: string[];
2799
+ dev: boolean;
2800
+ devServer: {
2801
+ port?: number;
2802
+ hostname?: string;
2803
+ watch?: string[];
2804
+ runner?: RunnerName;
2805
+ };
2806
+ watchOptions: ChokidarOptions;
2807
+ devProxy: Record<string, string | ProxyServerOptions>;
2808
+ logging: {
2809
+ compressedSizes?: boolean;
2810
+ buildSuccess?: boolean;
2811
+ };
2812
+ baseURL: string;
2813
+ apiBaseURL: string;
2814
+ serverEntry: false | {
2815
+ handler: string;
2816
+ format?: EventHandlerFormat;
2817
+ };
2818
+ handlers: NitroEventHandler[];
2819
+ devHandlers: NitroDevEventHandler[];
2820
+ routeRules: {
2821
+ [path: string]: NitroRouteRules;
2822
+ };
2823
+ routes: Record<string, string | Omit<NitroEventHandler, "route" | "middleware">>;
2824
+ errorHandler: string | string[];
2825
+ devErrorHandler: NitroErrorHandler;
2826
+ prerender: {
2827
+ /**
2828
+ * Prerender HTML routes within subfolders (`/test` would produce `/test/index.html`)
2829
+ */
2830
+ autoSubfolderIndex?: boolean;
2831
+ concurrency?: number;
2832
+ interval?: number;
2833
+ crawlLinks?: boolean;
2834
+ failOnError?: boolean;
2835
+ ignore?: Array<string | RegExp | ((path: string) => undefined | null | boolean)>;
2836
+ ignoreUnprefixedPublicAssets?: boolean;
2837
+ routes?: string[];
2838
+ /**
2839
+ * Amount of retries. Pass Infinity to retry indefinitely.
2840
+ * @default 3
2841
+ */
2842
+ retry?: number;
2843
+ /**
2844
+ * Delay between each retry in ms.
2845
+ * @default 500
2846
+ */
2847
+ retryDelay?: number;
2848
+ };
2849
+ builder?: "rollup" | "rolldown" | "vite";
2850
+ rollupConfig?: RollupConfig;
2851
+ rolldownConfig?: RolldownConfig;
2852
+ entry: string;
2853
+ unenv: Preset[];
2854
+ alias: Record<string, string>;
2855
+ minify: boolean;
2856
+ inlineDynamicImports: boolean;
2857
+ sourcemap: boolean;
2858
+ node: boolean;
2859
+ moduleSideEffects: string[];
2860
+ oxc?: OXCOptions;
2861
+ replace: Record<string, string | ((id: string) => string)>;
2862
+ commonJS?: RollupCommonJSOptions;
2863
+ exportConditions?: string[];
2864
+ noExternals?: boolean | (string | RegExp)[];
2865
+ traceDeps?: (string | RegExp)[];
2866
+ typescript: {
2867
+ strict?: boolean;
2868
+ generateRuntimeConfigTypes?: boolean;
2869
+ generateTsConfig?: boolean;
2870
+ tsConfig?: Partial<TSConfig>;
2871
+ /**
2872
+ * Path of the generated types directory.
2873
+ *
2874
+ * Default is `node_modules/.nitro/types`
2875
+ */
2876
+ generatedTypesDir?: string;
2877
+ /**
2878
+ * Path of the generated `tsconfig.json` relative to `typescript.generatedTypesDir`
2879
+ *
2880
+ * Default is `tsconfig.json` (`node_modules/.nitro/types/tsconfig.json`)
2881
+ */
2882
+ tsconfigPath?: string;
2883
+ };
2884
+ hooks: NestedHooks<NitroHooks>;
2885
+ commands: {
2886
+ preview?: string;
2887
+ deploy?: string;
2888
+ };
2889
+ framework: NitroFrameworkInfo;
2890
+ iis?: {
2891
+ mergeConfig?: boolean;
2892
+ overrideConfig?: boolean;
2893
+ };
2894
+ }
2895
+ /**
2896
+ * Nitro input config (nitro.config)
2897
+ */
2898
+ interface NitroConfig extends Partial<Omit<NitroOptions, "routeRules" | "rollupConfig" | "preset" | "compatibilityDate" | "unenv" | "serverDir" | "_config" | "_c12" | "serverEntry" | "renderer" | "output">>, C12InputConfig<NitroConfig> {
2899
+ preset?: PresetNameInput;
2900
+ extends?: string | string[] | NitroPreset;
2901
+ routeRules?: {
2902
+ [path: string]: NitroRouteConfig;
2903
+ };
2904
+ rollupConfig?: Partial<RollupConfig>;
2905
+ compatibilityDate?: CompatibilityDateSpec;
2906
+ unenv?: Preset | Preset[];
2907
+ serverDir?: boolean | "./" | "./server" | (string & {});
2908
+ serverEntry?: string | NitroOptions["serverEntry"];
2909
+ renderer?: false | NitroOptions["renderer"];
2910
+ output?: Partial<NitroOptions["output"]>;
2911
+ }
2912
+ interface LoadConfigOptions {
2913
+ watch?: boolean;
2914
+ c12?: WatchConfigOptions;
2915
+ compatibilityDate?: CompatibilityDateSpec;
2916
+ dotenv?: boolean | DotenvOptions;
2917
+ }
2918
+ interface PublicAssetDir {
2919
+ baseURL?: string;
2920
+ fallthrough?: boolean;
2921
+ maxAge: number;
2922
+ dir: string;
2923
+ /**
2924
+ * Pass false to disable ignore patterns when scanning the directory, or
2925
+ * pass an array of glob patterns to ignore (which will override global
2926
+ * nitro.ignore patterns).
2927
+ */
2928
+ ignore?: false | string[];
2929
+ }
2930
+ interface CompressOptions {
2931
+ gzip?: boolean;
2932
+ brotli?: boolean;
2933
+ zstd?: boolean;
2934
+ }
2935
+ interface ServerAssetDir {
2936
+ baseName: string;
2937
+ pattern?: string;
2938
+ dir: string;
2939
+ ignore?: string[];
2940
+ }
2941
+ type CustomDriverName = string & {
2942
+ _custom?: any;
2943
+ };
2944
+ interface StorageMounts {
2945
+ [path: string]: {
2946
+ driver: BuiltinDriverName | CustomDriverName;
2947
+ [option: string]: any;
2948
+ };
2949
+ }
2950
+ type DatabaseConnectionName = "default" | (string & {});
2951
+ type DatabaseConnectionConfig = {
2952
+ connector: ConnectorName;
2953
+ options?: {
2954
+ [key: string]: any;
2955
+ };
2956
+ };
2957
+ type DatabaseConnectionConfigs = Record<DatabaseConnectionName, DatabaseConnectionConfig>;
2958
+ interface NitroRuntimeConfigApp {
2959
+ [key: string]: any;
2960
+ }
2961
+ interface NitroRuntimeConfig {
2962
+ nitro?: {
2963
+ envPrefix?: string;
2964
+ envExpansion?: boolean;
2965
+ routeRules?: {
2966
+ [path: string]: NitroRouteConfig;
2967
+ };
2968
+ openAPI?: NitroOpenAPIConfig;
2969
+ };
2970
+ [key: string]: any;
2971
+ }
2972
+ //#endregion
2973
+ //#region src/types/global.d.ts
2974
+ interface NitroImportMeta {
2975
+ dev?: boolean;
2976
+ preset?: NitroOptions["preset"];
2977
+ prerender?: boolean;
2978
+ nitro?: boolean;
2979
+ server?: boolean;
2980
+ client?: boolean;
2981
+ baseURL?: string;
2982
+ runtimeConfig?: Record<string, any>;
2983
+ _asyncContext?: boolean;
2984
+ _tasks?: boolean;
2985
+ _websocket?: boolean;
2986
+ }
2987
+ declare global {
2988
+ interface ImportMeta extends NitroImportMeta {}
2989
+ }
2990
+ //#endregion
2991
+ //#region src/types/h3.d.ts
2992
+ type H3EventFetch = (request: NitroFetchRequest, init?: RequestInit) => Promise<Response>;
2993
+ type H3Event$Fetch = Base$Fetch<unknown, NitroFetchRequest>;
2994
+ declare module "srvx" {
2995
+ interface ServerRequestContext {
2996
+ routeRules?: MatchedRouteRules;
2997
+ nitro?: {
2998
+ runtimeConfig?: NitroRuntimeConfig;
2999
+ errors?: {
3000
+ error?: Error;
3001
+ context: CapturedErrorContext;
3002
+ }[];
3003
+ };
3004
+ cache?: {
3005
+ options?: CacheOptions;
3006
+ };
3007
+ }
3008
+ }
3009
+ //#endregion
3010
+ export { $Fetch, AssetMeta, AvailableRouterMethod, Base$Fetch, type CacheEntry, type CacheOptions, CachedEventHandlerOptions, CaptureError, CapturedErrorContext, CompressOptions, DatabaseConnectionConfig, DatabaseConnectionConfigs, DatabaseConnectionName, type EnvRunner, EventHandlerFormat, ExtractedRouteMethod, type FetchHandler, H3Event$Fetch, H3EventFetch, HTTPstatus, InternalApi, LoadConfigOptions, MatchedRouteRule, MatchedRouteRules, MatchedRoutes, MiddlewareOf, Nitro, NitroApp, NitroAppPlugin, NitroAsyncContext, NitroBuildInfo, NitroConfig, NitroDevEventHandler, NitroDynamicConfig, NitroErrorHandler, NitroEventHandler, NitroFetchOptions, NitroFetchRequest, NitroFrameworkInfo, NitroHooks, NitroImportMeta, NitroModule, NitroModuleInput, type NitroOpenAPIConfig, NitroOptions, NitroPreset, NitroPresetMeta$1 as NitroPresetMeta, NitroRouteConfig, NitroRouteMeta, NitroRouteRules, NitroRuntimeConfig, NitroRuntimeConfigApp, NitroRuntimeHooks, NitroTypes, OXCOptions, PrerenderGenerateRoute, PrerenderRoute, PublicAsset, PublicAssetDir, RenderContext, RenderHandler, RenderResponse, type ResponseCacheEntry, RolldownConfig, RollupConfig, type RunnerMessageListener, type RunnerRPCHooks, Serialize, SerializeObject, SerializeTuple, ServerAssetDir, type ServerRequest, Simplify, StorageMounts, Task, TaskContext, TaskEvent, TaskMeta, TaskPayload, TaskResult, TaskRunnerOptions, TypedInternalResponse, type UpgradeHandler, VercelISRConfig, type WorkerAddress, type WorkerHooks };