alchemy 2.0.0-beta.76 → 2.0.0-beta.77

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 (1418) hide show
  1. package/README.md +1 -1
  2. package/THIRD_PARTY_LICENSES.md +11 -11
  3. package/bin/cli.js +88 -11
  4. package/bin/exec.js +11828 -5720
  5. package/bin/exec.js.map +1 -1
  6. package/bin/register-oxc.js +27 -0
  7. package/lib/AWS/AMP/Scraper.js +1 -1
  8. package/lib/AWS/AMP/Scraper.js.map +1 -1
  9. package/lib/AWS/AppRunner/Service.d.ts +11 -27
  10. package/lib/AWS/AppRunner/Service.d.ts.map +1 -1
  11. package/lib/AWS/AppRunner/Service.js +7 -21
  12. package/lib/AWS/AppRunner/Service.js.map +1 -1
  13. package/lib/AWS/Assets.d.ts +1 -1
  14. package/lib/AWS/Assets.js +2 -2
  15. package/lib/AWS/Assets.js.map +1 -1
  16. package/lib/AWS/AuthProvider.d.ts +40 -53
  17. package/lib/AWS/AuthProvider.d.ts.map +1 -1
  18. package/lib/AWS/AuthProvider.js +480 -215
  19. package/lib/AWS/AuthProvider.js.map +1 -1
  20. package/lib/AWS/Batch/JobDefinition.d.ts +11 -27
  21. package/lib/AWS/Batch/JobDefinition.d.ts.map +1 -1
  22. package/lib/AWS/Batch/JobDefinition.js +7 -21
  23. package/lib/AWS/Batch/JobDefinition.js.map +1 -1
  24. package/lib/AWS/EC2/GetAmi.d.ts +2 -0
  25. package/lib/AWS/EC2/GetAmi.d.ts.map +1 -1
  26. package/lib/AWS/EC2/Instance.d.ts +11 -27
  27. package/lib/AWS/EC2/Instance.d.ts.map +1 -1
  28. package/lib/AWS/EC2/Instance.js +7 -21
  29. package/lib/AWS/EC2/Instance.js.map +1 -1
  30. package/lib/AWS/EC2/hosted.d.ts +5 -6
  31. package/lib/AWS/EC2/hosted.d.ts.map +1 -1
  32. package/lib/AWS/EC2/hosted.js.map +1 -1
  33. package/lib/AWS/ECR/Image.d.ts +1 -1
  34. package/lib/AWS/ECR/ImageSource.d.ts +4 -5
  35. package/lib/AWS/ECR/ImageSource.d.ts.map +1 -1
  36. package/lib/AWS/ECR/ImageSource.js.map +1 -1
  37. package/lib/AWS/ECS/Service.d.ts +7 -21
  38. package/lib/AWS/ECS/Service.d.ts.map +1 -1
  39. package/lib/AWS/ECS/Service.js +7 -21
  40. package/lib/AWS/ECS/Service.js.map +1 -1
  41. package/lib/AWS/ECS/Task.d.ts +7 -21
  42. package/lib/AWS/ECS/Task.d.ts.map +1 -1
  43. package/lib/AWS/ECS/Task.js +7 -21
  44. package/lib/AWS/ECS/Task.js.map +1 -1
  45. package/lib/AWS/ElastiCache/CacheCluster.d.ts +60 -0
  46. package/lib/AWS/ElastiCache/CacheCluster.d.ts.map +1 -0
  47. package/lib/AWS/ElastiCache/CacheCluster.js +199 -0
  48. package/lib/AWS/ElastiCache/CacheCluster.js.map +1 -0
  49. package/lib/AWS/ElastiCache/ConnectCacheCluster.d.ts +46 -0
  50. package/lib/AWS/ElastiCache/ConnectCacheCluster.d.ts.map +1 -0
  51. package/lib/AWS/ElastiCache/ConnectCacheCluster.js +5 -0
  52. package/lib/AWS/ElastiCache/ConnectCacheCluster.js.map +1 -0
  53. package/lib/AWS/ElastiCache/ConnectCacheClusterHttp.d.ts +4 -0
  54. package/lib/AWS/ElastiCache/ConnectCacheClusterHttp.d.ts.map +1 -0
  55. package/lib/AWS/ElastiCache/ConnectCacheClusterHttp.js +52 -0
  56. package/lib/AWS/ElastiCache/ConnectCacheClusterHttp.js.map +1 -0
  57. package/lib/AWS/ElastiCache/ConnectReplicationGroup.d.ts +47 -0
  58. package/lib/AWS/ElastiCache/ConnectReplicationGroup.d.ts.map +1 -0
  59. package/lib/AWS/ElastiCache/ConnectReplicationGroup.js +5 -0
  60. package/lib/AWS/ElastiCache/ConnectReplicationGroup.js.map +1 -0
  61. package/lib/AWS/ElastiCache/ConnectReplicationGroupHttp.d.ts +4 -0
  62. package/lib/AWS/ElastiCache/ConnectReplicationGroupHttp.d.ts.map +1 -0
  63. package/lib/AWS/ElastiCache/ConnectReplicationGroupHttp.js +77 -0
  64. package/lib/AWS/ElastiCache/ConnectReplicationGroupHttp.js.map +1 -0
  65. package/lib/AWS/ElastiCache/ReplicationGroup.d.ts +95 -0
  66. package/lib/AWS/ElastiCache/ReplicationGroup.d.ts.map +1 -0
  67. package/lib/AWS/ElastiCache/ReplicationGroup.js +383 -0
  68. package/lib/AWS/ElastiCache/ReplicationGroup.js.map +1 -0
  69. package/lib/AWS/ElastiCache/SubnetGroup.d.ts +39 -0
  70. package/lib/AWS/ElastiCache/SubnetGroup.d.ts.map +1 -0
  71. package/lib/AWS/ElastiCache/SubnetGroup.js +136 -0
  72. package/lib/AWS/ElastiCache/SubnetGroup.js.map +1 -0
  73. package/lib/AWS/ElastiCache/index.d.ts +7 -0
  74. package/lib/AWS/ElastiCache/index.d.ts.map +1 -1
  75. package/lib/AWS/ElastiCache/index.js +7 -0
  76. package/lib/AWS/ElastiCache/index.js.map +1 -1
  77. package/lib/AWS/ElastiCache/internal.d.ts +13 -0
  78. package/lib/AWS/ElastiCache/internal.d.ts.map +1 -0
  79. package/lib/AWS/ElastiCache/internal.js +19 -0
  80. package/lib/AWS/ElastiCache/internal.js.map +1 -0
  81. package/lib/AWS/Environment.d.ts +2 -3
  82. package/lib/AWS/Environment.d.ts.map +1 -1
  83. package/lib/AWS/Environment.js +11 -41
  84. package/lib/AWS/Environment.js.map +1 -1
  85. package/lib/AWS/IAM/actions.generated.js +1 -1
  86. package/lib/AWS/IAM/actions.generated.js.map +1 -1
  87. package/lib/AWS/IdentityCenter/AccountAssignment.js +6 -0
  88. package/lib/AWS/IdentityCenter/AccountAssignment.js.map +1 -1
  89. package/lib/AWS/Lambda/Function.d.ts +14 -23
  90. package/lib/AWS/Lambda/Function.d.ts.map +1 -1
  91. package/lib/AWS/Lambda/Function.js +15 -20
  92. package/lib/AWS/Lambda/Function.js.map +1 -1
  93. package/lib/AWS/Lambda/MicrovmImage.d.ts +12 -28
  94. package/lib/AWS/Lambda/MicrovmImage.d.ts.map +1 -1
  95. package/lib/AWS/Lambda/MicrovmImage.js +8 -22
  96. package/lib/AWS/Lambda/MicrovmImage.js.map +1 -1
  97. package/lib/AWS/Local/DevWatchProvider.d.ts.map +1 -1
  98. package/lib/AWS/Local/DevWatchProvider.js +10 -1
  99. package/lib/AWS/Local/DevWatchProvider.js.map +1 -1
  100. package/lib/AWS/Organizations/Account.d.ts +2 -2
  101. package/lib/AWS/Organizations/Account.d.ts.map +1 -1
  102. package/lib/AWS/Organizations/Account.js +16 -8
  103. package/lib/AWS/Organizations/Account.js.map +1 -1
  104. package/lib/AWS/Organizations/DelegatedAdministrator.d.ts +2 -3
  105. package/lib/AWS/Organizations/DelegatedAdministrator.d.ts.map +1 -1
  106. package/lib/AWS/Organizations/DelegatedAdministrator.js +5 -5
  107. package/lib/AWS/Organizations/DelegatedAdministrator.js.map +1 -1
  108. package/lib/AWS/Organizations/Organization.d.ts +1 -1
  109. package/lib/AWS/Organizations/Organization.d.ts.map +1 -1
  110. package/lib/AWS/Organizations/Organization.js +2 -2
  111. package/lib/AWS/Organizations/Organization.js.map +1 -1
  112. package/lib/AWS/Organizations/common.d.ts +9 -0
  113. package/lib/AWS/Organizations/common.d.ts.map +1 -1
  114. package/lib/AWS/Organizations/common.js +13 -0
  115. package/lib/AWS/Organizations/common.js.map +1 -1
  116. package/lib/AWS/Providers.d.ts.map +1 -1
  117. package/lib/AWS/Providers.js +4 -1
  118. package/lib/AWS/Providers.js.map +1 -1
  119. package/lib/AWS/StateStore/State.d.ts +1 -1
  120. package/lib/AWS/StateStore/State.d.ts.map +1 -1
  121. package/lib/Alchemist/Errors.d.ts +31 -0
  122. package/lib/Alchemist/Errors.d.ts.map +1 -0
  123. package/lib/Alchemist/Errors.js +19 -0
  124. package/lib/Alchemist/Errors.js.map +1 -0
  125. package/lib/Alchemist/Progress.d.ts +16 -0
  126. package/lib/Alchemist/Progress.d.ts.map +1 -0
  127. package/lib/Alchemist/Progress.js +129 -0
  128. package/lib/Alchemist/Progress.js.map +1 -0
  129. package/lib/Alchemist/Runtime.d.ts +22 -0
  130. package/lib/Alchemist/Runtime.d.ts.map +1 -0
  131. package/lib/Alchemist/Runtime.js +28 -0
  132. package/lib/Alchemist/Runtime.js.map +1 -0
  133. package/lib/Alchemist/Session.d.ts +124 -0
  134. package/lib/Alchemist/Session.d.ts.map +1 -0
  135. package/lib/Alchemist/Session.js +223 -0
  136. package/lib/Alchemist/Session.js.map +1 -0
  137. package/lib/Alchemist/index.d.ts +15 -0
  138. package/lib/Alchemist/index.d.ts.map +1 -0
  139. package/lib/Alchemist/index.js +15 -0
  140. package/lib/Alchemist/index.js.map +1 -0
  141. package/lib/Alchemist/routes/aws.d.ts +21 -0
  142. package/lib/Alchemist/routes/aws.d.ts.map +1 -0
  143. package/lib/Alchemist/routes/aws.js +54 -0
  144. package/lib/Alchemist/routes/aws.js.map +1 -0
  145. package/lib/Alchemist/routes/cloudflare.d.ts +63 -0
  146. package/lib/Alchemist/routes/cloudflare.d.ts.map +1 -0
  147. package/lib/Alchemist/routes/cloudflare.js +113 -0
  148. package/lib/Alchemist/routes/cloudflare.js.map +1 -0
  149. package/lib/Alchemist/routes/cloudflareToken.d.ts +93 -0
  150. package/lib/Alchemist/routes/cloudflareToken.d.ts.map +1 -0
  151. package/lib/Alchemist/routes/cloudflareToken.js +111 -0
  152. package/lib/Alchemist/routes/cloudflareToken.js.map +1 -0
  153. package/lib/Alchemist/routes/drift.d.ts +55 -0
  154. package/lib/Alchemist/routes/drift.d.ts.map +1 -0
  155. package/lib/Alchemist/routes/drift.js +52 -0
  156. package/lib/Alchemist/routes/drift.js.map +1 -0
  157. package/lib/Alchemist/routes/logs.d.ts +41 -0
  158. package/lib/Alchemist/routes/logs.d.ts.map +1 -0
  159. package/lib/Alchemist/routes/logs.js +112 -0
  160. package/lib/Alchemist/routes/logs.js.map +1 -0
  161. package/lib/Alchemist/routes/nuke.d.ts +46 -0
  162. package/lib/Alchemist/routes/nuke.d.ts.map +1 -0
  163. package/lib/Alchemist/routes/nuke.js +80 -0
  164. package/lib/Alchemist/routes/nuke.js.map +1 -0
  165. package/lib/Alchemist/routes/profile.d.ts +133 -0
  166. package/lib/Alchemist/routes/profile.d.ts.map +1 -0
  167. package/lib/Alchemist/routes/profile.js +257 -0
  168. package/lib/Alchemist/routes/profile.js.map +1 -0
  169. package/lib/Alchemist/routes/provider.d.ts +33 -0
  170. package/lib/Alchemist/routes/provider.d.ts.map +1 -0
  171. package/lib/Alchemist/routes/provider.js +65 -0
  172. package/lib/Alchemist/routes/provider.js.map +1 -0
  173. package/lib/Alchemist/routes/stack.d.ts +78 -0
  174. package/lib/Alchemist/routes/stack.d.ts.map +1 -0
  175. package/lib/Alchemist/routes/stack.js +67 -0
  176. package/lib/Alchemist/routes/stack.js.map +1 -0
  177. package/lib/Alchemist/routes/state.d.ts +35 -0
  178. package/lib/Alchemist/routes/state.d.ts.map +1 -0
  179. package/lib/Alchemist/routes/state.js +42 -0
  180. package/lib/Alchemist/routes/state.js.map +1 -0
  181. package/lib/Apply.d.ts +8 -6
  182. package/lib/Apply.d.ts.map +1 -1
  183. package/lib/Apply.js +209 -103
  184. package/lib/Apply.js.map +1 -1
  185. package/lib/Auth/AuthProvider.d.ts +201 -25
  186. package/lib/Auth/AuthProvider.d.ts.map +1 -1
  187. package/lib/Auth/AuthProvider.js +180 -40
  188. package/lib/Auth/AuthProvider.js.map +1 -1
  189. package/lib/Auth/BrowserOAuth.d.ts +27 -0
  190. package/lib/Auth/BrowserOAuth.d.ts.map +1 -0
  191. package/lib/Auth/BrowserOAuth.js +41 -0
  192. package/lib/Auth/BrowserOAuth.js.map +1 -0
  193. package/lib/Auth/Credentials.d.ts +11 -6
  194. package/lib/Auth/Credentials.d.ts.map +1 -1
  195. package/lib/Auth/Credentials.js +62 -23
  196. package/lib/Auth/Credentials.js.map +1 -1
  197. package/lib/Auth/CredentialsCache.d.ts +15 -0
  198. package/lib/Auth/CredentialsCache.d.ts.map +1 -0
  199. package/lib/Auth/CredentialsCache.js +34 -0
  200. package/lib/Auth/CredentialsCache.js.map +1 -0
  201. package/lib/Auth/Demand.d.ts +59 -34
  202. package/lib/Auth/Demand.d.ts.map +1 -1
  203. package/lib/Auth/Demand.js +150 -60
  204. package/lib/Auth/Demand.js.map +1 -1
  205. package/lib/Auth/Env.d.ts +4 -4
  206. package/lib/Auth/Env.d.ts.map +1 -1
  207. package/lib/Auth/Env.js +18 -9
  208. package/lib/Auth/Env.js.map +1 -1
  209. package/lib/Auth/Inspect.d.ts +33 -0
  210. package/lib/Auth/Inspect.d.ts.map +1 -0
  211. package/lib/Auth/Inspect.js +67 -0
  212. package/lib/Auth/Inspect.js.map +1 -0
  213. package/lib/Auth/Lock.d.ts +6 -0
  214. package/lib/Auth/Lock.d.ts.map +1 -1
  215. package/lib/Auth/Lock.js +22 -11
  216. package/lib/Auth/Lock.js.map +1 -1
  217. package/lib/Auth/OAuthFlow.d.ts +119 -0
  218. package/lib/Auth/OAuthFlow.d.ts.map +1 -0
  219. package/lib/Auth/OAuthFlow.js +314 -0
  220. package/lib/Auth/OAuthFlow.js.map +1 -0
  221. package/lib/Auth/Paths.d.ts +18 -0
  222. package/lib/Auth/Paths.d.ts.map +1 -0
  223. package/lib/Auth/Paths.js +20 -0
  224. package/lib/Auth/Paths.js.map +1 -0
  225. package/lib/Auth/Profile.d.ts +91 -67
  226. package/lib/Auth/Profile.d.ts.map +1 -1
  227. package/lib/Auth/Profile.js +449 -92
  228. package/lib/Auth/Profile.js.map +1 -1
  229. package/lib/Auth/Resolve.d.ts +42 -0
  230. package/lib/Auth/Resolve.d.ts.map +1 -0
  231. package/lib/Auth/Resolve.js +90 -0
  232. package/lib/Auth/Resolve.js.map +1 -0
  233. package/lib/Auth/StoredAuthProvider.d.ts +84 -0
  234. package/lib/Auth/StoredAuthProvider.d.ts.map +1 -0
  235. package/lib/Auth/StoredAuthProvider.js +179 -0
  236. package/lib/Auth/StoredAuthProvider.js.map +1 -0
  237. package/lib/Auth/index.d.ts +1 -0
  238. package/lib/Auth/index.d.ts.map +1 -1
  239. package/lib/Auth/index.js +1 -0
  240. package/lib/Auth/index.js.map +1 -1
  241. package/lib/Axiom/AuthProvider.d.ts +17 -26
  242. package/lib/Axiom/AuthProvider.d.ts.map +1 -1
  243. package/lib/Axiom/AuthProvider.js +89 -172
  244. package/lib/Axiom/AuthProvider.js.map +1 -1
  245. package/lib/Axiom/Credentials.d.ts +2 -4
  246. package/lib/Axiom/Credentials.d.ts.map +1 -1
  247. package/lib/Axiom/Credentials.js +5 -10
  248. package/lib/Axiom/Credentials.js.map +1 -1
  249. package/lib/Axiom/Providers.d.ts +2 -2
  250. package/lib/Axiom/Providers.d.ts.map +1 -1
  251. package/lib/Axiom/Providers.js +3 -3
  252. package/lib/Axiom/Providers.js.map +1 -1
  253. package/lib/Bundle/Bundle.d.ts +3 -5
  254. package/lib/Bundle/Bundle.d.ts.map +1 -1
  255. package/lib/Bundle/Bundle.js.map +1 -1
  256. package/lib/Cli/CliKit/CliKit.d.ts +92 -0
  257. package/lib/Cli/CliKit/CliKit.d.ts.map +1 -0
  258. package/lib/Cli/CliKit/CliKit.js +27 -0
  259. package/lib/Cli/CliKit/CliKit.js.map +1 -0
  260. package/lib/Cli/CliKit/index.d.ts +9 -0
  261. package/lib/Cli/CliKit/index.d.ts.map +1 -0
  262. package/lib/Cli/CliKit/index.js +9 -0
  263. package/lib/Cli/CliKit/index.js.map +1 -0
  264. package/lib/Cli/CliKit/interaction.d.ts +13 -0
  265. package/lib/Cli/CliKit/interaction.d.ts.map +1 -0
  266. package/lib/Cli/CliKit/interaction.js +17 -0
  267. package/lib/Cli/CliKit/interaction.js.map +1 -0
  268. package/lib/Cli/CliKit/layer.d.ts +7 -0
  269. package/lib/Cli/CliKit/layer.d.ts.map +1 -0
  270. package/lib/Cli/CliKit/layer.js +34 -0
  271. package/lib/Cli/CliKit/layer.js.map +1 -0
  272. package/lib/Cli/DevOptions.d.ts +17 -0
  273. package/lib/Cli/DevOptions.d.ts.map +1 -0
  274. package/lib/Cli/DevOptions.js +16 -0
  275. package/lib/Cli/DevOptions.js.map +1 -0
  276. package/lib/Cli/Format.d.ts +5 -0
  277. package/lib/Cli/Format.d.ts.map +1 -0
  278. package/lib/Cli/Format.js +27 -0
  279. package/lib/Cli/Format.js.map +1 -0
  280. package/lib/Cli/GlobalLog.d.ts +41 -0
  281. package/lib/Cli/GlobalLog.d.ts.map +1 -0
  282. package/lib/Cli/GlobalLog.js +112 -0
  283. package/lib/Cli/GlobalLog.js.map +1 -0
  284. package/lib/Cli/LoggingCli.d.ts +4 -3
  285. package/lib/Cli/LoggingCli.d.ts.map +1 -1
  286. package/lib/Cli/LoggingCli.js +240 -100
  287. package/lib/Cli/LoggingCli.js.map +1 -1
  288. package/lib/Cli/ModeTag.d.ts +1 -1
  289. package/lib/Cli/ModeTag.js +1 -1
  290. package/lib/Cli/NamespaceTree.d.ts +18 -8
  291. package/lib/Cli/NamespaceTree.d.ts.map +1 -1
  292. package/lib/Cli/NamespaceTree.js +52 -11
  293. package/lib/Cli/NamespaceTree.js.map +1 -1
  294. package/lib/Cli/PlainCliFormatter.d.ts +11 -0
  295. package/lib/Cli/PlainCliFormatter.d.ts.map +1 -0
  296. package/lib/Cli/PlainCliFormatter.js +70 -0
  297. package/lib/Cli/PlainCliFormatter.js.map +1 -0
  298. package/lib/Cli/PropertyDiff.d.ts +37 -0
  299. package/lib/Cli/PropertyDiff.d.ts.map +1 -0
  300. package/lib/Cli/PropertyDiff.js +162 -0
  301. package/lib/Cli/PropertyDiff.js.map +1 -0
  302. package/lib/Cli/checkVersion.d.ts.map +1 -1
  303. package/lib/Cli/checkVersion.js +10 -6
  304. package/lib/Cli/checkVersion.js.map +1 -1
  305. package/lib/Cli/commands/aws.d.ts +2 -4
  306. package/lib/Cli/commands/aws.d.ts.map +1 -1
  307. package/lib/Cli/commands/aws.js +43 -55
  308. package/lib/Cli/commands/aws.js.map +1 -1
  309. package/lib/Cli/commands/cloudflare.d.ts +6 -7
  310. package/lib/Cli/commands/cloudflare.d.ts.map +1 -1
  311. package/lib/Cli/commands/cloudflare.js +149 -307
  312. package/lib/Cli/commands/cloudflare.js.map +1 -1
  313. package/lib/Cli/commands/compat.d.ts +11 -0
  314. package/lib/Cli/commands/compat.d.ts.map +1 -0
  315. package/lib/Cli/commands/compat.js +19 -0
  316. package/lib/Cli/commands/compat.js.map +1 -0
  317. package/lib/Cli/commands/confirm.d.ts +33 -0
  318. package/lib/Cli/commands/confirm.d.ts.map +1 -0
  319. package/lib/Cli/commands/confirm.js +39 -0
  320. package/lib/Cli/commands/confirm.js.map +1 -0
  321. package/lib/Cli/commands/deploy.d.ts +20 -32
  322. package/lib/Cli/commands/deploy.d.ts.map +1 -1
  323. package/lib/Cli/commands/deploy.js +140 -140
  324. package/lib/Cli/commands/deploy.js.map +1 -1
  325. package/lib/Cli/commands/dev.d.ts +5 -4
  326. package/lib/Cli/commands/dev.d.ts.map +1 -1
  327. package/lib/Cli/commands/dev.js +52 -26
  328. package/lib/Cli/commands/dev.js.map +1 -1
  329. package/lib/Cli/commands/drift.d.ts +12 -0
  330. package/lib/Cli/commands/drift.d.ts.map +1 -0
  331. package/lib/Cli/commands/drift.js +68 -0
  332. package/lib/Cli/commands/drift.js.map +1 -0
  333. package/lib/Cli/commands/errors.d.ts +35 -0
  334. package/lib/Cli/commands/errors.d.ts.map +1 -0
  335. package/lib/Cli/commands/errors.js +106 -0
  336. package/lib/Cli/commands/errors.js.map +1 -0
  337. package/lib/Cli/commands/flags.d.ts +46 -0
  338. package/lib/Cli/commands/flags.d.ts.map +1 -0
  339. package/lib/Cli/commands/flags.js +98 -0
  340. package/lib/Cli/commands/flags.js.map +1 -0
  341. package/lib/Cli/commands/instrument.d.ts +3 -0
  342. package/lib/Cli/commands/instrument.d.ts.map +1 -0
  343. package/lib/Cli/commands/instrument.js +6 -0
  344. package/lib/Cli/commands/instrument.js.map +1 -0
  345. package/lib/Cli/commands/logs.d.ts +5 -4
  346. package/lib/Cli/commands/logs.d.ts.map +1 -1
  347. package/lib/Cli/commands/logs.js +63 -88
  348. package/lib/Cli/commands/logs.js.map +1 -1
  349. package/lib/Cli/commands/nuke.d.ts +3 -2
  350. package/lib/Cli/commands/nuke.d.ts.map +1 -1
  351. package/lib/Cli/commands/nuke.js +89 -588
  352. package/lib/Cli/commands/nuke.js.map +1 -1
  353. package/lib/Cli/commands/profile/commands.d.ts +9 -0
  354. package/lib/Cli/commands/profile/commands.d.ts.map +1 -0
  355. package/lib/Cli/commands/profile/commands.js +276 -0
  356. package/lib/Cli/commands/profile/commands.js.map +1 -0
  357. package/lib/Cli/commands/profile/flows.d.ts +36 -0
  358. package/lib/Cli/commands/profile/flows.d.ts.map +1 -0
  359. package/lib/Cli/commands/profile/flows.js +155 -0
  360. package/lib/Cli/commands/profile/flows.js.map +1 -0
  361. package/lib/Cli/commands/profile/hub.d.ts +8 -0
  362. package/lib/Cli/commands/profile/hub.d.ts.map +1 -0
  363. package/lib/Cli/commands/profile/hub.js +154 -0
  364. package/lib/Cli/commands/profile/hub.js.map +1 -0
  365. package/lib/Cli/commands/profile/index.d.ts +2 -0
  366. package/lib/Cli/commands/profile/index.d.ts.map +1 -0
  367. package/lib/Cli/commands/profile/index.js +2 -0
  368. package/lib/Cli/commands/profile/index.js.map +1 -0
  369. package/lib/Cli/commands/provider.d.ts +17 -0
  370. package/lib/Cli/commands/provider.d.ts.map +1 -0
  371. package/lib/Cli/commands/provider.js +44 -0
  372. package/lib/Cli/commands/provider.js.map +1 -0
  373. package/lib/Cli/commands/render.d.ts +12 -0
  374. package/lib/Cli/commands/render.d.ts.map +1 -0
  375. package/lib/Cli/commands/render.js +82 -0
  376. package/lib/Cli/commands/render.js.map +1 -0
  377. package/lib/Cli/commands/state.d.ts +8 -1
  378. package/lib/Cli/commands/state.d.ts.map +1 -1
  379. package/lib/Cli/commands/state.js +125 -248
  380. package/lib/Cli/commands/state.js.map +1 -1
  381. package/lib/Cli/components/types.d.ts +104 -0
  382. package/lib/Cli/components/types.d.ts.map +1 -0
  383. package/lib/Cli/components/types.js +4 -0
  384. package/lib/Cli/components/types.js.map +1 -0
  385. package/lib/Cli/components/ui/Data.d.ts +15 -0
  386. package/lib/Cli/components/ui/Data.d.ts.map +1 -0
  387. package/lib/Cli/components/ui/Data.js +8 -0
  388. package/lib/Cli/components/ui/Data.js.map +1 -0
  389. package/lib/Cli/components/ui/Environment.d.ts +45 -0
  390. package/lib/Cli/components/ui/Environment.d.ts.map +1 -0
  391. package/lib/Cli/components/ui/Environment.js +38 -0
  392. package/lib/Cli/components/ui/Environment.js.map +1 -0
  393. package/lib/Cli/components/ui/Feedback.d.ts +57 -0
  394. package/lib/Cli/components/ui/Feedback.d.ts.map +1 -0
  395. package/lib/Cli/components/ui/Feedback.js +83 -0
  396. package/lib/Cli/components/ui/Feedback.js.map +1 -0
  397. package/lib/Cli/components/ui/Interactive.d.ts +157 -0
  398. package/lib/Cli/components/ui/Interactive.d.ts.map +1 -0
  399. package/lib/Cli/components/ui/Interactive.js +527 -0
  400. package/lib/Cli/components/ui/Interactive.js.map +1 -0
  401. package/lib/Cli/components/ui/Layout.d.ts +74 -0
  402. package/lib/Cli/components/ui/Layout.d.ts.map +1 -0
  403. package/lib/Cli/components/ui/Layout.js +91 -0
  404. package/lib/Cli/components/ui/Layout.js.map +1 -0
  405. package/lib/Cli/components/ui/Live.d.ts +49 -0
  406. package/lib/Cli/components/ui/Live.d.ts.map +1 -0
  407. package/lib/Cli/components/ui/Live.js +43 -0
  408. package/lib/Cli/components/ui/Live.js.map +1 -0
  409. package/lib/Cli/components/ui/ProgressBar.d.ts +16 -0
  410. package/lib/Cli/components/ui/ProgressBar.d.ts.map +1 -0
  411. package/lib/Cli/components/ui/ProgressBar.js +17 -0
  412. package/lib/Cli/components/ui/ProgressBar.js.map +1 -0
  413. package/lib/Cli/components/ui/Transcript.d.ts +12 -0
  414. package/lib/Cli/components/ui/Transcript.d.ts.map +1 -0
  415. package/lib/Cli/components/ui/Transcript.js +14 -0
  416. package/lib/Cli/components/ui/Transcript.js.map +1 -0
  417. package/lib/Cli/components/ui/Typography.d.ts +17 -0
  418. package/lib/Cli/components/ui/Typography.d.ts.map +1 -0
  419. package/lib/Cli/components/ui/Typography.js +21 -0
  420. package/lib/Cli/components/ui/Typography.js.map +1 -0
  421. package/lib/Cli/components/ui/index.d.ts +16 -0
  422. package/lib/Cli/components/ui/index.d.ts.map +1 -0
  423. package/lib/Cli/components/ui/index.js +16 -0
  424. package/lib/Cli/components/ui/index.js.map +1 -0
  425. package/lib/Cli/components/view/ApprovePlan.d.ts +17 -0
  426. package/lib/Cli/components/view/ApprovePlan.d.ts.map +1 -0
  427. package/lib/Cli/components/view/ApprovePlan.js +59 -0
  428. package/lib/Cli/components/view/ApprovePlan.js.map +1 -0
  429. package/lib/Cli/components/view/Help.d.ts +4 -0
  430. package/lib/Cli/components/view/Help.d.ts.map +1 -0
  431. package/lib/Cli/components/view/Help.js +116 -0
  432. package/lib/Cli/components/view/Help.js.map +1 -0
  433. package/lib/Cli/components/view/Logo.d.ts +7 -0
  434. package/lib/Cli/components/view/Logo.d.ts.map +1 -0
  435. package/lib/Cli/components/view/Logo.js +118 -0
  436. package/lib/Cli/components/view/Logo.js.map +1 -0
  437. package/lib/Cli/components/view/Nuke.d.ts +36 -0
  438. package/lib/Cli/components/view/Nuke.d.ts.map +1 -0
  439. package/lib/Cli/components/view/Nuke.js +148 -0
  440. package/lib/Cli/components/view/Nuke.js.map +1 -0
  441. package/lib/Cli/components/view/PlanDecision.d.ts +15 -0
  442. package/lib/Cli/components/view/PlanDecision.d.ts.map +1 -0
  443. package/lib/Cli/components/view/PlanDecision.js +26 -0
  444. package/lib/Cli/components/view/PlanDecision.js.map +1 -0
  445. package/lib/Cli/components/view/PlanRow.d.ts +17 -0
  446. package/lib/Cli/components/view/PlanRow.d.ts.map +1 -0
  447. package/lib/Cli/components/view/PlanRow.js +14 -0
  448. package/lib/Cli/components/view/PlanRow.js.map +1 -0
  449. package/lib/Cli/components/view/PlanTree.d.ts +116 -0
  450. package/lib/Cli/components/view/PlanTree.d.ts.map +1 -0
  451. package/lib/Cli/components/view/PlanTree.js +207 -0
  452. package/lib/Cli/components/view/PlanTree.js.map +1 -0
  453. package/lib/Cli/components/view/PlanView.d.ts +42 -0
  454. package/lib/Cli/components/view/PlanView.d.ts.map +1 -0
  455. package/lib/Cli/components/view/PlanView.js +310 -0
  456. package/lib/Cli/components/view/PlanView.js.map +1 -0
  457. package/lib/Cli/components/view/Profile.d.ts +130 -0
  458. package/lib/Cli/components/view/Profile.d.ts.map +1 -0
  459. package/lib/Cli/components/view/Profile.js +147 -0
  460. package/lib/Cli/components/view/Profile.js.map +1 -0
  461. package/lib/Cli/components/view/ProfileDashboard.d.ts +152 -0
  462. package/lib/Cli/components/view/ProfileDashboard.d.ts.map +1 -0
  463. package/lib/Cli/components/view/ProfileDashboard.js +485 -0
  464. package/lib/Cli/components/view/ProfileDashboard.js.map +1 -0
  465. package/lib/Cli/components/view/Prompts.d.ts +10 -0
  466. package/lib/Cli/components/view/Prompts.d.ts.map +1 -0
  467. package/lib/Cli/components/view/Prompts.js +440 -0
  468. package/lib/Cli/components/view/Prompts.js.map +1 -0
  469. package/lib/Cli/components/view/Runtime.d.ts +8 -0
  470. package/lib/Cli/components/view/Runtime.d.ts.map +1 -0
  471. package/lib/Cli/components/view/Runtime.js +670 -0
  472. package/lib/Cli/components/view/Runtime.js.map +1 -0
  473. package/lib/Cli/components/view/SigilCli.d.ts +5 -0
  474. package/lib/Cli/components/view/SigilCli.d.ts.map +1 -0
  475. package/lib/Cli/components/view/SigilCli.js +134 -0
  476. package/lib/Cli/components/view/SigilCli.js.map +1 -0
  477. package/lib/Cli/components/view/StackOutputs.d.ts +10 -0
  478. package/lib/Cli/components/view/StackOutputs.d.ts.map +1 -0
  479. package/lib/Cli/components/view/StackOutputs.js +14 -0
  480. package/lib/Cli/components/view/StackOutputs.js.map +1 -0
  481. package/lib/Cli/components/view/StateExplorer.d.ts +118 -0
  482. package/lib/Cli/components/view/StateExplorer.d.ts.map +1 -0
  483. package/lib/Cli/components/view/StateExplorer.js +664 -0
  484. package/lib/Cli/components/view/StateExplorer.js.map +1 -0
  485. package/lib/Cli/components/view/statusStyle.d.ts +18 -0
  486. package/lib/Cli/components/view/statusStyle.d.ts.map +1 -0
  487. package/lib/Cli/components/view/statusStyle.js +69 -0
  488. package/lib/Cli/components/view/statusStyle.js.map +1 -0
  489. package/lib/Cli/components/view/usePlanPresentation.d.ts +25 -0
  490. package/lib/Cli/components/view/usePlanPresentation.d.ts.map +1 -0
  491. package/lib/Cli/components/view/usePlanPresentation.js +54 -0
  492. package/lib/Cli/components/view/usePlanPresentation.js.map +1 -0
  493. package/lib/Cli/components/view/usePlanViewport.d.ts +31 -0
  494. package/lib/Cli/components/view/usePlanViewport.d.ts.map +1 -0
  495. package/lib/Cli/components/view/usePlanViewport.js +113 -0
  496. package/lib/Cli/components/view/usePlanViewport.js.map +1 -0
  497. package/lib/Cli/exec.d.ts +5 -1
  498. package/lib/Cli/exec.d.ts.map +1 -1
  499. package/lib/Cli/exec.js +173 -19
  500. package/lib/Cli/exec.js.map +1 -1
  501. package/lib/Cli/main.d.ts +4 -1
  502. package/lib/Cli/main.d.ts.map +1 -1
  503. package/lib/Cli/main.js +129 -38
  504. package/lib/Cli/main.js.map +1 -1
  505. package/lib/Cli/selectCli.d.ts +5 -3
  506. package/lib/Cli/selectCli.d.ts.map +1 -1
  507. package/lib/Cli/selectCli.js +16 -9
  508. package/lib/Cli/selectCli.js.map +1 -1
  509. package/lib/Cloudflare/ApiToken/UserApiToken.d.ts +1 -1
  510. package/lib/Cloudflare/ApiToken/UserApiToken.js +1 -1
  511. package/lib/Cloudflare/Auth/AuthConfig.d.ts +60 -0
  512. package/lib/Cloudflare/Auth/AuthConfig.d.ts.map +1 -0
  513. package/lib/Cloudflare/Auth/AuthConfig.js +68 -0
  514. package/lib/Cloudflare/Auth/AuthConfig.js.map +1 -0
  515. package/lib/Cloudflare/Auth/AuthProvider.d.ts +2 -142
  516. package/lib/Cloudflare/Auth/AuthProvider.d.ts.map +1 -1
  517. package/lib/Cloudflare/Auth/AuthProvider.js +473 -327
  518. package/lib/Cloudflare/Auth/AuthProvider.js.map +1 -1
  519. package/lib/Cloudflare/Auth/OAuthClient.d.ts +16 -48
  520. package/lib/Cloudflare/Auth/OAuthClient.d.ts.map +1 -1
  521. package/lib/Cloudflare/Auth/OAuthClient.js +25 -260
  522. package/lib/Cloudflare/Auth/OAuthClient.js.map +1 -1
  523. package/lib/Cloudflare/Auth/OAuthScopes.d.ts +88 -0
  524. package/lib/Cloudflare/Auth/OAuthScopes.d.ts.map +1 -0
  525. package/lib/Cloudflare/Auth/OAuthScopes.js +887 -0
  526. package/lib/Cloudflare/Auth/OAuthScopes.js.map +1 -0
  527. package/lib/Cloudflare/Auth/TokenPolicy.d.ts +34 -0
  528. package/lib/Cloudflare/Auth/TokenPolicy.d.ts.map +1 -0
  529. package/lib/Cloudflare/Auth/TokenPolicy.js +51 -0
  530. package/lib/Cloudflare/Auth/TokenPolicy.js.map +1 -0
  531. package/lib/Cloudflare/CloudflareEnvironment.d.ts +2 -3
  532. package/lib/Cloudflare/CloudflareEnvironment.d.ts.map +1 -1
  533. package/lib/Cloudflare/CloudflareEnvironment.js +7 -11
  534. package/lib/Cloudflare/CloudflareEnvironment.js.map +1 -1
  535. package/lib/Cloudflare/Containers/Container.d.ts +10 -25
  536. package/lib/Cloudflare/Containers/Container.d.ts.map +1 -1
  537. package/lib/Cloudflare/Containers/Container.js +9 -23
  538. package/lib/Cloudflare/Containers/Container.js.map +1 -1
  539. package/lib/Cloudflare/Containers/ContainerApplication.d.ts +12 -27
  540. package/lib/Cloudflare/Containers/ContainerApplication.d.ts.map +1 -1
  541. package/lib/Cloudflare/Containers/ContainerApplication.js.map +1 -1
  542. package/lib/Cloudflare/Containers/StartContainer.d.ts +1 -1
  543. package/lib/Cloudflare/Containers/StartContainer.d.ts.map +1 -1
  544. package/lib/Cloudflare/Credentials.d.ts +6 -20
  545. package/lib/Cloudflare/Credentials.d.ts.map +1 -1
  546. package/lib/Cloudflare/Credentials.js +12 -54
  547. package/lib/Cloudflare/Credentials.js.map +1 -1
  548. package/lib/Cloudflare/D1/ImportDatabase.d.ts +1 -1
  549. package/lib/Cloudflare/D1/ImportDatabase.d.ts.map +1 -1
  550. package/lib/Cloudflare/EdgeSession.d.ts +1 -1
  551. package/lib/Cloudflare/EdgeSession.d.ts.map +1 -1
  552. package/lib/Cloudflare/EdgeSession.js +1 -1
  553. package/lib/Cloudflare/EdgeSession.js.map +1 -1
  554. package/lib/Cloudflare/Logs.d.ts.map +1 -1
  555. package/lib/Cloudflare/Logs.js +10 -6
  556. package/lib/Cloudflare/Logs.js.map +1 -1
  557. package/lib/Cloudflare/Pages/Project.d.ts +1 -1
  558. package/lib/Cloudflare/Pages/Project.js +1 -1
  559. package/lib/Cloudflare/Providers.d.ts +2 -2
  560. package/lib/Cloudflare/Providers.d.ts.map +1 -1
  561. package/lib/Cloudflare/Providers.js +2 -2
  562. package/lib/Cloudflare/Providers.js.map +1 -1
  563. package/lib/Cloudflare/StateStore/Api.d.ts +3 -0
  564. package/lib/Cloudflare/StateStore/Api.d.ts.map +1 -1
  565. package/lib/Cloudflare/StateStore/Api.js +2 -2
  566. package/lib/Cloudflare/StateStore/Api.js.map +1 -1
  567. package/lib/Cloudflare/StateStore/CredentialsFile.d.ts +10 -6
  568. package/lib/Cloudflare/StateStore/CredentialsFile.d.ts.map +1 -1
  569. package/lib/Cloudflare/StateStore/CredentialsFile.js +23 -1
  570. package/lib/Cloudflare/StateStore/CredentialsFile.js.map +1 -1
  571. package/lib/Cloudflare/StateStore/State.d.ts +9 -5
  572. package/lib/Cloudflare/StateStore/State.d.ts.map +1 -1
  573. package/lib/Cloudflare/StateStore/State.js +132 -99
  574. package/lib/Cloudflare/StateStore/State.js.map +1 -1
  575. package/lib/Cloudflare/Vectorize/SearchIndexHttpClient.js +1 -1
  576. package/lib/Cloudflare/Vectorize/SearchIndexHttpClient.js.map +1 -1
  577. package/lib/Cloudflare/Website/Nextjs.d.ts.map +1 -1
  578. package/lib/Cloudflare/Website/Nextjs.js +4 -12
  579. package/lib/Cloudflare/Website/Nextjs.js.map +1 -1
  580. package/lib/Cloudflare/Website/Vocs.d.ts +1 -1
  581. package/lib/Cloudflare/Website/Vocs.d.ts.map +1 -1
  582. package/lib/Cloudflare/Website/Vocs.js +3 -7
  583. package/lib/Cloudflare/Website/Vocs.js.map +1 -1
  584. package/lib/Cloudflare/Workers/Assets.d.ts +2 -2
  585. package/lib/Cloudflare/Workers/Assets.d.ts.map +1 -1
  586. package/lib/Cloudflare/Workers/Assets.js +74 -26
  587. package/lib/Cloudflare/Workers/Assets.js.map +1 -1
  588. package/lib/Cloudflare/Workers/BrowserHttpClient.d.ts +2 -2
  589. package/lib/Cloudflare/Workers/BrowserHttpClient.d.ts.map +1 -1
  590. package/lib/Cloudflare/Workers/BrowserHttpClient.js +10 -3
  591. package/lib/Cloudflare/Workers/BrowserHttpClient.js.map +1 -1
  592. package/lib/Cloudflare/Workers/CloudflareTracer.d.ts +9 -0
  593. package/lib/Cloudflare/Workers/CloudflareTracer.d.ts.map +1 -0
  594. package/lib/Cloudflare/Workers/CloudflareTracer.js +87 -0
  595. package/lib/Cloudflare/Workers/CloudflareTracer.js.map +1 -0
  596. package/lib/Cloudflare/Workers/Compatibility.d.ts +13 -0
  597. package/lib/Cloudflare/Workers/Compatibility.d.ts.map +1 -1
  598. package/lib/Cloudflare/Workers/Compatibility.js +31 -6
  599. package/lib/Cloudflare/Workers/Compatibility.js.map +1 -1
  600. package/lib/Cloudflare/Workers/DurableObject.d.ts +50 -4
  601. package/lib/Cloudflare/Workers/DurableObject.d.ts.map +1 -1
  602. package/lib/Cloudflare/Workers/DurableObject.js +44 -3
  603. package/lib/Cloudflare/Workers/DurableObject.js.map +1 -1
  604. package/lib/Cloudflare/Workers/DurableObjectBridge.d.ts.map +1 -1
  605. package/lib/Cloudflare/Workers/DurableObjectBridge.js +4 -0
  606. package/lib/Cloudflare/Workers/DurableObjectBridge.js.map +1 -1
  607. package/lib/Cloudflare/Workers/DurableObjectState.d.ts +25 -2
  608. package/lib/Cloudflare/Workers/DurableObjectState.d.ts.map +1 -1
  609. package/lib/Cloudflare/Workers/DurableObjectState.js +7 -2
  610. package/lib/Cloudflare/Workers/DurableObjectState.js.map +1 -1
  611. package/lib/Cloudflare/Workers/DurableObjectStorage.d.ts +7 -1
  612. package/lib/Cloudflare/Workers/DurableObjectStorage.d.ts.map +1 -1
  613. package/lib/Cloudflare/Workers/DurableObjectStorage.js +6 -1
  614. package/lib/Cloudflare/Workers/DurableObjectStorage.js.map +1 -1
  615. package/lib/Cloudflare/Workers/LocalWorkerProvider.d.ts.map +1 -1
  616. package/lib/Cloudflare/Workers/LocalWorkerProvider.js +125 -58
  617. package/lib/Cloudflare/Workers/LocalWorkerProvider.js.map +1 -1
  618. package/lib/Cloudflare/Workers/RpcWorker.d.ts +12 -5
  619. package/lib/Cloudflare/Workers/RpcWorker.d.ts.map +1 -1
  620. package/lib/Cloudflare/Workers/RpcWorker.js +8 -2
  621. package/lib/Cloudflare/Workers/RpcWorker.js.map +1 -1
  622. package/lib/Cloudflare/Workers/Source.d.ts +3 -0
  623. package/lib/Cloudflare/Workers/Source.d.ts.map +1 -1
  624. package/lib/Cloudflare/Workers/Source.js +3 -1
  625. package/lib/Cloudflare/Workers/Source.js.map +1 -1
  626. package/lib/Cloudflare/Workers/Sources/Python.d.ts +2 -0
  627. package/lib/Cloudflare/Workers/Sources/Python.d.ts.map +1 -1
  628. package/lib/Cloudflare/Workers/Sources/Python.js +16 -12
  629. package/lib/Cloudflare/Workers/Sources/Python.js.map +1 -1
  630. package/lib/Cloudflare/Workers/Sources/Rolldown.js +1 -1
  631. package/lib/Cloudflare/Workers/Sources/Rolldown.js.map +1 -1
  632. package/lib/Cloudflare/Workers/Sources/Vite.d.ts +1 -1
  633. package/lib/Cloudflare/Workers/Sources/Vite.d.ts.map +1 -1
  634. package/lib/Cloudflare/Workers/Sources/Vite.js +6 -4
  635. package/lib/Cloudflare/Workers/Sources/Vite.js.map +1 -1
  636. package/lib/Cloudflare/Workers/Telemetry.d.ts +113 -0
  637. package/lib/Cloudflare/Workers/Telemetry.d.ts.map +1 -0
  638. package/lib/Cloudflare/Workers/Telemetry.js +129 -0
  639. package/lib/Cloudflare/Workers/Telemetry.js.map +1 -0
  640. package/lib/Cloudflare/Workers/ViteBuildChildRunner.js +6 -1
  641. package/lib/Cloudflare/Workers/ViteBuildChildRunner.js.map +1 -1
  642. package/lib/Cloudflare/Workers/ViteChild.d.ts +2 -2
  643. package/lib/Cloudflare/Workers/ViteChild.d.ts.map +1 -1
  644. package/lib/Cloudflare/Workers/ViteChild.js +19 -17
  645. package/lib/Cloudflare/Workers/ViteChild.js.map +1 -1
  646. package/lib/Cloudflare/Workers/ViteChild.shared.d.ts +1 -0
  647. package/lib/Cloudflare/Workers/ViteChild.shared.d.ts.map +1 -1
  648. package/lib/Cloudflare/Workers/ViteChild.shared.js.map +1 -1
  649. package/lib/Cloudflare/Workers/ViteChildRunner.js +2 -1
  650. package/lib/Cloudflare/Workers/ViteChildRunner.js.map +1 -1
  651. package/lib/Cloudflare/Workers/Worker.d.ts +101 -52
  652. package/lib/Cloudflare/Workers/Worker.d.ts.map +1 -1
  653. package/lib/Cloudflare/Workers/Worker.js +91 -50
  654. package/lib/Cloudflare/Workers/Worker.js.map +1 -1
  655. package/lib/Cloudflare/Workers/WorkerAsyncBindings.d.ts +9 -1
  656. package/lib/Cloudflare/Workers/WorkerAsyncBindings.d.ts.map +1 -1
  657. package/lib/Cloudflare/Workers/WorkerAsyncBindings.js +23 -0
  658. package/lib/Cloudflare/Workers/WorkerAsyncBindings.js.map +1 -1
  659. package/lib/Cloudflare/Workers/WorkerBinding.d.ts +6 -0
  660. package/lib/Cloudflare/Workers/WorkerBinding.d.ts.map +1 -1
  661. package/lib/Cloudflare/Workers/WorkerLoader.d.ts +30 -4
  662. package/lib/Cloudflare/Workers/WorkerLoader.d.ts.map +1 -1
  663. package/lib/Cloudflare/Workers/WorkerLoader.js +36 -5
  664. package/lib/Cloudflare/Workers/WorkerLoader.js.map +1 -1
  665. package/lib/Cloudflare/Workers/WorkerProvider.d.ts.map +1 -1
  666. package/lib/Cloudflare/Workers/WorkerProvider.js +52 -45
  667. package/lib/Cloudflare/Workers/WorkerProvider.js.map +1 -1
  668. package/lib/Cloudflare/Workers/cloudflare_workers.d.ts.map +1 -1
  669. package/lib/Cloudflare/Workers/cloudflare_workers.js +4 -1
  670. package/lib/Cloudflare/Workers/cloudflare_workers.js.map +1 -1
  671. package/lib/Cloudflare/Workers/index.d.ts +1 -0
  672. package/lib/Cloudflare/Workers/index.d.ts.map +1 -1
  673. package/lib/Cloudflare/Workers/index.js +1 -0
  674. package/lib/Cloudflare/Workers/index.js.map +1 -1
  675. package/lib/Cloudflare/Workflows/Workflow.d.ts +84 -0
  676. package/lib/Cloudflare/Workflows/Workflow.d.ts.map +1 -1
  677. package/lib/Cloudflare/Workflows/Workflow.js +47 -0
  678. package/lib/Cloudflare/Workflows/Workflow.js.map +1 -1
  679. package/lib/Cloudflare/Workflows/WorkflowBridge.js +7 -4
  680. package/lib/Cloudflare/Workflows/WorkflowBridge.js.map +1 -1
  681. package/lib/Command/Command.d.ts +1 -1
  682. package/lib/Command/Command.d.ts.map +1 -1
  683. package/lib/Command/Command.js +2 -2
  684. package/lib/Command/Command.js.map +1 -1
  685. package/lib/Command/Dev.d.ts +5 -2
  686. package/lib/Command/Dev.d.ts.map +1 -1
  687. package/lib/Command/Dev.js +31 -7
  688. package/lib/Command/Dev.js.map +1 -1
  689. package/lib/Command/Providers.d.ts +1 -1
  690. package/lib/Command/Providers.d.ts.map +1 -1
  691. package/lib/Deploy.d.ts +1 -1
  692. package/lib/Deploy.d.ts.map +1 -1
  693. package/lib/Destroy.d.ts +1 -1
  694. package/lib/Destroy.d.ts.map +1 -1
  695. package/lib/Docker/BuildHash.d.ts +13 -0
  696. package/lib/Docker/BuildHash.d.ts.map +1 -1
  697. package/lib/Docker/BuildHash.js +53 -3
  698. package/lib/Docker/BuildHash.js.map +1 -1
  699. package/lib/Docker/Docker.d.ts +1 -1
  700. package/lib/Docker/Docker.d.ts.map +1 -1
  701. package/lib/Docker/Docker.js +1 -1
  702. package/lib/Docker/Docker.js.map +1 -1
  703. package/lib/Docker/Service.d.ts +7 -21
  704. package/lib/Docker/Service.d.ts.map +1 -1
  705. package/lib/Docker/Service.js +7 -21
  706. package/lib/Docker/Service.js.map +1 -1
  707. package/lib/Docker/ServiceImage.d.ts +4 -5
  708. package/lib/Docker/ServiceImage.d.ts.map +1 -1
  709. package/lib/Docker/ServiceImage.js.map +1 -1
  710. package/lib/Drift.d.ts +91 -0
  711. package/lib/Drift.d.ts.map +1 -0
  712. package/lib/{Sync.js → Drift.js} +98 -29
  713. package/lib/Drift.js.map +1 -0
  714. package/lib/Drizzle/Schema.d.ts.map +1 -1
  715. package/lib/Drizzle/Schema.js +5 -5
  716. package/lib/Drizzle/Schema.js.map +1 -1
  717. package/lib/Fly/App.d.ts +1 -1
  718. package/lib/Fly/App.d.ts.map +1 -1
  719. package/lib/Fly/AuthProvider.d.ts +6 -20
  720. package/lib/Fly/AuthProvider.d.ts.map +1 -1
  721. package/lib/Fly/AuthProvider.js +32 -124
  722. package/lib/Fly/AuthProvider.js.map +1 -1
  723. package/lib/Fly/Bucket.d.ts +1 -1
  724. package/lib/Fly/Bucket.d.ts.map +1 -1
  725. package/lib/Fly/Catalog.d.ts +1 -1
  726. package/lib/Fly/Catalog.d.ts.map +1 -1
  727. package/lib/Fly/CheckpointHttp.d.ts.map +1 -1
  728. package/lib/Fly/CheckpointHttp.js +2 -2
  729. package/lib/Fly/CheckpointHttp.js.map +1 -1
  730. package/lib/Fly/Credentials.d.ts +15 -6
  731. package/lib/Fly/Credentials.d.ts.map +1 -1
  732. package/lib/Fly/Credentials.js +25 -13
  733. package/lib/Fly/Credentials.js.map +1 -1
  734. package/lib/Fly/DecryptHttp.d.ts.map +1 -1
  735. package/lib/Fly/DecryptHttp.js +2 -2
  736. package/lib/Fly/DecryptHttp.js.map +1 -1
  737. package/lib/Fly/EncryptHttp.d.ts.map +1 -1
  738. package/lib/Fly/EncryptHttp.js +2 -2
  739. package/lib/Fly/EncryptHttp.js.map +1 -1
  740. package/lib/Fly/Environment.d.ts +1 -1
  741. package/lib/Fly/Environment.d.ts.map +1 -1
  742. package/lib/Fly/ExecHttp.d.ts.map +1 -1
  743. package/lib/Fly/ExecHttp.js +2 -2
  744. package/lib/Fly/ExecHttp.js.map +1 -1
  745. package/lib/Fly/GetSecretHttp.d.ts.map +1 -1
  746. package/lib/Fly/GetSecretHttp.js +2 -2
  747. package/lib/Fly/GetSecretHttp.js.map +1 -1
  748. package/lib/Fly/ListSecretsHttp.d.ts.map +1 -1
  749. package/lib/Fly/ListSecretsHttp.js +2 -2
  750. package/lib/Fly/ListSecretsHttp.js.map +1 -1
  751. package/lib/Fly/Machine.d.ts +65 -0
  752. package/lib/Fly/Machine.d.ts.map +1 -1
  753. package/lib/Fly/Machine.js +34 -19
  754. package/lib/Fly/Machine.js.map +1 -1
  755. package/lib/Fly/Postgres.d.ts +1 -1
  756. package/lib/Fly/Postgres.d.ts.map +1 -1
  757. package/lib/Fly/Providers.d.ts +1 -1
  758. package/lib/Fly/Providers.d.ts.map +1 -1
  759. package/lib/Fly/Providers.js +2 -2
  760. package/lib/Fly/Providers.js.map +1 -1
  761. package/lib/Fly/Redis.d.ts +1 -1
  762. package/lib/Fly/Redis.d.ts.map +1 -1
  763. package/lib/Fly/Service.d.ts +43 -0
  764. package/lib/Fly/Service.d.ts.map +1 -1
  765. package/lib/Fly/Service.js +44 -19
  766. package/lib/Fly/Service.js.map +1 -1
  767. package/lib/Fly/SignHttp.d.ts.map +1 -1
  768. package/lib/Fly/SignHttp.js +2 -2
  769. package/lib/Fly/SignHttp.js.map +1 -1
  770. package/lib/Fly/VerifyHttp.d.ts.map +1 -1
  771. package/lib/Fly/VerifyHttp.js +2 -2
  772. package/lib/Fly/VerifyHttp.js.map +1 -1
  773. package/lib/Fly/Volume.d.ts +8 -8
  774. package/lib/Fly/Volume.d.ts.map +1 -1
  775. package/lib/Fly/WriteSecretHttp.d.ts.map +1 -1
  776. package/lib/Fly/WriteSecretHttp.js +2 -2
  777. package/lib/Fly/WriteSecretHttp.js.map +1 -1
  778. package/lib/Fly/replicas.d.ts +12 -10
  779. package/lib/Fly/replicas.d.ts.map +1 -1
  780. package/lib/Fly/replicas.js +35 -0
  781. package/lib/Fly/replicas.js.map +1 -1
  782. package/lib/GitHub/AuthProvider.d.ts +20 -29
  783. package/lib/GitHub/AuthProvider.d.ts.map +1 -1
  784. package/lib/GitHub/AuthProvider.js +141 -75
  785. package/lib/GitHub/AuthProvider.js.map +1 -1
  786. package/lib/GitHub/Credentials.d.ts +2 -3
  787. package/lib/GitHub/Credentials.d.ts.map +1 -1
  788. package/lib/GitHub/Credentials.js +6 -10
  789. package/lib/GitHub/Credentials.js.map +1 -1
  790. package/lib/GitHub/Providers.d.ts +3 -3
  791. package/lib/GitHub/Providers.d.ts.map +1 -1
  792. package/lib/GitHub/Providers.js +4 -4
  793. package/lib/GitHub/Providers.js.map +1 -1
  794. package/lib/Hetzner/AuthProvider.d.ts +7 -20
  795. package/lib/Hetzner/AuthProvider.d.ts.map +1 -1
  796. package/lib/Hetzner/AuthProvider.js +42 -130
  797. package/lib/Hetzner/AuthProvider.js.map +1 -1
  798. package/lib/Hetzner/Catalog.d.ts +5 -5
  799. package/lib/Hetzner/Catalog.d.ts.map +1 -1
  800. package/lib/Hetzner/Credentials.d.ts +1 -3
  801. package/lib/Hetzner/Credentials.d.ts.map +1 -1
  802. package/lib/Hetzner/Credentials.js +4 -9
  803. package/lib/Hetzner/Credentials.js.map +1 -1
  804. package/lib/Hetzner/PlacementGroup.d.ts +1 -1
  805. package/lib/Hetzner/PlacementGroup.d.ts.map +1 -1
  806. package/lib/Hetzner/Providers.d.ts +1 -1
  807. package/lib/Hetzner/Providers.d.ts.map +1 -1
  808. package/lib/Hetzner/Providers.js +2 -2
  809. package/lib/Hetzner/Providers.js.map +1 -1
  810. package/lib/Hetzner/hosted.d.ts +1 -1
  811. package/lib/Interaction.d.ts +186 -0
  812. package/lib/Interaction.d.ts.map +1 -0
  813. package/lib/Interaction.js +149 -0
  814. package/lib/Interaction.js.map +1 -0
  815. package/lib/Kubernetes/ClusterAdapter.d.ts +4 -5
  816. package/lib/Kubernetes/ClusterAdapter.d.ts.map +1 -1
  817. package/lib/Kubernetes/ClusterAdapter.js.map +1 -1
  818. package/lib/Kubernetes/Deployment.d.ts +7 -21
  819. package/lib/Kubernetes/Deployment.d.ts.map +1 -1
  820. package/lib/Kubernetes/Deployment.js +7 -21
  821. package/lib/Kubernetes/Deployment.js.map +1 -1
  822. package/lib/Kubernetes/Job.d.ts +7 -21
  823. package/lib/Kubernetes/Job.d.ts.map +1 -1
  824. package/lib/Kubernetes/Job.js +7 -21
  825. package/lib/Kubernetes/Job.js.map +1 -1
  826. package/lib/Local/DevLog.d.ts +32 -0
  827. package/lib/Local/DevLog.d.ts.map +1 -0
  828. package/lib/Local/DevLog.js +114 -0
  829. package/lib/Local/DevLog.js.map +1 -0
  830. package/lib/Local/LocalProvider.d.ts +1 -1
  831. package/lib/Local/LocalProvider.d.ts.map +1 -1
  832. package/lib/Local/LocalProvider.js +2 -2
  833. package/lib/Local/LocalProvider.js.map +1 -1
  834. package/lib/Local/RpcServer.d.ts.map +1 -1
  835. package/lib/Local/RpcServer.js +10 -1
  836. package/lib/Local/RpcServer.js.map +1 -1
  837. package/lib/Local/RpcServerEnvironment.d.ts +2 -2
  838. package/lib/Local/RpcServerEnvironment.d.ts.map +1 -1
  839. package/lib/Local/RpcServerEnvironment.js +3 -2
  840. package/lib/Local/RpcServerEnvironment.js.map +1 -1
  841. package/lib/Local/RpcSpawner.d.ts +14 -5
  842. package/lib/Local/RpcSpawner.d.ts.map +1 -1
  843. package/lib/Local/RpcSpawner.js +105 -38
  844. package/lib/Local/RpcSpawner.js.map +1 -1
  845. package/lib/Neon/AuthProvider.d.ts +4 -13
  846. package/lib/Neon/AuthProvider.d.ts.map +1 -1
  847. package/lib/Neon/AuthProvider.js +24 -107
  848. package/lib/Neon/AuthProvider.js.map +1 -1
  849. package/lib/Neon/Credentials.d.ts +1 -3
  850. package/lib/Neon/Credentials.d.ts.map +1 -1
  851. package/lib/Neon/Credentials.js +4 -9
  852. package/lib/Neon/Credentials.js.map +1 -1
  853. package/lib/Neon/Providers.d.ts +1 -1
  854. package/lib/Neon/Providers.d.ts.map +1 -1
  855. package/lib/Neon/Providers.js +2 -2
  856. package/lib/Neon/Providers.js.map +1 -1
  857. package/lib/Nuke.d.ts +89 -0
  858. package/lib/Nuke.d.ts.map +1 -0
  859. package/lib/Nuke.js +265 -0
  860. package/lib/Nuke.js.map +1 -0
  861. package/lib/Plan.d.ts +27 -5
  862. package/lib/Plan.d.ts.map +1 -1
  863. package/lib/Plan.js +167 -21
  864. package/lib/Plan.js.map +1 -1
  865. package/lib/Planetscale/AuthProvider.d.ts +25 -37
  866. package/lib/Planetscale/AuthProvider.d.ts.map +1 -1
  867. package/lib/Planetscale/AuthProvider.js +267 -150
  868. package/lib/Planetscale/AuthProvider.js.map +1 -1
  869. package/lib/Planetscale/Credentials.d.ts +2 -3
  870. package/lib/Planetscale/Credentials.d.ts.map +1 -1
  871. package/lib/Planetscale/Credentials.js +16 -13
  872. package/lib/Planetscale/Credentials.js.map +1 -1
  873. package/lib/Planetscale/OAuthClient.d.ts +8 -52
  874. package/lib/Planetscale/OAuthClient.d.ts.map +1 -1
  875. package/lib/Planetscale/OAuthClient.js +18 -240
  876. package/lib/Planetscale/OAuthClient.js.map +1 -1
  877. package/lib/Planetscale/Providers.d.ts +1 -1
  878. package/lib/Planetscale/Providers.d.ts.map +1 -1
  879. package/lib/Planetscale/Providers.js +2 -2
  880. package/lib/Planetscale/Providers.js.map +1 -1
  881. package/lib/Planetscale/Util.d.ts +1 -1
  882. package/lib/Planetscale/Util.d.ts.map +1 -1
  883. package/lib/Prisma/AuthProvider.d.ts +7 -15
  884. package/lib/Prisma/AuthProvider.d.ts.map +1 -1
  885. package/lib/Prisma/AuthProvider.js +54 -121
  886. package/lib/Prisma/AuthProvider.js.map +1 -1
  887. package/lib/Prisma/Compute.d.ts +7 -21
  888. package/lib/Prisma/Compute.d.ts.map +1 -1
  889. package/lib/Prisma/Compute.js +7 -21
  890. package/lib/Prisma/Compute.js.map +1 -1
  891. package/lib/Prisma/PrismaEnvironment.d.ts +1 -2
  892. package/lib/Prisma/PrismaEnvironment.d.ts.map +1 -1
  893. package/lib/Prisma/PrismaEnvironment.js +3 -8
  894. package/lib/Prisma/PrismaEnvironment.js.map +1 -1
  895. package/lib/Prisma/Providers.d.ts +3 -3
  896. package/lib/Prisma/Providers.d.ts.map +1 -1
  897. package/lib/Prisma/Providers.js +7 -7
  898. package/lib/Prisma/Providers.js.map +1 -1
  899. package/lib/Provider.d.ts +10 -2
  900. package/lib/Provider.d.ts.map +1 -1
  901. package/lib/Provider.js +9 -10
  902. package/lib/Provider.js.map +1 -1
  903. package/lib/Railway/AuditLog.d.ts +2 -2
  904. package/lib/Railway/AuditLog.d.ts.map +1 -1
  905. package/lib/Railway/AuthProvider.d.ts +19 -19
  906. package/lib/Railway/AuthProvider.d.ts.map +1 -1
  907. package/lib/Railway/AuthProvider.js +193 -127
  908. package/lib/Railway/AuthProvider.js.map +1 -1
  909. package/lib/Railway/Bucket.js +2 -2
  910. package/lib/Railway/CloudAgent.js +2 -2
  911. package/lib/Railway/Credentials.d.ts +2 -5
  912. package/lib/Railway/Credentials.d.ts.map +1 -1
  913. package/lib/Railway/Credentials.js +5 -11
  914. package/lib/Railway/Credentials.js.map +1 -1
  915. package/lib/Railway/CustomDomain.js +3 -3
  916. package/lib/Railway/Function.js +6 -6
  917. package/lib/Railway/Group.js +2 -2
  918. package/lib/Railway/LoginSession.d.ts +3 -3
  919. package/lib/Railway/LoginSession.js +5 -5
  920. package/lib/Railway/Mongo.js +13 -13
  921. package/lib/Railway/MySQL.js +13 -13
  922. package/lib/Railway/Postgres.js +13 -13
  923. package/lib/Railway/PrivateNetwork.js +2 -2
  924. package/lib/Railway/Project.d.ts +3 -3
  925. package/lib/Railway/Project.d.ts.map +1 -1
  926. package/lib/Railway/Project.js +3 -3
  927. package/lib/Railway/ProjectEnvironment.js +3 -3
  928. package/lib/Railway/Providers.d.ts +1 -1
  929. package/lib/Railway/Providers.d.ts.map +1 -1
  930. package/lib/Railway/Providers.js +2 -2
  931. package/lib/Railway/Providers.js.map +1 -1
  932. package/lib/Railway/Redis.js +5 -5
  933. package/lib/Railway/Sandbox.d.ts +6 -6
  934. package/lib/Railway/Sandbox.js +5 -5
  935. package/lib/Railway/Service.d.ts +72 -1
  936. package/lib/Railway/Service.d.ts.map +1 -1
  937. package/lib/Railway/Service.js +42 -0
  938. package/lib/Railway/Service.js.map +1 -1
  939. package/lib/Railway/ServiceDomain.d.ts +28 -2
  940. package/lib/Railway/ServiceDomain.d.ts.map +1 -1
  941. package/lib/Railway/ServiceDomain.js +134 -17
  942. package/lib/Railway/ServiceDomain.js.map +1 -1
  943. package/lib/Railway/ServiceProvider.d.ts +2 -10
  944. package/lib/Railway/ServiceProvider.d.ts.map +1 -1
  945. package/lib/Railway/ServiceProvider.js +170 -64
  946. package/lib/Railway/ServiceProvider.js.map +1 -1
  947. package/lib/Railway/TcpProxy.js +2 -2
  948. package/lib/Railway/Template.js +2 -2
  949. package/lib/Railway/Usage.js +2 -2
  950. package/lib/Railway/Variable.js +2 -2
  951. package/lib/Railway/Volume.d.ts +1 -1
  952. package/lib/Railway/Volume.d.ts.map +1 -1
  953. package/lib/Railway/Volume.js +4 -4
  954. package/lib/Railway/VolumeBackup.d.ts +2 -2
  955. package/lib/Railway/VolumeBackup.js +8 -8
  956. package/lib/Railway/local-context.d.ts +125 -0
  957. package/lib/Railway/local-context.d.ts.map +1 -0
  958. package/lib/Railway/local-context.js +254 -0
  959. package/lib/Railway/local-context.js.map +1 -0
  960. package/lib/Report.d.ts +248 -0
  961. package/lib/Report.d.ts.map +1 -0
  962. package/lib/Report.js +18 -0
  963. package/lib/Report.js.map +1 -0
  964. package/lib/Stack.d.ts +7 -6
  965. package/lib/Stack.d.ts.map +1 -1
  966. package/lib/Stack.js +2 -4
  967. package/lib/Stack.js.map +1 -1
  968. package/lib/State/Export.d.ts +6 -4
  969. package/lib/State/Export.d.ts.map +1 -1
  970. package/lib/State/Export.js +13 -18
  971. package/lib/State/Export.js.map +1 -1
  972. package/lib/State/HttpStateStore.d.ts +1 -1
  973. package/lib/State/HttpStateStore.d.ts.map +1 -1
  974. package/lib/State/HttpStateStore.js +10 -6
  975. package/lib/State/HttpStateStore.js.map +1 -1
  976. package/lib/State/LocalState.d.ts.map +1 -1
  977. package/lib/State/LocalState.js +6 -13
  978. package/lib/State/LocalState.js.map +1 -1
  979. package/lib/State/Tree.d.ts +62 -0
  980. package/lib/State/Tree.d.ts.map +1 -0
  981. package/lib/State/Tree.js +166 -0
  982. package/lib/State/Tree.js.map +1 -0
  983. package/lib/State/index.d.ts +1 -0
  984. package/lib/State/index.d.ts.map +1 -1
  985. package/lib/State/index.js +1 -0
  986. package/lib/State/index.js.map +1 -1
  987. package/lib/Telemetry/Layer.d.ts +6 -0
  988. package/lib/Telemetry/Layer.d.ts.map +1 -1
  989. package/lib/Telemetry/Layer.js +16 -5
  990. package/lib/Telemetry/Layer.js.map +1 -1
  991. package/lib/Telemetry.d.ts +5 -0
  992. package/lib/Telemetry.d.ts.map +1 -1
  993. package/lib/Telemetry.js +6 -1
  994. package/lib/Telemetry.js.map +1 -1
  995. package/lib/Test/Core.d.ts +4 -3
  996. package/lib/Test/Core.d.ts.map +1 -1
  997. package/lib/Test/Core.js +5 -3
  998. package/lib/Test/Core.js.map +1 -1
  999. package/lib/UserFacingError.d.ts +26 -0
  1000. package/lib/UserFacingError.d.ts.map +1 -0
  1001. package/lib/UserFacingError.js +25 -0
  1002. package/lib/UserFacingError.js.map +1 -0
  1003. package/lib/Util/AtomicFile.d.ts +19 -0
  1004. package/lib/Util/AtomicFile.d.ts.map +1 -0
  1005. package/lib/Util/AtomicFile.js +22 -0
  1006. package/lib/Util/AtomicFile.js.map +1 -0
  1007. package/lib/Util/ConsoleSink.d.ts +4 -0
  1008. package/lib/Util/ConsoleSink.d.ts.map +1 -0
  1009. package/lib/Util/ConsoleSink.js +24 -0
  1010. package/lib/Util/ConsoleSink.js.map +1 -0
  1011. package/lib/Util/LineBuffer.d.ts +9 -0
  1012. package/lib/Util/LineBuffer.d.ts.map +1 -0
  1013. package/lib/Util/LineBuffer.js +23 -0
  1014. package/lib/Util/LineBuffer.js.map +1 -0
  1015. package/lib/Util/Memoize.d.ts +20 -0
  1016. package/lib/Util/Memoize.d.ts.map +1 -0
  1017. package/lib/Util/Memoize.js +38 -0
  1018. package/lib/Util/Memoize.js.map +1 -0
  1019. package/lib/Util/Node.d.ts +22 -5
  1020. package/lib/Util/Node.d.ts.map +1 -1
  1021. package/lib/Util/Node.js +30 -10
  1022. package/lib/Util/Node.js.map +1 -1
  1023. package/lib/Util/PlatformServices.d.ts +6 -2
  1024. package/lib/Util/PlatformServices.d.ts.map +1 -1
  1025. package/lib/Util/PlatformServices.js +6 -2
  1026. package/lib/Util/PlatformServices.js.map +1 -1
  1027. package/lib/Util/ResourceOutput.d.ts +30 -0
  1028. package/lib/Util/ResourceOutput.d.ts.map +1 -0
  1029. package/lib/Util/ResourceOutput.js +60 -0
  1030. package/lib/Util/ResourceOutput.js.map +1 -0
  1031. package/lib/Util/Terminal.d.ts +23 -0
  1032. package/lib/Util/Terminal.d.ts.map +1 -0
  1033. package/lib/Util/Terminal.js +57 -0
  1034. package/lib/Util/Terminal.js.map +1 -0
  1035. package/lib/Util/Theme.d.ts +123 -0
  1036. package/lib/Util/Theme.d.ts.map +1 -0
  1037. package/lib/Util/Theme.js +133 -0
  1038. package/lib/Util/Theme.js.map +1 -0
  1039. package/lib/Util/interactive.d.ts +17 -12
  1040. package/lib/Util/interactive.d.ts.map +1 -1
  1041. package/lib/Util/interactive.js +81 -13
  1042. package/lib/Util/interactive.js.map +1 -1
  1043. package/lib/Util/scc.d.ts +11 -3
  1044. package/lib/Util/scc.d.ts.map +1 -1
  1045. package/lib/Util/scc.js +35 -22
  1046. package/lib/Util/scc.js.map +1 -1
  1047. package/lib/Util/tarGzip.d.ts +3 -1
  1048. package/lib/Util/tarGzip.d.ts.map +1 -1
  1049. package/lib/Util/tarGzip.js +15 -5
  1050. package/lib/Util/tarGzip.js.map +1 -1
  1051. package/lib/index.d.ts +4 -2
  1052. package/lib/index.d.ts.map +1 -1
  1053. package/lib/index.js +4 -2
  1054. package/lib/index.js.map +1 -1
  1055. package/package.json +40 -38
  1056. package/src/AWS/AGENTS.md +1 -1
  1057. package/src/AWS/AMP/Scraper.ts +1 -1
  1058. package/src/AWS/AppRunner/Service.ts +11 -27
  1059. package/src/AWS/Assets.ts +2 -2
  1060. package/src/AWS/AuthProvider.ts +748 -429
  1061. package/src/AWS/Batch/JobDefinition.ts +11 -27
  1062. package/src/AWS/EC2/Instance.ts +12 -28
  1063. package/src/AWS/EC2/InternetGateway.ts +1 -1
  1064. package/src/AWS/EC2/NatGateway.ts +1 -1
  1065. package/src/AWS/EC2/NetworkInterface.ts +1 -1
  1066. package/src/AWS/EC2/NetworkInterfaceAttachment.ts +1 -1
  1067. package/src/AWS/EC2/RouteTable.ts +1 -1
  1068. package/src/AWS/EC2/RouteTableAssociation.ts +1 -1
  1069. package/src/AWS/EC2/Snapshot.ts +1 -1
  1070. package/src/AWS/EC2/Subnet.ts +1 -1
  1071. package/src/AWS/EC2/Volume.ts +1 -1
  1072. package/src/AWS/EC2/VolumeAttachment.ts +1 -1
  1073. package/src/AWS/EC2/Vpc.ts +1 -1
  1074. package/src/AWS/EC2/VpcEndpoint.ts +1 -1
  1075. package/src/AWS/EC2/hosted.ts +5 -6
  1076. package/src/AWS/ECR/ImageSource.ts +4 -5
  1077. package/src/AWS/ECS/Service.ts +7 -21
  1078. package/src/AWS/ECS/Task.ts +7 -21
  1079. package/src/AWS/ElastiCache/CacheCluster.ts +323 -0
  1080. package/src/AWS/ElastiCache/ConnectCacheCluster.ts +58 -0
  1081. package/src/AWS/ElastiCache/ConnectCacheClusterHttp.ts +77 -0
  1082. package/src/AWS/ElastiCache/ConnectReplicationGroup.ts +62 -0
  1083. package/src/AWS/ElastiCache/ConnectReplicationGroupHttp.ts +110 -0
  1084. package/src/AWS/ElastiCache/ReplicationGroup.ts +594 -0
  1085. package/src/AWS/ElastiCache/SubnetGroup.ts +208 -0
  1086. package/src/AWS/ElastiCache/index.ts +7 -0
  1087. package/src/AWS/ElastiCache/internal.ts +36 -0
  1088. package/src/AWS/Environment.ts +15 -48
  1089. package/src/AWS/IAM/actions.generated.ts +1 -1
  1090. package/src/AWS/IdentityCenter/AccountAssignment.ts +7 -0
  1091. package/src/AWS/Lambda/Function.ts +26 -28
  1092. package/src/AWS/Lambda/MicrovmImage.ts +12 -28
  1093. package/src/AWS/Lambda/MicrovmProvider.ts +1 -1
  1094. package/src/AWS/Lambda/NetworkConnector.ts +1 -1
  1095. package/src/AWS/Local/DevWatchProvider.ts +10 -1
  1096. package/src/AWS/Organizations/Account.ts +18 -10
  1097. package/src/AWS/Organizations/DelegatedAdministrator.ts +7 -7
  1098. package/src/AWS/Organizations/Organization.ts +3 -5
  1099. package/src/AWS/Organizations/common.ts +17 -0
  1100. package/src/AWS/Providers.ts +12 -0
  1101. package/src/AWS/S3/Bucket.ts +1 -1
  1102. package/src/Alchemist/Errors.ts +36 -0
  1103. package/src/Alchemist/Progress.ts +175 -0
  1104. package/src/Alchemist/Runtime.ts +40 -0
  1105. package/src/Alchemist/Session.ts +460 -0
  1106. package/src/Alchemist/index.ts +24 -0
  1107. package/src/Alchemist/routes/aws.ts +88 -0
  1108. package/src/Alchemist/routes/cloudflare.ts +188 -0
  1109. package/src/Alchemist/routes/cloudflareToken.ts +215 -0
  1110. package/src/Alchemist/routes/drift.ts +94 -0
  1111. package/src/Alchemist/routes/logs.ts +185 -0
  1112. package/src/Alchemist/routes/nuke.ts +146 -0
  1113. package/src/Alchemist/routes/profile.ts +427 -0
  1114. package/src/Alchemist/routes/provider.ts +107 -0
  1115. package/src/Alchemist/routes/stack.ts +137 -0
  1116. package/src/Alchemist/routes/state.ts +77 -0
  1117. package/src/Apply.ts +312 -173
  1118. package/src/Auth/AuthProvider.ts +416 -158
  1119. package/src/Auth/BrowserOAuth.ts +68 -0
  1120. package/src/Auth/Credentials.ts +155 -46
  1121. package/src/Auth/CredentialsCache.ts +57 -0
  1122. package/src/Auth/Demand.ts +208 -83
  1123. package/src/Auth/Env.ts +38 -14
  1124. package/src/Auth/Inspect.ts +129 -0
  1125. package/src/Auth/Lock.ts +26 -11
  1126. package/src/Auth/OAuthFlow.ts +551 -0
  1127. package/src/Auth/Paths.ts +30 -0
  1128. package/src/Auth/Profile.ts +768 -164
  1129. package/src/Auth/Resolve.ts +136 -0
  1130. package/src/Auth/StoredAuthProvider.ts +291 -0
  1131. package/src/Auth/index.ts +1 -0
  1132. package/src/Axiom/AuthProvider.ts +112 -314
  1133. package/src/Axiom/Credentials.ts +5 -13
  1134. package/src/Axiom/Providers.ts +3 -3
  1135. package/src/Bundle/Bundle.ts +3 -5
  1136. package/src/Cli/CliKit/CliKit.ts +183 -0
  1137. package/src/Cli/CliKit/index.ts +50 -0
  1138. package/src/Cli/CliKit/interaction.ts +19 -0
  1139. package/src/Cli/CliKit/layer.ts +50 -0
  1140. package/src/Cli/DevOptions.ts +19 -0
  1141. package/src/Cli/Format.ts +31 -0
  1142. package/src/Cli/GlobalLog.ts +147 -0
  1143. package/src/Cli/LoggingCli.ts +312 -108
  1144. package/src/Cli/ModeTag.ts +1 -1
  1145. package/src/Cli/NamespaceTree.ts +94 -21
  1146. package/src/Cli/PlainCliFormatter.ts +75 -0
  1147. package/src/Cli/PropertyDiff.ts +229 -0
  1148. package/src/Cli/checkVersion.ts +19 -6
  1149. package/src/Cli/commands/aws.ts +67 -100
  1150. package/src/Cli/commands/cloudflare.ts +195 -435
  1151. package/src/Cli/commands/compat.ts +25 -0
  1152. package/src/Cli/commands/confirm.ts +46 -0
  1153. package/src/Cli/commands/deploy.ts +225 -212
  1154. package/src/Cli/commands/dev.ts +72 -34
  1155. package/src/Cli/commands/drift.ts +107 -0
  1156. package/src/Cli/commands/errors.ts +162 -0
  1157. package/src/Cli/commands/flags.ts +199 -0
  1158. package/src/Cli/commands/instrument.ts +18 -0
  1159. package/src/Cli/commands/logs.ts +125 -143
  1160. package/src/Cli/commands/nuke.ts +138 -811
  1161. package/src/Cli/commands/profile/commands.ts +482 -0
  1162. package/src/Cli/commands/profile/flows.ts +218 -0
  1163. package/src/Cli/commands/profile/hub.ts +191 -0
  1164. package/src/Cli/commands/profile/index.ts +1 -0
  1165. package/src/Cli/commands/provider.ts +63 -0
  1166. package/src/Cli/commands/render.ts +121 -0
  1167. package/src/Cli/commands/state.ts +250 -387
  1168. package/src/Cli/components/types.ts +141 -0
  1169. package/src/Cli/components/ui/Data.tsx +44 -0
  1170. package/src/Cli/components/ui/Environment.tsx +86 -0
  1171. package/src/Cli/components/ui/Feedback.tsx +269 -0
  1172. package/src/Cli/components/ui/Interactive.tsx +1062 -0
  1173. package/src/Cli/components/ui/Layout.tsx +252 -0
  1174. package/src/Cli/components/ui/Live.tsx +131 -0
  1175. package/src/Cli/components/ui/ProgressBar.tsx +57 -0
  1176. package/src/Cli/components/ui/Transcript.tsx +42 -0
  1177. package/src/Cli/components/ui/Typography.tsx +83 -0
  1178. package/src/Cli/components/ui/index.ts +68 -0
  1179. package/src/Cli/components/view/ApprovePlan.tsx +101 -0
  1180. package/src/Cli/components/view/Help.tsx +381 -0
  1181. package/src/Cli/components/view/Logo.tsx +168 -0
  1182. package/src/Cli/components/view/Nuke.tsx +258 -0
  1183. package/src/Cli/components/view/PlanDecision.tsx +80 -0
  1184. package/src/Cli/components/view/PlanRow.tsx +39 -0
  1185. package/src/Cli/components/view/PlanTree.ts +354 -0
  1186. package/src/Cli/components/view/PlanView.tsx +825 -0
  1187. package/src/Cli/components/view/Profile.tsx +446 -0
  1188. package/src/Cli/components/view/ProfileDashboard.tsx +929 -0
  1189. package/src/Cli/components/view/Prompts.tsx +793 -0
  1190. package/src/Cli/components/view/Runtime.tsx +975 -0
  1191. package/src/Cli/components/view/SigilCli.tsx +186 -0
  1192. package/src/Cli/components/view/StackOutputs.tsx +38 -0
  1193. package/src/Cli/components/view/StateExplorer.tsx +1179 -0
  1194. package/src/Cli/components/view/statusStyle.ts +97 -0
  1195. package/src/Cli/components/view/usePlanPresentation.ts +82 -0
  1196. package/src/Cli/components/view/usePlanViewport.ts +172 -0
  1197. package/src/Cli/exec.ts +278 -32
  1198. package/src/Cli/main.ts +189 -42
  1199. package/src/Cli/selectCli.ts +30 -15
  1200. package/src/Cloudflare/ApiToken/UserApiToken.ts +1 -1
  1201. package/src/Cloudflare/Auth/AuthConfig.ts +117 -0
  1202. package/src/Cloudflare/Auth/AuthProvider.ts +712 -608
  1203. package/src/Cloudflare/Auth/OAuthClient.ts +40 -366
  1204. package/src/Cloudflare/Auth/OAuthScopes.ts +921 -0
  1205. package/src/Cloudflare/Auth/TokenPolicy.ts +79 -0
  1206. package/src/Cloudflare/CloudflareEnvironment.ts +7 -17
  1207. package/src/Cloudflare/Containers/Container.ts +12 -24
  1208. package/src/Cloudflare/Containers/ContainerApplication.ts +12 -27
  1209. package/src/Cloudflare/Credentials.ts +18 -72
  1210. package/src/Cloudflare/EdgeSession.ts +2 -3
  1211. package/src/Cloudflare/Logs.ts +16 -10
  1212. package/src/Cloudflare/Pages/Project.ts +1 -1
  1213. package/src/Cloudflare/Providers.ts +2 -2
  1214. package/src/Cloudflare/StateStore/Api.ts +2 -2
  1215. package/src/Cloudflare/StateStore/CredentialsFile.ts +11 -6
  1216. package/src/Cloudflare/StateStore/State.ts +247 -194
  1217. package/src/Cloudflare/Vectorize/SearchIndexHttpClient.ts +2 -2
  1218. package/src/Cloudflare/Website/Nextjs.ts +4 -15
  1219. package/src/Cloudflare/Website/Vocs.ts +3 -7
  1220. package/src/Cloudflare/Workers/Assets.ts +106 -38
  1221. package/src/Cloudflare/Workers/BrowserHttpClient.ts +10 -3
  1222. package/src/Cloudflare/Workers/CloudflareTracer.ts +113 -0
  1223. package/src/Cloudflare/Workers/Compatibility.ts +37 -7
  1224. package/src/Cloudflare/Workers/DurableObject.ts +50 -4
  1225. package/src/Cloudflare/Workers/DurableObjectBridge.ts +8 -0
  1226. package/src/Cloudflare/Workers/DurableObjectState.ts +46 -9
  1227. package/src/Cloudflare/Workers/DurableObjectStorage.ts +25 -12
  1228. package/src/Cloudflare/Workers/LocalWorkerProvider.ts +172 -58
  1229. package/src/Cloudflare/Workers/RpcWorker.ts +44 -18
  1230. package/src/Cloudflare/Workers/Source.ts +9 -1
  1231. package/src/Cloudflare/Workers/Sources/Python.ts +18 -12
  1232. package/src/Cloudflare/Workers/Sources/Rolldown.ts +1 -1
  1233. package/src/Cloudflare/Workers/Sources/Vite.ts +42 -34
  1234. package/src/Cloudflare/Workers/Telemetry.ts +170 -0
  1235. package/src/Cloudflare/Workers/ViteBuildChildRunner.ts +6 -1
  1236. package/src/Cloudflare/Workers/ViteChild.shared.ts +1 -0
  1237. package/src/Cloudflare/Workers/ViteChild.ts +21 -19
  1238. package/src/Cloudflare/Workers/ViteChildRunner.ts +2 -1
  1239. package/src/Cloudflare/Workers/Worker.ts +101 -50
  1240. package/src/Cloudflare/Workers/WorkerAsyncBindings.ts +29 -0
  1241. package/src/Cloudflare/Workers/WorkerLoader.ts +40 -8
  1242. package/src/Cloudflare/Workers/WorkerProvider.ts +64 -29
  1243. package/src/Cloudflare/Workers/cloudflare_workers.ts +5 -1
  1244. package/src/Cloudflare/Workers/index.ts +1 -0
  1245. package/src/Cloudflare/Workflows/Workflow.ts +105 -0
  1246. package/src/Cloudflare/Workflows/WorkflowBridge.ts +5 -3
  1247. package/src/Command/Command.ts +11 -3
  1248. package/src/Command/Dev.ts +33 -8
  1249. package/src/Docker/BuildHash.ts +75 -8
  1250. package/src/Docker/Docker.ts +7 -2
  1251. package/src/Docker/Service.ts +7 -21
  1252. package/src/Docker/ServiceImage.ts +4 -5
  1253. package/src/{Sync.ts → Drift.ts} +161 -59
  1254. package/src/Drizzle/Schema.ts +5 -7
  1255. package/src/Fly/AuthProvider.ts +44 -232
  1256. package/src/Fly/CheckpointHttp.ts +5 -2
  1257. package/src/Fly/Credentials.ts +29 -16
  1258. package/src/Fly/DecryptHttp.ts +5 -2
  1259. package/src/Fly/EncryptHttp.ts +5 -2
  1260. package/src/Fly/ExecHttp.ts +5 -2
  1261. package/src/Fly/GetSecretHttp.ts +5 -2
  1262. package/src/Fly/ListSecretsHttp.ts +5 -2
  1263. package/src/Fly/Machine.ts +67 -20
  1264. package/src/Fly/Providers.ts +2 -2
  1265. package/src/Fly/Service.ts +44 -20
  1266. package/src/Fly/SignHttp.ts +5 -2
  1267. package/src/Fly/VerifyHttp.ts +5 -2
  1268. package/src/Fly/WriteSecretHttp.ts +5 -2
  1269. package/src/Fly/replicas.ts +47 -1
  1270. package/src/GitHub/AuthProvider.ts +225 -143
  1271. package/src/GitHub/Credentials.ts +6 -13
  1272. package/src/GitHub/Providers.ts +4 -4
  1273. package/src/Hetzner/AuthProvider.ts +50 -238
  1274. package/src/Hetzner/Credentials.ts +4 -12
  1275. package/src/Hetzner/Providers.ts +2 -2
  1276. package/src/Interaction.ts +354 -0
  1277. package/src/Kubernetes/ClusterAdapter.ts +4 -5
  1278. package/src/Kubernetes/Deployment.ts +7 -21
  1279. package/src/Kubernetes/Job.ts +7 -21
  1280. package/src/Local/DevLog.ts +135 -0
  1281. package/src/Local/LocalProvider.ts +3 -3
  1282. package/src/Local/RpcServer.ts +11 -0
  1283. package/src/Local/RpcServerEnvironment.ts +3 -2
  1284. package/src/Local/RpcSpawner.ts +161 -78
  1285. package/src/Neon/AuthProvider.ts +31 -203
  1286. package/src/Neon/Credentials.ts +4 -12
  1287. package/src/Neon/Providers.ts +2 -2
  1288. package/src/Nuke.ts +463 -0
  1289. package/src/Plan.ts +920 -708
  1290. package/src/Planetscale/AuthProvider.ts +397 -324
  1291. package/src/Planetscale/Credentials.ts +21 -19
  1292. package/src/Planetscale/OAuthClient.ts +34 -328
  1293. package/src/Planetscale/Providers.ts +2 -2
  1294. package/src/Planetscale/Util.ts +1 -1
  1295. package/src/Prisma/AuthProvider.ts +62 -240
  1296. package/src/Prisma/Compute.ts +7 -21
  1297. package/src/Prisma/PrismaEnvironment.ts +6 -14
  1298. package/src/Prisma/Providers.ts +7 -7
  1299. package/src/Provider.ts +12 -13
  1300. package/src/Railway/AuthProvider.ts +291 -235
  1301. package/src/Railway/Bucket.ts +6 -6
  1302. package/src/Railway/CloudAgent.ts +4 -4
  1303. package/src/Railway/Credentials.ts +5 -14
  1304. package/src/Railway/CustomDomain.ts +5 -5
  1305. package/src/Railway/Function.ts +10 -10
  1306. package/src/Railway/Group.ts +2 -2
  1307. package/src/Railway/LoginSession.ts +5 -5
  1308. package/src/Railway/Mongo.ts +19 -19
  1309. package/src/Railway/MySQL.ts +19 -19
  1310. package/src/Railway/Postgres.ts +19 -19
  1311. package/src/Railway/PrivateNetwork.ts +2 -2
  1312. package/src/Railway/Project.ts +7 -7
  1313. package/src/Railway/ProjectEnvironment.ts +7 -7
  1314. package/src/Railway/Providers.ts +2 -2
  1315. package/src/Railway/Redis.ts +9 -9
  1316. package/src/Railway/Sandbox.ts +10 -10
  1317. package/src/Railway/Service.ts +72 -1
  1318. package/src/Railway/ServiceDomain.ts +253 -27
  1319. package/src/Railway/ServiceProvider.ts +234 -87
  1320. package/src/Railway/TcpProxy.ts +4 -4
  1321. package/src/Railway/Template.ts +12 -12
  1322. package/src/Railway/Usage.ts +2 -2
  1323. package/src/Railway/Variable.ts +2 -2
  1324. package/src/Railway/Volume.ts +4 -4
  1325. package/src/Railway/VolumeBackup.ts +11 -11
  1326. package/src/Railway/local-context.ts +333 -0
  1327. package/src/Report.ts +365 -0
  1328. package/src/Stack.ts +12 -8
  1329. package/src/State/Export.ts +28 -47
  1330. package/src/State/HttpStateStore.ts +15 -8
  1331. package/src/State/LocalState.ts +6 -16
  1332. package/src/State/Tree.ts +277 -0
  1333. package/src/State/index.ts +1 -0
  1334. package/src/Telemetry/Layer.ts +16 -5
  1335. package/src/Telemetry.ts +6 -1
  1336. package/src/Test/Core.ts +10 -4
  1337. package/src/UserFacingError.ts +35 -0
  1338. package/src/Util/AtomicFile.ts +36 -0
  1339. package/src/Util/ConsoleSink.ts +23 -0
  1340. package/src/Util/LineBuffer.ts +20 -0
  1341. package/src/Util/Memoize.ts +48 -0
  1342. package/src/Util/Node.ts +35 -14
  1343. package/src/Util/PlatformServices.ts +11 -1
  1344. package/src/Util/ResourceOutput.ts +77 -0
  1345. package/src/Util/Terminal.ts +81 -0
  1346. package/src/Util/Theme.ts +150 -0
  1347. package/src/Util/interactive.ts +103 -16
  1348. package/src/Util/scc.ts +43 -23
  1349. package/src/Util/tarGzip.ts +33 -5
  1350. package/src/index.ts +4 -2
  1351. package/lib/Cli/Cli.d.ts +0 -21
  1352. package/lib/Cli/Cli.d.ts.map +0 -1
  1353. package/lib/Cli/Cli.js +0 -5
  1354. package/lib/Cli/Cli.js.map +0 -1
  1355. package/lib/Cli/Event.d.ts +0 -29
  1356. package/lib/Cli/Event.d.ts.map +0 -1
  1357. package/lib/Cli/Event.js +0 -1
  1358. package/lib/Cli/Event.js.map +0 -1
  1359. package/lib/Cli/commands/_shared.d.ts +0 -138
  1360. package/lib/Cli/commands/_shared.d.ts.map +0 -1
  1361. package/lib/Cli/commands/_shared.js +0 -298
  1362. package/lib/Cli/commands/_shared.js.map +0 -1
  1363. package/lib/Cli/commands/login.d.ts +0 -14
  1364. package/lib/Cli/commands/login.d.ts.map +0 -1
  1365. package/lib/Cli/commands/login.js +0 -115
  1366. package/lib/Cli/commands/login.js.map +0 -1
  1367. package/lib/Cli/commands/profile.d.ts +0 -25
  1368. package/lib/Cli/commands/profile.d.ts.map +0 -1
  1369. package/lib/Cli/commands/profile.js +0 -83
  1370. package/lib/Cli/commands/profile.js.map +0 -1
  1371. package/lib/Cli/commands/sync.d.ts +0 -22
  1372. package/lib/Cli/commands/sync.d.ts.map +0 -1
  1373. package/lib/Cli/commands/sync.js +0 -64
  1374. package/lib/Cli/commands/sync.js.map +0 -1
  1375. package/lib/Cli/commands/tail.d.ts +0 -9
  1376. package/lib/Cli/commands/tail.d.ts.map +0 -1
  1377. package/lib/Cli/commands/tail.js +0 -97
  1378. package/lib/Cli/commands/tail.js.map +0 -1
  1379. package/lib/Cli/tui/InkCLI.d.ts +0 -4
  1380. package/lib/Cli/tui/InkCLI.d.ts.map +0 -1
  1381. package/lib/Cli/tui/InkCLI.js +0 -53
  1382. package/lib/Cli/tui/InkCLI.js.map +0 -1
  1383. package/lib/Cli/tui/components/ApprovePlan.d.ts +0 -9
  1384. package/lib/Cli/tui/components/ApprovePlan.d.ts.map +0 -1
  1385. package/lib/Cli/tui/components/ApprovePlan.js +0 -21
  1386. package/lib/Cli/tui/components/ApprovePlan.js.map +0 -1
  1387. package/lib/Cli/tui/components/Nuke.d.ts +0 -36
  1388. package/lib/Cli/tui/components/Nuke.d.ts.map +0 -1
  1389. package/lib/Cli/tui/components/Nuke.js +0 -132
  1390. package/lib/Cli/tui/components/Nuke.js.map +0 -1
  1391. package/lib/Cli/tui/components/Plan.d.ts +0 -8
  1392. package/lib/Cli/tui/components/Plan.d.ts.map +0 -1
  1393. package/lib/Cli/tui/components/Plan.js +0 -87
  1394. package/lib/Cli/tui/components/Plan.js.map +0 -1
  1395. package/lib/Cli/tui/components/PlanProgress.d.ts +0 -55
  1396. package/lib/Cli/tui/components/PlanProgress.d.ts.map +0 -1
  1397. package/lib/Cli/tui/components/PlanProgress.js +0 -292
  1398. package/lib/Cli/tui/components/PlanProgress.js.map +0 -1
  1399. package/lib/Sync.d.ts +0 -109
  1400. package/lib/Sync.d.ts.map +0 -1
  1401. package/lib/Sync.js.map +0 -1
  1402. package/lib/Util/Clank.d.ts +0 -45
  1403. package/lib/Util/Clank.d.ts.map +0 -1
  1404. package/lib/Util/Clank.js +0 -79
  1405. package/lib/Util/Clank.js.map +0 -1
  1406. package/src/Cli/Cli.ts +0 -23
  1407. package/src/Cli/Event.ts +0 -51
  1408. package/src/Cli/commands/_shared.ts +0 -498
  1409. package/src/Cli/commands/login.ts +0 -169
  1410. package/src/Cli/commands/profile.ts +0 -132
  1411. package/src/Cli/commands/sync.ts +0 -123
  1412. package/src/Cli/commands/tail.ts +0 -155
  1413. package/src/Cli/tui/InkCLI.tsx +0 -69
  1414. package/src/Cli/tui/components/ApprovePlan.tsx +0 -44
  1415. package/src/Cli/tui/components/Nuke.tsx +0 -273
  1416. package/src/Cli/tui/components/Plan.tsx +0 -211
  1417. package/src/Cli/tui/components/PlanProgress.tsx +0 -455
  1418. package/src/Util/Clank.ts +0 -103
