@geekmidas/cli 10.0.0-alpha.184 → 10.0.0-alpha.186
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/{LegacyStateStore-CTfoMtC2.mjs → LegacyStateStore-BwHw28fJ.mjs} +2 -2
- package/dist/{LegacyStateStore-CTfoMtC2.mjs.map → LegacyStateStore-BwHw28fJ.mjs.map} +1 -1
- package/dist/{LegacyStateStore-BtDLNkIH.cjs → LegacyStateStore-LpTY3S7z.cjs} +2 -2
- package/dist/{LegacyStateStore-BtDLNkIH.cjs.map → LegacyStateStore-LpTY3S7z.cjs.map} +1 -1
- package/dist/{LocalStateStore-BKp45OoB.cjs → LocalStateStore-Dpn9kBuK.cjs} +2 -2
- package/dist/{LocalStateStore-BKp45OoB.cjs.map → LocalStateStore-Dpn9kBuK.cjs.map} +1 -1
- package/dist/{LocalStateStore-C4zDHVM-.mjs → LocalStateStore-DsdNLm0_.mjs} +2 -2
- package/dist/{LocalStateStore-C4zDHVM-.mjs.map → LocalStateStore-DsdNLm0_.mjs.map} +1 -1
- package/dist/{S3StateStore-S0TXLlMW.mjs → S3StateStore-BIpCLzpk.mjs} +4 -4
- package/dist/{S3StateStore-S0TXLlMW.mjs.map → S3StateStore-BIpCLzpk.mjs.map} +1 -1
- package/dist/{S3StateStore-B6SjbLxh.cjs → S3StateStore-Bk_EIWLU.cjs} +5 -5
- package/dist/{S3StateStore-B6SjbLxh.cjs.map → S3StateStore-Bk_EIWLU.cjs.map} +1 -1
- package/dist/{SSMStateStore-6Di_zxwC.cjs → SSMStateStore-A1bgCF1P.cjs} +2 -2
- package/dist/{SSMStateStore-6Di_zxwC.cjs.map → SSMStateStore-A1bgCF1P.cjs.map} +1 -1
- package/dist/{SSMStateStore-ClPHFhRQ.mjs → SSMStateStore-PiZxPXeX.mjs} +2 -2
- package/dist/{SSMStateStore-ClPHFhRQ.mjs.map → SSMStateStore-PiZxPXeX.mjs.map} +1 -1
- package/dist/{add-BR8XW4IH.mjs → add-BBhzFpQ7.mjs} +4 -5
- package/dist/{add-BR8XW4IH.mjs.map → add-BBhzFpQ7.mjs.map} +1 -1
- package/dist/{add-Bd9MDHuU.cjs → add-sU71e0Lp.cjs} +13 -14
- package/dist/{add-Bd9MDHuU.cjs.map → add-sU71e0Lp.cjs.map} +1 -1
- package/dist/backups/runner.cjs +501 -13
- package/dist/backups/runner.cjs.map +1 -1
- package/dist/backups/runner.d.cts +87 -2
- package/dist/backups/runner.d.cts.map +1 -1
- package/dist/backups/runner.d.mts +87 -2
- package/dist/backups/runner.d.mts.map +1 -1
- package/dist/backups/runner.mjs +493 -15
- package/dist/backups/runner.mjs.map +1 -1
- package/dist/{bundler-4E-CGdL3.cjs → bundler-BM6lq-36.cjs} +9 -9
- package/dist/{bundler-4E-CGdL3.cjs.map → bundler-BM6lq-36.cjs.map} +1 -1
- package/dist/{bundler-Cwr4YSpp.mjs → bundler-QKbRwztS.mjs} +6 -6
- package/dist/{bundler-Cwr4YSpp.mjs.map → bundler-QKbRwztS.mjs.map} +1 -1
- package/dist/{cli-CrPJr29x.cjs → cli-D_iytris.cjs} +6 -6
- package/dist/{cli-CrPJr29x.cjs.map → cli-D_iytris.cjs.map} +1 -1
- package/dist/{cli-C3mHXsAE.mjs → cli-VCAfR-se.mjs} +4 -4
- package/dist/{cli-C3mHXsAE.mjs.map → cli-VCAfR-se.mjs.map} +1 -1
- package/dist/{clientTelemetry-Ej1tf1VE.d.cts → clientTelemetry-Bzc4KXz5.d.mts} +2 -2
- package/dist/clientTelemetry-Bzc4KXz5.d.mts.map +1 -0
- package/dist/{clientTelemetry-crdjgehZ.d.mts → clientTelemetry-N8NAguGI.d.cts} +2 -2
- package/dist/clientTelemetry-N8NAguGI.d.cts.map +1 -0
- package/dist/{compose-DPXoarGI.mjs → compose-CX2BF3LG.mjs} +58 -1029
- package/dist/compose-CX2BF3LG.mjs.map +1 -0
- package/dist/{compose-CKBieltT.cjs → compose-D3zc8QN1.cjs} +117 -1130
- package/dist/compose-D3zc8QN1.cjs.map +1 -0
- package/dist/{config-q4ewzIA_.d.mts → config-CTrfNKYd.d.mts} +3 -3
- package/dist/{config-lSOwPbUy.d.cts.map → config-CTrfNKYd.d.mts.map} +1 -1
- package/dist/{config-lSOwPbUy.d.cts → config-D9g_nYIu.d.cts} +3 -3
- package/dist/{config-q4ewzIA_.d.mts.map → config-D9g_nYIu.d.cts.map} +1 -1
- package/dist/config.cjs +1 -1
- package/dist/config.d.cts +3 -3
- package/dist/config.d.mts +3 -3
- package/dist/config.mjs +1 -1
- package/dist/{compose-CJznzQc7.mjs → credentials-BMdpNO8R.mjs} +1213 -1258
- package/dist/credentials-BMdpNO8R.mjs.map +1 -0
- package/dist/{dns-BzYrbB2Y.cjs → credentials-BQ1khM28.cjs} +6 -847
- package/dist/credentials-BQ1khM28.cjs.map +1 -0
- package/dist/{compose-CvNyjqwL.cjs → credentials-C3uaZ80e.cjs} +1270 -1285
- package/dist/credentials-C3uaZ80e.cjs.map +1 -0
- package/dist/{dns-C0wbTjVX.mjs → credentials-Ci8nKFw4.mjs} +5 -708
- package/dist/credentials-Ci8nKFw4.mjs.map +1 -0
- package/dist/{dbTunnel-DSzAG_wy.cjs → dbTunnel-D000s0YK.cjs} +8 -9
- package/dist/{dbTunnel-DSzAG_wy.cjs.map → dbTunnel-D000s0YK.cjs.map} +1 -1
- package/dist/{dbTunnel-CphoKGyk.mjs → dbTunnel-DqtSAdQK.mjs} +5 -6
- package/dist/{dbTunnel-CphoKGyk.mjs.map → dbTunnel-DqtSAdQK.mjs.map} +1 -1
- package/dist/deploy/public.cjs +25 -26
- package/dist/deploy/public.cjs.map +1 -1
- package/dist/deploy/public.d.cts +5 -5
- package/dist/deploy/public.d.cts.map +1 -1
- package/dist/deploy/public.d.mts +5 -5
- package/dist/deploy/public.d.mts.map +1 -1
- package/dist/deploy/public.mjs +10 -11
- package/dist/deploy/public.mjs.map +1 -1
- package/dist/{deploy-BaSYxpny.cjs → deploy-DRH6q_2r.cjs} +72 -62
- package/dist/deploy-DRH6q_2r.cjs.map +1 -0
- package/dist/{deploy-C_uZBzvS.mjs → deploy-DwtM6VSz.mjs} +25 -15
- package/dist/deploy-DwtM6VSz.mjs.map +1 -0
- package/dist/{destroy-yTBmL1jf.mjs → destroy-C6QwLj3b.mjs} +9 -9
- package/dist/{destroy-yTBmL1jf.mjs.map → destroy-C6QwLj3b.mjs.map} +1 -1
- package/dist/{destroy-PvrHxZDu.cjs → destroy-ChTJ_oUq.cjs} +21 -21
- package/dist/{destroy-PvrHxZDu.cjs.map → destroy-ChTJ_oUq.cjs.map} +1 -1
- package/dist/{dokploy-DqL3jeDu.mjs → dokploy-Dm8-eHtx.mjs} +2 -2
- package/dist/{dokploy-DqL3jeDu.mjs.map → dokploy-Dm8-eHtx.mjs.map} +1 -1
- package/dist/{dokploy-DYUMx2MY.cjs → dokploy-jeO7mz1R.cjs} +2 -2
- package/dist/{dokploy-DYUMx2MY.cjs.map → dokploy-jeO7mz1R.cjs.map} +1 -1
- package/dist/{eas-DEM-iWg6.cjs → eas-BAitvB5R.cjs} +3 -3
- package/dist/{eas-DEM-iWg6.cjs.map → eas-BAitvB5R.cjs.map} +1 -1
- package/dist/{eas-DHDU86PL.mjs → eas-CXYo8hos.mjs} +3 -3
- package/dist/{eas-DHDU86PL.mjs.map → eas-CXYo8hos.mjs.map} +1 -1
- package/dist/{encryption-CbMprdAb.mjs → encryption-B7IlQ6VO.mjs} +3 -3
- package/dist/{encryption-CbMprdAb.mjs.map → encryption-B7IlQ6VO.mjs.map} +1 -1
- package/dist/{encryption-BKWmbKkN.cjs → encryption-OPCsewWc.cjs} +6 -6
- package/dist/{encryption-BKWmbKkN.cjs.map → encryption-OPCsewWc.cjs.map} +1 -1
- package/dist/{engine-3imTFxdN.cjs → engine-BSnhQLaB.cjs} +105 -102
- package/dist/engine-BSnhQLaB.cjs.map +1 -0
- package/dist/{engine-DaI4iScI.mjs → engine-a6K99WIl.mjs} +12 -9
- package/dist/engine-a6K99WIl.mjs.map +1 -0
- package/dist/{github-Y6NAwHG1.cjs → github-C3gUSbLn.cjs} +18 -18
- package/dist/{github-Y6NAwHG1.cjs.map → github-C3gUSbLn.cjs.map} +1 -1
- package/dist/{github-Dijjr__H.mjs → github-D4hThtnt.mjs} +7 -7
- package/dist/{github-Dijjr__H.mjs.map → github-D4hThtnt.mjs.map} +1 -1
- package/dist/{googlePlay-Dcp3Yycu.cjs → googlePlay-C5Q7Zov3.cjs} +5 -5
- package/dist/{googlePlay-Dcp3Yycu.cjs.map → googlePlay-C5Q7Zov3.cjs.map} +1 -1
- package/dist/{googlePlay-SDT3j9Kf.mjs → googlePlay-DIS9PeFB.mjs} +4 -4
- package/dist/{googlePlay-SDT3j9Kf.mjs.map → googlePlay-DIS9PeFB.mjs.map} +1 -1
- package/dist/{iam-CqW9hsd2.mjs → iam-DloEBLXZ.mjs} +2 -2
- package/dist/{iam-CqW9hsd2.mjs.map → iam-DloEBLXZ.mjs.map} +1 -1
- package/dist/{iam-DeBQcSvw.cjs → iam-SxPKYCI_.cjs} +2 -2
- package/dist/{iam-DeBQcSvw.cjs.map → iam-SxPKYCI_.cjs.map} +1 -1
- package/dist/{index-DJzVO6Ht.d.cts → index-BThTZV8T.d.mts} +2 -2
- package/dist/{index-Ccsgoq3_.d.mts.map → index-BThTZV8T.d.mts.map} +1 -1
- package/dist/{index-Ccsgoq3_.d.mts → index-Cgd-ouyI.d.cts} +2 -2
- package/dist/{index-DJzVO6Ht.d.cts.map → index-Cgd-ouyI.d.cts.map} +1 -1
- package/dist/index.cjs +590 -246
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +443 -99
- package/dist/index.mjs.map +1 -1
- package/dist/{local-DjaAcHZb.cjs → local-B5R1WWEO.cjs} +3 -3
- package/dist/{local-DjaAcHZb.cjs.map → local-B5R1WWEO.cjs.map} +1 -1
- package/dist/{local-4gzM52HT.mjs → local-CMA_7b0_.mjs} +2 -2
- package/dist/{local-4gzM52HT.mjs.map → local-CMA_7b0_.mjs.map} +1 -1
- package/dist/{migrate-0Rfhftef.mjs → migrate-168wMF5m.mjs} +5 -5
- package/dist/{migrate-0Rfhftef.mjs.map → migrate-168wMF5m.mjs.map} +1 -1
- package/dist/{migrate-DDIc3twm.cjs → migrate-B0041tRF.cjs} +13 -13
- package/dist/{migrate-DDIc3twm.cjs.map → migrate-B0041tRF.cjs.map} +1 -1
- package/dist/{migrate-CuHGYJL9.cjs → migrate-BZxh_zU5.cjs} +6 -6
- package/dist/{migrate-CuHGYJL9.cjs.map → migrate-BZxh_zU5.cjs.map} +1 -1
- package/dist/{migrate-BLW4BwLd.mjs → migrate-BhnCtwMX.mjs} +3 -3
- package/dist/{migrate-BLW4BwLd.mjs.map → migrate-BhnCtwMX.mjs.map} +1 -1
- package/dist/openapi.cjs +1 -1
- package/dist/openapi.d.cts +2 -2
- package/dist/openapi.d.mts +2 -2
- package/dist/openapi.mjs +1 -1
- package/dist/{projectBucket-C5Ap5kGw.cjs → projectBucket-DEBaYEbi.cjs} +2 -2
- package/dist/{projectBucket-C5Ap5kGw.cjs.map → projectBucket-DEBaYEbi.cjs.map} +1 -1
- package/dist/{projectBucket-BhEOVVch.mjs → projectBucket-hF0-tlq9.mjs} +2 -2
- package/dist/{projectBucket-BhEOVVch.mjs.map → projectBucket-hF0-tlq9.mjs.map} +1 -1
- package/dist/{publish-BELe2FO2.cjs → publish-B-ffSuAX.cjs} +2 -2
- package/dist/{publish-BELe2FO2.cjs.map → publish-B-ffSuAX.cjs.map} +1 -1
- package/dist/{publish-DiDv40hA.mjs → publish-_lVOoWCy.mjs} +2 -2
- package/dist/{publish-DiDv40hA.mjs.map → publish-_lVOoWCy.mjs.map} +1 -1
- package/dist/{ready--_hMxbUX.cjs → ready-DCvnFZnJ.cjs} +2 -2
- package/dist/{ready--_hMxbUX.cjs.map → ready-DCvnFZnJ.cjs.map} +1 -1
- package/dist/{ready-CjIqXFXe.mjs → ready-sSPuiZ7N.mjs} +2 -2
- package/dist/{ready-CjIqXFXe.mjs.map → ready-sSPuiZ7N.mjs.map} +1 -1
- package/dist/reconcile/public.d.cts +1 -1
- package/dist/reconcile/public.d.mts +1 -1
- package/dist/{resolve-DIPHwLan.cjs → resolve-Cs38fbaX.cjs} +4 -4
- package/dist/{resolve-DIPHwLan.cjs.map → resolve-Cs38fbaX.cjs.map} +1 -1
- package/dist/{resolve-N8EZzWqJ.mjs → resolve-UK4b26dm.mjs} +4 -4
- package/dist/{resolve-N8EZzWqJ.mjs.map → resolve-UK4b26dm.mjs.map} +1 -1
- package/dist/{rollback-DIeA6dba.mjs → rollback-B0eg3M0J.mjs} +7 -6
- package/dist/{rollback-DIeA6dba.mjs.map → rollback-B0eg3M0J.mjs.map} +1 -1
- package/dist/{rollback-Bp6hepUh.cjs → rollback-DByniS9X.cjs} +10 -9
- package/dist/{rollback-Bp6hepUh.cjs.map → rollback-DByniS9X.cjs.map} +1 -1
- package/dist/{runtime-D_UphAAH.d.cts → runtime-BtoiRP5G.d.cts} +2 -2
- package/dist/{runtime-BZlClwy2.d.mts.map → runtime-BtoiRP5G.d.cts.map} +1 -1
- package/dist/{runtime-BZlClwy2.d.mts → runtime-Ct41f0tN.d.mts} +2 -2
- package/dist/{runtime-D_UphAAH.d.cts.map → runtime-Ct41f0tN.d.mts.map} +1 -1
- package/dist/{s3-Bwd6lhTU.cjs → s3-4rmPI6wv.cjs} +3 -3
- package/dist/{s3-Bwd6lhTU.cjs.map → s3-4rmPI6wv.cjs.map} +1 -1
- package/dist/{s3-CIEf4puu.mjs → s3-B-IJWFJA.mjs} +3 -3
- package/dist/{s3-CIEf4puu.mjs.map → s3-B-IJWFJA.mjs.map} +1 -1
- package/dist/{serverSetup-mRCLdZQW.mjs → serverSetup-Cok75j21.mjs} +7 -6
- package/dist/{serverSetup-mRCLdZQW.mjs.map → serverSetup-Cok75j21.mjs.map} +1 -1
- package/dist/{serverSetup-C9DP30J4.cjs → serverSetup-EY5vppoS.cjs} +9 -8
- package/dist/{serverSetup-C9DP30J4.cjs.map → serverSetup-EY5vppoS.cjs.map} +1 -1
- package/dist/{sniffer-CkPIytPI.cjs → sniffer-CcLTONfm.cjs} +7 -7
- package/dist/{sniffer-CkPIytPI.cjs.map → sniffer-CcLTONfm.cjs.map} +1 -1
- package/dist/{sniffer-01tbQFmg.mjs → sniffer-DIyYcOXJ.mjs} +7 -7
- package/dist/{sniffer-01tbQFmg.mjs.map → sniffer-DIyYcOXJ.mjs.map} +1 -1
- package/dist/{snsSubscriptions-DmKrw7AF.cjs → snsSubscriptions-Bore7t-W.cjs} +11 -12
- package/dist/{snsSubscriptions-DmKrw7AF.cjs.map → snsSubscriptions-Bore7t-W.cjs.map} +1 -1
- package/dist/{snsSubscriptions-k61hsIRw.mjs → snsSubscriptions-CYEVD7ml.mjs} +3 -4
- package/dist/{snsSubscriptions-k61hsIRw.mjs.map → snsSubscriptions-CYEVD7ml.mjs.map} +1 -1
- package/dist/{sst-DGsteg5j.cjs → sst-Bsu5O1Lt.cjs} +21 -8
- package/dist/sst-Bsu5O1Lt.cjs.map +1 -0
- package/dist/{sst-CvOnXAel.mjs → sst-DBH707Na.mjs} +19 -6
- package/dist/sst-DBH707Na.mjs.map +1 -0
- package/dist/stack-CwSx-6ea.cjs +11725 -0
- package/dist/stack-CwSx-6ea.cjs.map +1 -0
- package/dist/stack-DU2SunuO.mjs +10744 -0
- package/dist/stack-DU2SunuO.mjs.map +1 -0
- package/dist/{stage-CXIdtjY2.mjs → stage-BGyx0OjL.mjs} +5 -6
- package/dist/stage-BGyx0OjL.mjs.map +1 -0
- package/dist/{stage-8KJCtYtl.cjs → stage-BgD-kKY3.cjs} +11 -12
- package/dist/stage-BgD-kKY3.cjs.map +1 -0
- package/dist/{stages-BNoiMXfL.mjs → stages-DFvE7iEO.mjs} +2 -2
- package/dist/{stages-BNoiMXfL.mjs.map → stages-DFvE7iEO.mjs.map} +1 -1
- package/dist/{stages-tdJKM9qp.cjs → stages-Dk6Lv7DY.cjs} +2 -2
- package/dist/{stages-tdJKM9qp.cjs.map → stages-Dk6Lv7DY.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-GzAW5lzO.mjs → terminal-BlJ90AIM.mjs} +2 -2
- package/dist/{terminal-GzAW5lzO.mjs.map → terminal-BlJ90AIM.mjs.map} +1 -1
- package/dist/{terminal-DSQgidon.cjs → terminal-GyXHsRAl.cjs} +5 -5
- package/dist/{terminal-DSQgidon.cjs.map → terminal-GyXHsRAl.cjs.map} +1 -1
- package/dist/{types-BRnmoWCt.d.cts → types-BVDaaLas.d.cts} +22 -4
- package/dist/{types-BRnmoWCt.d.cts.map → types-BVDaaLas.d.cts.map} +1 -1
- package/dist/{types-Bg7LSAD2.d.mts → types-CJTKWLkK.d.mts} +22 -4
- package/dist/{types-Bg7LSAD2.d.mts.map → types-CJTKWLkK.d.mts.map} +1 -1
- package/dist/{utils-D_fxUqvU.mjs → utils-CdKxD8Lt.mjs} +2 -2
- package/dist/{utils-D_fxUqvU.mjs.map → utils-CdKxD8Lt.mjs.map} +1 -1
- package/dist/{utils-D2Nk1Nv2.cjs → utils-DBqXbB8P.cjs} +2 -2
- package/dist/{utils-D2Nk1Nv2.cjs.map → utils-DBqXbB8P.cjs.map} +1 -1
- package/dist/vitest.cjs +1 -1
- package/dist/vitest.mjs +1 -1
- package/dist/workspace/index.cjs +1 -1
- package/dist/workspace/index.d.cts +2 -2
- package/dist/workspace/index.d.mts +2 -2
- package/dist/workspace/index.mjs +1 -1
- package/dist/{workspace-fGwzXa5l.cjs → workspace-CTspddnJ.cjs} +55 -16
- package/dist/workspace-CTspddnJ.cjs.map +1 -0
- package/dist/{workspace-DTX6CJi2.mjs → workspace-CdiCMRap.mjs} +55 -16
- package/dist/workspace-CdiCMRap.mjs.map +1 -0
- package/package.json +16 -16
- package/dist/apps-CXzjaPWR.mjs +0 -4650
- package/dist/apps-CXzjaPWR.mjs.map +0 -1
- package/dist/apps-vLzb0ZSA.cjs +0 -5174
- package/dist/apps-vLzb0ZSA.cjs.map +0 -1
- package/dist/clientTelemetry-Ej1tf1VE.d.cts.map +0 -1
- package/dist/clientTelemetry-crdjgehZ.d.mts.map +0 -1
- package/dist/compose-CJznzQc7.mjs.map +0 -1
- package/dist/compose-CKBieltT.cjs.map +0 -1
- package/dist/compose-CvNyjqwL.cjs.map +0 -1
- package/dist/compose-DPXoarGI.mjs.map +0 -1
- package/dist/deploy-BaSYxpny.cjs.map +0 -1
- package/dist/deploy-C_uZBzvS.mjs.map +0 -1
- package/dist/dns-BzYrbB2Y.cjs.map +0 -1
- package/dist/dns-C0wbTjVX.mjs.map +0 -1
- package/dist/docker-CPoUMg5X.mjs +0 -1649
- package/dist/docker-CPoUMg5X.mjs.map +0 -1
- package/dist/docker-CrhpQWnL.cjs +0 -1798
- package/dist/docker-CrhpQWnL.cjs.map +0 -1
- package/dist/engine-3imTFxdN.cjs.map +0 -1
- package/dist/engine-DaI4iScI.mjs.map +0 -1
- package/dist/notes-6F8YXU8m.mjs +0 -409
- package/dist/notes-6F8YXU8m.mjs.map +0 -1
- package/dist/notes-DMOLnNJI.cjs +0 -510
- package/dist/notes-DMOLnNJI.cjs.map +0 -1
- package/dist/sst-CvOnXAel.mjs.map +0 -1
- package/dist/sst-DGsteg5j.cjs.map +0 -1
- package/dist/stack-Dd-egttk.mjs +0 -1777
- package/dist/stack-Dd-egttk.mjs.map +0 -1
- package/dist/stack-vBnc84e8.cjs +0 -1887
- package/dist/stack-vBnc84e8.cjs.map +0 -1
- package/dist/stage-8KJCtYtl.cjs.map +0 -1
- package/dist/stage-CXIdtjY2.mjs.map +0 -1
- package/dist/workspace-DTX6CJi2.mjs.map +0 -1
- package/dist/workspace-fGwzXa5l.cjs.map +0 -1
package/dist/deploy/public.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { At as ReleasedImage, Bt as SandboxExecOptions, D as WorkspaceConfig, Dt as StateLocked, Et as LocalStateInCi, Ft as DeployIdentity, Gt as GkmError, Ht as SandboxResult, It as deployIdentity, Lt as SECRETS_DIR_ENV, Mt as GithubActor, Nt as LocalActor, Rt as Sandbox, St as ConstructsNotSerializable, U as AnyDeployTarget, Ut as SecretNameInvalid, Vt as SandboxOutput, Wt as confineCwd, _t as StoredCredentialsOptions, at as DeployPhase, bt as ProviderKind, ct as AppDeployResult, dt as Credential, ft as CredentialKind, gt as MissingCredential, ht as CredentialRequest, it as DeployEventType, jt as Actor, kt as StateVersionConflict, lt as DeployResult, mt as CredentialProvider, nt as DeployEvent, ot as ResourceChange, pt as CredentialKinds, r as GkmConfig, rt as DeployEventError, st as ResourceVia, ut as AwsCredential, vt as chainCredentials, xt as ConstructDiscoveryFailed, yt as storedCredentials, zt as SandboxCwdEscape } from "../types-
|
|
2
|
-
import "../index-
|
|
3
|
-
import { i as ConfigLoadFailed, o as ConfigObjectNotSerializable } from "../config-
|
|
4
|
-
import "../clientTelemetry-
|
|
5
|
-
import { a as TargetRuntimeMismatch, c as DeployTargetNotYetSupported, i as TargetPackageInvalid, l as UnknownDeployTarget, n as InvalidTargetOptions, o as ProviderRemoved, r as TargetEntryInvalid, s as TargetPackageNotFound, t as TargetRuntimeUndeclared } from "../runtime-
|
|
1
|
+
import { At as ReleasedImage, Bt as SandboxExecOptions, D as WorkspaceConfig, Dt as StateLocked, Et as LocalStateInCi, Ft as DeployIdentity, Gt as GkmError, Ht as SandboxResult, It as deployIdentity, Lt as SECRETS_DIR_ENV, Mt as GithubActor, Nt as LocalActor, Rt as Sandbox, St as ConstructsNotSerializable, U as AnyDeployTarget, Ut as SecretNameInvalid, Vt as SandboxOutput, Wt as confineCwd, _t as StoredCredentialsOptions, at as DeployPhase, bt as ProviderKind, ct as AppDeployResult, dt as Credential, ft as CredentialKind, gt as MissingCredential, ht as CredentialRequest, it as DeployEventType, jt as Actor, kt as StateVersionConflict, lt as DeployResult, mt as CredentialProvider, nt as DeployEvent, ot as ResourceChange, pt as CredentialKinds, r as GkmConfig, rt as DeployEventError, st as ResourceVia, ut as AwsCredential, vt as chainCredentials, xt as ConstructDiscoveryFailed, yt as storedCredentials, zt as SandboxCwdEscape } from "../types-CJTKWLkK.mjs";
|
|
2
|
+
import "../index-BThTZV8T.mjs";
|
|
3
|
+
import { i as ConfigLoadFailed, o as ConfigObjectNotSerializable } from "../config-CTrfNKYd.mjs";
|
|
4
|
+
import "../clientTelemetry-Bzc4KXz5.mjs";
|
|
5
|
+
import { a as TargetRuntimeMismatch, c as DeployTargetNotYetSupported, i as TargetPackageInvalid, l as UnknownDeployTarget, n as InvalidTargetOptions, o as ProviderRemoved, r as TargetEntryInvalid, s as TargetPackageNotFound, t as TargetRuntimeUndeclared } from "../runtime-Ct41f0tN.mjs";
|
|
6
6
|
import { ConstructManifest, Declaration } from "@geekmidas/manifest";
|
|
7
7
|
import "@geekmidas/db/pg/roles";
|
|
8
8
|
import "@aws-sdk/client-s3";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public.d.mts","names":[],"sources":["../../src/home.ts","../../src/providers/config.ts","../../src/deploy/devServices.ts","../../src/providers/notes.ts","../../src/providers/s3/errors.ts","../../src/run.ts","../../src/sandbox/env.ts","../../src/docker/templates.ts","../../src/sandbox/install.ts","../../src/sandbox/local.ts","../../src/sandbox/worker.ts","../../src/target/dokploy/dokploy-api.ts","../../src/target/dokploy/engine.ts","../../src/target/dokploy/health.ts","../../src/target/dokploy/migrations.ts","../../src/target/dokploy/rollback.ts","../../src/target/seeds.ts","../../src/target/sst/health.ts","../../src/target/sst/outputs.ts","../../src/target/sst/index.ts","../../src/deploy/deploy.ts","../../src/deploy/orchestrate.ts","../../src/deploy/ownership.ts","../../src/deploy/registry.ts"],"mappings":";;;;;;;;;;;;;;;;;;;qBAaa;;wBAGG,QAAQ,MAAK,OAAO;;;;qBCqDvB,6BAA6B;WAE/B,MAAM;WACN;WACA;EAHV,YACU,MAAM,cACN,eACA;;;;;;;;;qBC3BE;KAED,qBAAqB;;qBAcpB,oCAAoC;WAC3B;EAArB,YAAqB;;;;;;;qBAeT,qCAAqC;WAC5B;EAArB,YAAqB;;;UAiCL;EAChB;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA,UAAU;;EAEV;;EAEA;;;;;;qBAOY,sCAAsC;WAExC;WACA,kBAAkB;EAF5B,YACU,eACA,kBAAkB;;;;;qBCnHhB,8BAA8B;WAEhC,MAAM;WACN;WACA;EAHV,YACU,MAAM,cACN,eACA;;;;;qBCyHE,qCAAqC;WAEvC;WACA;WACA;WACA;EAJV,YACU,YACA,gBACA,eACA;;;;;qBCjHE,sBAAsB;WAExB;WACA;WACA;WACA,QAAQ,OAAO;EAJzB,YACU,iBACA,yBACA,yBACA,QAAQ,OAAO;;;qBAUb,wBAAwB;WAE1B;WACA;WACA;EAHV,YACU,iBACA,yBACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBC3BE,0CAA0C;;;;;wBAyDvC,eACf,SAAQ,OAAO,YACf,4BACE;;;
|
|
1
|
+
{"version":3,"file":"public.d.mts","names":[],"sources":["../../src/home.ts","../../src/providers/config.ts","../../src/deploy/devServices.ts","../../src/providers/notes.ts","../../src/providers/s3/errors.ts","../../src/run.ts","../../src/sandbox/env.ts","../../src/docker/templates.ts","../../src/sandbox/install.ts","../../src/sandbox/local.ts","../../src/sandbox/worker.ts","../../src/target/dokploy/dokploy-api.ts","../../src/target/dokploy/engine.ts","../../src/target/dokploy/health.ts","../../src/target/dokploy/migrations.ts","../../src/target/dokploy/rollback.ts","../../src/target/seeds.ts","../../src/target/sst/health.ts","../../src/target/sst/outputs.ts","../../src/target/sst/index.ts","../../src/deploy/deploy.ts","../../src/deploy/orchestrate.ts","../../src/deploy/ownership.ts","../../src/deploy/registry.ts"],"mappings":"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"}
|
package/dist/deploy/public.mjs
CHANGED
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
import { t as GkmError } from "../errors-C9uIyIDt.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { A as deployIdentity, X as gkmHome, Y as GKM_HOME_ENV, n as chainCredentials, r as storedCredentials, t as MissingCredential } from "../credentials-Ci8nKFw4.mjs";
|
|
3
|
+
import { R as StageProviderDisabled, Xn as CommandTimedOut, Yn as CommandFailed, dt as AllowDevServicesTakesNoValue, ft as DEV_SERVICES, mt as ExternalServicesNotConfigured, nn as detectPackageManager, pt as DevServicesNeedServerTarget } from "../stack-DU2SunuO.mjs";
|
|
4
|
+
import { V as UnknownStageProvider, wt as ProvisionedBucketUnreachable } from "../workspace-CdiCMRap.mjs";
|
|
5
5
|
import { a as UnknownDeployTarget, i as DeployTargetNotYetSupported } from "../define-BfrNaY82.mjs";
|
|
6
6
|
import { d as SECRETS_DIR_ENV, f as SandboxCwdEscape, g as confineCwd, n as ConstructsNotSerializable, p as SecretNameInvalid, s as SandboxWorkerFailed, t as ConstructDiscoveryFailed } from "../discover-Dfmn6HQ7.mjs";
|
|
7
7
|
import { ConfigLoadFailed, ConfigObjectNotSerializable } from "../config.mjs";
|
|
8
|
-
import { i as TargetRuntimeMismatch, l as TargetPackageNotFound, n as TargetEntryInvalid, r as TargetPackageInvalid, s as TargetRuntimeUndeclared, t as InvalidTargetOptions } from "../resolve-
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { a as
|
|
12
|
-
import { a as UnknownDeployApps, i as TargetBuildsNothing, n as NoDeployableApps, r as RollbackFailed, t as deploy } from "../deploy-C_uZBzvS.mjs";
|
|
8
|
+
import { i as TargetRuntimeMismatch, l as TargetPackageNotFound, n as TargetEntryInvalid, r as TargetPackageInvalid, s as TargetRuntimeUndeclared, t as InvalidTargetOptions } from "../resolve-UK4b26dm.mjs";
|
|
9
|
+
import { n as SANDBOX_ENV_ALLOWLIST, r as allowlistedEnv, t as LocalSandbox } from "../local-CMA_7b0_.mjs";
|
|
10
|
+
import { a as DeploymentTimedOut, f as StateLocked, g as StateVersionConflict, i as DeploymentFailed, u as LocalStateInCi } from "../sniffer-DIyYcOXJ.mjs";
|
|
11
|
+
import { a as UnknownDeployApps, i as TargetBuildsNothing, n as NoDeployableApps, r as RollbackFailed, t as deploy } from "../deploy-DwtM6VSz.mjs";
|
|
13
12
|
import { t as DeploySeedsFailed } from "../seeds-Ccn0Ru2T.mjs";
|
|
14
|
-
import { _ as RegistryNotConfigured, g as RegistryAmbiguous, h as HealthCheckTimedOut, m as DeployMigrationsFailed, n as FrontendDeployFailed, r as MissingEnvVars, t as BackendDeployFailed, v as RegistryNotFound, y as ProjectNotOwned } from "../engine-
|
|
15
|
-
import { i as rollbackStage, n as RollbackNeedsApp, r as StageNeverDeployed, t as NothingToRollBack } from "../rollback-
|
|
13
|
+
import { _ as RegistryNotConfigured, g as RegistryAmbiguous, h as HealthCheckTimedOut, m as DeployMigrationsFailed, n as FrontendDeployFailed, r as MissingEnvVars, t as BackendDeployFailed, v as RegistryNotFound, y as ProjectNotOwned } from "../engine-a6K99WIl.mjs";
|
|
14
|
+
import { i as rollbackStage, n as RollbackNeedsApp, r as StageNeverDeployed, t as NothingToRollBack } from "../rollback-B0eg3M0J.mjs";
|
|
16
15
|
import { t as ProviderRemoved } from "../provider-BvjDbsTR.mjs";
|
|
17
|
-
import { i as SurfacesUnhealthy, r as SstOutputsUnreadable, t as SstConfigNotFound } from "../sst-
|
|
16
|
+
import { i as SurfacesUnhealthy, r as SstOutputsUnreadable, t as SstConfigNotFound } from "../sst-DBH707Na.mjs";
|
|
18
17
|
import { join, resolve } from "node:path";
|
|
19
18
|
import { existsSync } from "node:fs";
|
|
20
19
|
//#region src/sandbox/install.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public.mjs","names":[],"sources":["../../src/sandbox/install.ts"],"sourcesContent":["/**\n * Installing a project's dependencies in a sandbox, with or without their\n * lifecycle scripts.\n *\n * `postinstall` is the oldest way into a build machine: any package in the\n * lockfile — a dependency of a dependency — runs whatever it likes the moment\n * it is installed. For a build the host trusts that is how native modules get\n * built. For one it does not, the scripts are skipped, and the few packages\n * that genuinely need theirs (esbuild's binary, a database driver) are named\n * and rebuilt — with nothing but the sandbox's environment either way.\n */\n\nimport { existsSync } from 'node:fs';\nimport { join, resolve } from 'node:path';\nimport { detectPackageManager, type PackageManager } from '../docker/templates';\nimport { GkmError } from '../errors';\nimport { CommandFailed } from '../run';\nimport type { Sandbox, SandboxOutput, SandboxResult } from './sandbox';\n\n/** Long enough for a cold install of a large monorepo. */\nexport const INSTALL_TIMEOUT_MS = 15 * 60_000;\n\nexport interface InstallOptions {\n\t/** The directory to install in. Defaults to the sandbox's root. */\n\tcwd?: string;\n\t/** Defaults to the one the lockfile above `cwd` names. */\n\tpackageManager?: PackageManager;\n\t/**\n\t * Skip every lifecycle script — dependencies' and the project's own —\n\t * except those of {@link allowScripts}. Defaults to false: scripts run as\n\t * a plain install runs them, under the package manager's own policy —\n\t * npm 12 and pnpm 10 skip dependencies' scripts nobody approved.\n\t */\n\tignoreScripts?: boolean;\n\t/**\n\t * With `ignoreScripts`, the packages whose scripts still run: rebuilt by\n\t * name once the install is done.\n\t */\n\tallowScripts?: readonly string[];\n\t/** Variables the install needs beyond the sandbox's own. */\n\tenv?: Readonly<Record<string, string>>;\n\t/** Defaults to {@link INSTALL_TIMEOUT_MS}, for each command. */\n\ttimeoutMs?: number;\n\t/** Where the package manager's output goes. Defaults to `inherit`. */\n\toutput?: SandboxOutput;\n\tsignal?: AbortSignal;\n}\n\n/** A name in `allowScripts` that is not a package name. */\nexport class InstallAllowlistNameInvalid extends GkmError {\n\tconstructor(readonly packageName: string) {\n\t\tsuper(\n\t\t\t`'${packageName}' is not a package name, so its scripts cannot be ` +\n\t\t\t\t'allowed. Name the package as it appears in package.json — ' +\n\t\t\t\t\"'esbuild', '@prisma/client'.\",\n\t\t);\n\t\tthis.name = 'InstallAllowlistNameInvalid';\n\t}\n}\n\n/** The package manager has no way to run only some packages' scripts. */\nexport class InstallScriptsAllowlistUnsupported extends GkmError {\n\tconstructor(\n\t\treadonly packageManager: string,\n\t\treadonly allowScripts: readonly string[],\n\t) {\n\t\tsuper(\n\t\t\t`${packageManager} cannot rebuild named packages after an install ` +\n\t\t\t\t`without scripts, so ${allowScripts.join(', ')} cannot be allowed ` +\n\t\t\t\t'theirs. Use pnpm, npm or Yarn 2+, or install with every script ' +\n\t\t\t\t'skipped.',\n\t\t);\n\t\tthis.name = 'InstallScriptsAllowlistUnsupported';\n\t}\n}\n\n/**\n * npm's package-name grammar, less a leading `-`: each name is an argument to\n * `rebuild`, and must never be read as a flag.\n */\nconst PACKAGE_NAME = /^(?:@[a-z0-9~][a-z0-9._~-]*\\/)?[a-z0-9~][a-z0-9._~-]*$/;\n\n/**\n * The commands an install runs, in order. Exported for the tests, which\n * check each package manager's flags without installing with all four.\n */\nexport function installCommands(\n\tpackageManager: PackageManager,\n\tcwd: string,\n\toptions: Pick<InstallOptions, 'ignoreScripts' | 'allowScripts'> = {},\n): [string, string[]][] {\n\tconst ignore = options.ignoreScripts ?? false;\n\tconst allow = ignore ? [...(options.allowScripts ?? [])] : [];\n\tfor (const name of allow) {\n\t\tif (!PACKAGE_NAME.test(name)) throw new InstallAllowlistNameInvalid(name);\n\t}\n\n\tswitch (packageManager) {\n\t\tcase 'pnpm':\n\t\t\treturn [\n\t\t\t\t[\n\t\t\t\t\t'pnpm',\n\t\t\t\t\t[\n\t\t\t\t\t\t'install',\n\t\t\t\t\t\t'--frozen-lockfile',\n\t\t\t\t\t\t...(ignore ? ['--ignore-scripts'] : []),\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t\t// pnpm 10 builds no dependency it was not told to, even by name;\n\t\t\t\t// this command names exactly the ones allowed, so it may build\n\t\t\t\t// what it names.\n\t\t\t\t...(allow.length > 0\n\t\t\t\t\t? [\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t'pnpm',\n\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t'rebuild',\n\t\t\t\t\t\t\t\t\t'--config.dangerouslyAllowAllBuilds=true',\n\t\t\t\t\t\t\t\t\t...allow,\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t] as [string, string[]],\n\t\t\t\t\t\t]\n\t\t\t\t\t: []),\n\t\t\t];\n\t\tcase 'npm': {\n\t\t\tconst locked = existsSync(join(cwd, 'package-lock.json'));\n\t\t\treturn [\n\t\t\t\t[\n\t\t\t\t\t'npm',\n\t\t\t\t\t[locked ? 'ci' : 'install', ...(ignore ? ['--ignore-scripts'] : [])],\n\t\t\t\t],\n\t\t\t\t// npm 12 runs no dependency's install script its `allowScripts`\n\t\t\t\t// policy does not approve, rebuilt by name or not, and refuses\n\t\t\t\t// `--allow-scripts` on a project's command line. This command\n\t\t\t\t// names exactly the packages allowed, so it may run what it names.\n\t\t\t\t...(allow.length > 0\n\t\t\t\t\t? [\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t'npm',\n\t\t\t\t\t\t\t\t['rebuild', '--dangerously-allow-all-scripts', ...allow],\n\t\t\t\t\t\t\t] as [string, string[]],\n\t\t\t\t\t\t]\n\t\t\t\t\t: []),\n\t\t\t];\n\t\t}\n\t\tcase 'yarn': {\n\t\t\t// Yarn 2+ keeps a `.yarnrc.yml`; it skips builds by mode and can\n\t\t\t// rebuild by name. Yarn 1 can only skip them all.\n\t\t\tconst berry = existsSync(join(cwd, '.yarnrc.yml'));\n\t\t\tif (berry) {\n\t\t\t\treturn [\n\t\t\t\t\t[\n\t\t\t\t\t\t'yarn',\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\t'install',\n\t\t\t\t\t\t\t'--immutable',\n\t\t\t\t\t\t\t...(ignore ? ['--mode=skip-build'] : []),\n\t\t\t\t\t\t],\n\t\t\t\t\t],\n\t\t\t\t\t...(allow.length > 0\n\t\t\t\t\t\t? [['yarn', ['rebuild', ...allow]] as [string, string[]]]\n\t\t\t\t\t\t: []),\n\t\t\t\t];\n\t\t\t}\n\t\t\tif (allow.length > 0) {\n\t\t\t\tthrow new InstallScriptsAllowlistUnsupported('Yarn 1', allow);\n\t\t\t}\n\t\t\treturn [\n\t\t\t\t[\n\t\t\t\t\t'yarn',\n\t\t\t\t\t[\n\t\t\t\t\t\t'install',\n\t\t\t\t\t\t'--frozen-lockfile',\n\t\t\t\t\t\t...(ignore ? ['--ignore-scripts'] : []),\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t];\n\t\t}\n\t\tcase 'bun':\n\t\t\tif (allow.length > 0) {\n\t\t\t\tthrow new InstallScriptsAllowlistUnsupported('bun', allow);\n\t\t\t}\n\t\t\treturn [\n\t\t\t\t[\n\t\t\t\t\t'bun',\n\t\t\t\t\t[\n\t\t\t\t\t\t'install',\n\t\t\t\t\t\t'--frozen-lockfile',\n\t\t\t\t\t\t...(ignore ? ['--ignore-scripts'] : []),\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t];\n\t}\n}\n\n/**\n * Install the project's dependencies in `sandbox`.\n *\n * ```ts\n * // A checkout nobody has reviewed: no scripts but esbuild's.\n * await installDependencies(sandbox, {\n * ignoreScripts: true,\n * allowScripts: ['esbuild'],\n * });\n * ```\n *\n * Resolves with each command's result, in order — with its output when\n * `output` is `capture`.\n *\n * @throws {CommandFailed} when the package manager exits unsuccessfully.\n * @throws {InstallScriptsAllowlistUnsupported} for an allowlist the package\n * manager cannot honour, before anything is installed.\n */\nexport async function installDependencies(\n\tsandbox: Sandbox,\n\toptions: InstallOptions = {},\n): Promise<SandboxResult[]> {\n\tconst cwd = options.cwd ?? sandbox.root;\n\tconst results: SandboxResult[] = [];\n\tconst packageManager =\n\t\toptions.packageManager ?? detectPackageManager(resolve(sandbox.root, cwd));\n\n\tfor (const [command, args] of installCommands(\n\t\tpackageManager,\n\t\tresolve(sandbox.root, cwd),\n\t\toptions,\n\t)) {\n\t\tconst result = await sandbox.exec(command, args, {\n\t\t\tcwd,\n\t\t\tenv: { ...sandbox.env, ...options.env },\n\t\t\ttimeoutMs: options.timeoutMs ?? INSTALL_TIMEOUT_MS,\n\t\t\toutput: options.output ?? 'inherit',\n\t\t\t...(options.signal ? { signal: options.signal } : {}),\n\t\t});\n\t\tresults.push(result);\n\t\tif (result.exitCode !== 0) {\n\t\t\tthrow new CommandFailed(\n\t\t\t\tcommand,\n\t\t\t\targs,\n\t\t\t\tresult.exitCode,\n\t\t\t\tresult.signal as NodeJS.Signals | null,\n\t\t\t);\n\t\t}\n\t}\n\treturn results;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBA,MAAa,qBAAqB;;AA6BlC,IAAa,8BAAb,cAAiD,SAAS;CACpC;CAArB,YAAY,aAA8B;EACzC,MACC,IAAI,YAAY,yIAGjB;EALoB,KAAA,cAAA;EAMpB,KAAK,OAAO;CACb;AACD;;AAGA,IAAa,qCAAb,cAAwD,SAAS;CAEtD;CACA;CAFV,YACC,gBACA,cACC;EACD,MACC,GAAG,eAAe,sEACM,aAAa,KAAK,IAAI,EAAE,2FAGjD;EARS,KAAA,iBAAA;EACA,KAAA,eAAA;EAQT,KAAK,OAAO;CACb;AACD;;;;;AAMA,MAAM,eAAe;;;;;AAMrB,SAAgB,gBACf,gBACA,KACA,UAAkE,CAAC,GAC5C;CACvB,MAAM,SAAS,QAAQ,iBAAiB;CACxC,MAAM,QAAQ,SAAS,CAAC,GAAI,QAAQ,gBAAgB,CAAC,CAAE,IAAI,CAAC;CAC5D,KAAK,MAAM,QAAQ,OAClB,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,MAAM,IAAI,4BAA4B,IAAI;CAGzE,QAAQ,gBAAR;EACC,KAAK,QACJ,OAAO,CACN,CACC,QACA;GACC;GACA;GACA,GAAI,SAAS,CAAC,kBAAkB,IAAI,CAAC;EACtC,CACD,GAIA,GAAI,MAAM,SAAS,IAChB,CACA,CACC,QACA;GACC;GACA;GACA,GAAG;EACJ,CACD,CACD,IACC,CAAC,CACL;EACD,KAAK,OAEJ,OAAO,CACN,CACC,OACA,CAJa,WAAW,KAAK,KAAK,mBAAmB,CAI/C,IAAI,OAAO,WAAW,GAAI,SAAS,CAAC,kBAAkB,IAAI,CAAC,CAAE,CACpE,GAKA,GAAI,MAAM,SAAS,IAChB,CACA,CACC,OACA;GAAC;GAAW;GAAmC,GAAG;EAAK,CACxD,CACD,IACC,CAAC,CACL;EAED,KAAK;GAIJ,IADc,WAAW,KAAK,KAAK,aAAa,CACxC,GACP,OAAO,CACN,CACC,QACA;IACC;IACA;IACA,GAAI,SAAS,CAAC,mBAAmB,IAAI,CAAC;GACvC,CACD,GACA,GAAI,MAAM,SAAS,IAChB,CAAC,CAAC,QAAQ,CAAC,WAAW,GAAG,KAAK,CAAC,CAAuB,IACtD,CAAC,CACL;GAED,IAAI,MAAM,SAAS,GAClB,MAAM,IAAI,mCAAmC,UAAU,KAAK;GAE7D,OAAO,CACN,CACC,QACA;IACC;IACA;IACA,GAAI,SAAS,CAAC,kBAAkB,IAAI,CAAC;GACtC,CACD,CACD;EAED,KAAK;GACJ,IAAI,MAAM,SAAS,GAClB,MAAM,IAAI,mCAAmC,OAAO,KAAK;GAE1D,OAAO,CACN,CACC,OACA;IACC;IACA;IACA,GAAI,SAAS,CAAC,kBAAkB,IAAI,CAAC;GACtC,CACD,CACD;CACF;AACD;;;;;;;;;;;;;;;;;;;AAoBA,eAAsB,oBACrB,SACA,UAA0B,CAAC,GACA;CAC3B,MAAM,MAAM,QAAQ,OAAO,QAAQ;CACnC,MAAM,UAA2B,CAAC;CAClC,MAAM,iBACL,QAAQ,kBAAkB,qBAAqB,QAAQ,QAAQ,MAAM,GAAG,CAAC;CAE1E,KAAK,MAAM,CAAC,SAAS,SAAS,gBAC7B,gBACA,QAAQ,QAAQ,MAAM,GAAG,GACzB,OACD,GAAG;EACF,MAAM,SAAS,MAAM,QAAQ,KAAK,SAAS,MAAM;GAChD;GACA,KAAK;IAAE,GAAG,QAAQ;IAAK,GAAG,QAAQ;GAAI;GACtC,WAAW,QAAQ,aAAA;GACnB,QAAQ,QAAQ,UAAU;GAC1B,GAAI,QAAQ,SAAS,EAAE,QAAQ,QAAQ,OAAO,IAAI,CAAC;EACpD,CAAC;EACD,QAAQ,KAAK,MAAM;EACnB,IAAI,OAAO,aAAa,GACvB,MAAM,IAAI,cACT,SACA,MACA,OAAO,UACP,OAAO,MACR;CAEF;CACA,OAAO;AACR"}
|
|
1
|
+
{"version":3,"file":"public.mjs","names":[],"sources":["../../src/sandbox/install.ts"],"sourcesContent":["/**\n * Installing a project's dependencies in a sandbox, with or without their\n * lifecycle scripts.\n *\n * `postinstall` is the oldest way into a build machine: any package in the\n * lockfile — a dependency of a dependency — runs whatever it likes the moment\n * it is installed. For a build the host trusts that is how native modules get\n * built. For one it does not, the scripts are skipped, and the few packages\n * that genuinely need theirs (esbuild's binary, a database driver) are named\n * and rebuilt — with nothing but the sandbox's environment either way.\n */\n\nimport { existsSync } from 'node:fs';\nimport { join, resolve } from 'node:path';\nimport { detectPackageManager, type PackageManager } from '../docker/templates';\nimport { GkmError } from '../errors';\nimport { CommandFailed } from '../run';\nimport type { Sandbox, SandboxOutput, SandboxResult } from './sandbox';\n\n/** Long enough for a cold install of a large monorepo. */\nexport const INSTALL_TIMEOUT_MS = 15 * 60_000;\n\nexport interface InstallOptions {\n\t/** The directory to install in. Defaults to the sandbox's root. */\n\tcwd?: string;\n\t/** Defaults to the one the lockfile above `cwd` names. */\n\tpackageManager?: PackageManager;\n\t/**\n\t * Skip every lifecycle script — dependencies' and the project's own —\n\t * except those of {@link allowScripts}. Defaults to false: scripts run as\n\t * a plain install runs them, under the package manager's own policy —\n\t * npm 12 and pnpm 10 skip dependencies' scripts nobody approved.\n\t */\n\tignoreScripts?: boolean;\n\t/**\n\t * With `ignoreScripts`, the packages whose scripts still run: rebuilt by\n\t * name once the install is done.\n\t */\n\tallowScripts?: readonly string[];\n\t/** Variables the install needs beyond the sandbox's own. */\n\tenv?: Readonly<Record<string, string>>;\n\t/** Defaults to {@link INSTALL_TIMEOUT_MS}, for each command. */\n\ttimeoutMs?: number;\n\t/** Where the package manager's output goes. Defaults to `inherit`. */\n\toutput?: SandboxOutput;\n\tsignal?: AbortSignal;\n}\n\n/** A name in `allowScripts` that is not a package name. */\nexport class InstallAllowlistNameInvalid extends GkmError {\n\tconstructor(readonly packageName: string) {\n\t\tsuper(\n\t\t\t`'${packageName}' is not a package name, so its scripts cannot be ` +\n\t\t\t\t'allowed. Name the package as it appears in package.json — ' +\n\t\t\t\t\"'esbuild', '@prisma/client'.\",\n\t\t);\n\t\tthis.name = 'InstallAllowlistNameInvalid';\n\t}\n}\n\n/** The package manager has no way to run only some packages' scripts. */\nexport class InstallScriptsAllowlistUnsupported extends GkmError {\n\tconstructor(\n\t\treadonly packageManager: string,\n\t\treadonly allowScripts: readonly string[],\n\t) {\n\t\tsuper(\n\t\t\t`${packageManager} cannot rebuild named packages after an install ` +\n\t\t\t\t`without scripts, so ${allowScripts.join(', ')} cannot be allowed ` +\n\t\t\t\t'theirs. Use pnpm, npm or Yarn 2+, or install with every script ' +\n\t\t\t\t'skipped.',\n\t\t);\n\t\tthis.name = 'InstallScriptsAllowlistUnsupported';\n\t}\n}\n\n/**\n * npm's package-name grammar, less a leading `-`: each name is an argument to\n * `rebuild`, and must never be read as a flag.\n */\nconst PACKAGE_NAME = /^(?:@[a-z0-9~][a-z0-9._~-]*\\/)?[a-z0-9~][a-z0-9._~-]*$/;\n\n/**\n * The commands an install runs, in order. Exported for the tests, which\n * check each package manager's flags without installing with all four.\n */\nexport function installCommands(\n\tpackageManager: PackageManager,\n\tcwd: string,\n\toptions: Pick<InstallOptions, 'ignoreScripts' | 'allowScripts'> = {},\n): [string, string[]][] {\n\tconst ignore = options.ignoreScripts ?? false;\n\tconst allow = ignore ? [...(options.allowScripts ?? [])] : [];\n\tfor (const name of allow) {\n\t\tif (!PACKAGE_NAME.test(name)) throw new InstallAllowlistNameInvalid(name);\n\t}\n\n\tswitch (packageManager) {\n\t\tcase 'pnpm':\n\t\t\treturn [\n\t\t\t\t[\n\t\t\t\t\t'pnpm',\n\t\t\t\t\t[\n\t\t\t\t\t\t'install',\n\t\t\t\t\t\t'--frozen-lockfile',\n\t\t\t\t\t\t...(ignore ? ['--ignore-scripts'] : []),\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t\t// pnpm 10 builds no dependency it was not told to, even by name;\n\t\t\t\t// this command names exactly the ones allowed, so it may build\n\t\t\t\t// what it names.\n\t\t\t\t...(allow.length > 0\n\t\t\t\t\t? [\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t'pnpm',\n\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t'rebuild',\n\t\t\t\t\t\t\t\t\t'--config.dangerouslyAllowAllBuilds=true',\n\t\t\t\t\t\t\t\t\t...allow,\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t] as [string, string[]],\n\t\t\t\t\t\t]\n\t\t\t\t\t: []),\n\t\t\t];\n\t\tcase 'npm': {\n\t\t\tconst locked = existsSync(join(cwd, 'package-lock.json'));\n\t\t\treturn [\n\t\t\t\t[\n\t\t\t\t\t'npm',\n\t\t\t\t\t[locked ? 'ci' : 'install', ...(ignore ? ['--ignore-scripts'] : [])],\n\t\t\t\t],\n\t\t\t\t// npm 12 runs no dependency's install script its `allowScripts`\n\t\t\t\t// policy does not approve, rebuilt by name or not, and refuses\n\t\t\t\t// `--allow-scripts` on a project's command line. This command\n\t\t\t\t// names exactly the packages allowed, so it may run what it names.\n\t\t\t\t...(allow.length > 0\n\t\t\t\t\t? [\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t'npm',\n\t\t\t\t\t\t\t\t['rebuild', '--dangerously-allow-all-scripts', ...allow],\n\t\t\t\t\t\t\t] as [string, string[]],\n\t\t\t\t\t\t]\n\t\t\t\t\t: []),\n\t\t\t];\n\t\t}\n\t\tcase 'yarn': {\n\t\t\t// Yarn 2+ keeps a `.yarnrc.yml`; it skips builds by mode and can\n\t\t\t// rebuild by name. Yarn 1 can only skip them all.\n\t\t\tconst berry = existsSync(join(cwd, '.yarnrc.yml'));\n\t\t\tif (berry) {\n\t\t\t\treturn [\n\t\t\t\t\t[\n\t\t\t\t\t\t'yarn',\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\t'install',\n\t\t\t\t\t\t\t'--immutable',\n\t\t\t\t\t\t\t...(ignore ? ['--mode=skip-build'] : []),\n\t\t\t\t\t\t],\n\t\t\t\t\t],\n\t\t\t\t\t...(allow.length > 0\n\t\t\t\t\t\t? [['yarn', ['rebuild', ...allow]] as [string, string[]]]\n\t\t\t\t\t\t: []),\n\t\t\t\t];\n\t\t\t}\n\t\t\tif (allow.length > 0) {\n\t\t\t\tthrow new InstallScriptsAllowlistUnsupported('Yarn 1', allow);\n\t\t\t}\n\t\t\treturn [\n\t\t\t\t[\n\t\t\t\t\t'yarn',\n\t\t\t\t\t[\n\t\t\t\t\t\t'install',\n\t\t\t\t\t\t'--frozen-lockfile',\n\t\t\t\t\t\t...(ignore ? ['--ignore-scripts'] : []),\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t];\n\t\t}\n\t\tcase 'bun':\n\t\t\tif (allow.length > 0) {\n\t\t\t\tthrow new InstallScriptsAllowlistUnsupported('bun', allow);\n\t\t\t}\n\t\t\treturn [\n\t\t\t\t[\n\t\t\t\t\t'bun',\n\t\t\t\t\t[\n\t\t\t\t\t\t'install',\n\t\t\t\t\t\t'--frozen-lockfile',\n\t\t\t\t\t\t...(ignore ? ['--ignore-scripts'] : []),\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t];\n\t}\n}\n\n/**\n * Install the project's dependencies in `sandbox`.\n *\n * ```ts\n * // A checkout nobody has reviewed: no scripts but esbuild's.\n * await installDependencies(sandbox, {\n * ignoreScripts: true,\n * allowScripts: ['esbuild'],\n * });\n * ```\n *\n * Resolves with each command's result, in order — with its output when\n * `output` is `capture`.\n *\n * @throws {CommandFailed} when the package manager exits unsuccessfully.\n * @throws {InstallScriptsAllowlistUnsupported} for an allowlist the package\n * manager cannot honour, before anything is installed.\n */\nexport async function installDependencies(\n\tsandbox: Sandbox,\n\toptions: InstallOptions = {},\n): Promise<SandboxResult[]> {\n\tconst cwd = options.cwd ?? sandbox.root;\n\tconst results: SandboxResult[] = [];\n\tconst packageManager =\n\t\toptions.packageManager ?? detectPackageManager(resolve(sandbox.root, cwd));\n\n\tfor (const [command, args] of installCommands(\n\t\tpackageManager,\n\t\tresolve(sandbox.root, cwd),\n\t\toptions,\n\t)) {\n\t\tconst result = await sandbox.exec(command, args, {\n\t\t\tcwd,\n\t\t\tenv: { ...sandbox.env, ...options.env },\n\t\t\ttimeoutMs: options.timeoutMs ?? INSTALL_TIMEOUT_MS,\n\t\t\toutput: options.output ?? 'inherit',\n\t\t\t...(options.signal ? { signal: options.signal } : {}),\n\t\t});\n\t\tresults.push(result);\n\t\tif (result.exitCode !== 0) {\n\t\t\tthrow new CommandFailed(\n\t\t\t\tcommand,\n\t\t\t\targs,\n\t\t\t\tresult.exitCode,\n\t\t\t\tresult.signal as NodeJS.Signals | null,\n\t\t\t);\n\t\t}\n\t}\n\treturn results;\n}\n"],"mappings":"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"}
|
|
@@ -1,21 +1,19 @@
|
|
|
1
1
|
const require_rolldown_runtime = require("./rolldown-runtime-C0BPl7ul.cjs");
|
|
2
2
|
const require_errors = require("./errors-D1x8duqI.cjs");
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const
|
|
3
|
+
const require_credentials = require("./credentials-BQ1khM28.cjs");
|
|
4
|
+
const require_stack = require("./stack-CwSx-6ea.cjs");
|
|
5
|
+
const require_workspace = require("./workspace-CTspddnJ.cjs");
|
|
6
6
|
const require_define = require("./define-zKgLY65H.cjs");
|
|
7
|
-
const
|
|
7
|
+
const require_credentials$1 = require("./credentials-C3uaZ80e.cjs");
|
|
8
8
|
const require_SubscriberGenerator = require("./SubscriberGenerator-CxzECrfj.cjs");
|
|
9
9
|
const require_discover = require("./discover-OXczlq08.cjs");
|
|
10
10
|
const require_config = require("./config.cjs");
|
|
11
|
-
const require_resolve = require("./resolve-
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const require_iam = require("./iam-DeBQcSvw.cjs");
|
|
18
|
-
const require_projectBucket = require("./projectBucket-C5Ap5kGw.cjs");
|
|
11
|
+
const require_resolve = require("./resolve-Cs38fbaX.cjs");
|
|
12
|
+
const require_local = require("./local-B5R1WWEO.cjs");
|
|
13
|
+
const require_sniffer = require("./sniffer-CcLTONfm.cjs");
|
|
14
|
+
const require_snsSubscriptions = require("./snsSubscriptions-Bore7t-W.cjs");
|
|
15
|
+
const require_iam = require("./iam-SxPKYCI_.cjs");
|
|
16
|
+
const require_projectBucket = require("./projectBucket-DEBaYEbi.cjs");
|
|
19
17
|
const require_seeds = require("./seeds-Bc3niNVb.cjs");
|
|
20
18
|
const require_credentialSchemas = require("./credentialSchemas-DjK6xKMk.cjs");
|
|
21
19
|
let node_path = require("node:path");
|
|
@@ -65,7 +63,7 @@ function secretValues(secrets) {
|
|
|
65
63
|
* costs nothing.
|
|
66
64
|
*/
|
|
67
65
|
async function deploySecrets(workspace, stage, redactor, options = {}) {
|
|
68
|
-
const store = await
|
|
66
|
+
const store = await require_credentials.secretsStoreFor(workspace, stage, options);
|
|
69
67
|
const mask = (secrets) => {
|
|
70
68
|
for (const value of secretValues(secrets)) redactor.add(value);
|
|
71
69
|
};
|
|
@@ -151,7 +149,7 @@ var BackupsKeyRefused = class extends require_errors.GkmError {
|
|
|
151
149
|
key;
|
|
152
150
|
said;
|
|
153
151
|
constructor(stage, bucket, key, said) {
|
|
154
|
-
super(`The ${
|
|
152
|
+
super(`The ${require_stack.BACKUPS_URL_KEY} key of '${stage}' could not put s3://${bucket}/${key} (${said}), so its backups would fail the same way. Run the deploy with the stage's AWS credentials to put its user and policy back, or --rotate-keys to issue it a new key.`);
|
|
155
153
|
this.stage = stage;
|
|
156
154
|
this.bucket = bucket;
|
|
157
155
|
this.key = key;
|
|
@@ -180,7 +178,7 @@ function backupsRegion(workspace, stage, credential, env = process.env) {
|
|
|
180
178
|
async function ensureStageBackups(input) {
|
|
181
179
|
const { workspace, manifest, stage, ctx } = input;
|
|
182
180
|
const env = input.env ?? process.env;
|
|
183
|
-
const choice =
|
|
181
|
+
const choice = require_stack.stageBackups(workspace, manifest, stage);
|
|
184
182
|
if (choice.mode === "disabled") {
|
|
185
183
|
ctx.log(`💾 backups: off — deploy.backups.${stage} is false. Nothing is backed up, and nothing already backed up is deleted.`);
|
|
186
184
|
return choice;
|
|
@@ -200,11 +198,11 @@ async function ensureStageBackups(input) {
|
|
|
200
198
|
const region = backupsRegion(workspace, stage, credential, env);
|
|
201
199
|
const clients = await backupsClients(credential, region, env);
|
|
202
200
|
const bucket = require_projectBucket.projectBucketName(ctx.identity.scope, await require_projectBucket.callerAccountId(clients.sts));
|
|
203
|
-
const prefix =
|
|
204
|
-
const expiries =
|
|
201
|
+
const prefix = require_stack.backupsPrefix(workspace, stage);
|
|
202
|
+
const expiries = require_stack.backupExpiries(workspace, manifest);
|
|
205
203
|
ctx.log(`💾 backups: ${choice.backups.describe}, to s3://${bucket}/${prefix}/${ctx.dryRun ? " (dry run)" : ""}`);
|
|
206
204
|
if (await require_projectBucket.findProjectBucket(clients.s3, bucket) === "none") await ctx.change({
|
|
207
|
-
construct:
|
|
205
|
+
construct: require_stack.BACKUPS_SERVICE,
|
|
208
206
|
resource: `bucket ${bucket}`,
|
|
209
207
|
change: `create in ${region}, expiring each stage's backups`
|
|
210
208
|
}, async () => {
|
|
@@ -216,9 +214,9 @@ async function ensureStageBackups(input) {
|
|
|
216
214
|
});
|
|
217
215
|
});
|
|
218
216
|
else if (await require_projectBucket.reconcileProjectBucketLifecycle(clients.s3, bucket, expiries, { dryRun: true })) await ctx.change({
|
|
219
|
-
construct:
|
|
217
|
+
construct: require_stack.BACKUPS_SERVICE,
|
|
220
218
|
resource: `bucket ${bucket}`,
|
|
221
|
-
change: `lifecycle: ${expiries.map(
|
|
219
|
+
change: `lifecycle: ${expiries.map(describeExpiry).join(", ")}`
|
|
222
220
|
}, async () => {
|
|
223
221
|
await require_projectBucket.reconcileProjectBucketLifecycle(clients.s3, bucket, expiries);
|
|
224
222
|
});
|
|
@@ -233,12 +231,24 @@ async function ensureStageBackups(input) {
|
|
|
233
231
|
id: BACKUPS_ID,
|
|
234
232
|
secret: require_iam.s3KeySecret(ctx, clients, {
|
|
235
233
|
bucket,
|
|
236
|
-
urlKey:
|
|
234
|
+
urlKey: require_stack.BACKUPS_URL_KEY
|
|
237
235
|
}),
|
|
238
236
|
...user
|
|
239
237
|
});
|
|
238
|
+
if (choice.backups.pitr) {
|
|
239
|
+
ctx.log(` ${choice.backups.pitr.describe}, to ${require_stack.pitrPrefix(workspace, stage)}/`);
|
|
240
|
+
if (!ctx.secrets["PITR_KEY"]) await ctx.change({
|
|
241
|
+
construct: require_stack.BACKUPS_SERVICE,
|
|
242
|
+
resource: `secret ${require_stack.PITR_KEY}`,
|
|
243
|
+
change: "generate the key WAL and base backups are encrypted with"
|
|
244
|
+
}, () => ctx.writeSecrets({ [require_stack.PITR_KEY]: require_stack.newPitrKey() }));
|
|
245
|
+
}
|
|
240
246
|
return choice;
|
|
241
247
|
}
|
|
248
|
+
/** One lifecycle rule, for the deploy's change line. */
|
|
249
|
+
function describeExpiry(expiry) {
|
|
250
|
+
return `${expiry.prefix.endsWith(`/2`) ? `runs in ${expiry.prefix.slice(0, -1)}` : expiry.prefix} after ${expiry.days} days`;
|
|
251
|
+
}
|
|
242
252
|
/** The clients a backups run creates through. */
|
|
243
253
|
async function backupsClients(credential, region, env) {
|
|
244
254
|
const S3 = await import("@aws-sdk/client-s3");
|
|
@@ -270,8 +280,8 @@ async function backupsClients(credential, region, env) {
|
|
|
270
280
|
*/
|
|
271
281
|
async function verifyStageBackups(input) {
|
|
272
282
|
const { stage } = input;
|
|
273
|
-
if (
|
|
274
|
-
const url = input.secrets[
|
|
283
|
+
if (require_stack.stageBackups(input.workspace, input.manifest, stage).mode !== "on") return false;
|
|
284
|
+
const url = input.secrets[require_stack.BACKUPS_URL_KEY];
|
|
275
285
|
if (!url) return false;
|
|
276
286
|
const address = (await import("@geekmidas/storage/s3-url")).parse(url);
|
|
277
287
|
if (!address.accessKeyId || !address.secretAccessKey) return false;
|
|
@@ -285,7 +295,7 @@ async function verifyStageBackups(input) {
|
|
|
285
295
|
...address.endpoint ? { endpoint: address.endpoint } : {},
|
|
286
296
|
...address.forcePathStyle ? { forcePathStyle: true } : {}
|
|
287
297
|
});
|
|
288
|
-
const Key = `${
|
|
298
|
+
const Key = `${require_stack.backupsPrefix(input.workspace, stage)}/${VERIFY_MARKER}`;
|
|
289
299
|
const put = async () => {
|
|
290
300
|
try {
|
|
291
301
|
await client.send(new S3.PutObjectCommand({
|
|
@@ -337,14 +347,14 @@ async function verifyStageBackups(input) {
|
|
|
337
347
|
*/
|
|
338
348
|
async function writeProviderDns(records, options) {
|
|
339
349
|
const { log } = options;
|
|
340
|
-
const dns = options.workspace.dns ?
|
|
350
|
+
const dns = options.workspace.dns ? require_stack.normalizeDnsConfig(options.workspace.dns) : {};
|
|
341
351
|
const manual = [];
|
|
342
352
|
const domains = /* @__PURE__ */ new Map();
|
|
343
353
|
for (const record of records) {
|
|
344
354
|
const host = record.host.toLowerCase().replace(/\.$/, "");
|
|
345
355
|
const target = record.value.replace(/\.$/, "");
|
|
346
356
|
const value = record.type === "MX" ? (0, _geekmidas_edge_dns.mxValue)(record.priority, target) : target;
|
|
347
|
-
const domain =
|
|
357
|
+
const domain = require_stack.findRootDomain(host, dns);
|
|
348
358
|
if (!domain) {
|
|
349
359
|
log(` create at its DNS host: ${host} ${record.type} ${value}`);
|
|
350
360
|
manual.push(host);
|
|
@@ -360,7 +370,7 @@ async function writeProviderDns(records, options) {
|
|
|
360
370
|
const planned = {
|
|
361
371
|
host,
|
|
362
372
|
domain,
|
|
363
|
-
name:
|
|
373
|
+
name: require_stack.extractSubdomain(host, domain),
|
|
364
374
|
type: record.type,
|
|
365
375
|
value,
|
|
366
376
|
ttl: require_snsSubscriptions.recordTtl(config)
|
|
@@ -630,7 +640,7 @@ function distributionConfig(input) {
|
|
|
630
640
|
CustomHeaders: {
|
|
631
641
|
Quantity: 1,
|
|
632
642
|
Items: [{
|
|
633
|
-
HeaderName:
|
|
643
|
+
HeaderName: require_stack.ORIGIN_VERIFY_HEADER,
|
|
634
644
|
HeaderValue: processors.secret
|
|
635
645
|
}]
|
|
636
646
|
}
|
|
@@ -770,7 +780,7 @@ async function ensureBucketCdn(ctx, input) {
|
|
|
770
780
|
...input,
|
|
771
781
|
server,
|
|
772
782
|
host: require_workspace.fileServerHost(server.id, domain),
|
|
773
|
-
processorHost:
|
|
783
|
+
processorHost: require_stack.processorOriginHost(server.id, domain)
|
|
774
784
|
});
|
|
775
785
|
out.distributionArns.push(arn);
|
|
776
786
|
out.urls[server.id] = url;
|
|
@@ -859,10 +869,10 @@ function certificateToken(name, host) {
|
|
|
859
869
|
* it, when it composes.
|
|
860
870
|
*/
|
|
861
871
|
async function ensureOriginSecret(ctx, serverId) {
|
|
862
|
-
const key =
|
|
872
|
+
const key = require_stack.originSecretKey(serverId);
|
|
863
873
|
const kept = ctx.secrets[key];
|
|
864
874
|
if (kept) return kept;
|
|
865
|
-
const secret =
|
|
875
|
+
const secret = require_stack.newOriginSecret();
|
|
866
876
|
ctx.log(` ${serverId}: a new processor origin secret, kept as ${key}`);
|
|
867
877
|
await ctx.writeSecrets({ [key]: secret });
|
|
868
878
|
return secret;
|
|
@@ -1462,13 +1472,13 @@ function workerPushHost(worker, domain) {
|
|
|
1462
1472
|
*/
|
|
1463
1473
|
async function ensurePushSubscriptions(ctx, input) {
|
|
1464
1474
|
const { id, events, region, watchers } = input;
|
|
1465
|
-
if (!
|
|
1475
|
+
if (!require_stack.deploysWithCompose(ctx.workspace)) {
|
|
1466
1476
|
ctx.log(` '${id}' is watched, and only a compose stage pushes a bucket's changes to a worker: its subscribers receive nothing on '${ctx.stage}'`);
|
|
1467
1477
|
return;
|
|
1468
1478
|
}
|
|
1469
1479
|
if (watchers.length === 0) return;
|
|
1470
1480
|
const domain = ctx.workspace.domains?.[ctx.stage];
|
|
1471
|
-
if (!domain) throw new
|
|
1481
|
+
if (!domain) throw new require_credentials$1.NoDomainForStage(ctx.stage);
|
|
1472
1482
|
const { SNSConnection, reconcileHttpSubscriptions } = await import("@geekmidas/events/sns");
|
|
1473
1483
|
const { credentials } = await require_stack.awsClientConfig(ctx.credential, region);
|
|
1474
1484
|
const endpoint = require_stack.awsEndpoint(process.env, "SNS");
|
|
@@ -1550,7 +1560,7 @@ function bucketOrigins(input) {
|
|
|
1550
1560
|
const { manifest, workspace, stage } = input;
|
|
1551
1561
|
const keys = bucketKeys(manifest, input.bucket);
|
|
1552
1562
|
const readers = Object.entries(manifest).filter(([, d]) => d.kind === "rest-api" || d.kind === "websocket-api" || d.kind === "site").filter(([id]) => {
|
|
1553
|
-
const env =
|
|
1563
|
+
const env = require_stack.appEnvKeys(manifest, require_workspace.appKey(id));
|
|
1554
1564
|
return env !== void 0 && keys.some((key) => env.has(key));
|
|
1555
1565
|
});
|
|
1556
1566
|
const sites = /* @__PURE__ */ new Set();
|
|
@@ -1571,10 +1581,10 @@ function bucketOrigins(input) {
|
|
|
1571
1581
|
continue;
|
|
1572
1582
|
}
|
|
1573
1583
|
try {
|
|
1574
|
-
const host =
|
|
1584
|
+
const host = require_credentials$1.resolveHost(name, app, stage, workspace.domains, require_credentials$1.isMainFrontendApp(name, app, workspace.apps));
|
|
1575
1585
|
origins.add(`https://${host}`);
|
|
1576
1586
|
} catch (error) {
|
|
1577
|
-
if (!(error instanceof
|
|
1587
|
+
if (!(error instanceof require_credentials$1.NoDomainForStage)) throw error;
|
|
1578
1588
|
unresolved.push(name);
|
|
1579
1589
|
}
|
|
1580
1590
|
}
|
|
@@ -2036,7 +2046,7 @@ async function ensureBucketSettings(ctx, clients, input) {
|
|
|
2036
2046
|
VersioningConfiguration: { Status: "Suspended" }
|
|
2037
2047
|
})));
|
|
2038
2048
|
const lifecycle = await read(() => s3.send(new S3.GetBucketLifecycleConfigurationCommand({ Bucket })), ["NoSuchLifecycleConfiguration"]);
|
|
2039
|
-
const merge =
|
|
2049
|
+
const merge = require_stack.mergeLifecycle(lifecycle?.Rules, input.expire);
|
|
2040
2050
|
if (merge.changed) await set(merge.describe, () => merge.rules.length > 0 ? s3.send(new S3.PutBucketLifecycleConfigurationCommand({
|
|
2041
2051
|
Bucket,
|
|
2042
2052
|
LifecycleConfiguration: { Rules: merge.rules }
|
|
@@ -2256,7 +2266,7 @@ function errorName(error) {
|
|
|
2256
2266
|
/** The stage's domain, which every inbox receives on. */
|
|
2257
2267
|
function stageDomain(ctx) {
|
|
2258
2268
|
const domain = ctx.workspace.domains?.[ctx.stage];
|
|
2259
|
-
if (!domain) throw new
|
|
2269
|
+
if (!domain) throw new require_credentials$1.NoDomainForStage(ctx.stage);
|
|
2260
2270
|
return domain;
|
|
2261
2271
|
}
|
|
2262
2272
|
async function ensureSes(ctx) {
|
|
@@ -2804,7 +2814,7 @@ function constructsOf(manifest, kind) {
|
|
|
2804
2814
|
*/
|
|
2805
2815
|
async function verifyStageProviders(input) {
|
|
2806
2816
|
const verified = [];
|
|
2807
|
-
for (const kind of
|
|
2817
|
+
for (const kind of require_stack.PROVIDER_KINDS) {
|
|
2808
2818
|
if (constructsOf(input.manifest, kind).length === 0) continue;
|
|
2809
2819
|
const choice = require_workspace.stageProvider(input.workspace, kind, input.stage);
|
|
2810
2820
|
if (choice.mode !== "provider") continue;
|
|
@@ -2861,7 +2871,7 @@ async function provisionStage(options) {
|
|
|
2861
2871
|
const log = options.log ?? ((line) => console.log(line));
|
|
2862
2872
|
const reports = [];
|
|
2863
2873
|
const configured = [];
|
|
2864
|
-
for (const kind of
|
|
2874
|
+
for (const kind of require_stack.PROVIDER_KINDS) {
|
|
2865
2875
|
const choice = require_workspace.stageProvider(workspace, kind, stage);
|
|
2866
2876
|
if (choice.mode !== "provider") {
|
|
2867
2877
|
reports.push({
|
|
@@ -2900,19 +2910,19 @@ async function provisionStage(options) {
|
|
|
2900
2910
|
report
|
|
2901
2911
|
});
|
|
2902
2912
|
}
|
|
2903
|
-
const backups =
|
|
2913
|
+
const backups = require_stack.stageBackups(workspace, manifest, stage);
|
|
2904
2914
|
if (configured.length === 0 && backups.mode !== "on") {
|
|
2905
2915
|
if (backups.mode === "disabled") log(`💾 backups: off — deploy.backups.${stage} is false. Nothing is backed up, and nothing already backed up is deleted.`);
|
|
2906
2916
|
return reports;
|
|
2907
2917
|
}
|
|
2908
|
-
const identity =
|
|
2918
|
+
const identity = require_credentials.deployIdentity(workspace, stage);
|
|
2909
2919
|
let secrets = (await options.secrets.read())?.custom ?? {};
|
|
2910
2920
|
for (const entry of configured) entry.report.planned = entry.provider.runtimeKeys(manifest).filter((key) => secrets[key] === void 0);
|
|
2911
|
-
const journal = dryRun ? void 0 : await require_seeds.DeployJournal.open(options.state, stage, () =>
|
|
2921
|
+
const journal = dryRun ? void 0 : await require_seeds.DeployJournal.open(options.state, stage, () => require_stack.deploysWithCompose(workspace) ? require_stack.createComposeState(stage) : require_stack.createEmptyState(stage, "", ""));
|
|
2912
2922
|
const state = journal ? journalState(journal) : await readOnlyState(options.state, stage);
|
|
2913
2923
|
const writeSecrets = async (values) => {
|
|
2914
2924
|
if (dryRun) return;
|
|
2915
|
-
const stored = await options.secrets.read() ??
|
|
2925
|
+
const stored = await options.secrets.read() ?? require_credentials.initStageSecrets(stage);
|
|
2916
2926
|
const next = {
|
|
2917
2927
|
...stored,
|
|
2918
2928
|
custom: {
|
|
@@ -2953,7 +2963,7 @@ async function provisionStage(options) {
|
|
|
2953
2963
|
workspace,
|
|
2954
2964
|
stage,
|
|
2955
2965
|
dryRun,
|
|
2956
|
-
credentials: options.credentials ??
|
|
2966
|
+
credentials: options.credentials ?? require_credentials.storedCredentials({
|
|
2957
2967
|
env,
|
|
2958
2968
|
...options.home ? { home: options.home } : {}
|
|
2959
2969
|
}),
|
|
@@ -2973,7 +2983,7 @@ async function provisionStage(options) {
|
|
|
2973
2983
|
mode: backups.mode === "on" ? "provider" : "none",
|
|
2974
2984
|
actions: [],
|
|
2975
2985
|
dns: [],
|
|
2976
|
-
planned: backups.mode === "on"
|
|
2986
|
+
planned: backups.mode === "on" ? [require_stack.BACKUPS_URL_KEY, ...backups.backups.pitr ? [require_stack.PITR_KEY] : []].filter((key) => secrets[key] === void 0) : []
|
|
2977
2987
|
};
|
|
2978
2988
|
reports.push(report);
|
|
2979
2989
|
await ensureStageBackups({
|
|
@@ -3223,18 +3233,18 @@ async function assertStageReady(ctx) {
|
|
|
3223
3233
|
const { workspace, manifest, stage } = ctx;
|
|
3224
3234
|
const supplied = (await ctx.secrets.read())?.custom ?? {};
|
|
3225
3235
|
if (stage !== workspace.stages.local) {
|
|
3226
|
-
|
|
3236
|
+
require_stack.assertStageProvidersEnabled(workspace, manifest, stage);
|
|
3227
3237
|
const domain = workspace.domains?.[stage];
|
|
3228
|
-
const services =
|
|
3238
|
+
const services = require_stack.externalServices({
|
|
3229
3239
|
stage,
|
|
3230
|
-
declarations:
|
|
3240
|
+
declarations: require_stack.stageServiceDeclarations({ manifest }),
|
|
3231
3241
|
supplied,
|
|
3232
3242
|
allow: ctx.allowDevServices,
|
|
3233
3243
|
...domain ? { domain } : {},
|
|
3234
|
-
providers:
|
|
3244
|
+
providers: require_stack.stageProviderNotes(workspace, stage)
|
|
3235
3245
|
});
|
|
3236
|
-
if (services.missing.length > 0) throw new
|
|
3237
|
-
|
|
3246
|
+
if (services.missing.length > 0) throw new require_stack.ExternalServicesNotConfigured(stage, services.missing);
|
|
3247
|
+
require_stack.reportDevServices(ctx, require_stack.devServicesUsed(services));
|
|
3238
3248
|
const verified = await verifyStageProviders({
|
|
3239
3249
|
workspace,
|
|
3240
3250
|
manifest,
|
|
@@ -3252,7 +3262,7 @@ async function assertStageReady(ctx) {
|
|
|
3252
3262
|
});
|
|
3253
3263
|
await require_credentialSchemas.assertStageCredentials({
|
|
3254
3264
|
root: workspace.root,
|
|
3255
|
-
patterns:
|
|
3265
|
+
patterns: require_stack.constructGlobs(workspace),
|
|
3256
3266
|
manifest,
|
|
3257
3267
|
stage,
|
|
3258
3268
|
supplied
|
|
@@ -3487,7 +3497,7 @@ async function provisionResources(phaseCtx, request, ctx, store, emit) {
|
|
|
3487
3497
|
phaseCtx.secrets = {
|
|
3488
3498
|
...secrets,
|
|
3489
3499
|
async read() {
|
|
3490
|
-
const stored = await secrets.read() ??
|
|
3500
|
+
const stored = await secrets.read() ?? require_credentials.initStageSecrets(phaseCtx.stage);
|
|
3491
3501
|
const custom = { ...stored.custom };
|
|
3492
3502
|
for (const key of planned) custom[key] ??= PLANNED_BY_THE_DEPLOY;
|
|
3493
3503
|
return {
|
|
@@ -3593,11 +3603,11 @@ async function prepare(source, request, ctx, emit, redactor) {
|
|
|
3593
3603
|
if (local && !resolved.target.capabilities.localStage) require_workspace.assertDeployedStage(configured.stages, stage);
|
|
3594
3604
|
const options = await require_resolve.parseTargetOptions(resolved);
|
|
3595
3605
|
const allowDevServices = request.allowDevServices === true;
|
|
3596
|
-
if (allowDevServices && resolved.target.runtime === "aws") throw new
|
|
3606
|
+
if (allowDevServices && resolved.target.runtime === "aws") throw new require_stack.DevServicesNeedServerTarget(targetName);
|
|
3597
3607
|
const background = {};
|
|
3598
3608
|
const subscribers = {};
|
|
3599
3609
|
const manifest = await require_discover.discover({
|
|
3600
|
-
patterns:
|
|
3610
|
+
patterns: require_stack.constructGlobs(configured),
|
|
3601
3611
|
cwd: configured.root,
|
|
3602
3612
|
background,
|
|
3603
3613
|
subscribers
|
|
@@ -3609,14 +3619,14 @@ async function prepare(source, request, ctx, emit, redactor) {
|
|
|
3609
3619
|
target: targetName,
|
|
3610
3620
|
runtime: resolved.target.runtime,
|
|
3611
3621
|
selfHosted: resolved.target.capabilities.selfHostedTelemetry === true,
|
|
3612
|
-
used:
|
|
3622
|
+
used: require_credentials$1.usesTelemetry(manifest)
|
|
3613
3623
|
});
|
|
3614
3624
|
const units = require_workspace.derivedApps(manifest, configured);
|
|
3615
3625
|
const workspace = Object.keys(units).length > 0 ? {
|
|
3616
3626
|
...configured,
|
|
3617
3627
|
apps: units
|
|
3618
3628
|
} : configured;
|
|
3619
|
-
const identity =
|
|
3629
|
+
const identity = require_credentials.deployIdentity(workspace, stage);
|
|
3620
3630
|
const tag = request.tag ?? (resolved.target.tag ? await resolved.target.tag({
|
|
3621
3631
|
cwd: workspace.root,
|
|
3622
3632
|
stage
|
|
@@ -3695,7 +3705,7 @@ async function prepare(source, request, ctx, emit, redactor) {
|
|
|
3695
3705
|
childOutput: ctx.childOutput ?? "inherit",
|
|
3696
3706
|
emit,
|
|
3697
3707
|
skip,
|
|
3698
|
-
name: (resource) =>
|
|
3708
|
+
name: (resource) => require_credentials.applicationName(identity, resource)
|
|
3699
3709
|
},
|
|
3700
3710
|
store
|
|
3701
3711
|
};
|
|
@@ -3776,10 +3786,10 @@ function deploy(input) {
|
|
|
3776
3786
|
};
|
|
3777
3787
|
const ctx = {
|
|
3778
3788
|
emit,
|
|
3779
|
-
credentials: input.credentials ??
|
|
3789
|
+
credentials: input.credentials ?? require_credentials.storedCredentials({ home: input.home ?? require_credentials.gkmHome() }),
|
|
3780
3790
|
dryRun: input.dryRun ?? false,
|
|
3781
3791
|
...input.buildOnly ? { buildOnly: true } : {},
|
|
3782
|
-
home: input.home ??
|
|
3792
|
+
home: input.home ?? require_credentials.gkmHome(),
|
|
3783
3793
|
redactor,
|
|
3784
3794
|
...input.signal ? { signal: input.signal } : {},
|
|
3785
3795
|
...input.childOutput ? { childOutput: input.childOutput } : {},
|
|
@@ -3891,4 +3901,4 @@ Object.defineProperty(exports, "deploy", {
|
|
|
3891
3901
|
}
|
|
3892
3902
|
});
|
|
3893
3903
|
|
|
3894
|
-
//# sourceMappingURL=deploy-
|
|
3904
|
+
//# sourceMappingURL=deploy-DRH6q_2r.cjs.map
|