@geekmidas/cli 10.0.0-alpha.19 → 10.0.0-alpha.190

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 (436) hide show
  1. package/README.md +323 -380
  2. package/bin/adjacent-tsconfig.mjs +46 -8
  3. package/bin/gkm.mjs +11 -3
  4. package/bin/owning-tsconfig-jsx-register.mjs +18 -0
  5. package/bin/owning-tsconfig-jsx.mjs +108 -0
  6. package/dist/EndpointGenerator-CBKH87_b.mjs +1043 -0
  7. package/dist/EndpointGenerator-CBKH87_b.mjs.map +1 -0
  8. package/dist/EndpointGenerator-iyA3HkOH.cjs +1102 -0
  9. package/dist/EndpointGenerator-iyA3HkOH.cjs.map +1 -0
  10. package/dist/LegacyStateStore-CWiswz6T.mjs +124 -0
  11. package/dist/LegacyStateStore-CWiswz6T.mjs.map +1 -0
  12. package/dist/LegacyStateStore-CuSe37fl.cjs +124 -0
  13. package/dist/LegacyStateStore-CuSe37fl.cjs.map +1 -0
  14. package/dist/LocalStateStore-BciJ_DF0.cjs +178 -0
  15. package/dist/LocalStateStore-BciJ_DF0.cjs.map +1 -0
  16. package/dist/LocalStateStore-CLHasLJI.mjs +167 -0
  17. package/dist/LocalStateStore-CLHasLJI.mjs.map +1 -0
  18. package/dist/OpenApiTsGenerator-CoVA3Ykv.mjs +534 -0
  19. package/dist/OpenApiTsGenerator-CoVA3Ykv.mjs.map +1 -0
  20. package/dist/OpenApiTsGenerator-vy-fOJgs.cjs +539 -0
  21. package/dist/OpenApiTsGenerator-vy-fOJgs.cjs.map +1 -0
  22. package/dist/S3StateStore-BHLRjoj3.cjs +222 -0
  23. package/dist/S3StateStore-BHLRjoj3.cjs.map +1 -0
  24. package/dist/S3StateStore-CTiv2_ON.mjs +223 -0
  25. package/dist/S3StateStore-CTiv2_ON.mjs.map +1 -0
  26. package/dist/SSMStateStore-BqT3MXXb.cjs +204 -0
  27. package/dist/SSMStateStore-BqT3MXXb.cjs.map +1 -0
  28. package/dist/SSMStateStore-D6qqaem2.mjs +205 -0
  29. package/dist/SSMStateStore-D6qqaem2.mjs.map +1 -0
  30. package/dist/SubscriberGenerator-Cfoz8uTY.mjs +787 -0
  31. package/dist/SubscriberGenerator-Cfoz8uTY.mjs.map +1 -0
  32. package/dist/SubscriberGenerator-CxzECrfj.cjs +852 -0
  33. package/dist/SubscriberGenerator-CxzECrfj.cjs.map +1 -0
  34. package/dist/add-B2OmIQzs.cjs +712 -0
  35. package/dist/add-B2OmIQzs.cjs.map +1 -0
  36. package/dist/add-CXwL549o.mjs +710 -0
  37. package/dist/add-CXwL549o.mjs.map +1 -0
  38. package/dist/appPorts-BoXMwolc.mjs +249 -0
  39. package/dist/appPorts-BoXMwolc.mjs.map +1 -0
  40. package/dist/appPorts-IW-OZmRi.cjs +296 -0
  41. package/dist/appPorts-IW-OZmRi.cjs.map +1 -0
  42. package/dist/aws-BXfiWNbi.cjs +108 -0
  43. package/dist/aws-BXfiWNbi.cjs.map +1 -0
  44. package/dist/aws-BjvSTTcE.mjs +97 -0
  45. package/dist/aws-BjvSTTcE.mjs.map +1 -0
  46. package/dist/awsStore-BYYCmXiq.mjs +121 -0
  47. package/dist/awsStore-BYYCmXiq.mjs.map +1 -0
  48. package/dist/awsStore-DKQUElJL.cjs +138 -0
  49. package/dist/awsStore-DKQUElJL.cjs.map +1 -0
  50. package/dist/{backup-provisioner-DIVCbfee.mjs → backup-provisioner-C8DnCmxK.mjs} +2 -2
  51. package/dist/backup-provisioner-C8DnCmxK.mjs.map +1 -0
  52. package/dist/{backup-provisioner-BmhIO_Yr.cjs → backup-provisioner-oDEsPj02.cjs} +2 -2
  53. package/dist/backup-provisioner-oDEsPj02.cjs.map +1 -0
  54. package/dist/backups/runner.cjs +1007 -0
  55. package/dist/backups/runner.cjs.map +1 -0
  56. package/dist/backups/runner.d.cts +187 -0
  57. package/dist/backups/runner.d.cts.map +1 -0
  58. package/dist/backups/runner.d.mts +187 -0
  59. package/dist/backups/runner.d.mts.map +1 -0
  60. package/dist/backups/runner.mjs +984 -0
  61. package/dist/backups/runner.mjs.map +1 -0
  62. package/dist/{bundler-mwH7WOb1.mjs → bundler-CHXyJFsS.mjs} +68 -15
  63. package/dist/bundler-CHXyJFsS.mjs.map +1 -0
  64. package/dist/{bundler-mjqGAvu1.cjs → bundler-CLoVtcBi.cjs} +67 -14
  65. package/dist/bundler-CLoVtcBi.cjs.map +1 -0
  66. package/dist/cli-Bjua3PaZ.mjs +80 -0
  67. package/dist/cli-Bjua3PaZ.mjs.map +1 -0
  68. package/dist/cli-DiuUr1Am.cjs +80 -0
  69. package/dist/cli-DiuUr1Am.cjs.map +1 -0
  70. package/dist/clientTelemetry-DXuYNH-J.d.cts +10 -0
  71. package/dist/clientTelemetry-DXuYNH-J.d.cts.map +1 -0
  72. package/dist/clientTelemetry-eC8VQ6nB.d.mts +10 -0
  73. package/dist/clientTelemetry-eC8VQ6nB.d.mts.map +1 -0
  74. package/dist/compose-DUOETDhc.mjs +2855 -0
  75. package/dist/compose-DUOETDhc.mjs.map +1 -0
  76. package/dist/compose-gnNrY3NQ.cjs +2939 -0
  77. package/dist/compose-gnNrY3NQ.cjs.map +1 -0
  78. package/dist/config-1zirYXeO.d.mts +300 -0
  79. package/dist/config-1zirYXeO.d.mts.map +1 -0
  80. package/dist/config-rSlB-bXj.d.cts +300 -0
  81. package/dist/config-rSlB-bXj.d.cts.map +1 -0
  82. package/dist/config.cjs +462 -9
  83. package/dist/config.cjs.map +1 -0
  84. package/dist/config.d.cts +4 -117
  85. package/dist/config.d.mts +4 -117
  86. package/dist/config.mjs +446 -3
  87. package/dist/config.mjs.map +1 -0
  88. package/dist/credentialSchemas-D_85KW2k.mjs +236 -0
  89. package/dist/credentialSchemas-D_85KW2k.mjs.map +1 -0
  90. package/dist/credentialSchemas-DjK6xKMk.cjs +271 -0
  91. package/dist/credentialSchemas-DjK6xKMk.cjs.map +1 -0
  92. package/dist/credentials-BI52H1ad.cjs +2911 -0
  93. package/dist/credentials-BI52H1ad.cjs.map +1 -0
  94. package/dist/credentials-Cp09PIsc.cjs +1451 -0
  95. package/dist/credentials-Cp09PIsc.cjs.map +1 -0
  96. package/dist/credentials-DbjLhvix.mjs +1140 -0
  97. package/dist/credentials-DbjLhvix.mjs.map +1 -0
  98. package/dist/credentials-VLP_959f.mjs +2390 -0
  99. package/dist/credentials-VLP_959f.mjs.map +1 -0
  100. package/dist/databases-CV22HzrI.mjs +588 -0
  101. package/dist/databases-CV22HzrI.mjs.map +1 -0
  102. package/dist/databases-DwYYH2mX.cjs +703 -0
  103. package/dist/databases-DwYYH2mX.cjs.map +1 -0
  104. package/dist/dbTunnel-CLsqWr7o.mjs +153 -0
  105. package/dist/dbTunnel-CLsqWr7o.mjs.map +1 -0
  106. package/dist/dbTunnel-DQcdaaLi.cjs +153 -0
  107. package/dist/dbTunnel-DQcdaaLi.cjs.map +1 -0
  108. package/dist/define-BfrNaY82.mjs +106 -0
  109. package/dist/define-BfrNaY82.mjs.map +1 -0
  110. package/dist/define-zKgLY65H.cjs +153 -0
  111. package/dist/define-zKgLY65H.cjs.map +1 -0
  112. package/dist/deploy/public.cjs +210 -0
  113. package/dist/deploy/public.cjs.map +1 -0
  114. package/dist/deploy/public.d.cts +659 -0
  115. package/dist/deploy/public.d.cts.map +1 -0
  116. package/dist/deploy/public.d.mts +659 -0
  117. package/dist/deploy/public.d.mts.map +1 -0
  118. package/dist/deploy/public.mjs +143 -0
  119. package/dist/deploy/public.mjs.map +1 -0
  120. package/dist/deploy/sniffer-envparser-worker.cjs +54 -0
  121. package/dist/deploy/sniffer-envparser-worker.cjs.map +1 -0
  122. package/dist/deploy/sniffer-envparser-worker.d.cts +1 -0
  123. package/dist/deploy/sniffer-envparser-worker.d.mts +1 -0
  124. package/dist/deploy/sniffer-envparser-worker.mjs +55 -0
  125. package/dist/deploy/sniffer-envparser-worker.mjs.map +1 -0
  126. package/dist/deploy/sniffer-hooks.cjs +1 -1
  127. package/dist/deploy/sniffer-hooks.mjs +1 -1
  128. package/dist/deploy/sniffer-loader.cjs +2 -2
  129. package/dist/deploy/sniffer-loader.mjs +1 -1
  130. package/dist/deploy/sniffer-routes-worker.cjs +2 -2
  131. package/dist/deploy/sniffer-routes-worker.mjs +1 -1
  132. package/dist/deploy-DhIy2Ftj.mjs +3854 -0
  133. package/dist/deploy-DhIy2Ftj.mjs.map +1 -0
  134. package/dist/deploy-DpQ_4Pu1.cjs +3910 -0
  135. package/dist/deploy-DpQ_4Pu1.cjs.map +1 -0
  136. package/dist/destroy-DmTDT6V7.cjs +791 -0
  137. package/dist/destroy-DmTDT6V7.cjs.map +1 -0
  138. package/dist/destroy-wV9yNLQV.mjs +790 -0
  139. package/dist/destroy-wV9yNLQV.mjs.map +1 -0
  140. package/dist/discover-Dfmn6HQ7.mjs +940 -0
  141. package/dist/discover-Dfmn6HQ7.mjs.map +1 -0
  142. package/dist/discover-OXczlq08.cjs +1085 -0
  143. package/dist/discover-OXczlq08.cjs.map +1 -0
  144. package/dist/dokploy-B61ww4Yb.cjs +38 -0
  145. package/dist/dokploy-B61ww4Yb.cjs.map +1 -0
  146. package/dist/dokploy-Jhl3sPd4.mjs +38 -0
  147. package/dist/dokploy-Jhl3sPd4.mjs.map +1 -0
  148. package/dist/drivers-BQRb3KsL.mjs +294 -0
  149. package/dist/drivers-BQRb3KsL.mjs.map +1 -0
  150. package/dist/drivers-DP7__dJX.cjs +377 -0
  151. package/dist/drivers-DP7__dJX.cjs.map +1 -0
  152. package/dist/eas-BmvO40xS.mjs +334 -0
  153. package/dist/eas-BmvO40xS.mjs.map +1 -0
  154. package/dist/eas-X09Gz8_E.cjs +337 -0
  155. package/dist/eas-X09Gz8_E.cjs.map +1 -0
  156. package/dist/emit-C4KSXOeS.mjs +153 -0
  157. package/dist/emit-C4KSXOeS.mjs.map +1 -0
  158. package/dist/emit-DiW0kbue.cjs +164 -0
  159. package/dist/emit-DiW0kbue.cjs.map +1 -0
  160. package/dist/encryption-BBIUewnL.cjs +90 -0
  161. package/dist/encryption-BBIUewnL.cjs.map +1 -0
  162. package/dist/encryption-BOmswIgE.mjs +89 -0
  163. package/dist/encryption-BOmswIgE.mjs.map +1 -0
  164. package/dist/engine-BhjhShKf.cjs +3333 -0
  165. package/dist/engine-BhjhShKf.cjs.map +1 -0
  166. package/dist/engine-DW2H3KNa.mjs +3220 -0
  167. package/dist/engine-DW2H3KNa.mjs.map +1 -0
  168. package/dist/errors-C9uIyIDt.mjs +27 -0
  169. package/dist/errors-C9uIyIDt.mjs.map +1 -0
  170. package/dist/errors-D1x8duqI.cjs +38 -0
  171. package/dist/errors-D1x8duqI.cjs.map +1 -0
  172. package/dist/github-Ptbigbrq.mjs +986 -0
  173. package/dist/github-Ptbigbrq.mjs.map +1 -0
  174. package/dist/github-xUtu4Ur7.cjs +987 -0
  175. package/dist/github-xUtu4Ur7.cjs.map +1 -0
  176. package/dist/googlePlay-B4xhz5xT.cjs +931 -0
  177. package/dist/googlePlay-B4xhz5xT.cjs.map +1 -0
  178. package/dist/googlePlay-C9rrwN5b.mjs +931 -0
  179. package/dist/googlePlay-C9rrwN5b.mjs.map +1 -0
  180. package/dist/iam-D7mXd6by.cjs +521 -0
  181. package/dist/iam-D7mXd6by.cjs.map +1 -0
  182. package/dist/iam-DNlbVN_l.mjs +442 -0
  183. package/dist/iam-DNlbVN_l.mjs.map +1 -0
  184. package/dist/{index-RCUizGxL.d.cts → index-B1gfXH5K.d.mts} +38 -14
  185. package/dist/index-B1gfXH5K.d.mts.map +1 -0
  186. package/dist/{index-B4H4XF7A.d.mts → index-CunkOPOu.d.cts} +38 -14
  187. package/dist/index-CunkOPOu.d.cts.map +1 -0
  188. package/dist/index.cjs +15566 -13457
  189. package/dist/index.cjs.map +1 -1
  190. package/dist/index.mjs +15249 -13138
  191. package/dist/index.mjs.map +1 -1
  192. package/dist/local-CvC-z86k.mjs +224 -0
  193. package/dist/local-CvC-z86k.mjs.map +1 -0
  194. package/dist/local-DAJrhvSC.cjs +241 -0
  195. package/dist/local-DAJrhvSC.cjs.map +1 -0
  196. package/dist/migrate-0-A4BOcd.cjs +272 -0
  197. package/dist/migrate-0-A4BOcd.cjs.map +1 -0
  198. package/dist/migrate-C_36JSwV.mjs +181 -0
  199. package/dist/migrate-C_36JSwV.mjs.map +1 -0
  200. package/dist/migrate-DHbXzZIJ.mjs +267 -0
  201. package/dist/migrate-DHbXzZIJ.mjs.map +1 -0
  202. package/dist/migrate-fGWfv2DV.cjs +181 -0
  203. package/dist/migrate-fGWfv2DV.cjs.map +1 -0
  204. package/dist/next.cjs +59 -0
  205. package/dist/next.cjs.map +1 -0
  206. package/dist/next.d.cts +44 -0
  207. package/dist/next.d.cts.map +1 -0
  208. package/dist/next.d.mts +44 -0
  209. package/dist/next.d.mts.map +1 -0
  210. package/dist/next.mjs +58 -0
  211. package/dist/next.mjs.map +1 -0
  212. package/dist/openapi.cjs +213 -7
  213. package/dist/openapi.cjs.map +1 -0
  214. package/dist/openapi.d.cts +27 -8
  215. package/dist/openapi.d.cts.map +1 -1
  216. package/dist/openapi.d.mts +27 -8
  217. package/dist/openapi.d.mts.map +1 -1
  218. package/dist/openapi.mjs +208 -2
  219. package/dist/openapi.mjs.map +1 -0
  220. package/dist/projectBucket-BAoFOQtA.cjs +263 -0
  221. package/dist/projectBucket-BAoFOQtA.cjs.map +1 -0
  222. package/dist/projectBucket-Dxub09V1.mjs +222 -0
  223. package/dist/projectBucket-Dxub09V1.mjs.map +1 -0
  224. package/dist/provider-BvjDbsTR.mjs +46 -0
  225. package/dist/provider-BvjDbsTR.mjs.map +1 -0
  226. package/dist/provider-DLhgo-mB.cjs +57 -0
  227. package/dist/provider-DLhgo-mB.cjs.map +1 -0
  228. package/dist/publish-BX8_zXaf.cjs +124 -0
  229. package/dist/publish-BX8_zXaf.cjs.map +1 -0
  230. package/dist/publish-DE_yBzlz.mjs +123 -0
  231. package/dist/publish-DE_yBzlz.mjs.map +1 -0
  232. package/dist/ready-DCvnFZnJ.cjs +404 -0
  233. package/dist/ready-DCvnFZnJ.cjs.map +1 -0
  234. package/dist/ready-sSPuiZ7N.mjs +375 -0
  235. package/dist/ready-sSPuiZ7N.mjs.map +1 -0
  236. package/dist/reconcile/public.cjs +3 -5
  237. package/dist/reconcile/public.d.cts +33 -89
  238. package/dist/reconcile/public.d.cts.map +1 -1
  239. package/dist/reconcile/public.d.mts +33 -89
  240. package/dist/reconcile/public.d.mts.map +1 -1
  241. package/dist/reconcile/public.mjs +3 -3
  242. package/dist/reconcile--I7V4Klj.mjs +34 -0
  243. package/dist/reconcile--I7V4Klj.mjs.map +1 -0
  244. package/dist/reconcile-CuCQBa5-.cjs +34 -0
  245. package/dist/reconcile-CuCQBa5-.cjs.map +1 -0
  246. package/dist/resolve-CPB2jkB4.cjs +316 -0
  247. package/dist/resolve-CPB2jkB4.cjs.map +1 -0
  248. package/dist/resolve-DCPtP7-X.mjs +263 -0
  249. package/dist/resolve-DCPtP7-X.mjs.map +1 -0
  250. package/dist/rollback-sefKrjlE.mjs +137 -0
  251. package/dist/rollback-sefKrjlE.mjs.map +1 -0
  252. package/dist/rollback-ygh2qRWo.cjs +166 -0
  253. package/dist/rollback-ygh2qRWo.cjs.map +1 -0
  254. package/dist/runtime-BwiWhqkI.d.cts +82 -0
  255. package/dist/runtime-BwiWhqkI.d.cts.map +1 -0
  256. package/dist/runtime-Dx5F8-IL.d.mts +82 -0
  257. package/dist/runtime-Dx5F8-IL.d.mts.map +1 -0
  258. package/dist/s3-Bcvbg8io.cjs +240 -0
  259. package/dist/s3-Bcvbg8io.cjs.map +1 -0
  260. package/dist/s3-DK1ofU4f.mjs +240 -0
  261. package/dist/s3-DK1ofU4f.mjs.map +1 -0
  262. package/dist/sandbox/config-worker.cjs +43 -0
  263. package/dist/sandbox/config-worker.cjs.map +1 -0
  264. package/dist/sandbox/config-worker.d.cts +1 -0
  265. package/dist/sandbox/config-worker.d.mts +1 -0
  266. package/dist/sandbox/config-worker.mjs +44 -0
  267. package/dist/sandbox/config-worker.mjs.map +1 -0
  268. package/dist/sandbox/credentials-worker.cjs +53 -0
  269. package/dist/sandbox/credentials-worker.cjs.map +1 -0
  270. package/dist/sandbox/credentials-worker.d.cts +1 -0
  271. package/dist/sandbox/credentials-worker.d.mts +1 -0
  272. package/dist/sandbox/credentials-worker.mjs +54 -0
  273. package/dist/sandbox/credentials-worker.mjs.map +1 -0
  274. package/dist/sandbox/discover-worker.cjs +47 -0
  275. package/dist/sandbox/discover-worker.cjs.map +1 -0
  276. package/dist/sandbox/discover-worker.d.cts +1 -0
  277. package/dist/sandbox/discover-worker.d.mts +1 -0
  278. package/dist/sandbox/discover-worker.mjs +48 -0
  279. package/dist/sandbox/discover-worker.mjs.map +1 -0
  280. package/dist/sandbox/migrate-worker.cjs +75 -0
  281. package/dist/sandbox/migrate-worker.cjs.map +1 -0
  282. package/dist/sandbox/migrate-worker.d.cts +1 -0
  283. package/dist/sandbox/migrate-worker.d.mts +1 -0
  284. package/dist/sandbox/migrate-worker.mjs +76 -0
  285. package/dist/sandbox/migrate-worker.mjs.map +1 -0
  286. package/dist/{workspace-CRD9YinV.cjs → schemas-BCwKKA42.mjs} +399 -1179
  287. package/dist/schemas-BCwKKA42.mjs.map +1 -0
  288. package/dist/{workspace-Bu3xNCej.mjs → schemas-BQ_v0lEX.cjs} +487 -982
  289. package/dist/schemas-BQ_v0lEX.cjs.map +1 -0
  290. package/dist/secretsManager-CjTo6CRq.mjs +113 -0
  291. package/dist/secretsManager-CjTo6CRq.mjs.map +1 -0
  292. package/dist/secretsManager-CvmBGjdM.cjs +124 -0
  293. package/dist/secretsManager-CvmBGjdM.cjs.map +1 -0
  294. package/dist/seeds-Bc3niNVb.cjs +382 -0
  295. package/dist/seeds-Bc3niNVb.cjs.map +1 -0
  296. package/dist/seeds-Ccn0Ru2T.mjs +299 -0
  297. package/dist/seeds-Ccn0Ru2T.mjs.map +1 -0
  298. package/dist/serverSetup-ClU2iSeU.cjs +686 -0
  299. package/dist/serverSetup-ClU2iSeU.cjs.map +1 -0
  300. package/dist/serverSetup-D68Otrp0.mjs +686 -0
  301. package/dist/serverSetup-D68Otrp0.mjs.map +1 -0
  302. package/dist/sniffer-CFOmQQit.cjs +1997 -0
  303. package/dist/sniffer-CFOmQQit.cjs.map +1 -0
  304. package/dist/sniffer-CRF3eD_B.mjs +1824 -0
  305. package/dist/sniffer-CRF3eD_B.mjs.map +1 -0
  306. package/dist/snsSubscriptions-CwA6Ceg2.mjs +1024 -0
  307. package/dist/snsSubscriptions-CwA6Ceg2.mjs.map +1 -0
  308. package/dist/snsSubscriptions-S_CMCXqI.cjs +1149 -0
  309. package/dist/snsSubscriptions-S_CMCXqI.cjs.map +1 -0
  310. package/dist/sst-BgG7dJJu.cjs +514 -0
  311. package/dist/sst-BgG7dJJu.cjs.map +1 -0
  312. package/dist/sst-CDnHFO3U.mjs +491 -0
  313. package/dist/sst-CDnHFO3U.mjs.map +1 -0
  314. package/dist/stack-BXmLQf3K.mjs +10920 -0
  315. package/dist/stack-BXmLQf3K.mjs.map +1 -0
  316. package/dist/stack-BtnflNSa.cjs +11901 -0
  317. package/dist/stack-BtnflNSa.cjs.map +1 -0
  318. package/dist/stage-BbQidxxa.mjs +302 -0
  319. package/dist/stage-BbQidxxa.mjs.map +1 -0
  320. package/dist/stage-ssuPXLhP.cjs +331 -0
  321. package/dist/stage-ssuPXLhP.cjs.map +1 -0
  322. package/dist/stages-CQwD2QxS.cjs +190 -0
  323. package/dist/stages-CQwD2QxS.cjs.map +1 -0
  324. package/dist/stages-MA2sXnX4.mjs +190 -0
  325. package/dist/stages-MA2sXnX4.mjs.map +1 -0
  326. package/dist/target/public.cjs +15 -0
  327. package/dist/target/public.d.cts +28 -0
  328. package/dist/target/public.d.cts.map +1 -0
  329. package/dist/target/public.d.mts +28 -0
  330. package/dist/target/public.d.mts.map +1 -0
  331. package/dist/target/public.mjs +4 -0
  332. package/dist/terminal-BEGE1AEV.mjs +85 -0
  333. package/dist/terminal-BEGE1AEV.mjs.map +1 -0
  334. package/dist/terminal-BecJpgA3.cjs +85 -0
  335. package/dist/terminal-BecJpgA3.cjs.map +1 -0
  336. package/dist/{types-7R81hu0i.d.mts → types-BvokH0ya.d.cts} +2235 -459
  337. package/dist/types-BvokH0ya.d.cts.map +1 -0
  338. package/dist/{types-N7c2O2m7.d.cts → types-DmLnGeii.d.mts} +2233 -459
  339. package/dist/types-DmLnGeii.d.mts.map +1 -0
  340. package/dist/utils-CdKxD8Lt.mjs +156 -0
  341. package/dist/utils-CdKxD8Lt.mjs.map +1 -0
  342. package/dist/utils-DBqXbB8P.cjs +205 -0
  343. package/dist/utils-DBqXbB8P.cjs.map +1 -0
  344. package/dist/vitest.cjs +65 -0
  345. package/dist/vitest.cjs.map +1 -0
  346. package/dist/vitest.d.cts +29 -0
  347. package/dist/vitest.d.cts.map +1 -0
  348. package/dist/vitest.d.mts +29 -0
  349. package/dist/vitest.d.mts.map +1 -0
  350. package/dist/vitest.mjs +65 -0
  351. package/dist/vitest.mjs.map +1 -0
  352. package/dist/workerRuntime-BXfhbe13.cjs +108 -0
  353. package/dist/workerRuntime-BXfhbe13.cjs.map +1 -0
  354. package/dist/workerRuntime-CsOyBRx2.mjs +79 -0
  355. package/dist/workerRuntime-CsOyBRx2.mjs.map +1 -0
  356. package/dist/workspace/index.cjs +6 -2
  357. package/dist/workspace/index.d.cts +3 -3
  358. package/dist/workspace/index.d.mts +3 -3
  359. package/dist/workspace/index.mjs +2 -2
  360. package/dist/workspace-DEmfa9RO.cjs +3689 -0
  361. package/dist/workspace-DEmfa9RO.cjs.map +1 -0
  362. package/dist/workspace-RgU7TBgg.mjs +3133 -0
  363. package/dist/workspace-RgU7TBgg.mjs.map +1 -0
  364. package/package.json +76 -13
  365. package/dist/HostingerProvider-BY26bWwB.mjs +0 -243
  366. package/dist/HostingerProvider-BY26bWwB.mjs.map +0 -1
  367. package/dist/HostingerProvider-BZFGYYVA.cjs +0 -243
  368. package/dist/HostingerProvider-BZFGYYVA.cjs.map +0 -1
  369. package/dist/LocalStateProvider-7HR6SS2t.cjs +0 -48
  370. package/dist/LocalStateProvider-7HR6SS2t.cjs.map +0 -1
  371. package/dist/LocalStateProvider-D7QyJoLM.mjs +0 -48
  372. package/dist/LocalStateProvider-D7QyJoLM.mjs.map +0 -1
  373. package/dist/Route53Provider-Cvj40A8I.mjs +0 -209
  374. package/dist/Route53Provider-Cvj40A8I.mjs.map +0 -1
  375. package/dist/Route53Provider-DVILBsvV.cjs +0 -209
  376. package/dist/Route53Provider-DVILBsvV.cjs.map +0 -1
  377. package/dist/SSMStateProvider-B0Hu1MKZ.mjs +0 -75
  378. package/dist/SSMStateProvider-B0Hu1MKZ.mjs.map +0 -1
  379. package/dist/SSMStateProvider-VrQ-yeqd.cjs +0 -74
  380. package/dist/SSMStateProvider-VrQ-yeqd.cjs.map +0 -1
  381. package/dist/backup-provisioner-BmhIO_Yr.cjs.map +0 -1
  382. package/dist/backup-provisioner-DIVCbfee.mjs.map +0 -1
  383. package/dist/bundler-mjqGAvu1.cjs.map +0 -1
  384. package/dist/bundler-mwH7WOb1.mjs.map +0 -1
  385. package/dist/config-DSXI480r.cjs +0 -467
  386. package/dist/config-DSXI480r.cjs.map +0 -1
  387. package/dist/config-DdKkoUE1.mjs +0 -414
  388. package/dist/config-DdKkoUE1.mjs.map +0 -1
  389. package/dist/config.d.cts.map +0 -1
  390. package/dist/config.d.mts.map +0 -1
  391. package/dist/credentials-C6Pfn6GY.cjs +0 -2939
  392. package/dist/credentials-C6Pfn6GY.cjs.map +0 -1
  393. package/dist/credentials-lbv-j0Be.mjs +0 -2802
  394. package/dist/credentials-lbv-j0Be.mjs.map +0 -1
  395. package/dist/discover-BERGFg8v.cjs +0 -288
  396. package/dist/discover-BERGFg8v.cjs.map +0 -1
  397. package/dist/discover-CK-n3w6b.mjs +0 -244
  398. package/dist/discover-CK-n3w6b.mjs.map +0 -1
  399. package/dist/emit-BdoPFjZf.cjs +0 -253
  400. package/dist/emit-BdoPFjZf.cjs.map +0 -1
  401. package/dist/emit-Bzq7JsMP.mjs +0 -224
  402. package/dist/emit-Bzq7JsMP.mjs.map +0 -1
  403. package/dist/generator-LfZU7NlU.mjs +0 -247
  404. package/dist/generator-LfZU7NlU.mjs.map +0 -1
  405. package/dist/generator-Wdfp0jCS.cjs +0 -282
  406. package/dist/generator-Wdfp0jCS.cjs.map +0 -1
  407. package/dist/github-BvfpvBcW.cjs +0 -216
  408. package/dist/github-BvfpvBcW.cjs.map +0 -1
  409. package/dist/github-DW3CP-4D.mjs +0 -216
  410. package/dist/github-DW3CP-4D.mjs.map +0 -1
  411. package/dist/index-B4H4XF7A.d.mts.map +0 -1
  412. package/dist/index-RCUizGxL.d.cts.map +0 -1
  413. package/dist/openapi-B8bu_OXN.cjs +0 -2038
  414. package/dist/openapi-B8bu_OXN.cjs.map +0 -1
  415. package/dist/openapi-DfjbhrsM.mjs +0 -1991
  416. package/dist/openapi-DfjbhrsM.mjs.map +0 -1
  417. package/dist/reconcile-gb1lz1Dk.mjs +0 -113
  418. package/dist/reconcile-gb1lz1Dk.mjs.map +0 -1
  419. package/dist/reconcile-hx_vBvux.cjs +0 -136
  420. package/dist/reconcile-hx_vBvux.cjs.map +0 -1
  421. package/dist/ssm-BKN1Cg4z.mjs +0 -60
  422. package/dist/ssm-BKN1Cg4z.mjs.map +0 -1
  423. package/dist/ssm-FxeSAt35.cjs +0 -60
  424. package/dist/ssm-FxeSAt35.cjs.map +0 -1
  425. package/dist/storage-DgypfSD6.cjs +0 -351
  426. package/dist/storage-DgypfSD6.cjs.map +0 -1
  427. package/dist/storage-TP0x118M.mjs +0 -304
  428. package/dist/storage-TP0x118M.mjs.map +0 -1
  429. package/dist/transfer-DjFZRgub.mjs +0 -122
  430. package/dist/transfer-DjFZRgub.mjs.map +0 -1
  431. package/dist/transfer-SeiSeKEF.cjs +0 -151
  432. package/dist/transfer-SeiSeKEF.cjs.map +0 -1
  433. package/dist/types-7R81hu0i.d.mts.map +0 -1
  434. package/dist/types-N7c2O2m7.d.cts.map +0 -1
  435. package/dist/workspace-Bu3xNCej.mjs.map +0 -1
  436. package/dist/workspace-CRD9YinV.cjs.map +0 -1
