@geekmidas/cli 10.0.0-alpha.87 → 10.0.0-alpha.89

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 (180) hide show
  1. package/dist/GoDaddyProvider--36rw8cP.mjs +387 -0
  2. package/dist/GoDaddyProvider--36rw8cP.mjs.map +1 -0
  3. package/dist/GoDaddyProvider-DnRor066.cjs +387 -0
  4. package/dist/GoDaddyProvider-DnRor066.cjs.map +1 -0
  5. package/dist/{HostingerProvider-CVc3rLPB.mjs → HostingerProvider-BI6J7oJr.mjs} +2 -2
  6. package/dist/{HostingerProvider-CVc3rLPB.mjs.map → HostingerProvider-BI6J7oJr.mjs.map} +1 -1
  7. package/dist/{HostingerProvider-BCB1QJj1.cjs → HostingerProvider-CyTpG_jy.cjs} +2 -2
  8. package/dist/{HostingerProvider-BCB1QJj1.cjs.map → HostingerProvider-CyTpG_jy.cjs.map} +1 -1
  9. package/dist/{LegacyStateStore-CWG_HVC0.cjs → LegacyStateStore-BaBoYl59.cjs} +2 -2
  10. package/dist/{LegacyStateStore-CWG_HVC0.cjs.map → LegacyStateStore-BaBoYl59.cjs.map} +1 -1
  11. package/dist/{LegacyStateStore-B0R4LlX_.mjs → LegacyStateStore-CO7bzJCU.mjs} +2 -2
  12. package/dist/{LegacyStateStore-B0R4LlX_.mjs.map → LegacyStateStore-CO7bzJCU.mjs.map} +1 -1
  13. package/dist/{LocalStateStore-CLwa2DpK.cjs → LocalStateStore-CUWh2BWU.cjs} +2 -2
  14. package/dist/{LocalStateStore-CLwa2DpK.cjs.map → LocalStateStore-CUWh2BWU.cjs.map} +1 -1
  15. package/dist/{LocalStateStore-Q4vXg2ua.mjs → LocalStateStore-C_hYDv6I.mjs} +2 -2
  16. package/dist/{LocalStateStore-Q4vXg2ua.mjs.map → LocalStateStore-C_hYDv6I.mjs.map} +1 -1
  17. package/dist/{S3StateStore-Cea9_5gF.cjs → S3StateStore-O8EYfjfG.cjs} +2 -2
  18. package/dist/{S3StateStore-Cea9_5gF.cjs.map → S3StateStore-O8EYfjfG.cjs.map} +1 -1
  19. package/dist/{S3StateStore-CksKYKRa.mjs → S3StateStore-hIm8Rrmu.mjs} +2 -2
  20. package/dist/{S3StateStore-CksKYKRa.mjs.map → S3StateStore-hIm8Rrmu.mjs.map} +1 -1
  21. package/dist/{SSMStateStore-aBOTF018.cjs → SSMStateStore-DIzbiqCz.cjs} +2 -2
  22. package/dist/{SSMStateStore-aBOTF018.cjs.map → SSMStateStore-DIzbiqCz.cjs.map} +1 -1
  23. package/dist/{SSMStateStore-BszSCAS2.mjs → SSMStateStore-IvcjTk8h.mjs} +2 -2
  24. package/dist/{SSMStateStore-BszSCAS2.mjs.map → SSMStateStore-IvcjTk8h.mjs.map} +1 -1
  25. package/dist/SubscriberGenerator-BPqQf8fB.mjs.map +1 -1
  26. package/dist/SubscriberGenerator-BVn7cQ-2.cjs.map +1 -1
  27. package/dist/{add-5MZAXybv.cjs → add-C9qX4Juc.cjs} +30 -7
  28. package/dist/add-C9qX4Juc.cjs.map +1 -0
  29. package/dist/{add-D_jNqnfZ.mjs → add-v3tCbrpE.mjs} +30 -7
  30. package/dist/add-v3tCbrpE.mjs.map +1 -0
  31. package/dist/{bundler-1REMhKps.cjs → bundler-C4NmpRTD.cjs} +5 -5
  32. package/dist/{bundler-1REMhKps.cjs.map → bundler-C4NmpRTD.cjs.map} +1 -1
  33. package/dist/{bundler-BMo-JP5s.mjs → bundler-C_fCgcVO.mjs} +5 -5
  34. package/dist/{bundler-BMo-JP5s.mjs.map → bundler-C_fCgcVO.mjs.map} +1 -1
  35. package/dist/{cli-BL8ZHsLQ.cjs → cli-C85Dut8K.cjs} +6 -5
  36. package/dist/cli-C85Dut8K.cjs.map +1 -0
  37. package/dist/{cli-7edNFwGk.mjs → cli-REdO9X5b.mjs} +7 -6
  38. package/dist/cli-REdO9X5b.mjs.map +1 -0
  39. package/dist/{compose-xw86kVYi.cjs → compose-BvrhDwJ6.cjs} +556 -30
  40. package/dist/compose-BvrhDwJ6.cjs.map +1 -0
  41. package/dist/{compose-DbJhRQlh.mjs → compose-Dn0oAgQ0.mjs} +509 -31
  42. package/dist/compose-Dn0oAgQ0.mjs.map +1 -0
  43. package/dist/{config-DrCAyoH5.d.mts → config-CdEcTrjG.d.mts} +3 -3
  44. package/dist/{config-CpjsVxru.d.cts.map → config-CdEcTrjG.d.mts.map} +1 -1
  45. package/dist/{config-CpjsVxru.d.cts → config-pST7E0CS.d.cts} +3 -3
  46. package/dist/{config-DrCAyoH5.d.mts.map → config-pST7E0CS.d.cts.map} +1 -1
  47. package/dist/config.cjs +1 -1
  48. package/dist/config.d.cts +3 -3
  49. package/dist/config.d.mts +3 -3
  50. package/dist/config.mjs +1 -1
  51. package/dist/{credentials-tr26-KML.cjs → credentials-BKfIugu2.cjs} +47 -2
  52. package/dist/credentials-BKfIugu2.cjs.map +1 -0
  53. package/dist/{credentials-BgJ5mS_d.mjs → credentials-CnVqoXMb.mjs} +30 -3
  54. package/dist/credentials-CnVqoXMb.mjs.map +1 -0
  55. package/dist/databases-BY-pEImp.cjs.map +1 -1
  56. package/dist/databases-CzszQV0N.mjs.map +1 -1
  57. package/dist/deploy/public.cjs +10 -10
  58. package/dist/deploy/public.d.cts +9 -3
  59. package/dist/deploy/public.d.cts.map +1 -1
  60. package/dist/deploy/public.d.mts +9 -3
  61. package/dist/deploy/public.d.mts.map +1 -1
  62. package/dist/deploy/public.mjs +10 -10
  63. package/dist/{deploy-BTfmXd3g.mjs → deploy-BaERRh0Q.mjs} +10 -8
  64. package/dist/deploy-BaERRh0Q.mjs.map +1 -0
  65. package/dist/{deploy-CtbZj4zN.cjs → deploy-DbBGo3a6.cjs} +10 -8
  66. package/dist/deploy-DbBGo3a6.cjs.map +1 -0
  67. package/dist/{dokploy-r69yZaIt.mjs → dokploy-CMmD_ddX.mjs} +2 -2
  68. package/dist/{dokploy-r69yZaIt.mjs.map → dokploy-CMmD_ddX.mjs.map} +1 -1
  69. package/dist/{dokploy-TGk3oPwr.cjs → dokploy-DwAaKA9B.cjs} +2 -2
  70. package/dist/{dokploy-TGk3oPwr.cjs.map → dokploy-DwAaKA9B.cjs.map} +1 -1
  71. package/dist/{encryption-C-8Tt5Hh.mjs → encryption-BQmhq9_y.mjs} +3 -3
  72. package/dist/{encryption-C-8Tt5Hh.mjs.map → encryption-BQmhq9_y.mjs.map} +1 -1
  73. package/dist/{encryption-CDn7BH5O.cjs → encryption-BrN_9_CM.cjs} +3 -3
  74. package/dist/{encryption-CDn7BH5O.cjs.map → encryption-BrN_9_CM.cjs.map} +1 -1
  75. package/dist/{engine-jAINgiOB.mjs → engine-DILocOOH.mjs} +23 -404
  76. package/dist/engine-DILocOOH.mjs.map +1 -0
  77. package/dist/{engine-Bt5k_UMq.cjs → engine-DgHoFBMw.cjs} +25 -406
  78. package/dist/engine-DgHoFBMw.cjs.map +1 -0
  79. package/dist/{github-DFhuJQlp.cjs → github-Bf7pz6AV.cjs} +3 -3
  80. package/dist/{github-DFhuJQlp.cjs.map → github-Bf7pz6AV.cjs.map} +1 -1
  81. package/dist/{github-CZHAtwPT.mjs → github-xzg99wz8.mjs} +3 -3
  82. package/dist/{github-CZHAtwPT.mjs.map → github-xzg99wz8.mjs.map} +1 -1
  83. package/dist/{index-MnUJuUlj.d.mts → index-D-F_hTDz.d.cts} +21 -4
  84. package/dist/index-D-F_hTDz.d.cts.map +1 -0
  85. package/dist/{index-elsLJTUv.d.cts → index-YFNxR5Ns.d.mts} +21 -4
  86. package/dist/index-YFNxR5Ns.d.mts.map +1 -0
  87. package/dist/index.cjs +305 -69
  88. package/dist/index.cjs.map +1 -1
  89. package/dist/index.mjs +306 -71
  90. package/dist/index.mjs.map +1 -1
  91. package/dist/{local-Cq8qdgNX.cjs → local-BjxDfPvy.cjs} +2 -2
  92. package/dist/{local-Cq8qdgNX.cjs.map → local-BjxDfPvy.cjs.map} +1 -1
  93. package/dist/{local-Ciq-bTPr.mjs → local-IuoIF3CT.mjs} +2 -2
  94. package/dist/{local-Ciq-bTPr.mjs.map → local-IuoIF3CT.mjs.map} +1 -1
  95. package/dist/{migrate-B1rVlwj1.cjs → migrate-7xayVtzL.cjs} +3 -3
  96. package/dist/{migrate-B1rVlwj1.cjs.map → migrate-7xayVtzL.cjs.map} +1 -1
  97. package/dist/{migrate-ggkPVJRC.mjs → migrate-CKLJ73OO.mjs} +4 -4
  98. package/dist/{migrate-ggkPVJRC.mjs.map → migrate-CKLJ73OO.mjs.map} +1 -1
  99. package/dist/{migrate-Dn7nK6sh.mjs → migrate-CpmO5qnl.mjs} +3 -3
  100. package/dist/{migrate-Dn7nK6sh.mjs.map → migrate-CpmO5qnl.mjs.map} +1 -1
  101. package/dist/{migrate-B16qgYTn.cjs → migrate-DPF7ZF8M.cjs} +3 -3
  102. package/dist/{migrate-B16qgYTn.cjs.map → migrate-DPF7ZF8M.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/ready-BpNbORRB.cjs.map +1 -1
  108. package/dist/ready-b6vm0-W-.mjs.map +1 -1
  109. package/dist/reconcile/public.d.cts +1 -1
  110. package/dist/reconcile/public.d.mts +1 -1
  111. package/dist/{reconcile--I7V4Klj.mjs → reconcile-Dh1Jk7WE.mjs} +2 -2
  112. package/dist/{reconcile--I7V4Klj.mjs.map → reconcile-Dh1Jk7WE.mjs.map} +1 -1
  113. package/dist/{resolve-BSke45k6.mjs → resolve-Dv_weZoh.mjs} +4 -4
  114. package/dist/{resolve-BSke45k6.mjs.map → resolve-Dv_weZoh.mjs.map} +1 -1
  115. package/dist/{resolve-BXeXzpmU.cjs → resolve-dlKPFNgv.cjs} +4 -4
  116. package/dist/{resolve-BXeXzpmU.cjs.map → resolve-dlKPFNgv.cjs.map} +1 -1
  117. package/dist/{rollback-DFMiBWf0.cjs → rollback-65VVIdBM.cjs} +6 -6
  118. package/dist/{rollback-DFMiBWf0.cjs.map → rollback-65VVIdBM.cjs.map} +1 -1
  119. package/dist/{rollback-CEE6dse4.mjs → rollback-DpSU2DsD.mjs} +6 -6
  120. package/dist/{rollback-CEE6dse4.mjs.map → rollback-DpSU2DsD.mjs.map} +1 -1
  121. package/dist/{runtime-HabiNBtJ.d.mts → runtime-CN_kmqxo.d.cts} +2 -2
  122. package/dist/{runtime-D48ZKk8_.d.cts.map → runtime-CN_kmqxo.d.cts.map} +1 -1
  123. package/dist/{runtime-D48ZKk8_.d.cts → runtime-Cjvon3oj.d.mts} +2 -2
  124. package/dist/{runtime-HabiNBtJ.d.mts.map → runtime-Cjvon3oj.d.mts.map} +1 -1
  125. package/dist/{seeds-CsI0A_Ef.cjs → seeds-CN6tB-va.cjs} +646 -187
  126. package/dist/{seeds-CsI0A_Ef.cjs.map → seeds-CN6tB-va.cjs.map} +1 -1
  127. package/dist/{seeds-BYdrtZsC.mjs → seeds-perzdN81.mjs} +599 -164
  128. package/dist/seeds-perzdN81.mjs.map +1 -0
  129. package/dist/{sniffer-B0EU73bj.mjs → sniffer-BTtX3NUM.mjs} +3 -3
  130. package/dist/{sniffer-B0EU73bj.mjs.map → sniffer-BTtX3NUM.mjs.map} +1 -1
  131. package/dist/{sniffer-DJYupBeK.cjs → sniffer-IAQEpsQb.cjs} +3 -3
  132. package/dist/{sniffer-DJYupBeK.cjs.map → sniffer-IAQEpsQb.cjs.map} +1 -1
  133. package/dist/{sst-DAqUoZKG.cjs → sst-BgcOsaBi.cjs} +3 -3
  134. package/dist/{sst-DAqUoZKG.cjs.map → sst-BgcOsaBi.cjs.map} +1 -1
  135. package/dist/{sst-D1Qj4sIs.mjs → sst-CJzvyrEz.mjs} +3 -3
  136. package/dist/{sst-D1Qj4sIs.mjs.map → sst-CJzvyrEz.mjs.map} +1 -1
  137. package/dist/{stages-Brn3vcdy.cjs → stages-CUn6gvXL.cjs} +2 -2
  138. package/dist/{stages-Brn3vcdy.cjs.map → stages-CUn6gvXL.cjs.map} +1 -1
  139. package/dist/{stages-DoHHz6pS.mjs → stages-CnZRYmkI.mjs} +2 -2
  140. package/dist/{stages-DoHHz6pS.mjs.map → stages-CnZRYmkI.mjs.map} +1 -1
  141. package/dist/target/public.cjs +1 -1
  142. package/dist/target/public.d.cts +2 -2
  143. package/dist/target/public.d.mts +2 -2
  144. package/dist/target/public.mjs +1 -1
  145. package/dist/{terminal-BTbZlrFV.mjs → terminal-D8TPK7o9.mjs} +3 -3
  146. package/dist/{terminal-BTbZlrFV.mjs.map → terminal-D8TPK7o9.mjs.map} +1 -1
  147. package/dist/{terminal-COv23heb.cjs → terminal-DuapRxh6.cjs} +2 -2
  148. package/dist/{terminal-COv23heb.cjs.map → terminal-DuapRxh6.cjs.map} +1 -1
  149. package/dist/{types-0oAyFOfR.d.cts → types-NqX1Hz4P.d.cts} +210 -205
  150. package/dist/types-NqX1Hz4P.d.cts.map +1 -0
  151. package/dist/{types-BZ01tZs-.d.mts → types-ZHuZ89hv.d.mts} +210 -205
  152. package/dist/types-ZHuZ89hv.d.mts.map +1 -0
  153. package/dist/workspace/index.cjs +3 -1
  154. package/dist/workspace/index.d.cts +3 -3
  155. package/dist/workspace/index.d.mts +3 -3
  156. package/dist/workspace/index.mjs +2 -2
  157. package/dist/{workspace-D2CYLMCW.mjs → workspace-CJ0lKFq-.mjs} +231 -10
  158. package/dist/workspace-CJ0lKFq-.mjs.map +1 -0
  159. package/dist/{workspace-CT0JM3Y8.cjs → workspace-CwW3Gkru.cjs} +266 -9
  160. package/dist/workspace-CwW3Gkru.cjs.map +1 -0
  161. package/package.json +15 -15
  162. package/dist/add-5MZAXybv.cjs.map +0 -1
  163. package/dist/add-D_jNqnfZ.mjs.map +0 -1
  164. package/dist/cli-7edNFwGk.mjs.map +0 -1
  165. package/dist/cli-BL8ZHsLQ.cjs.map +0 -1
  166. package/dist/compose-DbJhRQlh.mjs.map +0 -1
  167. package/dist/compose-xw86kVYi.cjs.map +0 -1
  168. package/dist/credentials-BgJ5mS_d.mjs.map +0 -1
  169. package/dist/credentials-tr26-KML.cjs.map +0 -1
  170. package/dist/deploy-BTfmXd3g.mjs.map +0 -1
  171. package/dist/deploy-CtbZj4zN.cjs.map +0 -1
  172. package/dist/engine-Bt5k_UMq.cjs.map +0 -1
  173. package/dist/engine-jAINgiOB.mjs.map +0 -1
  174. package/dist/index-MnUJuUlj.d.mts.map +0 -1
  175. package/dist/index-elsLJTUv.d.cts.map +0 -1
  176. package/dist/seeds-BYdrtZsC.mjs.map +0 -1
  177. package/dist/types-0oAyFOfR.d.cts.map +0 -1
  178. package/dist/types-BZ01tZs-.d.mts.map +0 -1
  179. package/dist/workspace-CT0JM3Y8.cjs.map +0 -1
  180. package/dist/workspace-D2CYLMCW.mjs.map +0 -1
package/dist/index.mjs CHANGED
@@ -1,23 +1,23 @@
1
1
  #!/usr/bin/env -S npx tsx
2
2
  import { n as __require, t as __exportAll } from "./rolldown-runtime-BhDjJH2R.mjs";
3
- import { d as getDokployRegistryId, f as getDokployToken, g as storeHostingerToken, h as storeDokployCredentials, i as CommandFailed, l as getCredentialsPath, m as removeDokployCredentials, o as DEFAULT_TIMEOUT_MS, u as getDokployCredentials } from "./credentials-BgJ5mS_d.mjs";
3
+ 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, t as MissingCredential, u as getDokployCredentials, v as storeGoDaddyToken, y as storeHostingerToken } from "./credentials-CnVqoXMb.mjs";
4
4
  import { l as withOwningTsconfigJsx, r as discover, u as ConstructGenerator } from "./discover-BPelzeGW.mjs";
