@geekmidas/cli 10.0.0-alpha.175 → 10.0.0-alpha.177

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 (179) hide show
  1. package/dist/{GoDaddyProvider-BtnO8_pk.mjs → GoDaddyProvider-B5Vp3PFa.mjs} +2 -2
  2. package/dist/{GoDaddyProvider-BtnO8_pk.mjs.map → GoDaddyProvider-B5Vp3PFa.mjs.map} +1 -1
  3. package/dist/{GoDaddyProvider-BHNFin4Y.cjs → GoDaddyProvider-Bos-4m3b.cjs} +2 -2
  4. package/dist/{GoDaddyProvider-BHNFin4Y.cjs.map → GoDaddyProvider-Bos-4m3b.cjs.map} +1 -1
  5. package/dist/{HostingerProvider-Cq7QeLKO.mjs → HostingerProvider-DCg0rGXq.mjs} +2 -2
  6. package/dist/{HostingerProvider-Cq7QeLKO.mjs.map → HostingerProvider-DCg0rGXq.mjs.map} +1 -1
  7. package/dist/{HostingerProvider-Bbb1_aKS.cjs → HostingerProvider-jar5l8ck.cjs} +2 -2
  8. package/dist/{HostingerProvider-Bbb1_aKS.cjs.map → HostingerProvider-jar5l8ck.cjs.map} +1 -1
  9. package/dist/{LegacyStateStore-r8xgq8Vv.mjs → LegacyStateStore-mUqUP71P.mjs} +2 -2
  10. package/dist/{LegacyStateStore-r8xgq8Vv.mjs.map → LegacyStateStore-mUqUP71P.mjs.map} +1 -1
  11. package/dist/{LegacyStateStore-CbuqTCMX.cjs → LegacyStateStore-qUlI9q4J.cjs} +2 -2
  12. package/dist/{LegacyStateStore-CbuqTCMX.cjs.map → LegacyStateStore-qUlI9q4J.cjs.map} +1 -1
  13. package/dist/{LocalStateStore-BMnidUp_.mjs → LocalStateStore-B3BGSP9X.mjs} +2 -2
  14. package/dist/{LocalStateStore-BMnidUp_.mjs.map → LocalStateStore-B3BGSP9X.mjs.map} +1 -1
  15. package/dist/{LocalStateStore-B6_1oDJ_.cjs → LocalStateStore-C8KQoWQ4.cjs} +2 -2
  16. package/dist/{LocalStateStore-B6_1oDJ_.cjs.map → LocalStateStore-C8KQoWQ4.cjs.map} +1 -1
  17. package/dist/{S3StateStore-Dq12263A.cjs → S3StateStore-Bb_pR9qR.cjs} +4 -4
  18. package/dist/{S3StateStore-Dq12263A.cjs.map → S3StateStore-Bb_pR9qR.cjs.map} +1 -1
  19. package/dist/{S3StateStore-CHXicp6D.mjs → S3StateStore-BrXQgGqq.mjs} +4 -4
  20. package/dist/{S3StateStore-CHXicp6D.mjs.map → S3StateStore-BrXQgGqq.mjs.map} +1 -1
  21. package/dist/{SSMStateStore-BAMceTz-.mjs → SSMStateStore-B8Opl_On.mjs} +2 -2
  22. package/dist/{SSMStateStore-BAMceTz-.mjs.map → SSMStateStore-B8Opl_On.mjs.map} +1 -1
  23. package/dist/{SSMStateStore-D8HJ3FU9.cjs → SSMStateStore-BY_I0tyB.cjs} +2 -2
  24. package/dist/{SSMStateStore-D8HJ3FU9.cjs.map → SSMStateStore-BY_I0tyB.cjs.map} +1 -1
  25. package/dist/{add-QkB0jIec.cjs → add-DGmk0dXQ.cjs} +4 -4
  26. package/dist/{add-QkB0jIec.cjs.map → add-DGmk0dXQ.cjs.map} +1 -1
  27. package/dist/{add-BK_Mb6D_.mjs → add-DLOigaYm.mjs} +4 -4
  28. package/dist/{add-BK_Mb6D_.mjs.map → add-DLOigaYm.mjs.map} +1 -1
  29. package/dist/{apps-D83caHjP.cjs → apps-CyfjJh6v.cjs} +9 -3
  30. package/dist/apps-CyfjJh6v.cjs.map +1 -0
  31. package/dist/{apps-DpyJvU00.mjs → apps-G1Q2j-fs.mjs} +4 -4
  32. package/dist/apps-G1Q2j-fs.mjs.map +1 -0
  33. package/dist/{bundler-CgCVGuji.mjs → bundler-8pVRVXVZ.mjs} +6 -6
  34. package/dist/{bundler-CgCVGuji.mjs.map → bundler-8pVRVXVZ.mjs.map} +1 -1
  35. package/dist/{bundler-DTHUOAAV.cjs → bundler-y6p6zWLI.cjs} +6 -6
  36. package/dist/{bundler-DTHUOAAV.cjs.map → bundler-y6p6zWLI.cjs.map} +1 -1
  37. package/dist/{cli-B2XyVbUz.mjs → cli-SNWyT6q5.mjs} +4 -4
  38. package/dist/{cli-B2XyVbUz.mjs.map → cli-SNWyT6q5.mjs.map} +1 -1
  39. package/dist/{cli-Cx1tIFan.cjs → cli-_yRVgYDB.cjs} +4 -4
  40. package/dist/{cli-Cx1tIFan.cjs.map → cli-_yRVgYDB.cjs.map} +1 -1
  41. package/dist/{compose-DVr47TbA.cjs → compose-CNDZELiP.cjs} +4 -4
  42. package/dist/{compose-DVr47TbA.cjs.map → compose-CNDZELiP.cjs.map} +1 -1
  43. package/dist/{compose-B9uSqCxY.cjs → compose-CNEv5lGg.cjs} +221 -16
  44. package/dist/compose-CNEv5lGg.cjs.map +1 -0
  45. package/dist/{compose-j0SE-0EG.mjs → compose-D_shZ1mI.mjs} +4 -4
  46. package/dist/{compose-j0SE-0EG.mjs.map → compose-D_shZ1mI.mjs.map} +1 -1
  47. package/dist/{compose-CbXGx1_z.mjs → compose-X-ZypRKX.mjs} +207 -14
  48. package/dist/compose-X-ZypRKX.mjs.map +1 -0
  49. package/dist/dbTunnel-B3TEZuFY.mjs +154 -0
  50. package/dist/dbTunnel-B3TEZuFY.mjs.map +1 -0
  51. package/dist/dbTunnel-Cw8zODrt.cjs +154 -0
  52. package/dist/dbTunnel-Cw8zODrt.cjs.map +1 -0
  53. package/dist/deploy/public.cjs +10 -10
  54. package/dist/deploy/public.d.cts.map +1 -1
  55. package/dist/deploy/public.d.mts.map +1 -1
  56. package/dist/deploy/public.mjs +10 -10
  57. package/dist/{deploy-DDWnWXnA.mjs → deploy-DFul9UAF.mjs} +16 -15
  58. package/dist/{deploy-DDWnWXnA.mjs.map → deploy-DFul9UAF.mjs.map} +1 -1
  59. package/dist/{deploy-qdWn2-m9.cjs → deploy-OPNZJCUm.cjs} +16 -15
  60. package/dist/{deploy-qdWn2-m9.cjs.map → deploy-OPNZJCUm.cjs.map} +1 -1
  61. package/dist/{destroy-DvJEbs9P.mjs → destroy-C9c6S9oI.mjs} +7 -7
  62. package/dist/{destroy-DvJEbs9P.mjs.map → destroy-C9c6S9oI.mjs.map} +1 -1
  63. package/dist/{destroy-B28Zwbzr.cjs → destroy-DbOw1hTz.cjs} +7 -7
  64. package/dist/{destroy-B28Zwbzr.cjs.map → destroy-DbOw1hTz.cjs.map} +1 -1
  65. package/dist/{dns-BxgfpQWO.mjs → dns-BM2DE6jt.mjs} +21 -7
  66. package/dist/dns-BM2DE6jt.mjs.map +1 -0
  67. package/dist/{dns-CiUCbOXH.cjs → dns-_WH7kO9x.cjs} +26 -6
  68. package/dist/dns-_WH7kO9x.cjs.map +1 -0
  69. package/dist/{docker-Dcsqf_NA.mjs → docker-DCtw3rjP.mjs} +4 -4
  70. package/dist/{docker-Dcsqf_NA.mjs.map → docker-DCtw3rjP.mjs.map} +1 -1
  71. package/dist/{docker-Coy1O-IN.cjs → docker-wE0zDnhu.cjs} +4 -4
  72. package/dist/{docker-Coy1O-IN.cjs.map → docker-wE0zDnhu.cjs.map} +1 -1
  73. package/dist/{dokploy-Df4oDdAu.cjs → dokploy-CCDXCzTa.cjs} +2 -2
  74. package/dist/{dokploy-Df4oDdAu.cjs.map → dokploy-CCDXCzTa.cjs.map} +1 -1
  75. package/dist/{dokploy-Dohi7fuh.mjs → dokploy-DeXtesSz.mjs} +2 -2
  76. package/dist/{dokploy-Dohi7fuh.mjs.map → dokploy-DeXtesSz.mjs.map} +1 -1
  77. package/dist/{eas-B8t0Ipgt.cjs → eas-Ct9AE935.cjs} +2 -2
  78. package/dist/{eas-B8t0Ipgt.cjs.map → eas-Ct9AE935.cjs.map} +1 -1
  79. package/dist/{eas-FLjCtoiB.mjs → eas-DfJbfJOE.mjs} +2 -2
  80. package/dist/{eas-FLjCtoiB.mjs.map → eas-DfJbfJOE.mjs.map} +1 -1
  81. package/dist/{encryption-DlID0xqU.mjs → encryption-BgLW4Tb2.mjs} +2 -2
  82. package/dist/{encryption-DlID0xqU.mjs.map → encryption-BgLW4Tb2.mjs.map} +1 -1
  83. package/dist/{encryption-CEiJrhOd.cjs → encryption-DDkv3EFD.cjs} +2 -2
  84. package/dist/{encryption-CEiJrhOd.cjs.map → encryption-DDkv3EFD.cjs.map} +1 -1
  85. package/dist/{engine-Ci62MZrE.cjs → engine-CINx5LA_.cjs} +10 -9
  86. package/dist/engine-CINx5LA_.cjs.map +1 -0
  87. package/dist/{engine-zE2sQUNS.mjs → engine-CKkCaRAd.mjs} +10 -9
  88. package/dist/engine-CKkCaRAd.mjs.map +1 -0
  89. package/dist/{github-Di-u6VhX.mjs → github-BORbm5Kn.mjs} +19 -10
  90. package/dist/github-BORbm5Kn.mjs.map +1 -0
  91. package/dist/{github-DXBTTGl3.cjs → github-DsmDwi7a.cjs} +19 -10
  92. package/dist/github-DsmDwi7a.cjs.map +1 -0
  93. package/dist/{googlePlay-Crx8XG3Z.mjs → googlePlay-Dk53obw3.mjs} +4 -4
  94. package/dist/{googlePlay-Crx8XG3Z.mjs.map → googlePlay-Dk53obw3.mjs.map} +1 -1
  95. package/dist/{googlePlay-C3ubCMrO.cjs → googlePlay-bh7gEiz4.cjs} +4 -4
  96. package/dist/{googlePlay-C3ubCMrO.cjs.map → googlePlay-bh7gEiz4.cjs.map} +1 -1
  97. package/dist/index.cjs +184 -83
  98. package/dist/index.cjs.map +1 -1
  99. package/dist/index.mjs +185 -84
  100. package/dist/index.mjs.map +1 -1
  101. package/dist/{local-DyOeF-qR.cjs → local-BObpR_rL.cjs} +2 -2
  102. package/dist/{local-DyOeF-qR.cjs.map → local-BObpR_rL.cjs.map} +1 -1
  103. package/dist/{local-pYpQVNII.mjs → local-CpSldDSi.mjs} +2 -2
  104. package/dist/{local-pYpQVNII.mjs.map → local-CpSldDSi.mjs.map} +1 -1
  105. package/dist/{migrate-DXW9w2DK.cjs → migrate-B-O5VhwA.cjs} +4 -4
  106. package/dist/{migrate-DXW9w2DK.cjs.map → migrate-B-O5VhwA.cjs.map} +1 -1
  107. package/dist/{migrate-vXdW9TR3.cjs → migrate-BClTCUdZ.cjs} +2 -2
  108. package/dist/{migrate-vXdW9TR3.cjs.map → migrate-BClTCUdZ.cjs.map} +1 -1
  109. package/dist/{migrate-BHvFlwDQ.mjs → migrate-ChURsPXl.mjs} +2 -2
  110. package/dist/{migrate-BHvFlwDQ.mjs.map → migrate-ChURsPXl.mjs.map} +1 -1
  111. package/dist/{migrate-CnH3PLzA.mjs → migrate-FatDUatE.mjs} +4 -4
  112. package/dist/{migrate-CnH3PLzA.mjs.map → migrate-FatDUatE.mjs.map} +1 -1
  113. package/dist/{notes-DuPsUdr4.mjs → notes-BwBGVMYR.mjs} +2 -2
  114. package/dist/{notes-DuPsUdr4.mjs.map → notes-BwBGVMYR.mjs.map} +1 -1
  115. package/dist/{notes-BOQGsAVb.cjs → notes-jaDD8Vda.cjs} +2 -2
  116. package/dist/{notes-BOQGsAVb.cjs.map → notes-jaDD8Vda.cjs.map} +1 -1
  117. package/dist/{projectBucket-CP6rkXdo.cjs → projectBucket-CEDRY3N2.cjs} +2 -2
  118. package/dist/{projectBucket-CP6rkXdo.cjs.map → projectBucket-CEDRY3N2.cjs.map} +1 -1
  119. package/dist/{projectBucket-o-_7Hgxt.mjs → projectBucket-CgGk1Nd_.mjs} +2 -2
  120. package/dist/{projectBucket-o-_7Hgxt.mjs.map → projectBucket-CgGk1Nd_.mjs.map} +1 -1
  121. package/dist/{publish-C9_gTOGU.mjs → publish-CG9ooEnS.mjs} +2 -2
  122. package/dist/{publish-C9_gTOGU.mjs.map → publish-CG9ooEnS.mjs.map} +1 -1
  123. package/dist/{publish-DbJ7hMQ_.cjs → publish-oCdqimOZ.cjs} +2 -2
  124. package/dist/{publish-DbJ7hMQ_.cjs.map → publish-oCdqimOZ.cjs.map} +1 -1
  125. package/dist/{resolve-nTuLxira.mjs → resolve-DGSN4f-J.mjs} +4 -4
  126. package/dist/{resolve-nTuLxira.mjs.map → resolve-DGSN4f-J.mjs.map} +1 -1
  127. package/dist/{resolve-4ME0CRVM.cjs → resolve-XaHTbLJ0.cjs} +4 -4
  128. package/dist/{resolve-4ME0CRVM.cjs.map → resolve-XaHTbLJ0.cjs.map} +1 -1
  129. package/dist/{rollback-CAfhleLK.cjs → rollback-DQl_hh1s.cjs} +5 -5
  130. package/dist/{rollback-CAfhleLK.cjs.map → rollback-DQl_hh1s.cjs.map} +1 -1
  131. package/dist/{rollback-CXy-4gxa.mjs → rollback-xiYg-iz_.mjs} +5 -5
  132. package/dist/{rollback-CXy-4gxa.mjs.map → rollback-xiYg-iz_.mjs.map} +1 -1
  133. package/dist/{s3-C90gsHUn.cjs → s3-CB4ekfza.cjs} +2 -2
  134. package/dist/{s3-C90gsHUn.cjs.map → s3-CB4ekfza.cjs.map} +1 -1
  135. package/dist/{s3-DcIf5bPO.mjs → s3-CQqDhnF-.mjs} +2 -2
  136. package/dist/{s3-DcIf5bPO.mjs.map → s3-CQqDhnF-.mjs.map} +1 -1
  137. package/dist/{serverSetup-4oc_a1T5.cjs → serverSetup-B0ZqkKcY.cjs} +5 -5
  138. package/dist/{serverSetup-4oc_a1T5.cjs.map → serverSetup-B0ZqkKcY.cjs.map} +1 -1
  139. package/dist/{serverSetup-BmmkcyBv.mjs → serverSetup-DWUQ_sQR.mjs} +5 -5
  140. package/dist/{serverSetup-BmmkcyBv.mjs.map → serverSetup-DWUQ_sQR.mjs.map} +1 -1
  141. package/dist/{sniffer-FdJ9urOA.cjs → sniffer-BVmzTN9C.cjs} +6 -6
  142. package/dist/{sniffer-FdJ9urOA.cjs.map → sniffer-BVmzTN9C.cjs.map} +1 -1
  143. package/dist/{sniffer-Cawd1GeY.mjs → sniffer-CkSC8MZ9.mjs} +6 -6
  144. package/dist/{sniffer-Cawd1GeY.mjs.map → sniffer-CkSC8MZ9.mjs.map} +1 -1
  145. package/dist/{snsSubscriptions-Cm-pdWyW.mjs → snsSubscriptions-CdbBWvzg.mjs} +3 -3
  146. package/dist/{snsSubscriptions-Cm-pdWyW.mjs.map → snsSubscriptions-CdbBWvzg.mjs.map} +1 -1
  147. package/dist/{snsSubscriptions-DclU57O7.cjs → snsSubscriptions-DOUaur2w.cjs} +3 -3
  148. package/dist/{snsSubscriptions-DclU57O7.cjs.map → snsSubscriptions-DOUaur2w.cjs.map} +1 -1
  149. package/dist/{sst-D6Kt9gDS.cjs → sst-3iKqe9vk.cjs} +4 -4
  150. package/dist/{sst-D6Kt9gDS.cjs.map → sst-3iKqe9vk.cjs.map} +1 -1
  151. package/dist/{sst-BiOWTOUg.mjs → sst-r4pOOAkf.mjs} +4 -4
  152. package/dist/{sst-BiOWTOUg.mjs.map → sst-r4pOOAkf.mjs.map} +1 -1
  153. package/dist/{stack-BmjNDZiJ.cjs → stack-DUADq62v.cjs} +20 -190
  154. package/dist/stack-DUADq62v.cjs.map +1 -0
  155. package/dist/{stack-DZn7Yr8z.mjs → stack-LelP4jv7.mjs} +21 -161
  156. package/dist/stack-LelP4jv7.mjs.map +1 -0
  157. package/dist/{stage-tdH9m6Wf.cjs → stage-BwY2DLIb.cjs} +24 -5
  158. package/dist/{stage-tdH9m6Wf.cjs.map → stage-BwY2DLIb.cjs.map} +1 -1
  159. package/dist/{stage-CoUrlN-W.mjs → stage-DQuJRU3S.mjs} +7 -6
  160. package/dist/{stage-CoUrlN-W.mjs.map → stage-DQuJRU3S.mjs.map} +1 -1
  161. package/dist/target/public.cjs +1 -1
  162. package/dist/target/public.mjs +1 -1
  163. package/dist/{terminal-BI7b8BdH.mjs → terminal-BTX6f2XO.mjs} +2 -2
  164. package/dist/{terminal-BI7b8BdH.mjs.map → terminal-BTX6f2XO.mjs.map} +1 -1
  165. package/dist/{terminal-iL0e-c9K.cjs → terminal-EeBAmc7P.cjs} +2 -2
  166. package/dist/{terminal-iL0e-c9K.cjs.map → terminal-EeBAmc7P.cjs.map} +1 -1
  167. package/package.json +15 -15
  168. package/dist/apps-D83caHjP.cjs.map +0 -1
  169. package/dist/apps-DpyJvU00.mjs.map +0 -1
  170. package/dist/compose-B9uSqCxY.cjs.map +0 -1
  171. package/dist/compose-CbXGx1_z.mjs.map +0 -1
  172. package/dist/dns-BxgfpQWO.mjs.map +0 -1
  173. package/dist/dns-CiUCbOXH.cjs.map +0 -1
  174. package/dist/engine-Ci62MZrE.cjs.map +0 -1
  175. package/dist/engine-zE2sQUNS.mjs.map +0 -1
  176. package/dist/github-DXBTTGl3.cjs.map +0 -1
  177. package/dist/github-Di-u6VhX.mjs.map +0 -1
  178. package/dist/stack-BmjNDZiJ.cjs.map +0 -1
  179. package/dist/stack-DZn7Yr8z.mjs.map +0 -1
