@geekmidas/cli 10.0.0-alpha.93 → 10.0.0-alpha.94

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 (196) hide show
  1. package/dist/{GoDaddyProvider-Mi3vptSR.mjs → GoDaddyProvider-BRZUWD8z.mjs} +3 -3
  2. package/dist/{GoDaddyProvider-Mi3vptSR.mjs.map → GoDaddyProvider-BRZUWD8z.mjs.map} +1 -1
  3. package/dist/{GoDaddyProvider-BZb-V14e.cjs → GoDaddyProvider-DzguxU_a.cjs} +3 -3
  4. package/dist/{GoDaddyProvider-BZb-V14e.cjs.map → GoDaddyProvider-DzguxU_a.cjs.map} +1 -1
  5. package/dist/{HostingerProvider-1mqD6aG8.mjs → HostingerProvider-Cjh_2Ml6.mjs} +9 -4
  6. package/dist/{HostingerProvider-1mqD6aG8.mjs.map → HostingerProvider-Cjh_2Ml6.mjs.map} +1 -1
  7. package/dist/{HostingerProvider-C6t-PSNe.cjs → HostingerProvider-OdQmKXE3.cjs} +9 -4
  8. package/dist/HostingerProvider-OdQmKXE3.cjs.map +1 -0
  9. package/dist/{LegacyStateStore-CtwO7fwy.mjs → LegacyStateStore-BQZb6-j2.mjs} +3 -2
  10. package/dist/{LegacyStateStore-CtwO7fwy.mjs.map → LegacyStateStore-BQZb6-j2.mjs.map} +1 -1
  11. package/dist/{LegacyStateStore-BlYXQQSE.cjs → LegacyStateStore-D50dgUPc.cjs} +10 -9
  12. package/dist/{LegacyStateStore-BlYXQQSE.cjs.map → LegacyStateStore-D50dgUPc.cjs.map} +1 -1
  13. package/dist/{LocalStateStore-D40_SDmJ.mjs → LocalStateStore-BSaS2535.mjs} +2 -2
  14. package/dist/{LocalStateStore-D40_SDmJ.mjs.map → LocalStateStore-BSaS2535.mjs.map} +1 -1
  15. package/dist/{LocalStateStore-oX_zxj9V.cjs → LocalStateStore-EFBUjuMX.cjs} +8 -8
  16. package/dist/{LocalStateStore-oX_zxj9V.cjs.map → LocalStateStore-EFBUjuMX.cjs.map} +1 -1
  17. package/dist/{S3StateStore-DeI7jtvi.cjs → S3StateStore-C5mv8To3.cjs} +5 -5
  18. package/dist/{S3StateStore-DeI7jtvi.cjs.map → S3StateStore-C5mv8To3.cjs.map} +1 -1
  19. package/dist/{S3StateStore-BzS0IeSt.mjs → S3StateStore-CrFq4UZU.mjs} +2 -2
  20. package/dist/{S3StateStore-BzS0IeSt.mjs.map → S3StateStore-CrFq4UZU.mjs.map} +1 -1
  21. package/dist/{SSMStateStore-k_Ew7TWx.mjs → SSMStateStore-D3Z6mZnA.mjs} +2 -2
  22. package/dist/{SSMStateStore-k_Ew7TWx.mjs.map → SSMStateStore-D3Z6mZnA.mjs.map} +1 -1
  23. package/dist/{SSMStateStore-CaCtrzFL.cjs → SSMStateStore-DuZCH7_v.cjs} +9 -9
  24. package/dist/{SSMStateStore-CaCtrzFL.cjs.map → SSMStateStore-DuZCH7_v.cjs.map} +1 -1
  25. package/dist/{add-CP1podDH.mjs → add-C85isXFl.mjs} +4 -4
  26. package/dist/add-C85isXFl.mjs.map +1 -0
  27. package/dist/{add-VcyJnsPX.cjs → add-DsVDdvon.cjs} +4 -4
  28. package/dist/add-DsVDdvon.cjs.map +1 -0
  29. package/dist/{bundler-Dfsr6KXU.cjs → bundler-BEgUKc4j.cjs} +5 -5
  30. package/dist/{bundler-Dfsr6KXU.cjs.map → bundler-BEgUKc4j.cjs.map} +1 -1
  31. package/dist/{bundler-BWrh-AJH.mjs → bundler-BSHog8CH.mjs} +5 -5
  32. package/dist/{bundler-BWrh-AJH.mjs.map → bundler-BSHog8CH.mjs.map} +1 -1
  33. package/dist/{cli-B8otnZfX.mjs → cli-BsFenyaf.mjs} +9 -5
  34. package/dist/cli-BsFenyaf.mjs.map +1 -0
  35. package/dist/{cli-DL19w4OE.cjs → cli-BvBdv660.cjs} +9 -5
  36. package/dist/cli-BvBdv660.cjs.map +1 -0
  37. package/dist/{compose-BHVKLluX.cjs → compose-Cd09gW-n.cjs} +58 -19
  38. package/dist/compose-Cd09gW-n.cjs.map +1 -0
  39. package/dist/{compose-DrEB_4F-.mjs → compose-D2RFYd_f.mjs} +56 -17
  40. package/dist/compose-D2RFYd_f.mjs.map +1 -0
  41. package/dist/{config-DCCcrOSo.d.cts → config-DvHNMoOp.d.cts} +4 -4
  42. package/dist/{config-CHX5GOo3.d.mts.map → config-DvHNMoOp.d.cts.map} +1 -1
  43. package/dist/{config-CHX5GOo3.d.mts → config-Ngesg4O8.d.mts} +4 -4
  44. package/dist/{config-DCCcrOSo.d.cts.map → config-Ngesg4O8.d.mts.map} +1 -1
  45. package/dist/config.cjs +1 -1
  46. package/dist/config.d.cts +3 -3
  47. package/dist/config.d.mts +3 -3
  48. package/dist/config.mjs +1 -1
  49. package/dist/{credentials-QBu7VgaQ.cjs → credentials-D7XJypNd.cjs} +9 -3
  50. package/dist/{credentials-QBu7VgaQ.cjs.map → credentials-D7XJypNd.cjs.map} +1 -1
  51. package/dist/{credentials-C4KII3PD.mjs → credentials-DpfnUvIR.mjs} +9 -3
  52. package/dist/{credentials-C4KII3PD.mjs.map → credentials-DpfnUvIR.mjs.map} +1 -1
  53. package/dist/deploy/public.cjs +13 -13
  54. package/dist/deploy/public.d.cts +24 -9
  55. package/dist/deploy/public.d.cts.map +1 -1
  56. package/dist/deploy/public.d.mts +24 -9
  57. package/dist/deploy/public.d.mts.map +1 -1
  58. package/dist/deploy/public.mjs +10 -10
  59. package/dist/{deploy-C3Mhnmus.cjs → deploy-C911Akkn.cjs} +125 -11
  60. package/dist/deploy-C911Akkn.cjs.map +1 -0
  61. package/dist/{deploy-DYIyIUYd.mjs → deploy-CeJ5D0xn.mjs} +123 -9
  62. package/dist/deploy-CeJ5D0xn.mjs.map +1 -0
  63. package/dist/{discover-vk2r5giK.d.cts → discover-CTzOSGUF.d.cts} +2 -2
  64. package/dist/{discover-DqwlBVyY.d.mts.map → discover-CTzOSGUF.d.cts.map} +1 -1
  65. package/dist/{discover-DqwlBVyY.d.mts → discover-CihAtaoj.d.mts} +2 -2
  66. package/dist/{discover-vk2r5giK.d.cts.map → discover-CihAtaoj.d.mts.map} +1 -1
  67. package/dist/{dokploy-rivb1RFt.cjs → dokploy-CV7GcobZ.cjs} +2 -2
  68. package/dist/{dokploy-rivb1RFt.cjs.map → dokploy-CV7GcobZ.cjs.map} +1 -1
  69. package/dist/{dokploy-o4I6vb9W.mjs → dokploy-D_aat2Xj.mjs} +2 -2
  70. package/dist/{dokploy-o4I6vb9W.mjs.map → dokploy-D_aat2Xj.mjs.map} +1 -1
  71. package/dist/{encryption-D7zmwzWz.cjs → encryption-DFcivJaO.cjs} +3 -3
  72. package/dist/{encryption-D7zmwzWz.cjs.map → encryption-DFcivJaO.cjs.map} +1 -1
  73. package/dist/{encryption-B6ilrT7p.mjs → encryption-_4qKqtTx.mjs} +3 -3
  74. package/dist/{encryption-B6ilrT7p.mjs.map → encryption-_4qKqtTx.mjs.map} +1 -1
  75. package/dist/{engine-Cfx8fEZU.cjs → engine-Bv-LZpmj.cjs} +10 -9
  76. package/dist/{engine-Cfx8fEZU.cjs.map → engine-Bv-LZpmj.cjs.map} +1 -1
  77. package/dist/{engine-DjEcovm-.mjs → engine-DPMHThkg.mjs} +7 -6
  78. package/dist/{engine-DjEcovm-.mjs.map → engine-DPMHThkg.mjs.map} +1 -1
  79. package/dist/{github-zneTMvnO.cjs → github-Br42NMrW.cjs} +94 -6
  80. package/dist/github-Br42NMrW.cjs.map +1 -0
  81. package/dist/{github-CzBbs43W.mjs → github-xsDT19im.mjs} +94 -6
  82. package/dist/github-xsDT19im.mjs.map +1 -0
  83. package/dist/{index-BiYU7cUl.d.mts → index-BlpcClwM.d.mts} +2 -2
  84. package/dist/{index-BiYU7cUl.d.mts.map → index-BlpcClwM.d.mts.map} +1 -1
  85. package/dist/{index-Dm6V9bwh.d.cts → index-CwLvFqtH.d.cts} +2 -2
  86. package/dist/{index-Dm6V9bwh.d.cts.map → index-CwLvFqtH.d.cts.map} +1 -1
  87. package/dist/index.cjs +147 -116
  88. package/dist/index.cjs.map +1 -1
  89. package/dist/index.mjs +143 -112
  90. package/dist/index.mjs.map +1 -1
  91. package/dist/{local-Otp74ak0.mjs → local-B7Zv1NoA.mjs} +2 -2
  92. package/dist/{local-Otp74ak0.mjs.map → local-B7Zv1NoA.mjs.map} +1 -1
  93. package/dist/{local-B61kUh0w.cjs → local-OPC9BCZt.cjs} +2 -2
  94. package/dist/{local-B61kUh0w.cjs.map → local-OPC9BCZt.cjs.map} +1 -1
  95. package/dist/{migrate-BaC4w0sb.mjs → migrate-B7evHv7O.mjs} +3 -3
  96. package/dist/{migrate-BaC4w0sb.mjs.map → migrate-B7evHv7O.mjs.map} +1 -1
  97. package/dist/{migrate-C8wTpakT.cjs → migrate-D5jUz20_.cjs} +3 -3
  98. package/dist/{migrate-C8wTpakT.cjs.map → migrate-D5jUz20_.cjs.map} +1 -1
  99. package/dist/{migrate-CsBZKALY.mjs → migrate-DhvFPGLi.mjs} +3 -3
  100. package/dist/{migrate-CsBZKALY.mjs.map → migrate-DhvFPGLi.mjs.map} +1 -1
  101. package/dist/{migrate-DFjbGnSr.cjs → migrate-SkWJotn5.cjs} +3 -3
  102. package/dist/{migrate-DFjbGnSr.cjs.map → migrate-SkWJotn5.cjs.map} +1 -1
  103. package/dist/openapi.cjs +1 -1
  104. package/dist/openapi.d.cts +1 -1
  105. package/dist/openapi.d.mts +1 -1
  106. package/dist/openapi.mjs +1 -1
  107. package/dist/providers-BFeP_mYw.cjs +1098 -0
  108. package/dist/providers-BFeP_mYw.cjs.map +1 -0
  109. package/dist/providers-sTj-BG0S.mjs +1079 -0
  110. package/dist/providers-sTj-BG0S.mjs.map +1 -0
  111. package/dist/reconcile/public.d.cts +2 -2
  112. package/dist/reconcile/public.d.mts +2 -2
  113. package/dist/{resolve-g8htuR80.cjs → resolve-CFEOtRsl.cjs} +4 -4
  114. package/dist/{resolve-g8htuR80.cjs.map → resolve-CFEOtRsl.cjs.map} +1 -1
  115. package/dist/{resolve-Ccjlpnd9.mjs → resolve-Dyd1S2wn.mjs} +4 -4
  116. package/dist/{resolve-Ccjlpnd9.mjs.map → resolve-Dyd1S2wn.mjs.map} +1 -1
  117. package/dist/{rollback--ympG9ss.cjs → rollback-D720SFhV.cjs} +11 -9
  118. package/dist/{rollback--ympG9ss.cjs.map → rollback-D720SFhV.cjs.map} +1 -1
  119. package/dist/{rollback-Drbg0OeR.mjs → rollback-NroNbGC0.mjs} +8 -6
  120. package/dist/{rollback-Drbg0OeR.mjs.map → rollback-NroNbGC0.mjs.map} +1 -1
  121. package/dist/{runtime-_wEVtshH.d.mts → runtime-BRCq6dQ7.d.mts} +2 -2
  122. package/dist/{runtime-D_J3ExJn.d.cts.map → runtime-BRCq6dQ7.d.mts.map} +1 -1
  123. package/dist/{runtime-D_J3ExJn.d.cts → runtime-VktAo_8B.d.cts} +2 -2
  124. package/dist/{runtime-_wEVtshH.d.mts.map → runtime-VktAo_8B.d.cts.map} +1 -1
  125. package/dist/{sandbox-CPJq1Kia.d.mts → sandbox-D1gd0iDz.d.cts} +2 -2
  126. package/dist/{sandbox-CPJq1Kia.d.mts.map → sandbox-D1gd0iDz.d.cts.map} +1 -1
  127. package/dist/{sandbox-JwuPAl7I.d.cts → sandbox-zHnRLCj0.d.mts} +2 -2
  128. package/dist/{sandbox-JwuPAl7I.d.cts.map → sandbox-zHnRLCj0.d.mts.map} +1 -1
  129. package/dist/{secrets-DbPmAS4k.mjs → secrets-CwLauUB_.mjs} +3 -3
  130. package/dist/secrets-CwLauUB_.mjs.map +1 -0
  131. package/dist/{secrets-DJteijZo.cjs → secrets-DAvi_O9g.cjs} +3 -3
  132. package/dist/secrets-DAvi_O9g.cjs.map +1 -0
  133. package/dist/{seeds-c-ByX9je.cjs → seeds-BCg8X36S.cjs} +1143 -2645
  134. package/dist/seeds-BCg8X36S.cjs.map +1 -0
  135. package/dist/{seeds-BSL55F6q.mjs → seeds-CTxTZa-R.mjs} +1289 -2760
  136. package/dist/seeds-CTxTZa-R.mjs.map +1 -0
  137. package/dist/{sniffer-Dq5BS98f.cjs → sniffer-C0z3NB2A.cjs} +572 -3
  138. package/dist/sniffer-C0z3NB2A.cjs.map +1 -0
  139. package/dist/{sniffer-BTtGAtm3.mjs → sniffer-DCcuzHz_.mjs} +496 -5
  140. package/dist/sniffer-DCcuzHz_.mjs.map +1 -0
  141. package/dist/{sst-CnKY-CSh.cjs → sst-DKNH243z.cjs} +3 -3
  142. package/dist/{sst-CnKY-CSh.cjs.map → sst-DKNH243z.cjs.map} +1 -1
  143. package/dist/{sst-BaRXp2Dd.mjs → sst-DRDSDwOk.mjs} +3 -3
  144. package/dist/{sst-BaRXp2Dd.mjs.map → sst-DRDSDwOk.mjs.map} +1 -1
  145. package/dist/{stack-1PeLJS2j.cjs → stack-B3fPDTBg.cjs} +3 -3
  146. package/dist/{stack-1PeLJS2j.cjs.map → stack-B3fPDTBg.cjs.map} +1 -1
  147. package/dist/{stack-Co4uZkAo.mjs → stack-NrdH5ngX.mjs} +3 -3
  148. package/dist/{stack-Co4uZkAo.mjs.map → stack-NrdH5ngX.mjs.map} +1 -1
  149. package/dist/{stages-BI8JvPzI.cjs → stages-CkqP1N4S.cjs} +16 -3
  150. package/dist/stages-CkqP1N4S.cjs.map +1 -0
  151. package/dist/{stages-DY-fQKmo.mjs → stages-veC4TcQe.mjs} +16 -3
  152. package/dist/stages-veC4TcQe.mjs.map +1 -0
  153. package/dist/target/public.cjs +1 -1
  154. package/dist/target/public.d.cts +2 -2
  155. package/dist/target/public.d.mts +2 -2
  156. package/dist/target/public.mjs +1 -1
  157. package/dist/{terminal-8XngdSTo.cjs → terminal-CkUYuAPd.cjs} +2 -2
  158. package/dist/{terminal-8XngdSTo.cjs.map → terminal-CkUYuAPd.cjs.map} +1 -1
  159. package/dist/{terminal-C4XRdwnU.mjs → terminal-DAHs2Zko.mjs} +2 -2
  160. package/dist/{terminal-C4XRdwnU.mjs.map → terminal-DAHs2Zko.mjs.map} +1 -1
  161. package/dist/{types-BibpiHKB.d.cts → types-DMoaFrjg.d.mts} +32 -9
  162. package/dist/types-DMoaFrjg.d.mts.map +1 -0
  163. package/dist/{types-B6lmD3en.d.mts → types-DXyaSmqu.d.cts} +33 -8
  164. package/dist/types-DXyaSmqu.d.cts.map +1 -0
  165. package/dist/workspace/index.cjs +1 -1
  166. package/dist/workspace/index.d.cts +2 -2
  167. package/dist/workspace/index.d.mts +2 -2
  168. package/dist/workspace/index.mjs +1 -1
  169. package/dist/{workspace-Bzw7Zs82.mjs → workspace-DWK1PTXP.mjs} +4 -4
  170. package/dist/workspace-DWK1PTXP.mjs.map +1 -0
  171. package/dist/{workspace-CHOB2Xg3.cjs → workspace-cSyi5nb1.cjs} +4 -4
  172. package/dist/workspace-cSyi5nb1.cjs.map +1 -0
  173. package/package.json +15 -15
  174. package/dist/HostingerProvider-C6t-PSNe.cjs.map +0 -1
  175. package/dist/add-CP1podDH.mjs.map +0 -1
  176. package/dist/add-VcyJnsPX.cjs.map +0 -1
  177. package/dist/cli-B8otnZfX.mjs.map +0 -1
  178. package/dist/cli-DL19w4OE.cjs.map +0 -1
  179. package/dist/compose-BHVKLluX.cjs.map +0 -1
  180. package/dist/compose-DrEB_4F-.mjs.map +0 -1
  181. package/dist/deploy-C3Mhnmus.cjs.map +0 -1
  182. package/dist/deploy-DYIyIUYd.mjs.map +0 -1
  183. package/dist/github-CzBbs43W.mjs.map +0 -1
  184. package/dist/github-zneTMvnO.cjs.map +0 -1
  185. package/dist/secrets-DJteijZo.cjs.map +0 -1
  186. package/dist/secrets-DbPmAS4k.mjs.map +0 -1
  187. package/dist/seeds-BSL55F6q.mjs.map +0 -1
  188. package/dist/seeds-c-ByX9je.cjs.map +0 -1
  189. package/dist/sniffer-BTtGAtm3.mjs.map +0 -1
  190. package/dist/sniffer-Dq5BS98f.cjs.map +0 -1
  191. package/dist/stages-BI8JvPzI.cjs.map +0 -1
  192. package/dist/stages-DY-fQKmo.mjs.map +0 -1
  193. package/dist/types-B6lmD3en.d.mts.map +0 -1
  194. package/dist/types-BibpiHKB.d.cts.map +0 -1
  195. package/dist/workspace-Bzw7Zs82.mjs.map +0 -1
  196. package/dist/workspace-CHOB2Xg3.cjs.map +0 -1