@@ -0,0 +1,300 @@
1
+ import { D as WorkspaceConfig, Gt as GkmError, Rt as Sandbox, b as NormalizedAppConfig, r as GkmConfig, v as LoadedConfig, x as NormalizedWorkspace } from "./types-DmLnGeii.mjs";
2
+ import "./index-B1gfXH5K.mjs";
3
+ import { ConstructManifest } from "@geekmidas/manifest";
4
+ //#region src/dev/discovery.d.ts
5
+ /** Where an app is in its life. `stopped` is a server that exited on its own. */
6
+ type AppStatus = 'starting' | 'ready' | 'reloading' | 'stopped';
7
+ /** A JSON API an app serves about itself. */
8
+ type DataApiKind = 'telescope' | 'database' | 'openapi';
9
+ /**
10
+ * The local OpenObserve `gkm dev` runs for a workspace that uses a
11
+ * `Telemetry` construct: where its UI is, and who signs in. Never the
12
+ * password — the endpoint is read by anything holding its token.
13
+ */
14
+ interface DevTelemetryUi {
15
+ /** `http://localhost:<port>`. */
16
+ url: string;
17
+ /** The local root user's email. */
18
+ email: string;
19
+ }
20
+ interface DiscoveredDataApi {
21
+ kind: DataApiKind;
22
+ /** Where the app serves it. */
23
+ path: string;
24
+ /** The app's own address for it — `http://localhost:<port><path>`. */
25
+ url: string;
26
+ /** The same API through this endpoint, relative to its origin. */
27
+ proxy: string;
28
+ }
29
+ interface DiscoveredApp {
30
+ name: string;
31
+ type: 'backend' | 'web' | 'mobile';
32
+ port: number;
33
+ /** `http://localhost:<port>`. */
34
+ url: string;
35
+ publicUrl: string | null;
36
+ status: AppStatus;
37
+ reloads: number;
38
+ /** The `gkm dev` running it, when it runs in one of its own. */
39
+ pid: number | null;
40
+ dataApis: DiscoveredDataApi[];
41
+ }
42
+ interface DiscoveredWorkspace {
43
+ /** Stable for a workspace's root: its name, and a hash of where it is. */
44
+ id: string;
45
+ name: string;
46
+ root: string;
47
+ stage: string;
48
+ manifest: ConstructManifest | null;
49
+ /** The local telemetry UI — OpenObserve — when the workspace runs one. */
50
+ telemetry: DevTelemetryUi | null;
51
+ apps: DiscoveredApp[];
52
+ }
53
+ /** The body of `GET /__gkm`. */
54
+ interface DiscoveryResponse {
55
+ version: 1;
56
+ /** The `gkm dev` serving this endpoint, which may change while you watch. */
57
+ host: {
58
+ pid: number;
59
+ port: number;
60
+ };
61
+ /** Where the changes stream, as server-sent events. */
62
+ events: string;
63
+ workspaces: DiscoveredWorkspace[];
64
+ }
65
+ /** One message on `GET /__gkm/events`; its SSE `event:` is its `type`. */
66
+ type DiscoveryEvent = {
67
+ type: 'snapshot';
68
+ snapshot: DiscoveryResponse;
69
+ } | {
70
+ type: 'workspace.started' | 'workspace.stopped';
71
+ workspace: string;
72
+ } | {
73
+ type: 'app.started' | 'app.stopped' | 'app.reloaded' | 'app.status';
74
+ workspace: string;
75
+ app: DiscoveredApp;
76
+ };
77
+ //#endregion
78
+ //#region src/config.d.ts
79
+ /**
80
+ * Define GKM configuration with full TypeScript support.
81
+ * This is an identity function that provides type safety and autocomplete.
82
+ *
83
+ * @example
84
+ * ```ts
85
+ * // gkm.config.ts
86
+ * import { defineConfig } from '@geekmidas/cli/config';
87
+ *
88
+ * export default defineConfig({
89
+ * routes: './src/endpoints/**\/*.ts',
90
+ * envParser: './src/config/env',
91
+ * logger: './src/config/logger',
92
+ * telescope: true,
93
+ * });
94
+ * ```
95
+ */
96
+ declare function defineConfig(config: GkmConfig): GkmConfig;
97
+ interface ParsedModuleConfig {
98
+ path: string;
99
+ importPattern: string;
100
+ }
101
+ /**
102
+ * Parse a module config string into path and import pattern.
103
+ *
104
+ * @param configString - Config string in format "./path/to/module" or "./path/to/module#exportName"
105
+ * @param defaultAlias - The default alias name to use if no export name specified
106
+ * @returns Object with path and import pattern
107
+ *
108
+ * @example
109
+ * parseModuleConfig('./src/config/env', 'envParser')
110
+ * // { path: './src/config/env', importPattern: 'envParser' }
111
+ *
112
+ * parseModuleConfig('./src/config/env#envParser', 'envParser')
113
+ * // { path: './src/config/env', importPattern: '{ envParser }' }
114
+ *
115
+ * parseModuleConfig('./src/config/env#myEnv', 'envParser')
116
+ * // { path: './src/config/env', importPattern: '{ myEnv as envParser }' }
117
+ */
118
+ declare function parseModuleConfig(configString: string, defaultAlias: string): ParsedModuleConfig;
119
+ interface ConfigDiscoveryResult {
120
+ configPath: string;
121
+ workspaceRoot: string;
122
+ }
123
+ /**
124
+ * The directory holding the gkm config that `cwd` belongs to — the project a
125
+ * sandbox for it is confined to.
126
+ *
127
+ * @throws {ConfigNotFound} when neither `cwd` nor any parent has one.
128
+ */
129
+ declare function findWorkspaceRoot(cwd: string): string;
130
+ /** No gkm config in a directory or any of its parents. */
131
+ declare class ConfigNotFound extends GkmError {
132
+ readonly cwd: string;
133
+ constructor(cwd: string);
134
+ }
135
+ interface RawConfigResult {
136
+ config: GkmConfig | WorkspaceConfig;
137
+ workspaceRoot: string;
138
+ }
139
+ interface LoadConfigOptions {
140
+ /**
141
+ * Load the config — and discover the constructs it names — in this
142
+ * sandbox rather than in this process. The config then arrives as data;
143
+ * see {@link Sandbox.isolating} for what happens to one holding live
144
+ * objects. Defaults to the run's own (`withSandbox`); with neither, the
145
+ * config is imported here, as `gkm` always has.
146
+ */
147
+ sandbox?: Sandbox;
148
+ /**
149
+ * How long the sandboxed config load may run. Defaults to
150
+ * {@link CONFIG_LOAD_TIMEOUT_MS}.
151
+ */
152
+ timeoutMs?: number;
153
+ /**
154
+ * Start from config alone when the constructs cannot be read, with a
155
+ * warning, instead of failing. `gkm dev` alone asks for it: a half-written
156
+ * declaration should not stop the dev server from starting. Every other
157
+ * command fails with the real error — a module that cannot be found, a
158
+ * construct that refuses its config — since what it would do without the
159
+ * graph is wrong in a way that names something else.
160
+ */
161
+ tolerateConstructErrors?: boolean;
162
+ }
163
+ /**
164
+ * How long loading a config, or discovering its constructs, may take in a
165
+ * sandbox: room for tsx to compile a large project cold, and not a deploy
166
+ * held open by a config that never finishes importing.
167
+ */
168
+ declare const CONFIG_LOAD_TIMEOUT_MS = 60000;
169
+ /** The config failed to import, or threw while it ran. */
170
+ declare class ConfigLoadFailed extends Error {
171
+ readonly configPath: string;
172
+ readonly detail: string;
173
+ constructor(configPath: string, detail: string);
174
+ }
175
+ /**
176
+ * The config holds something that is not data — a custom state store, an
177
+ * inline deploy target, a function — and the sandbox it was loaded in hands
178
+ * the deploy nothing but data.
179
+ */
180
+ declare class ConfigObjectNotSerializable extends Error {
181
+ readonly configPath: string;
182
+ readonly paths: readonly string[];
183
+ constructor(configPath: string, paths: readonly string[]);
184
+ }
185
+ /**
186
+ * Run `fn` with `config` as the config of the workspace at `workspaceRoot`:
187
+ * every load of it inside — however deep, sandboxed or not — answers with
188
+ * this one rather than importing the file again.
189
+ *
190
+ * A config is the workspace's settings, and settings may come from the
191
+ * environment it was loaded in (`domains: { prod: process.env.DOMAIN }`). A
192
+ * reload in a sandbox, which passes on an allowlist of the environment, read
193
+ * the same file to a different answer: the deploy saw no domain the command
194
+ * had been given. Loaded once by the caller, every step of the run sees the
195
+ * same settings. The constructs are still discovered in the run's sandbox.
196
+ */
197
+ declare function withLoadedConfig<T>(workspaceRoot: string, config: GkmConfig | WorkspaceConfig, fn: () => T): T;
198
+ /**
199
+ * The raw config of the workspace a directory belongs to, imported in this
200
+ * process: what a caller hands {@link withLoadedConfig}, or `deploy()` as its
201
+ * `config`.
202
+ */
203
+ declare function loadRawWorkspaceConfig(cwd?: string): Promise<RawConfigResult>;
204
+ /**
205
+ * Load configuration file (single-app format).
206
+ * For backwards compatibility with existing code.
207
+ *
208
+ * @deprecated Use loadWorkspaceConfig for new code
209
+ */
210
+ declare function loadConfig(cwd?: string): Promise<GkmConfig>;
211
+ /**
212
+ * Load configuration file and process it as a workspace.
213
+ * Works with both single-app and workspace configurations.
214
+ *
215
+ * Single-app configs are automatically wrapped as a workspace with one app.
216
+ *
217
+ * @example
218
+ * ```ts
219
+ * const { type, workspace } = await loadWorkspaceConfig();
220
+ *
221
+ * if (type === 'workspace') {
222
+ * console.log('Multi-app workspace:', workspace.apps);
223
+ * } else {
224
+ * console.log('Single app wrapped as workspace');
225
+ * }
226
+ * ```
227
+ */
228
+ /**
229
+ * The workspace a directory belongs to, as its config states it — without
230
+ * discovering its constructs.
231
+ *
232
+ * For callers that need a fact the config holds (where a stage's secrets are
233
+ * stored) and nothing the graph adds. `loadWorkspaceConfig` imports every
234
+ * construct module to derive the apps, which is a cost a secrets read should
235
+ * not pay.
236
+ */
237
+ declare function loadWorkspaceSettings(cwd?: string, options?: LoadConfigOptions): Promise<LoadedConfig['workspace']>;
238
+ declare function loadWorkspaceConfig(cwd?: string, options?: LoadConfigOptions): Promise<LoadedConfig>;
239
+ /**
240
+ * A workspace with no `constructs` glob.
241
+ *
242
+ * In v10 every address, container and app comes from what the workspace
243
+ * declares — there is no second path that reads a hand-written compose file or
244
+ * an `apps` block's ports. A config that declares nothing has nothing to run.
245
+ */
246
+ declare class WorkspaceDeclaresNoConstructs extends GkmError {
247
+ readonly root: string;
248
+ constructor(root: string);
249
+ }
250
+ interface AppConfigResult {
251
+ appName: string;
252
+ app: NormalizedAppConfig;
253
+ gkmConfig: GkmConfig;
254
+ workspace: NormalizedWorkspace;
255
+ workspaceRoot: string;
256
+ appRoot: string;
257
+ }
258
+ /** A directory that no app in the workspace lives in. */
259
+ declare class NotInAnApp extends GkmError {
260
+ readonly cwd: string;
261
+ readonly apps: Readonly<Record<string, string>>;
262
+ constructor(cwd: string, apps: Readonly<Record<string, string>>);
263
+ }
264
+ /**
265
+ * The backend app a directory is part of, with its gkm config — found by the
266
+ * `path` its construct declares.
267
+ *
268
+ * @example
269
+ * ```ts
270
+ * // From apps/api, where a construct declares `path: 'apps/api'`
271
+ * const { app, workspace, workspaceRoot } = await loadAppConfig();
272
+ * ```
273
+ *
274
+ * @throws {NotInAnApp} when no app's path contains the directory.
275
+ * @throws {NotABackendApp} when the app it is in has no gkm config to run.
276
+ */
277
+ declare function loadAppConfig(cwd?: string, options?: Pick<LoadConfigOptions, 'tolerateConstructErrors'>): Promise<AppConfigResult>;
278
+ /** The app a directory is in has no gkm config — a site, or an entry app. */
279
+ declare class NotABackendApp extends GkmError {
280
+ readonly appName: string;
281
+ constructor(appName: string);
282
+ }
283
+ interface WorkspaceAppInfo {
284
+ /** The app's key in the workspace. */
285
+ appName: string;
286
+ app: NormalizedAppConfig;
287
+ workspace: NormalizedWorkspace;
288
+ workspaceRoot: string;
289
+ }
290
+ /**
291
+ * The app a directory is part of, frontend or backend — found by the `path`
292
+ * its construct declares. Unlike `loadAppConfig`, the app need not have a
293
+ * gkm config, which is what `gkm exec` and `gkm test` from a site need.
294
+ *
295
+ * @throws {NotInAnApp} when no app's path contains the directory.
296
+ */
297
+ declare function loadWorkspaceAppInfo(cwd?: string, options?: Pick<LoadConfigOptions, 'tolerateConstructErrors'>): Promise<WorkspaceAppInfo>;
298
+ //#endregion
299
+ export { DiscoveryResponse as A, withLoadedConfig as C, DiscoveredDataApi as D, DiscoveredApp as E, DiscoveredWorkspace as O, parseModuleConfig as S, DataApiKind as T, loadConfig as _, ConfigNotFound as a, loadWorkspaceConfig as b, NotABackendApp as c, RawConfigResult as d, WorkspaceAppInfo as f, loadAppConfig as g, findWorkspaceRoot as h, ConfigLoadFailed as i, DiscoveryEvent as k, NotInAnApp as l, defineConfig as m, CONFIG_LOAD_TIMEOUT_MS as n, ConfigObjectNotSerializable as o, WorkspaceDeclaresNoConstructs as p, ConfigDiscoveryResult as r, LoadConfigOptions as s, AppConfigResult as t, ParsedModuleConfig as u, loadRawWorkspaceConfig as v, AppStatus as w, loadWorkspaceSettings as x, loadWorkspaceAppInfo as y };
300
+ //# sourceMappingURL=config-1zirYXeO.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-1zirYXeO.d.mts","names":[],"sources":["../src/dev/discovery.ts","../src/config.ts"],"mappings":";;;;;KAqFY;;KAGA;;;;;;UAyBK;;EAEhB;;EAEA;;UA8BgB;EAChB,MAAM;;EAEN;;EAEA;;EAEA;;UAGgB;EAChB;EACA;EACA;;EAEA;EACA;EACA,QAAQ;EACR;;EAEA;EACA,UAAU;;UAGM;;EAEhB;EACA;EACA;EACA;EACA,UAAU;;EAEV,WAAW;EACX,MAAM;;;UAIU;EAChB;;EAEA;IAAQ;IAAa;;;EAErB;EACA,YAAY;;;KAID;EACP;EAAkB,UAAU;;EAC5B;EAAiD;;EAEnD;EACA;EACA,KAAK;;;;;;;;;;;;;;;;;;;;;iBCnJQ,aAAa,QAAQ,YAAY;UAIhC;EAChB;EACA;;;;;;;;;;;;;;;;;;;iBAoBe,kBACf,sBACA,uBACE;UAac;EAChB;EACA;;;;;;;;iBAgDe,kBAAkB;;cAKrB,uBAAuB;WACd;EAArB,YAAqB;;UAQL;EAChB,QAAQ,YAAY;EACpB;;UAGgB;;;;;;;;EAQhB,UAAU;;;;;EAKV;;;;;;;;;EASA;;;;;;;cAQY;;cAGA,yBAAyB;WAE3B;WACA;EAFV,YACU,oBACA;;;;;;;cAYE,oCAAoC;WAEtC;WACA;EAFV,YACU,oBACA;;;;;;;;;;;;;;iBAgGK,iBAAiB,GAChC,uBACA,QAAQ,YAAY,iBACpB,UAAU,IACR;;;;;;iBASmB,uBACrB,eACE,QAAQ;;;;;;;iBAuCW,WACrB,eACE,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAuCW,sBACrB,cACA,UAAS,oBACP,QAAQ;iBAKW,oBACrB,cACA,UAAS,oBACP,QAAQ;;;;;;;;cAwEE,sCAAsC;WAC7B;EAArB,YAAqB;;UAWL;EAChB;EACA,KAAK;EACL,WAAW;EACX,WAAW;EACX;EACA;;;cAqCY,mBAAmB;WAErB;WACA,MAAM,SAAS;EAFzB,YACU,aACA,MAAM,SAAS;;;;;;;;;;;;;;;iBAoCJ,cACrB,cACA,UAAS,KAAK,gDACZ,QAAQ;;cAoBE,uBAAuB;WACd;EAArB,YAAqB;;UAQL;;EAEhB;EACA,KAAK;EACL,WAAW;EACX;;;;;;;;;iBAUqB,qBACrB,cACA,UAAS,KAAK,gDACZ,QAAQ"}
@@ -0,0 +1,300 @@
1
+ import { D as WorkspaceConfig, Gt as GkmError, Rt as Sandbox, b as NormalizedAppConfig, r as GkmConfig, v as LoadedConfig, x as NormalizedWorkspace } from "./types-BvokH0ya.cjs";
2
+ import "./index-CunkOPOu.cjs";
3
+ import { ConstructManifest } from "@geekmidas/manifest";
4
+ //#region src/dev/discovery.d.ts
5
+ /** Where an app is in its life. `stopped` is a server that exited on its own. */
6
+ type AppStatus = 'starting' | 'ready' | 'reloading' | 'stopped';
7
+ /** A JSON API an app serves about itself. */
8
+ type DataApiKind = 'telescope' | 'database' | 'openapi';
9
+ /**
10
+ * The local OpenObserve `gkm dev` runs for a workspace that uses a
11
+ * `Telemetry` construct: where its UI is, and who signs in. Never the
12
+ * password — the endpoint is read by anything holding its token.
13
+ */
14
+ interface DevTelemetryUi {
15
+ /** `http://localhost:<port>`. */
16
+ url: string;
17
+ /** The local root user's email. */
18
+ email: string;
19
+ }
20
+ interface DiscoveredDataApi {
21
+ kind: DataApiKind;
22
+ /** Where the app serves it. */
23
+ path: string;
24
+ /** The app's own address for it — `http://localhost:<port><path>`. */
25
+ url: string;
26
+ /** The same API through this endpoint, relative to its origin. */
27
+ proxy: string;
28
+ }
29
+ interface DiscoveredApp {
30
+ name: string;
31
+ type: 'backend' | 'web' | 'mobile';
32
+ port: number;
33
+ /** `http://localhost:<port>`. */
34
+ url: string;
35
+ publicUrl: string | null;
36
+ status: AppStatus;
37
+ reloads: number;
38
+ /** The `gkm dev` running it, when it runs in one of its own. */
39
+ pid: number | null;
40
+ dataApis: DiscoveredDataApi[];
41
+ }
42
+ interface DiscoveredWorkspace {
43
+ /** Stable for a workspace's root: its name, and a hash of where it is. */
44
+ id: string;
45
+ name: string;
46
+ root: string;
47
+ stage: string;
48
+ manifest: ConstructManifest | null;
49
+ /** The local telemetry UI — OpenObserve — when the workspace runs one. */
50
+ telemetry: DevTelemetryUi | null;
51
+ apps: DiscoveredApp[];
52
+ }
53
+ /** The body of `GET /__gkm`. */
54
+ interface DiscoveryResponse {
55
+ version: 1;
56
+ /** The `gkm dev` serving this endpoint, which may change while you watch. */
57
+ host: {
58
+ pid: number;
59
+ port: number;
60
+ };
61
+ /** Where the changes stream, as server-sent events. */
62
+ events: string;
63
+ workspaces: DiscoveredWorkspace[];
64
+ }
65
+ /** One message on `GET /__gkm/events`; its SSE `event:` is its `type`. */
66
+ type DiscoveryEvent = {
67
+ type: 'snapshot';
68
+ snapshot: DiscoveryResponse;
69
+ } | {
70
+ type: 'workspace.started' | 'workspace.stopped';
71
+ workspace: string;
72
+ } | {
73
+ type: 'app.started' | 'app.stopped' | 'app.reloaded' | 'app.status';
74
+ workspace: string;
75
+ app: DiscoveredApp;
76
+ };
77
+ //#endregion
78
+ //#region src/config.d.ts
79
+ /**
80
+ * Define GKM configuration with full TypeScript support.
81
+ * This is an identity function that provides type safety and autocomplete.
82
+ *
83
+ * @example
84
+ * ```ts
85
+ * // gkm.config.ts
86
+ * import { defineConfig } from '@geekmidas/cli/config';
87
+ *
88
+ * export default defineConfig({
89
+ * routes: './src/endpoints/**\/*.ts',
90
+ * envParser: './src/config/env',
91
+ * logger: './src/config/logger',
92
+ * telescope: true,
93
+ * });
94
+ * ```
95
+ */
96
+ declare function defineConfig(config: GkmConfig): GkmConfig;
97
+ interface ParsedModuleConfig {
98
+ path: string;
99
+ importPattern: string;
100
+ }
101
+ /**
102
+ * Parse a module config string into path and import pattern.
103
+ *
104
+ * @param configString - Config string in format "./path/to/module" or "./path/to/module#exportName"
105
+ * @param defaultAlias - The default alias name to use if no export name specified
106
+ * @returns Object with path and import pattern
107
+ *
108
+ * @example
109
+ * parseModuleConfig('./src/config/env', 'envParser')
110
+ * // { path: './src/config/env', importPattern: 'envParser' }
111
+ *
112
+ * parseModuleConfig('./src/config/env#envParser', 'envParser')
113
+ * // { path: './src/config/env', importPattern: '{ envParser }' }
114
+ *
115
+ * parseModuleConfig('./src/config/env#myEnv', 'envParser')
116
+ * // { path: './src/config/env', importPattern: '{ myEnv as envParser }' }
117
+ */
118
+ declare function parseModuleConfig(configString: string, defaultAlias: string): ParsedModuleConfig;
119
+ interface ConfigDiscoveryResult {
120
+ configPath: string;
121
+ workspaceRoot: string;
122
+ }
123
+ /**
124
+ * The directory holding the gkm config that `cwd` belongs to — the project a
125
+ * sandbox for it is confined to.
126
+ *
127
+ * @throws {ConfigNotFound} when neither `cwd` nor any parent has one.
128
+ */
129
+ declare function findWorkspaceRoot(cwd: string): string;
130
+ /** No gkm config in a directory or any of its parents. */
131
+ declare class ConfigNotFound extends GkmError {
132
+ readonly cwd: string;
133
+ constructor(cwd: string);
134
+ }
135
+ interface RawConfigResult {
136
+ config: GkmConfig | WorkspaceConfig;
137
+ workspaceRoot: string;
138
+ }
139
+ interface LoadConfigOptions {
140
+ /**
141
+ * Load the config — and discover the constructs it names — in this
142
+ * sandbox rather than in this process. The config then arrives as data;
143
+ * see {@link Sandbox.isolating} for what happens to one holding live
144
+ * objects. Defaults to the run's own (`withSandbox`); with neither, the
145
+ * config is imported here, as `gkm` always has.
146
+ */
147
+ sandbox?: Sandbox;
148
+ /**
149
+ * How long the sandboxed config load may run. Defaults to
150
+ * {@link CONFIG_LOAD_TIMEOUT_MS}.
151
+ */
152
+ timeoutMs?: number;
153
+ /**
154
+ * Start from config alone when the constructs cannot be read, with a
155
+ * warning, instead of failing. `gkm dev` alone asks for it: a half-written
156
+ * declaration should not stop the dev server from starting. Every other
157
+ * command fails with the real error — a module that cannot be found, a
158
+ * construct that refuses its config — since what it would do without the
159
+ * graph is wrong in a way that names something else.
160
+ */
161
+ tolerateConstructErrors?: boolean;
162
+ }
163
+ /**
164
+ * How long loading a config, or discovering its constructs, may take in a
165
+ * sandbox: room for tsx to compile a large project cold, and not a deploy
166
+ * held open by a config that never finishes importing.
167
+ */
168
+ declare const CONFIG_LOAD_TIMEOUT_MS = 60000;
169
+ /** The config failed to import, or threw while it ran. */
170
+ declare class ConfigLoadFailed extends Error {
171
+ readonly configPath: string;
172
+ readonly detail: string;
173
+ constructor(configPath: string, detail: string);
174
+ }
175
+ /**
176
+ * The config holds something that is not data — a custom state store, an
177
+ * inline deploy target, a function — and the sandbox it was loaded in hands
178
+ * the deploy nothing but data.
179
+ */
180
+ declare class ConfigObjectNotSerializable extends Error {
181
+ readonly configPath: string;
182
+ readonly paths: readonly string[];
183
+ constructor(configPath: string, paths: readonly string[]);
184
+ }
185
+ /**
186
+ * Run `fn` with `config` as the config of the workspace at `workspaceRoot`:
187
+ * every load of it inside — however deep, sandboxed or not — answers with
188
+ * this one rather than importing the file again.
189
+ *
190
+ * A config is the workspace's settings, and settings may come from the
191
+ * environment it was loaded in (`domains: { prod: process.env.DOMAIN }`). A
192
+ * reload in a sandbox, which passes on an allowlist of the environment, read
193
+ * the same file to a different answer: the deploy saw no domain the command
194
+ * had been given. Loaded once by the caller, every step of the run sees the
195
+ * same settings. The constructs are still discovered in the run's sandbox.
196
+ */
197
+ declare function withLoadedConfig<T>(workspaceRoot: string, config: GkmConfig | WorkspaceConfig, fn: () => T): T;
198
+ /**
199
+ * The raw config of the workspace a directory belongs to, imported in this
200
+ * process: what a caller hands {@link withLoadedConfig}, or `deploy()` as its
201
+ * `config`.
202
+ */
203
+ declare function loadRawWorkspaceConfig(cwd?: string): Promise<RawConfigResult>;
204
+ /**
205
+ * Load configuration file (single-app format).
206
+ * For backwards compatibility with existing code.
207
+ *
208
+ * @deprecated Use loadWorkspaceConfig for new code
209
+ */
210
+ declare function loadConfig(cwd?: string): Promise<GkmConfig>;
211
+ /**
212
+ * Load configuration file and process it as a workspace.
213
+ * Works with both single-app and workspace configurations.
214
+ *
215
+ * Single-app configs are automatically wrapped as a workspace with one app.
216
+ *
217
+ * @example
218
+ * ```ts
219
+ * const { type, workspace } = await loadWorkspaceConfig();
220
+ *
221
+ * if (type === 'workspace') {
222
+ * console.log('Multi-app workspace:', workspace.apps);
223
+ * } else {
224
+ * console.log('Single app wrapped as workspace');
225
+ * }
226
+ * ```
227
+ */
228
+ /**
229
+ * The workspace a directory belongs to, as its config states it — without
230
+ * discovering its constructs.
231
+ *
232
+ * For callers that need a fact the config holds (where a stage's secrets are
233
+ * stored) and nothing the graph adds. `loadWorkspaceConfig` imports every
234
+ * construct module to derive the apps, which is a cost a secrets read should
235
+ * not pay.
236
+ */
237
+ declare function loadWorkspaceSettings(cwd?: string, options?: LoadConfigOptions): Promise<LoadedConfig['workspace']>;
238
+ declare function loadWorkspaceConfig(cwd?: string, options?: LoadConfigOptions): Promise<LoadedConfig>;
239
+ /**
240
+ * A workspace with no `constructs` glob.
241
+ *
242
+ * In v10 every address, container and app comes from what the workspace
243
+ * declares — there is no second path that reads a hand-written compose file or
244
+ * an `apps` block's ports. A config that declares nothing has nothing to run.
245
+ */
246
+ declare class WorkspaceDeclaresNoConstructs extends GkmError {
247
+ readonly root: string;
248
+ constructor(root: string);
249
+ }
250
+ interface AppConfigResult {
251
+ appName: string;
252
+ app: NormalizedAppConfig;
253
+ gkmConfig: GkmConfig;
254
+ workspace: NormalizedWorkspace;
255
+ workspaceRoot: string;
256
+ appRoot: string;
257
+ }
258
+ /** A directory that no app in the workspace lives in. */
259
+ declare class NotInAnApp extends GkmError {
260
+ readonly cwd: string;
261
+ readonly apps: Readonly<Record<string, string>>;
262
+ constructor(cwd: string, apps: Readonly<Record<string, string>>);
263
+ }
264
+ /**
265
+ * The backend app a directory is part of, with its gkm config — found by the
266
+ * `path` its construct declares.
267
+ *
268
+ * @example
269
+ * ```ts
270
+ * // From apps/api, where a construct declares `path: 'apps/api'`
271
+ * const { app, workspace, workspaceRoot } = await loadAppConfig();
272
+ * ```
273
+ *
274
+ * @throws {NotInAnApp} when no app's path contains the directory.
275
+ * @throws {NotABackendApp} when the app it is in has no gkm config to run.
276
+ */
277
+ declare function loadAppConfig(cwd?: string, options?: Pick<LoadConfigOptions, 'tolerateConstructErrors'>): Promise<AppConfigResult>;
278
+ /** The app a directory is in has no gkm config — a site, or an entry app. */
279
+ declare class NotABackendApp extends GkmError {
280
+ readonly appName: string;
281
+ constructor(appName: string);
282
+ }
283
+ interface WorkspaceAppInfo {
284
+ /** The app's key in the workspace. */
285
+ appName: string;
286
+ app: NormalizedAppConfig;
287
+ workspace: NormalizedWorkspace;
288
+ workspaceRoot: string;
289
+ }
290
+ /**
291
+ * The app a directory is part of, frontend or backend — found by the `path`
292
+ * its construct declares. Unlike `loadAppConfig`, the app need not have a
293
+ * gkm config, which is what `gkm exec` and `gkm test` from a site need.
294
+ *
295
+ * @throws {NotInAnApp} when no app's path contains the directory.
296
+ */
297
+ declare function loadWorkspaceAppInfo(cwd?: string, options?: Pick<LoadConfigOptions, 'tolerateConstructErrors'>): Promise<WorkspaceAppInfo>;
298
+ //#endregion
299
+ export { DiscoveryResponse as A, withLoadedConfig as C, DiscoveredDataApi as D, DiscoveredApp as E, DiscoveredWorkspace as O, parseModuleConfig as S, DataApiKind as T, loadConfig as _, ConfigNotFound as a, loadWorkspaceConfig as b, NotABackendApp as c, RawConfigResult as d, WorkspaceAppInfo as f, loadAppConfig as g, findWorkspaceRoot as h, ConfigLoadFailed as i, DiscoveryEvent as k, NotInAnApp as l, defineConfig as m, CONFIG_LOAD_TIMEOUT_MS as n, ConfigObjectNotSerializable as o, WorkspaceDeclaresNoConstructs as p, ConfigDiscoveryResult as r, LoadConfigOptions as s, AppConfigResult as t, ParsedModuleConfig as u, loadRawWorkspaceConfig as v, AppStatus as w, loadWorkspaceSettings as x, loadWorkspaceAppInfo as y };
300
+ //# sourceMappingURL=config-rSlB-bXj.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-rSlB-bXj.d.cts","names":[],"sources":["../src/dev/discovery.ts","../src/config.ts"],"mappings":";;;;;KAqFY;;KAGA;;;;;;UAyBK;;EAEhB;;EAEA;;UA8BgB;EAChB,MAAM;;EAEN;;EAEA;;EAEA;;UAGgB;EAChB;EACA;EACA;;EAEA;EACA;EACA,QAAQ;EACR;;EAEA;EACA,UAAU;;UAGM;;EAEhB;EACA;EACA;EACA;EACA,UAAU;;EAEV,WAAW;EACX,MAAM;;;UAIU;EAChB;;EAEA;IAAQ;IAAa;;;EAErB;EACA,YAAY;;;KAID;EACP;EAAkB,UAAU;;EAC5B;EAAiD;;EAEnD;EACA;EACA,KAAK;;;;;;;;;;;;;;;;;;;;;iBCnJQ,aAAa,QAAQ,YAAY;UAIhC;EAChB;EACA;;;;;;;;;;;;;;;;;;;iBAoBe,kBACf,sBACA,uBACE;UAac;EAChB;EACA;;;;;;;;iBAgDe,kBAAkB;;cAKrB,uBAAuB;WACd;EAArB,YAAqB;;UAQL;EAChB,QAAQ,YAAY;EACpB;;UAGgB;;;;;;;;EAQhB,UAAU;;;;;EAKV;;;;;;;;;EASA;;;;;;;cAQY;;cAGA,yBAAyB;WAE3B;WACA;EAFV,YACU,oBACA;;;;;;;cAYE,oCAAoC;WAEtC;WACA;EAFV,YACU,oBACA;;;;;;;;;;;;;;iBAgGK,iBAAiB,GAChC,uBACA,QAAQ,YAAY,iBACpB,UAAU,IACR;;;;;;iBASmB,uBACrB,eACE,QAAQ;;;;;;;iBAuCW,WACrB,eACE,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAuCW,sBACrB,cACA,UAAS,oBACP,QAAQ;iBAKW,oBACrB,cACA,UAAS,oBACP,QAAQ;;;;;;;;cAwEE,sCAAsC;WAC7B;EAArB,YAAqB;;UAWL;EAChB;EACA,KAAK;EACL,WAAW;EACX,WAAW;EACX;EACA;;;cAqCY,mBAAmB;WAErB;WACA,MAAM,SAAS;EAFzB,YACU,aACA,MAAM,SAAS;;;;;;;;;;;;;;;iBAoCJ,cACrB,cACA,UAAS,KAAK,gDACZ,QAAQ;;cAoBE,uBAAuB;WACd;EAArB,YAAqB;;UAQL;;EAEhB;EACA,KAAK;EACL,WAAW;EACX;;;;;;;;;iBAUqB,qBACrB,cACA,UAAS,KAAK,gDACZ,QAAQ"}