@@ -1,128 +1,176 @@
1
1
  import * as Floci from "@alchemy.run/floci";
2
2
  import * as DistilledAuth from "@distilled.cloud/aws/Auth";
3
- import { Credentials } from "@distilled.cloud/aws/Credentials";
3
+ import type { CredentialsError } from "@distilled.cloud/aws/Credentials";
4
+ import {
5
+ Credentials,
6
+ ExpiredSSOToken,
7
+ InvalidSSOToken,
8
+ } from "@distilled.cloud/aws/Credentials";
4
9
  import * as STS from "@distilled.cloud/aws/sts";
5
- import * as Console from "effect/Console";
10
+ import * as EffectConsole from "effect/Console";
11
+ import * as Deferred from "effect/Deferred";
6
12
  import * as Effect from "effect/Effect";
13
+ import * as Fiber from "effect/Fiber";
7
14
  import * as FileSystem from "effect/FileSystem";
8
15
  import * as Layer from "effect/Layer";
9
16
  import * as Match from "effect/Match";
17
+ import * as Option from "effect/Option";
10
18
  import * as Path from "effect/Path";
11
19
  import * as Redacted from "effect/Redacted";
20
+ import * as Ref from "effect/Ref";
21
+ import * as Schema from "effect/Schema";
22
+ import * as Stream from "effect/Stream";
23
+ import type * as HttpClient from "effect/unstable/http/HttpClient";
12
24
  import { ChildProcess } from "effect/unstable/process";
