@geekmidas/cli 2.0.2 → 10.0.0-alpha.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.
- package/README.md +71 -120
- 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 +2329 -1584
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +2306 -1561
- 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 -623
- 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
|
@@ -0,0 +1,473 @@
|
|
|
1
|
+
const require_chunk = require('./chunk-CUT6urMc.cjs');
|
|
2
|
+
const require_config = require('./config-DbPE1KXF.cjs');
|
|
3
|
+
const require_credentials = require('./credentials-K961ThG3.cjs');
|
|
4
|
+
const require_generator = require('./generator-CNzBw7g5.cjs');
|
|
5
|
+
const require_storage = require('./storage-BJmzYxt8.cjs');
|
|
6
|
+
const require_fullstack_secrets = require('./fullstack-secrets-C-GGohke.cjs');
|
|
7
|
+
const require_sync = require('./sync-SizaChmC.cjs');
|
|
8
|
+
const node_fs = require_chunk.__toESM(require("node:fs"));
|
|
9
|
+
const node_path = require_chunk.__toESM(require("node:path"));
|
|
10
|
+
const node_fs_promises = require_chunk.__toESM(require("node:fs/promises"));
|
|
11
|
+
const node_child_process = require_chunk.__toESM(require("node:child_process"));
|
|
12
|
+
const node_util = require_chunk.__toESM(require("node:util"));
|
|
13
|
+
const prompts = require_chunk.__toESM(require("prompts"));
|
|
14
|
+
|
|
15
|
+
//#region src/trust/index.ts
|
|
16
|
+
const logger$1 = console;
|
|
17
|
+
const run = (0, node_util.promisify)(node_child_process.execFile);
|
|
18
|
+
/**
|
|
19
|
+
* How each platform is told about a new authority.
|
|
20
|
+
*
|
|
21
|
+
* Separate rather than shelled through one script because the failure modes
|
|
22
|
+
* differ and the message should name the real one: macOS refuses without an
|
|
23
|
+
* admin password, Debian needs the file in a specific directory before its
|
|
24
|
+
* updater will look at it.
|
|
25
|
+
*/
|
|
26
|
+
function installation(platform, certificate) {
|
|
27
|
+
if (platform === "darwin") return {
|
|
28
|
+
describe: "the System keychain",
|
|
29
|
+
steps: [["sudo", [
|
|
30
|
+
"security",
|
|
31
|
+
"add-trusted-cert",
|
|
32
|
+
"-d",
|
|
33
|
+
"-r",
|
|
34
|
+
"trustRoot",
|
|
35
|
+
"-k",
|
|
36
|
+
"/Library/Keychains/System.keychain",
|
|
37
|
+
certificate
|
|
38
|
+
]]]
|
|
39
|
+
};
|
|
40
|
+
if (platform === "linux") {
|
|
41
|
+
const debian = (0, node_fs.existsSync)("/usr/local/share/ca-certificates");
|
|
42
|
+
return {
|
|
43
|
+
describe: debian ? "the system CA bundle" : "the system trust anchors",
|
|
44
|
+
steps: debian ? [["sudo", [
|
|
45
|
+
"cp",
|
|
46
|
+
certificate,
|
|
47
|
+
"/usr/local/share/ca-certificates/gkm-local-ca.crt"
|
|
48
|
+
]], ["sudo", ["update-ca-certificates"]]] : [["sudo", [
|
|
49
|
+
"cp",
|
|
50
|
+
certificate,
|
|
51
|
+
"/etc/pki/ca-trust/source/anchors/gkm-local-ca.crt"
|
|
52
|
+
]], ["sudo", ["update-ca-trust"]]]
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
throw new UnsupportedPlatform(platform, certificate);
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Trust the certificate authority this project's edge issues from.
|
|
59
|
+
*
|
|
60
|
+
* Idempotent in effect: installing a root that is already trusted replaces the
|
|
61
|
+
* same entry, so running it twice is not an error.
|
|
62
|
+
*/
|
|
63
|
+
async function trustCommand(options = {}) {
|
|
64
|
+
const { workspace } = await require_config.loadWorkspaceConfig();
|
|
65
|
+
const certificate = (0, node_path.join)(workspace.root, require_credentials.LOCAL_CA_PATH);
|
|
66
|
+
if (!(0, node_fs.existsSync)(certificate)) throw new NoLocalAuthority(certificate);
|
|
67
|
+
const { describe, steps } = installation(process.platform, certificate);
|
|
68
|
+
logger$1.log(`\n🔐 Trusting the local authority in ${describe}`);
|
|
69
|
+
logger$1.log(` ${certificate}\n`);
|
|
70
|
+
if (options.dryRun) {
|
|
71
|
+
for (const [command, args] of steps) logger$1.log(` ${command} ${args.join(" ")}`);
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
logger$1.log(" This needs an admin password.\n");
|
|
75
|
+
for (const [command, args] of steps) await run(command, args, { stdio: "inherit" });
|
|
76
|
+
logger$1.log("\n✅ Local https addresses are trusted. Restart your browser.\n");
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Trust the authority if this project wants that and this machine lacks it.
|
|
80
|
+
*
|
|
81
|
+
* The decision, in order: what the project configured, then what a person
|
|
82
|
+
* previously answered, then a prompt. Never a silent `sudo` — that is the one
|
|
83
|
+
* thing a setup command should not do on somebody's behalf.
|
|
84
|
+
*
|
|
85
|
+
* Silent and free when the machine already trusts it, which is what makes it
|
|
86
|
+
* acceptable to call on every `gkm setup`.
|
|
87
|
+
*/
|
|
88
|
+
async function ensureTrusted(root, url, options = {}) {
|
|
89
|
+
if (options.configured === false) return;
|
|
90
|
+
if (await isTrusted(url)) return;
|
|
91
|
+
if (options.configured !== true && !options.assumeYes) {
|
|
92
|
+
if (!process.stdin.isTTY) {
|
|
93
|
+
logger$1.log(" Local https addresses are not trusted here. Run \"gkm trust\", or set services.trustLocalCa.");
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
if (await declined(root)) return;
|
|
97
|
+
const { install } = await (0, prompts.default)({
|
|
98
|
+
type: "confirm",
|
|
99
|
+
name: "install",
|
|
100
|
+
message: "Trust this project's local certificate authority, so a browser accepts its https addresses? (needs sudo)",
|
|
101
|
+
initial: false
|
|
102
|
+
});
|
|
103
|
+
if (!install) {
|
|
104
|
+
await recordDeclined(root);
|
|
105
|
+
logger$1.log(" Skipped. Run \"gkm trust\" later, or set services.trustLocalCa.");
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
await trustCommand();
|
|
110
|
+
}
|
|
111
|
+
/** Where a declined answer is remembered, so setup asks once and not again. */
|
|
112
|
+
const TRUST_STATE = ".gkm/trust.json";
|
|
113
|
+
async function declined(root) {
|
|
114
|
+
try {
|
|
115
|
+
const raw = await (0, node_fs_promises.readFile)((0, node_path.join)(root, TRUST_STATE), "utf-8");
|
|
116
|
+
return JSON.parse(raw).declined === true;
|
|
117
|
+
} catch {
|
|
118
|
+
return false;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
async function recordDeclined(root) {
|
|
122
|
+
const path = (0, node_path.join)(root, TRUST_STATE);
|
|
123
|
+
await (0, node_fs_promises.mkdir)((0, node_path.dirname)(path), { recursive: true });
|
|
124
|
+
await (0, node_fs_promises.writeFile)(path, `${JSON.stringify({ declined: true }, null, 2)}\n`);
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Whether this machine already trusts the local authority.
|
|
128
|
+
*
|
|
129
|
+
* Asked by connecting rather than by reading a keychain: what matters is
|
|
130
|
+
* whether a client with no special configuration verifies the edge, and that is
|
|
131
|
+
* one platform-neutral question instead of three platform-specific ones. It is
|
|
132
|
+
* also the exact thing a browser is about to do.
|
|
133
|
+
*
|
|
134
|
+
* A child process, because `NODE_EXTRA_CA_CERTS` is read once at startup and
|
|
135
|
+
* this process almost certainly has it set — asking in-process would answer
|
|
136
|
+
* "yes" for everyone.
|
|
137
|
+
*/
|
|
138
|
+
async function isTrusted(url) {
|
|
139
|
+
const { NODE_EXTRA_CA_CERTS: _ignored,...env } = process.env;
|
|
140
|
+
try {
|
|
141
|
+
await run(process.execPath, ["-e", `fetch(${JSON.stringify(url)}).then(()=>0,()=>process.exit(1))`], {
|
|
142
|
+
env,
|
|
143
|
+
timeout: 15e3
|
|
144
|
+
});
|
|
145
|
+
return true;
|
|
146
|
+
} catch {
|
|
147
|
+
return false;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
/** The edge has not run, so there is no authority to trust yet. */
|
|
151
|
+
var NoLocalAuthority = class extends Error {
|
|
152
|
+
constructor(path) {
|
|
153
|
+
super(`No local certificate authority at ${path}. It is generated the first time the edge starts, so run "gkm setup" (or "gkm dev") once — and if this project declares no file server, nothing needs one.`);
|
|
154
|
+
this.path = path;
|
|
155
|
+
this.name = "NoLocalAuthority";
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
/** A platform with no trust store this knows how to write to. */
|
|
159
|
+
var UnsupportedPlatform = class extends Error {
|
|
160
|
+
constructor(platform, certificate) {
|
|
161
|
+
super(`gkm does not know how to install a certificate authority on ${platform}. The root is at ${certificate} — add it to the trust store by hand, or point a client at it with NODE_EXTRA_CA_CERTS.`);
|
|
162
|
+
this.platform = platform;
|
|
163
|
+
this.certificate = certificate;
|
|
164
|
+
this.name = "UnsupportedPlatform";
|
|
165
|
+
}
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
//#endregion
|
|
169
|
+
//#region src/setup/index.ts
|
|
170
|
+
const logger = console;
|
|
171
|
+
/**
|
|
172
|
+
* Setup development environment.
|
|
173
|
+
*
|
|
174
|
+
* Orchestrates:
|
|
175
|
+
* 1. Load workspace config
|
|
176
|
+
* 2. Resolve secrets (local → SSM → generate fresh)
|
|
177
|
+
* 3. Write docker/.env from secrets
|
|
178
|
+
* 4. Start Docker services
|
|
179
|
+
*/
|
|
180
|
+
async function setupCommand(options = {}) {
|
|
181
|
+
const stage = options.stage ?? "development";
|
|
182
|
+
logger.log("\n🔧 Setting up development environment...\n");
|
|
183
|
+
let loadedConfig;
|
|
184
|
+
try {
|
|
185
|
+
loadedConfig = await require_config.loadWorkspaceConfig();
|
|
186
|
+
} catch {
|
|
187
|
+
logger.error("❌ No gkm.config.ts found. Run this command from a workspace root.");
|
|
188
|
+
process.exit(1);
|
|
189
|
+
}
|
|
190
|
+
const { workspace } = loadedConfig;
|
|
191
|
+
const isMultiApp = Object.keys(workspace.apps).length > 1;
|
|
192
|
+
logger.log(`📦 Workspace: ${workspace.name}`);
|
|
193
|
+
logger.log(`📱 Apps: ${Object.keys(workspace.apps).join(", ")}`);
|
|
194
|
+
logger.log(`🔑 Stage: ${stage}\n`);
|
|
195
|
+
const secrets = await resolveSecrets(stage, workspace, options);
|
|
196
|
+
if (!secrets) {
|
|
197
|
+
logger.error("❌ Failed to resolve secrets. Exiting.");
|
|
198
|
+
process.exit(1);
|
|
199
|
+
}
|
|
200
|
+
const containers = await require_credentials.derivedContainers(workspace, stage);
|
|
201
|
+
if (isMultiApp && containers.includes("postgres")) {
|
|
202
|
+
await require_fullstack_secrets.writeDockerEnvFromSecrets(secrets, workspace.root);
|
|
203
|
+
logger.log("📄 Generated docker/.env with database passwords");
|
|
204
|
+
}
|
|
205
|
+
if (!options.skipDocker) {
|
|
206
|
+
logger.log("");
|
|
207
|
+
await reconcileLocal(workspace, stage, options);
|
|
208
|
+
}
|
|
209
|
+
printSummary(workspace, stage);
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Converge this machine on what the manifest declares.
|
|
213
|
+
*
|
|
214
|
+
* Says what it did in one line and stays silent when it did nothing, because
|
|
215
|
+
* reconciling on every start is only tolerable if the converged case is both
|
|
216
|
+
* free and quiet.
|
|
217
|
+
*/
|
|
218
|
+
async function reconcileLocal(workspace, stage, options) {
|
|
219
|
+
const result = await require_credentials.reconcileWorkspace(workspace, { stage });
|
|
220
|
+
if (result.plan.containers.length === 0) {
|
|
221
|
+
logger.log("🐳 No containers declared");
|
|
222
|
+
return;
|
|
223
|
+
}
|
|
224
|
+
if (!result.changed) {
|
|
225
|
+
logger.log("🐳 Services already up to date");
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
logger.log(`🐳 Services: ${result.plan.containers.join(", ")}`);
|
|
229
|
+
for (const [container, address] of Object.entries(result.addresses)) logger.log(` ${container}: ${address}`);
|
|
230
|
+
const served = result.plan.resources.find((r) => r.kind === "file-server");
|
|
231
|
+
const url = served ? result.env[served.envKey] : void 0;
|
|
232
|
+
if (url) await ensureTrusted(workspace.root, url, {
|
|
233
|
+
...workspace.services.trustLocalCa === void 0 ? {} : { configured: workspace.services.trustLocalCa },
|
|
234
|
+
...options.yes ? { assumeYes: true } : {}
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* Resolve secrets with priority:
|
|
239
|
+
* 1. Local secrets exist → use them (preserves manual additions)
|
|
240
|
+
* 2. SSM configured and has secrets → pull and use
|
|
241
|
+
* 3. Neither → generate fresh secrets
|
|
242
|
+
*
|
|
243
|
+
* --force skips checks 1 and 2 and always regenerates.
|
|
244
|
+
*/
|
|
245
|
+
async function resolveSecrets(stage, workspace, options) {
|
|
246
|
+
if (options.force) {
|
|
247
|
+
logger.log("🔐 Generating fresh secrets (--force)...");
|
|
248
|
+
return generateFreshSecrets(stage, workspace, options);
|
|
249
|
+
}
|
|
250
|
+
if (require_storage.secretsExist(stage, workspace.root)) {
|
|
251
|
+
logger.log("🔐 Using existing local secrets");
|
|
252
|
+
const secrets = await require_storage.readStageSecrets(stage, workspace.root);
|
|
253
|
+
if (secrets) {
|
|
254
|
+
const reconciled = reconcileSecrets(secrets, workspace, await require_credentials.derivedContainers(workspace, stage));
|
|
255
|
+
if (reconciled) await require_storage.writeStageSecrets(reconciled, workspace.root);
|
|
256
|
+
return reconciled ?? secrets;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
if (require_sync.isSSMConfigured(workspace)) {
|
|
260
|
+
logger.log("☁️ Checking for remote secrets in SSM...");
|
|
261
|
+
try {
|
|
262
|
+
const remoteSecrets = await require_sync.pullSecrets(stage, workspace);
|
|
263
|
+
if (remoteSecrets) {
|
|
264
|
+
logger.log("✅ Pulled secrets from SSM");
|
|
265
|
+
await require_storage.writeStageSecrets(remoteSecrets, workspace.root);
|
|
266
|
+
return remoteSecrets;
|
|
267
|
+
}
|
|
268
|
+
logger.log(" No remote secrets found");
|
|
269
|
+
} catch (error) {
|
|
270
|
+
logger.warn(`⚠️ Failed to pull from SSM: ${error.message}`);
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
logger.log("🔐 Generating fresh development secrets...");
|
|
274
|
+
return generateFreshSecrets(stage, workspace, options);
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* Reconcile existing secrets with expected workspace-derived keys.
|
|
278
|
+
* Adds missing keys (e.g. BETTER_AUTH_*) without overwriting existing values.
|
|
279
|
+
* Returns the updated secrets if changes were made, or null if no changes needed.
|
|
280
|
+
* @internal Exported for testing
|
|
281
|
+
*/
|
|
282
|
+
/**
|
|
283
|
+
* Which containers hold a credential worth generating.
|
|
284
|
+
*
|
|
285
|
+
* Reconcile's container names, mapped to the service a credential is stored
|
|
286
|
+
* under. `redis-http` is the Upstash-protocol proxy in front of Redis and holds
|
|
287
|
+
* no credential of its own — its token is derived — so it maps to nothing, and
|
|
288
|
+
* `caddy` is an edge with nothing to log into.
|
|
289
|
+
*/
|
|
290
|
+
function credentialedServices(containers) {
|
|
291
|
+
const byContainer = {
|
|
292
|
+
postgres: "postgres",
|
|
293
|
+
redis: "redis",
|
|
294
|
+
minio: "minio",
|
|
295
|
+
mailpit: "mailpit",
|
|
296
|
+
localstack: "localstack",
|
|
297
|
+
rabbitmq: "rabbitmq"
|
|
298
|
+
};
|
|
299
|
+
return [...new Set(containers.map((container) => byContainer[container]).filter((name) => Boolean(name)))];
|
|
300
|
+
}
|
|
301
|
+
function reconcileSecrets(secrets, workspace, containers = []) {
|
|
302
|
+
let changed = false;
|
|
303
|
+
let result = { ...secrets };
|
|
304
|
+
for (const name of credentialedServices(containers)) if (!result.services[name]) {
|
|
305
|
+
const creds = require_generator.generateServiceCredentials(name);
|
|
306
|
+
if (name === "minio") {
|
|
307
|
+
creds.bucket = workspace.name;
|
|
308
|
+
creds.username = workspace.name;
|
|
309
|
+
}
|
|
310
|
+
result = {
|
|
311
|
+
...result,
|
|
312
|
+
services: {
|
|
313
|
+
...result.services,
|
|
314
|
+
[name]: creds
|
|
315
|
+
}
|
|
316
|
+
};
|
|
317
|
+
result.urls = require_generator.generateConnectionUrls(result.services, result.eventsBackend);
|
|
318
|
+
logger.log(` 🔄 Adding missing service credentials: ${name}`);
|
|
319
|
+
changed = true;
|
|
320
|
+
}
|
|
321
|
+
if (result.services.postgres && !result.services.pgboss) {
|
|
322
|
+
result = {
|
|
323
|
+
...result,
|
|
324
|
+
services: {
|
|
325
|
+
...result.services,
|
|
326
|
+
pgboss: {
|
|
327
|
+
host: result.services.postgres.host,
|
|
328
|
+
port: result.services.postgres.port,
|
|
329
|
+
username: "pgboss",
|
|
330
|
+
password: require_generator.generateSecurePassword(),
|
|
331
|
+
database: result.services.postgres.database ?? "app"
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
};
|
|
335
|
+
result.urls = require_generator.generateConnectionUrls(result.services, result.eventsBackend);
|
|
336
|
+
logger.log(" 🔄 Adding missing service credentials: pgboss");
|
|
337
|
+
changed = true;
|
|
338
|
+
}
|
|
339
|
+
const isMultiApp = Object.keys(workspace.apps).length > 1;
|
|
340
|
+
if (isMultiApp) {
|
|
341
|
+
const expected = require_fullstack_secrets.generateFullstackCustomSecrets(workspace, containers);
|
|
342
|
+
const missing = {};
|
|
343
|
+
for (const [key, value] of Object.entries(expected)) if (!(key in result.custom)) missing[key] = value;
|
|
344
|
+
if (Object.keys(missing).length > 0) {
|
|
345
|
+
logger.log(` 🔄 Adding missing secrets: ${Object.keys(missing).join(", ")}`);
|
|
346
|
+
result = {
|
|
347
|
+
...result,
|
|
348
|
+
custom: {
|
|
349
|
+
...result.custom,
|
|
350
|
+
...missing
|
|
351
|
+
}
|
|
352
|
+
};
|
|
353
|
+
changed = true;
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
if (!changed) return null;
|
|
357
|
+
return {
|
|
358
|
+
...result,
|
|
359
|
+
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
360
|
+
};
|
|
361
|
+
}
|
|
362
|
+
/**
|
|
363
|
+
* Build a fresh StageSecrets object for a workspace: service credentials,
|
|
364
|
+
* connection URLs, and custom secrets. Pure — does not write to disk or touch
|
|
365
|
+
* SSM. Service passwords are freshly randomized, so the result must be the same
|
|
366
|
+
* one used to start the matching Docker containers.
|
|
367
|
+
* @internal Exported for reuse by `gkm test` auto-setup.
|
|
368
|
+
*/
|
|
369
|
+
function createFreshWorkspaceSecrets(stage, workspace, containers = []) {
|
|
370
|
+
const serviceNames = credentialedServices(containers);
|
|
371
|
+
const secrets = require_generator.createStageSecrets(stage, serviceNames, {
|
|
372
|
+
projectName: workspace.name,
|
|
373
|
+
eventsBackend: workspace.services.events
|
|
374
|
+
});
|
|
375
|
+
const isMultiApp = Object.keys(workspace.apps).length > 1;
|
|
376
|
+
if (isMultiApp) secrets.custom = require_fullstack_secrets.generateFullstackCustomSecrets(workspace, containers);
|
|
377
|
+
else secrets.custom = {
|
|
378
|
+
NODE_ENV: "development",
|
|
379
|
+
PORT: "3000",
|
|
380
|
+
LOG_LEVEL: "debug",
|
|
381
|
+
JWT_SECRET: `dev-${Date.now()}-${Math.random().toString(36).slice(2)}`
|
|
382
|
+
};
|
|
383
|
+
return secrets;
|
|
384
|
+
}
|
|
385
|
+
/**
|
|
386
|
+
* Ensure a usable secret set exists for a stage, generating a fresh one from the
|
|
387
|
+
* workspace config when none is present. No-op if secrets already exist.
|
|
388
|
+
*
|
|
389
|
+
* Powers `gkm test --auto-setup` / `GKM_AUTO_SETUP`: CI can run without a
|
|
390
|
+
* committed secrets file or a shared encryption key — the stage is regenerated
|
|
391
|
+
* from the committed `gkm.config.ts`, and `writeStageSecrets` mints a local key.
|
|
392
|
+
*
|
|
393
|
+
* @returns true if fresh secrets were generated, false if existing ones were kept
|
|
394
|
+
*/
|
|
395
|
+
async function ensureStageSecrets(stage, cwd = process.cwd()) {
|
|
396
|
+
const { workspace } = await require_config.loadWorkspaceConfig(cwd);
|
|
397
|
+
if (require_storage.secretsExist(stage, workspace.root)) return false;
|
|
398
|
+
const secrets = createFreshWorkspaceSecrets(stage, workspace, await require_credentials.derivedContainers(workspace, stage));
|
|
399
|
+
await require_storage.writeStageSecrets(secrets, workspace.root);
|
|
400
|
+
return true;
|
|
401
|
+
}
|
|
402
|
+
/**
|
|
403
|
+
* Generate fresh secrets for the workspace.
|
|
404
|
+
*/
|
|
405
|
+
async function generateFreshSecrets(stage, workspace, options) {
|
|
406
|
+
const secrets = createFreshWorkspaceSecrets(stage, workspace, await require_credentials.derivedContainers(workspace, stage));
|
|
407
|
+
await require_storage.writeStageSecrets(secrets, workspace.root);
|
|
408
|
+
logger.log(` Secrets written to .gkm/secrets/${stage}.json`);
|
|
409
|
+
if (require_sync.isSSMConfigured(workspace) && !options.yes) {
|
|
410
|
+
const { shouldPush } = await (0, prompts.default)({
|
|
411
|
+
type: "confirm",
|
|
412
|
+
name: "shouldPush",
|
|
413
|
+
message: "Push secrets to SSM for team sharing?",
|
|
414
|
+
initial: true
|
|
415
|
+
});
|
|
416
|
+
if (shouldPush) try {
|
|
417
|
+
await require_sync.pushSecrets(stage, workspace);
|
|
418
|
+
logger.log("☁️ Secrets pushed to SSM");
|
|
419
|
+
} catch (error) {
|
|
420
|
+
logger.warn(`⚠️ Failed to push to SSM: ${error.message}`);
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
return secrets;
|
|
424
|
+
}
|
|
425
|
+
/**
|
|
426
|
+
* Print setup summary with next steps.
|
|
427
|
+
*/
|
|
428
|
+
function printSummary(workspace, stage) {
|
|
429
|
+
logger.log(`\n${"─".repeat(50)}`);
|
|
430
|
+
logger.log("\n✅ Development environment ready!\n");
|
|
431
|
+
logger.log("📋 Apps:");
|
|
432
|
+
for (const [name, app] of Object.entries(workspace.apps)) {
|
|
433
|
+
const icon = app.type === "web" ? "🌐" : app.type === "mobile" ? "📱" : "🔧";
|
|
434
|
+
logger.log(` ${icon} ${name} → http://localhost:${app.port}`);
|
|
435
|
+
}
|
|
436
|
+
logger.log("\n🚀 Next steps:");
|
|
437
|
+
logger.log(" gkm dev # Start all apps");
|
|
438
|
+
logger.log(` gkm secrets:show --stage ${stage} # View secrets`);
|
|
439
|
+
logger.log("");
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
//#endregion
|
|
443
|
+
Object.defineProperty(exports, 'createFreshWorkspaceSecrets', {
|
|
444
|
+
enumerable: true,
|
|
445
|
+
get: function () {
|
|
446
|
+
return createFreshWorkspaceSecrets;
|
|
447
|
+
}
|
|
448
|
+
});
|
|
449
|
+
Object.defineProperty(exports, 'ensureStageSecrets', {
|
|
450
|
+
enumerable: true,
|
|
451
|
+
get: function () {
|
|
452
|
+
return ensureStageSecrets;
|
|
453
|
+
}
|
|
454
|
+
});
|
|
455
|
+
Object.defineProperty(exports, 'reconcileSecrets', {
|
|
456
|
+
enumerable: true,
|
|
457
|
+
get: function () {
|
|
458
|
+
return reconcileSecrets;
|
|
459
|
+
}
|
|
460
|
+
});
|
|
461
|
+
Object.defineProperty(exports, 'setupCommand', {
|
|
462
|
+
enumerable: true,
|
|
463
|
+
get: function () {
|
|
464
|
+
return setupCommand;
|
|
465
|
+
}
|
|
466
|
+
});
|
|
467
|
+
Object.defineProperty(exports, 'trustCommand', {
|
|
468
|
+
enumerable: true,
|
|
469
|
+
get: function () {
|
|
470
|
+
return trustCommand;
|
|
471
|
+
}
|
|
472
|
+
});
|
|
473
|
+
//# sourceMappingURL=setup-CJiQM2pX.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup-CJiQM2pX.cjs","names":["logger","execFile","platform: NodeJS.Platform","certificate: string","options: TrustOptions","LOCAL_CA_PATH","root: string","url: string","options: { configured?: boolean; assumeYes?: boolean }","path: string","platform: string","options: SetupOptions","loadedConfig: LoadedConfig","workspace: NormalizedWorkspace","stage: string","containers: readonly string[]","byContainer: Readonly<Record<string, ComposeServiceName>>","secrets: StageSecrets","missing: Record<string, string>","cwd: string"],"sources":["../src/trust/index.ts","../src/setup/index.ts"],"sourcesContent":["/**\n * Installing the local edge's certificate authority into the OS trust store.\n *\n * `NODE_EXTRA_CA_CERTS` covers everything gkm starts — the dev server, the test\n * suite, anything under `gkm exec` — because reconcile injects it. A browser\n * reads none of that: it asks the operating system, so until the root is in the\n * system store a local `https://` address is \"not secure\", which is true and\n * unhelpful.\n *\n * A separate command rather than part of `gkm setup`, for one reason: this\n * needs `sudo`, and a setup that silently escalates on every run is a worse\n * trade than one that tells you what to type. Caddy's own `caddy trust` draws\n * the line in the same place.\n */\n\nimport { execFile } from 'node:child_process';\nimport { existsSync } from 'node:fs';\nimport { copyFile, mkdir, readFile, writeFile } from 'node:fs/promises';\nimport { dirname, join } from 'node:path';\nimport { promisify } from 'node:util';\nimport prompts from 'prompts';\nimport { loadWorkspaceConfig } from '../config.js';\nimport { LOCAL_CA_PATH } from '../reconcile/index.js';\n\nconst logger = console;\n\nconst run = promisify(execFile);\n\nexport interface TrustOptions {\n\t/** Print the commands rather than running them. */\n\tdryRun?: boolean;\n}\n\n/**\n * How each platform is told about a new authority.\n *\n * Separate rather than shelled through one script because the failure modes\n * differ and the message should name the real one: macOS refuses without an\n * admin password, Debian needs the file in a specific directory before its\n * updater will look at it.\n */\nfunction installation(\n\tplatform: NodeJS.Platform,\n\tcertificate: string,\n): { describe: string; steps: [string, string[]][] } {\n\tif (platform === 'darwin') {\n\t\treturn {\n\t\t\tdescribe: 'the System keychain',\n\t\t\tsteps: [\n\t\t\t\t[\n\t\t\t\t\t'sudo',\n\t\t\t\t\t[\n\t\t\t\t\t\t'security',\n\t\t\t\t\t\t'add-trusted-cert',\n\t\t\t\t\t\t'-d',\n\t\t\t\t\t\t'-r',\n\t\t\t\t\t\t'trustRoot',\n\t\t\t\t\t\t'-k',\n\t\t\t\t\t\t'/Library/Keychains/System.keychain',\n\t\t\t\t\t\tcertificate,\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t],\n\t\t};\n\t}\n\n\tif (platform === 'linux') {\n\t\t// Debian and Fedora keep anchors in different places and run different\n\t\t// updaters. Whichever directory exists is the one this system uses.\n\t\tconst debian = existsSync('/usr/local/share/ca-certificates');\n\n\t\treturn {\n\t\t\tdescribe: debian ? 'the system CA bundle' : 'the system trust anchors',\n\t\t\tsteps: debian\n\t\t\t\t? [\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\t'sudo',\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t'cp',\n\t\t\t\t\t\t\t\tcertificate,\n\t\t\t\t\t\t\t\t'/usr/local/share/ca-certificates/gkm-local-ca.crt',\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t],\n\t\t\t\t\t\t['sudo', ['update-ca-certificates']],\n\t\t\t\t\t]\n\t\t\t\t: [\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\t'sudo',\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t'cp',\n\t\t\t\t\t\t\t\tcertificate,\n\t\t\t\t\t\t\t\t'/etc/pki/ca-trust/source/anchors/gkm-local-ca.crt',\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t],\n\t\t\t\t\t\t['sudo', ['update-ca-trust']],\n\t\t\t\t\t],\n\t\t};\n\t}\n\n\tthrow new UnsupportedPlatform(platform, certificate);\n}\n\n/**\n * Trust the certificate authority this project's edge issues from.\n *\n * Idempotent in effect: installing a root that is already trusted replaces the\n * same entry, so running it twice is not an error.\n */\nexport async function trustCommand(options: TrustOptions = {}): Promise<void> {\n\tconst { workspace } = await loadWorkspaceConfig();\n\tconst certificate = join(workspace.root, LOCAL_CA_PATH);\n\n\tif (!existsSync(certificate)) {\n\t\tthrow new NoLocalAuthority(certificate);\n\t}\n\n\tconst { describe, steps } = installation(process.platform, certificate);\n\n\tlogger.log(`\\n🔐 Trusting the local authority in ${describe}`);\n\tlogger.log(` ${certificate}\\n`);\n\n\tif (options.dryRun) {\n\t\tfor (const [command, args] of steps) {\n\t\t\tlogger.log(` ${command} ${args.join(' ')}`);\n\t\t}\n\t\treturn;\n\t}\n\n\tlogger.log(' This needs an admin password.\\n');\n\n\tfor (const [command, args] of steps) {\n\t\t// Inherited stdio, because sudo prompts on the terminal and a captured\n\t\t// prompt is a command that appears to hang.\n\t\tawait run(command, args, { stdio: 'inherit' } as never);\n\t}\n\n\tlogger.log('\\n✅ Local https addresses are trusted. Restart your browser.\\n');\n}\n\n/**\n * Trust the authority if this project wants that and this machine lacks it.\n *\n * The decision, in order: what the project configured, then what a person\n * previously answered, then a prompt. Never a silent `sudo` — that is the one\n * thing a setup command should not do on somebody's behalf.\n *\n * Silent and free when the machine already trusts it, which is what makes it\n * acceptable to call on every `gkm setup`.\n */\nexport async function ensureTrusted(\n\troot: string,\n\turl: string,\n\toptions: { configured?: boolean; assumeYes?: boolean } = {},\n): Promise<void> {\n\tif (options.configured === false) return;\n\tif (await isTrusted(url)) return;\n\n\tif (options.configured !== true && !options.assumeYes) {\n\t\t// Nothing to answer a prompt in CI, a hook, or a piped shell — and a\n\t\t// setup that stops there waiting is worse than one that leaves the\n\t\t// authority untrusted. Not recorded as declined, because nobody\n\t\t// declined: the next interactive run should still ask.\n\t\tif (!process.stdin.isTTY) {\n\t\t\tlogger.log(\n\t\t\t\t' Local https addresses are not trusted here. Run \"gkm trust\", ' +\n\t\t\t\t\t'or set services.trustLocalCa.',\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\t// A recorded \"no\" is why this asks once rather than every start. There is\n\t\t// no recorded \"yes\": trusting is checked directly above, so a yes that\n\t\t// worked answers itself and a yes that did not should ask again.\n\t\tif (await declined(root)) return;\n\n\t\tconst { install } = await prompts({\n\t\t\ttype: 'confirm',\n\t\t\tname: 'install',\n\t\t\tmessage:\n\t\t\t\t\"Trust this project's local certificate authority, so a browser \" +\n\t\t\t\t'accepts its https addresses? (needs sudo)',\n\t\t\tinitial: false,\n\t\t});\n\n\t\tif (!install) {\n\t\t\tawait recordDeclined(root);\n\t\t\tlogger.log(\n\t\t\t\t' Skipped. Run \"gkm trust\" later, or set services.trustLocalCa.',\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\t}\n\n\tawait trustCommand();\n}\n\n/** Where a declined answer is remembered, so setup asks once and not again. */\nconst TRUST_STATE = '.gkm/trust.json';\n\nasync function declined(root: string): Promise<boolean> {\n\ttry {\n\t\tconst raw = await readFile(join(root, TRUST_STATE), 'utf-8');\n\n\t\treturn (JSON.parse(raw) as { declined?: boolean }).declined === true;\n\t} catch {\n\t\treturn false;\n\t}\n}\n\nasync function recordDeclined(root: string): Promise<void> {\n\tconst path = join(root, TRUST_STATE);\n\n\tawait mkdir(dirname(path), { recursive: true });\n\tawait writeFile(path, `${JSON.stringify({ declined: true }, null, 2)}\\n`);\n}\n\n/**\n * Whether this machine already trusts the local authority.\n *\n * Asked by connecting rather than by reading a keychain: what matters is\n * whether a client with no special configuration verifies the edge, and that is\n * one platform-neutral question instead of three platform-specific ones. It is\n * also the exact thing a browser is about to do.\n *\n * A child process, because `NODE_EXTRA_CA_CERTS` is read once at startup and\n * this process almost certainly has it set — asking in-process would answer\n * \"yes\" for everyone.\n */\nexport async function isTrusted(url: string): Promise<boolean> {\n\tconst { NODE_EXTRA_CA_CERTS: _ignored, ...env } = process.env;\n\n\ttry {\n\t\tawait run(\n\t\t\tprocess.execPath,\n\t\t\t['-e', `fetch(${JSON.stringify(url)}).then(()=>0,()=>process.exit(1))`],\n\t\t\t{ env, timeout: 15_000 },\n\t\t);\n\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n}\n\n/**\n * Copy the root somewhere a tool that wants a file can read it.\n *\n * For anything that takes a CA bundle rather than reading the system store —\n * another language's HTTP client, a container, a CI job.\n */\nexport async function exportLocalAuthority(to: string): Promise<void> {\n\tconst { workspace } = await loadWorkspaceConfig();\n\tconst certificate = join(workspace.root, LOCAL_CA_PATH);\n\n\tif (!existsSync(certificate)) throw new NoLocalAuthority(certificate);\n\n\tawait copyFile(certificate, to);\n}\n\n/** The edge has not run, so there is no authority to trust yet. */\nexport class NoLocalAuthority extends Error {\n\tconstructor(readonly path: string) {\n\t\tsuper(\n\t\t\t`No local certificate authority at ${path}. It is generated the first ` +\n\t\t\t\t`time the edge starts, so run \"gkm setup\" (or \"gkm dev\") once — and ` +\n\t\t\t\t`if this project declares no file server, nothing needs one.`,\n\t\t);\n\t\tthis.name = 'NoLocalAuthority';\n\t}\n}\n\n/** A platform with no trust store this knows how to write to. */\nexport class UnsupportedPlatform extends Error {\n\tconstructor(\n\t\treadonly platform: string,\n\t\treadonly certificate: string,\n\t) {\n\t\tsuper(\n\t\t\t`gkm does not know how to install a certificate authority on ` +\n\t\t\t\t`${platform}. The root is at ${certificate} — add it to the trust ` +\n\t\t\t\t`store by hand, or point a client at it with NODE_EXTRA_CA_CERTS.`,\n\t\t);\n\t\tthis.name = 'UnsupportedPlatform';\n\t}\n}\n","import prompts from 'prompts';\nimport { loadWorkspaceConfig } from '../config.js';\nimport {\n\tderivedContainers,\n\treconcileWorkspace,\n} from '../reconcile/workspace.js';\nimport {\n\tcreateStageSecrets,\n\tgenerateConnectionUrls,\n\tgenerateSecurePassword,\n\tgenerateServiceCredentials,\n} from '../secrets/generator.js';\nimport {\n\treadStageSecrets,\n\tsecretsExist,\n\twriteStageSecrets,\n} from '../secrets/storage.js';\nimport { isSSMConfigured, pullSecrets, pushSecrets } from '../secrets/sync.js';\nimport type { StageSecrets } from '../secrets/types.js';\nimport { ensureTrusted } from '../trust/index.js';\nimport type { ComposeServiceName } from '../types.js';\nimport type { LoadedConfig, NormalizedWorkspace } from '../workspace/types.js';\nimport {\n\tgenerateFullstackCustomSecrets,\n\twriteDockerEnvFromSecrets,\n} from './fullstack-secrets.js';\n\nconst logger = console;\n\nexport interface SetupOptions {\n\tstage?: string;\n\tforce?: boolean;\n\tskipDocker?: boolean;\n\tyes?: boolean;\n}\n\n/**\n * Setup development environment.\n *\n * Orchestrates:\n * 1. Load workspace config\n * 2. Resolve secrets (local → SSM → generate fresh)\n * 3. Write docker/.env from secrets\n * 4. Start Docker services\n */\nexport async function setupCommand(options: SetupOptions = {}): Promise<void> {\n\tconst stage = options.stage ?? 'development';\n\n\tlogger.log('\\n🔧 Setting up development environment...\\n');\n\n\t// 1. Load workspace config\n\tlet loadedConfig: LoadedConfig;\n\ttry {\n\t\tloadedConfig = await loadWorkspaceConfig();\n\t} catch {\n\t\tlogger.error(\n\t\t\t'❌ No gkm.config.ts found. Run this command from a workspace root.',\n\t\t);\n\t\tprocess.exit(1);\n\t}\n\n\tconst { workspace } = loadedConfig;\n\tconst isMultiApp = Object.keys(workspace.apps).length > 1;\n\n\tlogger.log(`📦 Workspace: ${workspace.name}`);\n\tlogger.log(`📱 Apps: ${Object.keys(workspace.apps).join(', ')}`);\n\tlogger.log(`🔑 Stage: ${stage}\\n`);\n\n\t// 2. Resolve secrets\n\tconst secrets = await resolveSecrets(stage, workspace, options);\n\n\tif (!secrets) {\n\t\tlogger.error('❌ Failed to resolve secrets. Exiting.');\n\t\tprocess.exit(1);\n\t}\n\n\t// 3. Write docker/.env from secrets (always regenerated as derived file)\n\tconst containers = await derivedContainers(workspace, stage);\n\n\tif (isMultiApp && containers.includes('postgres')) {\n\t\tawait writeDockerEnvFromSecrets(secrets, workspace.root);\n\t\tlogger.log('📄 Generated docker/.env with database passwords');\n\t}\n\n\t// 4. Reconcile the local target: derive containers, allocate ports, start.\n\tif (!options.skipDocker) {\n\t\tlogger.log('');\n\n\t\tawait reconcileLocal(workspace, stage, options);\n\t}\n\n\t// Print summary\n\tprintSummary(workspace, stage);\n}\n\n/**\n * Converge this machine on what the manifest declares.\n *\n * Says what it did in one line and stays silent when it did nothing, because\n * reconciling on every start is only tolerable if the converged case is both\n * free and quiet.\n */\nasync function reconcileLocal(\n\tworkspace: NormalizedWorkspace,\n\tstage: string,\n\toptions: SetupOptions,\n): Promise<void> {\n\tconst result = await reconcileWorkspace(workspace, { stage });\n\n\tif (result.plan.containers.length === 0) {\n\t\tlogger.log('🐳 No containers declared');\n\t\treturn;\n\t}\n\n\tif (!result.changed) {\n\t\tlogger.log('🐳 Services already up to date');\n\t\treturn;\n\t}\n\n\tlogger.log(`🐳 Services: ${result.plan.containers.join(', ')}`);\n\tfor (const [container, address] of Object.entries(result.addresses)) {\n\t\tlogger.log(` ${container}: ${address}`);\n\t}\n\n\t// Only where something actually answers on https. A project with no edge has\n\t// no authority to trust and should never be asked about one.\n\tconst served = result.plan.resources.find((r) => r.kind === 'file-server');\n\tconst url = served ? result.env[served.envKey] : undefined;\n\n\tif (url) {\n\t\tawait ensureTrusted(workspace.root, url, {\n\t\t\t...(workspace.services.trustLocalCa === undefined\n\t\t\t\t? {}\n\t\t\t\t: { configured: workspace.services.trustLocalCa }),\n\t\t\t...(options.yes ? { assumeYes: true } : {}),\n\t\t});\n\t}\n}\n\n/**\n * Resolve secrets with priority:\n * 1. Local secrets exist → use them (preserves manual additions)\n * 2. SSM configured and has secrets → pull and use\n * 3. Neither → generate fresh secrets\n *\n * --force skips checks 1 and 2 and always regenerates.\n */\nasync function resolveSecrets(\n\tstage: string,\n\tworkspace: NormalizedWorkspace,\n\toptions: SetupOptions,\n) {\n\t// Force regeneration\n\tif (options.force) {\n\t\tlogger.log('🔐 Generating fresh secrets (--force)...');\n\t\treturn generateFreshSecrets(stage, workspace, options);\n\t}\n\n\t// Check local secrets first\n\tif (secretsExist(stage, workspace.root)) {\n\t\tlogger.log('🔐 Using existing local secrets');\n\t\tconst secrets = await readStageSecrets(stage, workspace.root);\n\t\tif (secrets) {\n\t\t\t// Reconcile: add any missing workspace-derived keys without overwriting\n\t\t\tconst reconciled = reconcileSecrets(\n\t\t\t\tsecrets,\n\t\t\t\tworkspace,\n\t\t\t\tawait derivedContainers(workspace, stage),\n\t\t\t);\n\t\t\tif (reconciled) {\n\t\t\t\tawait writeStageSecrets(reconciled, workspace.root);\n\t\t\t}\n\t\t\treturn reconciled ?? secrets;\n\t\t}\n\t}\n\n\t// Try SSM pull if configured\n\tif (isSSMConfigured(workspace)) {\n\t\tlogger.log('☁️ Checking for remote secrets in SSM...');\n\t\ttry {\n\t\t\tconst remoteSecrets = await pullSecrets(stage, workspace);\n\t\t\tif (remoteSecrets) {\n\t\t\t\tlogger.log('✅ Pulled secrets from SSM');\n\t\t\t\tawait writeStageSecrets(remoteSecrets, workspace.root);\n\t\t\t\treturn remoteSecrets;\n\t\t\t}\n\t\t\tlogger.log(' No remote secrets found');\n\t\t} catch (error) {\n\t\t\tlogger.warn(`⚠️ Failed to pull from SSM: ${(error as Error).message}`);\n\t\t}\n\t}\n\n\t// Generate fresh secrets\n\tlogger.log('🔐 Generating fresh development secrets...');\n\treturn generateFreshSecrets(stage, workspace, options);\n}\n\n/**\n * Reconcile existing secrets with expected workspace-derived keys.\n * Adds missing keys (e.g. BETTER_AUTH_*) without overwriting existing values.\n * Returns the updated secrets if changes were made, or null if no changes needed.\n * @internal Exported for testing\n */\n/**\n * Which containers hold a credential worth generating.\n *\n * Reconcile's container names, mapped to the service a credential is stored\n * under. `redis-http` is the Upstash-protocol proxy in front of Redis and holds\n * no credential of its own — its token is derived — so it maps to nothing, and\n * `caddy` is an edge with nothing to log into.\n */\nfunction credentialedServices(\n\tcontainers: readonly string[],\n): ComposeServiceName[] {\n\tconst byContainer: Readonly<Record<string, ComposeServiceName>> = {\n\t\tpostgres: 'postgres',\n\t\tredis: 'redis',\n\t\tminio: 'minio',\n\t\tmailpit: 'mailpit',\n\t\tlocalstack: 'localstack',\n\t\trabbitmq: 'rabbitmq',\n\t};\n\n\treturn [\n\t\t...new Set(\n\t\t\tcontainers\n\t\t\t\t.map((container) => byContainer[container])\n\t\t\t\t.filter((name): name is ComposeServiceName => Boolean(name)),\n\t\t),\n\t];\n}\n\nexport function reconcileSecrets(\n\tsecrets: StageSecrets,\n\tworkspace: NormalizedWorkspace,\n\tcontainers: readonly string[] = [],\n): StageSecrets | null {\n\tlet changed = false;\n\tlet result = { ...secrets };\n\n\t// Reconcile service credentials: add missing services\n\tfor (const name of credentialedServices(containers)) {\n\t\tif (!result.services[name]) {\n\t\t\tconst creds = generateServiceCredentials(name);\n\t\t\t// Override defaults with project-derived names\n\t\t\tif (name === 'minio') {\n\t\t\t\tcreds.bucket = workspace.name;\n\t\t\t\tcreds.username = workspace.name;\n\t\t\t}\n\t\t\tresult = {\n\t\t\t\t...result,\n\t\t\t\tservices: { ...result.services, [name]: creds },\n\t\t\t};\n\t\t\tresult.urls = generateConnectionUrls(\n\t\t\t\tresult.services,\n\t\t\t\tresult.eventsBackend,\n\t\t\t);\n\t\t\tlogger.log(` 🔄 Adding missing service credentials: ${name}`);\n\t\t\tchanged = true;\n\t\t}\n\t}\n\n\t// Always add pgboss credentials when postgres is available\n\tif (result.services.postgres && !result.services.pgboss) {\n\t\tresult = {\n\t\t\t...result,\n\t\t\tservices: {\n\t\t\t\t...result.services,\n\t\t\t\tpgboss: {\n\t\t\t\t\thost: result.services.postgres.host,\n\t\t\t\t\tport: result.services.postgres.port,\n\t\t\t\t\tusername: 'pgboss',\n\t\t\t\t\tpassword: generateSecurePassword(),\n\t\t\t\t\tdatabase: result.services.postgres.database ?? 'app',\n\t\t\t\t},\n\t\t\t},\n\t\t};\n\t\tresult.urls = generateConnectionUrls(result.services, result.eventsBackend);\n\t\tlogger.log(' 🔄 Adding missing service credentials: pgboss');\n\t\tchanged = true;\n\t}\n\n\t// Reconcile custom secrets for multi-app workspaces\n\tconst isMultiApp = Object.keys(workspace.apps).length > 1;\n\tif (isMultiApp) {\n\t\tconst expected = generateFullstackCustomSecrets(workspace, containers);\n\t\tconst missing: Record<string, string> = {};\n\n\t\tfor (const [key, value] of Object.entries(expected)) {\n\t\t\tif (!(key in result.custom)) {\n\t\t\t\tmissing[key] = value;\n\t\t\t}\n\t\t}\n\n\t\tif (Object.keys(missing).length > 0) {\n\t\t\tlogger.log(\n\t\t\t\t` 🔄 Adding missing secrets: ${Object.keys(missing).join(', ')}`,\n\t\t\t);\n\t\t\tresult = {\n\t\t\t\t...result,\n\t\t\t\tcustom: { ...result.custom, ...missing },\n\t\t\t};\n\t\t\tchanged = true;\n\t\t}\n\t}\n\n\tif (!changed) {\n\t\treturn null;\n\t}\n\n\treturn {\n\t\t...result,\n\t\tupdatedAt: new Date().toISOString(),\n\t};\n}\n\n/**\n * Build a fresh StageSecrets object for a workspace: service credentials,\n * connection URLs, and custom secrets. Pure — does not write to disk or touch\n * SSM. Service passwords are freshly randomized, so the result must be the same\n * one used to start the matching Docker containers.\n * @internal Exported for reuse by `gkm test` auto-setup.\n */\nexport function createFreshWorkspaceSecrets(\n\tstage: string,\n\tworkspace: NormalizedWorkspace,\n\tcontainers: readonly string[] = [],\n): StageSecrets {\n\t// Which services need a credential is which containers exist, and that is\n\t// the manifest's answer. It used to be a boolean per service read from\n\t// config, which generated a Postgres password for a project with no\n\t// database and none for a project that declared one and set no flag.\n\tconst serviceNames = credentialedServices(containers);\n\n\t// Create base secrets with service credentials\n\tconst secrets = createStageSecrets(stage, serviceNames, {\n\t\tprojectName: workspace.name,\n\t\teventsBackend: workspace.services.events,\n\t});\n\n\t// Generate fullstack-aware custom secrets\n\tconst isMultiApp = Object.keys(workspace.apps).length > 1;\n\tif (isMultiApp) {\n\t\tsecrets.custom = generateFullstackCustomSecrets(workspace, containers);\n\t} else {\n\t\tsecrets.custom = {\n\t\t\tNODE_ENV: 'development',\n\t\t\tPORT: '3000',\n\t\t\tLOG_LEVEL: 'debug',\n\t\t\tJWT_SECRET: `dev-${Date.now()}-${Math.random().toString(36).slice(2)}`,\n\t\t};\n\t}\n\n\treturn secrets;\n}\n\n/**\n * Ensure a usable secret set exists for a stage, generating a fresh one from the\n * workspace config when none is present. No-op if secrets already exist.\n *\n * Powers `gkm test --auto-setup` / `GKM_AUTO_SETUP`: CI can run without a\n * committed secrets file or a shared encryption key — the stage is regenerated\n * from the committed `gkm.config.ts`, and `writeStageSecrets` mints a local key.\n *\n * @returns true if fresh secrets were generated, false if existing ones were kept\n */\nexport async function ensureStageSecrets(\n\tstage: string,\n\tcwd: string = process.cwd(),\n): Promise<boolean> {\n\tconst { workspace } = await loadWorkspaceConfig(cwd);\n\n\tif (secretsExist(stage, workspace.root)) {\n\t\treturn false;\n\t}\n\n\tconst secrets = createFreshWorkspaceSecrets(\n\t\tstage,\n\t\tworkspace,\n\t\tawait derivedContainers(workspace, stage),\n\t);\n\tawait writeStageSecrets(secrets, workspace.root);\n\treturn true;\n}\n\n/**\n * Generate fresh secrets for the workspace.\n */\nasync function generateFreshSecrets(\n\tstage: string,\n\tworkspace: NormalizedWorkspace,\n\toptions: SetupOptions,\n) {\n\tconst secrets = createFreshWorkspaceSecrets(\n\t\tstage,\n\t\tworkspace,\n\t\tawait derivedContainers(workspace, stage),\n\t);\n\n\t// Write secrets\n\tawait writeStageSecrets(secrets, workspace.root);\n\tlogger.log(` Secrets written to .gkm/secrets/${stage}.json`);\n\n\t// Offer to push to SSM if configured\n\tif (isSSMConfigured(workspace) && !options.yes) {\n\t\tconst { shouldPush } = await prompts({\n\t\t\ttype: 'confirm',\n\t\t\tname: 'shouldPush',\n\t\t\tmessage: 'Push secrets to SSM for team sharing?',\n\t\t\tinitial: true,\n\t\t});\n\n\t\tif (shouldPush) {\n\t\t\ttry {\n\t\t\t\tawait pushSecrets(stage, workspace);\n\t\t\t\tlogger.log('☁️ Secrets pushed to SSM');\n\t\t\t} catch (error) {\n\t\t\t\tlogger.warn(`⚠️ Failed to push to SSM: ${(error as Error).message}`);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn secrets;\n}\n\n/**\n * Print setup summary with next steps.\n */\nfunction printSummary(workspace: NormalizedWorkspace, stage: string): void {\n\tlogger.log(`\\n${'─'.repeat(50)}`);\n\tlogger.log('\\n✅ Development environment ready!\\n');\n\n\tlogger.log('📋 Apps:');\n\tfor (const [name, app] of Object.entries(workspace.apps)) {\n\t\tconst icon =\n\t\t\tapp.type === 'web' ? '🌐' : app.type === 'mobile' ? '📱' : '🔧';\n\t\tlogger.log(` ${icon} ${name} → http://localhost:${app.port}`);\n\t}\n\n\tlogger.log('\\n🚀 Next steps:');\n\tlogger.log(' gkm dev # Start all apps');\n\tlogger.log(` gkm secrets:show --stage ${stage} # View secrets`);\n\tlogger.log('');\n}\n"],"mappings":";;;;;;;;;;;;;;;AAwBA,MAAMA,WAAS;AAEf,MAAM,MAAM,yBAAUC,4BAAS;;;;;;;;;AAe/B,SAAS,aACRC,UACAC,aACoD;AACpD,KAAI,aAAa,SAChB,QAAO;EACN,UAAU;EACV,OAAO,CACN,CACC,QACA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACA,CACD,CACD;CACD;AAGF,KAAI,aAAa,SAAS;EAGzB,MAAM,SAAS,wBAAW,mCAAmC;AAE7D,SAAO;GACN,UAAU,SAAS,yBAAyB;GAC5C,OAAO,SACJ,CACA,CACC,QACA;IACC;IACA;IACA;GACA,CACD,GACD,CAAC,QAAQ,CAAC,wBAAyB,CAAC,CACpC,IACA,CACA,CACC,QACA;IACC;IACA;IACA;GACA,CACD,GACD,CAAC,QAAQ,CAAC,iBAAkB,CAAC,CAC7B;EACH;CACD;AAED,OAAM,IAAI,oBAAoB,UAAU;AACxC;;;;;;;AAQD,eAAsB,aAAaC,UAAwB,CAAE,GAAiB;CAC7E,MAAM,EAAE,WAAW,GAAG,MAAM,oCAAqB;CACjD,MAAM,cAAc,oBAAK,UAAU,MAAMC,kCAAc;AAEvD,MAAK,wBAAW,YAAY,CAC3B,OAAM,IAAI,iBAAiB;CAG5B,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AK,MAAM,CAAC,MAAM,IAAI,IAAI,OAAO,QAAQ,UAAU,KAAK,EAAE;EACzD,MAAM,OACL,IAAI,SAAS,QAAQ,OAAO,IAAI,SAAS,WAAW,OAAO;AAC5D,SAAO,KAAK,KAAK,KAAK,GAAG,KAAK,sBAAsB,IAAI,KAAK,EAAE;CAC/D;AAED,QAAO,IAAI,mBAAmB;AAC9B,QAAO,IAAI,iDAAiD;AAC5D,QAAO,KAAK,8BAA8B,MAAM,kBAAkB;AAClE,QAAO,IAAI,GAAG;AACd"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
require('./discover-DTmFeloL.cjs');
|
|
2
|
+
require('./config-DbPE1KXF.cjs');
|
|
3
|
+
require('./workspace-XvqO9jIv.cjs');
|
|
4
|
+
require('./credentials-K961ThG3.cjs');
|
|
5
|
+
require('./generator-CNzBw7g5.cjs');
|
|
6
|
+
require('./storage-BJmzYxt8.cjs');
|
|
7
|
+
require('./fullstack-secrets-C-GGohke.cjs');
|
|
8
|
+
require('./sync-SizaChmC.cjs');
|
|
9
|
+
const require_setup = require('./setup-CJiQM2pX.cjs');
|
|
10
|
+
|
|
11
|
+
exports.ensureStageSecrets = require_setup.ensureStageSecrets;
|