@geekmidas/cli 10.0.0-alpha.141 → 10.0.0-alpha.143
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-DxFAueU4.mjs → GoDaddyProvider-BJddaEFo.mjs} +2 -3
- package/dist/{GoDaddyProvider-DxFAueU4.mjs.map → GoDaddyProvider-BJddaEFo.mjs.map} +1 -1
- package/dist/{GoDaddyProvider-hAc0q5s-.cjs → GoDaddyProvider-D-QrclQ0.cjs} +5 -6
- package/dist/{GoDaddyProvider-hAc0q5s-.cjs.map → GoDaddyProvider-D-QrclQ0.cjs.map} +1 -1
- package/dist/{HostingerProvider-DEqpvoiD.cjs → HostingerProvider-CUtGkwa8.cjs} +2 -2
- package/dist/{HostingerProvider-DEqpvoiD.cjs.map → HostingerProvider-CUtGkwa8.cjs.map} +1 -1
- package/dist/{HostingerProvider-CgMuKgO_.mjs → HostingerProvider-DilTLFtw.mjs} +2 -2
- package/dist/{HostingerProvider-CgMuKgO_.mjs.map → HostingerProvider-DilTLFtw.mjs.map} +1 -1
- package/dist/{LegacyStateStore-BPY8Acgs.mjs → LegacyStateStore-lZn6yeNb.mjs} +3 -3
- package/dist/{LegacyStateStore-BPY8Acgs.mjs.map → LegacyStateStore-lZn6yeNb.mjs.map} +1 -1
- package/dist/{LegacyStateStore-BqSVgWi1.cjs → LegacyStateStore-ohe95jlu.cjs} +3 -3
- package/dist/{LegacyStateStore-BqSVgWi1.cjs.map → LegacyStateStore-ohe95jlu.cjs.map} +1 -1
- package/dist/{LocalStateStore-Df4RyGi2.cjs → LocalStateStore-Bs2Yl8IB.cjs} +2 -2
- package/dist/{LocalStateStore-Df4RyGi2.cjs.map → LocalStateStore-Bs2Yl8IB.cjs.map} +1 -1
- package/dist/{LocalStateStore-5pVR26KA.mjs → LocalStateStore-CkpQ3sNu.mjs} +2 -2
- package/dist/{LocalStateStore-5pVR26KA.mjs.map → LocalStateStore-CkpQ3sNu.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-Do1DwEMX.mjs → S3StateStore-BO-TXIC9.mjs} +4 -4
- package/dist/{S3StateStore-Do1DwEMX.mjs.map → S3StateStore-BO-TXIC9.mjs.map} +1 -1
- package/dist/{S3StateStore-uykstvZI.cjs → S3StateStore-CsxqGwKX.cjs} +5 -5
- package/dist/{S3StateStore-uykstvZI.cjs.map → S3StateStore-CsxqGwKX.cjs.map} +1 -1
- package/dist/{SSMStateStore-DQXFWqkE.cjs → SSMStateStore-D85DzsxJ.cjs} +2 -2
- package/dist/{SSMStateStore-DQXFWqkE.cjs.map → SSMStateStore-D85DzsxJ.cjs.map} +1 -1
- package/dist/{SSMStateStore-xQ-Ce91W.mjs → SSMStateStore-DDNpIVIc.mjs} +2 -2
- package/dist/{SSMStateStore-xQ-Ce91W.mjs.map → SSMStateStore-DDNpIVIc.mjs.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-DLkN488n.mjs → add-CRAhswLe.mjs} +8 -7
- package/dist/{add-DLkN488n.mjs.map → add-CRAhswLe.mjs.map} +1 -1
- package/dist/{add-Y_nPkjIf.cjs → add-DiFv_IWD.cjs} +18 -17
- package/dist/{add-Y_nPkjIf.cjs.map → add-DiFv_IWD.cjs.map} +1 -1
- package/dist/apps-CA-048eZ.cjs +5008 -0
- package/dist/apps-CA-048eZ.cjs.map +1 -0
- package/dist/apps-CZ0ydmPQ.mjs +4593 -0
- package/dist/apps-CZ0ydmPQ.mjs.map +1 -0
- package/dist/{bundler-DFyrGST-.mjs → bundler-BIsNVJnB.mjs} +6 -6
- package/dist/{bundler-DFyrGST-.mjs.map → bundler-BIsNVJnB.mjs.map} +1 -1
- package/dist/{bundler-COOvv27I.cjs → bundler-D6Y2bucc.cjs} +9 -9
- package/dist/{bundler-COOvv27I.cjs.map → bundler-D6Y2bucc.cjs.map} +1 -1
- package/dist/{cli-DKsV-Myw.cjs → cli-6xibALWU.cjs} +4 -4
- package/dist/{cli-DKsV-Myw.cjs.map → cli-6xibALWU.cjs.map} +1 -1
- package/dist/{cli-iAX4BQ3t.mjs → cli-QwhW-X12.mjs} +4 -4
- package/dist/{cli-iAX4BQ3t.mjs.map → cli-QwhW-X12.mjs.map} +1 -1
- package/dist/compose-BHsW5nDE.mjs +1554 -0
- package/dist/compose-BHsW5nDE.mjs.map +1 -0
- package/dist/compose-C4kCN2tl.cjs +1895 -0
- package/dist/compose-C4kCN2tl.cjs.map +1 -0
- package/dist/{compose-ofZIpp2q.mjs → compose-E4-ZiWev.mjs} +17 -1828
- package/dist/compose-E4-ZiWev.mjs.map +1 -0
- package/dist/{compose-CGXx22Wy.cjs → compose-S_MY__b2.cjs} +102 -1967
- package/dist/compose-S_MY__b2.cjs.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-BnpIwWCS.cjs +2336 -0
- package/dist/credentials-BnpIwWCS.cjs.map +1 -0
- package/dist/credentials-zlJPxBWn.mjs +1851 -0
- package/dist/credentials-zlJPxBWn.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-BibGpDAz.cjs → deploy-0XI_bemB.cjs} +73 -72
- package/dist/{deploy-BibGpDAz.cjs.map → deploy-0XI_bemB.cjs.map} +1 -1
- package/dist/{deploy-C4QQkHK7.mjs → deploy-DJcEAscO.mjs} +16 -15
- package/dist/{deploy-C4QQkHK7.mjs.map → deploy-DJcEAscO.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-8gbw63RW.cjs +1514 -0
- package/dist/docker-8gbw63RW.cjs.map +1 -0
- package/dist/docker-C5w9_bWP.mjs +1407 -0
- package/dist/docker-C5w9_bWP.mjs.map +1 -0
- package/dist/{dokploy-pSrsileA.mjs → dokploy-BAjJ7MPB.mjs} +2 -2
- package/dist/{dokploy-pSrsileA.mjs.map → dokploy-BAjJ7MPB.mjs.map} +1 -1
- package/dist/{dokploy-B_VX3nLM.cjs → dokploy-DOYsnbiK.cjs} +2 -2
- package/dist/{dokploy-B_VX3nLM.cjs.map → dokploy-DOYsnbiK.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-cSSc8Lex.cjs → eas-Aaj9nbNp.cjs} +6 -6
- package/dist/{eas-cSSc8Lex.cjs.map → eas-Aaj9nbNp.cjs.map} +1 -1
- package/dist/{eas-Bou-_M76.mjs → eas-BpyYdquY.mjs} +3 -3
- package/dist/{eas-Bou-_M76.mjs.map → eas-BpyYdquY.mjs.map} +1 -1
- package/dist/{encryption-Bps9As2D.mjs → encryption-DYFTQaZ3.mjs} +3 -3
- package/dist/{encryption-Bps9As2D.mjs.map → encryption-DYFTQaZ3.mjs.map} +1 -1
- package/dist/{encryption-CElaAwJs.cjs → encryption-K2-9Ei8q.cjs} +6 -6
- package/dist/{encryption-CElaAwJs.cjs.map → encryption-K2-9Ei8q.cjs.map} +1 -1
- package/dist/{engine-CiG7Wfyc.cjs → engine-097i9gWA.cjs} +99 -97
- package/dist/{engine-CiG7Wfyc.cjs.map → engine-097i9gWA.cjs.map} +1 -1
- package/dist/{engine-CXE4UOHj.mjs → engine-CuFkswUS.mjs} +12 -10
- package/dist/{engine-CXE4UOHj.mjs.map → engine-CuFkswUS.mjs.map} +1 -1
- package/dist/{github-CvFJlFWA.mjs → github-DGaK_ulS.mjs} +9 -8
- package/dist/{github-CvFJlFWA.mjs.map → github-DGaK_ulS.mjs.map} +1 -1
- package/dist/{github-BzppIvpw.cjs → github-ZoKihAlP.cjs} +18 -17
- package/dist/{github-BzppIvpw.cjs.map → github-ZoKihAlP.cjs.map} +1 -1
- package/dist/{googlePlay-BJnMCWoa.cjs → googlePlay-BQ-62vre.cjs} +5 -5
- package/dist/{googlePlay-BJnMCWoa.cjs.map → googlePlay-BQ-62vre.cjs.map} +1 -1
- package/dist/{googlePlay-RSe9wOfZ.mjs → googlePlay-hw7Ej5yT.mjs} +5 -5
- package/dist/{googlePlay-RSe9wOfZ.mjs.map → googlePlay-hw7Ej5yT.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-B7Zv1NoA.mjs → local-CiJfYdrA.mjs} +3 -3
- package/dist/{local-B7Zv1NoA.mjs.map → local-CiJfYdrA.mjs.map} +1 -1
- package/dist/{local-OPC9BCZt.cjs → local-iC7qJkPl.cjs} +6 -6
- package/dist/{local-OPC9BCZt.cjs.map → local-iC7qJkPl.cjs.map} +1 -1
- package/dist/{migrate-B0nQra2W.mjs → migrate-CbjB-uxl.mjs} +3 -3
- package/dist/{migrate-B0nQra2W.mjs.map → migrate-CbjB-uxl.mjs.map} +1 -1
- package/dist/{migrate-BPCJBL7_.mjs → migrate-DTTn8YcN.mjs} +7 -5
- package/dist/{migrate-BPCJBL7_.mjs.map → migrate-DTTn8YcN.mjs.map} +1 -1
- package/dist/{migrate-BCBs0BMn.cjs → migrate-p1R0CSRw.cjs} +6 -6
- package/dist/{migrate-BCBs0BMn.cjs.map → migrate-p1R0CSRw.cjs.map} +1 -1
- package/dist/{migrate-Dmh5Dbcr.cjs → migrate-wH1DmtjX.cjs} +15 -13
- package/dist/{migrate-Dmh5Dbcr.cjs.map → migrate-wH1DmtjX.cjs.map} +1 -1
- package/dist/notes-CedXKWnt.mjs +399 -0
- package/dist/notes-CedXKWnt.mjs.map +1 -0
- package/dist/notes-ChbE7v2l.cjs +500 -0
- package/dist/notes-ChbE7v2l.cjs.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-C_DN4WzF.mjs → projectBucket-2Bw-Qy8D.mjs} +2 -2
- package/dist/{projectBucket-C_DN4WzF.mjs.map → projectBucket-2Bw-Qy8D.mjs.map} +1 -1
- package/dist/{projectBucket-BBbQ1lHF.cjs → projectBucket-CUJYUmt2.cjs} +2 -2
- package/dist/{projectBucket-BBbQ1lHF.cjs.map → projectBucket-CUJYUmt2.cjs.map} +1 -1
- package/dist/{publish-DKy3hn8a.cjs → publish-Byi0cB2N.cjs} +2 -2
- package/dist/{publish-DKy3hn8a.cjs.map → publish-Byi0cB2N.cjs.map} +1 -1
- package/dist/{publish-cthyGGQt.mjs → publish-DDsmxwl-.mjs} +2 -2
- package/dist/{publish-cthyGGQt.mjs.map → publish-DDsmxwl-.mjs.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-AYtMIgoq.cjs → resolve-CT6P86p3.cjs} +4 -4
- package/dist/{resolve-AYtMIgoq.cjs.map → resolve-CT6P86p3.cjs.map} +1 -1
- package/dist/{resolve-BaRqJlqV.mjs → resolve-zHOTcPk4.mjs} +4 -4
- package/dist/{resolve-BaRqJlqV.mjs.map → resolve-zHOTcPk4.mjs.map} +1 -1
- package/dist/{rollback-DqV6t9oo.mjs → rollback-CFowte36.mjs} +8 -8
- package/dist/{rollback-DqV6t9oo.mjs.map → rollback-CFowte36.mjs.map} +1 -1
- package/dist/{rollback-CQ184yFu.cjs → rollback-CYnroE_3.cjs} +11 -11
- package/dist/{rollback-CQ184yFu.cjs.map → rollback-CYnroE_3.cjs.map} +1 -1
- package/dist/{s3-BKnL6YGQ.cjs → s3-82kaV_R0.cjs} +2 -2
- package/dist/{s3-BKnL6YGQ.cjs.map → s3-82kaV_R0.cjs.map} +1 -1
- package/dist/{s3-DW7SLsb8.mjs → s3-D8u9j2C5.mjs} +2 -2
- package/dist/{s3-DW7SLsb8.mjs.map → s3-D8u9j2C5.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-AfG0-at8.mjs → serverSetup-B621zgYj.mjs} +7 -6
- package/dist/{serverSetup-AfG0-at8.mjs.map → serverSetup-B621zgYj.mjs.map} +1 -1
- package/dist/{serverSetup-Dnw9Kdel.cjs → serverSetup-Cip3ZWdi.cjs} +9 -8
- package/dist/{serverSetup-Dnw9Kdel.cjs.map → serverSetup-Cip3ZWdi.cjs.map} +1 -1
- package/dist/{sniffer-BHhJ8DiC.mjs → sniffer-BO7tNCDc.mjs} +8 -9
- package/dist/{sniffer-BHhJ8DiC.mjs.map → sniffer-BO7tNCDc.mjs.map} +1 -1
- package/dist/{sniffer-taO-AXSk.cjs → sniffer-Dxwe2yS0.cjs} +9 -10
- package/dist/{sniffer-taO-AXSk.cjs.map → sniffer-Dxwe2yS0.cjs.map} +1 -1
- package/dist/{snsSubscriptions-D_IBKhni.mjs → snsSubscriptions-CZlHrll5.mjs} +4 -453
- package/dist/snsSubscriptions-CZlHrll5.mjs.map +1 -0
- package/dist/{snsSubscriptions-CC-WM1zC.cjs → snsSubscriptions-CgWY_alK.cjs} +12 -559
- package/dist/snsSubscriptions-CgWY_alK.cjs.map +1 -0
- package/dist/{sst-Bz2HJlqc.mjs → sst-CnSAHj6j.mjs} +27 -5
- package/dist/sst-CnSAHj6j.mjs.map +1 -0
- package/dist/{sst-lvCHdYsY.cjs → sst-CtOI68mi.cjs} +29 -7
- package/dist/sst-CtOI68mi.cjs.map +1 -0
- package/dist/stack-BCHFuiWH.cjs +2577 -0
- package/dist/stack-BCHFuiWH.cjs.map +1 -0
- package/dist/stack-BrcNDH_E.mjs +2348 -0
- package/dist/stack-BrcNDH_E.mjs.map +1 -0
- package/dist/{stage-dd9dtLfh.mjs → stage-BhjwFQrw.mjs} +7 -7
- package/dist/{stage-dd9dtLfh.mjs.map → stage-BhjwFQrw.mjs.map} +1 -1
- package/dist/{stage-CTibxcpA.cjs → stage-DzH_iWgO.cjs} +13 -13
- package/dist/{stage-CTibxcpA.cjs.map → stage-DzH_iWgO.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-455ZtUjl.cjs} +3 -3
- package/dist/{terminal-DURcYlVX.cjs.map → terminal-455ZtUjl.cjs.map} +1 -1
- package/dist/{terminal-yOZ7kKF9.mjs → terminal-iEkwo0Bq.mjs} +3 -3
- package/dist/{terminal-yOZ7kKF9.mjs.map → terminal-iEkwo0Bq.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/compose-CGXx22Wy.cjs.map +0 -1
- package/dist/compose-ofZIpp2q.mjs.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-DndMeyzm.cjs +0 -10669
- package/dist/seeds-DndMeyzm.cjs.map +0 -1
- package/dist/seeds-o6x6BTRo.mjs +0 -9534
- package/dist/seeds-o6x6BTRo.mjs.map +0 -1
- package/dist/snsSubscriptions-CC-WM1zC.cjs.map +0 -1
- package/dist/snsSubscriptions-D_IBKhni.mjs.map +0 -1
- package/dist/sst-Bz2HJlqc.mjs.map +0 -1
- package/dist/sst-lvCHdYsY.cjs.map +0 -1
|
@@ -1,459 +1,8 @@
|
|
|
1
|
-
const require_rolldown_runtime = require("./rolldown-runtime-C0BPl7ul.cjs");
|
|
2
1
|
const require_errors = require("./errors-DMC4Umsb.cjs");
|
|
3
|
-
const require_credentials = require("./credentials-
|
|
2
|
+
const require_credentials = require("./credentials-BnpIwWCS.cjs");
|
|
4
3
|
const require_workspace = require("./workspace-Dkm3HL9e.cjs");
|
|
5
|
-
const require_seeds = require("./seeds-DndMeyzm.cjs");
|
|
6
|
-
const require_derive = require("./derive-CgZfoBU2.cjs");
|
|
7
|
-
let node_path = require("node:path");
|
|
8
|
-
let node_fs = require("node:fs");
|
|
9
4
|
let node_net = require("node:net");
|
|
10
|
-
let node_crypto = require("node:crypto");
|
|
11
|
-
let _geekmidas_manifest = require("@geekmidas/manifest");
|
|
12
|
-
let node_module = require("node:module");
|
|
13
|
-
let node_url = require("node:url");
|
|
14
5
|
let node_dns_promises = require("node:dns/promises");
|
|
15
|
-
let bcryptjs = require("bcryptjs");
|
|
16
|
-
bcryptjs = require_rolldown_runtime.__toESM(bcryptjs, 1);
|
|
17
|
-
//#region src/providers/dns.ts
|
|
18
|
-
/** Whether the workspace deploys through the compose target. */
|
|
19
|
-
function deploysWithCompose(workspace) {
|
|
20
|
-
return workspace.deploy?.default === "compose" || Object.values(workspace.apps).some((app) => app.resolvedDeployTarget === "compose");
|
|
21
|
-
}
|
|
22
|
-
//#endregion
|
|
23
|
-
//#region src/backups/config.ts
|
|
24
|
-
/**
|
|
25
|
-
* Which stages take backups, and where they are kept.
|
|
26
|
-
*
|
|
27
|
-
* A deployed compose stage whose stack runs Postgres is backed up by
|
|
28
|
-
* default — every day at 02:00 UTC, kept 30 days — unless
|
|
29
|
-
* `deploy.backups.<stage>` says otherwise. The local stage never is.
|
|
30
|
-
*
|
|
31
|
-
* Every backup is kept in the project bucket (`providers/projectBucket.ts`),
|
|
32
|
-
* beside the stage's deploy state, one folder per run and one file per
|
|
33
|
-
* database:
|
|
34
|
-
*
|
|
35
|
-
* ```
|
|
36
|
-
* gkm/<project>/<stage>/backups/2026-10-10/02-00-00Z/database.sql.gz
|
|
37
|
-
* gkm/<project>/<stage>/backups/2026-10-10/02-00-00Z/auth-database.sql.gz
|
|
38
|
-
* ```
|
|
39
|
-
*
|
|
40
|
-
* The file is named after the database's construct, the way its migrations
|
|
41
|
-
* folder is: `AuthDatabase` is `db/auth-database`, and `auth-database.sql.gz`.
|
|
42
|
-
*/
|
|
43
|
-
/** Whether the stack runs Postgres: some construct is a database. */
|
|
44
|
-
function runsPostgres(manifest) {
|
|
45
|
-
return Object.values(manifest).some((d) => d.kind === "database");
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* What `stage`'s backups are: on — by its entry or the default — off by
|
|
49
|
-
* `false`, or none, for the local stage, a stage compose does not deploy,
|
|
50
|
-
* and a stack with no database.
|
|
51
|
-
*/
|
|
52
|
-
function stageBackups(workspace, manifest, stage) {
|
|
53
|
-
if (stage === workspace.stages?.local) return {
|
|
54
|
-
mode: "none",
|
|
55
|
-
reason: "local"
|
|
56
|
-
};
|
|
57
|
-
if (!deploysWithCompose(workspace)) return {
|
|
58
|
-
mode: "none",
|
|
59
|
-
reason: "not-compose"
|
|
60
|
-
};
|
|
61
|
-
if (!runsPostgres(manifest)) return {
|
|
62
|
-
mode: "none",
|
|
63
|
-
reason: "no-postgres"
|
|
64
|
-
};
|
|
65
|
-
const value = (workspace.deploy?.backups)?.[stage];
|
|
66
|
-
const checked = require_workspace.checkStageBackups(stage, value ?? {});
|
|
67
|
-
if (checked === false) return { mode: "disabled" };
|
|
68
|
-
return {
|
|
69
|
-
mode: "on",
|
|
70
|
-
backups: checked,
|
|
71
|
-
source: value === void 0 ? "default" : "config"
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Where a stage's backups are, in the project bucket — under the same
|
|
76
|
-
* `<prefix>/<project>/<stage>` its deploy state is: `gkm/shop/production/backups`.
|
|
77
|
-
*/
|
|
78
|
-
function backupsPrefix(workspace, stage) {
|
|
79
|
-
const state = workspace.state;
|
|
80
|
-
const prefix = state?.provider === "s3" && state.prefix !== void 0 ? state.prefix.replace(/\/+$/, "") : "gkm";
|
|
81
|
-
return `${prefix ? `${prefix}/` : ""}${workspace.name}/${stage}/backups`;
|
|
82
|
-
}
|
|
83
|
-
/** A run folder's time back, or `undefined` for a key that is not one. */
|
|
84
|
-
function runTime(folder) {
|
|
85
|
-
const match = /^(\d{4}-\d{2}-\d{2})\/(\d{2})-(\d{2})-(\d{2})Z$/.exec(folder);
|
|
86
|
-
if (!match) return void 0;
|
|
87
|
-
const at = /* @__PURE__ */ new Date(`${match[1]}T${match[2]}:${match[3]}:${match[4]}Z`);
|
|
88
|
-
return Number.isNaN(at.getTime()) ? void 0 : at;
|
|
89
|
-
}
|
|
90
|
-
/** A database's file in a run's folder: `auth-database.sql.gz`. */
|
|
91
|
-
function backupFile(database) {
|
|
92
|
-
return `${database.file}.sql.gz`;
|
|
93
|
-
}
|
|
94
|
-
/** Each database the stack runs, by its construct and its name in Postgres. */
|
|
95
|
-
function backupDatabases(resources) {
|
|
96
|
-
return resources.filter((r) => r.kind === "database").map((r) => ({
|
|
97
|
-
id: r.id,
|
|
98
|
-
file: (0, _geekmidas_manifest.kebabCase)(r.id),
|
|
99
|
-
name: r.name
|
|
100
|
-
})).sort((a, b) => a.file.localeCompare(b.file));
|
|
101
|
-
}
|
|
102
|
-
/**
|
|
103
|
-
* The expiry of every stage's backups, by each stage's own entry — what the
|
|
104
|
-
* project bucket's lifecycle carries beside its own rule.
|
|
105
|
-
*
|
|
106
|
-
* A put replaces a bucket's whole lifecycle, so this is built from every
|
|
107
|
-
* deployed stage each time, never from the stage being deployed alone: one
|
|
108
|
-
* stage's deploy keeps every other's rule. A stage set to `false` has none,
|
|
109
|
-
* and its backups are kept until someone deletes them.
|
|
110
|
-
*/
|
|
111
|
-
function backupExpiries(workspace, manifest) {
|
|
112
|
-
const expiries = [];
|
|
113
|
-
for (const stage of [...workspace.stages?.deployed ?? []].sort()) {
|
|
114
|
-
const choice = stageBackups(workspace, manifest, stage);
|
|
115
|
-
if (choice.mode !== "on") continue;
|
|
116
|
-
expiries.push({
|
|
117
|
-
id: `gkm-backups-${stage}`,
|
|
118
|
-
prefix: `${backupsPrefix(workspace, stage)}/`,
|
|
119
|
-
days: choice.backups.keepDays,
|
|
120
|
-
abortIncompleteDays: 1
|
|
121
|
-
});
|
|
122
|
-
}
|
|
123
|
-
return expiries;
|
|
124
|
-
}
|
|
125
|
-
//#endregion
|
|
126
|
-
//#region src/backups/service.ts
|
|
127
|
-
/**
|
|
128
|
-
* The stack's `backups` service: what a deployed compose stage with Postgres
|
|
129
|
-
* runs beside its apps, unless `deploy.backups.<stage>` is `false`.
|
|
130
|
-
*
|
|
131
|
-
* - **The image** is built from the stack's own Postgres image —
|
|
132
|
-
* `postgres:<major>-alpine`, already on the server for the stack, and with
|
|
133
|
-
* the `pg_dump` that matches the server — with Node added and gkm's runner
|
|
134
|
-
* (`runner.ts`) copied in. Nothing is pulled that the stack does not have,
|
|
135
|
-
* and nothing is mounted from the host: the build context is two files.
|
|
136
|
-
* - **Its key** is `BACKUPS_URL`, from the stage's secrets, like any app's:
|
|
137
|
-
* allowed to put objects under the stage's backups prefix and nothing else.
|
|
138
|
-
* The server holds no AWS credentials of its own.
|
|
139
|
-
* - **Its login** is a role of its own, `<project>_backups`, granted
|
|
140
|
-
* `pg_read_all_data` — it can read every database and write none. Postgres
|
|
141
|
-
* before 14 has no such role, and there it signs in as the stack's
|
|
142
|
-
* superuser.
|
|
143
|
-
* - **Its health** is the last good run: unhealthy once that is more than
|
|
144
|
-
* twice the schedule's longest gap old, after a startup grace.
|
|
145
|
-
*/
|
|
146
|
-
/** The service's name in the stack. */
|
|
147
|
-
const BACKUPS_SERVICE = "backups";
|
|
148
|
-
/** The secret its key is written to. */
|
|
149
|
-
const BACKUPS_URL_KEY = "BACKUPS_URL";
|
|
150
|
-
/** Where the runner is, in the image. */
|
|
151
|
-
const RUNNER_PATH = "/gkm/backup.mjs";
|
|
152
|
-
/** The first Postgres with `pg_read_all_data`. */
|
|
153
|
-
const READ_ALL_DATA_SINCE = 14;
|
|
154
|
-
/** A stage that backs up, and no key to back up with. */
|
|
155
|
-
var BackupsUrlMissing = class extends require_errors.GkmError {
|
|
156
|
-
stage;
|
|
157
|
-
constructor(stage) {
|
|
158
|
-
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.`);
|
|
159
|
-
this.stage = stage;
|
|
160
|
-
this.name = "BackupsUrlMissing";
|
|
161
|
-
}
|
|
162
|
-
};
|
|
163
|
-
/** The backups role: `<project>_backups`, as the superuser is `<project>_admin`. */
|
|
164
|
-
function backupsRole(project) {
|
|
165
|
-
return `${require_seeds.postgresRoleSlug(project)}_backups`;
|
|
166
|
-
}
|
|
167
|
-
/**
|
|
168
|
-
* The runner's source, as JavaScript: the built `backups/runner.mjs` beside
|
|
169
|
-
* the CLI's bundle, or — run from source — `runner.ts`, with its types
|
|
170
|
-
* stripped by esbuild.
|
|
171
|
-
*/
|
|
172
|
-
function runnerSource() {
|
|
173
|
-
const here = (0, node_path.dirname)((0, node_url.fileURLToPath)(require("url").pathToFileURL(__filename).href));
|
|
174
|
-
for (const path of [
|
|
175
|
-
(0, node_path.join)(here, "backups", "runner.mjs"),
|
|
176
|
-
(0, node_path.join)(here, "runner.mjs"),
|
|
177
|
-
(0, node_path.join)(here, "..", "backups", "runner.mjs")
|
|
178
|
-
]) if ((0, node_fs.existsSync)(path)) return (0, node_fs.readFileSync)(path, "utf-8");
|
|
179
|
-
const { transformSync } = (0, node_module.createRequire)(require("url").pathToFileURL(__filename).href)("esbuild");
|
|
180
|
-
return transformSync((0, node_fs.readFileSync)((0, node_path.join)(here, "runner.ts"), "utf-8"), {
|
|
181
|
-
loader: "ts",
|
|
182
|
-
format: "esm",
|
|
183
|
-
target: "node22"
|
|
184
|
-
}).code;
|
|
185
|
-
}
|
|
186
|
-
/** The image's Dockerfile: the stack's Postgres, Node, and the runner. */
|
|
187
|
-
function backupsDockerfile(from) {
|
|
188
|
-
return `# Generated by gkm — the stage's backups: pg_dump from ${from}, and gkm's uploader.
|
|
189
|
-
FROM ${from}
|
|
190
|
-
RUN apk add --no-cache nodejs
|
|
191
|
-
COPY backup.mjs ${RUNNER_PATH}
|
|
192
|
-
USER postgres
|
|
193
|
-
ENTRYPOINT []
|
|
194
|
-
CMD ["node", "${RUNNER_PATH}", "serve"]
|
|
195
|
-
`;
|
|
196
|
-
}
|
|
197
|
-
/**
|
|
198
|
-
* The stack's backups service, for a stage whose backups are on.
|
|
199
|
-
*
|
|
200
|
-
* @throws {BackupsUrlMissing} when the stage's secrets hold no key
|
|
201
|
-
*/
|
|
202
|
-
function stackBackups(input) {
|
|
203
|
-
const { plan, stage } = input;
|
|
204
|
-
const version = plan.resources.find((r) => r.version)?.version ?? _geekmidas_manifest.DEFAULT_POSTGRES_VERSION;
|
|
205
|
-
const from = require_seeds.postgresImage(version);
|
|
206
|
-
const script = runnerSource();
|
|
207
|
-
const dockerfile = backupsDockerfile(from);
|
|
208
|
-
const hash = (0, node_crypto.createHash)("sha256").update(dockerfile).update(script).digest("hex").slice(0, 12);
|
|
209
|
-
const readOnly = version >= READ_ALL_DATA_SINCE;
|
|
210
|
-
const role = backupsRole(input.workspace.name);
|
|
211
|
-
const login = readOnly ? {
|
|
212
|
-
user: role,
|
|
213
|
-
password: require_seeds.localRolePassword(input.workspace.name, plan, role, input.seed)
|
|
214
|
-
} : input.superuser;
|
|
215
|
-
const databases = backupDatabases(plan.resources);
|
|
216
|
-
const prefix = backupsPrefix(input.workspace, stage);
|
|
217
|
-
const { kind, ...schedule } = input.backups.schedule;
|
|
218
|
-
let env = {};
|
|
219
|
-
if (!input.buildOnly) {
|
|
220
|
-
const url = input.custom[BACKUPS_URL_KEY];
|
|
221
|
-
if (!url) throw new BackupsUrlMissing(stage);
|
|
222
|
-
env = {
|
|
223
|
-
BACKUPS_URL: url,
|
|
224
|
-
BACKUPS_PREFIX: prefix,
|
|
225
|
-
BACKUPS_DATABASES: JSON.stringify(databases.map(({ file, name }) => ({
|
|
226
|
-
file,
|
|
227
|
-
name
|
|
228
|
-
}))),
|
|
229
|
-
BACKUPS_SCHEDULE: JSON.stringify(kind === "cron" ? {
|
|
230
|
-
kind,
|
|
231
|
-
minutes: input.backups.schedule.minutes,
|
|
232
|
-
hours: input.backups.schedule.hours,
|
|
233
|
-
days: input.backups.schedule.days,
|
|
234
|
-
months: input.backups.schedule.months,
|
|
235
|
-
weekdays: input.backups.schedule.weekdays
|
|
236
|
-
} : {
|
|
237
|
-
kind,
|
|
238
|
-
...schedule
|
|
239
|
-
}),
|
|
240
|
-
BACKUPS_MAX_GAP_SECONDS: String(input.backups.maxGapSeconds),
|
|
241
|
-
PGHOST: "postgres",
|
|
242
|
-
PGPORT: "5432",
|
|
243
|
-
PGUSER: login.user,
|
|
244
|
-
PGPASSWORD: login.password,
|
|
245
|
-
...input.telemetry?.OTEL_EXPORTER_OTLP_ENDPOINT ? {
|
|
246
|
-
OTEL_EXPORTER_OTLP_ENDPOINT: input.telemetry.OTEL_EXPORTER_OTLP_ENDPOINT,
|
|
247
|
-
...input.telemetry.OTEL_EXPORTER_OTLP_HEADERS ? { OTEL_EXPORTER_OTLP_HEADERS: input.telemetry.OTEL_EXPORTER_OTLP_HEADERS } : {},
|
|
248
|
-
OTEL_SERVICE_NAME: BACKUPS_SERVICE
|
|
249
|
-
} : {}
|
|
250
|
-
};
|
|
251
|
-
}
|
|
252
|
-
return {
|
|
253
|
-
backups: input.backups,
|
|
254
|
-
databases,
|
|
255
|
-
prefix,
|
|
256
|
-
from,
|
|
257
|
-
image: `${input.project}-backups:pg${version}-${hash}`,
|
|
258
|
-
files: {
|
|
259
|
-
Dockerfile: dockerfile,
|
|
260
|
-
"backup.mjs": script
|
|
261
|
-
},
|
|
262
|
-
login,
|
|
263
|
-
readOnly,
|
|
264
|
-
env
|
|
265
|
-
};
|
|
266
|
-
}
|
|
267
|
-
/** The service in the stack's compose file. */
|
|
268
|
-
function backupsService(backups, envFiles) {
|
|
269
|
-
return {
|
|
270
|
-
image: backups.image,
|
|
271
|
-
build: {
|
|
272
|
-
context: `./${BACKUPS_SERVICE}`,
|
|
273
|
-
dockerfile: "Dockerfile"
|
|
274
|
-
},
|
|
275
|
-
pull_policy: "build",
|
|
276
|
-
restart: "unless-stopped",
|
|
277
|
-
...envFiles ? { env_file: [{
|
|
278
|
-
path: `./${BACKUPS_SERVICE}.env`,
|
|
279
|
-
format: "raw"
|
|
280
|
-
}] } : {},
|
|
281
|
-
depends_on: { postgres: { condition: "service_healthy" } },
|
|
282
|
-
healthcheck: {
|
|
283
|
-
test: [
|
|
284
|
-
"CMD",
|
|
285
|
-
"node",
|
|
286
|
-
RUNNER_PATH,
|
|
287
|
-
"health"
|
|
288
|
-
],
|
|
289
|
-
interval: "1m",
|
|
290
|
-
timeout: "10s",
|
|
291
|
-
retries: 3,
|
|
292
|
-
start_period: "30s"
|
|
293
|
-
}
|
|
294
|
-
};
|
|
295
|
-
}
|
|
296
|
-
/**
|
|
297
|
-
* The backups role, created and kept: able to sign in and read every
|
|
298
|
-
* database, and nothing else. None when it signs in as the superuser.
|
|
299
|
-
*/
|
|
300
|
-
function backupsRoleStatements(backups) {
|
|
301
|
-
if (!backups.readOnly) return [];
|
|
302
|
-
const role = require_seeds.quoteIdentifier(backups.login.user);
|
|
303
|
-
const password = `'${backups.login.password.replace(/'/g, "''")}'`;
|
|
304
|
-
return [
|
|
305
|
-
{
|
|
306
|
-
id: BACKUPS_SERVICE,
|
|
307
|
-
describe: `role ${backups.login.user}`,
|
|
308
|
-
exists: {
|
|
309
|
-
sql: "SELECT 1 FROM pg_roles WHERE rolname = $1",
|
|
310
|
-
values: [backups.login.user]
|
|
311
|
-
},
|
|
312
|
-
create: `CREATE ROLE ${role} LOGIN PASSWORD ${password}`
|
|
313
|
-
},
|
|
314
|
-
{
|
|
315
|
-
id: BACKUPS_SERVICE,
|
|
316
|
-
describe: `role ${backups.login.user}: its password`,
|
|
317
|
-
create: `ALTER ROLE ${role} WITH LOGIN PASSWORD ${password}`
|
|
318
|
-
},
|
|
319
|
-
{
|
|
320
|
-
id: BACKUPS_SERVICE,
|
|
321
|
-
describe: `role ${backups.login.user}: read every database`,
|
|
322
|
-
create: `GRANT pg_read_all_data TO ${role}`
|
|
323
|
-
}
|
|
324
|
-
];
|
|
325
|
-
}
|
|
326
|
-
//#endregion
|
|
327
|
-
//#region src/compose/sitePassword.ts
|
|
328
|
-
/**
|
|
329
|
-
* A site served behind a password on some deployed stages — a `StaticSite`'s
|
|
330
|
-
* `password`, naming a `RandomPassword` — so a staging build is not public
|
|
331
|
-
* while it is being tried.
|
|
332
|
-
*
|
|
333
|
-
* The edge asks for it with HTTP basic auth, before a request reaches the
|
|
334
|
-
* site: the browser prompts, and nothing of the site loads until the stage's
|
|
335
|
-
* login is given. The user is the stage's name; the password is the
|
|
336
|
-
* `RandomPassword`'s value on the stage, generated and kept like any other.
|
|
337
|
-
* Only its bcrypt hash reaches the edge's config.
|
|
338
|
-
*
|
|
339
|
-
* Pure.
|
|
340
|
-
*/
|
|
341
|
-
/** A site's `password` names a `RandomPassword` the manifest does not hold. */
|
|
342
|
-
var SitePasswordNotDeclared = class extends require_errors.GkmError {
|
|
343
|
-
site;
|
|
344
|
-
secret;
|
|
345
|
-
constructor(site, secret) {
|
|
346
|
-
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}');`);
|
|
347
|
-
this.site = site;
|
|
348
|
-
this.secret = secret;
|
|
349
|
-
this.name = "SitePasswordNotDeclared";
|
|
350
|
-
}
|
|
351
|
-
};
|
|
352
|
-
/** A site's `password` names a stage the workspace does not deploy. */
|
|
353
|
-
var UnknownPasswordStage = class extends require_errors.GkmError {
|
|
354
|
-
site;
|
|
355
|
-
stage;
|
|
356
|
-
deployed;
|
|
357
|
-
constructor(site, stage, deployed) {
|
|
358
|
-
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.`);
|
|
359
|
-
this.site = site;
|
|
360
|
-
this.stage = stage;
|
|
361
|
-
this.deployed = deployed;
|
|
362
|
-
this.name = "UnknownPasswordStage";
|
|
363
|
-
}
|
|
364
|
-
};
|
|
365
|
-
/** A site behind a password, with none in the stage's secrets. */
|
|
366
|
-
var SitePasswordMissing = class extends require_errors.GkmError {
|
|
367
|
-
stage;
|
|
368
|
-
key;
|
|
369
|
-
constructor(stage, key) {
|
|
370
|
-
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}`);
|
|
371
|
-
this.stage = stage;
|
|
372
|
-
this.key = key;
|
|
373
|
-
this.name = "SitePasswordMissing";
|
|
374
|
-
}
|
|
375
|
-
};
|
|
376
|
-
/**
|
|
377
|
-
* A site behind a password on a stage it deploys through a target that cannot
|
|
378
|
-
* ask for a login. Refused rather than ignored: ignored, the site would be
|
|
379
|
-
* public while its construct says it is not.
|
|
380
|
-
*/
|
|
381
|
-
var SitePasswordNeedsCompose = class extends require_errors.GkmError {
|
|
382
|
-
site;
|
|
383
|
-
stage;
|
|
384
|
-
target;
|
|
385
|
-
constructor(site, stage, target) {
|
|
386
|
-
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.`);
|
|
387
|
-
this.site = site;
|
|
388
|
-
this.stage = stage;
|
|
389
|
-
this.target = target;
|
|
390
|
-
this.name = "SitePasswordNeedsCompose";
|
|
391
|
-
}
|
|
392
|
-
};
|
|
393
|
-
/**
|
|
394
|
-
* The `RandomPassword` a site is served behind on `stage`, by its key —
|
|
395
|
-
* `SITE_PASSWORD` — or `undefined` where the stage asks for none.
|
|
396
|
-
*
|
|
397
|
-
* @throws {SitePasswordNotDeclared} where the password is not in the manifest
|
|
398
|
-
*/
|
|
399
|
-
function sitePasswordKey(manifest, site, stage) {
|
|
400
|
-
const password = site.password;
|
|
401
|
-
if (!password?.stages.includes(stage)) return void 0;
|
|
402
|
-
const secret = manifest[password.secret];
|
|
403
|
-
const key = secret?.kind === "secret" ? secret.provides?.[0] : void 0;
|
|
404
|
-
if (!key) throw new SitePasswordNotDeclared(site.id, password.secret);
|
|
405
|
-
return key;
|
|
406
|
-
}
|
|
407
|
-
/**
|
|
408
|
-
* Before anything is deployed: every site behind a password names a deployed
|
|
409
|
-
* stage and a declared `RandomPassword`, and one of `apps` behind it on
|
|
410
|
-
* `stage` deploys through compose.
|
|
411
|
-
*
|
|
412
|
-
* @throws {UnknownPasswordStage}, {SitePasswordNotDeclared},
|
|
413
|
-
* {SitePasswordNeedsCompose}
|
|
414
|
-
*/
|
|
415
|
-
function assertSitePasswords(workspace, manifest, stage, apps, target) {
|
|
416
|
-
for (const site of Object.values(manifest)) {
|
|
417
|
-
if (site.kind !== "site" || !site.password) continue;
|
|
418
|
-
for (const named of site.password.stages) if (!workspace.stages.deployed.includes(named)) throw new UnknownPasswordStage(site.id, named, workspace.stages.deployed);
|
|
419
|
-
if (sitePasswordKey(manifest, site, stage) && target !== "compose" && apps.includes(require_derive.appKey(site.id))) throw new SitePasswordNeedsCompose(site.id, stage, target);
|
|
420
|
-
}
|
|
421
|
-
}
|
|
422
|
-
/**
|
|
423
|
-
* The login a site is served behind on `stage`, from the password kept under
|
|
424
|
-
* `key`.
|
|
425
|
-
*
|
|
426
|
-
* The hash's salt is derived from the password, so the same password always
|
|
427
|
-
* renders the same edge config: a deploy that changed nothing rewrites
|
|
428
|
-
* nothing, and the proxy is not reloaded for it. A per-hash random salt
|
|
429
|
-
* guards against a precomputed table of common passwords; a generated one is
|
|
430
|
-
* 43 random characters, which no table holds.
|
|
431
|
-
*
|
|
432
|
-
* @throws {SitePasswordMissing} where the stage's secrets hold none
|
|
433
|
-
*/
|
|
434
|
-
function siteAuth(stage, key, custom) {
|
|
435
|
-
const password = custom[key];
|
|
436
|
-
if (!password) throw new SitePasswordMissing(stage, key);
|
|
437
|
-
return {
|
|
438
|
-
user: stage,
|
|
439
|
-
password,
|
|
440
|
-
hash: bcryptjs.default.hashSync(password, saltFor(password)),
|
|
441
|
-
key
|
|
442
|
-
};
|
|
443
|
-
}
|
|
444
|
-
/** bcrypt's own base-64 alphabet, in which a salt is written. */
|
|
445
|
-
const BCRYPT_ALPHABET = "./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
|
446
|
-
/**
|
|
447
|
-
* A bcrypt salt — `$2a$`, which Caddy and Traefik both read, at cost 10 —
|
|
448
|
-
* derived from the password.
|
|
449
|
-
*/
|
|
450
|
-
function saltFor(password) {
|
|
451
|
-
const digest = (0, node_crypto.createHash)("sha256").update(password).digest();
|
|
452
|
-
let salt = "";
|
|
453
|
-
for (let i = 0; i < 22; i++) salt += BCRYPT_ALPHABET[digest[i] % 64];
|
|
454
|
-
return `$2a$10$${salt}`;
|
|
455
|
-
}
|
|
456
|
-
//#endregion
|
|
457
6
|
//#region src/providers/aws.ts
|
|
458
7
|
/**
|
|
459
8
|
* The AWS account a provider provisions in — the stage's, found the way the
|
|
@@ -669,11 +218,11 @@ var DnsWildcardRefused = class extends require_errors.GkmError {
|
|
|
669
218
|
/** The records a stage's hosts need — pure. */
|
|
670
219
|
function planStackDns(input) {
|
|
671
220
|
const { stage, server } = input;
|
|
672
|
-
const dns = input.dns ?
|
|
221
|
+
const dns = input.dns ? require_credentials.normalizeDnsConfig(input.dns) : {};
|
|
673
222
|
const records = /* @__PURE__ */ new Map();
|
|
674
223
|
const uncovered = [];
|
|
675
224
|
const add = (host, domain, type, value) => {
|
|
676
|
-
const name =
|
|
225
|
+
const name = require_credentials.extractSubdomain(host, domain);
|
|
677
226
|
records.set(`${domain} ${name} ${type}`, {
|
|
678
227
|
host,
|
|
679
228
|
domain,
|
|
@@ -690,7 +239,7 @@ function planStackDns(input) {
|
|
|
690
239
|
for (const raw of input.hosts) {
|
|
691
240
|
const host = raw.toLowerCase();
|
|
692
241
|
if (host.includes("*") && host !== input.wildcard?.toLowerCase()) throw new DnsWildcardRefused(stage, host);
|
|
693
|
-
const domain =
|
|
242
|
+
const domain = require_credentials.findRootDomain(host, dns);
|
|
694
243
|
if (!domain) {
|
|
695
244
|
uncovered.push(host);
|
|
696
245
|
continue;
|
|
@@ -774,7 +323,7 @@ async function readRecords(provider, domain, wanted) {
|
|
|
774
323
|
}
|
|
775
324
|
/** The provider for a domain's config: `providerFor`, or the real one. */
|
|
776
325
|
function providerResolver(options) {
|
|
777
|
-
return options.providerFor ?? ((config) =>
|
|
326
|
+
return options.providerFor ?? ((config) => require_credentials.createDnsProvider({
|
|
778
327
|
config,
|
|
779
328
|
...options.credentials ? { godaddy: options.credentials } : {},
|
|
780
329
|
...options.hostinger ? { hostinger: options.hostinger } : {}
|
|
@@ -900,7 +449,7 @@ async function settleStackDns(plan, options = {}) {
|
|
|
900
449
|
existing = await existingRecords(provider, domain);
|
|
901
450
|
diff = diffDomainDns(domain, existing);
|
|
902
451
|
} catch (error) {
|
|
903
|
-
if (!(error instanceof
|
|
452
|
+
if (!(error instanceof require_credentials.DnsRecordsUnreadable)) throw error;
|
|
904
453
|
log(` ℹ The ${provider.name} key cannot read ${domain.domain}'s DNS records, so changes cannot be diffed: every record is written (idempotent).`);
|
|
905
454
|
unreadable = true;
|
|
906
455
|
existing = [];
|
|
@@ -996,7 +545,7 @@ async function pruneStackDns(stale, options) {
|
|
|
996
545
|
const dryRun = options.dryRun === true;
|
|
997
546
|
const log = options.log ?? ((line) => console.log(line));
|
|
998
547
|
const providerFor = providerResolver(options);
|
|
999
|
-
const dns = options.dns ?
|
|
548
|
+
const dns = options.dns ? require_credentials.normalizeDnsConfig(options.dns) : {};
|
|
1000
549
|
const byDomain = /* @__PURE__ */ new Map();
|
|
1001
550
|
for (const record of stale) byDomain.set(record.domain, [...byDomain.get(record.domain) ?? [], record]);
|
|
1002
551
|
log(` No longer served by '${options.stage}':`);
|
|
@@ -1029,7 +578,7 @@ async function pruneStackDns(stale, options) {
|
|
|
1029
578
|
type: r.type
|
|
1030
579
|
})));
|
|
1031
580
|
} catch (error) {
|
|
1032
|
-
if (!(error instanceof
|
|
581
|
+
if (!(error instanceof require_credentials.DnsRecordsUnreadable)) throw error;
|
|
1033
582
|
byHand(domain, records, `the ${provider.name} key cannot read its records, so none is deleted unchecked`);
|
|
1034
583
|
continue;
|
|
1035
584
|
}
|
|
@@ -1188,8 +737,8 @@ var DnsCredentialMissing = class extends require_errors.GkmError {
|
|
|
1188
737
|
function stageDnsDomains(stage, domains, dns) {
|
|
1189
738
|
const own = domains?.[stage];
|
|
1190
739
|
if (!own || !dns || isLocalHost(own)) return [];
|
|
1191
|
-
const normalized =
|
|
1192
|
-
const root =
|
|
740
|
+
const normalized = require_credentials.normalizeDnsConfig(dns);
|
|
741
|
+
const root = require_credentials.findRootDomain(own.toLowerCase(), normalized);
|
|
1193
742
|
return root ? [{
|
|
1194
743
|
domain: root,
|
|
1195
744
|
config: normalized[root]
|
|
@@ -1239,7 +788,7 @@ async function stageDns(input) {
|
|
|
1239
788
|
...input.wildcard ? { wildcard: input.wildcard } : {}
|
|
1240
789
|
});
|
|
1241
790
|
const recorded = diffRecordedDns(plan, input.recorded ?? []);
|
|
1242
|
-
const dns = input.dns ?
|
|
791
|
+
const dns = input.dns ? require_credentials.normalizeDnsConfig(input.dns) : {};
|
|
1243
792
|
const staleDomains = [...new Set(recorded.stale.map((r) => r.domain))].filter((domain) => dns[domain] && !plan.domains.some((d) => d.domain === domain)).map((domain) => ({
|
|
1244
793
|
domain,
|
|
1245
794
|
config: dns[domain]
|
|
@@ -1494,18 +1043,6 @@ async function confirmPendingSubscriptions(input) {
|
|
|
1494
1043
|
return left;
|
|
1495
1044
|
}
|
|
1496
1045
|
//#endregion
|
|
1497
|
-
Object.defineProperty(exports, "BACKUPS_SERVICE", {
|
|
1498
|
-
enumerable: true,
|
|
1499
|
-
get: function() {
|
|
1500
|
-
return BACKUPS_SERVICE;
|
|
1501
|
-
}
|
|
1502
|
-
});
|
|
1503
|
-
Object.defineProperty(exports, "BACKUPS_URL_KEY", {
|
|
1504
|
-
enumerable: true,
|
|
1505
|
-
get: function() {
|
|
1506
|
-
return BACKUPS_URL_KEY;
|
|
1507
|
-
}
|
|
1508
|
-
});
|
|
1509
1046
|
Object.defineProperty(exports, "HostNotPointingAtServer", {
|
|
1510
1047
|
enumerable: true,
|
|
1511
1048
|
get: function() {
|
|
@@ -1518,24 +1055,12 @@ Object.defineProperty(exports, "PushSubscriptionsUnconfirmed", {
|
|
|
1518
1055
|
return PushSubscriptionsUnconfirmed;
|
|
1519
1056
|
}
|
|
1520
1057
|
});
|
|
1521
|
-
Object.defineProperty(exports, "RUNNER_PATH", {
|
|
1522
|
-
enumerable: true,
|
|
1523
|
-
get: function() {
|
|
1524
|
-
return RUNNER_PATH;
|
|
1525
|
-
}
|
|
1526
|
-
});
|
|
1527
1058
|
Object.defineProperty(exports, "SUBSCRIPTION_TYPE", {
|
|
1528
1059
|
enumerable: true,
|
|
1529
1060
|
get: function() {
|
|
1530
1061
|
return SUBSCRIPTION_TYPE;
|
|
1531
1062
|
}
|
|
1532
1063
|
});
|
|
1533
|
-
Object.defineProperty(exports, "assertSitePasswords", {
|
|
1534
|
-
enumerable: true,
|
|
1535
|
-
get: function() {
|
|
1536
|
-
return assertSitePasswords;
|
|
1537
|
-
}
|
|
1538
|
-
});
|
|
1539
1064
|
Object.defineProperty(exports, "awsClientConfig", {
|
|
1540
1065
|
enumerable: true,
|
|
1541
1066
|
get: function() {
|
|
@@ -1554,54 +1079,12 @@ Object.defineProperty(exports, "awsProvisioningCredentials", {
|
|
|
1554
1079
|
return awsProvisioningCredentials;
|
|
1555
1080
|
}
|
|
1556
1081
|
});
|
|
1557
|
-
Object.defineProperty(exports, "backupDatabases", {
|
|
1558
|
-
enumerable: true,
|
|
1559
|
-
get: function() {
|
|
1560
|
-
return backupDatabases;
|
|
1561
|
-
}
|
|
1562
|
-
});
|
|
1563
|
-
Object.defineProperty(exports, "backupExpiries", {
|
|
1564
|
-
enumerable: true,
|
|
1565
|
-
get: function() {
|
|
1566
|
-
return backupExpiries;
|
|
1567
|
-
}
|
|
1568
|
-
});
|
|
1569
|
-
Object.defineProperty(exports, "backupFile", {
|
|
1570
|
-
enumerable: true,
|
|
1571
|
-
get: function() {
|
|
1572
|
-
return backupFile;
|
|
1573
|
-
}
|
|
1574
|
-
});
|
|
1575
|
-
Object.defineProperty(exports, "backupsPrefix", {
|
|
1576
|
-
enumerable: true,
|
|
1577
|
-
get: function() {
|
|
1578
|
-
return backupsPrefix;
|
|
1579
|
-
}
|
|
1580
|
-
});
|
|
1581
|
-
Object.defineProperty(exports, "backupsRoleStatements", {
|
|
1582
|
-
enumerable: true,
|
|
1583
|
-
get: function() {
|
|
1584
|
-
return backupsRoleStatements;
|
|
1585
|
-
}
|
|
1586
|
-
});
|
|
1587
|
-
Object.defineProperty(exports, "backupsService", {
|
|
1588
|
-
enumerable: true,
|
|
1589
|
-
get: function() {
|
|
1590
|
-
return backupsService;
|
|
1591
|
-
}
|
|
1592
|
-
});
|
|
1593
1082
|
Object.defineProperty(exports, "confirmPendingSubscriptions", {
|
|
1594
1083
|
enumerable: true,
|
|
1595
1084
|
get: function() {
|
|
1596
1085
|
return confirmPendingSubscriptions;
|
|
1597
1086
|
}
|
|
1598
1087
|
});
|
|
1599
|
-
Object.defineProperty(exports, "deploysWithCompose", {
|
|
1600
|
-
enumerable: true,
|
|
1601
|
-
get: function() {
|
|
1602
|
-
return deploysWithCompose;
|
|
1603
|
-
}
|
|
1604
|
-
});
|
|
1605
1088
|
Object.defineProperty(exports, "dnsCredentials", {
|
|
1606
1089
|
enumerable: true,
|
|
1607
1090
|
get: function() {
|
|
@@ -1632,12 +1115,6 @@ Object.defineProperty(exports, "requiredServerAddress", {
|
|
|
1632
1115
|
return requiredServerAddress;
|
|
1633
1116
|
}
|
|
1634
1117
|
});
|
|
1635
|
-
Object.defineProperty(exports, "runTime", {
|
|
1636
|
-
enumerable: true,
|
|
1637
|
-
get: function() {
|
|
1638
|
-
return runTime;
|
|
1639
|
-
}
|
|
1640
|
-
});
|
|
1641
1118
|
Object.defineProperty(exports, "serverAddressHint", {
|
|
1642
1119
|
enumerable: true,
|
|
1643
1120
|
get: function() {
|
|
@@ -1650,36 +1127,12 @@ Object.defineProperty(exports, "settleStackDns", {
|
|
|
1650
1127
|
return settleStackDns;
|
|
1651
1128
|
}
|
|
1652
1129
|
});
|
|
1653
|
-
Object.defineProperty(exports, "siteAuth", {
|
|
1654
|
-
enumerable: true,
|
|
1655
|
-
get: function() {
|
|
1656
|
-
return siteAuth;
|
|
1657
|
-
}
|
|
1658
|
-
});
|
|
1659
|
-
Object.defineProperty(exports, "sitePasswordKey", {
|
|
1660
|
-
enumerable: true,
|
|
1661
|
-
get: function() {
|
|
1662
|
-
return sitePasswordKey;
|
|
1663
|
-
}
|
|
1664
|
-
});
|
|
1665
|
-
Object.defineProperty(exports, "stackBackups", {
|
|
1666
|
-
enumerable: true,
|
|
1667
|
-
get: function() {
|
|
1668
|
-
return stackBackups;
|
|
1669
|
-
}
|
|
1670
|
-
});
|
|
1671
1130
|
Object.defineProperty(exports, "stackHosts", {
|
|
1672
1131
|
enumerable: true,
|
|
1673
1132
|
get: function() {
|
|
1674
1133
|
return stackHosts;
|
|
1675
1134
|
}
|
|
1676
1135
|
});
|
|
1677
|
-
Object.defineProperty(exports, "stageBackups", {
|
|
1678
|
-
enumerable: true,
|
|
1679
|
-
get: function() {
|
|
1680
|
-
return stageBackups;
|
|
1681
|
-
}
|
|
1682
|
-
});
|
|
1683
1136
|
Object.defineProperty(exports, "stageDns", {
|
|
1684
1137
|
enumerable: true,
|
|
1685
1138
|
get: function() {
|
|
@@ -1717,4 +1170,4 @@ Object.defineProperty(exports, "topicConnection", {
|
|
|
1717
1170
|
}
|
|
1718
1171
|
});
|
|
1719
1172
|
|
|
1720
|
-
//# sourceMappingURL=snsSubscriptions-
|
|
1173
|
+
//# sourceMappingURL=snsSubscriptions-CgWY_alK.cjs.map
|