5
5
  import { t as appKey } from "./derive-B4vDpzgP.mjs";
6
- import { I as stageSampleRate, M as deployedProblems, N as stageProblems, O as InvalidStages, c as getAppBuildOrder, k as TEST_STAGE, l as getAppGkmConfig, r as allConstructGlobs } from "./workspace-D2CYLMCW.mjs";
6
+ 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-CJ0lKFq-.mjs";
7
7
  import { ConfigNotFound, NotABackendApp, NotInAnApp, loadAppConfig, loadConfig, loadWorkspaceConfig, loadWorkspaceSettings, parseModuleConfig } from "./config.mjs";
8
- import { Cn as loadEnvFiles, Ct as LOCAL_CA_PATH, D as dockerCommand, En as prepareEntryCredentials, Ft as pgClient, Gn as maskPassword, Jn as withCustomSecret, Jt as imageBuildCredentials, K as assertDevServicesFlag, Ln as deployIdentity, Mn as getKeyPath, On as secretsStoreFor, Pn as projectKey, Qt as providerOf, S as provisionCommand, Sn as isPortAvailable, Tn as loadSecretsForApp, Xt as cacheBackendFor, Yn as LOCAL_LOGS_EMAIL, Yt as isImageBuild, Zt as eventsBackendFor, _n as portsOf, a as provisionStage, at as CronGenerator, bn as createEntryWrapper, ct as constructGlobs, dn as telemetryOf, en as CLUSTER_DATABASE, et as workerUnits, hn as fakeKey, ht as readLocalCredentials, it as QueueGenerator, jn as FileSecretsStore, jt as quoteIdentifier, kt as postgresDatabaseNames, ln as scopeTelemetryEnv, lt as derivedContainers, mn as describeServices, nt as workerBundleName, ot as FAKE_ENV, qn as toEmbeddableSecrets, rn as TELEMETRY_CONTAINER, rt as workerEntryDir, sn as appTelemetry, st as backendsOf$1, tt as WorkerGenerator, un as surfaceClientTraced, ut as reconcileWorkspace, vn as primaryPortKey, wn as loadPortState, wt as forgetState, xn as findAvailablePort, yn as createCredentialsPreload, z as createStateStore } from "./seeds-BYdrtZsC.mjs";
8
+ import { $n as LOCAL_LOGS_EMAIL, $t as isImageBuild, An as prepareEntryCredentials, Cn as createCredentialsPreload, Dn as loadEnvFiles, Dt as LOCAL_CA_PATH, En as isPortAvailable, Fn as FileSecretsStore, Ft as quoteIdentifier, In as getKeyPath, Mn as secretsStoreFor, Nt as postgresDatabaseNames, On as loadPortState, Ot as forgetState, Qn as withCustomSecret, Qt as imageBuildCredentials, Rn as projectKey, Sn as primaryPortKey, Tn as findAvailablePort, U as createStateStore, Vn as deployIdentity, X as assertDevServicesFlag, Yn as maskPassword, Zn as toEmbeddableSecrets, a as provisionStage, at as WorkerGenerator, ct as QueueGenerator, dn as appTelemetry, dt as backendsOf$1, en as cacheBackendFor, ft as constructGlobs, h as dockerCommand, hn as telemetryOf, in as CLUSTER_DATABASE, it as workerUnits, kn as loadSecretsForApp, lt as CronGenerator, mn as surfaceClientTraced, mt as reconcileWorkspace, nn as providerOf, ot as workerBundleName, pn as scopeTelemetryEnv, pt as derivedContainers, sn as TELEMETRY_CONTAINER, st as workerEntryDir, tn as eventsBackendFor, u as provisionCommand, ut as FAKE_ENV, vn as describeServices, wn as createEntryWrapper, xn as portsOf, yn as fakeKey, yt as readLocalCredentials, zt as pgClient } from "./seeds-perzdN81.mjs";
9
9
  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-CVc6Oi1Y.mjs";