25
+ import type { ChildProcessSpawner } from "effect/unstable/process/ChildProcessSpawner";
13
26
  import * as NodeCrypto from "node:crypto";
14
27
  import * as NodeOs from "node:os";
15
28
  import {
16
29
  AuthError,
17
30
  AuthProviderLayer,
18
- type ConfigureContext,
31
+ NeedsReauth,
32
+ reconfigureHint,
33
+ refreshHint,
34
+ type ConfigureField,
35
+ type ConfigureMethod,
36
+ type ProviderDetailLine,
19
37
  } from "../Auth/AuthProvider.ts";
20
- import { CredentialsStore, displayRedacted } from "../Auth/Credentials.ts";
38
+ import { displayRedacted } from "../Auth/Credentials.ts";
21
39
  import {
22
40
  getEnv,
23
41
  getEnvRedacted,
24
42
  getEnvRedactedRequired,
25
43
  getEnvRequired,
26
- retryOnce,
44
+ mapPromptCancellation,
27
45
  } from "../Auth/Env.ts";
28
- import * as Clank from "../Util/Clank.ts";
46
+ import {
47
+ storedSecret,
48
+ storedValueText,
49
+ validateFieldValues,
50
+ } from "../Auth/StoredAuthProvider.ts";
51
+ import * as Interaction from "../Interaction.ts";
29
52
  import * as Endpoint from "./Endpoint.ts";
