@geekmidas/cli 9.0.2 → 10.0.0-alpha.1
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.
- package/README.md +66 -122
- package/dist/{CachedStateProvider-BdX7klRc.cjs → CachedStateProvider-BLo7zv7S.cjs} +1 -1
- package/dist/CachedStateProvider-BxoAm-B2.mjs +3 -0
- package/dist/{CachedStateProvider-klLWZXWF.cjs → CachedStateProvider-CqPdW7CB.cjs} +1 -1
- package/dist/{CachedStateProvider-klLWZXWF.cjs.map → CachedStateProvider-CqPdW7CB.cjs.map} +1 -1
- package/dist/{CachedStateProvider-CzyFct42.mjs → CachedStateProvider-DTniehMP.mjs} +1 -1
- package/dist/{CachedStateProvider-CzyFct42.mjs.map → CachedStateProvider-DTniehMP.mjs.map} +1 -1
- package/dist/{HostingerProvider-B2ZYz7Yc.mjs → HostingerProvider-Cft7lEYr.mjs} +4 -3
- package/dist/HostingerProvider-Cft7lEYr.mjs.map +1 -0
- package/dist/{HostingerProvider-CrHfsgz9.cjs → HostingerProvider-h3EbEp-Z.cjs} +4 -3
- package/dist/HostingerProvider-h3EbEp-Z.cjs.map +1 -0
- package/dist/{LocalStateProvider-CP49rjzt.mjs → LocalStateProvider-Bn6tS-oL.mjs} +1 -1
- package/dist/{LocalStateProvider-CP49rjzt.mjs.map → LocalStateProvider-Bn6tS-oL.mjs.map} +1 -1
- package/dist/{LocalStateProvider-CalzNfNA.cjs → LocalStateProvider-Db9SEjyH.cjs} +1 -1
- package/dist/{LocalStateProvider-CalzNfNA.cjs.map → LocalStateProvider-Db9SEjyH.cjs.map} +1 -1
- package/dist/{Route53Provider-tlgBzrRQ.mjs → Route53Provider-RdpUDJQk.mjs} +1 -1
- package/dist/{Route53Provider-tlgBzrRQ.mjs.map → Route53Provider-RdpUDJQk.mjs.map} +1 -1
- package/dist/{Route53Provider-DwgXiLxt.cjs → Route53Provider-di2fMM5N.cjs} +1 -1
- package/dist/{Route53Provider-DwgXiLxt.cjs.map → Route53Provider-di2fMM5N.cjs.map} +1 -1
- package/dist/{SSMStateProvider-BlrTiV5m.mjs → SSMStateProvider-BRt2py-A.mjs} +1 -1
- package/dist/{SSMStateProvider-BlrTiV5m.mjs.map → SSMStateProvider-BRt2py-A.mjs.map} +1 -1
- package/dist/{SSMStateProvider-Bt6r8CTL.cjs → SSMStateProvider-DyX8s9HI.cjs} +1 -1
- package/dist/{SSMStateProvider-Bt6r8CTL.cjs.map → SSMStateProvider-DyX8s9HI.cjs.map} +1 -1
- package/dist/{backup-provisioner-Xunq-p_8.mjs → backup-provisioner-Bgj5Vi_L.mjs} +2 -2
- package/dist/{backup-provisioner-Xunq-p_8.mjs.map → backup-provisioner-Bgj5Vi_L.mjs.map} +1 -1
- package/dist/{backup-provisioner-B3HBN-2k.cjs → backup-provisioner-BrsHwYG0.cjs} +2 -2
- package/dist/{backup-provisioner-B3HBN-2k.cjs.map → backup-provisioner-BrsHwYG0.cjs.map} +1 -1
- package/dist/{bundler-Dufq3uvI.cjs → bundler-BY1OmV1e.cjs} +44 -14
- package/dist/bundler-BY1OmV1e.cjs.map +1 -0
- package/dist/{bundler-DkA4qzUD.mjs → bundler-Be8Zg4Wd.mjs} +45 -15
- package/dist/bundler-Be8Zg4Wd.mjs.map +1 -0
- package/dist/config-D8o6I_7Z.mjs +469 -0
- package/dist/config-D8o6I_7Z.mjs.map +1 -0
- package/dist/config-DbPE1KXF.cjs +535 -0
- package/dist/config-DbPE1KXF.cjs.map +1 -0
- package/dist/config.cjs +3 -2
- package/dist/config.d.cts +2 -2
- package/dist/config.d.cts.map +1 -1
- package/dist/config.d.mts +2 -2
- package/dist/config.d.mts.map +1 -1
- package/dist/config.mjs +3 -2
- package/dist/{credentials-s1kLcIzK.mjs → credentials-B5zRHdAl.mjs} +21 -6
- package/dist/credentials-B5zRHdAl.mjs.map +1 -0
- package/dist/{credentials-C8DWtnMY.cjs → credentials-BapzjyV5.cjs} +26 -5
- package/dist/credentials-BapzjyV5.cjs.map +1 -0
- package/dist/credentials-Dh0Q6HzY.mjs +2548 -0
- package/dist/credentials-Dh0Q6HzY.mjs.map +1 -0
- package/dist/credentials-K961ThG3.cjs +2680 -0
- package/dist/credentials-K961ThG3.cjs.map +1 -0
- package/dist/deploy/sniffer-routes-worker.cjs +6 -2
- package/dist/deploy/sniffer-routes-worker.cjs.map +1 -1
- package/dist/deploy/sniffer-routes-worker.mjs +6 -2
- package/dist/deploy/sniffer-routes-worker.mjs.map +1 -1
- package/dist/discover-CAlFgYec.mjs +229 -0
- package/dist/discover-CAlFgYec.mjs.map +1 -0
- package/dist/discover-DTmFeloL.cjs +271 -0
- package/dist/discover-DTmFeloL.cjs.map +1 -0
- package/dist/dokploy-api-BS2xnJLZ.mjs +3 -0
- package/dist/{dokploy-api-CqOIKHme.cjs → dokploy-api-BsVH0y_s.cjs} +141 -32
- package/dist/dokploy-api-BsVH0y_s.cjs.map +1 -0
- package/dist/dokploy-api-BuxDRo3l.cjs +3 -0
- package/dist/{dokploy-api-sfZFlWuE.mjs → dokploy-api-aTFPz7_4.mjs} +141 -32
- package/dist/dokploy-api-aTFPz7_4.mjs.map +1 -0
- package/dist/emit-CbcRolsa.cjs +236 -0
- package/dist/emit-CbcRolsa.cjs.map +1 -0
- package/dist/emit-CiZS_5Ub.mjs +206 -0
- package/dist/emit-CiZS_5Ub.mjs.map +1 -0
- package/dist/{encryption-MfXAiFTm.cjs → encryption-C6jaU0hE.cjs} +1 -1
- package/dist/{encryption-MfXAiFTm.cjs.map → encryption-C6jaU0hE.cjs.map} +1 -1
- package/dist/{encryption-BVS7Vmzs.cjs → encryption-CHzzeR8a.cjs} +1 -1
- package/dist/encryption-CQUncu7v.mjs +3 -0
- package/dist/{encryption-CO5Q4Bhf.mjs → encryption-D-abyhZx.mjs} +1 -1
- package/dist/{encryption-CO5Q4Bhf.mjs.map → encryption-D-abyhZx.mjs.map} +1 -1
- package/dist/fullstack-secrets-C-GGohke.cjs +111 -0
- package/dist/fullstack-secrets-C-GGohke.cjs.map +1 -0
- package/dist/fullstack-secrets-D1o9-G5l.mjs +87 -0
- package/dist/fullstack-secrets-D1o9-G5l.mjs.map +1 -0
- package/dist/{fullstack-secrets-BYzi6Hwl.cjs → generator-CNzBw7g5.cjs} +1 -114
- package/dist/generator-CNzBw7g5.cjs.map +1 -0
- package/dist/{fullstack-secrets-l8s3II_H.mjs → generator-VE2JrFlY.mjs} +2 -85
- package/dist/generator-VE2JrFlY.mjs.map +1 -0
- package/dist/index-BThUzEIp.d.mts +175 -0
- package/dist/index-BThUzEIp.d.mts.map +1 -0
- package/dist/index-CHB4tSzX.d.cts +175 -0
- package/dist/index-CHB4tSzX.d.cts.map +1 -0
- package/dist/index.cjs +2530 -1810
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +2506 -1786
- package/dist/index.mjs.map +1 -1
- package/dist/{openapi-Cfwi0fqF.mjs → openapi-CgpMWMmM.mjs} +174 -95
- package/dist/openapi-CgpMWMmM.mjs.map +1 -0
- package/dist/{openapi-BzNOC7_i.cjs → openapi-CljONd_M.cjs} +175 -108
- package/dist/openapi-CljONd_M.cjs.map +1 -0
- package/dist/{openapi-react-query-C4iIvpPf.mjs → openapi-react-query-Byltvm_7.mjs} +2 -2
- package/dist/openapi-react-query-Byltvm_7.mjs.map +1 -0
- package/dist/{openapi-react-query-CYWik72n.cjs → openapi-react-query-CmJ1xDbn.cjs} +2 -2
- package/dist/openapi-react-query-CmJ1xDbn.cjs.map +1 -0
- package/dist/openapi-react-query.cjs +1 -1
- package/dist/openapi-react-query.mjs +1 -1
- package/dist/openapi.cjs +4 -3
- package/dist/openapi.d.cts +1 -1
- package/dist/openapi.d.mts +1 -1
- package/dist/openapi.mjs +4 -3
- package/dist/reconcile/public.cjs +9 -0
- package/dist/reconcile/public.d.cts +125 -0
- package/dist/reconcile/public.d.cts.map +1 -0
- package/dist/reconcile/public.d.mts +125 -0
- package/dist/reconcile/public.d.mts.map +1 -0
- package/dist/reconcile/public.mjs +4 -0
- package/dist/{reconcile-B2FoJE0a.mjs → reconcile-CFs8C_1a.mjs} +5 -4
- package/dist/reconcile-CFs8C_1a.mjs.map +1 -0
- package/dist/{reconcile-BzqKJ2Rt.cjs → reconcile-D0pimNiy.cjs} +5 -4
- package/dist/reconcile-D0pimNiy.cjs.map +1 -0
- package/dist/setup-CJiQM2pX.cjs +473 -0
- package/dist/setup-CJiQM2pX.cjs.map +1 -0
- package/dist/setup-DMtU3p41.cjs +11 -0
- package/dist/setup-DOsYueeQ.mjs +443 -0
- package/dist/setup-DOsYueeQ.mjs.map +1 -0
- package/dist/setup-DSutDAlt.mjs +11 -0
- package/dist/{storage-B1wvztiJ.cjs → storage-BJmzYxt8.cjs} +1 -1
- package/dist/{storage-B1wvztiJ.cjs.map → storage-BJmzYxt8.cjs.map} +1 -1
- package/dist/{storage-DOEtT2Hr.cjs → storage-BM9hGpgv.cjs} +1 -1
- package/dist/{storage-dbb9RyBl.mjs → storage-Bi24WfoW.mjs} +1 -1
- package/dist/{storage-dbb9RyBl.mjs.map → storage-Bi24WfoW.mjs.map} +1 -1
- package/dist/{storage-Cs4WBsc4.mjs → storage-CYlGwWTj.mjs} +1 -1
- package/dist/{sync-CSooqRQ8.mjs → sync-CmEuNZsB.mjs} +2 -2
- package/dist/{sync-CSooqRQ8.mjs.map → sync-CmEuNZsB.mjs.map} +1 -1
- package/dist/sync-D306yOWu.cjs +4 -0
- package/dist/{sync-o_CtEbvR.cjs → sync-SizaChmC.cjs} +2 -2
- package/dist/{sync-o_CtEbvR.cjs.map → sync-SizaChmC.cjs.map} +1 -1
- package/dist/{sync-B5UHXwRM.mjs → sync-hOqAWHR6.mjs} +1 -1
- package/dist/{index-Bw548Bta.d.mts → types-C-arnQ1r.d.mts} +590 -143
- package/dist/types-C-arnQ1r.d.mts.map +1 -0
- package/dist/{index-DTpkeFb8.d.cts → types-abJQuk7m.d.cts} +590 -143
- package/dist/types-abJQuk7m.d.cts.map +1 -0
- package/dist/workspace/index.cjs +5 -1
- package/dist/workspace/index.d.cts +3 -3
- package/dist/workspace/index.d.mts +3 -3
- package/dist/workspace/index.mjs +2 -2
- package/dist/{workspace-D-37Ylqo.mjs → workspace-7FqprxuJ.mjs} +117 -30
- package/dist/workspace-7FqprxuJ.mjs.map +1 -0
- package/dist/workspace-8acupeaI.cjs +9 -0
- package/dist/{workspace-CQTT7HJQ.cjs → workspace-XvqO9jIv.cjs} +139 -28
- package/dist/workspace-XvqO9jIv.cjs.map +1 -0
- package/dist/workspace-yP5AHnrn.mjs +8 -0
- package/package.json +26 -9
- package/CHANGELOG.md +0 -650
- package/FUNCTION_CRON_SUPPORT.md +0 -266
- package/dist/CachedStateProvider-GcGziXh1.mjs +0 -3
- package/dist/HostingerProvider-B2ZYz7Yc.mjs.map +0 -1
- package/dist/HostingerProvider-CrHfsgz9.cjs.map +0 -1
- package/dist/bundler-DkA4qzUD.mjs.map +0 -1
- package/dist/bundler-Dufq3uvI.cjs.map +0 -1
- package/dist/config-Bbu1JKvf.mjs +0 -211
- package/dist/config-Bbu1JKvf.mjs.map +0 -1
- package/dist/config-DujV8DbR.cjs +0 -253
- package/dist/config-DujV8DbR.cjs.map +0 -1
- package/dist/credentials-C8DWtnMY.cjs.map +0 -1
- package/dist/credentials-s1kLcIzK.mjs.map +0 -1
- package/dist/dokploy-api-BPYkG-ZZ.cjs +0 -3
- package/dist/dokploy-api-BiSzWM4v.mjs +0 -3
- package/dist/dokploy-api-CqOIKHme.cjs.map +0 -1
- package/dist/dokploy-api-sfZFlWuE.mjs.map +0 -1
- package/dist/encryption-Bd_m4q3g.mjs +0 -3
- package/dist/fullstack-secrets-BYzi6Hwl.cjs.map +0 -1
- package/dist/fullstack-secrets-l8s3II_H.mjs.map +0 -1
- package/dist/index-Bw548Bta.d.mts.map +0 -1
- package/dist/index-DTpkeFb8.d.cts.map +0 -1
- package/dist/openapi-BzNOC7_i.cjs.map +0 -1
- package/dist/openapi-Cfwi0fqF.mjs.map +0 -1
- package/dist/openapi-react-query-C4iIvpPf.mjs.map +0 -1
- package/dist/openapi-react-query-CYWik72n.cjs.map +0 -1
- package/dist/reconcile-B2FoJE0a.mjs.map +0 -1
- package/dist/reconcile-BzqKJ2Rt.cjs.map +0 -1
- package/dist/setup-DDXUXzzl.mjs +0 -765
- package/dist/setup-DDXUXzzl.mjs.map +0 -1
- package/dist/setup-DLwhfyt-.cjs +0 -8
- package/dist/setup-Dh-B7YTX.mjs +0 -8
- package/dist/setup-WZ-xqAQO.cjs +0 -849
- package/dist/setup-WZ-xqAQO.cjs.map +0 -1
- package/dist/sync-BLA94rgC.cjs +0 -4
- package/dist/types-B3GQUg3k.d.mts +0 -280
- package/dist/types-B3GQUg3k.d.mts.map +0 -1
- package/dist/types-BWQDiooe.d.cts +0 -280
- package/dist/types-BWQDiooe.d.cts.map +0 -1
- package/dist/workspace-CQTT7HJQ.cjs.map +0 -1
- package/dist/workspace-D-37Ylqo.mjs.map +0 -1
- package/docs/OPENAPI_TYPESCRIPT_DESIGN.md +0 -408
- package/docs/dev-server-resilience-design.md +0 -189
- package/docs/manifest-refactor-design.md +0 -287
- package/examples/cron-example.ts +0 -45
- package/examples/env.ts +0 -33
- package/examples/function-example.ts +0 -40
- package/examples/gkm.config.json +0 -22
- package/examples/gkm.config.ts +0 -14
- package/examples/gkm.minimal.config.json +0 -7
- package/examples/gkm.production.config.json +0 -27
- package/examples/logger.ts +0 -10
- package/scripts/sync-versions.ts +0 -108
- package/src/__tests__/EndpointGenerator.hooks.spec.ts +0 -204
- package/src/__tests__/config.spec.ts +0 -422
- package/src/__tests__/loadEnvFiles.spec.ts +0 -131
- package/src/__tests__/normalizeHooksConfig.spec.ts +0 -63
- package/src/__tests__/openapi-react-query.spec.ts +0 -506
- package/src/__tests__/openapi.spec.ts +0 -625
- package/src/__tests__/test-helpers.ts +0 -181
- package/src/auth/__tests__/credentials.spec.ts +0 -331
- package/src/auth/__tests__/index.spec.ts +0 -237
- package/src/auth/credentials.ts +0 -286
- package/src/auth/index.ts +0 -233
- package/src/build/__tests__/bundler.spec.ts +0 -446
- package/src/build/__tests__/endpoint-analyzer.spec.ts +0 -623
- package/src/build/__tests__/handler-templates.spec.ts +0 -1287
- package/src/build/__tests__/index-new.spec.ts +0 -550
- package/src/build/__tests__/manifests.spec.ts +0 -583
- package/src/build/__tests__/partitions.spec.ts +0 -110
- package/src/build/__tests__/workspace-build.spec.ts +0 -215
- package/src/build/bundler.ts +0 -256
- package/src/build/endpoint-analyzer.ts +0 -236
- package/src/build/handler-templates.ts +0 -1253
- package/src/build/index.ts +0 -616
- package/src/build/manifests.ts +0 -285
- package/src/build/partitions.ts +0 -58
- package/src/build/providerResolver.ts +0 -184
- package/src/build/types.ts +0 -104
- package/src/config.ts +0 -330
- package/src/credentials/__tests__/fullDockerPorts.spec.ts +0 -144
- package/src/credentials/__tests__/helpers.ts +0 -112
- package/src/credentials/__tests__/prepareEntryCredentials.spec.ts +0 -125
- package/src/credentials/__tests__/readonlyDockerPorts.spec.ts +0 -190
- package/src/credentials/__tests__/workspaceCredentials.spec.ts +0 -209
- package/src/credentials/index.ts +0 -843
- package/src/debug.ts +0 -68
- package/src/deploy/CachedStateProvider.ts +0 -86
- package/src/deploy/LocalStateProvider.ts +0 -57
- package/src/deploy/SSMStateProvider.ts +0 -117
- package/src/deploy/StateProvider.ts +0 -175
- package/src/deploy/__tests__/CachedStateProvider.spec.ts +0 -235
- package/src/deploy/__tests__/HostingerProvider.spec.ts +0 -347
- package/src/deploy/__tests__/LocalStateProvider.spec.ts +0 -130
- package/src/deploy/__tests__/Route53Provider.spec.ts +0 -425
- package/src/deploy/__tests__/SSMStateProvider.spec.ts +0 -201
- package/src/deploy/__tests__/__fixtures__/entry-apps/async-entry.ts +0 -24
- package/src/deploy/__tests__/__fixtures__/entry-apps/nested-config-entry.ts +0 -24
- package/src/deploy/__tests__/__fixtures__/entry-apps/no-env-entry.ts +0 -12
- package/src/deploy/__tests__/__fixtures__/entry-apps/simple-entry.ts +0 -14
- package/src/deploy/__tests__/__fixtures__/entry-apps/throwing-entry.ts +0 -16
- package/src/deploy/__tests__/__fixtures__/env-parsers/non-function-export.ts +0 -10
- package/src/deploy/__tests__/__fixtures__/env-parsers/optional-env-parser.ts +0 -21
- package/src/deploy/__tests__/__fixtures__/env-parsers/parseable-env-parser.ts +0 -18
- package/src/deploy/__tests__/__fixtures__/env-parsers/throwing-env-parser.ts +0 -16
- package/src/deploy/__tests__/__fixtures__/env-parsers/valid-env-parser.ts +0 -16
- package/src/deploy/__tests__/__fixtures__/route-apps/endpoints/auth.ts +0 -16
- package/src/deploy/__tests__/__fixtures__/route-apps/endpoints/health.ts +0 -13
- package/src/deploy/__tests__/__fixtures__/route-apps/endpoints/users.ts +0 -15
- package/src/deploy/__tests__/__fixtures__/route-apps/services.ts +0 -55
- package/src/deploy/__tests__/backup-provisioner.spec.ts +0 -428
- package/src/deploy/__tests__/createDnsProvider.spec.ts +0 -195
- package/src/deploy/__tests__/createStateProvider.spec.ts +0 -126
- package/src/deploy/__tests__/dns-orchestration.spec.ts +0 -192
- package/src/deploy/__tests__/dns-verification.spec.ts +0 -229
- package/src/deploy/__tests__/docker.spec.ts +0 -149
- package/src/deploy/__tests__/dokploy-api.spec.ts +0 -697
- package/src/deploy/__tests__/dokploy.spec.ts +0 -435
- package/src/deploy/__tests__/domain.spec.ts +0 -235
- package/src/deploy/__tests__/env-resolver.spec.ts +0 -903
- package/src/deploy/__tests__/index.spec.ts +0 -1091
- package/src/deploy/__tests__/init.spec.ts +0 -793
- package/src/deploy/__tests__/secrets.spec.ts +0 -303
- package/src/deploy/__tests__/sniffer.spec.ts +0 -838
- package/src/deploy/__tests__/state-e2e.spec.ts +0 -387
- package/src/deploy/__tests__/state.spec.ts +0 -876
- package/src/deploy/__tests__/undeploy.spec.ts +0 -758
- package/src/deploy/backup-provisioner.ts +0 -316
- package/src/deploy/dns/DnsProvider.ts +0 -201
- package/src/deploy/dns/HostingerProvider.ts +0 -174
- package/src/deploy/dns/Route53Provider.ts +0 -340
- package/src/deploy/dns/hostinger-api.ts +0 -261
- package/src/deploy/dns/index.ts +0 -627
- package/src/deploy/docker.ts +0 -260
- package/src/deploy/dokploy-api.ts +0 -1101
- package/src/deploy/dokploy.ts +0 -177
- package/src/deploy/domain.ts +0 -134
- package/src/deploy/env-resolver.ts +0 -305
- package/src/deploy/index.ts +0 -2094
- package/src/deploy/init.ts +0 -427
- package/src/deploy/secrets.ts +0 -187
- package/src/deploy/sniffer-envkit-patch.ts +0 -61
- package/src/deploy/sniffer-hooks.ts +0 -57
- package/src/deploy/sniffer-loader.ts +0 -28
- package/src/deploy/sniffer-routes-worker.ts +0 -104
- package/src/deploy/sniffer-worker.ts +0 -75
- package/src/deploy/sniffer.ts +0 -578
- package/src/deploy/state-commands.ts +0 -274
- package/src/deploy/state.ts +0 -482
- package/src/deploy/types.ts +0 -102
- package/src/deploy/undeploy.ts +0 -407
- package/src/dev/__tests__/entry-integration.spec.ts +0 -347
- package/src/dev/__tests__/entry.spec.ts +0 -144
- package/src/dev/__tests__/index.spec.ts +0 -2084
- package/src/dev/index.ts +0 -1649
- package/src/docker/__tests__/compose.spec.ts +0 -1142
- package/src/docker/__tests__/templates.spec.ts +0 -694
- package/src/docker/compose.ts +0 -808
- package/src/docker/index.ts +0 -523
- package/src/docker/templates.ts +0 -1067
- package/src/exec/index.ts +0 -118
- package/src/generators/CronGenerator.ts +0 -105
- package/src/generators/EndpointGenerator.ts +0 -954
- package/src/generators/FunctionGenerator.ts +0 -117
- package/src/generators/Generator.ts +0 -147
- package/src/generators/OpenApiTsGenerator.ts +0 -821
- package/src/generators/QueueGenerator.ts +0 -245
- package/src/generators/SubscriberGenerator.ts +0 -282
- package/src/generators/TopicGenerator.ts +0 -45
- package/src/generators/__tests__/CronGenerator.spec.ts +0 -445
- package/src/generators/__tests__/EndpointGenerator.spec.ts +0 -544
- package/src/generators/__tests__/FunctionGenerator.spec.ts +0 -256
- package/src/generators/__tests__/Generator.bustCache.spec.ts +0 -72
- package/src/generators/__tests__/OpenApiTsGenerator.registry.spec.ts +0 -98
- package/src/generators/__tests__/OpenApiTsGenerator.responseType.spec.ts +0 -56
- package/src/generators/__tests__/QueueGenerator.spec.ts +0 -141
- package/src/generators/__tests__/SubscriberGenerator.spec.ts +0 -410
- package/src/generators/index.ts +0 -11
- package/src/index.ts +0 -972
- package/src/init/__tests__/generators.spec.ts +0 -1070
- package/src/init/__tests__/init.spec.ts +0 -577
- package/src/init/__tests__/utils.spec.ts +0 -104
- package/src/init/generators/auth.ts +0 -225
- package/src/init/generators/config.ts +0 -316
- package/src/init/generators/docker.ts +0 -388
- package/src/init/generators/env.ts +0 -62
- package/src/init/generators/index.ts +0 -6
- package/src/init/generators/mobile-expo.ts +0 -576
- package/src/init/generators/models.ts +0 -153
- package/src/init/generators/monorepo.ts +0 -475
- package/src/init/generators/package.ts +0 -95
- package/src/init/generators/source.ts +0 -15
- package/src/init/generators/test.ts +0 -178
- package/src/init/generators/ui.ts +0 -1473
- package/src/init/generators/web-tanstack.ts +0 -348
- package/src/init/generators/web.ts +0 -363
- package/src/init/index.ts +0 -542
- package/src/init/templates/api.ts +0 -404
- package/src/init/templates/index.ts +0 -342
- package/src/init/templates/minimal.ts +0 -207
- package/src/init/templates/serverless.ts +0 -148
- package/src/init/templates/worker.ts +0 -216
- package/src/init/utils.ts +0 -197
- package/src/init/versions.ts +0 -52
- package/src/openapi-react-query.ts +0 -288
- package/src/openapi.ts +0 -259
- package/src/secrets/__tests__/encryption.spec.ts +0 -226
- package/src/secrets/__tests__/generator.spec.ts +0 -575
- package/src/secrets/__tests__/index.spec.ts +0 -91
- package/src/secrets/__tests__/reconcile.spec.ts +0 -123
- package/src/secrets/__tests__/storage.spec.ts +0 -645
- package/src/secrets/encryption.ts +0 -91
- package/src/secrets/generator.ts +0 -329
- package/src/secrets/index.ts +0 -417
- package/src/secrets/keystore.ts +0 -144
- package/src/secrets/reconcile.ts +0 -53
- package/src/secrets/storage.ts +0 -337
- package/src/secrets/sync.ts +0 -136
- package/src/secrets/types.ts +0 -70
- package/src/setup/__tests__/auto-setup.spec.ts +0 -147
- package/src/setup/__tests__/reconcile-secrets.spec.ts +0 -439
- package/src/setup/fullstack-secrets.ts +0 -140
- package/src/setup/index.ts +0 -411
- package/src/test/__tests__/__fixtures__/workspace.ts +0 -104
- package/src/test/__tests__/api.spec.ts +0 -199
- package/src/test/__tests__/auth.spec.ts +0 -162
- package/src/test/__tests__/index.spec.ts +0 -502
- package/src/test/__tests__/web.spec.ts +0 -210
- package/src/test/index.ts +0 -198
- package/src/types.ts +0 -363
- package/src/upgrade/__tests__/index.spec.ts +0 -354
- package/src/upgrade/index.ts +0 -253
- package/src/workspace/__tests__/client-generator.spec.ts +0 -326
- package/src/workspace/__tests__/index.spec.ts +0 -766
- package/src/workspace/__tests__/publicEnv.spec.ts +0 -64
- package/src/workspace/__tests__/schema.spec.ts +0 -737
- package/src/workspace/__tests__/type-inference.spec.ts +0 -251
- package/src/workspace/client-generator.ts +0 -109
- package/src/workspace/index.ts +0 -433
- package/src/workspace/publicEnv.ts +0 -57
- package/src/workspace/schema.ts +0 -861
- package/src/workspace/types.ts +0 -943
- package/tsconfig.json +0 -9
- package/tsdown.config.ts +0 -22
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ConstructManifest } from "@geekmidas/manifest";
|
|
2
2
|
import { z } from "zod/v4";
|
|
3
3
|
|
|
4
4
|
//#region src/deploy/state.d.ts
|
|
@@ -227,7 +227,28 @@ type FrontendFramework = z.infer<typeof FrontendFrameworkSchema>;
|
|
|
227
227
|
/**
|
|
228
228
|
* Mobile framework schema.
|
|
229
229
|
*/
|
|
230
|
-
|
|
230
|
+
declare const MobileFrameworkSchema: z.ZodEnum<{
|
|
231
|
+
expo: "expo";
|
|
232
|
+
}>;
|
|
233
|
+
/**
|
|
234
|
+
* Mobile framework types. Derived from {@link MobileFrameworkSchema}.
|
|
235
|
+
*
|
|
236
|
+
* Mobile apps deploy via their own toolchain (e.g. EAS Build for Expo)
|
|
237
|
+
* rather than Docker/Dokploy. Only build-time public env vars
|
|
238
|
+
* (e.g. `EXPO_PUBLIC_*`) reach the device — server secrets are dropped.
|
|
239
|
+
*
|
|
240
|
+
* @example
|
|
241
|
+
* ```ts
|
|
242
|
+
* {
|
|
243
|
+
* type: 'mobile',
|
|
244
|
+
* framework: 'expo',
|
|
245
|
+
* path: 'apps/mobile',
|
|
246
|
+
* port: 8081,
|
|
247
|
+
* dependencies: ['api'],
|
|
248
|
+
* }
|
|
249
|
+
* ```
|
|
250
|
+
*/
|
|
251
|
+
type MobileFramework = z.infer<typeof MobileFrameworkSchema>;
|
|
231
252
|
/**
|
|
232
253
|
* Combined framework schema (backend, frontend, or mobile).
|
|
233
254
|
*/
|
|
@@ -436,7 +457,11 @@ type BackupsConfig = z.infer<typeof BackupsConfigSchema>;
|
|
|
436
457
|
*/
|
|
437
458
|
declare const WorkspaceConfigSchema: z.ZodObject<{
|
|
438
459
|
name: z.ZodOptional<z.ZodString>;
|
|
439
|
-
|
|
460
|
+
constructs: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodObject<{
|
|
461
|
+
paths: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
462
|
+
partition: z.ZodCustom<(filepath: string) => string, (filepath: string) => string>;
|
|
463
|
+
}, z.core.$strip>]>>;
|
|
464
|
+
apps: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
440
465
|
type: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
441
466
|
backend: "backend";
|
|
442
467
|
web: "web";
|
|
@@ -450,6 +475,10 @@ declare const WorkspaceConfigSchema: z.ZodObject<{
|
|
|
450
475
|
vercel: "vercel";
|
|
451
476
|
cloudflare: "cloudflare";
|
|
452
477
|
}>>;
|
|
478
|
+
constructs: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodObject<{
|
|
479
|
+
paths: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
480
|
+
partition: z.ZodCustom<(filepath: string) => string, (filepath: string) => string>;
|
|
481
|
+
}, z.core.$strip>]>>;
|
|
453
482
|
routes: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodObject<{
|
|
454
483
|
paths: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
455
484
|
partition: z.ZodCustom<(filepath: string) => string, (filepath: string) => string>;
|
|
@@ -462,6 +491,14 @@ declare const WorkspaceConfigSchema: z.ZodObject<{
|
|
|
462
491
|
paths: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
463
492
|
partition: z.ZodCustom<(filepath: string) => string, (filepath: string) => string>;
|
|
464
493
|
}, z.core.$strip>]>>;
|
|
494
|
+
queues: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodObject<{
|
|
495
|
+
paths: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
496
|
+
partition: z.ZodCustom<(filepath: string) => string, (filepath: string) => string>;
|
|
497
|
+
}, z.core.$strip>]>>;
|
|
498
|
+
topics: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodObject<{
|
|
499
|
+
paths: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
500
|
+
partition: z.ZodCustom<(filepath: string) => string, (filepath: string) => string>;
|
|
501
|
+
}, z.core.$strip>]>>;
|
|
465
502
|
subscribers: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodObject<{
|
|
466
503
|
paths: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
467
504
|
partition: z.ZodCustom<(filepath: string) => string, (filepath: string) => string>;
|
|
@@ -514,7 +551,7 @@ declare const WorkspaceConfigSchema: z.ZodObject<{
|
|
|
514
551
|
client: z.ZodOptional<z.ZodString>;
|
|
515
552
|
server: z.ZodOptional<z.ZodString>;
|
|
516
553
|
}, z.core.$strip>>;
|
|
517
|
-
}, z.core.$strip
|
|
554
|
+
}, z.core.$strip>>>;
|
|
518
555
|
shared: z.ZodOptional<z.ZodObject<{
|
|
519
556
|
packages: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
520
557
|
models: z.ZodOptional<z.ZodObject<{
|
|
@@ -693,7 +730,11 @@ declare const WorkspaceConfigSchema: z.ZodObject<{
|
|
|
693
730
|
cache: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
694
731
|
version: z.ZodOptional<z.ZodString>;
|
|
695
732
|
image: z.ZodOptional<z.ZodString>;
|
|
696
|
-
}, z.core.$strip
|
|
733
|
+
}, z.core.$strip>, z.ZodEnum<{
|
|
734
|
+
upstash: "upstash";
|
|
735
|
+
elasticache: "elasticache";
|
|
736
|
+
db: "db";
|
|
737
|
+
}>]>>;
|
|
697
738
|
mail: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
698
739
|
version: z.ZodOptional<z.ZodString>;
|
|
699
740
|
image: z.ZodOptional<z.ZodString>;
|
|
@@ -703,7 +744,25 @@ declare const WorkspaceConfigSchema: z.ZodObject<{
|
|
|
703
744
|
user: z.ZodOptional<z.ZodString>;
|
|
704
745
|
pass: z.ZodOptional<z.ZodString>;
|
|
705
746
|
}, z.core.$strip>>;
|
|
706
|
-
}, z.core.$strip
|
|
747
|
+
}, z.core.$strip>, z.ZodEnum<{
|
|
748
|
+
resend: "resend";
|
|
749
|
+
ses: "ses";
|
|
750
|
+
smtp: "smtp";
|
|
751
|
+
}>]>>;
|
|
752
|
+
storage: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
753
|
+
version: z.ZodOptional<z.ZodString>;
|
|
754
|
+
image: z.ZodOptional<z.ZodString>;
|
|
755
|
+
}, z.core.$strip>, z.ZodEnum<{
|
|
756
|
+
minio: "minio";
|
|
757
|
+
s3: "s3";
|
|
758
|
+
r2: "r2";
|
|
759
|
+
}>]>>;
|
|
760
|
+
events: z.ZodOptional<z.ZodEnum<{
|
|
761
|
+
pgboss: "pgboss";
|
|
762
|
+
sns: "sns";
|
|
763
|
+
rabbitmq: "rabbitmq";
|
|
764
|
+
}>>;
|
|
765
|
+
trustLocalCa: z.ZodOptional<z.ZodBoolean>;
|
|
707
766
|
}, z.core.$strip>>;
|
|
708
767
|
secrets: z.ZodOptional<z.ZodObject<{
|
|
709
768
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -882,16 +941,62 @@ interface MailServiceConfig extends ServiceImageConfig {
|
|
|
882
941
|
* ```
|
|
883
942
|
*/
|
|
884
943
|
interface ServicesConfig {
|
|
885
|
-
/**
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
944
|
+
/**
|
|
945
|
+
* Whether to install the local edge's certificate authority automatically.
|
|
946
|
+
*
|
|
947
|
+
* A declared `file-server` answers on `https://` locally, which needs a
|
|
948
|
+
* certificate, which needs an authority this machine trusts. Everything gkm
|
|
949
|
+
* starts trusts it already — reconcile injects `NODE_EXTRA_CA_CERTS` — but a
|
|
950
|
+
* *browser* asks the operating system, and until the root is in its store a
|
|
951
|
+
* local address reads as "not secure".
|
|
952
|
+
*
|
|
953
|
+
* Installing it needs `sudo`, so it is never silent by default:
|
|
954
|
+
*
|
|
955
|
+
* - unset — `gkm setup` asks once, on a machine that does not trust it yet,
|
|
956
|
+
* and remembers a "no" so it stops asking.
|
|
957
|
+
* - `true` — install without asking. For a team that has decided, and for
|
|
958
|
+
* any machine where a prompt has nobody to answer it.
|
|
959
|
+
* - `false` — never. Correct for CI, and for anyone who only ever reaches
|
|
960
|
+
* these addresses from code, which trusts the root without any of this.
|
|
961
|
+
*/
|
|
962
|
+
trustLocalCa?: boolean;
|
|
963
|
+
/**
|
|
964
|
+
* Where a declared cache lives — `'upstash'`, `'elasticache'` or `'db'`.
|
|
965
|
+
*
|
|
966
|
+
* A backend name and nothing else. Whether there *is* a cache comes from the
|
|
967
|
+
* manifest: declaring one implies its container the way declaring a database
|
|
968
|
+
* implies Postgres, so this only ever answers the second question.
|
|
969
|
+
*
|
|
970
|
+
* Defaults by target — see `DEFAULT_CACHE`.
|
|
971
|
+
*/
|
|
972
|
+
cache?: CacheBackend;
|
|
973
|
+
/**
|
|
974
|
+
* Who delivers a declared app's mail — `'ses'`, `'resend'` or `'smtp'`.
|
|
975
|
+
*
|
|
976
|
+
* Locally every one of them is Mailpit, because every one speaks SMTP.
|
|
977
|
+
*/
|
|
978
|
+
mail?: EmailBackend;
|
|
979
|
+
/** Where a declared bucket lives — `'minio'`, `'s3'` or `'r2'`. */
|
|
980
|
+
storage?: StorageBackend;
|
|
981
|
+
/** What carries a declared queue or topic — pgboss, sns or rabbitmq. */
|
|
894
982
|
events?: EventsBackend;
|
|
983
|
+
/**
|
|
984
|
+
* Image pins for the containers the manifest derives.
|
|
985
|
+
*
|
|
986
|
+
* Separate from the backend names above, because they answer unrelated
|
|
987
|
+
* questions: a backend says where a thing lives, a pin says which image runs
|
|
988
|
+
* locally. They shared one key until `cache: true` meant "start a Redis" —
|
|
989
|
+
* which was the last way a container could exist because config asked for
|
|
990
|
+
* it rather than because something declared it.
|
|
991
|
+
*
|
|
992
|
+
* ```ts
|
|
993
|
+
* services: { cache: 'elasticache', images: { redis: 'redis:6-alpine' } }
|
|
994
|
+
* ```
|
|
995
|
+
*
|
|
996
|
+
* Pinning an image for a container nothing declares is a no-op, not an
|
|
997
|
+
* error: it says which image *would* run, and nothing runs.
|
|
998
|
+
*/
|
|
999
|
+
images?: Partial<Record<ComposeServiceName, string>>;
|
|
895
1000
|
}
|
|
896
1001
|
/**
|
|
897
1002
|
* Stage-based domain configuration.
|
|
@@ -1163,6 +1268,16 @@ interface AppConfigBase {
|
|
|
1163
1268
|
* @example 'dokploy', 'vercel'
|
|
1164
1269
|
*/
|
|
1165
1270
|
deploy?: DeployTarget;
|
|
1271
|
+
/**
|
|
1272
|
+
* Constructs glob pattern — one glob, every kind.
|
|
1273
|
+
*
|
|
1274
|
+
* A glob per kind cannot find a resource, because a declared `ObjectStorage`
|
|
1275
|
+
* has no kind to be listed under. This one is what reconcile reads to derive
|
|
1276
|
+
* the containers a stage needs, and it replaces the per-kind globs below.
|
|
1277
|
+
*
|
|
1278
|
+
* @example './src/**\/*.ts'
|
|
1279
|
+
*/
|
|
1280
|
+
constructs?: Routes;
|
|
1166
1281
|
/**
|
|
1167
1282
|
* Routes glob pattern for gkm endpoints.
|
|
1168
1283
|
* @example './src/endpoints/**\/*.ts'
|
|
@@ -1178,6 +1293,16 @@ interface AppConfigBase {
|
|
|
1178
1293
|
* @example './src/crons/**\/*.ts'
|
|
1179
1294
|
*/
|
|
1180
1295
|
crons?: Routes;
|
|
1296
|
+
/**
|
|
1297
|
+
* Queues glob pattern for point-to-point workers.
|
|
1298
|
+
* @example './src/queues/**\/*.ts'
|
|
1299
|
+
*/
|
|
1300
|
+
queues?: Routes;
|
|
1301
|
+
/**
|
|
1302
|
+
* Topics glob pattern for the topics subscribers bind to.
|
|
1303
|
+
* @example './src/topics/**\/*.ts'
|
|
1304
|
+
*/
|
|
1305
|
+
topics?: Routes;
|
|
1181
1306
|
/**
|
|
1182
1307
|
* Subscribers glob pattern for event handlers.
|
|
1183
1308
|
* @example './src/subscribers/**\/*.ts'
|
|
@@ -1388,10 +1513,23 @@ type ConstrainedApps<TApps extends AppsRecord> = { [K in keyof TApps]: Omit<TApp
|
|
|
1388
1513
|
* ```
|
|
1389
1514
|
*/
|
|
1390
1515
|
type WorkspaceInput<TApps extends AppsRecord> = {
|
|
1516
|
+
/**
|
|
1517
|
+
* Where the workspace's own constructs live, relative to its root.
|
|
1518
|
+
*
|
|
1519
|
+
* The product's infrastructure, declared once for every app that consumes
|
|
1520
|
+
* it. Additive with an app's own glob rather than replacing it.
|
|
1521
|
+
*/
|
|
1522
|
+
constructs?: Routes;
|
|
1391
1523
|
/** Workspace name (defaults to root package.json name) */
|
|
1392
1524
|
name?: string;
|
|
1393
|
-
/**
|
|
1394
|
-
|
|
1525
|
+
/**
|
|
1526
|
+
* Apps that nothing declares.
|
|
1527
|
+
*
|
|
1528
|
+
* Normally absent: a `site` is an app and so is a `rest-api` that named
|
|
1529
|
+
* one, so the list is read off the graph. This is the escape hatch for what
|
|
1530
|
+
* no construct describes.
|
|
1531
|
+
*/
|
|
1532
|
+
apps?: ConstrainedApps<TApps>;
|
|
1395
1533
|
/** Shared packages configuration */
|
|
1396
1534
|
shared?: SharedConfig;
|
|
1397
1535
|
/** Deployment configuration */
|
|
@@ -1411,8 +1549,15 @@ type InferAppNames<TApps extends AppsRecord> = keyof TApps & string;
|
|
|
1411
1549
|
* Inferred workspace config with proper app name types.
|
|
1412
1550
|
*/
|
|
1413
1551
|
type InferredWorkspaceConfig<TApps extends AppsRecord> = {
|
|
1552
|
+
/**
|
|
1553
|
+
* Where the workspace's own constructs live, relative to its root.
|
|
1554
|
+
*
|
|
1555
|
+
* The product's infrastructure, declared once for every app that consumes
|
|
1556
|
+
* it. Additive with an app's own glob rather than replacing it.
|
|
1557
|
+
*/
|
|
1558
|
+
constructs?: Routes;
|
|
1414
1559
|
name?: string;
|
|
1415
|
-
apps
|
|
1560
|
+
apps?: { [K in keyof TApps]: Omit<TApps[K], 'dependencies'> & {
|
|
1416
1561
|
dependencies?: InferAppNames<TApps>[];
|
|
1417
1562
|
} };
|
|
1418
1563
|
shared?: SharedConfig;
|
|
@@ -1499,10 +1644,17 @@ type InferredWorkspaceConfig<TApps extends AppsRecord> = {
|
|
|
1499
1644
|
* @deprecated Use WorkspaceInput with defineWorkspace for type inference
|
|
1500
1645
|
*/
|
|
1501
1646
|
interface WorkspaceConfig {
|
|
1647
|
+
/**
|
|
1648
|
+
* Where the workspace's own constructs live, relative to its root.
|
|
1649
|
+
*
|
|
1650
|
+
* The product's infrastructure, declared once for every app that consumes
|
|
1651
|
+
* it. Additive with an app's own glob rather than replacing it.
|
|
1652
|
+
*/
|
|
1653
|
+
constructs?: Routes;
|
|
1502
1654
|
/** Workspace name (defaults to root package.json name) */
|
|
1503
1655
|
name?: string;
|
|
1504
|
-
/**
|
|
1505
|
-
apps
|
|
1656
|
+
/** Apps that nothing declares. Normally absent — see `WorkspaceInput`. */
|
|
1657
|
+
apps?: Record<string, AppConfig>;
|
|
1506
1658
|
/** Shared packages configuration */
|
|
1507
1659
|
shared?: SharedConfig;
|
|
1508
1660
|
/** Default deployment configuration */
|
|
@@ -1521,6 +1673,14 @@ interface WorkspaceConfig {
|
|
|
1521
1673
|
* All optional fields have been resolved to their defaults.
|
|
1522
1674
|
*/
|
|
1523
1675
|
interface NormalizedAppConfig extends Omit<AppConfigBase, 'type'> {
|
|
1676
|
+
/**
|
|
1677
|
+
* Whether the base domain points at this site.
|
|
1678
|
+
*
|
|
1679
|
+
* Carried from the `site` declaration rather than configured, because which
|
|
1680
|
+
* site is primary is structural — its *hostname* is what varies by stage,
|
|
1681
|
+
* and that is `domain`.
|
|
1682
|
+
*/
|
|
1683
|
+
root?: boolean;
|
|
1524
1684
|
/** App type (always defined after normalization) */
|
|
1525
1685
|
type: 'backend' | 'web' | 'mobile';
|
|
1526
1686
|
/** Path to the app */
|
|
@@ -1551,6 +1711,13 @@ interface NormalizedWorkspace {
|
|
|
1551
1711
|
name: string;
|
|
1552
1712
|
/** Absolute path to workspace root */
|
|
1553
1713
|
root: string;
|
|
1714
|
+
/**
|
|
1715
|
+
* The workspace's own constructs glob, relative to `root`.
|
|
1716
|
+
*
|
|
1717
|
+
* Where the product's shared infrastructure is declared. Additive with each
|
|
1718
|
+
* app's glob, so an app can still declare something only it uses.
|
|
1719
|
+
*/
|
|
1720
|
+
constructs?: Routes;
|
|
1554
1721
|
/** Normalized app configurations */
|
|
1555
1722
|
apps: Record<string, NormalizedAppConfig>;
|
|
1556
1723
|
/** Services configuration (empty object if not specified) */
|
|
@@ -1574,6 +1741,14 @@ interface LoadedConfig {
|
|
|
1574
1741
|
raw: GkmConfig | WorkspaceConfig;
|
|
1575
1742
|
/** Normalized workspace (always available) */
|
|
1576
1743
|
workspace: NormalizedWorkspace;
|
|
1744
|
+
/**
|
|
1745
|
+
* What the workspace's constructs declared, when it has any.
|
|
1746
|
+
*
|
|
1747
|
+
* Read once at load, because the apps above are derived from it and a
|
|
1748
|
+
* caller that re-discovers would be answering the same question twice with
|
|
1749
|
+
* two chances to disagree. Absent when the workspace declares no constructs.
|
|
1750
|
+
*/
|
|
1751
|
+
manifest?: ConstructManifest;
|
|
1577
1752
|
}
|
|
1578
1753
|
/**
|
|
1579
1754
|
* Type guard to check if a config is a WorkspaceConfig.
|
|
@@ -1590,148 +1765,420 @@ interface LoadedConfig {
|
|
|
1590
1765
|
declare function isWorkspaceConfig(config: GkmConfig | WorkspaceConfig): config is WorkspaceConfig;
|
|
1591
1766
|
//# sourceMappingURL=types.d.ts.map
|
|
1592
1767
|
//#endregion
|
|
1593
|
-
//#region src/
|
|
1768
|
+
//#region src/types.d.ts
|
|
1769
|
+
interface PartitionedRoutes {
|
|
1770
|
+
paths: string | string[];
|
|
1771
|
+
partition: (filepath: string) => string;
|
|
1772
|
+
}
|
|
1773
|
+
type Routes = string | string[] | PartitionedRoutes;
|
|
1774
|
+
interface ProviderConfig {
|
|
1775
|
+
enabled?: boolean;
|
|
1776
|
+
outputDir?: string;
|
|
1777
|
+
}
|
|
1778
|
+
interface AWSApiGatewayConfig extends ProviderConfig {}
|
|
1779
|
+
interface AWSLambdaConfig extends ProviderConfig {}
|
|
1780
|
+
interface ProductionConfig {
|
|
1781
|
+
/** Enable production mode (default: false) */
|
|
1782
|
+
enabled?: boolean;
|
|
1783
|
+
/** Bundle server into single file (default: true) */
|
|
1784
|
+
bundle?: boolean;
|
|
1785
|
+
/** Minify bundled output (default: true) */
|
|
1786
|
+
minify?: boolean;
|
|
1787
|
+
/** Health check endpoint path (default: '/health') */
|
|
1788
|
+
healthCheck?: string;
|
|
1789
|
+
/** Enable graceful shutdown handling (default: true) */
|
|
1790
|
+
gracefulShutdown?: boolean;
|
|
1791
|
+
/** Packages to exclude from bundling (default: []) */
|
|
1792
|
+
external?: string[];
|
|
1793
|
+
/** Include subscribers in production build (default: 'exclude' for serverless) */
|
|
1794
|
+
subscribers?: 'include' | 'exclude';
|
|
1795
|
+
/** Include OpenAPI spec in production (default: false) */
|
|
1796
|
+
openapi?: boolean;
|
|
1797
|
+
/**
|
|
1798
|
+
* Enable build-time optimized handler generation (default: true)
|
|
1799
|
+
* Generates specialized handlers based on endpoint tier:
|
|
1800
|
+
* - minimal: Near-raw-Hono performance for simple endpoints
|
|
1801
|
+
* - standard: Optimized handlers for auth/services
|
|
1802
|
+
* - full: Uses HonoEndpoint.addRoutes for complex endpoints
|
|
1803
|
+
*/
|
|
1804
|
+
optimizedHandlers?: boolean;
|
|
1805
|
+
}
|
|
1806
|
+
/** Service-specific configuration for docker-compose */
|
|
1807
|
+
interface ServiceConfig {
|
|
1808
|
+
/**
|
|
1809
|
+
* Full Docker image reference (e.g., 'postgis/postgis:16-3.4-alpine').
|
|
1810
|
+
* When specified, overrides the default image entirely.
|
|
1811
|
+
*/
|
|
1812
|
+
image?: string;
|
|
1813
|
+
/**
|
|
1814
|
+
* Docker image version/tag (e.g., '15-alpine' for postgres).
|
|
1815
|
+
* Only used when `image` is not specified.
|
|
1816
|
+
*/
|
|
1817
|
+
version?: string;
|
|
1818
|
+
}
|
|
1594
1819
|
/**
|
|
1595
|
-
*
|
|
1820
|
+
* Supported event backend types.
|
|
1596
1821
|
*
|
|
1597
|
-
*
|
|
1598
|
-
*
|
|
1599
|
-
*
|
|
1822
|
+
* - `pgboss`: Reuses PostgreSQL with a dedicated user/schema. Auto-enables db service.
|
|
1823
|
+
* - `sns`: Adds LocalStack container with SNS+SQS services.
|
|
1824
|
+
* - `rabbitmq`: Adds RabbitMQ container.
|
|
1825
|
+
*
|
|
1826
|
+
* All backends generate EVENT_PUBLISHER_CONNECTION_STRING and EVENT_SUBSCRIBER_CONNECTION_STRING.
|
|
1600
1827
|
*/
|
|
1601
|
-
|
|
1828
|
+
type EventsBackend = 'pgboss' | 'sns' | 'rabbitmq';
|
|
1602
1829
|
/**
|
|
1603
|
-
*
|
|
1604
|
-
* inlines into client code at build time:
|
|
1830
|
+
* Where a declared cache actually lives.
|
|
1605
1831
|
*
|
|
1606
|
-
*
|
|
1607
|
-
*
|
|
1608
|
-
*
|
|
1609
|
-
*
|
|
1610
|
-
*
|
|
1832
|
+
* A deployment choice, not an application one — the same code caches into any
|
|
1833
|
+
* of these — so it is config here beside `events` rather than a field on the
|
|
1834
|
+
* construct. Each backend is consistent between local and deployed, which is
|
|
1835
|
+
* the property worth having: a cache that behaves differently in the two places
|
|
1836
|
+
* is worse than a slower one.
|
|
1611
1837
|
*
|
|
1612
|
-
*
|
|
1613
|
-
*
|
|
1614
|
-
*
|
|
1838
|
+
* - `upstash` (default) — HTTP with a token. Reachable from a Lambda with no
|
|
1839
|
+
* VPC and no connection pool, which is why it is the default; locally the
|
|
1840
|
+
* `serverless-redis-http` proxy in front of Redis speaks the same protocol.
|
|
1841
|
+
* - `elasticache` — the Redis wire protocol, inside a VPC. Locally, plain Redis.
|
|
1842
|
+
* - `db` — a table in the database the app already declared. No infrastructure
|
|
1843
|
+
* at all, and the same relationship pg-boss has to Postgres: it creates its
|
|
1844
|
+
* own table on first use and needs a declared database to live in.
|
|
1615
1845
|
*/
|
|
1616
|
-
|
|
1846
|
+
type CacheBackend = 'upstash' | 'elasticache' | 'db';
|
|
1617
1847
|
/**
|
|
1618
|
-
*
|
|
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.
|
|
1848
|
+
* Where a declared bucket actually lives.
|
|
1628
1849
|
*
|
|
1629
|
-
*
|
|
1630
|
-
*
|
|
1631
|
-
*
|
|
1632
|
-
*
|
|
1850
|
+
* The fourth of these selectors and the last to arrive, which is why
|
|
1851
|
+
* `UPLOADS_URL` had no answer on a container target: there was nothing to
|
|
1852
|
+
* choose with. Like the others it changes no application code — the `s3://`
|
|
1853
|
+
* scheme picks the driver, and every one of these speaks it.
|
|
1633
1854
|
*
|
|
1634
|
-
*
|
|
1635
|
-
*
|
|
1636
|
-
*
|
|
1637
|
-
*
|
|
1638
|
-
*
|
|
1639
|
-
*
|
|
1640
|
-
*
|
|
1641
|
-
*
|
|
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.
|
|
1855
|
+
* - `s3` — a real bucket. Nothing is created on the host; the URL is composed
|
|
1856
|
+
* against credentials you already hold, the same way `resend` is an API key
|
|
1857
|
+
* rather than infrastructure.
|
|
1858
|
+
* - `r2` — Cloudflare's, reached through the same S3 API and differing only in
|
|
1859
|
+
* its endpoint.
|
|
1860
|
+
* - `minio` — a container. Everything the app declares lives on the box, which
|
|
1861
|
+
* is what makes a single-host deploy self-contained, and what makes it a
|
|
1862
|
+
* single disk with no replication. Locally this is what every backend is.
|
|
1691
1863
|
*/
|
|
1692
|
-
|
|
1864
|
+
type StorageBackend = 'minio' | 's3' | 'r2';
|
|
1693
1865
|
/**
|
|
1694
|
-
*
|
|
1866
|
+
* The backend a project gets when it says nothing, by where it deploys.
|
|
1867
|
+
*
|
|
1868
|
+
* Flat defaults could not be right for both: `upstash` on a single box means a
|
|
1869
|
+
* SaaS round-trip for a cache the database could have held, and `minio` on AWS
|
|
1870
|
+
* means running a bucket beside S3. So the default is a function of the target,
|
|
1871
|
+
* and an app that says nothing gets the obvious answer in both places — which
|
|
1872
|
+
* is the whole of what "zero config" can mean once there is more than one
|
|
1873
|
+
* target.
|
|
1695
1874
|
*
|
|
1696
|
-
*
|
|
1697
|
-
*
|
|
1698
|
-
*
|
|
1699
|
-
*
|
|
1700
|
-
*
|
|
1875
|
+
* `server` covers Dokploy and a bare host alike: the question these answer is
|
|
1876
|
+
* whether the app is next to a managed cloud or next to its own containers, and
|
|
1877
|
+
* on that question the two are the same.
|
|
1878
|
+
*
|
|
1879
|
+
* A per-construct, per-stage override is the layer above this — see
|
|
1880
|
+
* `constructs-outstanding.md` — so two buckets in one app can differ. This is
|
|
1881
|
+
* only what happens when nobody has said anything at all.
|
|
1701
1882
|
*/
|
|
1702
|
-
|
|
1883
|
+
|
|
1703
1884
|
/**
|
|
1704
|
-
*
|
|
1885
|
+
* Who delivers a declared app's mail.
|
|
1705
1886
|
*
|
|
1706
|
-
*
|
|
1707
|
-
*
|
|
1887
|
+
* Unlike a cache, this changes *nothing* about the client. Every backend speaks
|
|
1888
|
+
* SMTP, so the declaration's `smtp://` URL is true of all of them and only the
|
|
1889
|
+
* provisioner differs — which is the same reason the declaration has no
|
|
1890
|
+
* `provider` field and there is no `ses://` scheme.
|
|
1708
1891
|
*
|
|
1709
|
-
*
|
|
1710
|
-
*
|
|
1711
|
-
*
|
|
1892
|
+
* - `ses` (default) — the only backend that can be a *chain* of resources: an
|
|
1893
|
+
* identity, a user, an access key, and an SMTP password derived from it,
|
|
1894
|
+
* because SES issues IAM credentials rather than SMTP ones. Hand it a URL and
|
|
1895
|
+
* it uses that instead, which is what you want when the credentials already
|
|
1896
|
+
* exist — provisioning a second set of sending credentials for an identity
|
|
1897
|
+
* that already has them is not a thing to do by default.
|
|
1898
|
+
* - `resend` — an API key you hold, composed into an SMTP URL. Nothing to
|
|
1899
|
+
* provision: a SaaS account is not infrastructure.
|
|
1900
|
+
* - `smtp` — a URL supplied whole, for a relay somebody else runs.
|
|
1712
1901
|
*
|
|
1713
|
-
*
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
*
|
|
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'
|
|
1902
|
+
* Locally every one of them is Mailpit, because locally none of it matters.
|
|
1903
|
+
*/
|
|
1904
|
+
type EmailBackend = 'resend' | 'ses' | 'smtp';
|
|
1905
|
+
/**
|
|
1906
|
+
* Who delivers mail when nobody said.
|
|
1723
1907
|
*
|
|
1724
|
-
*
|
|
1725
|
-
*
|
|
1726
|
-
*
|
|
1727
|
-
*
|
|
1908
|
+
* Flat, unlike the others, and deliberately: mail is a SaaS on every target.
|
|
1909
|
+
* There is no self-hosted preset to default a container deploy to — Mailpit is
|
|
1910
|
+
* a development inbox, not a sender — so `server` has no answer of its own to
|
|
1911
|
+
* give and would only be `ses` written twice.
|
|
1728
1912
|
*/
|
|
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
1913
|
|
|
1914
|
+
/** Supported docker-compose service names */
|
|
1915
|
+
type ComposeServiceName = 'postgres' | 'redis' | 'rabbitmq' | 'minio' | 'mailpit' | 'localstack';
|
|
1916
|
+
/** Services configuration - can be boolean (use defaults) or object with version */
|
|
1917
|
+
type ComposeServicesConfig = { [K in ComposeServiceName]?: boolean | ServiceConfig };
|
|
1918
|
+
interface DockerConfig {
|
|
1919
|
+
/** Container registry URL (e.g., 'ghcr.io/myorg') */
|
|
1920
|
+
registry?: string;
|
|
1921
|
+
/** Docker image name (default: derived from package.json name) */
|
|
1922
|
+
imageName?: string;
|
|
1923
|
+
/** Base Docker image (default: 'node:22-alpine') */
|
|
1924
|
+
baseImage?: string;
|
|
1925
|
+
/** Container port (default: 3000) */
|
|
1926
|
+
port?: number;
|
|
1927
|
+
/** docker-compose services to include */
|
|
1928
|
+
compose?: {
|
|
1929
|
+
/**
|
|
1930
|
+
* Services to include in docker-compose.
|
|
1931
|
+
* Can be an object with service configs or an array of service names (legacy).
|
|
1932
|
+
*
|
|
1933
|
+
* @example Object format (recommended)
|
|
1934
|
+
* services: {
|
|
1935
|
+
* postgres: { version: '15-alpine' },
|
|
1936
|
+
* redis: true, // use default version
|
|
1937
|
+
* }
|
|
1938
|
+
*
|
|
1939
|
+
* @example Array format (legacy, uses default versions)
|
|
1940
|
+
* services: ['postgres', 'redis']
|
|
1941
|
+
*/
|
|
1942
|
+
services?: ComposeServicesConfig | ComposeServiceName[];
|
|
1943
|
+
};
|
|
1944
|
+
}
|
|
1945
|
+
interface ServerConfig extends ProviderConfig {
|
|
1946
|
+
enableOpenApi?: boolean;
|
|
1947
|
+
port?: number;
|
|
1948
|
+
/** Production build configuration */
|
|
1949
|
+
production?: ProductionConfig;
|
|
1950
|
+
}
|
|
1951
|
+
type Runtime = 'node' | 'bun';
|
|
1952
|
+
interface TelescopeConfig {
|
|
1953
|
+
/** Enable/disable telescope (default: true in development) */
|
|
1954
|
+
enabled?: boolean;
|
|
1955
|
+
/** Port for telescope to use (defaults to server port) */
|
|
1956
|
+
port?: number;
|
|
1957
|
+
/** Path prefix for telescope UI (default: /__telescope) */
|
|
1958
|
+
path?: string;
|
|
1959
|
+
/** Ignore patterns for telescope (e.g., ['/health', '/metrics']) */
|
|
1960
|
+
ignore?: string[];
|
|
1961
|
+
/** Record request/response bodies (default: true) */
|
|
1962
|
+
recordBody?: boolean;
|
|
1963
|
+
/** Maximum entries to keep in memory (default: 1000) */
|
|
1964
|
+
maxEntries?: number;
|
|
1965
|
+
/** Enable WebSocket for real-time updates (default: true, requires @hono/node-ws for Node.js) */
|
|
1966
|
+
websocket?: boolean;
|
|
1967
|
+
}
|
|
1968
|
+
interface StudioConfig {
|
|
1969
|
+
/** Enable/disable studio (default: true in development) */
|
|
1970
|
+
enabled?: boolean;
|
|
1971
|
+
/** Path prefix for studio UI (default: /__studio) */
|
|
1972
|
+
path?: string;
|
|
1973
|
+
/** Schema to introspect (default: 'public') */
|
|
1974
|
+
schema?: string;
|
|
1975
|
+
}
|
|
1976
|
+
interface OpenApiConfig {
|
|
1977
|
+
/** Enable OpenAPI generation (default: true) */
|
|
1978
|
+
enabled?: boolean;
|
|
1979
|
+
/** API title */
|
|
1980
|
+
title?: string;
|
|
1981
|
+
/** API version */
|
|
1982
|
+
version?: string;
|
|
1983
|
+
/** API description */
|
|
1984
|
+
description?: string;
|
|
1985
|
+
}
|
|
1986
|
+
interface HooksConfig {
|
|
1987
|
+
/**
|
|
1988
|
+
* Path to a module exporting server lifecycle hooks.
|
|
1989
|
+
* The module should export `beforeSetup` and/or `afterSetup` functions.
|
|
1990
|
+
*
|
|
1991
|
+
* @example
|
|
1992
|
+
* ```typescript
|
|
1993
|
+
* // src/config/hooks.ts
|
|
1994
|
+
* import type { Hono } from 'hono';
|
|
1995
|
+
* import type { Logger } from '@geekmidas/logger';
|
|
1996
|
+
* import type { EnvironmentParser } from '@geekmidas/envkit';
|
|
1997
|
+
*
|
|
1998
|
+
* // Called BEFORE gkm endpoints are registered
|
|
1999
|
+
* export function beforeSetup(app: Hono, ctx: { envParser: EnvironmentParser; logger: Logger }) {
|
|
2000
|
+
* app.use('*', cors());
|
|
2001
|
+
* app.get('/custom/health', (c) => c.json({ status: 'ok' }));
|
|
2002
|
+
* }
|
|
2003
|
+
*
|
|
2004
|
+
* // Called AFTER gkm endpoints are registered
|
|
2005
|
+
* export function afterSetup(app: Hono, ctx: { envParser: EnvironmentParser; logger: Logger }) {
|
|
2006
|
+
* app.notFound((c) => c.json({ error: 'Not found' }, 404));
|
|
2007
|
+
* app.onError((err, c) => c.json({ error: err.message }, 500));
|
|
2008
|
+
* }
|
|
2009
|
+
* ```
|
|
2010
|
+
*/
|
|
2011
|
+
server?: string;
|
|
2012
|
+
}
|
|
2013
|
+
/** Dokploy deployment configuration */
|
|
2014
|
+
interface DokployProviderConfig {
|
|
2015
|
+
/** Dokploy API endpoint (e.g., 'https://dokploy.example.com') */
|
|
2016
|
+
endpoint: string;
|
|
2017
|
+
/** Project ID in Dokploy */
|
|
2018
|
+
projectId: string;
|
|
2019
|
+
/** Application ID in Dokploy */
|
|
2020
|
+
applicationId: string;
|
|
2021
|
+
/** Container registry (overrides docker.registry if set) */
|
|
2022
|
+
registry?: string;
|
|
2023
|
+
/** Registry ID in Dokploy (recommended for private registries) */
|
|
2024
|
+
registryId?: string;
|
|
2025
|
+
}
|
|
2026
|
+
interface ProvidersConfig {
|
|
2027
|
+
aws?: {
|
|
2028
|
+
apiGateway?: {
|
|
2029
|
+
v1?: boolean | AWSApiGatewayConfig;
|
|
2030
|
+
v2?: boolean | AWSApiGatewayConfig;
|
|
2031
|
+
};
|
|
2032
|
+
lambda?: {
|
|
2033
|
+
functions?: boolean | AWSLambdaConfig;
|
|
2034
|
+
crons?: boolean | AWSLambdaConfig;
|
|
2035
|
+
};
|
|
2036
|
+
};
|
|
2037
|
+
server?: boolean | ServerConfig;
|
|
2038
|
+
/** Dokploy deployment configuration */
|
|
2039
|
+
dokploy?: boolean | DokployProviderConfig;
|
|
2040
|
+
}
|
|
2041
|
+
interface GkmConfig {
|
|
2042
|
+
/**
|
|
2043
|
+
* What this app is called, and therefore how everything it declares is named.
|
|
2044
|
+
*
|
|
2045
|
+
* The same field `sst.config.ts` carries, doing the same job: every physical
|
|
2046
|
+
* name is `{stage}-{name}-{construct}`, so `Database` in the `production`
|
|
2047
|
+
* stage of `kitchen-sink` is `production-kitchen-sink-database` on AWS and on
|
|
2048
|
+
* Dokploy alike. One statement, in the config, rather than a rule each
|
|
2049
|
+
* provider restates.
|
|
2050
|
+
*
|
|
2051
|
+
* `defineWorkspace` has always had this. A single-app config did not, so its
|
|
2052
|
+
* names fell back to whatever the directory happened to be called — the
|
|
2053
|
+
* monorepo's package name for the project and the app's for the application,
|
|
2054
|
+
* two accidents of layout standing in for a decision.
|
|
2055
|
+
*
|
|
2056
|
+
* Defaults to the package.json name with any scope stripped, then the
|
|
2057
|
+
* directory name.
|
|
2058
|
+
*/
|
|
2059
|
+
name?: string;
|
|
2060
|
+
/**
|
|
2061
|
+
* Where the things no construct implies live.
|
|
2062
|
+
*
|
|
2063
|
+
* The same block a workspace config carries, and the same split: `db` and
|
|
2064
|
+
* `storage` are derived from the declared `KyselyDatabase` and
|
|
2065
|
+
* `ObjectStorage` and are ignored here, while `cache`, `mail`, and `events`
|
|
2066
|
+
* name a *backend* — where the cache lives, who delivers the mail, which
|
|
2067
|
+
* broker carries events. A single-app project had no way to say any of that
|
|
2068
|
+
* before, so its event backend could only be guessed.
|
|
2069
|
+
*/
|
|
2070
|
+
services?: ServicesConfig;
|
|
2071
|
+
/**
|
|
2072
|
+
* Constructs glob pattern — one glob, every kind.
|
|
2073
|
+
*
|
|
2074
|
+
* What reconcile reads to derive the containers a stage needs: a database
|
|
2075
|
+
* implies Postgres, objects imply MinIO, mail implies Mailpit. A glob per
|
|
2076
|
+
* kind cannot find a resource, because a declared `ObjectStorage` has no
|
|
2077
|
+
* kind to be listed under.
|
|
2078
|
+
*
|
|
2079
|
+
* @example './src/**\/*.ts'
|
|
2080
|
+
*/
|
|
2081
|
+
constructs?: Routes;
|
|
2082
|
+
routes: Routes;
|
|
2083
|
+
functions?: Routes;
|
|
2084
|
+
crons?: Routes;
|
|
2085
|
+
subscribers?: Routes;
|
|
2086
|
+
queues?: Routes;
|
|
2087
|
+
topics?: Routes;
|
|
2088
|
+
envParser: string;
|
|
2089
|
+
logger: string;
|
|
2090
|
+
providers?: ProvidersConfig;
|
|
2091
|
+
/**
|
|
2092
|
+
* Server lifecycle hooks for customizing the Hono app.
|
|
2093
|
+
* Allows adding custom routes, middleware, error handlers, etc.
|
|
2094
|
+
*
|
|
2095
|
+
* @example
|
|
2096
|
+
* hooks: {
|
|
2097
|
+
* server: './src/config/hooks'
|
|
2098
|
+
* }
|
|
2099
|
+
*/
|
|
2100
|
+
hooks?: HooksConfig;
|
|
2101
|
+
/**
|
|
2102
|
+
* Telescope configuration for debugging/monitoring.
|
|
2103
|
+
* Can be:
|
|
2104
|
+
* - A string path to a module that exports a Telescope instance (recommended)
|
|
2105
|
+
* - A boolean to enable/disable with defaults
|
|
2106
|
+
* - A TelescopeConfig object for inline configuration
|
|
2107
|
+
*/
|
|
2108
|
+
telescope?: string | boolean | TelescopeConfig;
|
|
2109
|
+
/**
|
|
2110
|
+
* Studio configuration for database browsing.
|
|
2111
|
+
* Can be:
|
|
2112
|
+
* - A string path to a module that exports a Studio instance (recommended)
|
|
2113
|
+
* - A boolean to enable/disable with defaults
|
|
2114
|
+
* - A StudioConfig object for inline configuration
|
|
2115
|
+
*
|
|
2116
|
+
* Requires a database connection configured via services.
|
|
2117
|
+
*/
|
|
2118
|
+
studio?: string | boolean | StudioConfig;
|
|
2119
|
+
/**
|
|
2120
|
+
* OpenAPI generation configuration.
|
|
2121
|
+
* Can be:
|
|
2122
|
+
* - A boolean to enable/disable with defaults (output: ./src/api/openapi.ts)
|
|
2123
|
+
* - An OpenApiConfig object for customization
|
|
2124
|
+
*
|
|
2125
|
+
* When enabled, OpenAPI spec is generated on startup and regenerated on route changes.
|
|
2126
|
+
*
|
|
2127
|
+
* @example
|
|
2128
|
+
* openapi: true
|
|
2129
|
+
*
|
|
2130
|
+
* @example
|
|
2131
|
+
* openapi: {
|
|
2132
|
+
* output: './src/api/openapi.ts',
|
|
2133
|
+
* title: 'My API',
|
|
2134
|
+
* version: '1.0.0',
|
|
2135
|
+
* }
|
|
2136
|
+
*/
|
|
2137
|
+
openapi?: boolean | OpenApiConfig;
|
|
2138
|
+
/** Runtime to use for dev server (default: 'node') */
|
|
2139
|
+
runtime?: Runtime;
|
|
2140
|
+
/**
|
|
2141
|
+
* Environment file(s) to load for development.
|
|
2142
|
+
* Can be:
|
|
2143
|
+
* - A string path to a single env file (e.g., '.env.local')
|
|
2144
|
+
* - An array of paths to load in order (later files override earlier)
|
|
2145
|
+
* - Defaults to '.env' if not specified
|
|
2146
|
+
*
|
|
2147
|
+
* @example
|
|
2148
|
+
* env: '.env.local'
|
|
2149
|
+
*
|
|
2150
|
+
* @example
|
|
2151
|
+
* env: ['.env', '.env.local']
|
|
2152
|
+
*/
|
|
2153
|
+
env?: string | string[];
|
|
2154
|
+
/**
|
|
2155
|
+
* Docker deployment configuration.
|
|
2156
|
+
* Used by `gkm docker` and `gkm prepack` commands.
|
|
2157
|
+
*
|
|
2158
|
+
* @example
|
|
2159
|
+
* docker: {
|
|
2160
|
+
* registry: 'ghcr.io/myorg',
|
|
2161
|
+
* imageName: 'my-api',
|
|
2162
|
+
* compose: {
|
|
2163
|
+
* services: ['postgres', 'redis']
|
|
2164
|
+
* }
|
|
2165
|
+
* }
|
|
2166
|
+
*/
|
|
2167
|
+
docker?: DockerConfig;
|
|
2168
|
+
/**
|
|
2169
|
+
* Where this app deploys, and what the target needs to know.
|
|
2170
|
+
*
|
|
2171
|
+
* Absent until now, which meant a single-app project could not configure a
|
|
2172
|
+
* Dokploy deploy at all: the wrap that turns one into a workspace hardcoded
|
|
2173
|
+
* `{ default: 'dokploy' }` and dropped everything else, so there was no
|
|
2174
|
+
* endpoint, no registry and no domain — and `resolveHost` failed with "no
|
|
2175
|
+
* domain configured for stage" on a config that had nowhere to put one.
|
|
2176
|
+
*
|
|
2177
|
+
* The same shape a workspace config uses, so moving from one to the other is
|
|
2178
|
+
* a rename rather than a rewrite.
|
|
2179
|
+
*/
|
|
2180
|
+
deploy?: DeployConfig;
|
|
2181
|
+
}
|
|
1735
2182
|
//#endregion
|
|
1736
|
-
export { AppConfig, AppConfigInput, AppInput, AppsRecord, BackendFramework, ConstrainedApps, DeployConfig, DeployTarget, DokployWorkspaceConfig, FrontendFramework, InferAppNames, InferredWorkspaceConfig, LoadedConfig, MailServiceConfig, ModelsConfig, NormalizedAppConfig, NormalizedWorkspace, PHASE_2_DEPLOY_TARGETS,
|
|
1737
|
-
//# sourceMappingURL=
|
|
2183
|
+
export { AppConfig, AppConfigInput, AppInput, AppsRecord, BackendFramework, CacheBackend, ConstrainedApps, DeployConfig, DeployTarget, DokployWorkspaceConfig, EmailBackend, Framework, FrontendFramework, GkmConfig, InferAppNames, InferredWorkspaceConfig, LoadedConfig, MailServiceConfig, MobileFramework, ModelsConfig, NormalizedAppConfig, NormalizedWorkspace, OpenApiConfig, PHASE_2_DEPLOY_TARGETS, Routes, SUPPORTED_DEPLOY_TARGETS, SecretsConfig, ServiceImageConfig, ServicesConfig, SharedConfig, WorkspaceConfig, WorkspaceConfigSchema, WorkspaceInput, formatValidationErrors, getDeployTargetError, isDeployTargetSupported, isPhase2DeployTarget, isWorkspaceConfig, safeValidateWorkspaceConfig, validateWorkspaceConfig };
|
|
2184
|
+
//# sourceMappingURL=types-C-arnQ1r.d.mts.map
|