package/dist/index.mjs CHANGED
@@ -1,27 +1,26 @@
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 { _ as storeDokployCredentials, d as getDokployRegistryId, f as getDokployToken, g as removeGoDaddyCredentials, h as removeDokployCredentials, i as CommandFailed, l as getCredentialsPath, m as readCredentials, o as DEFAULT_TIMEOUT_MS, u as getDokployCredentials, v as storeGoDaddyToken, y as storeHostingerToken } from "./credentials-C4KII3PD.mjs";
4
+ import { _ as storeDokployCredentials, d as getDokployRegistryId, f as getDokployToken, g as removeGoDaddyCredentials, h as removeDokployCredentials, i as CommandFailed, l as getCredentialsPath, m as readCredentials, o as DEFAULT_TIMEOUT_MS, u as getDokployCredentials, v as storeGoDaddyToken, y as storeHostingerToken } from "./credentials-DpfnUvIR.mjs";
5
5
  import { l as withOwningTsconfigJsx, r as discover, u as ConstructGenerator } from "./discover-qjFapetL.mjs";
6
6
  import { t as appKey } from "./derive-B4vDpzgP.mjs";
7
- import { A as InvalidStages, F as stageProblems, P as deployedProblems, R as stageSampleRate, a as allConstructGlobs, d as getAppGkmConfig, j as TEST_STAGE, u as getAppBuildOrder } from "./workspace-Bzw7Zs82.mjs";
7
+ import { A as InvalidStages, F as stageProblems, P as deployedProblems, R as stageSampleRate, a as allConstructGlobs, d as getAppGkmConfig, j as TEST_STAGE, u as getAppBuildOrder } from "./workspace-DWK1PTXP.mjs";
8
8
  import { ConfigNotFound, NotABackendApp, NotInAnApp, loadAppConfig, loadConfig, loadWorkspaceConfig, loadWorkspaceSettings, parseModuleConfig } from "./config.mjs";
