@geekmidas/cli 10.0.0-alpha.62 → 10.0.0-alpha.64

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 (234) hide show
  1. package/README.md +2 -0
  2. package/dist/{HostingerProvider-DyD1Hin8.cjs → HostingerProvider-Bx2lHHvu.cjs} +3 -3
  3. package/dist/{HostingerProvider-DyD1Hin8.cjs.map → HostingerProvider-Bx2lHHvu.cjs.map} +1 -1
  4. package/dist/{HostingerProvider-B92qH4dC.mjs → HostingerProvider-Cd4aS5Kj.mjs} +2 -2
  5. package/dist/{HostingerProvider-B92qH4dC.mjs.map → HostingerProvider-Cd4aS5Kj.mjs.map} +1 -1
  6. package/dist/{LegacyStateStore-UHJEBLdn.cjs → LegacyStateStore-C2abV49N.cjs} +2 -2
  7. package/dist/{LegacyStateStore-UHJEBLdn.cjs.map → LegacyStateStore-C2abV49N.cjs.map} +1 -1
  8. package/dist/{LegacyStateStore-A8d2GdT7.mjs → LegacyStateStore-DIgkGaUP.mjs} +2 -2
  9. package/dist/{LegacyStateStore-A8d2GdT7.mjs.map → LegacyStateStore-DIgkGaUP.mjs.map} +1 -1
  10. package/dist/{LocalStateStore-B51rnfgn.mjs → LocalStateStore-Cy1ZBW7U.mjs} +2 -2
  11. package/dist/{LocalStateStore-B51rnfgn.mjs.map → LocalStateStore-Cy1ZBW7U.mjs.map} +1 -1
  12. package/dist/{LocalStateStore-COW3Ldwa.cjs → LocalStateStore-DiJqKyPy.cjs} +2 -2
  13. package/dist/{LocalStateStore-COW3Ldwa.cjs.map → LocalStateStore-DiJqKyPy.cjs.map} +1 -1
  14. package/dist/{OpenApiTsGenerator-BSrgw7B0.cjs → OpenApiTsGenerator-BWuDRHe9.cjs} +2 -2
  15. package/dist/{OpenApiTsGenerator-BSrgw7B0.cjs.map → OpenApiTsGenerator-BWuDRHe9.cjs.map} +1 -1
  16. package/dist/{OpenApiTsGenerator-q5B0z8Xg.mjs → OpenApiTsGenerator-C6v-IeHt.mjs} +2 -2
  17. package/dist/{OpenApiTsGenerator-q5B0z8Xg.mjs.map → OpenApiTsGenerator-C6v-IeHt.mjs.map} +1 -1
  18. package/dist/{S3StateStore-CJewPhgz.mjs → S3StateStore-D3x6ivBL.mjs} +2 -2
  19. package/dist/{S3StateStore-CJewPhgz.mjs.map → S3StateStore-D3x6ivBL.mjs.map} +1 -1
  20. package/dist/{S3StateStore-WUJGdRNL.cjs → S3StateStore-Ds0V1Lgm.cjs} +2 -2
  21. package/dist/{S3StateStore-WUJGdRNL.cjs.map → S3StateStore-Ds0V1Lgm.cjs.map} +1 -1
  22. package/dist/{SSMStateStore-Zejt42V8.cjs → SSMStateStore-CLipvx47.cjs} +2 -2
  23. package/dist/{SSMStateStore-Zejt42V8.cjs.map → SSMStateStore-CLipvx47.cjs.map} +1 -1
  24. package/dist/{SSMStateStore-iK5UKp9d.mjs → SSMStateStore-DfF174xQ.mjs} +2 -2
  25. package/dist/{SSMStateStore-iK5UKp9d.mjs.map → SSMStateStore-DfF174xQ.mjs.map} +1 -1
  26. package/dist/{bundler-CfH9frOS.cjs → bundler-C8uJf324.cjs} +4 -4
  27. package/dist/{bundler-CfH9frOS.cjs.map → bundler-C8uJf324.cjs.map} +1 -1
  28. package/dist/{bundler-DN5r4x5b.mjs → bundler-DYgm9xsd.mjs} +3 -3
  29. package/dist/{bundler-DN5r4x5b.mjs.map → bundler-DYgm9xsd.mjs.map} +1 -1
  30. package/dist/{cli-DYwxmfsW.mjs → cli-Bogz-zEj.mjs} +5 -4
  31. package/dist/{cli-DYwxmfsW.mjs.map → cli-Bogz-zEj.mjs.map} +1 -1
  32. package/dist/{cli-DOAUp80L.cjs → cli-D3jofJ6j.cjs} +7 -6
  33. package/dist/{cli-DOAUp80L.cjs.map → cli-D3jofJ6j.cjs.map} +1 -1
  34. package/dist/config-Be-4_I6H.d.cts +256 -0
  35. package/dist/config-Be-4_I6H.d.cts.map +1 -0
  36. package/dist/config-DqNRiQOp.d.mts +256 -0
  37. package/dist/config-DqNRiQOp.d.mts.map +1 -0
  38. package/dist/config.cjs +416 -13
  39. package/dist/config.cjs.map +1 -0
  40. package/dist/config.d.cts +4 -211
  41. package/dist/config.d.mts +4 -211
  42. package/dist/config.mjs +402 -3
  43. package/dist/config.mjs.map +1 -0
  44. package/dist/credentials-B70vmLcm.cjs +125 -0
  45. package/dist/credentials-B70vmLcm.cjs.map +1 -0
  46. package/dist/credentials-s0wMeZBU.mjs +108 -0
  47. package/dist/credentials-s0wMeZBU.mjs.map +1 -0
  48. package/dist/{define-CHBIEc5j.mjs → define-CYs0PEfZ.mjs} +2 -3
  49. package/dist/define-CYs0PEfZ.mjs.map +1 -0
  50. package/dist/{define-Cv_QvDrg.cjs → define-zUsP72ym.cjs} +2 -3
  51. package/dist/define-zUsP72ym.cjs.map +1 -0
  52. package/dist/deploy/public.cjs +166 -14
  53. package/dist/deploy/public.cjs.map +1 -0
  54. package/dist/deploy/public.d.cts +224 -3
  55. package/dist/deploy/public.d.cts.map +1 -1
  56. package/dist/deploy/public.d.mts +224 -3
  57. package/dist/deploy/public.d.mts.map +1 -1
  58. package/dist/deploy/public.mjs +141 -10
  59. package/dist/deploy/public.mjs.map +1 -0
  60. package/dist/deploy/sniffer-envparser-worker.cjs +54 -0
  61. package/dist/deploy/sniffer-envparser-worker.cjs.map +1 -0
  62. package/dist/deploy/sniffer-envparser-worker.d.cts +1 -0
  63. package/dist/deploy/sniffer-envparser-worker.d.mts +1 -0
  64. package/dist/deploy/sniffer-envparser-worker.mjs +55 -0
  65. package/dist/deploy/sniffer-envparser-worker.mjs.map +1 -0
  66. package/dist/{deploy-DSaCYvcO.cjs → deploy-55rJkdKz.cjs} +17 -14
  67. package/dist/{deploy-DSaCYvcO.cjs.map → deploy-55rJkdKz.cjs.map} +1 -1
  68. package/dist/{deploy-Cg9fae7a.mjs → deploy-Dc2LBJaK.mjs} +13 -10
  69. package/dist/deploy-Dc2LBJaK.mjs.map +1 -0
  70. package/dist/{deploy-B7jvUORo.mjs → deploy-ZRXIPp1c.mjs} +11 -8
  71. package/dist/{deploy-B7jvUORo.mjs.map → deploy-ZRXIPp1c.mjs.map} +1 -1
  72. package/dist/{deploy-D8Qr-Xto.cjs → deploy-yUcR2OlW.cjs} +15 -12
  73. package/dist/deploy-yUcR2OlW.cjs.map +1 -0
  74. package/dist/derive-B4vDpzgP.mjs +150 -0
  75. package/dist/derive-B4vDpzgP.mjs.map +1 -0
  76. package/dist/derive-DAbo49sm.cjs +161 -0
  77. package/dist/derive-DAbo49sm.cjs.map +1 -0
  78. package/dist/discover-B6yPpvRV.d.mts +99 -0
  79. package/dist/discover-B6yPpvRV.d.mts.map +1 -0
  80. package/dist/discover-B_IkPukx.d.cts +99 -0
  81. package/dist/discover-B_IkPukx.d.cts.map +1 -0
  82. package/dist/{discover-Bc-4eA_p.cjs → discover-DHdECueV.cjs} +280 -1
  83. package/dist/discover-DHdECueV.cjs.map +1 -0
  84. package/dist/{discover-FrYvzkeC.mjs → discover-LMrqsWSU.mjs} +246 -3
  85. package/dist/discover-LMrqsWSU.mjs.map +1 -0
  86. package/dist/{dokploy-CD9PY-3D.mjs → dokploy-CepdXuMl.mjs} +3 -3
  87. package/dist/{dokploy-CD9PY-3D.mjs.map → dokploy-CepdXuMl.mjs.map} +1 -1
  88. package/dist/{dokploy-Ey2foJLv.cjs → dokploy-D1d37rvM.cjs} +3 -3
  89. package/dist/{dokploy-Ey2foJLv.cjs.map → dokploy-D1d37rvM.cjs.map} +1 -1
  90. package/dist/{encryption-ChBk3hTj.cjs → encryption-C9X98u2F.cjs} +5 -5
  91. package/dist/{encryption-ChBk3hTj.cjs.map → encryption-C9X98u2F.cjs.map} +1 -1
  92. package/dist/{encryption-CVwvGbsL.mjs → encryption-CKHjMpCr.mjs} +5 -5
  93. package/dist/{encryption-CVwvGbsL.mjs.map → encryption-CKHjMpCr.mjs.map} +1 -1
  94. package/dist/fakes-C9RiT6XG.mjs.map +1 -1
  95. package/dist/fakes-zW-jNAbQ.cjs.map +1 -1
  96. package/dist/{github-BCB3_LBX.mjs → github-D-byNI7T.mjs} +4 -4
  97. package/dist/{github-BCB3_LBX.mjs.map → github-D-byNI7T.mjs.map} +1 -1
  98. package/dist/{github-OUgPDlqg.cjs → github-Dd3tMa1u.cjs} +4 -4
  99. package/dist/{github-OUgPDlqg.cjs.map → github-Dd3tMa1u.cjs.map} +1 -1
  100. package/dist/{index-BtXDZQuF.d.cts → index-CJ2qsSpp.d.mts} +2 -2
  101. package/dist/{index-BtXDZQuF.d.cts.map → index-CJ2qsSpp.d.mts.map} +1 -1
  102. package/dist/{index-DrKzpHl-.d.mts → index-CfE9Y885.d.cts} +2 -2
  103. package/dist/{index-DrKzpHl-.d.mts.map → index-CfE9Y885.d.cts.map} +1 -1
  104. package/dist/index.cjs +111 -239
  105. package/dist/index.cjs.map +1 -1
  106. package/dist/index.mjs +82 -210
  107. package/dist/index.mjs.map +1 -1
  108. package/dist/local-C7wnrcYK.cjs +586 -0
  109. package/dist/local-C7wnrcYK.cjs.map +1 -0
  110. package/dist/local-Cd8ZYQG3.mjs +473 -0
  111. package/dist/local-Cd8ZYQG3.mjs.map +1 -0
  112. package/dist/{migrate-BoHMqdCu.mjs → migrate-B4gngTLe.mjs} +6 -6
  113. package/dist/{migrate-BoHMqdCu.mjs.map → migrate-B4gngTLe.mjs.map} +1 -1
  114. package/dist/{migrate-dnaFMvOm.cjs → migrate-tx9-P9uz.cjs} +6 -6
  115. package/dist/{migrate-dnaFMvOm.cjs.map → migrate-tx9-P9uz.cjs.map} +1 -1
  116. package/dist/openapi.cjs +3 -3
  117. package/dist/openapi.d.cts +1 -1
  118. package/dist/openapi.d.mts +1 -1
  119. package/dist/openapi.mjs +3 -3
  120. package/dist/{ready-DQIy21W5.mjs → ready-bQfu9GES.mjs} +3 -3
  121. package/dist/{ready-DQIy21W5.mjs.map → ready-bQfu9GES.mjs.map} +1 -1
  122. package/dist/{ready-XlNx-Gbo.cjs → ready-brEhh68f.cjs} +3 -3
  123. package/dist/{ready-XlNx-Gbo.cjs.map → ready-brEhh68f.cjs.map} +1 -1
  124. package/dist/reconcile/public.cjs +1 -1
  125. package/dist/reconcile/public.d.cts +4 -77
  126. package/dist/reconcile/public.d.cts.map +1 -1
  127. package/dist/reconcile/public.d.mts +4 -77
  128. package/dist/reconcile/public.d.mts.map +1 -1
  129. package/dist/reconcile/public.mjs +1 -1
  130. package/dist/{resolve-wbv66HjD.cjs → resolve-BXsNQjMR.cjs} +9 -6
  131. package/dist/resolve-BXsNQjMR.cjs.map +1 -0
  132. package/dist/{resolve-CFCIkm7m.mjs → resolve-DZ2IJ0qY.mjs} +9 -6
  133. package/dist/resolve-DZ2IJ0qY.mjs.map +1 -0
  134. package/dist/{runtime-CMwtq0AL.cjs → runtime-BGNDrHzh.cjs} +2 -2
  135. package/dist/{runtime-CMwtq0AL.cjs.map → runtime-BGNDrHzh.cjs.map} +1 -1
  136. package/dist/{runtime-Dn_n-29S.d.cts → runtime-CJEYK4Gz.d.mts} +2 -2
  137. package/dist/{runtime-CXPlkZzs.d.mts.map → runtime-CJEYK4Gz.d.mts.map} +1 -1
  138. package/dist/{runtime-CXPlkZzs.d.mts → runtime-Cjq1jlVX.d.cts} +2 -2
  139. package/dist/{runtime-Dn_n-29S.d.cts.map → runtime-Cjq1jlVX.d.cts.map} +1 -1
  140. package/dist/{runtime-DbakJS8u.mjs → runtime-Cmn-FeYO.mjs} +2 -2
  141. package/dist/{runtime-DbakJS8u.mjs.map → runtime-Cmn-FeYO.mjs.map} +1 -1
  142. package/dist/sandbox/config-worker.cjs +43 -0
  143. package/dist/sandbox/config-worker.cjs.map +1 -0
  144. package/dist/sandbox/config-worker.d.cts +1 -0
  145. package/dist/sandbox/config-worker.d.mts +1 -0
  146. package/dist/sandbox/config-worker.mjs +44 -0
  147. package/dist/sandbox/config-worker.mjs.map +1 -0
  148. package/dist/sandbox/discover-worker.cjs +44 -0
  149. package/dist/sandbox/discover-worker.cjs.map +1 -0
  150. package/dist/sandbox/discover-worker.d.cts +1 -0
  151. package/dist/sandbox/discover-worker.d.mts +1 -0
  152. package/dist/sandbox/discover-worker.mjs +45 -0
  153. package/dist/sandbox/discover-worker.mjs.map +1 -0
  154. package/dist/sandbox-CL--ZDui.cjs +164 -0
  155. package/dist/sandbox-CL--ZDui.cjs.map +1 -0
  156. package/dist/sandbox-Dm247NGx.mjs +117 -0
  157. package/dist/sandbox-Dm247NGx.mjs.map +1 -0
  158. package/dist/sandbox-M8UnLhXE.d.cts +126 -0
  159. package/dist/sandbox-M8UnLhXE.d.cts.map +1 -0
  160. package/dist/sandbox-M8UnLhXE.d.mts +126 -0
  161. package/dist/sandbox-M8UnLhXE.d.mts.map +1 -0
  162. package/dist/{workspace-BFe57es7.mjs → schemas-Ckm_aBnF.cjs} +71 -982
  163. package/dist/schemas-Ckm_aBnF.cjs.map +1 -0
  164. package/dist/{workspace-B6zQO6RY.cjs → schemas-D2LCF689.mjs} +2 -1168
  165. package/dist/schemas-D2LCF689.mjs.map +1 -0
  166. package/dist/{sniffer-DHE2Nafd.mjs → sniffer-49KPbDgq.mjs} +131 -444
  167. package/dist/sniffer-49KPbDgq.mjs.map +1 -0
  168. package/dist/{sniffer-BsfPa-GA.cjs → sniffer-ByhbEW5A.cjs} +145 -512
  169. package/dist/sniffer-ByhbEW5A.cjs.map +1 -0
  170. package/dist/sst-BdALKEas.cjs +453 -0
  171. package/dist/sst-BdALKEas.cjs.map +1 -0
  172. package/dist/sst-Cper040I.mjs +430 -0
  173. package/dist/sst-Cper040I.mjs.map +1 -0
  174. package/dist/{store-BS8A7NcA.mjs → store-BaaonhkJ.mjs} +2 -2
  175. package/dist/{store-BS8A7NcA.mjs.map → store-BaaonhkJ.mjs.map} +1 -1
  176. package/dist/{store-KvNQwYaB.cjs → store-D_2ByRtW.cjs} +4 -4
  177. package/dist/{store-KvNQwYaB.cjs.map → store-D_2ByRtW.cjs.map} +1 -1
  178. package/dist/target/public.cjs +3 -3
  179. package/dist/target/public.d.cts +3 -3
  180. package/dist/target/public.d.mts +3 -3
  181. package/dist/target/public.mjs +3 -3
  182. package/dist/{terminal-6oL0vANs.cjs → terminal-Bdv--jhY.cjs} +16 -111
  183. package/dist/terminal-Bdv--jhY.cjs.map +1 -0
  184. package/dist/{terminal-ByZNjuig.mjs → terminal-D7Ntz6WE.mjs} +13 -90
  185. package/dist/terminal-D7Ntz6WE.mjs.map +1 -0
  186. package/dist/{types-DIA7Li-J.d.cts → types-B_bEQvb9.d.mts} +42 -7
  187. package/dist/types-B_bEQvb9.d.mts.map +1 -0
  188. package/dist/{types-CfLKGfC_.d.mts → types-DkrDOMxw.d.cts} +43 -6
  189. package/dist/types-DkrDOMxw.d.cts.map +1 -0
  190. package/dist/utils-D2Nk1Nv2.cjs +205 -0
  191. package/dist/utils-D2Nk1Nv2.cjs.map +1 -0
  192. package/dist/utils-D_fxUqvU.mjs +156 -0
  193. package/dist/utils-D_fxUqvU.mjs.map +1 -0
  194. package/dist/vitest.cjs +2 -2
  195. package/dist/vitest.mjs +2 -2
  196. package/dist/workerRuntime-BXfhbe13.cjs +108 -0
  197. package/dist/workerRuntime-BXfhbe13.cjs.map +1 -0
  198. package/dist/workerRuntime-CsOyBRx2.mjs +79 -0
  199. package/dist/workerRuntime-CsOyBRx2.mjs.map +1 -0
  200. package/dist/workspace/index.cjs +1 -1
  201. package/dist/workspace/index.d.cts +2 -2
  202. package/dist/workspace/index.d.mts +2 -2
  203. package/dist/workspace/index.mjs +1 -1
  204. package/dist/workspace-BwgWJK7h.cjs +1196 -0
  205. package/dist/workspace-BwgWJK7h.cjs.map +1 -0
  206. package/dist/workspace-Bwit4q9O.mjs +1024 -0
  207. package/dist/workspace-Bwit4q9O.mjs.map +1 -0
  208. package/package.json +13 -13
  209. package/dist/config-BYh9S0cZ.cjs +0 -534
  210. package/dist/config-BYh9S0cZ.cjs.map +0 -1
  211. package/dist/config-Bf4-bROQ.mjs +0 -457
  212. package/dist/config-Bf4-bROQ.mjs.map +0 -1
  213. package/dist/config.d.cts.map +0 -1
  214. package/dist/config.d.mts.map +0 -1
  215. package/dist/define-CHBIEc5j.mjs.map +0 -1
  216. package/dist/define-Cv_QvDrg.cjs.map +0 -1
  217. package/dist/deploy-Cg9fae7a.mjs.map +0 -1
  218. package/dist/deploy-D8Qr-Xto.cjs.map +0 -1
  219. package/dist/discover-Bc-4eA_p.cjs.map +0 -1
  220. package/dist/discover-FrYvzkeC.mjs.map +0 -1
  221. package/dist/home-DOzBaWaL.cjs +0 -33
  222. package/dist/home-DOzBaWaL.cjs.map +0 -1
  223. package/dist/home-GI7pJl1M.mjs +0 -22
  224. package/dist/home-GI7pJl1M.mjs.map +0 -1
  225. package/dist/resolve-CFCIkm7m.mjs.map +0 -1
  226. package/dist/resolve-wbv66HjD.cjs.map +0 -1
  227. package/dist/sniffer-BsfPa-GA.cjs.map +0 -1
  228. package/dist/sniffer-DHE2Nafd.mjs.map +0 -1
  229. package/dist/terminal-6oL0vANs.cjs.map +0 -1
  230. package/dist/terminal-ByZNjuig.mjs.map +0 -1
  231. package/dist/types-CfLKGfC_.d.mts.map +0 -1
  232. package/dist/types-DIA7Li-J.d.cts.map +0 -1
  233. package/dist/workspace-B6zQO6RY.cjs.map +0 -1
  234. package/dist/workspace-BFe57es7.mjs.map +0 -1
