@geekmidas/cli 10.0.0-alpha.17 → 10.0.0-alpha.171

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 (452) 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-C1h_wExz.cjs +1098 -0
  7. package/dist/EndpointGenerator-C1h_wExz.cjs.map +1 -0
  8. package/dist/EndpointGenerator-CSKhAD6W.mjs +1039 -0
  9. package/dist/EndpointGenerator-CSKhAD6W.mjs.map +1 -0
  10. package/dist/GoDaddyProvider-Cs32wo6I.cjs +412 -0
  11. package/dist/GoDaddyProvider-Cs32wo6I.cjs.map +1 -0
  12. package/dist/GoDaddyProvider-D7CTqN0f.mjs +412 -0
  13. package/dist/GoDaddyProvider-D7CTqN0f.mjs.map +1 -0
  14. package/dist/{HostingerProvider-BY26bWwB.mjs → HostingerProvider-B_3Qs9mT.mjs} +23 -9
  15. package/dist/HostingerProvider-B_3Qs9mT.mjs.map +1 -0
  16. package/dist/{HostingerProvider-BZFGYYVA.cjs → HostingerProvider-D0515Stf.cjs} +23 -9
  17. package/dist/HostingerProvider-D0515Stf.cjs.map +1 -0
  18. package/dist/LegacyStateStore-Bv_2L86H.cjs +124 -0
  19. package/dist/LegacyStateStore-Bv_2L86H.cjs.map +1 -0
  20. package/dist/LegacyStateStore-CUjKKENQ.mjs +124 -0
  21. package/dist/LegacyStateStore-CUjKKENQ.mjs.map +1 -0
  22. package/dist/LocalStateStore-DXuj1BDq.mjs +167 -0
  23. package/dist/LocalStateStore-DXuj1BDq.mjs.map +1 -0
  24. package/dist/LocalStateStore-PQ2qJ5VF.cjs +178 -0
  25. package/dist/LocalStateStore-PQ2qJ5VF.cjs.map +1 -0
  26. package/dist/OpenApiTsGenerator-5xPn-p65.mjs +534 -0
  27. package/dist/OpenApiTsGenerator-5xPn-p65.mjs.map +1 -0
  28. package/dist/OpenApiTsGenerator-CzrLGzC0.cjs +539 -0
  29. package/dist/OpenApiTsGenerator-CzrLGzC0.cjs.map +1 -0
  30. package/dist/{Route53Provider-Cvj40A8I.mjs → Route53Provider-Di_SD9CF.mjs} +3 -3
  31. package/dist/Route53Provider-Di_SD9CF.mjs.map +1 -0
  32. package/dist/{Route53Provider-DVILBsvV.cjs → Route53Provider-emLuQHVw.cjs} +3 -3
  33. package/dist/Route53Provider-emLuQHVw.cjs.map +1 -0
  34. package/dist/S3StateStore-BGnOwqUp.mjs +223 -0
  35. package/dist/S3StateStore-BGnOwqUp.mjs.map +1 -0
  36. package/dist/S3StateStore-cmS6iUZn.cjs +222 -0
  37. package/dist/S3StateStore-cmS6iUZn.cjs.map +1 -0
  38. package/dist/SSMStateStore-BqXzPBbu.mjs +205 -0
  39. package/dist/SSMStateStore-BqXzPBbu.mjs.map +1 -0
  40. package/dist/SSMStateStore-BtNGbg8Z.cjs +204 -0
  41. package/dist/SSMStateStore-BtNGbg8Z.cjs.map +1 -0
  42. package/dist/SubscriberGenerator-CfZWX0lT.mjs +783 -0
  43. package/dist/SubscriberGenerator-CfZWX0lT.mjs.map +1 -0
  44. package/dist/SubscriberGenerator-DMi4siph.cjs +848 -0
  45. package/dist/SubscriberGenerator-DMi4siph.cjs.map +1 -0
  46. package/dist/add-DW2KLCY0.mjs +711 -0
  47. package/dist/add-DW2KLCY0.mjs.map +1 -0
  48. package/dist/add-Dp5xRn-u.cjs +713 -0
  49. package/dist/add-Dp5xRn-u.cjs.map +1 -0
  50. package/dist/appPorts-BoXMwolc.mjs +249 -0
  51. package/dist/appPorts-BoXMwolc.mjs.map +1 -0
  52. package/dist/appPorts-IW-OZmRi.cjs +296 -0
  53. package/dist/appPorts-IW-OZmRi.cjs.map +1 -0
  54. package/dist/apps-DYGKg5SP.cjs +5535 -0
  55. package/dist/apps-DYGKg5SP.cjs.map +1 -0
  56. package/dist/apps-DrXwv-0A.mjs +4986 -0
  57. package/dist/apps-DrXwv-0A.mjs.map +1 -0
  58. package/dist/aws-C5LAU_Ii.mjs +97 -0
  59. package/dist/aws-C5LAU_Ii.mjs.map +1 -0
  60. package/dist/aws-DKC2m3sT.cjs +108 -0
  61. package/dist/aws-DKC2m3sT.cjs.map +1 -0
  62. package/dist/awsStore-Bx5nCFnS.mjs +121 -0
  63. package/dist/awsStore-Bx5nCFnS.mjs.map +1 -0
  64. package/dist/awsStore-u3ehhMoY.cjs +138 -0
  65. package/dist/awsStore-u3ehhMoY.cjs.map +1 -0
  66. package/dist/{backup-provisioner-DIVCbfee.mjs → backup-provisioner-C8DnCmxK.mjs} +2 -2
  67. package/dist/backup-provisioner-C8DnCmxK.mjs.map +1 -0
  68. package/dist/{backup-provisioner-BmhIO_Yr.cjs → backup-provisioner-oDEsPj02.cjs} +2 -2
  69. package/dist/backup-provisioner-oDEsPj02.cjs.map +1 -0
  70. package/dist/backups/runner.cjs +519 -0
  71. package/dist/backups/runner.cjs.map +1 -0
  72. package/dist/backups/runner.d.cts +102 -0
  73. package/dist/backups/runner.d.cts.map +1 -0
  74. package/dist/backups/runner.d.mts +102 -0
  75. package/dist/backups/runner.d.mts.map +1 -0
  76. package/dist/backups/runner.mjs +506 -0
  77. package/dist/backups/runner.mjs.map +1 -0
  78. package/dist/{bundler-mjqGAvu1.cjs → bundler-BIfEe05e.cjs} +59 -14
  79. package/dist/bundler-BIfEe05e.cjs.map +1 -0
  80. package/dist/{bundler-mwH7WOb1.mjs → bundler-Swt8wHG9.mjs} +59 -14
  81. package/dist/bundler-Swt8wHG9.mjs.map +1 -0
  82. package/dist/cli-C9wdKQy_.mjs +80 -0
  83. package/dist/cli-C9wdKQy_.mjs.map +1 -0
  84. package/dist/cli-ohJToj0E.cjs +80 -0
  85. package/dist/cli-ohJToj0E.cjs.map +1 -0
  86. package/dist/compose-BLOnkeaJ.mjs +2432 -0
  87. package/dist/compose-BLOnkeaJ.mjs.map +1 -0
  88. package/dist/compose-Br3SQ2bW.cjs +3293 -0
  89. package/dist/compose-Br3SQ2bW.cjs.map +1 -0
  90. package/dist/compose-SNYBstbO.cjs +2929 -0
  91. package/dist/compose-SNYBstbO.cjs.map +1 -0
  92. package/dist/compose-iUOeazjW.mjs +3192 -0
  93. package/dist/compose-iUOeazjW.mjs.map +1 -0
  94. package/dist/config-CsCYzlVO.d.mts +291 -0
  95. package/dist/config-CsCYzlVO.d.mts.map +1 -0
  96. package/dist/config-D-gHQXhi.d.cts +291 -0
  97. package/dist/config-D-gHQXhi.d.cts.map +1 -0
  98. package/dist/config.cjs +457 -9
  99. package/dist/config.cjs.map +1 -0
  100. package/dist/config.d.cts +4 -117
  101. package/dist/config.d.mts +4 -117
  102. package/dist/config.mjs +441 -3
  103. package/dist/config.mjs.map +1 -0
  104. package/dist/credentialSchemas-BzJiK1nQ.mjs +236 -0
  105. package/dist/credentialSchemas-BzJiK1nQ.mjs.map +1 -0
  106. package/dist/credentialSchemas-OVXofU-r.cjs +271 -0
  107. package/dist/credentialSchemas-OVXofU-r.cjs.map +1 -0
  108. package/dist/credentials-BdZhygvW.cjs +2293 -0
  109. package/dist/credentials-BdZhygvW.cjs.map +1 -0
  110. package/dist/credentials-C2VfI-uf.mjs +1838 -0
  111. package/dist/credentials-C2VfI-uf.mjs.map +1 -0
  112. package/dist/databases-CuTL1e7s.cjs +703 -0
  113. package/dist/databases-CuTL1e7s.cjs.map +1 -0
  114. package/dist/databases-zN-gEox0.mjs +588 -0
  115. package/dist/databases-zN-gEox0.mjs.map +1 -0
  116. package/dist/define-6poNqm5O.mjs +106 -0
  117. package/dist/define-6poNqm5O.mjs.map +1 -0
  118. package/dist/define-crmMcXFS.cjs +153 -0
  119. package/dist/define-crmMcXFS.cjs.map +1 -0
  120. package/dist/deploy/public.cjs +211 -0
  121. package/dist/deploy/public.cjs.map +1 -0
  122. package/dist/deploy/public.d.cts +658 -0
  123. package/dist/deploy/public.d.cts.map +1 -0
  124. package/dist/deploy/public.d.mts +658 -0
  125. package/dist/deploy/public.d.mts.map +1 -0
  126. package/dist/deploy/public.mjs +144 -0
  127. package/dist/deploy/public.mjs.map +1 -0
  128. package/dist/deploy/sniffer-envparser-worker.cjs +54 -0
  129. package/dist/deploy/sniffer-envparser-worker.cjs.map +1 -0
  130. package/dist/deploy/sniffer-envparser-worker.d.cts +1 -0
  131. package/dist/deploy/sniffer-envparser-worker.d.mts +1 -0
  132. package/dist/deploy/sniffer-envparser-worker.mjs +55 -0
  133. package/dist/deploy/sniffer-envparser-worker.mjs.map +1 -0
  134. package/dist/deploy/sniffer-hooks.cjs +1 -1
  135. package/dist/deploy/sniffer-hooks.mjs +1 -1
  136. package/dist/deploy/sniffer-loader.cjs +2 -2
  137. package/dist/deploy/sniffer-loader.mjs +1 -1
  138. package/dist/deploy/sniffer-routes-worker.cjs +2 -2
  139. package/dist/deploy/sniffer-routes-worker.mjs +1 -1
  140. package/dist/deploy-CYyf-Q8N.cjs +3902 -0
  141. package/dist/deploy-CYyf-Q8N.cjs.map +1 -0
  142. package/dist/deploy-DqH8QReb.mjs +3846 -0
  143. package/dist/deploy-DqH8QReb.mjs.map +1 -0
  144. package/dist/destroy-B9myEYFT.mjs +788 -0
  145. package/dist/destroy-B9myEYFT.mjs.map +1 -0
  146. package/dist/destroy-Bp5iHtLf.cjs +789 -0
  147. package/dist/destroy-Bp5iHtLf.cjs.map +1 -0
  148. package/dist/discover-39VKSE2i.cjs +1085 -0
  149. package/dist/discover-39VKSE2i.cjs.map +1 -0
  150. package/dist/discover-B_PDDaVj.mjs +940 -0
  151. package/dist/discover-B_PDDaVj.mjs.map +1 -0
  152. package/dist/docker-BezTRGxN.cjs +1520 -0
  153. package/dist/docker-BezTRGxN.cjs.map +1 -0
  154. package/dist/docker-De_-Ll-A.mjs +1413 -0
  155. package/dist/docker-De_-Ll-A.mjs.map +1 -0
  156. package/dist/dokploy-CWCIqro_.cjs +38 -0
  157. package/dist/dokploy-CWCIqro_.cjs.map +1 -0
  158. package/dist/dokploy-EsBgWO8W.mjs +38 -0
  159. package/dist/dokploy-EsBgWO8W.mjs.map +1 -0
  160. package/dist/drivers-BhdC9Efj.cjs +248 -0
  161. package/dist/drivers-BhdC9Efj.cjs.map +1 -0
  162. package/dist/drivers-wcDnzf7l.mjs +213 -0
  163. package/dist/drivers-wcDnzf7l.mjs.map +1 -0
  164. package/dist/eas-8t6PJRni.cjs +337 -0
  165. package/dist/eas-8t6PJRni.cjs.map +1 -0
  166. package/dist/eas-BalvsiH5.mjs +334 -0
  167. package/dist/eas-BalvsiH5.mjs.map +1 -0
  168. package/dist/emit-C4KSXOeS.mjs +153 -0
  169. package/dist/emit-C4KSXOeS.mjs.map +1 -0
  170. package/dist/emit-DiW0kbue.cjs +164 -0
  171. package/dist/emit-DiW0kbue.cjs.map +1 -0
  172. package/dist/encryption-B4mWxt4G.mjs +89 -0
  173. package/dist/encryption-B4mWxt4G.mjs.map +1 -0
  174. package/dist/encryption-CKBmU66R.cjs +90 -0
  175. package/dist/encryption-CKBmU66R.cjs.map +1 -0
  176. package/dist/engine-BTG46RG-.cjs +3329 -0
  177. package/dist/engine-BTG46RG-.cjs.map +1 -0
  178. package/dist/engine-y8iWIXuv.mjs +3216 -0
  179. package/dist/engine-y8iWIXuv.mjs.map +1 -0
  180. package/dist/errors-D8Gwp5kU.mjs +23 -0
  181. package/dist/errors-D8Gwp5kU.mjs.map +1 -0
  182. package/dist/errors-DMC4Umsb.cjs +34 -0
  183. package/dist/errors-DMC4Umsb.cjs.map +1 -0
  184. package/dist/github-CeXlzWWA.cjs +978 -0
  185. package/dist/github-CeXlzWWA.cjs.map +1 -0
  186. package/dist/github-DvGoKoQO.mjs +977 -0
  187. package/dist/github-DvGoKoQO.mjs.map +1 -0
  188. package/dist/googlePlay-CfzG7jOJ.cjs +931 -0
  189. package/dist/googlePlay-CfzG7jOJ.cjs.map +1 -0
  190. package/dist/googlePlay-DWv6CUgM.mjs +931 -0
  191. package/dist/googlePlay-DWv6CUgM.mjs.map +1 -0
  192. package/dist/iam-BE0qX5Lb.mjs +442 -0
  193. package/dist/iam-BE0qX5Lb.mjs.map +1 -0
  194. package/dist/iam-FA95ku7l.cjs +521 -0
  195. package/dist/iam-FA95ku7l.cjs.map +1 -0
  196. package/dist/{index-RCUizGxL.d.cts → index-QxGYzGEN.d.mts} +38 -14
  197. package/dist/index-QxGYzGEN.d.mts.map +1 -0
  198. package/dist/{index-B4H4XF7A.d.mts → index-tFzoro1V.d.cts} +38 -14
  199. package/dist/index-tFzoro1V.d.cts.map +1 -0
  200. package/dist/index.cjs +15142 -13470
  201. package/dist/index.cjs.map +1 -1
  202. package/dist/index.mjs +14959 -13285
  203. package/dist/index.mjs.map +1 -1
  204. package/dist/local-CvRvfktv.mjs +224 -0
  205. package/dist/local-CvRvfktv.mjs.map +1 -0
  206. package/dist/local-DH9at_0c.cjs +241 -0
  207. package/dist/local-DH9at_0c.cjs.map +1 -0
  208. package/dist/migrate-B1lHo2K2.cjs +272 -0
  209. package/dist/migrate-B1lHo2K2.cjs.map +1 -0
  210. package/dist/migrate-D1iCmQgc.mjs +267 -0
  211. package/dist/migrate-D1iCmQgc.mjs.map +1 -0
  212. package/dist/migrate-DzOWCnRR.cjs +181 -0
  213. package/dist/migrate-DzOWCnRR.cjs.map +1 -0
  214. package/dist/migrate-NmW2Su8s.mjs +181 -0
  215. package/dist/migrate-NmW2Su8s.mjs.map +1 -0
  216. package/dist/next.cjs +59 -0
  217. package/dist/next.cjs.map +1 -0
  218. package/dist/next.d.cts +44 -0
  219. package/dist/next.d.cts.map +1 -0
  220. package/dist/next.d.mts +44 -0
  221. package/dist/next.d.mts.map +1 -0
  222. package/dist/next.mjs +58 -0
  223. package/dist/next.mjs.map +1 -0
  224. package/dist/notes-BdIY7IoB.mjs +409 -0
  225. package/dist/notes-BdIY7IoB.mjs.map +1 -0
  226. package/dist/notes-ikElBCC8.cjs +510 -0
  227. package/dist/notes-ikElBCC8.cjs.map +1 -0
  228. package/dist/openapi.cjs +213 -7
  229. package/dist/openapi.cjs.map +1 -0
  230. package/dist/openapi.d.cts +32 -8
  231. package/dist/openapi.d.cts.map +1 -1
  232. package/dist/openapi.d.mts +32 -8
  233. package/dist/openapi.d.mts.map +1 -1
  234. package/dist/openapi.mjs +208 -2
  235. package/dist/openapi.mjs.map +1 -0
  236. package/dist/projectBucket-C-FOIic4.mjs +222 -0
  237. package/dist/projectBucket-C-FOIic4.mjs.map +1 -0
  238. package/dist/projectBucket-uidxz03Q.cjs +263 -0
  239. package/dist/projectBucket-uidxz03Q.cjs.map +1 -0
  240. package/dist/provider-BqpjG9QM.cjs +57 -0
  241. package/dist/provider-BqpjG9QM.cjs.map +1 -0
  242. package/dist/provider-CEOKk8NS.mjs +46 -0
  243. package/dist/provider-CEOKk8NS.mjs.map +1 -0
  244. package/dist/publish-Ujng6o63.mjs +123 -0
  245. package/dist/publish-Ujng6o63.mjs.map +1 -0
  246. package/dist/publish-oO_8elIf.cjs +124 -0
  247. package/dist/publish-oO_8elIf.cjs.map +1 -0
  248. package/dist/ready-COJHr1Yi.mjs +375 -0
  249. package/dist/ready-COJHr1Yi.mjs.map +1 -0
  250. package/dist/ready-DcD0SCnV.cjs +404 -0
  251. package/dist/ready-DcD0SCnV.cjs.map +1 -0
  252. package/dist/reconcile/public.cjs +3 -5
  253. package/dist/reconcile/public.d.cts +33 -89
  254. package/dist/reconcile/public.d.cts.map +1 -1
  255. package/dist/reconcile/public.d.mts +33 -89
  256. package/dist/reconcile/public.d.mts.map +1 -1
  257. package/dist/reconcile/public.mjs +3 -3
  258. package/dist/reconcile--I7V4Klj.mjs +34 -0
  259. package/dist/reconcile--I7V4Klj.mjs.map +1 -0
  260. package/dist/reconcile-CuCQBa5-.cjs +34 -0
  261. package/dist/reconcile-CuCQBa5-.cjs.map +1 -0
  262. package/dist/resolve-CTb1gsTO.cjs +316 -0
  263. package/dist/resolve-CTb1gsTO.cjs.map +1 -0
  264. package/dist/resolve-Lk7fd8Kb.mjs +263 -0
  265. package/dist/resolve-Lk7fd8Kb.mjs.map +1 -0
  266. package/dist/rollback-B2DhSX-I.mjs +136 -0
  267. package/dist/rollback-B2DhSX-I.mjs.map +1 -0
  268. package/dist/rollback-PK4pSOLd.cjs +165 -0
  269. package/dist/rollback-PK4pSOLd.cjs.map +1 -0
  270. package/dist/runtime-BpGIXfYr.d.mts +82 -0
  271. package/dist/runtime-BpGIXfYr.d.mts.map +1 -0
  272. package/dist/runtime-DLV0CNZ4.d.cts +82 -0
  273. package/dist/runtime-DLV0CNZ4.d.cts.map +1 -0
  274. package/dist/s3-BY5ry__M.mjs +240 -0
  275. package/dist/s3-BY5ry__M.mjs.map +1 -0
  276. package/dist/s3-FG9qIgEB.cjs +240 -0
  277. package/dist/s3-FG9qIgEB.cjs.map +1 -0
  278. package/dist/sandbox/config-worker.cjs +43 -0
  279. package/dist/sandbox/config-worker.cjs.map +1 -0
  280. package/dist/sandbox/config-worker.d.cts +1 -0
  281. package/dist/sandbox/config-worker.d.mts +1 -0
  282. package/dist/sandbox/config-worker.mjs +44 -0
  283. package/dist/sandbox/config-worker.mjs.map +1 -0
  284. package/dist/sandbox/credentials-worker.cjs +53 -0
  285. package/dist/sandbox/credentials-worker.cjs.map +1 -0
  286. package/dist/sandbox/credentials-worker.d.cts +1 -0
  287. package/dist/sandbox/credentials-worker.d.mts +1 -0
  288. package/dist/sandbox/credentials-worker.mjs +54 -0
  289. package/dist/sandbox/credentials-worker.mjs.map +1 -0
  290. package/dist/sandbox/discover-worker.cjs +47 -0
  291. package/dist/sandbox/discover-worker.cjs.map +1 -0
  292. package/dist/sandbox/discover-worker.d.cts +1 -0
  293. package/dist/sandbox/discover-worker.d.mts +1 -0
  294. package/dist/sandbox/discover-worker.mjs +48 -0
  295. package/dist/sandbox/discover-worker.mjs.map +1 -0
  296. package/dist/sandbox/migrate-worker.cjs +75 -0
  297. package/dist/sandbox/migrate-worker.cjs.map +1 -0
  298. package/dist/sandbox/migrate-worker.d.cts +1 -0
  299. package/dist/sandbox/migrate-worker.d.mts +1 -0
  300. package/dist/sandbox/migrate-worker.mjs +76 -0
  301. package/dist/sandbox/migrate-worker.mjs.map +1 -0
  302. package/dist/{workspace-B8NLb54N.cjs → schemas-BCwKKA42.mjs} +399 -1173
  303. package/dist/schemas-BCwKKA42.mjs.map +1 -0
  304. package/dist/{workspace-DI-M3BnN.mjs → schemas-BQ_v0lEX.cjs} +487 -982
  305. package/dist/schemas-BQ_v0lEX.cjs.map +1 -0
  306. package/dist/secretsManager-CJyxFcBH.mjs +113 -0
  307. package/dist/secretsManager-CJyxFcBH.mjs.map +1 -0
  308. package/dist/secretsManager-D8on44WI.cjs +124 -0
  309. package/dist/secretsManager-D8on44WI.cjs.map +1 -0
  310. package/dist/seeds-Bc3niNVb.cjs +382 -0
  311. package/dist/seeds-Bc3niNVb.cjs.map +1 -0
  312. package/dist/seeds-Ccn0Ru2T.mjs +299 -0
  313. package/dist/seeds-Ccn0Ru2T.mjs.map +1 -0
  314. package/dist/serverSetup-BL1sHzRr.mjs +685 -0
  315. package/dist/serverSetup-BL1sHzRr.mjs.map +1 -0
  316. package/dist/serverSetup-C7fDKGiN.cjs +685 -0
  317. package/dist/serverSetup-C7fDKGiN.cjs.map +1 -0
  318. package/dist/sniffer-BvhDRsgI.mjs +1824 -0
  319. package/dist/sniffer-BvhDRsgI.mjs.map +1 -0
  320. package/dist/sniffer-DJp9a2Pg.cjs +1997 -0
  321. package/dist/sniffer-DJp9a2Pg.cjs.map +1 -0
  322. package/dist/snsSubscriptions-7y2XBXde.mjs +1053 -0
  323. package/dist/snsSubscriptions-7y2XBXde.mjs.map +1 -0
  324. package/dist/snsSubscriptions-8t1XFvoc.cjs +1184 -0
  325. package/dist/snsSubscriptions-8t1XFvoc.cjs.map +1 -0
  326. package/dist/sst-8HZe83-M.cjs +501 -0
  327. package/dist/sst-8HZe83-M.cjs.map +1 -0
  328. package/dist/sst-CzFd-1om.mjs +478 -0
  329. package/dist/sst-CzFd-1om.mjs.map +1 -0
  330. package/dist/stack-3tvhk7SU.cjs +2568 -0
  331. package/dist/stack-3tvhk7SU.cjs.map +1 -0
  332. package/dist/stack-j2e8ddGl.mjs +2381 -0
  333. package/dist/stack-j2e8ddGl.mjs.map +1 -0
  334. package/dist/stage-DCSJii_y.cjs +313 -0
  335. package/dist/stage-DCSJii_y.cjs.map +1 -0
  336. package/dist/stage-DMv-IfSD.mjs +302 -0
  337. package/dist/stage-DMv-IfSD.mjs.map +1 -0
  338. package/dist/stages-CCAAe1tP.mjs +190 -0
  339. package/dist/stages-CCAAe1tP.mjs.map +1 -0
  340. package/dist/stages-D49CUpBY.cjs +190 -0
  341. package/dist/stages-D49CUpBY.cjs.map +1 -0
  342. package/dist/target/public.cjs +15 -0
  343. package/dist/target/public.d.cts +28 -0
  344. package/dist/target/public.d.cts.map +1 -0
  345. package/dist/target/public.d.mts +28 -0
  346. package/dist/target/public.d.mts.map +1 -0
  347. package/dist/target/public.mjs +4 -0
  348. package/dist/terminal-DIEj2Nap.cjs +85 -0
  349. package/dist/terminal-DIEj2Nap.cjs.map +1 -0
  350. package/dist/terminal-VLmWgL_N.mjs +85 -0
  351. package/dist/terminal-VLmWgL_N.mjs.map +1 -0
  352. package/dist/{types-N7c2O2m7.d.cts → types-Bj1A1wkS.d.mts} +2146 -428
  353. package/dist/types-Bj1A1wkS.d.mts.map +1 -0
  354. package/dist/types-Bl_CwZC9.cjs +90 -0
  355. package/dist/types-Bl_CwZC9.cjs.map +1 -0
  356. package/dist/{types-7R81hu0i.d.mts → types-CV4AzwC_.d.cts} +2148 -428
  357. package/dist/types-CV4AzwC_.d.cts.map +1 -0
  358. package/dist/types-Y1NfWlyG.mjs +61 -0
  359. package/dist/types-Y1NfWlyG.mjs.map +1 -0
  360. package/dist/utils-D2Nk1Nv2.cjs +205 -0
  361. package/dist/utils-D2Nk1Nv2.cjs.map +1 -0
  362. package/dist/utils-D_fxUqvU.mjs +156 -0
  363. package/dist/utils-D_fxUqvU.mjs.map +1 -0
  364. package/dist/vitest.cjs +65 -0
  365. package/dist/vitest.cjs.map +1 -0
  366. package/dist/vitest.d.cts +29 -0
  367. package/dist/vitest.d.cts.map +1 -0
  368. package/dist/vitest.d.mts +29 -0
  369. package/dist/vitest.d.mts.map +1 -0
  370. package/dist/vitest.mjs +65 -0
  371. package/dist/vitest.mjs.map +1 -0
  372. package/dist/workerRuntime-BXfhbe13.cjs +108 -0
  373. package/dist/workerRuntime-BXfhbe13.cjs.map +1 -0
  374. package/dist/workerRuntime-CsOyBRx2.mjs +79 -0
  375. package/dist/workerRuntime-CsOyBRx2.mjs.map +1 -0
  376. package/dist/workspace/index.cjs +6 -2
  377. package/dist/workspace/index.d.cts +3 -3
  378. package/dist/workspace/index.d.mts +3 -3
  379. package/dist/workspace/index.mjs +2 -2
  380. package/dist/workspace-B0PI9k9p.mjs +3013 -0
  381. package/dist/workspace-B0PI9k9p.mjs.map +1 -0
  382. package/dist/workspace-LR9DFjU8.cjs +3563 -0
  383. package/dist/workspace-LR9DFjU8.cjs.map +1 -0
  384. package/package.json +75 -13
  385. package/dist/HostingerProvider-BY26bWwB.mjs.map +0 -1
  386. package/dist/HostingerProvider-BZFGYYVA.cjs.map +0 -1
  387. package/dist/LocalStateProvider-7HR6SS2t.cjs +0 -48
  388. package/dist/LocalStateProvider-7HR6SS2t.cjs.map +0 -1
  389. package/dist/LocalStateProvider-D7QyJoLM.mjs +0 -48
  390. package/dist/LocalStateProvider-D7QyJoLM.mjs.map +0 -1
  391. package/dist/Route53Provider-Cvj40A8I.mjs.map +0 -1
  392. package/dist/Route53Provider-DVILBsvV.cjs.map +0 -1
  393. package/dist/SSMStateProvider-B0Hu1MKZ.mjs +0 -75
  394. package/dist/SSMStateProvider-B0Hu1MKZ.mjs.map +0 -1
  395. package/dist/SSMStateProvider-VrQ-yeqd.cjs +0 -74
  396. package/dist/SSMStateProvider-VrQ-yeqd.cjs.map +0 -1
  397. package/dist/backup-provisioner-BmhIO_Yr.cjs.map +0 -1
  398. package/dist/backup-provisioner-DIVCbfee.mjs.map +0 -1
  399. package/dist/bundler-mjqGAvu1.cjs.map +0 -1
  400. package/dist/bundler-mwH7WOb1.mjs.map +0 -1
  401. package/dist/config-CdTMeMU_.cjs +0 -467
  402. package/dist/config-CdTMeMU_.cjs.map +0 -1
  403. package/dist/config-DPnPkWyH.mjs +0 -414
  404. package/dist/config-DPnPkWyH.mjs.map +0 -1
  405. package/dist/config.d.cts.map +0 -1
  406. package/dist/config.d.mts.map +0 -1
  407. package/dist/credentials-fJP5-fa1.mjs +0 -2780
  408. package/dist/credentials-fJP5-fa1.mjs.map +0 -1
  409. package/dist/credentials-tvyReUAd.cjs +0 -2917
  410. package/dist/credentials-tvyReUAd.cjs.map +0 -1
  411. package/dist/discover-BERGFg8v.cjs +0 -288
  412. package/dist/discover-BERGFg8v.cjs.map +0 -1
  413. package/dist/discover-CK-n3w6b.mjs +0 -244
  414. package/dist/discover-CK-n3w6b.mjs.map +0 -1
  415. package/dist/emit-BdoPFjZf.cjs +0 -253
  416. package/dist/emit-BdoPFjZf.cjs.map +0 -1
  417. package/dist/emit-Bzq7JsMP.mjs +0 -224
  418. package/dist/emit-Bzq7JsMP.mjs.map +0 -1
  419. package/dist/generator-LfZU7NlU.mjs +0 -247
  420. package/dist/generator-LfZU7NlU.mjs.map +0 -1
  421. package/dist/generator-Wdfp0jCS.cjs +0 -282
  422. package/dist/generator-Wdfp0jCS.cjs.map +0 -1
  423. package/dist/github-CAfKyYPN.mjs +0 -216
  424. package/dist/github-CAfKyYPN.mjs.map +0 -1
  425. package/dist/github-DVE8Gg_F.cjs +0 -216
  426. package/dist/github-DVE8Gg_F.cjs.map +0 -1
  427. package/dist/index-B4H4XF7A.d.mts.map +0 -1
  428. package/dist/index-RCUizGxL.d.cts.map +0 -1
  429. package/dist/openapi-BeckoaP9.cjs +0 -2038
  430. package/dist/openapi-BeckoaP9.cjs.map +0 -1
  431. package/dist/openapi-DolhBm6r.mjs +0 -1991
  432. package/dist/openapi-DolhBm6r.mjs.map +0 -1
  433. package/dist/reconcile-Cq4cO83R.cjs +0 -136
  434. package/dist/reconcile-Cq4cO83R.cjs.map +0 -1
  435. package/dist/reconcile-fmoluZmZ.mjs +0 -113
  436. package/dist/reconcile-fmoluZmZ.mjs.map +0 -1
  437. package/dist/ssm-BKN1Cg4z.mjs +0 -60
  438. package/dist/ssm-BKN1Cg4z.mjs.map +0 -1
  439. package/dist/ssm-FxeSAt35.cjs +0 -60
  440. package/dist/ssm-FxeSAt35.cjs.map +0 -1
  441. package/dist/storage-DgypfSD6.cjs +0 -351
  442. package/dist/storage-DgypfSD6.cjs.map +0 -1
  443. package/dist/storage-TP0x118M.mjs +0 -304
  444. package/dist/storage-TP0x118M.mjs.map +0 -1
  445. package/dist/transfer-4A4S2hcw.mjs +0 -122
  446. package/dist/transfer-4A4S2hcw.mjs.map +0 -1
  447. package/dist/transfer-DdmtKLzi.cjs +0 -151
  448. package/dist/transfer-DdmtKLzi.cjs.map +0 -1
  449. package/dist/types-7R81hu0i.d.mts.map +0 -1
  450. package/dist/types-N7c2O2m7.d.cts.map +0 -1
  451. package/dist/workspace-B8NLb54N.cjs.map +0 -1
  452. package/dist/workspace-DI-M3BnN.mjs.map +0 -1
