@geekmidas/cli 10.0.0-alpha.10 → 10.0.0-alpha.100

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 (489) hide show
  1. package/README.md +315 -414
  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-Br97xgs_.mjs +1031 -0
  7. package/dist/EndpointGenerator-Br97xgs_.mjs.map +1 -0
  8. package/dist/EndpointGenerator-By5_tYE9.cjs +1090 -0
  9. package/dist/EndpointGenerator-By5_tYE9.cjs.map +1 -0
  10. package/dist/GoDaddyProvider-CVnzcWX5.mjs +388 -0
  11. package/dist/GoDaddyProvider-CVnzcWX5.mjs.map +1 -0
  12. package/dist/GoDaddyProvider-DS4Wgu0c.cjs +388 -0
  13. package/dist/GoDaddyProvider-DS4Wgu0c.cjs.map +1 -0
  14. package/dist/{HostingerProvider-Cft7lEYr.mjs → HostingerProvider-BNpS9aRJ.mjs} +29 -25
  15. package/dist/HostingerProvider-BNpS9aRJ.mjs.map +1 -0
  16. package/dist/{HostingerProvider-h3EbEp-Z.cjs → HostingerProvider-DR1iws1P.cjs} +29 -25
  17. package/dist/HostingerProvider-DR1iws1P.cjs.map +1 -0
  18. package/dist/LegacyStateStore-C2Xlqy4v.mjs +124 -0
  19. package/dist/LegacyStateStore-C2Xlqy4v.mjs.map +1 -0
  20. package/dist/LegacyStateStore-CoHPQMLO.cjs +124 -0
  21. package/dist/LegacyStateStore-CoHPQMLO.cjs.map +1 -0
  22. package/dist/LocalStateStore-BGDzf2f8.cjs +178 -0
  23. package/dist/LocalStateStore-BGDzf2f8.cjs.map +1 -0
  24. package/dist/LocalStateStore-By59pUve.mjs +167 -0
  25. package/dist/LocalStateStore-By59pUve.mjs.map +1 -0
  26. package/dist/OpenApiTsGenerator-BgSX_Z-e.cjs +541 -0
  27. package/dist/OpenApiTsGenerator-BgSX_Z-e.cjs.map +1 -0
  28. package/dist/OpenApiTsGenerator-C8aTX--y.mjs +536 -0
  29. package/dist/OpenApiTsGenerator-C8aTX--y.mjs.map +1 -0
  30. package/dist/{Route53Provider-di2fMM5N.cjs → Route53Provider-Bllus2NR.cjs} +21 -22
  31. package/dist/Route53Provider-Bllus2NR.cjs.map +1 -0
  32. package/dist/{Route53Provider-RdpUDJQk.mjs → Route53Provider-QXxjkZO1.mjs} +13 -13
  33. package/dist/Route53Provider-QXxjkZO1.mjs.map +1 -0
  34. package/dist/S3StateStore-CU485pYn.mjs +223 -0
  35. package/dist/S3StateStore-CU485pYn.mjs.map +1 -0
  36. package/dist/S3StateStore-Re4LfDTl.cjs +222 -0
  37. package/dist/S3StateStore-Re4LfDTl.cjs.map +1 -0
  38. package/dist/SSMStateStore-BquRBbUG.mjs +205 -0
  39. package/dist/SSMStateStore-BquRBbUG.mjs.map +1 -0
  40. package/dist/SSMStateStore-CLX4Dm5d.cjs +204 -0
  41. package/dist/SSMStateStore-CLX4Dm5d.cjs.map +1 -0
  42. package/dist/SubscriberGenerator-1-IsjIwF.mjs +449 -0
  43. package/dist/SubscriberGenerator-1-IsjIwF.mjs.map +1 -0
  44. package/dist/SubscriberGenerator-BlIOdbi-.cjs +490 -0
  45. package/dist/SubscriberGenerator-BlIOdbi-.cjs.map +1 -0
  46. package/dist/add-Blv6Q_YA.mjs +718 -0
  47. package/dist/add-Blv6Q_YA.mjs.map +1 -0
  48. package/dist/add-C6RhiCBX.cjs +720 -0
  49. package/dist/add-C6RhiCBX.cjs.map +1 -0
  50. package/dist/appPorts-C9z9Pzn9.mjs +223 -0
  51. package/dist/appPorts-C9z9Pzn9.mjs.map +1 -0
  52. package/dist/appPorts-Cu79hJF6.cjs +264 -0
  53. package/dist/appPorts-Cu79hJF6.cjs.map +1 -0
  54. package/dist/aws-8QQ8n-t6.mjs +89 -0
  55. package/dist/aws-8QQ8n-t6.mjs.map +1 -0
  56. package/dist/aws-DY9NqQIT.cjs +100 -0
  57. package/dist/aws-DY9NqQIT.cjs.map +1 -0
  58. package/dist/awsStore-Bx5nCFnS.mjs +121 -0
  59. package/dist/awsStore-Bx5nCFnS.mjs.map +1 -0
  60. package/dist/awsStore-u3ehhMoY.cjs +138 -0
  61. package/dist/awsStore-u3ehhMoY.cjs.map +1 -0
  62. package/dist/{backup-provisioner-Bgj5Vi_L.mjs → backup-provisioner-C8DnCmxK.mjs} +11 -8
  63. package/dist/backup-provisioner-C8DnCmxK.mjs.map +1 -0
  64. package/dist/{backup-provisioner-BrsHwYG0.cjs → backup-provisioner-oDEsPj02.cjs} +22 -20
  65. package/dist/backup-provisioner-oDEsPj02.cjs.map +1 -0
  66. package/dist/backups/runner.cjs +519 -0
  67. package/dist/backups/runner.cjs.map +1 -0
  68. package/dist/backups/runner.d.cts +102 -0
  69. package/dist/backups/runner.d.cts.map +1 -0
  70. package/dist/backups/runner.d.mts +102 -0
  71. package/dist/backups/runner.d.mts.map +1 -0
  72. package/dist/backups/runner.mjs +506 -0
  73. package/dist/backups/runner.mjs.map +1 -0
  74. package/dist/{bundler-Be8Zg4Wd.mjs → bundler-Cquc0e8N.mjs} +36 -32
  75. package/dist/bundler-Cquc0e8N.mjs.map +1 -0
  76. package/dist/{bundler-BY1OmV1e.cjs → bundler-DAeBIOlG.cjs} +38 -35
  77. package/dist/bundler-DAeBIOlG.cjs.map +1 -0
  78. package/dist/cli-DbeqYBTs.cjs +71 -0
  79. package/dist/cli-DbeqYBTs.cjs.map +1 -0
  80. package/dist/cli-tWfeiYmO.mjs +71 -0
  81. package/dist/cli-tWfeiYmO.mjs.map +1 -0
  82. package/dist/compose-BftbEv0b.mjs +3154 -0
  83. package/dist/compose-BftbEv0b.mjs.map +1 -0
  84. package/dist/compose-C_mfrSVH.cjs +3267 -0
  85. package/dist/compose-C_mfrSVH.cjs.map +1 -0
  86. package/dist/config-D48erO2j.d.mts +269 -0
  87. package/dist/config-D48erO2j.d.mts.map +1 -0
  88. package/dist/config-DHDtsQrB.d.cts +269 -0
  89. package/dist/config-DHDtsQrB.d.cts.map +1 -0
  90. package/dist/config.cjs +421 -11
  91. package/dist/config.cjs.map +1 -0
  92. package/dist/config.d.cts +4 -120
  93. package/dist/config.d.mts +4 -120
  94. package/dist/config.mjs +405 -4
  95. package/dist/config.mjs.map +1 -0
  96. package/dist/credentialSchemas-DDda4Mmm.cjs +272 -0
  97. package/dist/credentialSchemas-DDda4Mmm.cjs.map +1 -0
  98. package/dist/credentialSchemas-DvitraL-.mjs +237 -0
  99. package/dist/credentialSchemas-DvitraL-.mjs.map +1 -0
  100. package/dist/credentials-B5N5yKk6.mjs +267 -0
  101. package/dist/credentials-B5N5yKk6.mjs.map +1 -0
  102. package/dist/credentials-Zqr3QQYB.cjs +350 -0
  103. package/dist/credentials-Zqr3QQYB.cjs.map +1 -0
  104. package/dist/databases-BeGP5eDh.mjs +495 -0
  105. package/dist/databases-BeGP5eDh.mjs.map +1 -0
  106. package/dist/databases-DGALFDG3.cjs +598 -0
  107. package/dist/databases-DGALFDG3.cjs.map +1 -0
  108. package/dist/define-6poNqm5O.mjs +106 -0
  109. package/dist/define-6poNqm5O.mjs.map +1 -0
  110. package/dist/define-crmMcXFS.cjs +153 -0
  111. package/dist/define-crmMcXFS.cjs.map +1 -0
  112. package/dist/deploy/public.cjs +212 -0
  113. package/dist/deploy/public.cjs.map +1 -0
  114. package/dist/deploy/public.d.cts +653 -0
  115. package/dist/deploy/public.d.cts.map +1 -0
  116. package/dist/deploy/public.d.mts +653 -0
  117. package/dist/deploy/public.d.mts.map +1 -0
  118. package/dist/deploy/public.mjs +145 -0
  119. package/dist/deploy/public.mjs.map +1 -0
  120. package/dist/deploy/sniffer-envkit-patch.cjs +18 -10
  121. package/dist/deploy/sniffer-envkit-patch.cjs.map +1 -1
  122. package/dist/deploy/sniffer-envkit-patch.d.cts +0 -2
  123. package/dist/deploy/sniffer-envkit-patch.d.cts.map +1 -1
  124. package/dist/deploy/sniffer-envkit-patch.d.mts +0 -2
  125. package/dist/deploy/sniffer-envkit-patch.d.mts.map +1 -1
  126. package/dist/deploy/sniffer-envkit-patch.mjs +10 -2
  127. package/dist/deploy/sniffer-envkit-patch.mjs.map +1 -1
  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 +13 -7
  135. package/dist/deploy/sniffer-hooks.cjs.map +1 -1
  136. package/dist/deploy/sniffer-hooks.d.cts +1 -2
  137. package/dist/deploy/sniffer-hooks.d.cts.map +1 -1
  138. package/dist/deploy/sniffer-hooks.d.mts +1 -2
  139. package/dist/deploy/sniffer-hooks.d.mts.map +1 -1
  140. package/dist/deploy/sniffer-hooks.mjs +10 -3
  141. package/dist/deploy/sniffer-hooks.mjs.map +1 -1
  142. package/dist/deploy/sniffer-loader.cjs +16 -7
  143. package/dist/deploy/sniffer-loader.cjs.map +1 -1
  144. package/dist/deploy/sniffer-loader.d.cts +1 -1
  145. package/dist/deploy/sniffer-loader.d.mts +1 -1
  146. package/dist/deploy/sniffer-loader.mjs +14 -3
  147. package/dist/deploy/sniffer-loader.mjs.map +1 -1
  148. package/dist/deploy/sniffer-routes-worker.cjs +11 -11
  149. package/dist/deploy/sniffer-routes-worker.cjs.map +1 -1
  150. package/dist/deploy/sniffer-routes-worker.d.cts +1 -1
  151. package/dist/deploy/sniffer-routes-worker.d.mts +1 -1
  152. package/dist/deploy/sniffer-routes-worker.mjs +4 -4
  153. package/dist/deploy/sniffer-routes-worker.mjs.map +1 -1
  154. package/dist/deploy/sniffer-worker.cjs +15 -6
  155. package/dist/deploy/sniffer-worker.cjs.map +1 -1
  156. package/dist/deploy/sniffer-worker.d.cts +1 -3
  157. package/dist/deploy/sniffer-worker.d.cts.map +1 -1
  158. package/dist/deploy/sniffer-worker.d.mts +1 -3
  159. package/dist/deploy/sniffer-worker.d.mts.map +1 -1
  160. package/dist/deploy/sniffer-worker.mjs +15 -4
  161. package/dist/deploy/sniffer-worker.mjs.map +1 -1
  162. package/dist/deploy-BSilGXuR.mjs +2317 -0
  163. package/dist/deploy-BSilGXuR.mjs.map +1 -0
  164. package/dist/deploy-CktQpmpU.cjs +2390 -0
  165. package/dist/deploy-CktQpmpU.cjs.map +1 -0
  166. package/dist/derive-B4vDpzgP.mjs +150 -0
  167. package/dist/derive-B4vDpzgP.mjs.map +1 -0
  168. package/dist/derive-DAbo49sm.cjs +161 -0
  169. package/dist/derive-DAbo49sm.cjs.map +1 -0
  170. package/dist/discover-BfhVW_kT.cjs +600 -0
  171. package/dist/discover-BfhVW_kT.cjs.map +1 -0
  172. package/dist/discover-CvTtV5ZD.d.cts +108 -0
  173. package/dist/discover-CvTtV5ZD.d.cts.map +1 -0
  174. package/dist/discover-W2kab9Lc.d.mts +108 -0
  175. package/dist/discover-W2kab9Lc.d.mts.map +1 -0
  176. package/dist/discover-kziEht4W.mjs +527 -0
  177. package/dist/discover-kziEht4W.mjs.map +1 -0
  178. package/dist/dns-CQZQL3gj.mjs +926 -0
  179. package/dist/dns-CQZQL3gj.mjs.map +1 -0
  180. package/dist/dns-KPxvcCdL.cjs +1057 -0
  181. package/dist/dns-KPxvcCdL.cjs.map +1 -0
  182. package/dist/dokploy-B7eMa6Pa.cjs +38 -0
  183. package/dist/dokploy-B7eMa6Pa.cjs.map +1 -0
  184. package/dist/dokploy-Dguhz3Uo.mjs +38 -0
  185. package/dist/dokploy-Dguhz3Uo.mjs.map +1 -0
  186. package/dist/drivers-BLU1fNs_.cjs +200 -0
  187. package/dist/drivers-BLU1fNs_.cjs.map +1 -0
  188. package/dist/drivers-C08LL4E8.mjs +177 -0
  189. package/dist/drivers-C08LL4E8.mjs.map +1 -0
  190. package/dist/{emit-CiZS_5Ub.mjs → emit-C1e8qD08.mjs} +13 -26
  191. package/dist/emit-C1e8qD08.mjs.map +1 -0
  192. package/dist/{emit-CbcRolsa.cjs → emit-Dmc1nvdS.cjs} +31 -57
  193. package/dist/emit-Dmc1nvdS.cjs.map +1 -0
  194. package/dist/encryption-CixpDF6e.mjs +89 -0
  195. package/dist/encryption-CixpDF6e.mjs.map +1 -0
  196. package/dist/encryption-DrhCX7G6.cjs +90 -0
  197. package/dist/encryption-DrhCX7G6.cjs.map +1 -0
  198. package/dist/engine-32gL2ju3.mjs +3082 -0
  199. package/dist/engine-32gL2ju3.mjs.map +1 -0
  200. package/dist/engine-CQgycl7o.cjs +3195 -0
  201. package/dist/engine-CQgycl7o.cjs.map +1 -0
  202. package/dist/errors-D8Gwp5kU.mjs +23 -0
  203. package/dist/errors-D8Gwp5kU.mjs.map +1 -0
  204. package/dist/errors-DMC4Umsb.cjs +34 -0
  205. package/dist/errors-DMC4Umsb.cjs.map +1 -0
  206. package/dist/github-DYQ5wvod.mjs +829 -0
  207. package/dist/github-DYQ5wvod.mjs.map +1 -0
  208. package/dist/github-DkSCUoWS.cjs +829 -0
  209. package/dist/github-DkSCUoWS.cjs.map +1 -0
  210. package/dist/identity-CBXr4wNi.mjs +129 -0
  211. package/dist/identity-CBXr4wNi.mjs.map +1 -0
  212. package/dist/identity-CbLfgQNT.cjs +182 -0
  213. package/dist/identity-CbLfgQNT.cjs.map +1 -0
  214. package/dist/{index-C6e-ULLx.d.mts → index-8OfpOtSI.d.cts} +39 -24
  215. package/dist/index-8OfpOtSI.d.cts.map +1 -0
  216. package/dist/{index-CR5urhWX.d.cts → index-Dpji6Bxq.d.mts} +39 -24
  217. package/dist/index-Dpji6Bxq.d.mts.map +1 -0
  218. package/dist/index.cjs +10022 -12718
  219. package/dist/index.cjs.map +1 -1
  220. package/dist/index.d.cts +1 -1
  221. package/dist/index.d.mts +1 -1
  222. package/dist/index.mjs +10648 -13356
  223. package/dist/index.mjs.map +1 -1
  224. package/dist/local-BwC2v2Y8.mjs +224 -0
  225. package/dist/local-BwC2v2Y8.mjs.map +1 -0
  226. package/dist/local-DNhnkugT.cjs +241 -0
  227. package/dist/local-DNhnkugT.cjs.map +1 -0
  228. package/dist/migrate-BoJxKbfR.mjs +181 -0
  229. package/dist/migrate-BoJxKbfR.mjs.map +1 -0
  230. package/dist/migrate-CJTyeBul.cjs +271 -0
  231. package/dist/migrate-CJTyeBul.cjs.map +1 -0
  232. package/dist/migrate-CxmkvMbw.mjs +266 -0
  233. package/dist/migrate-CxmkvMbw.mjs.map +1 -0
  234. package/dist/migrate-ISBZNDKU.cjs +181 -0
  235. package/dist/migrate-ISBZNDKU.cjs.map +1 -0
  236. package/dist/openapi.cjs +214 -10
  237. package/dist/openapi.cjs.map +1 -0
  238. package/dist/openapi.d.cts +38 -17
  239. package/dist/openapi.d.cts.map +1 -1
  240. package/dist/openapi.d.mts +38 -17
  241. package/dist/openapi.d.mts.map +1 -1
  242. package/dist/openapi.mjs +208 -5
  243. package/dist/openapi.mjs.map +1 -0
  244. package/dist/projectBucket-BBbQ1lHF.cjs +263 -0
  245. package/dist/projectBucket-BBbQ1lHF.cjs.map +1 -0
  246. package/dist/projectBucket-C_DN4WzF.mjs +222 -0
  247. package/dist/projectBucket-C_DN4WzF.mjs.map +1 -0
  248. package/dist/provider-BqpjG9QM.cjs +57 -0
  249. package/dist/provider-BqpjG9QM.cjs.map +1 -0
  250. package/dist/provider-CEOKk8NS.mjs +46 -0
  251. package/dist/provider-CEOKk8NS.mjs.map +1 -0
  252. package/dist/ready-BtxiI7Qb.cjs +403 -0
  253. package/dist/ready-BtxiI7Qb.cjs.map +1 -0
  254. package/dist/ready-CzHNHhI6.mjs +374 -0
  255. package/dist/ready-CzHNHhI6.mjs.map +1 -0
  256. package/dist/reconcile/public.cjs +3 -5
  257. package/dist/reconcile/public.d.cts +11 -87
  258. package/dist/reconcile/public.d.cts.map +1 -1
  259. package/dist/reconcile/public.d.mts +11 -87
  260. package/dist/reconcile/public.d.mts.map +1 -1
  261. package/dist/reconcile/public.mjs +3 -4
  262. package/dist/{reconcile-CFs8C_1a.mjs → reconcile--I7V4Klj.mjs} +4 -7
  263. package/dist/reconcile--I7V4Klj.mjs.map +1 -0
  264. package/dist/{reconcile-D0pimNiy.cjs → reconcile-CuCQBa5-.cjs} +5 -8
  265. package/dist/reconcile-CuCQBa5-.cjs.map +1 -0
  266. package/dist/resolve-Bei6BMbw.mjs +263 -0
  267. package/dist/resolve-Bei6BMbw.mjs.map +1 -0
  268. package/dist/resolve-qm7FrBj_.cjs +316 -0
  269. package/dist/resolve-qm7FrBj_.cjs.map +1 -0
  270. package/dist/rollback-BJ3H4kQ8.mjs +136 -0
  271. package/dist/rollback-BJ3H4kQ8.mjs.map +1 -0
  272. package/dist/rollback-Bt4xRXtq.cjs +165 -0
  273. package/dist/rollback-Bt4xRXtq.cjs.map +1 -0
  274. package/dist/rolldown-runtime-BhDjJH2R.mjs +15 -0
  275. package/dist/{chunk-CUT6urMc.cjs → rolldown-runtime-C0BPl7ul.cjs} +23 -10
  276. package/dist/run-BJLIerMM.mjs +133 -0
  277. package/dist/run-BJLIerMM.mjs.map +1 -0
  278. package/dist/run-fVZ-rLnc.cjs +174 -0
  279. package/dist/run-fVZ-rLnc.cjs.map +1 -0
  280. package/dist/runtime-ACdfK59n.d.cts +82 -0
  281. package/dist/runtime-ACdfK59n.d.cts.map +1 -0
  282. package/dist/runtime-YyQuekxi.d.mts +82 -0
  283. package/dist/runtime-YyQuekxi.d.mts.map +1 -0
  284. package/dist/s3-CrPoA89T.cjs +215 -0
  285. package/dist/s3-CrPoA89T.cjs.map +1 -0
  286. package/dist/s3-DQXZdmCM.mjs +215 -0
  287. package/dist/s3-DQXZdmCM.mjs.map +1 -0
  288. package/dist/sandbox/config-worker.cjs +43 -0
  289. package/dist/sandbox/config-worker.cjs.map +1 -0
  290. package/dist/sandbox/config-worker.d.cts +1 -0
  291. package/dist/sandbox/config-worker.d.mts +1 -0
  292. package/dist/sandbox/config-worker.mjs +44 -0
  293. package/dist/sandbox/config-worker.mjs.map +1 -0
  294. package/dist/sandbox/credentials-worker.cjs +54 -0
  295. package/dist/sandbox/credentials-worker.cjs.map +1 -0
  296. package/dist/sandbox/credentials-worker.d.cts +1 -0
  297. package/dist/sandbox/credentials-worker.d.mts +1 -0
  298. package/dist/sandbox/credentials-worker.mjs +55 -0
  299. package/dist/sandbox/credentials-worker.mjs.map +1 -0
  300. package/dist/sandbox/discover-worker.cjs +47 -0
  301. package/dist/sandbox/discover-worker.cjs.map +1 -0
  302. package/dist/sandbox/discover-worker.d.cts +1 -0
  303. package/dist/sandbox/discover-worker.d.mts +1 -0
  304. package/dist/sandbox/discover-worker.mjs +48 -0
  305. package/dist/sandbox/discover-worker.mjs.map +1 -0
  306. package/dist/sandbox/migrate-worker.cjs +75 -0
  307. package/dist/sandbox/migrate-worker.cjs.map +1 -0
  308. package/dist/sandbox/migrate-worker.d.cts +1 -0
  309. package/dist/sandbox/migrate-worker.d.mts +1 -0
  310. package/dist/sandbox/migrate-worker.mjs +76 -0
  311. package/dist/sandbox/migrate-worker.mjs.map +1 -0
  312. package/dist/sandbox-C4g1eG31.d.mts +104 -0
  313. package/dist/sandbox-C4g1eG31.d.mts.map +1 -0
  314. package/dist/sandbox-CHv3OYXg.cjs +165 -0
  315. package/dist/sandbox-CHv3OYXg.cjs.map +1 -0
  316. package/dist/sandbox-CbVB7uOD.mjs +118 -0
  317. package/dist/sandbox-CbVB7uOD.mjs.map +1 -0
  318. package/dist/sandbox-CdKgQ3XU.d.cts +104 -0
  319. package/dist/sandbox-CdKgQ3XU.d.cts.map +1 -0
  320. package/dist/{workspace-C6VJQVtG.cjs → schemas-BCwKKA42.mjs} +958 -1842
  321. package/dist/schemas-BCwKKA42.mjs.map +1 -0
  322. package/dist/{workspace-zoqRbihZ.mjs → schemas-BQ_v0lEX.cjs} +1048 -1658
  323. package/dist/schemas-BQ_v0lEX.cjs.map +1 -0
  324. package/dist/secretsManager-CQORubp9.mjs +97 -0
  325. package/dist/secretsManager-CQORubp9.mjs.map +1 -0
  326. package/dist/secretsManager-RAGcEDX1.cjs +108 -0
  327. package/dist/secretsManager-RAGcEDX1.cjs.map +1 -0
  328. package/dist/seeds-CHIPcMrY.cjs +9115 -0
  329. package/dist/seeds-CHIPcMrY.cjs.map +1 -0
  330. package/dist/seeds-E4nUeXTl.mjs +8148 -0
  331. package/dist/seeds-E4nUeXTl.mjs.map +1 -0
  332. package/dist/sniffer-bUiSXLMj.mjs +1825 -0
  333. package/dist/sniffer-bUiSXLMj.mjs.map +1 -0
  334. package/dist/sniffer-n3TkX6JD.cjs +1998 -0
  335. package/dist/sniffer-n3TkX6JD.cjs.map +1 -0
  336. package/dist/sst-B-Uz4cvm.cjs +464 -0
  337. package/dist/sst-B-Uz4cvm.cjs.map +1 -0
  338. package/dist/sst-C1pxbFEd.mjs +441 -0
  339. package/dist/sst-C1pxbFEd.mjs.map +1 -0
  340. package/dist/stages-DJrOYLZ-.mjs +176 -0
  341. package/dist/stages-DJrOYLZ-.mjs.map +1 -0
  342. package/dist/stages-_3RVNG83.cjs +176 -0
  343. package/dist/stages-_3RVNG83.cjs.map +1 -0
  344. package/dist/target/public.cjs +15 -0
  345. package/dist/target/public.d.cts +28 -0
  346. package/dist/target/public.d.cts.map +1 -0
  347. package/dist/target/public.d.mts +28 -0
  348. package/dist/target/public.d.mts.map +1 -0
  349. package/dist/target/public.mjs +4 -0
  350. package/dist/terminal-Bs_lNQhL.mjs +85 -0
  351. package/dist/terminal-Bs_lNQhL.mjs.map +1 -0
  352. package/dist/terminal-CsQz4oT0.cjs +85 -0
  353. package/dist/terminal-CsQz4oT0.cjs.map +1 -0
  354. package/dist/types-B6UXlEkf.d.cts +7650 -0
  355. package/dist/types-B6UXlEkf.d.cts.map +1 -0
  356. package/dist/types-HqVPddRK.d.mts +7649 -0
  357. package/dist/types-HqVPddRK.d.mts.map +1 -0
  358. package/dist/utils-D2Nk1Nv2.cjs +205 -0
  359. package/dist/utils-D2Nk1Nv2.cjs.map +1 -0
  360. package/dist/utils-D_fxUqvU.mjs +156 -0
  361. package/dist/utils-D_fxUqvU.mjs.map +1 -0
  362. package/dist/vitest.cjs +65 -0
  363. package/dist/vitest.cjs.map +1 -0
  364. package/dist/vitest.d.cts +29 -0
  365. package/dist/vitest.d.cts.map +1 -0
  366. package/dist/vitest.d.mts +29 -0
  367. package/dist/vitest.d.mts.map +1 -0
  368. package/dist/vitest.mjs +65 -0
  369. package/dist/vitest.mjs.map +1 -0
  370. package/dist/workerRuntime-BXfhbe13.cjs +108 -0
  371. package/dist/workerRuntime-BXfhbe13.cjs.map +1 -0
  372. package/dist/workerRuntime-CsOyBRx2.mjs +79 -0
  373. package/dist/workerRuntime-CsOyBRx2.mjs.map +1 -0
  374. package/dist/workspace/index.cjs +8 -4
  375. package/dist/workspace/index.d.cts +3 -3
  376. package/dist/workspace/index.d.mts +3 -3
  377. package/dist/workspace/index.mjs +2 -3
  378. package/dist/workspace-BwqQnool.cjs +2806 -0
  379. package/dist/workspace-BwqQnool.cjs.map +1 -0
  380. package/dist/workspace-D1QbNd55.mjs +2394 -0
  381. package/dist/workspace-D1QbNd55.mjs.map +1 -0
  382. package/package.json +54 -22
  383. package/dist/CachedStateProvider-BLo7zv7S.cjs +0 -3
  384. package/dist/CachedStateProvider-BxoAm-B2.mjs +0 -3
  385. package/dist/CachedStateProvider-CqPdW7CB.cjs +0 -60
  386. package/dist/CachedStateProvider-CqPdW7CB.cjs.map +0 -1
  387. package/dist/CachedStateProvider-DTniehMP.mjs +0 -54
  388. package/dist/CachedStateProvider-DTniehMP.mjs.map +0 -1
  389. package/dist/HostingerProvider-Cft7lEYr.mjs.map +0 -1
  390. package/dist/HostingerProvider-h3EbEp-Z.cjs.map +0 -1
  391. package/dist/LocalStateProvider-Bn6tS-oL.mjs +0 -42
  392. package/dist/LocalStateProvider-Bn6tS-oL.mjs.map +0 -1
  393. package/dist/LocalStateProvider-Db9SEjyH.cjs +0 -43
  394. package/dist/LocalStateProvider-Db9SEjyH.cjs.map +0 -1
  395. package/dist/Route53Provider-RdpUDJQk.mjs.map +0 -1
  396. package/dist/Route53Provider-di2fMM5N.cjs.map +0 -1
  397. package/dist/SSMStateProvider-BRt2py-A.mjs +0 -66
  398. package/dist/SSMStateProvider-BRt2py-A.mjs.map +0 -1
  399. package/dist/SSMStateProvider-DyX8s9HI.cjs +0 -66
  400. package/dist/SSMStateProvider-DyX8s9HI.cjs.map +0 -1
  401. package/dist/backup-provisioner-Bgj5Vi_L.mjs.map +0 -1
  402. package/dist/backup-provisioner-BrsHwYG0.cjs.map +0 -1
  403. package/dist/bundler-BY1OmV1e.cjs.map +0 -1
  404. package/dist/bundler-Be8Zg4Wd.mjs.map +0 -1
  405. package/dist/chunk-Duj1WY3L.mjs +0 -7
  406. package/dist/config-BZ1F0WuA.cjs +0 -462
  407. package/dist/config-BZ1F0WuA.cjs.map +0 -1
  408. package/dist/config-DVVph9yz.mjs +0 -402
  409. package/dist/config-DVVph9yz.mjs.map +0 -1
  410. package/dist/config.d.cts.map +0 -1
  411. package/dist/config.d.mts.map +0 -1
  412. package/dist/credentials-B5zRHdAl.mjs +0 -141
  413. package/dist/credentials-B5zRHdAl.mjs.map +0 -1
  414. package/dist/credentials-BapzjyV5.cjs +0 -195
  415. package/dist/credentials-BapzjyV5.cjs.map +0 -1
  416. package/dist/credentials-Xamqe_NJ.cjs +0 -2681
  417. package/dist/credentials-Xamqe_NJ.cjs.map +0 -1
  418. package/dist/credentials-dP8vRVRv.mjs +0 -2549
  419. package/dist/credentials-dP8vRVRv.mjs.map +0 -1
  420. package/dist/discover-CAlFgYec.mjs +0 -229
  421. package/dist/discover-CAlFgYec.mjs.map +0 -1
  422. package/dist/discover-DTmFeloL.cjs +0 -271
  423. package/dist/discover-DTmFeloL.cjs.map +0 -1
  424. package/dist/dokploy-api-BS2xnJLZ.mjs +0 -3
  425. package/dist/dokploy-api-BsVH0y_s.cjs +0 -718
  426. package/dist/dokploy-api-BsVH0y_s.cjs.map +0 -1
  427. package/dist/dokploy-api-BuxDRo3l.cjs +0 -3
  428. package/dist/dokploy-api-aTFPz7_4.mjs +0 -706
  429. package/dist/dokploy-api-aTFPz7_4.mjs.map +0 -1
  430. package/dist/emit-CbcRolsa.cjs.map +0 -1
  431. package/dist/emit-CiZS_5Ub.mjs.map +0 -1
  432. package/dist/encryption-C6jaU0hE.cjs +0 -54
  433. package/dist/encryption-C6jaU0hE.cjs.map +0 -1
  434. package/dist/encryption-CHzzeR8a.cjs +0 -4
  435. package/dist/encryption-CQUncu7v.mjs +0 -3
  436. package/dist/encryption-D-abyhZx.mjs +0 -42
  437. package/dist/encryption-D-abyhZx.mjs.map +0 -1
  438. package/dist/fullstack-secrets-C-GGohke.cjs +0 -111
  439. package/dist/fullstack-secrets-C-GGohke.cjs.map +0 -1
  440. package/dist/fullstack-secrets-D1o9-G5l.mjs +0 -87
  441. package/dist/fullstack-secrets-D1o9-G5l.mjs.map +0 -1
  442. package/dist/generator-CNzBw7g5.cjs +0 -289
  443. package/dist/generator-CNzBw7g5.cjs.map +0 -1
  444. package/dist/generator-VE2JrFlY.mjs +0 -253
  445. package/dist/generator-VE2JrFlY.mjs.map +0 -1
  446. package/dist/index-C6e-ULLx.d.mts.map +0 -1
  447. package/dist/index-CR5urhWX.d.cts.map +0 -1
  448. package/dist/openapi-SjsgARie.cjs +0 -2075
  449. package/dist/openapi-SjsgARie.cjs.map +0 -1
  450. package/dist/openapi-Xx0A7Wg0.mjs +0 -2021
  451. package/dist/openapi-Xx0A7Wg0.mjs.map +0 -1
  452. package/dist/openapi-react-query-Byltvm_7.mjs +0 -167
  453. package/dist/openapi-react-query-Byltvm_7.mjs.map +0 -1
  454. package/dist/openapi-react-query-CmJ1xDbn.cjs +0 -173
  455. package/dist/openapi-react-query-CmJ1xDbn.cjs.map +0 -1
  456. package/dist/openapi-react-query.cjs +0 -4
  457. package/dist/openapi-react-query.d.cts +0 -11
  458. package/dist/openapi-react-query.d.cts.map +0 -1
  459. package/dist/openapi-react-query.d.mts +0 -11
  460. package/dist/openapi-react-query.d.mts.map +0 -1
  461. package/dist/openapi-react-query.mjs +0 -4
  462. package/dist/reconcile-CFs8C_1a.mjs.map +0 -1
  463. package/dist/reconcile-D0pimNiy.cjs.map +0 -1
  464. package/dist/setup-BA8ciTPU.mjs +0 -11
  465. package/dist/setup-BsZvZP6f.cjs +0 -11
  466. package/dist/setup-C8KOx8_8.mjs +0 -443
  467. package/dist/setup-C8KOx8_8.mjs.map +0 -1
  468. package/dist/setup-hC6hI86f.cjs +0 -473
  469. package/dist/setup-hC6hI86f.cjs.map +0 -1
  470. package/dist/storage-BJmzYxt8.cjs +0 -363
  471. package/dist/storage-BJmzYxt8.cjs.map +0 -1
  472. package/dist/storage-BM9hGpgv.cjs +0 -7
  473. package/dist/storage-Bi24WfoW.mjs +0 -297
  474. package/dist/storage-Bi24WfoW.mjs.map +0 -1
  475. package/dist/storage-CYlGwWTj.mjs +0 -3
  476. package/dist/sync-CmEuNZsB.mjs +0 -76
  477. package/dist/sync-CmEuNZsB.mjs.map +0 -1
  478. package/dist/sync-D306yOWu.cjs +0 -4
  479. package/dist/sync-SizaChmC.cjs +0 -93
  480. package/dist/sync-SizaChmC.cjs.map +0 -1
  481. package/dist/sync-hOqAWHR6.mjs +0 -3
  482. package/dist/types-6pkp2RRj.d.mts +0 -2220
  483. package/dist/types-6pkp2RRj.d.mts.map +0 -1
  484. package/dist/types-Y3fKQSAK.d.cts +0 -2220
  485. package/dist/types-Y3fKQSAK.d.cts.map +0 -1
  486. package/dist/workspace-BzrG_2SI.mjs +0 -8
  487. package/dist/workspace-C6VJQVtG.cjs.map +0 -1
  488. package/dist/workspace-XXtNhqJl.cjs +0 -9
  489. package/dist/workspace-zoqRbihZ.mjs.map +0 -1
