@alchemy.run/modal 0.0.0 → 2.0.0-beta.87

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 (499) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +96 -4
  3. package/lib/App.d.ts +143 -0
  4. package/lib/App.d.ts.map +1 -0
  5. package/lib/App.js +198 -0
  6. package/lib/App.js.map +1 -0
  7. package/lib/AuthProvider.d.ts +53 -0
  8. package/lib/AuthProvider.d.ts.map +1 -0
  9. package/lib/AuthProvider.js +209 -0
  10. package/lib/AuthProvider.js.map +1 -0
  11. package/lib/BindingHttp.d.ts +56 -0
  12. package/lib/BindingHttp.d.ts.map +1 -0
  13. package/lib/BindingHttp.js +50 -0
  14. package/lib/BindingHttp.js.map +1 -0
  15. package/lib/Blob.d.ts +34 -0
  16. package/lib/Blob.d.ts.map +1 -0
  17. package/lib/Blob.js +59 -0
  18. package/lib/Blob.js.map +1 -0
  19. package/lib/Bootstrap.d.ts +8 -0
  20. package/lib/Bootstrap.d.ts.map +1 -0
  21. package/lib/Bootstrap.js +26 -0
  22. package/lib/Bootstrap.js.map +1 -0
  23. package/lib/Cbor.d.ts +10 -0
  24. package/lib/Cbor.d.ts.map +1 -0
  25. package/lib/Cbor.js +177 -0
  26. package/lib/Cbor.js.map +1 -0
  27. package/lib/ConnectSandbox.d.ts +64 -0
  28. package/lib/ConnectSandbox.d.ts.map +1 -0
  29. package/lib/ConnectSandbox.js +33 -0
  30. package/lib/ConnectSandbox.js.map +1 -0
  31. package/lib/Container.d.ts +124 -0
  32. package/lib/Container.d.ts.map +1 -0
  33. package/lib/Container.js +1 -0
  34. package/lib/Container.js.map +1 -0
  35. package/lib/Contributions.d.ts +7 -0
  36. package/lib/Contributions.d.ts.map +1 -0
  37. package/lib/Contributions.js +6 -0
  38. package/lib/Contributions.js.map +1 -0
  39. package/lib/CreateDict.d.ts +83 -0
  40. package/lib/CreateDict.d.ts.map +1 -0
  41. package/lib/CreateDict.js +3 -0
  42. package/lib/CreateDict.js.map +1 -0
  43. package/lib/CreateDictHttp.d.ts +33 -0
  44. package/lib/CreateDictHttp.d.ts.map +1 -0
  45. package/lib/CreateDictHttp.js +67 -0
  46. package/lib/CreateDictHttp.js.map +1 -0
  47. package/lib/CreateImage.d.ts +98 -0
  48. package/lib/CreateImage.d.ts.map +1 -0
  49. package/lib/CreateImage.js +3 -0
  50. package/lib/CreateImage.js.map +1 -0
  51. package/lib/CreateImageHttp.d.ts +51 -0
  52. package/lib/CreateImageHttp.d.ts.map +1 -0
  53. package/lib/CreateImageHttp.js +87 -0
  54. package/lib/CreateImageHttp.js.map +1 -0
  55. package/lib/CreateQueue.d.ts +83 -0
  56. package/lib/CreateQueue.d.ts.map +1 -0
  57. package/lib/CreateQueue.js +3 -0
  58. package/lib/CreateQueue.js.map +1 -0
  59. package/lib/CreateQueueHttp.d.ts +31 -0
  60. package/lib/CreateQueueHttp.d.ts.map +1 -0
  61. package/lib/CreateQueueHttp.js +67 -0
  62. package/lib/CreateQueueHttp.js.map +1 -0
  63. package/lib/CreateSandbox.d.ts +186 -0
  64. package/lib/CreateSandbox.d.ts.map +1 -0
  65. package/lib/CreateSandbox.js +3 -0
  66. package/lib/CreateSandbox.js.map +1 -0
  67. package/lib/CreateSandboxHttp.d.ts +17 -0
  68. package/lib/CreateSandboxHttp.d.ts.map +1 -0
  69. package/lib/CreateSandboxHttp.js +117 -0
  70. package/lib/CreateSandboxHttp.js.map +1 -0
  71. package/lib/CreateSecret.d.ts +95 -0
  72. package/lib/CreateSecret.d.ts.map +1 -0
  73. package/lib/CreateSecret.js +3 -0
  74. package/lib/CreateSecret.js.map +1 -0
  75. package/lib/CreateSecretHttp.d.ts +24 -0
  76. package/lib/CreateSecretHttp.d.ts.map +1 -0
  77. package/lib/CreateSecretHttp.js +60 -0
  78. package/lib/CreateSecretHttp.js.map +1 -0
  79. package/lib/CreateVolume.d.ts +84 -0
  80. package/lib/CreateVolume.d.ts.map +1 -0
  81. package/lib/CreateVolume.js +3 -0
  82. package/lib/CreateVolume.js.map +1 -0
  83. package/lib/CreateVolumeHttp.d.ts +32 -0
  84. package/lib/CreateVolumeHttp.d.ts.map +1 -0
  85. package/lib/CreateVolumeHttp.js +69 -0
  86. package/lib/CreateVolumeHttp.js.map +1 -0
  87. package/lib/Credentials.d.ts +32 -0
  88. package/lib/Credentials.d.ts.map +1 -0
  89. package/lib/Credentials.js +44 -0
  90. package/lib/Credentials.js.map +1 -0
  91. package/lib/Dict.d.ts +147 -0
  92. package/lib/Dict.d.ts.map +1 -0
  93. package/lib/Dict.js +175 -0
  94. package/lib/Dict.js.map +1 -0
  95. package/lib/DictClient.d.ts +55 -0
  96. package/lib/DictClient.d.ts.map +1 -0
  97. package/lib/DictClient.js +89 -0
  98. package/lib/DictClient.js.map +1 -0
  99. package/lib/Domain.d.ts +86 -0
  100. package/lib/Domain.d.ts.map +1 -0
  101. package/lib/Domain.js +113 -0
  102. package/lib/Domain.js.map +1 -0
  103. package/lib/Endpoint.d.ts +181 -0
  104. package/lib/Endpoint.d.ts.map +1 -0
  105. package/lib/Endpoint.js +283 -0
  106. package/lib/Endpoint.js.map +1 -0
  107. package/lib/Environment.d.ts +174 -0
  108. package/lib/Environment.d.ts.map +1 -0
  109. package/lib/Environment.js +244 -0
  110. package/lib/Environment.js.map +1 -0
  111. package/lib/FetchServer.d.ts +105 -0
  112. package/lib/FetchServer.d.ts.map +1 -0
  113. package/lib/FetchServer.js +3 -0
  114. package/lib/FetchServer.js.map +1 -0
  115. package/lib/FetchServerHttp.d.ts +21 -0
  116. package/lib/FetchServerHttp.d.ts.map +1 -0
  117. package/lib/FetchServerHttp.js +84 -0
  118. package/lib/FetchServerHttp.js.map +1 -0
  119. package/lib/Function.d.ts +236 -0
  120. package/lib/Function.d.ts.map +1 -0
  121. package/lib/Function.js +273 -0
  122. package/lib/Function.js.map +1 -0
  123. package/lib/FunctionAutoscaler.d.ts +99 -0
  124. package/lib/FunctionAutoscaler.d.ts.map +1 -0
  125. package/lib/FunctionAutoscaler.js +136 -0
  126. package/lib/FunctionAutoscaler.js.map +1 -0
  127. package/lib/FunctionTarget.d.ts +61 -0
  128. package/lib/FunctionTarget.d.ts.map +1 -0
  129. package/lib/FunctionTarget.js +136 -0
  130. package/lib/FunctionTarget.js.map +1 -0
  131. package/lib/Image.d.ts +159 -0
  132. package/lib/Image.d.ts.map +1 -0
  133. package/lib/Image.js +203 -0
  134. package/lib/Image.js.map +1 -0
  135. package/lib/ImageBuild.d.ts +108 -0
  136. package/lib/ImageBuild.d.ts.map +1 -0
  137. package/lib/ImageBuild.js +157 -0
  138. package/lib/ImageBuild.js.map +1 -0
  139. package/lib/ImagePlan.d.ts +31 -0
  140. package/lib/ImagePlan.d.ts.map +1 -0
  141. package/lib/ImagePlan.js +70 -0
  142. package/lib/ImagePlan.js.map +1 -0
  143. package/lib/InferEnv.d.ts +26 -0
  144. package/lib/InferEnv.d.ts.map +1 -0
  145. package/lib/InferEnv.js +1 -0
  146. package/lib/InferEnv.js.map +1 -0
  147. package/lib/InvokeFunction.d.ts +186 -0
  148. package/lib/InvokeFunction.d.ts.map +1 -0
  149. package/lib/InvokeFunction.js +10 -0
  150. package/lib/InvokeFunction.js.map +1 -0
  151. package/lib/InvokeFunctionHttp.d.ts +39 -0
  152. package/lib/InvokeFunctionHttp.d.ts.map +1 -0
  153. package/lib/InvokeFunctionHttp.js +210 -0
  154. package/lib/InvokeFunctionHttp.js.map +1 -0
  155. package/lib/ModalBindings.d.ts +138 -0
  156. package/lib/ModalBindings.d.ts.map +1 -0
  157. package/lib/ModalBindings.js +223 -0
  158. package/lib/ModalBindings.js.map +1 -0
  159. package/lib/MountBucket.d.ts +80 -0
  160. package/lib/MountBucket.d.ts.map +1 -0
  161. package/lib/MountBucket.js +44 -0
  162. package/lib/MountBucket.js.map +1 -0
  163. package/lib/MountVolume.d.ts +77 -0
  164. package/lib/MountVolume.d.ts.map +1 -0
  165. package/lib/MountVolume.js +41 -0
  166. package/lib/MountVolume.js.map +1 -0
  167. package/lib/Mounts.d.ts +134 -0
  168. package/lib/Mounts.d.ts.map +1 -0
  169. package/lib/Mounts.js +87 -0
  170. package/lib/Mounts.js.map +1 -0
  171. package/lib/PersistentSandbox.d.ts +75 -0
  172. package/lib/PersistentSandbox.d.ts.map +1 -0
  173. package/lib/PersistentSandbox.js +93 -0
  174. package/lib/PersistentSandbox.js.map +1 -0
  175. package/lib/Providers.d.ts +23 -0
  176. package/lib/Providers.d.ts.map +1 -0
  177. package/lib/Providers.js +64 -0
  178. package/lib/Providers.js.map +1 -0
  179. package/lib/Proxy.d.ts +94 -0
  180. package/lib/Proxy.d.ts.map +1 -0
  181. package/lib/Proxy.js +132 -0
  182. package/lib/Proxy.js.map +1 -0
  183. package/lib/Queue.d.ts +147 -0
  184. package/lib/Queue.d.ts.map +1 -0
  185. package/lib/Queue.js +177 -0
  186. package/lib/Queue.js.map +1 -0
  187. package/lib/QueueClient.d.ts +64 -0
  188. package/lib/QueueClient.d.ts.map +1 -0
  189. package/lib/QueueClient.js +73 -0
  190. package/lib/QueueClient.js.map +1 -0
  191. package/lib/ReadApp.d.ts +85 -0
  192. package/lib/ReadApp.d.ts.map +1 -0
  193. package/lib/ReadApp.js +3 -0
  194. package/lib/ReadApp.js.map +1 -0
  195. package/lib/ReadAppHttp.d.ts +26 -0
  196. package/lib/ReadAppHttp.d.ts.map +1 -0
  197. package/lib/ReadAppHttp.js +106 -0
  198. package/lib/ReadAppHttp.js.map +1 -0
  199. package/lib/ReadDict.d.ts +39 -0
  200. package/lib/ReadDict.d.ts.map +1 -0
  201. package/lib/ReadDict.js +3 -0
  202. package/lib/ReadDict.js.map +1 -0
  203. package/lib/ReadDictHttp.d.ts +12 -0
  204. package/lib/ReadDictHttp.d.ts.map +1 -0
  205. package/lib/ReadDictHttp.js +23 -0
  206. package/lib/ReadDictHttp.js.map +1 -0
  207. package/lib/ReadFunction.d.ts +73 -0
  208. package/lib/ReadFunction.d.ts.map +1 -0
  209. package/lib/ReadFunction.js +3 -0
  210. package/lib/ReadFunction.js.map +1 -0
  211. package/lib/ReadFunctionHttp.d.ts +25 -0
  212. package/lib/ReadFunctionHttp.d.ts.map +1 -0
  213. package/lib/ReadFunctionHttp.js +63 -0
  214. package/lib/ReadFunctionHttp.js.map +1 -0
  215. package/lib/ReadQueue.d.ts +39 -0
  216. package/lib/ReadQueue.d.ts.map +1 -0
  217. package/lib/ReadQueue.js +3 -0
  218. package/lib/ReadQueue.js.map +1 -0
  219. package/lib/ReadQueueHttp.d.ts +12 -0
  220. package/lib/ReadQueueHttp.d.ts.map +1 -0
  221. package/lib/ReadQueueHttp.js +23 -0
  222. package/lib/ReadQueueHttp.js.map +1 -0
  223. package/lib/ReadServer.d.ts +72 -0
  224. package/lib/ReadServer.d.ts.map +1 -0
  225. package/lib/ReadServer.js +3 -0
  226. package/lib/ReadServer.js.map +1 -0
  227. package/lib/ReadServerHttp.d.ts +25 -0
  228. package/lib/ReadServerHttp.d.ts.map +1 -0
  229. package/lib/ReadServerHttp.js +70 -0
  230. package/lib/ReadServerHttp.js.map +1 -0
  231. package/lib/ReadVolume.d.ts +40 -0
  232. package/lib/ReadVolume.d.ts.map +1 -0
  233. package/lib/ReadVolume.js +3 -0
  234. package/lib/ReadVolume.js.map +1 -0
  235. package/lib/ReadVolumeHttp.d.ts +12 -0
  236. package/lib/ReadVolumeHttp.d.ts.map +1 -0
  237. package/lib/ReadVolumeHttp.js +24 -0
  238. package/lib/ReadVolumeHttp.js.map +1 -0
  239. package/lib/ReadWriteDict.d.ts +39 -0
  240. package/lib/ReadWriteDict.d.ts.map +1 -0
  241. package/lib/ReadWriteDict.js +3 -0
  242. package/lib/ReadWriteDict.js.map +1 -0
  243. package/lib/ReadWriteDictHttp.d.ts +12 -0
  244. package/lib/ReadWriteDictHttp.d.ts.map +1 -0
  245. package/lib/ReadWriteDictHttp.js +23 -0
  246. package/lib/ReadWriteDictHttp.js.map +1 -0
  247. package/lib/ReadWriteQueue.d.ts +40 -0
  248. package/lib/ReadWriteQueue.d.ts.map +1 -0
  249. package/lib/ReadWriteQueue.js +3 -0
  250. package/lib/ReadWriteQueue.js.map +1 -0
  251. package/lib/ReadWriteQueueHttp.d.ts +12 -0
  252. package/lib/ReadWriteQueueHttp.d.ts.map +1 -0
  253. package/lib/ReadWriteQueueHttp.js +23 -0
  254. package/lib/ReadWriteQueueHttp.js.map +1 -0
  255. package/lib/ReadWriteVolume.d.ts +40 -0
  256. package/lib/ReadWriteVolume.d.ts.map +1 -0
  257. package/lib/ReadWriteVolume.js +3 -0
  258. package/lib/ReadWriteVolume.js.map +1 -0
  259. package/lib/ReadWriteVolumeHttp.d.ts +12 -0
  260. package/lib/ReadWriteVolumeHttp.d.ts.map +1 -0
  261. package/lib/ReadWriteVolumeHttp.js +24 -0
  262. package/lib/ReadWriteVolumeHttp.js.map +1 -0
  263. package/lib/RuntimeOwner.d.ts +39 -0
  264. package/lib/RuntimeOwner.d.ts.map +1 -0
  265. package/lib/RuntimeOwner.js +85 -0
  266. package/lib/RuntimeOwner.js.map +1 -0
  267. package/lib/Sandbox.d.ts +215 -0
  268. package/lib/Sandbox.d.ts.map +1 -0
  269. package/lib/Sandbox.js +278 -0
  270. package/lib/Sandbox.js.map +1 -0
  271. package/lib/SandboxClient.d.ts +748 -0
  272. package/lib/SandboxClient.d.ts.map +1 -0
  273. package/lib/SandboxClient.js +710 -0
  274. package/lib/SandboxClient.js.map +1 -0
  275. package/lib/ScaleFunction.d.ts +54 -0
  276. package/lib/ScaleFunction.d.ts.map +1 -0
  277. package/lib/ScaleFunction.js +3 -0
  278. package/lib/ScaleFunction.js.map +1 -0
  279. package/lib/ScaleFunctionHttp.d.ts +21 -0
  280. package/lib/ScaleFunctionHttp.d.ts.map +1 -0
  281. package/lib/ScaleFunctionHttp.js +39 -0
  282. package/lib/ScaleFunctionHttp.js.map +1 -0
  283. package/lib/Secret.d.ts +170 -0
  284. package/lib/Secret.d.ts.map +1 -0
  285. package/lib/Secret.js +196 -0
  286. package/lib/Secret.js.map +1 -0
  287. package/lib/Server.d.ts +155 -0
  288. package/lib/Server.d.ts.map +1 -0
  289. package/lib/Server.js +184 -0
  290. package/lib/Server.js.map +1 -0
  291. package/lib/ServiceUser.d.ts +139 -0
  292. package/lib/ServiceUser.d.ts.map +1 -0
  293. package/lib/ServiceUser.js +210 -0
  294. package/lib/ServiceUser.js.map +1 -0
  295. package/lib/Volume.d.ts +170 -0
  296. package/lib/Volume.d.ts.map +1 -0
  297. package/lib/Volume.js +220 -0
  298. package/lib/Volume.js.map +1 -0
  299. package/lib/VolumeClient.d.ts +53 -0
  300. package/lib/VolumeClient.d.ts.map +1 -0
  301. package/lib/VolumeClient.js +22 -0
  302. package/lib/VolumeClient.js.map +1 -0
  303. package/lib/VolumeFiles.d.ts +94 -0
  304. package/lib/VolumeFiles.d.ts.map +1 -0
  305. package/lib/VolumeFiles.js +139 -0
  306. package/lib/VolumeFiles.js.map +1 -0
  307. package/lib/WebhookToken.d.ts +102 -0
  308. package/lib/WebhookToken.d.ts.map +1 -0
  309. package/lib/WebhookToken.js +176 -0
  310. package/lib/WebhookToken.js.map +1 -0
  311. package/lib/WorkspaceSettings.d.ts +70 -0
  312. package/lib/WorkspaceSettings.d.ts.map +1 -0
  313. package/lib/WorkspaceSettings.js +105 -0
  314. package/lib/WorkspaceSettings.js.map +1 -0
  315. package/lib/WriteApp.d.ts +38 -0
  316. package/lib/WriteApp.d.ts.map +1 -0
  317. package/lib/WriteApp.js +3 -0
  318. package/lib/WriteApp.js.map +1 -0
  319. package/lib/WriteAppHttp.d.ts +23 -0
  320. package/lib/WriteAppHttp.d.ts.map +1 -0
  321. package/lib/WriteAppHttp.js +36 -0
  322. package/lib/WriteAppHttp.js.map +1 -0
  323. package/lib/WriteDict.d.ts +39 -0
  324. package/lib/WriteDict.d.ts.map +1 -0
  325. package/lib/WriteDict.js +3 -0
  326. package/lib/WriteDict.js.map +1 -0
  327. package/lib/WriteDictHttp.d.ts +12 -0
  328. package/lib/WriteDictHttp.d.ts.map +1 -0
  329. package/lib/WriteDictHttp.js +23 -0
  330. package/lib/WriteDictHttp.js.map +1 -0
  331. package/lib/WriteQueue.d.ts +39 -0
  332. package/lib/WriteQueue.d.ts.map +1 -0
  333. package/lib/WriteQueue.js +3 -0
  334. package/lib/WriteQueue.js.map +1 -0
  335. package/lib/WriteQueueHttp.d.ts +12 -0
  336. package/lib/WriteQueueHttp.d.ts.map +1 -0
  337. package/lib/WriteQueueHttp.js +23 -0
  338. package/lib/WriteQueueHttp.js.map +1 -0
  339. package/lib/WriteSecret.d.ts +53 -0
  340. package/lib/WriteSecret.d.ts.map +1 -0
  341. package/lib/WriteSecret.js +3 -0
  342. package/lib/WriteSecret.js.map +1 -0
  343. package/lib/WriteSecretHttp.d.ts +23 -0
  344. package/lib/WriteSecretHttp.d.ts.map +1 -0
  345. package/lib/WriteSecretHttp.js +44 -0
  346. package/lib/WriteSecretHttp.js.map +1 -0
  347. package/lib/WriteVolume.d.ts +39 -0
  348. package/lib/WriteVolume.d.ts.map +1 -0
  349. package/lib/WriteVolume.js +3 -0
  350. package/lib/WriteVolume.js.map +1 -0
  351. package/lib/WriteVolumeHttp.d.ts +12 -0
  352. package/lib/WriteVolumeHttp.d.ts.map +1 -0
  353. package/lib/WriteVolumeHttp.js +24 -0
  354. package/lib/WriteVolumeHttp.js.map +1 -0
  355. package/lib/index.d.ts +80 -0
  356. package/lib/index.d.ts.map +1 -0
  357. package/lib/index.js +78 -0
  358. package/lib/index.js.map +1 -0
  359. package/lib/internal/Declared.d.ts +29 -0
  360. package/lib/internal/Declared.d.ts.map +1 -0
  361. package/lib/internal/Declared.js +31 -0
  362. package/lib/internal/Declared.js.map +1 -0
  363. package/lib/internal/Deploy.d.ts +110 -0
  364. package/lib/internal/Deploy.d.ts.map +1 -0
  365. package/lib/internal/Deploy.js +230 -0
  366. package/lib/internal/Deploy.js.map +1 -0
  367. package/lib/internal/Entrypoint.d.ts +52 -0
  368. package/lib/internal/Entrypoint.d.ts.map +1 -0
  369. package/lib/internal/Entrypoint.js +193 -0
  370. package/lib/internal/Entrypoint.js.map +1 -0
  371. package/lib/internal/Rpc.d.ts +17 -0
  372. package/lib/internal/Rpc.d.ts.map +1 -0
  373. package/lib/internal/Rpc.js +49 -0
  374. package/lib/internal/Rpc.js.map +1 -0
  375. package/lib/internal/RpcAuth.d.ts +41 -0
  376. package/lib/internal/RpcAuth.d.ts.map +1 -0
  377. package/lib/internal/RpcAuth.js +100 -0
  378. package/lib/internal/RpcAuth.js.map +1 -0
  379. package/lib/internal/Runtime.d.ts +127 -0
  380. package/lib/internal/Runtime.d.ts.map +1 -0
  381. package/lib/internal/Runtime.js +246 -0
  382. package/lib/internal/Runtime.js.map +1 -0
  383. package/lib/internal/Tags.d.ts +19 -0
  384. package/lib/internal/Tags.d.ts.map +1 -0
  385. package/lib/internal/Tags.js +33 -0
  386. package/lib/internal/Tags.js.map +1 -0
  387. package/lib/internal/TcpConnect.d.ts +12 -0
  388. package/lib/internal/TcpConnect.d.ts.map +1 -0
  389. package/lib/internal/TcpConnect.js +46 -0
  390. package/lib/internal/TcpConnect.js.map +1 -0
  391. package/lib/internal/Transport.d.ts +13 -0
  392. package/lib/internal/Transport.d.ts.map +1 -0
  393. package/lib/internal/Transport.js +16 -0
  394. package/lib/internal/Transport.js.map +1 -0
  395. package/lib/internal.d.ts +71 -0
  396. package/lib/internal.d.ts.map +1 -0
  397. package/lib/internal.js +102 -0
  398. package/lib/internal.js.map +1 -0
  399. package/package.json +59 -3
  400. package/src/App.ts +262 -0
  401. package/src/AuthProvider.ts +295 -0
  402. package/src/BindingHttp.ts +112 -0
  403. package/src/Blob.ts +71 -0
  404. package/src/Bootstrap.ts +52 -0
  405. package/src/Cbor.ts +158 -0
  406. package/src/ConnectSandbox.ts +99 -0
  407. package/src/Container.ts +121 -0
  408. package/src/Contributions.ts +9 -0
  409. package/src/CreateDict.ts +95 -0
  410. package/src/CreateDictHttp.ts +91 -0
  411. package/src/CreateImage.ts +105 -0
  412. package/src/CreateImageHttp.ts +117 -0
  413. package/src/CreateQueue.ts +95 -0
  414. package/src/CreateQueueHttp.ts +91 -0
  415. package/src/CreateSandbox.ts +228 -0
  416. package/src/CreateSandboxHttp.ts +160 -0
  417. package/src/CreateSecret.ts +109 -0
  418. package/src/CreateSecretHttp.ts +83 -0
  419. package/src/CreateVolume.ts +96 -0
  420. package/src/CreateVolumeHttp.ts +93 -0
  421. package/src/Credentials.ts +74 -0
  422. package/src/Dict.ts +245 -0
  423. package/src/DictClient.ts +166 -0
  424. package/src/Domain.ts +147 -0
  425. package/src/Endpoint.ts +406 -0
  426. package/src/Environment.ts +373 -0
  427. package/src/FetchServer.ts +126 -0
  428. package/src/FetchServerHttp.ts +110 -0
  429. package/src/Function.ts +397 -0
  430. package/src/FunctionAutoscaler.ts +210 -0
  431. package/src/FunctionTarget.ts +181 -0
  432. package/src/Image.ts +281 -0
  433. package/src/ImageBuild.ts +228 -0
  434. package/src/ImagePlan.ts +78 -0
  435. package/src/InferEnv.ts +27 -0
  436. package/src/InvokeFunction.ts +211 -0
  437. package/src/InvokeFunctionHttp.ts +316 -0
  438. package/src/ModalBindings.ts +310 -0
  439. package/src/MountBucket.ts +137 -0
  440. package/src/MountVolume.ts +113 -0
  441. package/src/Mounts.ts +230 -0
  442. package/src/PersistentSandbox.ts +142 -0
  443. package/src/Providers.ts +100 -0
  444. package/src/Proxy.ts +191 -0
  445. package/src/Queue.ts +258 -0
  446. package/src/QueueClient.ts +149 -0
  447. package/src/ReadApp.ts +101 -0
  448. package/src/ReadAppHttp.ts +142 -0
  449. package/src/ReadDict.ts +44 -0
  450. package/src/ReadDictHttp.ts +27 -0
  451. package/src/ReadFunction.ts +107 -0
  452. package/src/ReadFunctionHttp.ts +91 -0
  453. package/src/ReadQueue.ts +44 -0
  454. package/src/ReadQueueHttp.ts +27 -0
  455. package/src/ReadServer.ts +98 -0
  456. package/src/ReadServerHttp.ts +101 -0
  457. package/src/ReadVolume.ts +45 -0
  458. package/src/ReadVolumeHttp.ts +28 -0
  459. package/src/ReadWriteDict.ts +44 -0
  460. package/src/ReadWriteDictHttp.ts +27 -0
  461. package/src/ReadWriteQueue.ts +45 -0
  462. package/src/ReadWriteQueueHttp.ts +27 -0
  463. package/src/ReadWriteVolume.ts +45 -0
  464. package/src/ReadWriteVolumeHttp.ts +28 -0
  465. package/src/RuntimeOwner.ts +111 -0
  466. package/src/Sandbox.ts +402 -0
  467. package/src/SandboxClient.ts +1404 -0
  468. package/src/ScaleFunction.ts +70 -0
  469. package/src/ScaleFunctionHttp.ts +54 -0
  470. package/src/Secret.ts +296 -0
  471. package/src/Server.ts +285 -0
  472. package/src/ServiceUser.ts +295 -0
  473. package/src/Volume.ts +320 -0
  474. package/src/VolumeClient.ts +108 -0
  475. package/src/VolumeFiles.ts +194 -0
  476. package/src/WebhookToken.ts +230 -0
  477. package/src/WorkspaceSettings.ts +160 -0
  478. package/src/WriteApp.ts +43 -0
  479. package/src/WriteAppHttp.ts +51 -0
  480. package/src/WriteDict.ts +44 -0
  481. package/src/WriteDictHttp.ts +27 -0
  482. package/src/WriteQueue.ts +44 -0
  483. package/src/WriteQueueHttp.ts +27 -0
  484. package/src/WriteSecret.ts +60 -0
  485. package/src/WriteSecretHttp.ts +56 -0
  486. package/src/WriteVolume.ts +44 -0
  487. package/src/WriteVolumeHttp.ts +28 -0
  488. package/src/globals.d.ts +2 -0
  489. package/src/index.ts +85 -0
  490. package/src/internal/Declared.ts +80 -0
  491. package/src/internal/Deploy.ts +309 -0
  492. package/src/internal/Entrypoint.ts +198 -0
  493. package/src/internal/Rpc.ts +59 -0
  494. package/src/internal/RpcAuth.ts +132 -0
  495. package/src/internal/Runtime.ts +386 -0
  496. package/src/internal/Tags.ts +44 -0
  497. package/src/internal/TcpConnect.ts +78 -0
  498. package/src/internal/Transport.ts +25 -0
  499. package/src/internal.ts +147 -0
