alchemy 0.16.9 → 0.17.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 (429) hide show
  1. package/lib/ai/astro-file.d.ts +1 -1
  2. package/lib/ai/astro-file.d.ts.map +1 -1
  3. package/lib/ai/astro-file.js +1 -1
  4. package/lib/ai/astro-file.js.map +1 -1
  5. package/lib/ai/client.js +2 -2
  6. package/lib/ai/client.js.map +1 -1
  7. package/lib/ai/css-file.d.ts +1 -1
  8. package/lib/ai/css-file.d.ts.map +1 -1
  9. package/lib/ai/css-file.js +1 -1
  10. package/lib/ai/css-file.js.map +1 -1
  11. package/lib/ai/data.d.ts +1 -1
  12. package/lib/ai/data.d.ts.map +1 -1
  13. package/lib/ai/data.js +1 -1
  14. package/lib/ai/data.js.map +1 -1
  15. package/lib/ai/html-file.d.ts +1 -1
  16. package/lib/ai/html-file.d.ts.map +1 -1
  17. package/lib/ai/html-file.js +1 -1
  18. package/lib/ai/html-file.js.map +1 -1
  19. package/lib/ai/json-file.d.ts +1 -1
  20. package/lib/ai/json-file.d.ts.map +1 -1
  21. package/lib/ai/json-file.js +1 -1
  22. package/lib/ai/json-file.js.map +1 -1
  23. package/lib/ai/typescript-file.d.ts +1 -1
  24. package/lib/ai/typescript-file.d.ts.map +1 -1
  25. package/lib/ai/typescript-file.js +1 -1
  26. package/lib/ai/typescript-file.js.map +1 -1
  27. package/lib/ai/vue-file.d.ts +1 -1
  28. package/lib/ai/vue-file.d.ts.map +1 -1
  29. package/lib/ai/vue-file.js +1 -1
  30. package/lib/ai/vue-file.js.map +1 -1
  31. package/lib/ai/yaml-file.d.ts +1 -1
  32. package/lib/ai/yaml-file.d.ts.map +1 -1
  33. package/lib/ai/yaml-file.js +2 -2
  34. package/lib/ai/yaml-file.js.map +1 -1
  35. package/lib/alchemy.d.ts +4 -0
  36. package/lib/alchemy.d.ts.map +1 -1
  37. package/lib/alchemy.js +14 -4
  38. package/lib/alchemy.js.map +1 -1
  39. package/lib/apply.d.ts +2 -0
  40. package/lib/apply.d.ts.map +1 -1
  41. package/lib/apply.js +17 -2
  42. package/lib/apply.js.map +1 -1
  43. package/lib/aws/bucket.d.ts +1 -1
  44. package/lib/aws/bucket.d.ts.map +1 -1
  45. package/lib/aws/bucket.js +1 -1
  46. package/lib/aws/bucket.js.map +1 -1
  47. package/lib/aws/function.d.ts +1 -1
  48. package/lib/aws/function.d.ts.map +1 -1
  49. package/lib/aws/function.js +2 -2
  50. package/lib/aws/function.js.map +1 -1
  51. package/lib/aws/oidc/oidc-provider.d.ts +1 -1
  52. package/lib/aws/oidc/oidc-provider.d.ts.map +1 -1
  53. package/lib/aws/oidc/oidc-provider.js +1 -1
  54. package/lib/aws/oidc/oidc-provider.js.map +1 -1
  55. package/lib/aws/policy-attachment.d.ts +1 -1
  56. package/lib/aws/policy-attachment.d.ts.map +1 -1
  57. package/lib/aws/policy-attachment.js +1 -1
  58. package/lib/aws/policy-attachment.js.map +1 -1
  59. package/lib/aws/policy.d.ts +1 -1
  60. package/lib/aws/policy.d.ts.map +1 -1
  61. package/lib/aws/policy.js +1 -1
  62. package/lib/aws/policy.js.map +1 -1
  63. package/lib/aws/queue.d.ts +1 -1
  64. package/lib/aws/queue.d.ts.map +1 -1
  65. package/lib/aws/queue.js +20 -25
  66. package/lib/aws/queue.js.map +1 -1
  67. package/lib/aws/role.d.ts +1 -1
  68. package/lib/aws/role.d.ts.map +1 -1
  69. package/lib/aws/role.js +1 -1
  70. package/lib/aws/role.js.map +1 -1
  71. package/lib/aws/ses.d.ts +1 -1
  72. package/lib/aws/ses.d.ts.map +1 -1
  73. package/lib/aws/ses.js +1 -1
  74. package/lib/aws/ses.js.map +1 -1
  75. package/lib/aws/table.d.ts +1 -1
  76. package/lib/aws/table.d.ts.map +1 -1
  77. package/lib/aws/table.js +1 -1
  78. package/lib/aws/table.js.map +1 -1
  79. package/lib/cloudflare/account-api-token.d.ts +1 -1
  80. package/lib/cloudflare/account-api-token.d.ts.map +1 -1
  81. package/lib/cloudflare/account-api-token.js +1 -1
  82. package/lib/cloudflare/account-api-token.js.map +1 -1
  83. package/lib/cloudflare/ai-gateway.d.ts +4 -3
  84. package/lib/cloudflare/ai-gateway.d.ts.map +1 -1
  85. package/lib/cloudflare/ai-gateway.js +13 -1
  86. package/lib/cloudflare/ai-gateway.js.map +1 -1
  87. package/lib/cloudflare/analytics-engine.d.ts +21 -0
  88. package/lib/cloudflare/analytics-engine.d.ts.map +1 -0
  89. package/lib/cloudflare/analytics-engine.js +17 -0
  90. package/lib/cloudflare/analytics-engine.js.map +1 -0
  91. package/lib/cloudflare/api-error.js +1 -1
  92. package/lib/cloudflare/api-error.js.map +1 -1
  93. package/lib/cloudflare/assets.js +2 -2
  94. package/lib/cloudflare/assets.js.map +1 -1
  95. package/lib/cloudflare/auth.js +1 -1
  96. package/lib/cloudflare/auth.js.map +1 -1
  97. package/lib/cloudflare/bindings.d.ts +18 -11
  98. package/lib/cloudflare/bindings.d.ts.map +1 -1
  99. package/lib/cloudflare/bindings.js +6 -0
  100. package/lib/cloudflare/bindings.js.map +1 -1
  101. package/lib/cloudflare/bound.d.ts +12 -10
  102. package/lib/cloudflare/bound.d.ts.map +1 -1
  103. package/lib/cloudflare/bucket.d.ts +6 -4
  104. package/lib/cloudflare/bucket.d.ts.map +1 -1
  105. package/lib/cloudflare/bucket.js +22 -2
  106. package/lib/cloudflare/bucket.js.map +1 -1
  107. package/lib/cloudflare/bundle/bundle-worker.d.ts +1 -0
  108. package/lib/cloudflare/bundle/bundle-worker.d.ts.map +1 -1
  109. package/lib/cloudflare/bundle/bundle-worker.js +4 -2
  110. package/lib/cloudflare/bundle/bundle-worker.js.map +1 -1
  111. package/lib/cloudflare/bundle/nodejs-compat-mode.d.ts +1 -1
  112. package/lib/cloudflare/bundle/nodejs-compat-mode.d.ts.map +1 -1
  113. package/lib/cloudflare/bundle/nodejs-compat-mode.js +2 -2
  114. package/lib/cloudflare/bundle/nodejs-compat-mode.js.map +1 -1
  115. package/lib/cloudflare/bundle/nodejs-compat.js +1 -1
  116. package/lib/cloudflare/bundle/nodejs-compat.js.map +1 -1
  117. package/lib/cloudflare/custom-domain.js +1 -1
  118. package/lib/cloudflare/custom-domain.js.map +1 -1
  119. package/lib/cloudflare/d1-database.d.ts +4 -62
  120. package/lib/cloudflare/d1-database.d.ts.map +1 -1
  121. package/lib/cloudflare/d1-database.js +27 -11
  122. package/lib/cloudflare/d1-database.js.map +1 -1
  123. package/lib/cloudflare/dns-records.d.ts +1 -1
  124. package/lib/cloudflare/dns-records.d.ts.map +1 -1
  125. package/lib/cloudflare/dns-records.js +2 -2
  126. package/lib/cloudflare/dns-records.js.map +1 -1
  127. package/lib/cloudflare/event-source.d.ts +3 -3
  128. package/lib/cloudflare/event-source.d.ts.map +1 -1
  129. package/lib/cloudflare/hyperdrive.d.ts +4 -3
  130. package/lib/cloudflare/hyperdrive.d.ts.map +1 -1
  131. package/lib/cloudflare/hyperdrive.js +9 -1
  132. package/lib/cloudflare/hyperdrive.js.map +1 -1
  133. package/lib/cloudflare/kv-namespace.d.ts +9 -5
  134. package/lib/cloudflare/kv-namespace.d.ts.map +1 -1
  135. package/lib/cloudflare/kv-namespace.js +26 -6
  136. package/lib/cloudflare/kv-namespace.js.map +1 -1
  137. package/lib/cloudflare/permission-groups.d.ts +1 -1
  138. package/lib/cloudflare/permission-groups.d.ts.map +1 -1
  139. package/lib/cloudflare/permission-groups.js +1 -1
  140. package/lib/cloudflare/permission-groups.js.map +1 -1
  141. package/lib/cloudflare/pipeline.d.ts +5 -3
  142. package/lib/cloudflare/pipeline.d.ts.map +1 -1
  143. package/lib/cloudflare/pipeline.js +16 -2
  144. package/lib/cloudflare/pipeline.js.map +1 -1
  145. package/lib/cloudflare/queue-consumer.d.ts +3 -3
  146. package/lib/cloudflare/queue-consumer.d.ts.map +1 -1
  147. package/lib/cloudflare/queue-consumer.js +1 -1
  148. package/lib/cloudflare/queue-consumer.js.map +1 -1
  149. package/lib/cloudflare/queue.d.ts +34 -22
  150. package/lib/cloudflare/queue.d.ts.map +1 -1
  151. package/lib/cloudflare/queue.js +66 -4
  152. package/lib/cloudflare/queue.js.map +1 -1
  153. package/lib/cloudflare/route.d.ts +1 -1
  154. package/lib/cloudflare/route.d.ts.map +1 -1
  155. package/lib/cloudflare/route.js +1 -1
  156. package/lib/cloudflare/route.js.map +1 -1
  157. package/lib/cloudflare/types.js +1 -1
  158. package/lib/cloudflare/types.js.map +1 -1
  159. package/lib/cloudflare/vectorize-index.d.ts +6 -4
  160. package/lib/cloudflare/vectorize-index.d.ts.map +1 -1
  161. package/lib/cloudflare/vectorize-index.js +20 -3
  162. package/lib/cloudflare/vectorize-index.js.map +1 -1
  163. package/lib/cloudflare/vectorize-metadata-index.d.ts +4 -3
  164. package/lib/cloudflare/vectorize-metadata-index.d.ts.map +1 -1
  165. package/lib/cloudflare/vectorize-metadata-index.js +5 -2
  166. package/lib/cloudflare/vectorize-metadata-index.js.map +1 -1
  167. package/lib/cloudflare/website.d.ts.map +1 -1
  168. package/lib/cloudflare/website.js +3 -0
  169. package/lib/cloudflare/website.js.map +1 -1
  170. package/lib/cloudflare/worker-assets.d.ts +32 -0
  171. package/lib/cloudflare/worker-assets.d.ts.map +1 -0
  172. package/lib/cloudflare/worker-assets.js +143 -0
  173. package/lib/cloudflare/worker-assets.js.map +1 -0
  174. package/lib/cloudflare/worker-metadata.d.ts +31 -0
  175. package/lib/cloudflare/worker-metadata.d.ts.map +1 -1
  176. package/lib/cloudflare/worker-metadata.js +248 -0
  177. package/lib/cloudflare/worker-metadata.js.map +1 -1
  178. package/lib/cloudflare/worker-stub.d.ts +40 -0
  179. package/lib/cloudflare/worker-stub.d.ts.map +1 -0
  180. package/lib/cloudflare/worker-stub.js +86 -0
  181. package/lib/cloudflare/worker-stub.js.map +1 -0
  182. package/lib/cloudflare/worker.d.ts +57 -28
  183. package/lib/cloudflare/worker.d.ts.map +1 -1
  184. package/lib/cloudflare/worker.js +203 -472
  185. package/lib/cloudflare/worker.js.map +1 -1
  186. package/lib/cloudflare/wrangler.json.d.ts +29 -1
  187. package/lib/cloudflare/wrangler.json.d.ts.map +1 -1
  188. package/lib/cloudflare/wrangler.json.js +50 -2
  189. package/lib/cloudflare/wrangler.json.js.map +1 -1
  190. package/lib/cloudflare/zone.d.ts +1 -1
  191. package/lib/cloudflare/zone.d.ts.map +1 -1
  192. package/lib/cloudflare/zone.js +1 -1
  193. package/lib/cloudflare/zone.js.map +1 -1
  194. package/lib/destroy.d.ts +1 -4
  195. package/lib/destroy.d.ts.map +1 -1
  196. package/lib/destroy.js +10 -21
  197. package/lib/destroy.js.map +1 -1
  198. package/lib/dns/import-dns.d.ts +1 -1
  199. package/lib/dns/import-dns.d.ts.map +1 -1
  200. package/lib/dns/import-dns.js +1 -1
  201. package/lib/dns/import-dns.js.map +1 -1
  202. package/lib/encrypt.d.ts.map +1 -1
  203. package/lib/encrypt.js +2 -1
  204. package/lib/encrypt.js.map +1 -1
  205. package/lib/env.js +14 -8
  206. package/lib/env.js.map +1 -1
  207. package/lib/esbuild/bundle.d.ts +2 -2
  208. package/lib/esbuild/bundle.d.ts.map +1 -1
  209. package/lib/esbuild/bundle.js +3 -3
  210. package/lib/esbuild/bundle.js.map +1 -1
  211. package/lib/fs/copy-file.d.ts +1 -1
  212. package/lib/fs/copy-file.d.ts.map +1 -1
  213. package/lib/fs/copy-file.js +1 -1
  214. package/lib/fs/copy-file.js.map +1 -1
  215. package/lib/github/client.js +1 -1
  216. package/lib/github/client.js.map +1 -1
  217. package/lib/github/repository-environment.d.ts +1 -1
  218. package/lib/github/repository-environment.d.ts.map +1 -1
  219. package/lib/github/repository-environment.js +2 -2
  220. package/lib/github/repository-environment.js.map +1 -1
  221. package/lib/github/secret.d.ts +1 -1
  222. package/lib/github/secret.d.ts.map +1 -1
  223. package/lib/github/secret.js +1 -1
  224. package/lib/github/secret.js.map +1 -1
  225. package/lib/internal/docs/providers.d.ts +1 -1
  226. package/lib/internal/docs/providers.d.ts.map +1 -1
  227. package/lib/internal/docs/providers.js +3 -1
  228. package/lib/internal/docs/providers.js.map +1 -1
  229. package/lib/neon/api-error.js +2 -2
  230. package/lib/neon/api-error.js.map +1 -1
  231. package/lib/os/exec.js +1 -1
  232. package/lib/os/exec.js.map +1 -1
  233. package/lib/resource.d.ts +13 -11
  234. package/lib/resource.d.ts.map +1 -1
  235. package/lib/resource.js +10 -5
  236. package/lib/resource.js.map +1 -1
  237. package/lib/runtime/bind.d.ts +25 -0
  238. package/lib/runtime/bind.d.ts.map +1 -0
  239. package/lib/runtime/bind.js +76 -0
  240. package/lib/runtime/bind.js.map +1 -0
  241. package/lib/runtime/global.d.ts +8 -0
  242. package/lib/runtime/global.d.ts.map +1 -0
  243. package/lib/runtime/global.js +3 -0
  244. package/lib/runtime/global.js.map +1 -0
  245. package/lib/runtime/plugin.d.ts +35 -0
  246. package/lib/runtime/plugin.d.ts.map +1 -0
  247. package/lib/runtime/plugin.js +133 -0
  248. package/lib/runtime/plugin.js.map +1 -0
  249. package/lib/runtime/shims.d.ts +6 -0
  250. package/lib/runtime/shims.d.ts.map +1 -0
  251. package/lib/runtime/shims.js +27 -0
  252. package/lib/runtime/shims.js.map +1 -0
  253. package/lib/runtime/state.d.ts +5 -0
  254. package/lib/runtime/state.d.ts.map +1 -0
  255. package/lib/runtime/state.js +4 -0
  256. package/lib/runtime/state.js.map +1 -0
  257. package/lib/scope.d.ts +16 -2
  258. package/lib/scope.d.ts.map +1 -1
  259. package/lib/scope.js +56 -9
  260. package/lib/scope.js.map +1 -1
  261. package/lib/secret.d.ts +7 -2
  262. package/lib/secret.d.ts.map +1 -1
  263. package/lib/secret.js +19 -4
  264. package/lib/secret.js.map +1 -1
  265. package/lib/sentry/client-key.d.ts +1 -1
  266. package/lib/sentry/client-key.d.ts.map +1 -1
  267. package/lib/sentry/client-key.js +1 -1
  268. package/lib/sentry/client-key.js.map +1 -1
  269. package/lib/sentry/project.d.ts +1 -1
  270. package/lib/sentry/project.d.ts.map +1 -1
  271. package/lib/sentry/project.js +1 -1
  272. package/lib/sentry/project.js.map +1 -1
  273. package/lib/sentry/team.d.ts +1 -1
  274. package/lib/sentry/team.d.ts.map +1 -1
  275. package/lib/sentry/team.js +1 -1
  276. package/lib/sentry/team.js.map +1 -1
  277. package/lib/serde.d.ts +26 -1
  278. package/lib/serde.d.ts.map +1 -1
  279. package/lib/serde.js +53 -8
  280. package/lib/serde.js.map +1 -1
  281. package/lib/stripe/meter.d.ts +1 -1
  282. package/lib/stripe/meter.d.ts.map +1 -1
  283. package/lib/stripe/meter.js +1 -1
  284. package/lib/stripe/meter.js.map +1 -1
  285. package/lib/stripe/price.d.ts +1 -1
  286. package/lib/stripe/price.d.ts.map +1 -1
  287. package/lib/stripe/price.js +1 -1
  288. package/lib/stripe/price.js.map +1 -1
  289. package/lib/stripe/product.d.ts +1 -1
  290. package/lib/stripe/product.d.ts.map +1 -1
  291. package/lib/stripe/product.js +1 -1
  292. package/lib/stripe/product.js.map +1 -1
  293. package/lib/stripe/webhook.d.ts +1 -1
  294. package/lib/stripe/webhook.d.ts.map +1 -1
  295. package/lib/stripe/webhook.js +1 -1
  296. package/lib/stripe/webhook.js.map +1 -1
  297. package/lib/test/bun.js +1 -1
  298. package/lib/test/bun.js.map +1 -1
  299. package/lib/test/prune.js +1 -1
  300. package/lib/test/prune.js.map +1 -1
  301. package/lib/upstash/redis.d.ts +1 -1
  302. package/lib/upstash/redis.d.ts.map +1 -1
  303. package/lib/upstash/redis.js +1 -1
  304. package/lib/upstash/redis.js.map +1 -1
  305. package/lib/util/assert-never.d.ts +2 -0
  306. package/lib/util/assert-never.d.ts.map +1 -0
  307. package/lib/util/assert-never.js +4 -0
  308. package/lib/util/assert-never.js.map +1 -0
  309. package/lib/util/content-type.d.ts +1 -1
  310. package/lib/util/content-type.d.ts.map +1 -1
  311. package/lib/util/content-type.js +1 -2
  312. package/lib/util/content-type.js.map +1 -1
  313. package/lib/util/retry.d.ts.map +1 -1
  314. package/lib/util/retry.js +1 -0
  315. package/lib/util/retry.js.map +1 -1
  316. package/lib/vercel/project-domain.d.ts +1 -1
  317. package/lib/vercel/project-domain.d.ts.map +1 -1
  318. package/lib/vercel/project-domain.js +1 -1
  319. package/lib/vercel/project-domain.js.map +1 -1
  320. package/lib/vercel/project.js +1 -1
  321. package/lib/vercel/project.js.map +1 -1
  322. package/lib/web/shadcn-component.d.ts +1 -1
  323. package/lib/web/shadcn-component.d.ts.map +1 -1
  324. package/lib/web/shadcn-component.js +1 -1
  325. package/lib/web/shadcn-component.js.map +1 -1
  326. package/lib/web/shadcn.d.ts +1 -1
  327. package/lib/web/shadcn.d.ts.map +1 -1
  328. package/lib/web/shadcn.js +1 -1
  329. package/lib/web/shadcn.js.map +1 -1
  330. package/lib/web/vitepress/dependencies.d.ts +1 -1
  331. package/lib/web/vitepress/dependencies.d.ts.map +1 -1
  332. package/lib/web/vitepress/dependencies.js +1 -1
  333. package/lib/web/vitepress/dependencies.js.map +1 -1
  334. package/lib/web/vitepress/vitepress.js +1 -1
  335. package/lib/web/vitepress/vitepress.js.map +1 -1
  336. package/package.json +2 -1
  337. package/src/ai/astro-file.ts +1 -1
  338. package/src/ai/client.ts +2 -2
  339. package/src/ai/css-file.ts +1 -1
  340. package/src/ai/data.ts +1 -1
  341. package/src/ai/html-file.ts +1 -1
  342. package/src/ai/json-file.ts +1 -1
  343. package/src/ai/typescript-file.ts +1 -1
  344. package/src/ai/vue-file.ts +1 -1
  345. package/src/ai/yaml-file.ts +2 -2
  346. package/src/alchemy.ts +18 -4
  347. package/src/apply.ts +27 -2
  348. package/src/aws/bucket.ts +1 -1
  349. package/src/aws/function.ts +2 -2
  350. package/src/aws/oidc/oidc-provider.ts +1 -1
  351. package/src/aws/policy-attachment.ts +1 -1
  352. package/src/aws/policy.ts +1 -1
  353. package/src/aws/queue.ts +28 -29
  354. package/src/aws/role.ts +1 -1
  355. package/src/aws/ses.ts +1 -1
  356. package/src/aws/table.ts +1 -1
  357. package/src/cloudflare/account-api-token.ts +1 -1
  358. package/src/cloudflare/ai-gateway.ts +23 -4
  359. package/src/cloudflare/analytics-engine.ts +26 -0
  360. package/src/cloudflare/api-error.ts +1 -1
  361. package/src/cloudflare/assets.ts +2 -2
  362. package/src/cloudflare/auth.ts +1 -1
  363. package/src/cloudflare/bindings.ts +35 -18
  364. package/src/cloudflare/bound.ts +27 -23
  365. package/src/cloudflare/bucket.ts +52 -24
  366. package/src/cloudflare/bundle/bundle-worker.ts +5 -2
  367. package/src/cloudflare/bundle/nodejs-compat-mode.ts +3 -3
  368. package/src/cloudflare/bundle/nodejs-compat.ts +1 -1
  369. package/src/cloudflare/custom-domain.ts +1 -1
  370. package/src/cloudflare/d1-database.ts +40 -19
  371. package/src/cloudflare/dns-records.ts +2 -2
  372. package/src/cloudflare/event-source.ts +3 -3
  373. package/src/cloudflare/hyperdrive.ts +19 -4
  374. package/src/cloudflare/kv-namespace.ts +46 -15
  375. package/src/cloudflare/permission-groups.ts +1 -1
  376. package/src/cloudflare/pipeline.ts +29 -6
  377. package/src/cloudflare/queue-consumer.ts +3 -3
  378. package/src/cloudflare/queue.ts +124 -23
  379. package/src/cloudflare/route.ts +1 -1
  380. package/src/cloudflare/types.ts +1 -1
  381. package/src/cloudflare/vectorize-index.ts +36 -8
  382. package/src/cloudflare/vectorize-metadata-index.ts +10 -4
  383. package/src/cloudflare/website.ts +3 -0
  384. package/src/cloudflare/worker-assets.ts +237 -0
  385. package/src/cloudflare/worker-metadata.ts +287 -0
  386. package/src/cloudflare/worker-stub.ts +153 -0
  387. package/src/cloudflare/worker.ts +386 -586
  388. package/src/cloudflare/wrangler.json.ts +75 -2
  389. package/src/cloudflare/zone.ts +1 -1
  390. package/src/destroy.ts +12 -23
  391. package/src/dns/import-dns.ts +1 -1
  392. package/src/encrypt.ts +2 -2
  393. package/src/env.ts +15 -8
  394. package/src/esbuild/bundle.ts +4 -3
  395. package/src/fs/copy-file.ts +1 -1
  396. package/src/github/client.ts +1 -1
  397. package/src/github/repository-environment.ts +2 -2
  398. package/src/github/secret.ts +1 -1
  399. package/src/internal/docs/providers.ts +1 -1
  400. package/src/neon/api-error.ts +2 -2
  401. package/src/os/exec.ts +1 -1
  402. package/src/resource.ts +22 -31
  403. package/src/runtime/bind.ts +95 -0
  404. package/src/runtime/global.ts +10 -0
  405. package/src/runtime/plugin.ts +162 -0
  406. package/src/runtime/shims.js +34 -0
  407. package/src/runtime/state.ts +9 -0
  408. package/src/scope.ts +72 -11
  409. package/src/secret.ts +29 -4
  410. package/src/sentry/client-key.ts +1 -1
  411. package/src/sentry/project.ts +1 -1
  412. package/src/sentry/team.ts +1 -1
  413. package/src/serde.ts +126 -10
  414. package/src/stripe/meter.ts +1 -1
  415. package/src/stripe/price.ts +1 -1
  416. package/src/stripe/product.ts +1 -1
  417. package/src/stripe/webhook.ts +1 -1
  418. package/src/test/bun.ts +1 -1
  419. package/src/test/prune.ts +1 -1
  420. package/src/upstash/redis.ts +1 -1
  421. package/src/util/assert-never.ts +3 -0
  422. package/src/util/content-type.ts +2 -3
  423. package/src/util/retry.ts +1 -0
  424. package/src/vercel/project-domain.ts +1 -1
  425. package/src/vercel/project.ts +1 -1
  426. package/src/web/shadcn-component.ts +1 -1
  427. package/src/web/shadcn.ts +1 -1
  428. package/src/web/vitepress/dependencies.ts +1 -1
  429. package/src/web/vitepress/vitepress.ts +1 -1
