alchemy 2.0.0-beta.65 → 2.0.0-beta.67

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 (959) hide show
  1. package/bin/exec.js +578 -224
  2. package/bin/exec.js.map +1 -1
  3. package/lib/AWS/ApiGateway/common.d.ts.map +1 -1
  4. package/lib/AWS/ApiGateway/common.js +8 -1
  5. package/lib/AWS/ApiGateway/common.js.map +1 -1
  6. package/lib/AWS/Bedrock/LanguageModel.d.ts +208 -0
  7. package/lib/AWS/Bedrock/LanguageModel.d.ts.map +1 -0
  8. package/lib/AWS/Bedrock/LanguageModel.js +508 -0
  9. package/lib/AWS/Bedrock/LanguageModel.js.map +1 -0
  10. package/lib/AWS/Bedrock/LanguageModelHttp.d.ts +10 -0
  11. package/lib/AWS/Bedrock/LanguageModelHttp.d.ts.map +1 -0
  12. package/lib/AWS/Bedrock/LanguageModelHttp.js +26 -0
  13. package/lib/AWS/Bedrock/LanguageModelHttp.js.map +1 -0
  14. package/lib/AWS/Bedrock/index.d.ts +2 -0
  15. package/lib/AWS/Bedrock/index.d.ts.map +1 -1
  16. package/lib/AWS/Bedrock/index.js +2 -0
  17. package/lib/AWS/Bedrock/index.js.map +1 -1
  18. package/lib/AWS/CloudFront/Distribution.d.ts +24 -0
  19. package/lib/AWS/CloudFront/Distribution.d.ts.map +1 -1
  20. package/lib/AWS/CloudFront/Distribution.js +89 -4
  21. package/lib/AWS/CloudFront/Distribution.js.map +1 -1
  22. package/lib/AWS/CostExplorer/AnomalyMonitor.d.ts +1 -1
  23. package/lib/AWS/CostExplorer/AnomalyMonitor.d.ts.map +1 -1
  24. package/lib/AWS/CostExplorer/AnomalySubscription.d.ts +1 -1
  25. package/lib/AWS/CostExplorer/AnomalySubscription.d.ts.map +1 -1
  26. package/lib/AWS/CostExplorer/BindingHttp.d.ts +3 -3
  27. package/lib/AWS/CostExplorer/BindingHttp.d.ts.map +1 -1
  28. package/lib/AWS/CostExplorer/CostCategory.d.ts +1 -1
  29. package/lib/AWS/CostExplorer/CostCategory.d.ts.map +1 -1
  30. package/lib/AWS/CostExplorer/GetAnomaliesHttp.d.ts +1 -1
  31. package/lib/AWS/CostExplorer/GetAnomaliesHttp.d.ts.map +1 -1
  32. package/lib/AWS/CostExplorer/GetApproximateUsageRecordsHttp.d.ts +1 -1
  33. package/lib/AWS/CostExplorer/GetApproximateUsageRecordsHttp.d.ts.map +1 -1
  34. package/lib/AWS/CostExplorer/GetCommitmentPurchaseAnalysisHttp.d.ts +1 -1
  35. package/lib/AWS/CostExplorer/GetCommitmentPurchaseAnalysisHttp.d.ts.map +1 -1
  36. package/lib/AWS/CostExplorer/GetCostAndUsageComparisonsHttp.d.ts +1 -1
  37. package/lib/AWS/CostExplorer/GetCostAndUsageComparisonsHttp.d.ts.map +1 -1
  38. package/lib/AWS/CostExplorer/GetCostAndUsageHttp.d.ts +1 -1
  39. package/lib/AWS/CostExplorer/GetCostAndUsageHttp.d.ts.map +1 -1
  40. package/lib/AWS/CostExplorer/GetCostAndUsageWithResourcesHttp.d.ts +1 -1
  41. package/lib/AWS/CostExplorer/GetCostAndUsageWithResourcesHttp.d.ts.map +1 -1
  42. package/lib/AWS/CostExplorer/GetCostCategoriesHttp.d.ts +1 -1
  43. package/lib/AWS/CostExplorer/GetCostCategoriesHttp.d.ts.map +1 -1
  44. package/lib/AWS/CostExplorer/GetCostComparisonDriversHttp.d.ts +1 -1
  45. package/lib/AWS/CostExplorer/GetCostComparisonDriversHttp.d.ts.map +1 -1
  46. package/lib/AWS/CostExplorer/GetCostForecastHttp.d.ts +1 -1
  47. package/lib/AWS/CostExplorer/GetCostForecastHttp.d.ts.map +1 -1
  48. package/lib/AWS/CostExplorer/GetDimensionValuesHttp.d.ts +1 -1
  49. package/lib/AWS/CostExplorer/GetDimensionValuesHttp.d.ts.map +1 -1
  50. package/lib/AWS/CostExplorer/GetReservationCoverageHttp.d.ts +1 -1
  51. package/lib/AWS/CostExplorer/GetReservationCoverageHttp.d.ts.map +1 -1
  52. package/lib/AWS/CostExplorer/GetReservationPurchaseRecommendationHttp.d.ts +1 -1
  53. package/lib/AWS/CostExplorer/GetReservationPurchaseRecommendationHttp.d.ts.map +1 -1
  54. package/lib/AWS/CostExplorer/GetReservationUtilizationHttp.d.ts +1 -1
  55. package/lib/AWS/CostExplorer/GetReservationUtilizationHttp.d.ts.map +1 -1
  56. package/lib/AWS/CostExplorer/GetRightsizingRecommendationHttp.d.ts +1 -1
  57. package/lib/AWS/CostExplorer/GetRightsizingRecommendationHttp.d.ts.map +1 -1
  58. package/lib/AWS/CostExplorer/GetSavingsPlanPurchaseRecommendationDetailsHttp.d.ts +1 -1
  59. package/lib/AWS/CostExplorer/GetSavingsPlanPurchaseRecommendationDetailsHttp.d.ts.map +1 -1
  60. package/lib/AWS/CostExplorer/GetSavingsPlansCoverageHttp.d.ts +1 -1
  61. package/lib/AWS/CostExplorer/GetSavingsPlansCoverageHttp.d.ts.map +1 -1
  62. package/lib/AWS/CostExplorer/GetSavingsPlansPurchaseRecommendationHttp.d.ts +1 -1
  63. package/lib/AWS/CostExplorer/GetSavingsPlansPurchaseRecommendationHttp.d.ts.map +1 -1
  64. package/lib/AWS/CostExplorer/GetSavingsPlansUtilizationDetailsHttp.d.ts +1 -1
  65. package/lib/AWS/CostExplorer/GetSavingsPlansUtilizationDetailsHttp.d.ts.map +1 -1
  66. package/lib/AWS/CostExplorer/GetSavingsPlansUtilizationHttp.d.ts +1 -1
  67. package/lib/AWS/CostExplorer/GetSavingsPlansUtilizationHttp.d.ts.map +1 -1
  68. package/lib/AWS/CostExplorer/GetTagsHttp.d.ts +1 -1
  69. package/lib/AWS/CostExplorer/GetTagsHttp.d.ts.map +1 -1
  70. package/lib/AWS/CostExplorer/GetUsageForecastHttp.d.ts +1 -1
  71. package/lib/AWS/CostExplorer/GetUsageForecastHttp.d.ts.map +1 -1
  72. package/lib/AWS/CostExplorer/ListCommitmentPurchaseAnalysesHttp.d.ts +1 -1
  73. package/lib/AWS/CostExplorer/ListCommitmentPurchaseAnalysesHttp.d.ts.map +1 -1
  74. package/lib/AWS/CostExplorer/ListCostAllocationTagBackfillHistoryHttp.d.ts +1 -1
  75. package/lib/AWS/CostExplorer/ListCostAllocationTagBackfillHistoryHttp.d.ts.map +1 -1
  76. package/lib/AWS/CostExplorer/ListCostAllocationTagsHttp.d.ts +1 -1
  77. package/lib/AWS/CostExplorer/ListCostAllocationTagsHttp.d.ts.map +1 -1
  78. package/lib/AWS/CostExplorer/ListCostCategoryResourceAssociationsHttp.d.ts +1 -1
  79. package/lib/AWS/CostExplorer/ListCostCategoryResourceAssociationsHttp.d.ts.map +1 -1
  80. package/lib/AWS/CostExplorer/ListSavingsPlansPurchaseRecommendationGenerationHttp.d.ts +1 -1
  81. package/lib/AWS/CostExplorer/ListSavingsPlansPurchaseRecommendationGenerationHttp.d.ts.map +1 -1
  82. package/lib/AWS/CostExplorer/ProvideAnomalyFeedbackHttp.d.ts +1 -1
  83. package/lib/AWS/CostExplorer/ProvideAnomalyFeedbackHttp.d.ts.map +1 -1
  84. package/lib/AWS/CostExplorer/StartCommitmentPurchaseAnalysisHttp.d.ts +1 -1
  85. package/lib/AWS/CostExplorer/StartCommitmentPurchaseAnalysisHttp.d.ts.map +1 -1
  86. package/lib/AWS/CostExplorer/StartCostAllocationTagBackfillHttp.d.ts +1 -1
  87. package/lib/AWS/CostExplorer/StartCostAllocationTagBackfillHttp.d.ts.map +1 -1
  88. package/lib/AWS/CostExplorer/StartSavingsPlansPurchaseRecommendationGenerationHttp.d.ts +1 -1
  89. package/lib/AWS/CostExplorer/StartSavingsPlansPurchaseRecommendationGenerationHttp.d.ts.map +1 -1
  90. package/lib/AWS/CostExplorer/UpdateCostAllocationTagsStatusHttp.d.ts +1 -1
  91. package/lib/AWS/CostExplorer/UpdateCostAllocationTagsStatusHttp.d.ts.map +1 -1
  92. package/lib/AWS/CostExplorer/common.d.ts +5 -3
  93. package/lib/AWS/CostExplorer/common.d.ts.map +1 -1
  94. package/lib/AWS/CostExplorer/common.js +16 -1
  95. package/lib/AWS/CostExplorer/common.js.map +1 -1
  96. package/lib/AWS/DataSync/Task.d.ts.map +1 -1
  97. package/lib/AWS/DataSync/Task.js +16 -2
  98. package/lib/AWS/DataSync/Task.js.map +1 -1
  99. package/lib/AWS/EC2/Vpc.d.ts.map +1 -1
  100. package/lib/AWS/EC2/Vpc.js +15 -2
  101. package/lib/AWS/EC2/Vpc.js.map +1 -1
  102. package/lib/AWS/EC2/hosted.d.ts.map +1 -1
  103. package/lib/AWS/EC2/hosted.js +10 -2
  104. package/lib/AWS/EC2/hosted.js.map +1 -1
  105. package/lib/AWS/ECR/Image.d.ts +132 -13
  106. package/lib/AWS/ECR/Image.d.ts.map +1 -1
  107. package/lib/AWS/ECR/ImageSource.d.ts.map +1 -1
  108. package/lib/AWS/ECR/ImageSource.js +10 -2
  109. package/lib/AWS/ECR/ImageSource.js.map +1 -1
  110. package/lib/AWS/ECR/Repository.d.ts +2 -0
  111. package/lib/AWS/ECR/Repository.d.ts.map +1 -1
  112. package/lib/AWS/ECR/Repository.js +28 -3
  113. package/lib/AWS/ECR/Repository.js.map +1 -1
  114. package/lib/AWS/ECS/Service.d.ts +27 -1
  115. package/lib/AWS/ECS/Service.d.ts.map +1 -1
  116. package/lib/AWS/ECS/Service.js +184 -22
  117. package/lib/AWS/ECS/Service.js.map +1 -1
  118. package/lib/AWS/ECS/Task.d.ts +32 -8
  119. package/lib/AWS/ECS/Task.d.ts.map +1 -1
  120. package/lib/AWS/ECS/Task.js +62 -29
  121. package/lib/AWS/ECS/Task.js.map +1 -1
  122. package/lib/AWS/EKS/Deployment.d.ts.map +1 -1
  123. package/lib/AWS/EKS/Deployment.js +10 -2
  124. package/lib/AWS/EKS/Deployment.js.map +1 -1
  125. package/lib/AWS/EKS/Job.d.ts.map +1 -1
  126. package/lib/AWS/EKS/Job.js +10 -2
  127. package/lib/AWS/EKS/Job.js.map +1 -1
  128. package/lib/AWS/Lambda/Function.d.ts +15 -0
  129. package/lib/AWS/Lambda/Function.d.ts.map +1 -1
  130. package/lib/AWS/Lambda/Function.js +67 -29
  131. package/lib/AWS/Lambda/Function.js.map +1 -1
  132. package/lib/AWS/Lambda/HttpServer.d.ts.map +1 -1
  133. package/lib/AWS/Lambda/HttpServer.js +7 -1
  134. package/lib/AWS/Lambda/HttpServer.js.map +1 -1
  135. package/lib/AWS/Lambda/LayerVersion.d.ts +176 -0
  136. package/lib/AWS/Lambda/LayerVersion.d.ts.map +1 -0
  137. package/lib/AWS/Lambda/LayerVersion.js +288 -0
  138. package/lib/AWS/Lambda/LayerVersion.js.map +1 -0
  139. package/lib/AWS/Lambda/MicrovmBundle.d.ts.map +1 -1
  140. package/lib/AWS/Lambda/MicrovmBundle.js +10 -2
  141. package/lib/AWS/Lambda/MicrovmBundle.js.map +1 -1
  142. package/lib/AWS/Lambda/index.d.ts +1 -0
  143. package/lib/AWS/Lambda/index.d.ts.map +1 -1
  144. package/lib/AWS/Lambda/index.js +1 -0
  145. package/lib/AWS/Lambda/index.js.map +1 -1
  146. package/lib/AWS/Providers.d.ts.map +1 -1
  147. package/lib/AWS/Providers.js +6 -1
  148. package/lib/AWS/Providers.js.map +1 -1
  149. package/lib/AWS/SES/ActiveReceiptRuleSet.d.ts +40 -0
  150. package/lib/AWS/SES/ActiveReceiptRuleSet.d.ts.map +1 -0
  151. package/lib/AWS/SES/ActiveReceiptRuleSet.js +58 -0
  152. package/lib/AWS/SES/ActiveReceiptRuleSet.js.map +1 -0
  153. package/lib/AWS/SES/ReceiptFilter.d.ts +67 -0
  154. package/lib/AWS/SES/ReceiptFilter.d.ts.map +1 -0
  155. package/lib/AWS/SES/ReceiptFilter.js +92 -0
  156. package/lib/AWS/SES/ReceiptFilter.js.map +1 -0
  157. package/lib/AWS/SES/ReceiptRule.d.ts +133 -0
  158. package/lib/AWS/SES/ReceiptRule.d.ts.map +1 -0
  159. package/lib/AWS/SES/ReceiptRule.js +178 -0
  160. package/lib/AWS/SES/ReceiptRule.js.map +1 -0
  161. package/lib/AWS/SES/ReceiptRuleSet.d.ts +55 -0
  162. package/lib/AWS/SES/ReceiptRuleSet.d.ts.map +1 -0
  163. package/lib/AWS/SES/ReceiptRuleSet.js +112 -0
  164. package/lib/AWS/SES/ReceiptRuleSet.js.map +1 -0
  165. package/lib/AWS/SES/SendBounce.d.ts +37 -0
  166. package/lib/AWS/SES/SendBounce.d.ts.map +1 -0
  167. package/lib/AWS/SES/SendBounce.js +3 -0
  168. package/lib/AWS/SES/SendBounce.js.map +1 -0
  169. package/lib/AWS/SES/SendBounceHttp.d.ts +4 -0
  170. package/lib/AWS/SES/SendBounceHttp.d.ts.map +1 -0
  171. package/lib/AWS/SES/SendBounceHttp.js +10 -0
  172. package/lib/AWS/SES/SendBounceHttp.js.map +1 -0
  173. package/lib/AWS/SES/index.d.ts +6 -0
  174. package/lib/AWS/SES/index.d.ts.map +1 -1
  175. package/lib/AWS/SES/index.js +6 -0
  176. package/lib/AWS/SES/index.js.map +1 -1
  177. package/lib/AWS/StateStore/State.d.ts +11 -0
  178. package/lib/AWS/StateStore/State.d.ts.map +1 -1
  179. package/lib/AWS/StateStore/State.js +117 -38
  180. package/lib/AWS/StateStore/State.js.map +1 -1
  181. package/lib/Apply.d.ts +37 -1
  182. package/lib/Apply.d.ts.map +1 -1
  183. package/lib/Apply.js +270 -194
  184. package/lib/Apply.js.map +1 -1
  185. package/lib/Axiom/Telemetry.d.ts +66 -0
  186. package/lib/Axiom/Telemetry.d.ts.map +1 -0
  187. package/lib/Axiom/Telemetry.js +69 -0
  188. package/lib/Axiom/Telemetry.js.map +1 -0
  189. package/lib/Axiom/index.d.ts +1 -0
  190. package/lib/Axiom/index.d.ts.map +1 -1
  191. package/lib/Axiom/index.js +1 -0
  192. package/lib/Axiom/index.js.map +1 -1
  193. package/lib/Bundle/Bundle.d.ts +1 -1
  194. package/lib/Bundle/Bundle.d.ts.map +1 -1
  195. package/lib/Bundle/Bundle.js +14 -6
  196. package/lib/Bundle/Bundle.js.map +1 -1
  197. package/lib/Bundle/BundleAnalyzerPlugin.d.ts +1 -1
  198. package/lib/Bundle/BundleAnalyzerPlugin.d.ts.map +1 -1
  199. package/lib/Bundle/BundleAnalyzerPlugin.js +10 -5
  200. package/lib/Bundle/BundleAnalyzerPlugin.js.map +1 -1
  201. package/lib/Bundle/PurePlugin.d.ts +1 -1
  202. package/lib/Bundle/PurePlugin.d.ts.map +1 -1
  203. package/lib/Bundle/PurePlugin.js +15 -7
  204. package/lib/Bundle/PurePlugin.js.map +1 -1
  205. package/lib/Cli/checkVersion.d.ts +11 -5
  206. package/lib/Cli/checkVersion.d.ts.map +1 -1
  207. package/lib/Cli/checkVersion.js +73 -12
  208. package/lib/Cli/checkVersion.js.map +1 -1
  209. package/lib/Cli/commands/_shared.d.ts.map +1 -1
  210. package/lib/Cli/commands/_shared.js +2 -1
  211. package/lib/Cli/commands/_shared.js.map +1 -1
  212. package/lib/Cli/commands/cloudflare.d.ts +1 -1
  213. package/lib/Cli/commands/deploy.d.ts.map +1 -1
  214. package/lib/Cli/commands/deploy.js +3 -11
  215. package/lib/Cli/commands/deploy.js.map +1 -1
  216. package/lib/Cli/commands/logs.d.ts.map +1 -1
  217. package/lib/Cli/commands/logs.js +3 -1
  218. package/lib/Cli/commands/logs.js.map +1 -1
  219. package/lib/Cli/commands/tail.d.ts.map +1 -1
  220. package/lib/Cli/commands/tail.js +3 -1
  221. package/lib/Cli/commands/tail.js.map +1 -1
  222. package/lib/Cli/main.d.ts.map +1 -1
  223. package/lib/Cli/main.js +5 -4
  224. package/lib/Cli/main.js.map +1 -1
  225. package/lib/Cloudflare/AI/Search.d.ts +4 -15
  226. package/lib/Cloudflare/AI/Search.d.ts.map +1 -1
  227. package/lib/Cloudflare/AI/Search.js +4 -6
  228. package/lib/Cloudflare/AI/Search.js.map +1 -1
  229. package/lib/Cloudflare/AI/SearchInstance.d.ts +7 -26
  230. package/lib/Cloudflare/AI/SearchInstance.d.ts.map +1 -1
  231. package/lib/Cloudflare/AI/SearchInstance.js +7 -26
  232. package/lib/Cloudflare/AI/SearchInstance.js.map +1 -1
  233. package/lib/Cloudflare/ApiToken/AccountApiToken.d.ts +3 -0
  234. package/lib/Cloudflare/ApiToken/AccountApiToken.d.ts.map +1 -1
  235. package/lib/Cloudflare/ApiToken/AccountApiToken.js +3 -0
  236. package/lib/Cloudflare/ApiToken/AccountApiToken.js.map +1 -1
  237. package/lib/Cloudflare/Auth/AuthProvider.d.ts +2 -1
  238. package/lib/Cloudflare/Auth/AuthProvider.d.ts.map +1 -1
  239. package/lib/Cloudflare/Auth/AuthProvider.js +8 -3
  240. package/lib/Cloudflare/Auth/AuthProvider.js.map +1 -1
  241. package/lib/Cloudflare/Auth/OAuthClient.d.ts +5 -0
  242. package/lib/Cloudflare/Auth/OAuthClient.d.ts.map +1 -1
  243. package/lib/Cloudflare/Auth/OAuthClient.js +50 -4
  244. package/lib/Cloudflare/Auth/OAuthClient.js.map +1 -1
  245. package/lib/Cloudflare/Containers/Container.d.ts +81 -3
  246. package/lib/Cloudflare/Containers/Container.d.ts.map +1 -1
  247. package/lib/Cloudflare/Containers/Container.js +70 -0
  248. package/lib/Cloudflare/Containers/Container.js.map +1 -1
  249. package/lib/Cloudflare/Containers/ContainerApplication.d.ts +22 -1
  250. package/lib/Cloudflare/Containers/ContainerApplication.d.ts.map +1 -1
  251. package/lib/Cloudflare/Containers/ContainerApplication.js +4 -1
  252. package/lib/Cloudflare/Containers/ContainerApplication.js.map +1 -1
  253. package/lib/Cloudflare/Containers/ContainerBundle.d.ts.map +1 -1
  254. package/lib/Cloudflare/Containers/ContainerBundle.js +10 -2
  255. package/lib/Cloudflare/Containers/ContainerBundle.js.map +1 -1
  256. package/lib/Cloudflare/Containers/ContainerProvider.d.ts.map +1 -1
  257. package/lib/Cloudflare/Containers/ContainerProvider.js +43 -0
  258. package/lib/Cloudflare/Containers/ContainerProvider.js.map +1 -1
  259. package/lib/Cloudflare/Credentials.d.ts +21 -1
  260. package/lib/Cloudflare/Credentials.d.ts.map +1 -1
  261. package/lib/Cloudflare/Credentials.js +52 -9
  262. package/lib/Cloudflare/Credentials.js.map +1 -1
  263. package/lib/Cloudflare/D1/ApplyMigrations.d.ts +30 -5
  264. package/lib/Cloudflare/D1/ApplyMigrations.d.ts.map +1 -1
  265. package/lib/Cloudflare/D1/ApplyMigrations.js +36 -26
  266. package/lib/Cloudflare/D1/ApplyMigrations.js.map +1 -1
  267. package/lib/Cloudflare/D1/Database.d.ts +18 -1
  268. package/lib/Cloudflare/D1/Database.d.ts.map +1 -1
  269. package/lib/Cloudflare/D1/Database.js +134 -2
  270. package/lib/Cloudflare/D1/Database.js.map +1 -1
  271. package/lib/Cloudflare/D1/LocalD1Gateway.d.ts +39 -0
  272. package/lib/Cloudflare/D1/LocalD1Gateway.d.ts.map +1 -0
  273. package/lib/Cloudflare/D1/LocalD1Gateway.js +100 -0
  274. package/lib/Cloudflare/D1/LocalD1Gateway.js.map +1 -0
  275. package/lib/Cloudflare/D1/QueryDatabaseHttpClient.d.ts +31 -0
  276. package/lib/Cloudflare/D1/QueryDatabaseHttpClient.d.ts.map +1 -1
  277. package/lib/Cloudflare/D1/QueryDatabaseHttpClient.js +13 -6
  278. package/lib/Cloudflare/D1/QueryDatabaseHttpClient.js.map +1 -1
  279. package/lib/Cloudflare/D1/QueryDatabaseLocal.d.ts.map +1 -1
  280. package/lib/Cloudflare/D1/QueryDatabaseLocal.js +21 -2
  281. package/lib/Cloudflare/D1/QueryDatabaseLocal.js.map +1 -1
  282. package/lib/Cloudflare/DNS/Record.d.ts +3 -1
  283. package/lib/Cloudflare/DNS/Record.d.ts.map +1 -1
  284. package/lib/Cloudflare/DNS/Record.js +23 -4
  285. package/lib/Cloudflare/DNS/Record.js.map +1 -1
  286. package/lib/Cloudflare/Email/Address.d.ts.map +1 -1
  287. package/lib/Cloudflare/Email/Address.js +15 -1
  288. package/lib/Cloudflare/Email/Address.js.map +1 -1
  289. package/lib/Cloudflare/Email/SendBinding.d.ts.map +1 -1
  290. package/lib/Cloudflare/Email/SendBinding.js +1 -0
  291. package/lib/Cloudflare/Email/SendBinding.js.map +1 -1
  292. package/lib/Cloudflare/Email/SendEmail.d.ts +12 -0
  293. package/lib/Cloudflare/Email/SendEmail.d.ts.map +1 -1
  294. package/lib/Cloudflare/Email/SendEmail.js +1 -0
  295. package/lib/Cloudflare/Email/SendEmail.js.map +1 -1
  296. package/lib/Cloudflare/Flagship/App.d.ts.map +1 -1
  297. package/lib/Cloudflare/Flagship/App.js +8 -3
  298. package/lib/Cloudflare/Flagship/App.js.map +1 -1
  299. package/lib/Cloudflare/KV/LocalKVGateway.d.ts +15 -0
  300. package/lib/Cloudflare/KV/LocalKVGateway.d.ts.map +1 -0
  301. package/lib/Cloudflare/KV/LocalKVGateway.js +64 -0
  302. package/lib/Cloudflare/KV/LocalKVGateway.js.map +1 -0
  303. package/lib/Cloudflare/KV/Namespace.d.ts +9 -1
  304. package/lib/Cloudflare/KV/Namespace.d.ts.map +1 -1
  305. package/lib/Cloudflare/KV/Namespace.js +45 -1
  306. package/lib/Cloudflare/KV/Namespace.js.map +1 -1
  307. package/lib/Cloudflare/KV/NamespaceLocal.d.ts +16 -5
  308. package/lib/Cloudflare/KV/NamespaceLocal.d.ts.map +1 -1
  309. package/lib/Cloudflare/KV/NamespaceLocal.js +21 -4
  310. package/lib/Cloudflare/KV/NamespaceLocal.js.map +1 -1
  311. package/lib/Cloudflare/KV/ReadNamespaceLocal.d.ts.map +1 -1
  312. package/lib/Cloudflare/KV/ReadNamespaceLocal.js +5 -1
  313. package/lib/Cloudflare/KV/ReadNamespaceLocal.js.map +1 -1
  314. package/lib/Cloudflare/KV/ReadWriteNamespaceLocal.d.ts.map +1 -1
  315. package/lib/Cloudflare/KV/ReadWriteNamespaceLocal.js +5 -1
  316. package/lib/Cloudflare/KV/ReadWriteNamespaceLocal.js.map +1 -1
  317. package/lib/Cloudflare/KV/WriteNamespaceLocal.d.ts.map +1 -1
  318. package/lib/Cloudflare/KV/WriteNamespaceLocal.js +5 -1
  319. package/lib/Cloudflare/KV/WriteNamespaceLocal.js.map +1 -1
  320. package/lib/Cloudflare/LocalGateway.d.ts +25 -0
  321. package/lib/Cloudflare/LocalGateway.d.ts.map +1 -0
  322. package/lib/Cloudflare/LocalGateway.js +70 -0
  323. package/lib/Cloudflare/LocalGateway.js.map +1 -0
  324. package/lib/Cloudflare/LocalRuntime.d.ts +14 -1
  325. package/lib/Cloudflare/LocalRuntime.d.ts.map +1 -1
  326. package/lib/Cloudflare/LocalRuntime.js +16 -1
  327. package/lib/Cloudflare/LocalRuntime.js.map +1 -1
  328. package/lib/Cloudflare/Logs.d.ts.map +1 -1
  329. package/lib/Cloudflare/Logs.js +18 -6
  330. package/lib/Cloudflare/Logs.js.map +1 -1
  331. package/lib/Cloudflare/Providers.d.ts +1 -1
  332. package/lib/Cloudflare/Providers.d.ts.map +1 -1
  333. package/lib/Cloudflare/Providers.js +6 -2
  334. package/lib/Cloudflare/Providers.js.map +1 -1
  335. package/lib/Cloudflare/Queues/Consumer.d.ts +16 -3
  336. package/lib/Cloudflare/Queues/Consumer.d.ts.map +1 -1
  337. package/lib/Cloudflare/Queues/Consumer.js +51 -3
  338. package/lib/Cloudflare/Queues/Consumer.js.map +1 -1
  339. package/lib/Cloudflare/Queues/Queue.d.ts +4 -3
  340. package/lib/Cloudflare/Queues/Queue.d.ts.map +1 -1
  341. package/lib/Cloudflare/Queues/Queue.js +7 -17
  342. package/lib/Cloudflare/Queues/Queue.js.map +1 -1
  343. package/lib/Cloudflare/Queues/QueueBinding.d.ts.map +1 -1
  344. package/lib/Cloudflare/Queues/QueueBinding.js +19 -0
  345. package/lib/Cloudflare/Queues/QueueBinding.js.map +1 -1
  346. package/lib/Cloudflare/Queues/QueueShim.d.ts +55 -0
  347. package/lib/Cloudflare/Queues/QueueShim.d.ts.map +1 -0
  348. package/lib/Cloudflare/Queues/QueueShim.js +177 -0
  349. package/lib/Cloudflare/Queues/QueueShim.js.map +1 -0
  350. package/lib/Cloudflare/R2/Bucket.d.ts +14 -1
  351. package/lib/Cloudflare/R2/Bucket.d.ts.map +1 -1
  352. package/lib/Cloudflare/R2/Bucket.js +53 -1
  353. package/lib/Cloudflare/R2/Bucket.js.map +1 -1
  354. package/lib/Cloudflare/R2/BucketBinding.d.ts +10 -0
  355. package/lib/Cloudflare/R2/BucketBinding.d.ts.map +1 -1
  356. package/lib/Cloudflare/R2/BucketBinding.js +14 -3
  357. package/lib/Cloudflare/R2/BucketBinding.js.map +1 -1
  358. package/lib/Cloudflare/R2/BucketLocal.d.ts +13 -6
  359. package/lib/Cloudflare/R2/BucketLocal.d.ts.map +1 -1
  360. package/lib/Cloudflare/R2/BucketLocal.js +19 -6
  361. package/lib/Cloudflare/R2/BucketLocal.js.map +1 -1
  362. package/lib/Cloudflare/R2/LocalR2Gateway.d.ts +15 -0
  363. package/lib/Cloudflare/R2/LocalR2Gateway.d.ts.map +1 -0
  364. package/lib/Cloudflare/R2/LocalR2Gateway.js +65 -0
  365. package/lib/Cloudflare/R2/LocalR2Gateway.js.map +1 -0
  366. package/lib/Cloudflare/R2/ReadBucketLocal.d.ts.map +1 -1
  367. package/lib/Cloudflare/R2/ReadBucketLocal.js +5 -1
  368. package/lib/Cloudflare/R2/ReadBucketLocal.js.map +1 -1
  369. package/lib/Cloudflare/R2/ReadWriteBucketLocal.d.ts.map +1 -1
  370. package/lib/Cloudflare/R2/ReadWriteBucketLocal.js +5 -1
  371. package/lib/Cloudflare/R2/ReadWriteBucketLocal.js.map +1 -1
  372. package/lib/Cloudflare/R2/WriteBucketLocal.d.ts.map +1 -1
  373. package/lib/Cloudflare/R2/WriteBucketLocal.js +5 -1
  374. package/lib/Cloudflare/R2/WriteBucketLocal.js.map +1 -1
  375. package/lib/Cloudflare/Ruleset/AccountEntrypoint.d.ts.map +1 -1
  376. package/lib/Cloudflare/Ruleset/AccountEntrypoint.js +5 -1
  377. package/lib/Cloudflare/Ruleset/AccountEntrypoint.js.map +1 -1
  378. package/lib/Cloudflare/Ruleset/Ruleset.d.ts.map +1 -1
  379. package/lib/Cloudflare/Ruleset/Ruleset.js +19 -6
  380. package/lib/Cloudflare/Ruleset/Ruleset.js.map +1 -1
  381. package/lib/Cloudflare/Rum/Site.js +10 -2
  382. package/lib/Cloudflare/Rum/Site.js.map +1 -1
  383. package/lib/Cloudflare/StateStore/Api.d.ts +31 -2
  384. package/lib/Cloudflare/StateStore/Api.js +1 -1
  385. package/lib/Cloudflare/StateStore/Api.js.map +1 -1
  386. package/lib/Cloudflare/StateStore/State.d.ts +1 -1
  387. package/lib/Cloudflare/StateStore/State.d.ts.map +1 -1
  388. package/lib/Cloudflare/Tunnel/Tunnel.d.ts.map +1 -1
  389. package/lib/Cloudflare/Tunnel/Tunnel.js +20 -1
  390. package/lib/Cloudflare/Tunnel/Tunnel.js.map +1 -1
  391. package/lib/Cloudflare/Website/StaticSite.d.ts +34 -7
  392. package/lib/Cloudflare/Website/StaticSite.d.ts.map +1 -1
  393. package/lib/Cloudflare/Website/StaticSite.js +108 -24
  394. package/lib/Cloudflare/Website/StaticSite.js.map +1 -1
  395. package/lib/Cloudflare/Website/Vite.d.ts +33 -19
  396. package/lib/Cloudflare/Website/Vite.d.ts.map +1 -1
  397. package/lib/Cloudflare/Website/Vite.js +33 -19
  398. package/lib/Cloudflare/Website/Vite.js.map +1 -1
  399. package/lib/Cloudflare/Workers/Compatibility.d.ts.map +1 -1
  400. package/lib/Cloudflare/Workers/Compatibility.js +26 -7
  401. package/lib/Cloudflare/Workers/Compatibility.js.map +1 -1
  402. package/lib/Cloudflare/Workers/DurableObject.d.ts +22 -0
  403. package/lib/Cloudflare/Workers/DurableObject.d.ts.map +1 -1
  404. package/lib/Cloudflare/Workers/DurableObject.js +22 -0
  405. package/lib/Cloudflare/Workers/DurableObject.js.map +1 -1
  406. package/lib/Cloudflare/Workers/DurableObjectBridge.d.ts.map +1 -1
  407. package/lib/Cloudflare/Workers/DurableObjectBridge.js +20 -5
  408. package/lib/Cloudflare/Workers/DurableObjectBridge.js.map +1 -1
  409. package/lib/Cloudflare/Workers/InferEnv.d.ts +4 -2
  410. package/lib/Cloudflare/Workers/InferEnv.d.ts.map +1 -1
  411. package/lib/Cloudflare/Workers/LocalWorkerProvider.d.ts +7 -3
  412. package/lib/Cloudflare/Workers/LocalWorkerProvider.d.ts.map +1 -1
  413. package/lib/Cloudflare/Workers/LocalWorkerProvider.js +483 -298
  414. package/lib/Cloudflare/Workers/LocalWorkerProvider.js.map +1 -1
  415. package/lib/Cloudflare/Workers/Worker.d.ts +612 -13
  416. package/lib/Cloudflare/Workers/Worker.d.ts.map +1 -1
  417. package/lib/Cloudflare/Workers/Worker.js +222 -1
  418. package/lib/Cloudflare/Workers/Worker.js.map +1 -1
  419. package/lib/Cloudflare/Workers/WorkerAsyncBindings.d.ts +13 -1
  420. package/lib/Cloudflare/Workers/WorkerAsyncBindings.d.ts.map +1 -1
  421. package/lib/Cloudflare/Workers/WorkerAsyncBindings.js +171 -21
  422. package/lib/Cloudflare/Workers/WorkerAsyncBindings.js.map +1 -1
  423. package/lib/Cloudflare/Workers/WorkerBinding.d.ts +130 -28
  424. package/lib/Cloudflare/Workers/WorkerBinding.d.ts.map +1 -1
  425. package/lib/Cloudflare/Workers/WorkerBinding.js.map +1 -1
  426. package/lib/Cloudflare/Workers/WorkerBridge.d.ts +6 -2
  427. package/lib/Cloudflare/Workers/WorkerBridge.d.ts.map +1 -1
  428. package/lib/Cloudflare/Workers/WorkerBridge.js +18 -2
  429. package/lib/Cloudflare/Workers/WorkerBridge.js.map +1 -1
  430. package/lib/Cloudflare/Workers/WorkerBundle.d.ts.map +1 -1
  431. package/lib/Cloudflare/Workers/WorkerBundle.js +4 -1
  432. package/lib/Cloudflare/Workers/WorkerBundle.js.map +1 -1
  433. package/lib/Cloudflare/Workers/WorkerProvider.d.ts +186 -11
  434. package/lib/Cloudflare/Workers/WorkerProvider.d.ts.map +1 -1
  435. package/lib/Cloudflare/Workers/WorkerProvider.js +1765 -236
  436. package/lib/Cloudflare/Workers/WorkerProvider.js.map +1 -1
  437. package/lib/Cloudflare/Workflows/WorkflowBridge.d.ts +7 -1
  438. package/lib/Cloudflare/Workflows/WorkflowBridge.d.ts.map +1 -1
  439. package/lib/Cloudflare/Workflows/WorkflowBridge.js +14 -4
  440. package/lib/Cloudflare/Workflows/WorkflowBridge.js.map +1 -1
  441. package/lib/Command/Build.d.ts +2 -2
  442. package/lib/Command/Build.d.ts.map +1 -1
  443. package/lib/Command/Build.js +4 -7
  444. package/lib/Command/Build.js.map +1 -1
  445. package/lib/Command/Command.d.ts +34 -4
  446. package/lib/Command/Command.d.ts.map +1 -1
  447. package/lib/Command/Command.js +125 -30
  448. package/lib/Command/Command.js.map +1 -1
  449. package/lib/Command/Dev.d.ts +2 -2
  450. package/lib/Command/Dev.d.ts.map +1 -1
  451. package/lib/Command/Dev.js +51 -73
  452. package/lib/Command/Dev.js.map +1 -1
  453. package/lib/Command/Exec.d.ts +11 -2
  454. package/lib/Command/Exec.d.ts.map +1 -1
  455. package/lib/Command/Exec.js +9 -0
  456. package/lib/Command/Exec.js.map +1 -1
  457. package/lib/Command/Memo.d.ts +9 -1
  458. package/lib/Command/Memo.d.ts.map +1 -1
  459. package/lib/Command/Memo.js +14 -2
  460. package/lib/Command/Memo.js.map +1 -1
  461. package/lib/Command/Providers.d.ts +1 -1
  462. package/lib/Command/Providers.d.ts.map +1 -1
  463. package/lib/Command/Redaction.d.ts +10 -0
  464. package/lib/Command/Redaction.d.ts.map +1 -0
  465. package/lib/Command/Redaction.js +119 -0
  466. package/lib/Command/Redaction.js.map +1 -0
  467. package/lib/Deploy.d.ts +2 -1
  468. package/lib/Deploy.d.ts.map +1 -1
  469. package/lib/Destroy.d.ts +2 -1
  470. package/lib/Destroy.d.ts.map +1 -1
  471. package/lib/Destroy.js +1 -9
  472. package/lib/Destroy.js.map +1 -1
  473. package/lib/Docker/Container.d.ts +15 -1
  474. package/lib/Docker/Container.d.ts.map +1 -1
  475. package/lib/Docker/Container.js +34 -11
  476. package/lib/Docker/Container.js.map +1 -1
  477. package/lib/Docker/Context.d.ts +84 -0
  478. package/lib/Docker/Context.d.ts.map +1 -0
  479. package/lib/Docker/Context.js +145 -0
  480. package/lib/Docker/Context.js.map +1 -0
  481. package/lib/Docker/Docker.d.ts +190 -14
  482. package/lib/Docker/Docker.d.ts.map +1 -1
  483. package/lib/Docker/Docker.js +149 -28
  484. package/lib/Docker/Docker.js.map +1 -1
  485. package/lib/Docker/Image.d.ts +12 -0
  486. package/lib/Docker/Image.d.ts.map +1 -1
  487. package/lib/Docker/Image.js +24 -7
  488. package/lib/Docker/Image.js.map +1 -1
  489. package/lib/Docker/Network.d.ts +7 -0
  490. package/lib/Docker/Network.d.ts.map +1 -1
  491. package/lib/Docker/Network.js +16 -7
  492. package/lib/Docker/Network.js.map +1 -1
  493. package/lib/Docker/Providers.d.ts +1 -1
  494. package/lib/Docker/Providers.d.ts.map +1 -1
  495. package/lib/Docker/Providers.js +13 -1
  496. package/lib/Docker/Providers.js.map +1 -1
  497. package/lib/Docker/RemoteImage.d.ts +12 -0
  498. package/lib/Docker/RemoteImage.d.ts.map +1 -1
  499. package/lib/Docker/RemoteImage.js +22 -8
  500. package/lib/Docker/RemoteImage.js.map +1 -1
  501. package/lib/Docker/Service.d.ts +445 -0
  502. package/lib/Docker/Service.d.ts.map +1 -0
  503. package/lib/Docker/Service.js +578 -0
  504. package/lib/Docker/Service.js.map +1 -0
  505. package/lib/Docker/ServiceImage.d.ts +78 -0
  506. package/lib/Docker/ServiceImage.d.ts.map +1 -0
  507. package/lib/Docker/ServiceImage.js +232 -0
  508. package/lib/Docker/ServiceImage.js.map +1 -0
  509. package/lib/Docker/Swarm.d.ts +117 -0
  510. package/lib/Docker/Swarm.d.ts.map +1 -0
  511. package/lib/Docker/Swarm.js +149 -0
  512. package/lib/Docker/Swarm.js.map +1 -0
  513. package/lib/Docker/Volume.d.ts +11 -0
  514. package/lib/Docker/Volume.d.ts.map +1 -1
  515. package/lib/Docker/Volume.js +21 -6
  516. package/lib/Docker/Volume.js.map +1 -1
  517. package/lib/Docker/index.d.ts +3 -0
  518. package/lib/Docker/index.d.ts.map +1 -1
  519. package/lib/Docker/index.js +3 -0
  520. package/lib/Docker/index.js.map +1 -1
  521. package/lib/Http.d.ts +8 -1
  522. package/lib/Http.d.ts.map +1 -1
  523. package/lib/Http.js +7 -2
  524. package/lib/Http.js.map +1 -1
  525. package/lib/Local/LocalProvider.d.ts +182 -0
  526. package/lib/Local/LocalProvider.d.ts.map +1 -0
  527. package/lib/Local/LocalProvider.js +226 -0
  528. package/lib/Local/LocalProvider.js.map +1 -0
  529. package/lib/Local/ProviderLayer.d.ts +43 -2
  530. package/lib/Local/ProviderLayer.d.ts.map +1 -1
  531. package/lib/Local/ProviderLayer.js +80 -2
  532. package/lib/Local/ProviderLayer.js.map +1 -1
  533. package/lib/Local/RpcProvider.d.ts +7 -0
  534. package/lib/Local/RpcProvider.d.ts.map +1 -1
  535. package/lib/Local/RpcProvider.js +8 -3
  536. package/lib/Local/RpcProvider.js.map +1 -1
  537. package/lib/Local/RpcProviderProxy.d.ts.map +1 -1
  538. package/lib/Local/RpcProviderProxy.js +3 -0
  539. package/lib/Local/RpcProviderProxy.js.map +1 -1
  540. package/lib/Local/RpcServer.d.ts +8 -1
  541. package/lib/Local/RpcServer.d.ts.map +1 -1
  542. package/lib/Local/RpcServer.js +4 -1
  543. package/lib/Local/RpcServer.js.map +1 -1
  544. package/lib/Plan.d.ts +34 -0
  545. package/lib/Plan.d.ts.map +1 -1
  546. package/lib/Plan.js +127 -40
  547. package/lib/Plan.js.map +1 -1
  548. package/lib/Planetscale/AuthProvider.d.ts.map +1 -1
  549. package/lib/Planetscale/AuthProvider.js +6 -2
  550. package/lib/Planetscale/AuthProvider.js.map +1 -1
  551. package/lib/Planetscale/Branch.d.ts.map +1 -1
  552. package/lib/Planetscale/Branch.js +36 -6
  553. package/lib/Planetscale/Branch.js.map +1 -1
  554. package/lib/Planetscale/MySQL/MySQLDatabase.d.ts.map +1 -1
  555. package/lib/Planetscale/MySQL/MySQLDatabase.js +31 -6
  556. package/lib/Planetscale/MySQL/MySQLDatabase.js.map +1 -1
  557. package/lib/Planetscale/OAuthClient.d.ts +7 -1
  558. package/lib/Planetscale/OAuthClient.d.ts.map +1 -1
  559. package/lib/Planetscale/OAuthClient.js +51 -4
  560. package/lib/Planetscale/OAuthClient.js.map +1 -1
  561. package/lib/Planetscale/Postgres/PostgresDatabase.d.ts.map +1 -1
  562. package/lib/Planetscale/Postgres/PostgresDatabase.js +30 -5
  563. package/lib/Planetscale/Postgres/PostgresDatabase.js.map +1 -1
  564. package/lib/Platform.d.ts.map +1 -1
  565. package/lib/Platform.js +25 -14
  566. package/lib/Platform.js.map +1 -1
  567. package/lib/Prisma/App.d.ts +93 -0
  568. package/lib/Prisma/App.d.ts.map +1 -0
  569. package/lib/Prisma/App.js +251 -0
  570. package/lib/Prisma/App.js.map +1 -0
  571. package/lib/Prisma/AuthProvider.d.ts +28 -0
  572. package/lib/Prisma/AuthProvider.d.ts.map +1 -0
  573. package/lib/Prisma/AuthProvider.js +131 -0
  574. package/lib/Prisma/AuthProvider.js.map +1 -0
  575. package/lib/Prisma/Branch.d.ts +96 -0
  576. package/lib/Prisma/Branch.d.ts.map +1 -0
  577. package/lib/Prisma/Branch.js +236 -0
  578. package/lib/Prisma/Branch.js.map +1 -0
  579. package/lib/Prisma/Client.d.ts +178 -0
  580. package/lib/Prisma/Client.d.ts.map +1 -0
  581. package/lib/Prisma/Client.js +562 -0
  582. package/lib/Prisma/Client.js.map +1 -0
  583. package/lib/Prisma/Compute.d.ts +585 -0
  584. package/lib/Prisma/Compute.d.ts.map +1 -0
  585. package/lib/Prisma/Compute.js +1545 -0
  586. package/lib/Prisma/Compute.js.map +1 -0
  587. package/lib/Prisma/ComputeArchive.d.ts +63 -0
  588. package/lib/Prisma/ComputeArchive.d.ts.map +1 -0
  589. package/lib/Prisma/ComputeArchive.js +227 -0
  590. package/lib/Prisma/ComputeArchive.js.map +1 -0
  591. package/lib/Prisma/ComputeBuild.d.ts +106 -0
  592. package/lib/Prisma/ComputeBuild.d.ts.map +1 -0
  593. package/lib/Prisma/ComputeBuild.js +987 -0
  594. package/lib/Prisma/ComputeBuild.js.map +1 -0
  595. package/lib/Prisma/ComputeLifecycle.d.ts +84 -0
  596. package/lib/Prisma/ComputeLifecycle.d.ts.map +1 -0
  597. package/lib/Prisma/ComputeLifecycle.js +186 -0
  598. package/lib/Prisma/ComputeLifecycle.js.map +1 -0
  599. package/lib/Prisma/Connect.d.ts +122 -0
  600. package/lib/Prisma/Connect.d.ts.map +1 -0
  601. package/lib/Prisma/Connect.js +187 -0
  602. package/lib/Prisma/Connect.js.map +1 -0
  603. package/lib/Prisma/Connection.d.ts +219 -0
  604. package/lib/Prisma/Connection.d.ts.map +1 -0
  605. package/lib/Prisma/Connection.js +360 -0
  606. package/lib/Prisma/Connection.js.map +1 -0
  607. package/lib/Prisma/CustomDomain.d.ts +91 -0
  608. package/lib/Prisma/CustomDomain.d.ts.map +1 -0
  609. package/lib/Prisma/CustomDomain.js +184 -0
  610. package/lib/Prisma/CustomDomain.js.map +1 -0
  611. package/lib/Prisma/Database.d.ts +222 -0
  612. package/lib/Prisma/Database.d.ts.map +1 -0
  613. package/lib/Prisma/Database.js +418 -0
  614. package/lib/Prisma/Database.js.map +1 -0
  615. package/lib/Prisma/Deployment.d.ts +141 -0
  616. package/lib/Prisma/Deployment.d.ts.map +1 -0
  617. package/lib/Prisma/Deployment.js +353 -0
  618. package/lib/Prisma/Deployment.js.map +1 -0
  619. package/lib/Prisma/EnvironmentVariable.d.ts +105 -0
  620. package/lib/Prisma/EnvironmentVariable.d.ts.map +1 -0
  621. package/lib/Prisma/EnvironmentVariable.js +229 -0
  622. package/lib/Prisma/EnvironmentVariable.js.map +1 -0
  623. package/lib/Prisma/Internal/AppIdentity.d.ts +10 -0
  624. package/lib/Prisma/Internal/AppIdentity.d.ts.map +1 -0
  625. package/lib/Prisma/Internal/AppIdentity.js +6 -0
  626. package/lib/Prisma/Internal/AppIdentity.js.map +1 -0
  627. package/lib/Prisma/Internal/AppPromotion.d.ts +19 -0
  628. package/lib/Prisma/Internal/AppPromotion.d.ts.map +1 -0
  629. package/lib/Prisma/Internal/AppPromotion.js +107 -0
  630. package/lib/Prisma/Internal/AppPromotion.js.map +1 -0
  631. package/lib/Prisma/Internal/ArchivePlatform.d.ts +42 -0
  632. package/lib/Prisma/Internal/ArchivePlatform.d.ts.map +1 -0
  633. package/lib/Prisma/Internal/ArchivePlatform.js +214 -0
  634. package/lib/Prisma/Internal/ArchivePlatform.js.map +1 -0
  635. package/lib/Prisma/Internal/ArtifactFile.d.ts +58 -0
  636. package/lib/Prisma/Internal/ArtifactFile.d.ts.map +1 -0
  637. package/lib/Prisma/Internal/ArtifactFile.js +134 -0
  638. package/lib/Prisma/Internal/ArtifactFile.js.map +1 -0
  639. package/lib/Prisma/Internal/ArtifactUpload.d.ts +5 -0
  640. package/lib/Prisma/Internal/ArtifactUpload.d.ts.map +1 -0
  641. package/lib/Prisma/Internal/ArtifactUpload.js +51 -0
  642. package/lib/Prisma/Internal/ArtifactUpload.js.map +1 -0
  643. package/lib/Prisma/Internal/BundlePaths.d.ts +4 -0
  644. package/lib/Prisma/Internal/BundlePaths.d.ts.map +1 -0
  645. package/lib/Prisma/Internal/BundlePaths.js +16 -0
  646. package/lib/Prisma/Internal/BundlePaths.js.map +1 -0
  647. package/lib/Prisma/Internal/CleanupFailure.d.ts +8 -0
  648. package/lib/Prisma/Internal/CleanupFailure.d.ts.map +1 -0
  649. package/lib/Prisma/Internal/CleanupFailure.js +8 -0
  650. package/lib/Prisma/Internal/CleanupFailure.js.map +1 -0
  651. package/lib/Prisma/Internal/DatabaseSecrets.d.ts +35 -0
  652. package/lib/Prisma/Internal/DatabaseSecrets.d.ts.map +1 -0
  653. package/lib/Prisma/Internal/DatabaseSecrets.js +85 -0
  654. package/lib/Prisma/Internal/DatabaseSecrets.js.map +1 -0
  655. package/lib/Prisma/Internal/DeploymentActions.d.ts +5 -0
  656. package/lib/Prisma/Internal/DeploymentActions.d.ts.map +1 -0
  657. package/lib/Prisma/Internal/DeploymentActions.js +16 -0
  658. package/lib/Prisma/Internal/DeploymentActions.js.map +1 -0
  659. package/lib/Prisma/Internal/DeploymentIdentity.d.ts +8 -0
  660. package/lib/Prisma/Internal/DeploymentIdentity.d.ts.map +1 -0
  661. package/lib/Prisma/Internal/DeploymentIdentity.js +12 -0
  662. package/lib/Prisma/Internal/DeploymentIdentity.js.map +1 -0
  663. package/lib/Prisma/Internal/DeploymentObserve.d.ts +3 -0
  664. package/lib/Prisma/Internal/DeploymentObserve.d.ts.map +1 -0
  665. package/lib/Prisma/Internal/DeploymentObserve.js +2 -0
  666. package/lib/Prisma/Internal/DeploymentObserve.js.map +1 -0
  667. package/lib/Prisma/Internal/EnvName.d.ts +7 -0
  668. package/lib/Prisma/Internal/EnvName.d.ts.map +1 -0
  669. package/lib/Prisma/Internal/EnvName.js +23 -0
  670. package/lib/Prisma/Internal/EnvName.js.map +1 -0
  671. package/lib/Prisma/Internal/HttpClient.d.ts +21 -0
  672. package/lib/Prisma/Internal/HttpClient.d.ts.map +1 -0
  673. package/lib/Prisma/Internal/HttpClient.js +23 -0
  674. package/lib/Prisma/Internal/HttpClient.js.map +1 -0
  675. package/lib/Prisma/Operations.d.ts +143 -0
  676. package/lib/Prisma/Operations.d.ts.map +1 -0
  677. package/lib/Prisma/Operations.js +75 -0
  678. package/lib/Prisma/Operations.js.map +1 -0
  679. package/lib/Prisma/Postgres.d.ts +25 -0
  680. package/lib/Prisma/Postgres.d.ts.map +1 -0
  681. package/lib/Prisma/Postgres.js +24 -0
  682. package/lib/Prisma/Postgres.js.map +1 -0
  683. package/lib/Prisma/PostgresOrigin.d.ts +31 -0
  684. package/lib/Prisma/PostgresOrigin.d.ts.map +1 -0
  685. package/lib/Prisma/PostgresOrigin.js +30 -0
  686. package/lib/Prisma/PostgresOrigin.js.map +1 -0
  687. package/lib/Prisma/PrismaDevDatabase.d.ts +25 -0
  688. package/lib/Prisma/PrismaDevDatabase.d.ts.map +1 -0
  689. package/lib/Prisma/PrismaDevDatabase.js +280 -0
  690. package/lib/Prisma/PrismaDevDatabase.js.map +1 -0
  691. package/lib/Prisma/PrismaEnvironment.d.ts +14 -0
  692. package/lib/Prisma/PrismaEnvironment.d.ts.map +1 -0
  693. package/lib/Prisma/PrismaEnvironment.js +50 -0
  694. package/lib/Prisma/PrismaEnvironment.js.map +1 -0
  695. package/lib/Prisma/PrismaLogs.d.ts +42 -0
  696. package/lib/Prisma/PrismaLogs.d.ts.map +1 -0
  697. package/lib/Prisma/PrismaLogs.js +318 -0
  698. package/lib/Prisma/PrismaLogs.js.map +1 -0
  699. package/lib/Prisma/Project.d.ts +123 -0
  700. package/lib/Prisma/Project.d.ts.map +1 -0
  701. package/lib/Prisma/Project.js +366 -0
  702. package/lib/Prisma/Project.js.map +1 -0
  703. package/lib/Prisma/Providers.d.ts +63 -0
  704. package/lib/Prisma/Providers.d.ts.map +1 -0
  705. package/lib/Prisma/Providers.js +306 -0
  706. package/lib/Prisma/Providers.js.map +1 -0
  707. package/lib/Prisma/Refs.d.ts +19 -0
  708. package/lib/Prisma/Refs.d.ts.map +1 -0
  709. package/lib/Prisma/Refs.js +25 -0
  710. package/lib/Prisma/Refs.js.map +1 -0
  711. package/lib/Prisma/SourceRepository.d.ts +127 -0
  712. package/lib/Prisma/SourceRepository.d.ts.map +1 -0
  713. package/lib/Prisma/SourceRepository.js +239 -0
  714. package/lib/Prisma/SourceRepository.js.map +1 -0
  715. package/lib/Prisma/Types.d.ts +539 -0
  716. package/lib/Prisma/Types.d.ts.map +1 -0
  717. package/lib/Prisma/Types.js +13 -0
  718. package/lib/Prisma/Types.js.map +1 -0
  719. package/lib/Prisma/index.d.ts +25 -0
  720. package/lib/Prisma/index.d.ts.map +1 -0
  721. package/lib/Prisma/index.js +24 -0
  722. package/lib/Prisma/index.js.map +1 -0
  723. package/lib/Provider.d.ts +57 -5
  724. package/lib/Provider.d.ts.map +1 -1
  725. package/lib/Provider.js +54 -30
  726. package/lib/Provider.js.map +1 -1
  727. package/lib/ProviderMode.d.ts +93 -0
  728. package/lib/ProviderMode.d.ts.map +1 -0
  729. package/lib/ProviderMode.js +77 -0
  730. package/lib/ProviderMode.js.map +1 -0
  731. package/lib/Resource.d.ts +8 -0
  732. package/lib/Resource.d.ts.map +1 -1
  733. package/lib/Resource.js +31 -0
  734. package/lib/Resource.js.map +1 -1
  735. package/lib/RuntimeContext.d.ts +7 -0
  736. package/lib/RuntimeContext.d.ts.map +1 -1
  737. package/lib/RuntimeContext.js.map +1 -1
  738. package/lib/Server/Process.d.ts +8 -0
  739. package/lib/Server/Process.d.ts.map +1 -1
  740. package/lib/Server/Process.js +29 -0
  741. package/lib/Server/Process.js.map +1 -1
  742. package/lib/State/InMemoryState.d.ts.map +1 -1
  743. package/lib/State/InMemoryState.js +2 -0
  744. package/lib/State/InMemoryState.js.map +1 -1
  745. package/lib/State/ResourceState.d.ts +18 -0
  746. package/lib/State/ResourceState.d.ts.map +1 -1
  747. package/lib/Sync.d.ts.map +1 -1
  748. package/lib/Sync.js +8 -2
  749. package/lib/Sync.js.map +1 -1
  750. package/lib/Telemetry.d.ts +150 -0
  751. package/lib/Telemetry.d.ts.map +1 -0
  752. package/lib/Telemetry.js +512 -0
  753. package/lib/Telemetry.js.map +1 -0
  754. package/lib/Test/Alchemy.d.ts.map +1 -1
  755. package/lib/Test/Alchemy.js +3 -1
  756. package/lib/Test/Alchemy.js.map +1 -1
  757. package/lib/Test/Core.d.ts +2 -2
  758. package/lib/Test/Core.d.ts.map +1 -1
  759. package/lib/Test/Core.js +1 -8
  760. package/lib/Test/Core.js.map +1 -1
  761. package/lib/Util/Clank.d.ts +11 -6
  762. package/lib/Util/Clank.d.ts.map +1 -1
  763. package/lib/Util/Clank.js +22 -9
  764. package/lib/Util/Clank.js.map +1 -1
  765. package/lib/Util/zip.d.ts +11 -0
  766. package/lib/Util/zip.d.ts.map +1 -1
  767. package/lib/Util/zip.js +30 -0
  768. package/lib/Util/zip.js.map +1 -1
  769. package/lib/index.d.ts +3 -0
  770. package/lib/index.d.ts.map +1 -1
  771. package/lib/index.js +3 -0
  772. package/lib/index.js.map +1 -1
  773. package/package.json +46 -13
  774. package/src/AWS/ApiGateway/common.ts +9 -0
  775. package/src/AWS/Bedrock/LanguageModel.ts +883 -0
  776. package/src/AWS/Bedrock/LanguageModelHttp.ts +36 -0
  777. package/src/AWS/Bedrock/index.ts +2 -0
  778. package/src/AWS/CloudFront/Distribution.ts +116 -6
  779. package/src/AWS/CostExplorer/common.ts +23 -2
  780. package/src/AWS/DataSync/Task.ts +30 -15
  781. package/src/AWS/EC2/Vpc.ts +35 -21
  782. package/src/AWS/EC2/hosted.ts +10 -2
  783. package/src/AWS/ECR/ImageSource.ts +10 -2
  784. package/src/AWS/ECR/Repository.ts +39 -4
  785. package/src/AWS/ECS/Service.ts +322 -22
  786. package/src/AWS/ECS/Task.ts +82 -32
  787. package/src/AWS/EKS/Deployment.ts +10 -2
  788. package/src/AWS/EKS/Job.ts +10 -2
  789. package/src/AWS/Lambda/Function.ts +101 -43
  790. package/src/AWS/Lambda/HttpServer.ts +7 -1
  791. package/src/AWS/Lambda/LayerVersion.ts +490 -0
  792. package/src/AWS/Lambda/MicrovmBundle.ts +10 -2
  793. package/src/AWS/Lambda/index.ts +1 -0
  794. package/src/AWS/Providers.ts +10 -0
  795. package/src/AWS/SES/ActiveReceiptRuleSet.ts +88 -0
  796. package/src/AWS/SES/ReceiptFilter.ts +169 -0
  797. package/src/AWS/SES/ReceiptRule.ts +300 -0
  798. package/src/AWS/SES/ReceiptRuleSet.ts +164 -0
  799. package/src/AWS/SES/SendBounce.ts +44 -0
  800. package/src/AWS/SES/SendBounceHttp.ts +13 -0
  801. package/src/AWS/SES/index.ts +6 -0
  802. package/src/AWS/StateStore/State.ts +159 -42
  803. package/src/Apply.ts +199 -83
  804. package/src/Axiom/Telemetry.ts +119 -0
  805. package/src/Axiom/index.ts +1 -0
  806. package/src/Bundle/Bundle.ts +17 -7
  807. package/src/Bundle/BundleAnalyzerPlugin.ts +9 -4
  808. package/src/Bundle/PurePlugin.ts +19 -9
  809. package/src/Cli/checkVersion.ts +102 -16
  810. package/src/Cli/commands/_shared.ts +2 -0
  811. package/src/Cli/commands/deploy.ts +3 -14
  812. package/src/Cli/commands/logs.ts +6 -1
  813. package/src/Cli/commands/tail.ts +6 -1
  814. package/src/Cli/main.ts +5 -4
  815. package/src/Cloudflare/AI/Search.ts +4 -18
  816. package/src/Cloudflare/AI/SearchInstance.ts +7 -26
  817. package/src/Cloudflare/ApiToken/AccountApiToken.ts +3 -0
  818. package/src/Cloudflare/Auth/AuthProvider.ts +17 -3
  819. package/src/Cloudflare/Auth/OAuthClient.ts +58 -2
  820. package/src/Cloudflare/Containers/Container.ts +92 -3
  821. package/src/Cloudflare/Containers/ContainerApplication.ts +31 -5
  822. package/src/Cloudflare/Containers/ContainerBundle.ts +10 -2
  823. package/src/Cloudflare/Containers/ContainerProvider.ts +62 -0
  824. package/src/Cloudflare/Credentials.ts +69 -9
  825. package/src/Cloudflare/D1/ApplyMigrations.ts +72 -77
  826. package/src/Cloudflare/D1/Database.ts +169 -2
  827. package/src/Cloudflare/D1/LocalD1Gateway.ts +150 -0
  828. package/src/Cloudflare/D1/QueryDatabaseHttpClient.ts +49 -11
  829. package/src/Cloudflare/D1/QueryDatabaseLocal.ts +44 -2
  830. package/src/Cloudflare/DNS/Record.ts +30 -4
  831. package/src/Cloudflare/Email/Address.ts +18 -1
  832. package/src/Cloudflare/Email/SendBinding.ts +1 -0
  833. package/src/Cloudflare/Email/SendEmail.ts +13 -0
  834. package/src/Cloudflare/Flagship/App.ts +18 -6
  835. package/src/Cloudflare/KV/LocalKVGateway.ts +86 -0
  836. package/src/Cloudflare/KV/Namespace.ts +47 -1
  837. package/src/Cloudflare/KV/NamespaceLocal.ts +29 -6
  838. package/src/Cloudflare/KV/ReadNamespaceLocal.ts +5 -1
  839. package/src/Cloudflare/KV/ReadWriteNamespaceLocal.ts +5 -1
  840. package/src/Cloudflare/KV/WriteNamespaceLocal.ts +5 -1
  841. package/src/Cloudflare/LocalGateway.ts +86 -0
  842. package/src/Cloudflare/LocalRuntime.ts +21 -1
  843. package/src/Cloudflare/Logs.ts +58 -28
  844. package/src/Cloudflare/Providers.ts +4 -2
  845. package/src/Cloudflare/Queues/Consumer.ts +70 -2
  846. package/src/Cloudflare/Queues/Queue.ts +7 -16
  847. package/src/Cloudflare/Queues/QueueBinding.ts +21 -0
  848. package/src/Cloudflare/Queues/QueueShim.ts +193 -0
  849. package/src/Cloudflare/R2/Bucket.ts +55 -1
  850. package/src/Cloudflare/R2/BucketBinding.ts +17 -3
  851. package/src/Cloudflare/R2/BucketLocal.ts +25 -8
  852. package/src/Cloudflare/R2/LocalR2Gateway.ts +84 -0
  853. package/src/Cloudflare/R2/ReadBucketLocal.ts +7 -1
  854. package/src/Cloudflare/R2/ReadWriteBucketLocal.ts +7 -1
  855. package/src/Cloudflare/R2/WriteBucketLocal.ts +7 -1
  856. package/src/Cloudflare/Ruleset/AccountEntrypoint.ts +5 -1
  857. package/src/Cloudflare/Ruleset/Ruleset.ts +20 -6
  858. package/src/Cloudflare/Rum/Site.ts +11 -4
  859. package/src/Cloudflare/StateStore/Api.ts +1 -1
  860. package/src/Cloudflare/Tunnel/Tunnel.ts +23 -1
  861. package/src/Cloudflare/Website/StaticSite.ts +117 -28
  862. package/src/Cloudflare/Website/Vite.ts +33 -19
  863. package/src/Cloudflare/Workers/Compatibility.ts +27 -7
  864. package/src/Cloudflare/Workers/DurableObject.ts +22 -0
  865. package/src/Cloudflare/Workers/DurableObjectBridge.ts +29 -10
  866. package/src/Cloudflare/Workers/InferEnv.ts +74 -59
  867. package/src/Cloudflare/Workers/LocalWorkerProvider.ts +619 -401
  868. package/src/Cloudflare/Workers/Worker.ts +676 -28
  869. package/src/Cloudflare/Workers/WorkerAsyncBindings.ts +209 -25
  870. package/src/Cloudflare/Workers/WorkerBinding.ts +67 -3
  871. package/src/Cloudflare/Workers/WorkerBridge.ts +26 -4
  872. package/src/Cloudflare/Workers/WorkerBundle.ts +6 -1
  873. package/src/Cloudflare/Workers/WorkerProvider.ts +2269 -277
  874. package/src/Cloudflare/Workflows/WorkflowBridge.ts +31 -13
  875. package/src/Command/Build.ts +8 -8
  876. package/src/Command/Command.ts +217 -42
  877. package/src/Command/Dev.ts +79 -107
  878. package/src/Command/Exec.ts +11 -2
  879. package/src/Command/Memo.ts +27 -3
  880. package/src/Command/Redaction.ts +181 -0
  881. package/src/Destroy.ts +1 -10
  882. package/src/Docker/Container.ts +55 -15
  883. package/src/Docker/Context.ts +236 -0
  884. package/src/Docker/Docker.ts +393 -43
  885. package/src/Docker/Image.ts +28 -7
  886. package/src/Docker/Network.ts +38 -14
  887. package/src/Docker/Providers.ts +16 -1
  888. package/src/Docker/RemoteImage.ts +23 -7
  889. package/src/Docker/Service.ts +1119 -0
  890. package/src/Docker/ServiceImage.ts +331 -0
  891. package/src/Docker/Swarm.ts +226 -0
  892. package/src/Docker/Volume.ts +25 -6
  893. package/src/Docker/index.ts +3 -0
  894. package/src/Http.ts +15 -2
  895. package/src/Local/LocalProvider.ts +518 -0
  896. package/src/Local/ProviderLayer.ts +113 -11
  897. package/src/Local/RpcProvider.ts +10 -5
  898. package/src/Local/RpcProviderProxy.ts +4 -1
  899. package/src/Local/RpcServer.ts +20 -2
  900. package/src/Plan.ts +182 -54
  901. package/src/Planetscale/AuthProvider.ts +15 -2
  902. package/src/Planetscale/Branch.ts +39 -6
  903. package/src/Planetscale/MySQL/MySQLDatabase.ts +34 -6
  904. package/src/Planetscale/OAuthClient.ts +59 -3
  905. package/src/Planetscale/Postgres/PostgresDatabase.ts +33 -5
  906. package/src/Platform.ts +29 -17
  907. package/src/Prisma/App.ts +433 -0
  908. package/src/Prisma/AuthProvider.ts +260 -0
  909. package/src/Prisma/Branch.ts +417 -0
  910. package/src/Prisma/Client.ts +1337 -0
  911. package/src/Prisma/Compute.ts +2878 -0
  912. package/src/Prisma/ComputeArchive.ts +432 -0
  913. package/src/Prisma/ComputeBuild.ts +1652 -0
  914. package/src/Prisma/ComputeLifecycle.ts +391 -0
  915. package/src/Prisma/Connect.ts +433 -0
  916. package/src/Prisma/Connection.ts +643 -0
  917. package/src/Prisma/CustomDomain.ts +373 -0
  918. package/src/Prisma/Database.ts +850 -0
  919. package/src/Prisma/Deployment.ts +661 -0
  920. package/src/Prisma/EnvironmentVariable.ts +417 -0
  921. package/src/Prisma/Internal/AppIdentity.ts +19 -0
  922. package/src/Prisma/Internal/AppPromotion.ts +172 -0
  923. package/src/Prisma/Internal/ArchivePlatform.ts +320 -0
  924. package/src/Prisma/Internal/ArtifactFile.ts +242 -0
  925. package/src/Prisma/Internal/ArtifactUpload.ts +86 -0
  926. package/src/Prisma/Internal/BundlePaths.ts +28 -0
  927. package/src/Prisma/Internal/CleanupFailure.ts +17 -0
  928. package/src/Prisma/Internal/DatabaseSecrets.ts +175 -0
  929. package/src/Prisma/Internal/DeploymentActions.ts +59 -0
  930. package/src/Prisma/Internal/DeploymentIdentity.ts +25 -0
  931. package/src/Prisma/Internal/DeploymentObserve.ts +6 -0
  932. package/src/Prisma/Internal/EnvName.ts +24 -0
  933. package/src/Prisma/Internal/HttpClient.ts +30 -0
  934. package/src/Prisma/Operations.ts +259 -0
  935. package/src/Prisma/Postgres.ts +25 -0
  936. package/src/Prisma/PostgresOrigin.ts +52 -0
  937. package/src/Prisma/PrismaDevDatabase.ts +395 -0
  938. package/src/Prisma/PrismaEnvironment.ts +89 -0
  939. package/src/Prisma/PrismaLogs.ts +434 -0
  940. package/src/Prisma/Project.ts +687 -0
  941. package/src/Prisma/Providers.ts +471 -0
  942. package/src/Prisma/Refs.ts +69 -0
  943. package/src/Prisma/SourceRepository.ts +455 -0
  944. package/src/Prisma/Types.ts +611 -0
  945. package/src/Prisma/index.ts +24 -0
  946. package/src/Provider.ts +155 -39
  947. package/src/ProviderMode.ts +123 -0
  948. package/src/Resource.ts +46 -0
  949. package/src/RuntimeContext.ts +7 -0
  950. package/src/Server/Process.ts +33 -0
  951. package/src/State/InMemoryState.ts +2 -0
  952. package/src/State/ResourceState.ts +18 -0
  953. package/src/Sync.ts +14 -2
  954. package/src/Telemetry.ts +736 -0
  955. package/src/Test/Alchemy.ts +3 -1
  956. package/src/Test/Core.ts +1 -8
  957. package/src/Util/Clank.ts +37 -11
  958. package/src/Util/zip.ts +39 -0
  959. package/src/index.ts +3 -0
