@geekmidas/cli 10.0.0-alpha.98 → 10.0.0

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 (684) hide show
  1. package/CHANGELOG.md +667 -0
  2. package/FUNCTION_CRON_SUPPORT.md +266 -0
  3. package/README.md +533 -382
  4. package/bin/gkm.mjs +2 -16
  5. package/dist/CachedStateProvider-BdX7klRc.cjs +3 -0
  6. package/dist/CachedStateProvider-CzyFct42.mjs +54 -0
  7. package/dist/CachedStateProvider-CzyFct42.mjs.map +1 -0
  8. package/dist/CachedStateProvider-GcGziXh1.mjs +3 -0
  9. package/dist/CachedStateProvider-klLWZXWF.cjs +60 -0
  10. package/dist/CachedStateProvider-klLWZXWF.cjs.map +1 -0
  11. package/dist/{HostingerProvider-BNpS9aRJ.mjs → HostingerProvider-B2ZYz7Yc.mjs} +26 -31
  12. package/dist/HostingerProvider-B2ZYz7Yc.mjs.map +1 -0
  13. package/dist/{HostingerProvider-DR1iws1P.cjs → HostingerProvider-CrHfsgz9.cjs} +26 -31
  14. package/dist/HostingerProvider-CrHfsgz9.cjs.map +1 -0
  15. package/dist/LocalStateProvider-CP49rjzt.mjs +42 -0
  16. package/dist/LocalStateProvider-CP49rjzt.mjs.map +1 -0
  17. package/dist/LocalStateProvider-CalzNfNA.cjs +43 -0
  18. package/dist/LocalStateProvider-CalzNfNA.cjs.map +1 -0
  19. package/dist/{Route53Provider-Bllus2NR.cjs → Route53Provider-DwgXiLxt.cjs} +22 -21
  20. package/dist/Route53Provider-DwgXiLxt.cjs.map +1 -0
  21. package/dist/{Route53Provider-QXxjkZO1.mjs → Route53Provider-tlgBzrRQ.mjs} +13 -13
  22. package/dist/Route53Provider-tlgBzrRQ.mjs.map +1 -0
  23. package/dist/SSMStateProvider-BlrTiV5m.mjs +66 -0
  24. package/dist/SSMStateProvider-BlrTiV5m.mjs.map +1 -0
  25. package/dist/SSMStateProvider-Bt6r8CTL.cjs +66 -0
  26. package/dist/SSMStateProvider-Bt6r8CTL.cjs.map +1 -0
  27. package/dist/{backup-provisioner-oDEsPj02.cjs → backup-provisioner-B3HBN-2k.cjs} +20 -22
  28. package/dist/backup-provisioner-B3HBN-2k.cjs.map +1 -0
  29. package/dist/{backup-provisioner-C8DnCmxK.mjs → backup-provisioner-Xunq-p_8.mjs} +9 -12
  30. package/dist/backup-provisioner-Xunq-p_8.mjs.map +1 -0
  31. package/dist/bundler-DkA4qzUD.mjs +135 -0
  32. package/dist/bundler-DkA4qzUD.mjs.map +1 -0
  33. package/dist/bundler-Dufq3uvI.cjs +136 -0
  34. package/dist/bundler-Dufq3uvI.cjs.map +1 -0
  35. package/dist/{rolldown-runtime-C0BPl7ul.cjs → chunk-CUT6urMc.cjs} +10 -23
  36. package/dist/chunk-Duj1WY3L.mjs +7 -0
  37. package/dist/config-Bbu1JKvf.mjs +211 -0
  38. package/dist/config-Bbu1JKvf.mjs.map +1 -0
  39. package/dist/config-DujV8DbR.cjs +253 -0
  40. package/dist/config-DujV8DbR.cjs.map +1 -0
  41. package/dist/config.cjs +10 -421
  42. package/dist/config.d.cts +120 -4
  43. package/dist/config.d.cts.map +1 -0
  44. package/dist/config.d.mts +120 -4
  45. package/dist/config.d.mts.map +1 -0
  46. package/dist/config.mjs +3 -405
  47. package/dist/credentials-C8DWtnMY.cjs +174 -0
  48. package/dist/credentials-C8DWtnMY.cjs.map +1 -0
  49. package/dist/credentials-s1kLcIzK.mjs +126 -0
  50. package/dist/credentials-s1kLcIzK.mjs.map +1 -0
  51. package/dist/deploy/sniffer-envkit-patch.cjs +10 -18
  52. package/dist/deploy/sniffer-envkit-patch.cjs.map +1 -1
  53. package/dist/deploy/sniffer-envkit-patch.d.cts +2 -0
  54. package/dist/deploy/sniffer-envkit-patch.d.cts.map +1 -1
  55. package/dist/deploy/sniffer-envkit-patch.d.mts +2 -0
  56. package/dist/deploy/sniffer-envkit-patch.d.mts.map +1 -1
  57. package/dist/deploy/sniffer-envkit-patch.mjs +2 -10
  58. package/dist/deploy/sniffer-envkit-patch.mjs.map +1 -1
  59. package/dist/deploy/sniffer-hooks.cjs +7 -13
  60. package/dist/deploy/sniffer-hooks.cjs.map +1 -1
  61. package/dist/deploy/sniffer-hooks.d.cts +2 -1
  62. package/dist/deploy/sniffer-hooks.d.cts.map +1 -1
  63. package/dist/deploy/sniffer-hooks.d.mts +2 -1
  64. package/dist/deploy/sniffer-hooks.d.mts.map +1 -1
  65. package/dist/deploy/sniffer-hooks.mjs +3 -10
  66. package/dist/deploy/sniffer-hooks.mjs.map +1 -1
  67. package/dist/deploy/sniffer-loader.cjs +7 -16
  68. package/dist/deploy/sniffer-loader.cjs.map +1 -1
  69. package/dist/deploy/sniffer-loader.d.cts +1 -1
  70. package/dist/deploy/sniffer-loader.d.mts +1 -1
  71. package/dist/deploy/sniffer-loader.mjs +3 -14
  72. package/dist/deploy/sniffer-loader.mjs.map +1 -1
  73. package/dist/deploy/sniffer-routes-worker.cjs +13 -17
  74. package/dist/deploy/sniffer-routes-worker.cjs.map +1 -1
  75. package/dist/deploy/sniffer-routes-worker.d.cts +1 -1
  76. package/dist/deploy/sniffer-routes-worker.d.mts +1 -1
  77. package/dist/deploy/sniffer-routes-worker.mjs +6 -10
  78. package/dist/deploy/sniffer-routes-worker.mjs.map +1 -1
  79. package/dist/deploy/sniffer-worker.cjs +6 -15
  80. package/dist/deploy/sniffer-worker.cjs.map +1 -1
  81. package/dist/deploy/sniffer-worker.d.cts +3 -1
  82. package/dist/deploy/sniffer-worker.d.cts.map +1 -1
  83. package/dist/deploy/sniffer-worker.d.mts +3 -1
  84. package/dist/deploy/sniffer-worker.d.mts.map +1 -1
  85. package/dist/deploy/sniffer-worker.mjs +4 -15
  86. package/dist/deploy/sniffer-worker.mjs.map +1 -1
  87. package/dist/dokploy-api-BPYkG-ZZ.cjs +3 -0
  88. package/dist/dokploy-api-BiSzWM4v.mjs +3 -0
  89. package/dist/dokploy-api-CqOIKHme.cjs +609 -0
  90. package/dist/dokploy-api-CqOIKHme.cjs.map +1 -0
  91. package/dist/dokploy-api-sfZFlWuE.mjs +597 -0
  92. package/dist/dokploy-api-sfZFlWuE.mjs.map +1 -0
  93. package/dist/encryption-BVS7Vmzs.cjs +4 -0
  94. package/dist/encryption-Bd_m4q3g.mjs +3 -0
  95. package/dist/encryption-CO5Q4Bhf.mjs +42 -0
  96. package/dist/encryption-CO5Q4Bhf.mjs.map +1 -0
  97. package/dist/encryption-MfXAiFTm.cjs +54 -0
  98. package/dist/encryption-MfXAiFTm.cjs.map +1 -0
  99. package/dist/fullstack-secrets-BYzi6Hwl.cjs +402 -0
  100. package/dist/fullstack-secrets-BYzi6Hwl.cjs.map +1 -0
  101. package/dist/fullstack-secrets-l8s3II_H.mjs +336 -0
  102. package/dist/fullstack-secrets-l8s3II_H.mjs.map +1 -0
  103. package/dist/index-CoVW_fFS.d.cts +1737 -0
  104. package/dist/index-CoVW_fFS.d.cts.map +1 -0
  105. package/dist/index-oWibAYQY.d.mts +1737 -0
  106. package/dist/index-oWibAYQY.d.mts.map +1 -0
  107. package/dist/index.cjs +11337 -10263
  108. package/dist/index.cjs.map +1 -1
  109. package/dist/index.d.cts +1 -1
  110. package/dist/index.d.mts +1 -1
  111. package/dist/index.mjs +11303 -10217
  112. package/dist/index.mjs.map +1 -1
  113. package/dist/openapi-BzNOC7_i.cjs +1931 -0
  114. package/dist/openapi-BzNOC7_i.cjs.map +1 -0
  115. package/dist/openapi-Cfwi0fqF.mjs +1883 -0
  116. package/dist/openapi-Cfwi0fqF.mjs.map +1 -0
  117. package/dist/openapi-react-query-C4iIvpPf.mjs +167 -0
  118. package/dist/openapi-react-query-C4iIvpPf.mjs.map +1 -0
  119. package/dist/openapi-react-query-CYWik72n.cjs +173 -0
  120. package/dist/openapi-react-query-CYWik72n.cjs.map +1 -0
  121. package/dist/openapi-react-query.cjs +4 -0
  122. package/dist/openapi-react-query.d.cts +11 -0
  123. package/dist/openapi-react-query.d.cts.map +1 -0
  124. package/dist/openapi-react-query.d.mts +11 -0
  125. package/dist/openapi-react-query.d.mts.map +1 -0
  126. package/dist/openapi-react-query.mjs +4 -0
  127. package/dist/openapi.cjs +7 -214
  128. package/dist/openapi.d.cts +15 -72
  129. package/dist/openapi.d.cts.map +1 -1
  130. package/dist/openapi.d.mts +15 -72
  131. package/dist/openapi.d.mts.map +1 -1
  132. package/dist/openapi.mjs +4 -208
  133. package/dist/{reconcile--I7V4Klj.mjs → reconcile-B2FoJE0a.mjs} +8 -6
  134. package/dist/reconcile-B2FoJE0a.mjs.map +1 -0
  135. package/dist/{reconcile-CuCQBa5-.cjs → reconcile-BzqKJ2Rt.cjs} +8 -6
  136. package/dist/reconcile-BzqKJ2Rt.cjs.map +1 -0
  137. package/dist/setup-DDXUXzzl.mjs +765 -0
  138. package/dist/setup-DDXUXzzl.mjs.map +1 -0
  139. package/dist/setup-DLwhfyt-.cjs +8 -0
  140. package/dist/setup-Dh-B7YTX.mjs +8 -0
  141. package/dist/setup-WZ-xqAQO.cjs +849 -0
  142. package/dist/setup-WZ-xqAQO.cjs.map +1 -0
  143. package/dist/storage-B1wvztiJ.cjs +363 -0
  144. package/dist/storage-B1wvztiJ.cjs.map +1 -0
  145. package/dist/storage-Cs4WBsc4.mjs +3 -0
  146. package/dist/storage-DOEtT2Hr.cjs +7 -0
  147. package/dist/storage-dbb9RyBl.mjs +297 -0
  148. package/dist/storage-dbb9RyBl.mjs.map +1 -0
  149. package/dist/sync-B5UHXwRM.mjs +3 -0
  150. package/dist/sync-BLA94rgC.cjs +4 -0
  151. package/dist/sync-CSooqRQ8.mjs +76 -0
  152. package/dist/sync-CSooqRQ8.mjs.map +1 -0
  153. package/dist/sync-o_CtEbvR.cjs +93 -0
  154. package/dist/sync-o_CtEbvR.cjs.map +1 -0
  155. package/dist/types-B3GQUg3k.d.mts +280 -0
  156. package/dist/types-B3GQUg3k.d.mts.map +1 -0
  157. package/dist/types-BWQDiooe.d.cts +280 -0
  158. package/dist/types-BWQDiooe.d.cts.map +1 -0
  159. package/dist/workspace/index.cjs +4 -12
  160. package/dist/workspace/index.d.cts +3 -3
  161. package/dist/workspace/index.d.mts +3 -3
  162. package/dist/workspace/index.mjs +3 -2
  163. package/dist/workspace-CQTT7HJQ.cjs +4361 -0
  164. package/dist/workspace-CQTT7HJQ.cjs.map +1 -0
  165. package/dist/workspace-D-37Ylqo.mjs +4236 -0
  166. package/dist/workspace-D-37Ylqo.mjs.map +1 -0
  167. package/docs/OPENAPI_TYPESCRIPT_DESIGN.md +408 -0
  168. package/docs/dev-server-resilience-design.md +189 -0
  169. package/docs/manifest-refactor-design.md +287 -0
  170. package/examples/cron-example.ts +45 -0
  171. package/examples/env.ts +33 -0
  172. package/examples/function-example.ts +40 -0
  173. package/examples/gkm.config.json +22 -0
  174. package/examples/gkm.config.ts +14 -0
  175. package/examples/gkm.minimal.config.json +7 -0
  176. package/examples/gkm.production.config.json +27 -0
  177. package/examples/logger.ts +10 -0
  178. package/package.json +37 -87
  179. package/scripts/sync-versions.ts +108 -0
  180. package/src/__tests__/EndpointGenerator.hooks.spec.ts +204 -0
  181. package/src/__tests__/config.spec.ts +422 -0
  182. package/src/__tests__/loadEnvFiles.spec.ts +131 -0
  183. package/src/__tests__/normalizeHooksConfig.spec.ts +63 -0
  184. package/src/__tests__/openapi-react-query.spec.ts +506 -0
  185. package/src/__tests__/openapi.spec.ts +625 -0
  186. package/src/__tests__/test-helpers.ts +180 -0
  187. package/src/auth/__tests__/credentials.spec.ts +331 -0
  188. package/src/auth/__tests__/index.spec.ts +237 -0
  189. package/src/auth/credentials.ts +286 -0
  190. package/src/auth/index.ts +233 -0
  191. package/src/build/__tests__/bundler.spec.ts +446 -0
  192. package/src/build/__tests__/endpoint-analyzer.spec.ts +623 -0
  193. package/src/build/__tests__/handler-templates.spec.ts +1287 -0
  194. package/src/build/__tests__/index-new.spec.ts +550 -0
  195. package/src/build/__tests__/manifests.spec.ts +583 -0
  196. package/src/build/__tests__/partitions.spec.ts +110 -0
  197. package/src/build/__tests__/workspace-build.spec.ts +215 -0
  198. package/src/build/bundler.ts +256 -0
  199. package/src/build/endpoint-analyzer.ts +236 -0
  200. package/src/build/handler-templates.ts +1253 -0
  201. package/src/build/index.ts +616 -0
  202. package/src/build/manifests.ts +285 -0
  203. package/src/build/partitions.ts +58 -0
  204. package/src/build/providerResolver.ts +184 -0
  205. package/src/build/types.ts +104 -0
  206. package/src/config.ts +330 -0
  207. package/src/credentials/__tests__/fullDockerPorts.spec.ts +144 -0
  208. package/src/credentials/__tests__/helpers.ts +112 -0
  209. package/src/credentials/__tests__/prepareEntryCredentials.spec.ts +125 -0
  210. package/src/credentials/__tests__/readonlyDockerPorts.spec.ts +190 -0
  211. package/src/credentials/__tests__/workspaceCredentials.spec.ts +209 -0
  212. package/src/credentials/index.ts +843 -0
  213. package/src/debug.ts +68 -0
  214. package/src/deploy/CachedStateProvider.ts +86 -0
  215. package/src/deploy/LocalStateProvider.ts +57 -0
  216. package/src/deploy/SSMStateProvider.ts +117 -0
  217. package/src/deploy/StateProvider.ts +175 -0
  218. package/src/deploy/__tests__/CachedStateProvider.spec.ts +235 -0
  219. package/src/deploy/__tests__/HostingerProvider.spec.ts +347 -0
  220. package/src/deploy/__tests__/LocalStateProvider.spec.ts +130 -0
  221. package/src/deploy/__tests__/Route53Provider.spec.ts +425 -0
  222. package/src/deploy/__tests__/SSMStateProvider.spec.ts +201 -0
  223. package/src/deploy/__tests__/__fixtures__/entry-apps/async-entry.ts +24 -0
  224. package/src/deploy/__tests__/__fixtures__/entry-apps/nested-config-entry.ts +24 -0
  225. package/src/deploy/__tests__/__fixtures__/entry-apps/no-env-entry.ts +12 -0
  226. package/src/deploy/__tests__/__fixtures__/entry-apps/simple-entry.ts +14 -0
  227. package/src/deploy/__tests__/__fixtures__/entry-apps/throwing-entry.ts +16 -0
  228. package/src/deploy/__tests__/__fixtures__/env-parsers/non-function-export.ts +10 -0
  229. package/src/deploy/__tests__/__fixtures__/env-parsers/optional-env-parser.ts +21 -0
  230. package/src/deploy/__tests__/__fixtures__/env-parsers/parseable-env-parser.ts +18 -0
  231. package/src/deploy/__tests__/__fixtures__/env-parsers/throwing-env-parser.ts +16 -0
  232. package/src/deploy/__tests__/__fixtures__/env-parsers/valid-env-parser.ts +16 -0
  233. package/src/deploy/__tests__/__fixtures__/route-apps/endpoints/auth.ts +16 -0
  234. package/src/deploy/__tests__/__fixtures__/route-apps/endpoints/health.ts +13 -0
  235. package/src/deploy/__tests__/__fixtures__/route-apps/endpoints/users.ts +15 -0
  236. package/src/deploy/__tests__/__fixtures__/route-apps/services.ts +55 -0
  237. package/src/deploy/__tests__/backup-provisioner.spec.ts +428 -0
  238. package/src/deploy/__tests__/createDnsProvider.spec.ts +195 -0
  239. package/src/deploy/__tests__/createStateProvider.spec.ts +126 -0
  240. package/src/deploy/__tests__/dns-orchestration.spec.ts +192 -0
  241. package/src/deploy/__tests__/dns-verification.spec.ts +229 -0
  242. package/src/deploy/__tests__/docker.spec.ts +149 -0
  243. package/src/deploy/__tests__/dokploy-api.spec.ts +697 -0
  244. package/src/deploy/__tests__/dokploy.spec.ts +435 -0
  245. package/src/deploy/__tests__/domain.spec.ts +235 -0
  246. package/src/deploy/__tests__/env-resolver.spec.ts +903 -0
  247. package/src/deploy/__tests__/index.spec.ts +1091 -0
  248. package/src/deploy/__tests__/init.spec.ts +793 -0
  249. package/src/deploy/__tests__/secrets.spec.ts +303 -0
  250. package/src/deploy/__tests__/sniffer.spec.ts +838 -0
  251. package/src/deploy/__tests__/state-e2e.spec.ts +387 -0
  252. package/src/deploy/__tests__/state.spec.ts +876 -0
  253. package/src/deploy/__tests__/undeploy.spec.ts +758 -0
  254. package/src/deploy/backup-provisioner.ts +316 -0
  255. package/src/deploy/dns/DnsProvider.ts +201 -0
  256. package/src/deploy/dns/HostingerProvider.ts +174 -0
  257. package/src/deploy/dns/Route53Provider.ts +340 -0
  258. package/src/deploy/dns/hostinger-api.ts +261 -0
  259. package/src/deploy/dns/index.ts +627 -0
  260. package/src/deploy/docker.ts +260 -0
  261. package/src/deploy/dokploy-api.ts +1101 -0
  262. package/src/deploy/dokploy.ts +177 -0
  263. package/src/deploy/domain.ts +134 -0
  264. package/src/deploy/env-resolver.ts +305 -0
  265. package/src/deploy/index.ts +2094 -0
  266. package/src/deploy/init.ts +427 -0
  267. package/src/deploy/secrets.ts +187 -0
  268. package/src/deploy/sniffer-envkit-patch.ts +61 -0
  269. package/src/deploy/sniffer-hooks.ts +57 -0
  270. package/src/deploy/sniffer-loader.ts +28 -0
  271. package/src/deploy/sniffer-routes-worker.ts +104 -0
  272. package/src/deploy/sniffer-worker.ts +75 -0
  273. package/src/deploy/sniffer.ts +578 -0
  274. package/src/deploy/state-commands.ts +274 -0
  275. package/src/deploy/state.ts +482 -0
  276. package/src/deploy/types.ts +102 -0
  277. package/src/deploy/undeploy.ts +407 -0
  278. package/src/dev/__tests__/entry-integration.spec.ts +347 -0
  279. package/src/dev/__tests__/entry.spec.ts +144 -0
  280. package/src/dev/__tests__/index.spec.ts +2084 -0
  281. package/src/dev/index.ts +1649 -0
  282. package/src/docker/__tests__/compose.spec.ts +1142 -0
  283. package/src/docker/__tests__/templates.spec.ts +694 -0
  284. package/src/docker/compose.ts +812 -0
  285. package/src/docker/index.ts +523 -0
  286. package/src/docker/templates.ts +1067 -0
  287. package/src/exec/index.ts +118 -0
  288. package/src/generators/CronGenerator.ts +105 -0
  289. package/src/generators/EndpointGenerator.ts +954 -0
  290. package/src/generators/FunctionGenerator.ts +117 -0
  291. package/src/generators/Generator.ts +147 -0
  292. package/src/generators/OpenApiTsGenerator.ts +821 -0
  293. package/src/generators/QueueGenerator.ts +245 -0
  294. package/src/generators/SubscriberGenerator.ts +282 -0
  295. package/src/generators/TopicGenerator.ts +45 -0
  296. package/src/generators/__tests__/CronGenerator.spec.ts +445 -0
  297. package/src/generators/__tests__/EndpointGenerator.spec.ts +544 -0
  298. package/src/generators/__tests__/FunctionGenerator.spec.ts +256 -0
  299. package/src/generators/__tests__/Generator.bustCache.spec.ts +72 -0
  300. package/src/generators/__tests__/OpenApiTsGenerator.registry.spec.ts +98 -0
  301. package/src/generators/__tests__/OpenApiTsGenerator.responseType.spec.ts +56 -0
  302. package/src/generators/__tests__/QueueGenerator.spec.ts +141 -0
  303. package/src/generators/__tests__/SubscriberGenerator.spec.ts +410 -0
  304. package/src/generators/index.ts +11 -0
  305. package/src/index.ts +972 -0
  306. package/src/init/__tests__/generators.spec.ts +1072 -0
  307. package/src/init/__tests__/init.spec.ts +577 -0
  308. package/src/init/__tests__/utils.spec.ts +104 -0
  309. package/src/init/generators/auth.ts +225 -0
  310. package/src/init/generators/config.ts +316 -0
  311. package/src/init/generators/docker.ts +388 -0
  312. package/src/init/generators/env.ts +62 -0
  313. package/src/init/generators/index.ts +6 -0
  314. package/src/init/generators/mobile-expo.ts +576 -0
  315. package/src/init/generators/models.ts +153 -0
  316. package/src/init/generators/monorepo.ts +475 -0
  317. package/src/init/generators/package.ts +95 -0
  318. package/src/init/generators/source.ts +15 -0
  319. package/src/init/generators/test.ts +178 -0
  320. package/src/init/generators/ui.ts +1473 -0
  321. package/src/init/generators/web-tanstack.ts +348 -0
  322. package/src/init/generators/web.ts +363 -0
  323. package/src/init/index.ts +542 -0
  324. package/src/init/templates/api.ts +404 -0
  325. package/src/init/templates/index.ts +342 -0
  326. package/src/init/templates/minimal.ts +207 -0
  327. package/src/init/templates/serverless.ts +148 -0
  328. package/src/init/templates/worker.ts +216 -0
  329. package/src/init/utils.ts +197 -0
  330. package/src/init/versions.ts +52 -0
  331. package/src/openapi-react-query.ts +288 -0
  332. package/src/openapi.ts +259 -0
  333. package/src/secrets/__tests__/encryption.spec.ts +226 -0
  334. package/src/secrets/__tests__/generator.spec.ts +575 -0
  335. package/src/secrets/__tests__/index.spec.ts +91 -0
  336. package/src/secrets/__tests__/reconcile.spec.ts +123 -0
  337. package/src/secrets/__tests__/storage.spec.ts +645 -0
  338. package/src/secrets/encryption.ts +91 -0
  339. package/src/secrets/generator.ts +329 -0
  340. package/src/secrets/index.ts +417 -0
  341. package/src/secrets/keystore.ts +144 -0
  342. package/src/secrets/reconcile.ts +53 -0
  343. package/src/secrets/storage.ts +337 -0
  344. package/src/secrets/sync.ts +136 -0
  345. package/src/secrets/types.ts +70 -0
  346. package/src/setup/__tests__/auto-setup.spec.ts +147 -0
  347. package/src/setup/__tests__/reconcile-secrets.spec.ts +439 -0
  348. package/src/setup/fullstack-secrets.ts +140 -0
  349. package/src/setup/index.ts +411 -0
  350. package/src/test/__tests__/__fixtures__/workspace.ts +104 -0
  351. package/src/test/__tests__/api.spec.ts +199 -0
  352. package/src/test/__tests__/auth.spec.ts +162 -0
  353. package/src/test/__tests__/index.spec.ts +502 -0
  354. package/src/test/__tests__/web.spec.ts +210 -0
  355. package/src/test/index.ts +198 -0
  356. package/src/types.ts +363 -0
  357. package/src/upgrade/__tests__/index.spec.ts +354 -0
  358. package/src/upgrade/index.ts +253 -0
  359. package/src/workspace/__tests__/client-generator.spec.ts +326 -0
  360. package/src/workspace/__tests__/index.spec.ts +766 -0
  361. package/src/workspace/__tests__/publicEnv.spec.ts +64 -0
  362. package/src/workspace/__tests__/schema.spec.ts +737 -0
  363. package/src/workspace/__tests__/type-inference.spec.ts +251 -0
  364. package/src/workspace/client-generator.ts +109 -0
  365. package/src/workspace/index.ts +433 -0
  366. package/src/workspace/publicEnv.ts +57 -0
  367. package/src/workspace/schema.ts +861 -0
  368. package/src/workspace/types.ts +943 -0
  369. package/tsconfig.json +9 -0
  370. package/tsdown.config.ts +22 -0
  371. package/bin/adjacent-tsconfig.mjs +0 -97
  372. package/bin/owning-tsconfig-jsx-register.mjs +0 -18
  373. package/bin/owning-tsconfig-jsx.mjs +0 -108
  374. package/dist/EndpointGenerator-Bor2tZCm.mjs +0 -1031
  375. package/dist/EndpointGenerator-Bor2tZCm.mjs.map +0 -1
  376. package/dist/EndpointGenerator-De03t1hd.cjs +0 -1090
  377. package/dist/EndpointGenerator-De03t1hd.cjs.map +0 -1
  378. package/dist/GoDaddyProvider-C2fK-zeQ.mjs +0 -388
  379. package/dist/GoDaddyProvider-C2fK-zeQ.mjs.map +0 -1
  380. package/dist/GoDaddyProvider-SLlyDwD1.cjs +0 -388
  381. package/dist/GoDaddyProvider-SLlyDwD1.cjs.map +0 -1
  382. package/dist/HostingerProvider-BNpS9aRJ.mjs.map +0 -1
  383. package/dist/HostingerProvider-DR1iws1P.cjs.map +0 -1
  384. package/dist/LegacyStateStore-CAvxM8U5.cjs +0 -124
  385. package/dist/LegacyStateStore-CAvxM8U5.cjs.map +0 -1
  386. package/dist/LegacyStateStore-D9QDWCst.mjs +0 -124
  387. package/dist/LegacyStateStore-D9QDWCst.mjs.map +0 -1
  388. package/dist/LocalStateStore-DPQSqkSb.mjs +0 -167
  389. package/dist/LocalStateStore-DPQSqkSb.mjs.map +0 -1
  390. package/dist/LocalStateStore-QcrdjCl6.cjs +0 -178
  391. package/dist/LocalStateStore-QcrdjCl6.cjs.map +0 -1
  392. package/dist/OpenApiTsGenerator-CS_RtWOz.cjs +0 -541
  393. package/dist/OpenApiTsGenerator-CS_RtWOz.cjs.map +0 -1
  394. package/dist/OpenApiTsGenerator-DWAF-7Fu.mjs +0 -536
  395. package/dist/OpenApiTsGenerator-DWAF-7Fu.mjs.map +0 -1
  396. package/dist/Route53Provider-Bllus2NR.cjs.map +0 -1
  397. package/dist/Route53Provider-QXxjkZO1.mjs.map +0 -1
  398. package/dist/S3StateStore-C16tVikU.cjs +0 -222
  399. package/dist/S3StateStore-C16tVikU.cjs.map +0 -1
  400. package/dist/S3StateStore-jorgKaee.mjs +0 -223
  401. package/dist/S3StateStore-jorgKaee.mjs.map +0 -1
  402. package/dist/SSMStateStore-Dvjt_INw.mjs +0 -205
  403. package/dist/SSMStateStore-Dvjt_INw.mjs.map +0 -1
  404. package/dist/SSMStateStore-mPAEr2P2.cjs +0 -204
  405. package/dist/SSMStateStore-mPAEr2P2.cjs.map +0 -1
  406. package/dist/SubscriberGenerator-CyN2VF5X.mjs +0 -449
  407. package/dist/SubscriberGenerator-CyN2VF5X.mjs.map +0 -1
  408. package/dist/SubscriberGenerator-Dvz7EzqK.cjs +0 -490
  409. package/dist/SubscriberGenerator-Dvz7EzqK.cjs.map +0 -1
  410. package/dist/add-CZIIsTcv.mjs +0 -718
  411. package/dist/add-CZIIsTcv.mjs.map +0 -1
  412. package/dist/add-SRk65Udu.cjs +0 -720
  413. package/dist/add-SRk65Udu.cjs.map +0 -1
  414. package/dist/appPorts-C9z9Pzn9.mjs +0 -223
  415. package/dist/appPorts-C9z9Pzn9.mjs.map +0 -1
  416. package/dist/appPorts-Cu79hJF6.cjs +0 -264
  417. package/dist/appPorts-Cu79hJF6.cjs.map +0 -1
  418. package/dist/aws-8QQ8n-t6.mjs +0 -89
  419. package/dist/aws-8QQ8n-t6.mjs.map +0 -1
  420. package/dist/aws-DY9NqQIT.cjs +0 -100
  421. package/dist/aws-DY9NqQIT.cjs.map +0 -1
  422. package/dist/awsStore-Bx5nCFnS.mjs +0 -121
  423. package/dist/awsStore-Bx5nCFnS.mjs.map +0 -1
  424. package/dist/awsStore-u3ehhMoY.cjs +0 -138
  425. package/dist/awsStore-u3ehhMoY.cjs.map +0 -1
  426. package/dist/backup-provisioner-C8DnCmxK.mjs.map +0 -1
  427. package/dist/backup-provisioner-oDEsPj02.cjs.map +0 -1
  428. package/dist/bundler-B0Pj5FXT.cjs +0 -169
  429. package/dist/bundler-B0Pj5FXT.cjs.map +0 -1
  430. package/dist/bundler-DxJ-cIEt.mjs +0 -169
  431. package/dist/bundler-DxJ-cIEt.mjs.map +0 -1
  432. package/dist/cli-CRDJWWmZ.cjs +0 -73
  433. package/dist/cli-CRDJWWmZ.cjs.map +0 -1
  434. package/dist/cli-CV85bY3-.mjs +0 -73
  435. package/dist/cli-CV85bY3-.mjs.map +0 -1
  436. package/dist/compose-CQQRRJC3.mjs +0 -1511
  437. package/dist/compose-CQQRRJC3.mjs.map +0 -1
  438. package/dist/compose-DMY4ouEk.cjs +0 -1558
  439. package/dist/compose-DMY4ouEk.cjs.map +0 -1
  440. package/dist/config-CS76CzXM.d.cts +0 -269
  441. package/dist/config-CS76CzXM.d.cts.map +0 -1
  442. package/dist/config-pBzLfNef.d.mts +0 -269
  443. package/dist/config-pBzLfNef.d.mts.map +0 -1
  444. package/dist/config.cjs.map +0 -1
  445. package/dist/config.mjs.map +0 -1
  446. package/dist/credentialSchemas-BJFvfkaz.mjs +0 -237
  447. package/dist/credentialSchemas-BJFvfkaz.mjs.map +0 -1
  448. package/dist/credentialSchemas-CAPKFkrG.cjs +0 -272
  449. package/dist/credentialSchemas-CAPKFkrG.cjs.map +0 -1
  450. package/dist/credentials-B5N5yKk6.mjs +0 -267
  451. package/dist/credentials-B5N5yKk6.mjs.map +0 -1
  452. package/dist/credentials-Zqr3QQYB.cjs +0 -350
  453. package/dist/credentials-Zqr3QQYB.cjs.map +0 -1
  454. package/dist/databases-BeGP5eDh.mjs +0 -495
  455. package/dist/databases-BeGP5eDh.mjs.map +0 -1
  456. package/dist/databases-DGALFDG3.cjs +0 -598
  457. package/dist/databases-DGALFDG3.cjs.map +0 -1
  458. package/dist/define-6poNqm5O.mjs +0 -106
  459. package/dist/define-6poNqm5O.mjs.map +0 -1
  460. package/dist/define-crmMcXFS.cjs +0 -153
  461. package/dist/define-crmMcXFS.cjs.map +0 -1
  462. package/dist/deploy/public.cjs +0 -211
  463. package/dist/deploy/public.cjs.map +0 -1
  464. package/dist/deploy/public.d.cts +0 -664
  465. package/dist/deploy/public.d.cts.map +0 -1
  466. package/dist/deploy/public.d.mts +0 -664
  467. package/dist/deploy/public.d.mts.map +0 -1
  468. package/dist/deploy/public.mjs +0 -144
  469. package/dist/deploy/public.mjs.map +0 -1
  470. package/dist/deploy/sniffer-envparser-worker.cjs +0 -54
  471. package/dist/deploy/sniffer-envparser-worker.cjs.map +0 -1
  472. package/dist/deploy/sniffer-envparser-worker.d.cts +0 -1
  473. package/dist/deploy/sniffer-envparser-worker.d.mts +0 -1
  474. package/dist/deploy/sniffer-envparser-worker.mjs +0 -55
  475. package/dist/deploy/sniffer-envparser-worker.mjs.map +0 -1
  476. package/dist/deploy-277jek46.cjs +0 -2068
  477. package/dist/deploy-277jek46.cjs.map +0 -1
  478. package/dist/deploy-Dw8g3sLY.mjs +0 -2019
  479. package/dist/deploy-Dw8g3sLY.mjs.map +0 -1
  480. package/dist/derive-B4vDpzgP.mjs +0 -150
  481. package/dist/derive-B4vDpzgP.mjs.map +0 -1
  482. package/dist/derive-DAbo49sm.cjs +0 -161
  483. package/dist/derive-DAbo49sm.cjs.map +0 -1
  484. package/dist/discover-CU1LjCOf.d.cts +0 -108
  485. package/dist/discover-CU1LjCOf.d.cts.map +0 -1
  486. package/dist/discover-DJCCgimv.d.mts +0 -108
  487. package/dist/discover-DJCCgimv.d.mts.map +0 -1
  488. package/dist/discover-DPgu-ScS.cjs +0 -600
  489. package/dist/discover-DPgu-ScS.cjs.map +0 -1
  490. package/dist/discover-qjFapetL.mjs +0 -527
  491. package/dist/discover-qjFapetL.mjs.map +0 -1
  492. package/dist/dns-4RAiVFa7.cjs +0 -55
  493. package/dist/dns-4RAiVFa7.cjs.map +0 -1
  494. package/dist/dns-CU22K_i0.mjs +0 -44
  495. package/dist/dns-CU22K_i0.mjs.map +0 -1
  496. package/dist/dns-Dhjbnjgl.cjs +0 -663
  497. package/dist/dns-Dhjbnjgl.cjs.map +0 -1
  498. package/dist/dns-LqWzPb8l.mjs +0 -610
  499. package/dist/dns-LqWzPb8l.mjs.map +0 -1
  500. package/dist/dokploy-D_uCbZQ7.mjs +0 -38
  501. package/dist/dokploy-D_uCbZQ7.mjs.map +0 -1
  502. package/dist/dokploy-Dw4oCXqR.cjs +0 -38
  503. package/dist/dokploy-Dw4oCXqR.cjs.map +0 -1
  504. package/dist/drivers-CTaWrA_L.mjs +0 -177
  505. package/dist/drivers-CTaWrA_L.mjs.map +0 -1
  506. package/dist/drivers-DDojgzz0.cjs +0 -200
  507. package/dist/drivers-DDojgzz0.cjs.map +0 -1
  508. package/dist/emit-C1e8qD08.mjs +0 -193
  509. package/dist/emit-C1e8qD08.mjs.map +0 -1
  510. package/dist/emit-Dmc1nvdS.cjs +0 -210
  511. package/dist/emit-Dmc1nvdS.cjs.map +0 -1
  512. package/dist/encryption-C0uKYE9v.mjs +0 -89
  513. package/dist/encryption-C0uKYE9v.mjs.map +0 -1
  514. package/dist/encryption-CtVPHWWq.cjs +0 -90
  515. package/dist/encryption-CtVPHWWq.cjs.map +0 -1
  516. package/dist/engine-BE5PdE8S.mjs +0 -3080
  517. package/dist/engine-BE5PdE8S.mjs.map +0 -1
  518. package/dist/engine-HI8aLw1M.cjs +0 -3193
  519. package/dist/engine-HI8aLw1M.cjs.map +0 -1
  520. package/dist/errors-D8Gwp5kU.mjs +0 -23
  521. package/dist/errors-D8Gwp5kU.mjs.map +0 -1
  522. package/dist/errors-DMC4Umsb.cjs +0 -34
  523. package/dist/errors-DMC4Umsb.cjs.map +0 -1
  524. package/dist/github-BCdfZ9zO.cjs +0 -818
  525. package/dist/github-BCdfZ9zO.cjs.map +0 -1
  526. package/dist/github-CT3X720_.mjs +0 -818
  527. package/dist/github-CT3X720_.mjs.map +0 -1
  528. package/dist/index-DKtB01YC.d.cts +0 -190
  529. package/dist/index-DKtB01YC.d.cts.map +0 -1
  530. package/dist/index-ZAUrXH6Q.d.mts +0 -190
  531. package/dist/index-ZAUrXH6Q.d.mts.map +0 -1
  532. package/dist/local-BwC2v2Y8.mjs +0 -224
  533. package/dist/local-BwC2v2Y8.mjs.map +0 -1
  534. package/dist/local-DNhnkugT.cjs +0 -241
  535. package/dist/local-DNhnkugT.cjs.map +0 -1
  536. package/dist/migrate-CCZUgxMK.mjs +0 -266
  537. package/dist/migrate-CCZUgxMK.mjs.map +0 -1
  538. package/dist/migrate-Cs7kQxD5.cjs +0 -271
  539. package/dist/migrate-Cs7kQxD5.cjs.map +0 -1
  540. package/dist/migrate-DBGyoBvZ.cjs +0 -181
  541. package/dist/migrate-DBGyoBvZ.cjs.map +0 -1
  542. package/dist/migrate-DH-lOK3j.mjs +0 -181
  543. package/dist/migrate-DH-lOK3j.mjs.map +0 -1
  544. package/dist/openapi.cjs.map +0 -1
  545. package/dist/openapi.mjs.map +0 -1
  546. package/dist/projectBucket-BjeDcAYy.cjs +0 -206
  547. package/dist/projectBucket-BjeDcAYy.cjs.map +0 -1
  548. package/dist/projectBucket-DrkEht-j.mjs +0 -177
  549. package/dist/projectBucket-DrkEht-j.mjs.map +0 -1
  550. package/dist/provider-BqpjG9QM.cjs +0 -57
  551. package/dist/provider-BqpjG9QM.cjs.map +0 -1
  552. package/dist/provider-CEOKk8NS.mjs +0 -46
  553. package/dist/provider-CEOKk8NS.mjs.map +0 -1
  554. package/dist/ready-D3PIjx3S.cjs +0 -403
  555. package/dist/ready-D3PIjx3S.cjs.map +0 -1
  556. package/dist/ready-naOSJpeJ.mjs +0 -374
  557. package/dist/ready-naOSJpeJ.mjs.map +0 -1
  558. package/dist/reconcile/public.cjs +0 -7
  559. package/dist/reconcile/public.d.cts +0 -49
  560. package/dist/reconcile/public.d.cts.map +0 -1
  561. package/dist/reconcile/public.d.mts +0 -49
  562. package/dist/reconcile/public.d.mts.map +0 -1
  563. package/dist/reconcile/public.mjs +0 -3
  564. package/dist/reconcile--I7V4Klj.mjs.map +0 -1
  565. package/dist/reconcile-CuCQBa5-.cjs.map +0 -1
  566. package/dist/resolve-CScrqgdC.cjs +0 -316
  567. package/dist/resolve-CScrqgdC.cjs.map +0 -1
  568. package/dist/resolve-OfLaxaxY.mjs +0 -263
  569. package/dist/resolve-OfLaxaxY.mjs.map +0 -1
  570. package/dist/rollback-D7p4wJNO.cjs +0 -165
  571. package/dist/rollback-D7p4wJNO.cjs.map +0 -1
  572. package/dist/rollback-DQBSN-i7.mjs +0 -136
  573. package/dist/rollback-DQBSN-i7.mjs.map +0 -1
  574. package/dist/rolldown-runtime-BhDjJH2R.mjs +0 -15
  575. package/dist/run-BJLIerMM.mjs +0 -133
  576. package/dist/run-BJLIerMM.mjs.map +0 -1
  577. package/dist/run-fVZ-rLnc.cjs +0 -174
  578. package/dist/run-fVZ-rLnc.cjs.map +0 -1
  579. package/dist/runtime-BlHOVx8L.d.cts +0 -82
  580. package/dist/runtime-BlHOVx8L.d.cts.map +0 -1
  581. package/dist/runtime-DMq9C3KB.d.mts +0 -82
  582. package/dist/runtime-DMq9C3KB.d.mts.map +0 -1
  583. package/dist/s3-CUKzBBae.mjs +0 -215
  584. package/dist/s3-CUKzBBae.mjs.map +0 -1
  585. package/dist/s3-QQi4sNOQ.cjs +0 -215
  586. package/dist/s3-QQi4sNOQ.cjs.map +0 -1
  587. package/dist/sandbox/config-worker.cjs +0 -43
  588. package/dist/sandbox/config-worker.cjs.map +0 -1
  589. package/dist/sandbox/config-worker.d.cts +0 -1
  590. package/dist/sandbox/config-worker.d.mts +0 -1
  591. package/dist/sandbox/config-worker.mjs +0 -44
  592. package/dist/sandbox/config-worker.mjs.map +0 -1
  593. package/dist/sandbox/credentials-worker.cjs +0 -54
  594. package/dist/sandbox/credentials-worker.cjs.map +0 -1
  595. package/dist/sandbox/credentials-worker.d.cts +0 -1
  596. package/dist/sandbox/credentials-worker.d.mts +0 -1
  597. package/dist/sandbox/credentials-worker.mjs +0 -55
  598. package/dist/sandbox/credentials-worker.mjs.map +0 -1
  599. package/dist/sandbox/discover-worker.cjs +0 -47
  600. package/dist/sandbox/discover-worker.cjs.map +0 -1
  601. package/dist/sandbox/discover-worker.d.cts +0 -1
  602. package/dist/sandbox/discover-worker.d.mts +0 -1
  603. package/dist/sandbox/discover-worker.mjs +0 -48
  604. package/dist/sandbox/discover-worker.mjs.map +0 -1
  605. package/dist/sandbox/migrate-worker.cjs +0 -75
  606. package/dist/sandbox/migrate-worker.cjs.map +0 -1
  607. package/dist/sandbox/migrate-worker.d.cts +0 -1
  608. package/dist/sandbox/migrate-worker.d.mts +0 -1
  609. package/dist/sandbox/migrate-worker.mjs +0 -76
  610. package/dist/sandbox/migrate-worker.mjs.map +0 -1
  611. package/dist/sandbox-ArJ_hEKk.d.cts +0 -104
  612. package/dist/sandbox-ArJ_hEKk.d.cts.map +0 -1
  613. package/dist/sandbox-CHv3OYXg.cjs +0 -165
  614. package/dist/sandbox-CHv3OYXg.cjs.map +0 -1
  615. package/dist/sandbox-CbVB7uOD.mjs +0 -118
  616. package/dist/sandbox-CbVB7uOD.mjs.map +0 -1
  617. package/dist/sandbox-Cm4X6HRh.d.mts +0 -104
  618. package/dist/sandbox-Cm4X6HRh.d.mts.map +0 -1
  619. package/dist/schemas-BObwxB_t.cjs +0 -6017
  620. package/dist/schemas-BObwxB_t.cjs.map +0 -1
  621. package/dist/schemas-D-xeKJDD.mjs +0 -5916
  622. package/dist/schemas-D-xeKJDD.mjs.map +0 -1
  623. package/dist/secrets-AA_tQUl-.mjs +0 -36
  624. package/dist/secrets-AA_tQUl-.mjs.map +0 -1
  625. package/dist/secrets-B_biKsKx.cjs +0 -47
  626. package/dist/secrets-B_biKsKx.cjs.map +0 -1
  627. package/dist/secretsManager-CQORubp9.mjs +0 -97
  628. package/dist/secretsManager-CQORubp9.mjs.map +0 -1
  629. package/dist/secretsManager-RAGcEDX1.cjs +0 -108
  630. package/dist/secretsManager-RAGcEDX1.cjs.map +0 -1
  631. package/dist/seeds-BvxWUGKJ.mjs +0 -8263
  632. package/dist/seeds-BvxWUGKJ.mjs.map +0 -1
  633. package/dist/seeds-Df4BI-T3.cjs +0 -9266
  634. package/dist/seeds-Df4BI-T3.cjs.map +0 -1
  635. package/dist/sniffer-BqjXvcaK.mjs +0 -1825
  636. package/dist/sniffer-BqjXvcaK.mjs.map +0 -1
  637. package/dist/sniffer-DZeQJKty.cjs +0 -1998
  638. package/dist/sniffer-DZeQJKty.cjs.map +0 -1
  639. package/dist/sst-CGdjHn2A.mjs +0 -441
  640. package/dist/sst-CGdjHn2A.mjs.map +0 -1
  641. package/dist/sst-DGuHDxVU.cjs +0 -464
  642. package/dist/sst-DGuHDxVU.cjs.map +0 -1
  643. package/dist/stack-A6MAFZ6u.mjs +0 -1201
  644. package/dist/stack-A6MAFZ6u.mjs.map +0 -1
  645. package/dist/stack-BpkZEEfB.cjs +0 -1308
  646. package/dist/stack-BpkZEEfB.cjs.map +0 -1
  647. package/dist/stages-6SEoRA4x.mjs +0 -190
  648. package/dist/stages-6SEoRA4x.mjs.map +0 -1
  649. package/dist/stages-DH5z89eT.cjs +0 -190
  650. package/dist/stages-DH5z89eT.cjs.map +0 -1
  651. package/dist/target/public.cjs +0 -15
  652. package/dist/target/public.d.cts +0 -28
  653. package/dist/target/public.d.cts.map +0 -1
  654. package/dist/target/public.d.mts +0 -28
  655. package/dist/target/public.d.mts.map +0 -1
  656. package/dist/target/public.mjs +0 -4
  657. package/dist/terminal-CPHuH4S1.cjs +0 -85
  658. package/dist/terminal-CPHuH4S1.cjs.map +0 -1
  659. package/dist/terminal-iNmAXXjs.mjs +0 -85
  660. package/dist/terminal-iNmAXXjs.mjs.map +0 -1
  661. package/dist/types-DipUP9zp.d.cts +0 -7606
  662. package/dist/types-DipUP9zp.d.cts.map +0 -1
  663. package/dist/types-Drpl9HX9.d.mts +0 -7605
  664. package/dist/types-Drpl9HX9.d.mts.map +0 -1
  665. package/dist/utils-D2Nk1Nv2.cjs +0 -205
  666. package/dist/utils-D2Nk1Nv2.cjs.map +0 -1
  667. package/dist/utils-D_fxUqvU.mjs +0 -156
  668. package/dist/utils-D_fxUqvU.mjs.map +0 -1
  669. package/dist/vitest.cjs +0 -65
  670. package/dist/vitest.cjs.map +0 -1
  671. package/dist/vitest.d.cts +0 -29
  672. package/dist/vitest.d.cts.map +0 -1
  673. package/dist/vitest.d.mts +0 -29
  674. package/dist/vitest.d.mts.map +0 -1
  675. package/dist/vitest.mjs +0 -65
  676. package/dist/vitest.mjs.map +0 -1
  677. package/dist/workerRuntime-BXfhbe13.cjs +0 -108
  678. package/dist/workerRuntime-BXfhbe13.cjs.map +0 -1
  679. package/dist/workerRuntime-CsOyBRx2.mjs +0 -79
  680. package/dist/workerRuntime-CsOyBRx2.mjs.map +0 -1
  681. package/dist/workspace-BBeT6Pil.mjs +0 -2088
  682. package/dist/workspace-BBeT6Pil.mjs.map +0 -1
  683. package/dist/workspace-BJ78Bgvm.cjs +0 -2494
  684. package/dist/workspace-BJ78Bgvm.cjs.map +0 -1
