@geekmidas/cli 10.0.0-alpha.141 → 10.0.0-alpha.142

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 (260) hide show
  1. package/dist/{EndpointGenerator-BMRL04ic.mjs → EndpointGenerator-CusLH-9S.mjs} +2 -2
  2. package/dist/{EndpointGenerator-BMRL04ic.mjs.map → EndpointGenerator-CusLH-9S.mjs.map} +1 -1
  3. package/dist/{EndpointGenerator-ePscnbwB.cjs → EndpointGenerator-DyLMYClE.cjs} +2 -2
  4. package/dist/{EndpointGenerator-ePscnbwB.cjs.map → EndpointGenerator-DyLMYClE.cjs.map} +1 -1
  5. package/dist/{GoDaddyProvider-DxFAueU4.mjs → GoDaddyProvider-BIibcRG4.mjs} +2 -3
  6. package/dist/{GoDaddyProvider-DxFAueU4.mjs.map → GoDaddyProvider-BIibcRG4.mjs.map} +1 -1
  7. package/dist/{GoDaddyProvider-hAc0q5s-.cjs → GoDaddyProvider-C7Zt4dVy.cjs} +5 -6
  8. package/dist/{GoDaddyProvider-hAc0q5s-.cjs.map → GoDaddyProvider-C7Zt4dVy.cjs.map} +1 -1
  9. package/dist/{HostingerProvider-DEqpvoiD.cjs → HostingerProvider-BVhFhzCW.cjs} +2 -2
  10. package/dist/{HostingerProvider-DEqpvoiD.cjs.map → HostingerProvider-BVhFhzCW.cjs.map} +1 -1
  11. package/dist/{HostingerProvider-CgMuKgO_.mjs → HostingerProvider-DSHpNBim.mjs} +2 -2
  12. package/dist/{HostingerProvider-CgMuKgO_.mjs.map → HostingerProvider-DSHpNBim.mjs.map} +1 -1
  13. package/dist/{LegacyStateStore-BPY8Acgs.mjs → LegacyStateStore-Bd2I3zz7.mjs} +3 -3
  14. package/dist/{LegacyStateStore-BPY8Acgs.mjs.map → LegacyStateStore-Bd2I3zz7.mjs.map} +1 -1
  15. package/dist/{LegacyStateStore-BqSVgWi1.cjs → LegacyStateStore-DzRGMFhs.cjs} +3 -3
  16. package/dist/{LegacyStateStore-BqSVgWi1.cjs.map → LegacyStateStore-DzRGMFhs.cjs.map} +1 -1
  17. package/dist/{LocalStateStore-Df4RyGi2.cjs → LocalStateStore-Ci_tzIfp.cjs} +2 -2
  18. package/dist/{LocalStateStore-Df4RyGi2.cjs.map → LocalStateStore-Ci_tzIfp.cjs.map} +1 -1
  19. package/dist/{LocalStateStore-5pVR26KA.mjs → LocalStateStore-CzNrVQd2.mjs} +2 -2
  20. package/dist/{LocalStateStore-5pVR26KA.mjs.map → LocalStateStore-CzNrVQd2.mjs.map} +1 -1
  21. package/dist/{OpenApiTsGenerator-B-PQLx8X.mjs → OpenApiTsGenerator-BTMuu1WS.mjs} +2 -2
  22. package/dist/{OpenApiTsGenerator-B-PQLx8X.mjs.map → OpenApiTsGenerator-BTMuu1WS.mjs.map} +1 -1
  23. package/dist/{OpenApiTsGenerator-BvacdbiG.cjs → OpenApiTsGenerator-CI-tceXV.cjs} +2 -2
  24. package/dist/{OpenApiTsGenerator-BvacdbiG.cjs.map → OpenApiTsGenerator-CI-tceXV.cjs.map} +1 -1
  25. package/dist/{S3StateStore-Do1DwEMX.mjs → S3StateStore-DVtcCMEc.mjs} +4 -4
  26. package/dist/{S3StateStore-Do1DwEMX.mjs.map → S3StateStore-DVtcCMEc.mjs.map} +1 -1
  27. package/dist/{S3StateStore-uykstvZI.cjs → S3StateStore-LrKb9lH7.cjs} +5 -5
  28. package/dist/{S3StateStore-uykstvZI.cjs.map → S3StateStore-LrKb9lH7.cjs.map} +1 -1
  29. package/dist/{SSMStateStore-xQ-Ce91W.mjs → SSMStateStore-CNHYH6g7.mjs} +2 -2
  30. package/dist/{SSMStateStore-xQ-Ce91W.mjs.map → SSMStateStore-CNHYH6g7.mjs.map} +1 -1
  31. package/dist/{SSMStateStore-DQXFWqkE.cjs → SSMStateStore-CpkvL95K.cjs} +2 -2
  32. package/dist/{SSMStateStore-DQXFWqkE.cjs.map → SSMStateStore-CpkvL95K.cjs.map} +1 -1
  33. package/dist/{SubscriberGenerator-DR4Y7ihK.cjs → SubscriberGenerator-BNJyPmXJ.cjs} +3 -3
  34. package/dist/{SubscriberGenerator-DR4Y7ihK.cjs.map → SubscriberGenerator-BNJyPmXJ.cjs.map} +1 -1
  35. package/dist/{SubscriberGenerator-DLPH-ynS.mjs → SubscriberGenerator-CzPrixYu.mjs} +3 -3
  36. package/dist/{SubscriberGenerator-DLPH-ynS.mjs.map → SubscriberGenerator-CzPrixYu.mjs.map} +1 -1
  37. package/dist/{add-Y_nPkjIf.cjs → add-AlV6_ljM.cjs} +18 -17
  38. package/dist/{add-Y_nPkjIf.cjs.map → add-AlV6_ljM.cjs.map} +1 -1
  39. package/dist/{add-DLkN488n.mjs → add-B51nMuUd.mjs} +8 -7
  40. package/dist/{add-DLkN488n.mjs.map → add-B51nMuUd.mjs.map} +1 -1
  41. package/dist/apps-C1KiJqth.mjs +4593 -0
  42. package/dist/apps-C1KiJqth.mjs.map +1 -0
  43. package/dist/apps-CPdR2pYw.cjs +5002 -0
  44. package/dist/apps-CPdR2pYw.cjs.map +1 -0
  45. package/dist/{bundler-COOvv27I.cjs → bundler-B-hw8rJi.cjs} +9 -9
  46. package/dist/{bundler-COOvv27I.cjs.map → bundler-B-hw8rJi.cjs.map} +1 -1
  47. package/dist/{bundler-DFyrGST-.mjs → bundler-DbIt3a6I.mjs} +6 -6
  48. package/dist/{bundler-DFyrGST-.mjs.map → bundler-DbIt3a6I.mjs.map} +1 -1
  49. package/dist/{cli-DKsV-Myw.cjs → cli-6eYxU_Q2.cjs} +4 -4
  50. package/dist/{cli-DKsV-Myw.cjs.map → cli-6eYxU_Q2.cjs.map} +1 -1
  51. package/dist/{cli-iAX4BQ3t.mjs → cli-CmmrPCM_.mjs} +4 -4
  52. package/dist/{cli-iAX4BQ3t.mjs.map → cli-CmmrPCM_.mjs.map} +1 -1
  53. package/dist/compose-B2dCLbrc.cjs +1895 -0
  54. package/dist/compose-B2dCLbrc.cjs.map +1 -0
  55. package/dist/{compose-ofZIpp2q.mjs → compose-DVARqEeR.mjs} +16 -1828
  56. package/dist/compose-DVARqEeR.mjs.map +1 -0
  57. package/dist/{compose-CGXx22Wy.cjs → compose-D_fNsrkx.cjs} +101 -1967
  58. package/dist/compose-D_fNsrkx.cjs.map +1 -0
  59. package/dist/compose-kOpW9Pa1.mjs +1554 -0
  60. package/dist/compose-kOpW9Pa1.mjs.map +1 -0
  61. package/dist/config-BKpzKP6W.mjs +659 -0
  62. package/dist/config-BKpzKP6W.mjs.map +1 -0
  63. package/dist/config-QAqAEgb0.cjs +772 -0
  64. package/dist/config-QAqAEgb0.cjs.map +1 -0
  65. package/dist/config.cjs +16 -419
  66. package/dist/config.mjs +2 -405
  67. package/dist/{credentialSchemas-DZ2Nh5li.cjs → credentialSchemas-BAklWDna.cjs} +4 -5
  68. package/dist/{credentialSchemas-DZ2Nh5li.cjs.map → credentialSchemas-BAklWDna.cjs.map} +1 -1
  69. package/dist/{credentialSchemas-DUCSYl9a.mjs → credentialSchemas-mz9QZTYh.mjs} +2 -3
  70. package/dist/{credentialSchemas-DUCSYl9a.mjs.map → credentialSchemas-mz9QZTYh.mjs.map} +1 -1
  71. package/dist/credentials-CIpa4Hgs.cjs +2336 -0
  72. package/dist/credentials-CIpa4Hgs.cjs.map +1 -0
  73. package/dist/credentials-CWa7hRXd.mjs +1851 -0
  74. package/dist/credentials-CWa7hRXd.mjs.map +1 -0
  75. package/dist/{databases-P824RTnx.cjs → databases-DawSdqBI.cjs} +2 -2
  76. package/dist/{databases-P824RTnx.cjs.map → databases-DawSdqBI.cjs.map} +1 -1
  77. package/dist/{databases-Db48ZIXL.mjs → databases-mzSUFBTw.mjs} +2 -2
  78. package/dist/{databases-Db48ZIXL.mjs.map → databases-mzSUFBTw.mjs.map} +1 -1
  79. package/dist/deploy/public.cjs +24 -24
  80. package/dist/deploy/public.cjs.map +1 -1
  81. package/dist/deploy/public.d.cts.map +1 -1
  82. package/dist/deploy/public.d.mts.map +1 -1
  83. package/dist/deploy/public.mjs +13 -13
  84. package/dist/{deploy-BibGpDAz.cjs → deploy-CjJ447kd.cjs} +73 -72
  85. package/dist/{deploy-BibGpDAz.cjs.map → deploy-CjJ447kd.cjs.map} +1 -1
  86. package/dist/{deploy-C4QQkHK7.mjs → deploy-DqJiCwI9.mjs} +16 -15
  87. package/dist/{deploy-C4QQkHK7.mjs.map → deploy-DqJiCwI9.mjs.map} +1 -1
  88. package/dist/{discover-yqeJ2Bx7.cjs → discover-CRywE7yc.cjs} +157 -6
  89. package/dist/discover-CRywE7yc.cjs.map +1 -0
  90. package/dist/{discover-B2m8ytyq.mjs → discover-DbDrCQ8h.mjs} +117 -8
  91. package/dist/discover-DbDrCQ8h.mjs.map +1 -0
  92. package/dist/docker-CCzFCus7.mjs +1407 -0
  93. package/dist/docker-CCzFCus7.mjs.map +1 -0
  94. package/dist/docker-DK4rmb0u.cjs +1514 -0
  95. package/dist/docker-DK4rmb0u.cjs.map +1 -0
  96. package/dist/{dokploy-pSrsileA.mjs → dokploy-B5_Y5wf0.mjs} +2 -2
  97. package/dist/{dokploy-pSrsileA.mjs.map → dokploy-B5_Y5wf0.mjs.map} +1 -1
  98. package/dist/{dokploy-B_VX3nLM.cjs → dokploy-EJKX2T7M.cjs} +2 -2
  99. package/dist/{dokploy-B_VX3nLM.cjs.map → dokploy-EJKX2T7M.cjs.map} +1 -1
  100. package/dist/{drivers-C47nm-wB.cjs → drivers-aM87NQJi.cjs} +4 -91
  101. package/dist/drivers-aM87NQJi.cjs.map +1 -0
  102. package/dist/{drivers-CDjpjakg.mjs → drivers-uxLBq3e3.mjs} +3 -60
  103. package/dist/drivers-uxLBq3e3.mjs.map +1 -0
  104. package/dist/{eas-cSSc8Lex.cjs → eas-AqSay-vE.cjs} +6 -6
  105. package/dist/{eas-cSSc8Lex.cjs.map → eas-AqSay-vE.cjs.map} +1 -1
  106. package/dist/{eas-Bou-_M76.mjs → eas-BQlD6Z-u.mjs} +3 -3
  107. package/dist/{eas-Bou-_M76.mjs.map → eas-BQlD6Z-u.mjs.map} +1 -1
  108. package/dist/{encryption-CElaAwJs.cjs → encryption-B6_aL5d-.cjs} +6 -6
  109. package/dist/{encryption-CElaAwJs.cjs.map → encryption-B6_aL5d-.cjs.map} +1 -1
  110. package/dist/{encryption-Bps9As2D.mjs → encryption-Dlh5mcE1.mjs} +3 -3
  111. package/dist/{encryption-Bps9As2D.mjs.map → encryption-Dlh5mcE1.mjs.map} +1 -1
  112. package/dist/{engine-CiG7Wfyc.cjs → engine-BAkmPI2z.cjs} +99 -97
  113. package/dist/{engine-CiG7Wfyc.cjs.map → engine-BAkmPI2z.cjs.map} +1 -1
  114. package/dist/{engine-CXE4UOHj.mjs → engine-D3P2P6RK.mjs} +12 -10
  115. package/dist/{engine-CXE4UOHj.mjs.map → engine-D3P2P6RK.mjs.map} +1 -1
  116. package/dist/{github-BzppIvpw.cjs → github-DokGIXT-.cjs} +18 -17
  117. package/dist/{github-BzppIvpw.cjs.map → github-DokGIXT-.cjs.map} +1 -1
  118. package/dist/{github-CvFJlFWA.mjs → github-STWxD6cu.mjs} +9 -8
  119. package/dist/{github-CvFJlFWA.mjs.map → github-STWxD6cu.mjs.map} +1 -1
  120. package/dist/{googlePlay-BJnMCWoa.cjs → googlePlay-DL0htRJD.cjs} +5 -5
  121. package/dist/{googlePlay-BJnMCWoa.cjs.map → googlePlay-DL0htRJD.cjs.map} +1 -1
  122. package/dist/{googlePlay-RSe9wOfZ.mjs → googlePlay-uAyXzxlu.mjs} +5 -5
  123. package/dist/{googlePlay-RSe9wOfZ.mjs.map → googlePlay-uAyXzxlu.mjs.map} +1 -1
  124. package/dist/index.cjs +196 -192
  125. package/dist/index.cjs.map +1 -1
  126. package/dist/index.mjs +70 -66
  127. package/dist/index.mjs.map +1 -1
  128. package/dist/{local-OPC9BCZt.cjs → local-C6ndR_Wx.cjs} +6 -6
  129. package/dist/{local-OPC9BCZt.cjs.map → local-C6ndR_Wx.cjs.map} +1 -1
  130. package/dist/{local-B7Zv1NoA.mjs → local-CC7rdmgg.mjs} +3 -3
  131. package/dist/{local-B7Zv1NoA.mjs.map → local-CC7rdmgg.mjs.map} +1 -1
  132. package/dist/{migrate-BCBs0BMn.cjs → migrate-BbJUJ4CY.cjs} +6 -6
  133. package/dist/{migrate-BCBs0BMn.cjs.map → migrate-BbJUJ4CY.cjs.map} +1 -1
  134. package/dist/{migrate-Dmh5Dbcr.cjs → migrate-CMurhHuj.cjs} +15 -13
  135. package/dist/{migrate-Dmh5Dbcr.cjs.map → migrate-CMurhHuj.cjs.map} +1 -1
  136. package/dist/{migrate-B0nQra2W.mjs → migrate-D079sADO.mjs} +3 -3
  137. package/dist/{migrate-B0nQra2W.mjs.map → migrate-D079sADO.mjs.map} +1 -1
  138. package/dist/{migrate-BPCJBL7_.mjs → migrate-D27h4H79.mjs} +7 -5
  139. package/dist/{migrate-BPCJBL7_.mjs.map → migrate-D27h4H79.mjs.map} +1 -1
  140. package/dist/notes-B655tUny.cjs +500 -0
  141. package/dist/notes-B655tUny.cjs.map +1 -0
  142. package/dist/notes-wPJlNUj7.mjs +399 -0
  143. package/dist/notes-wPJlNUj7.mjs.map +1 -0
  144. package/dist/openapi.cjs +4 -5
  145. package/dist/openapi.cjs.map +1 -1
  146. package/dist/openapi.mjs +3 -4
  147. package/dist/openapi.mjs.map +1 -1
  148. package/dist/{projectBucket-BBbQ1lHF.cjs → projectBucket-Bs8ftcgB.cjs} +2 -2
  149. package/dist/{projectBucket-BBbQ1lHF.cjs.map → projectBucket-Bs8ftcgB.cjs.map} +1 -1
  150. package/dist/{projectBucket-C_DN4WzF.mjs → projectBucket-XVxyvW1y.mjs} +2 -2
  151. package/dist/{projectBucket-C_DN4WzF.mjs.map → projectBucket-XVxyvW1y.mjs.map} +1 -1
  152. package/dist/{publish-cthyGGQt.mjs → publish-B9BNIaf2.mjs} +2 -2
  153. package/dist/{publish-cthyGGQt.mjs.map → publish-B9BNIaf2.mjs.map} +1 -1
  154. package/dist/{publish-DKy3hn8a.cjs → publish-Bwgb-1JN.cjs} +2 -2
  155. package/dist/{publish-DKy3hn8a.cjs.map → publish-Bwgb-1JN.cjs.map} +1 -1
  156. package/dist/{ready-DuU0FXSj.cjs → ready-BNh3zsSn.cjs} +6 -6
  157. package/dist/{ready-DuU0FXSj.cjs.map → ready-BNh3zsSn.cjs.map} +1 -1
  158. package/dist/{ready-CGqJ74Kt.mjs → ready-g25dcGzK.mjs} +6 -6
  159. package/dist/{ready-CGqJ74Kt.mjs.map → ready-g25dcGzK.mjs.map} +1 -1
  160. package/dist/reconcile/public.cjs +1 -1
  161. package/dist/reconcile/public.mjs +1 -1
  162. package/dist/{resolve-BaRqJlqV.mjs → resolve-DheFxtmy.mjs} +4 -4
  163. package/dist/{resolve-BaRqJlqV.mjs.map → resolve-DheFxtmy.mjs.map} +1 -1
  164. package/dist/{resolve-AYtMIgoq.cjs → resolve-Dir9EjMu.cjs} +4 -4
  165. package/dist/{resolve-AYtMIgoq.cjs.map → resolve-Dir9EjMu.cjs.map} +1 -1
  166. package/dist/{rollback-DqV6t9oo.mjs → rollback-BWAB77F9.mjs} +8 -8
  167. package/dist/{rollback-DqV6t9oo.mjs.map → rollback-BWAB77F9.mjs.map} +1 -1
  168. package/dist/{rollback-CQ184yFu.cjs → rollback-CrtuUKqe.cjs} +11 -11
  169. package/dist/{rollback-CQ184yFu.cjs.map → rollback-CrtuUKqe.cjs.map} +1 -1
  170. package/dist/{s3-BKnL6YGQ.cjs → s3-DKJfDHUQ.cjs} +2 -2
  171. package/dist/{s3-BKnL6YGQ.cjs.map → s3-DKJfDHUQ.cjs.map} +1 -1
  172. package/dist/{s3-DW7SLsb8.mjs → s3-DNp8U0Ea.mjs} +2 -2
  173. package/dist/{s3-DW7SLsb8.mjs.map → s3-DNp8U0Ea.mjs.map} +1 -1
  174. package/dist/sandbox/credentials-worker.cjs +3 -4
  175. package/dist/sandbox/credentials-worker.cjs.map +1 -1
  176. package/dist/sandbox/credentials-worker.mjs +2 -3
  177. package/dist/sandbox/credentials-worker.mjs.map +1 -1
  178. package/dist/sandbox/discover-worker.cjs +1 -1
  179. package/dist/sandbox/discover-worker.mjs +1 -1
  180. package/dist/sandbox/migrate-worker.cjs +3 -4
  181. package/dist/sandbox/migrate-worker.cjs.map +1 -1
  182. package/dist/sandbox/migrate-worker.mjs +2 -3
  183. package/dist/sandbox/migrate-worker.mjs.map +1 -1
  184. package/dist/seeds-B3xvUAQf.cjs +363 -0
  185. package/dist/seeds-B3xvUAQf.cjs.map +1 -0
  186. package/dist/seeds-BCC8vAXR.mjs +298 -0
  187. package/dist/seeds-BCC8vAXR.mjs.map +1 -0
  188. package/dist/{serverSetup-Dnw9Kdel.cjs → serverSetup-BVL9HhNE.cjs} +9 -8
  189. package/dist/{serverSetup-Dnw9Kdel.cjs.map → serverSetup-BVL9HhNE.cjs.map} +1 -1
  190. package/dist/{serverSetup-AfG0-at8.mjs → serverSetup-D---hcyW.mjs} +7 -6
  191. package/dist/{serverSetup-AfG0-at8.mjs.map → serverSetup-D---hcyW.mjs.map} +1 -1
  192. package/dist/{sniffer-taO-AXSk.cjs → sniffer-BjHnOaCe.cjs} +9 -10
  193. package/dist/{sniffer-taO-AXSk.cjs.map → sniffer-BjHnOaCe.cjs.map} +1 -1
  194. package/dist/{sniffer-BHhJ8DiC.mjs → sniffer-DOyzfgPF.mjs} +8 -9
  195. package/dist/{sniffer-BHhJ8DiC.mjs.map → sniffer-DOyzfgPF.mjs.map} +1 -1
  196. package/dist/{snsSubscriptions-D_IBKhni.mjs → snsSubscriptions-Cf5DZfO5.mjs} +4 -453
  197. package/dist/snsSubscriptions-Cf5DZfO5.mjs.map +1 -0
  198. package/dist/{snsSubscriptions-CC-WM1zC.cjs → snsSubscriptions-DB0iRByH.cjs} +12 -559
  199. package/dist/snsSubscriptions-DB0iRByH.cjs.map +1 -0
  200. package/dist/{sst-Bz2HJlqc.mjs → sst-3V-rcKcw.mjs} +27 -5
  201. package/dist/sst-3V-rcKcw.mjs.map +1 -0
  202. package/dist/{sst-lvCHdYsY.cjs → sst-DuU7Ju0c.cjs} +29 -7
  203. package/dist/sst-DuU7Ju0c.cjs.map +1 -0
  204. package/dist/stack-BRKZ69bf.mjs +2307 -0
  205. package/dist/stack-BRKZ69bf.mjs.map +1 -0
  206. package/dist/stack-CmHjkg7D.cjs +2536 -0
  207. package/dist/stack-CmHjkg7D.cjs.map +1 -0
  208. package/dist/{stage-dd9dtLfh.mjs → stage-CTq3Gjsx.mjs} +7 -7
  209. package/dist/{stage-dd9dtLfh.mjs.map → stage-CTq3Gjsx.mjs.map} +1 -1
  210. package/dist/{stage-CTibxcpA.cjs → stage-s_8HOsH0.cjs} +13 -13
  211. package/dist/{stage-CTibxcpA.cjs.map → stage-s_8HOsH0.cjs.map} +1 -1
  212. package/dist/{stages--icWbhPy.cjs → stages-CFI0OiLj.cjs} +2 -2
  213. package/dist/{stages--icWbhPy.cjs.map → stages-CFI0OiLj.cjs.map} +1 -1
  214. package/dist/{stages-CUwSy39f.mjs → stages-DoYa81kN.mjs} +2 -2
  215. package/dist/{stages-CUwSy39f.mjs.map → stages-DoYa81kN.mjs.map} +1 -1
  216. package/dist/target/public.cjs +1 -1
  217. package/dist/target/public.mjs +1 -1
  218. package/dist/{terminal-DURcYlVX.cjs → terminal-ChxtuTYJ.cjs} +3 -3
  219. package/dist/{terminal-DURcYlVX.cjs.map → terminal-ChxtuTYJ.cjs.map} +1 -1
  220. package/dist/{terminal-yOZ7kKF9.mjs → terminal-oHKnZHkT.mjs} +3 -3
  221. package/dist/{terminal-yOZ7kKF9.mjs.map → terminal-oHKnZHkT.mjs.map} +1 -1
  222. package/dist/types-Bl_CwZC9.cjs +90 -0
  223. package/dist/types-Bl_CwZC9.cjs.map +1 -0
  224. package/dist/types-Y1NfWlyG.mjs +61 -0
  225. package/dist/types-Y1NfWlyG.mjs.map +1 -0
  226. package/dist/vitest.cjs +1 -1
  227. package/dist/vitest.mjs +1 -1
  228. package/package.json +15 -15
  229. package/dist/compose-CGXx22Wy.cjs.map +0 -1
  230. package/dist/compose-ofZIpp2q.mjs.map +0 -1
  231. package/dist/config.cjs.map +0 -1
  232. package/dist/config.mjs.map +0 -1
  233. package/dist/credentials-D7XJypNd.cjs +0 -520
  234. package/dist/credentials-D7XJypNd.cjs.map +0 -1
  235. package/dist/credentials-DpfnUvIR.mjs +0 -395
  236. package/dist/credentials-DpfnUvIR.mjs.map +0 -1
  237. package/dist/derive-Cd7Hl3r2.mjs +0 -259
  238. package/dist/derive-Cd7Hl3r2.mjs.map +0 -1
  239. package/dist/derive-CgZfoBU2.cjs +0 -282
  240. package/dist/derive-CgZfoBU2.cjs.map +0 -1
  241. package/dist/discover-B2m8ytyq.mjs.map +0 -1
  242. package/dist/discover-yqeJ2Bx7.cjs.map +0 -1
  243. package/dist/drivers-C47nm-wB.cjs.map +0 -1
  244. package/dist/drivers-CDjpjakg.mjs.map +0 -1
  245. package/dist/identity-CBXr4wNi.mjs +0 -129
  246. package/dist/identity-CBXr4wNi.mjs.map +0 -1
  247. package/dist/identity-CbLfgQNT.cjs +0 -182
  248. package/dist/identity-CbLfgQNT.cjs.map +0 -1
  249. package/dist/sandbox-CHv3OYXg.cjs +0 -165
  250. package/dist/sandbox-CHv3OYXg.cjs.map +0 -1
  251. package/dist/sandbox-CbVB7uOD.mjs +0 -118
  252. package/dist/sandbox-CbVB7uOD.mjs.map +0 -1
  253. package/dist/seeds-DndMeyzm.cjs +0 -10669
  254. package/dist/seeds-DndMeyzm.cjs.map +0 -1
  255. package/dist/seeds-o6x6BTRo.mjs +0 -9534
  256. package/dist/seeds-o6x6BTRo.mjs.map +0 -1
  257. package/dist/snsSubscriptions-CC-WM1zC.cjs.map +0 -1
  258. package/dist/snsSubscriptions-D_IBKhni.mjs.map +0 -1
  259. package/dist/sst-Bz2HJlqc.mjs.map +0 -1
  260. package/dist/sst-lvCHdYsY.cjs.map +0 -1