30
53
  import * as Region from "./Region.ts";
31
54
 
32
55
  export const AWS_AUTH_PROVIDER_NAME = "AWS";
33
-
34
- /** Default endpoint of a local AWS emulator (floci / LocalStack). */
35
56
  export const DEFAULT_LOCAL_ENDPOINT = `http://localhost:${Floci.DEFAULT_FLOCI_PORT}`;
36
57
 
37
58
  /**
38
- * Dummy account stamped on every floci / `{ method: "local" }` environment.
59
+ * Dummy account stamped on every floci environment.
39
60
  * A custom `AWS_ENDPOINT_URL` on env/sso credentials does NOT use this —
40
61
  * those keep the real account from STS / `AWS_ACCOUNT_ID`.
41
62
  */
42
63
  export const LOCAL_ACCOUNT_ID = "000000000000";
43
64
 
44
- export type AwsAuthConfig =
45
- | { method: "sso"; ssoProfile: string }
46
- | { method: "stored" }
47
- | { method: "env" }
48
- | {
49
- /**
50
- * Local AWS emulator (floci, LocalStack, or any endpoint-compatible
51
- * emulator). Resolves dummy credentials and points every AWS call at
52
- * the configured endpoint no AWS account required.
53
- */
54
- method: "local";
55
- /** @default "http://localhost:4566" */
56
- endpoint?: string;
57
- /** @default "us-east-1" */
58
- region?: string;
59
- /** @default "000000000000" */
60
- accountId?: string;
61
- /**
62
- * Ensure the floci container is running (via `@alchemy.run/floci`'s
63
- * `ensureFloci`) when nothing is listening on the endpoint. Defaults to
64
- * true for the default endpoint only.
65
- * @default endpoint === "http://localhost:4566"
66
- */
67
- autoStart?: boolean;
68
- };
65
+ /**
66
+ * distilled's SSO credential loader `Console.log`s its expired-token
67
+ * diagnostic in addition to failing with the typed `ExpiredSSOToken`. The
68
+ * typed error already carries the same message (and the profile UI surfaces
69
+ * it as a reauth diagnostic), so the raw console write only smears over the
70
+ * Interaction renderer. Provide this no-op Console on every distilled
71
+ * `loadProfileCredentials` call so distilled has nowhere to print.
72
+ */
73
+ const noop = () => {};
74
+ export const silentConsole: EffectConsole.Console = {
75
+ assert: noop,
76
+ clear: noop,
77
+ count: noop,
78
+ countReset: noop,
79
+ debug: noop,
80
+ dir: noop,
81
+ dirxml: noop,
82
+ error: noop,
83
+ group: noop,
84
+ groupCollapsed: noop,
85
+ groupEnd: noop,
86
+ info: noop,
87
+ log: noop,
88
+ table: noop,
89
+ time: noop,
90
+ timeEnd: noop,
91
+ timeLog: noop,
92
+ trace: noop,
93
+ warn: noop,
94
+ };
95
+
96
+ /** Typed values stored in an AWS provider profile document. */
97
+ export const AwsAuthConfigSchema = Schema.Union([
98
+ Schema.Struct({
99
+ method: Schema.Literal("sso"),
100
+ ssoProfile: Schema.String,
101
+ authorizationMethod: Schema.optional(
102
+ Schema.Union([Schema.Literal("oauth"), Schema.Literal("device")]),
103
+ ),
104
+ }),
105
+ Schema.Struct({
106
+ method: Schema.Literal("stored"),
107
+ accountId: Schema.optional(Schema.String),
108
+ accessKeyId: Schema.String,
109
+ secretAccessKey: Schema.String,
110
+ sessionToken: Schema.optional(Schema.String),
111
+ region: Schema.String,
112
+ }),
113
+ ]);
114
+ export type AwsAuthConfig = typeof AwsAuthConfigSchema.Type;
69
115
 