package/dist/index.mjs CHANGED
@@ -1,29 +1,29 @@
1
1
  #!/usr/bin/env -S npx tsx
2
2
  import { n as __require, t as __exportAll } from "./rolldown-runtime-BhDjJH2R.mjs";
3
3
  import { n as isGkmError, t as GkmError } from "./errors-D8Gwp5kU.mjs";
4
- import { B as FileSecretsStore, E as providerOf, F as toEmbeddableSecrets, I as withCustomSecret, N as maskPassword, T as eventsBackendFor, U as getKeyPath, X as deployIdentity, _t as storeGoDaddyToken, at as DEFAULT_TIMEOUT_MS, ct as getCredentialsPath, dt as getDokployToken, gt as storeDokployCredentials, ht as removeGoDaddyCredentials, k as secretsStoreFor, lt as getDokployCredentials, mt as removeDokployCredentials, pt as readCredentials, q as projectKey, rt as CommandFailed, ut as getDokployRegistryId, vt as storeHostingerToken, w as cacheBackendFor } from "./dns-BxgfpQWO.mjs";
5
- import { _ as projectNetwork, c as edgeRef, d as dockerHost, g as dockerCompose, h as ContainersNotStopped, i as ComposePushNeedsBuild, l as removeEdgeRoutes, m as ContainersNotStarted, p as sshTarget, r as ComposePinNeedsPull, t as composeTarget, u as composeServer } from "./compose-CbXGx1_z.mjs";
4
+ import { B as FileSecretsStore, E as providerOf, F as toEmbeddableSecrets, I as withCustomSecret, N as maskPassword, T as eventsBackendFor, U as getKeyPath, X as deployIdentity, _t as storeDokployCredentials, dt as getDokployRegistryId, ft as getDokployToken, gt as removeGoDaddyCredentials, ht as removeDokployCredentials, it as CommandFailed, k as secretsStoreFor, lt as getCredentialsPath, mt as readCredentials, ot as DEFAULT_TIMEOUT_MS, q as projectKey, ut as getDokployCredentials, vt as storeGoDaddyToken, w as cacheBackendFor, yt as storeHostingerToken } from "./dns-BM2DE6jt.mjs";
5
+ import { _ as ContainersNotStopped, c as parseDigests, d as removeEdgeRoutes, f as composeServer, g as ContainersNotStarted, h as sshTarget, i as ComposePushNeedsBuild, l as pinnedRef, p as dockerHost, r as ComposePinNeedsPull, t as composeTarget, u as edgeRef, v as dockerCompose, y as projectNetwork } from "./compose-X-ZypRKX.mjs";
6
6
  import { A as InvalidStages, F as stageProblems, P as deployedProblems, R as stageSampleRate, a as allConstructGlobs, ct as protectedSubdomains, d as getAppGkmConfig, j as TEST_STAGE, lt as wildcardSite, ot as appKey, u as getAppBuildOrder } from "./workspace-BBa1Ck5j.mjs";