@@ -1,10 +1,141 @@
1
- import { M as StateVersionConflict, k as StateLocked } from "../sniffer-DHE2Nafd.mjs";
2
- import { n as gkmHome, t as GKM_HOME_ENV } from "../home-GI7pJl1M.mjs";
3
- import { a as UnknownDeployTarget, i as DeployTargetNotYetSupported } from "../define-CHBIEc5j.mjs";
4
- import { u as deployIdentity } from "../store-BS8A7NcA.mjs";
5
- import { i as TargetPackageNotFound, t as TargetRuntimeUndeclared } from "../runtime-DbakJS8u.mjs";
6
- import { i as TargetRuntimeMismatch, n as TargetEntryInvalid, r as TargetPackageInvalid, s as ProviderRemoved, t as InvalidTargetOptions } from "../resolve-CFCIkm7m.mjs";
7
- import { c as MissingCredential, i as UnknownDeployApps, l as chainCredentials, n as NoDeployableApps, r as RollbackFailed, u as storedCredentials } from "../terminal-ByZNjuig.mjs";
8
- import { t as deploy } from "../deploy-Cg9fae7a.mjs";
9
- import { d as RegistryNotFound, f as ProjectNotOwned, l as RegistryAmbiguous, n as MissingEnvVars, t as BackendDeployFailed, u as RegistryNotConfigured } from "../deploy-B7jvUORo.mjs";
10
- export { BackendDeployFailed, DeployTargetNotYetSupported, GKM_HOME_ENV, InvalidTargetOptions, MissingCredential, MissingEnvVars, NoDeployableApps, ProjectNotOwned, ProviderRemoved, RegistryAmbiguous, RegistryNotConfigured, RegistryNotFound, RollbackFailed, StateLocked, StateVersionConflict, TargetEntryInvalid, TargetPackageInvalid, TargetPackageNotFound, TargetRuntimeMismatch, TargetRuntimeUndeclared, UnknownDeployApps, UnknownDeployTarget, chainCredentials, deploy, deployIdentity, gkmHome, storedCredentials };
1
+ import { M as StateVersionConflict, k as StateLocked, u as detectPackageManager } from "../sniffer-49KPbDgq.mjs";
2
+ import { a as CommandTimedOut, i as CommandFailed, n as SANDBOX_ENV_ALLOWLIST, r as allowlistedEnv, t as LocalSandbox, v as GKM_HOME_ENV, y as gkmHome } from "../local-Cd8ZYQG3.mjs";
3
+ import { n as ConstructsNotSerializable, o as SandboxWorkerFailed, t as ConstructDiscoveryFailed } from "../discover-LMrqsWSU.mjs";
4
+ import { n as SandboxCwdEscape, o as confineCwd, r as SecretNameInvalid, t as SECRETS_DIR_ENV } from "../sandbox-Dm247NGx.mjs";
5
+ import { a as UnknownDeployTarget, i as DeployTargetNotYetSupported } from "../define-CYs0PEfZ.mjs";
6
+ import { ConfigLoadFailed, ConfigObjectNotSerializable } from "../config.mjs";
7
+ import { u as deployIdentity } from "../store-BaaonhkJ.mjs";
8
+ import { i as TargetPackageNotFound, t as TargetRuntimeUndeclared } from "../runtime-Cmn-FeYO.mjs";
9
+ import { i as TargetRuntimeMismatch, n as TargetEntryInvalid, r as TargetPackageInvalid, s as ProviderRemoved, t as InvalidTargetOptions } from "../resolve-DZ2IJ0qY.mjs";
10
+ import { n as chainCredentials, r as storedCredentials, t as MissingCredential } from "../credentials-s0wMeZBU.mjs";
11
+ import { i as SurfacesUnhealthy, r as SstOutputsUnreadable, t as SstConfigNotFound } from "../sst-Cper040I.mjs";
12
+ import { i as UnknownDeployApps, n as NoDeployableApps, r as RollbackFailed } from "../terminal-D7Ntz6WE.mjs";
13
+ import { t as deploy } from "../deploy-Dc2LBJaK.mjs";
14
+ import { d as RegistryNotFound, f as ProjectNotOwned, l as RegistryAmbiguous, n as MissingEnvVars, t as BackendDeployFailed, u as RegistryNotConfigured } from "../deploy-ZRXIPp1c.mjs";
15
+ import { join, resolve } from "node:path";
16
+ import { existsSync } from "node:fs";
17
+ //#region src/sandbox/install.ts
18
+ /**
19
+ * Installing a project's dependencies in a sandbox, with or without their
20
+ * lifecycle scripts.
21
+ *
22
+ * `postinstall` is the oldest way into a build machine: any package in the
23
+ * lockfile — a dependency of a dependency — runs whatever it likes the moment
24
+ * it is installed. For a build the host trusts that is how native modules get
25
+ * built. For one it does not, the scripts are skipped, and the few packages
26
+ * that genuinely need theirs (esbuild's binary, a database driver) are named
27
+ * and rebuilt — with nothing but the sandbox's environment either way.
28
+ */
29
+ /** Long enough for a cold install of a large monorepo. */
30
+ const INSTALL_TIMEOUT_MS = 9e5;
31
+ /** A name in `allowScripts` that is not a package name. */
32
+ var InstallAllowlistNameInvalid = class extends Error {
33
+ packageName;
34
+ constructor(packageName) {
35
+ super(`'${packageName}' is not a package name, so its scripts cannot be allowed. Name the package as it appears in package.json — 'esbuild', '@prisma/client'.`);
36
+ this.packageName = packageName;
37
+ this.name = "InstallAllowlistNameInvalid";
38
+ }
39
+ };
40
+ /** The package manager has no way to run only some packages' scripts. */
41
+ var InstallScriptsAllowlistUnsupported = class extends Error {
42
+ packageManager;
43
+ allowScripts;
44
+ constructor(packageManager, allowScripts) {
45
+ super(`${packageManager} cannot rebuild named packages after an install without scripts, so ${allowScripts.join(", ")} cannot be allowed theirs. Use pnpm, npm or Yarn 2+, or install with every script skipped.`);
46
+ this.packageManager = packageManager;
47
+ this.allowScripts = allowScripts;
48
+ this.name = "InstallScriptsAllowlistUnsupported";
49
+ }
50
+ };
51
+ /**
52
+ * npm's package-name grammar, less a leading `-`: each name is an argument to
53
+ * `rebuild`, and must never be read as a flag.
54
+ */
55
+ const PACKAGE_NAME = /^(?:@[a-z0-9~][a-z0-9._~-]*\/)?[a-z0-9~][a-z0-9._~-]*$/;
56
+ /**
57
+ * The commands an install runs, in order. Exported for the tests, which
58
+ * check each package manager's flags without installing with all four.
59
+ */
60
+ function installCommands(packageManager, cwd, options = {}) {
61
+ const ignore = options.ignoreScripts ?? false;
62
+ const allow = ignore ? [...options.allowScripts ?? []] : [];
63
+ for (const name of allow) if (!PACKAGE_NAME.test(name)) throw new InstallAllowlistNameInvalid(name);
64
+ switch (packageManager) {
65
+ case "pnpm": return [["pnpm", [
66
+ "install",
67
+ "--frozen-lockfile",
68
+ ...ignore ? ["--ignore-scripts"] : []
69
+ ]], ...allow.length > 0 ? [["pnpm", [
70
+ "rebuild",
71
+ "--config.dangerouslyAllowAllBuilds=true",
72
+ ...allow
73
+ ]]] : []];
74
+ case "npm": return [["npm", [existsSync(join(cwd, "package-lock.json")) ? "ci" : "install", ...ignore ? ["--ignore-scripts"] : []]], ...allow.length > 0 ? [["npm", [
75
+ "rebuild",
76
+ "--dangerously-allow-all-scripts",
77
+ ...allow
78
+ ]]] : []];
79
+ case "yarn":
80
+ if (existsSync(join(cwd, ".yarnrc.yml"))) return [["yarn", [
81
+ "install",
82
+ "--immutable",
83
+ ...ignore ? ["--mode=skip-build"] : []
84
+ ]], ...allow.length > 0 ? [["yarn", ["rebuild", ...allow]]] : []];
85
+ if (allow.length > 0) throw new InstallScriptsAllowlistUnsupported("Yarn 1", allow);
86
+ return [["yarn", [
87
+ "install",
88
+ "--frozen-lockfile",
89
+ ...ignore ? ["--ignore-scripts"] : []
90
+ ]]];
91
+ case "bun":
92
+ if (allow.length > 0) throw new InstallScriptsAllowlistUnsupported("bun", allow);
93
+ return [["bun", [
94
+ "install",
95
+ "--frozen-lockfile",
96
+ ...ignore ? ["--ignore-scripts"] : []
97
+ ]]];
98
+ }
99
+ }
100
+ /**
101
+ * Install the project's dependencies in `sandbox`.
102
+ *
103
+ * ```ts
104
+ * // A checkout nobody has reviewed: no scripts but esbuild's.
105
+ * await installDependencies(sandbox, {
106
+ * ignoreScripts: true,
107
+ * allowScripts: ['esbuild'],
108
+ * });
109
+ * ```
110
+ *
111
+ * Resolves with each command's result, in order — with its output when
112
+ * `output` is `capture`.
113
+ *
114
+ * @throws {CommandFailed} when the package manager exits unsuccessfully.
115
+ * @throws {InstallScriptsAllowlistUnsupported} for an allowlist the package
116
+ * manager cannot honour, before anything is installed.
117
+ */
118
+ async function installDependencies(sandbox, options = {}) {
119
+ const cwd = options.cwd ?? sandbox.root;
120
+ const results = [];
121
+ const packageManager = options.packageManager ?? detectPackageManager(resolve(sandbox.root, cwd));
122
+ for (const [command, args] of installCommands(packageManager, resolve(sandbox.root, cwd), options)) {
123
+ const result = await sandbox.exec(command, args, {
124
+ cwd,
125
+ env: {
126
+ ...sandbox.env,
127
+ ...options.env
128
+ },
129
+ timeoutMs: options.timeoutMs ?? 9e5,
130
+ output: options.output ?? "inherit",
131
+ ...options.signal ? { signal: options.signal } : {}
132
+ });
133
+ results.push(result);
134
+ if (result.exitCode !== 0) throw new CommandFailed(command, args, result.exitCode, result.signal);
135
+ }
136
+ return results;
137
+ }
138
+ //#endregion
139
+ export { BackendDeployFailed, CommandFailed, CommandTimedOut, ConfigLoadFailed, ConfigObjectNotSerializable, ConstructDiscoveryFailed, ConstructsNotSerializable, DeployTargetNotYetSupported, GKM_HOME_ENV, INSTALL_TIMEOUT_MS, InstallAllowlistNameInvalid, InstallScriptsAllowlistUnsupported, InvalidTargetOptions, LocalSandbox, MissingCredential, MissingEnvVars, NoDeployableApps, ProjectNotOwned, ProviderRemoved, RegistryAmbiguous, RegistryNotConfigured, RegistryNotFound, RollbackFailed, SANDBOX_ENV_ALLOWLIST, SECRETS_DIR_ENV, SandboxCwdEscape, SandboxWorkerFailed, SecretNameInvalid, SstConfigNotFound, SstOutputsUnreadable, StateLocked, StateVersionConflict, SurfacesUnhealthy, TargetEntryInvalid, TargetPackageInvalid, TargetPackageNotFound, TargetRuntimeMismatch, TargetRuntimeUndeclared, UnknownDeployApps, UnknownDeployTarget, allowlistedEnv, chainCredentials, confineCwd, deploy, deployIdentity, gkmHome, installDependencies, storedCredentials };
140
+
141
+ //# sourceMappingURL=public.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public.mjs","names":[],"sources":["../../src/sandbox/install.ts"],"sourcesContent":["/**\n * Installing a project's dependencies in a sandbox, with or without their\n * lifecycle scripts.\n *\n * `postinstall` is the oldest way into a build machine: any package in the\n * lockfile — a dependency of a dependency — runs whatever it likes the moment\n * it is installed. For a build the host trusts that is how native modules get\n * built. For one it does not, the scripts are skipped, and the few packages\n * that genuinely need theirs (esbuild's binary, a database driver) are named\n * and rebuilt — with nothing but the sandbox's environment either way.\n */\n\nimport { existsSync } from 'node:fs';\nimport { join, resolve } from 'node:path';\nimport { detectPackageManager, type PackageManager } from '../docker/templates';\nimport { CommandFailed } from '../run';\nimport type { Sandbox, SandboxOutput, SandboxResult } from './sandbox';\n\n/** Long enough for a cold install of a large monorepo. */\nexport const INSTALL_TIMEOUT_MS = 15 * 60_000;\n\nexport interface InstallOptions {\n\t/** The directory to install in. Defaults to the sandbox's root. */\n\tcwd?: string;\n\t/** Defaults to the one the lockfile above `cwd` names. */\n\tpackageManager?: PackageManager;\n\t/**\n\t * Skip every lifecycle script — dependencies' and the project's own —\n\t * except those of {@link allowScripts}. Defaults to false: scripts run as\n\t * a plain install runs them, under the package manager's own policy —\n\t * npm 12 and pnpm 10 skip dependencies' scripts nobody approved.\n\t */\n\tignoreScripts?: boolean;\n\t/**\n\t * With `ignoreScripts`, the packages whose scripts still run: rebuilt by\n\t * name once the install is done.\n\t */\n\tallowScripts?: readonly string[];\n\t/** Variables the install needs beyond the sandbox's own. */\n\tenv?: Readonly<Record<string, string>>;\n\t/** Defaults to {@link INSTALL_TIMEOUT_MS}, for each command. */\n\ttimeoutMs?: number;\n\t/** Where the package manager's output goes. Defaults to `inherit`. */\n\toutput?: SandboxOutput;\n\tsignal?: AbortSignal;\n}\n\n/** A name in `allowScripts` that is not a package name. */\nexport class InstallAllowlistNameInvalid extends Error {\n\tconstructor(readonly packageName: string) {\n\t\tsuper(\n\t\t\t`'${packageName}' is not a package name, so its scripts cannot be ` +\n\t\t\t\t'allowed. Name the package as it appears in package.json — ' +\n\t\t\t\t\"'esbuild', '@prisma/client'.\",\n\t\t);\n\t\tthis.name = 'InstallAllowlistNameInvalid';\n\t}\n}\n\n/** The package manager has no way to run only some packages' scripts. */\nexport class InstallScriptsAllowlistUnsupported extends Error {\n\tconstructor(\n\t\treadonly packageManager: string,\n\t\treadonly allowScripts: readonly string[],\n\t) {\n\t\tsuper(\n\t\t\t`${packageManager} cannot rebuild named packages after an install ` +\n\t\t\t\t`without scripts, so ${allowScripts.join(', ')} cannot be allowed ` +\n\t\t\t\t'theirs. Use pnpm, npm or Yarn 2+, or install with every script ' +\n\t\t\t\t'skipped.',\n\t\t);\n\t\tthis.name = 'InstallScriptsAllowlistUnsupported';\n\t}\n}\n\n/**\n * npm's package-name grammar, less a leading `-`: each name is an argument to\n * `rebuild`, and must never be read as a flag.\n */\nconst PACKAGE_NAME = /^(?:@[a-z0-9~][a-z0-9._~-]*\\/)?[a-z0-9~][a-z0-9._~-]*$/;\n\n/**\n * The commands an install runs, in order. Exported for the tests, which\n * check each package manager's flags without installing with all four.\n */\nexport function installCommands(\n\tpackageManager: PackageManager,\n\tcwd: string,\n\toptions: Pick<InstallOptions, 'ignoreScripts' | 'allowScripts'> = {},\n): [string, string[]][] {\n\tconst ignore = options.ignoreScripts ?? false;\n\tconst allow = ignore ? [...(options.allowScripts ?? [])] : [];\n\tfor (const name of allow) {\n\t\tif (!PACKAGE_NAME.test(name)) throw new InstallAllowlistNameInvalid(name);\n\t}\n\n\tswitch (packageManager) {\n\t\tcase 'pnpm':\n\t\t\treturn [\n\t\t\t\t[\n\t\t\t\t\t'pnpm',\n\t\t\t\t\t[\n\t\t\t\t\t\t'install',\n\t\t\t\t\t\t'--frozen-lockfile',\n\t\t\t\t\t\t...(ignore ? ['--ignore-scripts'] : []),\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t\t// pnpm 10 builds no dependency it was not told to, even by name;\n\t\t\t\t// this command names exactly the ones allowed, so it may build\n\t\t\t\t// what it names.\n\t\t\t\t...(allow.length > 0\n\t\t\t\t\t? [\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t'pnpm',\n\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t'rebuild',\n\t\t\t\t\t\t\t\t\t'--config.dangerouslyAllowAllBuilds=true',\n\t\t\t\t\t\t\t\t\t...allow,\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t] as [string, string[]],\n\t\t\t\t\t\t]\n\t\t\t\t\t: []),\n\t\t\t];\n\t\tcase 'npm': {\n\t\t\tconst locked = existsSync(join(cwd, 'package-lock.json'));\n\t\t\treturn [\n\t\t\t\t[\n\t\t\t\t\t'npm',\n\t\t\t\t\t[locked ? 'ci' : 'install', ...(ignore ? ['--ignore-scripts'] : [])],\n\t\t\t\t],\n\t\t\t\t// npm 12 runs no dependency's install script its `allowScripts`\n\t\t\t\t// policy does not approve, rebuilt by name or not, and refuses\n\t\t\t\t// `--allow-scripts` on a project's command line. This command\n\t\t\t\t// names exactly the packages allowed, so it may run what it names.\n\t\t\t\t...(allow.length > 0\n\t\t\t\t\t? [\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t'npm',\n\t\t\t\t\t\t\t\t['rebuild', '--dangerously-allow-all-scripts', ...allow],\n\t\t\t\t\t\t\t] as [string, string[]],\n\t\t\t\t\t\t]\n\t\t\t\t\t: []),\n\t\t\t];\n\t\t}\n\t\tcase 'yarn': {\n\t\t\t// Yarn 2+ keeps a `.yarnrc.yml`; it skips builds by mode and can\n\t\t\t// rebuild by name. Yarn 1 can only skip them all.\n\t\t\tconst berry = existsSync(join(cwd, '.yarnrc.yml'));\n\t\t\tif (berry) {\n\t\t\t\treturn [\n\t\t\t\t\t[\n\t\t\t\t\t\t'yarn',\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\t'install',\n\t\t\t\t\t\t\t'--immutable',\n\t\t\t\t\t\t\t...(ignore ? ['--mode=skip-build'] : []),\n\t\t\t\t\t\t],\n\t\t\t\t\t],\n\t\t\t\t\t...(allow.length > 0\n\t\t\t\t\t\t? [['yarn', ['rebuild', ...allow]] as [string, string[]]]\n\t\t\t\t\t\t: []),\n\t\t\t\t];\n\t\t\t}\n\t\t\tif (allow.length > 0) {\n\t\t\t\tthrow new InstallScriptsAllowlistUnsupported('Yarn 1', allow);\n\t\t\t}\n\t\t\treturn [\n\t\t\t\t[\n\t\t\t\t\t'yarn',\n\t\t\t\t\t[\n\t\t\t\t\t\t'install',\n\t\t\t\t\t\t'--frozen-lockfile',\n\t\t\t\t\t\t...(ignore ? ['--ignore-scripts'] : []),\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t];\n\t\t}\n\t\tcase 'bun':\n\t\t\tif (allow.length > 0) {\n\t\t\t\tthrow new InstallScriptsAllowlistUnsupported('bun', allow);\n\t\t\t}\n\t\t\treturn [\n\t\t\t\t[\n\t\t\t\t\t'bun',\n\t\t\t\t\t[\n\t\t\t\t\t\t'install',\n\t\t\t\t\t\t'--frozen-lockfile',\n\t\t\t\t\t\t...(ignore ? ['--ignore-scripts'] : []),\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t];\n\t}\n}\n\n/**\n * Install the project's dependencies in `sandbox`.\n *\n * ```ts\n * // A checkout nobody has reviewed: no scripts but esbuild's.\n * await installDependencies(sandbox, {\n * ignoreScripts: true,\n * allowScripts: ['esbuild'],\n * });\n * ```\n *\n * Resolves with each command's result, in order — with its output when\n * `output` is `capture`.\n *\n * @throws {CommandFailed} when the package manager exits unsuccessfully.\n * @throws {InstallScriptsAllowlistUnsupported} for an allowlist the package\n * manager cannot honour, before anything is installed.\n */\nexport async function installDependencies(\n\tsandbox: Sandbox,\n\toptions: InstallOptions = {},\n): Promise<SandboxResult[]> {\n\tconst cwd = options.cwd ?? sandbox.root;\n\tconst results: SandboxResult[] = [];\n\tconst packageManager =\n\t\toptions.packageManager ?? detectPackageManager(resolve(sandbox.root, cwd));\n\n\tfor (const [command, args] of installCommands(\n\t\tpackageManager,\n\t\tresolve(sandbox.root, cwd),\n\t\toptions,\n\t)) {\n\t\tconst result = await sandbox.exec(command, args, {\n\t\t\tcwd,\n\t\t\tenv: { ...sandbox.env, ...options.env },\n\t\t\ttimeoutMs: options.timeoutMs ?? INSTALL_TIMEOUT_MS,\n\t\t\toutput: options.output ?? 'inherit',\n\t\t\t...(options.signal ? { signal: options.signal } : {}),\n\t\t});\n\t\tresults.push(result);\n\t\tif (result.exitCode !== 0) {\n\t\t\tthrow new CommandFailed(\n\t\t\t\tcommand,\n\t\t\t\targs,\n\t\t\t\tresult.exitCode,\n\t\t\t\tresult.signal as NodeJS.Signals | null,\n\t\t\t);\n\t\t}\n\t}\n\treturn results;\n}\n"],"mappings":"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"}
@@ -0,0 +1,54 @@
1
+ let node_url = require("node:url");
2
+ let _geekmidas_envkit_sniffer = require("@geekmidas/envkit/sniffer");
3
+ //#region src/deploy/sniffer-envparser-worker.ts
4
+ /**
5
+ * Subprocess worker for envParser sniffing.
6
+ *
7
+ * Imports an app's envParser module, hands it a SnifferEnvironmentParser and
8
+ * reports which variables it read. A subprocess, like the entry and route
9
+ * sniffers, so the module runs in the sandbox rather than in the deploy, with
10
+ * none of the deploy's environment.
11
+ *
12
+ * Usage:
13
+ * node --import tsx ./sniffer-envparser-worker.ts /path/to/env.ts envParser
14
+ *
15
+ * Output (JSON, last line of stdout):
16
+ * { "envVars": [...], "optionalEnvVars": [...], "unhandledRejections": [...],
17
+ * "warnings": [...], "error": null }
18
+ */
19
+ const modulePath = process.argv[2];
20
+ const exportName = process.argv[3] ?? "default";
21
+ async function sniff() {
22
+ const warnings = [];
23
+ const sniffer = new _geekmidas_envkit_sniffer.SnifferEnvironmentParser();
24
+ const result = await (0, _geekmidas_envkit_sniffer.sniffWithFireAndForget)(sniffer, async () => {
25
+ if (!modulePath) throw new TypeError("No envParser module was given.");
26
+ const envParser = (await import((0, node_url.pathToFileURL)(modulePath).href))[exportName];
27
+ if (typeof envParser !== "function") {
28
+ warnings.push(`[sniffer] Export "${exportName}" from "${modulePath}" is not a function`);
29
+ return;
30
+ }
31
+ const parser = envParser(sniffer);
32
+ if (parser && typeof parser.parse === "function") try {
33
+ parser.parse();
34
+ } catch {}
35
+ });
36
+ const line = JSON.stringify({
37
+ envVars: result.envVars,
38
+ optionalEnvVars: result.optionalEnvVars,
39
+ unhandledRejections: result.unhandledRejections.map((e) => e.message),
40
+ warnings,
41
+ error: result.error ? result.error.message : null
42
+ });
43
+ process.stdout.write(`${line}\n`, () => process.exit(0));
44
+ }
45
+ sniff().catch((e) => {
46
+ console.log(JSON.stringify({
47
+ envVars: [],
48
+ error: e.message || String(e)
49
+ }));
50
+ process.exit(1);
51
+ });
52
+ //#endregion
53
+
54
+ //# sourceMappingURL=sniffer-envparser-worker.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sniffer-envparser-worker.cjs","names":["SnifferEnvironmentParser","sniffWithFireAndForget","pathToFileURL"],"sources":["../../src/deploy/sniffer-envparser-worker.ts"],"sourcesContent":["/**\n * Subprocess worker for envParser sniffing.\n *\n * Imports an app's envParser module, hands it a SnifferEnvironmentParser and\n * reports which variables it read. A subprocess, like the entry and route\n * sniffers, so the module runs in the sandbox rather than in the deploy, with\n * none of the deploy's environment.\n *\n * Usage:\n * node --import tsx ./sniffer-envparser-worker.ts /path/to/env.ts envParser\n *\n * Output (JSON, last line of stdout):\n * { \"envVars\": [...], \"optionalEnvVars\": [...], \"unhandledRejections\": [...],\n * \"warnings\": [...], \"error\": null }\n */\n\nimport { pathToFileURL } from 'node:url';\nimport {\n\tSnifferEnvironmentParser,\n\tsniffWithFireAndForget,\n} from '@geekmidas/envkit/sniffer';\n\nconst modulePath = process.argv[2];\nconst exportName = process.argv[3] ?? 'default';\n\nasync function sniff(): Promise<void> {\n\tconst warnings: string[] = [];\n\tconst sniffer = new SnifferEnvironmentParser();\n\n\tconst result = await sniffWithFireAndForget(sniffer, async () => {\n\t\tif (!modulePath) throw new TypeError('No envParser module was given.');\n\t\tconst module = await import(pathToFileURL(modulePath).href);\n\n\t\tconst envParser = module[exportName];\n\t\tif (typeof envParser !== 'function') {\n\t\t\twarnings.push(\n\t\t\t\t`[sniffer] Export \"${exportName}\" from \"${modulePath}\" is not a function`,\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\t// The envParser function typically creates and configures an\n\t\t// EnvironmentParser; the sniffer implements the same interface.\n\t\tconst parser = envParser(sniffer);\n\n\t\t// A ConfigParser's parse() is what reads the variables.\n\t\tif (parser && typeof parser.parse === 'function') {\n\t\t\ttry {\n\t\t\t\tparser.parse();\n\t\t\t} catch {\n\t\t\t\t// Parsing may fail on the sniffer's mock values; expected.\n\t\t\t}\n\t\t}\n\t});\n\n\tconst line = JSON.stringify({\n\t\tenvVars: result.envVars,\n\t\toptionalEnvVars: result.optionalEnvVars,\n\t\tunhandledRejections: result.unhandledRejections.map((e) => e.message),\n\t\twarnings,\n\t\terror: result.error ? result.error.message : null,\n\t});\n\t// The module may have left a pool or a timer open, so exit — once the\n\t// answer has drained: a pipe on macOS is written asynchronously.\n\tprocess.stdout.write(`${line}\\n`, () => process.exit(0));\n}\n\nsniff().catch((e) => {\n\tconsole.log(JSON.stringify({ envVars: [], error: e.message || String(e) }));\n\tprocess.exit(1);\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;AAsBA,MAAM,aAAa,QAAQ,KAAK;AAChC,MAAM,aAAa,QAAQ,KAAK,MAAM;AAEtC,eAAe,QAAuB;CACrC,MAAM,WAAqB,CAAC;CAC5B,MAAM,UAAU,IAAIA,0BAAAA,yBAAyB;CAE7C,MAAM,SAAS,OAAA,GAAMC,0BAAAA,uBAAAA,CAAuB,SAAS,YAAY;EAChE,IAAI,CAAC,YAAY,MAAM,IAAI,UAAU,gCAAgC;EAGrE,MAAM,aAAY,MAFG,QAAA,GAAOC,SAAAA,cAAAA,CAAc,UAAU,CAAC,CAAC,MAAA,CAE7B;EACzB,IAAI,OAAO,cAAc,YAAY;GACpC,SAAS,KACR,qBAAqB,WAAW,UAAU,WAAW,oBACtD;GACA;EACD;EAIA,MAAM,SAAS,UAAU,OAAO;EAGhC,IAAI,UAAU,OAAO,OAAO,UAAU,YACrC,IAAI;GACH,OAAO,MAAM;EACd,QAAQ,CAER;CAEF,CAAC;CAED,MAAM,OAAO,KAAK,UAAU;EAC3B,SAAS,OAAO;EAChB,iBAAiB,OAAO;EACxB,qBAAqB,OAAO,oBAAoB,KAAK,MAAM,EAAE,OAAO;EACpE;EACA,OAAO,OAAO,QAAQ,OAAO,MAAM,UAAU;CAC9C,CAAC;CAGD,QAAQ,OAAO,MAAM,GAAG,KAAK,WAAW,QAAQ,KAAK,CAAC,CAAC;AACxD;AAEA,MAAM,CAAC,CAAC,OAAO,MAAM;CACpB,QAAQ,IAAI,KAAK,UAAU;EAAE,SAAS,CAAC;EAAG,OAAO,EAAE,WAAW,OAAO,CAAC;CAAE,CAAC,CAAC;CAC1E,QAAQ,KAAK,CAAC;AACf,CAAC"}
@@ -0,0 +1 @@
1
+ export {}
@@ -0,0 +1 @@
1
+ export {}
@@ -0,0 +1,55 @@
1
+ import { pathToFileURL } from "node:url";
2
+ import { SnifferEnvironmentParser, sniffWithFireAndForget } from "@geekmidas/envkit/sniffer";
3
+ //#region src/deploy/sniffer-envparser-worker.ts
4
+ /**
5
+ * Subprocess worker for envParser sniffing.
6
+ *
7
+ * Imports an app's envParser module, hands it a SnifferEnvironmentParser and
8
+ * reports which variables it read. A subprocess, like the entry and route
9
+ * sniffers, so the module runs in the sandbox rather than in the deploy, with
10
+ * none of the deploy's environment.
11
+ *
12
+ * Usage:
13
+ * node --import tsx ./sniffer-envparser-worker.ts /path/to/env.ts envParser
14
+ *
15
+ * Output (JSON, last line of stdout):
16
+ * { "envVars": [...], "optionalEnvVars": [...], "unhandledRejections": [...],
17
+ * "warnings": [...], "error": null }
18
+ */
19
+ const modulePath = process.argv[2];
20
+ const exportName = process.argv[3] ?? "default";
21
+ async function sniff() {
22
+ const warnings = [];
23
+ const sniffer = new SnifferEnvironmentParser();
24
+ const result = await sniffWithFireAndForget(sniffer, async () => {
25
+ if (!modulePath) throw new TypeError("No envParser module was given.");
26
+ const envParser = (await import(pathToFileURL(modulePath).href))[exportName];
27
+ if (typeof envParser !== "function") {
28
+ warnings.push(`[sniffer] Export "${exportName}" from "${modulePath}" is not a function`);
29
+ return;
30
+ }
31
+ const parser = envParser(sniffer);
32
+ if (parser && typeof parser.parse === "function") try {
33
+ parser.parse();
34
+ } catch {}
35
+ });
36
+ const line = JSON.stringify({
37
+ envVars: result.envVars,
38
+ optionalEnvVars: result.optionalEnvVars,
39
+ unhandledRejections: result.unhandledRejections.map((e) => e.message),
40
+ warnings,
41
+ error: result.error ? result.error.message : null
42
+ });
43
+ process.stdout.write(`${line}\n`, () => process.exit(0));
44
+ }
45
+ sniff().catch((e) => {
46
+ console.log(JSON.stringify({
47
+ envVars: [],
48
+ error: e.message || String(e)
49
+ }));
50
+ process.exit(1);
51
+ });
52
+ //#endregion
53
+ export {};
54
+
55
+ //# sourceMappingURL=sniffer-envparser-worker.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sniffer-envparser-worker.mjs","names":[],"sources":["../../src/deploy/sniffer-envparser-worker.ts"],"sourcesContent":["/**\n * Subprocess worker for envParser sniffing.\n *\n * Imports an app's envParser module, hands it a SnifferEnvironmentParser and\n * reports which variables it read. A subprocess, like the entry and route\n * sniffers, so the module runs in the sandbox rather than in the deploy, with\n * none of the deploy's environment.\n *\n * Usage:\n * node --import tsx ./sniffer-envparser-worker.ts /path/to/env.ts envParser\n *\n * Output (JSON, last line of stdout):\n * { \"envVars\": [...], \"optionalEnvVars\": [...], \"unhandledRejections\": [...],\n * \"warnings\": [...], \"error\": null }\n */\n\nimport { pathToFileURL } from 'node:url';\nimport {\n\tSnifferEnvironmentParser,\n\tsniffWithFireAndForget,\n} from '@geekmidas/envkit/sniffer';\n\nconst modulePath = process.argv[2];\nconst exportName = process.argv[3] ?? 'default';\n\nasync function sniff(): Promise<void> {\n\tconst warnings: string[] = [];\n\tconst sniffer = new SnifferEnvironmentParser();\n\n\tconst result = await sniffWithFireAndForget(sniffer, async () => {\n\t\tif (!modulePath) throw new TypeError('No envParser module was given.');\n\t\tconst module = await import(pathToFileURL(modulePath).href);\n\n\t\tconst envParser = module[exportName];\n\t\tif (typeof envParser !== 'function') {\n\t\t\twarnings.push(\n\t\t\t\t`[sniffer] Export \"${exportName}\" from \"${modulePath}\" is not a function`,\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\t// The envParser function typically creates and configures an\n\t\t// EnvironmentParser; the sniffer implements the same interface.\n\t\tconst parser = envParser(sniffer);\n\n\t\t// A ConfigParser's parse() is what reads the variables.\n\t\tif (parser && typeof parser.parse === 'function') {\n\t\t\ttry {\n\t\t\t\tparser.parse();\n\t\t\t} catch {\n\t\t\t\t// Parsing may fail on the sniffer's mock values; expected.\n\t\t\t}\n\t\t}\n\t});\n\n\tconst line = JSON.stringify({\n\t\tenvVars: result.envVars,\n\t\toptionalEnvVars: result.optionalEnvVars,\n\t\tunhandledRejections: result.unhandledRejections.map((e) => e.message),\n\t\twarnings,\n\t\terror: result.error ? result.error.message : null,\n\t});\n\t// The module may have left a pool or a timer open, so exit — once the\n\t// answer has drained: a pipe on macOS is written asynchronously.\n\tprocess.stdout.write(`${line}\\n`, () => process.exit(0));\n}\n\nsniff().catch((e) => {\n\tconsole.log(JSON.stringify({ envVars: [], error: e.message || String(e) }));\n\tprocess.exit(1);\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;AAsBA,MAAM,aAAa,QAAQ,KAAK;AAChC,MAAM,aAAa,QAAQ,KAAK,MAAM;AAEtC,eAAe,QAAuB;CACrC,MAAM,WAAqB,CAAC;CAC5B,MAAM,UAAU,IAAI,yBAAyB;CAE7C,MAAM,SAAS,MAAM,uBAAuB,SAAS,YAAY;EAChE,IAAI,CAAC,YAAY,MAAM,IAAI,UAAU,gCAAgC;EAGrE,MAAM,aAAY,MAFG,OAAO,cAAc,UAAU,CAAC,CAAC,MAAA,CAE7B;EACzB,IAAI,OAAO,cAAc,YAAY;GACpC,SAAS,KACR,qBAAqB,WAAW,UAAU,WAAW,oBACtD;GACA;EACD;EAIA,MAAM,SAAS,UAAU,OAAO;EAGhC,IAAI,UAAU,OAAO,OAAO,UAAU,YACrC,IAAI;GACH,OAAO,MAAM;EACd,QAAQ,CAER;CAEF,CAAC;CAED,MAAM,OAAO,KAAK,UAAU;EAC3B,SAAS,OAAO;EAChB,iBAAiB,OAAO;EACxB,qBAAqB,OAAO,oBAAoB,KAAK,MAAM,EAAE,OAAO;EACpE;EACA,OAAO,OAAO,QAAQ,OAAO,MAAM,UAAU;CAC9C,CAAC;CAGD,QAAQ,OAAO,MAAM,GAAG,KAAK,WAAW,QAAQ,KAAK,CAAC,CAAC;AACxD;AAEA,MAAM,CAAC,CAAC,OAAO,MAAM;CACpB,QAAQ,IAAI,KAAK,UAAU;EAAE,SAAS,CAAC;EAAG,OAAO,EAAE,WAAW,OAAO,CAAC;CAAE,CAAC,CAAC;CAC1E,QAAQ,KAAK,CAAC;AACf,CAAC"}
@@ -1,10 +1,13 @@
1
- const require_sniffer = require("./sniffer-BsfPa-GA.cjs");
2
- const require_discover = require("./discover-Bc-4eA_p.cjs");
3
- const require_config = require("./config-BYh9S0cZ.cjs");
4
- const require_workspace = require("./workspace-B6zQO6RY.cjs");
1
+ const require_sniffer = require("./sniffer-ByhbEW5A.cjs");
2
+ const require_local = require("./local-C7wnrcYK.cjs");
3
+ const require_discover = require("./discover-DHdECueV.cjs");
4
+ const require_derive = require("./derive-DAbo49sm.cjs");
5
+ const require_workspace = require("./workspace-BwgWJK7h.cjs");
6
+ require("./config.cjs");
5
7
  const require_storage = require("./storage-CSGoC3bK.cjs");