@@ -0,0 +1,291 @@
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-Bj1A1wkS.mjs";
2
+ import "./index-QxGYzGEN.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
+ /**
155
+ * How long loading a config, or discovering its constructs, may take in a
156
+ * sandbox: room for tsx to compile a large project cold, and not a deploy
157
+ * held open by a config that never finishes importing.
158
+ */
159
+ declare const CONFIG_LOAD_TIMEOUT_MS = 60000;
160
+ /** The config failed to import, or threw while it ran. */
161
+ declare class ConfigLoadFailed extends Error {
162
+ readonly configPath: string;
163
+ readonly detail: string;
164
+ constructor(configPath: string, detail: string);
165
+ }
166
+ /**
167
+ * The config holds something that is not data — a custom state store, an
168
+ * inline deploy target, a function — and the sandbox it was loaded in hands
169
+ * the deploy nothing but data.
170
+ */
171
+ declare class ConfigObjectNotSerializable extends Error {
172
+ readonly configPath: string;
173
+ readonly paths: readonly string[];
174
+ constructor(configPath: string, paths: readonly string[]);
175
+ }
176
+ /**
177
+ * Run `fn` with `config` as the config of the workspace at `workspaceRoot`:
178
+ * every load of it inside — however deep, sandboxed or not — answers with
179
+ * this one rather than importing the file again.
180
+ *
181
+ * A config is the workspace's settings, and settings may come from the
182
+ * environment it was loaded in (`domains: { prod: process.env.DOMAIN }`). A
183
+ * reload in a sandbox, which passes on an allowlist of the environment, read
184
+ * the same file to a different answer: the deploy saw no domain the command
185
+ * had been given. Loaded once by the caller, every step of the run sees the
186
+ * same settings. The constructs are still discovered in the run's sandbox.
187
+ */
188
+ declare function withLoadedConfig<T>(workspaceRoot: string, config: GkmConfig | WorkspaceConfig, fn: () => T): T;
189
+ /**
190
+ * The raw config of the workspace a directory belongs to, imported in this
191
+ * process: what a caller hands {@link withLoadedConfig}, or `deploy()` as its
192
+ * `config`.
193
+ */
194
+ declare function loadRawWorkspaceConfig(cwd?: string): Promise<RawConfigResult>;
195
+ /**
196
+ * Load configuration file (single-app format).
197
+ * For backwards compatibility with existing code.
198
+ *
199
+ * @deprecated Use loadWorkspaceConfig for new code
200
+ */
201
+ declare function loadConfig(cwd?: string): Promise<GkmConfig>;
202
+ /**
203
+ * Load configuration file and process it as a workspace.
204
+ * Works with both single-app and workspace configurations.
205
+ *
206
+ * Single-app configs are automatically wrapped as a workspace with one app.
207
+ *
208
+ * @example
209
+ * ```ts
210
+ * const { type, workspace } = await loadWorkspaceConfig();
211
+ *
212
+ * if (type === 'workspace') {
213
+ * console.log('Multi-app workspace:', workspace.apps);
214
+ * } else {
215
+ * console.log('Single app wrapped as workspace');
216
+ * }
217
+ * ```
218
+ */
219
+ /**
220
+ * The workspace a directory belongs to, as its config states it — without
221
+ * discovering its constructs.
222
+ *
223
+ * For callers that need a fact the config holds (where a stage's secrets are
224
+ * stored) and nothing the graph adds. `loadWorkspaceConfig` imports every
225
+ * construct module to derive the apps, which is a cost a secrets read should
226
+ * not pay.
227
+ */
228
+ declare function loadWorkspaceSettings(cwd?: string, options?: LoadConfigOptions): Promise<LoadedConfig['workspace']>;
229
+ declare function loadWorkspaceConfig(cwd?: string, options?: LoadConfigOptions): Promise<LoadedConfig>;
230
+ /**
231
+ * A workspace with no `constructs` glob.
232
+ *
233
+ * In v10 every address, container and app comes from what the workspace
234
+ * declares — there is no second path that reads a hand-written compose file or
235
+ * an `apps` block's ports. A config that declares nothing has nothing to run.
236
+ */
237
+ declare class WorkspaceDeclaresNoConstructs extends GkmError {
238
+ readonly root: string;
239
+ constructor(root: string);
240
+ }
241
+ interface AppConfigResult {
242
+ appName: string;
243
+ app: NormalizedAppConfig;
244
+ gkmConfig: GkmConfig;
245
+ workspace: NormalizedWorkspace;
246
+ workspaceRoot: string;
247
+ appRoot: string;
248
+ }
249
+ /** A directory that no app in the workspace lives in. */
250
+ declare class NotInAnApp extends GkmError {
251
+ readonly cwd: string;
252
+ readonly apps: Readonly<Record<string, string>>;
253
+ constructor(cwd: string, apps: Readonly<Record<string, string>>);
254
+ }
255
+ /**
256
+ * The backend app a directory is part of, with its gkm config — found by the
257
+ * `path` its construct declares.
258
+ *
259
+ * @example
260
+ * ```ts
261
+ * // From apps/api, where a construct declares `path: 'apps/api'`
262
+ * const { app, workspace, workspaceRoot } = await loadAppConfig();
263
+ * ```
264
+ *
265
+ * @throws {NotInAnApp} when no app's path contains the directory.
266
+ * @throws {NotABackendApp} when the app it is in has no gkm config to run.
267
+ */
268
+ declare function loadAppConfig(cwd?: string): Promise<AppConfigResult>;
269
+ /** The app a directory is in has no gkm config — a site, or an entry app. */
270
+ declare class NotABackendApp extends GkmError {
271
+ readonly appName: string;
272
+ constructor(appName: string);
273
+ }
274
+ interface WorkspaceAppInfo {
275
+ /** The app's key in the workspace. */
276
+ appName: string;
277
+ app: NormalizedAppConfig;
278
+ workspace: NormalizedWorkspace;
279
+ workspaceRoot: string;
280
+ }
281
+ /**
282
+ * The app a directory is part of, frontend or backend — found by the `path`
283
+ * its construct declares. Unlike `loadAppConfig`, the app need not have a
284
+ * gkm config, which is what `gkm exec` and `gkm test` from a site need.
285
+ *
286
+ * @throws {NotInAnApp} when no app's path contains the directory.
287
+ */
288
+ declare function loadWorkspaceAppInfo(cwd?: string): Promise<WorkspaceAppInfo>;
289
+ //#endregion
290
+ 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 };
291
+ //# sourceMappingURL=config-CsCYzlVO.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-CsCYzlVO.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;;;;;;;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;;;;;;;;cAmEE,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,eACE,QAAQ;;cAkBE,uBAAuB;WACd;EAArB,YAAqB;;UAQL;;EAEhB;EACA,KAAK;EACL,WAAW;EACX;;;;;;;;;iBAUqB,qBACrB,eACE,QAAQ"}
@@ -0,0 +1,291 @@
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-CV4AzwC_.cjs";
2
+ import "./index-tFzoro1V.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
+ /**
155
+ * How long loading a config, or discovering its constructs, may take in a
156
+ * sandbox: room for tsx to compile a large project cold, and not a deploy
157
+ * held open by a config that never finishes importing.
158
+ */
159
+ declare const CONFIG_LOAD_TIMEOUT_MS = 60000;
160
+ /** The config failed to import, or threw while it ran. */
161
+ declare class ConfigLoadFailed extends Error {
162
+ readonly configPath: string;
163
+ readonly detail: string;
164
+ constructor(configPath: string, detail: string);
165
+ }
166
+ /**
167
+ * The config holds something that is not data — a custom state store, an
168
+ * inline deploy target, a function — and the sandbox it was loaded in hands
169
+ * the deploy nothing but data.
170
+ */
171
+ declare class ConfigObjectNotSerializable extends Error {
172
+ readonly configPath: string;
173
+ readonly paths: readonly string[];
174
+ constructor(configPath: string, paths: readonly string[]);
175
+ }
176
+ /**
177
+ * Run `fn` with `config` as the config of the workspace at `workspaceRoot`:
178
+ * every load of it inside — however deep, sandboxed or not — answers with
179
+ * this one rather than importing the file again.
180
+ *
181
+ * A config is the workspace's settings, and settings may come from the
182
+ * environment it was loaded in (`domains: { prod: process.env.DOMAIN }`). A
183
+ * reload in a sandbox, which passes on an allowlist of the environment, read
184
+ * the same file to a different answer: the deploy saw no domain the command
185
+ * had been given. Loaded once by the caller, every step of the run sees the
186
+ * same settings. The constructs are still discovered in the run's sandbox.
187
+ */
188
+ declare function withLoadedConfig<T>(workspaceRoot: string, config: GkmConfig | WorkspaceConfig, fn: () => T): T;
189
+ /**
190
+ * The raw config of the workspace a directory belongs to, imported in this
191
+ * process: what a caller hands {@link withLoadedConfig}, or `deploy()` as its
192
+ * `config`.
193
+ */
194
+ declare function loadRawWorkspaceConfig(cwd?: string): Promise<RawConfigResult>;
195
+ /**
196
+ * Load configuration file (single-app format).
197
+ * For backwards compatibility with existing code.
198
+ *
199
+ * @deprecated Use loadWorkspaceConfig for new code
200
+ */
201
+ declare function loadConfig(cwd?: string): Promise<GkmConfig>;
202
+ /**
203
+ * Load configuration file and process it as a workspace.
204
+ * Works with both single-app and workspace configurations.
205
+ *
206
+ * Single-app configs are automatically wrapped as a workspace with one app.
207
+ *
208
+ * @example
209
+ * ```ts
210
+ * const { type, workspace } = await loadWorkspaceConfig();
211
+ *
212
+ * if (type === 'workspace') {
213
+ * console.log('Multi-app workspace:', workspace.apps);
214
+ * } else {
215
+ * console.log('Single app wrapped as workspace');
216
+ * }
217
+ * ```
218
+ */
219
+ /**
220
+ * The workspace a directory belongs to, as its config states it — without
221
+ * discovering its constructs.
222
+ *
223
+ * For callers that need a fact the config holds (where a stage's secrets are
224
+ * stored) and nothing the graph adds. `loadWorkspaceConfig` imports every
225
+ * construct module to derive the apps, which is a cost a secrets read should
226
+ * not pay.
227
+ */
228
+ declare function loadWorkspaceSettings(cwd?: string, options?: LoadConfigOptions): Promise<LoadedConfig['workspace']>;
229
+ declare function loadWorkspaceConfig(cwd?: string, options?: LoadConfigOptions): Promise<LoadedConfig>;
230
+ /**
231
+ * A workspace with no `constructs` glob.
232
+ *
233
+ * In v10 every address, container and app comes from what the workspace
234
+ * declares — there is no second path that reads a hand-written compose file or
235
+ * an `apps` block's ports. A config that declares nothing has nothing to run.
236
+ */
237
+ declare class WorkspaceDeclaresNoConstructs extends GkmError {
238
+ readonly root: string;
239
+ constructor(root: string);
240
+ }
241
+ interface AppConfigResult {
242
+ appName: string;
243
+ app: NormalizedAppConfig;
244
+ gkmConfig: GkmConfig;
245
+ workspace: NormalizedWorkspace;
246
+ workspaceRoot: string;
247
+ appRoot: string;
248
+ }
249
+ /** A directory that no app in the workspace lives in. */
250
+ declare class NotInAnApp extends GkmError {
251
+ readonly cwd: string;
252
+ readonly apps: Readonly<Record<string, string>>;
253
+ constructor(cwd: string, apps: Readonly<Record<string, string>>);
254
+ }
255
+ /**
256
+ * The backend app a directory is part of, with its gkm config — found by the
257
+ * `path` its construct declares.
258
+ *
259
+ * @example
260
+ * ```ts
261
+ * // From apps/api, where a construct declares `path: 'apps/api'`
262
+ * const { app, workspace, workspaceRoot } = await loadAppConfig();
263
+ * ```
264
+ *
265
+ * @throws {NotInAnApp} when no app's path contains the directory.
266
+ * @throws {NotABackendApp} when the app it is in has no gkm config to run.
267
+ */
268
+ declare function loadAppConfig(cwd?: string): Promise<AppConfigResult>;
269
+ /** The app a directory is in has no gkm config — a site, or an entry app. */
270
+ declare class NotABackendApp extends GkmError {
271
+ readonly appName: string;
272
+ constructor(appName: string);
273
+ }
274
+ interface WorkspaceAppInfo {
275
+ /** The app's key in the workspace. */
276
+ appName: string;
277
+ app: NormalizedAppConfig;
278
+ workspace: NormalizedWorkspace;
279
+ workspaceRoot: string;
280
+ }
281
+ /**
282
+ * The app a directory is part of, frontend or backend — found by the `path`
283
+ * its construct declares. Unlike `loadAppConfig`, the app need not have a
284
+ * gkm config, which is what `gkm exec` and `gkm test` from a site need.
285
+ *
286
+ * @throws {NotInAnApp} when no app's path contains the directory.
287
+ */
288
+ declare function loadWorkspaceAppInfo(cwd?: string): Promise<WorkspaceAppInfo>;
289
+ //#endregion
290
+ 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 };
291
+ //# sourceMappingURL=config-D-gHQXhi.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-D-gHQXhi.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;;;;;;;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;;;;;;;;cAmEE,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,eACE,QAAQ;;cAkBE,uBAAuB;WACd;EAArB,YAAqB;;UAQL;;EAEhB;EACA,KAAK;EACL,WAAW;EACX;;;;;;;;;iBAUqB,qBACrB,eACE,QAAQ"}