70
116
  const options: Array<{
71
117
  value: AwsAuthConfig["method"];
72
118
  label: string;
73
- hint?: string;
119
+ description?: string;
74
120
  }> = [
75
121
  {
76
122
  value: "sso",
77
123
  label: "SSO",
78
- hint: "aws sso login credentials loaded from AWS SSO cache",
79
- },
80
- {
81
- value: "env",
82
- label: "Environment Variables",
83
- hint: "AWS_ACCESS_KEY_ID + AWS_SECRET_ACCESS_KEY",
124
+ description: "sign in with an AWS IAM Identity Center profile",
84
125
  },
85
126
  {
86
127
  value: "stored",
87
- label: "Stored",
88
- hint: "stored in ~/.alchemy/credentials",
128
+ label: "Access Keys",
129
+ description: "enter an access key and secret directly",
89
130
  },
131
+ ];
132
+
133
+ /** `--set` fields for `--method stored` (static access keys, persisted). */
134
+ const keysFields: ReadonlyArray<ConfigureField> = [
135
+ { name: "accessKeyId", label: "AWS Access Key ID" },
136
+ { name: "secretAccessKey", label: "AWS Secret Access Key", secret: true },
90
137
  {
91
- value: "local",
92
- label: "Local emulator",
93
- hint: "floci / LocalStack on localhost:4566 — no AWS account",
138
+ name: "sessionToken",
139
+ label: "AWS Session Token",
140
+ secret: true,
141
+ optional: true,
94
142
  },
143
+ { name: "region", label: "AWS Region", placeholder: "us-east-1" },
95
144
  ];
