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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (260) hide show
  1. package/dist/{EndpointGenerator-BMRL04ic.mjs → EndpointGenerator-CusLH-9S.mjs} +2 -2
  2. package/dist/{EndpointGenerator-BMRL04ic.mjs.map → EndpointGenerator-CusLH-9S.mjs.map} +1 -1
  3. package/dist/{EndpointGenerator-ePscnbwB.cjs → EndpointGenerator-DyLMYClE.cjs} +2 -2
  4. package/dist/{EndpointGenerator-ePscnbwB.cjs.map → EndpointGenerator-DyLMYClE.cjs.map} +1 -1
  5. package/dist/{GoDaddyProvider-DxFAueU4.mjs → GoDaddyProvider-BIibcRG4.mjs} +2 -3
  6. package/dist/{GoDaddyProvider-DxFAueU4.mjs.map → GoDaddyProvider-BIibcRG4.mjs.map} +1 -1
  7. package/dist/{GoDaddyProvider-hAc0q5s-.cjs → GoDaddyProvider-C7Zt4dVy.cjs} +5 -6
  8. package/dist/{GoDaddyProvider-hAc0q5s-.cjs.map → GoDaddyProvider-C7Zt4dVy.cjs.map} +1 -1
  9. package/dist/{HostingerProvider-DEqpvoiD.cjs → HostingerProvider-BVhFhzCW.cjs} +2 -2
  10. package/dist/{HostingerProvider-DEqpvoiD.cjs.map → HostingerProvider-BVhFhzCW.cjs.map} +1 -1
  11. package/dist/{HostingerProvider-CgMuKgO_.mjs → HostingerProvider-DSHpNBim.mjs} +2 -2
  12. package/dist/{HostingerProvider-CgMuKgO_.mjs.map → HostingerProvider-DSHpNBim.mjs.map} +1 -1
  13. package/dist/{LegacyStateStore-BPY8Acgs.mjs → LegacyStateStore-Bd2I3zz7.mjs} +3 -3
  14. package/dist/{LegacyStateStore-BPY8Acgs.mjs.map → LegacyStateStore-Bd2I3zz7.mjs.map} +1 -1
  15. package/dist/{LegacyStateStore-BqSVgWi1.cjs → LegacyStateStore-DzRGMFhs.cjs} +3 -3
  16. package/dist/{LegacyStateStore-BqSVgWi1.cjs.map → LegacyStateStore-DzRGMFhs.cjs.map} +1 -1
  17. package/dist/{LocalStateStore-Df4RyGi2.cjs → LocalStateStore-Ci_tzIfp.cjs} +2 -2
  18. package/dist/{LocalStateStore-Df4RyGi2.cjs.map → LocalStateStore-Ci_tzIfp.cjs.map} +1 -1
  19. package/dist/{LocalStateStore-5pVR26KA.mjs → LocalStateStore-CzNrVQd2.mjs} +2 -2
  20. package/dist/{LocalStateStore-5pVR26KA.mjs.map → LocalStateStore-CzNrVQd2.mjs.map} +1 -1
  21. package/dist/{OpenApiTsGenerator-B-PQLx8X.mjs → OpenApiTsGenerator-BTMuu1WS.mjs} +2 -2
  22. package/dist/{OpenApiTsGenerator-B-PQLx8X.mjs.map → OpenApiTsGenerator-BTMuu1WS.mjs.map} +1 -1
  23. package/dist/{OpenApiTsGenerator-BvacdbiG.cjs → OpenApiTsGenerator-CI-tceXV.cjs} +2 -2
  24. package/dist/{OpenApiTsGenerator-BvacdbiG.cjs.map → OpenApiTsGenerator-CI-tceXV.cjs.map} +1 -1
  25. package/dist/{S3StateStore-Do1DwEMX.mjs → S3StateStore-DVtcCMEc.mjs} +4 -4
  26. package/dist/{S3StateStore-Do1DwEMX.mjs.map → S3StateStore-DVtcCMEc.mjs.map} +1 -1
  27. package/dist/{S3StateStore-uykstvZI.cjs → S3StateStore-LrKb9lH7.cjs} +5 -5
  28. package/dist/{S3StateStore-uykstvZI.cjs.map → S3StateStore-LrKb9lH7.cjs.map} +1 -1
  29. package/dist/{SSMStateStore-xQ-Ce91W.mjs → SSMStateStore-CNHYH6g7.mjs} +2 -2
  30. package/dist/{SSMStateStore-xQ-Ce91W.mjs.map → SSMStateStore-CNHYH6g7.mjs.map} +1 -1
  31. package/dist/{SSMStateStore-DQXFWqkE.cjs → SSMStateStore-CpkvL95K.cjs} +2 -2
  32. package/dist/{SSMStateStore-DQXFWqkE.cjs.map → SSMStateStore-CpkvL95K.cjs.map} +1 -1
  33. package/dist/{SubscriberGenerator-DR4Y7ihK.cjs → SubscriberGenerator-BNJyPmXJ.cjs} +3 -3
  34. package/dist/{SubscriberGenerator-DR4Y7ihK.cjs.map → SubscriberGenerator-BNJyPmXJ.cjs.map} +1 -1
  35. package/dist/{SubscriberGenerator-DLPH-ynS.mjs → SubscriberGenerator-CzPrixYu.mjs} +3 -3
  36. package/dist/{SubscriberGenerator-DLPH-ynS.mjs.map → SubscriberGenerator-CzPrixYu.mjs.map} +1 -1
  37. package/dist/{add-Y_nPkjIf.cjs → add-AlV6_ljM.cjs} +18 -17
  38. package/dist/{add-Y_nPkjIf.cjs.map → add-AlV6_ljM.cjs.map} +1 -1
  39. package/dist/{add-DLkN488n.mjs → add-B51nMuUd.mjs} +8 -7
  40. package/dist/{add-DLkN488n.mjs.map → add-B51nMuUd.mjs.map} +1 -1
  41. package/dist/apps-C1KiJqth.mjs +4593 -0
  42. package/dist/apps-C1KiJqth.mjs.map +1 -0
  43. package/dist/apps-CPdR2pYw.cjs +5002 -0
  44. package/dist/apps-CPdR2pYw.cjs.map +1 -0
  45. package/dist/{bundler-COOvv27I.cjs → bundler-B-hw8rJi.cjs} +9 -9
  46. package/dist/{bundler-COOvv27I.cjs.map → bundler-B-hw8rJi.cjs.map} +1 -1
  47. package/dist/{bundler-DFyrGST-.mjs → bundler-DbIt3a6I.mjs} +6 -6
  48. package/dist/{bundler-DFyrGST-.mjs.map → bundler-DbIt3a6I.mjs.map} +1 -1
  49. package/dist/{cli-DKsV-Myw.cjs → cli-6eYxU_Q2.cjs} +4 -4
  50. package/dist/{cli-DKsV-Myw.cjs.map → cli-6eYxU_Q2.cjs.map} +1 -1
  51. package/dist/{cli-iAX4BQ3t.mjs → cli-CmmrPCM_.mjs} +4 -4
  52. package/dist/{cli-iAX4BQ3t.mjs.map → cli-CmmrPCM_.mjs.map} +1 -1
  53. package/dist/compose-B2dCLbrc.cjs +1895 -0
  54. package/dist/compose-B2dCLbrc.cjs.map +1 -0
  55. package/dist/{compose-ofZIpp2q.mjs → compose-DVARqEeR.mjs} +16 -1828
  56. package/dist/compose-DVARqEeR.mjs.map +1 -0
  57. package/dist/{compose-CGXx22Wy.cjs → compose-D_fNsrkx.cjs} +101 -1967
  58. package/dist/compose-D_fNsrkx.cjs.map +1 -0
  59. package/dist/compose-kOpW9Pa1.mjs +1554 -0
  60. package/dist/compose-kOpW9Pa1.mjs.map +1 -0
  61. package/dist/config-BKpzKP6W.mjs +659 -0
  62. package/dist/config-BKpzKP6W.mjs.map +1 -0
  63. package/dist/config-QAqAEgb0.cjs +772 -0
  64. package/dist/config-QAqAEgb0.cjs.map +1 -0
  65. package/dist/config.cjs +16 -419
  66. package/dist/config.mjs +2 -405
  67. package/dist/{credentialSchemas-DZ2Nh5li.cjs → credentialSchemas-BAklWDna.cjs} +4 -5
  68. package/dist/{credentialSchemas-DZ2Nh5li.cjs.map → credentialSchemas-BAklWDna.cjs.map} +1 -1
  69. package/dist/{credentialSchemas-DUCSYl9a.mjs → credentialSchemas-mz9QZTYh.mjs} +2 -3
  70. package/dist/{credentialSchemas-DUCSYl9a.mjs.map → credentialSchemas-mz9QZTYh.mjs.map} +1 -1
  71. package/dist/credentials-CIpa4Hgs.cjs +2336 -0
  72. package/dist/credentials-CIpa4Hgs.cjs.map +1 -0
  73. package/dist/credentials-CWa7hRXd.mjs +1851 -0
  74. package/dist/credentials-CWa7hRXd.mjs.map +1 -0
  75. package/dist/{databases-P824RTnx.cjs → databases-DawSdqBI.cjs} +2 -2
  76. package/dist/{databases-P824RTnx.cjs.map → databases-DawSdqBI.cjs.map} +1 -1
  77. package/dist/{databases-Db48ZIXL.mjs → databases-mzSUFBTw.mjs} +2 -2
  78. package/dist/{databases-Db48ZIXL.mjs.map → databases-mzSUFBTw.mjs.map} +1 -1
  79. package/dist/deploy/public.cjs +24 -24
  80. package/dist/deploy/public.cjs.map +1 -1
  81. package/dist/deploy/public.d.cts.map +1 -1
  82. package/dist/deploy/public.d.mts.map +1 -1
  83. package/dist/deploy/public.mjs +13 -13
  84. package/dist/{deploy-BibGpDAz.cjs → deploy-CjJ447kd.cjs} +73 -72
  85. package/dist/{deploy-BibGpDAz.cjs.map → deploy-CjJ447kd.cjs.map} +1 -1
  86. package/dist/{deploy-C4QQkHK7.mjs → deploy-DqJiCwI9.mjs} +16 -15
  87. package/dist/{deploy-C4QQkHK7.mjs.map → deploy-DqJiCwI9.mjs.map} +1 -1
  88. package/dist/{discover-yqeJ2Bx7.cjs → discover-CRywE7yc.cjs} +157 -6
  89. package/dist/discover-CRywE7yc.cjs.map +1 -0
  90. package/dist/{discover-B2m8ytyq.mjs → discover-DbDrCQ8h.mjs} +117 -8
  91. package/dist/discover-DbDrCQ8h.mjs.map +1 -0
  92. package/dist/docker-CCzFCus7.mjs +1407 -0
  93. package/dist/docker-CCzFCus7.mjs.map +1 -0
  94. package/dist/docker-DK4rmb0u.cjs +1514 -0
  95. package/dist/docker-DK4rmb0u.cjs.map +1 -0
  96. package/dist/{dokploy-pSrsileA.mjs → dokploy-B5_Y5wf0.mjs} +2 -2
  97. package/dist/{dokploy-pSrsileA.mjs.map → dokploy-B5_Y5wf0.mjs.map} +1 -1
  98. package/dist/{dokploy-B_VX3nLM.cjs → dokploy-EJKX2T7M.cjs} +2 -2
  99. package/dist/{dokploy-B_VX3nLM.cjs.map → dokploy-EJKX2T7M.cjs.map} +1 -1
  100. package/dist/{drivers-C47nm-wB.cjs → drivers-aM87NQJi.cjs} +4 -91
  101. package/dist/drivers-aM87NQJi.cjs.map +1 -0
  102. package/dist/{drivers-CDjpjakg.mjs → drivers-uxLBq3e3.mjs} +3 -60
  103. package/dist/drivers-uxLBq3e3.mjs.map +1 -0
  104. package/dist/{eas-cSSc8Lex.cjs → eas-AqSay-vE.cjs} +6 -6
  105. package/dist/{eas-cSSc8Lex.cjs.map → eas-AqSay-vE.cjs.map} +1 -1
  106. package/dist/{eas-Bou-_M76.mjs → eas-BQlD6Z-u.mjs} +3 -3
  107. package/dist/{eas-Bou-_M76.mjs.map → eas-BQlD6Z-u.mjs.map} +1 -1
  108. package/dist/{encryption-CElaAwJs.cjs → encryption-B6_aL5d-.cjs} +6 -6
  109. package/dist/{encryption-CElaAwJs.cjs.map → encryption-B6_aL5d-.cjs.map} +1 -1
  110. package/dist/{encryption-Bps9As2D.mjs → encryption-Dlh5mcE1.mjs} +3 -3
  111. package/dist/{encryption-Bps9As2D.mjs.map → encryption-Dlh5mcE1.mjs.map} +1 -1
  112. package/dist/{engine-CiG7Wfyc.cjs → engine-BAkmPI2z.cjs} +99 -97
  113. package/dist/{engine-CiG7Wfyc.cjs.map → engine-BAkmPI2z.cjs.map} +1 -1
  114. package/dist/{engine-CXE4UOHj.mjs → engine-D3P2P6RK.mjs} +12 -10
  115. package/dist/{engine-CXE4UOHj.mjs.map → engine-D3P2P6RK.mjs.map} +1 -1
  116. package/dist/{github-BzppIvpw.cjs → github-DokGIXT-.cjs} +18 -17
  117. package/dist/{github-BzppIvpw.cjs.map → github-DokGIXT-.cjs.map} +1 -1
  118. package/dist/{github-CvFJlFWA.mjs → github-STWxD6cu.mjs} +9 -8
  119. package/dist/{github-CvFJlFWA.mjs.map → github-STWxD6cu.mjs.map} +1 -1
  120. package/dist/{googlePlay-BJnMCWoa.cjs → googlePlay-DL0htRJD.cjs} +5 -5
  121. package/dist/{googlePlay-BJnMCWoa.cjs.map → googlePlay-DL0htRJD.cjs.map} +1 -1
  122. package/dist/{googlePlay-RSe9wOfZ.mjs → googlePlay-uAyXzxlu.mjs} +5 -5
  123. package/dist/{googlePlay-RSe9wOfZ.mjs.map → googlePlay-uAyXzxlu.mjs.map} +1 -1
  124. package/dist/index.cjs +196 -192
  125. package/dist/index.cjs.map +1 -1
  126. package/dist/index.mjs +70 -66
  127. package/dist/index.mjs.map +1 -1
  128. package/dist/{local-OPC9BCZt.cjs → local-C6ndR_Wx.cjs} +6 -6
  129. package/dist/{local-OPC9BCZt.cjs.map → local-C6ndR_Wx.cjs.map} +1 -1
  130. package/dist/{local-B7Zv1NoA.mjs → local-CC7rdmgg.mjs} +3 -3
  131. package/dist/{local-B7Zv1NoA.mjs.map → local-CC7rdmgg.mjs.map} +1 -1
  132. package/dist/{migrate-BCBs0BMn.cjs → migrate-BbJUJ4CY.cjs} +6 -6
  133. package/dist/{migrate-BCBs0BMn.cjs.map → migrate-BbJUJ4CY.cjs.map} +1 -1
  134. package/dist/{migrate-Dmh5Dbcr.cjs → migrate-CMurhHuj.cjs} +15 -13
  135. package/dist/{migrate-Dmh5Dbcr.cjs.map → migrate-CMurhHuj.cjs.map} +1 -1
  136. package/dist/{migrate-B0nQra2W.mjs → migrate-D079sADO.mjs} +3 -3
  137. package/dist/{migrate-B0nQra2W.mjs.map → migrate-D079sADO.mjs.map} +1 -1
  138. package/dist/{migrate-BPCJBL7_.mjs → migrate-D27h4H79.mjs} +7 -5
  139. package/dist/{migrate-BPCJBL7_.mjs.map → migrate-D27h4H79.mjs.map} +1 -1
  140. package/dist/notes-B655tUny.cjs +500 -0
  141. package/dist/notes-B655tUny.cjs.map +1 -0
  142. package/dist/notes-wPJlNUj7.mjs +399 -0
  143. package/dist/notes-wPJlNUj7.mjs.map +1 -0
  144. package/dist/openapi.cjs +4 -5
  145. package/dist/openapi.cjs.map +1 -1
  146. package/dist/openapi.mjs +3 -4
  147. package/dist/openapi.mjs.map +1 -1
  148. package/dist/{projectBucket-BBbQ1lHF.cjs → projectBucket-Bs8ftcgB.cjs} +2 -2
  149. package/dist/{projectBucket-BBbQ1lHF.cjs.map → projectBucket-Bs8ftcgB.cjs.map} +1 -1
  150. package/dist/{projectBucket-C_DN4WzF.mjs → projectBucket-XVxyvW1y.mjs} +2 -2
  151. package/dist/{projectBucket-C_DN4WzF.mjs.map → projectBucket-XVxyvW1y.mjs.map} +1 -1
  152. package/dist/{publish-cthyGGQt.mjs → publish-B9BNIaf2.mjs} +2 -2
  153. package/dist/{publish-cthyGGQt.mjs.map → publish-B9BNIaf2.mjs.map} +1 -1
  154. package/dist/{publish-DKy3hn8a.cjs → publish-Bwgb-1JN.cjs} +2 -2
  155. package/dist/{publish-DKy3hn8a.cjs.map → publish-Bwgb-1JN.cjs.map} +1 -1
  156. package/dist/{ready-DuU0FXSj.cjs → ready-BNh3zsSn.cjs} +6 -6
  157. package/dist/{ready-DuU0FXSj.cjs.map → ready-BNh3zsSn.cjs.map} +1 -1
  158. package/dist/{ready-CGqJ74Kt.mjs → ready-g25dcGzK.mjs} +6 -6
  159. package/dist/{ready-CGqJ74Kt.mjs.map → ready-g25dcGzK.mjs.map} +1 -1
  160. package/dist/reconcile/public.cjs +1 -1
  161. package/dist/reconcile/public.mjs +1 -1
  162. package/dist/{resolve-BaRqJlqV.mjs → resolve-DheFxtmy.mjs} +4 -4
  163. package/dist/{resolve-BaRqJlqV.mjs.map → resolve-DheFxtmy.mjs.map} +1 -1
  164. package/dist/{resolve-AYtMIgoq.cjs → resolve-Dir9EjMu.cjs} +4 -4
  165. package/dist/{resolve-AYtMIgoq.cjs.map → resolve-Dir9EjMu.cjs.map} +1 -1
  166. package/dist/{rollback-DqV6t9oo.mjs → rollback-BWAB77F9.mjs} +8 -8
  167. package/dist/{rollback-DqV6t9oo.mjs.map → rollback-BWAB77F9.mjs.map} +1 -1
  168. package/dist/{rollback-CQ184yFu.cjs → rollback-CrtuUKqe.cjs} +11 -11
  169. package/dist/{rollback-CQ184yFu.cjs.map → rollback-CrtuUKqe.cjs.map} +1 -1
  170. package/dist/{s3-BKnL6YGQ.cjs → s3-DKJfDHUQ.cjs} +2 -2
  171. package/dist/{s3-BKnL6YGQ.cjs.map → s3-DKJfDHUQ.cjs.map} +1 -1
  172. package/dist/{s3-DW7SLsb8.mjs → s3-DNp8U0Ea.mjs} +2 -2
  173. package/dist/{s3-DW7SLsb8.mjs.map → s3-DNp8U0Ea.mjs.map} +1 -1
  174. package/dist/sandbox/credentials-worker.cjs +3 -4
  175. package/dist/sandbox/credentials-worker.cjs.map +1 -1
  176. package/dist/sandbox/credentials-worker.mjs +2 -3
  177. package/dist/sandbox/credentials-worker.mjs.map +1 -1
  178. package/dist/sandbox/discover-worker.cjs +1 -1
  179. package/dist/sandbox/discover-worker.mjs +1 -1
  180. package/dist/sandbox/migrate-worker.cjs +3 -4
  181. package/dist/sandbox/migrate-worker.cjs.map +1 -1
  182. package/dist/sandbox/migrate-worker.mjs +2 -3
  183. package/dist/sandbox/migrate-worker.mjs.map +1 -1
  184. package/dist/seeds-B3xvUAQf.cjs +363 -0
  185. package/dist/seeds-B3xvUAQf.cjs.map +1 -0
  186. package/dist/seeds-BCC8vAXR.mjs +298 -0
  187. package/dist/seeds-BCC8vAXR.mjs.map +1 -0
  188. package/dist/{serverSetup-Dnw9Kdel.cjs → serverSetup-BVL9HhNE.cjs} +9 -8
  189. package/dist/{serverSetup-Dnw9Kdel.cjs.map → serverSetup-BVL9HhNE.cjs.map} +1 -1
  190. package/dist/{serverSetup-AfG0-at8.mjs → serverSetup-D---hcyW.mjs} +7 -6
  191. package/dist/{serverSetup-AfG0-at8.mjs.map → serverSetup-D---hcyW.mjs.map} +1 -1
  192. package/dist/{sniffer-taO-AXSk.cjs → sniffer-BjHnOaCe.cjs} +9 -10
  193. package/dist/{sniffer-taO-AXSk.cjs.map → sniffer-BjHnOaCe.cjs.map} +1 -1
  194. package/dist/{sniffer-BHhJ8DiC.mjs → sniffer-DOyzfgPF.mjs} +8 -9
  195. package/dist/{sniffer-BHhJ8DiC.mjs.map → sniffer-DOyzfgPF.mjs.map} +1 -1
  196. package/dist/{snsSubscriptions-D_IBKhni.mjs → snsSubscriptions-Cf5DZfO5.mjs} +4 -453
  197. package/dist/snsSubscriptions-Cf5DZfO5.mjs.map +1 -0
  198. package/dist/{snsSubscriptions-CC-WM1zC.cjs → snsSubscriptions-DB0iRByH.cjs} +12 -559
  199. package/dist/snsSubscriptions-DB0iRByH.cjs.map +1 -0
  200. package/dist/{sst-Bz2HJlqc.mjs → sst-3V-rcKcw.mjs} +27 -5
  201. package/dist/sst-3V-rcKcw.mjs.map +1 -0
  202. package/dist/{sst-lvCHdYsY.cjs → sst-DuU7Ju0c.cjs} +29 -7
  203. package/dist/sst-DuU7Ju0c.cjs.map +1 -0
  204. package/dist/stack-BRKZ69bf.mjs +2307 -0
  205. package/dist/stack-BRKZ69bf.mjs.map +1 -0
  206. package/dist/stack-CmHjkg7D.cjs +2536 -0
  207. package/dist/stack-CmHjkg7D.cjs.map +1 -0
  208. package/dist/{stage-dd9dtLfh.mjs → stage-CTq3Gjsx.mjs} +7 -7
  209. package/dist/{stage-dd9dtLfh.mjs.map → stage-CTq3Gjsx.mjs.map} +1 -1
  210. package/dist/{stage-CTibxcpA.cjs → stage-s_8HOsH0.cjs} +13 -13
  211. package/dist/{stage-CTibxcpA.cjs.map → stage-s_8HOsH0.cjs.map} +1 -1
  212. package/dist/{stages--icWbhPy.cjs → stages-CFI0OiLj.cjs} +2 -2
  213. package/dist/{stages--icWbhPy.cjs.map → stages-CFI0OiLj.cjs.map} +1 -1
  214. package/dist/{stages-CUwSy39f.mjs → stages-DoYa81kN.mjs} +2 -2
  215. package/dist/{stages-CUwSy39f.mjs.map → stages-DoYa81kN.mjs.map} +1 -1
  216. package/dist/target/public.cjs +1 -1
  217. package/dist/target/public.mjs +1 -1
  218. package/dist/{terminal-DURcYlVX.cjs → terminal-ChxtuTYJ.cjs} +3 -3
  219. package/dist/{terminal-DURcYlVX.cjs.map → terminal-ChxtuTYJ.cjs.map} +1 -1
  220. package/dist/{terminal-yOZ7kKF9.mjs → terminal-oHKnZHkT.mjs} +3 -3
  221. package/dist/{terminal-yOZ7kKF9.mjs.map → terminal-oHKnZHkT.mjs.map} +1 -1
  222. package/dist/types-Bl_CwZC9.cjs +90 -0
  223. package/dist/types-Bl_CwZC9.cjs.map +1 -0
  224. package/dist/types-Y1NfWlyG.mjs +61 -0
  225. package/dist/types-Y1NfWlyG.mjs.map +1 -0
  226. package/dist/vitest.cjs +1 -1
  227. package/dist/vitest.mjs +1 -1
  228. package/package.json +15 -15
  229. package/dist/compose-CGXx22Wy.cjs.map +0 -1
  230. package/dist/compose-ofZIpp2q.mjs.map +0 -1
  231. package/dist/config.cjs.map +0 -1
  232. package/dist/config.mjs.map +0 -1
  233. package/dist/credentials-D7XJypNd.cjs +0 -520
  234. package/dist/credentials-D7XJypNd.cjs.map +0 -1
  235. package/dist/credentials-DpfnUvIR.mjs +0 -395
  236. package/dist/credentials-DpfnUvIR.mjs.map +0 -1
  237. package/dist/derive-Cd7Hl3r2.mjs +0 -259
  238. package/dist/derive-Cd7Hl3r2.mjs.map +0 -1
  239. package/dist/derive-CgZfoBU2.cjs +0 -282
  240. package/dist/derive-CgZfoBU2.cjs.map +0 -1
  241. package/dist/discover-B2m8ytyq.mjs.map +0 -1
  242. package/dist/discover-yqeJ2Bx7.cjs.map +0 -1
  243. package/dist/drivers-C47nm-wB.cjs.map +0 -1
  244. package/dist/drivers-CDjpjakg.mjs.map +0 -1
  245. package/dist/identity-CBXr4wNi.mjs +0 -129
  246. package/dist/identity-CBXr4wNi.mjs.map +0 -1
  247. package/dist/identity-CbLfgQNT.cjs +0 -182
  248. package/dist/identity-CbLfgQNT.cjs.map +0 -1
  249. package/dist/sandbox-CHv3OYXg.cjs +0 -165
  250. package/dist/sandbox-CHv3OYXg.cjs.map +0 -1
  251. package/dist/sandbox-CbVB7uOD.mjs +0 -118
  252. package/dist/sandbox-CbVB7uOD.mjs.map +0 -1
  253. package/dist/seeds-DndMeyzm.cjs +0 -10669
  254. package/dist/seeds-DndMeyzm.cjs.map +0 -1
  255. package/dist/seeds-o6x6BTRo.mjs +0 -9534
  256. package/dist/seeds-o6x6BTRo.mjs.map +0 -1
  257. package/dist/snsSubscriptions-CC-WM1zC.cjs.map +0 -1
  258. package/dist/snsSubscriptions-D_IBKhni.mjs.map +0 -1
  259. package/dist/sst-Bz2HJlqc.mjs.map +0 -1
  260. package/dist/sst-lvCHdYsY.cjs.map +0 -1