7
- import { $ as imageBuildCredentials, Ct as postgresDatabaseNames, Ft as runTime, It as stageBackups, Nt as backupFile, Pt as backupsPrefix, S as ensureLocalAuthority, Tt as quoteIdentifier, _ as forgetState, ct as processorUnits, d as backendsOf$1, dt as BACKUPS_URL_KEY, et as isImageBuild, f as constructGlobs, ft as RUNNER_PATH, jt as backupDatabases, kt as stageEnv$1, lt as workerUnits, m as reconcileWorkspace, n as appProcess, o as processEnv, ot as isUnder, p as derivedContainers, u as FAKE_ENV, ut as BACKUPS_SERVICE, w as localAuthorityPaths, x as pgClient } from "./apps-DpyJvU00.mjs";
7
+ import { $ as imageBuildCredentials, At as stageEnv$1, Ct as postgresDatabaseNames, Ft as backupsPrefix, It as runTime, Lt as stageBackups, Mt as backupDatabases, Pt as backupFile, S as ensureLocalAuthority, Tt as quoteIdentifier, _ as forgetState, ct as processorUnits, d as backendsOf$1, dt as BACKUPS_URL_KEY, et as isImageBuild, f as constructGlobs, ft as RUNNER_PATH, lt as workerUnits, m as reconcileWorkspace, n as appProcess, o as processEnv, ot as isUnder, p as derivedContainers, u as FAKE_ENV, ut as BACKUPS_SERVICE, w as localAuthorityPaths, x as pgClient } from "./apps-G1Q2j-fs.mjs";
8
8
  import { o as email } from "./schemas-BCwKKA42.mjs";