96
145
 
97
- export interface AwsStoredCredentials {
98
- accountId: string;
99
- accessKeyId: string;
100
- secretAccessKey: string;
101
- sessionToken?: string;
102
- region: string;
103
- }
146
+ /** `--set` fields for `--method sso` (nothing persisted; profile validated). */
147
+ const ssoFields: ReadonlyArray<ConfigureField> = [
148
+ { name: "ssoProfile", label: "AWS profile name (from ~/.aws/config)" },
149
+ ];
150
+
151
+ const configureMethods: ReadonlyArray<ConfigureMethod> = [
152
+ { method: "stored", fields: keysFields },
153
+ { method: "sso", fields: ssoFields },
154
+ ];
104
155
 
105
156
  export interface AwsResolvedCredentials {
106
157
  accountId: string;
107
- credentials: Effect.Effect<{
108
- accessKeyId: Redacted.Redacted<string>;
109
- secretAccessKey: Redacted.Redacted<string>;
110
- sessionToken: Redacted.Redacted<string> | undefined;
111
- region: string;
112
- }>;
158
+ credentials: Effect.Effect<AwsCredentials, CredentialsError>;
113
159
  region: string;
114
- /**
115
- * Custom AWS endpoint (local emulator). Flows into
116
- * `AWSEnvironment.endpoint`, which `Endpoint.fromEnvironment` applies to
117
- * every AWS SDK call.
118
- */
119
160
  endpoint?: string;
120
161
  source: {
121
- type: AwsAuthConfig["method"];
162
+ type: AwsAuthConfig["method"] | "env";
122
163
  details?: string;
123
164
  };
124
165
  }
125
166
 
167
+ interface AwsCredentials {
168
+ accessKeyId: Redacted.Redacted<string>;
169
+ secretAccessKey: Redacted.Redacted<string>;
170
+ sessionToken: Redacted.Redacted<string> | undefined;
171
+ region: string;
172
+ }
173
+
126
174
  /**
127
175
  * An explicitly-set `AWS_REGION` env var wins over the region recorded in an
128
176
  * SSO profile (`~/.aws/config`) or in stored credentials. `AWS_DEFAULT_REGION`
@@ -131,7 +179,7 @@ export interface AwsResolvedCredentials {
131
179
  */