10
10
  import { generateOpenApi, openapiCommand, resolveOpenApiConfig } from "./openapi.mjs";
11
11
  import { s as isCacheBackend, t as SubscriberGenerator } from "./SubscriberGenerator-BPqQf8fB.mjs";
12
12
  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";
13
13
  import { n as driversFor, r as eventsBackendsIn, t as cacheBackendsIn } from "./drivers-DTZzxeIl.mjs";
14
14
  import { n as withCompute, r as withRoutes, t as manifestModule } from "./emit-C1e8qD08.mjs";
15
- import { t as LocalSandbox } from "./local-Ciq-bTPr.mjs";
16
- import { f as keyFingerprint, n as sniffAppEnvironment, o as DokployApi } from "./sniffer-B0EU73bj.mjs";
17
- import { t as deploy$1 } from "./deploy-BTfmXd3g.mjs";
18
- import { a as stackOverrideFile, c as parseDigests, d as removeEdgeRoutes, f as EDGE_PROJECT, i as ComposePushNeedsBuild, l as pinnedRef, o as composeProject, p as dockerCompose, r as ComposePinNeedsPull, s as stackDir, t as composeTarget, u as edgeDir } from "./compose-DbJhRQlh.mjs";
15
+ import { t as LocalSandbox } from "./local-IuoIF3CT.mjs";
16
+ import { f as keyFingerprint, n as sniffAppEnvironment, o as DokployApi } from "./sniffer-BTtX3NUM.mjs";
17
+ import { t as deploy$1 } from "./deploy-BaERRh0Q.mjs";
18
+ import { _ as planStackDns, a as stackOverrideFile, b as serverAddressHint, d as pinnedRef, f as edgeDir, g as applyStackDns, h as dockerCompose, i as ComposePushNeedsBuild, m as EDGE_PROJECT, o as composeProject, p as removeEdgeRoutes, r as ComposePinNeedsPull, s as stackDir, t as composeTarget, u as parseDigests, v as requiredServerAddress, x as stackHosts, y as serverAddress } from "./compose-Dn0oAgQ0.mjs";
19
19
  import { o as loadCredentialSchemas, t as CredentialsInvalid } from "./credentialSchemas-BJqRJNK4.mjs";