9
- import { I as surfaceClientTraced, L as telemetryOf, N as scopeTelemetryEnv, O as TELEMETRY_CONTAINER, _ as readLocalCredentials, a as createEntryWrapper, c as loadEnvFiles, d as prepareEntryCredentials, dt as primaryPortKey, i as createCredentialsPreload, j as appTelemetry, l as loadPortState, lt as portsOf, o as findAvailablePort, ot as describeServices, pt as LOCAL_LOGS_EMAIL, s as isPortAvailable, st as fakeKey, t as CLUSTER_DATABASE, u as loadSecretsForApp } from "./compose-j0SE-0EG.mjs";
9
+ import { I as surfaceClientTraced, L as telemetryOf, N as scopeTelemetryEnv, O as TELEMETRY_CONTAINER, _ as readLocalCredentials, a as createEntryWrapper, c as loadEnvFiles, d as prepareEntryCredentials, dt as primaryPortKey, i as createCredentialsPreload, j as appTelemetry, l as loadPortState, lt as portsOf, o as findAvailablePort, ot as describeServices, pt as LOCAL_LOGS_EMAIL, s as isPortAvailable, st as fakeKey, t as CLUSTER_DATABASE, u as loadSecretsForApp } from "./compose-D_shZ1mI.mjs";
10
10
  import { n as assertTestCredentials, t as SubscriberGenerator } from "./SubscriberGenerator-NxcLNeDJ.mjs";
11
11
  import { c as publishesToApiGateway, i as eventsBackendsIn, m as isCacheBackend, n as driversFor, r as driversOf, s as opensKmsKeys, t as cacheBackendsIn } from "./drivers-BQRb3KsL.mjs";
12
12
  import { a as startTelemetryCode, c as parseTelemetryFlag, i as routeTelemetry, n as runtimeFor, o as telemetryFor, r as mountRequestSpansCode, s as writeTelemetryModule, t as EndpointGenerator } from "./EndpointGenerator-DMq6ameY.mjs";
13
13
  import { i as discover, u as withOwningTsconfigJsx, v as ConstructGenerator } from "./discover-B_PDDaVj.mjs";
14
14
  import { ConfigNotFound, NotABackendApp, NotInAnApp, loadAppConfig, loadConfig, loadWorkspaceConfig, loadWorkspaceSettings, parseModuleConfig } from "./config.mjs";
15
- import { d as assertDevServicesFlag } from "./notes-DuPsUdr4.mjs";
16
- import { A as pinnedRef, M as awsClientConfig, N as awsEndpoint, O as parseDigests, P as awsProvisioningCredentials, a as composeProject, c as derivedCredentials, f as stackPlan, y as EDGE_PROJECT } from "./stack-DZn7Yr8z.mjs";
17
- import { C as servedBy, S as reachedBy, _ as processorInfo, b as handlerDriversFor, d as workerEntryDir, f as QueueGenerator, g as processorEntryDir, h as processorBundleName, i as dockerCommand, l as WorkerGenerator, m as ProcessorGenerator, p as CronGenerator, u as workerBundleName, v as appOutputDir, w as surfaceAt, x as ownersContext, y as sharedDirectoryTree } from "./docker-Dcsqf_NA.mjs";
15
+ import { d as assertDevServicesFlag } from "./notes-BwBGVMYR.mjs";
16
+ import { D as awsClientConfig, O as awsEndpoint, a as composeProject, c as derivedCredentials, f as stackPlan, k as awsProvisioningCredentials, y as EDGE_PROJECT } from "./stack-LelP4jv7.mjs";
17
+ import { C as servedBy, S as reachedBy, _ as processorInfo, b as handlerDriversFor, d as workerEntryDir, f as QueueGenerator, g as processorEntryDir, h as processorBundleName, i as dockerCommand, l as WorkerGenerator, m as ProcessorGenerator, p as CronGenerator, u as workerBundleName, v as appOutputDir, w as surfaceAt, x as ownersContext, y as sharedDirectoryTree } from "./docker-DCtw3rjP.mjs";
18
18
  import { generateOpenApi, openapiCommand, resolveOpenApiConfig } from "./openapi.mjs";
19
19
  import { a as describeHolder, c as withAppPorts, i as assignAppPorts, o as describeMove, r as appTag, s as holderOf, t as APP_TAG_ENV } from "./appPorts-BoXMwolc.mjs";
20
20
  import { n as withHandlers, t as manifestModule } from "./emit-C4KSXOeS.mjs";
21
- import { t as LocalSandbox } from "./local-pYpQVNII.mjs";
22
- import { S as createStateStore, k as keyFingerprint, n as sniffAppEnvironment, o as DokployApi } from "./sniffer-Cawd1GeY.mjs";
23
- import { t as deploy$1 } from "./deploy-DDWnWXnA.mjs";
21
+ import { t as LocalSandbox } from "./local-CpSldDSi.mjs";
22
+ import { S as createStateStore, k as keyFingerprint, n as sniffAppEnvironment, o as DokployApi } from "./sniffer-CkSC8MZ9.mjs";
23
+ import { t as deploy$1 } from "./deploy-DFul9UAF.mjs";
24
24
  import { a as describeActor, d as dnsResources } from "./seeds-Ccn0Ru2T.mjs";
25
25
  import { o as loadCredentialSchemas, t as CredentialsInvalid } from "./credentialSchemas-BzJiK1nQ.mjs";
26
- import { t as LocalStateStore } from "./LocalStateStore-BMnidUp_.mjs";
26
+ import { t as LocalStateStore } from "./LocalStateStore-B3BGSP9X.mjs";
27
27
  import { a as getExecCommand, c as validateProjectName, i as findWorkspaceRoot, n as detectPackageManager$1, o as getInstallCommand, r as findWorkspacePackages, s as getRunCommand, t as checkDirectoryExists } from "./utils-D_fxUqvU.mjs";
28
28
  import { a as writeTestHarness, i as TEST_MANIFEST_ENV, n as TEST_READY_FILE, t as TEST_READY_ENV } from "./ready-D1gctv-5.mjs";
29
29
  import { createRequire } from "node:module";
@@ -31,9 +31,10 @@ import { basename, dirname, isAbsolute, join, relative, resolve } from "node:pat
31
31
  import { Command, Option } from "commander";
32
32
  import { stdin, stdout } from "node:process";
33
33
  import * as readline from "node:readline/promises";
34
- import { existsSync, linkSync, mkdirSync, readFileSync, readdirSync, renameSync, unlinkSync, writeFileSync } from "node:fs";
35
- import { chmod, mkdir, readFile, rm, writeFile } from "node:fs/promises";
36
- import { homedir } from "node:os";
34
+ import { createReadStream, createWriteStream, existsSync, linkSync, mkdirSync, readFileSync, readdirSync, renameSync, unlinkSync, writeFileSync } from "node:fs";
35
+ import { chmod, mkdir, mkdtemp, readFile, rm, writeFile } from "node:fs/promises";
36
+ import { homedir, tmpdir } from "node:os";
37
+ import { pipeline } from "node:stream/promises";
37
38
  import { execFile, execSync, spawn } from "node:child_process";
38
39
  import { connect } from "node:net";
39
40
  import { createHash, randomBytes, timingSafeEqual } from "node:crypto";
@@ -53,7 +54,7 @@ import { Readable as Readable$1 } from "stream";
53
54
  import crypto from "crypto";
54
55
  import { Topic } from "@geekmidas/constructs/topic";
55
56
  //#region package.json
56
- var version = "10.0.0-alpha.175";
57
+ var version = "10.0.0-alpha.177";
57
58
  //#endregion
58
59
  //#region src/prompt.ts
59
60
  /**
@@ -136,7 +137,7 @@ const logger$8 = console;
136
137
  * Validate Dokploy token by making a test API call
137
138
  */
