@geekmidas/cli 10.0.0-alpha.16 → 10.0.0-alpha.160

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 (438) hide show
  1. package/README.md +323 -380
  2. package/bin/adjacent-tsconfig.mjs +46 -8
  3. package/bin/gkm.mjs +11 -3
  4. package/bin/owning-tsconfig-jsx-register.mjs +18 -0
  5. package/bin/owning-tsconfig-jsx.mjs +108 -0
  6. package/dist/EndpointGenerator-B5BKAoLz.mjs +1039 -0
  7. package/dist/EndpointGenerator-B5BKAoLz.mjs.map +1 -0
  8. package/dist/EndpointGenerator-DxrRqfJ3.cjs +1098 -0
  9. package/dist/EndpointGenerator-DxrRqfJ3.cjs.map +1 -0
  10. package/dist/GoDaddyProvider-C9dDlH9I.mjs +412 -0
  11. package/dist/GoDaddyProvider-C9dDlH9I.mjs.map +1 -0
  12. package/dist/GoDaddyProvider-DkUMcMYy.cjs +412 -0
  13. package/dist/GoDaddyProvider-DkUMcMYy.cjs.map +1 -0
  14. package/dist/{HostingerProvider-BZFGYYVA.cjs → HostingerProvider-9faYOQnQ.cjs} +23 -9
  15. package/dist/HostingerProvider-9faYOQnQ.cjs.map +1 -0
  16. package/dist/{HostingerProvider-BY26bWwB.mjs → HostingerProvider-BEuKG2gz.mjs} +23 -9
  17. package/dist/HostingerProvider-BEuKG2gz.mjs.map +1 -0
  18. package/dist/LegacyStateStore-C44jUnMH.cjs +124 -0
  19. package/dist/LegacyStateStore-C44jUnMH.cjs.map +1 -0
  20. package/dist/LegacyStateStore-DPKhjUR6.mjs +124 -0
  21. package/dist/LegacyStateStore-DPKhjUR6.mjs.map +1 -0
  22. package/dist/LocalStateStore-B95WE99i.cjs +178 -0
  23. package/dist/LocalStateStore-B95WE99i.cjs.map +1 -0
  24. package/dist/LocalStateStore-BU3fWkcT.mjs +167 -0
  25. package/dist/LocalStateStore-BU3fWkcT.mjs.map +1 -0
  26. package/dist/OpenApiTsGenerator-DOTLKBFf.cjs +539 -0
  27. package/dist/OpenApiTsGenerator-DOTLKBFf.cjs.map +1 -0
  28. package/dist/OpenApiTsGenerator-Vaf0pI8u.mjs +534 -0
  29. package/dist/OpenApiTsGenerator-Vaf0pI8u.mjs.map +1 -0
  30. package/dist/{Route53Provider-Cvj40A8I.mjs → Route53Provider-Di_SD9CF.mjs} +3 -3
  31. package/dist/Route53Provider-Di_SD9CF.mjs.map +1 -0
  32. package/dist/{Route53Provider-DVILBsvV.cjs → Route53Provider-emLuQHVw.cjs} +3 -3
  33. package/dist/Route53Provider-emLuQHVw.cjs.map +1 -0
  34. package/dist/S3StateStore-Cpbeijr5.mjs +223 -0
  35. package/dist/S3StateStore-Cpbeijr5.mjs.map +1 -0
  36. package/dist/S3StateStore-zU5kClhd.cjs +222 -0
  37. package/dist/S3StateStore-zU5kClhd.cjs.map +1 -0
  38. package/dist/SSMStateStore-BxkKMBi_.mjs +205 -0
  39. package/dist/SSMStateStore-BxkKMBi_.mjs.map +1 -0
  40. package/dist/SSMStateStore-D9uviQ3T.cjs +204 -0
  41. package/dist/SSMStateStore-D9uviQ3T.cjs.map +1 -0
  42. package/dist/SubscriberGenerator-BybB6uez.mjs +783 -0
  43. package/dist/SubscriberGenerator-BybB6uez.mjs.map +1 -0
  44. package/dist/SubscriberGenerator-mZpSuSU7.cjs +848 -0
  45. package/dist/SubscriberGenerator-mZpSuSU7.cjs.map +1 -0
  46. package/dist/add-Bb2IL3Yq.cjs +713 -0
  47. package/dist/add-Bb2IL3Yq.cjs.map +1 -0
  48. package/dist/add-Dj-gtqTO.mjs +711 -0
  49. package/dist/add-Dj-gtqTO.mjs.map +1 -0
  50. package/dist/appPorts-BoXMwolc.mjs +249 -0
  51. package/dist/appPorts-BoXMwolc.mjs.map +1 -0
  52. package/dist/appPorts-IW-OZmRi.cjs +296 -0
  53. package/dist/appPorts-IW-OZmRi.cjs.map +1 -0
  54. package/dist/apps-0vc4Oz9_.cjs +6247 -0
  55. package/dist/apps-0vc4Oz9_.cjs.map +1 -0
  56. package/dist/apps-FRNlECwi.mjs +5621 -0
  57. package/dist/apps-FRNlECwi.mjs.map +1 -0
  58. package/dist/aws-8QQ8n-t6.mjs +89 -0
  59. package/dist/aws-8QQ8n-t6.mjs.map +1 -0
  60. package/dist/aws-DY9NqQIT.cjs +100 -0
  61. package/dist/aws-DY9NqQIT.cjs.map +1 -0
  62. package/dist/awsStore-Bx5nCFnS.mjs +121 -0
  63. package/dist/awsStore-Bx5nCFnS.mjs.map +1 -0
  64. package/dist/awsStore-u3ehhMoY.cjs +138 -0
  65. package/dist/awsStore-u3ehhMoY.cjs.map +1 -0
  66. package/dist/{backup-provisioner-DIVCbfee.mjs → backup-provisioner-C8DnCmxK.mjs} +2 -2
  67. package/dist/backup-provisioner-C8DnCmxK.mjs.map +1 -0
  68. package/dist/{backup-provisioner-BmhIO_Yr.cjs → backup-provisioner-oDEsPj02.cjs} +2 -2
  69. package/dist/backup-provisioner-oDEsPj02.cjs.map +1 -0
  70. package/dist/backups/runner.cjs +519 -0
  71. package/dist/backups/runner.cjs.map +1 -0
  72. package/dist/backups/runner.d.cts +102 -0
  73. package/dist/backups/runner.d.cts.map +1 -0
  74. package/dist/backups/runner.d.mts +102 -0
  75. package/dist/backups/runner.d.mts.map +1 -0
  76. package/dist/backups/runner.mjs +506 -0
  77. package/dist/backups/runner.mjs.map +1 -0
  78. package/dist/{bundler-BodTL4kf.mjs → bundler-9EM4ZHcu.mjs} +59 -14
  79. package/dist/bundler-9EM4ZHcu.mjs.map +1 -0
  80. package/dist/{bundler-BeNDZdHQ.cjs → bundler-Bg2eEFEh.cjs} +59 -14
  81. package/dist/bundler-Bg2eEFEh.cjs.map +1 -0
  82. package/dist/cli-CmoSOzNq.mjs +80 -0
  83. package/dist/cli-CmoSOzNq.mjs.map +1 -0
  84. package/dist/cli-YtLjcAZT.cjs +80 -0
  85. package/dist/cli-YtLjcAZT.cjs.map +1 -0
  86. package/dist/compose-3AtZF7ul.mjs +1560 -0
  87. package/dist/compose-3AtZF7ul.mjs.map +1 -0
  88. package/dist/compose-CW1DGfYc.cjs +1919 -0
  89. package/dist/compose-CW1DGfYc.cjs.map +1 -0
  90. package/dist/compose-CnXZAYNM.mjs +3068 -0
  91. package/dist/compose-CnXZAYNM.mjs.map +1 -0
  92. package/dist/compose-D7gOSspy.cjs +3157 -0
  93. package/dist/compose-D7gOSspy.cjs.map +1 -0
  94. package/dist/config-B5Hi3mLK.cjs +821 -0
  95. package/dist/config-B5Hi3mLK.cjs.map +1 -0
  96. package/dist/config-BNmLn0dw.d.mts +291 -0
  97. package/dist/config-BNmLn0dw.d.mts.map +1 -0
  98. package/dist/config-CkuiD9Jv.d.cts +291 -0
  99. package/dist/config-CkuiD9Jv.d.cts.map +1 -0
  100. package/dist/config-DWTUVGRE.mjs +696 -0
  101. package/dist/config-DWTUVGRE.mjs.map +1 -0
  102. package/dist/config.cjs +13 -3
  103. package/dist/config.d.cts +4 -117
  104. package/dist/config.d.mts +4 -117
  105. package/dist/config.mjs +3 -3
  106. package/dist/credentialSchemas-BAklWDna.cjs +271 -0
  107. package/dist/credentialSchemas-BAklWDna.cjs.map +1 -0
  108. package/dist/credentialSchemas-mz9QZTYh.mjs +236 -0
  109. package/dist/credentialSchemas-mz9QZTYh.mjs.map +1 -0
  110. package/dist/credentials-CjFtNBVH.mjs +1834 -0
  111. package/dist/credentials-CjFtNBVH.mjs.map +1 -0
  112. package/dist/credentials-DwIRfeBL.cjs +2289 -0
  113. package/dist/credentials-DwIRfeBL.cjs.map +1 -0
  114. package/dist/databases-C1qqNxTu.mjs +588 -0
  115. package/dist/databases-C1qqNxTu.mjs.map +1 -0
  116. package/dist/databases-CrKh5jw6.cjs +703 -0
  117. package/dist/databases-CrKh5jw6.cjs.map +1 -0
  118. package/dist/define-6poNqm5O.mjs +106 -0
  119. package/dist/define-6poNqm5O.mjs.map +1 -0
  120. package/dist/define-crmMcXFS.cjs +153 -0
  121. package/dist/define-crmMcXFS.cjs.map +1 -0
  122. package/dist/deploy/public.cjs +211 -0
  123. package/dist/deploy/public.cjs.map +1 -0
  124. package/dist/deploy/public.d.cts +658 -0
  125. package/dist/deploy/public.d.cts.map +1 -0
  126. package/dist/deploy/public.d.mts +658 -0
  127. package/dist/deploy/public.d.mts.map +1 -0
  128. package/dist/deploy/public.mjs +144 -0
  129. package/dist/deploy/public.mjs.map +1 -0
  130. package/dist/deploy/sniffer-envparser-worker.cjs +54 -0
  131. package/dist/deploy/sniffer-envparser-worker.cjs.map +1 -0
  132. package/dist/deploy/sniffer-envparser-worker.d.cts +1 -0
  133. package/dist/deploy/sniffer-envparser-worker.d.mts +1 -0
  134. package/dist/deploy/sniffer-envparser-worker.mjs +55 -0
  135. package/dist/deploy/sniffer-envparser-worker.mjs.map +1 -0
  136. package/dist/deploy/sniffer-hooks.cjs +1 -1
  137. package/dist/deploy/sniffer-hooks.mjs +1 -1
  138. package/dist/deploy/sniffer-loader.cjs +2 -2
  139. package/dist/deploy/sniffer-loader.mjs +1 -1
  140. package/dist/deploy/sniffer-routes-worker.cjs +2 -2
  141. package/dist/deploy/sniffer-routes-worker.mjs +1 -1
  142. package/dist/deploy-3bsiWJxj.cjs +3925 -0
  143. package/dist/deploy-3bsiWJxj.cjs.map +1 -0
  144. package/dist/deploy-BI3fHnyb.mjs +3869 -0
  145. package/dist/deploy-BI3fHnyb.mjs.map +1 -0
  146. package/dist/discover-CRywE7yc.cjs +1085 -0
  147. package/dist/discover-CRywE7yc.cjs.map +1 -0
  148. package/dist/discover-DbDrCQ8h.mjs +940 -0
  149. package/dist/discover-DbDrCQ8h.mjs.map +1 -0
  150. package/dist/docker-CwayjAF2.cjs +1515 -0
  151. package/dist/docker-CwayjAF2.cjs.map +1 -0
  152. package/dist/docker-DPdn7tYJ.mjs +1408 -0
  153. package/dist/docker-DPdn7tYJ.mjs.map +1 -0
  154. package/dist/dokploy-BMBL-_Xu.cjs +38 -0
  155. package/dist/dokploy-BMBL-_Xu.cjs.map +1 -0
  156. package/dist/dokploy-tmnH0Du_.mjs +38 -0
  157. package/dist/dokploy-tmnH0Du_.mjs.map +1 -0
  158. package/dist/drivers-BhdC9Efj.cjs +248 -0
  159. package/dist/drivers-BhdC9Efj.cjs.map +1 -0
  160. package/dist/drivers-wcDnzf7l.mjs +213 -0
  161. package/dist/drivers-wcDnzf7l.mjs.map +1 -0
  162. package/dist/eas-BVGQAUDc.mjs +334 -0
  163. package/dist/eas-BVGQAUDc.mjs.map +1 -0
  164. package/dist/eas-meN1xady.cjs +337 -0
  165. package/dist/eas-meN1xady.cjs.map +1 -0
  166. package/dist/emit-C4KSXOeS.mjs +153 -0
  167. package/dist/emit-C4KSXOeS.mjs.map +1 -0
  168. package/dist/emit-DiW0kbue.cjs +164 -0
  169. package/dist/emit-DiW0kbue.cjs.map +1 -0
  170. package/dist/encryption-C8AMbomA.mjs +89 -0
  171. package/dist/encryption-C8AMbomA.mjs.map +1 -0
  172. package/dist/encryption-DvFVZdGz.cjs +90 -0
  173. package/dist/encryption-DvFVZdGz.cjs.map +1 -0
  174. package/dist/engine-BbWj0w3F.mjs +3217 -0
  175. package/dist/engine-BbWj0w3F.mjs.map +1 -0
  176. package/dist/engine-BmiIUVWa.cjs +3330 -0
  177. package/dist/engine-BmiIUVWa.cjs.map +1 -0
  178. package/dist/errors-D8Gwp5kU.mjs +23 -0
  179. package/dist/errors-D8Gwp5kU.mjs.map +1 -0
  180. package/dist/errors-DMC4Umsb.cjs +34 -0
  181. package/dist/errors-DMC4Umsb.cjs.map +1 -0
  182. package/dist/github-BWqQr8q6.cjs +901 -0
  183. package/dist/github-BWqQr8q6.cjs.map +1 -0
  184. package/dist/github-Dc1daUbH.mjs +900 -0
  185. package/dist/github-Dc1daUbH.mjs.map +1 -0
  186. package/dist/googlePlay-ByaFUly7.mjs +931 -0
  187. package/dist/googlePlay-ByaFUly7.mjs.map +1 -0
  188. package/dist/googlePlay-CdVCdfU8.cjs +931 -0
  189. package/dist/googlePlay-CdVCdfU8.cjs.map +1 -0
  190. package/dist/{index-C-VLwB_Y.d.mts → index-B35vTdAW.d.cts} +38 -14
  191. package/dist/index-B35vTdAW.d.cts.map +1 -0
  192. package/dist/{index-C-HkOEBt.d.cts → index-Dv1Zj86i.d.mts} +38 -14
  193. package/dist/index-Dv1Zj86i.d.mts.map +1 -0
  194. package/dist/index.cjs +13730 -12325
  195. package/dist/index.cjs.map +1 -1
  196. package/dist/index.mjs +13771 -12364
  197. package/dist/index.mjs.map +1 -1
  198. package/dist/local-CnVFHJjS.mjs +224 -0
  199. package/dist/local-CnVFHJjS.mjs.map +1 -0
  200. package/dist/local-qevrV6dZ.cjs +241 -0
  201. package/dist/local-qevrV6dZ.cjs.map +1 -0
  202. package/dist/migrate-BEuCcCwN.mjs +267 -0
  203. package/dist/migrate-BEuCcCwN.mjs.map +1 -0
  204. package/dist/migrate-CRRps1i6.cjs +272 -0
  205. package/dist/migrate-CRRps1i6.cjs.map +1 -0
  206. package/dist/migrate-CU8_ZWP1.cjs +181 -0
  207. package/dist/migrate-CU8_ZWP1.cjs.map +1 -0
  208. package/dist/migrate-DgfKZB41.mjs +181 -0
  209. package/dist/migrate-DgfKZB41.mjs.map +1 -0
  210. package/dist/notes-BrBnyZz5.cjs +500 -0
  211. package/dist/notes-BrBnyZz5.cjs.map +1 -0
  212. package/dist/notes-CIzrdBKE.mjs +399 -0
  213. package/dist/notes-CIzrdBKE.mjs.map +1 -0
  214. package/dist/openapi.cjs +213 -7
  215. package/dist/openapi.cjs.map +1 -0
  216. package/dist/openapi.d.cts +32 -8
  217. package/dist/openapi.d.cts.map +1 -1
  218. package/dist/openapi.d.mts +32 -8
  219. package/dist/openapi.d.mts.map +1 -1
  220. package/dist/openapi.mjs +208 -2
  221. package/dist/openapi.mjs.map +1 -0
  222. package/dist/projectBucket-CDJd3prK.mjs +222 -0
  223. package/dist/projectBucket-CDJd3prK.mjs.map +1 -0
  224. package/dist/projectBucket-CKr_zObJ.cjs +263 -0
  225. package/dist/projectBucket-CKr_zObJ.cjs.map +1 -0
  226. package/dist/provider-BqpjG9QM.cjs +57 -0
  227. package/dist/provider-BqpjG9QM.cjs.map +1 -0
  228. package/dist/provider-CEOKk8NS.mjs +46 -0
  229. package/dist/provider-CEOKk8NS.mjs.map +1 -0
  230. package/dist/publish-Bq96_QnK.mjs +123 -0
  231. package/dist/publish-Bq96_QnK.mjs.map +1 -0
  232. package/dist/publish-DMKXh1Tb.cjs +124 -0
  233. package/dist/publish-DMKXh1Tb.cjs.map +1 -0
  234. package/dist/ready-BjFMu_1J.mjs +375 -0
  235. package/dist/ready-BjFMu_1J.mjs.map +1 -0
  236. package/dist/ready-eVMJIcWn.cjs +404 -0
  237. package/dist/ready-eVMJIcWn.cjs.map +1 -0
  238. package/dist/reconcile/public.cjs +3 -5
  239. package/dist/reconcile/public.d.cts +33 -89
  240. package/dist/reconcile/public.d.cts.map +1 -1
  241. package/dist/reconcile/public.d.mts +33 -89
  242. package/dist/reconcile/public.d.mts.map +1 -1
  243. package/dist/reconcile/public.mjs +3 -3
  244. package/dist/{reconcile-DhQ00DpU.mjs → reconcile--I7V4Klj.mjs} +2 -2
  245. package/dist/{reconcile-DhQ00DpU.mjs.map → reconcile--I7V4Klj.mjs.map} +1 -1
  246. package/dist/{reconcile-Dd2iyILf.cjs → reconcile-CuCQBa5-.cjs} +3 -3
  247. package/dist/{reconcile-Dd2iyILf.cjs.map → reconcile-CuCQBa5-.cjs.map} +1 -1
  248. package/dist/resolve-CSsE7frp.mjs +263 -0
  249. package/dist/resolve-CSsE7frp.mjs.map +1 -0
  250. package/dist/resolve-DF9GrosZ.cjs +316 -0
  251. package/dist/resolve-DF9GrosZ.cjs.map +1 -0
  252. package/dist/rollback-BBFGGmMa.cjs +165 -0
  253. package/dist/rollback-BBFGGmMa.cjs.map +1 -0
  254. package/dist/rollback-CZthwqus.mjs +136 -0
  255. package/dist/rollback-CZthwqus.mjs.map +1 -0
  256. package/dist/runtime-CFvcLEJW.d.cts +82 -0
  257. package/dist/runtime-CFvcLEJW.d.cts.map +1 -0
  258. package/dist/runtime-dwsH6ddo.d.mts +82 -0
  259. package/dist/runtime-dwsH6ddo.d.mts.map +1 -0
  260. package/dist/s3-BBRkezf7.mjs +215 -0
  261. package/dist/s3-BBRkezf7.mjs.map +1 -0
  262. package/dist/s3-CI2QYgXH.cjs +215 -0
  263. package/dist/s3-CI2QYgXH.cjs.map +1 -0
  264. package/dist/sandbox/config-worker.cjs +43 -0
  265. package/dist/sandbox/config-worker.cjs.map +1 -0
  266. package/dist/sandbox/config-worker.d.cts +1 -0
  267. package/dist/sandbox/config-worker.d.mts +1 -0
  268. package/dist/sandbox/config-worker.mjs +44 -0
  269. package/dist/sandbox/config-worker.mjs.map +1 -0
  270. package/dist/sandbox/credentials-worker.cjs +53 -0
  271. package/dist/sandbox/credentials-worker.cjs.map +1 -0
  272. package/dist/sandbox/credentials-worker.d.cts +1 -0
  273. package/dist/sandbox/credentials-worker.d.mts +1 -0
  274. package/dist/sandbox/credentials-worker.mjs +54 -0
  275. package/dist/sandbox/credentials-worker.mjs.map +1 -0
  276. package/dist/sandbox/discover-worker.cjs +47 -0
  277. package/dist/sandbox/discover-worker.cjs.map +1 -0
  278. package/dist/sandbox/discover-worker.d.cts +1 -0
  279. package/dist/sandbox/discover-worker.d.mts +1 -0
  280. package/dist/sandbox/discover-worker.mjs +48 -0
  281. package/dist/sandbox/discover-worker.mjs.map +1 -0
  282. package/dist/sandbox/migrate-worker.cjs +75 -0
  283. package/dist/sandbox/migrate-worker.cjs.map +1 -0
  284. package/dist/sandbox/migrate-worker.d.cts +1 -0
  285. package/dist/sandbox/migrate-worker.d.mts +1 -0
  286. package/dist/sandbox/migrate-worker.mjs +76 -0
  287. package/dist/sandbox/migrate-worker.mjs.map +1 -0
  288. package/dist/{workspace-mFpI_ky_.cjs → schemas-BCwKKA42.mjs} +399 -1162
  289. package/dist/schemas-BCwKKA42.mjs.map +1 -0
  290. package/dist/{workspace-CgwmXEtc.mjs → schemas-BQ_v0lEX.cjs} +487 -971
  291. package/dist/schemas-BQ_v0lEX.cjs.map +1 -0
  292. package/dist/secretsManager-CQORubp9.mjs +97 -0
  293. package/dist/secretsManager-CQORubp9.mjs.map +1 -0
  294. package/dist/secretsManager-RAGcEDX1.cjs +108 -0
  295. package/dist/secretsManager-RAGcEDX1.cjs.map +1 -0
  296. package/dist/seeds-B3xvUAQf.cjs +363 -0
  297. package/dist/seeds-B3xvUAQf.cjs.map +1 -0
  298. package/dist/seeds-BCC8vAXR.mjs +298 -0
  299. package/dist/seeds-BCC8vAXR.mjs.map +1 -0
  300. package/dist/serverSetup-C4iAABtI.mjs +685 -0
  301. package/dist/serverSetup-C4iAABtI.mjs.map +1 -0
  302. package/dist/serverSetup-Dt2DTlwa.cjs +685 -0
  303. package/dist/serverSetup-Dt2DTlwa.cjs.map +1 -0
  304. package/dist/sniffer-C2Ot1IbK.mjs +1824 -0
  305. package/dist/sniffer-C2Ot1IbK.mjs.map +1 -0
  306. package/dist/sniffer-bTrGuu9z.cjs +1997 -0
  307. package/dist/sniffer-bTrGuu9z.cjs.map +1 -0
  308. package/dist/snsSubscriptions-CFKb7fv0.cjs +1173 -0
  309. package/dist/snsSubscriptions-CFKb7fv0.cjs.map +1 -0
  310. package/dist/snsSubscriptions-QDDDn9Qi.mjs +1048 -0
  311. package/dist/snsSubscriptions-QDDDn9Qi.mjs.map +1 -0
  312. package/dist/sst-DDRWlXdv.mjs +478 -0
  313. package/dist/sst-DDRWlXdv.mjs.map +1 -0
  314. package/dist/sst-iRdMlGKd.cjs +501 -0
  315. package/dist/sst-iRdMlGKd.cjs.map +1 -0
  316. package/dist/stack-B9iDYMrq.cjs +2431 -0
  317. package/dist/stack-B9iDYMrq.cjs.map +1 -0
  318. package/dist/stack-CIOY44aC.mjs +2256 -0
  319. package/dist/stack-CIOY44aC.mjs.map +1 -0
  320. package/dist/stage-DA74aD_V.mjs +302 -0
  321. package/dist/stage-DA74aD_V.mjs.map +1 -0
  322. package/dist/stage-ycFS9mVn.cjs +313 -0
  323. package/dist/stage-ycFS9mVn.cjs.map +1 -0
  324. package/dist/stages-B0yOikgt.cjs +190 -0
  325. package/dist/stages-B0yOikgt.cjs.map +1 -0
  326. package/dist/stages-yA9bhStl.mjs +190 -0
  327. package/dist/stages-yA9bhStl.mjs.map +1 -0
  328. package/dist/target/public.cjs +15 -0
  329. package/dist/target/public.d.cts +28 -0
  330. package/dist/target/public.d.cts.map +1 -0
  331. package/dist/target/public.d.mts +28 -0
  332. package/dist/target/public.d.mts.map +1 -0
  333. package/dist/target/public.mjs +4 -0
  334. package/dist/terminal-DX22WLvT.mjs +85 -0
  335. package/dist/terminal-DX22WLvT.mjs.map +1 -0
  336. package/dist/terminal-RxfbNUwl.cjs +85 -0
  337. package/dist/terminal-RxfbNUwl.cjs.map +1 -0
  338. package/dist/types-Bl_CwZC9.cjs +90 -0
  339. package/dist/types-Bl_CwZC9.cjs.map +1 -0
  340. package/dist/{types-kvBQjpPo.d.mts → types-Dk--xVOT.d.cts} +2159 -364
  341. package/dist/types-Dk--xVOT.d.cts.map +1 -0
  342. package/dist/{types-RhXmHR-e.d.cts → types-DwQYpd_0.d.mts} +2157 -364
  343. package/dist/types-DwQYpd_0.d.mts.map +1 -0
  344. package/dist/types-Y1NfWlyG.mjs +61 -0
  345. package/dist/types-Y1NfWlyG.mjs.map +1 -0
  346. package/dist/utils-D2Nk1Nv2.cjs +205 -0
  347. package/dist/utils-D2Nk1Nv2.cjs.map +1 -0
  348. package/dist/utils-D_fxUqvU.mjs +156 -0
  349. package/dist/utils-D_fxUqvU.mjs.map +1 -0
  350. package/dist/vitest.cjs +65 -0
  351. package/dist/vitest.cjs.map +1 -0
  352. package/dist/vitest.d.cts +29 -0
  353. package/dist/vitest.d.cts.map +1 -0
  354. package/dist/vitest.d.mts +29 -0
  355. package/dist/vitest.d.mts.map +1 -0
  356. package/dist/vitest.mjs +65 -0
  357. package/dist/vitest.mjs.map +1 -0
  358. package/dist/workerRuntime-BXfhbe13.cjs +108 -0
  359. package/dist/workerRuntime-BXfhbe13.cjs.map +1 -0
  360. package/dist/workerRuntime-CsOyBRx2.mjs +79 -0
  361. package/dist/workerRuntime-CsOyBRx2.mjs.map +1 -0
  362. package/dist/workspace/index.cjs +6 -2
  363. package/dist/workspace/index.d.cts +3 -3
  364. package/dist/workspace/index.d.mts +3 -3
  365. package/dist/workspace/index.mjs +2 -2
  366. package/dist/workspace-1szcahj9.cjs +2916 -0
  367. package/dist/workspace-1szcahj9.cjs.map +1 -0
  368. package/dist/workspace-DFGsrjGD.mjs +2480 -0
  369. package/dist/workspace-DFGsrjGD.mjs.map +1 -0
  370. package/package.json +65 -13
  371. package/dist/HostingerProvider-BY26bWwB.mjs.map +0 -1
  372. package/dist/HostingerProvider-BZFGYYVA.cjs.map +0 -1
  373. package/dist/LocalStateProvider-7HR6SS2t.cjs +0 -48
  374. package/dist/LocalStateProvider-7HR6SS2t.cjs.map +0 -1
  375. package/dist/LocalStateProvider-D7QyJoLM.mjs +0 -48
  376. package/dist/LocalStateProvider-D7QyJoLM.mjs.map +0 -1
  377. package/dist/Route53Provider-Cvj40A8I.mjs.map +0 -1
  378. package/dist/Route53Provider-DVILBsvV.cjs.map +0 -1
  379. package/dist/SSMStateProvider-B0Hu1MKZ.mjs +0 -75
  380. package/dist/SSMStateProvider-B0Hu1MKZ.mjs.map +0 -1
  381. package/dist/SSMStateProvider-VrQ-yeqd.cjs +0 -74
  382. package/dist/SSMStateProvider-VrQ-yeqd.cjs.map +0 -1
  383. package/dist/backup-provisioner-BmhIO_Yr.cjs.map +0 -1
  384. package/dist/backup-provisioner-DIVCbfee.mjs.map +0 -1
  385. package/dist/bundler-BeNDZdHQ.cjs.map +0 -1
  386. package/dist/bundler-BodTL4kf.mjs.map +0 -1
  387. package/dist/config-Q1rvKHvw.cjs +0 -467
  388. package/dist/config-Q1rvKHvw.cjs.map +0 -1
  389. package/dist/config-pqGD3hF9.mjs +0 -414
  390. package/dist/config-pqGD3hF9.mjs.map +0 -1
  391. package/dist/config.d.cts.map +0 -1
  392. package/dist/config.d.mts.map +0 -1
  393. package/dist/credentials-BekkKtY_.mjs +0 -2780
  394. package/dist/credentials-BekkKtY_.mjs.map +0 -1
  395. package/dist/credentials-Q6F0uqJq.cjs +0 -2917
  396. package/dist/credentials-Q6F0uqJq.cjs.map +0 -1
  397. package/dist/discover-BERGFg8v.cjs +0 -288
  398. package/dist/discover-BERGFg8v.cjs.map +0 -1
  399. package/dist/discover-CK-n3w6b.mjs +0 -244
  400. package/dist/discover-CK-n3w6b.mjs.map +0 -1
  401. package/dist/emit-BdoPFjZf.cjs +0 -253
  402. package/dist/emit-BdoPFjZf.cjs.map +0 -1
  403. package/dist/emit-Bzq7JsMP.mjs +0 -224
  404. package/dist/emit-Bzq7JsMP.mjs.map +0 -1
  405. package/dist/fullstack-secrets-BET8gqwK.mjs +0 -81
  406. package/dist/fullstack-secrets-BET8gqwK.mjs.map +0 -1
  407. package/dist/fullstack-secrets-DXsWO-5m.cjs +0 -92
  408. package/dist/fullstack-secrets-DXsWO-5m.cjs.map +0 -1
  409. package/dist/generator-LfZU7NlU.mjs +0 -247
  410. package/dist/generator-LfZU7NlU.mjs.map +0 -1
  411. package/dist/generator-Wdfp0jCS.cjs +0 -282
  412. package/dist/generator-Wdfp0jCS.cjs.map +0 -1
  413. package/dist/github-BfflNPVe.cjs +0 -203
  414. package/dist/github-BfflNPVe.cjs.map +0 -1
  415. package/dist/github-CRwnxKmD.mjs +0 -203
  416. package/dist/github-CRwnxKmD.mjs.map +0 -1
  417. package/dist/index-C-HkOEBt.d.cts.map +0 -1
  418. package/dist/index-C-VLwB_Y.d.mts.map +0 -1
  419. package/dist/keystore-B4PRlbgE.mjs +0 -81
  420. package/dist/keystore-B4PRlbgE.mjs.map +0 -1
  421. package/dist/keystore-DgGRj2Yy.cjs +0 -98
  422. package/dist/keystore-DgGRj2Yy.cjs.map +0 -1
  423. package/dist/openapi-Dcbme-Us.cjs +0 -2038
  424. package/dist/openapi-Dcbme-Us.cjs.map +0 -1
  425. package/dist/openapi-vy4JzhUv.mjs +0 -1991
  426. package/dist/openapi-vy4JzhUv.mjs.map +0 -1
  427. package/dist/storage-C-30BD1e.cjs +0 -272
  428. package/dist/storage-C-30BD1e.cjs.map +0 -1
  429. package/dist/storage-P_b3w7uj.mjs +0 -231
  430. package/dist/storage-P_b3w7uj.mjs.map +0 -1
  431. package/dist/sync-B3xxXtJT.mjs +0 -88
  432. package/dist/sync-B3xxXtJT.mjs.map +0 -1
  433. package/dist/sync-D7uTIIEi.cjs +0 -111
  434. package/dist/sync-D7uTIIEi.cjs.map +0 -1
  435. package/dist/types-RhXmHR-e.d.cts.map +0 -1
  436. package/dist/types-kvBQjpPo.d.mts.map +0 -1
  437. package/dist/workspace-CgwmXEtc.mjs.map +0 -1
  438. package/dist/workspace-mFpI_ky_.cjs.map +0 -1