9
- import { $n as projectKey, An as telemetryOf, Bn as findAvailablePort, Ct as QueueGenerator, Dt as constructGlobs, En as appTelemetry, Et as backendsOf$1, Gn as prepareEntryCredentials, Hn as loadEnvFiles, Ht as LOCAL_CA_PATH, In as portsOf, Jt as postgresDatabaseNames, Ln as primaryPortKey, Nn as describeServices, On as scopeTelemetryEnv, Ot as derivedContainers, Pn as fakeKey, Pt as readLocalCredentials, Rn as createCredentialsPreload, Sn as TELEMETRY_CONTAINER, St as workerEntryDir, Tt as FAKE_ENV, Un as loadPortState, Ut as forgetState, Vn as isPortAvailable, Wn as loadSecretsForApp, Xn as FileSecretsStore, Xt as quoteIdentifier, Zn as getKeyPath, _n as providerOf, a as provisionStage, at as describeActor, bt as WorkerGenerator, dt as assertDevServicesFlag, en as pgClient, et as createStateStore, fr as toEmbeddableSecrets, gn as eventsBackendFor, hn as cacheBackendFor, kn as surfaceClientTraced, kt as reconcileWorkspace, l as provisionStageDns, mn as isImageBuild, mr as LOCAL_LOGS_EMAIL, nr as deployIdentity, p as provisionCommand, pn as imageBuildCredentials, pr as withCustomSecret, qn as secretsStoreFor, rt as dnsResources, s as assertStageServer, ur as maskPassword, v as dockerCommand, wt as CronGenerator, xt as workerBundleName, yn as CLUSTER_DATABASE, yt as workerUnits, zn as createEntryWrapper } from "./seeds-BSL55F6q.mjs";
9
+ import { Bn as prepareEntryCredentials, Cn as scopeTelemetryEnv, Ct as derivedContainers, Fn as findAvailablePort, Gn as FileSecretsStore, Gt as quoteIdentifier, Hn as secretsStoreFor, In as isPortAvailable, Jn as projectKey, Kn as getKeyPath, Ln as loadEnvFiles, Lt as LOCAL_CA_PATH, Mn as primaryPortKey, Nn as createCredentialsPreload, On as describeServices, Pn as createEntryWrapper, Rn as loadPortState, Rt as forgetState, St as constructGlobs, Tn as telemetryOf, Ut as postgresDatabaseNames, Yt as pgClient, Zn as deployIdentity, _ as describeActor, _n as TELEMETRY_CONTAINER, _t as workerEntryDir, ar as maskPassword, bt as FAKE_ENV, c as dockerCommand, cn as imageBuildCredentials, cr as withCustomSecret, dn as eventsBackendFor, fn as providerOf, gt as workerBundleName, ht as WorkerGenerator, jn as portsOf, kn as fakeKey, kt as readLocalCredentials, ln as isImageBuild, lr as LOCAL_LOGS_EMAIL, m as dnsResources, mn as CLUSTER_DATABASE, mt as workerUnits, sr as toEmbeddableSecrets, un as cacheBackendFor, vt as QueueGenerator, w as assertDevServicesFlag, wn as surfaceClientTraced, wt as reconcileWorkspace, xn as appTelemetry, xt as backendsOf$1, yt as CronGenerator, zn as loadSecretsForApp } from "./seeds-CTxTZa-R.mjs";
10
10
  import { c as startTelemetryCode, l as telemetryFor, n as runtimeFor, o as mountRequestSpansCode, r as parseTelemetryFlag, s as routeTelemetry, t as EndpointGenerator, u as writeTelemetryModule } from "./EndpointGenerator-Bor2tZCm.mjs";
