@geekmidas/cli 10.0.0-alpha.9 → 10.0.0-alpha.91
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 +315 -414
- package/bin/adjacent-tsconfig.mjs +46 -8
- package/bin/gkm.mjs +11 -3
- package/bin/owning-tsconfig-jsx-register.mjs +18 -0
- package/bin/owning-tsconfig-jsx.mjs +108 -0
- package/dist/EndpointGenerator-CVc6Oi1Y.mjs +1021 -0
- package/dist/EndpointGenerator-CVc6Oi1Y.mjs.map +1 -0
- package/dist/EndpointGenerator-CwLjBCFE.cjs +1080 -0
- package/dist/EndpointGenerator-CwLjBCFE.cjs.map +1 -0
- package/dist/GoDaddyProvider-DSStJVAv.mjs +387 -0
- package/dist/GoDaddyProvider-DSStJVAv.mjs.map +1 -0
- package/dist/GoDaddyProvider-DqZ1qD_F.cjs +387 -0
- package/dist/GoDaddyProvider-DqZ1qD_F.cjs.map +1 -0
- package/dist/{HostingerProvider-Cft7lEYr.mjs → HostingerProvider-BI6J7oJr.mjs} +22 -23
- package/dist/HostingerProvider-BI6J7oJr.mjs.map +1 -0
- package/dist/{HostingerProvider-h3EbEp-Z.cjs → HostingerProvider-CyTpG_jy.cjs} +22 -23
- package/dist/HostingerProvider-CyTpG_jy.cjs.map +1 -0
- package/dist/LegacyStateStore-DXmNA7hy.cjs +89 -0
- package/dist/LegacyStateStore-DXmNA7hy.cjs.map +1 -0
- package/dist/LegacyStateStore-ZkdmiUFZ.mjs +89 -0
- package/dist/LegacyStateStore-ZkdmiUFZ.mjs.map +1 -0
- package/dist/LocalStateStore-BBeTlRTH.cjs +178 -0
- package/dist/LocalStateStore-BBeTlRTH.cjs.map +1 -0
- package/dist/LocalStateStore-CU-O0SBp.mjs +167 -0
- package/dist/LocalStateStore-CU-O0SBp.mjs.map +1 -0
- package/dist/OpenApiTsGenerator-B--HV-sW.cjs +541 -0
- package/dist/OpenApiTsGenerator-B--HV-sW.cjs.map +1 -0
- package/dist/OpenApiTsGenerator-CkvsPdgg.mjs +536 -0
- package/dist/OpenApiTsGenerator-CkvsPdgg.mjs.map +1 -0
- package/dist/{Route53Provider-di2fMM5N.cjs → Route53Provider-Bllus2NR.cjs} +21 -22
- package/dist/Route53Provider-Bllus2NR.cjs.map +1 -0
- package/dist/{Route53Provider-RdpUDJQk.mjs → Route53Provider-QXxjkZO1.mjs} +13 -13
- package/dist/Route53Provider-QXxjkZO1.mjs.map +1 -0
- package/dist/S3StateStore-Br8VMY22.cjs +160 -0
- package/dist/S3StateStore-Br8VMY22.cjs.map +1 -0
- package/dist/S3StateStore-bwxcI_wQ.mjs +161 -0
- package/dist/S3StateStore-bwxcI_wQ.mjs.map +1 -0
- package/dist/SSMStateStore-CsOS0W1y.mjs +154 -0
- package/dist/SSMStateStore-CsOS0W1y.mjs.map +1 -0
- package/dist/SSMStateStore-DoZE1Wi1.cjs +153 -0
- package/dist/SSMStateStore-DoZE1Wi1.cjs.map +1 -0
- package/dist/SubscriberGenerator-BPqQf8fB.mjs +448 -0
- package/dist/SubscriberGenerator-BPqQf8fB.mjs.map +1 -0
- package/dist/SubscriberGenerator-BVn7cQ-2.cjs +489 -0
- package/dist/SubscriberGenerator-BVn7cQ-2.cjs.map +1 -0
- package/dist/add-BSHk5Ngn.mjs +747 -0
- package/dist/add-BSHk5Ngn.mjs.map +1 -0
- package/dist/add-DmmBDV2e.cjs +749 -0
- package/dist/add-DmmBDV2e.cjs.map +1 -0
- package/dist/appPorts-C9z9Pzn9.mjs +223 -0
- package/dist/appPorts-C9z9Pzn9.mjs.map +1 -0
- package/dist/appPorts-Cu79hJF6.cjs +264 -0
- package/dist/appPorts-Cu79hJF6.cjs.map +1 -0
- package/dist/aws-B-6uEhgP.mjs +71 -0
- package/dist/aws-B-6uEhgP.mjs.map +1 -0
- package/dist/aws-BTawF0F-.cjs +82 -0
- package/dist/aws-BTawF0F-.cjs.map +1 -0
- package/dist/awsStore-7VmS_cZR.cjs +54 -0
- package/dist/awsStore-7VmS_cZR.cjs.map +1 -0
- package/dist/awsStore-B529csle.mjs +43 -0
- package/dist/awsStore-B529csle.mjs.map +1 -0
- package/dist/{backup-provisioner-Bgj5Vi_L.mjs → backup-provisioner-C8DnCmxK.mjs} +11 -8
- package/dist/backup-provisioner-C8DnCmxK.mjs.map +1 -0
- package/dist/{backup-provisioner-BrsHwYG0.cjs → backup-provisioner-oDEsPj02.cjs} +22 -20
- package/dist/backup-provisioner-oDEsPj02.cjs.map +1 -0
- package/dist/{bundler-BY1OmV1e.cjs → bundler-BQJiB7Ub.cjs} +38 -35
- package/dist/bundler-BQJiB7Ub.cjs.map +1 -0
- package/dist/{bundler-Be8Zg4Wd.mjs → bundler-D6eBfVkl.mjs} +36 -32
- package/dist/bundler-D6eBfVkl.mjs.map +1 -0
- package/dist/cli-BE9mqeX8.cjs +69 -0
- package/dist/cli-BE9mqeX8.cjs.map +1 -0
- package/dist/cli-DD-Yk-I5.mjs +69 -0
- package/dist/cli-DD-Yk-I5.mjs.map +1 -0
- package/dist/compose-Bhmf0n4o.mjs +3140 -0
- package/dist/compose-Bhmf0n4o.mjs.map +1 -0
- package/dist/compose-CvpU6ooi.cjs +3265 -0
- package/dist/compose-CvpU6ooi.cjs.map +1 -0
- package/dist/config-CdEcTrjG.d.mts +269 -0
- package/dist/config-CdEcTrjG.d.mts.map +1 -0
- package/dist/config-pST7E0CS.d.cts +269 -0
- package/dist/config-pST7E0CS.d.cts.map +1 -0
- package/dist/config.cjs +420 -11
- package/dist/config.cjs.map +1 -0
- package/dist/config.d.cts +4 -120
- package/dist/config.d.mts +4 -120
- package/dist/config.mjs +404 -4
- package/dist/config.mjs.map +1 -0
- package/dist/credentialSchemas-BJqRJNK4.mjs +236 -0
- package/dist/credentialSchemas-BJqRJNK4.mjs.map +1 -0
- package/dist/credentialSchemas-DCR4Wd1W.cjs +271 -0
- package/dist/credentialSchemas-DCR4Wd1W.cjs.map +1 -0
- package/dist/credentials-BKfIugu2.cjs +513 -0
- package/dist/credentials-BKfIugu2.cjs.map +1 -0
- package/dist/credentials-CnVqoXMb.mjs +388 -0
- package/dist/credentials-CnVqoXMb.mjs.map +1 -0
- package/dist/databases-BY-pEImp.cjs +597 -0
- package/dist/databases-BY-pEImp.cjs.map +1 -0
- package/dist/databases-CzszQV0N.mjs +494 -0
- package/dist/databases-CzszQV0N.mjs.map +1 -0
- package/dist/define-DR8xGYfL.mjs +97 -0
- package/dist/define-DR8xGYfL.mjs.map +1 -0
- package/dist/define-DzRz8FgH.cjs +144 -0
- package/dist/define-DzRz8FgH.cjs.map +1 -0
- package/dist/deploy/public.cjs +208 -0
- package/dist/deploy/public.cjs.map +1 -0
- package/dist/deploy/public.d.cts +649 -0
- package/dist/deploy/public.d.cts.map +1 -0
- package/dist/deploy/public.d.mts +649 -0
- package/dist/deploy/public.d.mts.map +1 -0
- package/dist/deploy/public.mjs +142 -0
- package/dist/deploy/public.mjs.map +1 -0
- package/dist/deploy/sniffer-envkit-patch.cjs +18 -10
- package/dist/deploy/sniffer-envkit-patch.cjs.map +1 -1
- package/dist/deploy/sniffer-envkit-patch.d.cts +0 -2
- package/dist/deploy/sniffer-envkit-patch.d.cts.map +1 -1
- package/dist/deploy/sniffer-envkit-patch.d.mts +0 -2
- package/dist/deploy/sniffer-envkit-patch.d.mts.map +1 -1
- package/dist/deploy/sniffer-envkit-patch.mjs +10 -2
- package/dist/deploy/sniffer-envkit-patch.mjs.map +1 -1
- package/dist/deploy/sniffer-envparser-worker.cjs +54 -0
- package/dist/deploy/sniffer-envparser-worker.cjs.map +1 -0
- package/dist/deploy/sniffer-envparser-worker.d.cts +1 -0
- package/dist/deploy/sniffer-envparser-worker.d.mts +1 -0
- package/dist/deploy/sniffer-envparser-worker.mjs +55 -0
- package/dist/deploy/sniffer-envparser-worker.mjs.map +1 -0
- package/dist/deploy/sniffer-hooks.cjs +13 -7
- package/dist/deploy/sniffer-hooks.cjs.map +1 -1
- package/dist/deploy/sniffer-hooks.d.cts +1 -2
- package/dist/deploy/sniffer-hooks.d.cts.map +1 -1
- package/dist/deploy/sniffer-hooks.d.mts +1 -2
- package/dist/deploy/sniffer-hooks.d.mts.map +1 -1
- package/dist/deploy/sniffer-hooks.mjs +10 -3
- package/dist/deploy/sniffer-hooks.mjs.map +1 -1
- package/dist/deploy/sniffer-loader.cjs +16 -7
- package/dist/deploy/sniffer-loader.cjs.map +1 -1
- package/dist/deploy/sniffer-loader.d.cts +1 -1
- package/dist/deploy/sniffer-loader.d.mts +1 -1
- package/dist/deploy/sniffer-loader.mjs +14 -3
- package/dist/deploy/sniffer-loader.mjs.map +1 -1
- package/dist/deploy/sniffer-routes-worker.cjs +11 -11
- package/dist/deploy/sniffer-routes-worker.cjs.map +1 -1
- package/dist/deploy/sniffer-routes-worker.d.cts +1 -1
- package/dist/deploy/sniffer-routes-worker.d.mts +1 -1
- package/dist/deploy/sniffer-routes-worker.mjs +4 -4
- package/dist/deploy/sniffer-routes-worker.mjs.map +1 -1
- package/dist/deploy/sniffer-worker.cjs +15 -6
- package/dist/deploy/sniffer-worker.cjs.map +1 -1
- package/dist/deploy/sniffer-worker.d.cts +1 -3
- package/dist/deploy/sniffer-worker.d.cts.map +1 -1
- package/dist/deploy/sniffer-worker.d.mts +1 -3
- package/dist/deploy/sniffer-worker.d.mts.map +1 -1
- package/dist/deploy/sniffer-worker.mjs +15 -4
- package/dist/deploy/sniffer-worker.mjs.map +1 -1
- package/dist/deploy-CuHasEA4.cjs +554 -0
- package/dist/deploy-CuHasEA4.cjs.map +1 -0
- package/dist/deploy-QNtx_eWR.mjs +525 -0
- package/dist/deploy-QNtx_eWR.mjs.map +1 -0
- package/dist/derive-B4vDpzgP.mjs +150 -0
- package/dist/derive-B4vDpzgP.mjs.map +1 -0
- package/dist/derive-DAbo49sm.cjs +161 -0
- package/dist/derive-DAbo49sm.cjs.map +1 -0
- package/dist/discover-BPelzeGW.mjs +526 -0
- package/dist/discover-BPelzeGW.mjs.map +1 -0
- package/dist/discover-CU0paUyH.d.cts +108 -0
- package/dist/discover-CU0paUyH.d.cts.map +1 -0
- package/dist/discover-D1It5r_h.cjs +599 -0
- package/dist/discover-D1It5r_h.cjs.map +1 -0
- package/dist/discover-DFiJxwfv.d.mts +108 -0
- package/dist/discover-DFiJxwfv.d.mts.map +1 -0
- package/dist/dokploy-CYcMLh9-.mjs +38 -0
- package/dist/dokploy-CYcMLh9-.mjs.map +1 -0
- package/dist/dokploy-DIowwyIB.cjs +38 -0
- package/dist/dokploy-DIowwyIB.cjs.map +1 -0
- package/dist/drivers-DTZzxeIl.mjs +177 -0
- package/dist/drivers-DTZzxeIl.mjs.map +1 -0
- package/dist/drivers-LYSdQDmd.cjs +200 -0
- package/dist/drivers-LYSdQDmd.cjs.map +1 -0
- package/dist/{emit-CiZS_5Ub.mjs → emit-C1e8qD08.mjs} +13 -26
- package/dist/emit-C1e8qD08.mjs.map +1 -0
- package/dist/{emit-CbcRolsa.cjs → emit-Dmc1nvdS.cjs} +31 -57
- package/dist/emit-Dmc1nvdS.cjs.map +1 -0
- package/dist/encryption-BrEef7Jk.mjs +88 -0
- package/dist/encryption-BrEef7Jk.mjs.map +1 -0
- package/dist/encryption-CjYdUb2s.cjs +89 -0
- package/dist/encryption-CjYdUb2s.cjs.map +1 -0
- package/dist/engine-2h4k5ICq.mjs +3085 -0
- package/dist/engine-2h4k5ICq.mjs.map +1 -0
- package/dist/engine-BhJ7ZP9K.cjs +3198 -0
- package/dist/engine-BhJ7ZP9K.cjs.map +1 -0
- package/dist/github-B5Bw4HIu.cjs +669 -0
- package/dist/github-B5Bw4HIu.cjs.map +1 -0
- package/dist/github-BCDF6xVH.mjs +669 -0
- package/dist/github-BCDF6xVH.mjs.map +1 -0
- package/dist/{index-C6e-ULLx.d.mts → index-D-F_hTDz.d.cts} +39 -24
- package/dist/index-D-F_hTDz.d.cts.map +1 -0
- package/dist/{index-CR5urhWX.d.cts → index-YFNxR5Ns.d.mts} +39 -24
- package/dist/index-YFNxR5Ns.d.mts.map +1 -0
- package/dist/index.cjs +9487 -12080
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +9420 -12026
- package/dist/index.mjs.map +1 -1
- package/dist/local-BjxDfPvy.cjs +241 -0
- package/dist/local-BjxDfPvy.cjs.map +1 -0
- package/dist/local-IuoIF3CT.mjs +224 -0
- package/dist/local-IuoIF3CT.mjs.map +1 -0
- package/dist/migrate-CGaancHY.cjs +93 -0
- package/dist/migrate-CGaancHY.cjs.map +1 -0
- package/dist/migrate-DWZz9kah.mjs +93 -0
- package/dist/migrate-DWZz9kah.mjs.map +1 -0
- package/dist/migrate-DbtcuOr_.mjs +265 -0
- package/dist/migrate-DbtcuOr_.mjs.map +1 -0
- package/dist/migrate-q2YYLJLE.cjs +270 -0
- package/dist/migrate-q2YYLJLE.cjs.map +1 -0
- package/dist/openapi.cjs +214 -10
- package/dist/openapi.cjs.map +1 -0
- package/dist/openapi.d.cts +47 -17
- package/dist/openapi.d.cts.map +1 -1
- package/dist/openapi.d.mts +47 -17
- package/dist/openapi.d.mts.map +1 -1
- package/dist/openapi.mjs +208 -5
- package/dist/openapi.mjs.map +1 -0
- package/dist/provider-C9_-45d5.cjs +56 -0
- package/dist/provider-C9_-45d5.cjs.map +1 -0
- package/dist/provider-q4lsYzYG.mjs +45 -0
- package/dist/provider-q4lsYzYG.mjs.map +1 -0
- package/dist/ready-BpNbORRB.cjs +402 -0
- package/dist/ready-BpNbORRB.cjs.map +1 -0
- package/dist/ready-b6vm0-W-.mjs +373 -0
- package/dist/ready-b6vm0-W-.mjs.map +1 -0
- package/dist/reconcile/public.cjs +3 -5
- package/dist/reconcile/public.d.cts +11 -87
- package/dist/reconcile/public.d.cts.map +1 -1
- package/dist/reconcile/public.d.mts +11 -87
- package/dist/reconcile/public.d.mts.map +1 -1
- package/dist/reconcile/public.mjs +3 -4
- package/dist/{reconcile-D0pimNiy.cjs → reconcile-CuCQBa5-.cjs} +5 -8
- package/dist/reconcile-CuCQBa5-.cjs.map +1 -0
- package/dist/{reconcile-CFs8C_1a.mjs → reconcile-Dh1Jk7WE.mjs} +4 -7
- package/dist/reconcile-Dh1Jk7WE.mjs.map +1 -0
- package/dist/resolve-Cns0v6dN.cjs +315 -0
- package/dist/resolve-Cns0v6dN.cjs.map +1 -0
- package/dist/resolve-DNg0icnh.mjs +262 -0
- package/dist/resolve-DNg0icnh.mjs.map +1 -0
- package/dist/rollback-CFrNLmxs.mjs +132 -0
- package/dist/rollback-CFrNLmxs.mjs.map +1 -0
- package/dist/rollback-UIjS25F1.cjs +161 -0
- package/dist/rollback-UIjS25F1.cjs.map +1 -0
- package/dist/rolldown-runtime-BhDjJH2R.mjs +15 -0
- package/dist/{chunk-CUT6urMc.cjs → rolldown-runtime-C0BPl7ul.cjs} +23 -10
- package/dist/runtime-CN_kmqxo.d.cts +90 -0
- package/dist/runtime-CN_kmqxo.d.cts.map +1 -0
- package/dist/runtime-Cjvon3oj.d.mts +90 -0
- package/dist/runtime-Cjvon3oj.d.mts.map +1 -0
- package/dist/sandbox/config-worker.cjs +43 -0
- package/dist/sandbox/config-worker.cjs.map +1 -0
- package/dist/sandbox/config-worker.d.cts +1 -0
- package/dist/sandbox/config-worker.d.mts +1 -0
- package/dist/sandbox/config-worker.mjs +44 -0
- package/dist/sandbox/config-worker.mjs.map +1 -0
- package/dist/sandbox/credentials-worker.cjs +54 -0
- package/dist/sandbox/credentials-worker.cjs.map +1 -0
- package/dist/sandbox/credentials-worker.d.cts +1 -0
- package/dist/sandbox/credentials-worker.d.mts +1 -0
- package/dist/sandbox/credentials-worker.mjs +55 -0
- package/dist/sandbox/credentials-worker.mjs.map +1 -0
- package/dist/sandbox/discover-worker.cjs +47 -0
- package/dist/sandbox/discover-worker.cjs.map +1 -0
- package/dist/sandbox/discover-worker.d.cts +1 -0
- package/dist/sandbox/discover-worker.d.mts +1 -0
- package/dist/sandbox/discover-worker.mjs +48 -0
- package/dist/sandbox/discover-worker.mjs.map +1 -0
- package/dist/sandbox/migrate-worker.cjs +75 -0
- package/dist/sandbox/migrate-worker.cjs.map +1 -0
- package/dist/sandbox/migrate-worker.d.cts +1 -0
- package/dist/sandbox/migrate-worker.d.mts +1 -0
- package/dist/sandbox/migrate-worker.mjs +76 -0
- package/dist/sandbox/migrate-worker.mjs.map +1 -0
- package/dist/sandbox-CL--ZDui.cjs +164 -0
- package/dist/sandbox-CL--ZDui.cjs.map +1 -0
- package/dist/sandbox-Dm247NGx.mjs +117 -0
- package/dist/sandbox-Dm247NGx.mjs.map +1 -0
- package/dist/sandbox-M8UnLhXE.d.cts +126 -0
- package/dist/sandbox-M8UnLhXE.d.cts.map +1 -0
- package/dist/sandbox-M8UnLhXE.d.mts +126 -0
- package/dist/sandbox-M8UnLhXE.d.mts.map +1 -0
- package/dist/{workspace-zoqRbihZ.mjs → schemas-BObwxB_t.cjs} +998 -1659
- package/dist/schemas-BObwxB_t.cjs.map +1 -0
- package/dist/{workspace-C6VJQVtG.cjs → schemas-D-xeKJDD.mjs} +913 -1842
- package/dist/schemas-D-xeKJDD.mjs.map +1 -0
- package/dist/secretsManager-Chs9VV2r.mjs +76 -0
- package/dist/secretsManager-Chs9VV2r.mjs.map +1 -0
- package/dist/secretsManager-DcMlHnRC.cjs +87 -0
- package/dist/secretsManager-DcMlHnRC.cjs.map +1 -0
- package/dist/seeds-CkIPFGNO.cjs +10560 -0
- package/dist/seeds-CkIPFGNO.cjs.map +1 -0
- package/dist/seeds-odfgSCmu.mjs +9538 -0
- package/dist/seeds-odfgSCmu.mjs.map +1 -0
- package/dist/sniffer-BTtX3NUM.mjs +1262 -0
- package/dist/sniffer-BTtX3NUM.mjs.map +1 -0
- package/dist/sniffer-IAQEpsQb.cjs +1333 -0
- package/dist/sniffer-IAQEpsQb.cjs.map +1 -0
- package/dist/sst-BgcOsaBi.cjs +453 -0
- package/dist/sst-BgcOsaBi.cjs.map +1 -0
- package/dist/sst-CJzvyrEz.mjs +430 -0
- package/dist/sst-CJzvyrEz.mjs.map +1 -0
- package/dist/stages-CUn6gvXL.cjs +174 -0
- package/dist/stages-CUn6gvXL.cjs.map +1 -0
- package/dist/stages-CnZRYmkI.mjs +174 -0
- package/dist/stages-CnZRYmkI.mjs.map +1 -0
- package/dist/target/public.cjs +15 -0
- package/dist/target/public.d.cts +28 -0
- package/dist/target/public.d.cts.map +1 -0
- package/dist/target/public.d.mts +28 -0
- package/dist/target/public.d.mts.map +1 -0
- package/dist/target/public.mjs +4 -0
- package/dist/terminal-D8TPK7o9.mjs +84 -0
- package/dist/terminal-D8TPK7o9.mjs.map +1 -0
- package/dist/terminal-DuapRxh6.cjs +84 -0
- package/dist/terminal-DuapRxh6.cjs.map +1 -0
- package/dist/types-NqX1Hz4P.d.cts +7454 -0
- package/dist/types-NqX1Hz4P.d.cts.map +1 -0
- package/dist/types-ZHuZ89hv.d.mts +7453 -0
- package/dist/types-ZHuZ89hv.d.mts.map +1 -0
- package/dist/utils-D2Nk1Nv2.cjs +205 -0
- package/dist/utils-D2Nk1Nv2.cjs.map +1 -0
- package/dist/utils-D_fxUqvU.mjs +156 -0
- package/dist/utils-D_fxUqvU.mjs.map +1 -0
- package/dist/vitest.cjs +65 -0
- package/dist/vitest.cjs.map +1 -0
- package/dist/vitest.d.cts +29 -0
- package/dist/vitest.d.cts.map +1 -0
- package/dist/vitest.d.mts +29 -0
- package/dist/vitest.d.mts.map +1 -0
- package/dist/vitest.mjs +65 -0
- package/dist/vitest.mjs.map +1 -0
- package/dist/workerRuntime-BXfhbe13.cjs +108 -0
- package/dist/workerRuntime-BXfhbe13.cjs.map +1 -0
- package/dist/workerRuntime-CsOyBRx2.mjs +79 -0
- package/dist/workerRuntime-CsOyBRx2.mjs.map +1 -0
- package/dist/workspace/index.cjs +8 -4
- package/dist/workspace/index.d.cts +3 -3
- package/dist/workspace/index.d.mts +3 -3
- package/dist/workspace/index.mjs +2 -3
- package/dist/workspace-CJ0lKFq-.mjs +1979 -0
- package/dist/workspace-CJ0lKFq-.mjs.map +1 -0
- package/dist/workspace-CwW3Gkru.cjs +2355 -0
- package/dist/workspace-CwW3Gkru.cjs.map +1 -0
- package/package.json +53 -22
- package/dist/CachedStateProvider-BLo7zv7S.cjs +0 -3
- package/dist/CachedStateProvider-BxoAm-B2.mjs +0 -3
- package/dist/CachedStateProvider-CqPdW7CB.cjs +0 -60
- package/dist/CachedStateProvider-CqPdW7CB.cjs.map +0 -1
- package/dist/CachedStateProvider-DTniehMP.mjs +0 -54
- package/dist/CachedStateProvider-DTniehMP.mjs.map +0 -1
- package/dist/HostingerProvider-Cft7lEYr.mjs.map +0 -1
- package/dist/HostingerProvider-h3EbEp-Z.cjs.map +0 -1
- package/dist/LocalStateProvider-Bn6tS-oL.mjs +0 -42
- package/dist/LocalStateProvider-Bn6tS-oL.mjs.map +0 -1
- package/dist/LocalStateProvider-Db9SEjyH.cjs +0 -43
- package/dist/LocalStateProvider-Db9SEjyH.cjs.map +0 -1
- package/dist/Route53Provider-RdpUDJQk.mjs.map +0 -1
- package/dist/Route53Provider-di2fMM5N.cjs.map +0 -1
- package/dist/SSMStateProvider-BRt2py-A.mjs +0 -66
- package/dist/SSMStateProvider-BRt2py-A.mjs.map +0 -1
- package/dist/SSMStateProvider-DyX8s9HI.cjs +0 -66
- package/dist/SSMStateProvider-DyX8s9HI.cjs.map +0 -1
- package/dist/backup-provisioner-Bgj5Vi_L.mjs.map +0 -1
- package/dist/backup-provisioner-BrsHwYG0.cjs.map +0 -1
- package/dist/bundler-BY1OmV1e.cjs.map +0 -1
- package/dist/bundler-Be8Zg4Wd.mjs.map +0 -1
- package/dist/chunk-Duj1WY3L.mjs +0 -7
- package/dist/config-BZ1F0WuA.cjs +0 -462
- package/dist/config-BZ1F0WuA.cjs.map +0 -1
- package/dist/config-DVVph9yz.mjs +0 -402
- package/dist/config-DVVph9yz.mjs.map +0 -1
- package/dist/config.d.cts.map +0 -1
- package/dist/config.d.mts.map +0 -1
- package/dist/credentials-B5zRHdAl.mjs +0 -141
- package/dist/credentials-B5zRHdAl.mjs.map +0 -1
- package/dist/credentials-BapzjyV5.cjs +0 -195
- package/dist/credentials-BapzjyV5.cjs.map +0 -1
- package/dist/credentials-Xamqe_NJ.cjs +0 -2681
- package/dist/credentials-Xamqe_NJ.cjs.map +0 -1
- package/dist/credentials-dP8vRVRv.mjs +0 -2549
- package/dist/credentials-dP8vRVRv.mjs.map +0 -1
- package/dist/discover-CAlFgYec.mjs +0 -229
- package/dist/discover-CAlFgYec.mjs.map +0 -1
- package/dist/discover-DTmFeloL.cjs +0 -271
- package/dist/discover-DTmFeloL.cjs.map +0 -1
- package/dist/dokploy-api-BS2xnJLZ.mjs +0 -3
- package/dist/dokploy-api-BsVH0y_s.cjs +0 -718
- package/dist/dokploy-api-BsVH0y_s.cjs.map +0 -1
- package/dist/dokploy-api-BuxDRo3l.cjs +0 -3
- package/dist/dokploy-api-aTFPz7_4.mjs +0 -706
- package/dist/dokploy-api-aTFPz7_4.mjs.map +0 -1
- package/dist/emit-CbcRolsa.cjs.map +0 -1
- package/dist/emit-CiZS_5Ub.mjs.map +0 -1
- package/dist/encryption-C6jaU0hE.cjs +0 -54
- package/dist/encryption-C6jaU0hE.cjs.map +0 -1
- package/dist/encryption-CHzzeR8a.cjs +0 -4
- package/dist/encryption-CQUncu7v.mjs +0 -3
- package/dist/encryption-D-abyhZx.mjs +0 -42
- package/dist/encryption-D-abyhZx.mjs.map +0 -1
- package/dist/fullstack-secrets-C-GGohke.cjs +0 -111
- package/dist/fullstack-secrets-C-GGohke.cjs.map +0 -1
- package/dist/fullstack-secrets-D1o9-G5l.mjs +0 -87
- package/dist/fullstack-secrets-D1o9-G5l.mjs.map +0 -1
- package/dist/generator-CNzBw7g5.cjs +0 -289
- package/dist/generator-CNzBw7g5.cjs.map +0 -1
- package/dist/generator-VE2JrFlY.mjs +0 -253
- package/dist/generator-VE2JrFlY.mjs.map +0 -1
- package/dist/index-C6e-ULLx.d.mts.map +0 -1
- package/dist/index-CR5urhWX.d.cts.map +0 -1
- package/dist/openapi-SjsgARie.cjs +0 -2075
- package/dist/openapi-SjsgARie.cjs.map +0 -1
- package/dist/openapi-Xx0A7Wg0.mjs +0 -2021
- package/dist/openapi-Xx0A7Wg0.mjs.map +0 -1
- package/dist/openapi-react-query-Byltvm_7.mjs +0 -167
- package/dist/openapi-react-query-Byltvm_7.mjs.map +0 -1
- package/dist/openapi-react-query-CmJ1xDbn.cjs +0 -173
- package/dist/openapi-react-query-CmJ1xDbn.cjs.map +0 -1
- package/dist/openapi-react-query.cjs +0 -4
- package/dist/openapi-react-query.d.cts +0 -11
- package/dist/openapi-react-query.d.cts.map +0 -1
- package/dist/openapi-react-query.d.mts +0 -11
- package/dist/openapi-react-query.d.mts.map +0 -1
- package/dist/openapi-react-query.mjs +0 -4
- package/dist/reconcile-CFs8C_1a.mjs.map +0 -1
- package/dist/reconcile-D0pimNiy.cjs.map +0 -1
- package/dist/setup-BA8ciTPU.mjs +0 -11
- package/dist/setup-BsZvZP6f.cjs +0 -11
- package/dist/setup-C8KOx8_8.mjs +0 -443
- package/dist/setup-C8KOx8_8.mjs.map +0 -1
- package/dist/setup-hC6hI86f.cjs +0 -473
- package/dist/setup-hC6hI86f.cjs.map +0 -1
- package/dist/storage-BJmzYxt8.cjs +0 -363
- package/dist/storage-BJmzYxt8.cjs.map +0 -1
- package/dist/storage-BM9hGpgv.cjs +0 -7
- package/dist/storage-Bi24WfoW.mjs +0 -297
- package/dist/storage-Bi24WfoW.mjs.map +0 -1
- package/dist/storage-CYlGwWTj.mjs +0 -3
- package/dist/sync-CmEuNZsB.mjs +0 -76
- package/dist/sync-CmEuNZsB.mjs.map +0 -1
- package/dist/sync-D306yOWu.cjs +0 -4
- package/dist/sync-SizaChmC.cjs +0 -93
- package/dist/sync-SizaChmC.cjs.map +0 -1
- package/dist/sync-hOqAWHR6.mjs +0 -3
- package/dist/types-6pkp2RRj.d.mts +0 -2220
- package/dist/types-6pkp2RRj.d.mts.map +0 -1
- package/dist/types-Y3fKQSAK.d.cts +0 -2220
- package/dist/types-Y3fKQSAK.d.cts.map +0 -1
- package/dist/workspace-BzrG_2SI.mjs +0 -8
- package/dist/workspace-C6VJQVtG.cjs.map +0 -1
- package/dist/workspace-XXtNhqJl.cjs +0 -9
- package/dist/workspace-zoqRbihZ.mjs.map +0 -1
|
@@ -0,0 +1,669 @@
|
|
|
1
|
+
const require_workspace = require("./workspace-CwW3Gkru.cjs");
|
|
2
|
+
const require_config = require("./config.cjs");
|
|
3
|
+
const require_seeds = require("./seeds-CkIPFGNO.cjs");
|
|
4
|
+
const require_aws = require("./aws-BTawF0F-.cjs");
|
|
5
|
+
const require_secretsManager = require("./secretsManager-DcMlHnRC.cjs");
|
|
6
|
+
let node_child_process = require("node:child_process");
|
|
7
|
+
let _aws_sdk_client_iam = require("@aws-sdk/client-iam");
|
|
8
|
+
//#region src/deploy/githubOidc.ts
|
|
9
|
+
/**
|
|
10
|
+
* Template keys whose values are known for a repository's environment job
|
|
11
|
+
* before the job runs. Anything else — `job_workflow_ref`, `ref`, `sha`,
|
|
12
|
+
* `run_id`, `workflow`, `actor`, a custom property — depends on the run.
|
|
13
|
+
*/
|
|
14
|
+
const SUPPORTED_CLAIM_KEYS = [
|
|
15
|
+
"repo",
|
|
16
|
+
"context",
|
|
17
|
+
"environment",
|
|
18
|
+
"repository",
|
|
19
|
+
"repository_owner",
|
|
20
|
+
"repository_owner_id",
|
|
21
|
+
"repository_id",
|
|
22
|
+
"repository_visibility"
|
|
23
|
+
];
|
|
24
|
+
const NEEDS_FACTS = /* @__PURE__ */ new Set([
|
|
25
|
+
"repository_owner_id",
|
|
26
|
+
"repository_id",
|
|
27
|
+
"repository_visibility"
|
|
28
|
+
]);
|
|
29
|
+
/** A `:` inside a claim value is sent as `%3A`. */
|
|
30
|
+
function claim(value) {
|
|
31
|
+
return value.replaceAll(":", "%3A");
|
|
32
|
+
}
|
|
33
|
+
/** Whether {@link oidcSubject} needs the repository's ids or visibility. */
|
|
34
|
+
function needsRepoFacts(customization) {
|
|
35
|
+
const immutableWithoutPrefix = customization.use_immutable_subject === true && !customization.sub_claim_prefix;
|
|
36
|
+
if (customization.use_default) return immutableWithoutPrefix;
|
|
37
|
+
return (customization.include_claim_keys ?? []).some((key) => NEEDS_FACTS.has(key) || key === "repo" && immutableWithoutPrefix);
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* The exact `sub` of a job in `repo`'s `stage` environment.
|
|
41
|
+
*
|
|
42
|
+
* @throws OidcSubjectNotSupported when a custom template includes a claim
|
|
43
|
+
* whose value depends on the run, so no one subject can be trusted.
|
|
44
|
+
*/
|
|
45
|
+
function oidcSubject(repo, stage, customization, facts) {
|
|
46
|
+
const [owner = "", name = ""] = repo.split("/");
|
|
47
|
+
const environment = `environment:${claim(stage)}`;
|
|
48
|
+
const repoSegment = () => {
|
|
49
|
+
if (customization.sub_claim_prefix) return customization.sub_claim_prefix;
|
|
50
|
+
if (customization.use_immutable_subject) {
|
|
51
|
+
if (!facts) throw new RepoFactsRequired(repo);
|
|
52
|
+
return `repo:${owner}@${facts.ownerId}/${name}@${facts.repoId}`;
|
|
53
|
+
}
|
|
54
|
+
return `repo:${repo}`;
|
|
55
|
+
};
|
|
56
|
+
const immutable = customization.use_immutable_subject === true || customization.sub_claim_prefix !== void 0;
|
|
57
|
+
if (customization.use_default) return {
|
|
58
|
+
subject: `${repoSegment()}:${environment}`,
|
|
59
|
+
kind: immutable ? "immutable" : "default"
|
|
60
|
+
};
|
|
61
|
+
const keys = customization.include_claim_keys ?? [];
|
|
62
|
+
const unsupported = keys.filter((key) => !SUPPORTED_CLAIM_KEYS.includes(key));
|
|
63
|
+
if (keys.length === 0 || unsupported.length > 0) throw new OidcSubjectNotSupported(repo, keys, unsupported);
|
|
64
|
+
if (keys.some((key) => NEEDS_FACTS.has(key)) && !facts) throw new RepoFactsRequired(repo);
|
|
65
|
+
return {
|
|
66
|
+
subject: keys.map((key) => {
|
|
67
|
+
switch (key) {
|
|
68
|
+
case "repo": return repoSegment();
|
|
69
|
+
case "context":
|
|
70
|
+
case "environment": return environment;
|
|
71
|
+
case "repository": return `repository:${claim(repo)}`;
|
|
72
|
+
case "repository_owner": return `repository_owner:${claim(owner)}`;
|
|
73
|
+
case "repository_owner_id": return `repository_owner_id:${facts.ownerId}`;
|
|
74
|
+
case "repository_id": return `repository_id:${facts.repoId}`;
|
|
75
|
+
default: return `repository_visibility:${claim(facts.visibility)}`;
|
|
76
|
+
}
|
|
77
|
+
}).join(":"),
|
|
78
|
+
kind: "custom"
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
/** The endpoint a repository's subject format is read from. */
|
|
82
|
+
function customizationEndpoint(repo) {
|
|
83
|
+
return `repos/${repo}/actions/oidc/customization/sub`;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* The `sub` GitHub will send for `repo`'s `stage` environment, read from the
|
|
87
|
+
* repository's OIDC settings through `gh`.
|
|
88
|
+
*
|
|
89
|
+
* A repository on a custom template that names no keys of its own uses its
|
|
90
|
+
* organisation's, read from `orgs/{owner}/actions/oidc/customization/sub`.
|
|
91
|
+
* When the settings cannot be read at all — no permission, or a GitHub
|
|
92
|
+
* Enterprise Server without the endpoint — the default format is assumed, with
|
|
93
|
+
* a warning saying where to check it.
|
|
94
|
+
*/
|
|
95
|
+
function resolveOidcSubject(gh, repo, stage) {
|
|
96
|
+
const endpoint = customizationEndpoint(repo);
|
|
97
|
+
let customization;
|
|
98
|
+
try {
|
|
99
|
+
customization = JSON.parse(gh(["api", endpoint]));
|
|
100
|
+
} catch {
|
|
101
|
+
return {
|
|
102
|
+
subject: `repo:${repo}:environment:${claim(stage)}`,
|
|
103
|
+
kind: "assumed",
|
|
104
|
+
warning: `Could not read ${endpoint}, so the default subject format is assumed. Check it with: gh api ${endpoint} — a repository on the immutable subject or a custom template sends a different sub, and the role would not be assumable.`
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
if (!customization.use_default && (customization.include_claim_keys ?? []).length === 0) {
|
|
108
|
+
const [owner = ""] = repo.split("/");
|
|
109
|
+
const orgEndpoint = `orgs/${owner}/actions/oidc/customization/sub`;
|
|
110
|
+
let org;
|
|
111
|
+
try {
|
|
112
|
+
org = JSON.parse(gh(["api", orgEndpoint]));
|
|
113
|
+
} catch {
|
|
114
|
+
throw new OrgOidcTemplateUnreadable(repo, orgEndpoint);
|
|
115
|
+
}
|
|
116
|
+
customization = {
|
|
117
|
+
...customization,
|
|
118
|
+
include_claim_keys: org.include_claim_keys ?? [],
|
|
119
|
+
use_immutable_subject: customization.use_immutable_subject ?? org.use_immutable_subject
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
const facts = needsRepoFacts(customization) ? readRepoFacts(gh, repo) : void 0;
|
|
123
|
+
return oidcSubject(repo, stage, customization, facts);
|
|
124
|
+
}
|
|
125
|
+
function readRepoFacts(gh, repo) {
|
|
126
|
+
const raw = JSON.parse(gh(["api", `repos/${repo}`]));
|
|
127
|
+
return {
|
|
128
|
+
ownerId: raw.owner.id,
|
|
129
|
+
repoId: raw.id,
|
|
130
|
+
visibility: raw.visibility
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* The repository's custom subject template includes a claim whose value
|
|
135
|
+
* depends on the run — or names none — so no one subject can be trusted.
|
|
136
|
+
*/
|
|
137
|
+
var OidcSubjectNotSupported = class extends Error {
|
|
138
|
+
repo;
|
|
139
|
+
includeClaimKeys;
|
|
140
|
+
unsupportedKeys;
|
|
141
|
+
constructor(repo, includeClaimKeys, unsupportedKeys) {
|
|
142
|
+
super(`${repo} builds its OIDC subject from a custom template, ${JSON.stringify(includeClaimKeys)}, and ${unsupportedKeys.length > 0 ? `${unsupportedKeys.join(", ")} depend${unsupportedKeys.length === 1 ? "s" : ""} on the run` : "it names no claims"}, so the deploy role cannot trust one exact subject. Set the repository back to the default subject — gh api --method PUT ${customizationEndpoint(repo)} -F use_default=true — (or keep the immutable one by also passing -F use_immutable_subject=true), or use a template built only from ${SUPPORTED_CLAIM_KEYS.join(", ")}; then run this again.`);
|
|
143
|
+
this.repo = repo;
|
|
144
|
+
this.includeClaimKeys = includeClaimKeys;
|
|
145
|
+
this.unsupportedKeys = unsupportedKeys;
|
|
146
|
+
this.name = "OidcSubjectNotSupported";
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
/** The subject needs the repository's ids, and none were read. */
|
|
150
|
+
var RepoFactsRequired = class extends Error {
|
|
151
|
+
repo;
|
|
152
|
+
constructor(repo) {
|
|
153
|
+
super(`The OIDC subject of ${repo} includes its owner and repository ids; read them with gh api repos/${repo} and pass them in.`);
|
|
154
|
+
this.repo = repo;
|
|
155
|
+
this.name = "RepoFactsRequired";
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
/**
|
|
159
|
+
* The repository uses its organisation's subject template, and that template
|
|
160
|
+
* could not be read — so what GitHub sends is unknown, and is not guessed.
|
|
161
|
+
*/
|
|
162
|
+
var OrgOidcTemplateUnreadable = class extends Error {
|
|
163
|
+
repo;
|
|
164
|
+
endpoint;
|
|
165
|
+
constructor(repo, endpoint) {
|
|
166
|
+
super(`${repo} uses its organisation's OIDC subject template, and ${endpoint} could not be read. Run this as an organisation owner (gh auth refresh -s admin:org), or set the repository back to the default subject with gh api --method PUT ${customizationEndpoint(repo)} -F use_default=true; then run this again.`);
|
|
167
|
+
this.repo = repo;
|
|
168
|
+
this.endpoint = endpoint;
|
|
169
|
+
this.name = "OrgOidcTemplateUnreadable";
|
|
170
|
+
}
|
|
171
|
+
};
|
|
172
|
+
//#endregion
|
|
173
|
+
//#region src/deploy/githubPolicy.ts
|
|
174
|
+
/**
|
|
175
|
+
* What the deploy role may do in the stage's account.
|
|
176
|
+
*
|
|
177
|
+
* An SST stage creates its own stack, which is most of AWS, so its role gets
|
|
178
|
+
* `AdministratorAccess`. A stage deployed with the `compose` target builds and
|
|
179
|
+
* runs containers on a server; from AWS its deploy job needs only the stage's
|
|
180
|
+
* secrets — read, and written back when a deploy generates a new one — and,
|
|
181
|
+
* when the deploy state is kept in AWS, the stage's state. So a compose stage
|
|
182
|
+
* gets an inline policy naming exactly those resources and nothing else.
|
|
183
|
+
*
|
|
184
|
+
* `--policy-arn` replaces either.
|
|
185
|
+
*/
|
|
186
|
+
/**
|
|
187
|
+
* What SST needs to create a stack is most of AWS, so this is the default
|
|
188
|
+
* outside compose — said out loud in the output, and replaceable with
|
|
189
|
+
* `--policy-arn`.
|
|
190
|
+
*/
|
|
191
|
+
const DEFAULT_POLICY_ARN = "arn:aws:iam::aws:policy/AdministratorAccess";
|
|
192
|
+
/** The name of the inline policy a compose stage's role is given. */
|
|
193
|
+
const SCOPED_POLICY_NAME = "gkm-deploy";
|
|
194
|
+
/** Every target the stage's apps deploy through. */
|
|
195
|
+
function deployTargets(workspace) {
|
|
196
|
+
const targets = /* @__PURE__ */ new Set([workspace.deploy?.default ?? "dokploy"]);
|
|
197
|
+
for (const app of Object.values(workspace.apps)) targets.add(app.resolvedDeployTarget);
|
|
198
|
+
return [...targets].sort();
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* The access the stage's deploy role is given: `--policy-arn` when passed,
|
|
202
|
+
* the scoped policy for a stage only the compose target deploys, and
|
|
203
|
+
* `AdministratorAccess` otherwise.
|
|
204
|
+
*/
|
|
205
|
+
function deployAccess(workspace, stage, policyArn) {
|
|
206
|
+
if (policyArn) return {
|
|
207
|
+
kind: "managed",
|
|
208
|
+
policyArn,
|
|
209
|
+
reason: "--policy-arn"
|
|
210
|
+
};
|
|
211
|
+
const targets = deployTargets(workspace);
|
|
212
|
+
if (targets.length !== 1 || targets[0] !== "compose") return {
|
|
213
|
+
kind: "managed",
|
|
214
|
+
policyArn: DEFAULT_POLICY_ARN,
|
|
215
|
+
reason: `the ${targets.join(", ")} target${targets.length === 1 ? "" : "s"} deploy${targets.length === 1 ? "s" : ""} infrastructure; --policy-arn to narrow`
|
|
216
|
+
};
|
|
217
|
+
const project = workspace.name;
|
|
218
|
+
const store = workspace.secrets.store ?? "file";
|
|
219
|
+
const state = workspace.state;
|
|
220
|
+
if (typeof store === "object" && typeof store.provider === "object" || state !== void 0 && typeof state.provider === "object") return {
|
|
221
|
+
kind: "managed",
|
|
222
|
+
policyArn: DEFAULT_POLICY_ARN,
|
|
223
|
+
reason: `a custom ${typeof store === "object" && typeof store.provider === "object" ? "secrets store" : "state provider"} cannot be scoped; --policy-arn to narrow`
|
|
224
|
+
};
|
|
225
|
+
const describe = [];
|
|
226
|
+
const build = [];
|
|
227
|
+
if (typeof store === "object" && store.provider === "ssm") {
|
|
228
|
+
const { region } = store;
|
|
229
|
+
const name = require_aws.secretsParameterName(project, stage);
|
|
230
|
+
describe.push(`read and update ${name} (SSM, ${region})`);
|
|
231
|
+
build.push((account) => [{
|
|
232
|
+
Sid: "StageSecrets",
|
|
233
|
+
Effect: "Allow",
|
|
234
|
+
Action: ["ssm:GetParameter", "ssm:PutParameter"],
|
|
235
|
+
Resource: `arn:aws:ssm:${region}:${account}:parameter${name}`
|
|
236
|
+
}]);
|
|
237
|
+
} else if (typeof store === "object" && store.provider === "secrets-manager") {
|
|
238
|
+
const { region, kmsKeyId } = store;
|
|
239
|
+
const name = require_secretsManager.secretsManagerSecretName(project, stage);
|
|
240
|
+
describe.push(`read and update ${name} (Secrets Manager, ${region})`);
|
|
241
|
+
build.push((account) => {
|
|
242
|
+
const statements = [{
|
|
243
|
+
Sid: "StageSecrets",
|
|
244
|
+
Effect: "Allow",
|
|
245
|
+
Action: [
|
|
246
|
+
"secretsmanager:GetSecretValue",
|
|
247
|
+
"secretsmanager:PutSecretValue",
|
|
248
|
+
"secretsmanager:CreateSecret"
|
|
249
|
+
],
|
|
250
|
+
Resource: `arn:aws:secretsmanager:${region}:${account}:secret:${name}-??????`
|
|
251
|
+
}];
|
|
252
|
+
if (kmsKeyId) statements.push({
|
|
253
|
+
Sid: "StageSecretsKey",
|
|
254
|
+
Effect: "Allow",
|
|
255
|
+
Action: ["kms:Decrypt", "kms:GenerateDataKey"],
|
|
256
|
+
Resource: kmsKeyId.startsWith("arn:") ? kmsKeyId : "*",
|
|
257
|
+
Condition: { StringEquals: { "kms:ViaService": `secretsmanager.${region}.amazonaws.com` } }
|
|
258
|
+
});
|
|
259
|
+
return statements;
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
if (state?.provider === "ssm") {
|
|
263
|
+
const { region } = state;
|
|
264
|
+
const path = `/gkm/${project}/${stage}/`;
|
|
265
|
+
describe.push(`read and write the deploy state under ${path} (SSM, ${region})`);
|
|
266
|
+
build.push((account) => [{
|
|
267
|
+
Sid: "StageState",
|
|
268
|
+
Effect: "Allow",
|
|
269
|
+
Action: [
|
|
270
|
+
"ssm:GetParameter",
|
|
271
|
+
"ssm:PutParameter",
|
|
272
|
+
"ssm:DeleteParameter"
|
|
273
|
+
],
|
|
274
|
+
Resource: `arn:aws:ssm:${region}:${account}:parameter${path}*`
|
|
275
|
+
}]);
|
|
276
|
+
} else if (state?.provider === "s3") {
|
|
277
|
+
const prefix = (state.prefix ?? "gkm").replace(/\/+$/, "");
|
|
278
|
+
const path = `${prefix ? `${prefix}/` : ""}${project}/${stage}/`;
|
|
279
|
+
describe.push(`read and write the deploy state under s3://${state.bucket}/${path}`);
|
|
280
|
+
build.push(() => [{
|
|
281
|
+
Sid: "StageState",
|
|
282
|
+
Effect: "Allow",
|
|
283
|
+
Action: [
|
|
284
|
+
"s3:GetObject",
|
|
285
|
+
"s3:PutObject",
|
|
286
|
+
"s3:DeleteObject"
|
|
287
|
+
],
|
|
288
|
+
Resource: `arn:aws:s3:::${state.bucket}/${path}*`
|
|
289
|
+
}, {
|
|
290
|
+
Sid: "StageStateBucket",
|
|
291
|
+
Effect: "Allow",
|
|
292
|
+
Action: ["s3:ListBucket"],
|
|
293
|
+
Resource: `arn:aws:s3:::${state.bucket}`
|
|
294
|
+
}]);
|
|
295
|
+
}
|
|
296
|
+
return {
|
|
297
|
+
kind: "scoped",
|
|
298
|
+
statements: (account) => build.flatMap((statements) => statements(account)),
|
|
299
|
+
describe
|
|
300
|
+
};
|
|
301
|
+
}
|
|
302
|
+
/** The scoped access as a policy document, or null when it allows nothing. */
|
|
303
|
+
function scopedPolicyDocument(statements) {
|
|
304
|
+
if (statements.length === 0) return null;
|
|
305
|
+
return JSON.stringify({
|
|
306
|
+
Version: "2012-10-17",
|
|
307
|
+
Statement: statements
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
/** The account an IAM ARN is in: `arn:aws:iam::<account>:…`. */
|
|
311
|
+
function accountOf(arn) {
|
|
312
|
+
return arn.split(":")[4] ?? "";
|
|
313
|
+
}
|
|
314
|
+
//#endregion
|
|
315
|
+
//#region src/deploy/github.ts
|
|
316
|
+
/**
|
|
317
|
+
* `gkm deploy:github` — let GitHub Actions deploy one stage, with no keys.
|
|
318
|
+
*
|
|
319
|
+
* A stage usually lives in its own AWS account — staging in one, production in
|
|
320
|
+
* another — so this runs once per stage, with that account's profile:
|
|
321
|
+
*
|
|
322
|
+
* gkm deploy:github --stage staging --profile acme-dev
|
|
323
|
+
* gkm deploy:github --stage prod --profile acme-prod
|
|
324
|
+
*
|
|
325
|
+
* In the stage's account it makes sure GitHub's OIDC provider exists, and a
|
|
326
|
+
* role that only this repository's `<stage>` environment can assume. On
|
|
327
|
+
* GitHub it creates that environment and gives it what the generated deploy
|
|
328
|
+
* workflow reads: `AWS_ROLE_ARN`, and — when the stage's secrets are kept in
|
|
329
|
+
* the local file — its key as `GKM_SECRETS_KEY`. With `secrets.store` set to
|
|
330
|
+
* SSM or Secrets Manager the deploy job reads them with the role instead, so
|
|
331
|
+
* no key is handed to GitHub, and this checks the stage's store in the same
|
|
332
|
+
* account, with the same profile. Re-running it converges rather than duplicating.
|
|
333
|
+
*
|
|
334
|
+
* The role trusts the exact `sub` GitHub sends for the environment, read from
|
|
335
|
+
* the repository's OIDC subject settings (`githubOidc.ts`) — the default, the
|
|
336
|
+
* immutable subject with the owner's and repository's ids, or a custom
|
|
337
|
+
* template. A re-run rewrites an existing role's trust to it, so running this
|
|
338
|
+
* again repairs a role that trusted the wrong format. What the role may do is
|
|
339
|
+
* `githubPolicy.ts`: `AdministratorAccess` for SST, and for a compose stage
|
|
340
|
+
* only its own secrets (and deploy state, when that is in AWS).
|
|
341
|
+
*/
|
|
342
|
+
const logger = console;
|
|
343
|
+
const GITHUB_OIDC_HOST = "token.actions.githubusercontent.com";
|
|
344
|
+
const AUDIENCE = "sts.amazonaws.com";
|
|
345
|
+
/**
|
|
346
|
+
* The tag recording which managed policy gkm attached to the role — so a
|
|
347
|
+
* re-run detaches only what gkm put there, never a policy someone else did.
|
|
348
|
+
*/
|
|
349
|
+
const POLICY_TAG = "gkm:policy-arn";
|
|
350
|
+
const defaultGh = (args, input) => (0, node_child_process.execFileSync)("gh", args, {
|
|
351
|
+
encoding: "utf-8",
|
|
352
|
+
stdio: [
|
|
353
|
+
"pipe",
|
|
354
|
+
"pipe",
|
|
355
|
+
"pipe"
|
|
356
|
+
],
|
|
357
|
+
...input === void 0 ? {} : { input }
|
|
358
|
+
}).trim();
|
|
359
|
+
/** The role a stage deploys as: `<project>-github-<stage>`, within IAM's 64. */
|
|
360
|
+
function roleName(project, stage) {
|
|
361
|
+
return `${project}-github-${stage}`.toLowerCase().replace(/[^a-z0-9+=,.@_-]/g, "-").slice(0, 64);
|
|
362
|
+
}
|
|
363
|
+
/**
|
|
364
|
+
* Who may assume the role: a workflow job whose OIDC token carries exactly
|
|
365
|
+
* `subject` — the repository's `<stage>` environment, in the format the
|
|
366
|
+
* repository sends (see `githubOidc.ts`), and nothing else. Not another
|
|
367
|
+
* branch's job, not another environment's: that is what keeps a staging
|
|
368
|
+
* deploy from using the production role.
|
|
369
|
+
*/
|
|
370
|
+
function trustPolicy(providerArn, subject) {
|
|
371
|
+
return JSON.stringify({
|
|
372
|
+
Version: "2012-10-17",
|
|
373
|
+
Statement: [{
|
|
374
|
+
Effect: "Allow",
|
|
375
|
+
Principal: { Federated: providerArn },
|
|
376
|
+
Action: "sts:AssumeRoleWithWebIdentity",
|
|
377
|
+
Condition: { StringEquals: {
|
|
378
|
+
[`${GITHUB_OIDC_HOST}:aud`]: AUDIENCE,
|
|
379
|
+
[`${GITHUB_OIDC_HOST}:sub`]: subject
|
|
380
|
+
} }
|
|
381
|
+
}]
|
|
382
|
+
});
|
|
383
|
+
}
|
|
384
|
+
/**
|
|
385
|
+
* The subject a trust policy trusts, or undefined when it names none. IAM
|
|
386
|
+
* hands documents back URL-encoded.
|
|
387
|
+
*/
|
|
388
|
+
function trustedSubject(document) {
|
|
389
|
+
if (!document) return void 0;
|
|
390
|
+
let parsed;
|
|
391
|
+
try {
|
|
392
|
+
parsed = JSON.parse(safeDecode(document));
|
|
393
|
+
} catch {
|
|
394
|
+
return;
|
|
395
|
+
}
|
|
396
|
+
for (const statement of parsed.Statement ?? []) for (const operator of Object.values(statement.Condition ?? {})) {
|
|
397
|
+
const value = operator[`${GITHUB_OIDC_HOST}:sub`];
|
|
398
|
+
if (typeof value === "string") return value;
|
|
399
|
+
if (Array.isArray(value)) return value.join(", ");
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
function safeDecode(value) {
|
|
403
|
+
try {
|
|
404
|
+
return decodeURIComponent(value);
|
|
405
|
+
} catch {
|
|
406
|
+
return value;
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
/** GitHub's OIDC provider in this account, created if it is not there. */
|
|
410
|
+
async function ensureOidcProvider(iam) {
|
|
411
|
+
const { OpenIDConnectProviderList = [] } = await iam.send(new _aws_sdk_client_iam.ListOpenIDConnectProvidersCommand({}));
|
|
412
|
+
const existing = OpenIDConnectProviderList.find((p) => p.Arn?.endsWith(`oidc-provider/${GITHUB_OIDC_HOST}`))?.Arn;
|
|
413
|
+
if (existing) return existing;
|
|
414
|
+
return (await iam.send(new _aws_sdk_client_iam.CreateOpenIDConnectProviderCommand({
|
|
415
|
+
Url: `https://${GITHUB_OIDC_HOST}`,
|
|
416
|
+
ClientIDList: [AUDIENCE]
|
|
417
|
+
}))).OpenIDConnectProviderArn;
|
|
418
|
+
}
|
|
419
|
+
function isNoSuchEntity(error) {
|
|
420
|
+
return error.name === "NoSuchEntityException";
|
|
421
|
+
}
|
|
422
|
+
/**
|
|
423
|
+
* The deploy role, created or brought back to this trust and access.
|
|
424
|
+
*
|
|
425
|
+
* Converges: re-running rewrites the trust, and moves the role from one access
|
|
426
|
+
* to another — detaching a managed policy only when the role's
|
|
427
|
+
* {@link POLICY_TAG} says gkm attached it.
|
|
428
|
+
*/
|
|
429
|
+
async function ensureRole(iam, name, trust, access) {
|
|
430
|
+
let arn;
|
|
431
|
+
let created = false;
|
|
432
|
+
let previousSubject;
|
|
433
|
+
let recorded;
|
|
434
|
+
try {
|
|
435
|
+
const { Role } = await iam.send(new _aws_sdk_client_iam.GetRoleCommand({ RoleName: name }));
|
|
436
|
+
previousSubject = trustedSubject(Role.AssumeRolePolicyDocument);
|
|
437
|
+
await iam.send(new _aws_sdk_client_iam.UpdateAssumeRolePolicyCommand({
|
|
438
|
+
RoleName: name,
|
|
439
|
+
PolicyDocument: trust
|
|
440
|
+
}));
|
|
441
|
+
arn = Role.Arn;
|
|
442
|
+
const { Tags = [] } = await iam.send(new _aws_sdk_client_iam.ListRoleTagsCommand({ RoleName: name }));
|
|
443
|
+
recorded = Tags.find((tag) => tag.Key === POLICY_TAG)?.Value;
|
|
444
|
+
} catch (error) {
|
|
445
|
+
if (!isNoSuchEntity(error)) throw error;
|
|
446
|
+
const { Role } = await iam.send(new _aws_sdk_client_iam.CreateRoleCommand({
|
|
447
|
+
RoleName: name,
|
|
448
|
+
AssumeRolePolicyDocument: trust,
|
|
449
|
+
Description: "Deploys from GitHub Actions (gkm deploy:github)",
|
|
450
|
+
MaxSessionDuration: 7200
|
|
451
|
+
}));
|
|
452
|
+
arn = Role.Arn;
|
|
453
|
+
created = true;
|
|
454
|
+
}
|
|
455
|
+
const detached = [];
|
|
456
|
+
const leftAttached = [];
|
|
457
|
+
const detach = async (policyArn) => {
|
|
458
|
+
try {
|
|
459
|
+
await iam.send(new _aws_sdk_client_iam.DetachRolePolicyCommand({
|
|
460
|
+
RoleName: name,
|
|
461
|
+
PolicyArn: policyArn
|
|
462
|
+
}));
|
|
463
|
+
detached.push(policyArn);
|
|
464
|
+
} catch (error) {
|
|
465
|
+
if (!isNoSuchEntity(error)) throw error;
|
|
466
|
+
}
|
|
467
|
+
};
|
|
468
|
+
const deleteInline = async () => {
|
|
469
|
+
try {
|
|
470
|
+
await iam.send(new _aws_sdk_client_iam.DeleteRolePolicyCommand({
|
|
471
|
+
RoleName: name,
|
|
472
|
+
PolicyName: SCOPED_POLICY_NAME
|
|
473
|
+
}));
|
|
474
|
+
} catch (error) {
|
|
475
|
+
if (!isNoSuchEntity(error)) throw error;
|
|
476
|
+
}
|
|
477
|
+
};
|
|
478
|
+
if ("managed" in access) {
|
|
479
|
+
await iam.send(new _aws_sdk_client_iam.AttachRolePolicyCommand({
|
|
480
|
+
RoleName: name,
|
|
481
|
+
PolicyArn: access.managed
|
|
482
|
+
}));
|
|
483
|
+
if (recorded && recorded !== access.managed) await detach(recorded);
|
|
484
|
+
if (recorded !== access.managed) await iam.send(new _aws_sdk_client_iam.TagRoleCommand({
|
|
485
|
+
RoleName: name,
|
|
486
|
+
Tags: [{
|
|
487
|
+
Key: POLICY_TAG,
|
|
488
|
+
Value: access.managed
|
|
489
|
+
}]
|
|
490
|
+
}));
|
|
491
|
+
if (!created) await deleteInline();
|
|
492
|
+
return {
|
|
493
|
+
arn,
|
|
494
|
+
created,
|
|
495
|
+
previousSubject,
|
|
496
|
+
detached,
|
|
497
|
+
leftAttached
|
|
498
|
+
};
|
|
499
|
+
}
|
|
500
|
+
if (access.inline) await iam.send(new _aws_sdk_client_iam.PutRolePolicyCommand({
|
|
501
|
+
RoleName: name,
|
|
502
|
+
PolicyName: SCOPED_POLICY_NAME,
|
|
503
|
+
PolicyDocument: access.inline
|
|
504
|
+
}));
|
|
505
|
+
else if (!created) await deleteInline();
|
|
506
|
+
if (created) return {
|
|
507
|
+
arn,
|
|
508
|
+
created,
|
|
509
|
+
previousSubject,
|
|
510
|
+
detached,
|
|
511
|
+
leftAttached
|
|
512
|
+
};
|
|
513
|
+
if (recorded) {
|
|
514
|
+
await detach(recorded);
|
|
515
|
+
await iam.send(new _aws_sdk_client_iam.UntagRoleCommand({
|
|
516
|
+
RoleName: name,
|
|
517
|
+
TagKeys: [POLICY_TAG]
|
|
518
|
+
}));
|
|
519
|
+
}
|
|
520
|
+
const { AttachedPolicies = [] } = await iam.send(new _aws_sdk_client_iam.ListAttachedRolePoliciesCommand({ RoleName: name }));
|
|
521
|
+
for (const policy of AttachedPolicies) if (policy.PolicyArn && !detached.includes(policy.PolicyArn)) leftAttached.push(policy.PolicyArn);
|
|
522
|
+
return {
|
|
523
|
+
arn,
|
|
524
|
+
created,
|
|
525
|
+
previousSubject,
|
|
526
|
+
detached,
|
|
527
|
+
leftAttached
|
|
528
|
+
};
|
|
529
|
+
}
|
|
530
|
+
/**
|
|
531
|
+
* An IAM client for the stage's account.
|
|
532
|
+
*
|
|
533
|
+
* `fromIni` for a named profile, deliberately: it resolves exactly that
|
|
534
|
+
* profile — keys, assume-role, `credential_process` or SSO, whichever
|
|
535
|
+
* ~/.aws/config says — and never falls back to AWS_* in the environment. The
|
|
536
|
+
* provider chain checks the environment first, so exported staging keys would
|
|
537
|
+
* quietly win over `--profile prod` and the production role would land in the
|
|
538
|
+
* staging account.
|
|
539
|
+
*/
|
|
540
|
+
async function iamFor(profile, endpoint) {
|
|
541
|
+
const config = { region: "us-east-1" };
|
|
542
|
+
if (profile) {
|
|
543
|
+
const { fromIni } = await import("@aws-sdk/credential-providers");
|
|
544
|
+
config.credentials = fromIni({ profile });
|
|
545
|
+
}
|
|
546
|
+
if (endpoint) {
|
|
547
|
+
config.endpoint = endpoint;
|
|
548
|
+
config.credentials = {
|
|
549
|
+
accessKeyId: "test",
|
|
550
|
+
secretAccessKey: "test"
|
|
551
|
+
};
|
|
552
|
+
}
|
|
553
|
+
return new _aws_sdk_client_iam.IAMClient(config);
|
|
554
|
+
}
|
|
555
|
+
async function deployGithubCommand(options, deps = {}) {
|
|
556
|
+
const gh = deps.gh ?? defaultGh;
|
|
557
|
+
const { workspace } = await require_config.loadWorkspaceConfig(deps.cwd);
|
|
558
|
+
require_workspace.assertDeployedStage(workspace.stages, options.stage);
|
|
559
|
+
const repo = options.repo ?? gh([
|
|
560
|
+
"repo",
|
|
561
|
+
"view",
|
|
562
|
+
"--json",
|
|
563
|
+
"nameWithOwner",
|
|
564
|
+
"-q",
|
|
565
|
+
".nameWithOwner"
|
|
566
|
+
]);
|
|
567
|
+
const role = roleName(workspace.name, options.stage);
|
|
568
|
+
const oidc = resolveOidcSubject(gh, repo, options.stage);
|
|
569
|
+
const access = deployAccess(workspace, options.stage, options.policyArn);
|
|
570
|
+
const key = await require_seeds.readKey(options.stage, require_seeds.keystoreProject(workspace));
|
|
571
|
+
const keyPath = require_seeds.getKeyPath(options.stage, require_seeds.keystoreProject(workspace));
|
|
572
|
+
const hasKey = key !== null;
|
|
573
|
+
const remote = require_seeds.isRemoteStore(workspace, options.stage);
|
|
574
|
+
const store = await require_seeds.secretsStoreFor(workspace, options.stage, { ...options.profile ? { profile: options.profile } : {} });
|
|
575
|
+
const hasSecrets = remote && await store.read(options.stage) !== null;
|
|
576
|
+
const via = options.profile ? `profile "${options.profile}"` : "the default credentials";
|
|
577
|
+
logger.log(`\n🔐 GitHub → AWS for stage "${options.stage}"\n`);
|
|
578
|
+
logger.log(` Repository: ${repo}`);
|
|
579
|
+
logger.log(` AWS profile: ${options.profile ?? "(default credentials)"}`);
|
|
580
|
+
logger.log(` Role: ${role}`);
|
|
581
|
+
if (access.kind === "managed") logger.log(` Policy: ${access.policyArn} (${access.reason})`);
|
|
582
|
+
else if (access.describe.length > 0) {
|
|
583
|
+
logger.log(` Policy: inline "${SCOPED_POLICY_NAME}", scoped to the compose deploy — only:`);
|
|
584
|
+
for (const line of access.describe) logger.log(` ${line}`);
|
|
585
|
+
} else logger.log(" Policy: none — a compose deploy with file secrets and local state reads nothing from AWS");
|
|
586
|
+
logger.log(` Trusted by: ${oidc.subject} only (${SUBJECT_KINDS[oidc.kind]})`);
|
|
587
|
+
if (oidc.warning) logger.log(` ⚠ ${oidc.warning}`);
|
|
588
|
+
if (remote) logger.log(` Secrets: ${hasSecrets ? `in the store (${store.name}), read with ${via}` : `none in the store yet — gkm secrets:set <KEY> '…' --stage ${options.stage}`}`);
|
|
589
|
+
else logger.log(` Secrets key: ${hasKey ? keyPath : `none at ${keyPath} — run gkm secrets:init --stage ${options.stage} first`}`);
|
|
590
|
+
if (options.dryRun) {
|
|
591
|
+
if (access.kind === "scoped") {
|
|
592
|
+
const document = scopedPolicyDocument(access.statements("<account>"));
|
|
593
|
+
if (document) logger.log(`\n Inline policy:\n${JSON.stringify(JSON.parse(document), null, 2).replace(/^/gm, " ")}`);
|
|
594
|
+
}
|
|
595
|
+
logger.log("\n --dry-run: nothing changed.\n");
|
|
596
|
+
return {
|
|
597
|
+
repo,
|
|
598
|
+
subject: oidc.subject
|
|
599
|
+
};
|
|
600
|
+
}
|
|
601
|
+
const iam = deps.iam ?? await iamFor(options.profile);
|
|
602
|
+
const providerArn = await ensureOidcProvider(iam).catch((error) => {
|
|
603
|
+
if (/SSO session/i.test(String(error?.message)) && options.profile) throw new SsoSessionExpired(options.profile);
|
|
604
|
+
throw error;
|
|
605
|
+
});
|
|
606
|
+
const outcome = await ensureRole(iam, role, trustPolicy(providerArn, oidc.subject), access.kind === "managed" ? { managed: access.policyArn } : { inline: scopedPolicyDocument(access.statements(accountOf(providerArn))) });
|
|
607
|
+
const roleArn = outcome.arn;
|
|
608
|
+
logger.log(`\n ✓ AWS: ${roleArn}${outcome.created ? " (created)" : ""}`);
|
|
609
|
+
if (!outcome.created) logger.log(outcome.previousSubject === oidc.subject ? ` ✓ Trust: unchanged, ${oidc.subject}` : ` ✓ Trust: ${outcome.previousSubject ?? "(no subject)"} → ${oidc.subject}`);
|
|
610
|
+
for (const detached of outcome.detached) logger.log(` ✓ Detached ${detached} (attached by gkm, no longer needed)`);
|
|
611
|
+
if (access.kind === "scoped") for (const attached of outcome.leftAttached) logger.log(` ⚠ ${attached} is still attached to ${role}. gkm has no record of attaching it, so it is left; the compose deploy does not need it. Detach it with: aws iam detach-role-policy --role-name ${role} --policy-arn ${attached}${options.profile ? ` --profile ${options.profile}` : ""}`);
|
|
612
|
+
gh([
|
|
613
|
+
"api",
|
|
614
|
+
"--method",
|
|
615
|
+
"PUT",
|
|
616
|
+
`repos/${repo}/environments/${options.stage}`
|
|
617
|
+
]);
|
|
618
|
+
gh([
|
|
619
|
+
"variable",
|
|
620
|
+
"set",
|
|
621
|
+
"AWS_ROLE_ARN",
|
|
622
|
+
"--env",
|
|
623
|
+
options.stage,
|
|
624
|
+
"--repo",
|
|
625
|
+
repo,
|
|
626
|
+
"--body",
|
|
627
|
+
roleArn
|
|
628
|
+
]);
|
|
629
|
+
logger.log(` ✓ GitHub: environment "${options.stage}", AWS_ROLE_ARN`);
|
|
630
|
+
if (remote) {
|
|
631
|
+
if (!hasSecrets) logger.log(` ⚠ The "${options.stage}" store holds no secrets yet; set them with gkm secrets:set <KEY> '…' --stage ${options.stage}${options.profile ? ` (AWS_PROFILE=${options.profile})` : ""}.`);
|
|
632
|
+
} else if (hasKey) {
|
|
633
|
+
gh([
|
|
634
|
+
"secret",
|
|
635
|
+
"set",
|
|
636
|
+
"GKM_SECRETS_KEY",
|
|
637
|
+
"--env",
|
|
638
|
+
options.stage,
|
|
639
|
+
"--repo",
|
|
640
|
+
repo
|
|
641
|
+
], key);
|
|
642
|
+
logger.log(" ✓ GitHub: GKM_SECRETS_KEY");
|
|
643
|
+
} else logger.log(` ⚠ No secrets key for "${options.stage}"; run gkm secrets:init --stage ${options.stage}, then this again.`);
|
|
644
|
+
logger.log(`\n Protect it: add required reviewers to the "${options.stage}" environment in the repository settings.\n`);
|
|
645
|
+
return {
|
|
646
|
+
roleArn,
|
|
647
|
+
repo,
|
|
648
|
+
subject: oidc.subject
|
|
649
|
+
};
|
|
650
|
+
}
|
|
651
|
+
const SUBJECT_KINDS = {
|
|
652
|
+
default: "the repository's default subject",
|
|
653
|
+
immutable: "the repository's immutable subject",
|
|
654
|
+
custom: "the repository's custom subject template",
|
|
655
|
+
assumed: "assumed: the default format"
|
|
656
|
+
};
|
|
657
|
+
/** The profile's SSO login has lapsed; the fix is one command away. */
|
|
658
|
+
var SsoSessionExpired = class extends Error {
|
|
659
|
+
profile;
|
|
660
|
+
constructor(profile) {
|
|
661
|
+
super(`The SSO session for profile "${profile}" has expired or is invalid. Run: aws sso login --profile ${profile}`);
|
|
662
|
+
this.profile = profile;
|
|
663
|
+
this.name = "SsoSessionExpired";
|
|
664
|
+
}
|
|
665
|
+
};
|
|
666
|
+
//#endregion
|
|
667
|
+
exports.deployGithubCommand = deployGithubCommand;
|
|
668
|
+
|
|
669
|
+
//# sourceMappingURL=github-B5Bw4HIu.cjs.map
|