132
180
  export const applyEnvRegionOverride = <C extends { region: string }>(
133
181
  creds: C,
134
- ): Effect.Effect<C> =>
182
+ ): Effect.Effect<C, AuthError> =>
135
183
  getEnv("AWS_REGION").pipe(
136
184
  Effect.map((envRegion) =>
137
185
  envRegion ? { ...creds, region: envRegion } : creds,
@@ -141,7 +189,7 @@ export const applyEnvRegionOverride = <C extends { region: string }>(
141
189
  /**
142
190
  * Layer that registers the AWS {@link AuthProvider} into the
143
191
  * {@link AuthProviders} registry when built. Include this in the AWS
144
- * `providers()` layer so `alchemy login` can discover it.
192
+ * `providers()` layer so the alchemy CLI can discover it.
145
193
  */
146
194
  export const AwsAuth = AuthProviderLayer<
147
195
  AwsAuthConfig,
@@ -149,20 +197,17 @@ export const AwsAuth = AuthProviderLayer<
149
197
  >()(
150
198
  AWS_AUTH_PROVIDER_NAME,
151
199
  Effect.gen(function* () {
152
- const store = yield* CredentialsStore;
153
-
200
+ const interaction = Interaction.accessors;
154
201
  const getAccountId = ({
155
202
  accessKeyId,
156
203
  secretAccessKey,
157
204
  sessionToken,
158
205
  region,
159
- endpoint,
160
206
  }: {
161
207
  accessKeyId: Redacted.Redacted<string>;
162
208
  secretAccessKey: Redacted.Redacted<string>;
163
209
  sessionToken?: Redacted.Redacted<string>;
164
210
  region: string;
165
- endpoint?: string;
166
211
  }) =>
167
212
  STS.getCallerIdentity({}).pipe(
168
213
  Effect.provide(
@@ -181,15 +226,13 @@ export const AwsAuth = AuthProviderLayer<
181
226
  // deadlock: it derives the region from AWSEnvironment, which is the
182
227
  // very service still being constructed by this STS call.
183
228
  Region.of(region),
184
- // A custom endpoint (local emulator) must apply to this STS call
185
- // too the default resolver would call real AWS. When there is
186
- // no custom endpoint we must still provide `Endpoint.none`
187
- // rather than leaving it unset: falling through to the ambient
188
- // `Endpoint.fromEnvironment` reads it off AWSEnvironment the
189
- // very service this STS call is constructing — and deadlocks
190
- // the fiber on its own in-flight cache (no I/O, no timer, no
191
- // output). Same reason as `Region.of` above.
192
- endpoint ? Endpoint.of(endpoint) : Endpoint.none,
229
+ // Provide `Endpoint.none` rather than leaving it unset: falling
230
+ // through to the ambient `Endpoint.fromEnvironment` reads it off
231
+ // AWSEnvironment the very service this STS call is
232
+ // constructing and deadlocks the fiber on its own in-flight
233
+ // cache (no I/O, no timer, no output). Same reason as
234
+ // `Region.of` above.
235
+ Endpoint.none,
193
236
  ),
194
237
  ),
195
238
  Effect.flatMap((self) =>
@@ -200,26 +243,34 @@ export const AwsAuth = AuthProviderLayer<
200
243
  );
201
244
 
202
245
  const loginStored = Effect.fn(function* (profileName: string) {
203
- const accessKeyId = yield* Clank.text({
204
- message: "AWS Access Key ID",
205
- validate: (v) => (v.length === 0 ? "Required" : undefined),
206
- }).pipe(retryOnce);
207
-
208
- const secretAccessKey = yield* Clank.password({
209
- message: "AWS Secret Access Key",
210
- validate: (v) => (v.length === 0 ? "Required" : undefined),
211
- }).pipe(retryOnce);
212
-
213
- const sessionToken = yield* Clank.text({
214
- message: "AWS Session Token (optional — press Enter or Esc to skip)",
215
- placeholder: "(none)",
216
- }).pipe(Effect.catch(() => Effect.succeed("")));
217
-
218
- const region = yield* Clank.text({
219
- message: "AWS Region",
220
- placeholder: "us-east-1",
221
- defaultValue: "us-east-1",
222
- }).pipe(retryOnce);
246
+ const accessKeyId = yield* interaction.prompt
247
+ .text({
248
+ message: "AWS Access Key ID",
249
+ validate: (v) => (v.length === 0 ? "Required" : undefined),
250
+ })
251
+ .pipe(mapPromptCancellation);
252
+
253
+ const secretAccessKey = yield* interaction.prompt
254
+ .password({
255
+ message: "AWS Secret Access Key",
256
+ validate: (v) => (v.length === 0 ? "Required" : undefined),
257
+ })
258
+ .pipe(mapPromptCancellation);
259
+
260
+ const sessionToken = yield* interaction.prompt
261
+ .password({
262
+ message: "AWS Session Token (optional; press Enter to skip)",
263
+ placeholder: "(none)",
264
+ })
265
+ .pipe(mapPromptCancellation);
266
+
267
+ const region = yield* interaction.prompt
268
+ .text({
269
+ message: "AWS Region",
270
+ placeholder: "us-east-1",
271
+ defaultValue: "us-east-1",
272
+ })
273
+ .pipe(mapPromptCancellation);
223
274
 
224
275
  const accountId = yield* getAccountId({
225
276
  accessKeyId: Redacted.make(accessKeyId),
@@ -228,372 +279,402 @@ export const AwsAuth = AuthProviderLayer<
228
279
  region,
229
280
  });
230
281
 
231
- yield* store.write<AwsStoredCredentials>(profileName, "aws", {
282
+ yield* interaction.output.success("AWS credentials saved.");
283
+
284
+ return {
285
+ method: "stored" as const,
232
286
  accountId,
233
287
  accessKeyId,
234
288
  secretAccessKey,
235
- sessionToken,
289
+ sessionToken: sessionToken || undefined,
236
290
  region,
237
- });
238
- yield* Clank.success("AWS credentials saved.");
239
-
240
- return { method: "stored" as const };
291
+ };
241
292
  });
242
293
 
243
294
  const configureInteractive = (profileName: string) =>
244
- Clank.select({
245
- message: "AWS authentication method",
246
- options,
247
- }).pipe(
248
- Effect.flatMap((method) =>
249
- Match.value(method).pipe(
250
- Match.when("env", () => Effect.succeed({ method: "env" as const })),
251
- Match.when("sso", () =>
252
- Effect.gen(function* () {
253
- const ssoProfile = yield* Clank.text({
254
- message: "AWS profile name (from ~/.aws/config)",
255
- placeholder: "default",
256
- defaultValue: "default",
257
- });
258
-
259
- const config = {
260
- method: "sso" as const,
261
- ssoProfile: ssoProfile ?? "default",
262
- };
295
+ interaction.prompt
296
+ .select({
297
+ message: "AWS authentication method",
298
+ options,
299
+ })
300
+ .pipe(
301
+ Effect.flatMap((method) =>
302
+ Match.value(method).pipe(
303
+ Match.when("sso", () =>
304
+ Effect.gen(function* () {
305
+ const ssoProfile = yield* interaction.prompt.text({
306
+ message: "AWS profile name (from ~/.aws/config)",
307
+ placeholder: "default",
308
+ defaultValue: "default",
309
+ });
310
+ const authorizationMethod = yield* interaction.prompt.select({
311
+ message: "AWS SSO authorization method",
312
+ options: [
313
+ {
314
+ value: "oauth" as const,
315
+ label: "Browser OAuth",
316
+ description: "authorize in this device's browser",
317
+ },
318
+ {
319
+ value: "device" as const,
320
+ label: "Device code",
321
+ description:
322
+ "authorize with a short code on any device",
323
+ },
324
+ ],
325
+ });
263
326
 
264
- yield* loginSSO(config);
327
+ const config = {
328
+ method: "sso" as const,
329
+ ssoProfile: ssoProfile ?? "default",
330
+ authorizationMethod,
331
+ };
265
332
 
266
- return config;
267
- }),
268
- ),
269
- Match.when("stored", () => loginStored(profileName)),
270
- Match.when("local", () =>
271
- Effect.gen(function* () {
272
- const endpoint = yield* Clank.text({
273
- message: "Emulator endpoint",
274
- placeholder: DEFAULT_LOCAL_ENDPOINT,
275
- defaultValue: DEFAULT_LOCAL_ENDPOINT,
276
- });
277
- const region = yield* Clank.text({
278
- message: "Region",
279
- placeholder: "us-east-1",
280
- defaultValue: "us-east-1",
281
- });
282
- return {
283
- method: "local" as const,
284
- endpoint: endpoint || DEFAULT_LOCAL_ENDPOINT,
285
- region: region || "us-east-1",
286
- };
287
- }),
333
+ yield* loginSSO(config, authorizationMethod);
334
+
335
+ return config;
336
+ }),
337
+ ),
338
+ Match.when("stored", () => loginStored(profileName)),
339
+ Match.exhaustive,
288
340
  ),
289
- Match.exhaustive,
290
341
  ),
291
- ),
292
- );
342
+ );
293
343
 
294
- const configureCredentials = (profileName: string, ctx: ConfigureContext) =>
295
- Effect.gen(function* () {
296
- if (ctx.ci) {
297
- return { method: "env" as const };
298
- }
299
- if (ctx.reason) {
300
- // e.g. the credential-demand seam (`Auth/Demand.ts`) explaining
301
- // which dev-plan resources require real AWS credentials.
302
- yield* Clank.info(ctx.reason);
303
- }
304
- return yield* configureInteractive(profileName);
305
- }).pipe(
306
- Effect.mapError(
307
- (e) =>
308
- new AuthError({
309
- message: "failed to configure credentials",
310
- cause: e,
311
- }),
344
+ // The declared requirements are the union of the interactive path
345
+ // (ChildProcessSpawner for `aws sso login`) and `configureWith`'s
346
+ // (FileSystem/Path for ~/.aws/config probing) — the contract shares one
347
+ // ConfigureReq type parameter between the two entry points.
348
+ const configureCredentials = (
349
+ profileName: string,
350
+ ): Effect.Effect<
351
+ AwsAuthConfig,
352
+ AuthError,
353
+ | ChildProcessSpawner
354
+ | HttpClient.HttpClient
355
+ | FileSystem.FileSystem
356
+ | Path.Path
357
+ | Interaction.Interaction
358
+ > =>
359
+ configureInteractive(profileName).pipe(
360
+ Effect.mapError((e) =>
361
+ e instanceof AuthError
362
+ ? e
363
+ : new AuthError({
364
+ message: "failed to configure credentials",
365
+ cause: e,
366
+ }),
312
367
  ),
313
368
  );
314
369
 
315
- const resolveCredentials = (profileName: string, config: AwsAuthConfig) =>
316
- Match.value(config)
317
- .pipe(
318
- Match.when(
319
- { method: "env" },
320
- Effect.fn(function* () {
321
- const accessKeyId =
322
- yield* getEnvRedactedRequired("AWS_ACCESS_KEY_ID");
323
- const secretAccessKey = yield* getEnvRedactedRequired(
324
- "AWS_SECRET_ACCESS_KEY",
325
- );
326
- const sessionToken = yield* getEnvRedacted("AWS_SESSION_TOKEN");
327
- const region = yield* getEnv("AWS_REGION").pipe(
328
- Effect.flatMap((region) =>
329
- region
330
- ? Effect.succeed(region)
331
- : getEnv("AWS_DEFAULT_REGION"),
332
- ),
370
+ const configureWith = (
371
+ profileName: string,
372
+ input: {
373
+ readonly method: string;
374
+ readonly values: Record<string, string>;
375
+ },
376
+ ) =>
377
+ Match.value(input.method).pipe(
378
+ Match.when("stored", () =>
379
+ Effect.gen(function* () {
380
+ const values = yield* validateFieldValues(
381
+ AWS_AUTH_PROVIDER_NAME,
382
+ keysFields,
383
+ input.values,
384
+ );
385
+ // validateFieldValues guarantees the required fields are present.
386
+ const accessKeyId = storedSecret(values.accessKeyId);
387
+ const secretAccessKey = storedSecret(values.secretAccessKey);
388
+ const sessionToken = storedSecret(values.sessionToken);
389
+ const region = storedValueText(values.region) ?? "";
390
+ if (accessKeyId === undefined || secretAccessKey === undefined) {
391
+ return yield* Effect.fail(
392
+ new AuthError({
393
+ message: "AWS: required key fields are missing.",
394
+ }),
333
395
  );
334
- if (!region) {
335
- return yield* Effect.fail(
396
+ }
397
+ const accountId = yield* getAccountId({
398
+ accessKeyId,
399
+ secretAccessKey,
400
+ sessionToken,
401
+ region,
402
+ }).pipe(
403
+ Effect.mapError(
404
+ (cause) =>
336
405
  new AuthError({
337
406
  message:
338
- "AWS region not found. Set AWS_REGION or AWS_DEFAULT_REGION.",
339
- }),
340
- );
341
- }
342
- // LocalStack-standard endpoint override: with
343
- // AWS_ENDPOINT_URL set, every AWS call (including the STS
344
- // account lookup below) targets the emulator.
345
- const endpoint = yield* getEnv("AWS_ENDPOINT_URL");
346
- const accountId = yield* getEnvRequired("AWS_ACCOUNT_ID").pipe(
347
- Effect.catch(() =>
348
- getAccountId({
349
- accessKeyId,
350
- secretAccessKey,
351
- sessionToken,
352
- region,
353
- endpoint,
407
+ "AWS: failed to verify credentials via STS GetCallerIdentity.",
408
+ cause,
354
409
  }),
355
- ),
356
- );
357
- return {
358
- accountId,
359
- credentials: Effect.succeed({
360
- accessKeyId,
361
- secretAccessKey,
362
- sessionToken,
363
- region,
410
+ ),
411
+ );
412
+ return {
413
+ method: "stored" as const,
414
+ accountId,
415
+ accessKeyId: Redacted.value(accessKeyId),
416
+ secretAccessKey: Redacted.value(secretAccessKey),
417
+ sessionToken:
418
+ sessionToken === undefined
419
+ ? undefined
420
+ : Redacted.value(sessionToken),
421
+ region,
422
+ };
423
+ }),
424
+ ),
425
+ Match.when("sso", () =>
426
+ Effect.gen(function* () {
427
+ const values = yield* validateFieldValues(
428
+ AWS_AUTH_PROVIDER_NAME,
429
+ ssoFields,
430
+ input.values,
431
+ );
432
+ const ssoProfile = storedValueText(values.ssoProfile) ?? "";
433
+ const auth = yield* DistilledAuth.Default;
434
+ const profile = yield* auth
435
+ .loadProfile(ssoProfile)
436
+ .pipe(Effect.catch(() => Effect.succeed(undefined)));
437
+ if (profile == null) {
438
+ return yield* Effect.fail(
439
+ new AuthError({
440
+ message: `AWS SSO profile '${ssoProfile}' was not found in ~/.aws/config. Configure it with \`aws configure sso\` first, then log in. ${refreshHint(AWS_AUTH_PROVIDER_NAME, profileName)}`,
364
441
  }),
365
- region,
366
- endpoint,
367
- source: { type: "env" as const },
368
- } satisfies AwsResolvedCredentials;
442
+ );
443
+ }
444
+ // Nothing is persisted for SSO — credentials come from the AWS
445
+ // SSO cache. `aws sso login` is interactive, so it is NOT run
446
+ // here; the user runs `alchemy profile refresh` afterwards.
447
+ return { method: "sso" as const, ssoProfile };
448
+ }),
449
+ ),
450
+ Match.orElse(() =>
451
+ Effect.fail(
452
+ new AuthError({
453
+ message: `AWS: unknown method '${input.method}'. Valid methods: stored, sso.`,
369
454
  }),
370
455
  ),
371
- Match.when(
372
- { method: "local" },
373
- Effect.fn(function* (config) {
374
- const endpoint = config.endpoint ?? DEFAULT_LOCAL_ENDPOINT;
375
- const autoStart =
376
- config.autoStart ?? endpoint === DEFAULT_LOCAL_ENDPOINT;
377
- if (autoStart) {
378
- const port = yield* Effect.try({
379
- try: () =>
380
- Number.parseInt(new URL(endpoint).port, 10) ||
381
- Floci.DEFAULT_FLOCI_PORT,
382
- catch: () =>
456
+ ),
457
+ );
458
+
459
+ const resolveCredentials = (
460
+ profileName: string,
461
+ config: AwsAuthConfig,
462
+ updateConfig?: (config: AwsAuthConfig) => Effect.Effect<void, AuthError>,
463
+ ) =>
464
+ Effect.gen(function* () {
465
+ const reauth = refreshHint(AWS_AUTH_PROVIDER_NAME, profileName);
466
+ return yield* Match.value(config)
467
+ .pipe(
468
+ Match.when({ method: "stored" }, (config) =>
469
+ Effect.gen(function* () {
470
+ const credentials: AwsCredentials = {
471
+ accessKeyId: Redacted.make(config.accessKeyId),
472
+ secretAccessKey: Redacted.make(config.secretAccessKey),
473
+ sessionToken:
474
+ config.sessionToken === undefined
475
+ ? undefined
476
+ : Redacted.make(config.sessionToken),
477
+ region: config.region,
478
+ };
479
+ const accountId =
480
+ config.accountId ?? (yield* getAccountId(credentials));
481
+ if (
482
+ config.accountId === undefined &&
483
+ updateConfig !== undefined
484
+ ) {
485
+ yield* updateConfig({ ...config, accountId });
486
+ }
487
+ return {
488
+ accountId,
489
+ credentials: Effect.succeed(credentials),
490
+ region: config.region,
491
+ source: { type: "stored" as const },
492
+ } satisfies AwsResolvedCredentials;
493
+ }),
494
+ ),
495
+ Match.when({ method: "sso" }, (config) =>
496
+ Effect.gen(function* () {
497
+ const auth = yield* DistilledAuth.Default;
498
+ const profile = yield* auth
499
+ .loadProfile(config.ssoProfile)
500
+ .pipe(Effect.catch(() => Effect.succeed(undefined)));
501
+ if (profile?.sso_account_id == null) {
502
+ const reconfigure = reconfigureHint(
503
+ AWS_AUTH_PROVIDER_NAME,
504
+ profileName,
505
+ );
506
+ return yield* Effect.fail(
383
507
  new AuthError({
384
- message: `invalid local emulator endpoint: ${endpoint}`,
508
+ message:
509
+ profile == null
510
+ ? `AWS SSO profile '${config.ssoProfile}' was not found in ~/.aws/config. Configure it with \`aws configure sso\`. ${reconfigure}`
511
+ : `AWS SSO profile '${config.ssoProfile}' has no sso_account_id in ~/.aws/config. Add it. ${reconfigure}`,
385
512
  }),
386
- });
387
- // Reuses anything already serving on the endpoint (dev-mode
388
- // JVM, hand-run container, previous session's container);
389
- // otherwise starts the managed floci container and waits for
390
- // health.
391
- yield* Floci.ensureFloci({ port }).pipe(
392
- Effect.mapError(
393
- (e) => new AuthError({ message: e.message, cause: e }),
394
- ),
395
- );
396
- } else {
397
- const serving = yield* Floci.isServing(endpoint);
398
- if (!serving) {
513
+ );
514
+ }
515
+ // `applyEnvRegionOverride` below only overrides an existing
516
+ // region, so an env-provided region must be consulted here for
517
+ // profiles that don't record one.
518
+ const region = profile.region ?? (yield* getEnv("AWS_REGION"));
519
+ if (!region) {
399
520
  return yield* Effect.fail(
400
521
  new AuthError({
401
- message: `no local AWS emulator is listening at ${endpoint} start one, or omit \`endpoint\` to auto-start floci on ${DEFAULT_LOCAL_ENDPOINT}`,
522
+ message: `AWS SSO profile '${config.ssoProfile}' has no region in ~/.aws/config and AWS_REGION is not set.`,
402
523
  }),
403
524
  );
404
525
  }
405
- }
406
- const region = config.region ?? "us-east-1";
407
- return {
408
- // Fixed dummy account emulators accept any non-empty
409
- // credentials, and calling STS here would be pure overhead.
410
- accountId: config.accountId ?? LOCAL_ACCOUNT_ID,
411
- credentials: Effect.succeed({
412
- accessKeyId: Redacted.make("test"),
413
- secretAccessKey: Redacted.make("test"),
414
- sessionToken: undefined,
415
- region,
416
- }),
417
- region,
418
- endpoint,
419
- source: { type: "local" as const, details: endpoint },
420
- } satisfies AwsResolvedCredentials;
421
- }),
422
- ),
423
- Match.when({ method: "stored" }, () =>
424
- store.read<AwsStoredCredentials>(profileName, "aws").pipe(
425
- Effect.flatMap((creds) =>
426
- creds == null
427
- ? Effect.fail(
428
- new AuthError({
429
- message:
430
- "AWS stored credentials not found. Run: alchemy login --configure",
431
- }),
432
- )
433
- : Effect.succeed({
434
- accountId: creds.accountId,
435
- credentials: Effect.succeed({
436
- accessKeyId: Redacted.make(creds.accessKeyId),
437
- secretAccessKey: Redacted.make(creds.secretAccessKey),
438
- sessionToken: creds.sessionToken
439
- ? Redacted.make(creds.sessionToken)
440
- : undefined,
441
- region: creds.region,
442
- }),
443
- region: creds.region,
444
- source: { type: "stored" as const },
445
- } satisfies AwsResolvedCredentials),
446
- ),
447
- // an older verson of the stored credentials didn't include the account ID, so we patch it hre
448
- Effect.flatMap((creds) =>
449
- creds.accountId
450
- ? Effect.succeed(creds)
451
- : creds.credentials.pipe(
452
- Effect.flatMap((resolved) =>
453
- getAccountId({
454
- accessKeyId: resolved.accessKeyId,
455
- secretAccessKey: resolved.secretAccessKey,
456
- sessionToken: resolved.sessionToken,
457
- region: creds.region,
458
- }),
459
- ),
460
- Effect.map(
461
- (accountId) =>
462
- ({
463
- ...creds,
464
- accountId,
465
- }) satisfies AwsResolvedCredentials,
466
- ),
467
- // re-write the stored credentials
468
- Effect.tap((creds) =>
469
- creds.credentials.pipe(
470
- Effect.tap(
471
- ({ accessKeyId, secretAccessKey, sessionToken }) =>
472
- store.write<AwsStoredCredentials>(
473
- profileName,
474
- "aws",
475
- {
476
- accessKeyId: Redacted.value(accessKeyId),
477
- secretAccessKey:
478
- Redacted.value(secretAccessKey),
479
- sessionToken: sessionToken
480
- ? Redacted.value(sessionToken)
481
- : undefined,
482
- region: creds.region,
483
- accountId: creds.accountId,
484
- },
485
- ),
486
- ),
487
- ),
526
+ return {
527
+ accountId: profile.sso_account_id,
528
+ // Rewrite the message of an expired/invalid SSO token to the
529
+ // alchemy refresh hint, but PRESERVE the error tags: the inner
530
+ // effect must stay a `CredentialsError` for downstream
531
+ // consumers (AWSEnvironment), while `details` and other
532
+ // in-provider consumers match these tags to surface a typed
533
+ // `NeedsReauth` instead of a generic failure.
534
+ credentials: auth
535
+ .loadProfileCredentials(config.ssoProfile)
536
+ .pipe(
537
+ Effect.provideService(
538
+ EffectConsole.Console,
539
+ silentConsole,
488
540
  ),
541
+ Effect.mapError((error) => {
542
+ if (error._tag === "Alchemy::AWS::ExpiredSSOToken") {
543
+ return new ExpiredSSOToken({
544
+ message: `AWS SSO credentials need to be refreshed. ${reauth}`,
545
+ profile: error.profile,
546
+ });
547
+ }
548
+ if (error._tag === "Alchemy::AWS::InvalidSSOToken") {
549
+ return new InvalidSSOToken({
550
+ message: `AWS SSO credentials need to be refreshed. ${reauth}`,
551
+ sso_session: error.sso_session,
552
+ });
553
+ }
554
+ return error;
555
+ }),
489
556
  ),
490
- ),
557
+ region,
558
+ source: { type: "sso" as const, details: config.ssoProfile },
559
+ } satisfies AwsResolvedCredentials;
560
+ }),
491
561
  ),
492
- ),
493
- Match.when({ method: "sso" }, (config) =>
494
- Effect.gen(function* () {
495
- const auth = yield* DistilledAuth.Default;
496
- const profile = yield* auth
497
- .loadProfile(config.ssoProfile)
498
- .pipe(Effect.catch(() => Effect.succeed(undefined)));
499
- return {
500
- accountId: profile?.sso_account_id!,
501
- credentials: auth
502
- .loadProfileCredentials(config.ssoProfile)
503
- .pipe(
504
- Effect.mapError(
505
- (e) =>
506
- new AuthError({
507
- message: "failed to load credentials",
508
- cause: e,
509
- }),
510
- ),
511
- Effect.orDie,
512
- ),
513
- region: profile?.region!,
514
- source: { type: "sso" as const, details: config.ssoProfile },
515
- } satisfies AwsResolvedCredentials;
516
- }),
517
- ),
518
- Match.exhaustive,
519
- )
520
- .pipe(
521
- Effect.mapError(
522
- (e) => new AuthError({ message: "login failed", cause: e }),
523
- ),
524
- Effect.flatMap(applyEnvRegionOverride),
525
- );
562
+ Match.exhaustive,
563
+ )
564
+ .pipe(
565
+ // Pass diagnosable failures through untouched: NeedsReauth (stored
566
+ // credentials missing) and the specific AuthErrors raised above
567
+ // (missing SSO profile / sso_account_id / region) carry the real
568
+ // diagnosis. Only genuinely unexpected failures (store I/O, the
569
+ // STS accountId backfill) get wrapped.
570
+ Effect.mapError((e) =>
571
+ e._tag === "AuthError"
572
+ ? e
573
+ : new AuthError({
574
+ message: "failed to resolve AWS credentials",
575
+ cause: e,
576
+ }),
577
+ ),
578
+ Effect.flatMap(applyEnvRegionOverride),
579
+ Effect.map((creds): AwsResolvedCredentials => ({
580
+ ...creds,
581
+ credentials: creds.credentials.pipe(
582
+ Effect.map((credentials) => ({
583
+ ...credentials,
584
+ region: creds.region,
585
+ })),
586
+ ),
587
+ })),
588
+ );
589
+ });
526
590
 
527
- const prettyPrint = (profileName: string, config: AwsAuthConfig) =>
528
- resolveCredentials(profileName, config).pipe(
529
- Effect.tap(
530
- Effect.fn(function* (creds) {
531
- const { accessKeyId, secretAccessKey, sessionToken } =
532
- yield* creds.credentials;
533
- yield* Console.log(
534
- ` accessKeyId: ${displayRedacted(accessKeyId)}`,
535
- );
536
- yield* Console.log(
537
- ` secretAccessKey: ${displayRedacted(secretAccessKey)}`,
538
- );
539
- if (sessionToken) {
540
- yield* Console.log(
541
- ` sessionToken: ${displayRedacted(sessionToken)}`,
542
- );
543
- }
544
- if (creds.region) {
545
- yield* Console.log(` region: ${creds.region}`);
546
- }
547
- yield* Console.log(
548
- //@ts-expect-error
549
- ` source: ${creds.source.details ? `${creds.source.type} - ${creds.source.details}` : creds.source.type}`,
550
- );
551
- }),
552
- ),
553
- );
591
+ const details = (
592
+ profileName: string,
593
+ config: AwsAuthConfig,
594
+ updateConfig?: (config: AwsAuthConfig) => Effect.Effect<void, AuthError>,
595
+ ) =>
596
+ Effect.gen(function* () {
597
+ const creds = yield* resolveCredentials(
598
+ profileName,
599
+ config,
600
+ updateConfig,
601
+ );
602
+ const reauth = refreshHint(AWS_AUTH_PROVIDER_NAME, profileName);
603
+ // Resolve the live credentials. An expired/invalid SSO token only
604
+ // surfaces here (the inner effect is lazy), so convert those tags
605
+ // into a typed NeedsReauth instead of a generic error line.
606
+ const { accessKeyId, secretAccessKey, sessionToken } =
607
+ yield* creds.credentials.pipe(
608
+ Effect.mapError((error) =>
609
+ error._tag === "Alchemy::AWS::ExpiredSSOToken" ||
610
+ error._tag === "Alchemy::AWS::InvalidSSOToken"
611
+ ? new NeedsReauth({
612
+ provider: AWS_AUTH_PROVIDER_NAME,
613
+ profile: profileName,
614
+ message: `AWS SSO credentials need to be refreshed. ${reauth}`,
615
+ cause: error,
616
+ })
617
+ : new AuthError({
618
+ message: "failed to load AWS credentials",
619
+ cause: error,
620
+ }),
621
+ ),
622
+ );
623
+ const lines: Array<ProviderDetailLine> = [
624
+ { key: "accessKeyId", value: displayRedacted(accessKeyId) },
625
+ { key: "secretAccessKey", value: displayRedacted(secretAccessKey) },
626
+ ];
627
+ if (sessionToken) {
628
+ lines.push({
629
+ key: "sessionToken",
630
+ value: displayRedacted(sessionToken),
631
+ });
632
+ }
633
+ if (creds.region) {
634
+ lines.push({ key: "region", value: creds.region });
635
+ }
636
+ const source = creds.source;
637
+ lines.push({
638
+ key: "source",
639
+ value:
640
+ "details" in source
641
+ ? `${source.type} - ${source.details}`
642
+ : source.type,
643
+ });
644
+ return { lines };
645
+ });
554
646
 
555
- const logout = (profileName: string, config: AwsAuthConfig) =>
647
+ const logout = (_profileName: string, config: AwsAuthConfig) =>
556
648
  Match.value(config).pipe(
557
- Match.when({ method: "env" }, () => Effect.void),
558
- Match.when({ method: "local" }, () => Effect.void),
559
649
  Match.when({ method: "sso" }, (config) =>
560
- Clank.info(
561
- `AWS: running 'aws sso logout --profile ${config.ssoProfile}'...`,
562
- ).pipe(
563
- Effect.zip(runSsoCommand("logout", config.ssoProfile)),
564
- Effect.zip(clearDistilledSsoCache(config.ssoProfile)),
565
- Effect.match({
566
- onSuccess: () => Clank.success("AWS: SSO logout complete"),
567
- onFailure: (e) =>
568
- Clank.warn(`AWS: SSO logout failed: \`${e.message}\``),
569
- }),
570
- ),
571
- ),
572
- Match.when({ method: "stored" }, () =>
573
- store
574
- .delete(profileName, "aws")
650
+ interaction.output
651
+ .info(
652
+ `AWS: running 'aws sso logout --profile ${config.ssoProfile}'...`,
653
+ )
575
654
  .pipe(
576
- Effect.andThen(Clank.success("AWS: stored credentials removed")),
655
+ Effect.zip(runSsoCommand("logout", config.ssoProfile)),
656
+ Effect.zip(clearDistilledSsoCache(config.ssoProfile)),
657
+ Effect.match({
658
+ onSuccess: () =>
659
+ interaction.output.success("AWS: SSO logout complete"),
660
+ onFailure: (e) =>
661
+ interaction.output.warning(
662
+ `AWS: SSO logout failed: \`${e.message}\``,
663
+ ),
664
+ }),
577
665
  ),
578
666
  ),
667
+ Match.when({ method: "stored" }, () => Effect.void),
579
668
  Match.exhaustive,
580
669
  );
581
670
 
582
671
  const login = (profileName: string, config: AwsAuthConfig) =>
583
672
  Match.value(config)
584
673
  .pipe(
585
- Match.when({ method: "env" }, () => Effect.void),
586
- Match.when({ method: "local" }, () => Effect.void),
587
- Match.when({ method: "sso" }, loginSSO),
588
- Match.when({ method: "stored" }, () =>
589
- store
590
- .read<AwsStoredCredentials>(profileName, "aws")
591
- .pipe(
592
- Effect.flatMap((creds) =>
593
- creds == null ? loginStored(profileName) : Effect.void,
594
- ),
595
- ),
674
+ Match.when({ method: "sso" }, (config) =>
675
+ loginSSO(config, config.authorizationMethod ?? "oauth"),
596
676
  ),
677
+ Match.when({ method: "stored" }, (config) => Effect.succeed(config)),
597
678
  Match.exhaustive,
598
679
  )
599
680
  .pipe(
@@ -602,12 +683,95 @@ export const AwsAuth = AuthProviderLayer<
602
683
  ),
603
684
  );
604
685
 
686
+ const readEnvironment = Effect.gen(function* () {
687
+ const accessKeyId = yield* getEnvRedactedRequired("AWS_ACCESS_KEY_ID");
688
+ const secretAccessKey = yield* getEnvRedactedRequired(
689
+ "AWS_SECRET_ACCESS_KEY",
690
+ );
691
+ const sessionToken = yield* getEnvRedacted("AWS_SESSION_TOKEN");
692
+ const region = yield* getEnv("AWS_REGION").pipe(
693
+ Effect.flatMap((value) =>
694
+ value ? Effect.succeed(value) : getEnv("AWS_DEFAULT_REGION"),
695
+ ),
696
+ );
697
+ if (!region) {
698
+ return yield* new AuthError({
699
+ message:
700
+ "AWS CI region not found. Set AWS_REGION or AWS_DEFAULT_REGION.",
701
+ });
702
+ }
703
+ const accountId = yield* getEnvRequired("AWS_ACCOUNT_ID").pipe(
704
+ Effect.catch(() =>
705
+ getAccountId({
706
+ accessKeyId,
707
+ secretAccessKey,
708
+ sessionToken,
709
+ region,
710
+ }),
711
+ ),
712
+ );
713
+ return {
714
+ accountId,
715
+ credentials: Effect.succeed({
716
+ accessKeyId,
717
+ secretAccessKey,
718
+ sessionToken,
719
+ region,
720
+ }),
721
+ region,
722
+ source: { type: "env" as const },
723
+ } satisfies AwsResolvedCredentials;
724
+ }).pipe(
725
+ Effect.mapError((cause) =>
726
+ cause instanceof AuthError
727
+ ? cause
728
+ : new AuthError({
729
+ message:
730
+ "Failed to resolve AWS credentials from the CI environment.",
731
+ cause,
732
+ }),
733
+ ),
734
+ );
735
+
605
736
  return {
737
+ configSchema: AwsAuthConfigSchema,
606
738
  configure: configureCredentials,
739
+ configureWith,
740
+ configureMethods,
607
741
  login,
608
742
  logout,
609
- prettyPrint,
743
+ details,
610
744
  read: resolveCredentials,
745
+ readEnvironment,
746
+ environment: [
747
+ {
748
+ name: "AWS_ACCESS_KEY_ID",
749
+ required: true,
750
+ secret: true,
751
+ },
752
+ {
753
+ name: "AWS_SECRET_ACCESS_KEY",
754
+ required: true,
755
+ secret: true,
756
+ },
757
+ {
758
+ name: "AWS_SESSION_TOKEN",
759
+ required: false,
760
+ secret: true,
761
+ description: "Required when the access key is a temporary STS key.",
762
+ },
763
+ {
764
+ name: "AWS_REGION",
765
+ required: true,
766
+ alternatives: ["AWS_DEFAULT_REGION"],
767
+ description: "Region the stack deploys into.",
768
+ },
769
+ {
770
+ name: "AWS_ACCOUNT_ID",
771
+ required: false,
772
+ description: "Derived via STS GetCallerIdentity when unset.",
773
+ },
774
+ ],
611
775
  };
612
776
  }),
613
777
  );
@@ -632,14 +796,169 @@ const runSsoCommand = (command: "login" | "logout", ssoProfile: string) =>
632
796
  }
633
797
  }).pipe(Effect.scoped);
634
798
 
635
- const loginSSO = (config: Extract<AwsAuthConfig, { method: "sso" }>) =>
636
- Clank.info(
637
- `AWS SSO: running 'aws sso login --profile ${config.ssoProfile}'...`,
638
- ).pipe(
639
- Effect.andThen(runSsoCommand("login", config.ssoProfile)),
640
- Effect.matchEffect({
641
- onSuccess: () => Clank.success("AWS SSO: login complete"),
642
- onFailure: (e) => Clank.warn(`AWS SSO: login faield: \`${e.message}\``),
799
+ const AwsSsoLoginOutput = Schema.Struct({
800
+ url: Schema.optional(Schema.String),
801
+ authUrl: Schema.optional(Schema.String),
802
+ authorizationUrl: Schema.optional(Schema.String),
803
+ verificationUri: Schema.optional(Schema.String),
804
+ verificationUriComplete: Schema.optional(Schema.String),
805
+ code: Schema.optional(Schema.String),
806
+ userCode: Schema.optional(Schema.String),
807
+ });
808
+
809
+ export const parseAwsSsoLoginOutput = (output: string) => {
810
+ try {
811
+ const decoded = Schema.decodeUnknownOption(AwsSsoLoginOutput)(
812
+ JSON.parse(output) as unknown,
813
+ );
814
+ if (Option.isSome(decoded)) {
815
+ const event = decoded.value;
816
+ return {
817
+ url:
818
+ event.authorizationUrl ??
819
+ event.authUrl ??
820
+ event.verificationUriComplete ??
821
+ event.verificationUri ??
822
+ event.url,
823
+ code: event.userCode ?? event.code,
824
+ };
825
+ }
826
+ } catch {
827
+ // `sso login` accepts the global `--output json` option but current AWS
828
+ // CLI releases still render this custom command's authorization prompt as
829
+ // text. Keep accepting structured output if AWS starts honoring the flag.
830
+ }
831
+ return {
832
+ url: output.match(/https?:\/\/[^\s]+/)?.[0],
833
+ code: output.match(/Then enter the code:\s*([A-Z0-9-]+)/i)?.[1],
834
+ };
835
+ };
836
+
837
+ const loginSSO = (
838
+ config: Extract<AwsAuthConfig, { method: "sso" }>,
839
+ authorizationMethod: "oauth" | "device" = "oauth",
840
+ ) =>
841
+ Effect.scoped(
842
+ Effect.gen(function* () {
843
+ const interaction = yield* Interaction.Interaction;
844
+ const services = yield* Effect.context<ChildProcessSpawner>();
845
+ const runOpenUrl = Effect.runPromiseWith(services);
846
+ const authorizationUrl = yield* Deferred.make<string>();
847
+ const deviceCode = yield* Deferred.make<string>();
848
+ const stdout = yield* Ref.make("");
849
+ const stderr = yield* Ref.make("");
850
+ const handle = yield* ChildProcess.make(
851
+ "aws",
852
+ [
853
+ "sso",
854
+ "login",
855
+ "--profile",
856
+ config.ssoProfile,
857
+ "--no-browser",
858
+ "--output",
859
+ "json",
860
+ ...(authorizationMethod === "device" ? ["--use-device-code"] : []),
861
+ ],
862
+ {
863
+ shell: false,
864
+ stdin: "ignore",
865
+ stdout: "pipe",
866
+ stderr: "pipe",
867
+ },
868
+ );
869
+ const collectStdout = handle.stdout.pipe(
870
+ Stream.decodeText(),
871
+ Stream.runForEach((chunk) =>
872
+ Effect.gen(function* () {
873
+ const combined = yield* Ref.updateAndGet(
874
+ stdout,
875
+ (current) => current + chunk,
876
+ );
877
+ const { url, code } = parseAwsSsoLoginOutput(combined);
878
+ if (url !== undefined) {
879
+ yield* Deferred.succeed(authorizationUrl, url);
880
+ }
881
+ if (code !== undefined) {
882
+ yield* Deferred.succeed(deviceCode, code);
883
+ }
884
+ }),
885
+ ),
886
+ );
887
+ const collectStderr = handle.stderr.pipe(
888
+ Stream.decodeText(),
889
+ Stream.runForEach((chunk) =>
890
+ Ref.update(stderr, (current) => current + chunk),
891
+ ),
892
+ );
893
+ const process = Effect.gen(function* () {
894
+ const [exitCode] = yield* Effect.all(
895
+ [handle.exitCode, collectStdout, collectStderr],
896
+ { concurrency: 3 },
897
+ );
898
+ if (exitCode !== 0) {
899
+ const detail = (yield* Ref.get(stderr)).trim();
900
+ return yield* Effect.fail(
901
+ new AuthError({
902
+ message: `aws sso login exited with code ${exitCode}${detail === "" ? "" : `: ${detail}`}`,
903
+ }),
904
+ );
905
+ }
906
+ });
907
+ const processFiber = yield* Effect.forkScoped(process);
908
+ const url = yield* Deferred.await(authorizationUrl).pipe(
909
+ Effect.raceFirst(
910
+ Fiber.join(processFiber).pipe(
911
+ Effect.flatMap(() =>
912
+ Effect.fail(
913
+ new AuthError({
914
+ message:
915
+ "AWS SSO login completed without providing an authorization URL.",
916
+ }),
917
+ ),
918
+ ),
919
+ ),
920
+ ),
921
+ );
922
+ const code =
923
+ authorizationMethod === "device"
924
+ ? yield* Deferred.await(deviceCode).pipe(
925
+ Effect.raceFirst(
926
+ Fiber.join(processFiber).pipe(
927
+ Effect.flatMap(() =>
928
+ Effect.fail(
929
+ new AuthError({
930
+ message:
931
+ "AWS SSO device login completed without providing an authorization code.",
932
+ }),
933
+ ),
934
+ ),
935
+ ),
936
+ ),
937
+ )
938
+ : undefined;
939
+ const openFailed = yield* Interaction.openUrl(url).pipe(
940
+ Effect.as(false),
941
+ Effect.catch(() => Effect.succeed(true)),
942
+ );
943
+ yield* Fiber.join(processFiber).pipe(
944
+ Effect.raceFirst(
945
+ interaction.prompt
946
+ .awaitExternal({
947
+ message: "AWS authorization",
948
+ waitingLabel:
949
+ authorizationMethod === "device"
950
+ ? "waiting for device authorization (up to 5 minutes)…"
951
+ : "waiting for browser authorization (up to 5 minutes)…",
952
+ url,
953
+ code,
954
+ openFailed,
955
+ onOpen: () => runOpenUrl(Interaction.openUrl(url)),
956
+ allowManualInput: false,
957
+ })
958
+ .pipe(Effect.asVoid),
959
+ ),
960
+ );
961
+ yield* interaction.output.success("AWS SSO: login complete");
643
962
  }),
644
963
  );
645
964