@geekmidas/cli 10.0.0-alpha.9 → 10.0.0-alpha.91

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 (457) 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-CVc6Oi1Y.mjs +1021 -0
  7. package/dist/EndpointGenerator-CVc6Oi1Y.mjs.map +1 -0
  8. package/dist/EndpointGenerator-CwLjBCFE.cjs +1080 -0
  9. package/dist/EndpointGenerator-CwLjBCFE.cjs.map +1 -0
  10. package/dist/GoDaddyProvider-DSStJVAv.mjs +387 -0
  11. package/dist/GoDaddyProvider-DSStJVAv.mjs.map +1 -0
  12. package/dist/GoDaddyProvider-DqZ1qD_F.cjs +387 -0
  13. package/dist/GoDaddyProvider-DqZ1qD_F.cjs.map +1 -0
  14. package/dist/{HostingerProvider-Cft7lEYr.mjs → HostingerProvider-BI6J7oJr.mjs} +22 -23
  15. package/dist/HostingerProvider-BI6J7oJr.mjs.map +1 -0
  16. package/dist/{HostingerProvider-h3EbEp-Z.cjs → HostingerProvider-CyTpG_jy.cjs} +22 -23
  17. package/dist/HostingerProvider-CyTpG_jy.cjs.map +1 -0
  18. package/dist/LegacyStateStore-DXmNA7hy.cjs +89 -0
  19. package/dist/LegacyStateStore-DXmNA7hy.cjs.map +1 -0
  20. package/dist/LegacyStateStore-ZkdmiUFZ.mjs +89 -0
  21. package/dist/LegacyStateStore-ZkdmiUFZ.mjs.map +1 -0
  22. package/dist/LocalStateStore-BBeTlRTH.cjs +178 -0
  23. package/dist/LocalStateStore-BBeTlRTH.cjs.map +1 -0
  24. package/dist/LocalStateStore-CU-O0SBp.mjs +167 -0
  25. package/dist/LocalStateStore-CU-O0SBp.mjs.map +1 -0
  26. package/dist/OpenApiTsGenerator-B--HV-sW.cjs +541 -0
  27. package/dist/OpenApiTsGenerator-B--HV-sW.cjs.map +1 -0
  28. package/dist/OpenApiTsGenerator-CkvsPdgg.mjs +536 -0
  29. package/dist/OpenApiTsGenerator-CkvsPdgg.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-Br8VMY22.cjs +160 -0
  35. package/dist/S3StateStore-Br8VMY22.cjs.map +1 -0
  36. package/dist/S3StateStore-bwxcI_wQ.mjs +161 -0
  37. package/dist/S3StateStore-bwxcI_wQ.mjs.map +1 -0
  38. package/dist/SSMStateStore-CsOS0W1y.mjs +154 -0
  39. package/dist/SSMStateStore-CsOS0W1y.mjs.map +1 -0
  40. package/dist/SSMStateStore-DoZE1Wi1.cjs +153 -0
  41. package/dist/SSMStateStore-DoZE1Wi1.cjs.map +1 -0
  42. package/dist/SubscriberGenerator-BPqQf8fB.mjs +448 -0
  43. package/dist/SubscriberGenerator-BPqQf8fB.mjs.map +1 -0
  44. package/dist/SubscriberGenerator-BVn7cQ-2.cjs +489 -0
  45. package/dist/SubscriberGenerator-BVn7cQ-2.cjs.map +1 -0
  46. package/dist/add-BSHk5Ngn.mjs +747 -0
  47. package/dist/add-BSHk5Ngn.mjs.map +1 -0
  48. package/dist/add-DmmBDV2e.cjs +749 -0
  49. package/dist/add-DmmBDV2e.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-B-6uEhgP.mjs +71 -0
  55. package/dist/aws-B-6uEhgP.mjs.map +1 -0
  56. package/dist/aws-BTawF0F-.cjs +82 -0
  57. package/dist/aws-BTawF0F-.cjs.map +1 -0
  58. package/dist/awsStore-7VmS_cZR.cjs +54 -0
  59. package/dist/awsStore-7VmS_cZR.cjs.map +1 -0
  60. package/dist/awsStore-B529csle.mjs +43 -0
  61. package/dist/awsStore-B529csle.mjs.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/{bundler-BY1OmV1e.cjs → bundler-BQJiB7Ub.cjs} +38 -35
  67. package/dist/bundler-BQJiB7Ub.cjs.map +1 -0
  68. package/dist/{bundler-Be8Zg4Wd.mjs → bundler-D6eBfVkl.mjs} +36 -32
  69. package/dist/bundler-D6eBfVkl.mjs.map +1 -0
  70. package/dist/cli-BE9mqeX8.cjs +69 -0
  71. package/dist/cli-BE9mqeX8.cjs.map +1 -0
  72. package/dist/cli-DD-Yk-I5.mjs +69 -0
  73. package/dist/cli-DD-Yk-I5.mjs.map +1 -0
  74. package/dist/compose-Bhmf0n4o.mjs +3140 -0
  75. package/dist/compose-Bhmf0n4o.mjs.map +1 -0
  76. package/dist/compose-CvpU6ooi.cjs +3265 -0
  77. package/dist/compose-CvpU6ooi.cjs.map +1 -0
  78. package/dist/config-CdEcTrjG.d.mts +269 -0
  79. package/dist/config-CdEcTrjG.d.mts.map +1 -0
  80. package/dist/config-pST7E0CS.d.cts +269 -0
  81. package/dist/config-pST7E0CS.d.cts.map +1 -0
  82. package/dist/config.cjs +420 -11
  83. package/dist/config.cjs.map +1 -0
  84. package/dist/config.d.cts +4 -120
  85. package/dist/config.d.mts +4 -120
  86. package/dist/config.mjs +404 -4
  87. package/dist/config.mjs.map +1 -0
  88. package/dist/credentialSchemas-BJqRJNK4.mjs +236 -0
  89. package/dist/credentialSchemas-BJqRJNK4.mjs.map +1 -0
  90. package/dist/credentialSchemas-DCR4Wd1W.cjs +271 -0
  91. package/dist/credentialSchemas-DCR4Wd1W.cjs.map +1 -0
  92. package/dist/credentials-BKfIugu2.cjs +513 -0
  93. package/dist/credentials-BKfIugu2.cjs.map +1 -0
  94. package/dist/credentials-CnVqoXMb.mjs +388 -0
  95. package/dist/credentials-CnVqoXMb.mjs.map +1 -0
  96. package/dist/databases-BY-pEImp.cjs +597 -0
  97. package/dist/databases-BY-pEImp.cjs.map +1 -0
  98. package/dist/databases-CzszQV0N.mjs +494 -0
  99. package/dist/databases-CzszQV0N.mjs.map +1 -0
  100. package/dist/define-DR8xGYfL.mjs +97 -0
  101. package/dist/define-DR8xGYfL.mjs.map +1 -0
  102. package/dist/define-DzRz8FgH.cjs +144 -0
  103. package/dist/define-DzRz8FgH.cjs.map +1 -0
  104. package/dist/deploy/public.cjs +208 -0
  105. package/dist/deploy/public.cjs.map +1 -0
  106. package/dist/deploy/public.d.cts +649 -0
  107. package/dist/deploy/public.d.cts.map +1 -0
  108. package/dist/deploy/public.d.mts +649 -0
  109. package/dist/deploy/public.d.mts.map +1 -0
  110. package/dist/deploy/public.mjs +142 -0
  111. package/dist/deploy/public.mjs.map +1 -0
  112. package/dist/deploy/sniffer-envkit-patch.cjs +18 -10
  113. package/dist/deploy/sniffer-envkit-patch.cjs.map +1 -1
  114. package/dist/deploy/sniffer-envkit-patch.d.cts +0 -2
  115. package/dist/deploy/sniffer-envkit-patch.d.cts.map +1 -1
  116. package/dist/deploy/sniffer-envkit-patch.d.mts +0 -2
  117. package/dist/deploy/sniffer-envkit-patch.d.mts.map +1 -1
  118. package/dist/deploy/sniffer-envkit-patch.mjs +10 -2
  119. package/dist/deploy/sniffer-envkit-patch.mjs.map +1 -1
  120. package/dist/deploy/sniffer-envparser-worker.cjs +54 -0
  121. package/dist/deploy/sniffer-envparser-worker.cjs.map +1 -0
  122. package/dist/deploy/sniffer-envparser-worker.d.cts +1 -0
  123. package/dist/deploy/sniffer-envparser-worker.d.mts +1 -0
  124. package/dist/deploy/sniffer-envparser-worker.mjs +55 -0
  125. package/dist/deploy/sniffer-envparser-worker.mjs.map +1 -0
  126. package/dist/deploy/sniffer-hooks.cjs +13 -7
  127. package/dist/deploy/sniffer-hooks.cjs.map +1 -1
  128. package/dist/deploy/sniffer-hooks.d.cts +1 -2
  129. package/dist/deploy/sniffer-hooks.d.cts.map +1 -1
  130. package/dist/deploy/sniffer-hooks.d.mts +1 -2
  131. package/dist/deploy/sniffer-hooks.d.mts.map +1 -1
  132. package/dist/deploy/sniffer-hooks.mjs +10 -3
  133. package/dist/deploy/sniffer-hooks.mjs.map +1 -1
  134. package/dist/deploy/sniffer-loader.cjs +16 -7
  135. package/dist/deploy/sniffer-loader.cjs.map +1 -1
  136. package/dist/deploy/sniffer-loader.d.cts +1 -1
  137. package/dist/deploy/sniffer-loader.d.mts +1 -1
  138. package/dist/deploy/sniffer-loader.mjs +14 -3
  139. package/dist/deploy/sniffer-loader.mjs.map +1 -1
  140. package/dist/deploy/sniffer-routes-worker.cjs +11 -11
  141. package/dist/deploy/sniffer-routes-worker.cjs.map +1 -1
  142. package/dist/deploy/sniffer-routes-worker.d.cts +1 -1
  143. package/dist/deploy/sniffer-routes-worker.d.mts +1 -1
  144. package/dist/deploy/sniffer-routes-worker.mjs +4 -4
  145. package/dist/deploy/sniffer-routes-worker.mjs.map +1 -1
  146. package/dist/deploy/sniffer-worker.cjs +15 -6
  147. package/dist/deploy/sniffer-worker.cjs.map +1 -1
  148. package/dist/deploy/sniffer-worker.d.cts +1 -3
  149. package/dist/deploy/sniffer-worker.d.cts.map +1 -1
  150. package/dist/deploy/sniffer-worker.d.mts +1 -3
  151. package/dist/deploy/sniffer-worker.d.mts.map +1 -1
  152. package/dist/deploy/sniffer-worker.mjs +15 -4
  153. package/dist/deploy/sniffer-worker.mjs.map +1 -1
  154. package/dist/deploy-CuHasEA4.cjs +554 -0
  155. package/dist/deploy-CuHasEA4.cjs.map +1 -0
  156. package/dist/deploy-QNtx_eWR.mjs +525 -0
  157. package/dist/deploy-QNtx_eWR.mjs.map +1 -0
  158. package/dist/derive-B4vDpzgP.mjs +150 -0
  159. package/dist/derive-B4vDpzgP.mjs.map +1 -0
  160. package/dist/derive-DAbo49sm.cjs +161 -0
  161. package/dist/derive-DAbo49sm.cjs.map +1 -0
  162. package/dist/discover-BPelzeGW.mjs +526 -0
  163. package/dist/discover-BPelzeGW.mjs.map +1 -0
  164. package/dist/discover-CU0paUyH.d.cts +108 -0
  165. package/dist/discover-CU0paUyH.d.cts.map +1 -0
  166. package/dist/discover-D1It5r_h.cjs +599 -0
  167. package/dist/discover-D1It5r_h.cjs.map +1 -0
  168. package/dist/discover-DFiJxwfv.d.mts +108 -0
  169. package/dist/discover-DFiJxwfv.d.mts.map +1 -0
  170. package/dist/dokploy-CYcMLh9-.mjs +38 -0
  171. package/dist/dokploy-CYcMLh9-.mjs.map +1 -0
  172. package/dist/dokploy-DIowwyIB.cjs +38 -0
  173. package/dist/dokploy-DIowwyIB.cjs.map +1 -0
  174. package/dist/drivers-DTZzxeIl.mjs +177 -0
  175. package/dist/drivers-DTZzxeIl.mjs.map +1 -0
  176. package/dist/drivers-LYSdQDmd.cjs +200 -0
  177. package/dist/drivers-LYSdQDmd.cjs.map +1 -0
  178. package/dist/{emit-CiZS_5Ub.mjs → emit-C1e8qD08.mjs} +13 -26
  179. package/dist/emit-C1e8qD08.mjs.map +1 -0
  180. package/dist/{emit-CbcRolsa.cjs → emit-Dmc1nvdS.cjs} +31 -57
  181. package/dist/emit-Dmc1nvdS.cjs.map +1 -0
  182. package/dist/encryption-BrEef7Jk.mjs +88 -0
  183. package/dist/encryption-BrEef7Jk.mjs.map +1 -0
  184. package/dist/encryption-CjYdUb2s.cjs +89 -0
  185. package/dist/encryption-CjYdUb2s.cjs.map +1 -0
  186. package/dist/engine-2h4k5ICq.mjs +3085 -0
  187. package/dist/engine-2h4k5ICq.mjs.map +1 -0
  188. package/dist/engine-BhJ7ZP9K.cjs +3198 -0
  189. package/dist/engine-BhJ7ZP9K.cjs.map +1 -0
  190. package/dist/github-B5Bw4HIu.cjs +669 -0
  191. package/dist/github-B5Bw4HIu.cjs.map +1 -0
  192. package/dist/github-BCDF6xVH.mjs +669 -0
  193. package/dist/github-BCDF6xVH.mjs.map +1 -0
  194. package/dist/{index-C6e-ULLx.d.mts → index-D-F_hTDz.d.cts} +39 -24
  195. package/dist/index-D-F_hTDz.d.cts.map +1 -0
  196. package/dist/{index-CR5urhWX.d.cts → index-YFNxR5Ns.d.mts} +39 -24
  197. package/dist/index-YFNxR5Ns.d.mts.map +1 -0
  198. package/dist/index.cjs +9487 -12080
  199. package/dist/index.cjs.map +1 -1
  200. package/dist/index.d.cts +1 -1
  201. package/dist/index.d.mts +1 -1
  202. package/dist/index.mjs +9420 -12026
  203. package/dist/index.mjs.map +1 -1
  204. package/dist/local-BjxDfPvy.cjs +241 -0
  205. package/dist/local-BjxDfPvy.cjs.map +1 -0
  206. package/dist/local-IuoIF3CT.mjs +224 -0
  207. package/dist/local-IuoIF3CT.mjs.map +1 -0
  208. package/dist/migrate-CGaancHY.cjs +93 -0
  209. package/dist/migrate-CGaancHY.cjs.map +1 -0
  210. package/dist/migrate-DWZz9kah.mjs +93 -0
  211. package/dist/migrate-DWZz9kah.mjs.map +1 -0
  212. package/dist/migrate-DbtcuOr_.mjs +265 -0
  213. package/dist/migrate-DbtcuOr_.mjs.map +1 -0
  214. package/dist/migrate-q2YYLJLE.cjs +270 -0
  215. package/dist/migrate-q2YYLJLE.cjs.map +1 -0
  216. package/dist/openapi.cjs +214 -10
  217. package/dist/openapi.cjs.map +1 -0
  218. package/dist/openapi.d.cts +47 -17
  219. package/dist/openapi.d.cts.map +1 -1
  220. package/dist/openapi.d.mts +47 -17
  221. package/dist/openapi.d.mts.map +1 -1
  222. package/dist/openapi.mjs +208 -5
  223. package/dist/openapi.mjs.map +1 -0
  224. package/dist/provider-C9_-45d5.cjs +56 -0
  225. package/dist/provider-C9_-45d5.cjs.map +1 -0
  226. package/dist/provider-q4lsYzYG.mjs +45 -0
  227. package/dist/provider-q4lsYzYG.mjs.map +1 -0
  228. package/dist/ready-BpNbORRB.cjs +402 -0
  229. package/dist/ready-BpNbORRB.cjs.map +1 -0
  230. package/dist/ready-b6vm0-W-.mjs +373 -0
  231. package/dist/ready-b6vm0-W-.mjs.map +1 -0
  232. package/dist/reconcile/public.cjs +3 -5
  233. package/dist/reconcile/public.d.cts +11 -87
  234. package/dist/reconcile/public.d.cts.map +1 -1
  235. package/dist/reconcile/public.d.mts +11 -87
  236. package/dist/reconcile/public.d.mts.map +1 -1
  237. package/dist/reconcile/public.mjs +3 -4
  238. package/dist/{reconcile-D0pimNiy.cjs → reconcile-CuCQBa5-.cjs} +5 -8
  239. package/dist/reconcile-CuCQBa5-.cjs.map +1 -0
  240. package/dist/{reconcile-CFs8C_1a.mjs → reconcile-Dh1Jk7WE.mjs} +4 -7
  241. package/dist/reconcile-Dh1Jk7WE.mjs.map +1 -0
  242. package/dist/resolve-Cns0v6dN.cjs +315 -0
  243. package/dist/resolve-Cns0v6dN.cjs.map +1 -0
  244. package/dist/resolve-DNg0icnh.mjs +262 -0
  245. package/dist/resolve-DNg0icnh.mjs.map +1 -0
  246. package/dist/rollback-CFrNLmxs.mjs +132 -0
  247. package/dist/rollback-CFrNLmxs.mjs.map +1 -0
  248. package/dist/rollback-UIjS25F1.cjs +161 -0
  249. package/dist/rollback-UIjS25F1.cjs.map +1 -0
  250. package/dist/rolldown-runtime-BhDjJH2R.mjs +15 -0
  251. package/dist/{chunk-CUT6urMc.cjs → rolldown-runtime-C0BPl7ul.cjs} +23 -10
  252. package/dist/runtime-CN_kmqxo.d.cts +90 -0
  253. package/dist/runtime-CN_kmqxo.d.cts.map +1 -0
  254. package/dist/runtime-Cjvon3oj.d.mts +90 -0
  255. package/dist/runtime-Cjvon3oj.d.mts.map +1 -0
  256. package/dist/sandbox/config-worker.cjs +43 -0
  257. package/dist/sandbox/config-worker.cjs.map +1 -0
  258. package/dist/sandbox/config-worker.d.cts +1 -0
  259. package/dist/sandbox/config-worker.d.mts +1 -0
  260. package/dist/sandbox/config-worker.mjs +44 -0
  261. package/dist/sandbox/config-worker.mjs.map +1 -0
  262. package/dist/sandbox/credentials-worker.cjs +54 -0
  263. package/dist/sandbox/credentials-worker.cjs.map +1 -0
  264. package/dist/sandbox/credentials-worker.d.cts +1 -0
  265. package/dist/sandbox/credentials-worker.d.mts +1 -0
  266. package/dist/sandbox/credentials-worker.mjs +55 -0
  267. package/dist/sandbox/credentials-worker.mjs.map +1 -0
  268. package/dist/sandbox/discover-worker.cjs +47 -0
  269. package/dist/sandbox/discover-worker.cjs.map +1 -0
  270. package/dist/sandbox/discover-worker.d.cts +1 -0
  271. package/dist/sandbox/discover-worker.d.mts +1 -0
  272. package/dist/sandbox/discover-worker.mjs +48 -0
  273. package/dist/sandbox/discover-worker.mjs.map +1 -0
  274. package/dist/sandbox/migrate-worker.cjs +75 -0
  275. package/dist/sandbox/migrate-worker.cjs.map +1 -0
  276. package/dist/sandbox/migrate-worker.d.cts +1 -0
  277. package/dist/sandbox/migrate-worker.d.mts +1 -0
  278. package/dist/sandbox/migrate-worker.mjs +76 -0
  279. package/dist/sandbox/migrate-worker.mjs.map +1 -0
  280. package/dist/sandbox-CL--ZDui.cjs +164 -0
  281. package/dist/sandbox-CL--ZDui.cjs.map +1 -0
  282. package/dist/sandbox-Dm247NGx.mjs +117 -0
  283. package/dist/sandbox-Dm247NGx.mjs.map +1 -0
  284. package/dist/sandbox-M8UnLhXE.d.cts +126 -0
  285. package/dist/sandbox-M8UnLhXE.d.cts.map +1 -0
  286. package/dist/sandbox-M8UnLhXE.d.mts +126 -0
  287. package/dist/sandbox-M8UnLhXE.d.mts.map +1 -0
  288. package/dist/{workspace-zoqRbihZ.mjs → schemas-BObwxB_t.cjs} +998 -1659
  289. package/dist/schemas-BObwxB_t.cjs.map +1 -0
  290. package/dist/{workspace-C6VJQVtG.cjs → schemas-D-xeKJDD.mjs} +913 -1842
  291. package/dist/schemas-D-xeKJDD.mjs.map +1 -0
  292. package/dist/secretsManager-Chs9VV2r.mjs +76 -0
  293. package/dist/secretsManager-Chs9VV2r.mjs.map +1 -0
  294. package/dist/secretsManager-DcMlHnRC.cjs +87 -0
  295. package/dist/secretsManager-DcMlHnRC.cjs.map +1 -0
  296. package/dist/seeds-CkIPFGNO.cjs +10560 -0
  297. package/dist/seeds-CkIPFGNO.cjs.map +1 -0
  298. package/dist/seeds-odfgSCmu.mjs +9538 -0
  299. package/dist/seeds-odfgSCmu.mjs.map +1 -0
  300. package/dist/sniffer-BTtX3NUM.mjs +1262 -0
  301. package/dist/sniffer-BTtX3NUM.mjs.map +1 -0
  302. package/dist/sniffer-IAQEpsQb.cjs +1333 -0
  303. package/dist/sniffer-IAQEpsQb.cjs.map +1 -0
  304. package/dist/sst-BgcOsaBi.cjs +453 -0
  305. package/dist/sst-BgcOsaBi.cjs.map +1 -0
  306. package/dist/sst-CJzvyrEz.mjs +430 -0
  307. package/dist/sst-CJzvyrEz.mjs.map +1 -0
  308. package/dist/stages-CUn6gvXL.cjs +174 -0
  309. package/dist/stages-CUn6gvXL.cjs.map +1 -0
  310. package/dist/stages-CnZRYmkI.mjs +174 -0
  311. package/dist/stages-CnZRYmkI.mjs.map +1 -0
  312. package/dist/target/public.cjs +15 -0
  313. package/dist/target/public.d.cts +28 -0
  314. package/dist/target/public.d.cts.map +1 -0
  315. package/dist/target/public.d.mts +28 -0
  316. package/dist/target/public.d.mts.map +1 -0
  317. package/dist/target/public.mjs +4 -0
  318. package/dist/terminal-D8TPK7o9.mjs +84 -0
  319. package/dist/terminal-D8TPK7o9.mjs.map +1 -0
  320. package/dist/terminal-DuapRxh6.cjs +84 -0
  321. package/dist/terminal-DuapRxh6.cjs.map +1 -0
  322. package/dist/types-NqX1Hz4P.d.cts +7454 -0
  323. package/dist/types-NqX1Hz4P.d.cts.map +1 -0
  324. package/dist/types-ZHuZ89hv.d.mts +7453 -0
  325. package/dist/types-ZHuZ89hv.d.mts.map +1 -0
  326. package/dist/utils-D2Nk1Nv2.cjs +205 -0
  327. package/dist/utils-D2Nk1Nv2.cjs.map +1 -0
  328. package/dist/utils-D_fxUqvU.mjs +156 -0
  329. package/dist/utils-D_fxUqvU.mjs.map +1 -0
  330. package/dist/vitest.cjs +65 -0
  331. package/dist/vitest.cjs.map +1 -0
  332. package/dist/vitest.d.cts +29 -0
  333. package/dist/vitest.d.cts.map +1 -0
  334. package/dist/vitest.d.mts +29 -0
  335. package/dist/vitest.d.mts.map +1 -0
  336. package/dist/vitest.mjs +65 -0
  337. package/dist/vitest.mjs.map +1 -0
  338. package/dist/workerRuntime-BXfhbe13.cjs +108 -0
  339. package/dist/workerRuntime-BXfhbe13.cjs.map +1 -0
  340. package/dist/workerRuntime-CsOyBRx2.mjs +79 -0
  341. package/dist/workerRuntime-CsOyBRx2.mjs.map +1 -0
  342. package/dist/workspace/index.cjs +8 -4
  343. package/dist/workspace/index.d.cts +3 -3
  344. package/dist/workspace/index.d.mts +3 -3
  345. package/dist/workspace/index.mjs +2 -3
  346. package/dist/workspace-CJ0lKFq-.mjs +1979 -0
  347. package/dist/workspace-CJ0lKFq-.mjs.map +1 -0
  348. package/dist/workspace-CwW3Gkru.cjs +2355 -0
  349. package/dist/workspace-CwW3Gkru.cjs.map +1 -0
  350. package/package.json +53 -22
  351. package/dist/CachedStateProvider-BLo7zv7S.cjs +0 -3
  352. package/dist/CachedStateProvider-BxoAm-B2.mjs +0 -3
  353. package/dist/CachedStateProvider-CqPdW7CB.cjs +0 -60
  354. package/dist/CachedStateProvider-CqPdW7CB.cjs.map +0 -1
  355. package/dist/CachedStateProvider-DTniehMP.mjs +0 -54
  356. package/dist/CachedStateProvider-DTniehMP.mjs.map +0 -1
  357. package/dist/HostingerProvider-Cft7lEYr.mjs.map +0 -1
  358. package/dist/HostingerProvider-h3EbEp-Z.cjs.map +0 -1
  359. package/dist/LocalStateProvider-Bn6tS-oL.mjs +0 -42
  360. package/dist/LocalStateProvider-Bn6tS-oL.mjs.map +0 -1
  361. package/dist/LocalStateProvider-Db9SEjyH.cjs +0 -43
  362. package/dist/LocalStateProvider-Db9SEjyH.cjs.map +0 -1
  363. package/dist/Route53Provider-RdpUDJQk.mjs.map +0 -1
  364. package/dist/Route53Provider-di2fMM5N.cjs.map +0 -1
  365. package/dist/SSMStateProvider-BRt2py-A.mjs +0 -66
  366. package/dist/SSMStateProvider-BRt2py-A.mjs.map +0 -1
  367. package/dist/SSMStateProvider-DyX8s9HI.cjs +0 -66
  368. package/dist/SSMStateProvider-DyX8s9HI.cjs.map +0 -1
  369. package/dist/backup-provisioner-Bgj5Vi_L.mjs.map +0 -1
  370. package/dist/backup-provisioner-BrsHwYG0.cjs.map +0 -1
  371. package/dist/bundler-BY1OmV1e.cjs.map +0 -1
  372. package/dist/bundler-Be8Zg4Wd.mjs.map +0 -1
  373. package/dist/chunk-Duj1WY3L.mjs +0 -7
  374. package/dist/config-BZ1F0WuA.cjs +0 -462
  375. package/dist/config-BZ1F0WuA.cjs.map +0 -1
  376. package/dist/config-DVVph9yz.mjs +0 -402
  377. package/dist/config-DVVph9yz.mjs.map +0 -1
  378. package/dist/config.d.cts.map +0 -1
  379. package/dist/config.d.mts.map +0 -1
  380. package/dist/credentials-B5zRHdAl.mjs +0 -141
  381. package/dist/credentials-B5zRHdAl.mjs.map +0 -1
  382. package/dist/credentials-BapzjyV5.cjs +0 -195
  383. package/dist/credentials-BapzjyV5.cjs.map +0 -1
  384. package/dist/credentials-Xamqe_NJ.cjs +0 -2681
  385. package/dist/credentials-Xamqe_NJ.cjs.map +0 -1
  386. package/dist/credentials-dP8vRVRv.mjs +0 -2549
  387. package/dist/credentials-dP8vRVRv.mjs.map +0 -1
  388. package/dist/discover-CAlFgYec.mjs +0 -229
  389. package/dist/discover-CAlFgYec.mjs.map +0 -1
  390. package/dist/discover-DTmFeloL.cjs +0 -271
  391. package/dist/discover-DTmFeloL.cjs.map +0 -1
  392. package/dist/dokploy-api-BS2xnJLZ.mjs +0 -3
  393. package/dist/dokploy-api-BsVH0y_s.cjs +0 -718
  394. package/dist/dokploy-api-BsVH0y_s.cjs.map +0 -1
  395. package/dist/dokploy-api-BuxDRo3l.cjs +0 -3
  396. package/dist/dokploy-api-aTFPz7_4.mjs +0 -706
  397. package/dist/dokploy-api-aTFPz7_4.mjs.map +0 -1
  398. package/dist/emit-CbcRolsa.cjs.map +0 -1
  399. package/dist/emit-CiZS_5Ub.mjs.map +0 -1
  400. package/dist/encryption-C6jaU0hE.cjs +0 -54
  401. package/dist/encryption-C6jaU0hE.cjs.map +0 -1
  402. package/dist/encryption-CHzzeR8a.cjs +0 -4
  403. package/dist/encryption-CQUncu7v.mjs +0 -3
  404. package/dist/encryption-D-abyhZx.mjs +0 -42
  405. package/dist/encryption-D-abyhZx.mjs.map +0 -1
  406. package/dist/fullstack-secrets-C-GGohke.cjs +0 -111
  407. package/dist/fullstack-secrets-C-GGohke.cjs.map +0 -1
  408. package/dist/fullstack-secrets-D1o9-G5l.mjs +0 -87
  409. package/dist/fullstack-secrets-D1o9-G5l.mjs.map +0 -1
  410. package/dist/generator-CNzBw7g5.cjs +0 -289
  411. package/dist/generator-CNzBw7g5.cjs.map +0 -1
  412. package/dist/generator-VE2JrFlY.mjs +0 -253
  413. package/dist/generator-VE2JrFlY.mjs.map +0 -1
  414. package/dist/index-C6e-ULLx.d.mts.map +0 -1
  415. package/dist/index-CR5urhWX.d.cts.map +0 -1
  416. package/dist/openapi-SjsgARie.cjs +0 -2075
  417. package/dist/openapi-SjsgARie.cjs.map +0 -1
  418. package/dist/openapi-Xx0A7Wg0.mjs +0 -2021
  419. package/dist/openapi-Xx0A7Wg0.mjs.map +0 -1
  420. package/dist/openapi-react-query-Byltvm_7.mjs +0 -167
  421. package/dist/openapi-react-query-Byltvm_7.mjs.map +0 -1
  422. package/dist/openapi-react-query-CmJ1xDbn.cjs +0 -173
  423. package/dist/openapi-react-query-CmJ1xDbn.cjs.map +0 -1
  424. package/dist/openapi-react-query.cjs +0 -4
  425. package/dist/openapi-react-query.d.cts +0 -11
  426. package/dist/openapi-react-query.d.cts.map +0 -1
  427. package/dist/openapi-react-query.d.mts +0 -11
  428. package/dist/openapi-react-query.d.mts.map +0 -1
  429. package/dist/openapi-react-query.mjs +0 -4
  430. package/dist/reconcile-CFs8C_1a.mjs.map +0 -1
  431. package/dist/reconcile-D0pimNiy.cjs.map +0 -1
  432. package/dist/setup-BA8ciTPU.mjs +0 -11
  433. package/dist/setup-BsZvZP6f.cjs +0 -11
  434. package/dist/setup-C8KOx8_8.mjs +0 -443
  435. package/dist/setup-C8KOx8_8.mjs.map +0 -1
  436. package/dist/setup-hC6hI86f.cjs +0 -473
  437. package/dist/setup-hC6hI86f.cjs.map +0 -1
  438. package/dist/storage-BJmzYxt8.cjs +0 -363
  439. package/dist/storage-BJmzYxt8.cjs.map +0 -1
  440. package/dist/storage-BM9hGpgv.cjs +0 -7
  441. package/dist/storage-Bi24WfoW.mjs +0 -297
  442. package/dist/storage-Bi24WfoW.mjs.map +0 -1
  443. package/dist/storage-CYlGwWTj.mjs +0 -3
  444. package/dist/sync-CmEuNZsB.mjs +0 -76
  445. package/dist/sync-CmEuNZsB.mjs.map +0 -1
  446. package/dist/sync-D306yOWu.cjs +0 -4
  447. package/dist/sync-SizaChmC.cjs +0 -93
  448. package/dist/sync-SizaChmC.cjs.map +0 -1
  449. package/dist/sync-hOqAWHR6.mjs +0 -3
  450. package/dist/types-6pkp2RRj.d.mts +0 -2220
  451. package/dist/types-6pkp2RRj.d.mts.map +0 -1
  452. package/dist/types-Y3fKQSAK.d.cts +0 -2220
  453. package/dist/types-Y3fKQSAK.d.cts.map +0 -1
  454. package/dist/workspace-BzrG_2SI.mjs +0 -8
  455. package/dist/workspace-C6VJQVtG.cjs.map +0 -1
  456. package/dist/workspace-XXtNhqJl.cjs +0 -9
  457. package/dist/workspace-zoqRbihZ.mjs.map +0 -1
