@geekmidas/cli 10.0.0-alpha.140 → 10.0.0-alpha.142
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/{EndpointGenerator-BMRL04ic.mjs → EndpointGenerator-CusLH-9S.mjs} +2 -2
- package/dist/{EndpointGenerator-BMRL04ic.mjs.map → EndpointGenerator-CusLH-9S.mjs.map} +1 -1
- package/dist/{EndpointGenerator-ePscnbwB.cjs → EndpointGenerator-DyLMYClE.cjs} +2 -2
- package/dist/{EndpointGenerator-ePscnbwB.cjs.map → EndpointGenerator-DyLMYClE.cjs.map} +1 -1
- package/dist/{GoDaddyProvider-BgY6mqoH.mjs → GoDaddyProvider-BIibcRG4.mjs} +2 -3
- package/dist/{GoDaddyProvider-BgY6mqoH.mjs.map → GoDaddyProvider-BIibcRG4.mjs.map} +1 -1
- package/dist/{GoDaddyProvider-C-rs22Zv.cjs → GoDaddyProvider-C7Zt4dVy.cjs} +5 -6
- package/dist/{GoDaddyProvider-C-rs22Zv.cjs.map → GoDaddyProvider-C7Zt4dVy.cjs.map} +1 -1
- package/dist/{HostingerProvider-DEqpvoiD.cjs → HostingerProvider-BVhFhzCW.cjs} +2 -2
- package/dist/{HostingerProvider-DEqpvoiD.cjs.map → HostingerProvider-BVhFhzCW.cjs.map} +1 -1
- package/dist/{HostingerProvider-CgMuKgO_.mjs → HostingerProvider-DSHpNBim.mjs} +2 -2
- package/dist/{HostingerProvider-CgMuKgO_.mjs.map → HostingerProvider-DSHpNBim.mjs.map} +1 -1
- package/dist/{LegacyStateStore-Dx65SWE9.mjs → LegacyStateStore-Bd2I3zz7.mjs} +3 -3
- package/dist/{LegacyStateStore-Dx65SWE9.mjs.map → LegacyStateStore-Bd2I3zz7.mjs.map} +1 -1
- package/dist/{LegacyStateStore-6xskEtld.cjs → LegacyStateStore-DzRGMFhs.cjs} +3 -3
- package/dist/{LegacyStateStore-6xskEtld.cjs.map → LegacyStateStore-DzRGMFhs.cjs.map} +1 -1
- package/dist/{LocalStateStore-DFtTtHty.cjs → LocalStateStore-Ci_tzIfp.cjs} +2 -2
- package/dist/{LocalStateStore-DFtTtHty.cjs.map → LocalStateStore-Ci_tzIfp.cjs.map} +1 -1
- package/dist/{LocalStateStore-Dto39TCx.mjs → LocalStateStore-CzNrVQd2.mjs} +2 -2
- package/dist/{LocalStateStore-Dto39TCx.mjs.map → LocalStateStore-CzNrVQd2.mjs.map} +1 -1
- package/dist/{OpenApiTsGenerator-B-PQLx8X.mjs → OpenApiTsGenerator-BTMuu1WS.mjs} +2 -2
- package/dist/{OpenApiTsGenerator-B-PQLx8X.mjs.map → OpenApiTsGenerator-BTMuu1WS.mjs.map} +1 -1
- package/dist/{OpenApiTsGenerator-BvacdbiG.cjs → OpenApiTsGenerator-CI-tceXV.cjs} +2 -2
- package/dist/{OpenApiTsGenerator-BvacdbiG.cjs.map → OpenApiTsGenerator-CI-tceXV.cjs.map} +1 -1
- package/dist/{S3StateStore-C01zMOYm.mjs → S3StateStore-DVtcCMEc.mjs} +4 -4
- package/dist/{S3StateStore-C01zMOYm.mjs.map → S3StateStore-DVtcCMEc.mjs.map} +1 -1
- package/dist/{S3StateStore-B-9ea-sX.cjs → S3StateStore-LrKb9lH7.cjs} +5 -5
- package/dist/{S3StateStore-B-9ea-sX.cjs.map → S3StateStore-LrKb9lH7.cjs.map} +1 -1
- package/dist/{SSMStateStore-k-4XM7mb.mjs → SSMStateStore-CNHYH6g7.mjs} +2 -2
- package/dist/{SSMStateStore-k-4XM7mb.mjs.map → SSMStateStore-CNHYH6g7.mjs.map} +1 -1
- package/dist/{SSMStateStore-CKArcPUh.cjs → SSMStateStore-CpkvL95K.cjs} +2 -2
- package/dist/{SSMStateStore-CKArcPUh.cjs.map → SSMStateStore-CpkvL95K.cjs.map} +1 -1
- package/dist/{SubscriberGenerator-DR4Y7ihK.cjs → SubscriberGenerator-BNJyPmXJ.cjs} +3 -3
- package/dist/{SubscriberGenerator-DR4Y7ihK.cjs.map → SubscriberGenerator-BNJyPmXJ.cjs.map} +1 -1
- package/dist/{SubscriberGenerator-DLPH-ynS.mjs → SubscriberGenerator-CzPrixYu.mjs} +3 -3
- package/dist/{SubscriberGenerator-DLPH-ynS.mjs.map → SubscriberGenerator-CzPrixYu.mjs.map} +1 -1
- package/dist/{add-BgzsYxUq.cjs → add-AlV6_ljM.cjs} +18 -17
- package/dist/{add-BgzsYxUq.cjs.map → add-AlV6_ljM.cjs.map} +1 -1
- package/dist/{add-CiIrpOb9.mjs → add-B51nMuUd.mjs} +8 -7
- package/dist/{add-CiIrpOb9.mjs.map → add-B51nMuUd.mjs.map} +1 -1
- package/dist/apps-C1KiJqth.mjs +4593 -0
- package/dist/apps-C1KiJqth.mjs.map +1 -0
- package/dist/apps-CPdR2pYw.cjs +5002 -0
- package/dist/apps-CPdR2pYw.cjs.map +1 -0
- package/dist/{bundler-DKxuDoVL.cjs → bundler-B-hw8rJi.cjs} +33 -9
- package/dist/bundler-B-hw8rJi.cjs.map +1 -0
- package/dist/{bundler-C4uMSy8e.mjs → bundler-DbIt3a6I.mjs} +34 -10
- package/dist/bundler-DbIt3a6I.mjs.map +1 -0
- package/dist/{cli-na0npMhC.cjs → cli-6eYxU_Q2.cjs} +4 -4
- package/dist/{cli-na0npMhC.cjs.map → cli-6eYxU_Q2.cjs.map} +1 -1
- package/dist/{cli-Bm2is6R_.mjs → cli-CmmrPCM_.mjs} +4 -4
- package/dist/{cli-Bm2is6R_.mjs.map → cli-CmmrPCM_.mjs.map} +1 -1
- package/dist/compose-B2dCLbrc.cjs +1895 -0
- package/dist/compose-B2dCLbrc.cjs.map +1 -0
- package/dist/{compose-CVatM7Cl.mjs → compose-DVARqEeR.mjs} +16 -1830
- package/dist/compose-DVARqEeR.mjs.map +1 -0
- package/dist/{compose-D8U9ygdm.cjs → compose-D_fNsrkx.cjs} +101 -1969
- package/dist/compose-D_fNsrkx.cjs.map +1 -0
- package/dist/compose-kOpW9Pa1.mjs +1554 -0
- package/dist/compose-kOpW9Pa1.mjs.map +1 -0
- package/dist/config-BKpzKP6W.mjs +659 -0
- package/dist/config-BKpzKP6W.mjs.map +1 -0
- package/dist/config-QAqAEgb0.cjs +772 -0
- package/dist/config-QAqAEgb0.cjs.map +1 -0
- package/dist/config.cjs +16 -419
- package/dist/config.mjs +2 -405
- package/dist/{credentialSchemas-DZ2Nh5li.cjs → credentialSchemas-BAklWDna.cjs} +4 -5
- package/dist/{credentialSchemas-DZ2Nh5li.cjs.map → credentialSchemas-BAklWDna.cjs.map} +1 -1
- package/dist/{credentialSchemas-DUCSYl9a.mjs → credentialSchemas-mz9QZTYh.mjs} +2 -3
- package/dist/{credentialSchemas-DUCSYl9a.mjs.map → credentialSchemas-mz9QZTYh.mjs.map} +1 -1
- package/dist/credentials-CIpa4Hgs.cjs +2336 -0
- package/dist/credentials-CIpa4Hgs.cjs.map +1 -0
- package/dist/credentials-CWa7hRXd.mjs +1851 -0
- package/dist/credentials-CWa7hRXd.mjs.map +1 -0
- package/dist/{databases-P824RTnx.cjs → databases-DawSdqBI.cjs} +2 -2
- package/dist/{databases-P824RTnx.cjs.map → databases-DawSdqBI.cjs.map} +1 -1
- package/dist/{databases-Db48ZIXL.mjs → databases-mzSUFBTw.mjs} +2 -2
- package/dist/{databases-Db48ZIXL.mjs.map → databases-mzSUFBTw.mjs.map} +1 -1
- package/dist/deploy/public.cjs +24 -24
- package/dist/deploy/public.cjs.map +1 -1
- package/dist/deploy/public.d.cts.map +1 -1
- package/dist/deploy/public.d.mts.map +1 -1
- package/dist/deploy/public.mjs +13 -13
- package/dist/{deploy-DrQB7ytj.cjs → deploy-CjJ447kd.cjs} +73 -72
- package/dist/{deploy-DrQB7ytj.cjs.map → deploy-CjJ447kd.cjs.map} +1 -1
- package/dist/{deploy-CDcO08Xz.mjs → deploy-DqJiCwI9.mjs} +16 -15
- package/dist/{deploy-CDcO08Xz.mjs.map → deploy-DqJiCwI9.mjs.map} +1 -1
- package/dist/{discover-yqeJ2Bx7.cjs → discover-CRywE7yc.cjs} +157 -6
- package/dist/discover-CRywE7yc.cjs.map +1 -0
- package/dist/{discover-B2m8ytyq.mjs → discover-DbDrCQ8h.mjs} +117 -8
- package/dist/discover-DbDrCQ8h.mjs.map +1 -0
- package/dist/docker-CCzFCus7.mjs +1407 -0
- package/dist/docker-CCzFCus7.mjs.map +1 -0
- package/dist/docker-DK4rmb0u.cjs +1514 -0
- package/dist/docker-DK4rmb0u.cjs.map +1 -0
- package/dist/{dokploy-k4_ZN8zN.mjs → dokploy-B5_Y5wf0.mjs} +2 -2
- package/dist/{dokploy-k4_ZN8zN.mjs.map → dokploy-B5_Y5wf0.mjs.map} +1 -1
- package/dist/{dokploy-BKjPDvSN.cjs → dokploy-EJKX2T7M.cjs} +2 -2
- package/dist/{dokploy-BKjPDvSN.cjs.map → dokploy-EJKX2T7M.cjs.map} +1 -1
- package/dist/{drivers-C47nm-wB.cjs → drivers-aM87NQJi.cjs} +4 -91
- package/dist/drivers-aM87NQJi.cjs.map +1 -0
- package/dist/{drivers-CDjpjakg.mjs → drivers-uxLBq3e3.mjs} +3 -60
- package/dist/drivers-uxLBq3e3.mjs.map +1 -0
- package/dist/{eas-Bg4dI6n2.cjs → eas-AqSay-vE.cjs} +6 -6
- package/dist/{eas-Bg4dI6n2.cjs.map → eas-AqSay-vE.cjs.map} +1 -1
- package/dist/{eas-B1wBvwPH.mjs → eas-BQlD6Z-u.mjs} +3 -3
- package/dist/{eas-B1wBvwPH.mjs.map → eas-BQlD6Z-u.mjs.map} +1 -1
- package/dist/{encryption-DL_y8t6V.cjs → encryption-B6_aL5d-.cjs} +6 -6
- package/dist/{encryption-DL_y8t6V.cjs.map → encryption-B6_aL5d-.cjs.map} +1 -1
- package/dist/{encryption-Bve0PVOo.mjs → encryption-Dlh5mcE1.mjs} +3 -3
- package/dist/{encryption-Bve0PVOo.mjs.map → encryption-Dlh5mcE1.mjs.map} +1 -1
- package/dist/{engine-BhR5lt_V.cjs → engine-BAkmPI2z.cjs} +99 -97
- package/dist/{engine-BhR5lt_V.cjs.map → engine-BAkmPI2z.cjs.map} +1 -1
- package/dist/{engine-HMLf20iZ.mjs → engine-D3P2P6RK.mjs} +12 -10
- package/dist/{engine-HMLf20iZ.mjs.map → engine-D3P2P6RK.mjs.map} +1 -1
- package/dist/{github-B2hJVl-n.cjs → github-DokGIXT-.cjs} +18 -17
- package/dist/{github-B2hJVl-n.cjs.map → github-DokGIXT-.cjs.map} +1 -1
- package/dist/{github-DKn9ACi2.mjs → github-STWxD6cu.mjs} +9 -8
- package/dist/{github-DKn9ACi2.mjs.map → github-STWxD6cu.mjs.map} +1 -1
- package/dist/{googlePlay-DtuN0-7D.cjs → googlePlay-DL0htRJD.cjs} +5 -5
- package/dist/{googlePlay-DtuN0-7D.cjs.map → googlePlay-DL0htRJD.cjs.map} +1 -1
- package/dist/{googlePlay-CWq7ND_X.mjs → googlePlay-uAyXzxlu.mjs} +5 -5
- package/dist/{googlePlay-CWq7ND_X.mjs.map → googlePlay-uAyXzxlu.mjs.map} +1 -1
- package/dist/index.cjs +196 -192
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +70 -66
- package/dist/index.mjs.map +1 -1
- package/dist/{local-OPC9BCZt.cjs → local-C6ndR_Wx.cjs} +6 -6
- package/dist/{local-OPC9BCZt.cjs.map → local-C6ndR_Wx.cjs.map} +1 -1
- package/dist/{local-B7Zv1NoA.mjs → local-CC7rdmgg.mjs} +3 -3
- package/dist/{local-B7Zv1NoA.mjs.map → local-CC7rdmgg.mjs.map} +1 -1
- package/dist/{migrate-BLVZqHtN.cjs → migrate-BbJUJ4CY.cjs} +6 -6
- package/dist/{migrate-BLVZqHtN.cjs.map → migrate-BbJUJ4CY.cjs.map} +1 -1
- package/dist/{migrate-iUui7B4q.cjs → migrate-CMurhHuj.cjs} +15 -13
- package/dist/{migrate-iUui7B4q.cjs.map → migrate-CMurhHuj.cjs.map} +1 -1
- package/dist/{migrate-W0ruUNb9.mjs → migrate-D079sADO.mjs} +3 -3
- package/dist/{migrate-W0ruUNb9.mjs.map → migrate-D079sADO.mjs.map} +1 -1
- package/dist/{migrate-DCvD4RJW.mjs → migrate-D27h4H79.mjs} +7 -5
- package/dist/{migrate-DCvD4RJW.mjs.map → migrate-D27h4H79.mjs.map} +1 -1
- package/dist/notes-B655tUny.cjs +500 -0
- package/dist/notes-B655tUny.cjs.map +1 -0
- package/dist/notes-wPJlNUj7.mjs +399 -0
- package/dist/notes-wPJlNUj7.mjs.map +1 -0
- package/dist/openapi.cjs +4 -5
- package/dist/openapi.cjs.map +1 -1
- package/dist/openapi.mjs +3 -4
- package/dist/openapi.mjs.map +1 -1
- package/dist/{projectBucket-BBbQ1lHF.cjs → projectBucket-Bs8ftcgB.cjs} +2 -2
- package/dist/{projectBucket-BBbQ1lHF.cjs.map → projectBucket-Bs8ftcgB.cjs.map} +1 -1
- package/dist/{projectBucket-C_DN4WzF.mjs → projectBucket-XVxyvW1y.mjs} +2 -2
- package/dist/{projectBucket-C_DN4WzF.mjs.map → projectBucket-XVxyvW1y.mjs.map} +1 -1
- package/dist/{publish-CxIBBD3b.mjs → publish-B9BNIaf2.mjs} +2 -2
- package/dist/{publish-CxIBBD3b.mjs.map → publish-B9BNIaf2.mjs.map} +1 -1
- package/dist/{publish-CqvDA5ry.cjs → publish-Bwgb-1JN.cjs} +2 -2
- package/dist/{publish-CqvDA5ry.cjs.map → publish-Bwgb-1JN.cjs.map} +1 -1
- package/dist/{ready-DuU0FXSj.cjs → ready-BNh3zsSn.cjs} +6 -6
- package/dist/{ready-DuU0FXSj.cjs.map → ready-BNh3zsSn.cjs.map} +1 -1
- package/dist/{ready-CGqJ74Kt.mjs → ready-g25dcGzK.mjs} +6 -6
- package/dist/{ready-CGqJ74Kt.mjs.map → ready-g25dcGzK.mjs.map} +1 -1
- package/dist/reconcile/public.cjs +1 -1
- package/dist/reconcile/public.mjs +1 -1
- package/dist/{resolve-CMC0MI0Z.mjs → resolve-DheFxtmy.mjs} +4 -4
- package/dist/{resolve-CMC0MI0Z.mjs.map → resolve-DheFxtmy.mjs.map} +1 -1
- package/dist/{resolve-BEVVvi13.cjs → resolve-Dir9EjMu.cjs} +4 -4
- package/dist/{resolve-BEVVvi13.cjs.map → resolve-Dir9EjMu.cjs.map} +1 -1
- package/dist/{rollback-CZiQkukY.mjs → rollback-BWAB77F9.mjs} +8 -8
- package/dist/{rollback-CZiQkukY.mjs.map → rollback-BWAB77F9.mjs.map} +1 -1
- package/dist/{rollback-e0zGkaBx.cjs → rollback-CrtuUKqe.cjs} +11 -11
- package/dist/{rollback-e0zGkaBx.cjs.map → rollback-CrtuUKqe.cjs.map} +1 -1
- package/dist/{s3-BKnL6YGQ.cjs → s3-DKJfDHUQ.cjs} +2 -2
- package/dist/{s3-BKnL6YGQ.cjs.map → s3-DKJfDHUQ.cjs.map} +1 -1
- package/dist/{s3-DW7SLsb8.mjs → s3-DNp8U0Ea.mjs} +2 -2
- package/dist/{s3-DW7SLsb8.mjs.map → s3-DNp8U0Ea.mjs.map} +1 -1
- package/dist/sandbox/credentials-worker.cjs +3 -4
- package/dist/sandbox/credentials-worker.cjs.map +1 -1
- package/dist/sandbox/credentials-worker.mjs +2 -3
- package/dist/sandbox/credentials-worker.mjs.map +1 -1
- package/dist/sandbox/discover-worker.cjs +1 -1
- package/dist/sandbox/discover-worker.mjs +1 -1
- package/dist/sandbox/migrate-worker.cjs +3 -4
- package/dist/sandbox/migrate-worker.cjs.map +1 -1
- package/dist/sandbox/migrate-worker.mjs +2 -3
- package/dist/sandbox/migrate-worker.mjs.map +1 -1
- package/dist/seeds-B3xvUAQf.cjs +363 -0
- package/dist/seeds-B3xvUAQf.cjs.map +1 -0
- package/dist/seeds-BCC8vAXR.mjs +298 -0
- package/dist/seeds-BCC8vAXR.mjs.map +1 -0
- package/dist/{serverSetup-D2Xzsp2t.cjs → serverSetup-BVL9HhNE.cjs} +9 -8
- package/dist/{serverSetup-D2Xzsp2t.cjs.map → serverSetup-BVL9HhNE.cjs.map} +1 -1
- package/dist/{serverSetup-C3Tt9X1R.mjs → serverSetup-D---hcyW.mjs} +7 -6
- package/dist/{serverSetup-C3Tt9X1R.mjs.map → serverSetup-D---hcyW.mjs.map} +1 -1
- package/dist/{sniffer-BWgXPFAt.cjs → sniffer-BjHnOaCe.cjs} +9 -10
- package/dist/{sniffer-BWgXPFAt.cjs.map → sniffer-BjHnOaCe.cjs.map} +1 -1
- package/dist/{sniffer-eEF_fIId.mjs → sniffer-DOyzfgPF.mjs} +8 -9
- package/dist/{sniffer-eEF_fIId.mjs.map → sniffer-DOyzfgPF.mjs.map} +1 -1
- package/dist/{snsSubscriptions-BSoqUgsq.mjs → snsSubscriptions-Cf5DZfO5.mjs} +4 -453
- package/dist/snsSubscriptions-Cf5DZfO5.mjs.map +1 -0
- package/dist/{snsSubscriptions-Y9declDd.cjs → snsSubscriptions-DB0iRByH.cjs} +12 -559
- package/dist/snsSubscriptions-DB0iRByH.cjs.map +1 -0
- package/dist/{sst-Bz2HJlqc.mjs → sst-3V-rcKcw.mjs} +27 -5
- package/dist/sst-3V-rcKcw.mjs.map +1 -0
- package/dist/{sst-lvCHdYsY.cjs → sst-DuU7Ju0c.cjs} +29 -7
- package/dist/sst-DuU7Ju0c.cjs.map +1 -0
- package/dist/stack-BRKZ69bf.mjs +2307 -0
- package/dist/stack-BRKZ69bf.mjs.map +1 -0
- package/dist/stack-CmHjkg7D.cjs +2536 -0
- package/dist/stack-CmHjkg7D.cjs.map +1 -0
- package/dist/{stage-DhcbcAar.mjs → stage-CTq3Gjsx.mjs} +7 -7
- package/dist/{stage-DhcbcAar.mjs.map → stage-CTq3Gjsx.mjs.map} +1 -1
- package/dist/{stage-BEcxppsu.cjs → stage-s_8HOsH0.cjs} +13 -13
- package/dist/{stage-BEcxppsu.cjs.map → stage-s_8HOsH0.cjs.map} +1 -1
- package/dist/{stages--icWbhPy.cjs → stages-CFI0OiLj.cjs} +2 -2
- package/dist/{stages--icWbhPy.cjs.map → stages-CFI0OiLj.cjs.map} +1 -1
- package/dist/{stages-CUwSy39f.mjs → stages-DoYa81kN.mjs} +2 -2
- package/dist/{stages-CUwSy39f.mjs.map → stages-DoYa81kN.mjs.map} +1 -1
- package/dist/target/public.cjs +1 -1
- package/dist/target/public.mjs +1 -1
- package/dist/{terminal-DURcYlVX.cjs → terminal-ChxtuTYJ.cjs} +3 -3
- package/dist/{terminal-DURcYlVX.cjs.map → terminal-ChxtuTYJ.cjs.map} +1 -1
- package/dist/{terminal-yOZ7kKF9.mjs → terminal-oHKnZHkT.mjs} +3 -3
- package/dist/{terminal-yOZ7kKF9.mjs.map → terminal-oHKnZHkT.mjs.map} +1 -1
- package/dist/types-Bl_CwZC9.cjs +90 -0
- package/dist/types-Bl_CwZC9.cjs.map +1 -0
- package/dist/types-Y1NfWlyG.mjs +61 -0
- package/dist/types-Y1NfWlyG.mjs.map +1 -0
- package/dist/vitest.cjs +1 -1
- package/dist/vitest.mjs +1 -1
- package/package.json +15 -15
- package/dist/bundler-C4uMSy8e.mjs.map +0 -1
- package/dist/bundler-DKxuDoVL.cjs.map +0 -1
- package/dist/compose-CVatM7Cl.mjs.map +0 -1
- package/dist/compose-D8U9ygdm.cjs.map +0 -1
- package/dist/config.cjs.map +0 -1
- package/dist/config.mjs.map +0 -1
- package/dist/credentials-D7XJypNd.cjs +0 -520
- package/dist/credentials-D7XJypNd.cjs.map +0 -1
- package/dist/credentials-DpfnUvIR.mjs +0 -395
- package/dist/credentials-DpfnUvIR.mjs.map +0 -1
- package/dist/derive-Cd7Hl3r2.mjs +0 -259
- package/dist/derive-Cd7Hl3r2.mjs.map +0 -1
- package/dist/derive-CgZfoBU2.cjs +0 -282
- package/dist/derive-CgZfoBU2.cjs.map +0 -1
- package/dist/discover-B2m8ytyq.mjs.map +0 -1
- package/dist/discover-yqeJ2Bx7.cjs.map +0 -1
- package/dist/drivers-C47nm-wB.cjs.map +0 -1
- package/dist/drivers-CDjpjakg.mjs.map +0 -1
- package/dist/identity-CBXr4wNi.mjs +0 -129
- package/dist/identity-CBXr4wNi.mjs.map +0 -1
- package/dist/identity-CbLfgQNT.cjs +0 -182
- package/dist/identity-CbLfgQNT.cjs.map +0 -1
- package/dist/sandbox-CHv3OYXg.cjs +0 -165
- package/dist/sandbox-CHv3OYXg.cjs.map +0 -1
- package/dist/sandbox-CbVB7uOD.mjs +0 -118
- package/dist/sandbox-CbVB7uOD.mjs.map +0 -1
- package/dist/seeds-BR_7hJTw.cjs +0 -10541
- package/dist/seeds-BR_7hJTw.cjs.map +0 -1
- package/dist/seeds-nCxxlP5h.mjs +0 -9418
- package/dist/seeds-nCxxlP5h.mjs.map +0 -1
- package/dist/snsSubscriptions-BSoqUgsq.mjs.map +0 -1
- package/dist/snsSubscriptions-Y9declDd.cjs.map +0 -1
- package/dist/sst-Bz2HJlqc.mjs.map +0 -1
- package/dist/sst-lvCHdYsY.cjs.map +0 -1
|
@@ -1,457 +1,8 @@
|
|
|
1
1
|
import { t as GkmError } from "./errors-D8Gwp5kU.mjs";
|
|
2
|
-
import { r as storedCredentials } from "./credentials-
|
|
3
|
-
import { _t as SERVER_IPV6_KEY, gt as SERVER_IPV4_KEY,
|
|
4
|
-
import { Dn as quoteIdentifier, _ as DnsRecordsUnreadable, f as extractSubdomain, jn as postgresRoleSlug, m as normalizeDnsConfig, p as findRootDomain, pr as postgresImage, qn as localRolePassword, v as createDnsProvider } from "./seeds-nCxxlP5h.mjs";
|
|
5
|
-
import { t as appKey } from "./derive-Cd7Hl3r2.mjs";
|
|
6
|
-
import { createRequire } from "node:module";
|
|
7
|
-
import { dirname, join } from "node:path";
|
|
8
|
-
import { existsSync, readFileSync } from "node:fs";
|
|
2
|
+
import { a as findRootDomain, i as extractSubdomain, l as DnsRecordsUnreadable, o as normalizeDnsConfig, r as storedCredentials, u as createDnsProvider } from "./credentials-CWa7hRXd.mjs";
|
|
3
|
+
import { _t as SERVER_IPV6_KEY, gt as SERVER_IPV4_KEY, vt as cnameTarget } from "./workspace-BbfBFtjn.mjs";
|
|
9
4
|
import { isIPv4, isIPv6 } from "node:net";
|
|
10
|
-
import { createHash } from "node:crypto";
|
|
11
|
-
import { DEFAULT_POSTGRES_VERSION, kebabCase } from "@geekmidas/manifest";
|
|
12
|
-
import { fileURLToPath } from "node:url";
|
|
13
5
|
import { lookup } from "node:dns/promises";
|
|
14
|
-
import bcrypt from "bcryptjs";
|
|
15
|
-
//#region src/providers/dns.ts
|
|
16
|
-
/** Whether the workspace deploys through the compose target. */
|
|
17
|
-
function deploysWithCompose(workspace) {
|
|
18
|
-
return workspace.deploy?.default === "compose" || Object.values(workspace.apps).some((app) => app.resolvedDeployTarget === "compose");
|
|
19
|
-
}
|
|
20
|
-
//#endregion
|
|
21
|
-
//#region src/backups/config.ts
|
|
22
|
-
/**
|
|
23
|
-
* Which stages take backups, and where they are kept.
|
|
24
|
-
*
|
|
25
|
-
* A deployed compose stage whose stack runs Postgres is backed up by
|
|
26
|
-
* default — every day at 02:00 UTC, kept 30 days — unless
|
|
27
|
-
* `deploy.backups.<stage>` says otherwise. The local stage never is.
|
|
28
|
-
*
|
|
29
|
-
* Every backup is kept in the project bucket (`providers/projectBucket.ts`),
|
|
30
|
-
* beside the stage's deploy state, one folder per run and one file per
|
|
31
|
-
* database:
|
|
32
|
-
*
|
|
33
|
-
* ```
|
|
34
|
-
* gkm/<project>/<stage>/backups/2026-10-10/02-00-00Z/database.sql.gz
|
|
35
|
-
* gkm/<project>/<stage>/backups/2026-10-10/02-00-00Z/auth-database.sql.gz
|
|
36
|
-
* ```
|
|
37
|
-
*
|
|
38
|
-
* The file is named after the database's construct, the way its migrations
|
|
39
|
-
* folder is: `AuthDatabase` is `db/auth-database`, and `auth-database.sql.gz`.
|
|
40
|
-
*/
|
|
41
|
-
/** Whether the stack runs Postgres: some construct is a database. */
|
|
42
|
-
function runsPostgres(manifest) {
|
|
43
|
-
return Object.values(manifest).some((d) => d.kind === "database");
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* What `stage`'s backups are: on — by its entry or the default — off by
|
|
47
|
-
* `false`, or none, for the local stage, a stage compose does not deploy,
|
|
48
|
-
* and a stack with no database.
|
|
49
|
-
*/
|
|
50
|
-
function stageBackups(workspace, manifest, stage) {
|
|
51
|
-
if (stage === workspace.stages?.local) return {
|
|
52
|
-
mode: "none",
|
|
53
|
-
reason: "local"
|
|
54
|
-
};
|
|
55
|
-
if (!deploysWithCompose(workspace)) return {
|
|
56
|
-
mode: "none",
|
|
57
|
-
reason: "not-compose"
|
|
58
|
-
};
|
|
59
|
-
if (!runsPostgres(manifest)) return {
|
|
60
|
-
mode: "none",
|
|
61
|
-
reason: "no-postgres"
|
|
62
|
-
};
|
|
63
|
-
const value = (workspace.deploy?.backups)?.[stage];
|
|
64
|
-
const checked = checkStageBackups(stage, value ?? {});
|
|
65
|
-
if (checked === false) return { mode: "disabled" };
|
|
66
|
-
return {
|
|
67
|
-
mode: "on",
|
|
68
|
-
backups: checked,
|
|
69
|
-
source: value === void 0 ? "default" : "config"
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Where a stage's backups are, in the project bucket — under the same
|
|
74
|
-
* `<prefix>/<project>/<stage>` its deploy state is: `gkm/shop/production/backups`.
|
|
75
|
-
*/
|
|
76
|
-
function backupsPrefix(workspace, stage) {
|
|
77
|
-
const state = workspace.state;
|
|
78
|
-
const prefix = state?.provider === "s3" && state.prefix !== void 0 ? state.prefix.replace(/\/+$/, "") : "gkm";
|
|
79
|
-
return `${prefix ? `${prefix}/` : ""}${workspace.name}/${stage}/backups`;
|
|
80
|
-
}
|
|
81
|
-
/** A run folder's time back, or `undefined` for a key that is not one. */
|
|
82
|
-
function runTime(folder) {
|
|
83
|
-
const match = /^(\d{4}-\d{2}-\d{2})\/(\d{2})-(\d{2})-(\d{2})Z$/.exec(folder);
|
|
84
|
-
if (!match) return void 0;
|
|
85
|
-
const at = /* @__PURE__ */ new Date(`${match[1]}T${match[2]}:${match[3]}:${match[4]}Z`);
|
|
86
|
-
return Number.isNaN(at.getTime()) ? void 0 : at;
|
|
87
|
-
}
|
|
88
|
-
/** A database's file in a run's folder: `auth-database.sql.gz`. */
|
|
89
|
-
function backupFile(database) {
|
|
90
|
-
return `${database.file}.sql.gz`;
|
|
91
|
-
}
|
|
92
|
-
/** Each database the stack runs, by its construct and its name in Postgres. */
|
|
93
|
-
function backupDatabases(resources) {
|
|
94
|
-
return resources.filter((r) => r.kind === "database").map((r) => ({
|
|
95
|
-
id: r.id,
|
|
96
|
-
file: kebabCase(r.id),
|
|
97
|
-
name: r.name
|
|
98
|
-
})).sort((a, b) => a.file.localeCompare(b.file));
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* The expiry of every stage's backups, by each stage's own entry — what the
|
|
102
|
-
* project bucket's lifecycle carries beside its own rule.
|
|
103
|
-
*
|
|
104
|
-
* A put replaces a bucket's whole lifecycle, so this is built from every
|
|
105
|
-
* deployed stage each time, never from the stage being deployed alone: one
|
|
106
|
-
* stage's deploy keeps every other's rule. A stage set to `false` has none,
|
|
107
|
-
* and its backups are kept until someone deletes them.
|
|
108
|
-
*/
|
|
109
|
-
function backupExpiries(workspace, manifest) {
|
|
110
|
-
const expiries = [];
|
|
111
|
-
for (const stage of [...workspace.stages?.deployed ?? []].sort()) {
|
|
112
|
-
const choice = stageBackups(workspace, manifest, stage);
|
|
113
|
-
if (choice.mode !== "on") continue;
|
|
114
|
-
expiries.push({
|
|
115
|
-
id: `gkm-backups-${stage}`,
|
|
116
|
-
prefix: `${backupsPrefix(workspace, stage)}/`,
|
|
117
|
-
days: choice.backups.keepDays,
|
|
118
|
-
abortIncompleteDays: 1
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
return expiries;
|
|
122
|
-
}
|
|
123
|
-
//#endregion
|
|
124
|
-
//#region src/backups/service.ts
|
|
125
|
-
/**
|
|
126
|
-
* The stack's `backups` service: what a deployed compose stage with Postgres
|
|
127
|
-
* runs beside its apps, unless `deploy.backups.<stage>` is `false`.
|
|
128
|
-
*
|
|
129
|
-
* - **The image** is built from the stack's own Postgres image —
|
|
130
|
-
* `postgres:<major>-alpine`, already on the server for the stack, and with
|
|
131
|
-
* the `pg_dump` that matches the server — with Node added and gkm's runner
|
|
132
|
-
* (`runner.ts`) copied in. Nothing is pulled that the stack does not have,
|
|
133
|
-
* and nothing is mounted from the host: the build context is two files.
|
|
134
|
-
* - **Its key** is `BACKUPS_URL`, from the stage's secrets, like any app's:
|
|
135
|
-
* allowed to put objects under the stage's backups prefix and nothing else.
|
|
136
|
-
* The server holds no AWS credentials of its own.
|
|
137
|
-
* - **Its login** is a role of its own, `<project>_backups`, granted
|
|
138
|
-
* `pg_read_all_data` — it can read every database and write none. Postgres
|
|
139
|
-
* before 14 has no such role, and there it signs in as the stack's
|
|
140
|
-
* superuser.
|
|
141
|
-
* - **Its health** is the last good run: unhealthy once that is more than
|
|
142
|
-
* twice the schedule's longest gap old, after a startup grace.
|
|
143
|
-
*/
|
|
144
|
-
/** The service's name in the stack. */
|
|
145
|
-
const BACKUPS_SERVICE = "backups";
|
|
146
|
-
/** The secret its key is written to. */
|
|
147
|
-
const BACKUPS_URL_KEY = "BACKUPS_URL";
|
|
148
|
-
/** Where the runner is, in the image. */
|
|
149
|
-
const RUNNER_PATH = "/gkm/backup.mjs";
|
|
150
|
-
/** The first Postgres with `pg_read_all_data`. */
|
|
151
|
-
const READ_ALL_DATA_SINCE = 14;
|
|
152
|
-
/** A stage that backs up, and no key to back up with. */
|
|
153
|
-
var BackupsUrlMissing = class extends GkmError {
|
|
154
|
-
stage;
|
|
155
|
-
constructor(stage) {
|
|
156
|
-
super(`'${stage}' runs Postgres, so its stack backs it up, and its secrets hold no ${BACKUPS_URL_KEY} to back up with. The deploy writes it — the IAM user and key it creates in the stage's AWS account — so run the deploy with the account's credentials. To take no backups on this stage, set deploy.backups.${stage}: false.`);
|
|
157
|
-
this.stage = stage;
|
|
158
|
-
this.name = "BackupsUrlMissing";
|
|
159
|
-
}
|
|
160
|
-
};
|
|
161
|
-
/** The backups role: `<project>_backups`, as the superuser is `<project>_admin`. */
|
|
162
|
-
function backupsRole(project) {
|
|
163
|
-
return `${postgresRoleSlug(project)}_backups`;
|
|
164
|
-
}
|
|
165
|
-
/**
|
|
166
|
-
* The runner's source, as JavaScript: the built `backups/runner.mjs` beside
|
|
167
|
-
* the CLI's bundle, or — run from source — `runner.ts`, with its types
|
|
168
|
-
* stripped by esbuild.
|
|
169
|
-
*/
|
|
170
|
-
function runnerSource() {
|
|
171
|
-
const here = dirname(fileURLToPath(import.meta.url));
|
|
172
|
-
for (const path of [
|
|
173
|
-
join(here, "backups", "runner.mjs"),
|
|
174
|
-
join(here, "runner.mjs"),
|
|
175
|
-
join(here, "..", "backups", "runner.mjs")
|
|
176
|
-
]) if (existsSync(path)) return readFileSync(path, "utf-8");
|
|
177
|
-
const { transformSync } = createRequire(import.meta.url)("esbuild");
|
|
178
|
-
return transformSync(readFileSync(join(here, "runner.ts"), "utf-8"), {
|
|
179
|
-
loader: "ts",
|
|
180
|
-
format: "esm",
|
|
181
|
-
target: "node22"
|
|
182
|
-
}).code;
|
|
183
|
-
}
|
|
184
|
-
/** The image's Dockerfile: the stack's Postgres, Node, and the runner. */
|
|
185
|
-
function backupsDockerfile(from) {
|
|
186
|
-
return `# Generated by gkm — the stage's backups: pg_dump from ${from}, and gkm's uploader.
|
|
187
|
-
FROM ${from}
|
|
188
|
-
RUN apk add --no-cache nodejs
|
|
189
|
-
COPY backup.mjs ${RUNNER_PATH}
|
|
190
|
-
USER postgres
|
|
191
|
-
ENTRYPOINT []
|
|
192
|
-
CMD ["node", "${RUNNER_PATH}", "serve"]
|
|
193
|
-
`;
|
|
194
|
-
}
|
|
195
|
-
/**
|
|
196
|
-
* The stack's backups service, for a stage whose backups are on.
|
|
197
|
-
*
|
|
198
|
-
* @throws {BackupsUrlMissing} when the stage's secrets hold no key
|
|
199
|
-
*/
|
|
200
|
-
function stackBackups(input) {
|
|
201
|
-
const { plan, stage } = input;
|
|
202
|
-
const version = plan.resources.find((r) => r.version)?.version ?? DEFAULT_POSTGRES_VERSION;
|
|
203
|
-
const from = postgresImage(version);
|
|
204
|
-
const script = runnerSource();
|
|
205
|
-
const dockerfile = backupsDockerfile(from);
|
|
206
|
-
const hash = createHash("sha256").update(dockerfile).update(script).digest("hex").slice(0, 12);
|
|
207
|
-
const readOnly = version >= READ_ALL_DATA_SINCE;
|
|
208
|
-
const role = backupsRole(input.workspace.name);
|
|
209
|
-
const login = readOnly ? {
|
|
210
|
-
user: role,
|
|
211
|
-
password: localRolePassword(input.workspace.name, plan, role, input.seed)
|
|
212
|
-
} : input.superuser;
|
|
213
|
-
const databases = backupDatabases(plan.resources);
|
|
214
|
-
const prefix = backupsPrefix(input.workspace, stage);
|
|
215
|
-
const { kind, ...schedule } = input.backups.schedule;
|
|
216
|
-
let env = {};
|
|
217
|
-
if (!input.buildOnly) {
|
|
218
|
-
const url = input.custom[BACKUPS_URL_KEY];
|
|
219
|
-
if (!url) throw new BackupsUrlMissing(stage);
|
|
220
|
-
env = {
|
|
221
|
-
BACKUPS_URL: url,
|
|
222
|
-
BACKUPS_PREFIX: prefix,
|
|
223
|
-
BACKUPS_DATABASES: JSON.stringify(databases.map(({ file, name }) => ({
|
|
224
|
-
file,
|
|
225
|
-
name
|
|
226
|
-
}))),
|
|
227
|
-
BACKUPS_SCHEDULE: JSON.stringify(kind === "cron" ? {
|
|
228
|
-
kind,
|
|
229
|
-
minutes: input.backups.schedule.minutes,
|
|
230
|
-
hours: input.backups.schedule.hours,
|
|
231
|
-
days: input.backups.schedule.days,
|
|
232
|
-
months: input.backups.schedule.months,
|
|
233
|
-
weekdays: input.backups.schedule.weekdays
|
|
234
|
-
} : {
|
|
235
|
-
kind,
|
|
236
|
-
...schedule
|
|
237
|
-
}),
|
|
238
|
-
BACKUPS_MAX_GAP_SECONDS: String(input.backups.maxGapSeconds),
|
|
239
|
-
PGHOST: "postgres",
|
|
240
|
-
PGPORT: "5432",
|
|
241
|
-
PGUSER: login.user,
|
|
242
|
-
PGPASSWORD: login.password,
|
|
243
|
-
...input.telemetry?.OTEL_EXPORTER_OTLP_ENDPOINT ? {
|
|
244
|
-
OTEL_EXPORTER_OTLP_ENDPOINT: input.telemetry.OTEL_EXPORTER_OTLP_ENDPOINT,
|
|
245
|
-
...input.telemetry.OTEL_EXPORTER_OTLP_HEADERS ? { OTEL_EXPORTER_OTLP_HEADERS: input.telemetry.OTEL_EXPORTER_OTLP_HEADERS } : {},
|
|
246
|
-
OTEL_SERVICE_NAME: BACKUPS_SERVICE
|
|
247
|
-
} : {}
|
|
248
|
-
};
|
|
249
|
-
}
|
|
250
|
-
return {
|
|
251
|
-
backups: input.backups,
|
|
252
|
-
databases,
|
|
253
|
-
prefix,
|
|
254
|
-
from,
|
|
255
|
-
image: `${input.project}-backups:pg${version}-${hash}`,
|
|
256
|
-
files: {
|
|
257
|
-
Dockerfile: dockerfile,
|
|
258
|
-
"backup.mjs": script
|
|
259
|
-
},
|
|
260
|
-
login,
|
|
261
|
-
readOnly,
|
|
262
|
-
env
|
|
263
|
-
};
|
|
264
|
-
}
|
|
265
|
-
/** The service in the stack's compose file. */
|
|
266
|
-
function backupsService(backups, envFiles) {
|
|
267
|
-
return {
|
|
268
|
-
image: backups.image,
|
|
269
|
-
build: {
|
|
270
|
-
context: `./${BACKUPS_SERVICE}`,
|
|
271
|
-
dockerfile: "Dockerfile"
|
|
272
|
-
},
|
|
273
|
-
pull_policy: "build",
|
|
274
|
-
restart: "unless-stopped",
|
|
275
|
-
...envFiles ? { env_file: [{
|
|
276
|
-
path: `./${BACKUPS_SERVICE}.env`,
|
|
277
|
-
format: "raw"
|
|
278
|
-
}] } : {},
|
|
279
|
-
depends_on: { postgres: { condition: "service_healthy" } },
|
|
280
|
-
healthcheck: {
|
|
281
|
-
test: [
|
|
282
|
-
"CMD",
|
|
283
|
-
"node",
|
|
284
|
-
RUNNER_PATH,
|
|
285
|
-
"health"
|
|
286
|
-
],
|
|
287
|
-
interval: "1m",
|
|
288
|
-
timeout: "10s",
|
|
289
|
-
retries: 3,
|
|
290
|
-
start_period: "30s"
|
|
291
|
-
}
|
|
292
|
-
};
|
|
293
|
-
}
|
|
294
|
-
/**
|
|
295
|
-
* The backups role, created and kept: able to sign in and read every
|
|
296
|
-
* database, and nothing else. None when it signs in as the superuser.
|
|
297
|
-
*/
|
|
298
|
-
function backupsRoleStatements(backups) {
|
|
299
|
-
if (!backups.readOnly) return [];
|
|
300
|
-
const role = quoteIdentifier(backups.login.user);
|
|
301
|
-
const password = `'${backups.login.password.replace(/'/g, "''")}'`;
|
|
302
|
-
return [
|
|
303
|
-
{
|
|
304
|
-
id: BACKUPS_SERVICE,
|
|
305
|
-
describe: `role ${backups.login.user}`,
|
|
306
|
-
exists: {
|
|
307
|
-
sql: "SELECT 1 FROM pg_roles WHERE rolname = $1",
|
|
308
|
-
values: [backups.login.user]
|
|
309
|
-
},
|
|
310
|
-
create: `CREATE ROLE ${role} LOGIN PASSWORD ${password}`
|
|
311
|
-
},
|
|
312
|
-
{
|
|
313
|
-
id: BACKUPS_SERVICE,
|
|
314
|
-
describe: `role ${backups.login.user}: its password`,
|
|
315
|
-
create: `ALTER ROLE ${role} WITH LOGIN PASSWORD ${password}`
|
|
316
|
-
},
|
|
317
|
-
{
|
|
318
|
-
id: BACKUPS_SERVICE,
|
|
319
|
-
describe: `role ${backups.login.user}: read every database`,
|
|
320
|
-
create: `GRANT pg_read_all_data TO ${role}`
|
|
321
|
-
}
|
|
322
|
-
];
|
|
323
|
-
}
|
|
324
|
-
//#endregion
|
|
325
|
-
//#region src/compose/sitePassword.ts
|
|
326
|
-
/**
|
|
327
|
-
* A site served behind a password on some deployed stages — a `StaticSite`'s
|
|
328
|
-
* `password`, naming a `RandomPassword` — so a staging build is not public
|
|
329
|
-
* while it is being tried.
|
|
330
|
-
*
|
|
331
|
-
* The edge asks for it with HTTP basic auth, before a request reaches the
|
|
332
|
-
* site: the browser prompts, and nothing of the site loads until the stage's
|
|
333
|
-
* login is given. The user is the stage's name; the password is the
|
|
334
|
-
* `RandomPassword`'s value on the stage, generated and kept like any other.
|
|
335
|
-
* Only its bcrypt hash reaches the edge's config.
|
|
336
|
-
*
|
|
337
|
-
* Pure.
|
|
338
|
-
*/
|
|
339
|
-
/** A site's `password` names a `RandomPassword` the manifest does not hold. */
|
|
340
|
-
var SitePasswordNotDeclared = class extends GkmError {
|
|
341
|
-
site;
|
|
342
|
-
secret;
|
|
343
|
-
constructor(site, secret) {
|
|
344
|
-
super(`'${site}' is served behind the password '${secret}', and no RandomPassword '${secret}' was found. Export it from a constructs file, as any construct is: export const ${secret[0].toLowerCase()}${secret.slice(1)} = new RandomPassword('${secret}');`);
|
|
345
|
-
this.site = site;
|
|
346
|
-
this.secret = secret;
|
|
347
|
-
this.name = "SitePasswordNotDeclared";
|
|
348
|
-
}
|
|
349
|
-
};
|
|
350
|
-
/** A site's `password` names a stage the workspace does not deploy. */
|
|
351
|
-
var UnknownPasswordStage = class extends GkmError {
|
|
352
|
-
site;
|
|
353
|
-
stage;
|
|
354
|
-
deployed;
|
|
355
|
-
constructor(site, stage, deployed) {
|
|
356
|
-
super(`'${site}' is served behind a password on '${stage}', which is not one of the workspace's deployed stages (${deployed.map((s) => `'${s}'`).join(", ")}). Name one of them in its password's stages.`);
|
|
357
|
-
this.site = site;
|
|
358
|
-
this.stage = stage;
|
|
359
|
-
this.deployed = deployed;
|
|
360
|
-
this.name = "UnknownPasswordStage";
|
|
361
|
-
}
|
|
362
|
-
};
|
|
363
|
-
/** A site behind a password, with none in the stage's secrets. */
|
|
364
|
-
var SitePasswordMissing = class extends GkmError {
|
|
365
|
-
stage;
|
|
366
|
-
key;
|
|
367
|
-
constructor(stage, key) {
|
|
368
|
-
super(`A site of '${stage}' is served behind a password, and the stage has no ${key} in its secrets. Run gkm compose --stage ${stage} once to generate it, or set one: gkm secrets:set ${key} '…' --stage ${stage}`);
|
|
369
|
-
this.stage = stage;
|
|
370
|
-
this.key = key;
|
|
371
|
-
this.name = "SitePasswordMissing";
|
|
372
|
-
}
|
|
373
|
-
};
|
|
374
|
-
/**
|
|
375
|
-
* A site behind a password on a stage it deploys through a target that cannot
|
|
376
|
-
* ask for a login. Refused rather than ignored: ignored, the site would be
|
|
377
|
-
* public while its construct says it is not.
|
|
378
|
-
*/
|
|
379
|
-
var SitePasswordNeedsCompose = class extends GkmError {
|
|
380
|
-
site;
|
|
381
|
-
stage;
|
|
382
|
-
target;
|
|
383
|
-
constructor(site, stage, target) {
|
|
384
|
-
super(`'${site}' is served behind a password on '${stage}', and it deploys through '${target}', which cannot ask for one yet — only compose does. Remove ${stage} from its password's stages, or deploy it with compose.`);
|
|
385
|
-
this.site = site;
|
|
386
|
-
this.stage = stage;
|
|
387
|
-
this.target = target;
|
|
388
|
-
this.name = "SitePasswordNeedsCompose";
|
|
389
|
-
}
|
|
390
|
-
};
|
|
391
|
-
/**
|
|
392
|
-
* The `RandomPassword` a site is served behind on `stage`, by its key —
|
|
393
|
-
* `SITE_PASSWORD` — or `undefined` where the stage asks for none.
|
|
394
|
-
*
|
|
395
|
-
* @throws {SitePasswordNotDeclared} where the password is not in the manifest
|
|
396
|
-
*/
|
|
397
|
-
function sitePasswordKey(manifest, site, stage) {
|
|
398
|
-
const password = site.password;
|
|
399
|
-
if (!password?.stages.includes(stage)) return void 0;
|
|
400
|
-
const secret = manifest[password.secret];
|
|
401
|
-
const key = secret?.kind === "secret" ? secret.provides?.[0] : void 0;
|
|
402
|
-
if (!key) throw new SitePasswordNotDeclared(site.id, password.secret);
|
|
403
|
-
return key;
|
|
404
|
-
}
|
|
405
|
-
/**
|
|
406
|
-
* Before anything is deployed: every site behind a password names a deployed
|
|
407
|
-
* stage and a declared `RandomPassword`, and one of `apps` behind it on
|
|
408
|
-
* `stage` deploys through compose.
|
|
409
|
-
*
|
|
410
|
-
* @throws {UnknownPasswordStage}, {SitePasswordNotDeclared},
|
|
411
|
-
* {SitePasswordNeedsCompose}
|
|
412
|
-
*/
|
|
413
|
-
function assertSitePasswords(workspace, manifest, stage, apps, target) {
|
|
414
|
-
for (const site of Object.values(manifest)) {
|
|
415
|
-
if (site.kind !== "site" || !site.password) continue;
|
|
416
|
-
for (const named of site.password.stages) if (!workspace.stages.deployed.includes(named)) throw new UnknownPasswordStage(site.id, named, workspace.stages.deployed);
|
|
417
|
-
if (sitePasswordKey(manifest, site, stage) && target !== "compose" && apps.includes(appKey(site.id))) throw new SitePasswordNeedsCompose(site.id, stage, target);
|
|
418
|
-
}
|
|
419
|
-
}
|
|
420
|
-
/**
|
|
421
|
-
* The login a site is served behind on `stage`, from the password kept under
|
|
422
|
-
* `key`.
|
|
423
|
-
*
|
|
424
|
-
* The hash's salt is derived from the password, so the same password always
|
|
425
|
-
* renders the same edge config: a deploy that changed nothing rewrites
|
|
426
|
-
* nothing, and the proxy is not reloaded for it. A per-hash random salt
|
|
427
|
-
* guards against a precomputed table of common passwords; a generated one is
|
|
428
|
-
* 43 random characters, which no table holds.
|
|
429
|
-
*
|
|
430
|
-
* @throws {SitePasswordMissing} where the stage's secrets hold none
|
|
431
|
-
*/
|
|
432
|
-
function siteAuth(stage, key, custom) {
|
|
433
|
-
const password = custom[key];
|
|
434
|
-
if (!password) throw new SitePasswordMissing(stage, key);
|
|
435
|
-
return {
|
|
436
|
-
user: stage,
|
|
437
|
-
password,
|
|
438
|
-
hash: bcrypt.hashSync(password, saltFor(password)),
|
|
439
|
-
key
|
|
440
|
-
};
|
|
441
|
-
}
|
|
442
|
-
/** bcrypt's own base-64 alphabet, in which a salt is written. */
|
|
443
|
-
const BCRYPT_ALPHABET = "./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
|
444
|
-
/**
|
|
445
|
-
* A bcrypt salt — `$2a$`, which Caddy and Traefik both read, at cost 10 —
|
|
446
|
-
* derived from the password.
|
|
447
|
-
*/
|
|
448
|
-
function saltFor(password) {
|
|
449
|
-
const digest = createHash("sha256").update(password).digest();
|
|
450
|
-
let salt = "";
|
|
451
|
-
for (let i = 0; i < 22; i++) salt += BCRYPT_ALPHABET[digest[i] % 64];
|
|
452
|
-
return `$2a$10$${salt}`;
|
|
453
|
-
}
|
|
454
|
-
//#endregion
|
|
455
6
|
//#region src/providers/aws.ts
|
|
456
7
|
/**
|
|
457
8
|
* The AWS account a provider provisions in — the stage's, found the way the
|
|
@@ -1492,6 +1043,6 @@ async function confirmPendingSubscriptions(input) {
|
|
|
1492
1043
|
return left;
|
|
1493
1044
|
}
|
|
1494
1045
|
//#endregion
|
|
1495
|
-
export {
|
|
1046
|
+
export { stageDnsDomains as _, subscriptionKey as a, awsEndpoint as b, HostNotPointingAtServer as c, recordTtl as d, requiredServerAddress as f, stageDns as g, stackHosts as h, recordedPushSubscriptions as i, dnsCredentials as l, settleStackDns as m, SUBSCRIPTION_TYPE as n, subscriptionResource as o, serverAddressHint as p, confirmPendingSubscriptions as r, topicConnection as s, PushSubscriptionsUnconfirmed as t, isLocalHost as u, systemLookup as v, awsProvisioningCredentials as x, awsClientConfig as y };
|
|
1496
1047
|
|
|
1497
|
-
//# sourceMappingURL=snsSubscriptions-
|
|
1048
|
+
//# sourceMappingURL=snsSubscriptions-Cf5DZfO5.mjs.map
|