11
11
  import { generateOpenApi, openapiCommand, resolveOpenApiConfig } from "./openapi.mjs";
12
12
  import { s as isCacheBackend, t as SubscriberGenerator } from "./SubscriberGenerator-CyN2VF5X.mjs";
13
13
  import { a as describeHolder, i as assignAppPorts, o as holderOf, r as appTag, s as withAppPorts, t as APP_TAG_ENV } from "./appPorts-C9z9Pzn9.mjs";
14
14
  import { n as driversFor, r as eventsBackendsIn, t as cacheBackendsIn } from "./drivers-CTaWrA_L.mjs";
15
15
  import { n as withCompute, r as withRoutes, t as manifestModule } from "./emit-C1e8qD08.mjs";
16
- import { t as LocalSandbox } from "./local-Otp74ak0.mjs";
17
- import { f as keyFingerprint, n as sniffAppEnvironment, o as DokployApi } from "./sniffer-BTtGAtm3.mjs";
18
- import { t as deploy$1 } from "./deploy-DYIyIUYd.mjs";
19
- import { a as stackOverrideFile, c as dockerCompose, i as ComposePushNeedsBuild, o as edgeDir, r as ComposePinNeedsPull, s as removeEdgeRoutes, t as composeTarget } from "./compose-DrEB_4F-.mjs";
20
- import { d as parseDigests, h as EDGE_PROJECT, i as composeProject, p as pinnedRef, s as stackDir } from "./stack-Co4uZkAo.mjs";
16
+ import { t as LocalSandbox } from "./local-B7Zv1NoA.mjs";
17
+ import { T as keyFingerprint, n as sniffAppEnvironment, o as DokployApi, y as createStateStore } from "./sniffer-DCcuzHz_.mjs";
18
+ import { t as deploy$1 } from "./deploy-CeJ5D0xn.mjs";
19
+ import { a as stackOverrideFile, c as dockerCompose, i as ComposePushNeedsBuild, o as edgeDir, r as ComposePinNeedsPull, s as removeEdgeRoutes, t as composeTarget } from "./compose-D2RFYd_f.mjs";
20
+ import { d as parseDigests, h as EDGE_PROJECT, i as composeProject, p as pinnedRef, s as stackDir } from "./stack-NrdH5ngX.mjs";
21
21
  import { o as loadCredentialSchemas, t as CredentialsInvalid } from "./credentialSchemas-BJFvfkaz.mjs";
22
- import { t as LocalStateStore } from "./LocalStateStore-D40_SDmJ.mjs";
22
+ import { t as LocalStateStore } from "./LocalStateStore-BSaS2535.mjs";
23
23
  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";
24
- import "./awsStore-BWa1KNY-.mjs";
25
24
  import { a as writeTestHarness, i as TEST_MANIFEST_ENV, n as TEST_READY_FILE, t as TEST_READY_ENV } from "./ready-naOSJpeJ.mjs";
26
25
  import { createRequire } from "node:module";
27
26
  import { basename, dirname, isAbsolute, join, relative, resolve } from "node:path";
@@ -50,7 +49,7 @@ import crypto from "crypto";
50
49
  import { Function } from "@geekmidas/constructs/functions";
51
50
  import { Topic } from "@geekmidas/constructs/topic";
52
51
  //#region package.json
53
- var version = "10.0.0-alpha.93";
52
+ var version = "10.0.0-alpha.94";
54
53
  //#endregion
55
54
  //#region src/prompt.ts
56
55
  /**
@@ -133,7 +132,7 @@ const logger$8 = console;
133
132
  * Validate Dokploy token by making a test API call
134
133
  */