@@ -0,0 +1,75 @@
1
+ const require_discover = require("../discover-D1It5r_h.cjs");
2
+ const require_sandbox = require("../sandbox-CL--ZDui.cjs");
3
+ const require_workerRuntime = require("../workerRuntime-BXfhbe13.cjs");
4
+ const require_databases = require("../databases-BY-pEImp.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-BPelzeGW.mjs";
2
+ import { t as SECRETS_DIR_ENV } from "../sandbox-Dm247NGx.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-CzszQV0N.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,164 @@
1
+ let node_path = require("node:path");
2
+ let node_fs = require("node:fs");
3
+ let node_async_hooks = require("node:async_hooks");
4
+ //#region src/sandbox/sandbox.ts
5
+ /**
6
+ * Where a deploy runs the project's own code.
7
+ *
8
+ * A deploy holds credentials — Dokploy's token, a registry login, an AWS key —
9
+ * and loading `gkm.config.ts`, sniffing an app's environment and building it
10
+ * all execute code from the repository being deployed. On a developer's own
11
+ * laptop that is the developer's code. On a CI job for a fork, or a shared
12
+ * build runner, it is not, and that code should not be able to read the
13
+ * credentials used to deploy it, hang the deploy, or reach outside the
14
+ * checkout.
15
+ *
16
+ * So every step that runs project code goes through a `Sandbox`: one call,
17
+ * with an argument array rather than a shell line, the complete environment
18
+ * the step needs rather than the host's, a timeout it cannot outlive, secrets
19
+ * as files rather than variables, and a working directory inside the project.
20
+ * The steps that need credentials — provisioning, pushing, releasing — are
21
+ * the deploy's own code and never run in one.
22
+ *
23
+ * `LocalSandbox` is the default: a child process on this machine with an
24
+ * allowlisted environment. A host that builds repositories it does not trust
25
+ * passes its own — a container per build, a VM — through `deploy()`'s
26
+ * `sandbox`.
27
+ */
28
+ /** The variable naming the directory a command's secrets are mounted in. */
29
+ const SECRETS_DIR_ENV = "GKM_SECRETS_DIR";
30
+ /** A command was asked to run outside the project. */
31
+ var SandboxCwdEscape = class extends Error {
32
+ cwd;
33
+ root;
34
+ constructor(cwd, root) {
35
+ super(`Refusing to run in '${cwd}': it is outside the project at '${root}'. A sandboxed step only runs inside the project it was given — check the app paths in gkm.config.ts for \`..\` or an absolute path.`);
36
+ this.cwd = cwd;
37
+ this.root = root;
38
+ this.name = "SandboxCwdEscape";
39
+ }
40
+ };
41
+ /** A path with its symlinks resolved where it exists — `/tmp` is `/private/tmp`. */
42
+ function real(path) {
43
+ return (0, node_fs.existsSync)(path) ? (0, node_fs.realpathSync)(path) : path;
44
+ }
45
+ /**
46
+ * `cwd` as an absolute directory inside `root`, or {@link SandboxCwdEscape}.
47
+ *
48
+ * Symlinks are resolved on both sides first, so a link inside the project
49
+ * that points out of it is an escape, and a project reached through a link
50
+ * (`/tmp` on macOS) is still itself. For a sandbox of a host's own to call
51
+ * before it runs anything.
52
+ */
53
+ function confineCwd(root, cwd) {
54
+ const absolute = (0, node_path.resolve)(root, cwd);
55
+ const from = (0, node_path.relative)(real((0, node_path.resolve)(root)), real(absolute));
56
+ if (from === ".." || from.startsWith(`..${node_path.sep}`) || (0, node_path.isAbsolute)(from)) throw new SandboxCwdEscape(cwd, root);
57
+ return absolute;
58
+ }
59
+ /** A secret's file name: one path segment, so it cannot be written elsewhere. */
60
+ var SecretNameInvalid = class extends Error {
61
+ secretName;
62
+ constructor(secretName) {
63
+ super(`'${secretName}' cannot be a secret's name: it becomes a file name in the secrets directory, so it must be one segment of letters, digits, '.', '-' or '_' and not start with '.'.`);
64
+ this.secretName = secretName;
65
+ this.name = "SecretNameInvalid";
66
+ }
67
+ };
68
+ const SECRET_NAME = /^[A-Za-z0-9_-][A-Za-z0-9._-]*$/;
69
+ /** Every secret name, checked before anything is written. */
70
+ function assertSecretNames(secrets) {
71
+ for (const name of Object.keys(secrets ?? {})) if (!SECRET_NAME.test(name)) throw new SecretNameInvalid(name);
72
+ }
73
+ const active = new node_async_hooks.AsyncLocalStorage();
74
+ /**
75
+ * Run `fn` with `sandbox` as the one its steps use.
76
+ *
77
+ * Per run rather than global, as `withOutput` routes a run's lines: two
78
+ * deploys in one host process each build in their own sandbox. A step deep in
79
+ * the engine — discovering constructs, sniffing an app — asks
80
+ * {@link activeSandbox} rather than every function between `deploy()` and it
81
+ * taking one more parameter.
82
+ */
83
+ function withSandbox(sandbox, fn) {
84
+ return active.run({
85
+ sandbox,
86
+ answers: /* @__PURE__ */ new Map()
87
+ }, fn);
88
+ }
89
+ /** The sandbox of the run this is part of, if it was started with one. */
90
+ function activeSandbox() {
91
+ return active.getStore()?.sandbox;
92
+ }
93
+ /**
94
+ * `ask()`'s answer, asked once per run.
95
+ *
96
+ * A deploy loads its config and discovers its constructs from several places
97
+ * — the first load, the engine, the Dockerfile generator — and in a sandbox
98
+ * each was a child process of its own, for the same answer: the checkout does
99
+ * not change while it deploys. Within a run in `sandbox`, the first answer
100
+ * for `key` is the one every later ask gets. Outside one, or for another
101
+ * sandbox, `ask()` runs each time.
102
+ */
103
+ function oncePerRun(sandbox, key, ask) {
104
+ const run = active.getStore();
105
+ if (!run || run.sandbox !== sandbox) return ask();
106
+ let answer = run.answers.get(key);
107
+ if (!answer) {
108
+ answer = ask();
109
+ run.answers.set(key, answer);
110
+ answer.catch(() => run.answers.delete(key));
111
+ }
112
+ return answer;
113
+ }
114
+ //#endregion
115
+ Object.defineProperty(exports, "SECRETS_DIR_ENV", {
116
+ enumerable: true,
117
+ get: function() {
118
+ return SECRETS_DIR_ENV;
119
+ }
120
+ });
121
+ Object.defineProperty(exports, "SandboxCwdEscape", {
122
+ enumerable: true,
123
+ get: function() {
124
+ return SandboxCwdEscape;
125
+ }
126
+ });
127
+ Object.defineProperty(exports, "SecretNameInvalid", {
128
+ enumerable: true,
129
+ get: function() {
130
+ return SecretNameInvalid;
131
+ }
132
+ });
133
+ Object.defineProperty(exports, "activeSandbox", {
134
+ enumerable: true,
135
+ get: function() {
136
+ return activeSandbox;
137
+ }
138
+ });
139
+ Object.defineProperty(exports, "assertSecretNames", {
140
+ enumerable: true,
141
+ get: function() {
142
+ return assertSecretNames;
143
+ }
144
+ });
145
+ Object.defineProperty(exports, "confineCwd", {
146
+ enumerable: true,
147
+ get: function() {
148
+ return confineCwd;
149
+ }
150
+ });
151
+ Object.defineProperty(exports, "oncePerRun", {
152
+ enumerable: true,
153
+ get: function() {
154
+ return oncePerRun;
155
+ }
156
+ });
157
+ Object.defineProperty(exports, "withSandbox", {
158
+ enumerable: true,
159
+ get: function() {
160
+ return withSandbox;
161
+ }
162
+ });
163
+
164
+ //# sourceMappingURL=sandbox-CL--ZDui.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sandbox-CL--ZDui.cjs","names":["existsSync","realpathSync","resolve","relative","sep","isAbsolute","AsyncLocalStorage"],"sources":["../src/sandbox/sandbox.ts"],"sourcesContent":["/**\n * Where a deploy runs the project's own code.\n *\n * A deploy holds credentials — Dokploy's token, a registry login, an AWS key —\n * and loading `gkm.config.ts`, sniffing an app's environment and building it\n * all execute code from the repository being deployed. On a developer's own\n * laptop that is the developer's code. On a CI job for a fork, or a shared\n * build runner, it is not, and that code should not be able to read the\n * credentials used to deploy it, hang the deploy, or reach outside the\n * checkout.\n *\n * So every step that runs project code goes through a `Sandbox`: one call,\n * with an argument array rather than a shell line, the complete environment\n * the step needs rather than the host's, a timeout it cannot outlive, secrets\n * as files rather than variables, and a working directory inside the project.\n * The steps that need credentials — provisioning, pushing, releasing — are\n * the deploy's own code and never run in one.\n *\n * `LocalSandbox` is the default: a child process on this machine with an\n * allowlisted environment. A host that builds repositories it does not trust\n * passes its own — a container per build, a VM — through `deploy()`'s\n * `sandbox`.\n */\n\nimport { AsyncLocalStorage } from 'node:async_hooks';\nimport { existsSync, realpathSync } from 'node:fs';\nimport { isAbsolute, relative, resolve, sep } from 'node:path';\n\n/** Where a command's output goes. */\nexport type SandboxOutput = 'capture' | 'inherit' | 'stderr' | 'ignore';\n\nexport interface SandboxExecOptions {\n\t/**\n\t * Where the command runs: the project root or a directory below it, as an\n\t * absolute path or relative to the root. Anywhere else is refused with\n\t * {@link SandboxCwdEscape}.\n\t */\n\tcwd: string;\n\t/**\n\t * The command's whole environment. Nothing of the host's is added to it:\n\t * start from {@link Sandbox.env} and add what the step needs.\n\t */\n\tenv: Readonly<Record<string, string>>;\n\t/**\n\t * How long the command may run before it is killed. Required: a step that\n\t * waits forever — a sniffed entry that opens a server, a build stuck on a\n\t * prompt — would otherwise hold the deploy, and its lock, forever.\n\t */\n\ttimeoutMs: number;\n\t/**\n\t * Files the command can read, by name. Mounted in a directory of their own\n\t * — named by `GKM_SECRETS_DIR` in the command's environment — and removed\n\t * when it exits. Never set as variables, which every child inherits, a\n\t * crash report prints and `/proc/<pid>/environ` shows.\n\t */\n\tsecrets?: Readonly<Record<string, string>>;\n\t/**\n\t * `capture` (the default) returns stdout and stderr in the result;\n\t * `inherit` gives the command the host's terminal; `stderr` sends both\n\t * streams to the host's stderr; `ignore` discards them.\n\t */\n\toutput?: SandboxOutput;\n\t/** Kills the command when aborted; `exec` rejects with the signal's reason. */\n\tsignal?: AbortSignal;\n}\n\n/** How a command ended. A non-zero exit is a result, not an error. */\nexport interface SandboxResult {\n\texitCode: number | null;\n\tsignal: string | null;\n\t/** What it wrote to stdout, when its output was captured. */\n\tstdout: string;\n\t/** What it wrote to stderr, when its output was captured. */\n\tstderr: string;\n}\n\n/**\n * Runs a command against the project, and nothing else of the host's.\n *\n * `exec` resolves with the result however the command exited. It rejects\n * with {@link CommandTimedOut} once the timeout passes — after the command is\n * gone — with {@link SandboxCwdEscape} for a directory outside the project,\n * with the signal's reason when aborted, and with the spawn error when the\n * program cannot be started.\n */\nexport interface Sandbox {\n\t/** The project: the directory every command runs at or below. */\n\treadonly root: string;\n\t/**\n\t * Whether the code it runs is kept from the host: its files, its\n\t * processes, its memory.\n\t *\n\t * An isolating sandbox shares nothing but what crosses `exec`, so a config\n\t * reaches the deploy as data — a live object in it (a custom state store,\n\t * an inline target) cannot cross, and is refused with\n\t * `ConfigObjectNotSerializable`. A non-isolating one, like\n\t * {@link LocalSandbox}, runs on the host as the host's user; a project\n\t * whose config holds live objects is then loaded in-process as before,\n\t * because a project trusted to run there is trusted to do that.\n\t */\n\treadonly isolating: boolean;\n\t/**\n\t * The environment a command starts from: what any program needs to run\n\t * here — `PATH`, `HOME`, the locale — and no credential.\n\t */\n\treadonly env: Readonly<Record<string, string>>;\n\texec(\n\t\tcommand: string,\n\t\targs: readonly string[],\n\t\toptions: SandboxExecOptions,\n\t): Promise<SandboxResult>;\n}\n\n/** The variable naming the directory a command's secrets are mounted in. */\nexport const SECRETS_DIR_ENV = 'GKM_SECRETS_DIR';\n\n/** A command was asked to run outside the project. */\nexport class SandboxCwdEscape extends Error {\n\tconstructor(\n\t\treadonly cwd: string,\n\t\treadonly root: string,\n\t) {\n\t\tsuper(\n\t\t\t`Refusing to run in '${cwd}': it is outside the project at '${root}'. ` +\n\t\t\t\t'A sandboxed step only runs inside the project it was given — check ' +\n\t\t\t\t'the app paths in gkm.config.ts for `..` or an absolute path.',\n\t\t);\n\t\tthis.name = 'SandboxCwdEscape';\n\t}\n}\n\n/** A path with its symlinks resolved where it exists — `/tmp` is `/private/tmp`. */\nfunction real(path: string): string {\n\treturn existsSync(path) ? realpathSync(path) : path;\n}\n\n/**\n * `cwd` as an absolute directory inside `root`, or {@link SandboxCwdEscape}.\n *\n * Symlinks are resolved on both sides first, so a link inside the project\n * that points out of it is an escape, and a project reached through a link\n * (`/tmp` on macOS) is still itself. For a sandbox of a host's own to call\n * before it runs anything.\n */\nexport function confineCwd(root: string, cwd: string): string {\n\tconst absolute = resolve(root, cwd);\n\tconst from = relative(real(resolve(root)), real(absolute));\n\tif (from === '..' || from.startsWith(`..${sep}`) || isAbsolute(from)) {\n\t\tthrow new SandboxCwdEscape(cwd, root);\n\t}\n\treturn absolute;\n}\n\n/** A secret's file name: one path segment, so it cannot be written elsewhere. */\nexport class SecretNameInvalid extends Error {\n\tconstructor(readonly secretName: string) {\n\t\tsuper(\n\t\t\t`'${secretName}' cannot be a secret's name: it becomes a file name in ` +\n\t\t\t\t'the secrets directory, so it must be one segment of letters, digits, ' +\n\t\t\t\t\"'.', '-' or '_' and not start with '.'.\",\n\t\t);\n\t\tthis.name = 'SecretNameInvalid';\n\t}\n}\n\nconst SECRET_NAME = /^[A-Za-z0-9_-][A-Za-z0-9._-]*$/;\n\n/** Every secret name, checked before anything is written. */\nexport function assertSecretNames(\n\tsecrets: Readonly<Record<string, string>> | undefined,\n): void {\n\tfor (const name of Object.keys(secrets ?? {})) {\n\t\tif (!SECRET_NAME.test(name)) throw new SecretNameInvalid(name);\n\t}\n}\n\n/** A run's sandbox, and what its workers already answered. */\ninterface SandboxRun {\n\tsandbox: Sandbox;\n\tanswers: Map<string, Promise<unknown>>;\n}\n\nconst active = new AsyncLocalStorage<SandboxRun>();\n\n/**\n * Run `fn` with `sandbox` as the one its steps use.\n *\n * Per run rather than global, as `withOutput` routes a run's lines: two\n * deploys in one host process each build in their own sandbox. A step deep in\n * the engine — discovering constructs, sniffing an app — asks\n * {@link activeSandbox} rather than every function between `deploy()` and it\n * taking one more parameter.\n */\nexport function withSandbox<T>(sandbox: Sandbox, fn: () => T): T {\n\treturn active.run({ sandbox, answers: new Map() }, fn);\n}\n\n/** The sandbox of the run this is part of, if it was started with one. */\nexport function activeSandbox(): Sandbox | undefined {\n\treturn active.getStore()?.sandbox;\n}\n\n/**\n * `ask()`'s answer, asked once per run.\n *\n * A deploy loads its config and discovers its constructs from several places\n * — the first load, the engine, the Dockerfile generator — and in a sandbox\n * each was a child process of its own, for the same answer: the checkout does\n * not change while it deploys. Within a run in `sandbox`, the first answer\n * for `key` is the one every later ask gets. Outside one, or for another\n * sandbox, `ask()` runs each time.\n */\nexport function oncePerRun<T>(\n\tsandbox: Sandbox,\n\tkey: string,\n\task: () => Promise<T>,\n): Promise<T> {\n\tconst run = active.getStore();\n\tif (!run || run.sandbox !== sandbox) return ask();\n\n\tlet answer = run.answers.get(key) as Promise<T> | undefined;\n\tif (!answer) {\n\t\tanswer = ask();\n\t\trun.answers.set(key, answer);\n\t\t// A failure is not remembered: the next ask tries again.\n\t\tanswer.catch(() => run.answers.delete(key));\n\t}\n\treturn answer;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkHA,MAAa,kBAAkB;;AAG/B,IAAa,mBAAb,cAAsC,MAAM;CAEjC;CACA;CAFV,YACC,KACA,MACC;EACD,MACC,uBAAuB,IAAI,mCAAmC,KAAK,qIAGpE;EAPS,KAAA,MAAA;EACA,KAAA,OAAA;EAOT,KAAK,OAAO;CACb;AACD;;AAGA,SAAS,KAAK,MAAsB;CACnC,QAAA,GAAOA,QAAAA,WAAAA,CAAW,IAAI,KAAA,GAAIC,QAAAA,aAAAA,CAAa,IAAI,IAAI;AAChD;;;;;;;;;AAUA,SAAgB,WAAW,MAAc,KAAqB;CAC7D,MAAM,YAAA,GAAWC,UAAAA,QAAAA,CAAQ,MAAM,GAAG;CAClC,MAAM,QAAA,GAAOC,UAAAA,SAAAA,CAAS,MAAA,GAAKD,UAAAA,QAAAA,CAAQ,IAAI,CAAC,GAAG,KAAK,QAAQ,CAAC;CACzD,IAAI,SAAS,QAAQ,KAAK,WAAW,KAAKE,UAAAA,KAAK,MAAA,GAAKC,UAAAA,WAAAA,CAAW,IAAI,GAClE,MAAM,IAAI,iBAAiB,KAAK,IAAI;CAErC,OAAO;AACR;;AAGA,IAAa,oBAAb,cAAuC,MAAM;CACvB;CAArB,YAAY,YAA6B;EACxC,MACC,IAAI,WAAW,oKAGhB;EALoB,KAAA,aAAA;EAMpB,KAAK,OAAO;CACb;AACD;AAEA,MAAM,cAAc;;AAGpB,SAAgB,kBACf,SACO;CACP,KAAK,MAAM,QAAQ,OAAO,KAAK,WAAW,CAAC,CAAC,GAC3C,IAAI,CAAC,YAAY,KAAK,IAAI,GAAG,MAAM,IAAI,kBAAkB,IAAI;AAE/D;AAQA,MAAM,SAAS,IAAIC,iBAAAA,kBAA8B;;;;;;;;;;AAWjD,SAAgB,YAAe,SAAkB,IAAgB;CAChE,OAAO,OAAO,IAAI;EAAE;EAAS,yBAAS,IAAI,IAAI;CAAE,GAAG,EAAE;AACtD;;AAGA,SAAgB,gBAAqC;CACpD,OAAO,OAAO,SAAS,CAAC,EAAE;AAC3B;;;;;;;;;;;AAYA,SAAgB,WACf,SACA,KACA,KACa;CACb,MAAM,MAAM,OAAO,SAAS;CAC5B,IAAI,CAAC,OAAO,IAAI,YAAY,SAAS,OAAO,IAAI;CAEhD,IAAI,SAAS,IAAI,QAAQ,IAAI,GAAG;CAChC,IAAI,CAAC,QAAQ;EACZ,SAAS,IAAI;EACb,IAAI,QAAQ,IAAI,KAAK,MAAM;EAE3B,OAAO,YAAY,IAAI,QAAQ,OAAO,GAAG,CAAC;CAC3C;CACA,OAAO;AACR"}
@@ -0,0 +1,117 @@
1
+ import { isAbsolute, relative, resolve, sep } from "node:path";
2
+ import { existsSync, realpathSync } from "node:fs";
3
+ import { AsyncLocalStorage } from "node:async_hooks";
4
+ //#region src/sandbox/sandbox.ts
5
+ /**
6
+ * Where a deploy runs the project's own code.
7
+ *
8
+ * A deploy holds credentials — Dokploy's token, a registry login, an AWS key —
9
+ * and loading `gkm.config.ts`, sniffing an app's environment and building it
10
+ * all execute code from the repository being deployed. On a developer's own
11
+ * laptop that is the developer's code. On a CI job for a fork, or a shared
12
+ * build runner, it is not, and that code should not be able to read the
13
+ * credentials used to deploy it, hang the deploy, or reach outside the
14
+ * checkout.
15
+ *
16
+ * So every step that runs project code goes through a `Sandbox`: one call,
17
+ * with an argument array rather than a shell line, the complete environment
18
+ * the step needs rather than the host's, a timeout it cannot outlive, secrets
19
+ * as files rather than variables, and a working directory inside the project.
20
+ * The steps that need credentials — provisioning, pushing, releasing — are
21
+ * the deploy's own code and never run in one.
22
+ *
23
+ * `LocalSandbox` is the default: a child process on this machine with an
24
+ * allowlisted environment. A host that builds repositories it does not trust
25
+ * passes its own — a container per build, a VM — through `deploy()`'s
26
+ * `sandbox`.
27
+ */
28
+ /** The variable naming the directory a command's secrets are mounted in. */
29
+ const SECRETS_DIR_ENV = "GKM_SECRETS_DIR";
30
+ /** A command was asked to run outside the project. */
31
+ var SandboxCwdEscape = class extends Error {
32
+ cwd;
33
+ root;
34
+ constructor(cwd, root) {
35
+ super(`Refusing to run in '${cwd}': it is outside the project at '${root}'. A sandboxed step only runs inside the project it was given — check the app paths in gkm.config.ts for \`..\` or an absolute path.`);
36
+ this.cwd = cwd;
37
+ this.root = root;
38
+ this.name = "SandboxCwdEscape";
39
+ }
40
+ };
41
+ /** A path with its symlinks resolved where it exists — `/tmp` is `/private/tmp`. */
42
+ function real(path) {
43
+ return existsSync(path) ? realpathSync(path) : path;
44
+ }
45
+ /**
46
+ * `cwd` as an absolute directory inside `root`, or {@link SandboxCwdEscape}.
47
+ *
48
+ * Symlinks are resolved on both sides first, so a link inside the project
49
+ * that points out of it is an escape, and a project reached through a link
50
+ * (`/tmp` on macOS) is still itself. For a sandbox of a host's own to call
51
+ * before it runs anything.
52
+ */
53
+ function confineCwd(root, cwd) {
54
+ const absolute = resolve(root, cwd);
55
+ const from = relative(real(resolve(root)), real(absolute));
56
+ if (from === ".." || from.startsWith(`..${sep}`) || isAbsolute(from)) throw new SandboxCwdEscape(cwd, root);
57
+ return absolute;
58
+ }
59
+ /** A secret's file name: one path segment, so it cannot be written elsewhere. */
60
+ var SecretNameInvalid = class extends Error {
61
+ secretName;
62
+ constructor(secretName) {
63
+ super(`'${secretName}' cannot be a secret's name: it becomes a file name in the secrets directory, so it must be one segment of letters, digits, '.', '-' or '_' and not start with '.'.`);
64
+ this.secretName = secretName;
65
+ this.name = "SecretNameInvalid";
66
+ }
67
+ };
68
+ const SECRET_NAME = /^[A-Za-z0-9_-][A-Za-z0-9._-]*$/;
69
+ /** Every secret name, checked before anything is written. */
70
+ function assertSecretNames(secrets) {
71
+ for (const name of Object.keys(secrets ?? {})) if (!SECRET_NAME.test(name)) throw new SecretNameInvalid(name);
72
+ }
73
+ const active = new AsyncLocalStorage();
74
+ /**
75
+ * Run `fn` with `sandbox` as the one its steps use.
76
+ *
77
+ * Per run rather than global, as `withOutput` routes a run's lines: two
78
+ * deploys in one host process each build in their own sandbox. A step deep in
79
+ * the engine — discovering constructs, sniffing an app — asks
80
+ * {@link activeSandbox} rather than every function between `deploy()` and it
81
+ * taking one more parameter.
82
+ */
83
+ function withSandbox(sandbox, fn) {
84
+ return active.run({
85
+ sandbox,
86
+ answers: /* @__PURE__ */ new Map()
87
+ }, fn);
88
+ }
89
+ /** The sandbox of the run this is part of, if it was started with one. */
90
+ function activeSandbox() {
91
+ return active.getStore()?.sandbox;
92
+ }
93
+ /**
94
+ * `ask()`'s answer, asked once per run.
95
+ *
96
+ * A deploy loads its config and discovers its constructs from several places
97
+ * — the first load, the engine, the Dockerfile generator — and in a sandbox
98
+ * each was a child process of its own, for the same answer: the checkout does
99
+ * not change while it deploys. Within a run in `sandbox`, the first answer
100
+ * for `key` is the one every later ask gets. Outside one, or for another
101
+ * sandbox, `ask()` runs each time.
102
+ */
103
+ function oncePerRun(sandbox, key, ask) {
104
+ const run = active.getStore();
105
+ if (!run || run.sandbox !== sandbox) return ask();
106
+ let answer = run.answers.get(key);
107
+ if (!answer) {
108
+ answer = ask();
109
+ run.answers.set(key, answer);
110
+ answer.catch(() => run.answers.delete(key));
111
+ }
112
+ return answer;
113
+ }
114
+ //#endregion
115
+ export { assertSecretNames as a, withSandbox as c, activeSandbox as i, SandboxCwdEscape as n, confineCwd as o, SecretNameInvalid as r, oncePerRun as s, SECRETS_DIR_ENV as t };
116
+
117
+ //# sourceMappingURL=sandbox-Dm247NGx.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sandbox-Dm247NGx.mjs","names":[],"sources":["../src/sandbox/sandbox.ts"],"sourcesContent":["/**\n * Where a deploy runs the project's own code.\n *\n * A deploy holds credentials — Dokploy's token, a registry login, an AWS key —\n * and loading `gkm.config.ts`, sniffing an app's environment and building it\n * all execute code from the repository being deployed. On a developer's own\n * laptop that is the developer's code. On a CI job for a fork, or a shared\n * build runner, it is not, and that code should not be able to read the\n * credentials used to deploy it, hang the deploy, or reach outside the\n * checkout.\n *\n * So every step that runs project code goes through a `Sandbox`: one call,\n * with an argument array rather than a shell line, the complete environment\n * the step needs rather than the host's, a timeout it cannot outlive, secrets\n * as files rather than variables, and a working directory inside the project.\n * The steps that need credentials — provisioning, pushing, releasing — are\n * the deploy's own code and never run in one.\n *\n * `LocalSandbox` is the default: a child process on this machine with an\n * allowlisted environment. A host that builds repositories it does not trust\n * passes its own — a container per build, a VM — through `deploy()`'s\n * `sandbox`.\n */\n\nimport { AsyncLocalStorage } from 'node:async_hooks';\nimport { existsSync, realpathSync } from 'node:fs';\nimport { isAbsolute, relative, resolve, sep } from 'node:path';\n\n/** Where a command's output goes. */\nexport type SandboxOutput = 'capture' | 'inherit' | 'stderr' | 'ignore';\n\nexport interface SandboxExecOptions {\n\t/**\n\t * Where the command runs: the project root or a directory below it, as an\n\t * absolute path or relative to the root. Anywhere else is refused with\n\t * {@link SandboxCwdEscape}.\n\t */\n\tcwd: string;\n\t/**\n\t * The command's whole environment. Nothing of the host's is added to it:\n\t * start from {@link Sandbox.env} and add what the step needs.\n\t */\n\tenv: Readonly<Record<string, string>>;\n\t/**\n\t * How long the command may run before it is killed. Required: a step that\n\t * waits forever — a sniffed entry that opens a server, a build stuck on a\n\t * prompt — would otherwise hold the deploy, and its lock, forever.\n\t */\n\ttimeoutMs: number;\n\t/**\n\t * Files the command can read, by name. Mounted in a directory of their own\n\t * — named by `GKM_SECRETS_DIR` in the command's environment — and removed\n\t * when it exits. Never set as variables, which every child inherits, a\n\t * crash report prints and `/proc/<pid>/environ` shows.\n\t */\n\tsecrets?: Readonly<Record<string, string>>;\n\t/**\n\t * `capture` (the default) returns stdout and stderr in the result;\n\t * `inherit` gives the command the host's terminal; `stderr` sends both\n\t * streams to the host's stderr; `ignore` discards them.\n\t */\n\toutput?: SandboxOutput;\n\t/** Kills the command when aborted; `exec` rejects with the signal's reason. */\n\tsignal?: AbortSignal;\n}\n\n/** How a command ended. A non-zero exit is a result, not an error. */\nexport interface SandboxResult {\n\texitCode: number | null;\n\tsignal: string | null;\n\t/** What it wrote to stdout, when its output was captured. */\n\tstdout: string;\n\t/** What it wrote to stderr, when its output was captured. */\n\tstderr: string;\n}\n\n/**\n * Runs a command against the project, and nothing else of the host's.\n *\n * `exec` resolves with the result however the command exited. It rejects\n * with {@link CommandTimedOut} once the timeout passes — after the command is\n * gone — with {@link SandboxCwdEscape} for a directory outside the project,\n * with the signal's reason when aborted, and with the spawn error when the\n * program cannot be started.\n */\nexport interface Sandbox {\n\t/** The project: the directory every command runs at or below. */\n\treadonly root: string;\n\t/**\n\t * Whether the code it runs is kept from the host: its files, its\n\t * processes, its memory.\n\t *\n\t * An isolating sandbox shares nothing but what crosses `exec`, so a config\n\t * reaches the deploy as data — a live object in it (a custom state store,\n\t * an inline target) cannot cross, and is refused with\n\t * `ConfigObjectNotSerializable`. A non-isolating one, like\n\t * {@link LocalSandbox}, runs on the host as the host's user; a project\n\t * whose config holds live objects is then loaded in-process as before,\n\t * because a project trusted to run there is trusted to do that.\n\t */\n\treadonly isolating: boolean;\n\t/**\n\t * The environment a command starts from: what any program needs to run\n\t * here — `PATH`, `HOME`, the locale — and no credential.\n\t */\n\treadonly env: Readonly<Record<string, string>>;\n\texec(\n\t\tcommand: string,\n\t\targs: readonly string[],\n\t\toptions: SandboxExecOptions,\n\t): Promise<SandboxResult>;\n}\n\n/** The variable naming the directory a command's secrets are mounted in. */\nexport const SECRETS_DIR_ENV = 'GKM_SECRETS_DIR';\n\n/** A command was asked to run outside the project. */\nexport class SandboxCwdEscape extends Error {\n\tconstructor(\n\t\treadonly cwd: string,\n\t\treadonly root: string,\n\t) {\n\t\tsuper(\n\t\t\t`Refusing to run in '${cwd}': it is outside the project at '${root}'. ` +\n\t\t\t\t'A sandboxed step only runs inside the project it was given — check ' +\n\t\t\t\t'the app paths in gkm.config.ts for `..` or an absolute path.',\n\t\t);\n\t\tthis.name = 'SandboxCwdEscape';\n\t}\n}\n\n/** A path with its symlinks resolved where it exists — `/tmp` is `/private/tmp`. */\nfunction real(path: string): string {\n\treturn existsSync(path) ? realpathSync(path) : path;\n}\n\n/**\n * `cwd` as an absolute directory inside `root`, or {@link SandboxCwdEscape}.\n *\n * Symlinks are resolved on both sides first, so a link inside the project\n * that points out of it is an escape, and a project reached through a link\n * (`/tmp` on macOS) is still itself. For a sandbox of a host's own to call\n * before it runs anything.\n */\nexport function confineCwd(root: string, cwd: string): string {\n\tconst absolute = resolve(root, cwd);\n\tconst from = relative(real(resolve(root)), real(absolute));\n\tif (from === '..' || from.startsWith(`..${sep}`) || isAbsolute(from)) {\n\t\tthrow new SandboxCwdEscape(cwd, root);\n\t}\n\treturn absolute;\n}\n\n/** A secret's file name: one path segment, so it cannot be written elsewhere. */\nexport class SecretNameInvalid extends Error {\n\tconstructor(readonly secretName: string) {\n\t\tsuper(\n\t\t\t`'${secretName}' cannot be a secret's name: it becomes a file name in ` +\n\t\t\t\t'the secrets directory, so it must be one segment of letters, digits, ' +\n\t\t\t\t\"'.', '-' or '_' and not start with '.'.\",\n\t\t);\n\t\tthis.name = 'SecretNameInvalid';\n\t}\n}\n\nconst SECRET_NAME = /^[A-Za-z0-9_-][A-Za-z0-9._-]*$/;\n\n/** Every secret name, checked before anything is written. */\nexport function assertSecretNames(\n\tsecrets: Readonly<Record<string, string>> | undefined,\n): void {\n\tfor (const name of Object.keys(secrets ?? {})) {\n\t\tif (!SECRET_NAME.test(name)) throw new SecretNameInvalid(name);\n\t}\n}\n\n/** A run's sandbox, and what its workers already answered. */\ninterface SandboxRun {\n\tsandbox: Sandbox;\n\tanswers: Map<string, Promise<unknown>>;\n}\n\nconst active = new AsyncLocalStorage<SandboxRun>();\n\n/**\n * Run `fn` with `sandbox` as the one its steps use.\n *\n * Per run rather than global, as `withOutput` routes a run's lines: two\n * deploys in one host process each build in their own sandbox. A step deep in\n * the engine — discovering constructs, sniffing an app — asks\n * {@link activeSandbox} rather than every function between `deploy()` and it\n * taking one more parameter.\n */\nexport function withSandbox<T>(sandbox: Sandbox, fn: () => T): T {\n\treturn active.run({ sandbox, answers: new Map() }, fn);\n}\n\n/** The sandbox of the run this is part of, if it was started with one. */\nexport function activeSandbox(): Sandbox | undefined {\n\treturn active.getStore()?.sandbox;\n}\n\n/**\n * `ask()`'s answer, asked once per run.\n *\n * A deploy loads its config and discovers its constructs from several places\n * — the first load, the engine, the Dockerfile generator — and in a sandbox\n * each was a child process of its own, for the same answer: the checkout does\n * not change while it deploys. Within a run in `sandbox`, the first answer\n * for `key` is the one every later ask gets. Outside one, or for another\n * sandbox, `ask()` runs each time.\n */\nexport function oncePerRun<T>(\n\tsandbox: Sandbox,\n\tkey: string,\n\task: () => Promise<T>,\n): Promise<T> {\n\tconst run = active.getStore();\n\tif (!run || run.sandbox !== sandbox) return ask();\n\n\tlet answer = run.answers.get(key) as Promise<T> | undefined;\n\tif (!answer) {\n\t\tanswer = ask();\n\t\trun.answers.set(key, answer);\n\t\t// A failure is not remembered: the next ask tries again.\n\t\tanswer.catch(() => run.answers.delete(key));\n\t}\n\treturn answer;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkHA,MAAa,kBAAkB;;AAG/B,IAAa,mBAAb,cAAsC,MAAM;CAEjC;CACA;CAFV,YACC,KACA,MACC;EACD,MACC,uBAAuB,IAAI,mCAAmC,KAAK,qIAGpE;EAPS,KAAA,MAAA;EACA,KAAA,OAAA;EAOT,KAAK,OAAO;CACb;AACD;;AAGA,SAAS,KAAK,MAAsB;CACnC,OAAO,WAAW,IAAI,IAAI,aAAa,IAAI,IAAI;AAChD;;;;;;;;;AAUA,SAAgB,WAAW,MAAc,KAAqB;CAC7D,MAAM,WAAW,QAAQ,MAAM,GAAG;CAClC,MAAM,OAAO,SAAS,KAAK,QAAQ,IAAI,CAAC,GAAG,KAAK,QAAQ,CAAC;CACzD,IAAI,SAAS,QAAQ,KAAK,WAAW,KAAK,KAAK,KAAK,WAAW,IAAI,GAClE,MAAM,IAAI,iBAAiB,KAAK,IAAI;CAErC,OAAO;AACR;;AAGA,IAAa,oBAAb,cAAuC,MAAM;CACvB;CAArB,YAAY,YAA6B;EACxC,MACC,IAAI,WAAW,oKAGhB;EALoB,KAAA,aAAA;EAMpB,KAAK,OAAO;CACb;AACD;AAEA,MAAM,cAAc;;AAGpB,SAAgB,kBACf,SACO;CACP,KAAK,MAAM,QAAQ,OAAO,KAAK,WAAW,CAAC,CAAC,GAC3C,IAAI,CAAC,YAAY,KAAK,IAAI,GAAG,MAAM,IAAI,kBAAkB,IAAI;AAE/D;AAQA,MAAM,SAAS,IAAI,kBAA8B;;;;;;;;;;AAWjD,SAAgB,YAAe,SAAkB,IAAgB;CAChE,OAAO,OAAO,IAAI;EAAE;EAAS,yBAAS,IAAI,IAAI;CAAE,GAAG,EAAE;AACtD;;AAGA,SAAgB,gBAAqC;CACpD,OAAO,OAAO,SAAS,CAAC,EAAE;AAC3B;;;;;;;;;;;AAYA,SAAgB,WACf,SACA,KACA,KACa;CACb,MAAM,MAAM,OAAO,SAAS;CAC5B,IAAI,CAAC,OAAO,IAAI,YAAY,SAAS,OAAO,IAAI;CAEhD,IAAI,SAAS,IAAI,QAAQ,IAAI,GAAG;CAChC,IAAI,CAAC,QAAQ;EACZ,SAAS,IAAI;EACb,IAAI,QAAQ,IAAI,KAAK,MAAM;EAE3B,OAAO,YAAY,IAAI,QAAQ,OAAO,GAAG,CAAC;CAC3C;CACA,OAAO;AACR"}
@@ -0,0 +1,126 @@
1
+ //#region src/sandbox/sandbox.d.ts
2
+ /**
3
+ * Where a deploy runs the project's own code.
4
+ *
5
+ * A deploy holds credentials — Dokploy's token, a registry login, an AWS key —
6
+ * and loading `gkm.config.ts`, sniffing an app's environment and building it
7
+ * all execute code from the repository being deployed. On a developer's own
8
+ * laptop that is the developer's code. On a CI job for a fork, or a shared
9
+ * build runner, it is not, and that code should not be able to read the
10
+ * credentials used to deploy it, hang the deploy, or reach outside the
11
+ * checkout.
12
+ *
13
+ * So every step that runs project code goes through a `Sandbox`: one call,
14
+ * with an argument array rather than a shell line, the complete environment
15
+ * the step needs rather than the host's, a timeout it cannot outlive, secrets
16
+ * as files rather than variables, and a working directory inside the project.
17
+ * The steps that need credentials — provisioning, pushing, releasing — are
18
+ * the deploy's own code and never run in one.
19
+ *
20
+ * `LocalSandbox` is the default: a child process on this machine with an
21
+ * allowlisted environment. A host that builds repositories it does not trust
22
+ * passes its own — a container per build, a VM — through `deploy()`'s
23
+ * `sandbox`.
24
+ */
25
+ /** Where a command's output goes. */
26
+ type SandboxOutput = 'capture' | 'inherit' | 'stderr' | 'ignore';
27
+ interface SandboxExecOptions {
28
+ /**
29
+ * Where the command runs: the project root or a directory below it, as an
30
+ * absolute path or relative to the root. Anywhere else is refused with
31
+ * {@link SandboxCwdEscape}.
32
+ */
33
+ cwd: string;
34
+ /**
35
+ * The command's whole environment. Nothing of the host's is added to it:
36
+ * start from {@link Sandbox.env} and add what the step needs.
37
+ */
38
+ env: Readonly<Record<string, string>>;
39
+ /**
40
+ * How long the command may run before it is killed. Required: a step that
41
+ * waits forever — a sniffed entry that opens a server, a build stuck on a
42
+ * prompt — would otherwise hold the deploy, and its lock, forever.
43
+ */
44
+ timeoutMs: number;
45
+ /**
46
+ * Files the command can read, by name. Mounted in a directory of their own
47
+ * — named by `GKM_SECRETS_DIR` in the command's environment — and removed
48
+ * when it exits. Never set as variables, which every child inherits, a
49
+ * crash report prints and `/proc/<pid>/environ` shows.
50
+ */
51
+ secrets?: Readonly<Record<string, string>>;
52
+ /**
53
+ * `capture` (the default) returns stdout and stderr in the result;
54
+ * `inherit` gives the command the host's terminal; `stderr` sends both
55
+ * streams to the host's stderr; `ignore` discards them.
56
+ */
57
+ output?: SandboxOutput;
58
+ /** Kills the command when aborted; `exec` rejects with the signal's reason. */
59
+ signal?: AbortSignal;
60
+ }
61
+ /** How a command ended. A non-zero exit is a result, not an error. */
62
+ interface SandboxResult {
63
+ exitCode: number | null;
64
+ signal: string | null;
65
+ /** What it wrote to stdout, when its output was captured. */
66
+ stdout: string;
67
+ /** What it wrote to stderr, when its output was captured. */
68
+ stderr: string;
69
+ }
70
+ /**
71
+ * Runs a command against the project, and nothing else of the host's.
72
+ *
73
+ * `exec` resolves with the result however the command exited. It rejects
74
+ * with {@link CommandTimedOut} once the timeout passes — after the command is
75
+ * gone — with {@link SandboxCwdEscape} for a directory outside the project,
76
+ * with the signal's reason when aborted, and with the spawn error when the
77
+ * program cannot be started.
78
+ */
79
+ interface Sandbox {
80
+ /** The project: the directory every command runs at or below. */
81
+ readonly root: string;
82
+ /**
83
+ * Whether the code it runs is kept from the host: its files, its
84
+ * processes, its memory.
85
+ *
86
+ * An isolating sandbox shares nothing but what crosses `exec`, so a config
87
+ * reaches the deploy as data — a live object in it (a custom state store,
88
+ * an inline target) cannot cross, and is refused with
89
+ * `ConfigObjectNotSerializable`. A non-isolating one, like
90
+ * {@link LocalSandbox}, runs on the host as the host's user; a project
91
+ * whose config holds live objects is then loaded in-process as before,
92
+ * because a project trusted to run there is trusted to do that.
93
+ */
94
+ readonly isolating: boolean;
95
+ /**
96
+ * The environment a command starts from: what any program needs to run
97
+ * here — `PATH`, `HOME`, the locale — and no credential.
98
+ */
99
+ readonly env: Readonly<Record<string, string>>;
100
+ exec(command: string, args: readonly string[], options: SandboxExecOptions): Promise<SandboxResult>;
101
+ }
102
+ /** The variable naming the directory a command's secrets are mounted in. */
103
+ declare const SECRETS_DIR_ENV = "GKM_SECRETS_DIR";
104
+ /** A command was asked to run outside the project. */
105
+ declare class SandboxCwdEscape extends Error {
106
+ readonly cwd: string;
107
+ readonly root: string;
108
+ constructor(cwd: string, root: string);
109
+ }
110
+ /**
111
+ * `cwd` as an absolute directory inside `root`, or {@link SandboxCwdEscape}.
112
+ *
113
+ * Symlinks are resolved on both sides first, so a link inside the project
114
+ * that points out of it is an escape, and a project reached through a link
115
+ * (`/tmp` on macOS) is still itself. For a sandbox of a host's own to call
116
+ * before it runs anything.
117
+ */
118
+ declare function confineCwd(root: string, cwd: string): string;
119
+ /** A secret's file name: one path segment, so it cannot be written elsewhere. */
120
+ declare class SecretNameInvalid extends Error {
121
+ readonly secretName: string;
122
+ constructor(secretName: string);
123
+ }
124
+ //#endregion
125
+ 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 };
126
+ //# sourceMappingURL=sandbox-M8UnLhXE.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sandbox-M8UnLhXE.d.cts","names":[],"sources":["../src/sandbox/sandbox.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;KA6BY;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"}