@@ -0,0 +1,44 @@
1
+ import * as secret from "@distilled.cloud/modal/secret";
2
+ import * as Effect from "effect/Effect";
3
+ import * as Layer from "effect/Layer";
4
+ import * as Redacted from "effect/Redacted";
5
+ import { makeModalBinding } from "./BindingHttp.js";
6
+ import { operations } from "./internal.js";
7
+ import { WriteSecret } from "./WriteSecret.js";
8
+ /** The operations the client calls, resolved by `ModalBindings.withCredentials`. */
9
+ const WriteSecretOps = operations({ getInfo: secret.secretGetInfo, update: secret.updateSecret });
10
+ /** A write client over a secret id. */
11
+ export const makeWriteSecretClient = (secretId, ops) => ({
12
+ secretId,
13
+ put: (env) => Effect.gen(function* () {
14
+ const id = yield* secretId;
15
+ const { metadata } = yield* ops.getInfo({ secretId: id });
16
+ const values = Object.entries(env).map(([key, value]) => ({
17
+ key,
18
+ value: Redacted.isRedacted(value) ? Redacted.value(value) : value,
19
+ }));
20
+ const removed = (metadata?.keys ?? []).filter((key) => !(key in env));
21
+ yield* ops.update({
22
+ secretId: id,
23
+ updates: [...values, ...removed.map((key) => ({ key }))],
24
+ });
25
+ }),
26
+ });
27
+ /**
28
+ * {@link WriteSecret} over Modal's API. Grants the host's identity (a scoped
29
+ * `Modal.ServiceUser`) the `contributor` role on the secret's environment.
30
+ *
31
+ * @layer
32
+ * @product Secret
33
+ * @provides Modal.WriteSecret
34
+ */
35
+ export const WriteSecretHttp = Layer.effect(WriteSecret, makeModalBinding({
36
+ tag: "Modal.WriteSecret",
37
+ operations: WriteSecretOps,
38
+ role: "contributor",
39
+ make: Effect.fn(function* (resource, ops) {
40
+ const secretId = yield* resource.secretId;
41
+ return makeWriteSecretClient(secretId, ops);
42
+ }),
43
+ }));
44
+ //# sourceMappingURL=WriteSecretHttp.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WriteSecretHttp.js","sources":["../src/WriteSecretHttp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,+BAA+B,CAAC;AACxD,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,O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AAC;YAChB,QAAQ,EAAE,EAAE;YACZ,OAAO,EAAE,CAAC,GAAG,MAAM,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC;SACzD,CAAC,CAAC;IACL,CAAC,CAAC;CACL,CAAC,CAAC;AAEH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,CAAC,MAAM,CACzC,WAAW,EACX,gBAAgB,CAAC;IACf,GAAG,EAAE,mBAAmB;IACxB,UAAU,EAAE,cAAc;IAC1B,IAAI,EAAE,aAAa;IACnB,IAAI,EAAE,MAAM,CAAC,EAAE,CAAC,QAAQ,CAAC,EAAE,QAAgB,EAAE,GAAG;QAC9C,MAAM,QAAQ,GAAG,KAAK,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC;QAC1C,OAAO,qBAAqB,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IAC9C,CAAC,CAAC;CACH,CAAC,CACH,CAAC"}
@@ -0,0 +1,39 @@
1
+ import * as Binding from "alchemy/Binding";
2
+ import type * as Effect from "effect/Effect";
3
+ import type { Volume } from "./Volume.ts";
4
+ import type { WriteVolumeClient } from "./VolumeClient.ts";
5
+ export type { WriteVolumeClient } from "./VolumeClient.ts";
6
+ /**
7
+ * Write a Modal Volume's files from any runtime without mounting it: upload, remove and copy files over Modal's volume API. Sandboxes that mount the volume see the changes after they reload it.
8
+ *
9
+ * ### Bind a volume
10
+ * **Example:** Write from a Cloudflare Worker
11
+ * ```typescript
12
+ * import * as Cloudflare from "@alchemy.run/cloudflare";
13
+ * import * as Modal from "@alchemy.run/modal";
14
+ * import * as Effect from "effect/Effect";
15
+ * import * as HttpServerResponse from "effect/http/HttpServerResponse";
16
+ * import { Workspace } from "./Storage.ts";
17
+ *
18
+ * export default class Api extends Cloudflare.Worker<Api>()(
19
+ * "Api",
20
+ * { main: import.meta.url },
21
+ * Effect.gen(function* () {
22
+ * const volume = yield* Modal.WriteVolume(Workspace);
23
+ * return {
24
+ * fetch: Effect.gen(function* () {
25
+ * yield* volume.writeFile("/inbox/task.json", JSON.stringify({ repo: "alchemy" }));
26
+ * return HttpServerResponse.text("written");
27
+ * }).pipe(Effect.orDie),
28
+ * };
29
+ * }).pipe(Effect.provide(Modal.WriteVolumeHttp)),
30
+ * ) {}
31
+ * ```
32
+ *
33
+ * @binding
34
+ * @product Volume
35
+ */
36
+ export interface WriteVolume extends Binding.Service<WriteVolume, "Modal.WriteVolume", (volume: Volume) => Effect.Effect<WriteVolumeClient>> {
37
+ }
38
+ export declare const WriteVolume: WriteVolume;
39
+ //# sourceMappingURL=WriteVolume.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WriteVolume.d.ts","sources":["../src/WriteVolume.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,iBAAiB,CAAC;AAC3C,OAAO,KAAK,KAAK,MAAM,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE3D,YAAY,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE3D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,WAAW,WAAY,SAAQ,OAAO,CAAC,OAAO,CAClD,WAAW,EACX,mBAAmB,EACnB,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC,MAAM,CAAC,iBAAiB,CAAC,CACrD;CAAG;AAEJ,eAAO,MAAM,WAAW,aAAoD,CAAC"}
@@ -0,0 +1,3 @@
1
+ import * as Binding from "alchemy/Binding";
2
+ export const WriteVolume = Binding.Service("Modal.WriteVolume");
3
+ //# sourceMappingURL=WriteVolume.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WriteVolume.js","sources":["../src/WriteVolume.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,iBAAiB,CAAC;AA2C3C,MAAM,CAAC,MAAM,WAAW,GAAG,OAAO,CAAC,OAAO,CAAc,mBAAmB,CAAC,CAAC"}
@@ -0,0 +1,12 @@
1
+ import * as Layer from "effect/Layer";
2
+ import { WriteVolume } from "./WriteVolume.ts";
3
+ /**
4
+ * {@link WriteVolume} over Modal's volume API. Grants the host's identity (a scoped
5
+ * `Modal.ServiceUser`) the `contributor` role on the volume's environment.
6
+ *
7
+ * @layer
8
+ * @product Volume
9
+ * @provides Modal.WriteVolume
10
+ */
11
+ export declare const WriteVolumeHttp: Layer.Layer<WriteVolume, never, never>;
12
+ //# sourceMappingURL=WriteVolumeHttp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WriteVolumeHttp.d.ts","sources":["../src/WriteVolumeHttp.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAKtC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,wCAW3B,CAAC"}
@@ -0,0 +1,24 @@
1
+ import * as Effect from "effect/Effect";
2
+ import * as Layer from "effect/Layer";
3
+ import { makeModalBinding } from "./BindingHttp.js";
4
+ import { makeWriteVolumeClient } from "./VolumeClient.js";
5
+ import { VolumeFileOps } from "./VolumeFiles.js";
6
+ import { WriteVolume } from "./WriteVolume.js";
7
+ /**
8
+ * {@link WriteVolume} over Modal's volume API. Grants the host's identity (a scoped
9
+ * `Modal.ServiceUser`) the `contributor` role on the volume's environment.
10
+ *
11
+ * @layer
12
+ * @product Volume
13
+ * @provides Modal.WriteVolume
14
+ */
15
+ export const WriteVolumeHttp = Layer.effect(WriteVolume, makeModalBinding({
16
+ tag: "Modal.WriteVolume",
17
+ operations: VolumeFileOps,
18
+ role: "contributor",
19
+ make: Effect.fn(function* (volume, ops) {
20
+ const volumeId = yield* volume.volumeId;
21
+ return makeWriteVolumeClient(volumeId, ops);
22
+ }),
23
+ }));
24
+ //# sourceMappingURL=WriteVolumeHttp.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WriteVolumeHttp.js","sources":["../src/WriteVolumeHttp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,CAAC,MAAM,CACzC,WAAW,EACX,gBAAgB,CAAC;IACf,GAAG,EAAE,mBAAmB;IACxB,UAAU,EAAE,aAAa;IACzB,IAAI,EAAE,aAAa;IACnB,IAAI,EAAE,MAAM,CAAC,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAc,EAAE,GAAG;QAC5C,MAAM,QAAQ,GAAG,KAAK,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC;QACxC,OAAO,qBAAqB,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IAC9C,CAAC,CAAC;CACH,CAAC,CACH,CAAC"}
package/lib/index.d.ts ADDED
@@ -0,0 +1,80 @@
1
+ export * from "./App.ts";
2
+ export * from "./AuthProvider.ts";
3
+ export * from "./ConnectSandbox.ts";
4
+ export * from "./Container.ts";
5
+ export * from "./CreateDict.ts";
6
+ export * from "./CreateDictHttp.ts";
7
+ export * from "./CreateImage.ts";
8
+ export * from "./CreateImageHttp.ts";
9
+ export * from "./CreateQueue.ts";
10
+ export * from "./CreateQueueHttp.ts";
11
+ export * from "./CreateSandbox.ts";
12
+ export * from "./CreateSandboxHttp.ts";
13
+ export * from "./CreateSecret.ts";
14
+ export * from "./CreateSecretHttp.ts";
15
+ export * from "./CreateVolume.ts";
16
+ export * from "./CreateVolumeHttp.ts";
17
+ export * from "./Dict.ts";
18
+ export * from "./Domain.ts";
19
+ export * from "./Endpoint.ts";
20
+ export * from "./Environment.ts";
21
+ export * from "./FetchServer.ts";
22
+ export * from "./FetchServerHttp.ts";
23
+ export * from "./Function.ts";
24
+ export * from "./FunctionAutoscaler.ts";
25
+ export * from "./Image.ts";
26
+ export * from "./ImageBuild.ts";
27
+ export * from "./InvokeFunction.ts";
28
+ export * from "./InvokeFunctionHttp.ts";
29
+ export * from "./Providers.ts";
30
+ export * from "./PersistentSandbox.ts";
31
+ export * from "./MountBucket.ts";
32
+ export * from "./Mounts.ts";
33
+ export * from "./MountVolume.ts";
34
+ export * from "./Proxy.ts";
35
+ export * from "./RuntimeOwner.ts";
36
+ export * from "./Queue.ts";
37
+ export * from "./ReadApp.ts";
38
+ export * from "./ReadAppHttp.ts";
39
+ export * from "./ReadDict.ts";
40
+ export * from "./ReadDictHttp.ts";
41
+ export * from "./ReadFunction.ts";
42
+ export * from "./ReadFunctionHttp.ts";
43
+ export * from "./ReadQueue.ts";
44
+ export * from "./ReadQueueHttp.ts";
45
+ export * from "./ReadServer.ts";
46
+ export * from "./ReadServerHttp.ts";
47
+ export * from "./ReadVolume.ts";
48
+ export * from "./ReadVolumeHttp.ts";
49
+ export * from "./ReadWriteDict.ts";
50
+ export * from "./ReadWriteDictHttp.ts";
51
+ export * from "./ReadWriteQueue.ts";
52
+ export * from "./ReadWriteQueueHttp.ts";
53
+ export * from "./ReadWriteVolume.ts";
54
+ export * from "./ReadWriteVolumeHttp.ts";
55
+ export * from "./Sandbox.ts";
56
+ export * from "./SandboxClient.ts";
57
+ export * from "./ScaleFunction.ts";
58
+ export * from "./ScaleFunctionHttp.ts";
59
+ export * from "./Secret.ts";
60
+ export * from "./Server.ts";
61
+ export * from "./ServiceUser.ts";
62
+ export * from "./Volume.ts";
63
+ export * from "./VolumeFiles.ts";
64
+ export * from "./WebhookToken.ts";
65
+ export * from "./WorkspaceSettings.ts";
66
+ export * from "./WriteApp.ts";
67
+ export * from "./WriteAppHttp.ts";
68
+ export * from "./WriteDict.ts";
69
+ export * from "./WriteDictHttp.ts";
70
+ export * from "./WriteQueue.ts";
71
+ export * from "./WriteQueueHttp.ts";
72
+ export * from "./WriteSecret.ts";
73
+ export * from "./WriteSecretHttp.ts";
74
+ export * from "./WriteVolume.ts";
75
+ export * from "./WriteVolumeHttp.ts";
76
+ export type { InferEnv } from "./InferEnv.ts";
77
+ export { Credentials, CredentialsFromEnv, DEFAULT_API_BASE_URL, fromAuthProvider, fromToken, } from "./Credentials.ts";
78
+ export { DeployerHostIdentity, HostIdentity } from "./ModalBindings.ts";
79
+ export type { DictHandle, DictsClient } from "./CreateDict.ts";
80
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,cAAc,yB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qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,YAAY,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EACL,WAAW,EACX,kBAAkB,EAClB,oBAAoB,EACpB,gBAAgB,EAChB,SAAS,GACV,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACxE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC"}
package/lib/index.js ADDED
@@ -0,0 +1,78 @@
1
+ export * from "./App.js";
2
+ export * from "./AuthProvider.js";
3
+ export * from "./ConnectSandbox.js";
4
+ export * from "./Container.js";
5
+ export * from "./CreateDict.js";
6
+ export * from "./CreateDictHttp.js";
7
+ export * from "./CreateImage.js";
8
+ export * from "./CreateImageHttp.js";
9
+ export * from "./CreateQueue.js";
10
+ export * from "./CreateQueueHttp.js";
11
+ export * from "./CreateSandbox.js";
12
+ export * from "./CreateSandboxHttp.js";
13
+ export * from "./CreateSecret.js";
14
+ export * from "./CreateSecretHttp.js";
15
+ export * from "./CreateVolume.js";
16
+ export * from "./CreateVolumeHttp.js";
17
+ export * from "./Dict.js";
18
+ export * from "./Domain.js";
19
+ export * from "./Endpoint.js";
20
+ export * from "./Environment.js";
21
+ export * from "./FetchServer.js";
22
+ export * from "./FetchServerHttp.js";
23
+ export * from "./Function.js";
24
+ export * from "./FunctionAutoscaler.js";
25
+ export * from "./Image.js";
26
+ export * from "./ImageBuild.js";
27
+ export * from "./InvokeFunction.js";
28
+ export * from "./InvokeFunctionHttp.js";
29
+ export * from "./Providers.js";
30
+ export * from "./PersistentSandbox.js";
31
+ export * from "./MountBucket.js";
32
+ export * from "./Mounts.js";
33
+ export * from "./MountVolume.js";
34
+ export * from "./Proxy.js";
35
+ export * from "./RuntimeOwner.js";
36
+ export * from "./Queue.js";
37
+ export * from "./ReadApp.js";
38
+ export * from "./ReadAppHttp.js";
39
+ export * from "./ReadDict.js";
40
+ export * from "./ReadDictHttp.js";
41
+ export * from "./ReadFunction.js";
42
+ export * from "./ReadFunctionHttp.js";
43
+ export * from "./ReadQueue.js";
44
+ export * from "./ReadQueueHttp.js";
45
+ export * from "./ReadServer.js";
46
+ export * from "./ReadServerHttp.js";
47
+ export * from "./ReadVolume.js";
48
+ export * from "./ReadVolumeHttp.js";
49
+ export * from "./ReadWriteDict.js";
50
+ export * from "./ReadWriteDictHttp.js";
51
+ export * from "./ReadWriteQueue.js";
52
+ export * from "./ReadWriteQueueHttp.js";
53
+ export * from "./ReadWriteVolume.js";
54
+ export * from "./ReadWriteVolumeHttp.js";
55
+ export * from "./Sandbox.js";
56
+ export * from "./SandboxClient.js";
57
+ export * from "./ScaleFunction.js";
58
+ export * from "./ScaleFunctionHttp.js";
59
+ export * from "./Secret.js";
60
+ export * from "./Server.js";
61
+ export * from "./ServiceUser.js";
62
+ export * from "./Volume.js";
63
+ export * from "./VolumeFiles.js";
64
+ export * from "./WebhookToken.js";
65
+ export * from "./WorkspaceSettings.js";
66
+ export * from "./WriteApp.js";
67
+ export * from "./WriteAppHttp.js";
68
+ export * from "./WriteDict.js";
69
+ export * from "./WriteDictHttp.js";
70
+ export * from "./WriteQueue.js";
71
+ export * from "./WriteQueueHttp.js";
72
+ export * from "./WriteSecret.js";
73
+ export * from "./WriteSecretHttp.js";
74
+ export * from "./WriteVolume.js";
75
+ export * from "./WriteVolumeHttp.js";
76
+ export { Credentials, CredentialsFromEnv, DEFAULT_API_BASE_URL, fromAuthProvider, fromToken, } from "./Credentials.js";
77
+ export { DeployerHostIdentity, HostIdentity } from "./ModalBindings.js";
78
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,mBAA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BAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AAErC,OAAO,EACL,WAAW,EACX,kBAAkB,EAClB,oBAAoB,EACpB,gBAAgB,EAChB,SAAS,GACV,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,29 @@
1
+ import type { PropsInput } from "alchemy/Input";
2
+ import * as Output from "alchemy/Output";
3
+ import * as Effect from "effect/Effect";
4
+ import * as Redacted from "effect/Redacted";
5
+ import type { Providers } from "../Providers.ts";
6
+ type Leaf = string | number | boolean | bigint | symbol | null | undefined | Redacted.Redacted<any> | Uint8Array | Date | ((...args: any[]) => any);
7
+ /**
8
+ * A prop value, or the declaration of a resource that has it: `app: Backend`
9
+ * instead of `app: yield* Backend`, at any depth.
10
+ */
11
+ export type Declared<T> = T extends Leaf ? T : T extends Output.Output<any> ? T : T extends ReadonlyArray<infer U> ? Declared<U>[] | Effect.Effect<T, never, Providers> : {
12
+ [K in keyof T]: Declared<T[K]>;
13
+ } | Effect.Effect<T, never, Providers>;
14
+ /** Props where any value may be a resource declaration. */
15
+ export type DeclaredProps<P> = {
16
+ [K in keyof PropsInput<P>]: Declared<PropsInput<P>[K]>;
17
+ };
18
+ /** Yield every declaration in `value`, at any depth. */
19
+ export declare const resolveDeclarations: (value: unknown) => Effect.Effect<unknown, never, Providers>;
20
+ /**
21
+ * Let a resource's props hold declarations of other resources, which are
22
+ * yielded when the resource is: `Modal.Image("Node", { app: Backend })`.
23
+ * Props without declarations are passed through unchanged.
24
+ */
25
+ export declare const declarable: <R extends {
26
+ readonly Props: any;
27
+ }>() => <C extends object>(resource: C) => C & ((id: string, props: DeclaredProps<R["Props"]>) => Effect.Effect<R, never, Providers>);
28
+ export {};
29
+ //# sourceMappingURL=Declared.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Declared.d.ts","sources":["../../src/internal/Declared.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AAEzC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjD,KAAK,IAAI,GACL,MAAM,GACN,MAAM,GACN,OAAO,GACP,MAAM,GACN,MAAM,GACN,IAAI,GACJ,SAAS,GACT,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,GACtB,UAAU,GACV,IAAI,GACJ,CAAC,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC,CAAC;AAE9B;;;GAGG;AACH,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI,CAAC,SAAS,IAAI,GACpC,CAAC,GACD,CAAC,SAAS,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,GAC1B,CAAC,GACD,CAAC,SAAS,aAAa,CAAC,MAAM,CAAC,CAAC,GAC9B,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,GAClD;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;AAEhF,2DAA2D;AAC3D,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,UAAU,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC;AAgB1F,wDAAwD;AACxD,eAAO,MAAM,mBAAmB,UAAW,OAAO,KAAG,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,EAAE,SAAS,CAY7D,CAAC;AAEhC;;;;GAIG;AACH,eAAO,MAAM,UAAU,GACpB,CAAC,SAAS;IAAE,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAA;CAAE,QACjC,CAAC,SAAS,MAAM,YACL,CAAC,KACV,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,KAAK,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,CAM/E,CAAC"}
@@ -0,0 +1,31 @@
1
+ import * as Output from "alchemy/Output";
2
+ import { isResource } from "alchemy/Resource";
3
+ import * as Effect from "effect/Effect";
4
+ import * as Redacted from "effect/Redacted";
5
+ const isPlain = (value) => typeof value === "object" &&
6
+ value !== null &&
7
+ (Object.getPrototypeOf(value) === Object.prototype || Object.getPrototypeOf(value) === null);
8
+ /** A declaration still to be yielded: an Effect that isn't an Output or a resource. */
9
+ const isDeclaration = (value) => Effect.isEffect(value) && !Output.isOutput(value) && !isResource(value);
10
+ const hasDeclarations = (value) => isDeclaration(value) ||
11
+ (Array.isArray(value) && value.some(hasDeclarations)) ||
12
+ (isPlain(value) && !isResource(value) && Object.values(value).some(hasDeclarations));
13
+ /** Yield every declaration in `value`, at any depth. */
14
+ export const resolveDeclarations = (value) => isDeclaration(value)
15
+ ? value
16
+ : Array.isArray(value)
17
+ ? Effect.forEach(value, resolveDeclarations)
18
+ : isPlain(value) && !isResource(value) && hasDeclarations(value)
19
+ ? Effect.map(Effect.forEach(Object.entries(value), ([key, entry]) => Effect.map(resolveDeclarations(entry), (resolved) => [key, resolved])), Object.fromEntries)
20
+ : Effect.succeed(value);
21
+ /**
22
+ * Let a resource's props hold declarations of other resources, which are
23
+ * yielded when the resource is: `Modal.Image("Node", { app: Backend })`.
24
+ * Props without declarations are passed through unchanged.
25
+ */
26
+ export const declarable = () => (resource) => new Proxy(resource, {
27
+ apply: (target, self, args) => typeof args[0] === "string" && hasDeclarations(args[1])
28
+ ? Reflect.apply(target, self, [args[0], resolveDeclarations(args[1])])
29
+ : Reflect.apply(target, self, args),
30
+ });
31
+ //# sourceMappingURL=Declared.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Declared.js","sources":["../../src/internal/Declared.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AA+B5C,MAAM,OAAO,GAAG,CAAC,KAAc,EAAoC,EAAE,CACnE,OAAO,KAAK,KAAK,QAAQ;IACzB,KAAK,KAAK,IAAI;IACd,CAAC,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,KAAK,MAAM,CAAC,SAAS,IA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AAQ,CAAU,CAAC,CAC/E,EACD,MAAM,CAAC,WAAW,CACnB;YACH,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAEhC;;;;GAIG;AACH,MAAM,CAAC,MAAM,UAAU,GACrB,GAAsC,EAAE,CACxC,CACE,QAAW,EACiF,EAAE,CAC9F,IAAI,KAAK,CAAC,QAAiD,EAAE;IAC3D,KAAK,EAAE,CAAC,MAAM,EAAE,IAAI,EAAE,IAAe,EAAE,EAAE,CACvC,OAAO,IAAI,CAAC,CAAC,CAAC,KAAK,QAAQ,IAAI,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACrD,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,mBAAmB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACtE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC;CACxC,CAAU,CAAC"}
@@ -0,0 +1,110 @@
1
+ import * as BuildPlan from "@alchemy.run/docker/BuildPlan";
2
+ import * as app from "@distilled.cloud/modal/app";
3
+ import * as mount from "@distilled.cloud/modal/mount";
4
+ import type * as Bundle from "alchemy/Bundle/Bundle";
5
+ import { type MountCapability } from "alchemy/Mount";
6
+ import * as Effect from "effect/Effect";
7
+ import { type ImageBuildSpec } from "../ImageBuild.ts";
8
+ declare const ModalDeployUnexpectedResponse_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
9
+ readonly _tag: "Modal.DeployUnexpectedResponse";
10
+ } & Readonly<A>;
11
+ /** Modal returned a response without a field the deploy needs. */
12
+ export declare class ModalDeployUnexpectedResponse extends ModalDeployUnexpectedResponse_base<{
13
+ readonly message: string;
14
+ }> {
15
+ }
16
+ /**
17
+ * The Modal Python client whose container entrypoint runs the function.
18
+ * Modal publishes it as the global mount `modal-client-mount-<version>`.
19
+ */
20
+ export declare const MODAL_CLIENT_VERSION = "1.6.3";
21
+ /** The Python version added to a base image without one. */
22
+ export declare const DEFAULT_PYTHON = "3.12";
23
+ /** Port the program listens on when the resource doesn't set one. */
24
+ export declare const DEFAULT_PORT = 8000;
25
+ /** The mount holding Modal's Python client, which runs the container entrypoint. */
26
+ export declare const clientMount: Effect.Effect<string, ModalDeployUnexpectedResponse | mount.MountGetOrCreateError, app.ModalOpContext>;
27
+ /**
28
+ * Upload {@link ENTRYPOINT_SOURCE} as a mount owned by the app. Modal stores
29
+ * files by content hash, so redeploys reuse it.
30
+ */
31
+ export declare const entrypointMount: (appId: string) => Effect.Effect<string, import("@distilled.cloud/core/errors").BadGateway | import("@distilled.cloud/core/config").ConfigError | import("@distilled.cloud/core/errors").GatewayTimeout | import("effect/http/HttpClientError").HttpClientError | import("@distilled.cloud/core/errors").InternalServerError | import("@distilled.cloud/core/protocol-http").InvalidInput | ModalDeployUnexpectedResponse | import("@distilled.cloud/modal/Errors").ModalParseError | mount.MountNotFound | import("@distilled.cloud/core/sdk-error").SdkError | import("@distilled.cloud/core/errors").ServiceUnavailable | import("@distilled.cloud/core/errors").TooManyRequests | import("@distilled.cloud/core/errors").Unauthorized | import("@distilled.cloud/modal/Errors").UnknownModalError, app.ModalOpContext>;
32
+ /** What a runtime's image is built from. */
33
+ export interface RuntimeImageInput {
34
+ readonly main: string;
35
+ readonly image?: string;
36
+ readonly commands?: ReadonlyArray<string>;
37
+ readonly handler?: string;
38
+ readonly build?: Bundle.BundleConfig;
39
+ readonly isExternal?: boolean;
40
+ readonly python?: string | false;
41
+ readonly builderVersion?: string;
42
+ readonly gpu?: string;
43
+ }
44
+ /**
45
+ * Plan a runtime's image with the shared BuildPlan: the bundled program on
46
+ * its base image, without the image's `ENTRYPOINT`/`CMD` (Modal starts the
47
+ * container with its own Python entrypoint, which then runs the program).
48
+ */
49
+ export declare const planRuntimeImage: (target: string, input: RuntimeImageInput, port: number, bootstrap: ((importPath: string) => string) | undefined, capabilities?: readonly MountCapability[] | undefined) => Effect.Effect<{
50
+ plan: {
51
+ hash: string;
52
+ platform: string;
53
+ dockerfile: import("@alchemy.run/docker/DockerfileParser").ParsedDockerfile;
54
+ base: string;
55
+ pull: import("@alchemy.run/docker/Registry").ImageRegistry | undefined;
56
+ instructions: readonly import("@alchemy.run/docker/DockerfileParser").Instruction[];
57
+ files: BuildPlan.ContextFile[];
58
+ args: Record<string, string>;
59
+ secrets: Record<string, import("effect/Redacted").Redacted<string>>;
60
+ warnings: string[];
61
+ };
62
+ command: string[];
63
+ hash: string;
64
+ warnings: string[];
65
+ spec: {
66
+ contextFiles: {
67
+ filename: string;
68
+ data: Uint8Array<ArrayBufferLike>;
69
+ mode: number;
70
+ }[];
71
+ buildArgs: Readonly<Record<string, string>>;
72
+ commands: string[];
73
+ };
74
+ python: string | false;
75
+ }, import("@alchemy.run/docker/BuildHash").BuildHashInvalidProps | BuildPlan.BuildPlanError | Bundle.BundleError | import("@alchemy.run/docker/DockerfileParser").DockerfileSyntaxError | import("alchemy/Mount").MountUnsupported | import("effect/PlatformError").PlatformError | BuildPlan.UnsupportedDockerfile, import("effect/FileSystem").FileSystem | import("effect/Path").Path>;
76
+ /**
77
+ * Build a runtime's image: the base, a layer adding standalone Python
78
+ * (unless `python: false`), then the program.
79
+ */
80
+ export declare const buildRuntimeImage: (appId: string, planned: {
81
+ readonly plan: BuildPlan.BuildPlan;
82
+ readonly spec: ImageBuildSpec;
83
+ readonly python: string | false;
84
+ }, options: {
85
+ readonly builderVersion?: string;
86
+ readonly gpu?: string;
87
+ readonly note?: (message: string) => Effect.Effect<void>;
88
+ }) => Effect.Effect<string, import("../Blob.ts").BlobTransferFailed | import("../ImageBuild.ts").ImageBuildFailed | import("../ImageBuild.ts").ImageBuildTimeout | import("../ImageBuild.ts").ImageBuildUnexpectedResponse | import("@distilled.cloud/modal/image").ImageNotFound | ModalDeployUnexpectedResponse | mount.MountGetOrCreateError, import("@distilled.cloud/modal/Credentials").Credentials | import("effect/http/HttpClient").HttpClient>;
89
+ /**
90
+ * Publish the App with `tag` pointing at `created` (or removed, when
91
+ * `created` is `undefined`), keeping every other function and class the
92
+ * App serves. Modal deploys an App as a whole, so a publish carries the full
93
+ * map read back from the App's current layout.
94
+ *
95
+ * A class function (one with a `classId`) is published as Modal's clients
96
+ * publish `@app.cls`: its service function under `<tag>.*` and its class
97
+ * under `<tag>`, where its containers look the class up.
98
+ */
99
+ /** The service function name of the class `tag`, as Modal's clients name it. */
100
+ export declare const classTag: (tag: string) => string;
101
+ export declare const publishFunction: (target: {
102
+ readonly appId: string;
103
+ readonly appName: string | undefined;
104
+ }, tag: string, created: {
105
+ readonly functionId: string;
106
+ readonly definitionId: string | undefined;
107
+ readonly classId?: string | undefined;
108
+ } | undefined) => Effect.Effect<app.PublishAppResponse, app.AppNotFound | import("@distilled.cloud/core/errors").BadGateway | import("@distilled.cloud/core/config").ConfigError | import("@distilled.cloud/core/errors").GatewayTimeout | import("effect/http/HttpClientError").HttpClientError | import("@distilled.cloud/core/errors").InternalServerError | import("@distilled.cloud/core/protocol-http").InvalidInput | import("@distilled.cloud/modal/Errors").ModalParseError | import("@distilled.cloud/core/sdk-error").SdkError | import("@distilled.cloud/core/errors").ServiceUnavailable | import("@distilled.cloud/core/errors").TooManyRequests | import("@distilled.cloud/core/errors").Unauthorized | import("@distilled.cloud/modal/Errors").UnknownModalError, app.ModalOpContext>;
109
+ export {};
110
+ //# sourceMappingURL=Deploy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Deploy.d.ts","sources":["../../src/internal/Deploy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,+BAA+B,CAAC;AAC3D,OAAO,KAAK,GAAG,MAAM,4BAA4B,CAAC;AAClD,OAAO,KAAK,KAAK,MAAM,8BAA8B,CAAC;AAEtD,OAAO,KAAK,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