@@ -1,15 +1,13 @@
1
1
  import {
2
2
  Runtime,
3
- RuntimeError,
4
3
  type BindingHook,
5
4
  type BindingServices,
6
5
  type HyperdriveOrigin,
7
6
  type Module,
8
- type Assets as RuntimeAssets,
9
7
  type DurableObjectNamespace as RuntimeDurableObject,
10
8
  type QueueConsumer as RuntimeQueueConsumer,
11
- type Workflow as RuntimeWorkflow,
12
9
  type RuntimeServices,
10
+ type Workflow as RuntimeWorkflow,
13
11
  } from "@distilled.cloud/cloudflare-runtime";
14
12
  import {
15
13
  Ai,
@@ -47,7 +45,7 @@ import * as Cause from "effect/Cause";
47
45
  import * as Effect from "effect/Effect";
48
46
  import * as Equal from "effect/Equal";
49
47
  import * as Exit from "effect/Exit";
50
- import * as Fiber from "effect/Fiber";
48
+ import type * as FileSystem from "effect/FileSystem";
51
49
  import * as MutableHashMap from "effect/MutableHashMap";
52
50
  import * as Option from "effect/Option";
53
51
  import * as Path from "effect/Path";
@@ -57,28 +55,67 @@ import * as Schema from "effect/Schema";
57
55
  import * as Scope from "effect/Scope";
58
56
  import * as Semaphore from "effect/Semaphore";
59
57
  import * as Stream from "effect/Stream";
58
+ import type * as ChildProcessSpawner from "effect/unstable/process/ChildProcessSpawner";
59
+ import * as os from "node:os";
60
60
  import type * as Bundle from "../../Bundle/Bundle.ts";
61
- import { isResolved, stripEffects } from "../../Diff.ts";
62
- import * as RpcProvider from "../../Local/RpcProvider.ts";
63
- import type { ResourceBinding } from "../../Resource.ts";
61
+ import * as LocalProvider from "../../Local/LocalProvider.ts";
64
62
  import { Stack } from "../../Stack.ts";
65
- import { sha256, unwrapRedacted } from "../../Util/index.ts";
63
+ import { unwrapRedacted } from "../../Util/index.ts";
66
64
  import { CloudflareEnvironment } from "../CloudflareEnvironment.ts";
67
- import { LOCAL_ENTRY_URL, LocalRuntimeState } from "../LocalRuntime.ts";
65
+ import {
66
+ isLiveId,
67
+ isLocalId,
68
+ LOCAL_ENTRY_URL,
69
+ LocalRuntimeState,
70
+ } from "../LocalRuntime.ts";
68
71
  import type { WorkerAssetsConfig, WorkerProps } from "../Workers/Worker.ts";
69
72
  import { readAssetsConfigFiles } from "./Assets.ts";
70
73
  import { getCompatibility } from "./Compatibility.ts";
71
74
  import { isPythonMain, watchPythonWorkerBundle } from "./PythonWorkerBundle.ts";
72
- import { Worker } from "./Worker.ts";
75
+ import { isSelfUrl, Worker } from "./Worker.ts";
73
76
  import { getCronBindings } from "./WorkerAsyncBindings.ts";
74
77
  import type { WorkerBinding } from "./WorkerBinding.ts";
75
78
  import { WorkerBundle, type WorkerBundleOptions } from "./WorkerBundle.ts";
76
79
  import { createWorkerName } from "./WorkerName.ts";
77
80
 
78
- type WorkerPropsWithDev = Omit<WorkerProps, "dev"> & {
79
- dev: Extract<WorkerProps["dev"], { mode?: "worker" }>;
81
+ /** Local dev-server options (the worker-mode arm of `WorkerProps["dev"]`). */
82
+ type DevServerOptions = Extract<WorkerProps["dev"], { mode?: "worker" }> & {
83
+ port: number;
80
84
  };
81
85
 
86
+ // Hosts that bind every interface — the dev server is then reachable at
87
+ // `localhost` *and* at each LAN address, like Vite's `--host` output.
88
+ const isWildcardHost = (host: string) =>
89
+ host === "0.0.0.0" || host === "::" || host === "[::]" || host === "*";
90
+
91
+ /**
92
+ * Resolve every URL a local dev server is reachable at, most relevant
93
+ * first. A loopback or explicit host yields just that URL; a wildcard host
94
+ * (`0.0.0.0`, `::`) yields `http://localhost:<port>` followed by one URL
95
+ * per external IPv4 interface (`http://192.168.0.12:<port>`, ...) —
96
+ * mirroring Vite's "Local / Network" dev-server output.
97
+ */
98
+ const resolveLocalUrls = (serverUrl: URL): Effect.Effect<string[]> =>
99
+ Effect.sync(() => {
100
+ const port = serverUrl.port;
101
+ const host = serverUrl.hostname;
102
+ if (!isWildcardHost(host)) {
103
+ return [serverUrl.origin];
104
+ }
105
+ // `os.networkInterfaces()` is a sync, CPU-only syscall with no Effect
106
+ // platform equivalent — wrapped in `Effect.sync` so it participates in
107
+ // the runtime.
108
+ const interfaces = os.networkInterfaces();
109
+ const lanAddresses = Object.values(interfaces)
110
+ .flatMap((addresses) => addresses ?? [])
111
+ .filter((address) => address.family === "IPv4" && !address.internal)
112
+ .map((address) => address.address);
113
+ return [
114
+ `http://localhost:${port}`,
115
+ ...lanAddresses.map((address) => `http://${address}:${port}`),
116
+ ];
117
+ });
118
+
82
119
  export class WorkerValidationError extends Schema.TaggedErrorClass<WorkerValidationError>()(
83
120
  "WorkerValidationError",
84
121
  {
@@ -89,7 +126,7 @@ export class WorkerValidationError extends Schema.TaggedErrorClass<WorkerValidat
89
126
  ) {}
90
127
 
91
128
  export const LocalWorkerProvider = () =>
92
- RpcProvider.effect(
129
+ LocalProvider.make(
93
130
  Worker,
94
131
  LOCAL_ENTRY_URL,
95
132
  Effect.gen(function* () {
@@ -99,10 +136,17 @@ export const LocalWorkerProvider = () =>
99
136
  const path = yield* Path.Path;
100
137
  const localRuntimeState = yield* LocalRuntimeState;
101
138
  const workerProxy = yield* WorkerProxy.WorkerProxy;
139
+ const cloudflareEnv = yield* CloudflareEnvironment;
140
+ const context = yield* Effect.context<RuntimeServices>();
141
+ const rootScope = yield* Effect.scope;
142
+
143
+ // Proxies are deliberately NOT owned by the per-instance scope: they
144
+ // survive restarts so the worker's URL stays stable across rebuilds
145
+ // and config changes. Torn down by `stop` on delete.
102
146
  const proxyInstances = new Map<
103
147
  string,
104
148
  {
105
- serverOptions: WorkerConfig["dev"];
149
+ serverOptions: DevServerOptions;
106
150
  instance: WorkerProxy.WorkerProxyInstance;
107
151
  scope: Scope.Closeable;
108
152
  }
@@ -114,6 +158,28 @@ export const LocalWorkerProvider = () =>
114
158
  localRuntimeState.queueConsumers,
115
159
  )) {
116
160
  if (consumer.scriptName === scriptName) {
161
+ // A LIVE queue (`Alchemy.remote()`) consumed locally: the broker
162
+ // is still local, but it is fed by the runtime's pull loop
163
+ // draining the real queue over the HTTP pull API (the
164
+ // Consumer's local provider attached the `http_pull` consumer
165
+ // and resolved the queue's real name).
166
+ if (isLiveId(consumer.queueId)) {
167
+ if (!consumer.queueName) {
168
+ return yield* Effect.die(
169
+ `Consumer of live queue ${consumer.queueId} is missing its resolved queueName — re-deploy the consumer`,
170
+ );
171
+ }
172
+ consumers.push({
173
+ queueName: consumer.queueName,
174
+ deadLetterQueue: consumer.deadLetterQueue,
175
+ ...consumer.settings,
176
+ pull: {
177
+ queueId: consumer.queueId,
178
+ accountId: consumer.accountId,
179
+ },
180
+ });
181
+ continue;
182
+ }
117
183
  const queue = MutableHashMap.get(
118
184
  localRuntimeState.queues,
119
185
  consumer.queueId,
@@ -134,7 +200,7 @@ export const LocalWorkerProvider = () =>
134
200
 
135
201
  const startProxy = Effect.fn(function* (
136
202
  id: string,
137
- serverOptions: WorkerConfig["dev"],
203
+ serverOptions: DevServerOptions,
138
204
  ) {
139
205
  const scope = yield* Scope.fork(rootScope);
140
206
  const instance = yield* workerProxy
@@ -154,7 +220,7 @@ export const LocalWorkerProvider = () =>
154
220
 
155
221
  const maybeStartProxy = Effect.fn(function* (
156
222
  id: string,
157
- serverOptions: WorkerConfig["dev"],
223
+ serverOptions: DevServerOptions,
158
224
  ) {
159
225
  const existing = proxyInstances.get(id);
160
226
  if (existing) {
@@ -232,181 +298,27 @@ export const LocalWorkerProvider = () =>
232
298
  return modules;
233
299
  });
234
300
 
235
- // Latest successful serve per worker id, so runtime wiring changes
236
- // that arrive AFTER workerd started (e.g. a sibling `Consumer`
237
- // resource registering this script as a queue consumer) can restart
238
- // the instance with the same bundle. `scope` is the parent scope the
239
- // workerd child scope is forked from (the instance scope), NOT the
240
- // caller's ambient scope — restarts are triggered from other
241
- // providers' reconcile fibers whose scopes must not own workerd.
242
- const latestServes = new Map<
243
- string,
244
- {
245
- worker: WorkerConfig;
246
- bundle: Bundle.BundleOutput;
247
- proxy: WorkerProxy.WorkerProxyInstance;
248
- scope: Scope.Scope;
249
- }
250
- >();
251
- // Serializes serves per worker id: a restart triggered by a sibling
252
- // resource may otherwise interleave with a rebuild-triggered serve
253
- // and leak a workerd scope.
254
- const serveLocks = new Map<string, Semaphore.Semaphore>();
255
- const serveLock = (id: string) => {
256
- let lock = serveLocks.get(id);
257
- if (!lock) {
258
- lock = Semaphore.makeUnsafe(1);
259
- serveLocks.set(id, lock);
260
- }
261
- return lock;
262
- };
263
-
264
- const serveWith = (
265
- worker: WorkerConfig,
266
- bundle: Bundle.BundleOutput,
267
- proxy: WorkerProxy.WorkerProxyInstance,
268
- parentScope: Scope.Scope,
269
- ) =>
270
- Semaphore.withPermits(
271
- serveLock(worker.id),
272
- 1,
273
- )(
274
- Effect.gen(function* () {
275
- // Queue-consumer wiring can change while `runtime.start` is in
276
- // flight (a sibling `Consumer` reconcile), before the restart
277
- // hook below exists to pick it up. We hold the serve lock, so a
278
- // restart would deadlock — instead, loop and serve again until
279
- // the wiring is stable across a start.
280
- while (true) {
281
- const previous = workerdScopes.get(worker.id);
282
- if (previous) {
283
- // Both runtimes use the same registry key. Close the old scope first so
284
- // its unregister finalizer cannot delete the replacement registration.
285
- yield* Scope.close(previous, Exit.void);
286
- workerdScopes.delete(worker.id);
287
- }
288
- const queueConsumers = yield* getQueueConsumers(worker.name);
289
- const scope = yield* Scope.fork(parentScope);
290
- const url = yield* runtime
291
- .start({
292
- name: worker.name,
293
- compatibilityDate: worker.compatibility.date,
294
- compatibilityFlags: worker.compatibility.flags,
295
- bindings: worker.workerBindings as never,
296
- hyperdrives: worker.hyperdrives,
297
- durableObjectNamespaces: worker.durableObjectNamespaces,
298
- workflows: worker.workflows,
299
- queueConsumers,
300
- modules: yield* toRuntimeModules(bundle),
301
- assets: yield* toRuntimeAssets(worker.assets),
302
- })
303
- .pipe(Scope.provide(scope));
304
- workerdScopes.set(worker.id, scope);
305
- latestServes.set(worker.id, {
306
- worker,
307
- bundle,
308
- proxy,
309
- scope: parentScope,
310
- });
311
- // Register the restart hook before the re-check below: changes
312
- // landing after the re-check find the hook; changes before it
313
- // are caught by the re-check. Nothing falls in between.
314
- MutableHashMap.set(
315
- localRuntimeState.workerRestarts,
316
- worker.name,
317
- restartWorker(worker.id),
318
- );
319
- const currentConsumers = yield* getQueueConsumers(worker.name);
320
- if (
321
- JSON.stringify(currentConsumers) !==
322
- JSON.stringify(queueConsumers)
323
- ) {
324
- // Wiring changed while workerd was starting — serve again with
325
- // the fresh consumers before exposing the instance.
326
- continue;
327
- }
328
- yield* proxy.set(url);
329
- return url;
330
- }
331
- }),
332
- );
333
-
334
- const serveScoped = Effect.fn(function* (
335
- worker: WorkerConfig,
336
- bundle: Bundle.BundleOutput,
337
- proxy: WorkerProxy.WorkerProxyInstance,
338
- ) {
339
- const parentScope = yield* Effect.scope;
340
- return yield* serveWith(worker, bundle, proxy, parentScope);
341
- });
342
-
343
301
  /**
344
- * Restart a running worker with its latest bundle so start-time
345
- * runtime wiring (queue consumers) is re-read from
346
- * {@link LocalRuntimeState}. No-op if the worker hasn't served yet —
347
- * the pending first serve will already observe the updated state.
302
+ * The restart-relevant, canonically-hashable view of a local Worker's
303
+ * desired state — `LocalProvider`'s `resolveConfig`. Everything here
304
+ * is plain data: binding *descriptors* (not `BindingHook` closures —
305
+ * those are materialized in `start` via {@link toRuntimeBinding}),
306
+ * DO-namespace/hyperdrive/container-image records, bundle options.
307
+ *
308
+ * Queue consumers are deliberately EXCLUDED: `getQueueConsumers`
309
+ * reads `LocalRuntimeState` at serve time and sibling `Consumer`
310
+ * reconciles drive restarts through the `workerRestarts` hook — they
311
+ * are runtime wiring observed at start, not desired-state config.
348
312
  */
349
- const restartWorker = (id: string) =>
350
- Effect.suspend(() => {
351
- const latest = latestServes.get(id);
352
- if (!latest) return Effect.void;
353
- return serveWith(
354
- latest.worker,
355
- latest.bundle,
356
- latest.proxy,
357
- latest.scope,
358
- ).pipe(
359
- Effect.asVoid,
360
- Effect.catchCause((cause) =>
361
- Effect.logWarning(
362
- `[${id}] Failed to restart local worker`,
363
- Cause.squash(cause),
364
- ),
365
- ),
366
- );
367
- });
368
-
369
- // Note: `serveLocks` entries are intentionally retained — an
370
- // in-flight restart may still hold the semaphore when the instance
371
- // is torn down, and a same-id re-create must serialize against it.
372
- const dropServeState = (id: string) => {
373
- const latest = latestServes.get(id);
374
- if (latest) {
375
- MutableHashMap.remove(
376
- localRuntimeState.workerRestarts,
377
- latest.worker.name,
378
- );
379
- latestServes.delete(id);
380
- }
381
- };
382
-
383
- const buildConfig = Effect.fn(function* ({
313
+ const resolveConfig = Effect.fn(function* ({
384
314
  id,
385
- props,
315
+ news,
386
316
  bindings,
387
- }: {
388
- id: string;
389
- props: WorkerPropsWithDev;
390
- bindings: ResourceBinding<Worker["Binding"]>[];
391
- }) {
392
- const { accountId } = yield* yield* CloudflareEnvironment;
317
+ }: LocalProvider.LocalProviderInput<Worker>) {
318
+ const props = news as WorkerProps;
393
319
  const name = yield* createWorkerName(id, props.name);
394
320
  const compatibility = getCompatibility(props);
395
- const workerBindings: BindingHook<BindingServices>[] = [
396
- Text.local("ALCHEMY_PHASE", "runtime"),
397
- Text.local("ALCHEMY_STACK_NAME", stack.name),
398
- Text.local("ALCHEMY_STAGE", stack.stage),
399
- Text.local("ALCHEMY_CLOUDFLARE_ACCOUNT_ID", accountId),
400
- ...Object.entries(props.env ?? {}).map(([key, value]) => {
401
- const unredacted = Redacted.isRedacted(value)
402
- ? Redacted.value(value)
403
- : value;
404
- return typeof unredacted === "string"
405
- ? Text.local(key, unredacted)
406
- : Json.local(key, unredacted);
407
- }),
408
- ...(props.assets || props.vite ? [Assets.local("ASSETS")] : []),
409
- ];
321
+ const bindingDescriptors: WorkerBinding[] = [];
410
322
  const durableObjectNamespaces: Record<
411
323
  string,
412
324
  RuntimeDurableObject & { uniqueKey: string }
@@ -432,12 +344,7 @@ export const LocalWorkerProvider = () =>
432
344
  uniqueKey: namespaceId,
433
345
  sql: true,
434
346
  };
435
- workerBindings.push(
436
- yield* toRuntimeBinding({
437
- ...binding,
438
- namespaceId,
439
- }),
440
- );
347
+ bindingDescriptors.push({ ...binding, namespaceId });
441
348
  } else {
442
349
  if (
443
350
  binding.type === "workflow" &&
@@ -451,7 +358,7 @@ export const LocalWorkerProvider = () =>
451
358
  className: binding.className,
452
359
  };
453
360
  }
454
- workerBindings.push(yield* toRuntimeBinding(binding));
361
+ bindingDescriptors.push(binding);
455
362
  }
456
363
  }
457
364
  if (data.hyperdrives) {
@@ -489,42 +396,350 @@ export const LocalWorkerProvider = () =>
489
396
  }
490
397
  durableObjectNamespaces[className].container = dev;
491
398
  }
399
+ const dev:
400
+ | DevServerOptions
401
+ | { readonly mode: "external"; readonly url?: string } =
402
+ props.dev?.mode === "external"
403
+ ? props.dev
404
+ : {
405
+ ...props.dev,
406
+ mode: "worker" as const,
407
+ // This is the default. Vite and cloudflare-runtime will retry
408
+ // if unavailable, unless `strictPort` is true.
409
+ port: props.dev?.port ?? 1337,
410
+ };
492
411
  return {
493
412
  id,
494
413
  name,
495
414
  compatibility,
496
- workerBindings,
415
+ /** User env (Redacted preserved — the canonical hasher unwraps). */
416
+ env: props.env,
417
+ /**
418
+ * Raw inline module source (mutually exclusive with `main`).
419
+ * Serves as-is without the bundler; part of the hashed config so
420
+ * editing the script restarts the instance.
421
+ */
422
+ script: props.script,
423
+ hasAssets: !!(props.assets || props.vite),
424
+ /**
425
+ * Assets-only Worker (no entry module at all): served locally by
426
+ * a stub that delegates every request to the ASSETS binding.
427
+ */
428
+ assetsOnly:
429
+ props.main === undefined &&
430
+ props.script === undefined &&
431
+ !props.vite &&
432
+ !!props.assets,
433
+ bindingDescriptors,
497
434
  durableObjectNamespaces: Object.values(durableObjectNamespaces),
498
435
  workflows: Object.values(workflows),
499
- viteMain: props.vite?.main,
500
- viteEnvironments: props.vite?.viteEnvironments,
501
436
  hyperdrives,
502
- env: props.env,
437
+ vite: !!props.vite,
438
+ // Relative `vite.main` resolves from the Vite root (see the
439
+ // matching normalization in WorkerProvider's `viteBuild`).
440
+ viteMain: props.vite?.main
441
+ ? path.resolve(props.vite.rootDir ?? process.cwd(), props.vite.main)
442
+ : undefined,
443
+ viteEnvironments: props.vite?.viteEnvironments,
444
+ viteRootDir: props.vite?.rootDir,
503
445
  bundleOptions: {
504
446
  id,
505
447
  main: props.main!,
506
448
  compatibility,
507
449
  entry: props.isExternal
508
- ? { kind: "external" }
509
- : { kind: "effect", exports: props.exports ?? {} },
450
+ ? { kind: "external" as const }
451
+ : {
452
+ kind: "effect" as const,
453
+ exports: props.exports ?? {},
454
+ },
510
455
  stack: { name: stack.name, stage: stack.stage },
511
456
  extraOptions: props.build,
512
457
  } satisfies WorkerBundleOptions,
513
458
  assets: props.assets,
514
- dev: {
515
- ...props.dev,
516
- // This is the default. Vite and cloudflare-runtime will retry if unavailable, unless `strictPort` is true.
517
- port: props.dev?.port ?? 1337,
518
- },
459
+ dev,
460
+ crons: Array.from(
461
+ new Set([...getCronBindings(bindings), ...(props.crons ?? [])]),
462
+ ),
519
463
  };
520
464
  });
521
465
 
522
- type WorkerConfig = Effect.Success<ReturnType<typeof buildConfig>>;
466
+ type WorkerConfig = Effect.Success<ReturnType<typeof resolveConfig>>;
467
+ /** A worker-mode config with its runtime `BindingHook`s materialized. */
468
+ type RunnableWorkerConfig = Omit<WorkerConfig, "dev"> & {
469
+ dev: DevServerOptions;
470
+ workerBindings: BindingHook<BindingServices>[];
471
+ };
472
+
473
+ /**
474
+ * Materialize the plain binding descriptors from {@link resolveConfig}
475
+ * into live cloudflare-runtime `BindingHook`s. This is the non-plain
476
+ * half of the old `buildConfig` — kept out of the hashed config.
477
+ */
478
+ const materializeWorkerBindings = Effect.fn(function* (
479
+ config: WorkerConfig,
480
+ selfUrl: string | undefined,
481
+ ) {
482
+ const { accountId } = yield* cloudflareEnv;
483
+ // Resource-backed env entries (e.g. `env: { KV: namespace }`) are
484
+ // represented by their binding descriptor (same name) — don't ALSO
485
+ // serialize the resolved attributes as a duplicate json binding.
486
+ const descriptorNames = new Set(
487
+ config.bindingDescriptors.map((descriptor) => descriptor.name),
488
+ );
489
+ const workerBindings: BindingHook<BindingServices>[] = [
490
+ Text.local("ALCHEMY_PHASE", "runtime"),
491
+ Text.local("ALCHEMY_WORKER_NAME", config.name),
492
+ Text.local("ALCHEMY_STACK_NAME", stack.name),
493
+ Text.local("ALCHEMY_STAGE", stack.stage),
494
+ Text.local("ALCHEMY_CLOUDFLARE_ACCOUNT_ID", accountId),
495
+ ...Object.entries(config.env ?? {})
496
+ .filter(([key]) => !descriptorNames.has(key))
497
+ .map(([key, value]) => {
498
+ if (isSelfUrl(value)) {
499
+ return Text.local(key, selfUrl!);
500
+ }
501
+ const unredacted = Redacted.isRedacted(value)
502
+ ? Redacted.value(value)
503
+ : value;
504
+ return typeof unredacted === "string"
505
+ ? Text.local(key, unredacted)
506
+ : Json.local(key, unredacted);
507
+ }),
508
+ ...(config.hasAssets ? [Assets.local("ASSETS")] : []),
509
+ ];
510
+ for (const descriptor of config.bindingDescriptors) {
511
+ if (descriptor.type === "self_url") {
512
+ // Lowered here rather than in `toRuntimeBinding` — only this
513
+ // scope knows the worker's own dev-proxy URL.
514
+ workerBindings.push(Text.local(descriptor.name, selfUrl!));
515
+ continue;
516
+ }
517
+ workerBindings.push(yield* toRuntimeBinding(descriptor));
518
+ }
519
+ return workerBindings;
520
+ });
523
521
 
524
- const runWorker = Effect.fn(function* (worker: WorkerConfig) {
522
+ // Latest successful serve per worker id, so runtime wiring changes
523
+ // that arrive AFTER workerd started (e.g. a sibling `Consumer`
524
+ // resource registering this script as a queue consumer) can restart
525
+ // the instance with the same bundle.
526
+ const latestServes = new Map<
527
+ string,
528
+ {
529
+ worker: RunnableWorkerConfig;
530
+ bundle: Bundle.BundleOutput;
531
+ proxy: WorkerProxy.WorkerProxyInstance;
532
+ }
533
+ >();
534
+ // Serializes serves per worker id: a restart triggered by a sibling
535
+ // resource may otherwise interleave with a rebuild-triggered serve
536
+ // and leak a workerd scope.
537
+ const serveLocks = new Map<string, Semaphore.Semaphore>();
538
+ const serveLock = (id: string) => {
539
+ let lock = serveLocks.get(id);
540
+ if (!lock) {
541
+ lock = Semaphore.makeUnsafe(1);
542
+ serveLocks.set(id, lock);
543
+ }
544
+ return lock;
545
+ };
546
+
547
+ const workerdScopes = new Map<string, Scope.Closeable>();
548
+
549
+ // Serve with make-before-break semantics: start the replacement
550
+ // workerd while the previous instance (if any) keeps serving — and
551
+ // stays registered in the dev registry — then cut the proxy over and
552
+ // tear the previous instance down. Cross-script consumers (e.g. a DO
553
+ // bound via `scriptName` from another Worker) therefore never observe
554
+ // a window where the script has no running instance and no registry
555
+ // entry, even when `runtime.start` is slow (container image builds).
556
+ // Both instances use the same registry key; the registry's entry
557
+ // removal is owner-aware, so closing the old scope after the
558
+ // replacement has re-registered cannot delete the replacement's
559
+ // registration.
560
+ //
561
+ // The workerd scope is forked from the provider's `rootScope`, NOT
562
+ // the instance scope: a reconcile that replaces the instance (or a
563
+ // restart triggered from a sibling provider's fiber) tears down the
564
+ // bundle watcher without killing the currently serving workerd — the
565
+ // last good instance keeps serving until the replacement's first
566
+ // serve completes. Ownership is tracked in `workerdScopes`, closed by
567
+ // the next successful serve, by `delete`, or by provider shutdown.
568
+ const serveWith = (
569
+ worker: RunnableWorkerConfig,
570
+ bundle: Bundle.BundleOutput,
571
+ proxy: WorkerProxy.WorkerProxyInstance,
572
+ ) =>
573
+ Semaphore.withPermits(
574
+ serveLock(worker.id),
575
+ 1,
576
+ )(
577
+ // The bookkeeping around `runtime.start` must not be torn in half
578
+ // by an interrupt: once a replacement workerd is up, it must be
579
+ // recorded in `workerdScopes` and the superseded instances must be
580
+ // closed, or one of the workerds would leak until provider
581
+ // shutdown while holding the shared registry key.
582
+ Effect.uninterruptibleMask((restore) =>
583
+ Effect.gen(function* () {
584
+ const previous = workerdScopes.get(worker.id);
585
+ // Instances whose queue-consumer wiring went stale while they
586
+ // were starting; never exposed via the proxy, closed together
587
+ // with `previous` after the cutover below.
588
+ const superseded: Scope.Closeable[] = [];
589
+ let scope!: Scope.Closeable;
590
+ let url!: URL;
591
+ // Queue-consumer wiring can change while `runtime.start` is in
592
+ // flight (a sibling `Consumer` reconcile), before the restart
593
+ // hook below exists to pick it up. We hold the serve lock, so a
594
+ // restart would deadlock — instead, loop and serve again until
595
+ // the wiring is stable across a start.
596
+ while (true) {
597
+ const queueConsumers = yield* getQueueConsumers(worker.name);
598
+ scope = yield* Scope.fork(rootScope);
599
+ url = yield* restore(
600
+ runtime
601
+ .start({
602
+ name: worker.name,
603
+ compatibilityDate: worker.compatibility.date,
604
+ compatibilityFlags: worker.compatibility.flags,
605
+ bindings: worker.workerBindings as never,
606
+ hyperdrives: worker.hyperdrives,
607
+ durableObjectNamespaces: worker.durableObjectNamespaces,
608
+ workflows: worker.workflows,
609
+ queueConsumers,
610
+ // Cache API opt-out (`dev: { cache: false }`) — matches
611
+ // production workers.dev, where the Cache API is a no-op.
612
+ cache: worker.dev.cache,
613
+ // Per-worker request.cf override (`dev: { cf: {...} }`).
614
+ cf: worker.dev.cf,
615
+ modules: yield* toRuntimeModules(bundle),
616
+ assets: yield* toRuntimeAssets(worker.assets),
617
+ })
618
+ .pipe(Scope.provide(scope)),
619
+ ).pipe(
620
+ // The scope hangs off `rootScope`, so a failed or
621
+ // interrupted start must close it here — nothing else owns
622
+ // it yet.
623
+ Effect.onExit((exit) =>
624
+ exit._tag === "Failure"
625
+ ? Scope.close(scope, exit)
626
+ : Effect.void,
627
+ ),
628
+ );
629
+ workerdScopes.set(worker.id, scope);
630
+ latestServes.set(worker.id, { worker, bundle, proxy });
631
+ // Register the restart hook before the re-check below: changes
632
+ // landing after the re-check find the hook; changes before it
633
+ // are caught by the re-check. Nothing falls in between.
634
+ MutableHashMap.set(
635
+ localRuntimeState.workerRestarts,
636
+ worker.name,
637
+ restartWorker(worker.id),
638
+ );
639
+ const currentConsumers = yield* getQueueConsumers(worker.name);
640
+ if (
641
+ JSON.stringify(currentConsumers) !==
642
+ JSON.stringify(queueConsumers)
643
+ ) {
644
+ // Wiring changed while workerd was starting — serve again
645
+ // with the fresh consumers before exposing the instance.
646
+ superseded.push(scope);
647
+ continue;
648
+ }
649
+ break;
650
+ }
651
+ yield* proxy.set(url);
652
+ // Only now tear the replaced instances down: `previous` kept
653
+ // serving — and stayed registered in the dev registry — until
654
+ // the cutover above. The registry's entry removal is
655
+ // owner-aware, so these closes cannot delete the replacement's
656
+ // registration.
657
+ for (const replaced of previous
658
+ ? [...superseded, previous]
659
+ : superseded) {
660
+ yield* Scope.close(replaced, Exit.void).pipe(
661
+ Effect.catchCause((cause) =>
662
+ Effect.logWarning(
663
+ `[${worker.id}] Failed to stop previous local worker instance`,
664
+ Cause.squash(cause),
665
+ ),
666
+ ),
667
+ );
668
+ }
669
+ return url;
670
+ }),
671
+ ),
672
+ );
673
+
674
+ /**
675
+ * Restart a running worker with its latest bundle so start-time
676
+ * runtime wiring (queue consumers) is re-read from
677
+ * {@link LocalRuntimeState}. No-op if the worker hasn't served yet —
678
+ * the pending first serve will already observe the updated state.
679
+ */
680
+ const restartWorker = (id: string) =>
681
+ Effect.suspend(() => {
682
+ const latest = latestServes.get(id);
683
+ if (!latest) return Effect.void;
684
+ return serveWith(latest.worker, latest.bundle, latest.proxy).pipe(
685
+ Effect.asVoid,
686
+ Effect.catchCause((cause) =>
687
+ Effect.logWarning(
688
+ `[${id}] Failed to restart local worker`,
689
+ Cause.squash(cause),
690
+ ),
691
+ ),
692
+ );
693
+ });
694
+
695
+ // Tear down the running workerd for a worker id, if any. Used when the
696
+ // Worker is deleted or handed off to an external dev process —
697
+ // instance replacement does NOT go through this: the previous workerd
698
+ // keeps serving until the replacement's first serve closes it.
699
+ const closeWorkerd = Effect.fn(function* (id: string) {
700
+ const scope = workerdScopes.get(id);
701
+ if (scope) {
702
+ workerdScopes.delete(id);
703
+ yield* Scope.close(scope, Exit.void);
704
+ }
705
+ });
706
+
707
+ // Note: `serveLocks` entries are intentionally retained — an
708
+ // in-flight restart may still hold the semaphore when the instance
709
+ // is torn down, and a same-id re-create must serialize against it.
710
+ const dropServeState = (id: string) => {
711
+ const latest = latestServes.get(id);
712
+ if (latest) {
713
+ MutableHashMap.remove(
714
+ localRuntimeState.workerRestarts,
715
+ latest.worker.name,
716
+ );
717
+ latestServes.delete(id);
718
+ }
719
+ };
720
+
721
+ const runWorker = Effect.fn(function* (worker: RunnableWorkerConfig) {
525
722
  let start = Date.now();
526
723
  let status: "start" | "update" = "start";
527
724
  const proxy = yield* maybeStartProxy(worker.id, worker.dev);
725
+ // Inline `script` workers bypass the bundler entirely — the string
726
+ // IS the module (mirroring the deploy path, which uploads it as a
727
+ // single `main.js`). There is nothing to watch: script changes flow
728
+ // through the hashed config and restart the instance.
729
+ if (worker.script !== undefined) {
730
+ yield* serveWith(
731
+ worker,
732
+ {
733
+ files: [{ path: "main.js", content: worker.script, hash: "" }],
734
+ hash: "",
735
+ },
736
+ proxy,
737
+ );
738
+ yield* Effect.log(
739
+ `[${worker.id}] Started in ${Math.round(Date.now() - start)}ms`,
740
+ );
741
+ return proxy.url;
742
+ }
528
743
  yield* (
529
744
  isPythonMain(worker.bundleOptions.main)
530
745
  ? watchPythonWorkerBundle({
@@ -558,7 +773,7 @@ export const LocalWorkerProvider = () =>
558
773
  : Result.failVoid,
559
774
  ),
560
775
  Stream.mapEffect((bundle) =>
561
- serveScoped(worker, bundle, proxy).pipe(
776
+ serveWith(worker, bundle, proxy).pipe(
562
777
  Effect.exit,
563
778
  Effect.tap((exit) => {
564
779
  if (exit._tag === "Success") {
@@ -582,8 +797,36 @@ export const LocalWorkerProvider = () =>
582
797
  return proxy.url;
583
798
  });
584
799
 
800
+ // Assets-only Worker: there is no entry module to bundle or watch.
801
+ // The local runtime requires a user worker module, so serve a stub
802
+ // that delegates every request to the ASSETS binding — the assets
803
+ // worker applies `htmlHandling` / `notFoundHandling` (including SPA
804
+ // fallback) itself, matching Cloudflare's deployed assets-only
805
+ // behavior.
806
+ const assetsOnlyBundle: Bundle.BundleOutput = {
807
+ files: [
808
+ {
809
+ path: "main.js",
810
+ content:
811
+ "export default { fetch: (request, env) => env.ASSETS.fetch(request) };",
812
+ hash: "assets-only-stub",
813
+ },
814
+ ],
815
+ hash: "assets-only-stub",
816
+ };
817
+
818
+ const runAssetsOnly = Effect.fn(function* (worker: RunnableWorkerConfig) {
819
+ const start = Date.now();
820
+ const proxy = yield* maybeStartProxy(worker.id, worker.dev);
821
+ yield* serveWith(worker, assetsOnlyBundle, proxy);
822
+ yield* Effect.log(
823
+ `[${worker.id}] Started in ${Math.round(Date.now() - start)}ms`,
824
+ );
825
+ return proxy.url;
826
+ });
827
+
585
828
  const runVite = Effect.fn(function* (
586
- worker: WorkerConfig,
829
+ worker: RunnableWorkerConfig,
587
830
  rootDir: string | undefined,
588
831
  ) {
589
832
  const proxy = yield* maybeStartProxy(worker.id, worker.dev);
@@ -616,88 +859,17 @@ export const LocalWorkerProvider = () =>
616
859
  return proxy.url;
617
860
  });
618
861
 
619
- const rootScope = yield* Effect.scope;
620
- const workerdScopes = new Map<string, Scope.Closeable>();
621
-
622
- const context = yield* Effect.context<RuntimeServices>();
623
- const instances = new Map<
624
- string,
625
- {
626
- signature: string;
627
- fiber: Fiber.Fiber<
628
- Worker["Attributes"],
629
- Bundle.BundleError | WorkerValidationError | RuntimeError
630
- >;
631
- scope: Scope.Closeable;
632
- }
633
- >();
862
+ return {
863
+ resolveConfig,
634
864
 
635
- const runInstance = Effect.fn(function* (options: {
636
- id: string;
637
- props: WorkerPropsWithDev;
638
- bindings: ResourceBinding<Worker["Binding"]>[];
639
- }) {
640
- const { accountId } = yield* yield* CloudflareEnvironment;
641
- const { props, bindings } = options;
642
- const config = yield* buildConfig(options);
643
- const url = yield* (
644
- props.vite ? runVite(config, props.vite.rootDir) : runWorker(config)
645
- ).pipe(Effect.map((url) => url.toString()));
646
- return {
647
- workerId: config.name,
648
- workerName: config.name,
649
- namespace: undefined,
650
- logpush: undefined,
651
- url,
652
- tags: [],
653
- durableObjectNamespaces: Object.fromEntries(
654
- config.durableObjectNamespaces.map((namespace) => [
655
- namespace.className,
656
- namespace.uniqueKey,
657
- ]),
658
- ),
659
- domains: [url],
660
- routes: [],
661
- crons: Array.from(
662
- new Set([...getCronBindings(bindings), ...(props.crons ?? [])]),
865
+ // The physical name only survives an update when it isn't changing.
866
+ stables: ({ output, config }) =>
867
+ Effect.succeed(
868
+ output?.workerName === config.name
869
+ ? (["workerName"] as ["workerName"])
870
+ : undefined,
663
871
  ),
664
- accountId,
665
- } satisfies Worker["Attributes"];
666
- });
667
872
 
668
- return {
669
- // Local dev provider: there is no cloud enumeration API. The set of
670
- // locally running Workers is the in-memory `instances` map; each
671
- // instance's fiber resolves to the Worker Attributes once it has
672
- // started, so enumerate that local state.
673
- list: () =>
674
- Effect.forEach(
675
- Array.from(instances.values()),
676
- (instance) => Fiber.join(instance.fiber),
677
- { concurrency: "unbounded" },
678
- ),
679
- diff: Effect.fn(function* ({ id, news: desired, newBindings, output }) {
680
- // Effect-valued `env` entries (tagged Worker classes) never resolve
681
- // at plan time; their identity is carried by the resolved binding
682
- // data. Strip them so the signature-based diff still runs — same
683
- // rationale as the cloud WorkerProvider (#874).
684
- const news = stripEffects(desired);
685
- if (!isResolved(news) || !isResolved(newBindings)) return undefined;
686
- const options = {
687
- id,
688
- props: news,
689
- bindings: newBindings,
690
- };
691
- const signature = yield* structuralSignature(options);
692
- if (instances.get(options.id)?.signature === signature) {
693
- return { action: "noop" };
694
- }
695
- const name = yield* createWorkerName(id, news.name);
696
- return {
697
- action: "update",
698
- stables: output?.workerName === name ? ["workerName"] : undefined,
699
- };
700
- }),
701
873
  precreate: Effect.fn(function* ({ id, news, bindings }) {
702
874
  const name = yield* createWorkerName(id, news.name);
703
875
  const durableObjectNamespaces: Record<string, string> = {};
@@ -712,24 +884,26 @@ export const LocalWorkerProvider = () =>
712
884
  }
713
885
  }
714
886
  }
715
- const { accountId } = yield* yield* CloudflareEnvironment;
716
- const url =
887
+ const { accountId } = yield* cloudflareEnv;
888
+ const urls =
717
889
  news.dev?.mode === "external"
718
890
  ? // news.dev.url may be an unresolved output; avoid trying to resolve it here.
719
- undefined
891
+ []
720
892
  : yield* maybeStartProxy(id, {
721
893
  ...news.dev,
894
+ mode: "worker" as const,
722
895
  port: news.dev?.port ?? 1337,
723
- }).pipe(Effect.map((proxy) => proxy.url.toString()));
896
+ }).pipe(Effect.flatMap((proxy) => resolveLocalUrls(proxy.url)));
724
897
  return {
725
898
  workerId: name,
726
899
  workerName: name,
727
900
  namespace: undefined,
728
901
  logpush: undefined,
729
- url,
902
+ url: urls[0],
903
+ urls,
904
+ domain: undefined,
730
905
  tags: [],
731
906
  durableObjectNamespaces,
732
- domains: url ? [url] : [],
733
907
  routes: [],
734
908
  crons: Array.from(
735
909
  new Set([...getCronBindings(bindings), ...(news.crons ?? [])]),
@@ -737,84 +911,127 @@ export const LocalWorkerProvider = () =>
737
911
  accountId,
738
912
  };
739
913
  }),
740
- reconcile: Effect.fn(function* ({ id, news, bindings }) {
741
- // `dev: false` opts out of running a local Worker entirely —
742
- // typically because an external dev process (DevCommand) is
743
- // serving requests. Tear down any prior instance and return a
744
- // stub Attributes; the resource exists in state but has no
745
- // running workerd / proxy behind it.
746
- if (news.dev?.mode === "external") {
747
- const { accountId } = yield* yield* CloudflareEnvironment;
748
- const existing = instances.get(id);
749
- if (existing) {
750
- yield* Fiber.interrupt(existing.fiber);
751
- yield* Scope.close(existing.scope, Exit.void);
752
- instances.delete(id);
753
- dropServeState(id);
754
- }
755
- const name = yield* createWorkerName(id, news.name);
914
+
915
+ start: Effect.fn(function* ({ id, config }) {
916
+ const { accountId } = yield* cloudflareEnv;
917
+
918
+ // `dev: { mode: "external" }` opts out of running a local Worker
919
+ // entirely — typically because an external dev process
920
+ // (Command.Dev) is serving requests. The instance exists in the
921
+ // registry (with an empty scope) but has no workerd behind it. A
922
+ // previous worker-mode instance for this id may have registered
923
+ // serve/restart state — drop it, and tear down its workerd (with
924
+ // make-before-break the running workerd outlives instance scopes
925
+ // and must be closed explicitly on handoff).
926
+ if (config.dev.mode === "external") {
927
+ dropServeState(id);
928
+ yield* closeWorkerd(id);
929
+ const urls = config.dev.url ? [config.dev.url] : [];
756
930
  return {
757
- workerId: name,
758
- workerName: name,
931
+ workerId: config.name,
932
+ workerName: config.name,
759
933
  namespace: undefined,
760
934
  logpush: undefined,
761
- url: news.dev.url,
935
+ url: urls[0],
936
+ urls,
937
+ domain: undefined,
762
938
  tags: [],
763
939
  durableObjectNamespaces: {},
764
940
  accountId,
765
- domains: [],
766
941
  routes: [],
767
- crons: news.crons ?? [],
942
+ crons: config.crons,
768
943
  } satisfies Worker["Attributes"];
769
944
  }
770
- const options = { id, props: news as WorkerPropsWithDev, bindings };
771
- const signature = yield* structuralSignature(options);
772
- const existing = instances.get(options.id);
773
- if (existing) {
774
- if (existing.signature === signature) {
775
- yield* Effect.log(
776
- `[${options.id}] No changes, using existing instance`,
777
- );
778
- return yield* Fiber.join(existing.fiber);
779
- }
780
- yield* Effect.log(
781
- `[${options.id}] Changes detected, interrupting existing instance`,
782
- );
783
- yield* Fiber.interrupt(existing.fiber);
784
- yield* Scope.close(existing.scope, Exit.void);
785
- instances.delete(options.id);
786
- dropServeState(options.id);
787
- }
788
- const scope = yield* Scope.fork(rootScope);
789
- const fiber = yield* runInstance(options).pipe(
790
- Effect.forkDetach,
791
- Scope.provide(scope),
945
+
946
+ // `Worker.URL` locally resolves to the worker's dev-proxy URL —
947
+ // the proxy is stable per worker id (the same instance `runWorker`
948
+ // / `runVite` attach to below), so the URL is known before workerd
949
+ // starts. Trailing slash stripped to match the cloud value's shape.
950
+ const needsSelfUrl =
951
+ config.bindingDescriptors.some((b) => b.type === "self_url") ||
952
+ Object.values(config.env ?? {}).some(isSelfUrl);
953
+ const selfUrl = needsSelfUrl
954
+ ? (yield* maybeStartProxy(id, config.dev)).url
955
+ .toString()
956
+ .replace(/\/$/, "")
957
+ : undefined;
958
+ const workerBindings = yield* materializeWorkerBindings(
959
+ config,
960
+ selfUrl,
792
961
  );
793
- instances.set(options.id, { signature, fiber, scope });
794
- return yield* Fiber.join(fiber).pipe(
795
- Effect.onExit((exit) =>
796
- Effect.sync(() => {
797
- if (exit._tag === "Failure") {
798
- instances.delete(options.id);
799
- }
800
- }),
962
+ const worker: RunnableWorkerConfig = {
963
+ ...config,
964
+ // Substitute `Worker.URL` sentinels so the Vite dev server
965
+ // inlines the local URL into VITE_*-prefixed define entries.
966
+ env:
967
+ config.env && selfUrl !== undefined
968
+ ? Object.fromEntries(
969
+ Object.entries(config.env).map(([key, value]) => [
970
+ key,
971
+ isSelfUrl(value) ? selfUrl : value,
972
+ ]),
973
+ )
974
+ : config.env,
975
+ dev: config.dev,
976
+ workerBindings,
977
+ };
978
+ const serverUrl = yield* config.vite
979
+ ? runVite(worker, config.viteRootDir)
980
+ : config.assetsOnly
981
+ ? runAssetsOnly(worker)
982
+ : runWorker(worker);
983
+ // In dev, `urls` is the dev server's actual surface — localhost
984
+ // first, then LAN addresses for wildcard hosts. Deployed domains
985
+ // are not served by this session, so they don't appear.
986
+ const urls = yield* resolveLocalUrls(serverUrl);
987
+ return {
988
+ workerId: config.name,
989
+ workerName: config.name,
990
+ namespace: undefined,
991
+ logpush: undefined,
992
+ url: urls[0],
993
+ urls,
994
+ domain: undefined,
995
+ tags: [],
996
+ durableObjectNamespaces: Object.fromEntries(
997
+ config.durableObjectNamespaces.map((namespace) => [
998
+ namespace.className,
999
+ namespace.uniqueKey,
1000
+ ]),
801
1001
  ),
802
- );
1002
+ routes: [],
1003
+ crons: config.crons,
1004
+ accountId,
1005
+ } satisfies Worker["Attributes"];
803
1006
  }),
804
- delete: Effect.fn(function* ({ id }) {
805
- const existing = instances.get(id);
806
- if (existing) {
807
- yield* Fiber.interrupt(existing.fiber);
808
- yield* Scope.close(existing.scope, Exit.void);
809
- instances.delete(id);
810
- dropServeState(id);
811
- }
1007
+
1008
+ stop: Effect.fn(function* ({ id }) {
1009
+ // Cross-restart state: the serve/restart bookkeeping, the running
1010
+ // workerd (which outlives instance scopes for make-before-break),
1011
+ // and the URL proxy live outside instance scopes and are only
1012
+ // reclaimed on a real delete.
1013
+ dropServeState(id);
1014
+ yield* closeWorkerd(id);
1015
+ yield* stopProxy(id);
812
1016
  }),
813
- };
1017
+ } satisfies LocalProvider.LocalProviderSpec<
1018
+ Worker,
1019
+ Effect.Success<ReturnType<typeof resolveConfig>>,
1020
+ // The Python-bundle watcher spawns `uv` (ChildProcessSpawner) and
1021
+ // reads vendored modules (FileSystem) from inside `start`;
1022
+ // `readAssetsConfigFiles` (assets `_headers`/`_redirects`) needs
1023
+ // FileSystem + Path.
1024
+ | ChildProcessSpawner.ChildProcessSpawner
1025
+ | FileSystem.FileSystem
1026
+ | Path.Path
1027
+ >;
814
1028
  }),
815
1029
  );
816
1030
 
817
- export const toRuntimeBinding = Effect.fn(function* (b: WorkerBinding) {
1031
+ export const toRuntimeBinding = Effect.fn(function* (
1032
+ b: WorkerBinding,
1033
+ dev?: { remote?: boolean },
1034
+ ) {
818
1035
  const unsupported = () =>
819
1036
  new WorkerValidationError({
820
1037
  message: `${b.type} bindings are not supported in local mode`,
@@ -836,7 +1053,12 @@ export const toRuntimeBinding = Effect.fn(function* (b: WorkerBinding) {
836
1053
  case "browser":
837
1054
  return Browser.remote(b.name);
838
1055
  case "d1":
839
- return D1.remote(b.name, b.databaseId);
1056
+ // A `dev:` id belongs to a locally-emulated database (local D1
1057
+ // provider); a real id is a live database the dev worker proxies to
1058
+ // (e.g. the resource opted out of emulation via `Alchemy.remote()`).
1059
+ return isLocalId(b.databaseId)
1060
+ ? D1.local({ binding: b.name, id: b.databaseId })
1061
+ : D1.remote(b.name, b.databaseId);
840
1062
  case "data_blob":
841
1063
  return Data.local(b.name, Buffer.from(b.part));
842
1064
  case "dispatch_namespace":
@@ -864,20 +1086,58 @@ export const toRuntimeBinding = Effect.fn(function* (b: WorkerBinding) {
864
1086
  case "json":
865
1087
  return Json.local(b.name, b.json);
866
1088
  case "kv_namespace":
867
- return KvNamespace.remote(b.name, b.namespaceId);
1089
+ // A `dev:` id belongs to a locally-emulated namespace; a real id is
1090
+ // a live namespace the dev worker proxies to.
1091
+ return isLocalId(b.namespaceId)
1092
+ ? KvNamespace.local({ binding: b.name, id: b.namespaceId })
1093
+ : KvNamespace.remote(b.name, b.namespaceId);
868
1094
  case "mtls_certificate":
869
1095
  return MtlsCertificate.remote(b.name, b.certificateId);
870
1096
  case "pipelines":
871
1097
  return Pipelines.remote(b.name, b.pipeline);
872
1098
  case "plain_text":
873
1099
  return Text.local(b.name, b.text);
874
- case "queue":
1100
+ case "queue": {
1101
+ // A real queueId belongs to an `Alchemy.remote()` queue. Queue bindings
1102
+ // are NOT supported in Cloudflare's remote/preview sessions — a
1103
+ // platform limitation (cloudflare/workers-sdk#9929) — so live
1104
+ // production goes through the deployed shim worker registered at
1105
+ // eval time (see `Queues/QueueShim.ts`): the local binding targets a
1106
+ // forwarder service that relays the queue wire protocol to the shim
1107
+ // over HTTPS with a bearer token.
1108
+ if (b.queueId !== undefined && !isLocalId(b.queueId)) {
1109
+ const url = b.shim?.url;
1110
+ const token = b.shim?.token;
1111
+ if (url === undefined || token === undefined) {
1112
+ // Defensive: binding data produced by current eval always carries
1113
+ // the shim for this mode combination.
1114
+ return yield* new WorkerValidationError({
1115
+ message:
1116
+ `Queue binding "${b.name}" targets a live queue ` +
1117
+ "(Alchemy.remote()) but no producer shim was registered for it — " +
1118
+ "re-deploy, or remove remote() from the queue (local emulation).",
1119
+ value: b,
1120
+ });
1121
+ }
1122
+ return Queue.remote({
1123
+ binding: b.name,
1124
+ queueName: b.queueName,
1125
+ url,
1126
+ token: typeof token === "string" ? token : Redacted.value(token),
1127
+ });
1128
+ }
875
1129
  return Queue.local({
876
1130
  binding: b.name,
877
1131
  queueName: b.queueName,
878
1132
  });
1133
+ }
879
1134
  case "r2_bucket":
880
- return R2Bucket.remote(b.name, b.bucketName, b.jurisdiction);
1135
+ // A `dev:`-prefixed bucket name belongs to a locally-emulated bucket
1136
+ // (R2 has no opaque id — the name is the identity); a real name is a
1137
+ // live bucket the dev worker proxies to.
1138
+ return isLocalId(b.bucketName)
1139
+ ? R2Bucket.local({ binding: b.name, id: b.bucketName })
1140
+ : R2Bucket.remote(b.name, b.bucketName, b.jurisdiction);
881
1141
  case "ratelimit":
882
1142
  return RateLimit.local({
883
1143
  binding: b.name,
@@ -891,7 +1151,7 @@ export const toRuntimeBinding = Effect.fn(function* (b: WorkerBinding) {
891
1151
  case "secrets_store_secret":
892
1152
  return yield* unsupported();
893
1153
  case "send_email":
894
- return SendEmail.remote({
1154
+ return SendEmail[dev?.remote ? "remote" : "local"]({
895
1155
  binding: b.name,
896
1156
  destinationAddress: b.destinationAddress,
897
1157
  allowedDestinationAddresses: b.allowedDestinationAddresses,
@@ -925,48 +1185,6 @@ export const toRuntimeBinding = Effect.fn(function* (b: WorkerBinding) {
925
1185
  }
926
1186
  });
927
1187
 
928
- /**
929
- * Stable, collision-free structural signature used to decide whether a
930
- * locally-running dev Worker needs to be torn down and restarted.
931
- *
932
- * We deliberately do NOT use `Hash.structure` here: Effect's structural
933
- * hash folds sibling fields together with XOR, so when the *same* value
934
- * change appears in two sibling subtrees the diffs cancel and the hash is
935
- * unchanged. The Worker config mirrors `env` values into `bindings`
936
- * (e.g. `DEV_MARKER`/an R2 bucket name appear in both `props.env` and the
937
- * derived `bindings`), which is exactly the shape that collides — so an
938
- * env-only or rebind change would be silently treated as "no change" and
939
- * the dev Worker would never restart with the new bindings.
940
- *
941
- * A canonical JSON serialization (sorted keys, unwrapped `Redacted`,
942
- * cycle-safe) gives an exact comparison instead of a lossy fingerprint. We
943
- * hash that serialization with SHA-256 so each retained signature is a fixed
944
- * 64-char digest rather than a copy of the whole props/bindings blob.
945
- */
946
- const structuralSignature = (value: unknown): Effect.Effect<string> => {
947
- const seen = new WeakSet<object>();
948
- const normalize = (input: unknown): unknown => {
949
- if (typeof input === "bigint") return `bigint:${input.toString()}`;
950
- if (input === null || typeof input !== "object") return input;
951
- if (Redacted.isRedacted(input)) {
952
- return { __redacted: normalize(Redacted.value(input)) };
953
- }
954
- if (seen.has(input)) return "[circular]";
955
- seen.add(input);
956
- if (input instanceof Uint8Array) return { __bytes: Array.from(input) };
957
- if (Array.isArray(input)) return input.map(normalize);
958
- return Object.fromEntries(
959
- Object.keys(input)
960
- .sort()
961
- .map((key) => [
962
- key,
963
- normalize((input as Record<string, unknown>)[key]),
964
- ]),
965
- );
966
- };
967
- return sha256(JSON.stringify(normalize(value)));
968
- };
969
-
970
1188
  const toRuntimeAssets = Effect.fn(function* (
971
1189
  assets: WorkerAssetsConfig | undefined,
972
1190
  ) {