@@ -0,0 +1,1514 @@
1
+ const require_errors = require("./errors-DMC4Umsb.cjs");
2
+ const require_credentials = require("./credentials-CIpa4Hgs.cjs");
3
+ const require_compose = require("./compose-B2dCLbrc.cjs");
4
+ const require_apps = require("./apps-CPdR2pYw.cjs");
5
+ const require_SubscriberGenerator = require("./SubscriberGenerator-BNJyPmXJ.cjs");
6
+ const require_config = require("./config-QAqAEgb0.cjs");
7
+ const require_EndpointGenerator = require("./EndpointGenerator-DyLMYClE.cjs");
8
+ const require_discover = require("./discover-CRywE7yc.cjs");
9
+ let node_path = require("node:path");
10
+ let node_fs = require("node:fs");
11
+ let node_fs_promises = require("node:fs/promises");
12
+ let _geekmidas_manifest = require("@geekmidas/manifest");
13
+ let _geekmidas_constructs_crons = require("@geekmidas/constructs/crons");
14
+ let _geekmidas_constructs_processors = require("@geekmidas/constructs/processors");
15
+ let _geekmidas_constructs_queue = require("@geekmidas/constructs/queue");
16
+ //#region src/docker/imageRef.ts
17
+ /**
18
+ * An image reference, checked before it reaches `docker`.
19
+ *
20
+ * The parts come from the workspace — a registry in `gkm.config.ts`, an image
21
+ * name from the project, a tag from `--tag` — and an argument array already
22
+ * keeps them out of a shell. What it cannot do is stop `docker` reading a value
23
+ * that starts with `-` as one of its own flags, so a ref is held to Docker's
24
+ * own grammar (distribution/reference) and anything else is refused by name
25
+ * before a build starts.
26
+ */
27
+ const DOMAIN_COMPONENT = "(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])";
28
+ const DOMAIN = `${DOMAIN_COMPONENT}(?:\\.${DOMAIN_COMPONENT})*(?::[0-9]+)?`;
29
+ const PATH_COMPONENT = "[a-z0-9]+(?:(?:[._]|__|-+)[a-z0-9]+)*";
30
+ const REFERENCE = new RegExp(`^(?:${DOMAIN}/)?${PATH_COMPONENT}(?:/${PATH_COMPONENT})*(?::[\\w][\\w.-]{0,127})?(?:@[A-Za-z][A-Za-z0-9]*(?:[-_+.][A-Za-z][A-Za-z0-9]*)*:[0-9a-fA-F]{32,})?$`);
31
+ /** Docker refuses a repository name longer than this. */
32
+ const MAX_NAME_LENGTH = 255;
33
+ /** A value that is not an image reference was about to be built or pushed. */
34
+ var ImageRefInvalid = class extends require_errors.GkmError {
35
+ ref;
36
+ constructor(ref) {
37
+ super(`'${ref}' is not a valid image reference. An image is \`[registry/]name[:tag]\`: the name lowercase letters, digits and . _ - separators, the tag up to 128 of letters, digits, _ . and -, not starting with . or -. Check docker.registry in gkm.config.ts and the --tag passed.`);
38
+ this.ref = ref;
39
+ this.name = "ImageRefInvalid";
40
+ }
41
+ };
42
+ /** Throw {@link ImageRefInvalid} unless `ref` is a Docker image reference. */
43
+ function validateImageRef(ref) {
44
+ const name = ref.split("@")[0].replace(/:[\w][\w.-]*$/, "");
45
+ if (!REFERENCE.test(ref) || name.length > MAX_NAME_LENGTH) throw new ImageRefInvalid(ref);
46
+ return ref;
47
+ }
48
+ //#endregion
49
+ //#region src/generators/ProcessorGenerator.ts
50
+ /** Where a file server's processor entry lives, under an app's `.gkm/server`. */
51
+ function processorEntryDir(serverDir, fileServerId) {
52
+ return (0, node_path.join)(serverDir, "processors", require_apps.processorUnitName(fileServerId));
53
+ }
54
+ /** The file its bundle is written to, beside the server's. */
55
+ function processorBundleName(fileServerId) {
56
+ return `${require_apps.processorUnitName(fileServerId)}.mjs`;
57
+ }
58
+ /**
59
+ * A file server's processors, as the build generates them.
60
+ *
61
+ * On AWS each is a Lambda behind a function URL — the CDN's origin for its
62
+ * pattern. On a server they are one process per file server, the processor
63
+ * unit (see {@link ProcessorGenerator.buildEntry}), so the `server` target
64
+ * generates nothing per processor here.
65
+ */
66
+ var ProcessorGenerator = class extends require_discover.ConstructGenerator {
67
+ isConstruct(value) {
68
+ return _geekmidas_constructs_processors.Processor.isProcessor(value);
69
+ }
70
+ async build(context, constructs, outputDir, options) {
71
+ if ((options?.target ?? "aws") !== "aws" || constructs.length === 0) return [];
72
+ const dir = (0, node_path.join)(outputDir, "processors");
73
+ await (0, node_fs_promises.mkdir)(dir, { recursive: true });
74
+ const infos = [];
75
+ for (const { key, construct, path } of constructs) {
76
+ const file = (0, node_path.join)(dir, `${key}.ts`);
77
+ const importPath = (0, node_path.relative)((0, node_path.dirname)(file), path.relative).replace(/\.ts$/, ".js");
78
+ await (0, node_fs_promises.writeFile)(file, `import { AWSLambdaProcessor } from '@geekmidas/constructs/processors';
79
+ import { ${key} } from '${importPath}';
80
+ ${context.storageDrivers?.imports ?? ""}
81
+ ${context.storageDrivers?.setup ? `\n// The handler registers the drivers its target needs.\n${context.storageDrivers.setup}\n` : ""}
82
+ const adapter = new AWSLambdaProcessor(${key});
83
+
84
+ export const handler = adapter.handler;
85
+ `);
86
+ infos.push(await processorInfo(key, construct, (0, node_path.relative)(options?.root ?? process.cwd(), file).replace(/\.ts$/, ".handler"), context));
87
+ }
88
+ return infos;
89
+ }
90
+ /**
91
+ * `gkm dev`'s half: `processors.ts` beside the dev server's app, mounting
92
+ * each file server's processors under `/__gkm/processors/<FileServer>`.
93
+ * The local edge sends each pattern on the file server's host there, so
94
+ * `processedUrl()` answers locally as it does deployed.
95
+ *
96
+ * In the dev server's own process rather than a unit of its own: locally
97
+ * there is no CPU to protect, and the dev server already reloads on change.
98
+ */
99
+ async buildDev(outputDir, processors) {
100
+ await (0, node_fs_promises.mkdir)(outputDir, { recursive: true });
101
+ const file = (0, node_path.join)(outputDir, "processors.ts");
102
+ const imports = processors.map(({ key, path }) => {
103
+ const specifier = (0, node_path.relative)(outputDir, path.absolute).replace(/\.ts$/, ".js");
104
+ return `import { ${key} } from '${specifier.startsWith(".") ? specifier : `./${specifier}`}';`;
105
+ }).join("\n");
106
+ const byServer = /* @__PURE__ */ new Map();
107
+ for (const { key, construct } of processors) byServer.set(construct.surfaceId, [...byServer.get(construct.surfaceId) ?? [], key]);
108
+ const units = [...byServer.entries()].map(([id, keys]) => ` ${JSON.stringify(id)}: [${keys.join(", ")}],`).join("\n");
109
+ await (0, node_fs_promises.writeFile)(file, `/**
110
+ * Generated processors setup for \`gkm dev\`.
111
+ *
112
+ * Each file server's processors, under ${require_apps.PROCESSORS_DEV_PREFIX}<FileServer>: the
113
+ * local edge rewrites each processor pattern on the file server's host here.
114
+ */
115
+ import type { EnvironmentParser } from '@geekmidas/envkit';
116
+ import { processorServer } from '@geekmidas/constructs/processors';
117
+ ${imports}
118
+
119
+ export function setupProcessors(
120
+ app: { all: (path: string, handler: (c: any) => unknown) => unknown },
121
+ envParser: EnvironmentParser<any>,
122
+ ): void {
123
+ const units: Record<string, ReturnType<typeof processorServer>> = Object.fromEntries(
124
+ Object.entries({
125
+ ${units}
126
+ }).map(([id, processors]) => [id, processorServer(processors, envParser)]),
127
+ );
128
+
129
+ app.all('${require_apps.PROCESSORS_DEV_PREFIX}:server/*', async (c: any) => {
130
+ const server = c.req.param('server') as string;
131
+ const serve = units[server];
132
+ if (!serve) return c.notFound();
133
+ const path = c.req.path.slice(\`${require_apps.PROCESSORS_DEV_PREFIX}\${server}\`.length) || '/';
134
+ const response = await serve({ method: c.req.method, path });
135
+ if (!response) {
136
+ return new Response(null, {
137
+ status: 404,
138
+ headers: { 'cache-control': 'public, max-age=60' },
139
+ });
140
+ }
141
+ return new Response(c.req.method === 'HEAD' ? null : response.body, {
142
+ status: response.status,
143
+ headers: response.headers,
144
+ });
145
+ });
146
+ }
147
+ `);
148
+ return file;
149
+ }
150
+ /**
151
+ * A file server's processor unit: one process answering each of its
152
+ * processors' patterns, and `/health`. Returns its entry, `processors.ts`.
153
+ *
154
+ * Its own process because making a derivative is CPU-bound — a resize
155
+ * spike in the API's process would be every request's latency.
156
+ */
157
+ async buildEntry(input) {
158
+ const { context, outputDir, processors } = input;
159
+ await (0, node_fs_promises.mkdir)(outputDir, { recursive: true });
160
+ await require_EndpointGenerator.writeTelemetryModule(outputDir, input.telemetry);
161
+ const healthCheck = context.production?.healthCheck ?? "/health";
162
+ const imports = processors.map(({ key, path }) => {
163
+ const specifier = (0, node_path.relative)(outputDir, path.absolute).replace(/\.ts$/, ".js");
164
+ return `import { ${key} } from '${specifier.startsWith(".") ? specifier : `./${specifier}`}';`;
165
+ }).join("\n");
166
+ const entry = (0, node_path.join)(outputDir, "processors.ts");
167
+ await (0, node_fs_promises.writeFile)(entry, `#!/usr/bin/env node
168
+ /**
169
+ * Production entry for ${input.fileServerId}'s processors.
170
+ * Generated by 'gkm build --production'.
171
+ *
172
+ * Answers each processor's pattern, and ${healthCheck} on PORT. The edge
173
+ * routes only those patterns here; everything else on the file server's
174
+ * domain is the bucket.
175
+ */
176
+ import { timingSafeEqual } from 'node:crypto';
177
+ import { createServer } from 'node:http';
178
+ import { runShutdownHooks } from '@geekmidas/constructs';
179
+ import { processorServer } from '@geekmidas/constructs/processors';
180
+ ${context.storageDrivers?.imports ?? ""}
181
+ ${imports}
182
+
183
+ ${require_EndpointGenerator.startTelemetryCode([healthCheck])}
184
+ ${context.storageDrivers?.setup ? `// The entry point registers the drivers its target needs.\n${context.storageDrivers.setup}\n` : ""}
185
+ process.env.GKM_APP_NAME ??= ${JSON.stringify(require_apps.processorUnitName(input.fileServerId))};
186
+
187
+ const processors = [${processors.map(({ key }) => key).join(", ")}];
188
+ const serve = processorServer(processors);
189
+ const port = Number(process.env.PORT) || 3000;
190
+ let stopping = false;
191
+
192
+ ${input.telemetry ? REQUEST_SPANS : NO_REQUEST_SPANS}
193
+ // Where the CDN fronts this unit, the secret it adds to every request: one
194
+ // without it is refused here, whatever the edge in front did or could not.
195
+ const originSecret = process.env.${require_credentials.PROCESSOR_ORIGIN_SECRET_ENV}
196
+ ? Buffer.from(process.env.${require_credentials.PROCESSOR_ORIGIN_SECRET_ENV})
197
+ : undefined;
198
+ const fromOrigin = (header: string | string[] | undefined) => {
199
+ if (!originSecret) return true;
200
+ const given = Buffer.from(typeof header === 'string' ? header : '');
201
+ return given.length === originSecret.length && timingSafeEqual(given, originSecret);
202
+ };
203
+
204
+ const server = createServer(async (req, res) => {
205
+ const method = req.method ?? 'GET';
206
+ const path = (req.url ?? '/').split('?')[0] ?? '/';
207
+ if (path === ${JSON.stringify(healthCheck)}) {
208
+ res.writeHead(stopping ? 503 : 200, { 'content-type': 'application/json' });
209
+ res.end(JSON.stringify({ status: stopping ? 'stopping' : 'ok' }));
210
+ return;
211
+ }
212
+ if (!fromOrigin(req.headers[${JSON.stringify(require_credentials.ORIGIN_VERIFY_HEADER.toLowerCase())}])) {
213
+ res.writeHead(403, { 'cache-control': 'no-store' }).end();
214
+ return;
215
+ }
216
+ await traced(method, path, async () => {
217
+ try {
218
+ const response = await serve({ method, path });
219
+ if (!response) {
220
+ res.writeHead(404, { 'cache-control': 'public, max-age=60' }).end();
221
+ return 404;
222
+ }
223
+ res.writeHead(response.status, response.headers);
224
+ res.end(method === 'HEAD' ? undefined : response.body);
225
+ return response.status;
226
+ } catch (error) {
227
+ console.error(error);
228
+ res.writeHead(500, { 'cache-control': 'no-store' }).end();
229
+ return 500;
230
+ }
231
+ });
232
+ });
233
+ server.listen(port);
234
+
235
+ const shutdown = async () => {
236
+ if (stopping) return;
237
+ stopping = true;
238
+ setTimeout(() => process.exit(1), Number(process.env.GKM_SHUTDOWN_TIMEOUT_MS) || 8000).unref();
239
+ server.close();
240
+ await runShutdownHooks((error) => console.error(error));
241
+ process.exit(0);
242
+ };
243
+ process.on('SIGTERM', shutdown);
244
+ process.on('SIGINT', shutdown);
245
+ `);
246
+ return entry;
247
+ }
248
+ };
249
+ /**
250
+ * A SERVER span per request, once telemetry has started — opened by the unit
251
+ * rather than by hooking node:http, which sees nothing inside a bundle. Named
252
+ * after the processor's pattern, never the key, which has no bound.
253
+ *
254
+ * Only in an entry whose file server has a `Telemetry` node: the bundle
255
+ * follows the import, and an app without one need not install the API.
256
+ */
257
+ const REQUEST_SPANS = `const tracing = requestSpans ? await import('@opentelemetry/api') : undefined;
258
+ const routeOf = (path: string) =>
259
+ processors.find((processor) => path.startsWith(processor.prefix))?.pattern;
260
+
261
+ async function traced(
262
+ method: string,
263
+ path: string,
264
+ run: () => Promise<number>,
265
+ ): Promise<void> {
266
+ if (!tracing) {
267
+ await run();
268
+ return;
269
+ }
270
+ const route = routeOf(path);
271
+ await tracing.trace.getTracer('@geekmidas/processors').startActiveSpan(
272
+ route ? \`\${method} \${route}\` : method,
273
+ {
274
+ kind: tracing.SpanKind.SERVER,
275
+ attributes: {
276
+ 'http.request.method': method,
277
+ 'url.path': path,
278
+ ...(route ? { 'http.route': route } : {}),
279
+ },
280
+ },
281
+ async (span) => {
282
+ try {
283
+ const status = await run();
284
+ span.setAttribute('http.response.status_code', status);
285
+ if (status >= 500) span.setStatus({ code: tracing.SpanStatusCode.ERROR });
286
+ } finally {
287
+ span.end();
288
+ }
289
+ },
290
+ );
291
+ }
292
+ `;
293
+ /** The same shape without telemetry: each request just runs. */
294
+ const NO_REQUEST_SPANS = `async function traced(
295
+ _method: string,
296
+ _path: string,
297
+ run: () => Promise<number>,
298
+ ): Promise<void> {
299
+ await run();
300
+ }
301
+ `;
302
+ /** What the manifest records of one processor. */
303
+ async function processorInfo(name, processor, handler, context) {
304
+ return {
305
+ name,
306
+ handler,
307
+ fileServer: processor.surfaceId,
308
+ path: processor.pattern,
309
+ prefix: processor.prefix,
310
+ ...processor.native.length ? { native: [...processor.native] } : {},
311
+ ...processor.timeout !== void 0 ? { timeout: processor.timeout } : {},
312
+ ...processor.memorySize !== void 0 ? { memorySize: processor.memorySize } : {},
313
+ environment: await processor.getEnvironment({ markOptional: context.markOptional }),
314
+ dependencies: processor.constructs
315
+ };
316
+ }
317
+ //#endregion
318
+ //#region src/generators/CronGenerator.ts
319
+ var CronGenerator = class extends require_discover.ConstructGenerator {
320
+ async build(context, constructs, outputDir, options) {
321
+ const target = options?.target ?? "aws";
322
+ const logger = console;
323
+ const cronInfos = [];
324
+ if (target === "server") {
325
+ await this.generateServerCronsFile(outputDir, constructs);
326
+ logger.log(`Generated server crons file with ${constructs.length} crons`);
327
+ return cronInfos;
328
+ }
329
+ if (constructs.length === 0) return cronInfos;
330
+ const cronsDir = (0, node_path.join)(outputDir, "crons");
331
+ await (0, node_fs_promises.mkdir)(cronsDir, { recursive: true });
332
+ for (const { key, construct, path } of constructs) {
333
+ const handlerFile = await this.generateCronHandler(cronsDir, path.relative, key, context, construct.owner);
334
+ cronInfos.push({
335
+ name: key,
336
+ handler: (0, node_path.relative)(options?.root ?? process.cwd(), handlerFile).replace(/\.ts$/, ".handler"),
337
+ schedule: construct.schedule || "rate(1 hour)",
338
+ timeout: construct.timeout,
339
+ memorySize: construct.memorySize,
340
+ environment: await construct.getEnvironment({ markOptional: context.markOptional }),
341
+ dependencies: construct.constructs
342
+ });
343
+ logger.log(`Generated cron handler: ${key}`);
344
+ }
345
+ return cronInfos;
346
+ }
347
+ isConstruct(value) {
348
+ return _geekmidas_constructs_crons.Cron.isCron(value);
349
+ }
350
+ /**
351
+ * The crons file a server entry imports.
352
+ *
353
+ * Shaped after `generateServerSubscribersFile`: one module, every cron, a
354
+ * `setupCrons` the generated entry calls beside `setupSubscribers`.
355
+ *
356
+ * It picks its scheduler from what the process can reach. With a Postgres it
357
+ * uses pg-boss, whose schedules live in the database — so a deployment
358
+ * running four replicas fires each job once, which is the thing a timer in
359
+ * every process gets wrong and does not report. With no database it falls
360
+ * back to timers and says plainly that it is doing so.
361
+ */
362
+ async generateServerCronsFile(outputDir, crons) {
363
+ await (0, node_fs_promises.mkdir)(outputDir, { recursive: true });
364
+ const cronsPath = (0, node_path.join)(outputDir, "crons.ts");
365
+ if (crons.length === 0) {
366
+ await (0, node_fs_promises.writeFile)(cronsPath, `/**
367
+ * Generated cron setup — this app declares none.
368
+ */
369
+ import type { EnvironmentParser } from '@geekmidas/envkit';
370
+ import type { Logger } from '@geekmidas/logger';
371
+
372
+ export async function setupCrons(
373
+ _envParser: EnvironmentParser<any>,
374
+ _logger: Logger,
375
+ ): Promise<void> {}
376
+
377
+ export function cronsStatus(): { failed: string[]; connections: unknown[] } {
378
+ return { failed: [], connections: [] };
379
+ }
380
+
381
+ export async function stopCrons(): Promise<void> {}
382
+ `);
383
+ return cronsPath;
384
+ }
385
+ const importsByFile = /* @__PURE__ */ new Map();
386
+ for (const { path, key } of crons) {
387
+ const importPath = (0, node_path.relative)((0, node_path.dirname)(cronsPath), path.relative).replace(/\.ts$/, ".js");
388
+ if (!importsByFile.has(importPath)) importsByFile.set(importPath, []);
389
+ importsByFile.get(importPath)?.push(key);
390
+ }
391
+ const content = `/**
392
+ * Generated cron setup.
393
+ *
394
+ * Schedules every cron this app declares, in the process that serves it.
395
+ *
396
+ * The schedule lives in Postgres, through pg-boss, in the database the worker
397
+ * named with \`.database(db)\`. That is what makes running several replicas
398
+ * safe: each job fires once, where a timer in every process fires it once per
399
+ * replica and reports nothing.
400
+ *
401
+ * No connection string appears here. The construct that owns the database is
402
+ * the only thing that knows its key, and it is resolved through service
403
+ * discovery like any other dependency.
404
+ */
405
+ import type { EnvironmentParser } from '@geekmidas/envkit';
406
+ import type { Logger } from '@geekmidas/logger';
407
+ import { runCron, scheduleInProcess, toCronExpression } from '@geekmidas/constructs/crons';
408
+ import { ServiceDiscovery } from '@geekmidas/services';
409
+ ${Array.from(importsByFile.entries()).map(([importPath, exports]) => `import { ${exports.join(", ")} } from '${importPath}';`).join("\n")}
410
+
411
+ const crons = [
412
+ ${crons.map(({ key }) => ` { name: '${key}', cron: ${key} }`).join(",\n")}
413
+ ];
414
+
415
+ type Stoppable = { stop: () => Promise<void> | void };
416
+ const running: Stoppable[] = [];
417
+ // What a worker's health check reads: the crons that cannot be scheduled, and
418
+ // the broker connection the schedule is kept through.
419
+ const failed: string[] = [];
420
+ const connections: import('@geekmidas/events').EventConnection[] = [];
421
+
422
+ export async function setupCrons(
423
+ envParser: EnvironmentParser<any>,
424
+ logger: Logger,
425
+ ): Promise<void> {
426
+ if (crons.length === 0) {
427
+ return;
428
+ }
429
+
430
+ const serviceDiscovery = ServiceDiscovery.getInstance(envParser);
431
+
432
+ // Resolved once per cron rather than per firing: registering services on
433
+ // every tick would reconnect a database every minute.
434
+ const prepared = [];
435
+ for (const { name, cron } of crons) {
436
+ try {
437
+ const schedule = toCronExpression(cron.schedule);
438
+ const services = cron.services.length > 0
439
+ ? await serviceDiscovery.register(cron.services)
440
+ : {};
441
+
442
+ prepared.push({ name, cron, schedule, services });
443
+ } catch (error) {
444
+ // An unrepresentable schedule is a build-time mistake, and failing the
445
+ // process for it would take the HTTP server down with it.
446
+ logger.error({ err: error, cron: name }, 'Cron has no runnable schedule, skipping');
447
+ failed.push(name);
448
+ }
449
+ }
450
+
451
+ const run = async (entry: (typeof prepared)[number]) => {
452
+ try {
453
+ // The cron's own function, the way its Lambda would run it — services,
454
+ // the worker's database as \`db\`, its events. It used to call a
455
+ // \`handler\` a Cron does not have, so every firing logged a failure.
456
+ await runCron(entry.cron, serviceDiscovery, entry.name);
457
+ } catch (error) {
458
+ logger.error({ err: error, cron: entry.name }, 'Cron failed');
459
+ }
460
+ };
461
+
462
+ // The app's one pg-boss: the events broker's, as the broker's role, in the
463
+ // broker's schema. A server fires its own crons, and a process scheduling in
464
+ // memory fires each job once per replica — so the schedule lives in
465
+ // Postgres. It used to be a second pg-boss on the worker's database, as the
466
+ // runtime role, which can neither create a schema nor use the broker's.
467
+ const { url, devPid } = envParser
468
+ .create((get) => ({
469
+ url: get('EVENT_PUBLISHER_CONNECTION_STRING').string().optional(),
470
+ // Set by \`gkm dev\` on the server it starts, and by nothing deployed.
471
+ devPid: get('GKM_DEV_PID').string().optional(),
472
+ }))
473
+ .parse();
474
+
475
+ if (!url?.startsWith('pgboss://')) {
476
+ // \`gkm dev\` on a target whose crons are infrastructure once deployed —
477
+ // EventBridge rules on AWS — has no broker to keep a schedule in. It is one
478
+ // process, so a timer fires each job once, which is all pg-boss is for
479
+ // here. Only there: a deployed server firing by timer fires once per
480
+ // replica, so outside dev this stays the error below.
481
+ if (devPid) {
482
+ for (const entry of prepared) {
483
+ running.push(scheduleInProcess(entry.schedule, () => run(entry)));
484
+ logger.info({ cron: entry.name, schedule: entry.schedule }, 'Cron scheduled in this process');
485
+ }
486
+ return;
487
+ }
488
+
489
+ logger.error(
490
+ { crons: prepared.map(({ name }) => name) },
491
+ 'These crons have nowhere to keep their schedule. On a server they are ' +
492
+ 'scheduled through the pg-boss events broker ' +
493
+ '(EVENT_PUBLISHER_CONNECTION_STRING), and ' +
494
+ (url ? 'the broker configured is not pg-boss.' : 'none is configured.'),
495
+ );
496
+ failed.push(...prepared.map(({ name }) => name));
497
+ return;
498
+ }
499
+
500
+ // Through the registered pg-boss driver, which the entry registers for a
501
+ // server whose broker is pg-boss. Naming \`@geekmidas/events/pgboss\` here
502
+ // made every bundle with a cron resolve pg-boss, whatever its broker.
503
+ const { EventConnectionFactory } = await import('@geekmidas/events');
504
+ const connection = (await EventConnectionFactory.fromConnectionString(
505
+ url,
506
+ )) as import('@geekmidas/events').EventConnection & { instance?: any };
507
+ const boss = connection.instance!;
508
+
509
+ // What this app declares now. Anything else under the prefix belonged to a
510
+ // cron since renamed or deleted, and would keep firing at a handler that has
511
+ // gone.
512
+ //
513
+ // The prefix is \`cron.\` rather than \`cron:\`: pg-boss accepts
514
+ // alphanumerics, underscores, hyphens, periods and slashes in a queue name,
515
+ // and rejects a colon outright.
516
+ const declared = new Set(prepared.map(({ name }) => \`cron.\${name}\`));
517
+ for (const existing of await boss.getSchedules()) {
518
+ if (existing.name.startsWith('cron.') && !declared.has(existing.name)) {
519
+ await boss.unschedule(existing.name);
520
+ logger.info({ cron: existing.name }, 'Removed a schedule nothing declares');
521
+ }
522
+ }
523
+
524
+ for (const entry of prepared) {
525
+ const queue = \`cron.\${entry.name}\`;
526
+ await boss.createQueue(queue);
527
+ // UTC, so this agrees with the schedule a deploy target would have made.
528
+ await boss.schedule(queue, entry.schedule, undefined, { tz: 'UTC' });
529
+ await boss.work(queue, () => run(entry));
530
+
531
+ logger.info({ cron: entry.name, schedule: entry.schedule }, 'Cron scheduled');
532
+ }
533
+
534
+ running.push({ stop: () => connection.close() });
535
+ connections.push(connection);
536
+ logger.info({ count: prepared.length }, 'Crons scheduled');
537
+ }
538
+
539
+ /** The crons that cannot be scheduled, and the connection that schedules the rest. */
540
+ export function cronsStatus(): {
541
+ failed: string[];
542
+ connections: import('@geekmidas/events').EventConnection[];
543
+ } {
544
+ return { failed: [...failed], connections: [...connections] };
545
+ }
546
+
547
+ /**
548
+ * Stop scheduling, let a firing in flight finish, and close the broker
549
+ * connection — pg-boss's graceful stop does all three. The caller bounds it.
550
+ */
551
+ export async function stopCrons(): Promise<void> {
552
+ const open = [...running];
553
+ running.length = 0;
554
+ connections.length = 0;
555
+ await Promise.all(open.map((r) => r.stop()));
556
+ }
557
+ `;
558
+ await (0, node_fs_promises.writeFile)(cronsPath, content);
559
+ return cronsPath;
560
+ }
561
+ async generateCronHandler(outputDir, sourceFile, exportName, context, owner) {
562
+ const handlerFileName = `${exportName}.ts`;
563
+ const handlerPath = (0, node_path.join)(outputDir, handlerFileName);
564
+ const importPath = (0, node_path.relative)((0, node_path.dirname)(handlerPath), sourceFile).replace(/\.ts$/, ".js");
565
+ const runtime = require_EndpointGenerator.runtimeFor(context, (0, node_path.dirname)(handlerPath), owner);
566
+ const content = `import { AWSScheduledFunction } from '@geekmidas/constructs/aws';
567
+ import { ${exportName} } from '${importPath}';
568
+ ${runtime.imports}
569
+ ${context.storageDrivers?.imports ?? ""}
570
+ ${runtime.bindings}
571
+ ${context.storageDrivers?.setup ? `\n// The handler registers the drivers its target needs.\n${context.storageDrivers.setup}\n` : ""}
572
+ const adapter = new AWSScheduledFunction(envParser, ${exportName});
573
+
574
+ export const handler = adapter.handler;
575
+ `;
576
+ await (0, node_fs_promises.writeFile)(handlerPath, content);
577
+ return handlerPath;
578
+ }
579
+ };
580
+ //#endregion
581
+ //#region src/generators/QueueGenerator.ts
582
+ /**
583
+ * Generates the runtime for queue consumers (`worker.queue(…)`).
584
+ *
585
+ * - **server** (`gkm dev`): a single `queues.ts` exposing `setupQueues()` that
586
+ * polls each queue in-process, alongside the Hono server, through the queue's
587
+ * own connection string — pg-boss by default, SQS on the AWS emulator.
588
+ * - **aws-lambda**: one handler file per queue wrapping `AWSLambdaQueue`, backed
589
+ * by an SQS event-source mapping.
590
+ */
591
+ var QueueGenerator = class extends require_discover.ConstructGenerator {
592
+ isConstruct(value) {
593
+ return _geekmidas_constructs_queue.Queue.isQueue(value);
594
+ }
595
+ async build(context, constructs, outputDir, options) {
596
+ const target = options?.target ?? "aws";
597
+ const logger = console;
598
+ const queueInfos = [];
599
+ if (target === "server") {
600
+ await this.generateServerQueuesFile(outputDir, constructs);
601
+ logger.log(`Generated server queues file with ${constructs.length} queues (polling mode)`);
602
+ return queueInfos;
603
+ }
604
+ if (constructs.length === 0) return queueInfos;
605
+ const queuesDir = (0, node_path.join)(outputDir, "queues");
606
+ await (0, node_fs_promises.mkdir)(queuesDir, { recursive: true });
607
+ for (const { key, construct, path } of constructs) {
608
+ const handlerFile = await this.generateQueueHandler(queuesDir, path.relative, key, context, construct.owner);
609
+ queueInfos.push({
610
+ name: construct.name,
611
+ handler: (0, node_path.relative)(options?.root ?? process.cwd(), handlerFile).replace(/\.ts$/, ".handler"),
612
+ batchSize: construct.batchSize,
613
+ fifo: construct.fifo,
614
+ timeout: construct.timeout,
615
+ environment: await construct.getEnvironment({ markOptional: context.markOptional }),
616
+ dependencies: construct.constructs
617
+ });
618
+ logger.log(`Generated queue handler: ${key}`);
619
+ }
620
+ return queueInfos;
621
+ }
622
+ async generateQueueHandler(outputDir, sourceFile, exportName, context, owner) {
623
+ const handlerPath = (0, node_path.join)(outputDir, `${exportName}.ts`);
624
+ const importPath = (0, node_path.relative)((0, node_path.dirname)(handlerPath), sourceFile).replace(/\.ts$/, ".js");
625
+ const runtime = require_EndpointGenerator.runtimeFor(context, (0, node_path.dirname)(handlerPath), owner);
626
+ const content = `import { AWSLambdaQueue } from '@geekmidas/constructs/aws';
627
+ import { ${exportName} } from '${importPath}';
628
+ ${runtime.imports}
629
+ ${context.storageDrivers?.imports ?? ""}
630
+ ${runtime.bindings}
631
+ ${context.storageDrivers?.setup ? `\n// The handler registers the drivers its target needs.\n${context.storageDrivers.setup}\n` : ""}
632
+ const adapter = new AWSLambdaQueue(envParser, ${exportName});
633
+
634
+ export const handler = adapter.handler;
635
+ `;
636
+ await (0, node_fs_promises.writeFile)(handlerPath, content);
637
+ return handlerPath;
638
+ }
639
+ async generateServerQueuesFile(outputDir, queues) {
640
+ await (0, node_fs_promises.mkdir)(outputDir, { recursive: true });
641
+ const queuesPath = (0, node_path.join)(outputDir, "queues.ts");
642
+ if (queues.length === 0) {
643
+ await (0, node_fs_promises.writeFile)(queuesPath, `/**
644
+ * Generated queues setup — this app declares none.
645
+ */
646
+ import type { EnvironmentParser } from '@geekmidas/envkit';
647
+ import type { Logger } from '@geekmidas/logger';
648
+
649
+ export async function setupQueues(
650
+ _envParser: EnvironmentParser<any>,
651
+ _logger: Logger,
652
+ ): Promise<void> {}
653
+
654
+ export function queuesStatus(): { failed: string[]; connections: unknown[] } {
655
+ return { failed: [], connections: [] };
656
+ }
657
+
658
+ export async function stopQueues(): Promise<void> {}
659
+ `);
660
+ return queuesPath;
661
+ }
662
+ const importsByFile = /* @__PURE__ */ new Map();
663
+ for (const { path, key } of queues) {
664
+ const importPath = (0, node_path.relative)((0, node_path.dirname)(queuesPath), path.relative).replace(/\.ts$/, ".js");
665
+ if (!importsByFile.has(importPath)) importsByFile.set(importPath, []);
666
+ importsByFile.get(importPath)?.push(key);
667
+ }
668
+ const content = `/**
669
+ * Generated queue consumers setup.
670
+ *
671
+ * Each queue's one consumer polls its own queue, through the queue's own
672
+ * connection string — the one its producers publish on. SQS cannot push, so
673
+ * this is a poller on every transport: pg-boss locally by default, the SQS
674
+ * queue on the AWS emulator.
675
+ *
676
+ * Deployed on Lambda, a queue's consumer is an SQS event source instead.
677
+ */
678
+ import type { EnvironmentParser } from '@geekmidas/envkit';
679
+ import type { Logger } from '@geekmidas/logger';
680
+ import { EventConnectionFactory, Subscriber } from '@geekmidas/events';
681
+ import type { EventConnection } from '@geekmidas/events';
682
+ import { ServiceDiscovery } from '@geekmidas/services';
683
+ ${Array.from(importsByFile.entries()).map(([importPath, exports]) => `import { ${exports.join(", ")} } from '${importPath}';`).join("\n")}
684
+
685
+ const queues = [
686
+ ${queues.map(({ key, construct }) => ` { queue: ${key}, connectionKey: '${(0, _geekmidas_manifest.provideKey)(construct.id, "publisherConnectionString")}' },`).join("\n")}
687
+ ];
688
+
689
+ // What was opened, and what could not be: a worker's health check reads both,
690
+ // and its shutdown closes what was opened.
691
+ const connections = new Map<string, EventConnection>();
692
+ const failed: string[] = [];
693
+
694
+ export async function setupQueues(
695
+ envParser: EnvironmentParser<any>,
696
+ logger: Logger,
697
+ ): Promise<void> {
698
+ const serviceDiscovery = ServiceDiscovery.getInstance(envParser);
699
+
700
+ for (const { queue, connectionKey } of queues) {
701
+ const connectionString = process.env[connectionKey];
702
+ if (!connectionString) {
703
+ logger.error({ queue: queue.name, connectionKey }, 'No connection string for this queue');
704
+ failed.push(queue.name);
705
+ continue;
706
+ }
707
+
708
+ try {
709
+ let connection = connections.get(connectionString);
710
+ if (!connection) {
711
+ connection = await EventConnectionFactory.fromConnectionString(connectionString);
712
+ connections.set(connectionString, connection);
713
+ }
714
+ const eventSubscriber = await Subscriber.fromConnection(connection);
715
+ const services = queue.services.length > 0
716
+ ? await serviceDiscovery.register(queue.services)
717
+ : {};
718
+ // The queue's database — the worker's, or its own — handed over as \`db\`.
719
+ const db = queue.databaseService
720
+ ? (await serviceDiscovery.register([queue.databaseService]))[
721
+ queue.databaseService.serviceName
722
+ ]
723
+ : undefined;
724
+
725
+ // A queue's messages carry one type — its own name.
726
+ await eventSubscriber.subscribe([queue.name], async (message) => {
727
+ try {
728
+ const validation = await queue.messageSchema['~standard'].validate(message.payload);
729
+ if (validation.issues) {
730
+ logger.error({ issues: validation.issues, queue: queue.name }, 'Queue message failed validation');
731
+ return;
732
+ }
733
+
734
+ await queue.handler({
735
+ messages: [validation.value],
736
+ services: services,
737
+ logger: queue.logger,
738
+ db,
739
+ } as any);
740
+ } catch (error) {
741
+ logger.error({ err: error, queue: queue.name }, 'Failed to process queue message');
742
+ // Rethrown so the transport keeps the message for a retry.
743
+ throw error;
744
+ }
745
+ });
746
+ logger.info({ queue: queue.name }, 'Queue consumer started polling');
747
+ } catch (error) {
748
+ logger.error({ err: error, queue: queue.name }, 'Failed to set up queue consumer');
749
+ failed.push(queue.name);
750
+ }
751
+ }
752
+ }
753
+
754
+ /** The consumers that could not start, and the connections that did. */
755
+ export function queuesStatus(): { failed: string[]; connections: EventConnection[] } {
756
+ return { failed: [...failed], connections: [...connections.values()] };
757
+ }
758
+
759
+ /**
760
+ * Stop polling, let the messages in flight finish, and close each broker
761
+ * connection — pg-boss's graceful stop does all three. The caller bounds it.
762
+ */
763
+ export async function stopQueues(): Promise<void> {
764
+ const open = [...connections.values()];
765
+ connections.clear();
766
+ await Promise.all(open.map((connection) => connection.close()));
767
+ }
768
+ `;
769
+ await (0, node_fs_promises.writeFile)(queuesPath, content);
770
+ return queuesPath;
771
+ }
772
+ };
773
+ //#endregion
774
+ //#region src/generators/WorkerGenerator.ts
775
+ /**
776
+ * A worker whose topic subscribers would have to be pushed to over HTTP.
777
+ *
778
+ * On SNS a subscriber is an HTTP endpoint SNS delivers to, and a worker's
779
+ * process serves nothing but its health check. A server target's broker is
780
+ * pg-boss, where each subscriber polls a queue of its own, so this is only
781
+ * reached by building server images for a project that deploys to AWS — where
782
+ * a subscriber is a Lambda instead.
783
+ */
784
+ var WorkerSubscribersNeedPush = class extends require_errors.GkmError {
785
+ worker;
786
+ subscribers;
787
+ constructor(worker, subscribers) {
788
+ super(`The worker '${worker}' runs topic subscribers (${subscribers.join(", ")}), and this build's broker is SNS, which pushes each event to its subscriber over HTTP. A worker image serves only its health check. Deploy to a server target, whose broker is pg-boss and whose subscribers poll, or to AWS, where each subscriber is a Lambda.`);
789
+ this.worker = worker;
790
+ this.subscribers = subscribers;
791
+ this.name = "WorkerSubscribersNeedPush";
792
+ }
793
+ };
794
+ /** Where a worker's generated entry lives, under an app's `.gkm/server`. */
795
+ function workerEntryDir(serverDir, workerId) {
796
+ return (0, node_path.join)(serverDir, "workers", require_config.appKey(workerId));
797
+ }
798
+ /** The file a worker's bundle is written to, beside the server's. */
799
+ function workerBundleName(workerId) {
800
+ return `worker-${require_config.appKey(workerId)}.mjs`;
801
+ }
802
+ /**
803
+ * A Worker's production entry: the process that runs its crons, its queue
804
+ * consumers and its topic subscribers, and answers nothing but a health check.
805
+ *
806
+ * It is the server's runtime without the server. The `crons.ts`, `queues.ts`
807
+ * and `subscribers.ts` it starts are the files `gkm dev` starts — written by
808
+ * the same generators, given only this worker's constructs — so a consumer
809
+ * runs the same code in development and in the image. What it adds is the
810
+ * process around them: drivers, a health check that says when a consumer or
811
+ * the broker is down, and a shutdown that drains.
812
+ */
813
+ var WorkerGenerator = class {
814
+ generators;
815
+ constructor(generators = {
816
+ cron: new CronGenerator(),
817
+ queue: new QueueGenerator(),
818
+ subscriber: new require_SubscriberGenerator.SubscriberGenerator()
819
+ }) {
820
+ this.generators = generators;
821
+ }
822
+ /** Write the worker's files; returns its entry, `worker.ts`. */
823
+ async build(input) {
824
+ const { context, workerId, outputDir } = input;
825
+ if (input.subscribers.length > 0 && context.eventsBackends?.includes("sns")) throw new WorkerSubscribersNeedPush(workerId, input.subscribers.map(({ key }) => key));
826
+ await (0, node_fs_promises.mkdir)(outputDir, { recursive: true });
827
+ const options = { target: "server" };
828
+ await Promise.all([
829
+ this.generators.cron.build(context, input.crons, outputDir, options),
830
+ this.generators.queue.build(context, input.queues, outputDir, options),
831
+ this.generators.subscriber.build(context, input.subscribers, outputDir, options)
832
+ ]);
833
+ await (0, node_fs_promises.writeFile)((0, node_path.join)(outputDir, "app.ts"), workerApp(context, workerId, outputDir));
834
+ await require_EndpointGenerator.writeTelemetryModule(outputDir, input.telemetry);
835
+ const entry = (0, node_path.join)(outputDir, "worker.ts");
836
+ await (0, node_fs_promises.writeFile)(entry, workerEntry(context.production?.healthCheck ?? "/health"));
837
+ return entry;
838
+ }
839
+ };
840
+ /**
841
+ * `app.ts`: the worker's runtime — its logger and environment parser off the
842
+ * Worker construct, the drivers its target needs, and a `startWorker` that
843
+ * starts every cron, consumer and subscriber it owns.
844
+ */
845
+ function workerApp(context, workerId, outputDir) {
846
+ const runtime = require_EndpointGenerator.runtimeFor(context, outputDir, workerId);
847
+ return `/**
848
+ * Generated worker runtime for ${workerId}.
849
+ * Generated by 'gkm build --production'.
850
+ */
851
+ import { setupCrons, cronsStatus, stopCrons } from './crons.js';
852
+ import { setupQueues, queuesStatus, stopQueues } from './queues.js';
853
+ import { setupSubscribers, subscribersStatus, stopSubscribers } from './subscribers.js';
854
+ ${runtime.imports}
855
+ ${context.storageDrivers?.imports ?? ""}
856
+
857
+ ${runtime.bindings}
858
+
859
+ ${context.storageDrivers?.setup ? `// The entry point registers the drivers its target needs.
860
+ ${context.storageDrivers.setup}
861
+ ` : ""}
862
+ // Who this worker is to Postgres: application_name on every connection.
863
+ process.env.GKM_APP_NAME ??= ${JSON.stringify(workerId)};
864
+
865
+ export { logger };
866
+
867
+ /** What the health check answers, and why. */
868
+ export interface WorkerHealth {
869
+ healthy: boolean;
870
+ /** The crons, queues and subscribers that could not start. */
871
+ failed: string[];
872
+ /** How many broker connections did not answer. */
873
+ down: number;
874
+ }
875
+
876
+ /** Whether one broker connection answers: open, and — on pg-boss — a query. */
877
+ async function answers(connection: unknown): Promise<boolean> {
878
+ const c = connection as {
879
+ isConnected?: () => boolean;
880
+ instance?: { getDb?: () => { executeSql: (sql: string) => Promise<unknown> } };
881
+ };
882
+ if (c.isConnected && !c.isConnected()) return false;
883
+ const db = c.instance?.getDb?.();
884
+ if (!db) return true;
885
+ try {
886
+ await Promise.race([
887
+ db.executeSql('select 1'),
888
+ new Promise((_, reject) => setTimeout(() => reject(new Error('timeout')), 2000).unref()),
889
+ ]);
890
+ return true;
891
+ } catch {
892
+ return false;
893
+ }
894
+ }
895
+
896
+ /** A request to a route this worker mounted, and what it answered. */
897
+ export interface WorkerRequest {
898
+ headers: Record<string, string | string[] | undefined>;
899
+ body: string;
900
+ /** The request's query — Mailpit's webhook carries its token there. */
901
+ query?: URLSearchParams;
902
+ }
903
+ export interface WorkerAnswer {
904
+ status: number;
905
+ body: unknown;
906
+ }
907
+
908
+ // The routes something pushes to: an SNS subscriber's, and the one a local
909
+ // object store posts a bucket's events to. Mounted by the subscribers, served
910
+ // by the entry's HTTP server beside the health check.
911
+ const routes = new Map<string, (c: any) => unknown>();
912
+ const app = {
913
+ post: (path: string, handler: (c: any) => unknown) => {
914
+ routes.set(path, handler);
915
+ },
916
+ };
917
+
918
+ /** Run one mounted route, as the subscribers' handlers expect to be called. */
919
+ async function route(path: string, request: WorkerRequest): Promise<WorkerAnswer | undefined> {
920
+ const handler = routes.get(path);
921
+ if (!handler) return undefined;
922
+ let answer: WorkerAnswer | undefined;
923
+ const c = {
924
+ req: {
925
+ text: async () => request.body,
926
+ query: (name: string) => request.query?.get(name) ?? undefined,
927
+ header: (name: string) => {
928
+ const value = request.headers[name.toLowerCase()];
929
+ return Array.isArray(value) ? value[0] : value;
930
+ },
931
+ },
932
+ json: (body: unknown, status = 200) => {
933
+ answer = { status, body };
934
+ return answer;
935
+ },
936
+ };
937
+ await handler(c);
938
+ return answer ?? { status: 204, body: null };
939
+ }
940
+
941
+ /** Start everything this worker runs. */
942
+ export async function startWorker(): Promise<{
943
+ health: () => Promise<WorkerHealth>;
944
+ stop: () => Promise<void>;
945
+ route: typeof route;
946
+ /** Subscribe the pushed routes, once the server answers on \`port\`. */
947
+ subscribeForPush: (port: number) => Promise<void>;
948
+ }> {
949
+ const subscribeForPush = await setupSubscribers(app, envParser, logger).catch((error) => {
950
+ logger.error({ err: error }, 'Failed to start subscribers');
951
+ return async (_port: number) => {};
952
+ });
953
+ await setupQueues(envParser, logger).catch((error) => {
954
+ logger.error({ err: error }, 'Failed to start queue consumers');
955
+ });
956
+ await setupCrons(envParser, logger).catch((error) => {
957
+ logger.error({ err: error }, 'Failed to schedule crons');
958
+ });
959
+
960
+ const statuses = () => [subscribersStatus(), queuesStatus(), cronsStatus()];
961
+
962
+ return {
963
+ route,
964
+ subscribeForPush,
965
+ async health() {
966
+ const all = statuses();
967
+ const failed = all.flatMap((s) => s.failed);
968
+ const alive = await Promise.all(
969
+ all.flatMap((s) => s.connections as unknown[]).map(answers),
970
+ );
971
+ const down = alive.filter((ok) => !ok).length;
972
+ return { healthy: failed.length === 0 && down === 0, failed, down };
973
+ },
974
+ // Each stops pulling, waits for what it has in flight, and closes its
975
+ // broker connection. Together, so one slow handler does not hold the
976
+ // others' connections open.
977
+ async stop() {
978
+ await Promise.all([stopSubscribers(), stopQueues(), stopCrons()]);
979
+ },
980
+ };
981
+ }
982
+ `;
983
+ }
984
+ /**
985
+ * `worker.ts`: the process. Health first, so the container answers while the
986
+ * consumers connect; then the worker; then a shutdown that drains.
987
+ */
988
+ function workerEntry(healthCheck) {
989
+ return `#!/usr/bin/env node
990
+ /**
991
+ * Production worker entry point.
992
+ * Generated by 'gkm build --production'.
993
+ *
994
+ * Runs this worker's crons, queue consumers and topic subscribers, and serves
995
+ * its health check: ${healthCheck}, on PORT — 200 when every consumer started
996
+ * and every broker connection answers, 503 otherwise. Beside it, on the same
997
+ * port, the POST routes its subscribers mounted: where a local object store
998
+ * posts a bucket's events.
999
+ *
1000
+ * On SIGTERM it stops pulling messages and scheduling crons, lets the handlers
1001
+ * in flight finish, closes its broker connections and database pools, and
1002
+ * exits 0 — or 1, at GKM_SHUTDOWN_TIMEOUT_MS (8s by default, under Docker's
1003
+ * 10s stop timeout).
1004
+ */
1005
+ import { createServer } from 'node:http';
1006
+ import { runShutdownHooks } from '@geekmidas/constructs';
1007
+
1008
+ ${require_EndpointGenerator.startTelemetryCode([healthCheck])}
1009
+ const { startWorker, logger } = await import('./app.js');
1010
+
1011
+ const port = Number(process.env.PORT) || 3000;
1012
+
1013
+ let worker: Awaited<ReturnType<typeof startWorker>> | undefined;
1014
+ let stopping = false;
1015
+
1016
+ const server = createServer((req, res) => {
1017
+ // Parsed once: the path routes, the query goes to the route.
1018
+ const url = new URL(req.url ?? '/', 'http://localhost');
1019
+ const path = url.pathname;
1020
+ const answer = (status: number, body: unknown) => {
1021
+ res.writeHead(status, { 'content-type': 'application/json' });
1022
+ res.end(JSON.stringify(body));
1023
+ };
1024
+
1025
+ // A route a subscriber mounted: what SNS pushes to, or what a local object
1026
+ // store posts a bucket's events to. Refused while starting or stopping, so
1027
+ // the sender keeps the message and sends it again.
1028
+ if (req.method === 'POST') {
1029
+ let body = '';
1030
+ req.setEncoding('utf8');
1031
+ req.on('data', (chunk) => {
1032
+ body += chunk;
1033
+ });
1034
+ req.on('end', () => {
1035
+ if (stopping) return answer(503, { status: 'stopping' });
1036
+ if (!worker) return answer(503, { status: 'starting' });
1037
+ worker.route(path, { headers: req.headers, body, query: url.searchParams }).then(
1038
+ (routed) => (routed ? answer(routed.status, routed.body) : answer(404, { status: 'not found' })),
1039
+ (error) => {
1040
+ logger.error({ err: error, path }, 'Route failed');
1041
+ answer(500, { status: 'failed' });
1042
+ },
1043
+ );
1044
+ });
1045
+ return;
1046
+ }
1047
+
1048
+ if (path !== ${JSON.stringify(healthCheck)} || (req.method !== 'GET' && req.method !== 'HEAD')) {
1049
+ res.writeHead(404).end();
1050
+ return;
1051
+ }
1052
+ if (stopping) return answer(503, { status: 'stopping' });
1053
+ if (!worker) return answer(503, { status: 'starting' });
1054
+ worker.health().then(
1055
+ (health) => answer(health.healthy ? 200 : 503, { status: health.healthy ? 'ok' : 'unhealthy', ...health }),
1056
+ (error) => answer(503, { status: 'unhealthy', error: String(error) }),
1057
+ );
1058
+ });
1059
+ server.listen(port);
1060
+
1061
+ const shutdown = async () => {
1062
+ if (stopping) return;
1063
+ stopping = true;
1064
+ const deadline = Number(process.env.GKM_SHUTDOWN_TIMEOUT_MS) || 8000;
1065
+ logger.info({ deadline }, 'Graceful shutdown initiated');
1066
+ setTimeout(() => {
1067
+ logger.warn({ deadline }, 'Shutdown deadline reached, exiting');
1068
+ process.exit(1);
1069
+ }, deadline).unref();
1070
+
1071
+ // Nothing new is pulled or scheduled; what is in flight finishes.
1072
+ await worker?.stop().catch((error) => logger.error({ err: error }, 'Failed to stop the worker'));
1073
+ // Then what the handlers used: database pools.
1074
+ await runShutdownHooks((error) => logger.error({ err: error }, 'Shutdown hook failed'));
1075
+ server.close();
1076
+ logger.info('Worker stopped');
1077
+ process.exit(0);
1078
+ };
1079
+
1080
+ process.on('SIGTERM', shutdown);
1081
+ process.on('SIGINT', shutdown);
1082
+
1083
+ worker = await startWorker();
1084
+ logger.info({ port }, 'Worker started');
1085
+ await worker.subscribeForPush(port).catch((error) => {
1086
+ logger.error({ err: error }, 'Failed to subscribe for push');
1087
+ });
1088
+ `;
1089
+ }
1090
+ //#endregion
1091
+ //#region src/docker/index.ts
1092
+ const logger = require_discover.output;
1093
+ /** `docker build` failed; what docker printed above says why. */
1094
+ var DockerBuildFailed = class extends Error {
1095
+ imageRef;
1096
+ constructor(imageRef, cause) {
1097
+ super(`Failed to build Docker image: ${cause instanceof Error ? cause.message : String(cause)}`, { cause });
1098
+ this.imageRef = imageRef;
1099
+ this.name = "DockerBuildFailed";
1100
+ }
1101
+ };
1102
+ /** `docker push` failed — usually the registry login or its permissions. */
1103
+ var DockerPushFailed = class extends Error {
1104
+ imageRef;
1105
+ constructor(imageRef, cause) {
1106
+ super(`Failed to push Docker image: ${cause instanceof Error ? cause.message : String(cause)}`, { cause });
1107
+ this.imageRef = imageRef;
1108
+ this.name = "DockerPushFailed";
1109
+ }
1110
+ };
1111
+ /** `gkm docker --push` was asked for with nowhere to push to. */
1112
+ var PushNeedsRegistry = class extends require_errors.GkmError {
1113
+ imageName;
1114
+ constructor(imageName) {
1115
+ super(`Registry is required to push Docker image '${imageName}'. Use --registry or configure docker.registry in gkm.config.ts`);
1116
+ this.imageName = imageName;
1117
+ this.name = "PushNeedsRegistry";
1118
+ }
1119
+ };
1120
+ /**
1121
+ * Docker command implementation: one Dockerfile per deployable app, each
1122
+ * building its image inside Docker from a turbo-pruned slice of the build
1123
+ * root — nothing is built on the host — plus the build root's
1124
+ * `.dockerignore` and `docker-compose.constructs.yml`.
1125
+ */
1126
+ async function dockerCommand(options) {
1127
+ const cwd = options.cwd ?? process.cwd();
1128
+ const loaded = await require_config.loadWorkspaceConfig(cwd);
1129
+ const names = loaded.type === "single" ? Object.fromEntries(Object.keys(loaded.workspace.apps).map((name) => [name, require_apps.resolveDockerConfig(loaded.raw).imageName])) : {};
1130
+ const result = await workspaceDockerCommand(loaded.workspace, loaded.manifest, names, loaded.background, options.stage);
1131
+ if (options.build) for (const app of result.apps) await buildDockerImage(app, result.buildRoot, options);
1132
+ if (options.push) for (const app of result.apps) await pushDockerImage(app.imageName, options, result.buildRoot);
1133
+ return result;
1134
+ }
1135
+ /**
1136
+ * Build one app's image, from the build root.
1137
+ * Uses BuildKit for cache mount support
1138
+ */
1139
+ async function buildDockerImage(app, buildRoot, options) {
1140
+ const tag = options.tag ?? "latest";
1141
+ const registry = options.registry;
1142
+ const fullImageName = validateImageRef(registry ? `${registry}/${app.imageName}:${tag}` : `${app.imageName}:${tag}`);
1143
+ logger.log(`\n🐳 Building Docker image: ${fullImageName}`);
1144
+ try {
1145
+ await require_credentials.run("docker", [
1146
+ "build",
1147
+ `--file=${(0, node_path.relative)(buildRoot, app.dockerfile)}`,
1148
+ `--tag=${fullImageName}`,
1149
+ "."
1150
+ ], {
1151
+ cwd: buildRoot,
1152
+ env: {
1153
+ ...process.env,
1154
+ DOCKER_BUILDKIT: "1"
1155
+ }
1156
+ });
1157
+ logger.log(`✅ Docker image built: ${fullImageName}`);
1158
+ } catch (error) {
1159
+ throw new DockerBuildFailed(fullImageName, error);
1160
+ }
1161
+ }
1162
+ /**
1163
+ * Push Docker image to registry
1164
+ */
1165
+ async function pushDockerImage(imageName, options, cwd) {
1166
+ const tag = options.tag ?? "latest";
1167
+ const registry = options.registry;
1168
+ if (!registry) throw new PushNeedsRegistry(imageName);
1169
+ const fullImageName = validateImageRef(`${registry}/${imageName}:${tag}`);
1170
+ logger.log(`\n🚀 Pushing Docker image: ${fullImageName}`);
1171
+ try {
1172
+ await require_credentials.run("docker", ["push", fullImageName], { cwd });
1173
+ logger.log(`✅ Docker image pushed: ${fullImageName}`);
1174
+ } catch (error) {
1175
+ throw new DockerPushFailed(fullImageName, error);
1176
+ }
1177
+ }
1178
+ /**
1179
+ * Generate Dockerfiles for all apps in a workspace.
1180
+ * @internal Exported for testing
1181
+ */
1182
+ async function workspaceDockerCommand(workspace, manifest, imageNames = {}, background = {}, stage) {
1183
+ const results = [];
1184
+ const layout = require_apps.imageLayout(workspace);
1185
+ logger.log(`\n🐳 Generating Dockerfiles for workspace: ${workspace.name}`);
1186
+ logger.log(` Build root: ${layout.buildRoot}`);
1187
+ logger.log(` Package manager: ${layout.tools.packageManager}${layout.tools.packageManagerVersion ? `@${layout.tools.packageManagerVersion}` : ""}, turbo@${layout.tools.turboVersion}`);
1188
+ for (const [appName, app] of Object.entries(workspace.apps)) {
1189
+ if (app.type === "mobile") {
1190
+ logger.log(`\n 📱 Skipping Docker for ${appName} (mobile app — deploy via framework toolchain)`);
1191
+ continue;
1192
+ }
1193
+ const buildType = app.entry ? "entry" : app.type;
1194
+ logger.log(`\n 📄 Generating Dockerfile for ${appName} (${buildType})`);
1195
+ const dockerfile = appDockerfile(appName, app, {
1196
+ layout,
1197
+ workspaceRoot: workspace.root,
1198
+ apps: workspace.apps,
1199
+ ...manifest ? { manifest } : {},
1200
+ workspace,
1201
+ ...stage ? { stage } : {}
1202
+ });
1203
+ const path = require_apps.dockerfileOf(appName, app.path);
1204
+ const dockerfilePath = (0, node_path.join)(workspace.root, path);
1205
+ await (0, node_fs_promises.mkdir)((0, node_path.dirname)(dockerfilePath), { recursive: true });
1206
+ await (0, node_fs_promises.writeFile)(dockerfilePath, dockerfile);
1207
+ logger.log(` Generated: ${path}`);
1208
+ results.push({
1209
+ appName,
1210
+ type: app.type,
1211
+ dockerfile: dockerfilePath,
1212
+ imageName: imageNames[appName] ?? appName
1213
+ });
1214
+ }
1215
+ for (const worker of manifest ? require_apps.workerUnits(workspace, manifest, background) : []) {
1216
+ logger.log(`\n 📄 Generating Dockerfile for ${worker.name} (worker ${worker.id}, built from ${worker.app})`);
1217
+ const dockerfile = workerDockerfile(worker, workspace.apps[worker.app], {
1218
+ layout,
1219
+ workspaceRoot: workspace.root
1220
+ });
1221
+ const path = workerDockerfileOf(worker.name);
1222
+ const dockerfilePath = (0, node_path.join)(workspace.root, path);
1223
+ await (0, node_fs_promises.mkdir)((0, node_path.dirname)(dockerfilePath), { recursive: true });
1224
+ await (0, node_fs_promises.writeFile)(dockerfilePath, dockerfile);
1225
+ logger.log(` Generated: ${path}`);
1226
+ results.push({
1227
+ appName: worker.name,
1228
+ type: "backend",
1229
+ dockerfile: dockerfilePath,
1230
+ imageName: imageNames[worker.name] ?? worker.name
1231
+ });
1232
+ }
1233
+ for (const unit of manifest ? require_apps.processorUnits(workspace, manifest) : []) {
1234
+ logger.log(`\n 📄 Generating Dockerfile for ${unit.name} (processors of ${unit.id}, built from ${unit.app})`);
1235
+ const dockerfile = processorDockerfile(unit, workspace.apps[unit.app], {
1236
+ layout,
1237
+ workspaceRoot: workspace.root
1238
+ });
1239
+ const path = workerDockerfileOf(unit.name);
1240
+ const dockerfilePath = (0, node_path.join)(workspace.root, path);
1241
+ await (0, node_fs_promises.mkdir)((0, node_path.dirname)(dockerfilePath), { recursive: true });
1242
+ await (0, node_fs_promises.writeFile)(dockerfilePath, dockerfile);
1243
+ logger.log(` Generated: ${path}`);
1244
+ results.push({
1245
+ appName: unit.name,
1246
+ type: "backend",
1247
+ dockerfile: dockerfilePath,
1248
+ imageName: imageNames[unit.name] ?? unit.name
1249
+ });
1250
+ }
1251
+ const dockerignorePath = await ensureDockerignore(layout.buildRoot);
1252
+ logger.log(`\n Ensured: ${dockerignorePath}`);
1253
+ const composePath = await writeConstructsCompose(workspace);
1254
+ logger.log(`\n✅ Generated ${results.length} Dockerfile(s) + ${require_apps.COMPOSE_PATH}`);
1255
+ logger.log(`\n📋 Build commands (from ${layout.buildRoot}):`);
1256
+ for (const result of results) {
1257
+ const icon = result.type === "backend" ? "⚙️" : result.type === "mobile" ? "📱" : "🌐";
1258
+ logger.log(` ${icon} docker build -f ${(0, node_path.relative)(layout.buildRoot, result.dockerfile)} -t ${result.imageName} .`);
1259
+ }
1260
+ printRunInstructions(workspace);
1261
+ return {
1262
+ apps: results,
1263
+ dockerCompose: composePath,
1264
+ dockerignore: dockerignorePath,
1265
+ buildRoot: layout.buildRoot
1266
+ };
1267
+ }
1268
+ /**
1269
+ * One app's Dockerfile, by what it is: a gkm backend bundled by `gkm build`,
1270
+ * a backend with its own entry bundled by esbuild, or a site by its
1271
+ * framework. The one choice every builder of images makes.
1272
+ */
1273
+ function appDockerfile(appName, app, options) {
1274
+ const image = require_apps.appImageOptions(options.layout, appName, app, options.workspaceRoot, options.apps, app.type === "web" && options.manifest && options.workspace ? require_apps.siteClientTelemetry(options.manifest, appName, options.workspace, options.stage) : void 0);
1275
+ if (app.type === "web") return siteDockerfile(appName, app, {
1276
+ image,
1277
+ ...options.manifest ? { manifest: options.manifest } : {},
1278
+ ...options.publicUrlArgs ? { publicUrlArgs: options.publicUrlArgs } : {}
1279
+ });
1280
+ if (app.entry) return require_apps.generateEntryDockerfile({
1281
+ ...image,
1282
+ entry: app.entry,
1283
+ healthCheckPath: "/health"
1284
+ });
1285
+ return require_apps.generateBackendDockerfile({
1286
+ ...image,
1287
+ healthCheckPath: "/health",
1288
+ ...options.cache ? { cache: options.cache } : {}
1289
+ });
1290
+ }
1291
+ /** Where `gkm docker` writes a worker's Dockerfile. */
1292
+ function workerDockerfileOf(worker) {
1293
+ return `.gkm/docker/Dockerfile.${worker}`;
1294
+ }
1295
+ /**
1296
+ * A Worker's Dockerfile: its host app's build, and the worker's bundle as the
1297
+ * runner — see `generateWorkerDockerfile`.
1298
+ */
1299
+ function workerDockerfile(worker, host, options) {
1300
+ const image = require_apps.appImageOptions(options.layout, worker.app, host, options.workspaceRoot);
1301
+ return require_apps.generateWorkerDockerfile({
1302
+ ...image,
1303
+ imageName: worker.name,
1304
+ port: require_apps.WORKER_PORT,
1305
+ worker: worker.id,
1306
+ bundle: workerBundleName(worker.id),
1307
+ healthCheckPath: "/health",
1308
+ ...options.cache ? { cache: options.cache } : {}
1309
+ });
1310
+ }
1311
+ /**
1312
+ * A file server's processor unit's Dockerfile: its host app's build, and the
1313
+ * unit's bundle as the runner, with its processors' native packages
1314
+ * installed beside it — see `generateProcessorDockerfile`.
1315
+ */
1316
+ function processorDockerfile(unit, host, options) {
1317
+ const image = require_apps.appImageOptions(options.layout, unit.app, host, options.workspaceRoot);
1318
+ return require_apps.generateProcessorDockerfile({
1319
+ ...image,
1320
+ imageName: unit.name,
1321
+ port: require_apps.PROCESSOR_PORT,
1322
+ fileServer: unit.id,
1323
+ bundle: processorBundleName(unit.id),
1324
+ healthCheckPath: "/health",
1325
+ ...options.cache ? { cache: options.cache } : {}
1326
+ });
1327
+ }
1328
+ /**
1329
+ * A site's Dockerfile, with an `ARG` for every key its bundler inlines.
1330
+ *
1331
+ * The keys come from the site's declaration where there is one — every
1332
+ * public key its edges give it, `VITE_UPLOADS_SERVER_URL` included — and an
1333
+ * `ARG` the Dockerfile does not declare is a build argument the build drops,
1334
+ * leaving the bundle with an empty URL.
1335
+ */
1336
+ function siteDockerfile(appName, app, options) {
1337
+ const declared = options.manifest ? Object.entries(options.manifest).find(([id, d]) => d.kind === "site" && require_config.appKey(id) === appName)?.[1] : void 0;
1338
+ const publicUrlArgs = options.publicUrlArgs ?? (declared?.kind === "site" && options.manifest ? [(0, _geekmidas_manifest.provideKey)(declared.id, "url"), ...Object.keys((0, _geekmidas_manifest.publicEnvFor)(declared, options.manifest))] : require_compose.getPublicUrlArgNames(app));
1339
+ const webOpts = {
1340
+ ...options.image,
1341
+ publicUrlArgs
1342
+ };
1343
+ switch (app.framework) {
1344
+ case "vite": return require_apps.generateViteStaticDockerfile(webOpts);
1345
+ case "tanstack-start":
1346
+ case "remix": return require_apps.generateNodeWebDockerfile(webOpts);
1347
+ default: return require_apps.generateNextjsDockerfile(webOpts);
1348
+ }
1349
+ }
1350
+ /**
1351
+ * What a build root's `.dockerignore` must leave out of every image's
1352
+ * context: dependencies installed for another platform, anything built on the
1353
+ * host (every image builds from source), git, and gkm's own output —
1354
+ * `.gkm/compose`'s env files hold a stage's secrets.
1355
+ */
1356
+ const REQUIRED_IGNORES = [
1357
+ "**/node_modules",
1358
+ ".git",
1359
+ "**/dist",
1360
+ "**/.next",
1361
+ "**/.turbo",
1362
+ "**/.gkm",
1363
+ "**/.gkm/compose"
1364
+ ];
1365
+ /**
1366
+ * Make sure the build root's `.dockerignore` leaves out what no image may
1367
+ * hold: written whole where there is none, and each missing line appended to
1368
+ * one the project keeps.
1369
+ */
1370
+ async function ensureDockerignore(buildRoot) {
1371
+ const path = (0, node_path.join)(buildRoot, ".dockerignore");
1372
+ if (!(0, node_fs.existsSync)(path)) {
1373
+ await (0, node_fs_promises.writeFile)(path, require_apps.generateDockerignore());
1374
+ return path;
1375
+ }
1376
+ const current = await (0, node_fs_promises.readFile)(path, "utf-8");
1377
+ const lines = new Set(current.split(/\r?\n/).map((line) => line.trim()));
1378
+ const missing = REQUIRED_IGNORES.filter((line) => !lines.has(line));
1379
+ if (missing.length === 0) return path;
1380
+ await (0, node_fs_promises.appendFile)(path, `${current.endsWith("\n") || current === "" ? "" : "\n"}\n# gkm: images build from source, and a stack's env files hold its secrets\n${missing.join("\n")}\n`);
1381
+ return path;
1382
+ }
1383
+ /**
1384
+ * Write `docker-compose.constructs.yml` — the same file `gkm dev` writes, with
1385
+ * the apps beside the containers their constructs derive.
1386
+ *
1387
+ * Through reconcile rather than a second generator, so what `gkm docker`
1388
+ * describes and what `gkm dev` runs cannot disagree. Nothing is started.
1389
+ */
1390
+ async function writeConstructsCompose(workspace) {
1391
+ await require_apps.reconcileWorkspace(workspace, {
1392
+ stage: workspace.stages.local,
1393
+ start: false
1394
+ });
1395
+ logger.log(` Generated: ${require_apps.COMPOSE_PATH} (project root)`);
1396
+ return (0, node_path.join)(workspace.root, require_apps.COMPOSE_PATH);
1397
+ }
1398
+ function printRunInstructions(workspace) {
1399
+ const project = (0, node_fs.existsSync)((0, node_path.join)(workspace.root, "docker-compose.yml")) ? " -f docker-compose.yml" : "";
1400
+ logger.log("\n📋 Run everything (the apps sit behind the \"apps\" profile):");
1401
+ logger.log(" gkm setup # starts the containers and creates what they hold");
1402
+ logger.log(` docker compose -f ${require_apps.COMPOSE_PATH}${project} --profile apps up --build`);
1403
+ }
1404
+ //#endregion
1405
+ Object.defineProperty(exports, "CronGenerator", {
1406
+ enumerable: true,
1407
+ get: function() {
1408
+ return CronGenerator;
1409
+ }
1410
+ });
1411
+ Object.defineProperty(exports, "DockerBuildFailed", {
1412
+ enumerable: true,
1413
+ get: function() {
1414
+ return DockerBuildFailed;
1415
+ }
1416
+ });
1417
+ Object.defineProperty(exports, "DockerPushFailed", {
1418
+ enumerable: true,
1419
+ get: function() {
1420
+ return DockerPushFailed;
1421
+ }
1422
+ });
1423
+ Object.defineProperty(exports, "ProcessorGenerator", {
1424
+ enumerable: true,
1425
+ get: function() {
1426
+ return ProcessorGenerator;
1427
+ }
1428
+ });
1429
+ Object.defineProperty(exports, "QueueGenerator", {
1430
+ enumerable: true,
1431
+ get: function() {
1432
+ return QueueGenerator;
1433
+ }
1434
+ });
1435
+ Object.defineProperty(exports, "WorkerGenerator", {
1436
+ enumerable: true,
1437
+ get: function() {
1438
+ return WorkerGenerator;
1439
+ }
1440
+ });
1441
+ Object.defineProperty(exports, "appDockerfile", {
1442
+ enumerable: true,
1443
+ get: function() {
1444
+ return appDockerfile;
1445
+ }
1446
+ });
1447
+ Object.defineProperty(exports, "dockerCommand", {
1448
+ enumerable: true,
1449
+ get: function() {
1450
+ return dockerCommand;
1451
+ }
1452
+ });
1453
+ Object.defineProperty(exports, "ensureDockerignore", {
1454
+ enumerable: true,
1455
+ get: function() {
1456
+ return ensureDockerignore;
1457
+ }
1458
+ });
1459
+ Object.defineProperty(exports, "processorBundleName", {
1460
+ enumerable: true,
1461
+ get: function() {
1462
+ return processorBundleName;
1463
+ }
1464
+ });
1465
+ Object.defineProperty(exports, "processorDockerfile", {
1466
+ enumerable: true,
1467
+ get: function() {
1468
+ return processorDockerfile;
1469
+ }
1470
+ });
1471
+ Object.defineProperty(exports, "processorEntryDir", {
1472
+ enumerable: true,
1473
+ get: function() {
1474
+ return processorEntryDir;
1475
+ }
1476
+ });
1477
+ Object.defineProperty(exports, "processorInfo", {
1478
+ enumerable: true,
1479
+ get: function() {
1480
+ return processorInfo;
1481
+ }
1482
+ });
1483
+ Object.defineProperty(exports, "validateImageRef", {
1484
+ enumerable: true,
1485
+ get: function() {
1486
+ return validateImageRef;
1487
+ }
1488
+ });
1489
+ Object.defineProperty(exports, "workerBundleName", {
1490
+ enumerable: true,
1491
+ get: function() {
1492
+ return workerBundleName;
1493
+ }
1494
+ });
1495
+ Object.defineProperty(exports, "workerDockerfile", {
1496
+ enumerable: true,
1497
+ get: function() {
1498
+ return workerDockerfile;
1499
+ }
1500
+ });
1501
+ Object.defineProperty(exports, "workerDockerfileOf", {
1502
+ enumerable: true,
1503
+ get: function() {
1504
+ return workerDockerfileOf;
1505
+ }
1506
+ });
1507
+ Object.defineProperty(exports, "workerEntryDir", {
1508
+ enumerable: true,
1509
+ get: function() {
1510
+ return workerEntryDir;
1511
+ }
1512
+ });
1513
+
1514
+ //# sourceMappingURL=docker-DK4rmb0u.cjs.map