@@ -0,0 +1,659 @@
1
+ import { t as GkmError } from "./errors-D8Gwp5kU.mjs";
2
+ import { a as allConstructGlobs, b as isWorkspaceConfig, d as getAppGkmConfig, m as processConfig } from "./workspace-BbfBFtjn.mjs";
3
+ import { a as discriminatedUnion, c as literal, d as object, f as record, g as unknown, n as array, p as string } from "./schemas-BCwKKA42.mjs";
4
+ import { i as discover, l as runWorker, m as activeSandbox, y as output } from "./discover-DbDrCQ8h.mjs";
5
+ import { dirname, join, parse, resolve, sep } from "node:path";
6
+ import { existsSync, realpathSync } from "node:fs";
7
+ import { WILDCARD_SUBDOMAIN, dependenciesOf, isWildcardSite, kebabCase } from "@geekmidas/manifest";
8
+ //#region src/workspace/subdomains.ts
9
+ /**
10
+ * The subdomains of a stage's domain, as a wildcard site sees them.
11
+ *
12
+ * A site declared `subdomain: '*'` answers on every label nothing else does,
13
+ * so the labels something else does answer on are the ones a tenant can never
14
+ * take. They come from two places and from nowhere else: every app's own
15
+ * label, read off the constructs and never listed by hand, and the names no
16
+ * construct declares (`www`, `mail`, `status`), listed once in the workspace
17
+ * config as `protectedSubdomains`.
18
+ */
19
+ /** A `protectedSubdomains` entry an app already answers on. */
20
+ var ProtectedSubdomainIsAnApp = class extends GkmError {
21
+ subdomain;
22
+ app;
23
+ constructor(subdomain, app) {
24
+ super(`protectedSubdomains lists '${subdomain}', which '${app}' already answers on — a construct's own subdomain is protected without being listed. Remove it from protectedSubdomains.`);
25
+ this.subdomain = subdomain;
26
+ this.app = app;
27
+ this.name = "ProtectedSubdomainIsAnApp";
28
+ }
29
+ };
30
+ /** Two sites that both answer on every subdomain. */
31
+ var SecondWildcardSite = class extends GkmError {
32
+ sites;
33
+ constructor(sites) {
34
+ super(`${sites.join(" and ")} both declare subdomain: '*', and two sites cannot share the same hosts. Keep one wildcard site per project; give the other a subdomain of its own.`);
35
+ this.sites = sites;
36
+ this.name = "SecondWildcardSite";
37
+ }
38
+ };
39
+ /** A wildcard site whose `hosts` route is on no surface the project declares. */
40
+ var SiteHostsEndpointMissing = class extends GkmError {
41
+ site;
42
+ surface;
43
+ path;
44
+ constructor(site, surface, path) {
45
+ super(`'${site}' checks its hosts with GET ${path} on '${surface}', but '${surface}' serves no such route. Export the endpoint from the surface's endpoints, or point \`hosts\` at one it serves.`);
46
+ this.site = site;
47
+ this.surface = surface;
48
+ this.path = path;
49
+ this.name = "SiteHostsEndpointMissing";
50
+ }
51
+ };
52
+ /** The project's one wildcard site, or `undefined` when it has none. */
53
+ function wildcardSite(manifest) {
54
+ return Object.values(manifest).find(isWildcardSite);
55
+ }
56
+ /**
57
+ * Every label an app answers on, by the app it belongs to — what a deploy
58
+ * puts under the stage's domain: a surface's or site's `subdomain` (or its id
59
+ * kebab-cased), each file server and its processors' origin, and each worker,
60
+ * which SNS may push to on a host of its own.
61
+ *
62
+ * The root site's is kept although it answers on the domain itself: which
63
+ * site is the root can change without a tenant's slug changing meaning. The
64
+ * wildcard site has none — its labels are whatever is left.
65
+ */
66
+ function appSubdomains(manifest) {
67
+ const labels = /* @__PURE__ */ new Map();
68
+ for (const [id, declaration] of Object.entries(manifest)) switch (declaration.kind) {
69
+ case "rest-api":
70
+ case "websocket-api":
71
+ labels.set(declaration.subdomain ?? kebabCase(id), id);
72
+ break;
73
+ case "site":
74
+ if (declaration.subdomain === WILDCARD_SUBDOMAIN) break;
75
+ labels.set(declaration.subdomain ?? kebabCase(id), id);
76
+ break;
77
+ case "file-server":
78
+ labels.set(kebabCase(id), id);
79
+ if (declaration.processors?.length) labels.set(`${kebabCase(id)}-processors`, id);
80
+ break;
81
+ case "worker": labels.set(kebabCase(id), id);
82
+ }
83
+ return labels;
84
+ }
85
+ /**
86
+ * The labels no tenant may take: every app's own and the workspace's
87
+ * `protectedSubdomains`, sorted.
88
+ */
89
+ function protectedSubdomains(manifest, configured = []) {
90
+ return [.../* @__PURE__ */ new Set([...appSubdomains(manifest).keys(), ...configured])].sort();
91
+ }
92
+ /**
93
+ * What a project's subdomains have to satisfy before anything is derived
94
+ * from them.
95
+ *
96
+ * @throws {SecondWildcardSite} when two sites declare `subdomain: '*'`
97
+ * @throws {SiteHostsEndpointMissing} when the wildcard site's `hosts` route is not served
98
+ * @throws {ProtectedSubdomainIsAnApp} when `protectedSubdomains` repeats an app's own
99
+ */
100
+ function assertSubdomains(manifest, configured = []) {
101
+ const wildcards = Object.values(manifest).filter(isWildcardSite);
102
+ if (wildcards.length > 1) throw new SecondWildcardSite(wildcards.map((site) => site.id).sort());
103
+ const site = wildcards[0];
104
+ if (site?.hosts) {
105
+ const surface = manifest[site.hosts.surface];
106
+ if (!(surface?.kind === "rest-api" && surface.endpoints.some((endpoint) => endpoint.method.toUpperCase() === "GET" && endpoint.path === site.hosts?.path))) throw new SiteHostsEndpointMissing(site.id, site.hosts.surface, site.hosts.path);
107
+ }
108
+ const labels = appSubdomains(manifest);
109
+ for (const subdomain of configured) {
110
+ const app = labels.get(subdomain);
111
+ if (app) throw new ProtectedSubdomainIsAnApp(subdomain, app);
112
+ }
113
+ }
114
+ //#endregion
115
+ //#region src/workspace/derive.ts
116
+ /**
117
+ * The apps a manifest implies.
118
+ *
119
+ * `gkm.config.ts` used to carry an `apps` block naming every app: its type, its
120
+ * path, its port, its framework, which other apps it depended on. Every one of
121
+ * those facts was already declared. A `StaticSite('Web', { path: 'apps/web' })`
122
+ * and an `apps.web = { type: 'web', path: 'apps/web', framework: 'vite',
123
+ * dependencies: ['api'] }` are the same statement written twice, and only one of
124
+ * them was checked against anything — so the copy in config was free to drift,
125
+ * and a surface config had no entry for simply never deployed.
126
+ *
127
+ * So the list comes from the graph. A `site` is an app, and so is every
128
+ * `rest-api` — one surface, one container, at the `path` it declared.
129
+ *
130
+ * What config still supplies is what no graph can answer: the backends a cache
131
+ * and a mailer resolve to, the deploy endpoint, the stage's domain.
132
+ */
133
+ /** Which frontend framework builds each site variant. */
134
+ const FRAMEWORKS = {
135
+ static: "vite",
136
+ next: "nextjs",
137
+ tanstack: "tanstack-start"
138
+ };
139
+ /**
140
+ * The app key a construct id becomes.
141
+ *
142
+ * The same kebab form every physical name is built from, so `Api` is `api` in
143
+ * the config, `production-kitchen-sink-api` on Dokploy, and `API_URL` in an
144
+ * environment — one id, three renderings, no second list.
145
+ */
146
+ function appKey(id) {
147
+ return kebabCase(id);
148
+ }
149
+ /**
150
+ * The app serving a surface: its own, always.
151
+ *
152
+ * Every surface gets a container. There is no arrangement in which one runs
153
+ * inside another — two surfaces in a process share a filesystem, an
154
+ * environment, and every credential either was granted, so an auth server
155
+ * beside an API is one bug in the API away from being read by it.
156
+ */
157
+ function hostOf(manifest, id) {
158
+ const declaration = manifest[id];
159
+ if (!declaration || declaration.kind !== "rest-api" && declaration.kind !== "websocket-api") return void 0;
160
+ return id;
161
+ }
162
+ /**
163
+ * Local ports, assigned so that adding a site does not renumber the others.
164
+ *
165
+ * Backends first, then the site holding the base domain, then the rest
166
+ * alphabetically. The ordering is arbitrary but it is *fixed*, which is the
167
+ * property that matters: a port that moves when an unrelated app is added is a
168
+ * port nobody can put in a bookmark. A construct that names its own port keeps
169
+ * it, and is skipped here.
170
+ */
171
+ function assignPorts(apps) {
172
+ const rank = (name, app) => [
173
+ app.type === "backend" ? 0 : app.type === "web" ? 1 : 2,
174
+ app.root ? 0 : 1,
175
+ name
176
+ ];
177
+ const ordered = Object.entries(apps).sort(([aName, a], [bName, b]) => {
178
+ const [at, ar, an] = rank(aName, a);
179
+ const [bt, br, bn] = rank(bName, b);
180
+ return at - bt || ar - br || an.localeCompare(bn);
181
+ });
182
+ const taken = new Set(ordered.map(([, app]) => app.port).filter((p) => !!p));
183
+ let next = 3e3;
184
+ for (const [, app] of ordered) {
185
+ if (app.port) continue;
186
+ while (taken.has(next)) next += 1;
187
+ app.port = next;
188
+ taken.add(next);
189
+ }
190
+ }
191
+ /**
192
+ * Whichever site holds the base domain.
193
+ *
194
+ * The convention first — a site named `web` — because it is one people already
195
+ * rely on. Then an explicit `root: true`. A project with one site needs neither.
196
+ */
197
+ function markRoot(apps) {
198
+ const sites = Object.entries(apps).filter(([, a]) => a.type === "web" && a.subdomain !== WILDCARD_SUBDOMAIN);
199
+ if (sites.length === 0) return;
200
+ if (sites.some(([, a]) => a.root)) return;
201
+ const chosen = sites.find(([name]) => name === "web") ?? (sites.length === 1 ? sites[0] : void 0);
202
+ if (chosen) chosen[1].root = true;
203
+ }
204
+ function derivedApps(manifest, workspace) {
205
+ assertSubdomains(manifest, workspace.protectedSubdomains);
206
+ const apps = {};
207
+ const defaultTarget = workspace.deploy?.default ?? "dokploy";
208
+ for (const [id, declaration] of Object.entries(manifest)) {
209
+ if (declaration.kind !== "site" && declaration.kind !== "mobile-app" && declaration.kind !== "rest-api" && declaration.kind !== "websocket-api") continue;
210
+ const spec = declaration.kind === "site" || declaration.kind === "mobile-app" ? declaration.app : {
211
+ path: declaration.path,
212
+ ...declaration.kind === "rest-api" && declaration.telescope ? { telescope: true } : {}
213
+ };
214
+ const name = appKey(id);
215
+ const configured = workspace.apps[name];
216
+ apps[name] = {
217
+ ...configured,
218
+ type: declaration.kind === "site" ? "web" : declaration.kind === "mobile-app" ? "mobile" : "backend",
219
+ path: spec.path,
220
+ port: spec.port ?? configured?.port ?? 0,
221
+ ...(declaration.kind === "rest-api" || declaration.kind === "websocket-api" || declaration.kind === "site") && declaration.subdomain ? { subdomain: declaration.subdomain } : {},
222
+ dependencies: [],
223
+ resolvedDeployTarget: configured?.resolvedDeployTarget ?? defaultTarget,
224
+ ...declaration.kind === "site" ? {
225
+ framework: configured?.framework ?? FRAMEWORKS[declaration.variant],
226
+ ...declaration.root ? { root: true } : {},
227
+ ...spec.config ? { config: spec.config } : {}
228
+ } : {},
229
+ ...declaration.kind === "mobile-app" ? {
230
+ framework: configured?.framework ?? declaration.variant,
231
+ ...spec.config ? { config: spec.config } : {}
232
+ } : {},
233
+ ...spec.telescope !== void 0 ? { telescope: spec.telescope } : {},
234
+ ...spec.openapi !== void 0 ? { openapi: spec.openapi } : {},
235
+ ...spec.runtime !== void 0 ? { runtime: spec.runtime } : {},
236
+ ...spec.env !== void 0 ? { env: spec.env } : {},
237
+ ...spec.entry !== void 0 ? { entry: spec.entry } : {},
238
+ ...configured?.domain ? { domain: configured.domain } : {}
239
+ };
240
+ }
241
+ for (const [id, declaration] of Object.entries(manifest)) {
242
+ if (declaration.kind !== "site" && declaration.kind !== "mobile-app" && declaration.kind !== "rest-api" && declaration.kind !== "websocket-api") continue;
243
+ const app = apps[appKey(id)];
244
+ if (!app) continue;
245
+ const edges = dependenciesOf(declaration);
246
+ const names = /* @__PURE__ */ new Set();
247
+ for (const edge of edges) {
248
+ if (edge.kind !== "rest-api") continue;
249
+ const host = hostOf(manifest, edge.target);
250
+ if (!host) continue;
251
+ const key = appKey(host);
252
+ if (key !== appKey(id) && apps[key]) names.add(key);
253
+ }
254
+ app.dependencies = [...names].sort();
255
+ }
256
+ markRoot(apps);
257
+ assignPorts(apps);
258
+ for (const [name, app] of Object.entries(workspace.apps)) if (!apps[name]) apps[name] = app;
259
+ return apps;
260
+ }
261
+ //#endregion
262
+ //#region src/config.ts
263
+ /**
264
+ * Define GKM configuration with full TypeScript support.
265
+ * This is an identity function that provides type safety and autocomplete.
266
+ *
267
+ * @example
268
+ * ```ts
269
+ * // gkm.config.ts
270
+ * import { defineConfig } from '@geekmidas/cli/config';
271
+ *
272
+ * export default defineConfig({
273
+ * routes: './src/endpoints/**\/*.ts',
274
+ * envParser: './src/config/env',
275
+ * logger: './src/config/logger',
276
+ * telescope: true,
277
+ * });
278
+ * ```
279
+ */
280
+ function defineConfig(config) {
281
+ return config;
282
+ }
283
+ /**
284
+ * Parse a module config string into path and import pattern.
285
+ *
286
+ * @param configString - Config string in format "./path/to/module" or "./path/to/module#exportName"
287
+ * @param defaultAlias - The default alias name to use if no export name specified
288
+ * @returns Object with path and import pattern
289
+ *
290
+ * @example
291
+ * parseModuleConfig('./src/config/env', 'envParser')
292
+ * // { path: './src/config/env', importPattern: 'envParser' }
293
+ *
294
+ * parseModuleConfig('./src/config/env#envParser', 'envParser')
295
+ * // { path: './src/config/env', importPattern: '{ envParser }' }
296
+ *
297
+ * parseModuleConfig('./src/config/env#myEnv', 'envParser')
298
+ * // { path: './src/config/env', importPattern: '{ myEnv as envParser }' }
299
+ */
300
+ function parseModuleConfig(configString, defaultAlias) {
301
+ const parts = configString.split("#");
302
+ const path = parts[0] ?? configString;
303
+ const exportName = parts[1];
304
+ return {
305
+ path,
306
+ importPattern: !exportName ? defaultAlias : exportName === defaultAlias ? `{ ${defaultAlias} }` : `{ ${exportName} as ${defaultAlias} }`
307
+ };
308
+ }
309
+ /**
310
+ * Find and return the path to the config file.
311
+ *
312
+ * Resolution order:
313
+ * 1. GKM_CONFIG_PATH env var (set by workspace dev command)
314
+ * 2. Walk up directory tree from cwd
315
+ */
316
+ function findConfigPath(cwd) {
317
+ const files = [
318
+ "gkm.config.json",
319
+ "gkm.config.ts",
320
+ "gkm.config.js"
321
+ ];
322
+ const envConfigPath = process.env.GKM_CONFIG_PATH;
323
+ if (envConfigPath && existsSync(envConfigPath)) return {
324
+ configPath: envConfigPath,
325
+ workspaceRoot: dirname(envConfigPath)
326
+ };
327
+ let currentDir = cwd;
328
+ const { root } = parse(currentDir);
329
+ while (currentDir !== root) {
330
+ for (const file of files) {
331
+ const configPath = join(currentDir, file);
332
+ if (existsSync(configPath)) return {
333
+ configPath,
334
+ workspaceRoot: currentDir
335
+ };
336
+ }
337
+ currentDir = dirname(currentDir);
338
+ }
339
+ throw new ConfigNotFound(cwd);
340
+ }
341
+ /**
342
+ * The directory holding the gkm config that `cwd` belongs to — the project a
343
+ * sandbox for it is confined to.
344
+ *
345
+ * @throws {ConfigNotFound} when neither `cwd` nor any parent has one.
346
+ */
347
+ function findWorkspaceRoot(cwd) {
348
+ return findConfigPath(cwd).workspaceRoot;
349
+ }
350
+ /** No gkm config in a directory or any of its parents. */
351
+ var ConfigNotFound = class extends GkmError {
352
+ cwd;
353
+ constructor(cwd) {
354
+ super("Configuration file not found. Please create gkm.config.json, gkm.config.ts, or gkm.config.js in the project root.");
355
+ this.cwd = cwd;
356
+ this.name = "ConfigNotFound";
357
+ }
358
+ };
359
+ /**
360
+ * How long loading a config, or discovering its constructs, may take in a
361
+ * sandbox: room for tsx to compile a large project cold, and not a deploy
362
+ * held open by a config that never finishes importing.
363
+ */
364
+ const CONFIG_LOAD_TIMEOUT_MS = 6e4;
365
+ /** The config failed to import, or threw while it ran. */
366
+ var ConfigLoadFailed = class extends Error {
367
+ configPath;
368
+ detail;
369
+ constructor(configPath, detail) {
370
+ super(`Failed to load config: ${detail}`);
371
+ this.configPath = configPath;
372
+ this.detail = detail;
373
+ this.name = "ConfigLoadFailed";
374
+ }
375
+ };
376
+ /**
377
+ * The config holds something that is not data — a custom state store, an
378
+ * inline deploy target, a function — and the sandbox it was loaded in hands
379
+ * the deploy nothing but data.
380
+ */
381
+ var ConfigObjectNotSerializable = class extends Error {
382
+ configPath;
383
+ paths;
384
+ constructor(configPath, paths) {
385
+ super(`${configPath} holds values that are not plain data at: ${paths.join(", ")}. It was loaded in an isolating sandbox, which hands the deploy the config as JSON, so a live object — a custom store, an inline target, a function — cannot reach it. Configure these with plain values instead, or deploy this project with a sandbox that is not isolating (the default) if the host trusts it.`);
386
+ this.configPath = configPath;
387
+ this.paths = paths;
388
+ this.name = "ConfigObjectNotSerializable";
389
+ }
390
+ };
391
+ /** What the config worker answers. Checked: the worker ran project code. */
392
+ const ConfigAnswer = discriminatedUnion("reason", [
393
+ object({
394
+ reason: literal("loaded"),
395
+ config: record(string(), unknown())
396
+ }),
397
+ object({
398
+ reason: literal("live"),
399
+ paths: array(string())
400
+ }),
401
+ object({
402
+ reason: literal("failed"),
403
+ error: object({
404
+ name: string(),
405
+ message: string()
406
+ })
407
+ })
408
+ ]);
409
+ /** Import the config in this process — live objects and all. */
410
+ async function importConfig(configPath) {
411
+ try {
412
+ return (await import(configPath)).default;
413
+ } catch (error) {
414
+ throw new ConfigLoadFailed(configPath, error.message);
415
+ }
416
+ }
417
+ /**
418
+ * The config, loaded in `sandbox` and handed back as JSON.
419
+ *
420
+ * A config holding live objects cannot come back that way. An isolating
421
+ * sandbox refuses it with {@link ConfigObjectNotSerializable}; any other
422
+ * imports it here as well, as before, since the host already runs this
423
+ * project's code as its own.
424
+ */
425
+ async function loadConfigInSandbox(sandbox, configPath, workspaceRoot, timeoutMs = CONFIG_LOAD_TIMEOUT_MS) {
426
+ const { value } = await runWorker(sandbox, "config load", {
427
+ name: "config-worker",
428
+ args: [configPath],
429
+ cwd: workspaceRoot,
430
+ timeoutMs,
431
+ schema: ConfigAnswer
432
+ });
433
+ switch (value.reason) {
434
+ case "loaded": return value.config;
435
+ case "failed": throw new ConfigLoadFailed(configPath, value.error.message);
436
+ case "live":
437
+ if (sandbox.isolating) throw new ConfigObjectNotSerializable(configPath, value.paths);
438
+ return importConfig(configPath);
439
+ }
440
+ }
441
+ /**
442
+ * Load raw configuration from file.
443
+ */
444
+ async function loadRawConfig(cwd, options = {}) {
445
+ const { configPath, workspaceRoot } = findConfigPath(cwd);
446
+ const sandbox = options.sandbox ?? activeSandbox();
447
+ return {
448
+ config: sandbox ? await loadConfigInSandbox(sandbox, configPath, workspaceRoot, options.timeoutMs) : await importConfig(configPath),
449
+ workspaceRoot
450
+ };
451
+ }
452
+ /**
453
+ * Load configuration file (single-app format).
454
+ * For backwards compatibility with existing code.
455
+ *
456
+ * @deprecated Use loadWorkspaceConfig for new code
457
+ */
458
+ async function loadConfig(cwd = process.cwd()) {
459
+ const { config } = await loadRawConfig(cwd);
460
+ if (isWorkspaceConfig(config)) throw new Error("Workspace configuration detected. Use loadWorkspaceConfig() instead.");
461
+ return config;
462
+ }
463
+ /**
464
+ * Load configuration file and process it as a workspace.
465
+ * Works with both single-app and workspace configurations.
466
+ *
467
+ * Single-app configs are automatically wrapped as a workspace with one app.
468
+ *
469
+ * @example
470
+ * ```ts
471
+ * const { type, workspace } = await loadWorkspaceConfig();
472
+ *
473
+ * if (type === 'workspace') {
474
+ * console.log('Multi-app workspace:', workspace.apps);
475
+ * } else {
476
+ * console.log('Single app wrapped as workspace');
477
+ * }
478
+ * ```
479
+ */
480
+ /**
481
+ * The workspace a directory belongs to, as its config states it — without
482
+ * discovering its constructs.
483
+ *
484
+ * For callers that need a fact the config holds (where a stage's secrets are
485
+ * stored) and nothing the graph adds. `loadWorkspaceConfig` imports every
486
+ * construct module to derive the apps, which is a cost a secrets read should
487
+ * not pay.
488
+ */
489
+ async function loadWorkspaceSettings(cwd = process.cwd(), options = {}) {
490
+ const { config, workspaceRoot } = await loadRawConfig(cwd, options);
491
+ return processConfig(config, workspaceRoot).workspace;
492
+ }
493
+ async function loadWorkspaceConfig(cwd = process.cwd(), options = {}) {
494
+ const { config, workspaceRoot } = await loadRawConfig(cwd, options);
495
+ return withDerivedApps(processConfig(config, workspaceRoot), options.sandbox);
496
+ }
497
+ /**
498
+ * The loaded config, with its apps read off the graph.
499
+ *
500
+ * Here rather than at each call site because every command needs the same
501
+ * answer, and the ones that forgot to ask were exactly the bugs: a site that
502
+ * never deployed, a surface that could not be its own process. `gkm dev`,
503
+ * `gkm build`, `gkm docker` and `gkm deploy` now all see the same apps without
504
+ * any of them knowing a derivation happened.
505
+ *
506
+ * Discovery imports the construct modules — declarations only, not endpoints —
507
+ * which is the same import the reconciler and the build already do. A workspace
508
+ * with no `constructs` glob discovers nothing and keeps whatever its config
509
+ * said, so nothing that worked before changes.
510
+ *
511
+ * A construct file that throws is reported and skipped rather than taking the
512
+ * command down: `gkm dev` failing to start because a half-written declaration
513
+ * cannot be imported is a worse failure than starting with the app it does not
514
+ * describe yet.
515
+ */
516
+ async function withDerivedApps(loaded, sandbox) {
517
+ const globs = allConstructGlobs(loaded.workspace);
518
+ if (globs.length === 0) throw new WorkspaceDeclaresNoConstructs(loaded.workspace.root);
519
+ try {
520
+ const background = {};
521
+ const manifest = await discover({
522
+ patterns: globs,
523
+ cwd: loaded.workspace.root,
524
+ background,
525
+ ...sandbox ? { sandbox } : {}
526
+ });
527
+ return {
528
+ ...loaded,
529
+ manifest,
530
+ background,
531
+ workspace: {
532
+ ...loaded.workspace,
533
+ apps: derivedApps(manifest, loaded.workspace)
534
+ }
535
+ };
536
+ } catch (error) {
537
+ const message = error instanceof Error ? error.message : String(error);
538
+ output.warn(`⚠️ Could not read constructs, so apps come from config alone: ${message}`);
539
+ return loaded;
540
+ }
541
+ }
542
+ /**
543
+ * A workspace with no `constructs` glob.
544
+ *
545
+ * In v10 every address, container and app comes from what the workspace
546
+ * declares — there is no second path that reads a hand-written compose file or
547
+ * an `apps` block's ports. A config that declares nothing has nothing to run.
548
+ */
549
+ var WorkspaceDeclaresNoConstructs = class extends GkmError {
550
+ root;
551
+ constructor(root) {
552
+ super(`The workspace at ${root} declares no constructs. Every workspace names where its constructs live — \`constructs: ['./constructs/**/*.ts', './apps/*/endpoints/**/*.ts']\` in gkm.config.ts — and its apps, containers and URLs are derived from them.`);
553
+ this.root = root;
554
+ this.name = "WorkspaceDeclaresNoConstructs";
555
+ }
556
+ };
557
+ /**
558
+ * The app a directory is part of: the one whose `path` contains it.
559
+ *
560
+ * An app's path is the one its construct declares — `new RestApi('Api',
561
+ * { path: 'apps/api' })` — read off the workspace the constructs were derived
562
+ * into, never off the filesystem's package names. The deepest match wins, so
563
+ * an app inside another app's folder is its own; the workspace root belongs to
564
+ * no app unless one lives there.
565
+ */
566
+ function resolveWorkspaceApp(loadedConfig, cwd) {
567
+ const here = real(cwd);
568
+ let found;
569
+ for (const [key, app] of Object.entries(loadedConfig.workspace.apps)) {
570
+ const dir = real(join(loadedConfig.workspace.root, app.path));
571
+ if ((here === dir || here.startsWith(`${dir}${sep}`)) && (!found || dir.length > found.dir.length)) found = {
572
+ key,
573
+ app,
574
+ dir
575
+ };
576
+ }
577
+ return found && {
578
+ key: found.key,
579
+ app: found.app
580
+ };
581
+ }
582
+ /** A path with its symlinks resolved, where it exists — `/tmp` is `/private/tmp`. */
583
+ function real(path) {
584
+ const absolute = resolve(path);
585
+ return existsSync(absolute) ? realpathSync(absolute) : absolute;
586
+ }
587
+ /** A directory that no app in the workspace lives in. */
588
+ var NotInAnApp = class extends GkmError {
589
+ cwd;
590
+ apps;
591
+ constructor(cwd, apps) {
592
+ super(`${cwd} is not inside any app's path. Apps: ` + Object.entries(apps).map(([key, path]) => `${key} (${path})`).join(", ") + ".");
593
+ this.cwd = cwd;
594
+ this.apps = apps;
595
+ this.name = "NotInAnApp";
596
+ }
597
+ };
598
+ /** Every app's path, by key — what `NotInAnApp` lists. */
599
+ function appPaths(loadedConfig) {
600
+ return Object.fromEntries(Object.entries(loadedConfig.workspace.apps).map(([key, app]) => [key, app.path]));
601
+ }
602
+ /**
603
+ * The backend app a directory is part of, with its gkm config — found by the
604
+ * `path` its construct declares.
605
+ *
606
+ * @example
607
+ * ```ts
608
+ * // From apps/api, where a construct declares `path: 'apps/api'`
609
+ * const { app, workspace, workspaceRoot } = await loadAppConfig();
610
+ * ```
611
+ *
612
+ * @throws {NotInAnApp} when no app's path contains the directory.
613
+ * @throws {NotABackendApp} when the app it is in has no gkm config to run.
614
+ */
615
+ async function loadAppConfig(cwd = process.cwd()) {
616
+ const { appName, app, workspace, workspaceRoot } = await loadWorkspaceAppInfo(cwd);
617
+ const gkmConfig = getAppGkmConfig(workspace, appName);
618
+ if (!gkmConfig) throw new NotABackendApp(appName);
619
+ return {
620
+ appName,
621
+ app,
622
+ gkmConfig,
623
+ workspace,
624
+ workspaceRoot,
625
+ appRoot: join(workspaceRoot, app.path)
626
+ };
627
+ }
628
+ /** The app a directory is in has no gkm config — a site, or an entry app. */
629
+ var NotABackendApp = class extends GkmError {
630
+ appName;
631
+ constructor(appName) {
632
+ super(`App "${appName}" is not a backend app and cannot be run with gkm dev.`);
633
+ this.appName = appName;
634
+ this.name = "NotABackendApp";
635
+ }
636
+ };
637
+ /**
638
+ * The app a directory is part of, frontend or backend — found by the `path`
639
+ * its construct declares. Unlike `loadAppConfig`, the app need not have a
640
+ * gkm config, which is what `gkm exec` and `gkm test` from a site need.
641
+ *
642
+ * @throws {NotInAnApp} when no app's path contains the directory.
643
+ */
644
+ async function loadWorkspaceAppInfo(cwd = process.cwd()) {
645
+ const { config, workspaceRoot } = await loadRawConfig(cwd);
646
+ const loadedConfig = await withDerivedApps(processConfig(config, workspaceRoot));
647
+ const resolved = resolveWorkspaceApp(loadedConfig, cwd);
648
+ if (!resolved) throw new NotInAnApp(cwd, appPaths(loadedConfig));
649
+ return {
650
+ appName: resolved.key,
651
+ app: resolved.app,
652
+ workspace: loadedConfig.workspace,
653
+ workspaceRoot
654
+ };
655
+ }
656
+ //#endregion
657
+ export { derivedApps as _, NotABackendApp as a, defineConfig as c, loadConfig as d, loadWorkspaceAppInfo as f, appKey as g, parseModuleConfig as h, ConfigObjectNotSerializable as i, findWorkspaceRoot as l, loadWorkspaceSettings as m, ConfigLoadFailed as n, NotInAnApp as o, loadWorkspaceConfig as p, ConfigNotFound as r, WorkspaceDeclaresNoConstructs as s, CONFIG_LOAD_TIMEOUT_MS as t, loadAppConfig as u, protectedSubdomains as v, wildcardSite as y };
658
+
659
+ //# sourceMappingURL=config-BKpzKP6W.mjs.map