@geekmidas/cli 10.0.0-alpha.160 → 10.0.0-alpha.161
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/dist/{GoDaddyProvider-DkUMcMYy.cjs → GoDaddyProvider-CBqsvbER.cjs} +2 -2
- package/dist/{GoDaddyProvider-DkUMcMYy.cjs.map → GoDaddyProvider-CBqsvbER.cjs.map} +1 -1
- package/dist/{GoDaddyProvider-C9dDlH9I.mjs → GoDaddyProvider-CwqdLM1E.mjs} +2 -2
- package/dist/{GoDaddyProvider-C9dDlH9I.mjs.map → GoDaddyProvider-CwqdLM1E.mjs.map} +1 -1
- package/dist/{HostingerProvider-9faYOQnQ.cjs → HostingerProvider-DtOtsFkM.cjs} +2 -2
- package/dist/{HostingerProvider-9faYOQnQ.cjs.map → HostingerProvider-DtOtsFkM.cjs.map} +1 -1
- package/dist/{HostingerProvider-BEuKG2gz.mjs → HostingerProvider-gD4uqzMN.mjs} +2 -2
- package/dist/{HostingerProvider-BEuKG2gz.mjs.map → HostingerProvider-gD4uqzMN.mjs.map} +1 -1
- package/dist/{LegacyStateStore-DPKhjUR6.mjs → LegacyStateStore-6xsGADme.mjs} +3 -3
- package/dist/{LegacyStateStore-DPKhjUR6.mjs.map → LegacyStateStore-6xsGADme.mjs.map} +1 -1
- package/dist/{LegacyStateStore-C44jUnMH.cjs → LegacyStateStore-C0rm5slD.cjs} +3 -3
- package/dist/{LegacyStateStore-C44jUnMH.cjs.map → LegacyStateStore-C0rm5slD.cjs.map} +1 -1
- package/dist/{LocalStateStore-BU3fWkcT.mjs → LocalStateStore-G0JHXOVW.mjs} +2 -2
- package/dist/{LocalStateStore-BU3fWkcT.mjs.map → LocalStateStore-G0JHXOVW.mjs.map} +1 -1
- package/dist/{LocalStateStore-B95WE99i.cjs → LocalStateStore-NBMF3zCb.cjs} +2 -2
- package/dist/{LocalStateStore-B95WE99i.cjs.map → LocalStateStore-NBMF3zCb.cjs.map} +1 -1
- package/dist/{S3StateStore-zU5kClhd.cjs → S3StateStore-7n6gIYEJ.cjs} +4 -4
- package/dist/{S3StateStore-zU5kClhd.cjs.map → S3StateStore-7n6gIYEJ.cjs.map} +1 -1
- package/dist/{S3StateStore-Cpbeijr5.mjs → S3StateStore-B7IPTvu0.mjs} +4 -4
- package/dist/{S3StateStore-Cpbeijr5.mjs.map → S3StateStore-B7IPTvu0.mjs.map} +1 -1
- package/dist/{SSMStateStore-BxkKMBi_.mjs → SSMStateStore-CWEShHLS.mjs} +2 -2
- package/dist/{SSMStateStore-BxkKMBi_.mjs.map → SSMStateStore-CWEShHLS.mjs.map} +1 -1
- package/dist/{SSMStateStore-D9uviQ3T.cjs → SSMStateStore-O12NeGEg.cjs} +2 -2
- package/dist/{SSMStateStore-D9uviQ3T.cjs.map → SSMStateStore-O12NeGEg.cjs.map} +1 -1
- package/dist/{add-Dj-gtqTO.mjs → add-C-nlqQgN.mjs} +4 -4
- package/dist/{add-Dj-gtqTO.mjs.map → add-C-nlqQgN.mjs.map} +1 -1
- package/dist/{add-Bb2IL3Yq.cjs → add-ktNZmJb-.cjs} +4 -4
- package/dist/{add-Bb2IL3Yq.cjs.map → add-ktNZmJb-.cjs.map} +1 -1
- package/dist/{apps-FRNlECwi.mjs → apps-C7SujLV-.mjs} +3 -3
- package/dist/{apps-FRNlECwi.mjs.map → apps-C7SujLV-.mjs.map} +1 -1
- package/dist/{apps-0vc4Oz9_.cjs → apps-CtjYJS9e.cjs} +3 -3
- package/dist/{apps-0vc4Oz9_.cjs.map → apps-CtjYJS9e.cjs.map} +1 -1
- package/dist/{aws-8QQ8n-t6.mjs → aws-C5LAU_Ii.mjs} +10 -2
- package/dist/aws-C5LAU_Ii.mjs.map +1 -0
- package/dist/{aws-DY9NqQIT.cjs → aws-DKC2m3sT.cjs} +9 -1
- package/dist/aws-DKC2m3sT.cjs.map +1 -0
- package/dist/{bundler-Bg2eEFEh.cjs → bundler-DGwgZmim.cjs} +6 -6
- package/dist/{bundler-Bg2eEFEh.cjs.map → bundler-DGwgZmim.cjs.map} +1 -1
- package/dist/{bundler-9EM4ZHcu.mjs → bundler-DnHKVaZz.mjs} +6 -6
- package/dist/{bundler-9EM4ZHcu.mjs.map → bundler-DnHKVaZz.mjs.map} +1 -1
- package/dist/{cli-CmoSOzNq.mjs → cli-CI9v138l.mjs} +4 -4
- package/dist/{cli-CmoSOzNq.mjs.map → cli-CI9v138l.mjs.map} +1 -1
- package/dist/{cli-YtLjcAZT.cjs → cli-k2G7rG15.cjs} +4 -4
- package/dist/{cli-YtLjcAZT.cjs.map → cli-k2G7rG15.cjs.map} +1 -1
- package/dist/{compose-CW1DGfYc.cjs → compose-BD2rwRfn.cjs} +4 -4
- package/dist/{compose-CW1DGfYc.cjs.map → compose-BD2rwRfn.cjs.map} +1 -1
- package/dist/{compose-3AtZF7ul.mjs → compose-Co-Dt-a4.mjs} +4 -4
- package/dist/{compose-3AtZF7ul.mjs.map → compose-Co-Dt-a4.mjs.map} +1 -1
- package/dist/{compose-D7gOSspy.cjs → compose-nGgRylPu.cjs} +16 -10
- package/dist/compose-nGgRylPu.cjs.map +1 -0
- package/dist/{compose-CnXZAYNM.mjs → compose-reJW9x-G.mjs} +16 -10
- package/dist/compose-reJW9x-G.mjs.map +1 -0
- package/dist/{config-CkuiD9Jv.d.cts → config-C60T2h98.d.cts} +3 -3
- package/dist/{config-BNmLn0dw.d.mts.map → config-C60T2h98.d.cts.map} +1 -1
- package/dist/{config-BNmLn0dw.d.mts → config-CfI2g_Ho.d.mts} +3 -3
- package/dist/{config-CkuiD9Jv.d.cts.map → config-CfI2g_Ho.d.mts.map} +1 -1
- package/dist/config.d.cts +3 -3
- package/dist/config.d.mts +3 -3
- package/dist/{credentials-CjFtNBVH.mjs → credentials-BG1KOq9I.mjs} +11 -7
- package/dist/credentials-BG1KOq9I.mjs.map +1 -0
- package/dist/{credentials-DwIRfeBL.cjs → credentials-UlL1n_Rd.cjs} +11 -7
- package/dist/credentials-UlL1n_Rd.cjs.map +1 -0
- package/dist/deploy/public.cjs +11 -11
- package/dist/deploy/public.d.cts +4 -4
- package/dist/deploy/public.d.mts +4 -4
- package/dist/deploy/public.mjs +11 -11
- package/dist/{deploy-3bsiWJxj.cjs → deploy-CqIULk0k.cjs} +57 -557
- package/dist/deploy-CqIULk0k.cjs.map +1 -0
- package/dist/{deploy-BI3fHnyb.mjs → deploy-DRkCNV7f.mjs} +16 -516
- package/dist/deploy-DRkCNV7f.mjs.map +1 -0
- package/dist/destroy-CMldkiX-.cjs +789 -0
- package/dist/destroy-CMldkiX-.cjs.map +1 -0
- package/dist/destroy-DXIAL8nF.mjs +788 -0
- package/dist/destroy-DXIAL8nF.mjs.map +1 -0
- package/dist/{docker-DPdn7tYJ.mjs → docker-DFFzQe2f.mjs} +4 -4
- package/dist/{docker-DPdn7tYJ.mjs.map → docker-DFFzQe2f.mjs.map} +1 -1
- package/dist/{docker-CwayjAF2.cjs → docker-LwJW3dx_.cjs} +4 -4
- package/dist/{docker-CwayjAF2.cjs.map → docker-LwJW3dx_.cjs.map} +1 -1
- package/dist/{dokploy-tmnH0Du_.mjs → dokploy-DYm0D6Tp.mjs} +2 -2
- package/dist/{dokploy-tmnH0Du_.mjs.map → dokploy-DYm0D6Tp.mjs.map} +1 -1
- package/dist/{dokploy-BMBL-_Xu.cjs → dokploy-wTsJqG-N.cjs} +2 -2
- package/dist/{dokploy-BMBL-_Xu.cjs.map → dokploy-wTsJqG-N.cjs.map} +1 -1
- package/dist/{eas-BVGQAUDc.mjs → eas-BJ_Zlvm8.mjs} +2 -2
- package/dist/{eas-BVGQAUDc.mjs.map → eas-BJ_Zlvm8.mjs.map} +1 -1
- package/dist/{eas-meN1xady.cjs → eas-C4EkjTGJ.cjs} +2 -2
- package/dist/{eas-meN1xady.cjs.map → eas-C4EkjTGJ.cjs.map} +1 -1
- package/dist/{encryption-DvFVZdGz.cjs → encryption-BQEqqrGq.cjs} +2 -2
- package/dist/{encryption-DvFVZdGz.cjs.map → encryption-BQEqqrGq.cjs.map} +1 -1
- package/dist/{encryption-C8AMbomA.mjs → encryption-Cu5YTs9V.mjs} +2 -2
- package/dist/{encryption-C8AMbomA.mjs.map → encryption-Cu5YTs9V.mjs.map} +1 -1
- package/dist/{engine-BmiIUVWa.cjs → engine-DdRauUQC.cjs} +9 -9
- package/dist/{engine-BmiIUVWa.cjs.map → engine-DdRauUQC.cjs.map} +1 -1
- package/dist/{engine-BbWj0w3F.mjs → engine-q8aCVbLH.mjs} +9 -9
- package/dist/{engine-BbWj0w3F.mjs.map → engine-q8aCVbLH.mjs.map} +1 -1
- package/dist/{github-Dc1daUbH.mjs → github-CoXirRes.mjs} +9 -8
- package/dist/{github-Dc1daUbH.mjs.map → github-CoXirRes.mjs.map} +1 -1
- package/dist/{github-BWqQr8q6.cjs → github-OVZF2k0L.cjs} +13 -12
- package/dist/{github-BWqQr8q6.cjs.map → github-OVZF2k0L.cjs.map} +1 -1
- package/dist/{googlePlay-CdVCdfU8.cjs → googlePlay-CUeTUT7s.cjs} +4 -4
- package/dist/{googlePlay-CdVCdfU8.cjs.map → googlePlay-CUeTUT7s.cjs.map} +1 -1
- package/dist/{googlePlay-ByaFUly7.mjs → googlePlay-HXRRVq0l.mjs} +4 -4
- package/dist/{googlePlay-ByaFUly7.mjs.map → googlePlay-HXRRVq0l.mjs.map} +1 -1
- package/dist/iam-6LH6wptf.cjs +618 -0
- package/dist/iam-6LH6wptf.cjs.map +1 -0
- package/dist/iam-c0e8m04X.mjs +509 -0
- package/dist/iam-c0e8m04X.mjs.map +1 -0
- package/dist/{index-Dv1Zj86i.d.mts → index-DDY0cZCo.d.cts} +2 -2
- package/dist/{index-B35vTdAW.d.cts.map → index-DDY0cZCo.d.cts.map} +1 -1
- package/dist/{index-B35vTdAW.d.cts → index-DWNwkcy7.d.mts} +2 -2
- package/dist/{index-Dv1Zj86i.d.mts.map → index-DWNwkcy7.d.mts.map} +1 -1
- package/dist/index.cjs +98 -77
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +98 -77
- package/dist/index.mjs.map +1 -1
- package/dist/{local-CnVFHJjS.mjs → local-CCJ-T37d.mjs} +2 -2
- package/dist/{local-CnVFHJjS.mjs.map → local-CCJ-T37d.mjs.map} +1 -1
- package/dist/{local-qevrV6dZ.cjs → local-Dx0o6vfp.cjs} +2 -2
- package/dist/{local-qevrV6dZ.cjs.map → local-Dx0o6vfp.cjs.map} +1 -1
- package/dist/{migrate-DgfKZB41.mjs → migrate-BkwSXhxv.mjs} +4 -4
- package/dist/{migrate-DgfKZB41.mjs.map → migrate-BkwSXhxv.mjs.map} +1 -1
- package/dist/{migrate-CU8_ZWP1.cjs → migrate-CJoKOCGY.cjs} +4 -4
- package/dist/{migrate-CU8_ZWP1.cjs.map → migrate-CJoKOCGY.cjs.map} +1 -1
- package/dist/{migrate-CRRps1i6.cjs → migrate-DEsYfgzn.cjs} +4 -4
- package/dist/{migrate-CRRps1i6.cjs.map → migrate-DEsYfgzn.cjs.map} +1 -1
- package/dist/{migrate-BEuCcCwN.mjs → migrate-Dr0BeWsY.mjs} +4 -4
- package/dist/{migrate-BEuCcCwN.mjs.map → migrate-Dr0BeWsY.mjs.map} +1 -1
- package/dist/{notes-CIzrdBKE.mjs → notes-BOyzuPqr.mjs} +2 -2
- package/dist/{notes-CIzrdBKE.mjs.map → notes-BOyzuPqr.mjs.map} +1 -1
- package/dist/{notes-BrBnyZz5.cjs → notes-VFPa51Pd.cjs} +2 -2
- package/dist/{notes-BrBnyZz5.cjs.map → notes-VFPa51Pd.cjs.map} +1 -1
- package/dist/openapi.d.cts +1 -1
- package/dist/openapi.d.mts +1 -1
- package/dist/{projectBucket-CDJd3prK.mjs → projectBucket-B26ucBRI.mjs} +2 -2
- package/dist/{projectBucket-CDJd3prK.mjs.map → projectBucket-B26ucBRI.mjs.map} +1 -1
- package/dist/{projectBucket-CKr_zObJ.cjs → projectBucket-CWpY3Vxv.cjs} +2 -2
- package/dist/{projectBucket-CKr_zObJ.cjs.map → projectBucket-CWpY3Vxv.cjs.map} +1 -1
- package/dist/{publish-Bq96_QnK.mjs → publish-Bg4iffje.mjs} +2 -2
- package/dist/{publish-Bq96_QnK.mjs.map → publish-Bg4iffje.mjs.map} +1 -1
- package/dist/{publish-DMKXh1Tb.cjs → publish-IjcRoorJ.cjs} +2 -2
- package/dist/{publish-DMKXh1Tb.cjs.map → publish-IjcRoorJ.cjs.map} +1 -1
- package/dist/reconcile/public.d.cts +1 -1
- package/dist/reconcile/public.d.mts +1 -1
- package/dist/{resolve-DF9GrosZ.cjs → resolve-CgVDhWW8.cjs} +4 -4
- package/dist/{resolve-DF9GrosZ.cjs.map → resolve-CgVDhWW8.cjs.map} +1 -1
- package/dist/{resolve-CSsE7frp.mjs → resolve-rw7mLp5E.mjs} +4 -4
- package/dist/{resolve-CSsE7frp.mjs.map → resolve-rw7mLp5E.mjs.map} +1 -1
- package/dist/{rollback-CZthwqus.mjs → rollback-Cv02Cnky.mjs} +6 -6
- package/dist/{rollback-CZthwqus.mjs.map → rollback-Cv02Cnky.mjs.map} +1 -1
- package/dist/{rollback-BBFGGmMa.cjs → rollback-vdkPi_Rm.cjs} +6 -6
- package/dist/{rollback-BBFGGmMa.cjs.map → rollback-vdkPi_Rm.cjs.map} +1 -1
- package/dist/{runtime-CFvcLEJW.d.cts → runtime-D-rOcRoq.d.cts} +2 -2
- package/dist/{runtime-CFvcLEJW.d.cts.map → runtime-D-rOcRoq.d.cts.map} +1 -1
- package/dist/{runtime-dwsH6ddo.d.mts → runtime-DG1mNh_5.d.mts} +2 -2
- package/dist/{runtime-dwsH6ddo.d.mts.map → runtime-DG1mNh_5.d.mts.map} +1 -1
- package/dist/{s3-CI2QYgXH.cjs → s3-DIvAtJwk.cjs} +27 -2
- package/dist/s3-DIvAtJwk.cjs.map +1 -0
- package/dist/{s3-BBRkezf7.mjs → s3-DmsM_V2R.mjs} +28 -3
- package/dist/s3-DmsM_V2R.mjs.map +1 -0
- package/dist/{secretsManager-CQORubp9.mjs → secretsManager-CJyxFcBH.mjs} +18 -2
- package/dist/secretsManager-CJyxFcBH.mjs.map +1 -0
- package/dist/{secretsManager-RAGcEDX1.cjs → secretsManager-D8on44WI.cjs} +17 -1
- package/dist/secretsManager-D8on44WI.cjs.map +1 -0
- package/dist/{seeds-B3xvUAQf.cjs → seeds-D7q1zKCJ.cjs} +7 -1
- package/dist/{seeds-B3xvUAQf.cjs.map → seeds-D7q1zKCJ.cjs.map} +1 -1
- package/dist/{seeds-BCC8vAXR.mjs → seeds-y1rzXlAc.mjs} +2 -2
- package/dist/{seeds-BCC8vAXR.mjs.map → seeds-y1rzXlAc.mjs.map} +1 -1
- package/dist/{serverSetup-C4iAABtI.mjs → serverSetup-CvcN4zJQ.mjs} +6 -6
- package/dist/{serverSetup-C4iAABtI.mjs.map → serverSetup-CvcN4zJQ.mjs.map} +1 -1
- package/dist/{serverSetup-Dt2DTlwa.cjs → serverSetup-qXIRRhgw.cjs} +6 -6
- package/dist/{serverSetup-Dt2DTlwa.cjs.map → serverSetup-qXIRRhgw.cjs.map} +1 -1
- package/dist/{sniffer-bTrGuu9z.cjs → sniffer-CGfL25Bc.cjs} +7 -7
- package/dist/{sniffer-bTrGuu9z.cjs.map → sniffer-CGfL25Bc.cjs.map} +1 -1
- package/dist/{sniffer-C2Ot1IbK.mjs → sniffer-DuKVVAs_.mjs} +7 -7
- package/dist/{sniffer-C2Ot1IbK.mjs.map → sniffer-DuKVVAs_.mjs.map} +1 -1
- package/dist/{snsSubscriptions-CFKb7fv0.cjs → snsSubscriptions-DPfGjpuB.cjs} +8 -2
- package/dist/{snsSubscriptions-CFKb7fv0.cjs.map → snsSubscriptions-DPfGjpuB.cjs.map} +1 -1
- package/dist/{snsSubscriptions-QDDDn9Qi.mjs → snsSubscriptions-nnSUW2Eh.mjs} +3 -3
- package/dist/{snsSubscriptions-QDDDn9Qi.mjs.map → snsSubscriptions-nnSUW2Eh.mjs.map} +1 -1
- package/dist/{sst-DDRWlXdv.mjs → sst-Bw7686br.mjs} +4 -4
- package/dist/{sst-DDRWlXdv.mjs.map → sst-Bw7686br.mjs.map} +1 -1
- package/dist/{sst-iRdMlGKd.cjs → sst-Md7c1UC_.cjs} +4 -4
- package/dist/{sst-iRdMlGKd.cjs.map → sst-Md7c1UC_.cjs.map} +1 -1
- package/dist/{stack-CIOY44aC.mjs → stack-D2cLLaO-.mjs} +6 -6
- package/dist/{stack-CIOY44aC.mjs.map → stack-D2cLLaO-.mjs.map} +1 -1
- package/dist/{stack-B9iDYMrq.cjs → stack-DTcnynGb.cjs} +6 -6
- package/dist/{stack-B9iDYMrq.cjs.map → stack-DTcnynGb.cjs.map} +1 -1
- package/dist/{stage-DA74aD_V.mjs → stage-Bw3bJ7Au.mjs} +5 -5
- package/dist/{stage-DA74aD_V.mjs.map → stage-Bw3bJ7Au.mjs.map} +1 -1
- package/dist/{stage-ycFS9mVn.cjs → stage-RLOenlHV.cjs} +5 -5
- package/dist/{stage-ycFS9mVn.cjs.map → stage-RLOenlHV.cjs.map} +1 -1
- package/dist/target/public.cjs +1 -1
- package/dist/target/public.d.cts +2 -2
- package/dist/target/public.d.mts +2 -2
- package/dist/target/public.mjs +1 -1
- package/dist/{terminal-RxfbNUwl.cjs → terminal-C-_cMKTY.cjs} +2 -2
- package/dist/{terminal-RxfbNUwl.cjs.map → terminal-C-_cMKTY.cjs.map} +1 -1
- package/dist/{terminal-DX22WLvT.mjs → terminal-Dq29bK3u.mjs} +2 -2
- package/dist/{terminal-DX22WLvT.mjs.map → terminal-Dq29bK3u.mjs.map} +1 -1
- package/dist/{types-Dk--xVOT.d.cts → types-CvucX3yD.d.mts} +7 -2
- package/dist/types-CvucX3yD.d.mts.map +1 -0
- package/dist/{types-DwQYpd_0.d.mts → types-D1C8pUyh.d.cts} +8 -1
- package/dist/types-D1C8pUyh.d.cts.map +1 -0
- package/dist/workspace/index.d.cts +2 -2
- package/dist/workspace/index.d.mts +2 -2
- package/package.json +15 -15
- package/dist/aws-8QQ8n-t6.mjs.map +0 -1
- package/dist/aws-DY9NqQIT.cjs.map +0 -1
- package/dist/compose-CnXZAYNM.mjs.map +0 -1
- package/dist/compose-D7gOSspy.cjs.map +0 -1
- package/dist/credentials-CjFtNBVH.mjs.map +0 -1
- package/dist/credentials-DwIRfeBL.cjs.map +0 -1
- package/dist/deploy-3bsiWJxj.cjs.map +0 -1
- package/dist/deploy-BI3fHnyb.mjs.map +0 -1
- package/dist/s3-BBRkezf7.mjs.map +0 -1
- package/dist/s3-CI2QYgXH.cjs.map +0 -1
- package/dist/secretsManager-CQORubp9.mjs.map +0 -1
- package/dist/secretsManager-RAGcEDX1.cjs.map +0 -1
- package/dist/types-Dk--xVOT.d.cts.map +0 -1
- package/dist/types-DwQYpd_0.d.mts.map +0 -1
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
const require_rolldown_runtime = require("./rolldown-runtime-C0BPl7ul.cjs");
|
|
2
2
|
const require_errors = require("./errors-DMC4Umsb.cjs");
|
|
3
|
-
const require_credentials = require("./credentials-
|
|
3
|
+
const require_credentials = require("./credentials-UlL1n_Rd.cjs");
|
|
4
4
|
const require_workspace = require("./workspace-1szcahj9.cjs");
|
|
5
|
-
const require_apps = require("./apps-
|
|
5
|
+
const require_apps = require("./apps-CtjYJS9e.cjs");
|
|
6
6
|
const require_define = require("./define-crmMcXFS.cjs");
|
|
7
|
-
const require_compose = require("./compose-
|
|
7
|
+
const require_compose = require("./compose-BD2rwRfn.cjs");
|
|
8
8
|
const require_SubscriberGenerator = require("./SubscriberGenerator-mZpSuSU7.cjs");
|
|
9
9
|
const require_config = require("./config-B5Hi3mLK.cjs");
|
|
10
10
|
const require_discover = require("./discover-CRywE7yc.cjs");
|
|
11
|
-
const require_resolve = require("./resolve-
|
|
12
|
-
const require_notes = require("./notes-
|
|
13
|
-
const require_stack = require("./stack-
|
|
14
|
-
const require_snsSubscriptions = require("./snsSubscriptions-
|
|
15
|
-
const require_local = require("./local-
|
|
16
|
-
const require_sniffer = require("./sniffer-
|
|
17
|
-
const
|
|
18
|
-
const
|
|
11
|
+
const require_resolve = require("./resolve-CgVDhWW8.cjs");
|
|
12
|
+
const require_notes = require("./notes-VFPa51Pd.cjs");
|
|
13
|
+
const require_stack = require("./stack-DTcnynGb.cjs");
|
|
14
|
+
const require_snsSubscriptions = require("./snsSubscriptions-DPfGjpuB.cjs");
|
|
15
|
+
const require_local = require("./local-Dx0o6vfp.cjs");
|
|
16
|
+
const require_sniffer = require("./sniffer-CGfL25Bc.cjs");
|
|
17
|
+
const require_iam = require("./iam-6LH6wptf.cjs");
|
|
18
|
+
const require_projectBucket = require("./projectBucket-CWpY3Vxv.cjs");
|
|
19
|
+
const require_seeds = require("./seeds-D7q1zKCJ.cjs");
|
|
19
20
|
const require_credentialSchemas = require("./credentialSchemas-BAklWDna.cjs");
|
|
20
21
|
let node_path = require("node:path");
|
|
21
|
-
let node_crypto = require("node:crypto");
|
|
22
22
|
let _geekmidas_manifest = require("@geekmidas/manifest");
|
|
23
23
|
let _geekmidas_storage_s3_url = require("@geekmidas/storage/s3-url");
|
|
24
24
|
_geekmidas_storage_s3_url = require_rolldown_runtime.__toESM(_geekmidas_storage_s3_url, 1);
|
|
@@ -81,506 +81,6 @@ async function deploySecrets(workspace, stage, redactor, options = {}) {
|
|
|
81
81
|
mask: (value) => redactor.add(value)
|
|
82
82
|
};
|
|
83
83
|
}
|
|
84
|
-
const SUFFIX_ALPHABET = "abcdefghijklmnopqrstuvwxyz0123456789";
|
|
85
|
-
/** A name that S3 would refuse — what the name builder never returns. */
|
|
86
|
-
var InvalidBucketName = class extends require_errors.GkmError {
|
|
87
|
-
bucket;
|
|
88
|
-
reason;
|
|
89
|
-
constructor(bucket, reason) {
|
|
90
|
-
super(`'${bucket}' is not a valid S3 bucket name: ${reason}. Rename the construct or set deploy.namespace in gkm.config.ts to something that leaves room for it.`);
|
|
91
|
-
this.bucket = bucket;
|
|
92
|
-
this.reason = reason;
|
|
93
|
-
this.name = "InvalidBucketName";
|
|
94
|
-
}
|
|
95
|
-
};
|
|
96
|
-
/** Lowercase `[a-z0-9-]`, runs of anything else one `-`, no edge dashes. */
|
|
97
|
-
function part(value) {
|
|
98
|
-
return (0, _geekmidas_manifest.kebabCase)(value).toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* `parts` joined by `-`, shortened to `max` characters by trimming the longest
|
|
102
|
-
* part one character at a time — so a long construct id gives way before a
|
|
103
|
-
* short stage name does, and every part keeps its start.
|
|
104
|
-
*/
|
|
105
|
-
function fitParts(parts, max) {
|
|
106
|
-
const kept = parts.map(part).filter(Boolean);
|
|
107
|
-
const length = () => kept.reduce((sum, p) => sum + p.length, 0) + kept.length - 1;
|
|
108
|
-
while (length() > max) {
|
|
109
|
-
let longest = 0;
|
|
110
|
-
for (let i = 1; i < kept.length; i++) if (kept[i].length > kept[longest].length) longest = i;
|
|
111
|
-
if (kept[longest].length <= 1) break;
|
|
112
|
-
kept[longest] = kept[longest].slice(0, -1).replace(/-+$/, "");
|
|
113
|
-
}
|
|
114
|
-
return kept.join("-");
|
|
115
|
-
}
|
|
116
|
-
/** Why `name` is not a valid bucket name, or undefined when it is. */
|
|
117
|
-
function bucketNameProblem(name) {
|
|
118
|
-
if (name.length < 3 || name.length > 63) return `it is ${name.length} characters, and S3 takes 3 to 63`;
|
|
119
|
-
if (!/^[a-z0-9-]+$/.test(name)) return "it may hold only lowercase letters, digits and -";
|
|
120
|
-
if (!/^[a-z0-9].*[a-z0-9]$/.test(name)) return "it must start and end with a letter or a digit";
|
|
121
|
-
if (name.startsWith("xn--") || name.startsWith("sthree-")) return "it starts with a prefix S3 reserves ('xn--', 'sthree-')";
|
|
122
|
-
if (name.endsWith("-s3alias") || name.endsWith("--ol-s3")) return "it ends with a suffix S3 reserves ('-s3alias', '--ol-s3')";
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* The good name: `<namespace>-<project>-<stage>-<bucket id>`, lowercased, no
|
|
126
|
-
* dots, shortened to leave room for a clash's suffix.
|
|
127
|
-
*
|
|
128
|
-
* @throws {InvalidBucketName} when nothing usable is left
|
|
129
|
-
*/
|
|
130
|
-
function bucketName(input) {
|
|
131
|
-
const name = fitParts([
|
|
132
|
-
input.scope,
|
|
133
|
-
input.stage,
|
|
134
|
-
input.id
|
|
135
|
-
], 56);
|
|
136
|
-
const problem = bucketNameProblem(name);
|
|
137
|
-
if (problem) throw new InvalidBucketName(name, problem);
|
|
138
|
-
return name;
|
|
139
|
-
}
|
|
140
|
-
/** Six random `[a-z0-9]` characters. */
|
|
141
|
-
function randomSuffix(random = node_crypto.randomInt) {
|
|
142
|
-
let suffix = "";
|
|
143
|
-
for (let i = 0; i < 6; i++) suffix += SUFFIX_ALPHABET[random(36)];
|
|
144
|
-
return suffix;
|
|
145
|
-
}
|
|
146
|
-
/** The good name with a clash's suffix. */
|
|
147
|
-
function suffixedBucketName(good, suffix) {
|
|
148
|
-
return `${good}-${suffix}`;
|
|
149
|
-
}
|
|
150
|
-
/**
|
|
151
|
-
* The IAM user a bucket is reached with on a stage:
|
|
152
|
-
* `gkm-<project>-<stage>-<bucket id>`, at most 64 characters.
|
|
153
|
-
*/
|
|
154
|
-
function iamUserName(input) {
|
|
155
|
-
return fitParts([
|
|
156
|
-
"gkm",
|
|
157
|
-
input.scope,
|
|
158
|
-
input.stage,
|
|
159
|
-
input.id
|
|
160
|
-
], 64);
|
|
161
|
-
}
|
|
162
|
-
/** The path every user gkm creates is under, so it finds its own. */
|
|
163
|
-
const IAM_USER_PATH = "/gkm/";
|
|
164
|
-
/** The inline policy each user is given. */
|
|
165
|
-
const IAM_POLICY_NAME = "gkm-bucket";
|
|
166
|
-
//#endregion
|
|
167
|
-
//#region src/providers/s3/policy.ts
|
|
168
|
-
const bucketArn = (bucket) => `arn:aws:s3:::${bucket}`;
|
|
169
|
-
/**
|
|
170
|
-
* What the app's key may do: objects in this bucket, and listing it — and
|
|
171
|
-
* nothing else in the account.
|
|
172
|
-
*
|
|
173
|
-
* Multipart uploads are in it because a presigned upload of a large file is
|
|
174
|
-
* one, and an abandoned one is cleaned up by the app. Reading old versions is
|
|
175
|
-
* added only when the bucket keeps them.
|
|
176
|
-
*/
|
|
177
|
-
function userPolicy(bucket, options = {}) {
|
|
178
|
-
return {
|
|
179
|
-
Version: "2012-10-17",
|
|
180
|
-
Statement: [
|
|
181
|
-
{
|
|
182
|
-
Sid: "GkmObjects",
|
|
183
|
-
Effect: "Allow",
|
|
184
|
-
Action: [
|
|
185
|
-
"s3:GetObject",
|
|
186
|
-
"s3:PutObject",
|
|
187
|
-
"s3:DeleteObject",
|
|
188
|
-
"s3:AbortMultipartUpload",
|
|
189
|
-
"s3:ListMultipartUploadParts",
|
|
190
|
-
...options.versioning ? ["s3:GetObjectVersion"] : []
|
|
191
|
-
],
|
|
192
|
-
Resource: `${bucketArn(bucket)}/*`
|
|
193
|
-
},
|
|
194
|
-
{
|
|
195
|
-
Sid: "GkmBucket",
|
|
196
|
-
Effect: "Allow",
|
|
197
|
-
Action: [
|
|
198
|
-
"s3:ListBucket",
|
|
199
|
-
"s3:GetBucketLocation",
|
|
200
|
-
"s3:ListBucketMultipartUploads"
|
|
201
|
-
],
|
|
202
|
-
Resource: bucketArn(bucket)
|
|
203
|
-
},
|
|
204
|
-
...options.eventsTopicArn ? [{
|
|
205
|
-
Sid: "GkmEvents",
|
|
206
|
-
Effect: "Allow",
|
|
207
|
-
Action: "sns:ConfirmSubscription",
|
|
208
|
-
Resource: options.eventsTopicArn
|
|
209
|
-
}] : []
|
|
210
|
-
]
|
|
211
|
-
};
|
|
212
|
-
}
|
|
213
|
-
/**
|
|
214
|
-
* One open pattern as the resource it is public on. A `**` is S3's `*`; a
|
|
215
|
-
* single `*` is too, which crosses `/` where the construct's own check does
|
|
216
|
-
* not — the construct is the stricter of the two (see `bucketPolicy` in
|
|
217
|
-
* reconcile, which the local MinIO is given the same way).
|
|
218
|
-
*/
|
|
219
|
-
function openResource(bucket, pattern) {
|
|
220
|
-
const path = pattern.replace(/^\/+/, "").replace(/\*\*/g, "*");
|
|
221
|
-
return `${bucketArn(bucket)}/${path}`;
|
|
222
|
-
}
|
|
223
|
-
/**
|
|
224
|
-
* The bucket's own policy: every request refused unless it came over TLS,
|
|
225
|
-
* and — only when a file server opens paths on it — `s3:GetObject` on
|
|
226
|
-
* exactly those prefixes: to anyone, or, when a CDN serves them, to
|
|
227
|
-
* CloudFront alone, for exactly the stage's distributions. Behind a CDN the
|
|
228
|
-
* bucket is never public: a key outside the open prefixes is refused to
|
|
229
|
-
* CloudFront too, so the edge answers it 403.
|
|
230
|
-
*/
|
|
231
|
-
function bucketPolicy(bucket, open = [], options = {}) {
|
|
232
|
-
const statements = [{
|
|
233
|
-
Sid: "GkmDenyInsecureTransport",
|
|
234
|
-
Effect: "Deny",
|
|
235
|
-
Principal: "*",
|
|
236
|
-
Action: "s3:*",
|
|
237
|
-
Resource: [bucketArn(bucket), `${bucketArn(bucket)}/*`],
|
|
238
|
-
Condition: { Bool: { "aws:SecureTransport": "false" } }
|
|
239
|
-
}];
|
|
240
|
-
const resources = [...new Set(open.map((p) => openResource(bucket, p)))].sort();
|
|
241
|
-
if (open.length > 0 && options.cdn) statements.push({
|
|
242
|
-
Sid: "GkmCdnRead",
|
|
243
|
-
Effect: "Allow",
|
|
244
|
-
Principal: { Service: "cloudfront.amazonaws.com" },
|
|
245
|
-
Action: "s3:GetObject",
|
|
246
|
-
Resource: resources,
|
|
247
|
-
Condition: { StringEquals: { "AWS:SourceArn": [...new Set(options.cdn.distributionArns)].sort() } }
|
|
248
|
-
});
|
|
249
|
-
else if (open.length > 0) statements.push({
|
|
250
|
-
Sid: "GkmOpenPaths",
|
|
251
|
-
Effect: "Allow",
|
|
252
|
-
Principal: "*",
|
|
253
|
-
Action: "s3:GetObject",
|
|
254
|
-
Resource: resources
|
|
255
|
-
});
|
|
256
|
-
if (options.sesWrite) statements.push({
|
|
257
|
-
Sid: "GkmSesWritesMail",
|
|
258
|
-
Effect: "Allow",
|
|
259
|
-
Principal: { Service: "ses.amazonaws.com" },
|
|
260
|
-
Action: "s3:PutObject",
|
|
261
|
-
Resource: `${bucketArn(bucket)}/${options.sesWrite.prefix}*`,
|
|
262
|
-
Condition: { StringEquals: { "aws:SourceAccount": options.sesWrite.account } }
|
|
263
|
-
});
|
|
264
|
-
return {
|
|
265
|
-
Version: "2012-10-17",
|
|
266
|
-
Statement: statements
|
|
267
|
-
};
|
|
268
|
-
}
|
|
269
|
-
/**
|
|
270
|
-
* Block Public Access. All four flags on, unless the bucket has open paths:
|
|
271
|
-
* then a *policy* may make it public (`BlockPublicPolicy`,
|
|
272
|
-
* `RestrictPublicBuckets` off), and ACLs still may not.
|
|
273
|
-
*/
|
|
274
|
-
function publicAccessBlock(open) {
|
|
275
|
-
return {
|
|
276
|
-
BlockPublicAcls: true,
|
|
277
|
-
IgnorePublicAcls: true,
|
|
278
|
-
BlockPublicPolicy: !open,
|
|
279
|
-
RestrictPublicBuckets: !open
|
|
280
|
-
};
|
|
281
|
-
}
|
|
282
|
-
function corsRule(origins) {
|
|
283
|
-
return {
|
|
284
|
-
AllowedMethods: [
|
|
285
|
-
"GET",
|
|
286
|
-
"HEAD",
|
|
287
|
-
"POST",
|
|
288
|
-
"PUT"
|
|
289
|
-
],
|
|
290
|
-
AllowedOrigins: [...new Set(origins)].sort(),
|
|
291
|
-
AllowedHeaders: ["*"],
|
|
292
|
-
ExposeHeaders: ["ETag"],
|
|
293
|
-
MaxAgeSeconds: 3e3
|
|
294
|
-
};
|
|
295
|
-
}
|
|
296
|
-
/**
|
|
297
|
-
* A policy document in one canonical form — keys sorted, a lone string a
|
|
298
|
-
* one-element list, lists sorted — so one AWS reformatted reads as the same
|
|
299
|
-
* document rather than as drift.
|
|
300
|
-
*/
|
|
301
|
-
function canonicalPolicy(value) {
|
|
302
|
-
return JSON.stringify(canonical(value));
|
|
303
|
-
}
|
|
304
|
-
function canonical(value, key) {
|
|
305
|
-
if (Array.isArray(value)) {
|
|
306
|
-
const items = value.map((v) => canonical(v));
|
|
307
|
-
return key === "Statement" ? items : items.map((v) => JSON.stringify(v)).sort();
|
|
308
|
-
}
|
|
309
|
-
if (value && typeof value === "object") return Object.fromEntries(Object.keys(value).sort().map((k) => {
|
|
310
|
-
const v = value[k];
|
|
311
|
-
return [k, canonical(k === "Action" || k === "Resource" || k === "AWS" || k === "AWS:SourceArn" ? Array.isArray(v) ? v : [v] : v, k)];
|
|
312
|
-
}));
|
|
313
|
-
return value;
|
|
314
|
-
}
|
|
315
|
-
//#endregion
|
|
316
|
-
//#region src/providers/iam.ts
|
|
317
|
-
/**
|
|
318
|
-
* An IAM user gkm creates for one thing on a stage, its inline policy, and
|
|
319
|
-
* the access key written into the stage's secrets as an `s3://` URL — what
|
|
320
|
-
* the `s3` provider gives each bucket, and the deploy gives a stage's
|
|
321
|
-
* backups.
|
|
322
|
-
*
|
|
323
|
-
* - **The user** is under `/gkm/`, tagged with the deploy identity, the stage
|
|
324
|
-
* and what it is for. One that exists without those tags is someone
|
|
325
|
-
* else's, and is refused rather than taken over.
|
|
326
|
-
* - **Its policy** is read on every run and put back when it drifted.
|
|
327
|
-
* - **Its key**: one, written into the stage's secrets the moment IAM shows
|
|
328
|
-
* its secret. `--rotate-keys` issues a successor and keeps the old one
|
|
329
|
-
* active until the stage has deployed with the new one; the next run after
|
|
330
|
-
* that — or `--retire-old-keys` — deletes it.
|
|
331
|
-
* - **A new key** takes IAM seconds to become usable: the state records when
|
|
332
|
-
* it was issued, and a check made with it waits that out
|
|
333
|
-
* ({@link whileKeyIsNew}).
|
|
334
|
-
*/
|
|
335
|
-
/** The tags gkm finds its own buckets and users by. */
|
|
336
|
-
const TAG_PROJECT = "gkm:project";
|
|
337
|
-
const TAG_STAGE = "gkm:stage";
|
|
338
|
-
const TAG_CONSTRUCT = "gkm:construct";
|
|
339
|
-
/** The keys gkm tags a bucket and a user with. */
|
|
340
|
-
function identityTags(ctx, id) {
|
|
341
|
-
return [
|
|
342
|
-
{
|
|
343
|
-
Key: TAG_PROJECT,
|
|
344
|
-
Value: ctx.identity.key
|
|
345
|
-
},
|
|
346
|
-
{
|
|
347
|
-
Key: TAG_STAGE,
|
|
348
|
-
Value: ctx.stage
|
|
349
|
-
},
|
|
350
|
-
{
|
|
351
|
-
Key: TAG_CONSTRUCT,
|
|
352
|
-
Value: id
|
|
353
|
-
}
|
|
354
|
-
];
|
|
355
|
-
}
|
|
356
|
-
/** A read whose "there is none" answer is one of `missing`. */
|
|
357
|
-
async function readOr$3(read, missing) {
|
|
358
|
-
try {
|
|
359
|
-
return await read();
|
|
360
|
-
} catch (error) {
|
|
361
|
-
const e = error;
|
|
362
|
-
if (missing.includes(e?.Code ?? e?.name ?? "")) return void 0;
|
|
363
|
-
throw error;
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
/** IAM returns a policy document URL-encoded; an emulator may not. */
|
|
367
|
-
function decodePolicy(document) {
|
|
368
|
-
try {
|
|
369
|
-
return decodeURIComponent(document);
|
|
370
|
-
} catch {
|
|
371
|
-
return document;
|
|
372
|
-
}
|
|
373
|
-
}
|
|
374
|
-
/**
|
|
375
|
-
* The user and its inline policy: found — and refused when it is not this
|
|
376
|
-
* stage's — or created, and the policy put back when it drifted.
|
|
377
|
-
*
|
|
378
|
-
* @throws {IamUserNotOwned}
|
|
379
|
-
*/
|
|
380
|
-
async function ensureIamUser(ctx, clients, input) {
|
|
381
|
-
const { IAM, iam } = clients;
|
|
382
|
-
const { id, user, policy } = input;
|
|
383
|
-
const entry = {
|
|
384
|
-
key: `iam-user:${id}`,
|
|
385
|
-
type: "iam-user"
|
|
386
|
-
};
|
|
387
|
-
const found = await readOr$3(() => iam.send(new IAM.GetUserCommand({ UserName: user })), ["NoSuchEntity", "NoSuchEntityException"]);
|
|
388
|
-
if (found?.User) {
|
|
389
|
-
const tags = await iam.send(new IAM.ListUserTagsCommand({ UserName: user }));
|
|
390
|
-
const tag = (key) => tags.Tags?.find((t) => t.Key === key)?.Value;
|
|
391
|
-
if (found.User.Path !== "/gkm/" || tag("gkm:project") !== ctx.identity.key || tag("gkm:stage") !== ctx.stage) throw new require_workspace.IamUserNotOwned(user, ctx.identity.key, ctx.stage);
|
|
392
|
-
await ctx.state.ready(entry, user);
|
|
393
|
-
} else await ctx.change({
|
|
394
|
-
construct: id,
|
|
395
|
-
resource: `IAM user ${user}`,
|
|
396
|
-
change: `create under ${IAM_USER_PATH}`
|
|
397
|
-
}, async () => {
|
|
398
|
-
await ctx.state.pending(entry);
|
|
399
|
-
await iam.send(new IAM.CreateUserCommand({
|
|
400
|
-
UserName: user,
|
|
401
|
-
Path: IAM_USER_PATH,
|
|
402
|
-
Tags: identityTags(ctx, id)
|
|
403
|
-
}));
|
|
404
|
-
await ctx.state.ready(entry, user);
|
|
405
|
-
});
|
|
406
|
-
const exists = Boolean(found?.User) || !ctx.dryRun;
|
|
407
|
-
const current = exists ? await readOr$3(() => iam.send(new IAM.GetUserPolicyCommand({
|
|
408
|
-
UserName: user,
|
|
409
|
-
PolicyName: input.policyName
|
|
410
|
-
})), ["NoSuchEntity", "NoSuchEntityException"]) : void 0;
|
|
411
|
-
const document = current?.PolicyDocument ? JSON.parse(decodePolicy(current.PolicyDocument)) : void 0;
|
|
412
|
-
if (!document || canonicalPolicy(document) !== canonicalPolicy(policy)) await ctx.change({
|
|
413
|
-
construct: id,
|
|
414
|
-
resource: `IAM user ${user}`,
|
|
415
|
-
change: `policy ${input.policyName}: ${input.describe}`
|
|
416
|
-
}, async () => {
|
|
417
|
-
await iam.send(new IAM.PutUserPolicyCommand({
|
|
418
|
-
UserName: user,
|
|
419
|
-
PolicyName: input.policyName,
|
|
420
|
-
PolicyDocument: JSON.stringify(policy)
|
|
421
|
-
}));
|
|
422
|
-
});
|
|
423
|
-
return {
|
|
424
|
-
user,
|
|
425
|
-
exists
|
|
426
|
-
};
|
|
427
|
-
}
|
|
428
|
-
/**
|
|
429
|
-
* The user's access key, in the stage's secrets as the bucket's URL.
|
|
430
|
-
*
|
|
431
|
-
* - First run: one key, written into the stage's secrets.
|
|
432
|
-
* - `--rotate-keys`: a second key, written in place of the first; the first
|
|
433
|
-
* stays active until the stage has deployed with the second, and the next
|
|
434
|
-
* run after that deploy — or `--retire-old-keys` — deletes it.
|
|
435
|
-
* - A key the secrets no longer hold (a store emptied by hand): replaced the
|
|
436
|
-
* same way, since its secret cannot be read back.
|
|
437
|
-
*
|
|
438
|
-
* @throws {BucketKeySetElsewhere} when the secret names another bucket
|
|
439
|
-
* @throws {RotationInProgress} on `--rotate-keys` with the last rotation's old key still active
|
|
440
|
-
* @throws {AccessKeyLimit} when the user has two keys gkm did not record
|
|
441
|
-
*/
|
|
442
|
-
async function ensureAccessKey(ctx, clients, input) {
|
|
443
|
-
const { IAM, iam } = clients;
|
|
444
|
-
const { id, bucket, user, urlKey } = input;
|
|
445
|
-
const entryKey = `iam-access-key:${id}`;
|
|
446
|
-
const record = ctx.state.record(entryKey);
|
|
447
|
-
const given = ctx.secrets[urlKey];
|
|
448
|
-
let inUrl;
|
|
449
|
-
let parsed;
|
|
450
|
-
if (given !== void 0) {
|
|
451
|
-
try {
|
|
452
|
-
parsed = _geekmidas_storage_s3_url.parse(given);
|
|
453
|
-
} catch {
|
|
454
|
-
parsed = void 0;
|
|
455
|
-
}
|
|
456
|
-
if (parsed?.bucket !== bucket) throw new require_workspace.BucketKeySetElsewhere(urlKey, bucket, parsed?.bucket ?? given.replace(/\/\/[^@]*@/, "//"), ctx.stage);
|
|
457
|
-
inUrl = parsed.accessKeyId;
|
|
458
|
-
}
|
|
459
|
-
const listed = input.exists ? (await iam.send(new IAM.ListAccessKeysCommand({ UserName: user }))).AccessKeyMetadata?.map((k) => k.AccessKeyId) ?? [] : [];
|
|
460
|
-
let current = record?.status === "ready" ? record.id : void 0;
|
|
461
|
-
let previous = typeof record?.data?.previous === "string" ? record.data.previous : void 0;
|
|
462
|
-
const rotatedAt = typeof record?.data?.rotatedAt === "string" ? record.data.rotatedAt : void 0;
|
|
463
|
-
const entry = (data = {}) => ({
|
|
464
|
-
key: entryKey,
|
|
465
|
-
type: "iam-access-key",
|
|
466
|
-
data: {
|
|
467
|
-
user,
|
|
468
|
-
...data
|
|
469
|
-
}
|
|
470
|
-
});
|
|
471
|
-
if (previous && current) {
|
|
472
|
-
const deployed = rotatedAt !== void 0 && ctx.state.lastDeployedAt !== void 0 && ctx.state.lastDeployedAt > rotatedAt;
|
|
473
|
-
if (ctx.retireOldKeys || deployed) {
|
|
474
|
-
const old = previous;
|
|
475
|
-
const keep = current;
|
|
476
|
-
await ctx.change({
|
|
477
|
-
construct: id,
|
|
478
|
-
resource: `IAM user ${user}`,
|
|
479
|
-
change: `delete the rotated-out access key ${old}`
|
|
480
|
-
}, async () => {
|
|
481
|
-
if (listed.includes(old)) await iam.send(new IAM.DeleteAccessKeyCommand({
|
|
482
|
-
UserName: user,
|
|
483
|
-
AccessKeyId: old
|
|
484
|
-
}));
|
|
485
|
-
await ctx.state.ready(entry(), keep);
|
|
486
|
-
});
|
|
487
|
-
previous = void 0;
|
|
488
|
-
} else ctx.log(` ${id}: the old access key ${previous} stays active until '${ctx.stage}' is deployed with the new one; the next deploy after that deletes it (or pass --retire-old-keys)`);
|
|
489
|
-
}
|
|
490
|
-
if (!current && inUrl && listed.includes(inUrl)) {
|
|
491
|
-
await ctx.state.ready(entry(), inUrl);
|
|
492
|
-
current = inUrl;
|
|
493
|
-
}
|
|
494
|
-
if (current !== void 0 && listed.includes(current) && inUrl === current && !ctx.rotateKeys) {
|
|
495
|
-
if (parsed && parsed.region !== clients.region) {
|
|
496
|
-
const address = parsed;
|
|
497
|
-
await ctx.change({
|
|
498
|
-
construct: id,
|
|
499
|
-
resource: urlKey,
|
|
500
|
-
change: `name ${clients.region}, the bucket's region (it said ${address.region ?? "none"})`
|
|
501
|
-
}, () => ctx.writeSecrets({ [urlKey]: _geekmidas_storage_s3_url.build({
|
|
502
|
-
...address,
|
|
503
|
-
region: clients.region
|
|
504
|
-
}) }));
|
|
505
|
-
}
|
|
506
|
-
return;
|
|
507
|
-
}
|
|
508
|
-
if (ctx.rotateKeys && previous) throw new require_workspace.RotationInProgress(id, previous, ctx.stage);
|
|
509
|
-
const outgoing = current && listed.includes(current) ? current : void 0;
|
|
510
|
-
if (listed.length >= 2) throw new require_workspace.AccessKeyLimit(user, listed);
|
|
511
|
-
const why = !current ? "create an access key" : ctx.rotateKeys ? "rotate: issue a new access key" : "issue a new access key (the secrets no longer hold the recorded one)";
|
|
512
|
-
await ctx.change({
|
|
513
|
-
construct: id,
|
|
514
|
-
resource: `IAM user ${user}`,
|
|
515
|
-
change: why
|
|
516
|
-
}, async () => {
|
|
517
|
-
await ctx.state.pending(entry(outgoing ? { previous: outgoing } : {}));
|
|
518
|
-
const key = (await iam.send(new IAM.CreateAccessKeyCommand({ UserName: user }))).AccessKey;
|
|
519
|
-
await ctx.writeSecrets({ [urlKey]: _geekmidas_storage_s3_url.build({
|
|
520
|
-
bucket,
|
|
521
|
-
region: clients.region,
|
|
522
|
-
...clients.endpoint ? {
|
|
523
|
-
endpoint: clients.endpoint,
|
|
524
|
-
forcePathStyle: true
|
|
525
|
-
} : {},
|
|
526
|
-
accessKeyId: key.AccessKeyId,
|
|
527
|
-
secretAccessKey: key.SecretAccessKey
|
|
528
|
-
}) });
|
|
529
|
-
const issuedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
530
|
-
await ctx.state.ready(entry(outgoing ? {
|
|
531
|
-
previous: outgoing,
|
|
532
|
-
rotatedAt: issuedAt,
|
|
533
|
-
issuedAt
|
|
534
|
-
} : { issuedAt }), key.AccessKeyId);
|
|
535
|
-
});
|
|
536
|
-
if (outgoing) ctx.log(` ${urlKey} holds the new key. This deploy moves '${ctx.stage}' onto it; the next deploy after it deletes the old key ${outgoing}`);
|
|
537
|
-
}
|
|
538
|
-
/** How long a key issued this recently counts as new to IAM. */
|
|
539
|
-
const NEW_KEY_WINDOW_MS = 6e5;
|
|
540
|
-
/** The waits between asks while a new key becomes usable: about a minute. */
|
|
541
|
-
let newKeyWaits = [
|
|
542
|
-
2e3,
|
|
543
|
-
4e3,
|
|
544
|
-
8e3,
|
|
545
|
-
15e3,
|
|
546
|
-
15e3,
|
|
547
|
-
15e3
|
|
548
|
-
];
|
|
549
|
-
/**
|
|
550
|
-
* When the key in a URL was issued, if the stage's state says it was just
|
|
551
|
-
* now — the record of `id`'s key naming that very key.
|
|
552
|
-
*/
|
|
553
|
-
function issuedJustNow(resources, id, accessKeyId) {
|
|
554
|
-
const record = resources?.[`iam-access-key:${id}`];
|
|
555
|
-
const issuedAt = record?.data?.issuedAt;
|
|
556
|
-
if (record?.id !== accessKeyId || typeof issuedAt !== "string") return;
|
|
557
|
-
const age = Date.now() - Date.parse(issuedAt);
|
|
558
|
-
return age >= 0 && age < NEW_KEY_WINDOW_MS ? issuedAt : void 0;
|
|
559
|
-
}
|
|
560
|
-
/**
|
|
561
|
-
* `ask` again, for about a minute, while it is `refused` and the key was
|
|
562
|
-
* issued just now — IAM refuses a key for seconds after making it. Returns
|
|
563
|
-
* the last answer and how long was waited.
|
|
564
|
-
*/
|
|
565
|
-
async function whileKeyIsNew(first, options) {
|
|
566
|
-
let answer = first;
|
|
567
|
-
let waited = 0;
|
|
568
|
-
if (!options.issuedAt || !options.refused(answer)) return {
|
|
569
|
-
answer,
|
|
570
|
-
waited
|
|
571
|
-
};
|
|
572
|
-
options.onWait?.();
|
|
573
|
-
for (const wait of newKeyWaits) {
|
|
574
|
-
await new Promise((resolve) => setTimeout(resolve, wait));
|
|
575
|
-
waited += wait;
|
|
576
|
-
answer = await options.ask();
|
|
577
|
-
if (!options.refused(answer)) break;
|
|
578
|
-
}
|
|
579
|
-
return {
|
|
580
|
-
answer,
|
|
581
|
-
waited
|
|
582
|
-
};
|
|
583
|
-
}
|
|
584
84
|
//#endregion
|
|
585
85
|
//#region src/backups/provision.ts
|
|
586
86
|
/** What the backups user and its key are recorded and tagged as. */
|
|
@@ -591,7 +91,7 @@ const BACKUPS_POLICY_NAME = "gkm-backups";
|
|
|
591
91
|
const VERIFY_MARKER = ".gkm-verify";
|
|
592
92
|
/** The backups user's name: `gkm-<project>-<stage>-backups`. */
|
|
593
93
|
function backupsUserName(scope, stage) {
|
|
594
|
-
return iamUserName({
|
|
94
|
+
return require_iam.iamUserName({
|
|
595
95
|
scope,
|
|
596
96
|
stage,
|
|
597
97
|
id: BACKUPS_ID
|
|
@@ -720,14 +220,14 @@ async function ensureStageBackups(input) {
|
|
|
720
220
|
}, async () => {
|
|
721
221
|
await require_projectBucket.reconcileProjectBucketLifecycle(clients.s3, bucket, expiries);
|
|
722
222
|
});
|
|
723
|
-
const user = await ensureIamUser(ctx, clients, {
|
|
223
|
+
const user = await require_iam.ensureIamUser(ctx, clients, {
|
|
724
224
|
id: BACKUPS_ID,
|
|
725
225
|
user: backupsUserName(ctx.identity.scope, stage),
|
|
726
226
|
policyName: BACKUPS_POLICY_NAME,
|
|
727
227
|
policy: backupsPolicy(bucket, prefix),
|
|
728
228
|
describe: `put objects under ${prefix}/ only`
|
|
729
229
|
});
|
|
730
|
-
await ensureAccessKey(ctx, clients, {
|
|
230
|
+
await require_iam.ensureAccessKey(ctx, clients, {
|
|
731
231
|
id: BACKUPS_ID,
|
|
732
232
|
bucket,
|
|
733
233
|
urlKey: require_apps.BACKUPS_URL_KEY,
|
|
@@ -805,8 +305,8 @@ async function verifyStageBackups(input) {
|
|
|
805
305
|
}
|
|
806
306
|
};
|
|
807
307
|
try {
|
|
808
|
-
const { answer } = await whileKeyIsNew(await put(), {
|
|
809
|
-
issuedAt: issuedJustNow(input.resources, BACKUPS_ID, address.accessKeyId),
|
|
308
|
+
const { answer } = await require_iam.whileKeyIsNew(await put(), {
|
|
309
|
+
issuedAt: require_iam.issuedJustNow(input.resources, BACKUPS_ID, address.accessKeyId),
|
|
810
310
|
refused: (answer) => !answer.ok && answer.status === 403,
|
|
811
311
|
ask: put,
|
|
812
312
|
onWait: () => input.log?.(` backups: waiting for the new key ${address.accessKeyId} to become active…`)
|
|
@@ -1351,7 +851,7 @@ async function ensureCertificate(ctx, clients, input) {
|
|
|
1351
851
|
DomainName: host,
|
|
1352
852
|
ValidationMethod: "DNS",
|
|
1353
853
|
IdempotencyToken: input.name.replace(/[^A-Za-z0-9]/g, "").slice(0, 32),
|
|
1354
|
-
Tags: identityTags(ctx, id).map((t) => ({
|
|
854
|
+
Tags: require_iam.identityTags(ctx, id).map((t) => ({
|
|
1355
855
|
Key: t.Key,
|
|
1356
856
|
Value: t.Value
|
|
1357
857
|
}))
|
|
@@ -1566,7 +1066,7 @@ async function ensureDistribution(ctx, clients, input) {
|
|
|
1566
1066
|
await ctx.state.pending(entry);
|
|
1567
1067
|
const out = await cloudfront.send(new CF.CreateDistributionWithTagsCommand({ DistributionConfigWithTags: {
|
|
1568
1068
|
DistributionConfig: input.config,
|
|
1569
|
-
Tags: { Items: identityTags(ctx, input.id).map((t) => ({
|
|
1069
|
+
Tags: { Items: require_iam.identityTags(ctx, input.id).map((t) => ({
|
|
1570
1070
|
Key: t.Key,
|
|
1571
1071
|
Value: t.Value
|
|
1572
1072
|
})) }
|
|
@@ -1750,13 +1250,13 @@ async function ensureTopic(ctx, clients, input) {
|
|
|
1750
1250
|
await ctx.state.pending(topicEntry);
|
|
1751
1251
|
await sns.send(new SNS.CreateTopicCommand({
|
|
1752
1252
|
Name: topicName,
|
|
1753
|
-
Tags: identityTags(ctx, id)
|
|
1253
|
+
Tags: require_iam.identityTags(ctx, id)
|
|
1754
1254
|
}));
|
|
1755
1255
|
await ctx.state.ready(topicEntry, topicArn);
|
|
1756
1256
|
});
|
|
1757
1257
|
const topicPolicy = input.policy(topicArn);
|
|
1758
1258
|
const currentTopicPolicy = topic?.Attributes?.Policy;
|
|
1759
|
-
if (!currentTopicPolicy || canonicalPolicy(JSON.parse(currentTopicPolicy)) !== canonicalPolicy(topicPolicy)) await ctx.change({
|
|
1259
|
+
if (!currentTopicPolicy || require_iam.canonicalPolicy(JSON.parse(currentTopicPolicy)) !== require_iam.canonicalPolicy(topicPolicy)) await ctx.change({
|
|
1760
1260
|
construct: id,
|
|
1761
1261
|
resource: `SNS topic ${topicName}`,
|
|
1762
1262
|
change: `publishable by ${input.publisher} only`
|
|
@@ -1803,7 +1303,7 @@ async function ensureBucketEvents(ctx, s3, input) {
|
|
|
1803
1303
|
queueUrl = (await sqs.send(new SQS.CreateQueueCommand({
|
|
1804
1304
|
QueueName: queueName,
|
|
1805
1305
|
Attributes: { MessageRetentionPeriod: "1209600" },
|
|
1806
|
-
tags: Object.fromEntries(identityTags(ctx, id).map((t) => [t.Key, t.Value]))
|
|
1306
|
+
tags: Object.fromEntries(require_iam.identityTags(ctx, id).map((t) => [t.Key, t.Value]))
|
|
1807
1307
|
}))).QueueUrl;
|
|
1808
1308
|
await ctx.state.ready(queueEntry, deadLetterArn);
|
|
1809
1309
|
});
|
|
@@ -1812,7 +1312,7 @@ async function ensureBucketEvents(ctx, s3, input) {
|
|
|
1812
1312
|
QueueUrl: queue.QueueUrl,
|
|
1813
1313
|
AttributeNames: ["Policy"]
|
|
1814
1314
|
}))).Attributes?.Policy : void 0;
|
|
1815
|
-
if (!currentQueuePolicy || canonicalPolicy(JSON.parse(currentQueuePolicy)) !== canonicalPolicy(queuePolicy)) await ctx.change({
|
|
1315
|
+
if (!currentQueuePolicy || require_iam.canonicalPolicy(JSON.parse(currentQueuePolicy)) !== require_iam.canonicalPolicy(queuePolicy)) await ctx.change({
|
|
1816
1316
|
construct: id,
|
|
1817
1317
|
resource: `SQS queue ${queueName}`,
|
|
1818
1318
|
change: `receives what ${topicName} cannot deliver`
|
|
@@ -2180,7 +1680,7 @@ async function ensureBucket(ctx, stageClients, construct, watchers) {
|
|
|
2180
1680
|
};
|
|
2181
1681
|
const versioning = ctx.config.versioning ?? construct.versioned;
|
|
2182
1682
|
const open = [...new Set(construct.servers.flatMap((s) => s.open))].sort();
|
|
2183
|
-
const located = await ensureBucketName(ctx, stageClients, id, bucketName(nameInput));
|
|
1683
|
+
const located = await ensureBucketName(ctx, stageClients, id, require_iam.bucketName(nameInput));
|
|
2184
1684
|
const { bucket, exists } = located;
|
|
2185
1685
|
let clients = stageClients;
|
|
2186
1686
|
if (located.region !== stageClients.region) {
|
|
@@ -2212,17 +1712,17 @@ async function ensureBucket(ctx, stageClients, construct, watchers) {
|
|
|
2212
1712
|
bucket,
|
|
2213
1713
|
region: clients.region
|
|
2214
1714
|
}) : void 0;
|
|
2215
|
-
const user = await ensureIamUser(ctx, clients, {
|
|
1715
|
+
const user = await require_iam.ensureIamUser(ctx, clients, {
|
|
2216
1716
|
id,
|
|
2217
|
-
user: iamUserName(nameInput),
|
|
2218
|
-
policyName: IAM_POLICY_NAME,
|
|
2219
|
-
policy: userPolicy(bucket, {
|
|
1717
|
+
user: require_iam.iamUserName(nameInput),
|
|
1718
|
+
policyName: require_iam.IAM_POLICY_NAME,
|
|
1719
|
+
policy: require_iam.userPolicy(bucket, {
|
|
2220
1720
|
versioning,
|
|
2221
1721
|
...events ? { eventsTopicArn: events.topicArn } : {}
|
|
2222
1722
|
}),
|
|
2223
1723
|
describe: "this bucket only"
|
|
2224
1724
|
});
|
|
2225
|
-
await ensureAccessKey(ctx, clients, {
|
|
1725
|
+
await require_iam.ensureAccessKey(ctx, clients, {
|
|
2226
1726
|
id,
|
|
2227
1727
|
bucket,
|
|
2228
1728
|
urlKey: (0, _geekmidas_manifest.provideKey)(id, "url"),
|
|
@@ -2288,7 +1788,7 @@ async function ensureOwnedBucket(ctx, input) {
|
|
|
2288
1788
|
stage: ctx.stage,
|
|
2289
1789
|
id: input.name
|
|
2290
1790
|
};
|
|
2291
|
-
const located = await ensureBucketName(bucketCtx, stageClients, input.id, bucketName(nameInput));
|
|
1791
|
+
const located = await ensureBucketName(bucketCtx, stageClients, input.id, require_iam.bucketName(nameInput));
|
|
2292
1792
|
const clients = located.region === stageClients.region ? stageClients : await makeClients(ctx.credential, located.region);
|
|
2293
1793
|
await ensureBucketSettings(bucketCtx, clients, {
|
|
2294
1794
|
id: input.id,
|
|
@@ -2298,14 +1798,14 @@ async function ensureOwnedBucket(ctx, input) {
|
|
|
2298
1798
|
open: [],
|
|
2299
1799
|
...input.sesWrite ? { sesWrite: input.sesWrite } : {}
|
|
2300
1800
|
});
|
|
2301
|
-
const user = await ensureIamUser(bucketCtx, clients, {
|
|
1801
|
+
const user = await require_iam.ensureIamUser(bucketCtx, clients, {
|
|
2302
1802
|
id: input.id,
|
|
2303
|
-
user: iamUserName(nameInput),
|
|
2304
|
-
policyName: IAM_POLICY_NAME,
|
|
2305
|
-
policy: userPolicy(located.bucket, input.topicArn ? { eventsTopicArn: input.topicArn } : {}),
|
|
1803
|
+
user: require_iam.iamUserName(nameInput),
|
|
1804
|
+
policyName: require_iam.IAM_POLICY_NAME,
|
|
1805
|
+
policy: require_iam.userPolicy(located.bucket, input.topicArn ? { eventsTopicArn: input.topicArn } : {}),
|
|
2306
1806
|
describe: "this bucket only"
|
|
2307
1807
|
});
|
|
2308
|
-
await ensureAccessKey(bucketCtx, clients, {
|
|
1808
|
+
await require_iam.ensureAccessKey(bucketCtx, clients, {
|
|
2309
1809
|
id: input.id,
|
|
2310
1810
|
bucket: located.bucket,
|
|
2311
1811
|
urlKey: input.urlKey,
|
|
@@ -2380,7 +1880,7 @@ async function ensureBucketName(ctx, clients, id, good) {
|
|
|
2380
1880
|
};
|
|
2381
1881
|
const adopt = async (name, where) => {
|
|
2382
1882
|
const there = where === region ? clients : await makeClients(ctx.credential, where);
|
|
2383
|
-
const owner = (await readOr(() => there.s3.send(new there.S3.GetBucketTaggingCommand({ Bucket: name })), ["NoSuchTagSet", "NoSuchTagSetError"]))?.TagSet?.find((t) => t.Key === TAG_PROJECT)?.Value;
|
|
1883
|
+
const owner = (await readOr(() => there.s3.send(new there.S3.GetBucketTaggingCommand({ Bucket: name })), ["NoSuchTagSet", "NoSuchTagSetError"]))?.TagSet?.find((t) => t.Key === require_iam.TAG_PROJECT)?.Value;
|
|
2384
1884
|
if (owner && owner !== ctx.identity.key) throw new require_workspace.BucketOwnedByAnotherProject(name, owner, ctx.identity.key);
|
|
2385
1885
|
};
|
|
2386
1886
|
if (record?.status === "ready" && record.id) {
|
|
@@ -2400,7 +1900,7 @@ async function ensureBucketName(ctx, clients, id, good) {
|
|
|
2400
1900
|
const names = [
|
|
2401
1901
|
...typeof pending === "string" && pending !== good ? [pending] : [],
|
|
2402
1902
|
good,
|
|
2403
|
-
...Array.from({ length: 5 }, () => suffixedBucketName(good, randomSuffix()))
|
|
1903
|
+
...Array.from({ length: 5 }, () => require_iam.suffixedBucketName(good, require_iam.randomSuffix()))
|
|
2404
1904
|
];
|
|
2405
1905
|
const tried = [];
|
|
2406
1906
|
for (const name of names) {
|
|
@@ -2435,7 +1935,7 @@ async function ensureBucketSettings(ctx, clients, input) {
|
|
|
2435
1935
|
change
|
|
2436
1936
|
}, () => apply().then(() => void 0));
|
|
2437
1937
|
const tagged = await read(() => s3.send(new S3.GetBucketTaggingCommand({ Bucket })), ["NoSuchTagSet", "NoSuchTagSetError"]);
|
|
2438
|
-
const ours = identityTags(ctx, id);
|
|
1938
|
+
const ours = require_iam.identityTags(ctx, id);
|
|
2439
1939
|
const others = (tagged?.TagSet ?? []).filter((t) => !ours.some((o) => o.Key === t.Key));
|
|
2440
1940
|
if (ours.some((o) => !tagged?.TagSet?.some((t) => t.Key === o.Key && t.Value === o.Value))) await set("tag", () => s3.send(new S3.PutBucketTaggingCommand({
|
|
2441
1941
|
Bucket,
|
|
@@ -2445,7 +1945,7 @@ async function ensureBucketSettings(ctx, clients, input) {
|
|
|
2445
1945
|
})) }
|
|
2446
1946
|
})));
|
|
2447
1947
|
const isOpen = input.open.length > 0 && !input.cdn;
|
|
2448
|
-
const block = publicAccessBlock(isOpen);
|
|
1948
|
+
const block = require_iam.publicAccessBlock(isOpen);
|
|
2449
1949
|
const ensureBlock = async () => {
|
|
2450
1950
|
const now = (await read(() => s3.send(new S3.GetPublicAccessBlockCommand({ Bucket })), ["NoSuchPublicAccessBlockConfiguration"]))?.PublicAccessBlockConfiguration;
|
|
2451
1951
|
if (!(now && Object.keys(block).every((k) => (now[k] ?? false) === block[k]))) await set(isOpen ? "block public access (ACLs; the policy opens the open paths)" : "block all public access", () => s3.send(new S3.PutPublicAccessBlockCommand({
|
|
@@ -2453,13 +1953,13 @@ async function ensureBucketSettings(ctx, clients, input) {
|
|
|
2453
1953
|
PublicAccessBlockConfiguration: block
|
|
2454
1954
|
})));
|
|
2455
1955
|
};
|
|
2456
|
-
const policy = bucketPolicy(bucket, input.open, {
|
|
1956
|
+
const policy = require_iam.bucketPolicy(bucket, input.open, {
|
|
2457
1957
|
...input.cdn ? { cdn: input.cdn } : {},
|
|
2458
1958
|
...input.sesWrite ? { sesWrite: input.sesWrite } : {}
|
|
2459
1959
|
});
|
|
2460
1960
|
const ensurePolicy = async () => {
|
|
2461
1961
|
const current = await read(() => s3.send(new S3.GetBucketPolicyCommand({ Bucket })), ["NoSuchBucketPolicy"]);
|
|
2462
|
-
if (!(current?.Policy !== void 0 && canonicalPolicy(JSON.parse(current.Policy)) === canonicalPolicy(policy))) await set(isOpen ? `policy: TLS only, public read on ${input.open.join(", ")}` : input.cdn && input.open.length > 0 ? `policy: TLS only, CloudFront reads ${input.open.join(", ")}` : "policy: TLS only", () => s3.send(new S3.PutBucketPolicyCommand({
|
|
1962
|
+
if (!(current?.Policy !== void 0 && require_iam.canonicalPolicy(JSON.parse(current.Policy)) === require_iam.canonicalPolicy(policy))) await set(isOpen ? `policy: TLS only, public read on ${input.open.join(", ")}` : input.cdn && input.open.length > 0 ? `policy: TLS only, CloudFront reads ${input.open.join(", ")}` : "policy: TLS only", () => s3.send(new S3.PutBucketPolicyCommand({
|
|
2463
1963
|
Bucket,
|
|
2464
1964
|
Policy: JSON.stringify(policy)
|
|
2465
1965
|
})));
|
|
@@ -2498,7 +1998,7 @@ async function ensureBucketSettings(ctx, clients, input) {
|
|
|
2498
1998
|
});
|
|
2499
1999
|
if (unresolved.length > 0) ctx.log(` ${unresolved.join(", ")} ${unresolved.length === 1 ? "has" : "have"} no address on '${ctx.stage}' (domains.${ctx.stage}), so ${unresolved.length === 1 ? "is" : "are"} not in '${bucket}''s CORS`);
|
|
2500
2000
|
if (origins.length === 0) return;
|
|
2501
|
-
const rule = corsRule(origins);
|
|
2001
|
+
const rule = require_iam.corsRule(origins);
|
|
2502
2002
|
const cors = await read(() => s3.send(new S3.GetBucketCorsCommand({ Bucket })), ["NoSuchCORSConfiguration"]);
|
|
2503
2003
|
if (!(cors?.CORSRules?.length === 1 && canonicalCors(cors.CORSRules[0]) === canonicalCors(rule))) await set(`CORS for ${origins.join(", ")}`, () => s3.send(new S3.PutBucketCorsCommand({
|
|
2504
2004
|
Bucket,
|
|
@@ -2547,8 +2047,8 @@ async function verifyS3(ctx) {
|
|
|
2547
2047
|
...address.forcePathStyle ? { forcePathStyle: true } : {}
|
|
2548
2048
|
});
|
|
2549
2049
|
try {
|
|
2550
|
-
const issuedAt = issuedJustNow(ctx.resources, id, address.accessKeyId);
|
|
2551
|
-
const { answer: head, waited } = await whileKeyIsNew(await headBucket(S3, client, address.bucket), {
|
|
2050
|
+
const issuedAt = require_iam.issuedJustNow(ctx.resources, id, address.accessKeyId);
|
|
2051
|
+
const { answer: head, waited } = await require_iam.whileKeyIsNew(await headBucket(S3, client, address.bucket), {
|
|
2552
2052
|
issuedAt,
|
|
2553
2053
|
refused: (answer) => !answer.ok && answer.status === 403,
|
|
2554
2054
|
ask: () => headBucket(S3, client, address.bucket),
|
|
@@ -3867,12 +3367,6 @@ async function load(input, sandbox) {
|
|
|
3867
3367
|
return workspace;
|
|
3868
3368
|
}
|
|
3869
3369
|
//#endregion
|
|
3870
|
-
Object.defineProperty(exports, "IAM_USER_PATH", {
|
|
3871
|
-
enumerable: true,
|
|
3872
|
-
get: function() {
|
|
3873
|
-
return IAM_USER_PATH;
|
|
3874
|
-
}
|
|
3875
|
-
});
|
|
3876
3370
|
Object.defineProperty(exports, "NoDeployableApps", {
|
|
3877
3371
|
enumerable: true,
|
|
3878
3372
|
get: function() {
|
|
@@ -3903,23 +3397,29 @@ Object.defineProperty(exports, "backupsUserName", {
|
|
|
3903
3397
|
return backupsUserName;
|
|
3904
3398
|
}
|
|
3905
3399
|
});
|
|
3906
|
-
Object.defineProperty(exports, "
|
|
3400
|
+
Object.defineProperty(exports, "cdnName", {
|
|
3907
3401
|
enumerable: true,
|
|
3908
3402
|
get: function() {
|
|
3909
|
-
return
|
|
3403
|
+
return cdnName;
|
|
3910
3404
|
}
|
|
3911
3405
|
});
|
|
3912
|
-
Object.defineProperty(exports, "
|
|
3406
|
+
Object.defineProperty(exports, "defaultCdnClients", {
|
|
3913
3407
|
enumerable: true,
|
|
3914
3408
|
get: function() {
|
|
3915
|
-
return
|
|
3409
|
+
return defaultCdnClients;
|
|
3410
|
+
}
|
|
3411
|
+
});
|
|
3412
|
+
Object.defineProperty(exports, "defaultClients", {
|
|
3413
|
+
enumerable: true,
|
|
3414
|
+
get: function() {
|
|
3415
|
+
return defaultClients;
|
|
3916
3416
|
}
|
|
3917
3417
|
});
|
|
3918
|
-
Object.defineProperty(exports, "
|
|
3418
|
+
Object.defineProperty(exports, "deploy", {
|
|
3919
3419
|
enumerable: true,
|
|
3920
3420
|
get: function() {
|
|
3921
|
-
return
|
|
3421
|
+
return deploy;
|
|
3922
3422
|
}
|
|
3923
3423
|
});
|
|
3924
3424
|
|
|
3925
|
-
//# sourceMappingURL=deploy-
|
|
3425
|
+
//# sourceMappingURL=deploy-CqIULk0k.cjs.map
|