@@ -0,0 +1,298 @@
1
+ import { hostname, userInfo } from "node:os";
2
+ //#region src/deploy/journal.ts
3
+ var DeployJournal = class DeployJournal {
4
+ store;
5
+ stage;
6
+ state;
7
+ resources;
8
+ version;
9
+ existed;
10
+ constructor(store, stage, state, resources, version, existed) {
11
+ this.store = store;
12
+ this.stage = stage;
13
+ this.state = state;
14
+ this.resources = resources;
15
+ this.version = version;
16
+ this.existed = existed;
17
+ }
18
+ static async open(store, stage, initial, adopt = (stored) => stored) {
19
+ const stored = await store.read(stage);
20
+ if (stored) return new DeployJournal(store, stage, adopt(stored.state), stored.resources, stored.version, true);
21
+ const state = initial();
22
+ const version = await store.write(stage, state, { expectedVersion: null });
23
+ return new DeployJournal(store, stage, state, {}, version, false);
24
+ }
25
+ record(key) {
26
+ return this.resources[key];
27
+ }
28
+ /** The keys a previous run marked `pending` and never saw created. */
29
+ unfinished() {
30
+ return Object.values(this.resources).filter((record) => record.status === "pending").map((record) => record.key);
31
+ }
32
+ /** Records that `entry` is about to be created. */
33
+ async pending(entry) {
34
+ await this.put({
35
+ ...entry,
36
+ status: "pending"
37
+ });
38
+ }
39
+ /**
40
+ * Records `entry` as existing with `id`; a no-op if it already is, with
41
+ * the same data.
42
+ */
43
+ async ready(entry, id) {
44
+ const current = this.resources[entry.key];
45
+ if (current?.status === "ready" && current.id === id && JSON.stringify(current.data) === JSON.stringify(entry.data)) return;
46
+ await this.put({
47
+ ...entry,
48
+ status: "ready",
49
+ id
50
+ });
51
+ }
52
+ /**
53
+ * The resource `entry` names: by its recorded id, else by looking it up,
54
+ * else created — with `pending` written before the create and `ready`
55
+ * after, so a run that dies in between leaves a record the next run
56
+ * resolves by looking the resource up rather than creating another.
57
+ */
58
+ async ensure(entry, steps) {
59
+ const record = this.resources[entry.key];
60
+ let staleId;
61
+ if (record?.status === "ready" && record.id && steps.get) {
62
+ const known = await steps.get(record.id);
63
+ if (known) {
64
+ await this.ready(entry, steps.id(known));
65
+ return {
66
+ resource: known,
67
+ via: "recorded"
68
+ };
69
+ }
70
+ staleId = record.id;
71
+ }
72
+ const existing = await steps.find();
73
+ if (existing) {
74
+ await this.ready(entry, steps.id(existing));
75
+ return {
76
+ resource: existing,
77
+ via: record?.status === "pending" ? "resumed" : "found",
78
+ ...staleId ? { staleId } : {}
79
+ };
80
+ }
81
+ await this.pending(entry);
82
+ const created = await steps.create();
83
+ await this.ready(entry, steps.id(created));
84
+ return {
85
+ resource: created,
86
+ via: "created",
87
+ ...staleId ? { staleId } : {}
88
+ };
89
+ }
90
+ /** Removes `key`'s record — a resource that no longer exists. */
91
+ async forget(key) {
92
+ if (!(key in this.resources)) return;
93
+ this.version = await this.store.deleteResource(this.stage, key, { expectedVersion: this.version });
94
+ const { [key]: _removed, ...resources } = this.resources;
95
+ this.resources = resources;
96
+ }
97
+ /** Every record, as the journal last wrote or read it. */
98
+ records() {
99
+ return this.resources;
100
+ }
101
+ /** Writes the stage's state, keeping its resource records. */
102
+ async save() {
103
+ this.state.lastDeployedAt = (/* @__PURE__ */ new Date()).toISOString();
104
+ this.version = await this.store.write(this.stage, this.state, { expectedVersion: this.version });
105
+ }
106
+ async put(record) {
107
+ this.version = await this.store.putResource(this.stage, record, { expectedVersion: this.version });
108
+ this.resources = {
109
+ ...this.resources,
110
+ [record.key]: {
111
+ ...record,
112
+ updatedAt: (/* @__PURE__ */ new Date()).toISOString()
113
+ }
114
+ };
115
+ }
116
+ };
117
+ //#endregion
118
+ //#region src/deploy/actor.ts
119
+ /**
120
+ * Who wrote a stage's deploy state: a GitHub Actions run, or a person at a
121
+ * machine. Recorded on every state write (`updatedBy`), on every resource
122
+ * record and on every release (`releasedBy`), so "who put this here" has an
123
+ * answer that does not depend on anyone's memory.
124
+ */
125
+ /** Whether `env` is a CI job — GitHub Actions or any runner that sets `CI`. */
126
+ function isCi(env = process.env) {
127
+ return env.GITHUB_ACTIONS === "true" || env.CI === "true";
128
+ }
129
+ /** Who this process is writing as. */
130
+ function currentActor(env = process.env) {
131
+ if (env.GITHUB_ACTIONS === "true") {
132
+ const server = env.GITHUB_SERVER_URL ?? "https://github.com";
133
+ return {
134
+ kind: "github",
135
+ actor: env.GITHUB_ACTOR ?? "unknown",
136
+ run: `${server}/${env.GITHUB_REPOSITORY ?? "unknown"}/actions/runs/${env.GITHUB_RUN_ID ?? "unknown"}`,
137
+ ...env.GITHUB_WORKFLOW ? { workflow: env.GITHUB_WORKFLOW } : {}
138
+ };
139
+ }
140
+ let user = "unknown";
141
+ try {
142
+ user = userInfo().username;
143
+ } catch {}
144
+ return {
145
+ kind: "local",
146
+ user,
147
+ host: hostname()
148
+ };
149
+ }
150
+ /** `octocat (deploy, https://github.com/…/runs/1)` or `ada@laptop`. */
151
+ function describeActor(actor) {
152
+ if (!actor) return "unknown";
153
+ if (actor.kind === "local") return `${actor.user}@${actor.host}`;
154
+ return `${actor.actor} (${actor.workflow ? `${actor.workflow}, ` : ""}${actor.run})`;
155
+ }
156
+ //#endregion
157
+ //#region src/deploy/dnsResources.ts
158
+ /** The resource type of a DNS record gkm wrote. */
159
+ const DNS_RECORD_RESOURCE = "dns-record";
160
+ /** A record's full name: `api.example.com`, or the domain for `@`. */
161
+ function dnsRecordFqdn(domain, name) {
162
+ return name === "@" || name === "" ? domain : `${name}.${domain}`;
163
+ }
164
+ /** `dns-record:<fqdn>:<type>` */
165
+ function dnsResourceKey(fqdn, type) {
166
+ return `${DNS_RECORD_RESOURCE}:${fqdn.toLowerCase()}:${type.toUpperCase()}`;
167
+ }
168
+ /** The resource record a written DNS record is kept as. */
169
+ function dnsRecordResource(record) {
170
+ const fqdn = dnsRecordFqdn(record.domain, record.name).toLowerCase();
171
+ const type = record.type.toUpperCase();
172
+ const data = {
173
+ domain: record.domain,
174
+ name: record.name,
175
+ value: record.value,
176
+ ttl: record.ttl,
177
+ ...record.provider ? { provider: record.provider } : {}
178
+ };
179
+ return {
180
+ key: dnsResourceKey(fqdn, type),
181
+ type: DNS_RECORD_RESOURCE,
182
+ id: `${fqdn} ${type}`,
183
+ status: "ready",
184
+ data
185
+ };
186
+ }
187
+ /** Records that gkm wrote `record` — or updates the value it holds. */
188
+ async function recordDnsResource(journal, record) {
189
+ const { key, type, id, data } = dnsRecordResource(record);
190
+ await journal.ready({
191
+ key,
192
+ type,
193
+ ...data ? { data } : {}
194
+ }, id);
195
+ }
196
+ /** Forgets a DNS record gkm deleted. */
197
+ async function forgetDnsResource(journal, record) {
198
+ await journal.forget(dnsResourceKey(dnsRecordFqdn(record.domain, record.name), record.type));
199
+ }
200
+ /**
201
+ * The changes a DNS step made, kept: what it created, updated or wrote is
202
+ * recorded, what it deleted is forgotten. A record it found already right is
203
+ * recorded only if gkm wrote it before; one it left to a person is not.
204
+ */
205
+ async function recordDnsChanges(journal, changes, providerOf) {
206
+ for (const change of changes) {
207
+ if (change.action === "delete") {
208
+ await forgetDnsResource(journal, change);
209
+ continue;
210
+ }
211
+ const written = change.action === "create" || change.action === "update" || change.action === "write";
212
+ const known = change.action === "unchanged" && journal.record(dnsResourceKey(dnsRecordFqdn(change.domain, change.name), change.type)) !== void 0;
213
+ if (!written && !known || change.value === void 0) continue;
214
+ const provider = providerOf(change.domain);
215
+ await recordDnsResource(journal, {
216
+ domain: change.domain,
217
+ name: change.name,
218
+ type: change.type,
219
+ value: change.value,
220
+ ttl: change.ttl ?? 0,
221
+ ...provider ? { provider } : {}
222
+ });
223
+ }
224
+ }
225
+ /** Every DNS record gkm wrote for the stage, from its resource records. */
226
+ function dnsResources(resources) {
227
+ return Object.values(resources).filter((record) => record.type === DNS_RECORD_RESOURCE).map((record) => {
228
+ const data = record.data ?? {};
229
+ const [fqdn = "", type = ""] = (record.id ?? "").split(" ");
230
+ return {
231
+ ...data,
232
+ type,
233
+ fqdn
234
+ };
235
+ }).sort((a, b) => a.fqdn.localeCompare(b.fqdn) || a.type.localeCompare(b.type));
236
+ }
237
+ //#endregion
238
+ //#region src/target/seeds.ts
239
+ /** A seed of a deployed stage failed; the release stopped before any app. */
240
+ var DeploySeedsFailed = class extends Error {
241
+ stage;
242
+ construct;
243
+ seed;
244
+ cause;
245
+ constructor(stage, construct, seed, cause) {
246
+ super(`Seeding "${stage}" failed, so no app was released: ${construct}'s seed '${seed}' failed — ${causeMessage(cause)}. Its writes were rolled back; the migrations and the seeds before it stay applied. Seeds run on every deploy, so each must be an idempotent upsert: fix it and deploy again.`);
247
+ this.stage = stage;
248
+ this.construct = construct;
249
+ this.seed = seed;
250
+ this.cause = cause;
251
+ this.name = "DeploySeedsFailed";
252
+ }
253
+ };
254
+ /**
255
+ * What went wrong underneath: a `SeedFailed`'s own cause (the database's
256
+ * error), or — from a sandbox, where errors arrive as data — the same.
257
+ */
258
+ function causeMessage(cause) {
259
+ const message = (value) => value && typeof value === "object" && "message" in value ? String(value.message) : void 0;
260
+ return (cause && typeof cause === "object" && "cause" in cause ? message(cause.cause) : void 0) ?? message(cause) ?? String(cause);
261
+ }
262
+ /**
263
+ * Say what a deploy's migrations and seeds did: a line per construct with
264
+ * something applied or run — `🌱 db/database/seeds: ran 2`, then each seed —
265
+ * and a `migration.applied` or `seed.ran` event beside it.
266
+ */
267
+ function reportDatabaseRuns(migrations, seeds, log, emit) {
268
+ for (const { construct, folder, applied } of migrations) {
269
+ if (applied.length === 0) continue;
270
+ log(`🗄️ ${folder}: applied ${applied.length}`);
271
+ for (const name of applied) log(` ✓ ${name}`);
272
+ emit({
273
+ type: "migration.applied",
274
+ construct,
275
+ folder,
276
+ applied: [...applied]
277
+ });
278
+ }
279
+ for (const { construct, folder, seeded } of seeds) {
280
+ if (seeded.length === 0) continue;
281
+ log(`🌱 ${folder}: ran ${seeded.length}`);
282
+ for (const name of seeded) log(` ✓ ${name}`);
283
+ emit({
284
+ type: "seed.ran",
285
+ construct,
286
+ folder,
287
+ seeded: [...seeded]
288
+ });
289
+ }
290
+ }
291
+ /** What a dry run lists: the seeds a deploy would run, construct by construct. */
292
+ function reportPlannedSeeds(planned, log) {
293
+ for (const { folder, seeds } of planned) log(`🌱 ${folder}: would run ${seeds.length} (${seeds.join(", ")})`);
294
+ }
295
+ //#endregion
296
+ export { dnsResources as a, currentActor as c, DeployJournal as d, dnsRecordResource as i, describeActor as l, reportDatabaseRuns as n, forgetDnsResource as o, reportPlannedSeeds as r, recordDnsChanges as s, DeploySeedsFailed as t, isCi as u };
297
+
298
+ //# sourceMappingURL=seeds-BCC8vAXR.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"seeds-BCC8vAXR.mjs","names":[],"sources":["../src/deploy/journal.ts","../src/deploy/actor.ts","../src/deploy/dnsResources.ts","../src/target/seeds.ts"],"sourcesContent":["/**\n * A deploy's record of what it is creating, written as it goes.\n *\n * Deploy used to write state once, after every app had deployed, so a run that\n * failed half way lost the ids of everything it had created and the next run\n * fell back to finding them by name — or made them again. The journal writes\n * through the stage's `StateStore` after every resource instead:\n *\n * 1. `pending`, before the call that creates it — \"this may now exist\";\n * 2. `ready` with the target's id, once the call has returned.\n *\n * A run that meets a `pending` record looks the resource up before it creates\n * anything, so a run killed between the create and the record adopts what the\n * dead run made instead of making a second one. Every write is conditional on\n * the version the journal last wrote, so a writer that skipped the stage's\n * lock raises `StateVersionConflict` here rather than being overwritten.\n */\n\nimport type { ResourceRecord, StateStore, StateVersion } from './StateStore';\nimport type { StageState } from './state';\n\n/** One resource, as the journal keys and describes it. */\nexport interface JournalEntry {\n\t/** `<type>:<name>`, unique within the stage — `application:api`. */\n\tkey: string;\n\ttype: string;\n\t/** What a later run needs to find it again — its name, usually. */\n\tdata?: Record<string, unknown>;\n}\n\n/** How to get at one kind of resource on the target. */\nexport interface ResourceSteps<T> {\n\t/** By the id a `ready` record holds; `null` when the target lost it. */\n\tget?: (id: string) => Promise<T | null | undefined>;\n\t/** By what identifies it otherwise — its name, in its environment. */\n\tfind: () => Promise<T | null | undefined>;\n\tcreate: () => Promise<T>;\n\tid: (resource: T) => string;\n}\n\nexport interface Ensured<T> {\n\tresource: T;\n\t/**\n\t * - `recorded`: the id in a `ready` record still resolves\n\t * - `resumed`: a `pending` record's resource was found — a run died\n\t * between creating it and recording it\n\t * - `found`: it existed, unrecorded\n\t * - `created`: it did not exist\n\t */\n\tvia: 'recorded' | 'resumed' | 'found' | 'created';\n\t/** The recorded id that no longer resolved, if there was one. */\n\tstaleId?: string;\n}\n\nexport class DeployJournal<S extends StageState = StageState> {\n\tprivate constructor(\n\t\tprivate readonly store: StateStore,\n\t\treadonly stage: string,\n\t\t/** The stage's state, mutated by the deploy and written by `save`. */\n\t\treadonly state: S,\n\t\tprivate resources: Record<string, ResourceRecord>,\n\t\tprivate version: StateVersion,\n\t\t/** Whether the stage had state before this run. */\n\t\treadonly existed: boolean,\n\t) {}\n\n\t/**\n\t * The stage's journal — its stored state, or `initial` written as the\n\t * stage's first state, so there is somewhere to record the very first\n\t * resource before it is created.\n\t *\n\t * `adopt` turns a stored state into the shape the caller works on — a\n\t * Dokploy deploy of a stage compose deployed keeps its releases and starts\n\t * its Dokploy ids afresh. Without it, the stored state is used as it is.\n\t */\n\tstatic async open(\n\t\tstore: StateStore,\n\t\tstage: string,\n\t\tinitial: () => StageState,\n\t): Promise<DeployJournal<StageState>>;\n\tstatic async open<S extends StageState>(\n\t\tstore: StateStore,\n\t\tstage: string,\n\t\tinitial: () => S,\n\t\tadopt: (stored: StageState) => S,\n\t): Promise<DeployJournal<S>>;\n\tstatic async open(\n\t\tstore: StateStore,\n\t\tstage: string,\n\t\tinitial: () => StageState,\n\t\tadopt: (stored: StageState) => StageState = (stored) => stored,\n\t): Promise<DeployJournal<StageState>> {\n\t\tconst stored = await store.read(stage);\n\t\tif (stored) {\n\t\t\treturn new DeployJournal(\n\t\t\t\tstore,\n\t\t\t\tstage,\n\t\t\t\tadopt(stored.state),\n\t\t\t\tstored.resources,\n\t\t\t\tstored.version,\n\t\t\t\ttrue,\n\t\t\t);\n\t\t}\n\n\t\tconst state = initial();\n\t\tconst version = await store.write(stage, state, { expectedVersion: null });\n\t\treturn new DeployJournal(store, stage, state, {}, version, false);\n\t}\n\n\trecord(key: string): ResourceRecord | undefined {\n\t\treturn this.resources[key];\n\t}\n\n\t/** The keys a previous run marked `pending` and never saw created. */\n\tunfinished(): string[] {\n\t\treturn Object.values(this.resources)\n\t\t\t.filter((record) => record.status === 'pending')\n\t\t\t.map((record) => record.key);\n\t}\n\n\t/** Records that `entry` is about to be created. */\n\tasync pending(entry: JournalEntry): Promise<void> {\n\t\tawait this.put({ ...entry, status: 'pending' });\n\t}\n\n\t/**\n\t * Records `entry` as existing with `id`; a no-op if it already is, with\n\t * the same data.\n\t */\n\tasync ready(entry: JournalEntry, id: string): Promise<void> {\n\t\tconst current = this.resources[entry.key];\n\t\tif (\n\t\t\tcurrent?.status === 'ready' &&\n\t\t\tcurrent.id === id &&\n\t\t\tJSON.stringify(current.data) === JSON.stringify(entry.data)\n\t\t) {\n\t\t\treturn;\n\t\t}\n\t\tawait this.put({ ...entry, status: 'ready', id });\n\t}\n\n\t/**\n\t * The resource `entry` names: by its recorded id, else by looking it up,\n\t * else created — with `pending` written before the create and `ready`\n\t * after, so a run that dies in between leaves a record the next run\n\t * resolves by looking the resource up rather than creating another.\n\t */\n\tasync ensure<T>(\n\t\tentry: JournalEntry,\n\t\tsteps: ResourceSteps<T>,\n\t): Promise<Ensured<T>> {\n\t\tconst record = this.resources[entry.key];\n\t\tlet staleId: string | undefined;\n\n\t\tif (record?.status === 'ready' && record.id && steps.get) {\n\t\t\tconst known = await steps.get(record.id);\n\t\t\tif (known) {\n\t\t\t\tawait this.ready(entry, steps.id(known));\n\t\t\t\treturn { resource: known, via: 'recorded' };\n\t\t\t}\n\t\t\tstaleId = record.id;\n\t\t}\n\n\t\tconst existing = await steps.find();\n\t\tif (existing) {\n\t\t\tawait this.ready(entry, steps.id(existing));\n\t\t\treturn {\n\t\t\t\tresource: existing,\n\t\t\t\tvia: record?.status === 'pending' ? 'resumed' : 'found',\n\t\t\t\t...(staleId ? { staleId } : {}),\n\t\t\t};\n\t\t}\n\n\t\tawait this.pending(entry);\n\t\tconst created = await steps.create();\n\t\tawait this.ready(entry, steps.id(created));\n\t\treturn {\n\t\t\tresource: created,\n\t\t\tvia: 'created',\n\t\t\t...(staleId ? { staleId } : {}),\n\t\t};\n\t}\n\n\t/** Removes `key`'s record — a resource that no longer exists. */\n\tasync forget(key: string): Promise<void> {\n\t\tif (!(key in this.resources)) return;\n\t\tthis.version = await this.store.deleteResource(this.stage, key, {\n\t\t\texpectedVersion: this.version,\n\t\t});\n\t\tconst { [key]: _removed, ...resources } = this.resources;\n\t\tthis.resources = resources;\n\t}\n\n\t/** Every record, as the journal last wrote or read it. */\n\trecords(): Record<string, ResourceRecord> {\n\t\treturn this.resources;\n\t}\n\n\t/** Writes the stage's state, keeping its resource records. */\n\tasync save(): Promise<void> {\n\t\tthis.state.lastDeployedAt = new Date().toISOString();\n\t\tthis.version = await this.store.write(this.stage, this.state, {\n\t\t\texpectedVersion: this.version,\n\t\t});\n\t}\n\n\tprivate async put(record: Omit<ResourceRecord, 'updatedAt'>): Promise<void> {\n\t\tthis.version = await this.store.putResource(this.stage, record, {\n\t\t\texpectedVersion: this.version,\n\t\t});\n\t\tthis.resources = {\n\t\t\t...this.resources,\n\t\t\t[record.key]: { ...record, updatedAt: new Date().toISOString() },\n\t\t};\n\t}\n}\n","/**\n * Who wrote a stage's deploy state: a GitHub Actions run, or a person at a\n * machine. Recorded on every state write (`updatedBy`), on every resource\n * record and on every release (`releasedBy`), so \"who put this here\" has an\n * answer that does not depend on anyone's memory.\n */\n\nimport { hostname, userInfo } from 'node:os';\n\n/** A GitHub Actions run: the account that triggered it and the run's page. */\nexport interface GithubActor {\n\tkind: 'github';\n\t/** `GITHUB_ACTOR` — the account that triggered the run. */\n\tactor: string;\n\t/** `<server>/<repository>/actions/runs/<run id>` */\n\trun: string;\n\t/** `GITHUB_WORKFLOW` — the workflow's name. */\n\tworkflow?: string;\n}\n\n/** A person at a machine. */\nexport interface LocalActor {\n\tkind: 'local';\n\tuser: string;\n\thost: string;\n}\n\nexport type Actor = GithubActor | LocalActor;\n\n/** Whether `env` is a CI job — GitHub Actions or any runner that sets `CI`. */\nexport function isCi(env: NodeJS.ProcessEnv = process.env): boolean {\n\treturn env.GITHUB_ACTIONS === 'true' || env.CI === 'true';\n}\n\n/** Who this process is writing as. */\nexport function currentActor(env: NodeJS.ProcessEnv = process.env): Actor {\n\tif (env.GITHUB_ACTIONS === 'true') {\n\t\tconst server = env.GITHUB_SERVER_URL ?? 'https://github.com';\n\t\treturn {\n\t\t\tkind: 'github',\n\t\t\tactor: env.GITHUB_ACTOR ?? 'unknown',\n\t\t\trun: `${server}/${env.GITHUB_REPOSITORY ?? 'unknown'}/actions/runs/${env.GITHUB_RUN_ID ?? 'unknown'}`,\n\t\t\t...(env.GITHUB_WORKFLOW ? { workflow: env.GITHUB_WORKFLOW } : {}),\n\t\t};\n\t}\n\n\tlet user = 'unknown';\n\ttry {\n\t\tuser = userInfo().username;\n\t} catch {\n\t\t// No passwd entry (a container running as an arbitrary uid).\n\t}\n\treturn { kind: 'local', user, host: hostname() };\n}\n\n/** `octocat (deploy, https://github.com/…/runs/1)` or `ada@laptop`. */\nexport function describeActor(actor: Actor | undefined): string {\n\tif (!actor) return 'unknown';\n\tif (actor.kind === 'local') return `${actor.user}@${actor.host}`;\n\treturn `${actor.actor} (${actor.workflow ? `${actor.workflow}, ` : ''}${actor.run})`;\n}\n","/**\n * DNS records gkm wrote for a stage, as resource records in its deploy state.\n *\n * Each is `dns-record:<fqdn>:<type>` — `dns-record:api.example.com:A` — with\n * `id` `<fqdn> <type>` and the record's value in `data`. Every deploy's DNS\n * step writes through here — `gkm deploy` and `gkm compose` alike — so each\n * record has one key, whoever wrote it.\n */\n\nimport type { DeployJournal } from './journal';\nimport type { ResourceInput, ResourceRecord } from './StateStore';\n\n/** The resource type of a DNS record gkm wrote. */\nexport const DNS_RECORD_RESOURCE = 'dns-record';\n\n/** A DNS record as gkm writes it. */\nexport interface DnsResourceRecord {\n\t/** The `dns` domain it is under: `example.com`. */\n\tdomain: string;\n\t/** Relative to the domain, as providers take it: `api`, `@`. */\n\tname: string;\n\ttype: string;\n\tvalue: string;\n\tttl: number;\n\t/**\n\t * The domain's provider — `godaddy`, `route53`, … Absent on a record\n\t * migrated from a v2 state, which did not say.\n\t */\n\tprovider?: string;\n}\n\n/** `data` of a `dns-record` resource. */\nexport type DnsResourceData = Omit<DnsResourceRecord, 'type'>;\n\n/** A record's full name: `api.example.com`, or the domain for `@`. */\nexport function dnsRecordFqdn(domain: string, name: string): string {\n\treturn name === '@' || name === '' ? domain : `${name}.${domain}`;\n}\n\n/** `dns-record:<fqdn>:<type>` */\nexport function dnsResourceKey(fqdn: string, type: string): string {\n\treturn `${DNS_RECORD_RESOURCE}:${fqdn.toLowerCase()}:${type.toUpperCase()}`;\n}\n\n/** The resource record a written DNS record is kept as. */\nexport function dnsRecordResource(record: DnsResourceRecord): ResourceInput {\n\tconst fqdn = dnsRecordFqdn(record.domain, record.name).toLowerCase();\n\tconst type = record.type.toUpperCase();\n\tconst data: DnsResourceData = {\n\t\tdomain: record.domain,\n\t\tname: record.name,\n\t\tvalue: record.value,\n\t\tttl: record.ttl,\n\t\t...(record.provider ? { provider: record.provider } : {}),\n\t};\n\treturn {\n\t\tkey: dnsResourceKey(fqdn, type),\n\t\ttype: DNS_RECORD_RESOURCE,\n\t\tid: `${fqdn} ${type}`,\n\t\tstatus: 'ready',\n\t\tdata,\n\t};\n}\n\n/** Records that gkm wrote `record` — or updates the value it holds. */\nexport async function recordDnsResource(\n\tjournal: DeployJournal,\n\trecord: DnsResourceRecord,\n): Promise<void> {\n\tconst { key, type, id, data } = dnsRecordResource(record);\n\tawait journal.ready({ key, type, ...(data ? { data } : {}) }, id!);\n}\n\n/** Forgets a DNS record gkm deleted. */\nexport async function forgetDnsResource(\n\tjournal: DeployJournal,\n\trecord: Pick<DnsResourceRecord, 'domain' | 'name' | 'type'>,\n): Promise<void> {\n\tawait journal.forget(\n\t\tdnsResourceKey(dnsRecordFqdn(record.domain, record.name), record.type),\n\t);\n}\n\n/** One change a DNS step made, as `applyStackDns` reports it. */\nexport interface AppliedDnsChange {\n\tdomain: string;\n\tname: string;\n\ttype: string;\n\taction: string;\n\tvalue?: string;\n\tttl?: number;\n}\n\n/**\n * The changes a DNS step made, kept: what it created, updated or wrote is\n * recorded, what it deleted is forgotten. A record it found already right is\n * recorded only if gkm wrote it before; one it left to a person is not.\n */\nexport async function recordDnsChanges(\n\tjournal: DeployJournal,\n\tchanges: readonly AppliedDnsChange[],\n\tproviderOf: (domain: string) => string | undefined,\n): Promise<void> {\n\tfor (const change of changes) {\n\t\tif (change.action === 'delete') {\n\t\t\tawait forgetDnsResource(journal, change);\n\t\t\tcontinue;\n\t\t}\n\t\tconst written =\n\t\t\tchange.action === 'create' ||\n\t\t\tchange.action === 'update' ||\n\t\t\tchange.action === 'write';\n\t\tconst known =\n\t\t\tchange.action === 'unchanged' &&\n\t\t\tjournal.record(\n\t\t\t\tdnsResourceKey(dnsRecordFqdn(change.domain, change.name), change.type),\n\t\t\t) !== undefined;\n\t\tif ((!written && !known) || change.value === undefined) continue;\n\t\tconst provider = providerOf(change.domain);\n\t\tawait recordDnsResource(journal, {\n\t\t\tdomain: change.domain,\n\t\t\tname: change.name,\n\t\t\ttype: change.type,\n\t\t\tvalue: change.value,\n\t\t\tttl: change.ttl ?? 0,\n\t\t\t...(provider ? { provider } : {}),\n\t\t});\n\t}\n}\n\n/** Every DNS record gkm wrote for the stage, from its resource records. */\nexport function dnsResources(\n\tresources: Record<string, ResourceRecord>,\n): (DnsResourceRecord & { fqdn: string })[] {\n\treturn Object.values(resources)\n\t\t.filter((record) => record.type === DNS_RECORD_RESOURCE)\n\t\t.map((record) => {\n\t\t\tconst data = (record.data ?? {}) as DnsResourceData;\n\t\t\tconst [fqdn = '', type = ''] = (record.id ?? '').split(' ');\n\t\t\treturn { ...data, type, fqdn };\n\t\t})\n\t\t.sort(\n\t\t\t(a, b) => a.fqdn.localeCompare(b.fqdn) || a.type.localeCompare(b.type),\n\t\t);\n}\n","/**\n * A deployed stage's seeds: what every server target runs after its\n * migrations and before any app starts.\n *\n * Seeds are reference data — roles, permissions, plans — kept current by\n * being run again, so a deploy runs every one of them, every time, on every\n * stage, production included. That is only safe because a seed is an\n * idempotent upsert; the docs say so, and nothing here can check it.\n */\n\nimport type { TargetEvent } from './types';\n\n/** A seed of a deployed stage failed; the release stopped before any app. */\nexport class DeploySeedsFailed extends Error {\n\tconstructor(\n\t\treadonly stage: string,\n\t\t/** The construct whose seed failed: `Database`. */\n\t\treadonly construct: string,\n\t\t/** The seed file, by name: `001_roles`. */\n\t\treadonly seed: string,\n\t\toverride readonly cause: unknown,\n\t) {\n\t\tsuper(\n\t\t\t`Seeding \"${stage}\" failed, so no app was released: ${construct}'s seed ` +\n\t\t\t\t`'${seed}' failed — ${causeMessage(cause)}. Its writes were rolled ` +\n\t\t\t\t'back; the migrations and the seeds before it stay applied. Seeds run ' +\n\t\t\t\t'on every deploy, so each must be an idempotent upsert: fix it and ' +\n\t\t\t\t'deploy again.',\n\t\t);\n\t\tthis.name = 'DeploySeedsFailed';\n\t}\n}\n\n/**\n * What went wrong underneath: a `SeedFailed`'s own cause (the database's\n * error), or — from a sandbox, where errors arrive as data — the same.\n */\nfunction causeMessage(cause: unknown): string {\n\tconst message = (value: unknown): string | undefined =>\n\t\tvalue && typeof value === 'object' && 'message' in value\n\t\t\t? String(value.message)\n\t\t\t: undefined;\n\tconst inner =\n\t\tcause && typeof cause === 'object' && 'cause' in cause\n\t\t\t? message(cause.cause)\n\t\t\t: undefined;\n\treturn inner ?? message(cause) ?? String(cause);\n}\n\n/** One construct's migrations, as a target reports them. */\nexport interface MigrationsReport {\n\tconstruct: string;\n\tfolder: string;\n\tapplied: readonly string[];\n}\n\n/** One construct's seeds, as a target reports them. */\nexport interface SeedsReport {\n\tconstruct: string;\n\tfolder: string;\n\tseeded: readonly string[];\n}\n\n/**\n * Say what a deploy's migrations and seeds did: a line per construct with\n * something applied or run — `🌱 db/database/seeds: ran 2`, then each seed —\n * and a `migration.applied` or `seed.ran` event beside it.\n */\nexport function reportDatabaseRuns(\n\tmigrations: readonly MigrationsReport[],\n\tseeds: readonly SeedsReport[],\n\tlog: (line: string) => void,\n\temit: (event: TargetEvent) => void,\n): void {\n\tfor (const { construct, folder, applied } of migrations) {\n\t\tif (applied.length === 0) continue;\n\t\tlog(`🗄️ ${folder}: applied ${applied.length}`);\n\t\tfor (const name of applied) log(` ✓ ${name}`);\n\t\temit({\n\t\t\ttype: 'migration.applied',\n\t\t\tconstruct,\n\t\t\tfolder,\n\t\t\tapplied: [...applied],\n\t\t});\n\t}\n\tfor (const { construct, folder, seeded } of seeds) {\n\t\tif (seeded.length === 0) continue;\n\t\tlog(`🌱 ${folder}: ran ${seeded.length}`);\n\t\tfor (const name of seeded) log(` ✓ ${name}`);\n\t\temit({ type: 'seed.ran', construct, folder, seeded: [...seeded] });\n\t}\n}\n\n/** What a dry run lists: the seeds a deploy would run, construct by construct. */\nexport function reportPlannedSeeds(\n\tplanned: readonly { folder: string; seeds: readonly string[] }[],\n\tlog: (line: string) => void,\n): void {\n\tfor (const { folder, seeds } of planned) {\n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