nitro-nightly 3.0.0-beta-28969273.f7aa9de6 → 4.0.0-20251010-091516-7cafddba

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 (417) hide show
  1. package/README.md +8 -39
  2. package/dist/_chunks/app.mjs +19797 -0
  3. package/dist/_chunks/build.mjs +84 -0
  4. package/dist/_chunks/build2.mjs +318 -0
  5. package/dist/_chunks/build3.mjs +6452 -0
  6. package/dist/_chunks/detect-acorn.mjs +503 -0
  7. package/dist/_chunks/index.mjs +22242 -0
  8. package/dist/_chunks/index2.mjs +297 -0
  9. package/dist/_chunks/index3.mjs +1058 -0
  10. package/dist/_chunks/index4.mjs +1206 -0
  11. package/dist/_chunks/info.mjs +11157 -0
  12. package/dist/_chunks/json5.mjs +68 -0
  13. package/dist/_chunks/jsonc.mjs +51 -0
  14. package/dist/_chunks/pathe.M-eThtNZ.mjs +204 -0
  15. package/dist/_chunks/plugin.mjs +960 -0
  16. package/dist/_chunks/server.mjs +254 -0
  17. package/dist/_chunks/snapshot.mjs +284 -0
  18. package/dist/_chunks/toml.mjs +259 -0
  19. package/dist/_chunks/yaml.mjs +86 -0
  20. package/dist/cli/build.mjs +10 -3
  21. package/dist/cli/dev.mjs +41 -9
  22. package/dist/cli/index.mjs +460 -1
  23. package/dist/cli/index2.mjs +4 -1
  24. package/dist/cli/list.mjs +10 -4
  25. package/dist/cli/prepare.mjs +6 -3
  26. package/dist/cli/run.mjs +7 -4
  27. package/dist/index.d.mts +52 -0
  28. package/dist/index.mjs +55 -0
  29. package/dist/node_modules/@poppinss/colors/build/index.js +169 -0
  30. package/dist/node_modules/@poppinss/colors/package.json +116 -0
  31. package/dist/node_modules/@poppinss/dumper/build/chunk-26HALFTP.js +602 -0
  32. package/dist/node_modules/@poppinss/dumper/build/formatters/console/main.js +441 -0
  33. package/dist/node_modules/@poppinss/dumper/build/formatters/html/main.js +717 -0
  34. package/dist/node_modules/@poppinss/dumper/package.json +122 -0
  35. package/dist/node_modules/@poppinss/exception/build/index.js +63 -0
  36. package/dist/node_modules/@poppinss/exception/package.json +106 -0
  37. package/dist/node_modules/@sindresorhus/is/distribution/index.js +1313 -0
  38. package/dist/node_modules/@sindresorhus/is/distribution/utilities.js +3 -0
  39. package/dist/node_modules/@sindresorhus/is/package.json +81 -0
  40. package/dist/node_modules/@speed-highlight/core/dist/index.js +4 -0
  41. package/dist/node_modules/@speed-highlight/core/dist/terminal.js +2 -0
  42. package/dist/node_modules/@speed-highlight/core/package.json +90 -0
  43. package/dist/node_modules/cookie/dist/index.js +239 -0
  44. package/dist/node_modules/cookie/package.json +42 -0
  45. package/dist/node_modules/croner/dist/croner.js +1 -0
  46. package/dist/node_modules/croner/package.json +63 -0
  47. package/dist/node_modules/defu/dist/defu.mjs +69 -0
  48. package/dist/node_modules/defu/package.json +43 -0
  49. package/dist/node_modules/destr/dist/index.mjs +72 -0
  50. package/dist/node_modules/destr/package.json +47 -0
  51. package/dist/node_modules/error-stack-parser-es/dist/index.mjs +38 -0
  52. package/dist/node_modules/error-stack-parser-es/dist/lite.mjs +167 -0
  53. package/dist/node_modules/error-stack-parser-es/package.json +83 -0
  54. package/dist/node_modules/get-port-please/dist/index.mjs +430 -0
  55. package/dist/node_modules/get-port-please/package.json +39 -0
  56. package/dist/node_modules/hookable/dist/index.mjs +290 -0
  57. package/dist/node_modules/hookable/package.json +49 -0
  58. package/dist/node_modules/kleur/index.js +110 -0
  59. package/dist/node_modules/kleur/index.mjs +110 -0
  60. package/dist/node_modules/kleur/package.json +51 -0
  61. package/dist/node_modules/klona/dist/index.mjs +81 -0
  62. package/dist/node_modules/klona/full/index.mjs +53 -0
  63. package/dist/node_modules/klona/package.json +74 -0
  64. package/dist/node_modules/scule/dist/index.mjs +80 -0
  65. package/dist/node_modules/scule/package.json +43 -0
  66. package/dist/node_modules/source-map/lib/array-set.js +100 -0
  67. package/dist/node_modules/source-map/lib/base64-vlq.js +94 -0
  68. package/dist/node_modules/source-map/lib/base64.js +19 -0
  69. package/dist/node_modules/source-map/lib/binary-search.js +113 -0
  70. package/dist/node_modules/source-map/lib/mapping-list.js +83 -0
  71. package/dist/node_modules/source-map/lib/mappings.wasm +0 -0
  72. package/dist/node_modules/source-map/lib/read-wasm.js +27 -0
  73. package/dist/node_modules/source-map/lib/source-map-consumer.js +1081 -0
  74. package/dist/node_modules/source-map/lib/source-map-generator.js +439 -0
  75. package/dist/node_modules/source-map/lib/source-node.js +430 -0
  76. package/dist/node_modules/source-map/lib/url.js +13 -0
  77. package/dist/node_modules/source-map/lib/util.js +444 -0
  78. package/dist/node_modules/source-map/lib/wasm.js +138 -0
  79. package/dist/node_modules/source-map/package.json +79 -0
  80. package/dist/node_modules/source-map/source-map.js +10 -0
  81. package/dist/node_modules/std-env/dist/index.mjs +1 -0
  82. package/dist/node_modules/std-env/package.json +46 -0
  83. package/dist/node_modules/supports-color/index.js +202 -0
  84. package/dist/node_modules/supports-color/package.json +64 -0
  85. package/dist/node_modules/ufo/dist/index.mjs +638 -0
  86. package/dist/node_modules/ufo/package.json +47 -0
  87. package/dist/node_modules/unctx/dist/index.mjs +131 -0
  88. package/dist/node_modules/unctx/package.json +67 -0
  89. package/dist/node_modules/youch/build/chunk-4L7RY2JA.js +42 -0
  90. package/dist/node_modules/youch/build/chunk-4XB2BYKC.js +85 -0
  91. package/dist/node_modules/youch/build/chunk-4YEN7HVQ.js +61 -0
  92. package/dist/node_modules/youch/build/chunk-EUJBVOYB.js +83 -0
  93. package/dist/node_modules/youch/build/chunk-HFSXRSKS.js +85 -0
  94. package/dist/node_modules/youch/build/chunk-JAN2TFI2.js +222 -0
  95. package/dist/node_modules/youch/build/chunk-OSUFJZHZ.js +6 -0
  96. package/dist/node_modules/youch/build/chunk-PINJDICN.js +72 -0
  97. package/dist/node_modules/youch/build/chunk-PUHGL6HA.js +41 -0
  98. package/dist/node_modules/youch/build/chunk-VE4LENUR.js +45 -0
  99. package/dist/node_modules/youch/build/index.js +352 -0
  100. package/dist/node_modules/youch/build/public/error_cause/style.css +5 -0
  101. package/dist/node_modules/youch/build/public/error_info/script.js +13 -0
  102. package/dist/node_modules/youch/build/public/error_info/style.css +144 -0
  103. package/dist/node_modules/youch/build/public/error_stack/script.js +74 -0
  104. package/dist/node_modules/youch/build/public/error_stack/style.css +220 -0
  105. package/dist/node_modules/youch/build/public/error_stack_source/style.css +123 -0
  106. package/dist/node_modules/youch/build/public/header/script.js +16 -0
  107. package/dist/node_modules/youch/build/public/header/style.css +56 -0
  108. package/dist/node_modules/youch/build/public/layout/script.js +20 -0
  109. package/dist/node_modules/youch/build/public/layout/style.css +431 -0
  110. package/dist/node_modules/youch/package.json +133 -0
  111. package/dist/node_modules/youch-core/build/index.js +316 -0
  112. package/dist/node_modules/youch-core/package.json +124 -0
  113. package/dist/presets/_nitro/runtime/nitro-dev.mjs +48 -73
  114. package/dist/presets/_nitro/runtime/{nitro-prerenderer.d.ts → nitro-prerenderer.d.mts} +1 -1
  115. package/dist/presets/_nitro/runtime/nitro-prerenderer.mjs +12 -1
  116. package/dist/presets/_nitro/runtime/service-worker.mjs +5 -15
  117. package/dist/presets/aws-amplify/runtime/aws-amplify.mjs +2 -2
  118. package/dist/presets/aws-lambda/runtime/_utils.d.mts +18 -0
  119. package/dist/presets/aws-lambda/runtime/_utils.mjs +102 -0
  120. package/dist/presets/aws-lambda/runtime/aws-lambda-streaming.d.mts +3 -0
  121. package/dist/presets/aws-lambda/runtime/aws-lambda-streaming.mjs +12 -32
  122. package/dist/presets/aws-lambda/runtime/aws-lambda.d.mts +3 -0
  123. package/dist/presets/aws-lambda/runtime/aws-lambda.mjs +6 -38
  124. package/dist/{runtime/internal/utils.azure.d.ts → presets/azure/runtime/_utils.d.mts} +1 -1
  125. package/dist/{runtime/internal/utils.azure.mjs → presets/azure/runtime/_utils.mjs} +3 -4
  126. package/dist/presets/azure/runtime/azure-swa.mjs +11 -13
  127. package/dist/presets/bun/runtime/bun.mjs +13 -18
  128. package/dist/presets/cloudflare/runtime/_module-handler.d.mts +13 -0
  129. package/dist/presets/cloudflare/runtime/_module-handler.mjs +93 -0
  130. package/dist/presets/cloudflare/runtime/cloudflare-durable.d.mts +19 -0
  131. package/dist/presets/cloudflare/runtime/cloudflare-durable.mjs +74 -0
  132. package/dist/presets/cloudflare/runtime/cloudflare-module.d.mts +9 -0
  133. package/dist/presets/cloudflare/runtime/cloudflare-module.mjs +13 -97
  134. package/dist/presets/cloudflare/runtime/{cloudflare-pages.d.ts → cloudflare-pages.d.mts} +1 -1
  135. package/dist/presets/cloudflare/runtime/cloudflare-pages.mjs +19 -27
  136. package/dist/{runtime/internal/timing.d.ts → presets/cloudflare/runtime/plugin.dev.d.mts} +1 -0
  137. package/dist/presets/cloudflare/runtime/plugin.dev.mjs +89 -0
  138. package/dist/presets/deno/runtime/deno-deploy.mjs +11 -25
  139. package/dist/presets/deno/runtime/deno-server.d.mts +6 -0
  140. package/dist/presets/deno/runtime/deno-server.mjs +15 -21
  141. package/dist/presets/netlify/runtime/netlify-edge.d.mts +3 -0
  142. package/dist/presets/netlify/runtime/netlify-edge.mjs +8 -16
  143. package/dist/presets/netlify/runtime/netlify.mjs +16 -45
  144. package/dist/presets/node/runtime/{cluster.mjs → node-cluster.mjs} +1 -3
  145. package/dist/presets/node/runtime/node-middleware.d.mts +4 -0
  146. package/dist/presets/node/runtime/{node-listener.mjs → node-middleware.mjs} +3 -4
  147. package/dist/presets/node/runtime/node-server.mjs +3 -4
  148. package/dist/presets/standard/runtime/server.d.mts +5 -0
  149. package/dist/presets/standard/runtime/server.mjs +6 -0
  150. package/dist/presets/stormkit/runtime/stormkit.mjs +8 -12
  151. package/dist/presets/vercel/runtime/vercel.d.mts +8 -0
  152. package/dist/presets/vercel/runtime/vercel.mjs +11 -11
  153. package/dist/presets/winterjs/runtime/winterjs.mjs +22 -4
  154. package/dist/presets/{node/runtime/node-server.d.ts → zeabur/runtime/zeabur.d.mts} +1 -1
  155. package/dist/presets/zeabur/runtime/zeabur.mjs +2 -6
  156. package/dist/presets.mjs +2460 -0
  157. package/dist/runtime/index.d.mts +11 -0
  158. package/dist/runtime/index.mjs +8 -8
  159. package/dist/runtime/internal/app.d.mts +2 -0
  160. package/dist/runtime/internal/app.mjs +129 -128
  161. package/dist/runtime/internal/cache.d.mts +7 -0
  162. package/dist/runtime/internal/cache.mjs +82 -175
  163. package/dist/runtime/internal/{context.d.ts → context.d.mts} +3 -3
  164. package/dist/runtime/internal/context.mjs +6 -6
  165. package/dist/runtime/internal/error/dev.d.mts +9 -0
  166. package/dist/runtime/internal/error/dev.mjs +122 -0
  167. package/dist/runtime/internal/error/prod.d.mts +8 -0
  168. package/dist/runtime/internal/error/prod.mjs +62 -0
  169. package/dist/runtime/internal/error/utils.d.mts +8 -0
  170. package/dist/runtime/internal/error/utils.mjs +3 -0
  171. package/dist/runtime/internal/index.d.mts +3 -0
  172. package/dist/runtime/internal/index.mjs +1 -14
  173. package/dist/runtime/internal/renderer.d.mts +3 -0
  174. package/dist/runtime/internal/renderer.mjs +29 -33
  175. package/dist/runtime/internal/route-rules.d.mts +8 -0
  176. package/dist/runtime/internal/route-rules.mjs +58 -63
  177. package/dist/runtime/internal/routes/dev-tasks.d.mts +3 -0
  178. package/dist/runtime/internal/routes/dev-tasks.mjs +23 -0
  179. package/dist/runtime/internal/routes/openapi.d.mts +3 -0
  180. package/dist/runtime/internal/routes/openapi.mjs +24 -9
  181. package/dist/runtime/internal/routes/renderer-template.d.mts +2 -0
  182. package/dist/runtime/internal/routes/renderer-template.dev.d.mts +3 -0
  183. package/dist/runtime/internal/routes/renderer-template.dev.mjs +21 -0
  184. package/dist/runtime/internal/routes/renderer-template.mjs +4 -0
  185. package/dist/runtime/internal/routes/scalar.d.mts +3 -0
  186. package/dist/runtime/internal/routes/scalar.mjs +7 -4
  187. package/dist/runtime/internal/routes/swagger.d.mts +3 -0
  188. package/dist/runtime/internal/routes/swagger.mjs +5 -4
  189. package/dist/runtime/internal/{utils.env.d.ts → runtime-config.d.mts} +4 -2
  190. package/dist/runtime/internal/{utils.env.mjs → runtime-config.mjs} +16 -6
  191. package/dist/runtime/internal/static.d.mts +3 -0
  192. package/dist/runtime/internal/static.mjs +24 -36
  193. package/dist/runtime/internal/storage.mjs +2 -1
  194. package/dist/runtime/internal/task.mjs +6 -6
  195. package/dist/runtime/internal/utils.d.mts +1 -0
  196. package/dist/runtime/internal/utils.mjs +1 -116
  197. package/dist/runtime/internal/vite/dev-entry.d.mts +1 -0
  198. package/dist/runtime/internal/vite/dev-entry.mjs +6 -0
  199. package/dist/runtime/internal/vite/dev-worker.mjs +362 -0
  200. package/dist/runtime/internal/vite/prod-setup.d.mts +4 -0
  201. package/dist/runtime/internal/vite/prod-setup.mjs +55 -0
  202. package/dist/runtime/internal/vite/ssr-renderer.d.mts +4 -0
  203. package/dist/runtime/internal/vite/ssr-renderer.mjs +4 -0
  204. package/dist/types/index.d.mts +2688 -138
  205. package/dist/vite.d.mts +59 -0
  206. package/dist/vite.mjs +68 -0
  207. package/lib/config.d.mts +9 -0
  208. package/lib/deps/h3.d.mts +1 -0
  209. package/lib/deps/h3.mjs +1 -0
  210. package/lib/deps/ofetch.mjs +1 -0
  211. package/lib/deps/ofetch.mts +1 -0
  212. package/lib/meta.d.mts +5 -0
  213. package/lib/meta.mjs +21 -0
  214. package/{runtime-meta.d.ts → lib/runtime-meta.d.mts} +1 -0
  215. package/{runtime-meta.mjs → lib/runtime-meta.mjs} +12 -4
  216. package/package.json +142 -160
  217. package/cli.d.ts +0 -1
  218. package/config.d.ts +0 -1
  219. package/core.d.ts +0 -1
  220. package/dist/cli/index.d.ts +0 -1
  221. package/dist/config/index.d.mts +0 -6
  222. package/dist/config/index.d.ts +0 -6
  223. package/dist/core/index.d.mts +0 -30
  224. package/dist/core/index.d.ts +0 -30
  225. package/dist/core/index.mjs +0 -2456
  226. package/dist/kit/index.d.mts +0 -44
  227. package/dist/kit/index.d.ts +0 -44
  228. package/dist/kit/index.mjs +0 -71
  229. package/dist/meta/index.d.mts +0 -3
  230. package/dist/meta/index.d.ts +0 -3
  231. package/dist/meta/index.mjs +0 -3
  232. package/dist/presets/_all.gen.d.ts +0 -2
  233. package/dist/presets/_all.gen.mjs +0 -52
  234. package/dist/presets/_nitro/base-worker.d.ts +0 -2
  235. package/dist/presets/_nitro/base-worker.mjs +0 -25
  236. package/dist/presets/_nitro/nitro-dev.d.ts +0 -2
  237. package/dist/presets/_nitro/nitro-dev.mjs +0 -19
  238. package/dist/presets/_nitro/nitro-prerender.d.ts +0 -2
  239. package/dist/presets/_nitro/nitro-prerender.mjs +0 -17
  240. package/dist/presets/_nitro/preset.d.ts +0 -2
  241. package/dist/presets/_nitro/preset.mjs +0 -5
  242. package/dist/presets/_nitro/service-worker.d.ts +0 -2
  243. package/dist/presets/_nitro/service-worker.mjs +0 -110
  244. package/dist/presets/_resolve.d.ts +0 -8
  245. package/dist/presets/_resolve.mjs +0 -44
  246. package/dist/presets/_static/preset.d.ts +0 -2
  247. package/dist/presets/_static/preset.mjs +0 -69
  248. package/dist/presets/_types.gen.d.ts +0 -16
  249. package/dist/presets/alwaysdata/preset.d.ts +0 -2
  250. package/dist/presets/alwaysdata/preset.mjs +0 -14
  251. package/dist/presets/aws-amplify/preset.d.ts +0 -3
  252. package/dist/presets/aws-amplify/preset.mjs +0 -27
  253. package/dist/presets/aws-amplify/types.d.ts +0 -141
  254. package/dist/presets/aws-amplify/utils.d.ts +0 -2
  255. package/dist/presets/aws-amplify/utils.mjs +0 -82
  256. package/dist/presets/aws-lambda/preset.d.ts +0 -2
  257. package/dist/presets/aws-lambda/preset.mjs +0 -21
  258. package/dist/presets/aws-lambda/runtime/aws-lambda-streaming.d.ts +0 -14
  259. package/dist/presets/aws-lambda/runtime/aws-lambda.d.ts +0 -4
  260. package/dist/presets/azure/preset.d.ts +0 -3
  261. package/dist/presets/azure/preset.mjs +0 -44
  262. package/dist/presets/azure/runtime/azure-functions.mjs +0 -24
  263. package/dist/presets/azure/runtime/azure-swa.d.ts +0 -5
  264. package/dist/presets/azure/types.d.ts +0 -13
  265. package/dist/presets/azure/types.mjs +0 -0
  266. package/dist/presets/azure/utils.d.ts +0 -3
  267. package/dist/presets/azure/utils.mjs +0 -183
  268. package/dist/presets/bun/preset.d.ts +0 -2
  269. package/dist/presets/bun/preset.mjs +0 -17
  270. package/dist/presets/cleavr/preset.d.ts +0 -2
  271. package/dist/presets/cleavr/preset.mjs +0 -12
  272. package/dist/presets/cloudflare/preset.d.ts +0 -3
  273. package/dist/presets/cloudflare/preset.mjs +0 -145
  274. package/dist/presets/cloudflare/runtime/cloudflare-module.d.ts +0 -13
  275. package/dist/presets/cloudflare/runtime/cloudflare-worker.mjs +0 -64
  276. package/dist/presets/cloudflare/types.d.ts +0 -89
  277. package/dist/presets/cloudflare/types.mjs +0 -0
  278. package/dist/presets/cloudflare/types.wrangler.d.ts +0 -974
  279. package/dist/presets/cloudflare/types.wrangler.mjs +0 -0
  280. package/dist/presets/cloudflare/utils.d.ts +0 -3
  281. package/dist/presets/cloudflare/utils.mjs +0 -163
  282. package/dist/presets/deno/preset.d.ts +0 -2
  283. package/dist/presets/deno/preset.mjs +0 -148
  284. package/dist/presets/deno/runtime/_deno-env-polyfill.d.ts +0 -0
  285. package/dist/presets/deno/runtime/_deno-env-polyfill.mjs +0 -1
  286. package/dist/presets/digitalocean/preset.d.ts +0 -2
  287. package/dist/presets/digitalocean/preset.mjs +0 -11
  288. package/dist/presets/edgio/preset.d.ts +0 -2
  289. package/dist/presets/edgio/preset.mjs +0 -95
  290. package/dist/presets/firebase/preset.d.ts +0 -3
  291. package/dist/presets/firebase/preset.mjs +0 -50
  292. package/dist/presets/firebase/runtime/firebase-gen-1.d.ts +0 -2
  293. package/dist/presets/firebase/runtime/firebase-gen-1.mjs +0 -7
  294. package/dist/presets/firebase/runtime/firebase-gen-2.d.ts +0 -2
  295. package/dist/presets/firebase/runtime/firebase-gen-2.mjs +0 -14
  296. package/dist/presets/firebase/runtime/firebase-gen-default.d.ts +0 -1
  297. package/dist/presets/firebase/runtime/firebase-gen-default.mjs +0 -1
  298. package/dist/presets/firebase/types.d.ts +0 -38
  299. package/dist/presets/firebase/types.mjs +0 -0
  300. package/dist/presets/firebase/utils.d.ts +0 -3
  301. package/dist/presets/firebase/utils.mjs +0 -50
  302. package/dist/presets/flightcontrol/preset.d.ts +0 -2
  303. package/dist/presets/flightcontrol/preset.mjs +0 -11
  304. package/dist/presets/heroku/preset.d.ts +0 -2
  305. package/dist/presets/heroku/preset.mjs +0 -11
  306. package/dist/presets/iis/preset.d.ts +0 -2
  307. package/dist/presets/iis/preset.mjs +0 -32
  308. package/dist/presets/iis/utils.d.ts +0 -3
  309. package/dist/presets/iis/utils.mjs +0 -161
  310. package/dist/presets/index.d.mts +0 -1
  311. package/dist/presets/index.d.ts +0 -2
  312. package/dist/presets/index.mjs +0 -1
  313. package/dist/presets/koyeb/preset.d.ts +0 -2
  314. package/dist/presets/koyeb/preset.mjs +0 -11
  315. package/dist/presets/netlify/legacy/preset.d.ts +0 -2
  316. package/dist/presets/netlify/legacy/preset.mjs +0 -143
  317. package/dist/presets/netlify/legacy/runtime/_deno-env-polyfill.d.ts +0 -0
  318. package/dist/presets/netlify/legacy/runtime/_deno-env-polyfill.mjs +0 -1
  319. package/dist/presets/netlify/legacy/runtime/netlify-builder.d.ts +0 -3
  320. package/dist/presets/netlify/legacy/runtime/netlify-builder.mjs +0 -5
  321. package/dist/presets/netlify/legacy/runtime/netlify-edge.d.ts +0 -2
  322. package/dist/presets/netlify/legacy/runtime/netlify-edge.mjs +0 -25
  323. package/dist/presets/netlify/legacy/runtime/netlify-lambda.d.ts +0 -3
  324. package/dist/presets/netlify/legacy/runtime/netlify-lambda.mjs +0 -38
  325. package/dist/presets/netlify/legacy/runtime/netlify.d.ts +0 -4
  326. package/dist/presets/netlify/legacy/runtime/netlify.mjs +0 -22
  327. package/dist/presets/netlify/legacy/utils.d.ts +0 -4
  328. package/dist/presets/netlify/legacy/utils.mjs +0 -113
  329. package/dist/presets/netlify/preset.d.ts +0 -3
  330. package/dist/presets/netlify/preset.mjs +0 -128
  331. package/dist/presets/netlify/runtime/_deno-env-polyfill.d.ts +0 -0
  332. package/dist/presets/netlify/runtime/_deno-env-polyfill.mjs +0 -1
  333. package/dist/presets/netlify/runtime/netlify-edge.d.ts +0 -2
  334. package/dist/presets/netlify/types.d.ts +0 -12
  335. package/dist/presets/netlify/types.mjs +0 -0
  336. package/dist/presets/netlify/utils.d.ts +0 -5
  337. package/dist/presets/netlify/utils.mjs +0 -94
  338. package/dist/presets/node/preset.d.ts +0 -2
  339. package/dist/presets/node/preset.mjs +0 -49
  340. package/dist/presets/node/runtime/cli.d.ts +0 -1
  341. package/dist/presets/node/runtime/cli.mjs +0 -22
  342. package/dist/presets/node/runtime/node-listener.d.ts +0 -6
  343. package/dist/presets/platform.sh/preset.d.ts +0 -2
  344. package/dist/presets/platform.sh/preset.mjs +0 -11
  345. package/dist/presets/render.com/preset.d.ts +0 -2
  346. package/dist/presets/render.com/preset.mjs +0 -11
  347. package/dist/presets/stormkit/preset.d.ts +0 -2
  348. package/dist/presets/stormkit/preset.mjs +0 -15
  349. package/dist/presets/vercel/preset.d.ts +0 -3
  350. package/dist/presets/vercel/preset.mjs +0 -104
  351. package/dist/presets/vercel/runtime/vercel-edge.d.ts +0 -2
  352. package/dist/presets/vercel/runtime/vercel-edge.mjs +0 -22
  353. package/dist/presets/vercel/runtime/vercel.d.ts +0 -4
  354. package/dist/presets/vercel/types.d.ts +0 -78
  355. package/dist/presets/vercel/types.mjs +0 -0
  356. package/dist/presets/vercel/utils.d.ts +0 -5
  357. package/dist/presets/vercel/utils.mjs +0 -186
  358. package/dist/presets/winterjs/preset.d.ts +0 -2
  359. package/dist/presets/winterjs/preset.mjs +0 -20
  360. package/dist/presets/winterjs/runtime/winterjs.d.ts +0 -1
  361. package/dist/presets/zeabur/preset.d.ts +0 -2
  362. package/dist/presets/zeabur/preset.mjs +0 -70
  363. package/dist/presets/zeabur/runtime/zeabur.d.ts +0 -4
  364. package/dist/rollup/index.d.mts +0 -5
  365. package/dist/rollup/index.d.ts +0 -5
  366. package/dist/rollup/index.mjs +0 -1673
  367. package/dist/runtime/index.d.ts +0 -12
  368. package/dist/runtime/internal/app.d.ts +0 -3
  369. package/dist/runtime/internal/cache.d.ts +0 -8
  370. package/dist/runtime/internal/client.mjs +0 -4
  371. package/dist/runtime/internal/config.d.ts +0 -5
  372. package/dist/runtime/internal/config.mjs +0 -45
  373. package/dist/runtime/internal/error.d.ts +0 -4
  374. package/dist/runtime/internal/error.mjs +0 -73
  375. package/dist/runtime/internal/index.d.ts +0 -6
  376. package/dist/runtime/internal/renderer.d.ts +0 -2
  377. package/dist/runtime/internal/route-rules.d.ts +0 -14
  378. package/dist/runtime/internal/routes/openapi.d.ts +0 -3
  379. package/dist/runtime/internal/routes/scalar.d.ts +0 -2
  380. package/dist/runtime/internal/routes/swagger.d.ts +0 -2
  381. package/dist/runtime/internal/static.d.ts +0 -2
  382. package/dist/runtime/internal/timing.mjs +0 -29
  383. package/dist/runtime/internal/utils.d.ts +0 -21
  384. package/dist/runtime/internal/utils.lambda.d.ts +0 -10
  385. package/dist/runtime/internal/utils.lambda.mjs +0 -30
  386. package/dist/shared/nitro.bra5i6ER.d.mts +0 -620
  387. package/dist/shared/nitro.bra5i6ER.d.ts +0 -620
  388. package/dist/types/index.d.ts +0 -260
  389. package/kit.d.ts +0 -1
  390. package/meta.d.ts +0 -1
  391. package/presets.d.ts +0 -1
  392. package/rollup.d.ts +0 -1
  393. package/runtime.d.ts +0 -1
  394. package/types.d.ts +0 -1
  395. /package/dist/presets/_nitro/runtime/{nitro-dev.d.ts → nitro-dev.d.mts} +0 -0
  396. /package/dist/presets/_nitro/runtime/{service-worker.d.ts → service-worker.d.mts} +0 -0
  397. /package/dist/presets/aws-amplify/runtime/{aws-amplify.d.ts → aws-amplify.d.mts} +0 -0
  398. /package/dist/presets/azure/runtime/{azure-functions.d.ts → azure-swa.d.mts} +0 -0
  399. /package/dist/presets/bun/runtime/{bun.d.ts → bun.d.mts} +0 -0
  400. /package/dist/presets/{cloudflare/runtime/cloudflare-worker.d.ts → deno/runtime/deno-deploy.d.mts} +0 -0
  401. /package/dist/presets/netlify/runtime/{netlify.d.ts → netlify.d.mts} +0 -0
  402. /package/dist/presets/node/runtime/{cluster.d.ts → node-cluster.d.mts} +0 -0
  403. /package/dist/presets/{deno/runtime/deno-server.d.ts → node/runtime/node-server.d.mts} +0 -0
  404. /package/dist/presets/stormkit/runtime/{stormkit.d.ts → stormkit.d.mts} +0 -0
  405. /package/dist/presets/{deno/runtime/deno-deploy.d.ts → winterjs/runtime/winterjs.d.mts} +0 -0
  406. /package/dist/runtime/internal/{database.d.ts → database.d.mts} +0 -0
  407. /package/dist/runtime/internal/{debug.d.ts → debug.d.mts} +0 -0
  408. /package/dist/{presets/_types.gen.mjs → runtime/internal/empty.d.mts} +0 -0
  409. /package/dist/{presets/aws-amplify/types.mjs → runtime/internal/empty.mjs} +0 -0
  410. /package/dist/runtime/internal/lib/{http-graceful-shutdown.d.ts → http-graceful-shutdown.d.mts} +0 -0
  411. /package/dist/runtime/internal/{meta.d.ts → meta.d.mts} +0 -0
  412. /package/dist/runtime/internal/{plugin.d.ts → plugin.d.mts} +0 -0
  413. /package/dist/runtime/internal/{shutdown.d.ts → shutdown.d.mts} +0 -0
  414. /package/dist/runtime/internal/{storage.d.ts → storage.d.mts} +0 -0
  415. /package/dist/runtime/internal/{task.d.ts → task.d.mts} +0 -0
  416. /package/dist/runtime/internal/{client.d.ts → vite/dev-worker.d.mts} +0 -0
  417. /package/{dist/config/index.mjs → lib/config.mjs} +0 -0