20
- import { t as LocalStateStore } from "./LocalStateStore-Q4vXg2ua.mjs";
20
+ import { t as LocalStateStore } from "./LocalStateStore-C_hYDv6I.mjs";
21
21
  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";
22
22
  import { a as writeTestHarness, i as TEST_MANIFEST_ENV, n as TEST_READY_FILE, t as TEST_READY_ENV } from "./ready-b6vm0-W-.mjs";
23
23
  import { createRequire } from "node:module";
@@ -47,7 +47,7 @@ import crypto from "crypto";
47
47
  import { Function } from "@geekmidas/constructs/functions";
48
48
  import { Topic } from "@geekmidas/constructs/topic";
49
49
  //#region package.json
50
- var version = "10.0.0-alpha.87";
50
+ var version = "10.0.0-alpha.89";
51
51
  //#endregion
52
52
  //#region src/prompt.ts
53
53
  /**
@@ -130,7 +130,7 @@ const logger$8 = console;
130
130
  * Validate Dokploy token by making a test API call
131
131
  */
132
132
  async function validateDokployToken(endpoint, token) {
133
- const { DokployApi } = await import("./sniffer-B0EU73bj.mjs").then((n) => n.c);
133
+ const { DokployApi } = await import("./sniffer-BTtX3NUM.mjs").then((n) => n.c);
134
134
  return new DokployApi({
135
135
  baseUrl: endpoint,
136
136
  token
@@ -177,6 +177,10 @@ async function loginCommand(options) {
177
177
  logger$8.log(` Credentials stored in: ${getCredentialsPath()}`);
178
178
  logger$8.log("\nYou can now use deploy commands without setting DOKPLOY_API_TOKEN.");
179
179
  }
180
+ if (provider === "godaddy") {
181
+ await loginGoDaddy(options);
182
+ return;
183
+ }
180
184
  if (provider === "hostinger") {
181
185
  logger$8.log("\n🔐 Logging in to Hostinger...\n");
182
186
  let token = providedToken;
@@ -199,15 +203,50 @@ async function loginCommand(options) {
199
203
  }
200
204
  }
201
205
  /**
206
+ * Store a GoDaddy Personal Access Token. Not validated: the only call that
207
+ * proves a token without a domain is an account call (`GET /v1/domains`),
208
+ * which a token scoped to `domains.dns:update` alone may not make — the first
209
+ * `gkm setup` that writes a record is where a bad token reports itself.
210
+ */
211
+ async function loginGoDaddy(options) {
212
+ logger$8.log("\n🔐 Logging in to GoDaddy...\n");
213
+ let token = options.token;
214
+ if (!token) {
215
+ logger$8.log("\nCreate a Personal Access Token in the GoDaddy developer dashboard\n(https://developer.godaddy.com) with only the domains.dns:update scope.\n");
216
+ token = await prompt("Personal Access Token: ", {
217
+ hidden: true,
218
+ instead: LOGIN_INSTEAD
219
+ });
220
+ }
221
+ if (!token) {
222
+ logger$8.error("Token is required");
223
+ process.exit(1);
224
+ }
225
+ const where = options.home ? { home: options.home } : void 0;
226
+ await storeGoDaddyToken(token, where);
227
+ logger$8.log("\n✓ GoDaddy token stored.");
228
+ logger$8.log(` Token: ${maskToken(token)}`);
229
+ logger$8.log(` Credentials stored in: ${getCredentialsPath(where)}`);
230
+ 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.");
231
+ logger$8.log("\nYou can now use it as a DNS provider without setting GODADDY_API_TOKEN.");
232
+ }
233
+ /**
202
234
  * Logout from a service
203
235
  */
204
236
  async function logoutCommand(options) {
205
237
  const { provider = "dokploy" } = options;
206
238
  if (provider === "all") {
207
- if (await removeDokployCredentials()) logger$8.log("\n✓ Logged out from all services");
239
+ const dokployRemoved = await removeDokployCredentials();
240
+ const godaddyRemoved = await removeGoDaddyCredentials();
241
+ if (dokployRemoved || godaddyRemoved) logger$8.log("\n✓ Logged out from all services");
208
242
  else logger$8.log("\nNo stored credentials found");
209
243
  return;
210
244
  }
245
+ if (provider === "godaddy") {
246
+ const removed = await removeGoDaddyCredentials();
247
+ logger$8.log(removed ? "\n✓ Logged out from GoDaddy" : "\nNo GoDaddy credentials found");
248
+ return;
249
+ }
211
250
  if (provider === "dokploy") {
212
251
  if (await removeDokployCredentials()) logger$8.log("\n✓ Logged out from Dokploy");
213
252
  else logger$8.log("\nNo Dokploy credentials found");
@@ -224,6 +263,8 @@ async function whoamiCommand() {
224
263
  logger$8.log(` Endpoint: ${dokploy.endpoint}`);
225
264
  logger$8.log(` Token: ${maskToken(dokploy.token)}`);
226
265
  } else logger$8.log(" Dokploy: Not logged in");
266
+ const godaddy = (await readCredentials()).godaddy;
267
+ logger$8.log(godaddy ? ` GoDaddy:\n Token: ${maskToken(godaddy.token)}` : " GoDaddy: Not logged in");
227
268
  logger$8.log(`\n Credentials file: ${getCredentialsPath()}`);
228
269
  }
229
270
  /**
@@ -493,6 +534,54 @@ var UnsupportedPlatform = class extends Error {
493
534
  }
494
535
  };
495
536
  //#endregion
537
+ //#region src/workspace/stageTypes.ts
538
+ /**
539
+ * `.gkm/stages.d.ts`: the declared stages, as types application code can see.
540
+ *
541
+ * Constructs and app code cannot import `gkm.config.ts`, so the stage names it
542
+ * declares were plain strings everywhere else. This writes them into
543
+ * `@geekmidas/constructs`' `Stages` interface, which `LocalStage`,
544
+ * `DeployedStage` and `AnyStage` read — an `ExternalApi` url keyed `prodution`
545
+ * becomes a type error. Without the file those types are `string`.
546
+ *
547
+ * Written by `gkm dev`, `gkm build` and `gkm test --prepare`, beside the
548
+ * generated clients; a project's tsconfig `include`s it.
549
+ */
550
+ /** Where the declaration is written, relative to the workspace root. */
551
+ const STAGE_TYPES_FILE = ".gkm/stages.d.ts";
552
+ /** A union of string literal types: `'staging' | 'prod'`, or `never`. */
553
+ function union(names) {
554
+ return names.length ? names.map((name) => `'${name}'`).join(" | ") : "never";
555
+ }
556
+ /** The declaration for a stages block. */
557
+ function stageTypesDeclaration(stages) {
558
+ return `// Generated by gkm from the \`stages\` in gkm.config.ts — do not edit.
559
+ // \`gkm dev\`, \`gkm build\` and \`gkm test --prepare\` rewrite it.
560
+ export {};
561
+
562
+ declare module '@geekmidas/constructs' {
563
+ interface Stages {
564
+ local: ${union([stages.local])};
565
+ deployed: ${union(stages.deployed)};
566
+ }
567
+ }
568
+ `;
569
+ }
570
+ /**
571
+ * Write `.gkm/stages.d.ts` under the workspace root, and return its path — or
572
+ * nothing when there are no stages to write. Left untouched when unchanged, so
573
+ * an editor's watcher does not re-check the project on every start.
574
+ */
575
+ async function writeStageTypes(root, stages) {
576
+ if (!stages) return void 0;
577
+ const path = join(root, STAGE_TYPES_FILE);
578
+ const content = stageTypesDeclaration(stages);
579
+ if (await readFile(path, "utf8").catch(() => void 0) === content) return path;
580
+ await mkdir(join(root, ".gkm"), { recursive: true });
581
+ await writeFile(path, content);
582
+ return path;
583
+ }
584
+ //#endregion
496
585
  //#region src/dev/credentials.ts
497
586
  /**
498
587
  * `gkm dev:credentials` — where to sign in to each local service, and as
@@ -1806,8 +1895,10 @@ async function devCommand(options) {
1806
1895
  if (!appConfig) {
1807
1896
  logger$5.log("🔎 Reading gkm.config.ts and the constructs");
1808
1897
  const { workspace: everything } = await loadWorkspaceConfig();
1898
+ await writeStageTypes(everything.root, everything.stages);
1809
1899
  return workspaceDevCommand(everything, options);
1810
1900
  }
1901
+ await writeStageTypes(appConfig.workspace.root, appConfig.workspace.stages);
1811
1902
  const config = appConfig.gkmConfig;
1812
1903
  const appRoot = appConfig.appRoot;
1813
1904
  const secretsRoot = appConfig.workspaceRoot;
@@ -2233,9 +2324,9 @@ async function workspaceDevCommand(configured, options) {
2233
2324
  for (const { id, port } of fakes) logger$5.log(`🎭 ${id} fake: http://localhost:${port}`);
2234
2325
  logger$5.log(options.migrate || options.seed ? "🗄️ Migrating the databases" : "🗄️ Checking for pending migrations");
2235
2326
  if (options.migrate || options.seed) {
2236
- const { prepareDevDatabases } = await import("./migrate-ggkPVJRC.mjs");
2327
+ const { prepareDevDatabases } = await import("./migrate-CKLJ73OO.mjs");
2237
2328
  await prepareDevDatabases(workspace, reconciled.env, { seed: !!options.seed });
2238
- } else await import("./migrate-ggkPVJRC.mjs").then(({ reportPendingMigrations }) => reportPendingMigrations(workspace, reconciled.env)).catch((error) => {
2329
+ } else await import("./migrate-CKLJ73OO.mjs").then(({ reportPendingMigrations }) => reportPendingMigrations(workspace, reconciled.env)).catch((error) => {
2239
2330
  logger$5.log(`⚠️ Could not check for pending migrations: ${error instanceof Error ? error.message : String(error)}`);
2240
2331
  });
2241
2332
  const appUrls = {};
@@ -3138,6 +3229,7 @@ var UnknownCacheBackend = class extends Error {
3138
3229
  };
3139
3230
  async function buildCommand(options) {
3140
3231
  const loadedConfig = await loadWorkspaceConfig();
3232
+ await writeStageTypes(loadedConfig.workspace.root, loadedConfig.workspace.stages);
3141
3233
  if (loadedConfig.type === "workspace") {
3142
3234
  const cwd = resolve(process.cwd());
3143
3235
  const workspaceRoot = resolve(loadedConfig.workspace.root);
@@ -3287,7 +3379,7 @@ async function buildApp(input) {
3287
3379
  ...production,
3288
3380
  ...telemetry ? { telemetry } : {}
3289
3381
  });
3290
- const { bundleServer } = await import("./bundler-BMo-JP5s.mjs");
3382
+ const { bundleServer } = await import("./bundler-C_fCgcVO.mjs");
3291
3383
  await bundleServer({
3292
3384
  entryPoint,
3293
3385
  outputDir: join(outputDir, "dist"),
@@ -3432,7 +3524,7 @@ async function buildWorkers(input) {
3432
3524
  });
3433
3525
  logger$4.log(`Generated worker ${worker.id}: ${crons.length} crons, ${queues.length} queues, ${subscribers.length} subscribers`);
3434
3526
  if (!input.bundle) continue;
3435
- const { bundleServer } = await import("./bundler-BMo-JP5s.mjs");
3527
+ const { bundleServer } = await import("./bundler-C_fCgcVO.mjs");
3436
3528
  const outfile = workerBundleName(worker.id);
3437
3529
  await bundleServer({
3438
3530
  entryPoint,
@@ -3518,7 +3610,7 @@ async function buildForTarget(target, context, appRoot, workspaceRoot, endpointG
3518
3610
  let masterKey;
3519
3611
  if (context.production?.bundle && !skipBundle) {
3520
3612
  logger$4.log(`\n📦 Bundling production server...`);
3521
- const { bundleServer } = await import("./bundler-BMo-JP5s.mjs");
3613
+ const { bundleServer } = await import("./bundler-C_fCgcVO.mjs");
3522
3614
  const allConstructs = [
3523
3615
  ...endpoints.map((e) => e.construct),
3524
3616
  ...functions.map((f) => f.construct),
@@ -3812,6 +3904,7 @@ async function composeCommand(options, deps = {}) {
3812
3904
  ...options.dryRun ? { dryRun: true } : {},
3813
3905
  ...options.push ? { buildOnly: true } : {},
3814
3906
  ...options.allowDevServices ? { allowDevServices: true } : {},
3907
+ ...options.skipDnsCheck ? { skipDnsCheck: true } : {},
3815
3908
  logger: {
3816
3909
  info: (message) => console.log(message),
3817
3910
  warn: (message) => console.warn(message),
@@ -5219,25 +5312,25 @@ function loadPackageJson() {
5219
5312
  * Run: pnpm --filter @geekmidas/cli sync-versions
5220
5313
  */
5221
5314
  const GEEKMIDAS_VERSIONS = {
5222
- "@geekmidas/audit": "~10.0.0-alpha.87",
5223
- "@geekmidas/auth": "~10.0.0-alpha.87",
5224
- "@geekmidas/cache": "~10.0.0-alpha.87",
5225
- "@geekmidas/client": "~10.0.0-alpha.87",
5226
- "@geekmidas/cloud": "~10.0.0-alpha.87",
5227
- "@geekmidas/constructs": "~10.0.0-alpha.87",
5228
- "@geekmidas/db": "~10.0.0-alpha.87",
5229
- "@geekmidas/emailkit": "~10.0.0-alpha.87",
5230
- "@geekmidas/envkit": "~10.0.0-alpha.87",
5231
- "@geekmidas/errors": "~10.0.0-alpha.87",
5232
- "@geekmidas/events": "~10.0.0-alpha.87",
5233
- "@geekmidas/logger": "~10.0.0-alpha.87",
5234
- "@geekmidas/manifest": "~10.0.0-alpha.87",
5235
- "@geekmidas/rate-limit": "~10.0.0-alpha.87",
5236
- "@geekmidas/schema": "~10.0.0-alpha.87",
5237
- "@geekmidas/services": "~10.0.0-alpha.87",
5238
- "@geekmidas/storage": "~10.0.0-alpha.87",
5239
- "@geekmidas/telescope": "~10.0.0-alpha.87",
5240
- "@geekmidas/testkit": "~10.0.0-alpha.87",
5315
+ "@geekmidas/audit": "~10.0.0-alpha.89",
5316
+ "@geekmidas/auth": "~10.0.0-alpha.89",
5317
+ "@geekmidas/cache": "~10.0.0-alpha.89",
5318
+ "@geekmidas/client": "~10.0.0-alpha.89",
5319
+ "@geekmidas/cloud": "~10.0.0-alpha.89",
5320
+ "@geekmidas/constructs": "~10.0.0-alpha.89",
5321
+ "@geekmidas/db": "~10.0.0-alpha.89",
5322
+ "@geekmidas/emailkit": "~10.0.0-alpha.89",
5323
+ "@geekmidas/envkit": "~10.0.0-alpha.89",
5324
+ "@geekmidas/errors": "~10.0.0-alpha.89",
5325
+ "@geekmidas/events": "~10.0.0-alpha.89",
5326
+ "@geekmidas/logger": "~10.0.0-alpha.89",
5327
+ "@geekmidas/manifest": "~10.0.0-alpha.89",
5328
+ "@geekmidas/rate-limit": "~10.0.0-alpha.89",
5329
+ "@geekmidas/schema": "~10.0.0-alpha.89",
5330
+ "@geekmidas/services": "~10.0.0-alpha.89",
5331
+ "@geekmidas/storage": "~10.0.0-alpha.89",
5332
+ "@geekmidas/telescope": "~10.0.0-alpha.89",
5333
+ "@geekmidas/testkit": "~10.0.0-alpha.89",
5241
5334
  "@geekmidas/cli": `~${loadPackageJson().version}`
5242
5335
  };
5243
5336
  //#endregion
@@ -5288,7 +5381,7 @@ function generateAuthAppFiles(options) {
5288
5381
  [`@${options.name}/*`]: ["../../packages/*/src"]
5289
5382
  }
5290
5383
  },
5291
- include: ["src/**/*.ts"],
5384
+ include: ["src/**/*.ts", "../../.gkm/stages.d.ts"],
5292
5385
  exclude: ["node_modules", "dist"]
5293
5386
  };
5294
5387
  return [
@@ -5399,7 +5492,7 @@ export default defineConfig({${stagesBlock(options.stages)}${options.monorepo ?
5399
5492
  gkmConfig += `
5400
5493
  });
5401
5494
  `;
5402
- const tsConfig = options.monorepo ? workspaceApiTsConfig(options.name) : {
5495
+ const tsConfig = options.monorepo ? workspaceApiTsConfig(options.name, ".gkm/stages.d.ts") : {
5403
5496
  compilerOptions: {
5404
5497
  target: "ES2022",
5405
5498
  module: "NodeNext",
@@ -5414,7 +5507,7 @@ export default defineConfig({${stagesBlock(options.stages)}${options.monorepo ?
5414
5507
  allowImportingTsExtensions: true,
5415
5508
  paths: { "~/*": ["./src/*"] }
5416
5509
  },
5417
- include: ["src/**/*.ts"],
5510
+ include: ["src/**/*.ts", ".gkm/stages.d.ts"],
5418
5511
  exclude: ["node_modules", "dist"]
5419
5512
  };
5420
5513
  if (options.monorepo) {
@@ -5529,7 +5622,7 @@ export default defineConfig({${stagesBlock(options.stages)}${options.monorepo ?
5529
5622
  * the root constructs, so in the other `@<name>/constructs/api.ts` fell through
5530
5623
  * to the `packages/` mapping and nothing could load the surface.
5531
5624
  */
5532
- function workspaceApiTsConfig(name) {
5625
+ function workspaceApiTsConfig(name, stageTypes) {
5533
5626
  return {
5534
5627
  extends: "../../tsconfig.json",
5535
5628
  compilerOptions: {
@@ -5541,12 +5634,12 @@ function workspaceApiTsConfig(name) {
5541
5634
  [`@${name}/*`]: ["../../packages/*/src"]
5542
5635
  }
5543
5636
  },
5544
- include: ["src/**/*.ts"],
5637
+ include: ["src/**/*.ts", stageTypes],
5545
5638
  exclude: ["node_modules", "dist"]
5546
5639
  };
5547
5640
  }
5548
5641
  function generateSingleAppConfigFiles(options, _template, _helpers) {
5549
- const tsConfig = workspaceApiTsConfig(options.name);
5642
+ const tsConfig = workspaceApiTsConfig(options.name, "../../.gkm/stages.d.ts");
5550
5643
  const files = [{
5551
5644
  path: "tsconfig.json",
5552
5645
  content: `${JSON.stringify(tsConfig, null, 2)}\n`
@@ -5638,7 +5731,7 @@ const COMMIT = /^[0-9a-f]{40}$/;
5638
5731
  * The `uses:` value for the stages action, with a comment saying which CLI
5639
5732
  * release the pinned commit is.
5640
5733
  */
5641
- function stagesActionUses(commit = "8bf34e377e5def9821eacaea3971d6daf6c91748", version = cliVersion()) {
5734
+ function stagesActionUses(commit = "e1be097c3e5909843479a2dcd97f06e952f5b1aa", version = cliVersion()) {
5642
5735
  return commit && COMMIT.test(commit) ? `${STAGES_ACTION}@${commit} # @geekmidas/cli ${version}` : `${STAGES_ACTION}@main # pin to a commit SHA: see the action's README`;
5643
5736
  }
5644
5737
  //#endregion
@@ -7398,6 +7491,7 @@ ${isSst ? "\n# SST\n.sst/\n" : ""}`;
7398
7491
  forceConsistentCasingInFileNames: true,
7399
7492
  resolveJsonModule: true
7400
7493
  },
7494
+ include: ["**/*", ".gkm/stages.d.ts"],
7401
7495
  exclude: [
7402
7496
  "node_modules",
7403
7497
  "dist",
@@ -10919,6 +11013,135 @@ function maskUrl(url) {
10919
11013
  }
10920
11014
  }
10921
11015
  //#endregion
11016
+ //#region src/providers/dns.ts
11017
+ /** Whether the workspace deploys through the compose target. */
11018
+ function deploysWithCompose(workspace) {
11019
+ return workspace.deploy?.default === "compose" || Object.values(workspace.apps).some((app) => app.resolvedDeployTarget === "compose");
11020
+ }
11021
+ /**
11022
+ * A compose stage that serves a domain has its server's address in its
11023
+ * secrets — checked before `gkm setup --stage` does anything else.
11024
+ *
11025
+ * @throws {ServerAddressMissing} for a compose stage with a domain and none
11026
+ * @throws {ServerAddressInvalid} for a value that is not an address
11027
+ */
11028
+ function assertStageServer(workspace, stage, secrets) {
11029
+ if (stage === workspace.stages.local) return void 0;
11030
+ if (!deploysWithCompose(workspace)) return serverAddress(stage, secrets?.custom);
11031
+ return requiredServerAddress(stage, workspace.domains?.[stage], secrets?.custom);
11032
+ }
11033
+ /**
11034
+ * The hosts a compose stage serves: its stack composed as a deploy would —
11035
+ * with the secrets it would generate made up in memory, never written — and
11036
+ * every route's host read off it.
11037
+ */
11038
+ async function composeStageHosts(options) {
11039
+ const { workspace, stage } = options;
11040
+ const runnables = options.runnables ?? {};
11041
+ const background = options.background ?? {};
11042
+ const manifest = options.manifest ?? await discover({
11043
+ patterns: constructGlobs(workspace),
11044
+ cwd: workspace.root,
11045
+ runnables,
11046
+ background
11047
+ });
11048
+ const stored = await (await secretsStoreFor(workspace, stage, {
11049
+ ...options.profile ? { profile: options.profile } : {},
11050
+ ...options.home ? { home: options.home } : {}
11051
+ })).read(stage);
11052
+ const { deployedStackSecrets } = await import("./compose-Dn0oAgQ0.mjs").then((n) => n.l);
11053
+ const { composeStack } = await import("./compose-Dn0oAgQ0.mjs").then((n) => n.c);
11054
+ const { secrets } = deployedStackSecrets(workspace, stage, stored, manifest);
11055
+ const stack = composeStack({
11056
+ workspace,
11057
+ manifest,
11058
+ runnables,
11059
+ background,
11060
+ stage,
11061
+ identity: deployIdentity(workspace, stage),
11062
+ images: {
11063
+ mode: "pull",
11064
+ tag: "dns",
11065
+ ...workspace.deploy?.registry ? { registry: workspace.deploy.registry } : {}
11066
+ },
11067
+ secrets,
11068
+ buildOnly: true,
11069
+ allowDevServices: true
11070
+ });
11071
+ return stackHosts(stack);
11072
+ }
11073
+ /**
11074
+ * `GKM_SERVER_IPV4` from the stage's secrets and `dns`: each public host's
11075
+ * records, created or corrected. A dry run reads and prints, and writes
11076
+ * nothing.
11077
+ */
11078
+ async function provisionStageDns(options) {
11079
+ const { workspace, stage } = options;
11080
+ const log = options.log ?? ((line) => console.log(line));
11081
+ if (stage === workspace.stages.local || !workspace.dns || !deploysWithCompose(workspace)) return {
11082
+ mode: "none",
11083
+ hosts: [],
11084
+ changes: []
11085
+ };
11086
+ const store = await secretsStoreFor(workspace, stage, {
11087
+ ...options.profile ? { profile: options.profile } : {},
11088
+ ...options.home ? { home: options.home } : {}
11089
+ });
11090
+ const server = serverAddress(stage, (await store.read(stage))?.custom);
11091
+ if (!server) {
11092
+ log(`\n🌐 DNS for '${stage}': no GKM_SERVER_IPV4 in its secrets, so no records — ${serverAddressHint(stage)}`);
11093
+ return {
11094
+ mode: "none",
11095
+ hosts: [],
11096
+ changes: []
11097
+ };
11098
+ }
11099
+ const hosts = [...options.hosts ?? await composeStageHosts({
11100
+ workspace,
11101
+ stage,
11102
+ ...options.profile ? { profile: options.profile } : {},
11103
+ ...options.home ? { home: options.home } : {},
11104
+ ...options.manifest ? { manifest: options.manifest } : {},
11105
+ ...options.runnables ? { runnables: options.runnables } : {},
11106
+ ...options.background ? { background: options.background } : {}
11107
+ })];
11108
+ log(`\n🌐 DNS for '${stage}' → ${server.ipv4}${server.ipv6 ? ` / ${server.ipv6}` : ""}${options.dryRun ? " (dry run — nothing is written)" : ""}`);
11109
+ const plan = planStackDns({
11110
+ stage,
11111
+ hosts,
11112
+ server,
11113
+ dns: workspace.dns
11114
+ });
11115
+ try {
11116
+ return {
11117
+ mode: "records",
11118
+ hosts,
11119
+ changes: await applyStackDns(plan, {
11120
+ ...options.dryRun ? { dryRun: true } : {},
11121
+ log,
11122
+ credentials: {
11123
+ env: options.env ?? process.env,
11124
+ ...options.home ? { home: options.home } : {},
11125
+ log
11126
+ },
11127
+ ...options.providerFor ? { providerFor: options.providerFor } : {}
11128
+ })
11129
+ };
11130
+ } catch (error) {
11131
+ if (error instanceof MissingCredential) {
11132
+ log(` ⚠ ${error.message}`);
11133
+ log(" Until then, create these records yourself:");
11134
+ for (const domain of plan.domains) for (const r of domain.records) log(` ${r.host.padEnd(32)} ${r.type.padEnd(5)} ${r.value} (TTL ${r.ttl})`);
11135
+ return {
11136
+ mode: "records",
11137
+ hosts,
11138
+ changes: []
11139
+ };
11140
+ }
11141
+ throw error;
11142
+ }
11143
+ }
11144
+ //#endregion
10922
11145
  //#region src/setup/index.ts
10923
11146
  var setup_exports = /* @__PURE__ */ __exportAll({
10924
11147
  createFreshWorkspaceSecrets: () => createFreshWorkspaceSecrets,
@@ -10952,6 +11175,7 @@ async function setupCommand(options = {}) {
10952
11175
  logger$1.log(`📦 Workspace: ${workspace.name}`);
10953
11176
  logger$1.log(`📱 Apps: ${Object.keys(workspace.apps).join(", ")}`);
10954
11177
  logger$1.log(`🔑 Stage: ${stage}\n`);
11178
+ if (!local) assertStageServer(workspace, stage, await (await secretsStoreFor(workspace, stage, { ...options.profile ? { profile: options.profile } : {} })).read(stage));
10955
11179
  if (!local && options.dryRun) {
10956
11180
  await provisionDeployed(workspace, stage, options);
10957
11181
  return;
@@ -10985,11 +11209,16 @@ async function provisionDeployed(workspace, stage, options) {
10985
11209
  ...options.retireOldKeys ? { retireOldKeys: true } : {},
10986
11210
  log: (line) => logger$1.log(line)
10987
11211
  })).filter((r) => r.mode === "provider");
10988
- if (configured.length === 0) {
10989
- 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.`);
10990
- return;
10991
- }
10992
- const changes = configured.reduce((n, r) => n + r.actions.length, 0);
11212
+ 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.`);
11213
+ const dns = await provisionStageDns({
11214
+ workspace,
11215
+ stage,
11216
+ ...options.dryRun ? { dryRun: true } : {},
11217
+ ...options.profile ? { profile: options.profile } : {},
11218
+ log: (line) => logger$1.log(line)
11219
+ });
11220
+ const changes = configured.reduce((n, r) => n + r.actions.length, 0) + dns.changes.filter((c) => c.action !== "unchanged" && c.action !== "manual").length;
11221
+ if (configured.length === 0 && dns.mode === "none") return;
10993
11222
  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"})`}`);
10994
11223
  }
10995
11224
  /**
@@ -11260,6 +11489,7 @@ async function testCommand(options = {}) {
11260
11489
  const preloadPath = join(gkmDir, "test-credentials-preload.ts");
11261
11490
  await createCredentialsPreload(preloadPath, result.secretsJsonPath);
11262
11491
  const workspace = await loadWorkspaceConfig(cwd).then((loaded) => loaded.workspace).catch(() => void 0);
11492
+ if (workspace) await writeStageTypes(workspace.root, workspace.stages);
11263
11493
  const manifestPath = workspace ? await writeTestHarness({
11264
11494
  root: workspace.root,
11265
11495
  targets: [workspace.root, ...Object.values(workspace.apps).map((app) => isAbsolute(app.path) ? app.path : join(workspace.root, app.path))],
@@ -11343,7 +11573,7 @@ function testDatabases(reconciled) {
11343
11573
  * starts without the reference data the app needs.
11344
11574
  */
11345
11575
  async function migrateTestStage(workspace, env) {
11346
- const { migrateAndSeed } = await import("./migrate-ggkPVJRC.mjs");
11576
+ const { migrateAndSeed } = await import("./migrate-CKLJ73OO.mjs");
11347
11577
  const { discover } = await import("./discover-BPelzeGW.mjs").then((n) => n.i);
11348
11578
  const sources = {};
11349
11579
  const manifest = await discover({
@@ -11787,7 +12017,7 @@ program.command("migrate").description("Apply each database construct's migratio
11787
12017
  try {
11788
12018
  const globalOptions = program.opts();
11789
12019
  if (globalOptions.cwd) process.chdir(globalOptions.cwd);
11790
- const { migrateCommand } = await import("./migrate-ggkPVJRC.mjs");
12020
+ const { migrateCommand } = await import("./migrate-CKLJ73OO.mjs");
11791
12021
  await migrateCommand({
11792
12022
  ...options,
11793
12023
  ...construct ? { construct } : {}
@@ -11801,7 +12031,7 @@ program.command("seed").description("Migrate, then run each database construct's
11801
12031
  try {
11802
12032
  const globalOptions = program.opts();
11803
12033
  if (globalOptions.cwd) process.chdir(globalOptions.cwd);
11804
- const { seedCommand } = await import("./migrate-ggkPVJRC.mjs");
12034
+ const { seedCommand } = await import("./migrate-CKLJ73OO.mjs");
11805
12035
  await seedCommand({
11806
12036
  ...options,
11807
12037
  ...construct ? { construct } : {}
@@ -11815,7 +12045,7 @@ program.command("migration").description("Write a construct's next migration: an
11815
12045
  try {
11816
12046
  const globalOptions = program.opts();
11817
12047
  if (globalOptions.cwd) process.chdir(globalOptions.cwd);
11818
- const { migrationCommand } = await import("./migrate-ggkPVJRC.mjs");
12048
+ const { migrationCommand } = await import("./migrate-CKLJ73OO.mjs");
11819
12049
  await migrationCommand({
11820
12050
  construct,
11821
12051
  ...name ? { name } : {}
@@ -11864,7 +12094,7 @@ program.command("docker").description("Generate Docker deployment files").option
11864
12094
  process.exit(1);
11865
12095
  }
11866
12096
  });
11867
- 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").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-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) => {
11868
12098
  try {
11869
12099
  const globalOptions = program.opts();
11870
12100
  if (globalOptions.cwd) process.chdir(globalOptions.cwd);
@@ -11923,7 +12153,7 @@ program.command("secrets:add").description("Build the keys a stage must be given
11923
12153
  try {
11924
12154
  const globalOptions = program.opts();
11925
12155
  if (globalOptions.cwd) process.chdir(globalOptions.cwd);
11926
- const { secretsAddCommand } = await import("./add-D_jNqnfZ.mjs");
12156
+ const { secretsAddCommand } = await import("./add-v3tCbrpE.mjs");
11927
12157
  await secretsAddCommand(options);
11928
12158
  } catch (error) {
11929
12159
  console.error(formatError(error));
@@ -11934,7 +12164,7 @@ program.command("encryption:rotate").description("Add a new current key to an En
11934
12164
  try {
11935
12165
  const globalOptions = program.opts();
11936
12166
  if (globalOptions.cwd) process.chdir(globalOptions.cwd);
11937
- const { encryptionRotateCommand } = await import("./encryption-C-8Tt5Hh.mjs");
12167
+ const { encryptionRotateCommand } = await import("./encryption-BQmhq9_y.mjs");
11938
12168
  await encryptionRotateCommand(construct, options);
11939
12169
  } catch (error) {
11940
12170
  console.error(formatError(error));
@@ -11945,7 +12175,7 @@ program.command("encryption:retire").description("Remove an old key from an Encr
11945
12175
  try {
11946
12176
  const globalOptions = program.opts();
11947
12177
  if (globalOptions.cwd) process.chdir(globalOptions.cwd);
11948
- const { encryptionRetireCommand } = await import("./encryption-C-8Tt5Hh.mjs");
12178
+ const { encryptionRetireCommand } = await import("./encryption-BQmhq9_y.mjs");
11949
12179
  await encryptionRetireCommand(construct, key, options);
11950
12180
  } catch (error) {
11951
12181
  console.error(formatError(error));
@@ -11987,8 +12217,8 @@ program.command("secrets:reconcile").description("Backfill missing custom secret
11987
12217
  const globalOptions = program.opts();
11988
12218
  if (globalOptions.cwd) process.chdir(globalOptions.cwd);
11989
12219
  const { loadWorkspaceConfig } = await import("./config.mjs");
11990
- const { reconcileMissingSecrets } = await import("./reconcile--I7V4Klj.mjs");
11991
- const { secretsStoreFor } = await import("./seeds-BYdrtZsC.mjs").then((n) => n.An);
12220
+ const { reconcileMissingSecrets } = await import("./reconcile-Dh1Jk7WE.mjs");
12221
+ const { secretsStoreFor } = await import("./seeds-perzdN81.mjs").then((n) => n.Pn);
11992
12222
  const { workspace } = await loadWorkspaceConfig();
11993
12223
  const stage = options.stage ?? workspace.stages.local;
11994
12224
  const store = await secretsStoreFor(workspace, stage);
@@ -11997,7 +12227,7 @@ program.command("secrets:reconcile").description("Backfill missing custom secret
11997
12227
  console.error(`No secrets found for stage "${stage}". Run "gkm secrets:init --stage ${stage}" first.`);
11998
12228
  process.exit(1);
11999
12229
  }
12000
- const { derivedContainers } = await import("./seeds-BYdrtZsC.mjs").then((n) => n.dt);
12230
+ const { derivedContainers } = await import("./seeds-perzdN81.mjs").then((n) => n.ht);
12001
12231
  const result = reconcileMissingSecrets(secrets, workspace, await derivedContainers(workspace, stage));
12002
12232
  if (!result) {
12003
12233
  console.log(`\n✓ Secrets for stage "${stage}" are up-to-date`);
@@ -12015,15 +12245,15 @@ program.command("secrets:migrate").description("Copy a deployed stage's secrets
12015
12245
  try {
12016
12246
  const globalOptions = program.opts();
12017
12247
  if (globalOptions.cwd) process.chdir(globalOptions.cwd);
12018
- const { secretsMigrateCommand } = await import("./migrate-Dn7nK6sh.mjs");
12248
+ const { secretsMigrateCommand } = await import("./migrate-CpmO5qnl.mjs");
12019
12249
  await secretsMigrateCommand(options);
12020
12250
  } catch (error) {
12021
12251
  console.error(formatError(error));
12022
12252
  process.exit(1);
12023
12253
  }
12024
12254
  });
12025
- 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").action(async (options) => {
12026
- const { deployCli } = await import("./cli-7edNFwGk.mjs");
12255
+ 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) => {
12256
+ const { deployCli } = await import("./cli-REdO9X5b.mjs");
12027
12257
  const globalOptions = program.opts();
12028
12258
  const code = await deployCli({
12029
12259
  cwd: resolve(globalOptions.cwd ?? process.cwd()),
@@ -12034,14 +12264,15 @@ program.command("deploy").description("Deploy a stage through its target").optio
12034
12264
  ...options.json ? { json: true } : {},
12035
12265
  ...options.dryRun ? { dryRun: true } : {},
12036
12266
  ...options.atomic ? { atomic: true } : {},
12037
- ...options.allowDevServices ? { allowDevServices: true } : {}
12267
+ ...options.allowDevServices ? { allowDevServices: true } : {},
12268
+ ...options.skipDnsCheck ? { skipDnsCheck: true } : {}
12038
12269
  });
12039
12270
  if (code !== 0) process.exit(code);
12040
12271
  });
12041
12272
  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) => {
12042
12273
  try {
12043
- const { rollbackStage } = await import("./rollback-CEE6dse4.mjs").then((n) => n.a);
12044
- const { terminalCredentials } = await import("./terminal-BTbZlrFV.mjs");
12274
+ const { rollbackStage } = await import("./rollback-DpSU2DsD.mjs").then((n) => n.a);
12275
+ const { terminalCredentials } = await import("./terminal-D8TPK7o9.mjs");
12045
12276
  const globalOptions = program.opts();
12046
12277
  await rollbackStage({
12047
12278
  cwd: resolve(globalOptions.cwd ?? process.cwd()),
@@ -12076,7 +12307,7 @@ program.command("deploy:github").description("Let GitHub Actions deploy a stage:
12076
12307
  try {
12077
12308
  const globalOptions = program.opts();
12078
12309
  if (globalOptions.cwd) process.chdir(globalOptions.cwd);
12079
- const { deployGithubCommand } = await import("./github-CZHAtwPT.mjs");
12310
+ const { deployGithubCommand } = await import("./github-xzg99wz8.mjs");
12080
12311
  await deployGithubCommand(options);
12081
12312
  } catch (error) {
12082
12313
  console.error(formatError(error));
@@ -12087,7 +12318,7 @@ program.command("stages").description("The workspace's stages from gkm.config.ts
12087
12318
  try {
12088
12319
  const globalOptions = program.opts();
12089
12320
  if (globalOptions.cwd) process.chdir(globalOptions.cwd);
12090
- const { stagesCommand } = await import("./stages-DoHHz6pS.mjs");
12321
+ const { stagesCommand } = await import("./stages-CnZRYmkI.mjs");
12091
12322
  await stagesCommand(options);
12092
12323
  } catch (error) {
12093
12324
  console.error(formatError(error));
@@ -12121,13 +12352,17 @@ program.command("deploy:list").description("List Dokploy resources (projects, re
12121
12352
  process.exit(1);
12122
12353
  }
12123
12354
  });
12124
- program.command("login").description("Authenticate with a deployment or DNS provider").option("--provider <provider>", "Provider to log in to (dokploy, hostinger)", "dokploy").option("--service <provider>", "[DEPRECATED] Use --provider instead").option("--token <token>", "API token (will prompt if not provided)").option("--endpoint <url>", "Service endpoint URL").action(async (options) => {
12355
+ program.command("login").description("Authenticate with a deployment or DNS provider").option("--provider <provider>", "Provider to log in to (dokploy, hostinger, godaddy)", "dokploy").option("--service <provider>", "[DEPRECATED] Use --provider instead").option("--token <token>", "API token (will prompt if not provided)").option("--endpoint <url>", "Service endpoint URL").action(async (options) => {
12125
12356
  try {
12126
12357
  const globalOptions = program.opts();
12127
12358
  if (globalOptions.cwd) process.chdir(globalOptions.cwd);
12128
12359
  const provider = options.service ?? options.provider;
12129
- if (!["dokploy", "hostinger"].includes(provider)) {
12130
- console.error(`Unknown provider: ${provider}. Supported: dokploy, hostinger`);
12360
+ if (![
12361
+ "dokploy",
12362
+ "hostinger",
12363
+ "godaddy"
12364
+ ].includes(provider)) {
12365
+ console.error(`Unknown provider: ${provider}. Supported: dokploy, hostinger, godaddy`);
12131
12366
  process.exit(1);
12132
12367
  }
12133
12368
  await loginCommand({
@@ -12140,7 +12375,7 @@ program.command("login").description("Authenticate with a deployment or DNS prov
12140
12375
  process.exit(1);
12141
12376
  }
12142
12377
  });
12143
- program.command("logout").description("Remove stored credentials").option("--provider <provider>", "Whose credentials to remove (dokploy, all)", "dokploy").option("--service <provider>", "[DEPRECATED] Use --provider instead").action(async (options) => {
12378
+ program.command("logout").description("Remove stored credentials").option("--provider <provider>", "Whose credentials to remove (dokploy, godaddy, all)", "dokploy").option("--service <provider>", "[DEPRECATED] Use --provider instead").action(async (options) => {
12144
12379
  try {
12145
12380
  const globalOptions = program.opts();
12146
12381
  if (globalOptions.cwd) process.chdir(globalOptions.cwd);
@@ -12228,6 +12463,6 @@ try {
12228
12463
  }
12229
12464
  program.parse();
12230
12465
  //#endregion
12231
- export { validateDokployToken as a, formatError as i, slug as n, canPrompt as o, stamp as r, prompt as s, generateFullstackCustomSecrets as t };
12466
+ export { formatError as a, prompt as c, stamp as i, generateFullstackCustomSecrets as n, validateDokployToken as o, slug as r, canPrompt as s, deploysWithCompose as t };
12232
12467
 
12233
12468
  //# sourceMappingURL=index.mjs.map