138
139
  async function validateDokployToken(endpoint, token) {
139
- const { DokployApi } = await import("./sniffer-Cawd1GeY.mjs").then((n) => n.c);
140
+ const { DokployApi } = await import("./sniffer-CkSC8MZ9.mjs").then((n) => n.c);
140
141
  return new DokployApi({
141
142
  baseUrl: endpoint,
142
143
  token
@@ -282,6 +283,23 @@ function maskToken(token) {
282
283
  }
283
284
  //#endregion
284
285
  //#region src/backups/commands.ts
286
+ /**
287
+ * `gkm backup:list`, `gkm backup:now` and `gkm backup:restore` — run from a
288
+ * laptop or CI with the stage account's own credentials.
289
+ *
290
+ * - **list** reads the stage's backups prefix with the caller's credentials.
291
+ * The stage's backups key cannot: it may only put.
292
+ * - **now** asks the stack's backups container to run, through `docker exec`
293
+ * on whatever Docker the stage runs on.
294
+ * - **restore** asks first (`--yes` skips it), takes a fresh backup, then
295
+ * streams each database's file from S3 — with the caller's credentials —
296
+ * into a one-off container of the backups image on the stack's network,
297
+ * which recreates the database from it as the stack's superuser.
298
+ * - **restore --from** loads a prepared, data-only file kept under the
299
+ * stage's `imports/` instead: the stack's apps are stopped, the database's
300
+ * other sessions ended, and the file run inside it in one transaction —
301
+ * then the apps are started again, whatever happened.
302
+ */
285
303
  /** A stage that has no backups to list or restore. */
286
304
  var BackupsNotOn = class extends GkmError {
287
305
  stage;
@@ -498,6 +516,22 @@ var RestoreFailed = class extends GkmError {
498
516
  this.name = "RestoreFailed";
499
517
  }
500
518
  };
519
+ /**
520
+ * A file's download from S3 ended before the whole object arrived. Nothing
521
+ * was run against the database.
522
+ */
523
+ var BackupDownloadIncomplete = class extends GkmError {
524
+ url;
525
+ received;
526
+ expected;
527
+ constructor(url, received, expected) {
528
+ super(`Downloading ${url} stopped after ${received} of ${expected} bytes, so nothing was loaded. Run the restore again; if it keeps stopping, check the network between here and the bucket.`);
529
+ this.url = url;
530
+ this.received = received;
531
+ this.expected = expected;
532
+ this.name = "BackupDownloadIncomplete";
533
+ }
534
+ };
501
535
  /** Every run under the prefix, newest first. Keys that are not a run's are skipped. */
502
536
  async function listBackups(s3, bucket, prefix) {
503
537
  const { ListObjectsV2Command } = await import("@aws-sdk/client-s3");
@@ -647,11 +681,17 @@ async function restoreBackup(options) {
647
681
  for (const target of targets) {
648
682
  const Key = `${options.prefix}/${run.folder}/${backupFile(target)}`;
649
683
  options.log(`♻️ Restoring ${target.name} from s3://${options.bucket}/${Key}…`);
650
- const code = await streamInto(options, engine, image, {
651
- Key,
652
- script: RESTORE_SCRIPT,
653
- database: target.name
654
- });
684
+ const file = await download(options, Key);
685
+ let code;
686
+ try {
687
+ code = await loadInto(options, engine, image, {
688
+ path: file.path,
689
+ script: RESTORE_SCRIPT,
690
+ database: target.name
691
+ });
692
+ } finally {
693
+ await file.remove();
694
+ }
655
695
  if (code !== 0) throw new RestoreFailed(target.name, code);
656
696
  restored.push(target.file);
657
697
  }
@@ -684,6 +724,16 @@ async function importBackup(options) {
684
724
  throw new ImportNotFound(options.from, `s3://${options.bucket}/${options.prefix}/`);
685
725
  }
686
726
  const { engine, image } = await beforeRestore(options, `Load ${options.from} into ${target.name} on '${options.stage}'? Its apps are stopped while it loads, and what the file replaces is lost (a backup is taken first).`);
727
+ options.log(`📥 Downloading s3://${options.bucket}/${Key}…`);
728
+ const file = await download(options, Key);
729
+ try {
730
+ return await loadImport(options, engine, image, target, file.path);
731
+ } finally {
732
+ await file.remove();
733
+ }
734
+ }
735
+ /** Stop the stack's apps, load the downloaded import, start them again. */
736
+ async function loadImport(options, engine, image, target, path) {
687
737
  const keep = [
688
738
  "postgres",
689
739
  BACKUPS_SERVICE,
@@ -699,9 +749,9 @@ async function importBackup(options) {
699
749
  }
700
750
  let code;
701
751
  try {
702
- options.log(`📥 Loading ${target.name} from s3://${options.bucket}/${Key}…`);
703
- code = await streamInto(options, engine, image, {
704
- Key,
752
+ options.log(`📥 Loading ${target.name} from ${options.from}…`);
753
+ code = await loadInto(options, engine, image, {
754
+ path,
705
755
  script: IMPORT_SCRIPT,
706
756
  database: target.name
707
757
  });
@@ -744,16 +794,53 @@ async function beforeRestore(options, question) {
744
794
  };
745
795
  }
746
796
  /**
747
- * Stream a file from S3, with the caller's credentials, into `script` in a
748
- * one-off container of the backups image on the stack's network, signed in
749
- * as the stack's superuser. Resolves with its exit code.
797
+ * Download a file from S3, with the caller's credentials, to a private
798
+ * temporary folder, and check every byte arrived. A restore never streams
799
+ * straight from S3 into the container: over a remote engine the container's
800
+ * stdin applies backpressure for as long as psql takes, and an S3 response
801
+ * held open that long can be cut off — leaving gunzip a truncated file.
802
+ *
803
+ * @throws {BackupDownloadIncomplete}
750
804
  */
751
- async function streamInto(options, engine, image, file) {
805
+ async function download(options, Key) {
752
806
  const { GetObjectCommand } = await import("@aws-sdk/client-s3");
753
- const object = await options.s3.send(new GetObjectCommand({
754
- Bucket: options.bucket,
755
- Key: file.Key
756
- }));
807
+ const dir = await mkdtemp(join(tmpdir(), "gkm-restore-"));
808
+ const remove = () => rm(dir, {
809
+ recursive: true,
810
+ force: true
811
+ });
812
+ const path = join(dir, "file");
813
+ const url = `s3://${options.bucket}/${Key}`;
814
+ try {
815
+ const object = await options.s3.send(new GetObjectCommand({
816
+ Bucket: options.bucket,
817
+ Key
818
+ }));
819
+ let received = 0;
820
+ const body = object.Body;
821
+ body.on("data", (chunk) => {
822
+ received += chunk.length;
823
+ });
824
+ await pipeline(body, createWriteStream(path, { mode: 384 })).catch((error) => {
825
+ if (object.ContentLength === void 0) throw error;
826
+ throw new BackupDownloadIncomplete(url, received, object.ContentLength);
827
+ });
828
+ if (object.ContentLength !== void 0 && received !== object.ContentLength) throw new BackupDownloadIncomplete(url, received, object.ContentLength);
829
+ return {
830
+ path,
831
+ remove
832
+ };
833
+ } catch (error) {
834
+ await remove();
835
+ throw error;
836
+ }
837
+ }
838
+ /**
839
+ * Stream a downloaded file into `script` in a one-off container of the
840
+ * backups image on the stack's network, signed in as the stack's superuser.
841
+ * Resolves with its exit code.
842
+ */
843
+ async function loadInto(options, engine, image, file) {
757
844
  return options.docker.runOnce(engine, {
758
845
  image,
759
846
  network: projectNetwork(options.project),
@@ -770,7 +857,7 @@ async function streamInto(options, engine, image, file) {
770
857
  PGDATABASE: "postgres",
771
858
  RESTORE_DATABASE: file.database
772
859
  },
773
- stdin: object.Body,
860
+ stdin: createReadStream(file.path),
774
861
  ...options.output ? { output: options.output } : {}
775
862
  });
776
863
  }
@@ -2435,7 +2522,7 @@ async function execCommand(commandArgs, options = {}, stageDeps) {
2435
2522
  const cwd = options.cwd ?? process.cwd();
2436
2523
  if (!commandArgs[0]) throw new NoCommandSpecified();
2437
2524
  if (options.stage && !isImageBuild()) {
2438
- const { execOnStage } = await import("./stage-CoUrlN-W.mjs").then((n) => n.n);
2525
+ const { execOnStage } = await import("./stage-DQuJRU3S.mjs").then((n) => n.a);
2439
2526
  const { loadWorkspaceConfig } = await import("./config.mjs");
2440
2527
  const { workspace } = await loadWorkspaceConfig(cwd);
2441
2528
  if (options.stage !== workspace.stages.local) {
@@ -3011,9 +3098,9 @@ async function workspaceDevCommand(configured, options) {
3011
3098
  for (const { id, port } of fakes) logger$5.log(`🎭 ${id} fake: http://localhost:${port}`);
3012
3099
  logger$5.log(options.migrate || options.seed ? "🗄️ Migrating the databases" : "🗄️ Checking for pending migrations");
3013
3100
  if (options.migrate || options.seed) {
3014
- const { prepareDevDatabases } = await import("./migrate-CnH3PLzA.mjs");
3101
+ const { prepareDevDatabases } = await import("./migrate-FatDUatE.mjs");
3015
3102
  await prepareDevDatabases(workspace, secretsEnv, { seed: !!options.seed });
3016
- } else await import("./migrate-CnH3PLzA.mjs").then(({ reportPendingMigrations }) => reportPendingMigrations(workspace, reconciled.env)).catch((error) => {
3103
+ } else await import("./migrate-FatDUatE.mjs").then(({ reportPendingMigrations }) => reportPendingMigrations(workspace, reconciled.env)).catch((error) => {
3017
3104
  logger$5.log(`⚠️ Could not check for pending migrations: ${error instanceof Error ? error.message : String(error)}`);
3018
3105
  });
3019
3106
  const appUrls = {};
@@ -4161,7 +4248,7 @@ async function buildApp(input) {
4161
4248
  ...telemetry ? { telemetry } : {},
4162
4249
  trustedOriginsKey: providedKeyFor(selfServing.id, "rest-api", "trustedOrigins")
4163
4250
  });
4164
- const { bundleServer } = await import("./bundler-CgCVGuji.mjs");
4251
+ const { bundleServer } = await import("./bundler-8pVRVXVZ.mjs");
4165
4252
  await bundleServer({
4166
4253
  entryPoint,
4167
4254
  outputDir: join(outputDir, "dist"),
@@ -4442,7 +4529,7 @@ async function buildWorkers(input) {
4442
4529
  });
4443
4530
  logger$4.log(`Generated worker ${worker.id}: ${crons.length} crons, ${queues.length} queues, ${subscribers.length} subscribers`);
4444
4531
  if (!input.bundle) continue;
4445
- const { bundleServer } = await import("./bundler-CgCVGuji.mjs");
4532
+ const { bundleServer } = await import("./bundler-8pVRVXVZ.mjs");
4446
4533
  const outfile = workerBundleName(worker.id);
4447
4534
  await bundleServer({
4448
4535
  entryPoint,
@@ -4484,7 +4571,7 @@ async function buildProcessors(input) {
4484
4571
  for (const { key, construct } of processors) infos.push(await processorInfo(key, construct, handler, context));
4485
4572
  logger$4.log(`Generated processors for ${fileServerId}: ${processors.map(({ key }) => key).join(", ")}`);
4486
4573
  if (!input.bundle) continue;
4487
- const { bundleServer } = await import("./bundler-CgCVGuji.mjs");
4574
+ const { bundleServer } = await import("./bundler-8pVRVXVZ.mjs");
4488
4575
  const outfile = processorBundleName(fileServerId);
4489
4576
  await bundleServer({
4490
4577
  entryPoint,
@@ -4570,7 +4657,7 @@ async function buildForTarget(target, context, appRoot, outputDir, workspaceRoot
4570
4657
  let masterKey;
4571
4658
  if (context.production?.bundle && !skipBundle) {
4572
4659
  logger$4.log(`\n📦 Bundling production server...`);
4573
- const { bundleServer } = await import("./bundler-CgCVGuji.mjs");
4660
+ const { bundleServer } = await import("./bundler-8pVRVXVZ.mjs");
4574
4661
  const allConstructs = [
4575
4662
  ...endpoints.map((e) => e.construct),
4576
4663
  ...functions.map((f) => f.construct),
@@ -4849,7 +4936,7 @@ async function composeCommand(options, deps = {}) {
4849
4936
  ["tag", "--tag"]
4850
4937
  ].find(([key]) => options[key] !== void 0 && options[key] !== false)?.[1];
4851
4938
  if (flag) throw new ComposeDestroyConflict(flag);
4852
- const { composeDestroyCommand } = await import("./destroy-DvJEbs9P.mjs");
4939
+ const { composeDestroyCommand } = await import("./destroy-C9c6S9oI.mjs");
4853
4940
  await composeDestroyCommand({
4854
4941
  stage: options.stage,
4855
4942
  ...options.cwd ? { cwd: options.cwd } : {},
@@ -4867,7 +4954,7 @@ async function composeCommand(options, deps = {}) {
4867
4954
  const { workspace } = loaded;
4868
4955
  const { stage } = options;
4869
4956
  if (options.down) {
4870
- const { composeStackRef } = await import("./destroy-DvJEbs9P.mjs");
4957
+ const { composeStackRef } = await import("./destroy-C9c6S9oI.mjs");
4871
4958
  const { ref, dir, server } = await composeStackRef(workspace, stage);
4872
4959
  const docker = deps.docker ?? dockerCompose;
4873
4960
  if (server) console.log(`→ ${sshTarget(server)} (docker over ssh)`);
@@ -6448,25 +6535,25 @@ function loadPackageJson() {
6448
6535
  * Run: pnpm --filter @geekmidas/cli sync-versions
6449
6536
  */
6450
6537
  const GEEKMIDAS_VERSIONS = {
6451
- "@geekmidas/audit": ">=10.0.0-alpha.175 <10.0.0",
6452
- "@geekmidas/auth": ">=10.0.0-alpha.175 <10.0.0",
6453
- "@geekmidas/cache": ">=10.0.0-alpha.175 <10.0.0",
6454
- "@geekmidas/client": ">=10.0.0-alpha.175 <10.0.0",
6455
- "@geekmidas/cloud": ">=10.0.0-alpha.175 <10.0.0",
6456
- "@geekmidas/constructs": ">=10.0.0-alpha.175 <10.0.0",
6457
- "@geekmidas/db": ">=10.0.0-alpha.175 <10.0.0",
6458
- "@geekmidas/emailkit": ">=10.0.0-alpha.175 <10.0.0",
6459
- "@geekmidas/envkit": ">=10.0.0-alpha.175 <10.0.0",
6460
- "@geekmidas/errors": ">=10.0.0-alpha.175 <10.0.0",
6461
- "@geekmidas/events": ">=10.0.0-alpha.175 <10.0.0",
6462
- "@geekmidas/logger": ">=10.0.0-alpha.175 <10.0.0",
6463
- "@geekmidas/manifest": ">=10.0.0-alpha.175 <10.0.0",
6464
- "@geekmidas/rate-limit": ">=10.0.0-alpha.175 <10.0.0",
6465
- "@geekmidas/schema": ">=10.0.0-alpha.175 <10.0.0",
6466
- "@geekmidas/services": ">=10.0.0-alpha.175 <10.0.0",
6467
- "@geekmidas/storage": ">=10.0.0-alpha.175 <10.0.0",
6468
- "@geekmidas/telescope": ">=10.0.0-alpha.175 <10.0.0",
6469
- "@geekmidas/testkit": ">=10.0.0-alpha.175 <10.0.0",
6538
+ "@geekmidas/audit": ">=10.0.0-alpha.177 <10.0.0",
6539
+ "@geekmidas/auth": ">=10.0.0-alpha.177 <10.0.0",
6540
+ "@geekmidas/cache": ">=10.0.0-alpha.177 <10.0.0",
6541
+ "@geekmidas/client": ">=10.0.0-alpha.177 <10.0.0",
6542
+ "@geekmidas/cloud": ">=10.0.0-alpha.177 <10.0.0",
6543
+ "@geekmidas/constructs": ">=10.0.0-alpha.177 <10.0.0",
6544
+ "@geekmidas/db": ">=10.0.0-alpha.177 <10.0.0",
6545
+ "@geekmidas/emailkit": ">=10.0.0-alpha.177 <10.0.0",
6546
+ "@geekmidas/envkit": ">=10.0.0-alpha.177 <10.0.0",
6547
+ "@geekmidas/errors": ">=10.0.0-alpha.177 <10.0.0",
6548
+ "@geekmidas/events": ">=10.0.0-alpha.177 <10.0.0",
6549
+ "@geekmidas/logger": ">=10.0.0-alpha.177 <10.0.0",
6550
+ "@geekmidas/manifest": ">=10.0.0-alpha.177 <10.0.0",
6551
+ "@geekmidas/rate-limit": ">=10.0.0-alpha.177 <10.0.0",
6552
+ "@geekmidas/schema": ">=10.0.0-alpha.177 <10.0.0",
6553
+ "@geekmidas/services": ">=10.0.0-alpha.177 <10.0.0",
6554
+ "@geekmidas/storage": ">=10.0.0-alpha.177 <10.0.0",
6555
+ "@geekmidas/telescope": ">=10.0.0-alpha.177 <10.0.0",
6556
+ "@geekmidas/testkit": ">=10.0.0-alpha.177 <10.0.0",
6470
6557
  "@geekmidas/cli": versionRange(loadPackageJson().version)
6471
6558
  };
6472
6559
  //#endregion
@@ -7659,7 +7746,7 @@ const COMMIT = /^[0-9a-f]{40}$/;
7659
7746
  * The `uses:` value for the stages action, with a comment saying which CLI
7660
7747
  * release the pinned commit is.
7661
7748
  */
7662
- function stagesActionUses(commit = "9c6a3f1f5818c6a97f0b1330ee91571171d9ab74", version = cliVersion()) {
7749
+ function stagesActionUses(commit = "0f594128dcb77420bdc8fabc3f4113ee9abd9559", version = cliVersion()) {
7663
7750
  return commit && COMMIT.test(commit) ? `${STAGES_ACTION}@${commit} # @geekmidas/cli ${version}` : `${STAGES_ACTION}@main # pin to a commit SHA: see the action's README`;
7664
7751
  }
7665
7752
  //#endregion
@@ -7957,7 +8044,8 @@ function registryLogin() {
7957
8044
  * drives over SSH.
7958
8045
  *
7959
8046
  * - `build` (on a push): every deployed stage's images, tagged with the
7960
- * commit, and their digests kept as the artifact `digests-<stage>`.
8047
+ * commit and the stage (`<sha>-<stage>`, so two stages' builds never share
8048
+ * a tag), and their digests kept as the artifact `digests-<stage>`.
7961
8049
  * - `deploy`: the commit the event names — a release's tag, a manual run's
7962
8050
  * `ref` — then that commit's push build, whose digests pin each image. One
7963
8051
  * `gkm compose` on the runner, with the stage's role and DNS token, creates
@@ -8020,8 +8108,8 @@ ${registryLogin()}
8020
8108
  role-to-assume: \${{ vars.AWS_ROLE_ARN }}
8021
8109
  aws-region: \${{ needs.stages.outputs.aws-region }}
8022
8110
 
8023
- # Builds and pushes every image the stage runs, tagged with the commit,
8024
- # and starts nothing.
8111
+ # Builds and pushes every image the stage runs, tagged with the commit
8112
+ # and the stage (<sha>-<stage>), and starts nothing.
8025
8113
  - name: Build and push
8026
8114
  run: ${pm.exec} gkm compose --stage "$STAGE" --build --push --tag "$SHA" --digests-file digests.json
8027
8115
  env:
@@ -16631,7 +16719,7 @@ function testDatabases(reconciled) {
16631
16719
  * starts without the reference data the app needs.
16632
16720
  */
16633
16721
  async function migrateTestStage(workspace, env) {
16634
- const { migrateAndSeed } = await import("./migrate-CnH3PLzA.mjs");
16722
+ const { migrateAndSeed } = await import("./migrate-FatDUatE.mjs");
16635
16723
  const { discover } = await import("./discover-B_PDDaVj.mjs").then((n) => n.a);
16636
16724
  const sources = {};
16637
16725
  const manifest = await discover({
@@ -17081,11 +17169,24 @@ program.command("exec").description("Run a command with secrets injected into Cr
17081
17169
  exitWithError(error);
17082
17170
  }
17083
17171
  });
17172
+ program.command("db:tunnel").description("Open an SSH tunnel to a deployed compose stage's Postgres and print each database's owner login, until Ctrl-C").argument("[construct]", "Only this database construct, by name").requiredOption("--stage <stage>", "A deployed compose stage").option("--profile <profile>", "AWS profile for the stage's account").option("-y, --yes", "Open it on a protected stage without asking").option("--ssh-user <user>", "SSH login for the stage's server (default: deploy.compose.server.<stage>.user)").action(async (construct, options) => {
17173
+ try {
17174
+ const globalOptions = program.opts();
17175
+ if (globalOptions.cwd) process.chdir(globalOptions.cwd);
17176
+ const { dbTunnel } = await import("./dbTunnel-B3TEZuFY.mjs");
17177
+ await dbTunnel({
17178
+ ...options,
17179
+ ...construct ? { construct } : {}
17180
+ });
17181
+ } catch (error) {
17182
+ exitWithError(error);
17183
+ }
17184
+ });
17084
17185
  program.command("eas:sync").description("Set up a mobile app's EAS project for a deployed stage: its eas.json profiles, and its public values in the stage's EAS environment").requiredOption("--stage <stage>", "A deployed compose stage").option("--app <app>", "The mobile app (default: the one here, or the only one)").option("--profile <profile>", "AWS profile for the stage's account").option("--dry-run", "Say what would be written, and write nothing").action(async (options) => {
17085
17186
  try {
17086
17187
  const globalOptions = program.opts();
17087
17188
  if (globalOptions.cwd) process.chdir(globalOptions.cwd);
17088
- const { easSync } = await import("./eas-FLjCtoiB.mjs");
17189
+ const { easSync } = await import("./eas-DfJbfJOE.mjs");
17089
17190
  await easSync(options);
17090
17191
  } catch (error) {
17091
17192
  exitWithError(error);
@@ -17095,7 +17196,7 @@ program.command("publish").description("Ship a mobile app for a deployed stage:
17095
17196
  try {
17096
17197
  const globalOptions = program.opts();
17097
17198
  if (globalOptions.cwd) process.chdir(globalOptions.cwd);
17098
- const { publish, PublishModeConflict } = await import("./publish-C9_gTOGU.mjs");
17199
+ const { publish, PublishModeConflict } = await import("./publish-CG9ooEnS.mjs");
17099
17200
  if (options.build && options.update) throw new PublishModeConflict();
17100
17201
  const { build, update, ...rest } = options;
17101
17202
  await publish({
@@ -17111,7 +17212,7 @@ program.command("deploy:google-play").description("Let EAS Submit publish a mobi
17111
17212
  try {
17112
17213
  const globalOptions = program.opts();
17113
17214
  if (globalOptions.cwd) process.chdir(globalOptions.cwd);
17114
- const { deployGooglePlay } = await import("./googlePlay-Crx8XG3Z.mjs");
17215
+ const { deployGooglePlay } = await import("./googlePlay-Dk53obw3.mjs");
17115
17216
  await deployGooglePlay(options);
17116
17217
  } catch (error) {
17117
17218
  exitWithError(error);
@@ -17133,7 +17234,7 @@ program.command("migrate").description("Apply each database construct's migratio
17133
17234
  try {
17134
17235
  const globalOptions = program.opts();
17135
17236
  if (globalOptions.cwd) process.chdir(globalOptions.cwd);
17136
- const { migrateCommand } = await import("./migrate-CnH3PLzA.mjs");
17237
+ const { migrateCommand } = await import("./migrate-FatDUatE.mjs");
17137
17238
  await migrateCommand({
17138
17239
  ...options,
17139
17240
  ...construct ? { construct } : {}
@@ -17146,7 +17247,7 @@ program.command("seed").description("Migrate, then run each database construct's
17146
17247
  try {
17147
17248
  const globalOptions = program.opts();
17148
17249
  if (globalOptions.cwd) process.chdir(globalOptions.cwd);
17149
- const { seedCommand } = await import("./migrate-CnH3PLzA.mjs");
17250
+ const { seedCommand } = await import("./migrate-FatDUatE.mjs");
17150
17251
  await seedCommand({
17151
17252
  ...options,
17152
17253
  ...construct ? { construct } : {}
@@ -17159,7 +17260,7 @@ program.command("migration").description("Write a construct's next migration: an
17159
17260
  try {
17160
17261
  const globalOptions = program.opts();
17161
17262
  if (globalOptions.cwd) process.chdir(globalOptions.cwd);
17162
- const { migrationCommand } = await import("./migrate-CnH3PLzA.mjs");
17263
+ const { migrationCommand } = await import("./migrate-FatDUatE.mjs");
17163
17264
  await migrationCommand({
17164
17265
  construct,
17165
17266
  ...name ? { name } : {}
@@ -17259,7 +17360,7 @@ program.command("secrets:add").description("Build the keys a stage must be given
17259
17360
  try {
17260
17361
  const globalOptions = program.opts();
17261
17362
  if (globalOptions.cwd) process.chdir(globalOptions.cwd);
17262
- const { secretsAddCommand } = await import("./add-BK_Mb6D_.mjs");
17363
+ const { secretsAddCommand } = await import("./add-DLOigaYm.mjs");
17263
17364
  await secretsAddCommand(options);
17264
17365
  } catch (error) {
17265
17366
  exitWithError(error);
@@ -17269,7 +17370,7 @@ program.command("encryption:rotate").description("Add a new current key to an En
17269
17370
  try {
17270
17371
  const globalOptions = program.opts();
17271
17372
  if (globalOptions.cwd) process.chdir(globalOptions.cwd);
17272
- const { encryptionRotateCommand } = await import("./encryption-DlID0xqU.mjs");
17373
+ const { encryptionRotateCommand } = await import("./encryption-BgLW4Tb2.mjs");
17273
17374
  await encryptionRotateCommand(construct, options);
17274
17375
  } catch (error) {
17275
17376
  exitWithError(error);
@@ -17279,7 +17380,7 @@ program.command("encryption:retire").description("Remove an old key from an Encr
17279
17380
  try {
17280
17381
  const globalOptions = program.opts();
17281
17382
  if (globalOptions.cwd) process.chdir(globalOptions.cwd);
17282
- const { encryptionRetireCommand } = await import("./encryption-DlID0xqU.mjs");
17383
+ const { encryptionRetireCommand } = await import("./encryption-BgLW4Tb2.mjs");
17283
17384
  await encryptionRetireCommand(construct, key, options);
17284
17385
  } catch (error) {
17285
17386
  exitWithError(error);
@@ -17318,7 +17419,7 @@ program.command("secrets:reconcile").description("Backfill missing custom secret
17318
17419
  if (globalOptions.cwd) process.chdir(globalOptions.cwd);
17319
17420
  const { loadWorkspaceConfig } = await import("./config.mjs");
17320
17421
  const { reconcileMissingSecrets } = await import("./reconcile--I7V4Klj.mjs");
17321
- const { secretsStoreFor } = await import("./dns-BxgfpQWO.mjs").then((n) => n.j);
17422
+ const { secretsStoreFor } = await import("./dns-BM2DE6jt.mjs").then((n) => n.j);
17322
17423
  const { workspace } = await loadWorkspaceConfig();
17323
17424
  const stage = options.stage ?? workspace.stages.local;
17324
17425
  const store = await secretsStoreFor(workspace, stage);
@@ -17327,7 +17428,7 @@ program.command("secrets:reconcile").description("Backfill missing custom secret
17327
17428
  console.error(`No secrets found for stage "${stage}". Run "gkm secrets:init --stage ${stage}" first.`);
17328
17429
  process.exit(1);
17329
17430
  }
17330
- const { derivedContainers } = await import("./apps-DpyJvU00.mjs").then((n) => n.h);
17431
+ const { derivedContainers } = await import("./apps-G1Q2j-fs.mjs").then((n) => n.h);
17331
17432
  const result = reconcileMissingSecrets(secrets, workspace, await derivedContainers(workspace, stage));
17332
17433
  if (!result) {
17333
17434
  console.log(`\n✓ Secrets for stage "${stage}" are up-to-date`);
@@ -17344,14 +17445,14 @@ program.command("secrets:migrate").description("Copy a deployed stage's secrets
17344
17445
  try {
17345
17446
  const globalOptions = program.opts();
17346
17447
  if (globalOptions.cwd) process.chdir(globalOptions.cwd);
17347
- const { secretsMigrateCommand } = await import("./migrate-BHvFlwDQ.mjs");
17448
+ const { secretsMigrateCommand } = await import("./migrate-ChURsPXl.mjs");
17348
17449
  await secretsMigrateCommand(options);
17349
17450
  } catch (error) {
17350
17451
  exitWithError(error);
17351
17452
  }
17352
17453
  });
17353
- program.command("deploy").description("Deploy a stage through its target").option("--target <name>", "Deploy target: dokploy, compose, sst, or one named in deploy.targets (default: deploy.default)").option("--provider <provider>", "[DEPRECATED] Use --target instead").requiredOption("--stage <stage>", "Deployment stage (e.g., production, staging)").option("--tag <tag>", "Image tag (default: stage-timestamp; compose: the commit). Compose pulls a given tag").option("--skip-push", "Skip pushing image to registry").option("--skip-build", "Skip build step (use existing build)").option("--json", "Write events as JSON lines instead of progress; never prompts").option("--dry-run", "Show what would be created or reused; change, build and push nothing").option("--atomic", "If the release fails, roll back every app it released, not only the failed ones").option("--allow-dev-services", "Server targets: run the dev service (MinIO, Mailpit) for every bucket and mail the stage doesn't account for. Not production-grade").option("--skip-dns", "Compose: neither write the public hosts' DNS records nor check they point at GKM_SERVER_IPV4 (a CDN or proxy in front, or records written elsewhere)").option("--rotate-keys", "Deployed stage: each provider issues its runtime keys a successor (the old one is deleted by the next deploy)").option("--retire-old-keys", "Deployed stage: delete a rotated-out key now instead of on the next deploy").action(async (options) => {
17354
- const { deployCli } = await import("./cli-B2XyVbUz.mjs");
17454
+ program.command("deploy").description("Deploy a stage through its target").option("--target <name>", "Deploy target: dokploy, compose, sst, or one named in deploy.targets (default: deploy.default)").option("--provider <provider>", "[DEPRECATED] Use --target instead").requiredOption("--stage <stage>", "Deployment stage (e.g., production, staging)").option("--tag <tag>", "Release tag (default: a timestamp; compose: the commit). Each image is tagged <tag>-<stage>. Compose pulls a given tag").option("--skip-push", "Skip pushing image to registry").option("--skip-build", "Skip build step (use existing build)").option("--json", "Write events as JSON lines instead of progress; never prompts").option("--dry-run", "Show what would be created or reused; change, build and push nothing").option("--atomic", "If the release fails, roll back every app it released, not only the failed ones").option("--allow-dev-services", "Server targets: run the dev service (MinIO, Mailpit) for every bucket and mail the stage doesn't account for. Not production-grade").option("--skip-dns", "Compose: neither write the public hosts' DNS records nor check they point at GKM_SERVER_IPV4 (a CDN or proxy in front, or records written elsewhere)").option("--rotate-keys", "Deployed stage: each provider issues its runtime keys a successor (the old one is deleted by the next deploy)").option("--retire-old-keys", "Deployed stage: delete a rotated-out key now instead of on the next deploy").action(async (options) => {
17455
+ const { deployCli } = await import("./cli-SNWyT6q5.mjs");
17355
17456
  const globalOptions = program.opts();
17356
17457
  const code = await deployCli({
17357
17458
  cwd: resolve(globalOptions.cwd ?? process.cwd()),
@@ -17371,8 +17472,8 @@ program.command("deploy").description("Deploy a stage through its target").optio
17371
17472
  });
17372
17473
  program.command("deploy:rollback").description("Put a stage's app back on its previous release (Dokploy): one app with --app, every app with --atomic").requiredOption("--stage <stage>", "A deployed stage").option("--app <app>", "The app to roll back").option("--atomic", "Roll back every app that has an earlier release").action(async (options) => {
17373
17474
  try {
17374
- const { rollbackStage } = await import("./rollback-CXy-4gxa.mjs").then((n) => n.a);
17375
- const { terminalCredentials } = await import("./terminal-BI7b8BdH.mjs");
17475
+ const { rollbackStage } = await import("./rollback-xiYg-iz_.mjs").then((n) => n.a);
17476
+ const { terminalCredentials } = await import("./terminal-BTX6f2XO.mjs");
17376
17477
  const globalOptions = program.opts();
17377
17478
  await rollbackStage({
17378
17479
  cwd: resolve(globalOptions.cwd ?? process.cwd()),
@@ -17390,7 +17491,7 @@ program.command("compose:server").description("Set up a stage's server for compo
17390
17491
  try {
17391
17492
  const globalOptions = program.opts();
17392
17493
  if (globalOptions.cwd) process.chdir(globalOptions.cwd);
17393
- const { composeServerCommand } = await import("./serverSetup-BmmkcyBv.mjs");
17494
+ const { composeServerCommand } = await import("./serverSetup-DWUQ_sQR.mjs");
17394
17495
  await composeServerCommand(options);
17395
17496
  } catch (error) {
17396
17497
  exitWithError(error);
@@ -17415,7 +17516,7 @@ program.command("deploy:github").description("Let GitHub Actions deploy a stage:
17415
17516
  try {
17416
17517
  const globalOptions = program.opts();
17417
17518
  if (globalOptions.cwd) process.chdir(globalOptions.cwd);
17418
- const { deployGithubCommand } = await import("./github-Di-u6VhX.mjs");
17519
+ const { deployGithubCommand } = await import("./github-BORbm5Kn.mjs");
17419
17520
  await deployGithubCommand(options);
17420
17521
  } catch (error) {
17421
17522
  exitWithError(error);