@@ -0,0 +1,43 @@
1
+ const require_workerRuntime = require("../workerRuntime-BXfhbe13.cjs");
2
+ let node_fs_promises = require("node:fs/promises");
3
+ let node_url = require("node:url");
4
+ //#region src/sandbox/config-worker.ts
5
+ /**
6
+ * Loads `gkm.config.ts` in a sandbox and answers with it as data.
7
+ *
8
+ * Usage (by `loadWorkspaceConfig` with a sandbox, never by hand):
9
+ * node --import=<tsx> config-worker.ts /path/to/gkm.config.ts
10
+ *
11
+ * Answers `{ reason: 'loaded', config }`, `{ reason: 'live', paths }` when the
12
+ * config holds something JSON cannot carry, or `{ reason: 'failed', error }`
13
+ * when it could not be loaded at all.
14
+ */
15
+ async function load(configPath) {
16
+ if (configPath.endsWith(".json")) return JSON.parse(await (0, node_fs_promises.readFile)(configPath, "utf8"));
17
+ return (await import((0, node_url.pathToFileURL)(configPath).href)).default;
18
+ }
19
+ async function main() {
20
+ const configPath = process.argv[2];
21
+ try {
22
+ if (!configPath) throw new TypeError("No config path was given.");
23
+ await require_workerRuntime.registerAdjacentTsconfig();
24
+ const config = await load(configPath);
25
+ const paths = require_workerRuntime.liveValuePaths(config);
26
+ require_workerRuntime.answer(paths.length > 0 ? {
27
+ reason: "live",
28
+ paths
29
+ } : {
30
+ reason: "loaded",
31
+ config
32
+ });
33
+ } catch (error) {
34
+ require_workerRuntime.answer({
35
+ reason: "failed",
36
+ error: require_workerRuntime.errorData(error)
37
+ });
38
+ }
39
+ }
40
+ main();
41
+ //#endregion
42
+
43
+ //# sourceMappingURL=config-worker.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-worker.cjs","names":["readFile","pathToFileURL","registerAdjacentTsconfig","liveValuePaths","errorData"],"sources":["../../src/sandbox/config-worker.ts"],"sourcesContent":["/**\n * Loads `gkm.config.ts` in a sandbox and answers with it as data.\n *\n * Usage (by `loadWorkspaceConfig` with a sandbox, never by hand):\n * node --import=<tsx> config-worker.ts /path/to/gkm.config.ts\n *\n * Answers `{ reason: 'loaded', config }`, `{ reason: 'live', paths }` when the\n * config holds something JSON cannot carry, or `{ reason: 'failed', error }`\n * when it could not be loaded at all.\n */\n\nimport { readFile } from 'node:fs/promises';\nimport { pathToFileURL } from 'node:url';\nimport {\n\tanswer,\n\terrorData,\n\tliveValuePaths,\n\tregisterAdjacentTsconfig,\n} from './workerRuntime';\n\nasync function load(configPath: string): Promise<unknown> {\n\tif (configPath.endsWith('.json')) {\n\t\treturn JSON.parse(await readFile(configPath, 'utf8'));\n\t}\n\tconst module = await import(pathToFileURL(configPath).href);\n\treturn module.default;\n}\n\nasync function main(): Promise<void> {\n\tconst configPath = process.argv[2];\n\ttry {\n\t\tif (!configPath) throw new TypeError('No config path was given.');\n\t\tawait registerAdjacentTsconfig();\n\t\tconst config = await load(configPath);\n\t\tconst paths = liveValuePaths(config);\n\t\tanswer(\n\t\t\tpaths.length > 0\n\t\t\t\t? { reason: 'live', paths }\n\t\t\t\t: { reason: 'loaded', config },\n\t\t);\n\t} catch (error) {\n\t\tanswer({ reason: 'failed', error: errorData(error) });\n\t}\n}\n\nvoid main();\n"],"mappings":";;;;;;;;;;;;;;AAoBA,eAAe,KAAK,YAAsC;CACzD,IAAI,WAAW,SAAS,OAAO,GAC9B,OAAO,KAAK,MAAM,OAAA,GAAMA,iBAAAA,SAAAA,CAAS,YAAY,MAAM,CAAC;CAGrD,QAAO,MADc,QAAA,GAAOC,SAAAA,cAAAA,CAAc,UAAU,CAAC,CAAC,MAAA,CACxC;AACf;AAEA,eAAe,OAAsB;CACpC,MAAM,aAAa,QAAQ,KAAK;CAChC,IAAI;EACH,IAAI,CAAC,YAAY,MAAM,IAAI,UAAU,2BAA2B;EAChE,MAAMC,sBAAAA,yBAAyB;EAC/B,MAAM,SAAS,MAAM,KAAK,UAAU;EACpC,MAAM,QAAQC,sBAAAA,eAAe,MAAM;EACnC,sBAAA,OACC,MAAM,SAAS,IACZ;GAAE,QAAQ;GAAQ;EAAM,IACxB;GAAE,QAAQ;GAAU;EAAO,CAC/B;CACD,SAAS,OAAO;EACf,sBAAA,OAAO;GAAE,QAAQ;GAAU,OAAOC,sBAAAA,UAAU,KAAK;EAAE,CAAC;CACrD;AACD;AAEK,KAAK"}
@@ -0,0 +1 @@
1
+ export {}
@@ -0,0 +1 @@
1
+ export {}
@@ -0,0 +1,44 @@
1
+ import { a as registerAdjacentTsconfig, i as liveValuePaths, n as answer, r as errorData } from "../workerRuntime-CsOyBRx2.mjs";
2
+ import { readFile } from "node:fs/promises";
3
+ import { pathToFileURL } from "node:url";
4
+ //#region src/sandbox/config-worker.ts
5
+ /**
6
+ * Loads `gkm.config.ts` in a sandbox and answers with it as data.
7
+ *
8
+ * Usage (by `loadWorkspaceConfig` with a sandbox, never by hand):
9
+ * node --import=<tsx> config-worker.ts /path/to/gkm.config.ts
10
+ *
11
+ * Answers `{ reason: 'loaded', config }`, `{ reason: 'live', paths }` when the
12
+ * config holds something JSON cannot carry, or `{ reason: 'failed', error }`
13
+ * when it could not be loaded at all.
14
+ */
15
+ async function load(configPath) {
16
+ if (configPath.endsWith(".json")) return JSON.parse(await readFile(configPath, "utf8"));
17
+ return (await import(pathToFileURL(configPath).href)).default;
18
+ }
19
+ async function main() {
20
+ const configPath = process.argv[2];
21
+ try {
22
+ if (!configPath) throw new TypeError("No config path was given.");
23
+ await registerAdjacentTsconfig();
24
+ const config = await load(configPath);
25
+ const paths = liveValuePaths(config);
26
+ answer(paths.length > 0 ? {
27
+ reason: "live",
28
+ paths
29
+ } : {
30
+ reason: "loaded",
31
+ config
32
+ });
33
+ } catch (error) {
34
+ answer({
35
+ reason: "failed",
36
+ error: errorData(error)
37
+ });
38
+ }
39
+ }
40
+ main();
41
+ //#endregion
42
+ export {};
43
+
44
+ //# sourceMappingURL=config-worker.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-worker.mjs","names":[],"sources":["../../src/sandbox/config-worker.ts"],"sourcesContent":["/**\n * Loads `gkm.config.ts` in a sandbox and answers with it as data.\n *\n * Usage (by `loadWorkspaceConfig` with a sandbox, never by hand):\n * node --import=<tsx> config-worker.ts /path/to/gkm.config.ts\n *\n * Answers `{ reason: 'loaded', config }`, `{ reason: 'live', paths }` when the\n * config holds something JSON cannot carry, or `{ reason: 'failed', error }`\n * when it could not be loaded at all.\n */\n\nimport { readFile } from 'node:fs/promises';\nimport { pathToFileURL } from 'node:url';\nimport {\n\tanswer,\n\terrorData,\n\tliveValuePaths,\n\tregisterAdjacentTsconfig,\n} from './workerRuntime';\n\nasync function load(configPath: string): Promise<unknown> {\n\tif (configPath.endsWith('.json')) {\n\t\treturn JSON.parse(await readFile(configPath, 'utf8'));\n\t}\n\tconst module = await import(pathToFileURL(configPath).href);\n\treturn module.default;\n}\n\nasync function main(): Promise<void> {\n\tconst configPath = process.argv[2];\n\ttry {\n\t\tif (!configPath) throw new TypeError('No config path was given.');\n\t\tawait registerAdjacentTsconfig();\n\t\tconst config = await load(configPath);\n\t\tconst paths = liveValuePaths(config);\n\t\tanswer(\n\t\t\tpaths.length > 0\n\t\t\t\t? { reason: 'live', paths }\n\t\t\t\t: { reason: 'loaded', config },\n\t\t);\n\t} catch (error) {\n\t\tanswer({ reason: 'failed', error: errorData(error) });\n\t}\n}\n\nvoid main();\n"],"mappings":";;;;;;;;;;;;;;AAoBA,eAAe,KAAK,YAAsC;CACzD,IAAI,WAAW,SAAS,OAAO,GAC9B,OAAO,KAAK,MAAM,MAAM,SAAS,YAAY,MAAM,CAAC;CAGrD,QAAO,MADc,OAAO,cAAc,UAAU,CAAC,CAAC,MAAA,CACxC;AACf;AAEA,eAAe,OAAsB;CACpC,MAAM,aAAa,QAAQ,KAAK;CAChC,IAAI;EACH,IAAI,CAAC,YAAY,MAAM,IAAI,UAAU,2BAA2B;EAChE,MAAM,yBAAyB;EAC/B,MAAM,SAAS,MAAM,KAAK,UAAU;EACpC,MAAM,QAAQ,eAAe,MAAM;EACnC,OACC,MAAM,SAAS,IACZ;GAAE,QAAQ;GAAQ;EAAM,IACxB;GAAE,QAAQ;GAAU;EAAO,CAC/B;CACD,SAAS,OAAO;EACf,OAAO;GAAE,QAAQ;GAAU,OAAO,UAAU,KAAK;EAAE,CAAC;CACrD;AACD;AAEK,KAAK"}
@@ -0,0 +1,54 @@
1
+ const require_discover = require("../discover-BfhVW_kT.cjs");
2
+ const require_sandbox = require("../sandbox-CHv3OYXg.cjs");
3
+ const require_workerRuntime = require("../workerRuntime-BXfhbe13.cjs");
4
+ const require_credentialSchemas = require("../credentialSchemas-DDda4Mmm.cjs");
5
+ let node_path = require("node:path");
6
+ let node_fs_promises = require("node:fs/promises");
7
+ //#region src/sandbox/credentials-worker.ts
8
+ /**
9
+ * Loads a project's constructs in a sandbox and answers with what their
10
+ * credentials schemas say, as data: each schema as JSON Schema, and whether
11
+ * each value it was handed passes.
12
+ *
13
+ * Usage (by `inspectCredentials` under a sandbox, never by hand):
14
+ * node --import=<tsx> credentials-worker.ts '{"patterns":[…],"cwd":"…"}'
15
+ *
16
+ * The schemas are the project's code, which is why they run here. Each value
17
+ * arrives as a file in `GKM_SECRETS_DIR` named by its key, is read into this
18
+ * process's memory only, and never comes back: an answer carries issue paths
19
+ * and messages, not values.
20
+ */
21
+ /** Every secret file the sandbox mounted, by name. */
22
+ async function mountedSecrets() {
23
+ const dir = process.env[require_sandbox.SECRETS_DIR_ENV];
24
+ if (!dir) return {};
25
+ const secrets = {};
26
+ for (const name of await (0, node_fs_promises.readdir)(dir)) secrets[name] = (await (0, node_fs_promises.readFile)((0, node_path.join)(dir, name), "utf8")).trim();
27
+ return secrets;
28
+ }
29
+ async function main() {
30
+ try {
31
+ const request = JSON.parse(process.argv[2] ?? "{}");
32
+ await require_workerRuntime.registerAdjacentTsconfig();
33
+ const sources = {};
34
+ const manifest = await require_discover.discover({
35
+ patterns: request.patterns,
36
+ cwd: request.cwd,
37
+ sources
38
+ });
39
+ const inspection = await require_credentialSchemas.inspectLive(require_credentialSchemas.liveCredentials(manifest, sources), await mountedSecrets());
40
+ require_workerRuntime.answer({
41
+ reason: "inspected",
42
+ ...inspection
43
+ });
44
+ } catch (error) {
45
+ require_workerRuntime.answer({
46
+ reason: "failed",
47
+ error: require_workerRuntime.errorData(error)
48
+ });
49
+ }
50
+ }
51
+ main();
52
+ //#endregion
53
+
54
+ //# sourceMappingURL=credentials-worker.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"credentials-worker.cjs","names":["SECRETS_DIR_ENV","readdir","readFile","join","registerAdjacentTsconfig","discover","inspectLive","liveCredentials","errorData"],"sources":["../../src/sandbox/credentials-worker.ts"],"sourcesContent":["/**\n * Loads a project's constructs in a sandbox and answers with what their\n * credentials schemas say, as data: each schema as JSON Schema, and whether\n * each value it was handed passes.\n *\n * Usage (by `inspectCredentials` under a sandbox, never by hand):\n * node --import=<tsx> credentials-worker.ts '{\"patterns\":[…],\"cwd\":\"…\"}'\n *\n * The schemas are the project's code, which is why they run here. Each value\n * arrives as a file in `GKM_SECRETS_DIR` named by its key, is read into this\n * process's memory only, and never comes back: an answer carries issue paths\n * and messages, not values.\n */\n\nimport { readdir, readFile } from 'node:fs/promises';\nimport { join } from 'node:path';\nimport { type ConstructSource, discover } from '../reconcile/discover';\nimport { inspectLive, liveCredentials } from '../secrets/credentialSchemas';\nimport { SECRETS_DIR_ENV } from './sandbox';\nimport { answer, errorData, registerAdjacentTsconfig } from './workerRuntime';\n\n/** Every secret file the sandbox mounted, by name. */\nasync function mountedSecrets(): Promise<Record<string, string>> {\n\tconst dir = process.env[SECRETS_DIR_ENV];\n\tif (!dir) return {};\n\n\tconst secrets: Record<string, string> = {};\n\tfor (const name of await readdir(dir)) {\n\t\tsecrets[name] = (await readFile(join(dir, name), 'utf8')).trim();\n\t}\n\treturn secrets;\n}\n\nasync function main(): Promise<void> {\n\ttry {\n\t\tconst request = JSON.parse(process.argv[2] ?? '{}') as {\n\t\t\tpatterns: string[];\n\t\t\tcwd: string;\n\t\t};\n\t\tawait registerAdjacentTsconfig();\n\n\t\tconst sources: Record<string, ConstructSource> = {};\n\t\tconst manifest = await discover({\n\t\t\tpatterns: request.patterns,\n\t\t\tcwd: request.cwd,\n\t\t\tsources,\n\t\t});\n\n\t\tconst inspection = await inspectLive(\n\t\t\tliveCredentials(manifest, sources),\n\t\t\tawait mountedSecrets(),\n\t\t);\n\t\tanswer({ reason: 'inspected', ...inspection });\n\t} catch (error) {\n\t\tanswer({ reason: 'failed', error: errorData(error) });\n\t}\n}\n\nvoid main();\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAsBA,eAAe,iBAAkD;CAChE,MAAM,MAAM,QAAQ,IAAIA,gBAAAA;CACxB,IAAI,CAAC,KAAK,OAAO,CAAC;CAElB,MAAM,UAAkC,CAAC;CACzC,KAAK,MAAM,QAAQ,OAAA,GAAMC,iBAAAA,QAAAA,CAAQ,GAAG,GACnC,QAAQ,SAAS,OAAA,GAAMC,iBAAAA,SAAAA,EAAAA,GAASC,UAAAA,KAAAA,CAAK,KAAK,IAAI,GAAG,MAAM,EAAA,CAAG,KAAK;CAEhE,OAAO;AACR;AAEA,eAAe,OAAsB;CACpC,IAAI;EACH,MAAM,UAAU,KAAK,MAAM,QAAQ,KAAK,MAAM,IAAI;EAIlD,MAAMC,sBAAAA,yBAAyB;EAE/B,MAAM,UAA2C,CAAC;EAClD,MAAM,WAAW,MAAMC,iBAAAA,SAAS;GAC/B,UAAU,QAAQ;GAClB,KAAK,QAAQ;GACb;EACD,CAAC;EAED,MAAM,aAAa,MAAMC,0BAAAA,YACxBC,0BAAAA,gBAAgB,UAAU,OAAO,GACjC,MAAM,eAAe,CACtB;EACA,sBAAA,OAAO;GAAE,QAAQ;GAAa,GAAG;EAAW,CAAC;CAC9C,SAAS,OAAO;EACf,sBAAA,OAAO;GAAE,QAAQ;GAAU,OAAOC,sBAAAA,UAAU,KAAK;EAAE,CAAC;CACrD;AACD;AAEK,KAAK"}
@@ -0,0 +1 @@
1
+ export {}
@@ -0,0 +1 @@
1
+ export {}
@@ -0,0 +1,55 @@
1
+ import { r as discover } from "../discover-kziEht4W.mjs";
2
+ import { t as SECRETS_DIR_ENV } from "../sandbox-CbVB7uOD.mjs";
3
+ import { a as registerAdjacentTsconfig, n as answer, r as errorData } from "../workerRuntime-CsOyBRx2.mjs";
4
+ import { a as liveCredentials, r as inspectLive } from "../credentialSchemas-DvitraL-.mjs";
5
+ import { join } from "node:path";
6
+ import { readFile, readdir } from "node:fs/promises";
7
+ //#region src/sandbox/credentials-worker.ts
8
+ /**
9
+ * Loads a project's constructs in a sandbox and answers with what their
10
+ * credentials schemas say, as data: each schema as JSON Schema, and whether
11
+ * each value it was handed passes.
12
+ *
13
+ * Usage (by `inspectCredentials` under a sandbox, never by hand):
14
+ * node --import=<tsx> credentials-worker.ts '{"patterns":[…],"cwd":"…"}'
15
+ *
16
+ * The schemas are the project's code, which is why they run here. Each value
17
+ * arrives as a file in `GKM_SECRETS_DIR` named by its key, is read into this
18
+ * process's memory only, and never comes back: an answer carries issue paths
19
+ * and messages, not values.
20
+ */
21
+ /** Every secret file the sandbox mounted, by name. */
22
+ async function mountedSecrets() {
23
+ const dir = process.env[SECRETS_DIR_ENV];
24
+ if (!dir) return {};
25
+ const secrets = {};
26
+ for (const name of await readdir(dir)) secrets[name] = (await readFile(join(dir, name), "utf8")).trim();
27
+ return secrets;
28
+ }
29
+ async function main() {
30
+ try {
31
+ const request = JSON.parse(process.argv[2] ?? "{}");
32
+ await registerAdjacentTsconfig();
33
+ const sources = {};
34
+ const manifest = await discover({
35
+ patterns: request.patterns,
36
+ cwd: request.cwd,
37
+ sources
38
+ });
39
+ const inspection = await inspectLive(liveCredentials(manifest, sources), await mountedSecrets());
40
+ answer({
41
+ reason: "inspected",
42
+ ...inspection
43
+ });
44
+ } catch (error) {
45
+ answer({
46
+ reason: "failed",
47
+ error: errorData(error)
48
+ });
49
+ }
50
+ }
51
+ main();
52
+ //#endregion
53
+ export {};
54
+
55
+ //# sourceMappingURL=credentials-worker.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"credentials-worker.mjs","names":[],"sources":["../../src/sandbox/credentials-worker.ts"],"sourcesContent":["/**\n * Loads a project's constructs in a sandbox and answers with what their\n * credentials schemas say, as data: each schema as JSON Schema, and whether\n * each value it was handed passes.\n *\n * Usage (by `inspectCredentials` under a sandbox, never by hand):\n * node --import=<tsx> credentials-worker.ts '{\"patterns\":[…],\"cwd\":\"…\"}'\n *\n * The schemas are the project's code, which is why they run here. Each value\n * arrives as a file in `GKM_SECRETS_DIR` named by its key, is read into this\n * process's memory only, and never comes back: an answer carries issue paths\n * and messages, not values.\n */\n\nimport { readdir, readFile } from 'node:fs/promises';\nimport { join } from 'node:path';\nimport { type ConstructSource, discover } from '../reconcile/discover';\nimport { inspectLive, liveCredentials } from '../secrets/credentialSchemas';\nimport { SECRETS_DIR_ENV } from './sandbox';\nimport { answer, errorData, registerAdjacentTsconfig } from './workerRuntime';\n\n/** Every secret file the sandbox mounted, by name. */\nasync function mountedSecrets(): Promise<Record<string, string>> {\n\tconst dir = process.env[SECRETS_DIR_ENV];\n\tif (!dir) return {};\n\n\tconst secrets: Record<string, string> = {};\n\tfor (const name of await readdir(dir)) {\n\t\tsecrets[name] = (await readFile(join(dir, name), 'utf8')).trim();\n\t}\n\treturn secrets;\n}\n\nasync function main(): Promise<void> {\n\ttry {\n\t\tconst request = JSON.parse(process.argv[2] ?? '{}') as {\n\t\t\tpatterns: string[];\n\t\t\tcwd: string;\n\t\t};\n\t\tawait registerAdjacentTsconfig();\n\n\t\tconst sources: Record<string, ConstructSource> = {};\n\t\tconst manifest = await discover({\n\t\t\tpatterns: request.patterns,\n\t\t\tcwd: request.cwd,\n\t\t\tsources,\n\t\t});\n\n\t\tconst inspection = await inspectLive(\n\t\t\tliveCredentials(manifest, sources),\n\t\t\tawait mountedSecrets(),\n\t\t);\n\t\tanswer({ reason: 'inspected', ...inspection });\n\t} catch (error) {\n\t\tanswer({ reason: 'failed', error: errorData(error) });\n\t}\n}\n\nvoid main();\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAsBA,eAAe,iBAAkD;CAChE,MAAM,MAAM,QAAQ,IAAI;CACxB,IAAI,CAAC,KAAK,OAAO,CAAC;CAElB,MAAM,UAAkC,CAAC;CACzC,KAAK,MAAM,QAAQ,MAAM,QAAQ,GAAG,GACnC,QAAQ,SAAS,MAAM,SAAS,KAAK,KAAK,IAAI,GAAG,MAAM,EAAA,CAAG,KAAK;CAEhE,OAAO;AACR;AAEA,eAAe,OAAsB;CACpC,IAAI;EACH,MAAM,UAAU,KAAK,MAAM,QAAQ,KAAK,MAAM,IAAI;EAIlD,MAAM,yBAAyB;EAE/B,MAAM,UAA2C,CAAC;EAClD,MAAM,WAAW,MAAM,SAAS;GAC/B,UAAU,QAAQ;GAClB,KAAK,QAAQ;GACb;EACD,CAAC;EAED,MAAM,aAAa,MAAM,YACxB,gBAAgB,UAAU,OAAO,GACjC,MAAM,eAAe,CACtB;EACA,OAAO;GAAE,QAAQ;GAAa,GAAG;EAAW,CAAC;CAC9C,SAAS,OAAO;EACf,OAAO;GAAE,QAAQ;GAAU,OAAO,UAAU,KAAK;EAAE,CAAC;CACrD;AACD;AAEK,KAAK"}
@@ -0,0 +1,47 @@
1
+ const require_discover = require("../discover-BfhVW_kT.cjs");
2
+ const require_workerRuntime = require("../workerRuntime-BXfhbe13.cjs");
3
+ //#region src/sandbox/discover-worker.ts
4
+ /**
5
+ * Discovers a project's constructs in a sandbox and answers with the
6
+ * manifest as data.
7
+ *
8
+ * Usage (by `discover` under a sandbox, never by hand):
9
+ * node --import=<tsx> discover-worker.ts '{"patterns":[…],"cwd":"…"}'
10
+ *
11
+ * Discovery imports every construct module — the project's code — which is
12
+ * why it runs here rather than in the deploy. Its warnings go to stderr, where
13
+ * the host passes them on.
14
+ */
15
+ async function main() {
16
+ try {
17
+ const request = JSON.parse(process.argv[2] ?? "{}");
18
+ await require_workerRuntime.registerAdjacentTsconfig();
19
+ const runnables = {};
20
+ const background = {};
21
+ const manifest = await require_discover.discover({
22
+ patterns: request.patterns,
23
+ cwd: request.cwd,
24
+ runnables,
25
+ background
26
+ });
27
+ const paths = require_workerRuntime.liveValuePaths(manifest);
28
+ require_workerRuntime.answer(paths.length > 0 ? {
29
+ reason: "live",
30
+ paths
31
+ } : {
32
+ reason: "discovered",
33
+ manifest,
34
+ runnables,
35
+ background
36
+ });
37
+ } catch (error) {
38
+ require_workerRuntime.answer({
39
+ reason: "failed",
40
+ error: require_workerRuntime.errorData(error)
41
+ });
42
+ }
43
+ }
44
+ main();
45
+ //#endregion
46
+
47
+ //# sourceMappingURL=discover-worker.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"discover-worker.cjs","names":["registerAdjacentTsconfig","discover","liveValuePaths","errorData"],"sources":["../../src/sandbox/discover-worker.ts"],"sourcesContent":["/**\n * Discovers a project's constructs in a sandbox and answers with the\n * manifest as data.\n *\n * Usage (by `discover` under a sandbox, never by hand):\n * node --import=<tsx> discover-worker.ts '{\"patterns\":[…],\"cwd\":\"…\"}'\n *\n * Discovery imports every construct module — the project's code — which is\n * why it runs here rather than in the deploy. Its warnings go to stderr, where\n * the host passes them on.\n */\n\nimport { discover } from '../reconcile/discover';\nimport {\n\tanswer,\n\terrorData,\n\tliveValuePaths,\n\tregisterAdjacentTsconfig,\n} from './workerRuntime';\n\nasync function main(): Promise<void> {\n\ttry {\n\t\tconst request = JSON.parse(process.argv[2] ?? '{}') as {\n\t\t\tpatterns: string[];\n\t\t\tcwd: string;\n\t\t};\n\t\tawait registerAdjacentTsconfig();\n\n\t\tconst runnables: Record<string, string[]> = {};\n\t\tconst background: Record<string, string[]> = {};\n\t\tconst manifest = await discover({\n\t\t\tpatterns: request.patterns,\n\t\t\tcwd: request.cwd,\n\t\t\trunnables,\n\t\t\tbackground,\n\t\t});\n\n\t\tconst paths = liveValuePaths(manifest);\n\t\tanswer(\n\t\t\tpaths.length > 0\n\t\t\t\t? { reason: 'live', paths }\n\t\t\t\t: { reason: 'discovered', manifest, runnables, background },\n\t\t);\n\t} catch (error) {\n\t\tanswer({ reason: 'failed', error: errorData(error) });\n\t}\n}\n\nvoid main();\n"],"mappings":";;;;;;;;;;;;;;AAoBA,eAAe,OAAsB;CACpC,IAAI;EACH,MAAM,UAAU,KAAK,MAAM,QAAQ,KAAK,MAAM,IAAI;EAIlD,MAAMA,sBAAAA,yBAAyB;EAE/B,MAAM,YAAsC,CAAC;EAC7C,MAAM,aAAuC,CAAC;EAC9C,MAAM,WAAW,MAAMC,iBAAAA,SAAS;GAC/B,UAAU,QAAQ;GAClB,KAAK,QAAQ;GACb;GACA;EACD,CAAC;EAED,MAAM,QAAQC,sBAAAA,eAAe,QAAQ;EACrC,sBAAA,OACC,MAAM,SAAS,IACZ;GAAE,QAAQ;GAAQ;EAAM,IACxB;GAAE,QAAQ;GAAc;GAAU;GAAW;EAAW,CAC5D;CACD,SAAS,OAAO;EACf,sBAAA,OAAO;GAAE,QAAQ;GAAU,OAAOC,sBAAAA,UAAU,KAAK;EAAE,CAAC;CACrD;AACD;AAEK,KAAK"}
@@ -0,0 +1 @@
1
+ export {}
@@ -0,0 +1 @@
1
+ export {}
@@ -0,0 +1,48 @@
1
+ import { r as discover } from "../discover-kziEht4W.mjs";
2
+ import { a as registerAdjacentTsconfig, i as liveValuePaths, n as answer, r as errorData } from "../workerRuntime-CsOyBRx2.mjs";
3
+ //#region src/sandbox/discover-worker.ts
4
+ /**
5
+ * Discovers a project's constructs in a sandbox and answers with the
6
+ * manifest as data.
7
+ *
8
+ * Usage (by `discover` under a sandbox, never by hand):
9
+ * node --import=<tsx> discover-worker.ts '{"patterns":[…],"cwd":"…"}'
10
+ *
11
+ * Discovery imports every construct module — the project's code — which is
12
+ * why it runs here rather than in the deploy. Its warnings go to stderr, where
13
+ * the host passes them on.
14
+ */
15
+ async function main() {
16
+ try {
17
+ const request = JSON.parse(process.argv[2] ?? "{}");
18
+ await registerAdjacentTsconfig();
19
+ const runnables = {};
20
+ const background = {};
21
+ const manifest = await discover({
22
+ patterns: request.patterns,
23
+ cwd: request.cwd,
24
+ runnables,
25
+ background
26
+ });
27
+ const paths = liveValuePaths(manifest);
28
+ answer(paths.length > 0 ? {
29
+ reason: "live",
30
+ paths
31
+ } : {
32
+ reason: "discovered",
33
+ manifest,
34
+ runnables,
35
+ background
36
+ });
37
+ } catch (error) {
38
+ answer({
39
+ reason: "failed",
40
+ error: errorData(error)
41
+ });
42
+ }
43
+ }
44
+ main();
45
+ //#endregion
46
+ export {};
47
+
48
+ //# sourceMappingURL=discover-worker.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"discover-worker.mjs","names":[],"sources":["../../src/sandbox/discover-worker.ts"],"sourcesContent":["/**\n * Discovers a project's constructs in a sandbox and answers with the\n * manifest as data.\n *\n * Usage (by `discover` under a sandbox, never by hand):\n * node --import=<tsx> discover-worker.ts '{\"patterns\":[…],\"cwd\":\"…\"}'\n *\n * Discovery imports every construct module — the project's code — which is\n * why it runs here rather than in the deploy. Its warnings go to stderr, where\n * the host passes them on.\n */\n\nimport { discover } from '../reconcile/discover';\nimport {\n\tanswer,\n\terrorData,\n\tliveValuePaths,\n\tregisterAdjacentTsconfig,\n} from './workerRuntime';\n\nasync function main(): Promise<void> {\n\ttry {\n\t\tconst request = JSON.parse(process.argv[2] ?? '{}') as {\n\t\t\tpatterns: string[];\n\t\t\tcwd: string;\n\t\t};\n\t\tawait registerAdjacentTsconfig();\n\n\t\tconst runnables: Record<string, string[]> = {};\n\t\tconst background: Record<string, string[]> = {};\n\t\tconst manifest = await discover({\n\t\t\tpatterns: request.patterns,\n\t\t\tcwd: request.cwd,\n\t\t\trunnables,\n\t\t\tbackground,\n\t\t});\n\n\t\tconst paths = liveValuePaths(manifest);\n\t\tanswer(\n\t\t\tpaths.length > 0\n\t\t\t\t? { reason: 'live', paths }\n\t\t\t\t: { reason: 'discovered', manifest, runnables, background },\n\t\t);\n\t} catch (error) {\n\t\tanswer({ reason: 'failed', error: errorData(error) });\n\t}\n}\n\nvoid main();\n"],"mappings":";;;;;;;;;;;;;;AAoBA,eAAe,OAAsB;CACpC,IAAI;EACH,MAAM,UAAU,KAAK,MAAM,QAAQ,KAAK,MAAM,IAAI;EAIlD,MAAM,yBAAyB;EAE/B,MAAM,YAAsC,CAAC;EAC7C,MAAM,aAAuC,CAAC;EAC9C,MAAM,WAAW,MAAM,SAAS;GAC/B,UAAU,QAAQ;GAClB,KAAK,QAAQ;GACb;GACA;EACD,CAAC;EAED,MAAM,QAAQ,eAAe,QAAQ;EACrC,OACC,MAAM,SAAS,IACZ;GAAE,QAAQ;GAAQ;EAAM,IACxB;GAAE,QAAQ;GAAc;GAAU;GAAW;EAAW,CAC5D;CACD,SAAS,OAAO;EACf,OAAO;GAAE,QAAQ;GAAU,OAAO,UAAU,KAAK;EAAE,CAAC;CACrD;AACD;AAEK,KAAK"}
@@ -0,0 +1,75 @@
1
+ const require_discover = require("../discover-BfhVW_kT.cjs");
2
+ const require_sandbox = require("../sandbox-CHv3OYXg.cjs");
3
+ const require_workerRuntime = require("../workerRuntime-BXfhbe13.cjs");
4
+ const require_databases = require("../databases-DGALFDG3.cjs");
5
+ let node_path = require("node:path");
6
+ let node_fs_promises = require("node:fs/promises");
7
+ //#region src/sandbox/migrate-worker.ts
8
+ /**
9
+ * Applies a deployed stage's migrations, then runs its seeds, in a sandbox —
10
+ * what `gkm seed` runs, against URLs the deploy hands it as secret files.
11
+ *
12
+ * Usage (by the Dokploy target's release, never by hand):
13
+ * node --import=<tsx> migrate-worker.ts '{"root":"…","stage":"…","manifest":{…},"patterns":[…]}'
14
+ *
15
+ * Migrations and seeds are the project's own code, which is why they run
16
+ * here rather than in the deploy. Each owner URL arrives as a file in `GKM_SECRETS_DIR`,
17
+ * named by its key, and is read into this process's memory only: never into
18
+ * `process.env`, where a child the migration starts would inherit it.
19
+ */
20
+ /** Every secret file the sandbox mounted, by name. */
21
+ async function mountedSecrets() {
22
+ const dir = process.env[require_sandbox.SECRETS_DIR_ENV];
23
+ if (!dir) return {};
24
+ const secrets = {};
25
+ for (const name of await (0, node_fs_promises.readdir)(dir)) secrets[name] = (await (0, node_fs_promises.readFile)((0, node_path.join)(dir, name), "utf8")).trim();
26
+ return secrets;
27
+ }
28
+ async function main() {
29
+ try {
30
+ const request = JSON.parse(process.argv[2] ?? "{}");
31
+ await require_workerRuntime.registerAdjacentTsconfig();
32
+ const sources = {};
33
+ if (request.patterns.length > 0) await require_discover.discover({
34
+ patterns: request.patterns,
35
+ cwd: request.root,
36
+ sources
37
+ });
38
+ const options = {
39
+ root: request.root,
40
+ manifest: request.manifest,
41
+ sources,
42
+ env: await mountedSecrets()
43
+ };
44
+ const runs = await require_databases.migrateDatabases(options);
45
+ const seeds = await require_databases.seedDatabases({
46
+ ...options,
47
+ stage: request.stage
48
+ });
49
+ require_workerRuntime.answer({
50
+ reason: "migrated",
51
+ runs: runs.map(({ target, applied }) => ({
52
+ construct: target.id,
53
+ migrations: target.migrations,
54
+ applied
55
+ })),
56
+ seeds: seeds.map(({ target, seeded }) => ({
57
+ construct: target.id,
58
+ seeds: target.seeds,
59
+ seeded
60
+ }))
61
+ });
62
+ } catch (error) {
63
+ require_workerRuntime.answer({
64
+ reason: "failed",
65
+ error: {
66
+ ...require_workerRuntime.errorData(error),
67
+ ...error instanceof require_databases.SeedFailed ? { cause: require_workerRuntime.errorData(error.cause) } : {}
68
+ }
69
+ });
70
+ }
71
+ }
72
+ main();
73
+ //#endregion
74
+
75
+ //# sourceMappingURL=migrate-worker.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migrate-worker.cjs","names":["SECRETS_DIR_ENV","readdir","readFile","join","registerAdjacentTsconfig","discover","migrateDatabases","seedDatabases","errorData","SeedFailed"],"sources":["../../src/sandbox/migrate-worker.ts"],"sourcesContent":["/**\n * Applies a deployed stage's migrations, then runs its seeds, in a sandbox —\n * what `gkm seed` runs, against URLs the deploy hands it as secret files.\n *\n * Usage (by the Dokploy target's release, never by hand):\n * node --import=<tsx> migrate-worker.ts '{\"root\":\"…\",\"stage\":\"…\",\"manifest\":{…},\"patterns\":[…]}'\n *\n * Migrations and seeds are the project's own code, which is why they run\n * here rather than in the deploy. Each owner URL arrives as a file in `GKM_SECRETS_DIR`,\n * named by its key, and is read into this process's memory only: never into\n * `process.env`, where a child the migration starts would inherit it.\n */\n\nimport { readdir, readFile } from 'node:fs/promises';\nimport { join } from 'node:path';\nimport type { ConstructManifest } from '@geekmidas/manifest';\nimport {\n\tmigrateDatabases,\n\tSeedFailed,\n\tseedDatabases,\n} from '../migrate/databases';\nimport { type ConstructSource, discover } from '../reconcile/discover';\nimport { SECRETS_DIR_ENV } from './sandbox';\nimport { answer, errorData, registerAdjacentTsconfig } from './workerRuntime';\n\n/** Every secret file the sandbox mounted, by name. */\nasync function mountedSecrets(): Promise<Record<string, string>> {\n\tconst dir = process.env[SECRETS_DIR_ENV];\n\tif (!dir) return {};\n\n\tconst secrets: Record<string, string> = {};\n\tfor (const name of await readdir(dir)) {\n\t\tsecrets[name] = (await readFile(join(dir, name), 'utf8')).trim();\n\t}\n\treturn secrets;\n}\n\nasync function main(): Promise<void> {\n\ttry {\n\t\tconst request = JSON.parse(process.argv[2] ?? '{}') as {\n\t\t\troot: string;\n\t\t\tstage: string;\n\t\t\tmanifest: ConstructManifest;\n\t\t\tpatterns: string[];\n\t\t};\n\t\tawait registerAdjacentTsconfig();\n\n\t\t// Where each construct is declared, so a migration runs with the Kysely\n\t\t// its own file resolves. The manifest itself is the deploy's: what it\n\t\t// provisioned is what gets migrated, not a second reading of the files.\n\t\tconst sources: Record<string, ConstructSource> = {};\n\t\tif (request.patterns.length > 0) {\n\t\t\tawait discover({\n\t\t\t\tpatterns: request.patterns,\n\t\t\t\tcwd: request.root,\n\t\t\t\tsources,\n\t\t\t});\n\t\t}\n\n\t\tconst options = {\n\t\t\troot: request.root,\n\t\t\tmanifest: request.manifest,\n\t\t\tsources,\n\t\t\tenv: await mountedSecrets(),\n\t\t};\n\t\tconst runs = await migrateDatabases(options);\n\t\t// Every seed, every time, after the schema it was written for.\n\t\tconst seeds = await seedDatabases({ ...options, stage: request.stage });\n\n\t\tanswer({\n\t\t\treason: 'migrated',\n\t\t\truns: runs.map(({ target, applied }) => ({\n\t\t\t\tconstruct: target.id,\n\t\t\t\tmigrations: target.migrations,\n\t\t\t\tapplied,\n\t\t\t})),\n\t\t\tseeds: seeds.map(({ target, seeded }) => ({\n\t\t\t\tconstruct: target.id,\n\t\t\t\tseeds: target.seeds,\n\t\t\t\tseeded,\n\t\t\t})),\n\t\t});\n\t} catch (error) {\n\t\t// A seed's cause is the database's error — an Error, which `errorData`\n\t\t// leaves out — and it is what says what to fix.\n\t\tanswer({\n\t\t\treason: 'failed',\n\t\t\terror: {\n\t\t\t\t...errorData(error),\n\t\t\t\t...(error instanceof SeedFailed\n\t\t\t\t\t? { cause: errorData(error.cause) }\n\t\t\t\t\t: {}),\n\t\t\t},\n\t\t});\n\t}\n}\n\nvoid main();\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AA0BA,eAAe,iBAAkD;CAChE,MAAM,MAAM,QAAQ,IAAIA,gBAAAA;CACxB,IAAI,CAAC,KAAK,OAAO,CAAC;CAElB,MAAM,UAAkC,CAAC;CACzC,KAAK,MAAM,QAAQ,OAAA,GAAMC,iBAAAA,QAAAA,CAAQ,GAAG,GACnC,QAAQ,SAAS,OAAA,GAAMC,iBAAAA,SAAAA,EAAAA,GAASC,UAAAA,KAAAA,CAAK,KAAK,IAAI,GAAG,MAAM,EAAA,CAAG,KAAK;CAEhE,OAAO;AACR;AAEA,eAAe,OAAsB;CACpC,IAAI;EACH,MAAM,UAAU,KAAK,MAAM,QAAQ,KAAK,MAAM,IAAI;EAMlD,MAAMC,sBAAAA,yBAAyB;EAK/B,MAAM,UAA2C,CAAC;EAClD,IAAI,QAAQ,SAAS,SAAS,GAC7B,MAAMC,iBAAAA,SAAS;GACd,UAAU,QAAQ;GAClB,KAAK,QAAQ;GACb;EACD,CAAC;EAGF,MAAM,UAAU;GACf,MAAM,QAAQ;GACd,UAAU,QAAQ;GAClB;GACA,KAAK,MAAM,eAAe;EAC3B;EACA,MAAM,OAAO,MAAMC,kBAAAA,iBAAiB,OAAO;EAE3C,MAAM,QAAQ,MAAMC,kBAAAA,cAAc;GAAE,GAAG;GAAS,OAAO,QAAQ;EAAM,CAAC;EAEtE,sBAAA,OAAO;GACN,QAAQ;GACR,MAAM,KAAK,KAAK,EAAE,QAAQ,eAAe;IACxC,WAAW,OAAO;IAClB,YAAY,OAAO;IACnB;GACD,EAAE;GACF,OAAO,MAAM,KAAK,EAAE,QAAQ,cAAc;IACzC,WAAW,OAAO;IAClB,OAAO,OAAO;IACd;GACD,EAAE;EACH,CAAC;CACF,SAAS,OAAO;EAGf,sBAAA,OAAO;GACN,QAAQ;GACR,OAAO;IACN,GAAGC,sBAAAA,UAAU,KAAK;IAClB,GAAI,iBAAiBC,kBAAAA,aAClB,EAAE,OAAOD,sBAAAA,UAAU,MAAM,KAAK,EAAE,IAChC,CAAC;GACL;EACD,CAAC;CACF;AACD;AAEK,KAAK"}
@@ -0,0 +1 @@
1
+ export {}
@@ -0,0 +1 @@
1
+ export {}
@@ -0,0 +1,76 @@
1
+ import { r as discover } from "../discover-kziEht4W.mjs";
2
+ import { t as SECRETS_DIR_ENV } from "../sandbox-CbVB7uOD.mjs";
3
+ import { a as registerAdjacentTsconfig, n as answer, r as errorData } from "../workerRuntime-CsOyBRx2.mjs";
4
+ import { o as SeedFailed, p as seedDatabases, u as migrateDatabases } from "../databases-BeGP5eDh.mjs";
5
+ import { join } from "node:path";
6
+ import { readFile, readdir } from "node:fs/promises";
7
+ //#region src/sandbox/migrate-worker.ts
8
+ /**
9
+ * Applies a deployed stage's migrations, then runs its seeds, in a sandbox —
10
+ * what `gkm seed` runs, against URLs the deploy hands it as secret files.
11
+ *
12
+ * Usage (by the Dokploy target's release, never by hand):
13
+ * node --import=<tsx> migrate-worker.ts '{"root":"…","stage":"…","manifest":{…},"patterns":[…]}'
14
+ *
15
+ * Migrations and seeds are the project's own code, which is why they run
16
+ * here rather than in the deploy. Each owner URL arrives as a file in `GKM_SECRETS_DIR`,
17
+ * named by its key, and is read into this process's memory only: never into
18
+ * `process.env`, where a child the migration starts would inherit it.
19
+ */
20
+ /** Every secret file the sandbox mounted, by name. */
21
+ async function mountedSecrets() {
22
+ const dir = process.env[SECRETS_DIR_ENV];
23
+ if (!dir) return {};
24
+ const secrets = {};
25
+ for (const name of await readdir(dir)) secrets[name] = (await readFile(join(dir, name), "utf8")).trim();
26
+ return secrets;
27
+ }
28
+ async function main() {
29
+ try {
30
+ const request = JSON.parse(process.argv[2] ?? "{}");
31
+ await registerAdjacentTsconfig();
32
+ const sources = {};
33
+ if (request.patterns.length > 0) await discover({
34
+ patterns: request.patterns,
35
+ cwd: request.root,
36
+ sources
37
+ });
38
+ const options = {
39
+ root: request.root,
40
+ manifest: request.manifest,
41
+ sources,
42
+ env: await mountedSecrets()
43
+ };
44
+ const runs = await migrateDatabases(options);
45
+ const seeds = await seedDatabases({
46
+ ...options,
47
+ stage: request.stage
48
+ });
49
+ answer({
50
+ reason: "migrated",
51
+ runs: runs.map(({ target, applied }) => ({
52
+ construct: target.id,
53
+ migrations: target.migrations,
54
+ applied
55
+ })),
56
+ seeds: seeds.map(({ target, seeded }) => ({
57
+ construct: target.id,
58
+ seeds: target.seeds,
59
+ seeded
60
+ }))
61
+ });
62
+ } catch (error) {
63
+ answer({
64
+ reason: "failed",
65
+ error: {
66
+ ...errorData(error),
67
+ ...error instanceof SeedFailed ? { cause: errorData(error.cause) } : {}
68
+ }
69
+ });
70
+ }
71
+ }
72
+ main();
73
+ //#endregion
74
+ export {};
75
+
76
+ //# sourceMappingURL=migrate-worker.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migrate-worker.mjs","names":[],"sources":["../../src/sandbox/migrate-worker.ts"],"sourcesContent":["/**\n * Applies a deployed stage's migrations, then runs its seeds, in a sandbox —\n * what `gkm seed` runs, against URLs the deploy hands it as secret files.\n *\n * Usage (by the Dokploy target's release, never by hand):\n * node --import=<tsx> migrate-worker.ts '{\"root\":\"…\",\"stage\":\"…\",\"manifest\":{…},\"patterns\":[…]}'\n *\n * Migrations and seeds are the project's own code, which is why they run\n * here rather than in the deploy. Each owner URL arrives as a file in `GKM_SECRETS_DIR`,\n * named by its key, and is read into this process's memory only: never into\n * `process.env`, where a child the migration starts would inherit it.\n */\n\nimport { readdir, readFile } from 'node:fs/promises';\nimport { join } from 'node:path';\nimport type { ConstructManifest } from '@geekmidas/manifest';\nimport {\n\tmigrateDatabases,\n\tSeedFailed,\n\tseedDatabases,\n} from '../migrate/databases';\nimport { type ConstructSource, discover } from '../reconcile/discover';\nimport { SECRETS_DIR_ENV } from './sandbox';\nimport { answer, errorData, registerAdjacentTsconfig } from './workerRuntime';\n\n/** Every secret file the sandbox mounted, by name. */\nasync function mountedSecrets(): Promise<Record<string, string>> {\n\tconst dir = process.env[SECRETS_DIR_ENV];\n\tif (!dir) return {};\n\n\tconst secrets: Record<string, string> = {};\n\tfor (const name of await readdir(dir)) {\n\t\tsecrets[name] = (await readFile(join(dir, name), 'utf8')).trim();\n\t}\n\treturn secrets;\n}\n\nasync function main(): Promise<void> {\n\ttry {\n\t\tconst request = JSON.parse(process.argv[2] ?? '{}') as {\n\t\t\troot: string;\n\t\t\tstage: string;\n\t\t\tmanifest: ConstructManifest;\n\t\t\tpatterns: string[];\n\t\t};\n\t\tawait registerAdjacentTsconfig();\n\n\t\t// Where each construct is declared, so a migration runs with the Kysely\n\t\t// its own file resolves. The manifest itself is the deploy's: what it\n\t\t// provisioned is what gets migrated, not a second reading of the files.\n\t\tconst sources: Record<string, ConstructSource> = {};\n\t\tif (request.patterns.length > 0) {\n\t\t\tawait discover({\n\t\t\t\tpatterns: request.patterns,\n\t\t\t\tcwd: request.root,\n\t\t\t\tsources,\n\t\t\t});\n\t\t}\n\n\t\tconst options = {\n\t\t\troot: request.root,\n\t\t\tmanifest: request.manifest,\n\t\t\tsources,\n\t\t\tenv: await mountedSecrets(),\n\t\t};\n\t\tconst runs = await migrateDatabases(options);\n\t\t// Every seed, every time, after the schema it was written for.\n\t\tconst seeds = await seedDatabases({ ...options, stage: request.stage });\n\n\t\tanswer({\n\t\t\treason: 'migrated',\n\t\t\truns: runs.map(({ target, applied }) => ({\n\t\t\t\tconstruct: target.id,\n\t\t\t\tmigrations: target.migrations,\n\t\t\t\tapplied,\n\t\t\t})),\n\t\t\tseeds: seeds.map(({ target, seeded }) => ({\n\t\t\t\tconstruct: target.id,\n\t\t\t\tseeds: target.seeds,\n\t\t\t\tseeded,\n\t\t\t})),\n\t\t});\n\t} catch (error) {\n\t\t// A seed's cause is the database's error — an Error, which `errorData`\n\t\t// leaves out — and it is what says what to fix.\n\t\tanswer({\n\t\t\treason: 'failed',\n\t\t\terror: {\n\t\t\t\t...errorData(error),\n\t\t\t\t...(error instanceof SeedFailed\n\t\t\t\t\t? { cause: errorData(error.cause) }\n\t\t\t\t\t: {}),\n\t\t\t},\n\t\t});\n\t}\n}\n\nvoid main();\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AA0BA,eAAe,iBAAkD;CAChE,MAAM,MAAM,QAAQ,IAAI;CACxB,IAAI,CAAC,KAAK,OAAO,CAAC;CAElB,MAAM,UAAkC,CAAC;CACzC,KAAK,MAAM,QAAQ,MAAM,QAAQ,GAAG,GACnC,QAAQ,SAAS,MAAM,SAAS,KAAK,KAAK,IAAI,GAAG,MAAM,EAAA,CAAG,KAAK;CAEhE,OAAO;AACR;AAEA,eAAe,OAAsB;CACpC,IAAI;EACH,MAAM,UAAU,KAAK,MAAM,QAAQ,KAAK,MAAM,IAAI;EAMlD,MAAM,yBAAyB;EAK/B,MAAM,UAA2C,CAAC;EAClD,IAAI,QAAQ,SAAS,SAAS,GAC7B,MAAM,SAAS;GACd,UAAU,QAAQ;GAClB,KAAK,QAAQ;GACb;EACD,CAAC;EAGF,MAAM,UAAU;GACf,MAAM,QAAQ;GACd,UAAU,QAAQ;GAClB;GACA,KAAK,MAAM,eAAe;EAC3B;EACA,MAAM,OAAO,MAAM,iBAAiB,OAAO;EAE3C,MAAM,QAAQ,MAAM,cAAc;GAAE,GAAG;GAAS,OAAO,QAAQ;EAAM,CAAC;EAEtE,OAAO;GACN,QAAQ;GACR,MAAM,KAAK,KAAK,EAAE,QAAQ,eAAe;IACxC,WAAW,OAAO;IAClB,YAAY,OAAO;IACnB;GACD,EAAE;GACF,OAAO,MAAM,KAAK,EAAE,QAAQ,cAAc;IACzC,WAAW,OAAO;IAClB,OAAO,OAAO;IACd;GACD,EAAE;EACH,CAAC;CACF,SAAS,OAAO;EAGf,OAAO;GACN,QAAQ;GACR,OAAO;IACN,GAAG,UAAU,KAAK;IAClB,GAAI,iBAAiB,aAClB,EAAE,OAAO,UAAU,MAAM,KAAK,EAAE,IAChC,CAAC;GACL;EACD,CAAC;CACF;AACD;AAEK,KAAK"}
@@ -0,0 +1,104 @@
1
+ import { jt as GkmError } from "./types-HqVPddRK.mjs";
2
+ //#region src/sandbox/sandbox.d.ts
3
+ /** Where a command's output goes. */
4
+ type SandboxOutput = 'capture' | 'inherit' | 'stderr' | 'ignore';
5
+ interface SandboxExecOptions {
6
+ /**
7
+ * Where the command runs: the project root or a directory below it, as an
8
+ * absolute path or relative to the root. Anywhere else is refused with
9
+ * {@link SandboxCwdEscape}.
10
+ */
11
+ cwd: string;
12
+ /**
13
+ * The command's whole environment. Nothing of the host's is added to it:
14
+ * start from {@link Sandbox.env} and add what the step needs.
15
+ */
16
+ env: Readonly<Record<string, string>>;
17
+ /**
18
+ * How long the command may run before it is killed. Required: a step that
19
+ * waits forever — a sniffed entry that opens a server, a build stuck on a
20
+ * prompt — would otherwise hold the deploy, and its lock, forever.
21
+ */
22
+ timeoutMs: number;
23
+ /**
24
+ * Files the command can read, by name. Mounted in a directory of their own
25
+ * — named by `GKM_SECRETS_DIR` in the command's environment — and removed
26
+ * when it exits. Never set as variables, which every child inherits, a
27
+ * crash report prints and `/proc/<pid>/environ` shows.
28
+ */
29
+ secrets?: Readonly<Record<string, string>>;
30
+ /**
31
+ * `capture` (the default) returns stdout and stderr in the result;
32
+ * `inherit` gives the command the host's terminal; `stderr` sends both
33
+ * streams to the host's stderr; `ignore` discards them.
34
+ */
35
+ output?: SandboxOutput;
36
+ /** Kills the command when aborted; `exec` rejects with the signal's reason. */
37
+ signal?: AbortSignal;
38
+ }
39
+ /** How a command ended. A non-zero exit is a result, not an error. */
40
+ interface SandboxResult {
41
+ exitCode: number | null;
42
+ signal: string | null;
43
+ /** What it wrote to stdout, when its output was captured. */
44
+ stdout: string;
45
+ /** What it wrote to stderr, when its output was captured. */
46
+ stderr: string;
47
+ }
48
+ /**
49
+ * Runs a command against the project, and nothing else of the host's.
50
+ *
51
+ * `exec` resolves with the result however the command exited. It rejects
52
+ * with {@link CommandTimedOut} once the timeout passes — after the command is
53
+ * gone — with {@link SandboxCwdEscape} for a directory outside the project,
54
+ * with the signal's reason when aborted, and with the spawn error when the
55
+ * program cannot be started.
56
+ */
57
+ interface Sandbox {
58
+ /** The project: the directory every command runs at or below. */
59
+ readonly root: string;
60
+ /**
61
+ * Whether the code it runs is kept from the host: its files, its
62
+ * processes, its memory.
63
+ *
64
+ * An isolating sandbox shares nothing but what crosses `exec`, so a config
65
+ * reaches the deploy as data — a live object in it (a custom state store,
66
+ * an inline target) cannot cross, and is refused with
67
+ * `ConfigObjectNotSerializable`. A non-isolating one, like
68
+ * {@link LocalSandbox}, runs on the host as the host's user; a project
69
+ * whose config holds live objects is then loaded in-process as before,
70
+ * because a project trusted to run there is trusted to do that.
71
+ */
72
+ readonly isolating: boolean;
73
+ /**
74
+ * The environment a command starts from: what any program needs to run
75
+ * here — `PATH`, `HOME`, the locale — and no credential.
76
+ */
77
+ readonly env: Readonly<Record<string, string>>;
78
+ exec(command: string, args: readonly string[], options: SandboxExecOptions): Promise<SandboxResult>;
79
+ }
80
+ /** The variable naming the directory a command's secrets are mounted in. */
81
+ declare const SECRETS_DIR_ENV = "GKM_SECRETS_DIR";
82
+ /** A command was asked to run outside the project. */
83
+ declare class SandboxCwdEscape extends GkmError {
84
+ readonly cwd: string;
85
+ readonly root: string;
86
+ constructor(cwd: string, root: string);
87
+ }
88
+ /**
89
+ * `cwd` as an absolute directory inside `root`, or {@link SandboxCwdEscape}.
90
+ *
91
+ * Symlinks are resolved on both sides first, so a link inside the project
92
+ * that points out of it is an escape, and a project reached through a link
93
+ * (`/tmp` on macOS) is still itself. For a sandbox of a host's own to call
94
+ * before it runs anything.
95
+ */
96
+ declare function confineCwd(root: string, cwd: string): string;
97
+ /** A secret's file name: one path segment, so it cannot be written elsewhere. */
98
+ declare class SecretNameInvalid extends GkmError {
99
+ readonly secretName: string;
100
+ constructor(secretName: string);
101
+ }
102
+ //#endregion
103
+ export { SandboxOutput as a, confineCwd as c, SandboxExecOptions as i, Sandbox as n, SandboxResult as o, SandboxCwdEscape as r, SecretNameInvalid as s, SECRETS_DIR_ENV as t };
104
+ //# sourceMappingURL=sandbox-C4g1eG31.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sandbox-C4g1eG31.d.mts","names":[],"sources":["../src/sandbox/sandbox.ts"],"mappings":";;;KA8BY;UAEK;;;;;;EAMhB;;;;;EAKA,KAAK,SAAS;;;;;;EAMd;;;;;;;EAOA,UAAU,SAAS;;;;;;EAMnB,SAAS;;EAET,SAAS;;;UAIO;EAChB;EACA;;EAEA;;EAEA;;;;;;;;;;;UAYgB;;WAEP;;;;;;;;;;;;;WAaA;;;;;WAKA,KAAK,SAAS;EACvB,KACC,iBACA,yBACA,SAAS,qBACP,QAAQ;;;cAIC;;cAGA,yBAAyB;WAE3B;WACA;EAFV,YACU,aACA;;;;;;;;;;iBAwBK,WAAW,cAAc;;cAU5B,0BAA0B;WACjB;EAArB,YAAqB"}