135
134
  async function validateDokployToken(endpoint, token) {
136
- const { DokployApi } = await import("./sniffer-BTtGAtm3.mjs").then((n) => n.c);
135
+ const { DokployApi } = await import("./sniffer-DCcuzHz_.mjs").then((n) => n.c);
137
136
  return new DokployApi({
138
137
  baseUrl: endpoint,
139
138
  token
@@ -209,7 +208,7 @@ async function loginCommand(options) {
209
208
  * Store a GoDaddy Personal Access Token. Not validated: the only call that
210
209
  * proves a token without a domain is an account call (`GET /v1/domains`),
211
210
  * which a token scoped to `domains.dns:update` alone may not make — the first
212
- * `gkm setup` that writes a record is where a bad token reports itself.
211
+ * deploy that writes a record is where a bad token reports itself.
213
212
  */
214
213
  async function loginGoDaddy(options) {
215
214
  logger$8.log("\n🔐 Logging in to GoDaddy...\n");
@@ -230,7 +229,7 @@ async function loginGoDaddy(options) {
230
229
  logger$8.log("\n✓ GoDaddy token stored.");
231
230
  logger$8.log(` Token: ${maskToken(token)}`);
232
231
  logger$8.log(` Credentials stored in: ${getCredentialsPath(where)}`);
233
- logger$8.log(" Not validated here: proving a token without a domain needs an account\n scope a DNS-only token does not have, so the first gkm setup that\n writes a record is where a bad token reports itself.");
232
+ logger$8.log(" Not validated here: proving a token without a domain needs an account\n scope a DNS-only token does not have, so the first deploy that\n writes a record is where a bad token reports itself.");
234
233
  logger$8.log("\nYou can now use it as a DNS provider without setting GODADDY_API_TOKEN.");
235
234
  }
236
235
  /**
@@ -2327,9 +2326,9 @@ async function workspaceDevCommand(configured, options) {
2327
2326
  for (const { id, port } of fakes) logger$5.log(`🎭 ${id} fake: http://localhost:${port}`);
2328
2327
  logger$5.log(options.migrate || options.seed ? "🗄️ Migrating the databases" : "🗄️ Checking for pending migrations");
2329
2328
  if (options.migrate || options.seed) {
2330
- const { prepareDevDatabases } = await import("./migrate-CsBZKALY.mjs");
2329
+ const { prepareDevDatabases } = await import("./migrate-DhvFPGLi.mjs");
2331
2330
  await prepareDevDatabases(workspace, reconciled.env, { seed: !!options.seed });
2332
- } else await import("./migrate-CsBZKALY.mjs").then(({ reportPendingMigrations }) => reportPendingMigrations(workspace, reconciled.env)).catch((error) => {
2331
+ } else await import("./migrate-DhvFPGLi.mjs").then(({ reportPendingMigrations }) => reportPendingMigrations(workspace, reconciled.env)).catch((error) => {
2333
2332
  logger$5.log(`⚠️ Could not check for pending migrations: ${error instanceof Error ? error.message : String(error)}`);
2334
2333
  });
2335
2334
  const appUrls = {};
@@ -3382,7 +3381,7 @@ async function buildApp(input) {
3382
3381
  ...production,
3383
3382
  ...telemetry ? { telemetry } : {}
3384
3383
  });
3385
- const { bundleServer } = await import("./bundler-BWrh-AJH.mjs");
3384
+ const { bundleServer } = await import("./bundler-BSHog8CH.mjs");
3386
3385
  await bundleServer({
3387
3386
  entryPoint,
3388
3387
  outputDir: join(outputDir, "dist"),
@@ -3527,7 +3526,7 @@ async function buildWorkers(input) {
3527
3526
  });
3528
3527
  logger$4.log(`Generated worker ${worker.id}: ${crons.length} crons, ${queues.length} queues, ${subscribers.length} subscribers`);
3529
3528
  if (!input.bundle) continue;
3530
- const { bundleServer } = await import("./bundler-BWrh-AJH.mjs");
3529
+ const { bundleServer } = await import("./bundler-BSHog8CH.mjs");
3531
3530
  const outfile = workerBundleName(worker.id);
3532
3531
  await bundleServer({
3533
3532
  entryPoint,
@@ -3613,7 +3612,7 @@ async function buildForTarget(target, context, appRoot, workspaceRoot, endpointG
3613
3612
  let masterKey;
3614
3613
  if (context.production?.bundle && !skipBundle) {
3615
3614
  logger$4.log(`\n📦 Bundling production server...`);
3616
- const { bundleServer } = await import("./bundler-BWrh-AJH.mjs");
3615
+ const { bundleServer } = await import("./bundler-BSHog8CH.mjs");
3617
3616
  const allConstructs = [
3618
3617
  ...endpoints.map((e) => e.construct),
3619
3618
  ...functions.map((f) => f.construct),
@@ -3907,7 +3906,11 @@ async function composeCommand(options, deps = {}) {
3907
3906
  ...options.dryRun ? { dryRun: true } : {},
3908
3907
  ...options.push ? { buildOnly: true } : {},
3909
3908
  ...options.allowDevServices ? { allowDevServices: true } : {},
3910
- ...options.skipDnsCheck ? { skipDnsCheck: true } : {},
3909
+ ...options.skipDns ? { skipDns: true } : {},
3910
+ ...options.resourcesOnly ? { resourcesOnly: true } : {},
3911
+ ...options.skipResources ? { skipResources: true } : {},
3912
+ ...options.rotateKeys ? { rotateKeys: true } : {},
3913
+ ...options.retireOldKeys ? { retireOldKeys: true } : {},
3911
3914
  logger: {
3912
3915
  info: (message) => console.log(message),
3913
3916
  warn: (message) => console.warn(message),
@@ -5424,25 +5427,25 @@ function loadPackageJson() {
5424
5427
  * Run: pnpm --filter @geekmidas/cli sync-versions
5425
5428
  */
5426
5429
  const GEEKMIDAS_VERSIONS = {
5427
- "@geekmidas/audit": "~10.0.0-alpha.93",
5428
- "@geekmidas/auth": "~10.0.0-alpha.93",
5429
- "@geekmidas/cache": "~10.0.0-alpha.93",
5430
- "@geekmidas/client": "~10.0.0-alpha.93",
5431
- "@geekmidas/cloud": "~10.0.0-alpha.93",
5432
- "@geekmidas/constructs": "~10.0.0-alpha.93",
5433
- "@geekmidas/db": "~10.0.0-alpha.93",
5434
- "@geekmidas/emailkit": "~10.0.0-alpha.93",
5435
- "@geekmidas/envkit": "~10.0.0-alpha.93",
5436
- "@geekmidas/errors": "~10.0.0-alpha.93",
5437
- "@geekmidas/events": "~10.0.0-alpha.93",
5438
- "@geekmidas/logger": "~10.0.0-alpha.93",
5439
- "@geekmidas/manifest": "~10.0.0-alpha.93",
5440
- "@geekmidas/rate-limit": "~10.0.0-alpha.93",
5441
- "@geekmidas/schema": "~10.0.0-alpha.93",
5442
- "@geekmidas/services": "~10.0.0-alpha.93",
5443
- "@geekmidas/storage": "~10.0.0-alpha.93",
5444
- "@geekmidas/telescope": "~10.0.0-alpha.93",
5445
- "@geekmidas/testkit": "~10.0.0-alpha.93",
5430
+ "@geekmidas/audit": "~10.0.0-alpha.94",
5431
+ "@geekmidas/auth": "~10.0.0-alpha.94",
5432
+ "@geekmidas/cache": "~10.0.0-alpha.94",
5433
+ "@geekmidas/client": "~10.0.0-alpha.94",
5434
+ "@geekmidas/cloud": "~10.0.0-alpha.94",
5435
+ "@geekmidas/constructs": "~10.0.0-alpha.94",
5436
+ "@geekmidas/db": "~10.0.0-alpha.94",
5437
+ "@geekmidas/emailkit": "~10.0.0-alpha.94",
5438
+ "@geekmidas/envkit": "~10.0.0-alpha.94",
5439
+ "@geekmidas/errors": "~10.0.0-alpha.94",
5440
+ "@geekmidas/events": "~10.0.0-alpha.94",
5441
+ "@geekmidas/logger": "~10.0.0-alpha.94",
5442
+ "@geekmidas/manifest": "~10.0.0-alpha.94",
5443
+ "@geekmidas/rate-limit": "~10.0.0-alpha.94",
5444
+ "@geekmidas/schema": "~10.0.0-alpha.94",
5445
+ "@geekmidas/services": "~10.0.0-alpha.94",
5446
+ "@geekmidas/storage": "~10.0.0-alpha.94",
5447
+ "@geekmidas/telescope": "~10.0.0-alpha.94",
5448
+ "@geekmidas/testkit": "~10.0.0-alpha.94",
5446
5449
  "@geekmidas/cli": `~${loadPackageJson().version}`
5447
5450
  };
5448
5451
  //#endregion
@@ -5843,7 +5846,7 @@ const COMMIT = /^[0-9a-f]{40}$/;
5843
5846
  * The `uses:` value for the stages action, with a comment saying which CLI
5844
5847
  * release the pinned commit is.
5845
5848
  */
5846
- function stagesActionUses(commit = "a619ff213e362417b184dff08c8175a86f5d9d07", version = cliVersion()) {
5849
+ function stagesActionUses(commit = "dcab6fe1ee033518c7901452ee9c49102749c9ed", version = cliVersion()) {
5847
5850
  return commit && COMMIT.test(commit) ? `${STAGES_ACTION}@${commit} # @geekmidas/cli ${version}` : `${STAGES_ACTION}@main # pin to a commit SHA: see the action's README`;
5848
5851
  }
5849
5852
  //#endregion
@@ -6095,6 +6098,7 @@ function stagesJob(options) {
6095
6098
  has-build: \${{ steps.stages.outputs.has-build }}
6096
6099
  has-deploy: \${{ steps.stages.outputs.has-deploy }}
6097
6100
  aws-region: \${{ steps.stages.outputs.aws-region }}
6101
+ resources: \${{ steps.stages.outputs.resources }}
6098
6102
  steps:
6099
6103
  - uses: actions/checkout@v4
6100
6104
 
@@ -6112,6 +6116,10 @@ ${pm.setup}
6112
6116
  stage: \${{ inputs.stage }}
6113
6117
  `;
6114
6118
  }
6119
+ /** Every step in `steps` run only when `condition` holds. */
6120
+ function onlyIf(steps, condition) {
6121
+ return steps.replace(/^ {6}- /gm, ` - if: ${condition}\n `);
6122
+ }
6115
6123
  /**
6116
6124
  * The registry login a compose build pushes with: GitHub's own token on
6117
6125
  * ghcr.io, otherwise a username variable and a password secret.
@@ -6136,6 +6144,11 @@ function registryLogin(registry) {
6136
6144
  * `ref` — then that commit's push build, whose digests pin each image. Over
6137
6145
  * SSH, with a pinned host key, the server checks the commit out and runs
6138
6146
  * `gkm compose` on exactly those images.
6147
+ * - Resources: where the stage has some the deploy creates — a provider's
6148
+ * bucket and key, DNS records through a provider — the runner creates them
6149
+ * first (`gkm deploy --resources-only`) with the stage's role and the DNS
6150
+ * token from its environment, and the server deploys with
6151
+ * `--skip-resources`: neither credential reaches the server.
6139
6152
  */
6140
6153
  function composeDeploy(options) {
6141
6154
  const pm = tooling(options);
@@ -6211,6 +6224,13 @@ ${registryLogin(registry)}
6211
6224
  permissions:
6212
6225
  contents: read
6213
6226
  actions: read
6227
+ id-token: write
6228
+ env:
6229
+ # Whether the stage has resources the deploy creates — a provider's
6230
+ # bucket and key (deploy.<kind>.<stage>), DNS records through a provider
6231
+ # in dns: the runner creates them with the stage's role and DNS token,
6232
+ # so neither reaches the server, which deploys with --skip-resources.
6233
+ RESOURCES_ON_RUNNER: \${{ contains(fromJSON(needs.stages.outputs.resources || '[]'), matrix.stage) }}
6214
6234
  steps:
6215
6235
  # A release deploys its tag's commit, never its target_commitish — the
6216
6236
  # branch it was drafted against, which has moved on since.
@@ -6233,6 +6253,40 @@ ${registryLogin(registry)}
6233
6253
  REF: \${{ inputs.ref }}
6234
6254
  SHA: \${{ github.sha }}
6235
6255
 
6256
+ # The deploy's resources, here on the runner: each provider's bucket
6257
+ # and key (written into the stage's secrets store), and every public
6258
+ # host's DNS record — a new app's included, one per host, never a
6259
+ # wildcard — written through the provider where it is missing or out of
6260
+ # date and read back from it. The stage's secrets (GKM_SERVER_IPV4
6261
+ # among them) are read with the stage's role; the DNS token is a secret
6262
+ # on this stage's environment. A missing credential fails here, before
6263
+ # anything is deployed.
6264
+ - name: Check out the commit
6265
+ if: env.RESOURCES_ON_RUNNER == 'true'
6266
+ uses: actions/checkout@v4
6267
+ with:
6268
+ ref: \${{ steps.commit.outputs.sha }}
6269
+
6270
+ ${onlyIf(pm.setup, "env.RESOURCES_ON_RUNNER == 'true'")}
6271
+ - name: Install
6272
+ if: env.RESOURCES_ON_RUNNER == 'true'
6273
+ run: ${pm.install}
6274
+
6275
+ - name: Assume the stage's AWS role
6276
+ if: env.RESOURCES_ON_RUNNER == 'true' && needs.stages.outputs.aws-region != ''
6277
+ uses: aws-actions/configure-aws-credentials@v4
6278
+ with:
6279
+ role-to-assume: \${{ vars.AWS_ROLE_ARN }}
6280
+ aws-region: \${{ needs.stages.outputs.aws-region }}
6281
+
6282
+ - name: Create the stage's resources
6283
+ if: env.RESOURCES_ON_RUNNER == 'true'
6284
+ run: ${pm.exec} gkm deploy --stage "$STAGE" --resources-only
6285
+ env:
6286
+ STAGE: \${{ matrix.stage }}
6287
+ GODADDY_API_TOKEN: \${{ secrets.GODADDY_API_TOKEN }}
6288
+ HOSTINGER_API_TOKEN: \${{ secrets.HOSTINGER_API_TOKEN }}
6289
+
6236
6290
  # The push run of this workflow that built the commit for this stage:
6237
6291
  # this run on a push, the newest one with the stage's digests otherwise.
6238
6292
  - name: Find the commit's push build
@@ -6294,9 +6348,9 @@ ${registryLogin(registry)}
6294
6348
  if [ -f digests.json ]; then digests=$(base64 -w0 < digests.json); fi
6295
6349
  ssh -i ~/.ssh/deploy_key -o IdentitiesOnly=yes -o StrictHostKeyChecking=yes \\
6296
6350
  "$DEPLOY_USER@$DEPLOY_HOST" \\
6297
- "bash -s -- $(printf '%q ' "$STAGE" "$SHA" "$DEPLOY_PATH" "$digests")" <<'REMOTE'
6351
+ "bash -s -- $(printf '%q ' "$STAGE" "$SHA" "$DEPLOY_PATH" "$digests" "$RESOURCES_ON_RUNNER")" <<'REMOTE'
6298
6352
  set -euo pipefail
6299
- stage=$1 sha=$2 dir=$3 digests=$4
6353
+ stage=$1 sha=$2 dir=$3 digests=$4 resources_on_runner=$5
6300
6354
  cd "$dir"
6301
6355
  git fetch --quiet origin
6302
6356
  git checkout --quiet --detach "$sha"
@@ -6307,6 +6361,8 @@ ${registryLogin(registry)}
6307
6361
  printf '%s' "$digests" | base64 -d > ".gkm/digests-$stage.json"
6308
6362
  args+=(--digests-file ".gkm/digests-$stage.json")
6309
6363
  fi
6364
+ # Created and confirmed from the runner already.
6365
+ if [ "$resources_on_runner" = true ]; then args+=(--skip-resources); fi
6310
6366
  ${pm.exec} gkm compose "\${args[@]}"
6311
6367
  REMOTE
6312
6368
  env:
@@ -6355,7 +6411,9 @@ function targetDeploy(options) {
6355
6411
  `;
6356
6412
  const deployEnv = sst ? "" : `
6357
6413
  DOKPLOY_API_TOKEN: \${{ secrets.DOKPLOY_API_TOKEN }}
6358
- DOKPLOY_ENDPOINT: \${{ vars.DOKPLOY_ENDPOINT }}`;
6414
+ DOKPLOY_ENDPOINT: \${{ vars.DOKPLOY_ENDPOINT }}
6415
+ GODADDY_API_TOKEN: \${{ secrets.GODADDY_API_TOKEN }}
6416
+ HOSTINGER_API_TOKEN: \${{ secrets.HOSTINGER_API_TOKEN }}`;
6359
6417
  return `${deployHeader(false)}
6360
6418
  jobs:
6361
6419
  ${stagesJob(options)}
@@ -11127,6 +11185,7 @@ function maskUrl(url) {
11127
11185
  //#endregion
11128
11186
  //#region src/setup/index.ts
11129
11187
  var setup_exports = /* @__PURE__ */ __exportAll({
11188
+ SetupIsLocal: () => SetupIsLocal,
11130
11189
  createFreshWorkspaceSecrets: () => createFreshWorkspaceSecrets,
11131
11190
  ensureStageSecrets: () => ensureStageSecrets,
11132
11191
  reconcileSecrets: () => reconcileSecrets,
@@ -11134,14 +11193,21 @@ var setup_exports = /* @__PURE__ */ __exportAll({
11134
11193
  });
11135
11194
  const logger$1 = console;
11136
11195
  /**
11137
- * Converge a stage on what its constructs declare.
11138
- *
11139
- * The local stage: its secrets (local → the stage's store → generated) and
11140
- * the containers on this machine. A deployed stage: its secrets, and then
11141
- * every provider `deploy.<kind>.<stage>` names — the bucket, user and key an
11142
- * `objects: { provider: 's3' }` stage is backed by — created or repaired in
11143
- * the stage's own account. A deployed stage's infrastructure is not on this
11144
- * machine, so no container is started for one.
11196
+ * `gkm setup --stage <deployed stage>`: setup is this machine's, done once,
11197
+ * and creates nothing for a deployed stage — the deploy does.
11198
+ */
11199
+ var SetupIsLocal = class extends GkmError {
11200
+ stage;
11201
+ constructor(stage) {
11202
+ super(`gkm setup sets up this machine — its secrets and its containers — and '${stage}' is a deployed stage: nothing of it is set up from here. The deploy creates what '${stage}' needs — its buckets and keys, its DNS records — every time it runs: gkm deploy --stage ${stage} (gkm compose --stage ${stage} is the same deploy). Its --dry-run prints what it would create.`);
11203
+ this.stage = stage;
11204
+ this.name = "SetupIsLocal";
11205
+ }
11206
+ };
11207
+ /**
11208
+ * Set this machine up for the workspace, once: the local stage's secrets
11209
+ * (local → the stage's store → generated) and its containers. A deployed
11210
+ * stage is refused with {@link SetupIsLocal}: its resources are the deploy's.
11145
11211
  */
11146
11212
  async function setupCommand(options = {}) {
11147
11213
  let loadedConfig;
@@ -11153,27 +11219,15 @@ async function setupCommand(options = {}) {
11153
11219
  }
11154
11220
  const stage = options.stage ?? loadedConfig.workspace.stages.local;
11155
11221
  const { workspace } = loadedConfig;
11156
- const local = stage === workspace.stages.local;
11157
- logger$1.log(local ? "\n🔧 Setting up the local environment...\n" : `\n☁️ Provisioning the '${stage}' stage${options.dryRun ? " (dry run)" : ""}...\n`);
11222
+ if (workspace.stages.deployed.includes(stage)) throw new SetupIsLocal(stage);
11223
+ logger$1.log("\n🔧 Setting up the local environment...\n");
11158
11224
  logger$1.log(`📦 Workspace: ${workspace.name}`);
11159
11225
  logger$1.log(`📱 Apps: ${Object.keys(workspace.apps).join(", ")}`);
11160
11226
  logger$1.log(`🔑 Stage: ${stage}\n`);
11161
- if (!local) {
11162
- const store = await secretsStoreFor(workspace, stage, { ...options.profile ? { profile: options.profile } : {} });
11163
- assertStageServer(workspace, stage, await store.read(stage));
11164
- }
11165
- if (!local && options.dryRun) {
11166
- await provisionDeployed(workspace, stage, options);
11167
- return;
11168
- }
11169
11227
  if (!await resolveSecrets(stage, workspace, options)) {
11170
11228
  logger$1.error("❌ Failed to resolve secrets. Exiting.");
11171
11229
  process.exit(1);
11172
11230
  }
11173
- if (!local) {
11174
- await provisionDeployed(workspace, stage, options);
11175
- return;
11176
- }
11177
11231
  if (!options.skipDocker) {
11178
11232
  logger$1.log("");
11179
11233
  await reconcileLocal(workspace, stage, options);
@@ -11181,33 +11235,6 @@ async function setupCommand(options = {}) {
11181
11235
  printSummary(workspace, stage);
11182
11236
  }
11183
11237
  /**
11184
- * A deployed stage's providers: each one's `ensure()`, in the stage's own
11185
- * account, its keys written into the stage's secrets.
11186
- */
11187
- async function provisionDeployed(workspace, stage, options) {
11188
- logger$1.log(options.dryRun ? `\n☁️ Providers for '${stage}' (dry run — nothing is created or written)` : `\n☁️ Providers for '${stage}'`);
11189
- const configured = (await provisionStage({
11190
- workspace,
11191
- stage,
11192
- ...options.dryRun ? { dryRun: true } : {},
11193
- ...options.profile ? { profile: options.profile } : {},
11194
- ...options.rotateKeys ? { rotateKeys: true } : {},
11195
- ...options.retireOldKeys ? { retireOldKeys: true } : {},
11196
- log: (line) => logger$1.log(line)
11197
- })).filter((r) => r.mode === "provider");
11198
- if (configured.length === 0) logger$1.log(` None configured: '${stage}' takes every key from its secrets (gkm secrets:add --stage ${stage}). Name one in gkm.config.ts — deploy: { objects: { ${stage}: { provider: 's3' } } } — to have ${provisionCommand(stage)} create it.`);
11199
- const dns = await provisionStageDns({
11200
- workspace,
11201
- stage,
11202
- ...options.dryRun ? { dryRun: true } : {},
11203
- ...options.profile ? { profile: options.profile } : {},
11204
- log: (line) => logger$1.log(line)
11205
- });
11206
- const changes = configured.reduce((n, r) => n + r.actions.length, 0) + dns.changes.filter((c) => c.action !== "unchanged" && c.action !== "manual").length;
11207
- if (configured.length === 0 && dns.mode === "none") return;
11208
- logger$1.log(options.dryRun ? `\n${changes === 0 ? "✅ Nothing to change" : `📋 ${changes} change${changes === 1 ? "" : "s"} planned`}` : `\n✅ '${stage}' provisioned${changes === 0 ? " — already up to date" : ` (${changes} change${changes === 1 ? "" : "s"})`}`);
11209
- }
11210
- /**
11211
11238
  * Converge this machine on what the manifest declares.
11212
11239
  *
11213
11240
  * Says what it did in one line and stays silent when it did nothing, because
@@ -11232,7 +11259,7 @@ async function reconcileLocal(workspace, stage, options) {
11232
11259
  /**
11233
11260
  * Resolve secrets with priority:
11234
11261
  * 1. Local secrets exist → use them (preserves manual additions)
11235
- * 2. A deployed stage whose store has secrets → pull and use
11262
+ * 2. The stage's store has secrets → use them
11236
11263
  * 3. Neither → generate fresh secrets
11237
11264
  *
11238
11265
  * --force skips checks 1 and 2 and always regenerates.
@@ -11559,7 +11586,7 @@ function testDatabases(reconciled) {
11559
11586
  * starts without the reference data the app needs.
11560
11587
  */
11561
11588
  async function migrateTestStage(workspace, env) {
11562
- const { migrateAndSeed } = await import("./migrate-CsBZKALY.mjs");
11589
+ const { migrateAndSeed } = await import("./migrate-DhvFPGLi.mjs");
11563
11590
  const { discover } = await import("./discover-qjFapetL.mjs").then((n) => n.i);
11564
11591
  const sources = {};
11565
11592
  const manifest = await discover({
@@ -11913,7 +11940,7 @@ program.command("trust").description("Trust the local edge's certificate authori
11913
11940
  exitWithError(error);
11914
11941
  }
11915
11942
  });
11916
- program.command("setup").description("Reconcile declared constructs — locally, containers and secrets; on a deployed stage, its providers (deploy.objects)").option("--stage <stage>", "Stage name (default: stages.local)").option("--force", "Regenerate secrets even if they exist").option("--skip-docker", "Skip starting Docker services").option("-y, --yes", "Skip prompts").option("--dry-run", "A deployed stage: print what its providers would create or change, and write nothing").option("--profile <profile>", "AWS profile for the stage's account").option("--rotate-keys", "A deployed stage: issue each provisioned key a successor (the old one is deleted after the next deploy)").option("--retire-old-keys", "A deployed stage: delete a rotated-out key now instead of after the next deploy").action(async (options) => {
11943
+ program.command("setup").description("Set this machine up for the workspace, once: the local stage's secrets and containers. A deployed stage's resources are created by its deploy").option("--stage <stage>", "Stage name (default: stages.local); never a deployed stage").option("--force", "Regenerate secrets even if they exist").option("--skip-docker", "Skip starting Docker services").option("-y, --yes", "Skip prompts").action(async (options) => {
11917
11944
  try {
11918
11945
  const globalOptions = program.opts();
11919
11946
  if (globalOptions.cwd) process.chdir(globalOptions.cwd);
@@ -11995,7 +12022,7 @@ program.command("migrate").description("Apply each database construct's migratio
11995
12022
  try {
11996
12023
  const globalOptions = program.opts();
11997
12024
  if (globalOptions.cwd) process.chdir(globalOptions.cwd);
11998
- const { migrateCommand } = await import("./migrate-CsBZKALY.mjs");
12025
+ const { migrateCommand } = await import("./migrate-DhvFPGLi.mjs");
11999
12026
  await migrateCommand({
12000
12027
  ...options,
12001
12028
  ...construct ? { construct } : {}
@@ -12008,7 +12035,7 @@ program.command("seed").description("Migrate, then run each database construct's
12008
12035
  try {
12009
12036
  const globalOptions = program.opts();
12010
12037
  if (globalOptions.cwd) process.chdir(globalOptions.cwd);
12011
- const { seedCommand } = await import("./migrate-CsBZKALY.mjs");
12038
+ const { seedCommand } = await import("./migrate-DhvFPGLi.mjs");
12012
12039
  await seedCommand({
12013
12040
  ...options,
12014
12041
  ...construct ? { construct } : {}
@@ -12021,7 +12048,7 @@ program.command("migration").description("Write a construct's next migration: an
12021
12048
  try {
12022
12049
  const globalOptions = program.opts();
12023
12050
  if (globalOptions.cwd) process.chdir(globalOptions.cwd);
12024
- const { migrationCommand } = await import("./migrate-CsBZKALY.mjs");
12051
+ const { migrationCommand } = await import("./migrate-DhvFPGLi.mjs");
12025
12052
  await migrationCommand({
12026
12053
  construct,
12027
12054
  ...name ? { name } : {}
@@ -12067,7 +12094,7 @@ program.command("docker").description("Generate Docker deployment files").option
12067
12094
  exitWithError(error);
12068
12095
  }
12069
12096
  });
12070
- program.command("compose").description("Run the workspace's APIs and sites for a stage as one Docker Compose stack behind Caddy").requiredOption("--stage <stage>", "Stage to run — always named, so a stack is never a deployed stage by accident").option("--tag <tag>", "Run the images CI pushed at this tag (sites: <tag>-<stage>); nothing is built").option("--build", "Build images from this checkout, tagged with the commit").option("--pull", "Pull images (at --tag, or latest) rather than build them").option("--push", "With --build: push every image to deploy.registry and start nothing (for CI)").option("--digests-file <path>", "With --push: write each image as <ref>@sha256:… (JSON). With --tag: run the images at those digests").option("--dry-run", "Write the files and print the plan; start nothing").option("--down", "Stop the stage's stack (its volumes are kept)").option("--allow-dev-services", "Deployed stage: run the dev service (MinIO, Mailpit) for every bucket and mail the stage doesn't account for. Not production-grade").option("--skip-dns-check", "Deployed stage: do not check that each public host resolves to GKM_SERVER_IPV4 in the stage secrets before starting (a CDN or proxy in front)").action(async (options) => {
12097
+ program.command("compose").description("Run the workspace's APIs and sites for a stage as one Docker Compose stack behind Caddy").requiredOption("--stage <stage>", "Stage to run — always named, so a stack is never a deployed stage by accident").option("--tag <tag>", "Run the images CI pushed at this tag (sites: <tag>-<stage>); nothing is built").option("--build", "Build images from this checkout, tagged with the commit").option("--pull", "Pull images (at --tag, or latest) rather than build them").option("--push", "With --build: push every image to deploy.registry and start nothing (for CI)").option("--digests-file <path>", "With --push: write each image as <ref>@sha256:… (JSON). With --tag: run the images at those digests").option("--dry-run", "Write the files and print the plan; start nothing").option("--down", "Stop the stage's stack (its volumes are kept)").option("--allow-dev-services", "Deployed stage: run the dev service (MinIO, Mailpit) for every bucket and mail the stage doesn't account for. Not production-grade").option("--skip-dns", "Deployed stage: 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("--resources-only", "Deployed stage: create its resources — deploy.<kind>.<stage> providers' buckets and keys, and its DNS records — and nothing else (a CI runner, before the server deploys)").option("--skip-resources", "Deployed stage: an earlier --resources-only run created its resources; run no provider and write or check no DNS record").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) => {
12071
12098
  try {
12072
12099
  const globalOptions = program.opts();
12073
12100
  if (globalOptions.cwd) process.chdir(globalOptions.cwd);
@@ -12121,7 +12148,7 @@ program.command("secrets:add").description("Build the keys a stage must be given
12121
12148
  try {
12122
12149
  const globalOptions = program.opts();
12123
12150
  if (globalOptions.cwd) process.chdir(globalOptions.cwd);
12124
- const { secretsAddCommand } = await import("./add-CP1podDH.mjs");
12151
+ const { secretsAddCommand } = await import("./add-C85isXFl.mjs");
12125
12152
  await secretsAddCommand(options);
12126
12153
  } catch (error) {
12127
12154
  exitWithError(error);
@@ -12131,7 +12158,7 @@ program.command("encryption:rotate").description("Add a new current key to an En
12131
12158
  try {
12132
12159
  const globalOptions = program.opts();
12133
12160
  if (globalOptions.cwd) process.chdir(globalOptions.cwd);
12134
- const { encryptionRotateCommand } = await import("./encryption-B6ilrT7p.mjs");
12161
+ const { encryptionRotateCommand } = await import("./encryption-_4qKqtTx.mjs");
12135
12162
  await encryptionRotateCommand(construct, options);
12136
12163
  } catch (error) {
12137
12164
  exitWithError(error);
@@ -12141,7 +12168,7 @@ program.command("encryption:retire").description("Remove an old key from an Encr
12141
12168
  try {
12142
12169
  const globalOptions = program.opts();
12143
12170
  if (globalOptions.cwd) process.chdir(globalOptions.cwd);
12144
- const { encryptionRetireCommand } = await import("./encryption-B6ilrT7p.mjs");
12171
+ const { encryptionRetireCommand } = await import("./encryption-_4qKqtTx.mjs");
12145
12172
  await encryptionRetireCommand(construct, key, options);
12146
12173
  } catch (error) {
12147
12174
  exitWithError(error);
@@ -12180,7 +12207,7 @@ program.command("secrets:reconcile").description("Backfill missing custom secret
12180
12207
  if (globalOptions.cwd) process.chdir(globalOptions.cwd);
12181
12208
  const { loadWorkspaceConfig } = await import("./config.mjs");
12182
12209
  const { reconcileMissingSecrets } = await import("./reconcile--I7V4Klj.mjs");
12183
- const { secretsStoreFor } = await import("./seeds-BSL55F6q.mjs").then((n) => n.Yn);
12210
+ const { secretsStoreFor } = await import("./seeds-CTxTZa-R.mjs").then((n) => n.Wn);
12184
12211
  const { workspace } = await loadWorkspaceConfig();
12185
12212
  const stage = options.stage ?? workspace.stages.local;
12186
12213
  const store = await secretsStoreFor(workspace, stage);
@@ -12189,7 +12216,7 @@ program.command("secrets:reconcile").description("Backfill missing custom secret
12189
12216
  console.error(`No secrets found for stage "${stage}". Run "gkm secrets:init --stage ${stage}" first.`);
12190
12217
  process.exit(1);
12191
12218
  }
12192
- const { derivedContainers } = await import("./seeds-BSL55F6q.mjs").then((n) => n.At);
12219
+ const { derivedContainers } = await import("./seeds-CTxTZa-R.mjs").then((n) => n.Tt);
12193
12220
  const result = reconcileMissingSecrets(secrets, workspace, await derivedContainers(workspace, stage));
12194
12221
  if (!result) {
12195
12222
  console.log(`\n✓ Secrets for stage "${stage}" are up-to-date`);
@@ -12206,14 +12233,14 @@ program.command("secrets:migrate").description("Copy a deployed stage's secrets
12206
12233
  try {
12207
12234
  const globalOptions = program.opts();
12208
12235
  if (globalOptions.cwd) process.chdir(globalOptions.cwd);
12209
- const { secretsMigrateCommand } = await import("./migrate-BaC4w0sb.mjs");
12236
+ const { secretsMigrateCommand } = await import("./migrate-B7evHv7O.mjs");
12210
12237
  await secretsMigrateCommand(options);
12211
12238
  } catch (error) {
12212
12239
  exitWithError(error);
12213
12240
  }
12214
12241
  });
12215
- 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-check", "Compose: do not check that each public host resolves to GKM_SERVER_IPV4 in the stage secrets before starting (a CDN or proxy in front)").action(async (options) => {
12216
- const { deployCli } = await import("./cli-B8otnZfX.mjs");
12242
+ 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("--resources-only", "Deployed stage: create its resources — deploy.<kind>.<stage> providers' buckets and keys, and its DNS records — and nothing else (a CI runner, before the server deploys)").option("--skip-resources", "Deployed stage: an earlier --resources-only run created its resources; run no provider and write or check no DNS record").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) => {
12243
+ const { deployCli } = await import("./cli-BsFenyaf.mjs");
12217
12244
  const globalOptions = program.opts();
12218
12245
  const code = await deployCli({
12219
12246
  cwd: resolve(globalOptions.cwd ?? process.cwd()),
@@ -12225,14 +12252,18 @@ program.command("deploy").description("Deploy a stage through its target").optio
12225
12252
  ...options.dryRun ? { dryRun: true } : {},
12226
12253
  ...options.atomic ? { atomic: true } : {},
12227
12254
  ...options.allowDevServices ? { allowDevServices: true } : {},
12228
- ...options.skipDnsCheck ? { skipDnsCheck: true } : {}
12255
+ ...options.skipDns ? { skipDns: true } : {},
12256
+ ...options.resourcesOnly ? { resourcesOnly: true } : {},
12257
+ ...options.skipResources ? { skipResources: true } : {},
12258
+ ...options.rotateKeys ? { rotateKeys: true } : {},
12259
+ ...options.retireOldKeys ? { retireOldKeys: true } : {}
12229
12260
  });
12230
12261
  if (code !== 0) process.exit(code);
12231
12262
  });
12232
12263
  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) => {
12233
12264
  try {
12234
- const { rollbackStage } = await import("./rollback-Drbg0OeR.mjs").then((n) => n.a);
12235
- const { terminalCredentials } = await import("./terminal-C4XRdwnU.mjs");
12265
+ const { rollbackStage } = await import("./rollback-NroNbGC0.mjs").then((n) => n.a);
12266
+ const { terminalCredentials } = await import("./terminal-DAHs2Zko.mjs");
12236
12267
  const globalOptions = program.opts();
12237
12268
  await rollbackStage({
12238
12269
  cwd: resolve(globalOptions.cwd ?? process.cwd()),
@@ -12265,7 +12296,7 @@ program.command("deploy:github").description("Let GitHub Actions deploy a stage:
12265
12296
  try {
12266
12297
  const globalOptions = program.opts();
12267
12298
  if (globalOptions.cwd) process.chdir(globalOptions.cwd);
12268
- const { deployGithubCommand } = await import("./github-CzBbs43W.mjs");
12299
+ const { deployGithubCommand } = await import("./github-xsDT19im.mjs");
12269
12300
  await deployGithubCommand(options);
12270
12301
  } catch (error) {
12271
12302
  exitWithError(error);
@@ -12275,7 +12306,7 @@ program.command("stages").description("The workspace's stages from gkm.config.ts
12275
12306
  try {
12276
12307
  const globalOptions = program.opts();
12277
12308
  if (globalOptions.cwd) process.chdir(globalOptions.cwd);
12278
- const { stagesCommand } = await import("./stages-DY-fQKmo.mjs");
12309
+ const { stagesCommand } = await import("./stages-veC4TcQe.mjs");
12279
12310
  await stagesCommand(options);
12280
12311
  } catch (error) {
12281
12312
  exitWithError(error);