@@ -1,974 +0,0 @@
1
- /**
2
- * This is the static type definition for the configuration object.
3
- *
4
- * It reflects a normalized and validated version of the configuration that you can write in wrangler.toml,
5
- * and optionally augment with arguments passed directly to wrangler.
6
- *
7
- * For more information about the configuration object, see the
8
- * documentation at https://developers.cloudflare.com/workers/cli-wrangler/configuration
9
- *
10
- * Notes:
11
- *
12
- * - Fields that are only specified in `ConfigFields` and not `Environment` can only appear
13
- * in the top level config and should not appear in any environments.
14
- * - Fields that are specified in `PagesConfigFields` are only relevant for Pages projects
15
- * - All top level fields in config and environments are optional in the wrangler.toml file.
16
- *
17
- * Legend for the annotations:
18
- *
19
- * - `@breaking`: the deprecation/optionality is a breaking change from Wrangler v1.
20
- * - `@todo`: there's more work to be done (with details attached).
21
- */
22
- export type Config = ConfigFields<DevConfig> & PagesConfigFields & Environment;
23
- export type RawConfig = Partial<ConfigFields<RawDevConfig>> & PagesConfigFields & RawEnvironment & DeprecatedConfigFields & EnvironmentMap & {
24
- $schema?: string;
25
- };
26
- export interface PagesConfigFields {
27
- /**
28
- * The directory of static assets to serve.
29
- *
30
- * The presence of this field in `wrangler.toml` indicates a Pages project,
31
- * and will prompt the handling of the configuration file according to the
32
- * Pages-specific validation rules.
33
- */
34
- pages_build_output_dir?: string;
35
- }
36
- export interface ConfigFields<Dev extends RawDevConfig> {
37
- configPath: string | undefined;
38
- /**
39
- * A boolean to enable "legacy" style wrangler environments (from Wrangler v1).
40
- * These have been superseded by Services, but there may be projects that won't
41
- * (or can't) use them. If you're using a legacy environment, you can set this
42
- * to `true` to enable it.
43
- */
44
- legacy_env: boolean;
45
- /**
46
- * Whether Wrangler should send usage metrics to Cloudflare for this project.
47
- *
48
- * When defined this will override any user settings.
49
- * Otherwise, Wrangler will use the user's preference.
50
- */
51
- send_metrics: boolean | undefined;
52
- /**
53
- * Options to configure the development server that your worker will use.
54
- */
55
- dev: Dev;
56
- /**
57
- * A list of migrations that should be uploaded with your Worker.
58
- *
59
- * These define changes in your Durable Object declarations.
60
- *
61
- * More details at https://developers.cloudflare.com/workers/learning/using-durable-objects#configuring-durable-object-classes-with-migrations
62
- *
63
- * @default []
64
- */
65
- migrations: {
66
- /** A unique identifier for this migration. */
67
- tag: string;
68
- /** The new Durable Objects being defined. */
69
- new_classes?: string[];
70
- /** The Durable Objects being renamed. */
71
- renamed_classes?: {
72
- from: string;
73
- to: string;
74
- }[];
75
- /** The Durable Objects being removed. */
76
- deleted_classes?: string[];
77
- }[];
78
- /**
79
- * The definition of a Worker Site, a feature that lets you upload
80
- * static assets with your Worker.
81
- *
82
- * More details at https://developers.cloudflare.com/workers/platform/sites
83
- */
84
- site: {
85
- /**
86
- * The directory containing your static assets.
87
- *
88
- * It must be a path relative to your wrangler.toml file.
89
- * Example: bucket = "./public"
90
- *
91
- * If there is a `site` field then it must contain this `bucket` field.
92
- */
93
- bucket: string;
94
- /**
95
- * The location of your Worker script.
96
- *
97
- * @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.
98
- * @breaking
99
- */
100
- "entry-point"?: string;
101
- /**
102
- * An exclusive list of .gitignore-style patterns that match file
103
- * or directory names from your bucket location. Only matched
104
- * items will be uploaded. Example: include = ["upload_dir"]
105
- *
106
- * @optional
107
- * @default []
108
- */
109
- include?: string[];
110
- /**
111
- * A list of .gitignore-style patterns that match files or
112
- * directories in your bucket that should be excluded from
113
- * uploads. Example: exclude = ["ignore_dir"]
114
- *
115
- * @optional
116
- * @default []
117
- */
118
- exclude?: string[];
119
- } | undefined;
120
- /**
121
- * Serve a folder of static assets with your Worker, without any additional code.
122
- * This can either be a string, or an object with additional config fields.
123
- */
124
- assets: {
125
- bucket: string;
126
- include: string[];
127
- exclude: string[];
128
- browser_TTL: number | undefined;
129
- serve_single_page_app: boolean;
130
- } | undefined;
131
- /**
132
- * A list of wasm modules that your worker should be bound to. This is
133
- * the "legacy" way of binding to a wasm module. ES module workers should
134
- * do proper module imports.
135
- */
136
- wasm_modules: {
137
- [key: string]: string;
138
- } | undefined;
139
- /**
140
- * A list of text files that your worker should be bound to. This is
141
- * the "legacy" way of binding to a text file. ES module workers should
142
- * do proper module imports.
143
- */
144
- text_blobs: {
145
- [key: string]: string;
146
- } | undefined;
147
- /**
148
- * A list of data files that your worker should be bound to. This is
149
- * the "legacy" way of binding to a data file. ES module workers should
150
- * do proper module imports.
151
- */
152
- data_blobs: {
153
- [key: string]: string;
154
- } | undefined;
155
- /**
156
- * By default, wrangler.toml is the source of truth for your environment configuration, like a terraform file.
157
- *
158
- * If you change your vars in the dashboard, wrangler *will* override/delete them on its next deploy.
159
- *
160
- * If you want to keep your dashboard vars when wrangler deploys, set this field to true.
161
- *
162
- * @default false
163
- * @nonInheritable
164
- */
165
- keep_vars?: boolean;
166
- }
167
- export interface PagesConfigFields {
168
- /**
169
- * The directory of static assets to serve.
170
- *
171
- * The presence of this field in `wrangler.toml` indicates a Pages project,
172
- * and will prompt the handling of the configuration file according to the
173
- * Pages-specific validation rules.
174
- */
175
- pages_build_output_dir?: string;
176
- }
177
- export interface DevConfig {
178
- /**
179
- * IP address for the local dev server to listen on,
180
- *
181
- * @default localhost
182
- */
183
- ip: string;
184
- /**
185
- * Port for the local dev server to listen on
186
- *
187
- * @default 8787
188
- */
189
- port: number | undefined;
190
- /**
191
- * Port for the local dev server's inspector to listen on
192
- *
193
- * @default 9229
194
- */
195
- inspector_port: number | undefined;
196
- /**
197
- * Protocol that local wrangler dev server listens to requests on.
198
- *
199
- * @default http
200
- */
201
- local_protocol: "http" | "https";
202
- /**
203
- * Protocol that wrangler dev forwards requests on
204
- *
205
- * Setting this to `http` is not currently implemented for remote mode.
206
- * See https://github.com/cloudflare/workers-sdk/issues/583
207
- *
208
- * @default https
209
- */
210
- upstream_protocol: "https" | "http";
211
- /**
212
- * Host to forward requests to, defaults to the host of the first route of project
213
- */
214
- host: string | undefined;
215
- }
216
- export type RawDevConfig = Partial<DevConfig>;
217
- export interface DeprecatedConfigFields {
218
- /**
219
- * The project "type". A holdover from Wrangler v1.x.
220
- * Valid values were "webpack", "javascript", and "rust".
221
- *
222
- * @deprecated DO NOT USE THIS. Most common features now work out of the box with wrangler, including modules, jsx, typescript, etc. If you need anything more, use a custom build.
223
- * @breaking
224
- */
225
- type?: "webpack" | "javascript" | "rust";
226
- /**
227
- * Path to the webpack config to use when building your worker.
228
- * A holdover from Wrangler v1.x, used with `type: "webpack"`.
229
- *
230
- * @deprecated DO NOT USE THIS. Most common features now work out of the box with wrangler, including modules, jsx, typescript, etc. If you need anything more, use a custom build.
231
- * @breaking
232
- */
233
- webpack_config?: string;
234
- /**
235
- * Configuration only used by a standalone use of the miniflare binary.
236
- * @deprecated
237
- */
238
- miniflare?: unknown;
239
- }
240
- interface EnvironmentMap {
241
- /**
242
- * The `env` section defines overrides for the configuration for different environments.
243
- *
244
- * All environment fields can be specified at the top level of the config indicating the default environment settings.
245
- *
246
- * - Some fields are inherited and overridable in each environment.
247
- * - But some are not inherited and must be explicitly specified in every environment, if they are specified at the top level.
248
- *
249
- * For more information, see the documentation at https://developers.cloudflare.com/workers/cli-wrangler/configuration#environments
250
- *
251
- * @default {}
252
- */
253
- env?: {
254
- [envName: string]: RawEnvironment;
255
- };
256
- }
257
- /**
258
- * The `Environment` interface declares all the configuration fields that
259
- * can be specified for an environment.
260
- *
261
- * This could be the top-level default environment, or a specific named environment.
262
- */
263
- export interface Environment extends EnvironmentInheritable, EnvironmentNonInheritable {
264
- }
265
- export type SimpleRoute = string;
266
- export type ZoneIdRoute = {
267
- pattern: string;
268
- zone_id: string;
269
- custom_domain?: boolean;
270
- };
271
- export type ZoneNameRoute = {
272
- pattern: string;
273
- zone_name: string;
274
- custom_domain?: boolean;
275
- };
276
- export type CustomDomainRoute = {
277
- pattern: string;
278
- custom_domain: boolean;
279
- };
280
- export type Route = SimpleRoute | ZoneIdRoute | ZoneNameRoute | CustomDomainRoute;
281
- /**
282
- * Configuration in wrangler for Cloudchamber
283
- */
284
- export type CloudchamberConfig = {
285
- vcpu?: number;
286
- memory?: string;
287
- };
288
- /**
289
- * The `EnvironmentInheritable` interface declares all the configuration fields for an environment
290
- * that can be inherited (and overridden) from the top-level environment.
291
- */
292
- interface EnvironmentInheritable {
293
- /**
294
- * The name of your worker. Alphanumeric + dashes only.
295
- *
296
- * @inheritable
297
- */
298
- name: string | undefined;
299
- /**
300
- * This is the ID of the account associated with your zone.
301
- * You might have more than one account, so make sure to use
302
- * the ID of the account associated with the zone/route you
303
- * provide, if you provide one. It can also be specified through
304
- * the CLOUDFLARE_ACCOUNT_ID environment variable.
305
- *
306
- * @inheritable
307
- */
308
- account_id: string | undefined;
309
- /**
310
- * A date in the form yyyy-mm-dd, which will be used to determine
311
- * which version of the Workers runtime is used.
312
- *
313
- * More details at https://developers.cloudflare.com/workers/platform/compatibility-dates
314
- *
315
- * @inheritable
316
- */
317
- compatibility_date: string | undefined;
318
- /**
319
- * A list of flags that enable features from upcoming features of
320
- * the Workers runtime, usually used together with compatibility_flags.
321
- *
322
- * More details at https://developers.cloudflare.com/workers/platform/compatibility-dates
323
- *
324
- * @inheritable
325
- */
326
- compatibility_flags: string[];
327
- /**
328
- * The entrypoint/path to the JavaScript file that will be executed.
329
- */
330
- main: string | undefined;
331
- /**
332
- * If true then Wrangler will traverse the file tree below `base_dir`;
333
- * Any files that match `rules` will be included in the deployed worker.
334
- * Defaults to true if `no_bundle` is true, otherwise false.
335
- *
336
- * @inheritable
337
- */
338
- find_additional_modules: boolean | undefined;
339
- /**
340
- * Determines whether Wrangler will preserve bundled file names.
341
- * Defaults to false.
342
- * If left unset, files will be named using the pattern ${fileHash}-${basename},
343
- * for example, `34de60b44167af5c5a709e62a4e20c4f18c9e3b6-favicon.ico`.
344
- */
345
- preserve_file_names: boolean | undefined;
346
- /**
347
- * The directory in which module rules should be evaluated when including additional files into a worker deployment.
348
- * This defaults to the directory containing the `main` entry point of the worker if not specified.
349
- *
350
- * @inheritable
351
- */
352
- base_dir: string | undefined;
353
- /**
354
- * Whether we use <name>.<subdomain>.workers.dev to
355
- * test and deploy your worker.
356
- *
357
- * @default `true` (This is a breaking change from Wrangler v1)
358
- * @breaking
359
- * @inheritable
360
- */
361
- workers_dev: boolean | undefined;
362
- /**
363
- * A list of routes that your worker should be published to.
364
- * Only one of `routes` or `route` is required.
365
- *
366
- * Only required when workers_dev is false, and there's no scheduled worker (see `triggers`)
367
- *
368
- * @inheritable
369
- */
370
- routes: Route[] | undefined;
371
- /**
372
- * A route that your worker should be published to. Literally
373
- * the same as routes, but only one.
374
- * Only one of `routes` or `route` is required.
375
- *
376
- * Only required when workers_dev is false, and there's no scheduled worker
377
- *
378
- * @inheritable
379
- */
380
- route: Route | undefined;
381
- /**
382
- * Path to a custom tsconfig
383
- */
384
- tsconfig: string | undefined;
385
- /**
386
- * The function to use to replace jsx syntax.
387
- *
388
- * @default `"React.createElement"`
389
- * @inheritable
390
- */
391
- jsx_factory: string;
392
- /**
393
- * The function to use to replace jsx fragment syntax.
394
- *
395
- * @default `"React.Fragment"`
396
- * @inheritable
397
- */
398
- jsx_fragment: string;
399
- /**
400
- * "Cron" definitions to trigger a worker's "scheduled" function.
401
- *
402
- * Lets you call workers periodically, much like a cron job.
403
- *
404
- * More details here https://developers.cloudflare.com/workers/platform/cron-triggers
405
- *
406
- * @default `{crons:[]}`
407
- * @inheritable
408
- */
409
- triggers: {
410
- crons: string[];
411
- };
412
- /**
413
- * Specifies the Usage Model for your Worker. There are two options -
414
- * [bundled](https://developers.cloudflare.com/workers/platform/limits#bundled-usage-model) and
415
- * [unbound](https://developers.cloudflare.com/workers/platform/limits#unbound-usage-model).
416
- * For newly created Workers, if the Usage Model is omitted
417
- * it will be set to the [default Usage Model set on the account](https://dash.cloudflare.com/?account=workers/default-usage-model).
418
- * For existing Workers, if the Usage Model is omitted, it will be
419
- * set to the Usage Model configured in the dashboard for that Worker.
420
- *
421
- * @inheritable
422
- */
423
- usage_model: "bundled" | "unbound" | undefined;
424
- /**
425
- * Specify limits for runtime behavior.
426
- * Only supported for the "standard" Usage Model
427
- *
428
- * @inheritable
429
- */
430
- limits: UserLimits | undefined;
431
- /**
432
- * An ordered list of rules that define which modules to import,
433
- * and what type to import them as. You will need to specify rules
434
- * to use Text, Data, and CompiledWasm modules, or when you wish to
435
- * have a .js file be treated as an ESModule instead of CommonJS.
436
- *
437
- * @inheritable
438
- */
439
- rules: Rule[];
440
- /**
441
- * Configures a custom build step to be run by Wrangler when building your Worker.
442
- *
443
- * Refer to the [custom builds documentation](https://developers.cloudflare.com/workers/cli-wrangler/configuration#build)
444
- * for more details.
445
- *
446
- * @default {}
447
- */
448
- build: {
449
- /** 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. */
450
- command?: string;
451
- /** The directory in which the command is executed. */
452
- cwd?: string;
453
- /** The directory to watch for changes while using wrangler dev, defaults to the current working directory */
454
- watch_dir?: string | string[];
455
- /**
456
- * Deprecated field previously used to configure the build and upload of the script.
457
- * @deprecated
458
- */
459
- upload?: DeprecatedUpload;
460
- };
461
- /**
462
- * Skip internal build steps and directly deploy script
463
- * @inheritable
464
- */
465
- no_bundle: boolean | undefined;
466
- /**
467
- * Minify the script before uploading.
468
- * @inheritable
469
- */
470
- minify: boolean | undefined;
471
- /**
472
- * Add polyfills for node builtin modules and globals
473
- * @inheritable
474
- */
475
- node_compat: boolean | undefined;
476
- /**
477
- * Specifies namespace bindings that are bound to this Worker environment.
478
- *
479
- * NOTE: This field is not automatically inherited from the top level environment,
480
- * and so must be specified in every named environment.
481
- *
482
- * @default `[]`
483
- * @nonInheritable
484
- */
485
- dispatch_namespaces: {
486
- /** The binding name used to refer to the bound service. */
487
- binding: string;
488
- /** The namespace to bind to. */
489
- namespace: string;
490
- /** Details about the outbound worker which will handle outbound requests from your namespace */
491
- outbound?: DispatchNamespaceOutbound;
492
- }[];
493
- /**
494
- * Designates this worker as an internal-only "first-party" worker.
495
- */
496
- first_party_worker: boolean | undefined;
497
- /**
498
- * TODO: remove this as it has been deprecated.
499
- *
500
- * This is just here for now because the `route` commands use it.
501
- * So we need to include it in this type so it is available.
502
- */
503
- zone_id?: string;
504
- /**
505
- * List of bindings that you will send to logfwdr
506
- *
507
- * @default `{bindings:[]}`
508
- * @inheritable
509
- */
510
- logfwdr: {
511
- bindings: {
512
- /** The binding name used to refer to logfwdr */
513
- name: string;
514
- /** The destination for this logged message */
515
- destination: string;
516
- }[];
517
- };
518
- /**
519
- * Send Trace Events from this worker to Workers Logpush.
520
- *
521
- * This will not configure a corresponding Logpush job automatically.
522
- *
523
- * For more information about Workers Logpush, see:
524
- * https://blog.cloudflare.com/logpush-for-workers/
525
- *
526
- * @inheritable
527
- */
528
- logpush: boolean | undefined;
529
- /**
530
- * Include source maps when uploading this worker.
531
- * @inheritable
532
- */
533
- upload_source_maps: boolean | undefined;
534
- /**
535
- * Specify how the worker should be located to minimize round-trip time.
536
- *
537
- * More details: https://developers.cloudflare.com/workers/platform/smart-placement/
538
- */
539
- placement: {
540
- mode: "off" | "smart";
541
- } | undefined;
542
- }
543
- export type DurableObjectBindings = {
544
- /** The name of the binding used to refer to the Durable Object */
545
- name: string;
546
- /** The exported class name of the Durable Object */
547
- class_name: string;
548
- /** The script where the Durable Object is defined (if it's external to this worker) */
549
- script_name?: string;
550
- /** The service environment of the script_name to bind to */
551
- environment?: string;
552
- }[];
553
- /**
554
- * The `EnvironmentNonInheritable` interface declares all the configuration fields for an environment
555
- * that cannot be inherited from the top-level environment, and must be defined specifically.
556
- *
557
- * If any of these fields are defined at the top-level then they should also be specifically defined
558
- * for each named environment.
559
- */
560
- export interface EnvironmentNonInheritable {
561
- /**
562
- * A map of values to substitute when deploying your worker.
563
- *
564
- * NOTE: This field is not automatically inherited from the top level environment,
565
- * and so must be specified in every named environment.
566
- *
567
- * @default `{}`
568
- * @nonInheritable
569
- */
570
- define: Record<string, string>;
571
- /**
572
- * A map of environment variables to set when deploying your worker.
573
- *
574
- * NOTE: This field is not automatically inherited from the top level environment,
575
- * and so must be specified in every named environment.
576
- *
577
- * @default `{}`
578
- * @nonInheritable
579
- */
580
- vars: Record<string, string | unknown>;
581
- /**
582
- * A list of durable objects that your worker should be bound to.
583
- *
584
- * For more information about Durable Objects, see the documentation at
585
- * https://developers.cloudflare.com/workers/learning/using-durable-objects
586
- *
587
- * NOTE: This field is not automatically inherited from the top level environment,
588
- * and so must be specified in every named environment.
589
- *
590
- * @default `{bindings:[]}`
591
- * @nonInheritable
592
- */
593
- durable_objects: {
594
- bindings: DurableObjectBindings;
595
- };
596
- /**
597
- * Cloudchamber configuration
598
- *
599
- * NOTE: This field is not automatically inherited from the top level environment,
600
- * and so must be specified in every named environment.
601
- *
602
- * @default `{}`
603
- * @nonInheritable
604
- */
605
- cloudchamber: CloudchamberConfig;
606
- /**
607
- * These specify any Workers KV Namespaces you want to
608
- * access from inside your Worker.
609
- *
610
- * To learn more about KV Namespaces,
611
- * see the documentation at https://developers.cloudflare.com/workers/learning/how-kv-works
612
- *
613
- * NOTE: This field is not automatically inherited from the top level environment,
614
- * and so must be specified in every named environment.
615
- *
616
- * @default `[]`
617
- * @nonInheritable
618
- */
619
- kv_namespaces: {
620
- /** The binding name used to refer to the KV Namespace */
621
- binding: string;
622
- /** The ID of the KV namespace */
623
- id: string;
624
- /** The ID of the KV namespace used during `wrangler dev` */
625
- preview_id?: string;
626
- }[];
627
- /**
628
- * These specify bindings to send email from inside your Worker.
629
- *
630
- * NOTE: This field is not automatically inherited from the top level environment,
631
- * and so must be specified in every named environment.
632
- *
633
- * @default `[]`
634
- * @nonInheritable
635
- */
636
- send_email: {
637
- /** The binding name used to refer to the this binding */
638
- name: string;
639
- /** If this binding should be restricted to a specific verified address */
640
- destination_address?: string;
641
- /** If this binding should be restricted to a set of verified addresses */
642
- allowed_destination_addresses?: string[];
643
- }[];
644
- /**
645
- * Specifies Queues that are bound to this Worker environment.
646
- *
647
- * NOTE: This field is not automatically inherited from the top level environment,
648
- * and so must be specified in every named environment.
649
- *
650
- * @default `{}`
651
- * @nonInheritable
652
- */
653
- queues: {
654
- /** Producer bindings */
655
- producers?: {
656
- /** The binding name used to refer to the Queue in the worker. */
657
- binding: string;
658
- /** The name of this Queue. */
659
- queue: string;
660
- /** The number of seconds to wait before delivering a message */
661
- delivery_delay?: number;
662
- }[];
663
- /** Consumer configuration */
664
- consumers?: {
665
- /** The name of the queue from which this consumer should consume. */
666
- queue: string;
667
- /** The consumer type, e.g., worker, http-pull, r2-bucket, etc. Default is worker. */
668
- type?: string;
669
- /** The maximum number of messages per batch */
670
- max_batch_size?: number;
671
- /** The maximum number of seconds to wait to fill a batch with messages. */
672
- max_batch_timeout?: number;
673
- /** The maximum number of retries for each message. */
674
- max_retries?: number;
675
- /** The queue to send messages that failed to be consumed. */
676
- dead_letter_queue?: string;
677
- /** 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. */
678
- max_concurrency?: number | null;
679
- /** The number of milliseconds to wait for pulled messages to become visible again */
680
- visibility_timeout_ms?: number;
681
- /** The number of seconds to wait before retrying a message */
682
- retry_delay?: number;
683
- }[];
684
- };
685
- /**
686
- * Specifies R2 buckets that are bound to this Worker environment.
687
- *
688
- * NOTE: This field is not automatically inherited from the top level environment,
689
- * and so must be specified in every named environment.
690
- *
691
- * @default `[]`
692
- * @nonInheritable
693
- */
694
- r2_buckets: {
695
- /** The binding name used to refer to the R2 bucket in the worker. */
696
- binding: string;
697
- /** The name of this R2 bucket at the edge. */
698
- bucket_name: string;
699
- /** The preview name of this R2 bucket at the edge. */
700
- preview_bucket_name?: string;
701
- /** The jurisdiction that the bucket exists in. Default if not present. */
702
- jurisdiction?: string;
703
- }[];
704
- /**
705
- * Specifies D1 databases that are bound to this Worker environment.
706
- *
707
- * NOTE: This field is not automatically inherited from the top level environment,
708
- * and so must be specified in every named environment.
709
- *
710
- * @default `[]`
711
- * @nonInheritable
712
- */
713
- d1_databases: {
714
- /** The binding name used to refer to the D1 database in the worker. */
715
- binding: string;
716
- /** The name of this D1 database. */
717
- database_name: string;
718
- /** The UUID of this D1 database (not required). */
719
- database_id: string;
720
- /** The UUID of this D1 database for Wrangler Dev (if specified). */
721
- preview_database_id?: string;
722
- /** The name of the migrations table for this D1 database (defaults to 'd1_migrations'). */
723
- migrations_table?: string;
724
- /** The path to the directory of migrations for this D1 database (defaults to './migrations'). */
725
- migrations_dir?: string;
726
- /** Internal use only. */
727
- database_internal_env?: string;
728
- }[];
729
- /**
730
- * Specifies Vectorize indexes that are bound to this Worker environment.
731
- *
732
- * NOTE: This field is not automatically inherited from the top level environment,
733
- * and so must be specified in every named environment.
734
- *
735
- * @default `[]`
736
- * @nonInheritable
737
- */
738
- vectorize: {
739
- /** The binding name used to refer to the Vectorize index in the worker. */
740
- binding: string;
741
- /** The name of the index. */
742
- index_name: string;
743
- }[];
744
- /**
745
- * Specifies Constellation projects that are bound to this Worker environment.
746
- *
747
- * NOTE: This field is not automatically inherited from the top level environment,
748
- * and so must be specified in every named environment.
749
- *
750
- * @default `[]`
751
- * @nonInheritable
752
- */
753
- constellation: {
754
- /** The binding name used to refer to the project in the worker. */
755
- binding: string;
756
- /** The id of the project. */
757
- project_id: string;
758
- }[];
759
- /**
760
- * Specifies Hyperdrive configs that are bound to this Worker environment.
761
- *
762
- * NOTE: This field is not automatically inherited from the top level environment,
763
- * and so must be specified in every named environment.
764
- *
765
- * @default `[]`
766
- * @nonInheritable
767
- */
768
- hyperdrive: {
769
- /** The binding name used to refer to the project in the worker. */
770
- binding: string;
771
- /** The id of the database. */
772
- id: string;
773
- /** The local database connection string for `wrangler dev` */
774
- localConnectionString?: string;
775
- }[];
776
- /**
777
- * Specifies service bindings (worker-to-worker) that are bound to this Worker environment.
778
- *
779
- * NOTE: This field is not automatically inherited from the top level environment,
780
- * and so must be specified in every named environment.
781
- *
782
- * @default `[]`
783
- * @nonInheritable
784
- */
785
- services: {
786
- /** The binding name used to refer to the bound service. */
787
- binding: string;
788
- /** The name of the service. */
789
- service: string;
790
- /** The environment of the service (e.g. production, staging, etc). */
791
- environment?: string;
792
- /** Optionally, the entrypoint (named export) of the service to bind to. */
793
- entrypoint?: string;
794
- }[] | undefined;
795
- /**
796
- * Specifies analytics engine datasets that are bound to this Worker environment.
797
- *
798
- * NOTE: This field is not automatically inherited from the top level environment,
799
- * and so must be specified in every named environment.
800
- *
801
- * @default `[]`
802
- * @nonInheritable
803
- */
804
- analytics_engine_datasets: {
805
- /** The binding name used to refer to the dataset in the worker. */
806
- binding: string;
807
- /** The name of this dataset to write to. */
808
- dataset?: string;
809
- }[];
810
- /**
811
- * A browser that will be usable from the worker.
812
- */
813
- browser: {
814
- binding: string;
815
- } | undefined;
816
- /**
817
- * Binding to the AI project.
818
- */
819
- ai: {
820
- binding: string;
821
- } | undefined;
822
- /**
823
- * Binding to the Worker Version's metadata
824
- */
825
- version_metadata: {
826
- binding: string;
827
- } | undefined;
828
- /**
829
- * "Unsafe" tables for features that aren't directly supported by wrangler.
830
- *
831
- * NOTE: This field is not automatically inherited from the top level environment,
832
- * and so must be specified in every named environment.
833
- *
834
- * @nonInheritable
835
- */
836
- unsafe: {
837
- /**
838
- * A set of bindings that should be put into a Worker's upload metadata without changes. These
839
- * can be used to implement bindings for features that haven't released and aren't supported
840
- * directly by wrangler or miniflare.
841
- */
842
- bindings?: {
843
- name: string;
844
- type: string;
845
- [key: string]: unknown;
846
- }[];
847
- /**
848
- * Arbitrary key/value pairs that will be included in the uploaded metadata. Values specified
849
- * here will always be applied to metadata last, so can add new or override existing fields.
850
- */
851
- metadata?: {
852
- [key: string]: unknown;
853
- };
854
- /**
855
- * Used for internal capnp uploads for the Workers runtime
856
- */
857
- capnp?: {
858
- base_path: string;
859
- source_schemas: string[];
860
- compiled_schema?: never;
861
- } | {
862
- base_path?: never;
863
- source_schemas?: never;
864
- compiled_schema: string;
865
- };
866
- };
867
- mtls_certificates: {
868
- /** The binding name used to refer to the certificate in the worker */
869
- binding: string;
870
- /** The uuid of the uploaded mTLS certificate */
871
- certificate_id: string;
872
- }[];
873
- tail_consumers?: TailConsumer[];
874
- }
875
- /**
876
- * The environment configuration properties that have been deprecated.
877
- */
878
- interface EnvironmentDeprecated {
879
- /**
880
- * The zone ID of the zone you want to deploy to. You can find this
881
- * in your domain page on the dashboard.
882
- *
883
- * @deprecated This is unnecessary since we can deduce this from routes directly.
884
- */
885
- zone_id?: string;
886
- /**
887
- * Legacy way of defining KVNamespaces that is no longer supported.
888
- *
889
- * @deprecated DO NOT USE. This was a legacy bug from Wrangler v1, that we do not want to support.
890
- */
891
- "kv-namespaces"?: string;
892
- /**
893
- * A list of services that your worker should be bound to.
894
- *
895
- * @default `[]`
896
- * @deprecated DO NOT USE. We'd added this to test the new service binding system, but the proper way to test experimental features is to use `unsafe.bindings` configuration.
897
- */
898
- experimental_services?: {
899
- /** The binding name used to refer to the Service */
900
- name: string;
901
- /** The name of the Service being bound */
902
- service: string;
903
- /** The Service's environment */
904
- environment: string;
905
- }[];
906
- }
907
- /**
908
- * Deprecated upload configuration.
909
- */
910
- export interface DeprecatedUpload {
911
- /**
912
- * The format of the Worker script.
913
- *
914
- * @deprecated We infer the format automatically now.
915
- */
916
- format?: "modules" | "service-worker";
917
- /**
918
- * The directory you wish to upload your worker from,
919
- * relative to the wrangler.toml file.
920
- *
921
- * Defaults to the directory containing the wrangler.toml file.
922
- *
923
- * @deprecated
924
- */
925
- dir?: string;
926
- /**
927
- * The path to the Worker script, relative to `upload.dir`.
928
- *
929
- * @deprecated This will be replaced by a command line argument.
930
- */
931
- main?: string;
932
- /**
933
- * @deprecated This is now defined at the top level `rules` field.
934
- */
935
- rules?: Environment["rules"];
936
- }
937
- /**
938
- * The raw environment configuration that we read from the config file.
939
- *
940
- * All the properties are optional, and will be replaced with defaults in the configuration that
941
- * is used in the rest of the codebase.
942
- */
943
- export type RawEnvironment = Partial<Environment> & EnvironmentDeprecated;
944
- /**
945
- * A bundling resolver rule, defining the modules type for paths that match the specified globs.
946
- */
947
- export type Rule = {
948
- type: ConfigModuleRuleType;
949
- globs: string[];
950
- fallthrough?: boolean;
951
- };
952
- /**
953
- * The possible types for a `Rule`.
954
- */
955
- export type ConfigModuleRuleType = "ESModule" | "CommonJS" | "CompiledWasm" | "Text" | "Data" | "PythonModule" | "PythonRequirement";
956
- export type TailConsumer = {
957
- /** The name of the service tail events will be forwarded to. */
958
- service: string;
959
- /** (Optional) The environt of the service. */
960
- environment?: string;
961
- };
962
- export interface DispatchNamespaceOutbound {
963
- /** Name of the service handling the outbound requests */
964
- service: string;
965
- /** (Optional) Name of the environment handling the outbound requests. */
966
- environment?: string;
967
- /** (Optional) List of parameter names, for sending context from your dispatch worker to the outbound handler */
968
- parameters?: string[];
969
- }
970
- export interface UserLimits {
971
- /** Maximum allowed CPU time for a worker's invocation in milliseconds */
972
- cpu_ms: number;
973
- }
974
- export {};