@@ -1,6 +1,7 @@
1
1
  import type { Context } from "../context.js";
2
2
  import { StaticJsonFile } from "../fs/static-json-file.js";
3
3
  import { Resource } from "../resource.js";
4
+ import { assertNever } from "../util/assert-never.js";
4
5
  import { Self, type Bindings } from "./bindings.js";
5
6
  import type { DurableObjectNamespace } from "./durable-object-namespace.js";
6
7
  import type { EventSource } from "./event-source.js";
@@ -66,7 +67,7 @@ export const WranglerJson = Resource(
66
67
  "cloudflare::WranglerJson",
67
68
  async function (
68
69
  this: Context<WranglerJson>,
69
- id: string,
70
+ _id: string,
70
71
  props: WranglerJsonProps,
71
72
  ): Promise<WranglerJson> {
72
73
  // Default path is wrangler.json in current directory
@@ -103,6 +104,10 @@ export const WranglerJson = Resource(
103
104
  spec.vars = { ...worker.env };
104
105
  }
105
106
 
107
+ if (worker.crons && worker.crons.length > 0) {
108
+ spec.triggers = { crons: worker.crons };
109
+ }
110
+
106
111
  await StaticJsonFile(filePath, spec);
107
112
 
108
113
  // Return the resource
@@ -150,6 +155,13 @@ export interface WranglerJsonSpec {
150
155
  */
151
156
  routes?: string[];
152
157
 
158
+ /**
159
+ * Scheduled triggers for the worker
160
+ */
161
+ triggers?: {
162
+ crons: string[];
163
+ };
164
+
153
165
  /**
154
166
  * AI bindings
155
167
  */
@@ -291,6 +303,21 @@ export interface WranglerJsonSpec {
291
303
  * Whether to minify the worker script
292
304
  */
293
305
  minify?: boolean;
306
+
307
+ /**
308
+ * Analytics Engine datasets
309
+ */
310
+ analytics_engine_datasets?: { binding: string; dataset: string }[];
311
+
312
+ /**
313
+ * Hyperdrive bindings
314
+ */
315
+ hyperdrive?: { binding: string; id: string; localConnectionString: string }[];
316
+
317
+ /**
318
+ * Pipelines
319
+ */
320
+ pipelines?: { binding: string; pipeline: string }[];
294
321
  }
295
322
 
296
323
  /**
@@ -340,6 +367,13 @@ function processBindings(
340
367
  const new_classes: string[] = [];
341
368
 
342
369
  const vectorizeIndexes: { binding: string; index_name: string }[] = [];
370
+ const analyticsEngineDatasets: { binding: string; dataset: string }[] = [];
371
+ const hyperdrive: {
372
+ binding: string;
373
+ id: string;
374
+ localConnectionString: string;
375
+ }[] = [];
376
+ const pipelines: { binding: string; pipeline: string }[] = [];
343
377
 
344
378
  for (const eventSource of eventSources ?? []) {
345
379
  if (isQueueEventSource(eventSource)) {
@@ -375,7 +409,7 @@ function processBindings(
375
409
  // Service binding
376
410
  services.push({
377
411
  binding: bindingName,
378
- service: binding.id,
412
+ service: binding.name,
379
413
  });
380
414
  } else if (binding.type === "kv_namespace") {
381
415
  // KV Namespace binding
@@ -450,6 +484,33 @@ function processBindings(
450
484
  spec.ai = {
451
485
  binding: bindingName,
452
486
  };
487
+ } else if (binding.type === "analytics_engine") {
488
+ analyticsEngineDatasets.push({
489
+ binding: bindingName,
490
+ dataset: binding.dataset,
491
+ });
492
+ } else if (binding.type === "ai_gateway") {
493
+ // no-op
494
+ } else if (binding.type === "hyperdrive") {
495
+ const password =
496
+ "password" in binding.origin
497
+ ? binding.origin.password.unencrypted
498
+ : binding.origin.access_client_secret.unencrypted;
499
+ hyperdrive.push({
500
+ binding: bindingName,
501
+ id: binding.hyperdriveId,
502
+ localConnectionString: `${binding.origin.scheme || "postgres"}://${binding.origin.user}:${password}@${binding.origin.host}:${binding.origin.port || 5432}/${binding.origin.database}`,
503
+ });
504
+ } else if (binding.type === "pipeline") {
505
+ pipelines.push({
506
+ binding: bindingName,
507
+ pipeline: binding.name,
508
+ });
509
+ } else if (binding.type === "json") {
510
+ // TODO(sam): anything to do here? not sure wrangler.json supports this
511
+ } else {
512
+ // biome-ignore lint/correctness/noVoidTypeReturn: it returns never
513
+ return assertNever(binding);
453
514
  }
454
515
  }
455
516
 
@@ -497,4 +558,16 @@ function processBindings(
497
558
  if (workflows.length > 0) {
498
559
  spec.workflows = workflows;
499
560
  }
561
+
562
+ if (analyticsEngineDatasets.length > 0) {
563
+ spec.analytics_engine_datasets = analyticsEngineDatasets;
564
+ }
565
+
566
+ if (hyperdrive.length > 0) {
567
+ spec.hyperdrive = hyperdrive;
568
+ }
569
+
570
+ if (pipelines.length > 0) {
571
+ spec.pipelines = pipelines;
572
+ }
500
573
  }
@@ -305,7 +305,7 @@ export const Zone = Resource(
305
305
  "cloudflare::Zone",
306
306
  async function (
307
307
  this: Context<Zone>,
308
- id: string,
308
+ _id: string,
309
309
  props: ZoneProps,
310
310
  ): Promise<Zone> {
311
311
  // Create Cloudflare API client with automatic account discovery
package/src/destroy.ts CHANGED
@@ -39,11 +39,11 @@ export async function destroy<Type extends string>(
39
39
  } satisfies DestroyOptions;
40
40
 
41
41
  // destroy all active resources
42
- await destroy.all(Array.from(scope.resources.values()), options);
42
+ await destroyAll(Array.from(scope.resources.values()), options);
43
43
 
44
44
  // then detect orphans and destroy them
45
45
  const orphans = await scope.state.all();
46
- await destroy.all(
46
+ await destroyAll(
47
47
  Object.values(orphans).map((orphan) => ({
48
48
  ...orphan.output,
49
49
  Scope: scope,
@@ -151,27 +151,16 @@ export async function destroy<Type extends string>(
151
151
  }
152
152
  }
153
153
 
154
- export namespace destroy {
155
- export async function all(resources: Resource[], options?: DestroyOptions) {
156
- if (options?.strategy !== "parallel") {
157
- const sorted = resources.sort((a, b) => b[ResourceSeq] - a[ResourceSeq]);
158
- for (const resource of sorted) {
159
- await destroy(resource, options);
160
- }
161
- } else {
162
- await Promise.all(
163
- resources.map((resource) => destroy(resource, options)),
164
- );
165
- }
166
- }
167
-
168
- export async function sequentially(
169
- ...resources: (Resource<string> | undefined | null)[]
170
- ) {
171
- for (const resource of resources) {
172
- if (resource) {
173
- await destroy(resource);
174
- }
154
+ export async function destroyAll(
155
+ resources: Resource[],
156
+ options?: DestroyOptions,
157
+ ) {
158
+ if (options?.strategy !== "parallel") {
159
+ const sorted = resources.sort((a, b) => b[ResourceSeq] - a[ResourceSeq]);
160
+ for (const resource of sorted) {
161
+ await destroy(resource, options);
175
162
  }
163
+ } else {
164
+ await Promise.all(resources.map((resource) => destroy(resource, options)));
176
165
  }
177
166
  }
@@ -133,7 +133,7 @@ export const ImportDnsRecords = Resource(
133
133
  "dns::ImportDnsRecords",
134
134
  async function (
135
135
  this: Context<ImportDnsRecords>,
136
- id: string,
136
+ _id: string,
137
137
  props: ImportDnsRecordsProps,
138
138
  ): Promise<ImportDnsRecords> {
139
139
  // For delete phase, just return destroyed state since this is a read-only resource
package/src/encrypt.ts CHANGED
@@ -1,5 +1,3 @@
1
- import sodium from "libsodium-wrappers";
2
-
3
1
  /**
4
2
  * Encrypt a value with a symmetric key using libsodium
5
3
  *
@@ -8,6 +6,7 @@ import sodium from "libsodium-wrappers";
8
6
  * @returns The base64-encoded encrypted value with nonce
9
7
  */
10
8
  export async function encrypt(value: string, key: string): Promise<string> {
9
+ const sodium = (await import("libsodium-wrappers")).default;
11
10
  // Initialize libsodium
12
11
  await sodium.ready;
13
12
 
@@ -46,6 +45,7 @@ export async function decryptWithKey(
46
45
  encryptedValue: string,
47
46
  key: string,
48
47
  ): Promise<string> {
48
+ const sodium = (await import("libsodium-wrappers")).default;
49
49
  // Initialize libsodium
50
50
  await sodium.ready;
51
51
 
package/src/env.ts CHANGED
@@ -16,16 +16,23 @@ async function _env<T = string>(
16
16
  if (value !== undefined) {
17
17
  return value;
18
18
  }
19
+ const env = await resolveEnv();
20
+ if (name in env) {
21
+ return env[name] as T;
22
+ }
23
+ throw new Error(error ?? `Environment variable ${name} is not set`);
24
+ }
25
+
26
+ async function resolveEnv(): Promise<Record<string, any>> {
19
27
  if (typeof process !== "undefined") {
20
- // we are in a node environment
21
- return process.env[name]! as T;
28
+ return process.env;
22
29
  }
23
- // we are in a browser environment
24
30
  try {
25
31
  const { env } = await import("cloudflare:workers");
26
- if (name in env) {
27
- return env[name as keyof typeof env] as T;
28
- }
29
- } catch (error) {}
30
- throw new Error(error ?? `Environment variable ${name} is not set`);
32
+ return env;
33
+ } catch (_error) {}
34
+ if (typeof import.meta !== "undefined") {
35
+ return import.meta.env;
36
+ }
37
+ throw new Error("No environment found");
31
38
  }
@@ -1,4 +1,4 @@
1
- import esbuild from "esbuild";
1
+ import type esbuild from "esbuild";
2
2
  import crypto from "node:crypto";
3
3
  import fs from "node:fs/promises";
4
4
  import path from "node:path";
@@ -122,7 +122,7 @@ export const Bundle = Resource(
122
122
  },
123
123
  async function <Props extends BundleProps>(
124
124
  this: Context<Bundle<any>>,
125
- id: string,
125
+ _id: string,
126
126
  props: Props,
127
127
  ): Promise<Bundle<Props>> {
128
128
  if (this.phase === "delete") {
@@ -193,7 +193,7 @@ export async function bundle(props: BundleProps) {
193
193
  // write:
194
194
  // props.outdir === undefined && props.outfile === undefined ? false : true,
195
195
  // write: false,
196
- entryPoints: [props.entryPoint],
196
+ entryPoints: [entryPoint],
197
197
  outdir: props.outdir ? props.outdir : props.outfile ? undefined : ".out",
198
198
  outfile: props.outfile,
199
199
  bundle: true,
@@ -208,5 +208,6 @@ export async function bundle(props: BundleProps) {
208
208
  if (process.env.DEBUG) {
209
209
  console.log(options);
210
210
  }
211
+ const esbuild = await import("esbuild");
211
212
  return await esbuild.build(options);
212
213
  }
@@ -63,7 +63,7 @@ export const CopyFile = Resource(
63
63
  "fs::CopyFile",
64
64
  async function (
65
65
  this: Context<CopyFile>,
66
- id: string,
66
+ _id: string,
67
67
  props: CopyFileProps,
68
68
  ): Promise<CopyFile> {
69
69
  const { src, dest, overwrite = true } = props;
@@ -17,7 +17,7 @@ export async function getGitHubTokenFromCLI(): Promise<string | null> {
17
17
  // Get the auth token
18
18
  const { stdout: token } = await execAsync("gh auth token");
19
19
  return token?.trim() || null;
20
- } catch (error) {
20
+ } catch (_error) {
21
21
  return null;
22
22
  }
23
23
  }
@@ -173,7 +173,7 @@ export const RepositoryEnvironment = Resource(
173
173
  "github::RepositoryEnvironment",
174
174
  async function (
175
175
  this: Context<RepositoryEnvironment>,
176
- id: string,
176
+ _id: string,
177
177
  props: RepositoryEnvironmentProps,
178
178
  ): Promise<RepositoryEnvironment> {
179
179
  // Create authenticated Octokit client
@@ -210,7 +210,7 @@ export const RepositoryEnvironment = Resource(
210
210
  }
211
211
  try {
212
212
  // Check if the environment already exists
213
- let environmentId: number | undefined = undefined; // Use undefined instead of 0
213
+ let environmentId: number | undefined; // Use undefined instead of 0
214
214
  try {
215
215
  const { data: environments } =
216
216
  await octokit.rest.repos.getAllEnvironments({
@@ -134,7 +134,7 @@ export const GitHubSecret = Resource(
134
134
  "github::Secret",
135
135
  async function (
136
136
  this: Context<GitHubSecretOutput>,
137
- id: string,
137
+ _id: string,
138
138
  props: GitHubSecretProps,
139
139
  ): Promise<GitHubSecretOutput> {
140
140
  // Create authenticated Octokit client - will automatically handle token resolution
@@ -52,7 +52,7 @@ export type Providers = {
52
52
  export async function Providers({
53
53
  srcDir,
54
54
  outDir,
55
- filter,
55
+ // filter,
56
56
  parallel = true,
57
57
  }: DocsProps): Promise<Providers> {
58
58
  outDir = typeof outDir === "string" ? outDir : outDir.path;
@@ -53,11 +53,11 @@ export async function handleApiError(
53
53
 
54
54
  try {
55
55
  errorData = await response.json();
56
- } catch (e) {
56
+ } catch (_e) {
57
57
  // If we can't parse JSON, just use the response text
58
58
  try {
59
59
  errorData = { message: await response.text() };
60
- } catch (textError) {
60
+ } catch (_textError) {
61
61
  errorData = { message: response.statusText };
62
62
  }
63
63
  }
package/src/os/exec.ts CHANGED
@@ -218,7 +218,7 @@ export const Exec = Resource(
218
218
  }
219
219
 
220
220
  // Wait for the process to complete
221
- exitCode = await new Promise<number>((resolve, reject) => {
221
+ exitCode = await new Promise<number>((resolve, _reject) => {
222
222
  childProcess.on("close", (code) => {
223
223
  resolve(code || 0);
224
224
  });
package/src/resource.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { apply } from "./apply.js";
2
2
  import type { Context } from "./context.js";
3
- import { Scope as _Scope } from "./scope.js";
3
+ import { Scope as _Scope, type Scope } from "./scope.js";
4
4
 
5
5
  export const PROVIDERS = new Map<ResourceKind, Provider<string, any>>();
6
6
 
@@ -11,6 +11,7 @@ export const ResourceFQN = Symbol.for("alchemy::ResourceFQN");
11
11
  export type ResourceKind = string;
12
12
  export const ResourceKind = Symbol.for("alchemy::ResourceKind");
13
13
  export const ResourceScope = Symbol.for("alchemy::ResourceScope");
14
+ export const InnerResourceScope = Symbol.for("alchemy::InnerResourceScope");
14
15
  export const ResourceSeq = Symbol.for("alchemy::ResourceSeq");
15
16
 
16
17
  export interface ProviderOptions {
@@ -34,35 +35,21 @@ export type Provider<
34
35
  handler: F;
35
36
  };
36
37
 
37
- export type PendingResource<
38
- Out = unknown,
39
- Kind extends ResourceKind = ResourceKind,
40
- ID extends ResourceID = ResourceID,
41
- FQN extends ResourceFQN = ResourceFQN,
42
- Scope extends _Scope = _Scope,
43
- Seq extends number = number,
44
- > = Promise<Out> & {
45
- [ResourceKind]: Kind;
46
- [ResourceID]: ID;
47
- [ResourceFQN]: FQN;
38
+ export interface PendingResource<Out = unknown> extends Promise<Out> {
39
+ [ResourceKind]: ResourceKind;
40
+ [ResourceID]: ResourceID;
41
+ [ResourceFQN]: ResourceFQN;
48
42
  [ResourceScope]: Scope;
49
- [ResourceSeq]: Seq;
50
- };
43
+ [ResourceSeq]: number;
44
+ [InnerResourceScope]: Promise<Scope>;
45
+ }
51
46
 
52
- export interface Resource<
53
- // give each name types for syntax highlighting (differentiation)
54
- Kind extends ResourceKind = ResourceKind,
55
- ID extends ResourceID = ResourceID,
56
- FQN extends ResourceFQN = ResourceFQN,
57
- Scope extends _Scope = _Scope,
58
- Seq extends number = number,
59
- > {
60
- // use capital letters to avoid collision with conventional camelCase typescript properties
47
+ export interface Resource<Kind extends ResourceKind = ResourceKind> {
61
48
  [ResourceKind]: Kind;
62
- [ResourceID]: ID;
63
- [ResourceFQN]: FQN;
49
+ [ResourceID]: ResourceID;
50
+ [ResourceFQN]: ResourceFQN;
64
51
  [ResourceScope]: Scope;
65
- [ResourceSeq]: Seq;
52
+ [ResourceSeq]: number;
66
53
  }
67
54
 
68
55
  // helper for semantic syntax highlighting (color as a type/class instead of function/value)
@@ -102,7 +89,7 @@ export function Resource<
102
89
 
103
90
  type Out = Awaited<ReturnType<F>>;
104
91
 
105
- const provider = ((
92
+ const provider = (async (
106
93
  resourceID: string,
107
94
  props: ResourceProps,
108
95
  ): Promise<Resource<string>> => {
@@ -123,21 +110,25 @@ export function Resource<
123
110
  `Resource ${resourceID} already exists in the stack and is of a different type: '${otherResource?.[ResourceKind]}' !== '${type}'`,
124
111
  );
125
112
  }
126
- // console.warn(
127
- // `Resource ${resourceID} already exists in the stack: ${scope.chain.join("/")}`,
128
- // );
129
113
  }
130
114
 
131
115
  // get a sequence number (unique within the scope) for the resource
132
116
  const seq = scope.seq();
117
+ let resolveInnerScope: ((scope: Scope) => void) | undefined;
133
118
  const meta = {
134
119
  [ResourceKind]: type,
135
120
  [ResourceID]: resourceID,
136
121
  [ResourceFQN]: scope.fqn(resourceID),
137
122
  [ResourceSeq]: seq,
138
123
  [ResourceScope]: scope,
124
+ [InnerResourceScope]: new Promise<Scope>((resolve) => {
125
+ resolveInnerScope = resolve;
126
+ }),
139
127
  } as any as PendingResource<Out>;
140
- const promise = apply(meta, props, options);
128
+ const promise = apply(meta, props, {
129
+ ...options,
130
+ resolveInnerScope,
131
+ });
141
132
  const resource = Object.assign(promise, meta);
142
133
  scope.resources.set(resourceID, resource);
143
134
  return resource;
@@ -0,0 +1,95 @@
1
+ import { isPromise } from "node:util/types";
2
+ import type { Binding as CloudflareBinding } from "../cloudflare/bindings.js";
3
+ import type { Bound as CloudflareBound } from "../cloudflare/bound.js";
4
+ import { isWorkerStub } from "../cloudflare/worker-stub.js";
5
+ import { isWorker } from "../cloudflare/worker.js";
6
+ import { env } from "../env.js";
7
+ import { ResourceFQN, ResourceScope, type Resource } from "../resource.js";
8
+ import { isRuntime } from "./global.js";
9
+
10
+ /**
11
+ * Get a Resource's Binding from the Environment.
12
+ */
13
+ export function getBinding<T extends Resource>(resource: T): Promise<Bound<T>> {
14
+ return env[getBindKey(resource)] as Promise<Bound<T>>;
15
+ }
16
+
17
+ export function tryGetBinding<T extends Resource>(
18
+ resource: T,
19
+ ): Promise<Bound<T>> | undefined {
20
+ if (isRuntime) {
21
+ return getBinding(resource);
22
+ }
23
+ return undefined;
24
+ }
25
+
26
+ /**
27
+ * Compute a unique key for where to store a Resource's Binding.
28
+ */
29
+ export function getBindKey(resource: Resource): string {
30
+ if (isWorker(resource) || isWorkerStub(resource)) {
31
+ return `worker:${resource.name}`;
32
+ }
33
+ const fqn = resource[ResourceFQN];
34
+ const scope = resource[ResourceScope];
35
+ const prefix = `${scope.appName}/${scope.stage}`;
36
+ const key = fqn.slice(prefix.length + 1).replace(/[^a-zA-Z0-9-_]/g, "_");
37
+ return key;
38
+ }
39
+
40
+ export type Bound<T> = T extends CloudflareBinding ? CloudflareBound<T> : T;
41
+
42
+ /**
43
+ * Create a lazy binding of a Resource to an environment that exposes the Resource's methods
44
+ * throw a Proxy that delays initialization of the binding until the Resource's methods are accessed.
45
+ *
46
+ * This allows us to run the same code during build time and runtime.
47
+ */
48
+ export async function bind<T extends Resource>(
49
+ resource: T | Promise<T>,
50
+ options?: {
51
+ reify?: (value: T, key: string) => Promise<Bound<T>>;
52
+ /** @default true */
53
+ bindThis?: boolean;
54
+ },
55
+ ): Promise<Bound<T>> {
56
+ if (isPromise(resource)) {
57
+ return resource.then((r) => bind(r, options)) as Promise<Bound<T>>;
58
+ }
59
+ let _runtime: [Bound<T>] | undefined;
60
+ const runtime = async (): Promise<Bound<T>> =>
61
+ (_runtime ??= [
62
+ await (options?.reify
63
+ ? options.reify(resource, getBindKey(resource))
64
+ : getBinding(resource)),
65
+ ])[0];
66
+
67
+ return new Proxy(() => {}, {
68
+ get: (target: any, prop: string) => {
69
+ if (prop in target) {
70
+ return (resource as T)[prop as keyof T];
71
+ } else if (prop === "then" || prop === "catch" || prop === "finally") {
72
+ return target[prop];
73
+ }
74
+ return async (...args: any[]) => {
75
+ const rt: Bound<T> = await runtime();
76
+ if (rt === undefined) {
77
+ throw new Error(`Resource ${resource[ResourceFQN]} is not bound`);
78
+ }
79
+ const method = rt[prop as keyof Bound<T>];
80
+ if (typeof method !== "function") {
81
+ throw new Error(
82
+ `Method ${prop} on '${resource[ResourceFQN]}' is not a function`,
83
+ );
84
+ }
85
+ if (options?.bindThis !== false) {
86
+ return method.bind(rt)(...args);
87
+ }
88
+ return method(...args);
89
+ };
90
+ },
91
+ // apply: (target, thisArg, argArray) => {
92
+ // return target(thisArg, ...argArray);
93
+ // },
94
+ }) as T & Bound<T>;
95
+ }
@@ -0,0 +1,10 @@
1
+ import type { SerializedScope } from "../serde.js";
2
+
3
+ declare global {
4
+ const __ALCHEMY_WORKER_NAME__: string;
5
+ const __ALCHEMY_RUNTIME__: true;
6
+ const __ALCHEMY_SERIALIZED_SCOPE__: SerializedScope;
7
+ }
8
+
9
+ // __ALCHEMY_SERIALIZED_SCOPE__ is injected by esbuild when bundling a Worker
10
+ export const isRuntime = typeof __ALCHEMY_RUNTIME__ !== "undefined";