@@ -0,0 +1,1737 @@
1
+ import { EventsBackend, GkmConfig, HooksConfig, OpenApiConfig, ProvidersConfig, Routes, Runtime, StudioConfig, TelescopeConfig } from "./types-BWQDiooe.cjs";
2
+ import { z } from "zod/v4";
3
+
4
+ //#region src/deploy/state.d.ts
5
+
6
+ /**
7
+ * Deploy state management for Dokploy deployments
8
+ *
9
+ * Stores resource IDs (applications, services) per stage to avoid
10
+ * re-creating resources on subsequent deploys.
11
+ */
12
+ /**
13
+ * Per-app database credentials
14
+ */
15
+ interface AppDbCredentials {
16
+ dbUser: string;
17
+ dbPassword: string;
18
+ }
19
+ /**
20
+ * DNS verification record for a hostname
21
+ */
22
+ interface DnsVerificationRecord {
23
+ serverIp: string;
24
+ verifiedAt: string;
25
+ }
26
+ /**
27
+ * A DNS record that was created during deploy
28
+ */
29
+ interface CreatedDnsRecord {
30
+ /** The domain this record belongs to (e.g., 'example.com') */
31
+ domain: string;
32
+ /** Record name/subdomain (e.g., 'api' or '@' for root) */
33
+ name: string;
34
+ /** Record type (A, CNAME, etc.) */
35
+ type: string;
36
+ /** Record value (IP address, hostname, etc.) */
37
+ value: string;
38
+ /** TTL in seconds */
39
+ ttl: number;
40
+ /** When this record was created */
41
+ createdAt: string;
42
+ }
43
+ /**
44
+ * Backup destination state
45
+ */
46
+ interface BackupState {
47
+ /** S3 bucket name for backups */
48
+ bucketName: string;
49
+ /** S3 bucket ARN */
50
+ bucketArn: string;
51
+ /** IAM user name created for backup access */
52
+ iamUserName: string;
53
+ /** IAM access key ID */
54
+ iamAccessKeyId: string;
55
+ /** IAM secret access key */
56
+ iamSecretAccessKey: string;
57
+ /** Dokploy destination ID */
58
+ destinationId: string;
59
+ /** Dokploy backup schedule ID for postgres (if configured) */
60
+ postgresBackupId?: string;
61
+ /** AWS region where bucket was created */
62
+ region: string;
63
+ /** Timestamp when backup was configured */
64
+ createdAt: string;
65
+ }
66
+ /**
67
+ * State for a single stage deployment
68
+ */
69
+ interface DokployStageState {
70
+ provider: 'dokploy';
71
+ stage: string;
72
+ /** Dokploy project ID - created on first deploy */
73
+ projectId: string;
74
+ environmentId: string;
75
+ applications: Record<string, string>;
76
+ services: {
77
+ postgresId?: string;
78
+ redisId?: string;
79
+ };
80
+ /** Per-app database credentials for reuse on subsequent deploys */
81
+ appCredentials?: Record<string, AppDbCredentials>;
82
+ /** Auto-generated secrets per app (e.g., BETTER_AUTH_SECRET) */
83
+ generatedSecrets?: Record<string, Record<string, string>>;
84
+ /** DNS verification state per hostname */
85
+ dnsVerified?: Record<string, DnsVerificationRecord>;
86
+ /** DNS records created during deploy (keyed by "name:type", e.g., "api:A") */
87
+ dnsRecords?: Record<string, CreatedDnsRecord>;
88
+ /** Backup destination state */
89
+ backups?: BackupState;
90
+ lastDeployedAt: string;
91
+ }
92
+ /**
93
+ * Read the deploy state for a stage
94
+ * Returns null if state file doesn't exist
95
+ */
96
+ //#endregion
97
+ //#region src/deploy/StateProvider.d.ts
98
+ /**
99
+ * Interface for deployment state storage providers.
100
+ *
101
+ * Implementations must handle:
102
+ * - Reading state for a stage (returns null if not found)
103
+ * - Writing state for a stage (creates or updates)
104
+ */
105
+ interface StateProvider {
106
+ /**
107
+ * Read deployment state for a stage.
108
+ *
109
+ * @param stage - The deployment stage (e.g., 'development', 'production')
110
+ * @returns The state object or null if not found
111
+ */
112
+ read(stage: string): Promise<DokployStageState | null>;
113
+ /**
114
+ * Write deployment state for a stage.
115
+ *
116
+ * @param stage - The deployment stage
117
+ * @param state - The state object to persist
118
+ */
119
+ write(stage: string, state: DokployStageState): Promise<void>;
120
+ }
121
+ /**
122
+ * Valid AWS regions.
123
+ */
124
+ type AwsRegion = 'us-east-1' | 'us-east-2' | 'us-west-1' | 'us-west-2' | 'af-south-1' | 'ap-east-1' | 'ap-south-1' | 'ap-south-2' | 'ap-southeast-1' | 'ap-southeast-2' | 'ap-southeast-3' | 'ap-southeast-4' | 'ap-northeast-1' | 'ap-northeast-2' | 'ap-northeast-3' | 'ca-central-1' | 'eu-central-1' | 'eu-central-2' | 'eu-west-1' | 'eu-west-2' | 'eu-west-3' | 'eu-south-1' | 'eu-south-2' | 'eu-north-1' | 'me-south-1' | 'me-central-1' | 'sa-east-1';
125
+ /**
126
+ * Local state provider config.
127
+ */
128
+ interface LocalStateConfig {
129
+ provider: 'local';
130
+ }
131
+ /**
132
+ * SSM state provider config (requires region).
133
+ */
134
+ interface SSMStateConfig {
135
+ provider: 'ssm';
136
+ /** AWS region (required for SSM provider) */
137
+ region: AwsRegion;
138
+ /** AWS profile name (optional - uses default credential chain if not provided) */
139
+ profile?: string;
140
+ }
141
+ /**
142
+ * Custom state provider config.
143
+ */
144
+ interface CustomStateConfig {
145
+ /** Custom StateProvider implementation */
146
+ provider: StateProvider;
147
+ }
148
+ /**
149
+ * State configuration types.
150
+ */
151
+ type StateConfig = LocalStateConfig | SSMStateConfig | CustomStateConfig;
152
+ /**
153
+ * Check if value is a StateProvider implementation.
154
+ */
155
+ //#endregion
156
+ //#region src/workspace/schema.d.ts
157
+ /**
158
+ * Backend framework schema for non-gkm apps.
159
+ */
160
+ declare const BackendFrameworkSchema: z.ZodEnum<{
161
+ hono: "hono";
162
+ "better-auth": "better-auth";
163
+ express: "express";
164
+ fastify: "fastify";
165
+ }>;
166
+ /**
167
+ * Backend framework types for apps that don't use gkm routes.
168
+ * Derived from {@link BackendFrameworkSchema}.
169
+ *
170
+ * Used with `entry` to specify the framework for proper Docker builds.
171
+ *
172
+ * @example
173
+ * ```ts
174
+ * // Better Auth server
175
+ * {
176
+ * entry: './src/index.ts',
177
+ * framework: 'better-auth',
178
+ * port: 3001,
179
+ * }
180
+ *
181
+ * // Hono app without gkm routes
182
+ * {
183
+ * entry: './src/server.ts',
184
+ * framework: 'hono',
185
+ * port: 3000,
186
+ * }
187
+ * ```
188
+ */
189
+ type BackendFramework = z.infer<typeof BackendFrameworkSchema>;
190
+ /**
191
+ * Frontend framework schema.
192
+ */
193
+ declare const FrontendFrameworkSchema: z.ZodEnum<{
194
+ nextjs: "nextjs";
195
+ remix: "remix";
196
+ vite: "vite";
197
+ "tanstack-start": "tanstack-start";
198
+ }>;
199
+ /**
200
+ * Frontend framework types. Derived from {@link FrontendFrameworkSchema}.
201
+ *
202
+ * @example
203
+ * ```ts
204
+ * // Next.js app
205
+ * {
206
+ * type: 'web',
207
+ * framework: 'nextjs',
208
+ * port: 3000,
209
+ * }
210
+ *
211
+ * // Vite SPA
212
+ * {
213
+ * type: 'web',
214
+ * framework: 'vite',
215
+ * port: 5173,
216
+ * }
217
+ *
218
+ * // TanStack Start (Vite-based, full-stack)
219
+ * {
220
+ * type: 'web',
221
+ * framework: 'tanstack-start',
222
+ * port: 3000,
223
+ * }
224
+ * ```
225
+ */
226
+ type FrontendFramework = z.infer<typeof FrontendFrameworkSchema>;
227
+ /**
228
+ * Mobile framework schema.
229
+ */
230
+
231
+ /**
232
+ * Combined framework schema (backend, frontend, or mobile).
233
+ */
234
+ declare const FrameworkSchema: z.ZodUnion<readonly [z.ZodEnum<{
235
+ hono: "hono";
236
+ "better-auth": "better-auth";
237
+ express: "express";
238
+ fastify: "fastify";
239
+ }>, z.ZodEnum<{
240
+ nextjs: "nextjs";
241
+ remix: "remix";
242
+ vite: "vite";
243
+ "tanstack-start": "tanstack-start";
244
+ }>, z.ZodEnum<{
245
+ expo: "expo";
246
+ }>]>;
247
+ /**
248
+ * Any framework value across backend, frontend, or mobile.
249
+ * Derived from {@link FrameworkSchema}.
250
+ */
251
+ type Framework = z.infer<typeof FrameworkSchema>;
252
+ /**
253
+ * Supported deploy targets (Phase 1).
254
+ */
255
+ declare const SUPPORTED_DEPLOY_TARGETS: readonly ["dokploy"];
256
+ /**
257
+ * Phase 2 deploy targets (not yet implemented).
258
+ */
259
+ declare const PHASE_2_DEPLOY_TARGETS: readonly ["vercel", "cloudflare"];
260
+ /**
261
+ * Check if a deploy target is supported.
262
+ */
263
+ declare function isDeployTargetSupported(target: string): boolean;
264
+ /**
265
+ * Check if a deploy target is planned for Phase 2.
266
+ */
267
+ declare function isPhase2DeployTarget(target: string): boolean;
268
+ /**
269
+ * Get error message for unsupported deploy targets.
270
+ */
271
+ declare function getDeployTargetError(target: string, appName?: string): string;
272
+ /**
273
+ * DNS record types supported across providers.
274
+ */
275
+
276
+ /**
277
+ * Combined DNS config that supports both new multi-domain and legacy single-domain formats.
278
+ */
279
+ declare const DnsConfigWithLegacySchema: z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
280
+ provider: z.ZodLiteral<"hostinger">;
281
+ ttl: z.ZodOptional<z.ZodNumber>;
282
+ }, z.core.$strip>, z.ZodObject<{
283
+ provider: z.ZodLiteral<"route53">;
284
+ region: z.ZodOptional<z.ZodEnum<{
285
+ "us-east-1": "us-east-1";
286
+ "us-east-2": "us-east-2";
287
+ "us-west-1": "us-west-1";
288
+ "us-west-2": "us-west-2";
289
+ "af-south-1": "af-south-1";
290
+ "ap-east-1": "ap-east-1";
291
+ "ap-south-1": "ap-south-1";
292
+ "ap-south-2": "ap-south-2";
293
+ "ap-southeast-1": "ap-southeast-1";
294
+ "ap-southeast-2": "ap-southeast-2";
295
+ "ap-southeast-3": "ap-southeast-3";
296
+ "ap-southeast-4": "ap-southeast-4";
297
+ "ap-northeast-1": "ap-northeast-1";
298
+ "ap-northeast-2": "ap-northeast-2";
299
+ "ap-northeast-3": "ap-northeast-3";
300
+ "ca-central-1": "ca-central-1";
301
+ "eu-central-1": "eu-central-1";
302
+ "eu-central-2": "eu-central-2";
303
+ "eu-west-1": "eu-west-1";
304
+ "eu-west-2": "eu-west-2";
305
+ "eu-west-3": "eu-west-3";
306
+ "eu-south-1": "eu-south-1";
307
+ "eu-south-2": "eu-south-2";
308
+ "eu-north-1": "eu-north-1";
309
+ "me-south-1": "me-south-1";
310
+ "me-central-1": "me-central-1";
311
+ "sa-east-1": "sa-east-1";
312
+ }>>;
313
+ profile: z.ZodOptional<z.ZodString>;
314
+ hostedZoneId: z.ZodOptional<z.ZodString>;
315
+ ttl: z.ZodOptional<z.ZodNumber>;
316
+ }, z.core.$strip>, z.ZodObject<{
317
+ provider: z.ZodLiteral<"cloudflare">;
318
+ ttl: z.ZodOptional<z.ZodNumber>;
319
+ }, z.core.$strip>, z.ZodObject<{
320
+ provider: z.ZodLiteral<"manual">;
321
+ }, z.core.$strip>], "provider">, z.ZodObject<{
322
+ provider: z.ZodCustom<{
323
+ name: string;
324
+ getRecords: Function;
325
+ upsertRecords: Function;
326
+ }, {
327
+ name: string;
328
+ getRecords: Function;
329
+ upsertRecords: Function;
330
+ }>;
331
+ ttl: z.ZodOptional<z.ZodNumber>;
332
+ }, z.core.$strip>]>>, z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
333
+ provider: z.ZodLiteral<"hostinger">;
334
+ ttl: z.ZodOptional<z.ZodNumber>;
335
+ domain: z.ZodString;
336
+ }, z.core.$strip>, z.ZodObject<{
337
+ provider: z.ZodLiteral<"route53">;
338
+ region: z.ZodOptional<z.ZodEnum<{
339
+ "us-east-1": "us-east-1";
340
+ "us-east-2": "us-east-2";
341
+ "us-west-1": "us-west-1";
342
+ "us-west-2": "us-west-2";
343
+ "af-south-1": "af-south-1";
344
+ "ap-east-1": "ap-east-1";
345
+ "ap-south-1": "ap-south-1";
346
+ "ap-south-2": "ap-south-2";
347
+ "ap-southeast-1": "ap-southeast-1";
348
+ "ap-southeast-2": "ap-southeast-2";
349
+ "ap-southeast-3": "ap-southeast-3";
350
+ "ap-southeast-4": "ap-southeast-4";
351
+ "ap-northeast-1": "ap-northeast-1";
352
+ "ap-northeast-2": "ap-northeast-2";
353
+ "ap-northeast-3": "ap-northeast-3";
354
+ "ca-central-1": "ca-central-1";
355
+ "eu-central-1": "eu-central-1";
356
+ "eu-central-2": "eu-central-2";
357
+ "eu-west-1": "eu-west-1";
358
+ "eu-west-2": "eu-west-2";
359
+ "eu-west-3": "eu-west-3";
360
+ "eu-south-1": "eu-south-1";
361
+ "eu-south-2": "eu-south-2";
362
+ "eu-north-1": "eu-north-1";
363
+ "me-south-1": "me-south-1";
364
+ "me-central-1": "me-central-1";
365
+ "sa-east-1": "sa-east-1";
366
+ }>>;
367
+ profile: z.ZodOptional<z.ZodString>;
368
+ hostedZoneId: z.ZodOptional<z.ZodString>;
369
+ ttl: z.ZodOptional<z.ZodNumber>;
370
+ domain: z.ZodString;
371
+ }, z.core.$strip>, z.ZodObject<{
372
+ provider: z.ZodLiteral<"cloudflare">;
373
+ ttl: z.ZodOptional<z.ZodNumber>;
374
+ domain: z.ZodString;
375
+ }, z.core.$strip>, z.ZodObject<{
376
+ provider: z.ZodLiteral<"manual">;
377
+ domain: z.ZodString;
378
+ }, z.core.$strip>], "provider">, z.ZodObject<{
379
+ provider: z.ZodCustom<{
380
+ name: string;
381
+ getRecords: Function;
382
+ upsertRecords: Function;
383
+ }, {
384
+ name: string;
385
+ getRecords: Function;
386
+ upsertRecords: Function;
387
+ }>;
388
+ ttl: z.ZodOptional<z.ZodNumber>;
389
+ domain: z.ZodString;
390
+ }, z.core.$strip>]>]>;
391
+ type DnsConfig = z.infer<typeof DnsConfigWithLegacySchema>;
392
+ /**
393
+ * Backups configuration schema.
394
+ *
395
+ * Configures automatic backup destinations for database services.
396
+ * On first deploy, creates S3 bucket with unique name and IAM credentials.
397
+ */
398
+ declare const BackupsConfigSchema: z.ZodObject<{
399
+ type: z.ZodLiteral<"s3">;
400
+ profile: z.ZodOptional<z.ZodString>;
401
+ region: z.ZodEnum<{
402
+ "us-east-1": "us-east-1";
403
+ "us-east-2": "us-east-2";
404
+ "us-west-1": "us-west-1";
405
+ "us-west-2": "us-west-2";
406
+ "af-south-1": "af-south-1";
407
+ "ap-east-1": "ap-east-1";
408
+ "ap-south-1": "ap-south-1";
409
+ "ap-south-2": "ap-south-2";
410
+ "ap-southeast-1": "ap-southeast-1";
411
+ "ap-southeast-2": "ap-southeast-2";
412
+ "ap-southeast-3": "ap-southeast-3";
413
+ "ap-southeast-4": "ap-southeast-4";
414
+ "ap-northeast-1": "ap-northeast-1";
415
+ "ap-northeast-2": "ap-northeast-2";
416
+ "ap-northeast-3": "ap-northeast-3";
417
+ "ca-central-1": "ca-central-1";
418
+ "eu-central-1": "eu-central-1";
419
+ "eu-central-2": "eu-central-2";
420
+ "eu-west-1": "eu-west-1";
421
+ "eu-west-2": "eu-west-2";
422
+ "eu-west-3": "eu-west-3";
423
+ "eu-south-1": "eu-south-1";
424
+ "eu-south-2": "eu-south-2";
425
+ "eu-north-1": "eu-north-1";
426
+ "me-south-1": "me-south-1";
427
+ "me-central-1": "me-central-1";
428
+ "sa-east-1": "sa-east-1";
429
+ }>;
430
+ schedule: z.ZodOptional<z.ZodString>;
431
+ retention: z.ZodOptional<z.ZodNumber>;
432
+ }, z.core.$strip>;
433
+ type BackupsConfig = z.infer<typeof BackupsConfigSchema>;
434
+ /**
435
+ * Workspace configuration schema.
436
+ */
437
+ declare const WorkspaceConfigSchema: z.ZodObject<{
438
+ name: z.ZodOptional<z.ZodString>;
439
+ apps: z.ZodRecord<z.ZodString, z.ZodObject<{
440
+ type: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
441
+ backend: "backend";
442
+ web: "web";
443
+ mobile: "mobile";
444
+ }>>>;
445
+ path: z.ZodString;
446
+ port: z.ZodNumber;
447
+ dependencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
448
+ deploy: z.ZodOptional<z.ZodEnum<{
449
+ dokploy: "dokploy";
450
+ vercel: "vercel";
451
+ cloudflare: "cloudflare";
452
+ }>>;
453
+ routes: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodObject<{
454
+ paths: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
455
+ partition: z.ZodCustom<(filepath: string) => string, (filepath: string) => string>;
456
+ }, z.core.$strip>]>>;
457
+ functions: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodObject<{
458
+ paths: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
459
+ partition: z.ZodCustom<(filepath: string) => string, (filepath: string) => string>;
460
+ }, z.core.$strip>]>>;
461
+ crons: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodObject<{
462
+ paths: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
463
+ partition: z.ZodCustom<(filepath: string) => string, (filepath: string) => string>;
464
+ }, z.core.$strip>]>>;
465
+ subscribers: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodObject<{
466
+ paths: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
467
+ partition: z.ZodCustom<(filepath: string) => string, (filepath: string) => string>;
468
+ }, z.core.$strip>]>>;
469
+ envParser: z.ZodOptional<z.ZodString>;
470
+ logger: z.ZodOptional<z.ZodString>;
471
+ hooks: z.ZodOptional<z.ZodObject<{
472
+ server: z.ZodOptional<z.ZodString>;
473
+ }, z.core.$strip>>;
474
+ telescope: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodBoolean, z.ZodObject<{
475
+ enabled: z.ZodOptional<z.ZodBoolean>;
476
+ port: z.ZodOptional<z.ZodNumber>;
477
+ path: z.ZodOptional<z.ZodString>;
478
+ ignore: z.ZodOptional<z.ZodArray<z.ZodString>>;
479
+ recordBody: z.ZodOptional<z.ZodBoolean>;
480
+ maxEntries: z.ZodOptional<z.ZodNumber>;
481
+ websocket: z.ZodOptional<z.ZodBoolean>;
482
+ }, z.core.$strip>]>>;
483
+ studio: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodBoolean, z.ZodObject<{
484
+ enabled: z.ZodOptional<z.ZodBoolean>;
485
+ path: z.ZodOptional<z.ZodString>;
486
+ schema: z.ZodOptional<z.ZodString>;
487
+ }, z.core.$strip>]>>;
488
+ openapi: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
489
+ enabled: z.ZodOptional<z.ZodBoolean>;
490
+ title: z.ZodOptional<z.ZodString>;
491
+ version: z.ZodOptional<z.ZodString>;
492
+ description: z.ZodOptional<z.ZodString>;
493
+ }, z.core.$strip>]>>;
494
+ runtime: z.ZodOptional<z.ZodEnum<{
495
+ node: "node";
496
+ bun: "bun";
497
+ }>>;
498
+ env: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
499
+ entry: z.ZodOptional<z.ZodString>;
500
+ framework: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
501
+ hono: "hono";
502
+ "better-auth": "better-auth";
503
+ express: "express";
504
+ fastify: "fastify";
505
+ }>, z.ZodEnum<{
506
+ nextjs: "nextjs";
507
+ remix: "remix";
508
+ vite: "vite";
509
+ "tanstack-start": "tanstack-start";
510
+ }>, z.ZodEnum<{
511
+ expo: "expo";
512
+ }>]>>;
513
+ config: z.ZodOptional<z.ZodObject<{
514
+ client: z.ZodOptional<z.ZodString>;
515
+ server: z.ZodOptional<z.ZodString>;
516
+ }, z.core.$strip>>;
517
+ }, z.core.$strip>>;
518
+ shared: z.ZodOptional<z.ZodObject<{
519
+ packages: z.ZodOptional<z.ZodArray<z.ZodString>>;
520
+ models: z.ZodOptional<z.ZodObject<{
521
+ path: z.ZodOptional<z.ZodString>;
522
+ schema: z.ZodOptional<z.ZodEnum<{
523
+ zod: "zod";
524
+ }>>;
525
+ }, z.core.$strip>>;
526
+ }, z.core.$strip>>;
527
+ deploy: z.ZodOptional<z.ZodObject<{
528
+ default: z.ZodOptional<z.ZodEnum<{
529
+ dokploy: "dokploy";
530
+ vercel: "vercel";
531
+ cloudflare: "cloudflare";
532
+ }>>;
533
+ dokploy: z.ZodOptional<z.ZodObject<{
534
+ endpoint: z.ZodOptional<z.ZodURL>;
535
+ endpoints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodURL>>;
536
+ registry: z.ZodOptional<z.ZodString>;
537
+ registryId: z.ZodOptional<z.ZodString>;
538
+ domains: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
539
+ }, z.core.$strip>>;
540
+ dns: z.ZodOptional<z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
541
+ provider: z.ZodLiteral<"hostinger">;
542
+ ttl: z.ZodOptional<z.ZodNumber>;
543
+ }, z.core.$strip>, z.ZodObject<{
544
+ provider: z.ZodLiteral<"route53">;
545
+ region: z.ZodOptional<z.ZodEnum<{
546
+ "us-east-1": "us-east-1";
547
+ "us-east-2": "us-east-2";
548
+ "us-west-1": "us-west-1";
549
+ "us-west-2": "us-west-2";
550
+ "af-south-1": "af-south-1";
551
+ "ap-east-1": "ap-east-1";
552
+ "ap-south-1": "ap-south-1";
553
+ "ap-south-2": "ap-south-2";
554
+ "ap-southeast-1": "ap-southeast-1";
555
+ "ap-southeast-2": "ap-southeast-2";
556
+ "ap-southeast-3": "ap-southeast-3";
557
+ "ap-southeast-4": "ap-southeast-4";
558
+ "ap-northeast-1": "ap-northeast-1";
559
+ "ap-northeast-2": "ap-northeast-2";
560
+ "ap-northeast-3": "ap-northeast-3";
561
+ "ca-central-1": "ca-central-1";
562
+ "eu-central-1": "eu-central-1";
563
+ "eu-central-2": "eu-central-2";
564
+ "eu-west-1": "eu-west-1";
565
+ "eu-west-2": "eu-west-2";
566
+ "eu-west-3": "eu-west-3";
567
+ "eu-south-1": "eu-south-1";
568
+ "eu-south-2": "eu-south-2";
569
+ "eu-north-1": "eu-north-1";
570
+ "me-south-1": "me-south-1";
571
+ "me-central-1": "me-central-1";
572
+ "sa-east-1": "sa-east-1";
573
+ }>>;
574
+ profile: z.ZodOptional<z.ZodString>;
575
+ hostedZoneId: z.ZodOptional<z.ZodString>;
576
+ ttl: z.ZodOptional<z.ZodNumber>;
577
+ }, z.core.$strip>, z.ZodObject<{
578
+ provider: z.ZodLiteral<"cloudflare">;
579
+ ttl: z.ZodOptional<z.ZodNumber>;
580
+ }, z.core.$strip>, z.ZodObject<{
581
+ provider: z.ZodLiteral<"manual">;
582
+ }, z.core.$strip>], "provider">, z.ZodObject<{
583
+ provider: z.ZodCustom<{
584
+ name: string;
585
+ getRecords: Function;
586
+ upsertRecords: Function;
587
+ }, {
588
+ name: string;
589
+ getRecords: Function;
590
+ upsertRecords: Function;
591
+ }>;
592
+ ttl: z.ZodOptional<z.ZodNumber>;
593
+ }, z.core.$strip>]>>, z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
594
+ provider: z.ZodLiteral<"hostinger">;
595
+ ttl: z.ZodOptional<z.ZodNumber>;
596
+ domain: z.ZodString;
597
+ }, z.core.$strip>, z.ZodObject<{
598
+ provider: z.ZodLiteral<"route53">;
599
+ region: z.ZodOptional<z.ZodEnum<{
600
+ "us-east-1": "us-east-1";
601
+ "us-east-2": "us-east-2";
602
+ "us-west-1": "us-west-1";
603
+ "us-west-2": "us-west-2";
604
+ "af-south-1": "af-south-1";
605
+ "ap-east-1": "ap-east-1";
606
+ "ap-south-1": "ap-south-1";
607
+ "ap-south-2": "ap-south-2";
608
+ "ap-southeast-1": "ap-southeast-1";
609
+ "ap-southeast-2": "ap-southeast-2";
610
+ "ap-southeast-3": "ap-southeast-3";
611
+ "ap-southeast-4": "ap-southeast-4";
612
+ "ap-northeast-1": "ap-northeast-1";
613
+ "ap-northeast-2": "ap-northeast-2";
614
+ "ap-northeast-3": "ap-northeast-3";
615
+ "ca-central-1": "ca-central-1";
616
+ "eu-central-1": "eu-central-1";
617
+ "eu-central-2": "eu-central-2";
618
+ "eu-west-1": "eu-west-1";
619
+ "eu-west-2": "eu-west-2";
620
+ "eu-west-3": "eu-west-3";
621
+ "eu-south-1": "eu-south-1";
622
+ "eu-south-2": "eu-south-2";
623
+ "eu-north-1": "eu-north-1";
624
+ "me-south-1": "me-south-1";
625
+ "me-central-1": "me-central-1";
626
+ "sa-east-1": "sa-east-1";
627
+ }>>;
628
+ profile: z.ZodOptional<z.ZodString>;
629
+ hostedZoneId: z.ZodOptional<z.ZodString>;
630
+ ttl: z.ZodOptional<z.ZodNumber>;
631
+ domain: z.ZodString;
632
+ }, z.core.$strip>, z.ZodObject<{
633
+ provider: z.ZodLiteral<"cloudflare">;
634
+ ttl: z.ZodOptional<z.ZodNumber>;
635
+ domain: z.ZodString;
636
+ }, z.core.$strip>, z.ZodObject<{
637
+ provider: z.ZodLiteral<"manual">;
638
+ domain: z.ZodString;
639
+ }, z.core.$strip>], "provider">, z.ZodObject<{
640
+ provider: z.ZodCustom<{
641
+ name: string;
642
+ getRecords: Function;
643
+ upsertRecords: Function;
644
+ }, {
645
+ name: string;
646
+ getRecords: Function;
647
+ upsertRecords: Function;
648
+ }>;
649
+ ttl: z.ZodOptional<z.ZodNumber>;
650
+ domain: z.ZodString;
651
+ }, z.core.$strip>]>]>>;
652
+ backups: z.ZodOptional<z.ZodObject<{
653
+ type: z.ZodLiteral<"s3">;
654
+ profile: z.ZodOptional<z.ZodString>;
655
+ region: z.ZodEnum<{
656
+ "us-east-1": "us-east-1";
657
+ "us-east-2": "us-east-2";
658
+ "us-west-1": "us-west-1";
659
+ "us-west-2": "us-west-2";
660
+ "af-south-1": "af-south-1";
661
+ "ap-east-1": "ap-east-1";
662
+ "ap-south-1": "ap-south-1";
663
+ "ap-south-2": "ap-south-2";
664
+ "ap-southeast-1": "ap-southeast-1";
665
+ "ap-southeast-2": "ap-southeast-2";
666
+ "ap-southeast-3": "ap-southeast-3";
667
+ "ap-southeast-4": "ap-southeast-4";
668
+ "ap-northeast-1": "ap-northeast-1";
669
+ "ap-northeast-2": "ap-northeast-2";
670
+ "ap-northeast-3": "ap-northeast-3";
671
+ "ca-central-1": "ca-central-1";
672
+ "eu-central-1": "eu-central-1";
673
+ "eu-central-2": "eu-central-2";
674
+ "eu-west-1": "eu-west-1";
675
+ "eu-west-2": "eu-west-2";
676
+ "eu-west-3": "eu-west-3";
677
+ "eu-south-1": "eu-south-1";
678
+ "eu-south-2": "eu-south-2";
679
+ "eu-north-1": "eu-north-1";
680
+ "me-south-1": "me-south-1";
681
+ "me-central-1": "me-central-1";
682
+ "sa-east-1": "sa-east-1";
683
+ }>;
684
+ schedule: z.ZodOptional<z.ZodString>;
685
+ retention: z.ZodOptional<z.ZodNumber>;
686
+ }, z.core.$strip>>;
687
+ }, z.core.$strip>>;
688
+ services: z.ZodOptional<z.ZodObject<{
689
+ db: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
690
+ version: z.ZodOptional<z.ZodString>;
691
+ image: z.ZodOptional<z.ZodString>;
692
+ }, z.core.$strip>]>>;
693
+ cache: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
694
+ version: z.ZodOptional<z.ZodString>;
695
+ image: z.ZodOptional<z.ZodString>;
696
+ }, z.core.$strip>]>>;
697
+ mail: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
698
+ version: z.ZodOptional<z.ZodString>;
699
+ image: z.ZodOptional<z.ZodString>;
700
+ smtp: z.ZodOptional<z.ZodObject<{
701
+ host: z.ZodString;
702
+ port: z.ZodNumber;
703
+ user: z.ZodOptional<z.ZodString>;
704
+ pass: z.ZodOptional<z.ZodString>;
705
+ }, z.core.$strip>>;
706
+ }, z.core.$strip>]>>;
707
+ }, z.core.$strip>>;
708
+ secrets: z.ZodOptional<z.ZodObject<{
709
+ enabled: z.ZodOptional<z.ZodBoolean>;
710
+ algorithm: z.ZodOptional<z.ZodString>;
711
+ kdf: z.ZodOptional<z.ZodEnum<{
712
+ scrypt: "scrypt";
713
+ pbkdf2: "pbkdf2";
714
+ }>>;
715
+ }, z.core.$strip>>;
716
+ state: z.ZodOptional<z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
717
+ provider: z.ZodLiteral<"local">;
718
+ }, z.core.$strip>, z.ZodObject<{
719
+ provider: z.ZodLiteral<"ssm">;
720
+ region: z.ZodEnum<{
721
+ "us-east-1": "us-east-1";
722
+ "us-east-2": "us-east-2";
723
+ "us-west-1": "us-west-1";
724
+ "us-west-2": "us-west-2";
725
+ "af-south-1": "af-south-1";
726
+ "ap-east-1": "ap-east-1";
727
+ "ap-south-1": "ap-south-1";
728
+ "ap-south-2": "ap-south-2";
729
+ "ap-southeast-1": "ap-southeast-1";
730
+ "ap-southeast-2": "ap-southeast-2";
731
+ "ap-southeast-3": "ap-southeast-3";
732
+ "ap-southeast-4": "ap-southeast-4";
733
+ "ap-northeast-1": "ap-northeast-1";
734
+ "ap-northeast-2": "ap-northeast-2";
735
+ "ap-northeast-3": "ap-northeast-3";
736
+ "ca-central-1": "ca-central-1";
737
+ "eu-central-1": "eu-central-1";
738
+ "eu-central-2": "eu-central-2";
739
+ "eu-west-1": "eu-west-1";
740
+ "eu-west-2": "eu-west-2";
741
+ "eu-west-3": "eu-west-3";
742
+ "eu-south-1": "eu-south-1";
743
+ "eu-south-2": "eu-south-2";
744
+ "eu-north-1": "eu-north-1";
745
+ "me-south-1": "me-south-1";
746
+ "me-central-1": "me-central-1";
747
+ "sa-east-1": "sa-east-1";
748
+ }>;
749
+ profile: z.ZodOptional<z.ZodString>;
750
+ }, z.core.$strip>], "provider">, z.ZodObject<{
751
+ provider: z.ZodCustom<{
752
+ read: Function;
753
+ write: Function;
754
+ }, {
755
+ read: Function;
756
+ write: Function;
757
+ }>;
758
+ }, z.core.$strip>]>>;
759
+ }, z.core.$strip>;
760
+ /**
761
+ * Validate workspace configuration.
762
+ * Throws ZodError with detailed messages on validation failure.
763
+ */
764
+ declare function validateWorkspaceConfig(config: unknown): z.infer<typeof WorkspaceConfigSchema>;
765
+ /**
766
+ * Safe validation that returns result instead of throwing.
767
+ */
768
+ declare function safeValidateWorkspaceConfig(config: unknown): {
769
+ success: boolean;
770
+ data?: z.infer<typeof WorkspaceConfigSchema>;
771
+ error?: z.ZodError;
772
+ };
773
+ /**
774
+ * Format Zod errors into user-friendly messages.
775
+ */
776
+ declare function formatValidationErrors(error: z.ZodError): string;
777
+ //#endregion
778
+ //#region src/workspace/types.d.ts
779
+ /**
780
+ * Deploy target for an app.
781
+ *
782
+ * Specifies where the app will be deployed.
783
+ *
784
+ * @example
785
+ * ```ts
786
+ * // Currently supported
787
+ * deploy: 'dokploy'
788
+ *
789
+ * // Future support (not yet implemented)
790
+ * deploy: 'vercel'
791
+ * deploy: 'cloudflare'
792
+ * ```
793
+ */
794
+ type DeployTarget = 'dokploy' | 'vercel' | 'cloudflare';
795
+ /**
796
+ * Service image configuration for custom Docker images.
797
+ *
798
+ * @example
799
+ * ```ts
800
+ * // Use specific version
801
+ * db: { version: '18-alpine' }
802
+ *
803
+ * // Use custom image
804
+ * db: { image: 'timescale/timescaledb:latest-pg16' }
805
+ * ```
806
+ */
807
+ interface ServiceImageConfig {
808
+ /** Docker image version/tag (e.g., '18-alpine') */
809
+ version?: string;
810
+ /** Full Docker image reference (overrides version) */
811
+ image?: string;
812
+ }
813
+ /**
814
+ * Mail service configuration.
815
+ *
816
+ * In development, uses Mailpit for email testing.
817
+ * In production, uses SMTP configuration.
818
+ *
819
+ * @example
820
+ * ```ts
821
+ * services: {
822
+ * mail: {
823
+ * smtp: {
824
+ * host: 'smtp.sendgrid.net',
825
+ * port: 587,
826
+ * user: 'apikey',
827
+ * pass: process.env.SENDGRID_API_KEY,
828
+ * }
829
+ * }
830
+ * }
831
+ * ```
832
+ */
833
+ interface MailServiceConfig extends ServiceImageConfig {
834
+ /** SMTP configuration for production */
835
+ smtp?: {
836
+ host: string;
837
+ port: number;
838
+ user?: string;
839
+ pass?: string;
840
+ };
841
+ }
842
+ /**
843
+ * Development services configuration.
844
+ *
845
+ * Configures shared infrastructure services like databases and caches.
846
+ * These are automatically provisioned in Dokploy during deployment.
847
+ *
848
+ * @example
849
+ * ```ts
850
+ * // Enable with defaults
851
+ * services: {
852
+ * db: true, // postgres:18-alpine
853
+ * cache: true, // redis:8-alpine
854
+ * }
855
+ *
856
+ * // Custom versions
857
+ * services: {
858
+ * db: { version: '18-alpine' },
859
+ * cache: { version: '7-alpine' },
860
+ * }
861
+ *
862
+ * // Custom images
863
+ * services: {
864
+ * db: { image: 'timescale/timescaledb:latest-pg16' },
865
+ * }
866
+ *
867
+ * // With mail service
868
+ * services: {
869
+ * db: true,
870
+ * cache: true,
871
+ * mail: true, // Mailpit in dev
872
+ * }
873
+ *
874
+ * // With event backend
875
+ * services: {
876
+ * db: true,
877
+ * cache: true,
878
+ * events: 'pgboss', // reuses postgres (auto-enables db)
879
+ * // events: 'sns', // adds LocalStack container
880
+ * // events: 'rabbitmq', // adds RabbitMQ container
881
+ * }
882
+ * ```
883
+ */
884
+ interface ServicesConfig {
885
+ /** PostgreSQL database (default: postgres:18-alpine) */
886
+ db?: boolean | ServiceImageConfig;
887
+ /** Redis cache (default: redis:8-alpine) */
888
+ cache?: boolean | ServiceImageConfig;
889
+ /** Mail service (mailpit for dev) */
890
+ mail?: boolean | MailServiceConfig;
891
+ /** MinIO S3-compatible object storage (default: pgsty/minio:RELEASE.2026-08-04T00-00-00Z) */
892
+ storage?: boolean | ServiceImageConfig;
893
+ /** Event backend: pgboss (reuses postgres), sns (LocalStack), or rabbitmq */
894
+ events?: EventsBackend;
895
+ }
896
+ /**
897
+ * Stage-based domain configuration.
898
+ *
899
+ * Maps deployment stages to base domains. The main frontend app
900
+ * gets the base domain, other apps get `{appName}.{baseDomain}`.
901
+ *
902
+ * @example
903
+ * ```ts
904
+ * domains: {
905
+ * development: 'dev.myapp.com',
906
+ * staging: 'staging.myapp.com',
907
+ * production: 'myapp.com',
908
+ * }
909
+ *
910
+ * // Result for production stage:
911
+ * // - web (main frontend): myapp.com
912
+ * // - api: api.myapp.com
913
+ * // - auth: auth.myapp.com
914
+ * ```
915
+ */
916
+ type DokployDomainsConfig = Record<string, string>;
917
+ /**
918
+ * Per-app domain override configuration.
919
+ *
920
+ * Can be a single domain string (used for all stages) or
921
+ * stage-specific domains.
922
+ *
923
+ * @example
924
+ * ```ts
925
+ * // Single domain for all stages
926
+ * domain: 'api.custom.com'
927
+ *
928
+ * // Stage-specific domains
929
+ * domain: {
930
+ * development: 'api.dev.custom.com',
931
+ * staging: 'api.staging.custom.com',
932
+ * production: 'api.custom.com',
933
+ * }
934
+ * ```
935
+ */
936
+ type AppDomainConfig = string | Record<string, string>;
937
+ /**
938
+ * Dokploy workspace deployment configuration.
939
+ *
940
+ * Configures how the workspace is deployed to a Dokploy server.
941
+ * One workspace maps to one Dokploy project with stage-based environments.
942
+ * Project IDs are stored in deploy state (not config) and created on first deploy.
943
+ *
944
+ * @example Single endpoint for all stages:
945
+ * ```ts
946
+ * deploy: {
947
+ * default: 'dokploy',
948
+ * dokploy: {
949
+ * endpoint: 'https://dokploy.myserver.com',
950
+ * registry: 'ghcr.io/myorg',
951
+ * },
952
+ * }
953
+ * ```
954
+ *
955
+ * @example Per-stage endpoints (different Dokploy servers):
956
+ * ```ts
957
+ * deploy: {
958
+ * default: 'dokploy',
959
+ * dokploy: {
960
+ * endpoints: {
961
+ * development: 'https://dev-dokploy.myserver.com',
962
+ * production: 'https://dokploy.myserver.com',
963
+ * },
964
+ * registry: 'ghcr.io/myorg',
965
+ * },
966
+ * }
967
+ * ```
968
+ */
969
+ interface DokployWorkspaceConfig {
970
+ /** Dokploy API endpoint for all stages */
971
+ endpoint?: string;
972
+ /** Per-stage Dokploy API endpoints (overrides endpoint) */
973
+ endpoints?: Record<string, string>;
974
+ /** Container registry for Docker images (e.g., 'ghcr.io/myorg') */
975
+ registry?: string;
976
+ /** Registry ID in Dokploy (auto-configured) */
977
+ registryId?: string;
978
+ /**
979
+ * Stage-based domain configuration.
980
+ * The main frontend app gets the base domain.
981
+ * Other apps get {appName}.{baseDomain} by default.
982
+ */
983
+ domains?: DokployDomainsConfig;
984
+ }
985
+ /**
986
+ * DNS provider types for automatic DNS record creation.
987
+ */
988
+
989
+ /**
990
+ * Deployment configuration for the workspace.
991
+ *
992
+ * @example
993
+ * ```ts
994
+ * // Minimal - just set default target
995
+ * deploy: {
996
+ * default: 'dokploy',
997
+ * }
998
+ *
999
+ * // Full configuration with DNS and backups
1000
+ * deploy: {
1001
+ * default: 'dokploy',
1002
+ * dokploy: {
1003
+ * endpoint: 'https://dokploy.myserver.com',
1004
+ * projectId: 'proj_abc123',
1005
+ * registry: 'ghcr.io/myorg',
1006
+ * domains: {
1007
+ * production: 'myapp.com',
1008
+ * },
1009
+ * },
1010
+ * dns: {
1011
+ * provider: 'hostinger',
1012
+ * domain: 'myapp.com',
1013
+ * },
1014
+ * backups: {
1015
+ * type: 's3',
1016
+ * region: 'us-east-1',
1017
+ * },
1018
+ * }
1019
+ * ```
1020
+ */
1021
+ interface DeployConfig {
1022
+ /** Default deploy target for all apps (default: 'dokploy') */
1023
+ default?: DeployTarget;
1024
+ /** Dokploy-specific configuration */
1025
+ dokploy?: DokployWorkspaceConfig;
1026
+ /** DNS configuration for automatic record creation */
1027
+ dns?: DnsConfig;
1028
+ /** Backup destination configuration for database services */
1029
+ backups?: BackupsConfig;
1030
+ }
1031
+ /**
1032
+ * Models package configuration for shared schemas.
1033
+ *
1034
+ * Configures a shared models package containing Zod schemas
1035
+ * that can be used across backend and frontend apps.
1036
+ *
1037
+ * @example
1038
+ * ```ts
1039
+ * shared: {
1040
+ * models: {
1041
+ * path: 'packages/models',
1042
+ * schema: 'zod',
1043
+ * },
1044
+ * }
1045
+ * ```
1046
+ */
1047
+ interface ModelsConfig {
1048
+ /** Path to models package relative to workspace root (default: 'packages/models') */
1049
+ path?: string;
1050
+ /**
1051
+ * Schema library to use (default: 'zod').
1052
+ * Currently only 'zod' is supported.
1053
+ * Future: any StandardSchema-compatible library
1054
+ */
1055
+ schema?: 'zod';
1056
+ }
1057
+ /**
1058
+ * Shared packages configuration.
1059
+ *
1060
+ * Configures shared packages in the monorepo that are
1061
+ * used by multiple apps.
1062
+ *
1063
+ * @example
1064
+ * ```ts
1065
+ * shared: {
1066
+ * packages: ['packages/*', 'libs/*'],
1067
+ * models: {
1068
+ * path: 'packages/models',
1069
+ * schema: 'zod',
1070
+ * },
1071
+ * }
1072
+ * ```
1073
+ */
1074
+ interface SharedConfig {
1075
+ /** Glob patterns for shared packages (default: ['packages/*']) */
1076
+ packages?: string[];
1077
+ /** Models package configuration */
1078
+ models?: ModelsConfig;
1079
+ }
1080
+ /**
1081
+ * Secrets encryption configuration.
1082
+ *
1083
+ * Configures how secrets are encrypted for deployment.
1084
+ * Secrets are stored encrypted in `.gkm/secrets/{stage}.json`
1085
+ * with keys stored separately in `~/.gkm/{project}/{stage}.key`.
1086
+ *
1087
+ * @example
1088
+ * ```ts
1089
+ * secrets: {
1090
+ * enabled: true,
1091
+ * algorithm: 'aes-256-gcm',
1092
+ * kdf: 'scrypt',
1093
+ * }
1094
+ * ```
1095
+ */
1096
+ interface SecretsConfig {
1097
+ /** Enable encrypted secrets (default: true) */
1098
+ enabled?: boolean;
1099
+ /** Encryption algorithm (default: 'aes-256-gcm') */
1100
+ algorithm?: string;
1101
+ /** Key derivation function (default: 'scrypt') */
1102
+ kdf?: 'scrypt' | 'pbkdf2';
1103
+ }
1104
+ /**
1105
+ * Base app configuration properties (shared between input and normalized).
1106
+ *
1107
+ * @example
1108
+ * ```ts
1109
+ * // Backend app with gkm routes
1110
+ * api: {
1111
+ * type: 'backend',
1112
+ * path: 'apps/api',
1113
+ * port: 3000,
1114
+ * routes: './src/endpoints/**\/*.ts',
1115
+ * envParser: './src/config/env',
1116
+ * logger: './src/config/logger',
1117
+ * }
1118
+ *
1119
+ * // Backend app with entry point (e.g., Better Auth)
1120
+ * auth: {
1121
+ * type: 'backend',
1122
+ * path: 'apps/auth',
1123
+ * port: 3001,
1124
+ * entry: './src/index.ts',
1125
+ * framework: 'better-auth',
1126
+ * requiredEnv: ['DATABASE_URL', 'BETTER_AUTH_SECRET'],
1127
+ * }
1128
+ *
1129
+ * // Frontend app
1130
+ * web: {
1131
+ * type: 'web',
1132
+ * path: 'apps/web',
1133
+ * port: 3002,
1134
+ * framework: 'nextjs',
1135
+ * dependencies: ['api', 'auth'],
1136
+ * }
1137
+ * ```
1138
+ */
1139
+ interface AppConfigBase {
1140
+ /**
1141
+ * App type.
1142
+ * - 'backend': Server-side app (API, auth service, etc.)
1143
+ * - 'web': Client-side web app (Next.js, Vite, TanStack Start, etc.)
1144
+ * - 'mobile': Native mobile app (Expo). Built/deployed via its own
1145
+ * toolchain (e.g. EAS Build) — Docker/Dokploy steps are skipped.
1146
+ * @default 'backend'
1147
+ */
1148
+ type?: 'backend' | 'web' | 'mobile';
1149
+ /**
1150
+ * Path to the app relative to workspace root.
1151
+ * @example 'apps/api', 'apps/web', 'services/auth'
1152
+ */
1153
+ path: string;
1154
+ /**
1155
+ * Development server port.
1156
+ * Must be unique across all apps in the workspace.
1157
+ * @example 3000, 3001, 3002
1158
+ */
1159
+ port: number;
1160
+ /**
1161
+ * Per-app deploy target override.
1162
+ * Overrides `deploy.default` for this specific app.
1163
+ * @example 'dokploy', 'vercel'
1164
+ */
1165
+ deploy?: DeployTarget;
1166
+ /**
1167
+ * Routes glob pattern for gkm endpoints.
1168
+ * @example './src/endpoints/**\/*.ts'
1169
+ */
1170
+ routes?: Routes;
1171
+ /**
1172
+ * Functions glob pattern for Lambda functions.
1173
+ * @example './src/functions/**\/*.ts'
1174
+ */
1175
+ functions?: Routes;
1176
+ /**
1177
+ * Crons glob pattern for scheduled tasks.
1178
+ * @example './src/crons/**\/*.ts'
1179
+ */
1180
+ crons?: Routes;
1181
+ /**
1182
+ * Subscribers glob pattern for event handlers.
1183
+ * @example './src/subscribers/**\/*.ts'
1184
+ */
1185
+ subscribers?: Routes;
1186
+ /**
1187
+ * Path to environment parser module.
1188
+ * @example './src/config/env'
1189
+ */
1190
+ envParser?: string;
1191
+ /**
1192
+ * Path to logger module.
1193
+ * @example './src/config/logger'
1194
+ */
1195
+ logger?: string;
1196
+ /** Provider configuration (AWS, Docker, etc.) */
1197
+ providers?: ProvidersConfig;
1198
+ /**
1199
+ * Server lifecycle hooks.
1200
+ * @example { beforeSetup: './src/hooks/setup.ts' }
1201
+ */
1202
+ hooks?: HooksConfig;
1203
+ /**
1204
+ * Telescope debugging dashboard configuration.
1205
+ * @example true, './src/config/telescope', { enabled: true, path: '/__telescope' }
1206
+ */
1207
+ telescope?: string | boolean | TelescopeConfig;
1208
+ /**
1209
+ * Studio admin panel configuration.
1210
+ * @example true, './src/config/studio'
1211
+ */
1212
+ studio?: string | boolean | StudioConfig;
1213
+ /**
1214
+ * OpenAPI documentation configuration.
1215
+ * @example true, { output: './src/openapi.ts' }
1216
+ */
1217
+ openapi?: boolean | OpenApiConfig;
1218
+ /**
1219
+ * Runtime environment.
1220
+ * @default 'node'
1221
+ */
1222
+ runtime?: Runtime;
1223
+ /**
1224
+ * Environment file(s) to load during development.
1225
+ * @example '.env', ['.env', '.env.local']
1226
+ */
1227
+ env?: string | string[];
1228
+ /**
1229
+ * Entry file path for apps that don't use gkm routes.
1230
+ *
1231
+ * When specified, the app is run directly with tsx in development
1232
+ * and bundled with esbuild for production Docker builds.
1233
+ *
1234
+ * Use this for:
1235
+ * - Better Auth servers
1236
+ * - Custom Hono/Express apps
1237
+ * - Any backend that doesn't use gkm's endpoint builder
1238
+ *
1239
+ * @example './src/index.ts', './src/server.ts'
1240
+ */
1241
+ entry?: string;
1242
+ /**
1243
+ * Framework for the app.
1244
+ *
1245
+ * Backend frameworks: 'hono', 'better-auth', 'express', 'fastify'
1246
+ * Frontend frameworks: 'nextjs', 'remix', 'vite', 'tanstack-start'
1247
+ * Mobile frameworks: 'expo'
1248
+ *
1249
+ * @example 'nextjs', 'better-auth', 'hono', 'expo'
1250
+ */
1251
+ framework?: Framework;
1252
+ /**
1253
+ * Config file paths for frontend environment sniffing.
1254
+ *
1255
+ * Points to file(s) that call EnvironmentParser.parse() at import time.
1256
+ * The sniffer imports these files and captures all env vars accessed.
1257
+ *
1258
+ * Dependencies are auto-generated as public-prefixed URL vars based on
1259
+ * the app's framework (e.g. `NEXT_PUBLIC_{DEP}_URL` for Next.js,
1260
+ * `VITE_{DEP}_URL` for Vite/TanStack Start, `EXPO_PUBLIC_{DEP}_URL`
1261
+ * for Expo).
1262
+ *
1263
+ * @example
1264
+ * ```ts
1265
+ * config: {
1266
+ * client: './src/config/client.ts', // public-prefixed vars for browser
1267
+ * server: './src/config/server.ts', // server-only vars for SSR
1268
+ * }
1269
+ * ```
1270
+ */
1271
+ config?: {
1272
+ /** Client-side config (public-prefixed vars, available in browser/device) */
1273
+ client?: string;
1274
+ /** Server-side config (all env vars, for SSR/API routes) */
1275
+ server?: string;
1276
+ };
1277
+ /**
1278
+ * Override domain for this app.
1279
+ *
1280
+ * By default, apps get `{appName}.{baseDomain}` (or just `{baseDomain}`
1281
+ * for the main frontend). Use this to specify a custom domain.
1282
+ *
1283
+ * @example
1284
+ * ```ts
1285
+ * // Single domain for all stages
1286
+ * domain: 'api.custom.com'
1287
+ *
1288
+ * // Stage-specific domains
1289
+ * domain: {
1290
+ * production: 'api.custom.com',
1291
+ * staging: 'api.staging.custom.com',
1292
+ * }
1293
+ * ```
1294
+ */
1295
+ domain?: AppDomainConfig;
1296
+ /**
1297
+ * Required environment variables for entry-based apps.
1298
+ *
1299
+ * Use this instead of envParser for apps that don't use gkm routes.
1300
+ * The deploy command uses this list to filter which secrets to embed
1301
+ * in the Docker image.
1302
+ *
1303
+ * @example ['DATABASE_URL', 'BETTER_AUTH_SECRET', 'REDIS_URL']
1304
+ */
1305
+ requiredEnv?: string[];
1306
+ }
1307
+ /**
1308
+ * App configuration input with type-safe dependencies.
1309
+ *
1310
+ * @template TAppNames - Union of valid app names in the workspace (auto-inferred)
1311
+ *
1312
+ * @example
1313
+ * ```ts
1314
+ * // Dependencies are type-checked against app names
1315
+ * apps: {
1316
+ * api: { path: 'apps/api', port: 3000 },
1317
+ * auth: { path: 'apps/auth', port: 3001 },
1318
+ * web: {
1319
+ * path: 'apps/web',
1320
+ * port: 3002,
1321
+ * type: 'web',
1322
+ * dependencies: ['api', 'auth'], // ✓ Valid
1323
+ * // dependencies: ['invalid'], // ✗ Type error
1324
+ * },
1325
+ * }
1326
+ * ```
1327
+ */
1328
+ interface AppConfigInput<TAppNames extends string = string> extends AppConfigBase {
1329
+ /** Dependencies on other apps in the workspace (type-safe) */
1330
+ dependencies?: TAppNames[];
1331
+ }
1332
+ /**
1333
+ * App configuration (legacy, for backwards compatibility).
1334
+ * @deprecated Use AppConfigInput for new code
1335
+ */
1336
+ interface AppConfig extends AppConfigBase {
1337
+ /** Dependencies on other apps in the workspace */
1338
+ dependencies?: string[];
1339
+ }
1340
+ /**
1341
+ * Base app input type for type inference.
1342
+ */
1343
+ type AppInput = AppConfigBase & {
1344
+ dependencies?: readonly string[];
1345
+ };
1346
+ /**
1347
+ * Apps record type for workspace configuration.
1348
+ */
1349
+ type AppsRecord = Record<string, AppInput>;
1350
+ /**
1351
+ * Constrain apps so dependencies only reference valid app names.
1352
+ * Dependencies must be an array of valid app names from the workspace.
1353
+ */
1354
+ type ConstrainedApps<TApps extends AppsRecord> = { [K in keyof TApps]: Omit<TApps[K], 'dependencies'> & {
1355
+ dependencies?: readonly (keyof TApps & string)[];
1356
+ } };
1357
+ /**
1358
+ * Full workspace input type with constrained dependencies.
1359
+ *
1360
+ * @example
1361
+ * ```ts
1362
+ * import { defineWorkspace } from '@geekmidas/cli';
1363
+ *
1364
+ * export default defineWorkspace({
1365
+ * name: 'my-app',
1366
+ * apps: {
1367
+ * api: {
1368
+ * path: 'apps/api',
1369
+ * port: 3000,
1370
+ * routes: './src/endpoints/**\/*.ts',
1371
+ * },
1372
+ * web: {
1373
+ * type: 'web',
1374
+ * path: 'apps/web',
1375
+ * port: 3001,
1376
+ * framework: 'nextjs',
1377
+ * dependencies: ['api'],
1378
+ * },
1379
+ * },
1380
+ * services: {
1381
+ * db: true,
1382
+ * cache: true,
1383
+ * },
1384
+ * deploy: {
1385
+ * default: 'dokploy',
1386
+ * },
1387
+ * });
1388
+ * ```
1389
+ */
1390
+ type WorkspaceInput<TApps extends AppsRecord> = {
1391
+ /** Workspace name (defaults to root package.json name) */
1392
+ name?: string;
1393
+ /** App definitions */
1394
+ apps: ConstrainedApps<TApps>;
1395
+ /** Shared packages configuration */
1396
+ shared?: SharedConfig;
1397
+ /** Deployment configuration */
1398
+ deploy?: DeployConfig;
1399
+ /** Development services (db, cache, mail, storage, events) */
1400
+ services?: ServicesConfig;
1401
+ /** Encrypted secrets configuration */
1402
+ secrets?: SecretsConfig;
1403
+ /** State provider configuration (local filesystem by default, or SSM for team collaboration) */
1404
+ state?: StateConfig;
1405
+ };
1406
+ /**
1407
+ * Extract app names from apps record.
1408
+ */
1409
+ type InferAppNames<TApps extends AppsRecord> = keyof TApps & string;
1410
+ /**
1411
+ * Inferred workspace config with proper app name types.
1412
+ */
1413
+ type InferredWorkspaceConfig<TApps extends AppsRecord> = {
1414
+ name?: string;
1415
+ apps: { [K in keyof TApps]: Omit<TApps[K], 'dependencies'> & {
1416
+ dependencies?: InferAppNames<TApps>[];
1417
+ } };
1418
+ shared?: SharedConfig;
1419
+ deploy?: DeployConfig;
1420
+ services?: ServicesConfig;
1421
+ secrets?: SecretsConfig;
1422
+ state?: StateConfig;
1423
+ };
1424
+ /** @deprecated Use WorkspaceInput */
1425
+
1426
+ /**
1427
+ * Workspace configuration for multi-app monorepos.
1428
+ *
1429
+ * Use `defineWorkspace()` helper for type-safe configuration with
1430
+ * auto-completion and dependency validation.
1431
+ *
1432
+ * @example
1433
+ * ```ts
1434
+ * // gkm.config.ts
1435
+ * import { defineWorkspace } from '@geekmidas/cli';
1436
+ *
1437
+ * export default defineWorkspace({
1438
+ * name: 'my-saas',
1439
+ *
1440
+ * // App definitions
1441
+ * apps: {
1442
+ * // Backend API with gkm routes
1443
+ * api: {
1444
+ * path: 'apps/api',
1445
+ * port: 3000,
1446
+ * routes: './src/endpoints/**\/*.ts',
1447
+ * envParser: './src/config/env',
1448
+ * logger: './src/config/logger',
1449
+ * telescope: true,
1450
+ * },
1451
+ *
1452
+ * // Better Auth service
1453
+ * auth: {
1454
+ * path: 'apps/auth',
1455
+ * port: 3001,
1456
+ * entry: './src/index.ts',
1457
+ * framework: 'better-auth',
1458
+ * requiredEnv: ['DATABASE_URL', 'BETTER_AUTH_SECRET'],
1459
+ * },
1460
+ *
1461
+ * // Next.js frontend
1462
+ * web: {
1463
+ * type: 'web',
1464
+ * path: 'apps/web',
1465
+ * port: 3002,
1466
+ * framework: 'nextjs',
1467
+ * dependencies: ['api', 'auth'],
1468
+ * },
1469
+ * },
1470
+ *
1471
+ * // Infrastructure services
1472
+ * services: {
1473
+ * db: true, // PostgreSQL
1474
+ * cache: true, // Redis
1475
+ * },
1476
+ *
1477
+ * // Deployment configuration
1478
+ * deploy: {
1479
+ * default: 'dokploy',
1480
+ * dokploy: {
1481
+ * endpoint: 'https://dokploy.myserver.com',
1482
+ * projectId: 'proj_abc123',
1483
+ * registry: 'ghcr.io/myorg',
1484
+ * domains: {
1485
+ * production: 'myapp.com',
1486
+ * staging: 'staging.myapp.com',
1487
+ * },
1488
+ * },
1489
+ * },
1490
+ *
1491
+ * // Shared packages
1492
+ * shared: {
1493
+ * packages: ['packages/*'],
1494
+ * models: { path: 'packages/models' },
1495
+ * },
1496
+ * });
1497
+ * ```
1498
+ *
1499
+ * @deprecated Use WorkspaceInput with defineWorkspace for type inference
1500
+ */
1501
+ interface WorkspaceConfig {
1502
+ /** Workspace name (defaults to root package.json name) */
1503
+ name?: string;
1504
+ /** App definitions */
1505
+ apps: Record<string, AppConfig>;
1506
+ /** Shared packages configuration */
1507
+ shared?: SharedConfig;
1508
+ /** Default deployment configuration */
1509
+ deploy?: DeployConfig;
1510
+ /** Development services (db, cache, mail, storage, events) */
1511
+ services?: ServicesConfig;
1512
+ /** Encrypted secrets configuration */
1513
+ secrets?: SecretsConfig;
1514
+ /** State provider configuration (local filesystem by default, or SSM for team collaboration) */
1515
+ state?: StateConfig;
1516
+ }
1517
+ /**
1518
+ * Normalized app configuration with resolved defaults.
1519
+ *
1520
+ * This is the internal representation after processing user input.
1521
+ * All optional fields have been resolved to their defaults.
1522
+ */
1523
+ interface NormalizedAppConfig extends Omit<AppConfigBase, 'type'> {
1524
+ /** App type (always defined after normalization) */
1525
+ type: 'backend' | 'web' | 'mobile';
1526
+ /** Path to the app */
1527
+ path: string;
1528
+ /** Development server port */
1529
+ port: number;
1530
+ /** Resolved dependencies array (empty array if none) */
1531
+ dependencies: string[];
1532
+ /** Resolved deploy target (app.deploy > deploy.default > 'dokploy') */
1533
+ resolvedDeployTarget: DeployTarget;
1534
+ /** Entry file path for non-gkm apps */
1535
+ entry?: string;
1536
+ /** Framework for the app */
1537
+ framework?: Framework;
1538
+ /** Override domain for this app */
1539
+ domain?: AppDomainConfig;
1540
+ /** Required environment variables for entry-based apps */
1541
+ requiredEnv?: string[];
1542
+ }
1543
+ /**
1544
+ * Normalized workspace configuration with resolved defaults.
1545
+ *
1546
+ * This is the internal representation after processing user input.
1547
+ * All optional fields have been resolved to their defaults.
1548
+ */
1549
+ interface NormalizedWorkspace {
1550
+ /** Workspace name (resolved from package.json if not specified) */
1551
+ name: string;
1552
+ /** Absolute path to workspace root */
1553
+ root: string;
1554
+ /** Normalized app configurations */
1555
+ apps: Record<string, NormalizedAppConfig>;
1556
+ /** Services configuration (empty object if not specified) */
1557
+ services: ServicesConfig;
1558
+ /** Deploy configuration (empty object if not specified) */
1559
+ deploy: DeployConfig;
1560
+ /** Shared packages configuration (empty object if not specified) */
1561
+ shared: SharedConfig;
1562
+ /** Secrets configuration (empty object if not specified) */
1563
+ secrets: SecretsConfig;
1564
+ /** State provider configuration (undefined = local filesystem) */
1565
+ state?: StateConfig;
1566
+ }
1567
+ /**
1568
+ * Result of loading and processing a configuration.
1569
+ */
1570
+ interface LoadedConfig {
1571
+ /** Whether this is a single-app or workspace config */
1572
+ type: 'single' | 'workspace';
1573
+ /** The raw configuration as loaded */
1574
+ raw: GkmConfig | WorkspaceConfig;
1575
+ /** Normalized workspace (always available) */
1576
+ workspace: NormalizedWorkspace;
1577
+ }
1578
+ /**
1579
+ * Type guard to check if a config is a WorkspaceConfig.
1580
+ *
1581
+ * @example
1582
+ * ```ts
1583
+ * const config = await loadConfig();
1584
+ * if (isWorkspaceConfig(config)) {
1585
+ * // config.apps is available
1586
+ * console.log(Object.keys(config.apps));
1587
+ * }
1588
+ * ```
1589
+ */
1590
+ declare function isWorkspaceConfig(config: GkmConfig | WorkspaceConfig): config is WorkspaceConfig;
1591
+ //# sourceMappingURL=types.d.ts.map
1592
+ //#endregion
1593
+ //#region src/workspace/publicEnv.d.ts
1594
+ /**
1595
+ * All public env-var prefixes the toolbox understands.
1596
+ *
1597
+ * Used when resolving incoming var names back to a dependency
1598
+ * (e.g. `VITE_AUTH_URL` → `auth`). A var matching any of these
1599
+ * is considered safe to inline into a client bundle.
1600
+ */
1601
+ declare const PUBLIC_ENV_PREFIXES: readonly ["NEXT_PUBLIC_", "VITE_", "EXPO_PUBLIC_"];
1602
+ /**
1603
+ * Resolve the public env-var prefix that a frontend framework's bundler
1604
+ * inlines into client code at build time:
1605
+ *
1606
+ * - `nextjs` → `NEXT_PUBLIC_`
1607
+ * - `vite` → `VITE_`
1608
+ * - `tanstack-start` → `VITE_` (uses Vite under the hood)
1609
+ * - `expo` → `EXPO_PUBLIC_`
1610
+ * - `remix` → `''` (Remix exposes via loaders, no prefix convention)
1611
+ *
1612
+ * For backend frameworks or unspecified, falls back to `NEXT_PUBLIC_` to
1613
+ * preserve the historical default. Backend apps never read these vars
1614
+ * from a bundle, so the prefix only affects scaffolding/symmetry.
1615
+ */
1616
+ declare function getPublicEnvPrefix(framework?: Framework): string;
1617
+ /**
1618
+ * Strip a known public prefix from a var name.
1619
+ * Returns the un-prefixed name, or `null` if no prefix matched.
1620
+ */
1621
+ declare function stripPublicPrefix(name: string): string | null;
1622
+ //# sourceMappingURL=publicEnv.d.ts.map
1623
+
1624
+ //#endregion
1625
+ //#region src/workspace/index.d.ts
1626
+ /**
1627
+ * Define workspace configuration with full TypeScript support and type inference.
1628
+ *
1629
+ * Uses `const` type parameter to infer literal app names, providing:
1630
+ * - Autocomplete for app names in dependencies
1631
+ * - Type errors for invalid dependency references
1632
+ * - Full type inference for the returned config
1633
+ *
1634
+ * @example
1635
+ * ```ts
1636
+ * // gkm.config.ts
1637
+ * import { defineWorkspace } from '@geekmidas/cli';
1638
+ *
1639
+ * export default defineWorkspace({
1640
+ * name: 'my-saas',
1641
+ * apps: {
1642
+ * api: {
1643
+ * type: 'backend',
1644
+ * path: 'apps/api',
1645
+ * port: 3000,
1646
+ * routes: './src/endpoints/**\/*.ts',
1647
+ * envParser: './src/config/env',
1648
+ * logger: './src/logger',
1649
+ * },
1650
+ * web: {
1651
+ * type: 'web',
1652
+ * framework: 'nextjs',
1653
+ * path: 'apps/web',
1654
+ * port: 3001,
1655
+ * dependencies: ['api'], // <- autocomplete shows 'api' | 'web'
1656
+ * },
1657
+ * },
1658
+ * services: {
1659
+ * db: true,
1660
+ * cache: true,
1661
+ * },
1662
+ * });
1663
+ *
1664
+ * // config.apps.api <- full type inference
1665
+ * // config.apps.foo <- TypeScript error
1666
+ * ```
1667
+ */
1668
+ declare function defineWorkspace<const TApps extends AppsRecord>(config: WorkspaceInput<TApps>): InferredWorkspaceConfig<TApps>;
1669
+ /**
1670
+ * Normalize a workspace configuration with resolved defaults.
1671
+ */
1672
+ declare function normalizeWorkspace(config: WorkspaceConfig, cwd: string): NormalizedWorkspace;
1673
+ /**
1674
+ * Wrap a single-app GkmConfig as a workspace.
1675
+ * This allows existing single-app configs to work seamlessly.
1676
+ */
1677
+ declare function wrapSingleAppAsWorkspace(config: GkmConfig, cwd: string): NormalizedWorkspace;
1678
+ /**
1679
+ * Process a loaded configuration (either single-app or workspace).
1680
+ * Returns a normalized workspace in both cases.
1681
+ */
1682
+ declare function processConfig(config: GkmConfig | WorkspaceConfig, cwd: string): LoadedConfig;
1683
+ /**
1684
+ * Get the GkmConfig for a specific app in a workspace.
1685
+ * Useful for running existing single-app commands on a specific app.
1686
+ */
1687
+ declare function getAppGkmConfig(workspace: NormalizedWorkspace, appName: string): GkmConfig | undefined;
1688
+ /**
1689
+ * Get topologically sorted app names based on dependencies.
1690
+ * Apps with no dependencies come first, then apps that depend on them.
1691
+ */
1692
+ declare function getAppBuildOrder(workspace: NormalizedWorkspace): string[];
1693
+ /**
1694
+ * Generate environment variables for app dependencies.
1695
+ *
1696
+ * Each dependency gets the un-prefixed `{DEP}_URL` (for server-side use) and,
1697
+ * when the consuming app's framework supports a public-var prefix, also the
1698
+ * prefixed form (e.g. `NEXT_PUBLIC_{DEP}_URL` for Next.js, `VITE_{DEP}_URL`
1699
+ * for Vite/TanStack Start). The prefixed form is what gets bundled into the
1700
+ * client at build time.
1701
+ */
1702
+ declare function getDependencyEnvVars(workspace: NormalizedWorkspace, appName: string, urlPrefix?: string): Record<string, string>;
1703
+ /**
1704
+ * Resolve the Dokploy endpoint for a specific stage.
1705
+ *
1706
+ * Uses per-stage endpoint from `endpoints` if available,
1707
+ * otherwise falls back to the global `endpoint`.
1708
+ *
1709
+ * @param dokployConfig - Dokploy workspace configuration
1710
+ * @param stage - Deployment stage (e.g., 'development', 'production')
1711
+ * @returns The endpoint URL for the stage, or undefined if not configured
1712
+ *
1713
+ * @example
1714
+ * ```ts
1715
+ * // With per-stage endpoints
1716
+ * const config = {
1717
+ * endpoints: {
1718
+ * development: 'https://dev.dokploy.example.com:3000',
1719
+ * production: 'https://prod.dokploy.example.com:3000',
1720
+ * },
1721
+ * };
1722
+ * getEndpointForStage(config, 'production'); // => 'https://prod.dokploy.example.com:3000'
1723
+ *
1724
+ * // With single endpoint
1725
+ * const config = { endpoint: 'https://dokploy.example.com:3000' };
1726
+ * getEndpointForStage(config, 'production'); // => 'https://dokploy.example.com:3000'
1727
+ * ```
1728
+ */
1729
+ declare function getEndpointForStage(dokployConfig: {
1730
+ endpoint?: string;
1731
+ endpoints?: Record<string, string>;
1732
+ } | undefined, stage: string): string | undefined;
1733
+ //# sourceMappingURL=index.d.ts.map
1734
+
1735
+ //#endregion
1736
+ export { AppConfig, AppConfigInput, AppInput, AppsRecord, BackendFramework, ConstrainedApps, DeployConfig, DeployTarget, DokployWorkspaceConfig, FrontendFramework, InferAppNames, InferredWorkspaceConfig, LoadedConfig, MailServiceConfig, ModelsConfig, NormalizedAppConfig, NormalizedWorkspace, PHASE_2_DEPLOY_TARGETS, PUBLIC_ENV_PREFIXES, SUPPORTED_DEPLOY_TARGETS, SecretsConfig, ServiceImageConfig, ServicesConfig, SharedConfig, WorkspaceConfig, WorkspaceConfigSchema, WorkspaceInput, defineWorkspace, formatValidationErrors, getAppBuildOrder, getAppGkmConfig, getDependencyEnvVars, getDeployTargetError, getEndpointForStage, getPublicEnvPrefix, isDeployTargetSupported, isPhase2DeployTarget, isWorkspaceConfig, normalizeWorkspace, processConfig, safeValidateWorkspaceConfig, stripPublicPrefix, validateWorkspaceConfig, wrapSingleAppAsWorkspace };
1737
+ //# sourceMappingURL=index-CoVW_fFS.d.cts.map