6
- const require_store = require("./store-KvNQwYaB.cjs");
7
- const require_terminal = require("./terminal-6oL0vANs.cjs");
8
+ const require_store = require("./store-D_2ByRtW.cjs");
9
+ const require_credentials = require("./credentials-B70vmLcm.cjs");
10
+ const require_terminal = require("./terminal-Bdv--jhY.cjs");
8
11
  let node_path = require("node:path");
9
12
  let node_fs_promises = require("node:fs/promises");
10
13
  let node_os = require("node:os");
@@ -758,7 +761,7 @@ function surfaceAddresses(manifest, appUrls) {
758
761
  const addresses = {};
759
762
  for (const [id, declaration] of Object.entries(manifest)) {
760
763
  if (declaration.kind !== "rest-api") continue;
761
- const url = appUrls[require_config.appKey(id)];
764
+ const url = appUrls[require_derive.appKey(id)];
762
765
  if (url) addresses[id] = url;
763
766
  }
764
767
  return addresses;
@@ -785,7 +788,7 @@ async function createDnsProvider(options) {
785
788
  if (isDnsProvider(config.provider)) return config.provider;
786
789
  const provider = config.provider;
787
790
  if (provider === "hostinger") {
788
- const { HostingerProvider } = await Promise.resolve().then(() => require("./HostingerProvider-DyD1Hin8.cjs"));
791
+ const { HostingerProvider } = await Promise.resolve().then(() => require("./HostingerProvider-Bx2lHHvu.cjs"));
789
792
  return new HostingerProvider();
790
793
  }
791
794
  if (provider === "route53") {
@@ -1218,7 +1221,7 @@ async function buildImage(imageRef, buildArgs, credentials, { cwd, signal, stdio
1218
1221
  const dockerfilePath = (0, node_path.join)(cwd, ".gkm", "docker", "Dockerfile");
1219
1222
  const secret = credentials ? await writeCredentialsFile(credentials) : void 0;
1220
1223
  try {
1221
- await require_sniffer.run("docker", dockerBuildArgs({
1224
+ await require_local.run("docker", dockerBuildArgs({
1222
1225
  dockerfilePath,
1223
1226
  imageRef,
1224
1227
  buildArgs,
@@ -1245,7 +1248,7 @@ async function buildImage(imageRef, buildArgs, credentials, { cwd, signal, stdio
1245
1248
  async function pushImage(imageRef, { cwd, signal, stdio }) {
1246
1249
  logger$1.log(`\n☁️ Pushing image: ${imageRef}`);
1247
1250
  try {
1248
- await require_sniffer.run("docker", ["push", imageRef], {
1251
+ await require_local.run("docker", ["push", imageRef], {
1249
1252
  cwd,
1250
1253
  ...signal ? { signal } : {},
1251
1254
  ...stdio ? { stdio } : {}
@@ -1267,7 +1270,7 @@ async function pushImage(imageRef, { cwd, signal, stdio }) {
1267
1270
  */
1268
1271
  async function pushedDigest(imageRef, { cwd, signal } = { cwd: process.cwd() }) {
1269
1272
  const repository = imageRef.split("@")[0].replace(/:[\w][\w.-]*$/, "");
1270
- const output = await require_sniffer.runOutput("docker", [
1273
+ const output = await require_local.runOutput("docker", [
1271
1274
  "image",
1272
1275
  "inspect",
1273
1276
  "--format={{json .RepoDigests}}",
@@ -2245,7 +2248,7 @@ async function provisionDokploy(run) {
2245
2248
  kind: "registry",
2246
2249
  url
2247
2250
  }, { signal: ctx.signal });
2248
- if (!login) throw new require_terminal.MissingCredential("registry", url);
2251
+ if (!login) throw new require_credentials.MissingCredential("registry", url);
2249
2252
  const created = await api.createRegistry("Default Registry", url, login.username, login.password);
2250
2253
  registryCreated = true;
2251
2254
  logger.log(` ✓ Registry created: ${created.registryId}`);
@@ -2742,7 +2745,7 @@ async function dokployApi(workspace, ctx) {
2742
2745
  kind: "dokploy",
2743
2746
  ...configured ? { endpoint: configured } : {}
2744
2747
  }, { signal: ctx.signal });
2745
- if (!creds) throw new require_terminal.MissingCredential("dokploy", configured);
2748
+ if (!creds) throw new require_credentials.MissingCredential("dokploy", configured);
2746
2749
  return {
2747
2750
  api: new require_sniffer.DokployApi({
2748
2751
  baseUrl: creds.endpoint,
@@ -2970,4 +2973,4 @@ Object.defineProperty(exports, "verifyDokploy", {
2970
2973
  }
2971
2974
  });
2972
2975
 
2973
- //# sourceMappingURL=deploy-DSaCYvcO.cjs.map
2976
+ //# sourceMappingURL=deploy-55rJkdKz.cjs.map