@geekmidas/cli 10.0.0-alpha.188 → 10.0.0-alpha.189
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-iI2LW48g.mjs → LegacyStateStore-BI0-sXct.mjs} +2 -2
- package/dist/{LegacyStateStore-iI2LW48g.mjs.map → LegacyStateStore-BI0-sXct.mjs.map} +1 -1
- package/dist/{LegacyStateStore-kFahq3hz.cjs → LegacyStateStore-DSl-Kjhn.cjs} +2 -2
- package/dist/{LegacyStateStore-kFahq3hz.cjs.map → LegacyStateStore-DSl-Kjhn.cjs.map} +1 -1
- package/dist/{LocalStateStore-CHKz7oSH.mjs → LocalStateStore-CKoytnSh.mjs} +2 -2
- package/dist/{LocalStateStore-CHKz7oSH.mjs.map → LocalStateStore-CKoytnSh.mjs.map} +1 -1
- package/dist/{LocalStateStore-COvGAS9D.cjs → LocalStateStore-DlXihNk5.cjs} +2 -2
- package/dist/{LocalStateStore-COvGAS9D.cjs.map → LocalStateStore-DlXihNk5.cjs.map} +1 -1
- package/dist/{S3StateStore-Dp36QWGq.mjs → S3StateStore-BWiLJgjA.mjs} +4 -4
- package/dist/{S3StateStore-Dp36QWGq.mjs.map → S3StateStore-BWiLJgjA.mjs.map} +1 -1
- package/dist/{S3StateStore-CWgPnzYs.cjs → S3StateStore-DAQh1WJ_.cjs} +4 -4
- package/dist/{S3StateStore-CWgPnzYs.cjs.map → S3StateStore-DAQh1WJ_.cjs.map} +1 -1
- package/dist/{SSMStateStore-Cfk-we0n.cjs → SSMStateStore-CwpsKiqW.cjs} +2 -2
- package/dist/{SSMStateStore-Cfk-we0n.cjs.map → SSMStateStore-CwpsKiqW.cjs.map} +1 -1
- package/dist/{SSMStateStore-BXJaNkAw.mjs → SSMStateStore-Dtjc3Tcy.mjs} +2 -2
- package/dist/{SSMStateStore-BXJaNkAw.mjs.map → SSMStateStore-Dtjc3Tcy.mjs.map} +1 -1
- package/dist/{add-DryeFO6A.mjs → add-CgR8OZmf.mjs} +4 -4
- package/dist/{add-DryeFO6A.mjs.map → add-CgR8OZmf.mjs.map} +1 -1
- package/dist/{add-BpQvfbl1.cjs → add-DgoqWfHX.cjs} +4 -4
- package/dist/{add-BpQvfbl1.cjs.map → add-DgoqWfHX.cjs.map} +1 -1
- package/dist/{bundler-CUBfNgPZ.mjs → bundler-B0GTqknw.mjs} +6 -6
- package/dist/{bundler-CUBfNgPZ.mjs.map → bundler-B0GTqknw.mjs.map} +1 -1
- package/dist/{bundler-8aBbCVsY.cjs → bundler-ZNjpx5xS.cjs} +6 -6
- package/dist/{bundler-8aBbCVsY.cjs.map → bundler-ZNjpx5xS.cjs.map} +1 -1
- package/dist/{cli-DZEgeNYA.cjs → cli-DqEhTw8n.cjs} +4 -4
- package/dist/{cli-DZEgeNYA.cjs.map → cli-DqEhTw8n.cjs.map} +1 -1
- package/dist/{cli-Cj4_6-c_.mjs → cli-bjBjd1zg.mjs} +4 -4
- package/dist/{cli-Cj4_6-c_.mjs.map → cli-bjBjd1zg.mjs.map} +1 -1
- package/dist/{clientTelemetry-Bzc4KXz5.d.mts → clientTelemetry-C3GsvvLK.d.cts} +2 -2
- package/dist/clientTelemetry-C3GsvvLK.d.cts.map +1 -0
- package/dist/{clientTelemetry-N8NAguGI.d.cts → clientTelemetry-Dcp0jgkV.d.mts} +2 -2
- package/dist/clientTelemetry-Dcp0jgkV.d.mts.map +1 -0
- package/dist/{compose-C_vg6GOx.mjs → compose-BE2Fi1Bs.mjs} +186 -33
- package/dist/compose-BE2Fi1Bs.mjs.map +1 -0
- package/dist/{compose-B50nt3WV.cjs → compose-QHm47c8E.cjs} +197 -32
- package/dist/compose-QHm47c8E.cjs.map +1 -0
- package/dist/{config-DpqIrrRJ.d.mts → config-B_pfl-ZN.d.cts} +3 -3
- package/dist/{config-DpqIrrRJ.d.mts.map → config-B_pfl-ZN.d.cts.map} +1 -1
- package/dist/{config-KFyPSS0R.d.cts → config-CDulXPTe.d.mts} +3 -3
- package/dist/{config-KFyPSS0R.d.cts.map → config-CDulXPTe.d.mts.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/{credentials-BIP-iRPn.cjs → credentials--QL1R8mL.cjs} +40 -5
- package/dist/credentials--QL1R8mL.cjs.map +1 -0
- package/dist/{credentials-B3lji5Yq.mjs → credentials-0Kmo6GAw.mjs} +5 -5
- package/dist/{credentials-B3lji5Yq.mjs.map → credentials-0Kmo6GAw.mjs.map} +1 -1
- package/dist/{credentials-CcEXccxO.mjs → credentials-CRgp0huX.mjs} +29 -6
- package/dist/credentials-CRgp0huX.mjs.map +1 -0
- package/dist/{credentials-muaDESyw.cjs → credentials-No8csre7.cjs} +5 -5
- package/dist/{credentials-muaDESyw.cjs.map → credentials-No8csre7.cjs.map} +1 -1
- package/dist/{dbTunnel-BfStDMkg.cjs → dbTunnel-CEHBYvbM.cjs} +5 -5
- package/dist/{dbTunnel-BfStDMkg.cjs.map → dbTunnel-CEHBYvbM.cjs.map} +1 -1
- package/dist/{dbTunnel-BXmuGU8b.mjs → dbTunnel-DOiMt-yL.mjs} +5 -5
- package/dist/{dbTunnel-BXmuGU8b.mjs.map → dbTunnel-DOiMt-yL.mjs.map} +1 -1
- package/dist/deploy/public.cjs +10 -10
- package/dist/deploy/public.d.cts +5 -5
- package/dist/deploy/public.d.mts +5 -5
- package/dist/deploy/public.mjs +10 -10
- package/dist/{deploy-BKWc0NFs.mjs → deploy-KdBFBME1.mjs} +12 -11
- package/dist/deploy-KdBFBME1.mjs.map +1 -0
- package/dist/{deploy-SRe6K6f2.cjs → deploy-Pkvk9jIL.cjs} +12 -11
- package/dist/deploy-Pkvk9jIL.cjs.map +1 -0
- package/dist/{destroy-igN-bUYa.mjs → destroy-CFc0rdP4.mjs} +10 -9
- package/dist/{destroy-igN-bUYa.mjs.map → destroy-CFc0rdP4.mjs.map} +1 -1
- package/dist/{destroy-cDWGXdvz.cjs → destroy-oqNna46x.cjs} +10 -9
- package/dist/{destroy-cDWGXdvz.cjs.map → destroy-oqNna46x.cjs.map} +1 -1
- package/dist/{dokploy-DlgTAdSK.mjs → dokploy-BkwTpeNU.mjs} +2 -2
- package/dist/{dokploy-DlgTAdSK.mjs.map → dokploy-BkwTpeNU.mjs.map} +1 -1
- package/dist/{dokploy-BSDyt4OK.cjs → dokploy-CxEzce91.cjs} +2 -2
- package/dist/{dokploy-BSDyt4OK.cjs.map → dokploy-CxEzce91.cjs.map} +1 -1
- package/dist/{eas-2DGYQ0Qf.cjs → eas-DbDHF2WZ.cjs} +3 -3
- package/dist/{eas-2DGYQ0Qf.cjs.map → eas-DbDHF2WZ.cjs.map} +1 -1
- package/dist/{eas-DMg91c_V.mjs → eas-vzSPhv0B.mjs} +3 -3
- package/dist/{eas-DMg91c_V.mjs.map → eas-vzSPhv0B.mjs.map} +1 -1
- package/dist/{encryption-CS5tEnE1.cjs → encryption-4xb0WByC.cjs} +3 -3
- package/dist/{encryption-CS5tEnE1.cjs.map → encryption-4xb0WByC.cjs.map} +1 -1
- package/dist/{encryption-4tw7AQve.mjs → encryption-BJirKe8H.mjs} +3 -3
- package/dist/{encryption-4tw7AQve.mjs.map → encryption-BJirKe8H.mjs.map} +1 -1
- package/dist/{engine-4nWsBOM9.mjs → engine-Blw0271a.mjs} +7 -7
- package/dist/{engine-4nWsBOM9.mjs.map → engine-Blw0271a.mjs.map} +1 -1
- package/dist/{engine-DBuoGHhE.cjs → engine-C-tyF0OQ.cjs} +7 -7
- package/dist/{engine-DBuoGHhE.cjs.map → engine-C-tyF0OQ.cjs.map} +1 -1
- package/dist/{github-DVmVvYif.cjs → github-Aydv6vu5.cjs} +7 -7
- package/dist/{github-DVmVvYif.cjs.map → github-Aydv6vu5.cjs.map} +1 -1
- package/dist/{github-CBexMKt6.mjs → github-C_h3NRr7.mjs} +7 -7
- package/dist/{github-CBexMKt6.mjs.map → github-C_h3NRr7.mjs.map} +1 -1
- package/dist/{googlePlay-jTL8R6Q8.mjs → googlePlay-B7AYn6Pc.mjs} +4 -4
- package/dist/{googlePlay-jTL8R6Q8.mjs.map → googlePlay-B7AYn6Pc.mjs.map} +1 -1
- package/dist/{googlePlay-C3Bn_DCj.cjs → googlePlay-DpJTysGZ.cjs} +4 -4
- package/dist/{googlePlay-C3Bn_DCj.cjs.map → googlePlay-DpJTysGZ.cjs.map} +1 -1
- package/dist/{iam-DloEBLXZ.mjs → iam-CE1QQeEQ.mjs} +2 -2
- package/dist/{iam-DloEBLXZ.mjs.map → iam-CE1QQeEQ.mjs.map} +1 -1
- package/dist/{iam-SxPKYCI_.cjs → iam-DlPqLzjO.cjs} +2 -2
- package/dist/{iam-SxPKYCI_.cjs.map → iam-DlPqLzjO.cjs.map} +1 -1
- package/dist/{index-BThTZV8T.d.mts → index-CBl51bCQ.d.cts} +2 -2
- package/dist/{index-BThTZV8T.d.mts.map → index-CBl51bCQ.d.cts.map} +1 -1
- package/dist/{index-Cgd-ouyI.d.cts → index-Dqp1lLjF.d.mts} +2 -2
- package/dist/{index-Cgd-ouyI.d.cts.map → index-Dqp1lLjF.d.mts.map} +1 -1
- package/dist/index.cjs +126 -72
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +126 -72
- package/dist/index.mjs.map +1 -1
- package/dist/{local-PWkIhiU0.cjs → local-BEM8UVsa.cjs} +2 -2
- package/dist/{local-PWkIhiU0.cjs.map → local-BEM8UVsa.cjs.map} +1 -1
- package/dist/{local-BejxzczT.mjs → local-ZaXGH2eP.mjs} +2 -2
- package/dist/{local-BejxzczT.mjs.map → local-ZaXGH2eP.mjs.map} +1 -1
- package/dist/{migrate-DpnMqHxD.mjs → migrate-BuReWK8R.mjs} +5 -5
- package/dist/{migrate-DpnMqHxD.mjs.map → migrate-BuReWK8R.mjs.map} +1 -1
- package/dist/{migrate-Bl8oaz7u.mjs → migrate-CkeIl9YW.mjs} +3 -3
- package/dist/{migrate-Bl8oaz7u.mjs.map → migrate-CkeIl9YW.mjs.map} +1 -1
- package/dist/{migrate-Dxcfcm3A.cjs → migrate-Cq4s3V1M.cjs} +3 -3
- package/dist/{migrate-Dxcfcm3A.cjs.map → migrate-Cq4s3V1M.cjs.map} +1 -1
- package/dist/{migrate-ChKFKdH1.cjs → migrate-DTMYWQn6.cjs} +5 -5
- package/dist/{migrate-ChKFKdH1.cjs.map → migrate-DTMYWQn6.cjs.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-BeCDyZQX.mjs → projectBucket-BaZfu9b6.mjs} +2 -2
- package/dist/{projectBucket-BeCDyZQX.mjs.map → projectBucket-BaZfu9b6.mjs.map} +1 -1
- package/dist/{projectBucket-D4AqCGVr.cjs → projectBucket-CBzCpLML.cjs} +2 -2
- package/dist/{projectBucket-D4AqCGVr.cjs.map → projectBucket-CBzCpLML.cjs.map} +1 -1
- package/dist/{publish-e2lsR2Jq.cjs → publish-CLYnKn-k.cjs} +2 -2
- package/dist/{publish-e2lsR2Jq.cjs.map → publish-CLYnKn-k.cjs.map} +1 -1
- package/dist/{publish-CXqI2-U3.mjs → publish-UxavszCu.mjs} +2 -2
- package/dist/{publish-CXqI2-U3.mjs.map → publish-UxavszCu.mjs.map} +1 -1
- package/dist/reconcile/public.d.cts +1 -1
- package/dist/reconcile/public.d.mts +1 -1
- package/dist/{resolve-BMmiH24Y.mjs → resolve-Bk9a9BVj.mjs} +4 -4
- package/dist/{resolve-BMmiH24Y.mjs.map → resolve-Bk9a9BVj.mjs.map} +1 -1
- package/dist/{resolve-BgjyMQZy.cjs → resolve-CeeNr_ex.cjs} +4 -4
- package/dist/{resolve-BgjyMQZy.cjs.map → resolve-CeeNr_ex.cjs.map} +1 -1
- package/dist/{rollback-Cf1JpbwJ.cjs → rollback-D6AdPlie.cjs} +7 -7
- package/dist/{rollback-Cf1JpbwJ.cjs.map → rollback-D6AdPlie.cjs.map} +1 -1
- package/dist/{rollback-BpJonwn6.mjs → rollback-DyMVhn7L.mjs} +7 -7
- package/dist/{rollback-BpJonwn6.mjs.map → rollback-DyMVhn7L.mjs.map} +1 -1
- package/dist/{runtime-BtoiRP5G.d.cts → runtime-DFG1CAWA.d.mts} +2 -2
- package/dist/{runtime-BtoiRP5G.d.cts.map → runtime-DFG1CAWA.d.mts.map} +1 -1
- package/dist/{runtime-Ct41f0tN.d.mts → runtime-DjhB4Oxn.d.cts} +2 -2
- package/dist/{runtime-Ct41f0tN.d.mts.map → runtime-DjhB4Oxn.d.cts.map} +1 -1
- package/dist/{s3-CRShyAj_.mjs → s3-B9UimcQe.mjs} +3 -3
- package/dist/{s3-CRShyAj_.mjs.map → s3-B9UimcQe.mjs.map} +1 -1
- package/dist/{s3-P47E4YMA.cjs → s3-FbPmbPft.cjs} +3 -3
- package/dist/{s3-P47E4YMA.cjs.map → s3-FbPmbPft.cjs.map} +1 -1
- package/dist/{serverSetup-gRotzelq.mjs → serverSetup-BH7_Zt0N.mjs} +7 -7
- package/dist/{serverSetup-gRotzelq.mjs.map → serverSetup-BH7_Zt0N.mjs.map} +1 -1
- package/dist/{serverSetup-rJUXJgY4.cjs → serverSetup-CeFkPTVz.cjs} +7 -7
- package/dist/{serverSetup-rJUXJgY4.cjs.map → serverSetup-CeFkPTVz.cjs.map} +1 -1
- package/dist/{sniffer-D82SAjc_.mjs → sniffer-8TlRbqb0.mjs} +7 -7
- package/dist/{sniffer-D82SAjc_.mjs.map → sniffer-8TlRbqb0.mjs.map} +1 -1
- package/dist/{sniffer-BQOt66oy.cjs → sniffer-B83jVMSA.cjs} +7 -7
- package/dist/{sniffer-BQOt66oy.cjs.map → sniffer-B83jVMSA.cjs.map} +1 -1
- package/dist/{snsSubscriptions-Ci62xcrq.cjs → snsSubscriptions-B7uEpoJ2.cjs} +12 -6
- package/dist/snsSubscriptions-B7uEpoJ2.cjs.map +1 -0
- package/dist/{snsSubscriptions-D-1y_R8M.mjs → snsSubscriptions-BQcD_3UK.mjs} +12 -6
- package/dist/snsSubscriptions-BQcD_3UK.mjs.map +1 -0
- package/dist/{sst-BBNnVnl2.cjs → sst-D0t-8yEl.cjs} +6 -6
- package/dist/{sst-BBNnVnl2.cjs.map → sst-D0t-8yEl.cjs.map} +1 -1
- package/dist/{sst-CbJS1d--.mjs → sst-w90IUOX_.mjs} +6 -6
- package/dist/{sst-CbJS1d--.mjs.map → sst-w90IUOX_.mjs.map} +1 -1
- package/dist/{stack-BXyv__ZA.mjs → stack-B5-pHmtX.mjs} +33 -15
- package/dist/stack-B5-pHmtX.mjs.map +1 -0
- package/dist/{stack-DmZPFXyz.cjs → stack-CBgOAZDP.cjs} +33 -15
- package/dist/stack-CBgOAZDP.cjs.map +1 -0
- package/dist/{stage-xkuXOSsr.mjs → stage-C6ogkiRu.mjs} +5 -5
- package/dist/{stage-xkuXOSsr.mjs.map → stage-C6ogkiRu.mjs.map} +1 -1
- package/dist/{stage-CvUrBgxq.cjs → stage-EnQ76HLW.cjs} +5 -5
- package/dist/{stage-CvUrBgxq.cjs.map → stage-EnQ76HLW.cjs.map} +1 -1
- package/dist/{stages-Dk6Lv7DY.cjs → stages-C8HQ9ozh.cjs} +2 -2
- package/dist/{stages-Dk6Lv7DY.cjs.map → stages-C8HQ9ozh.cjs.map} +1 -1
- package/dist/{stages-DFvE7iEO.mjs → stages-DnN6lwL4.mjs} +2 -2
- package/dist/{stages-DFvE7iEO.mjs.map → stages-DnN6lwL4.mjs.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-iOb1b-eG.mjs → terminal-Cb58S1Yx.mjs} +2 -2
- package/dist/{terminal-iOb1b-eG.mjs.map → terminal-Cb58S1Yx.mjs.map} +1 -1
- package/dist/{terminal-BFUESry5.cjs → terminal-D9abUcq9.cjs} +2 -2
- package/dist/{terminal-BFUESry5.cjs.map → terminal-D9abUcq9.cjs.map} +1 -1
- package/dist/{types-BVDaaLas.d.cts → types-B-ohhDwy.d.mts} +13 -2
- package/dist/types-B-ohhDwy.d.mts.map +1 -0
- package/dist/{types-CJTKWLkK.d.mts → types-BAqI--_q.d.cts} +14 -1
- package/dist/types-BAqI--_q.d.cts.map +1 -0
- 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-CdiCMRap.mjs → workspace-BSGUH2DO.mjs} +5 -3
- package/dist/workspace-BSGUH2DO.mjs.map +1 -0
- package/dist/{workspace-CTspddnJ.cjs → workspace-K403npiD.cjs} +5 -3
- package/dist/workspace-K403npiD.cjs.map +1 -0
- package/package.json +16 -16
- package/dist/clientTelemetry-Bzc4KXz5.d.mts.map +0 -1
- package/dist/clientTelemetry-N8NAguGI.d.cts.map +0 -1
- package/dist/compose-B50nt3WV.cjs.map +0 -1
- package/dist/compose-C_vg6GOx.mjs.map +0 -1
- package/dist/credentials-BIP-iRPn.cjs.map +0 -1
- package/dist/credentials-CcEXccxO.mjs.map +0 -1
- package/dist/deploy-BKWc0NFs.mjs.map +0 -1
- package/dist/deploy-SRe6K6f2.cjs.map +0 -1
- package/dist/snsSubscriptions-Ci62xcrq.cjs.map +0 -1
- package/dist/snsSubscriptions-D-1y_R8M.mjs.map +0 -1
- package/dist/stack-BXyv__ZA.mjs.map +0 -1
- package/dist/stack-DmZPFXyz.cjs.map +0 -1
- package/dist/types-BVDaaLas.d.cts.map +0 -1
- package/dist/types-CJTKWLkK.d.mts.map +0 -1
- package/dist/workspace-CTspddnJ.cjs.map +0 -1
- package/dist/workspace-CdiCMRap.mjs.map +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-BhDjJH2R.mjs";
|
|
2
2
|
import { t as GkmError } from "./errors-C9uIyIDt.mjs";
|
|
3
|
-
import { L as stageTag, M as imageRef, f as initStageSecrets, h as toEmbeddableSecrets } from "./credentials-
|
|
4
|
-
import { $n as runOutput, $t as imageLayout, An as envFor, At as backendsOf, Bt as assertEdgeHostsFree, Cn as applyNotifications, Dn as postgresStatements, Gt as removeEdgeRoutes, Ht as edgePorts, It as LEGACY_LOCAL_LOGIN, K as ensureDockerignore, Kn as dockerCompose, Kt as writeEdgeRoutes, Lt as ensurePostgresLogin, Mn as stageEnv, Ot as workerEnvKeys, Qt as fromBuildRoot, Rt as bucketClient, Sn as applyLifecycles, St as appEnvKeys, T as createComposeState, Tn as applyPostgres, Ut as edgeRef, Vt as assertEdgePorts, Wt as ensureEdge, _ as ensureEdgeDnsSecrets, c as replicaNames, d as withCaddyConfigs, f as withLogsPort, fn as BACKUPS_SERVICE, g as ensureEdgeAcmeKey, h as acmeDnsZone, hn as POSTGRES_SERVICE, i as composeStack, in as nextPrerenderManifest, jt as constructGlobs, k as recordRelease, l as stackDir, m as acmeDnsSecrets, n as LOOPBACK_SERVICES, r as composeProject, rn as findBuildRoot, s as envFile, t as LOG_ROTATION, vn as backupsRoleStatements, wn as applyPolicies, xn as applyBuckets, zt as pgClient } from "./stack-
|
|
5
|
-
import { B as LOGS_PORT, Dt as ComposeTlsFileMissing, Ft as SERVER_IPV4_KEY, L as resolveStageTelemetry, Rt as isReservedStageKey } from "./workspace-
|
|
3
|
+
import { L as stageTag, M as imageRef, f as initStageSecrets, h as toEmbeddableSecrets } from "./credentials-CRgp0huX.mjs";
|
|
4
|
+
import { $n as runOutput, $t as imageLayout, An as envFor, At as backendsOf, Bt as assertEdgeHostsFree, Cn as applyNotifications, Dn as postgresStatements, Gt as removeEdgeRoutes, Ht as edgePorts, It as LEGACY_LOCAL_LOGIN, K as ensureDockerignore, Kn as dockerCompose, Kt as writeEdgeRoutes, Lt as ensurePostgresLogin, Mn as stageEnv, Ot as workerEnvKeys, Qt as fromBuildRoot, Rt as bucketClient, Sn as applyLifecycles, St as appEnvKeys, T as createComposeState, Tn as applyPostgres, Ut as edgeRef, Vt as assertEdgePorts, Wt as ensureEdge, _ as ensureEdgeDnsSecrets, c as replicaNames, d as withCaddyConfigs, f as withLogsPort, fn as BACKUPS_SERVICE, g as ensureEdgeAcmeKey, h as acmeDnsZone, hn as POSTGRES_SERVICE, i as composeStack, in as nextPrerenderManifest, jt as constructGlobs, k as recordRelease, l as stackDir, m as acmeDnsSecrets, n as LOOPBACK_SERVICES, r as composeProject, rn as findBuildRoot, s as envFile, t as LOG_ROTATION, vn as backupsRoleStatements, wn as applyPolicies, xn as applyBuckets, zt as pgClient } from "./stack-B5-pHmtX.mjs";
|
|
5
|
+
import { B as LOGS_PORT, Dt as ComposeTlsFileMissing, Ft as SERVER_IPV4_KEY, L as resolveStageTelemetry, Rt as isReservedStageKey } from "./workspace-BSGUH2DO.mjs";
|
|
6
6
|
import { t as defineTarget } from "./define-BfrNaY82.mjs";
|
|
7
|
-
import { C as REDIS_SERVICE, Ct as logsAccess, E as runsRedis, O as withRedisPassword, St as LogsPortTaken, X as usesTelemetry, d as loadLocalCredentials, g as withGeneratedSecrets, kt as withLogsLogin, mt as primaryPortKey, xt as LOGS_SERVICE } from "./credentials-
|
|
7
|
+
import { C as REDIS_SERVICE, Ct as logsAccess, E as runsRedis, O as withRedisPassword, St as LogsPortTaken, X as usesTelemetry, d as loadLocalCredentials, g as withGeneratedSecrets, kt as withLogsLogin, mt as primaryPortKey, xt as LOGS_SERVICE } from "./credentials-0Kmo6GAw.mjs";
|
|
8
8
|
import { o as installedFrom } from "./drivers-BQRb3KsL.mjs";
|
|
9
9
|
import { i as discover } from "./discover-Dfmn6HQ7.mjs";
|
|
10
|
-
import { a as provisionedTopics, c as subscriptionResource, f as isLocalHost, g as serverAddressHint, h as requiredServerAddress, i as confirmPendingSubscriptions, l as topicConnection, n as SUBSCRIPTION_TYPE, o as recordedPushSubscriptions, s as subscriptionKey, t as PushSubscriptionsUnconfirmed, u as HostNotPointingAtServer, v as stackHosts, x as systemLookup, y as stageDns } from "./snsSubscriptions-
|
|
10
|
+
import { a as provisionedTopics, c as subscriptionResource, f as isLocalHost, g as serverAddressHint, h as requiredServerAddress, i as confirmPendingSubscriptions, l as topicConnection, n as SUBSCRIPTION_TYPE, o as recordedPushSubscriptions, s as subscriptionKey, t as PushSubscriptionsUnconfirmed, u as HostNotPointingAtServer, v as stackHosts, x as systemLookup, y as stageDns } from "./snsSubscriptions-BQcD_3UK.mjs";
|
|
11
11
|
import { d as dnsResources, f as forgetDnsResource, i as currentActor, n as reportDatabaseRuns, p as recordDnsChanges, r as reportPlannedSeeds, s as DeployJournal, t as DeploySeedsFailed, u as dnsResourceKey } from "./seeds-Ccn0Ru2T.mjs";
|
|
12
12
|
import { f as plannedSeeds, o as SeedFailed, p as seedDatabases, u as migrateDatabases } from "./databases-CV22HzrI.mjs";
|
|
13
13
|
import { dirname, join, relative } from "node:path";
|
|
@@ -545,6 +545,83 @@ var ComposeAppsUnhealthy = class extends GkmError {
|
|
|
545
545
|
}
|
|
546
546
|
};
|
|
547
547
|
//#endregion
|
|
548
|
+
//#region src/target/compose/startupCheck.ts
|
|
549
|
+
/**
|
|
550
|
+
* The startup check (`gkm compose --stage <stage> --build --check`): every
|
|
551
|
+
* image the build produced, started before anything is pushed.
|
|
552
|
+
*
|
|
553
|
+
* A bundle that builds, typechecks and passes every test can still fail to
|
|
554
|
+
* start — a package that finds its own files at runtime, inlined into the
|
|
555
|
+
* bundle and so not in the image's `node_modules`. Tests run from source,
|
|
556
|
+
* where `node_modules` is, so the first place that shows is the server.
|
|
557
|
+
*
|
|
558
|
+
* So the images are started here, on the machine that built them, with a
|
|
559
|
+
* deployed stage's real secrets — never fakes, which would prove only that
|
|
560
|
+
* the image starts against the fakes — and the backing services the stack
|
|
561
|
+
* declares (Postgres, Redis, …) started beside them, migrated. Each app,
|
|
562
|
+
* worker and processor must pass its own health check, or the check fails
|
|
563
|
+
* naming it, with its last log lines, and nothing is pushed.
|
|
564
|
+
*
|
|
565
|
+
* The stage is one that is not protected: a check runs on every pull request,
|
|
566
|
+
* and a protected stage's secrets are not handed to one.
|
|
567
|
+
*/
|
|
568
|
+
/** The compose project a stage's check runs as, never the stage's own. */
|
|
569
|
+
function checkProject(project) {
|
|
570
|
+
return `${project}-check`;
|
|
571
|
+
}
|
|
572
|
+
/** `--check` with no build: there is nothing built here to start. */
|
|
573
|
+
var StartupCheckNeedsBuild = class extends GkmError {
|
|
574
|
+
constructor() {
|
|
575
|
+
super("--check starts the images this checkout builds, so it needs --build (and never --pull): gkm compose --stage <stage> --build --check.");
|
|
576
|
+
this.name = "StartupCheckNeedsBuild";
|
|
577
|
+
}
|
|
578
|
+
};
|
|
579
|
+
/** `--check` of a stage that is not deployed: it has no real secrets. */
|
|
580
|
+
var StartupCheckNeedsDeployedStage = class extends GkmError {
|
|
581
|
+
stage;
|
|
582
|
+
deployed;
|
|
583
|
+
constructor(stage, deployed) {
|
|
584
|
+
super(`'${stage}' is not a deployed stage, and a startup check runs with a deployed stage's real secrets. Check one of the deployed stages that is not protected: ${deployed.join(", ") || "(none is declared)"}.`);
|
|
585
|
+
this.stage = stage;
|
|
586
|
+
this.deployed = deployed;
|
|
587
|
+
this.name = "StartupCheckNeedsDeployedStage";
|
|
588
|
+
}
|
|
589
|
+
};
|
|
590
|
+
/** `--check` of a protected stage, whose secrets a check is never given. */
|
|
591
|
+
var StartupCheckStageProtected = class extends GkmError {
|
|
592
|
+
stage;
|
|
593
|
+
checkable;
|
|
594
|
+
constructor(stage, checkable) {
|
|
595
|
+
super(`'${stage}' is protected (stages.protected), and a startup check is never given a protected stage's secrets: it runs on every pull request. ` + (checkable.length > 0 ? `Check ${checkable.map((s) => `'${s}'`).join(" or ")} instead.` : "Declare a deployed stage that is not protected, and check that."));
|
|
596
|
+
this.stage = stage;
|
|
597
|
+
this.checkable = checkable;
|
|
598
|
+
this.name = "StartupCheckStageProtected";
|
|
599
|
+
}
|
|
600
|
+
};
|
|
601
|
+
/** Images that did not start: each one, what Docker said, and its logs. */
|
|
602
|
+
var StartupCheckFailed = class extends GkmError {
|
|
603
|
+
stage;
|
|
604
|
+
apps;
|
|
605
|
+
constructor(stage, apps) {
|
|
606
|
+
const one = apps.length === 1;
|
|
607
|
+
super(`${one ? "This image" : "These images"} did not start with '${stage}''s secrets, so nothing was pushed:\n` + apps.map(({ app, last, logs }) => ` - ${app}: Docker reports it ${last}` + (logs ? `. Its last lines:\n${logs.split("\n").map((line) => ` ${line}`).join("\n")}` : ", and it logged nothing.")).join("\n") + `\nA package that reads its own files at runtime is bundled without them: run the image with \`gkm compose --stage ${stage} --build --check\` until ${one ? "it starts" : "they start"}.`);
|
|
608
|
+
this.stage = stage;
|
|
609
|
+
this.apps = apps;
|
|
610
|
+
this.name = "StartupCheckFailed";
|
|
611
|
+
}
|
|
612
|
+
};
|
|
613
|
+
/**
|
|
614
|
+
* Refuse a check gkm cannot run honestly: one that builds nothing, of a stage
|
|
615
|
+
* with no real secrets, or of a protected stage.
|
|
616
|
+
*/
|
|
617
|
+
function assertCheckable(workspace, stage, mode) {
|
|
618
|
+
if (mode !== "build") throw new StartupCheckNeedsBuild();
|
|
619
|
+
const { deployed, protected: kept = [] } = workspace.stages;
|
|
620
|
+
const checkable = deployed.filter((name) => !kept.includes(name));
|
|
621
|
+
if (!deployed.includes(stage)) throw new StartupCheckNeedsDeployedStage(stage, checkable);
|
|
622
|
+
if (kept.includes(stage)) throw new StartupCheckStageProtected(stage, checkable);
|
|
623
|
+
}
|
|
624
|
+
//#endregion
|
|
548
625
|
//#region src/target/compose/topicSubscriptions.ts
|
|
549
626
|
/**
|
|
550
627
|
* Every topic subscriber the stack pushes to: a subscriber whose connection
|
|
@@ -974,7 +1051,9 @@ async function validateCompose(ctx, deps, options = {}) {
|
|
|
974
1051
|
const root = workspace.root;
|
|
975
1052
|
const mode = options.mode ?? (ctx.tagGiven ? "pull" : "build");
|
|
976
1053
|
const push = options.push === true;
|
|
1054
|
+
const check = options.check === true;
|
|
977
1055
|
if (push && mode !== "build") throw new ComposePushNeedsBuild();
|
|
1056
|
+
if (check) assertCheckable(workspace, stage, mode);
|
|
978
1057
|
if (options.pin && mode !== "pull") throw new ComposePinNeedsPull();
|
|
979
1058
|
const registry = workspace.deploy?.registry;
|
|
980
1059
|
if (!registry && (push || mode === "pull")) throw new RegistryRequired(push ? "push" : "pull", imageRef(identity, ctx.apps[0] ?? workspace.name, void 0, stageTag(tag, stage)));
|
|
@@ -987,7 +1066,7 @@ async function validateCompose(ctx, deps, options = {}) {
|
|
|
987
1066
|
subscribers
|
|
988
1067
|
});
|
|
989
1068
|
const { secrets, generated } = await stageSecrets(ctx, manifest);
|
|
990
|
-
const recorded = push ? void 0 : await ctx.state.read(stage);
|
|
1069
|
+
const recorded = push || check ? void 0 : await ctx.state.read(stage);
|
|
991
1070
|
const layout = mode === "build" ? imageLayout(workspace) : void 0;
|
|
992
1071
|
const input = {
|
|
993
1072
|
workspace,
|
|
@@ -1006,11 +1085,11 @@ async function validateCompose(ctx, deps, options = {}) {
|
|
|
1006
1085
|
allowDevServices: ctx.allowDevServices,
|
|
1007
1086
|
ports: edgePorts(deps.env),
|
|
1008
1087
|
...layout ? { layout } : {},
|
|
1009
|
-
...push ? { buildOnly: true } : {},
|
|
1088
|
+
...push && !check ? { buildOnly: true } : {},
|
|
1010
1089
|
...mode === "build" ? { prerenderRun: (/* @__PURE__ */ new Date()).toISOString() } : {}
|
|
1011
1090
|
};
|
|
1012
1091
|
const recordedArns = recordedPushSubscriptions(recorded?.resources);
|
|
1013
|
-
const planned = push ? void 0 : composeStack({
|
|
1092
|
+
const planned = push || check ? void 0 : composeStack({
|
|
1014
1093
|
...input,
|
|
1015
1094
|
recordingSubscriptions: true
|
|
1016
1095
|
});
|
|
@@ -1037,14 +1116,14 @@ async function validateCompose(ctx, deps, options = {}) {
|
|
|
1037
1116
|
ctx.secrets.mask(stack.logs.password);
|
|
1038
1117
|
ctx.secrets.mask(stack.logs.appEnv.OTEL_EXPORTER_OTLP_HEADERS);
|
|
1039
1118
|
}
|
|
1040
|
-
if (!push && !stack.local) {
|
|
1119
|
+
if (!push && !check && !stack.local) {
|
|
1041
1120
|
requiredServerAddress(stage, workspace.domains?.[stage], secrets?.custom);
|
|
1042
1121
|
if (stack.proxy === "traefik" && stack.wildcard?.tls === "dns") {
|
|
1043
1122
|
const zone = acmeDnsZone(workspace, stage);
|
|
1044
1123
|
if (zone) acmeDnsSecrets(zone, stage, secrets?.custom);
|
|
1045
1124
|
}
|
|
1046
1125
|
}
|
|
1047
|
-
const server = push ? void 0 : composeServer({
|
|
1126
|
+
const server = push || check ? void 0 : composeServer({
|
|
1048
1127
|
stage,
|
|
1049
1128
|
local: stack.local,
|
|
1050
1129
|
config: workspace.deploy?.compose?.server,
|
|
@@ -1065,6 +1144,7 @@ async function validateCompose(ctx, deps, options = {}) {
|
|
|
1065
1144
|
return {
|
|
1066
1145
|
mode,
|
|
1067
1146
|
push,
|
|
1147
|
+
check,
|
|
1068
1148
|
stack,
|
|
1069
1149
|
...topics ? { topicSubscriptions: {
|
|
1070
1150
|
...topics,
|
|
@@ -1083,7 +1163,7 @@ async function validateCompose(ctx, deps, options = {}) {
|
|
|
1083
1163
|
...server ? { server } : {},
|
|
1084
1164
|
dir,
|
|
1085
1165
|
ref: {
|
|
1086
|
-
project: composeProject(identity),
|
|
1166
|
+
project: check ? checkProject(composeProject(identity)) : composeProject(identity),
|
|
1087
1167
|
file: join(dir, "docker-compose.yml"),
|
|
1088
1168
|
...overrides.length > 0 ? { overrides } : {},
|
|
1089
1169
|
cwd: root,
|
|
@@ -1611,6 +1691,13 @@ async function prepareBuckets(ctx, run, deps) {
|
|
|
1611
1691
|
* reaches the stack's MinIO as well.
|
|
1612
1692
|
*/
|
|
1613
1693
|
async function prepareDatabases(ctx, run, deps) {
|
|
1694
|
+
await reachLoopback(run, deps, (ports) => migrateAndSeed(ctx, run, deps, ports));
|
|
1695
|
+
}
|
|
1696
|
+
/**
|
|
1697
|
+
* Every service the stack publishes on its loopback, reached from this
|
|
1698
|
+
* machine for as long as `body` runs — each by its port key.
|
|
1699
|
+
*/
|
|
1700
|
+
async function reachLoopback(run, deps, body) {
|
|
1614
1701
|
const tunnels = [];
|
|
1615
1702
|
try {
|
|
1616
1703
|
const ports = {};
|
|
@@ -1620,7 +1707,7 @@ async function prepareDatabases(ctx, run, deps) {
|
|
|
1620
1707
|
tunnels.push(tunnel);
|
|
1621
1708
|
ports[primaryPortKey(service)] = tunnel.port;
|
|
1622
1709
|
}
|
|
1623
|
-
await
|
|
1710
|
+
await body(ports);
|
|
1624
1711
|
} finally {
|
|
1625
1712
|
await Promise.all(tunnels.map((tunnel) => tunnel.close()));
|
|
1626
1713
|
}
|
|
@@ -1643,7 +1730,7 @@ async function reach(run, deps, service, inside) {
|
|
|
1643
1730
|
};
|
|
1644
1731
|
return deps.server.tunnel(run.server, published);
|
|
1645
1732
|
}
|
|
1646
|
-
async function migrateAndSeed(ctx, run, deps, ports) {
|
|
1733
|
+
async function migrateAndSeed(ctx, run, deps, ports, seeds = true) {
|
|
1647
1734
|
const { stack } = run;
|
|
1648
1735
|
const workspace = ctx.workspace;
|
|
1649
1736
|
const port = ports[primaryPortKey("postgres")];
|
|
@@ -1659,8 +1746,8 @@ async function migrateAndSeed(ctx, run, deps, ports) {
|
|
|
1659
1746
|
if (login.notice) ctx.logger.info(login.notice);
|
|
1660
1747
|
const statements = [...postgresStatements(stack.plan, workspace.name, stack.credential.seed), ...stack.backups ? backupsRoleStatements(stack.backups) : []];
|
|
1661
1748
|
if (statements.length > 0) {
|
|
1662
|
-
|
|
1663
|
-
|
|
1749
|
+
const created = (await applyPostgres(deps.sql(port, login.login), statements)).filter((entry) => entry.created);
|
|
1750
|
+
ctx.logger.info(created.length > 0 ? `🗄️ Created ${created.map((entry) => entry.describe).join(", ")}` : "🗄️ Databases and roles already in place");
|
|
1664
1751
|
}
|
|
1665
1752
|
const sources = {};
|
|
1666
1753
|
const manifest = await discover({
|
|
@@ -1685,7 +1772,7 @@ async function migrateAndSeed(ctx, run, deps, ports) {
|
|
|
1685
1772
|
env
|
|
1686
1773
|
};
|
|
1687
1774
|
const runs = await deps.migrate(options);
|
|
1688
|
-
const
|
|
1775
|
+
const seeded = !seeds ? [] : await deps.seed({
|
|
1689
1776
|
...options,
|
|
1690
1777
|
stage: ctx.stage,
|
|
1691
1778
|
backends: backendsOf(workspace)
|
|
@@ -1697,7 +1784,7 @@ async function migrateAndSeed(ctx, run, deps, ports) {
|
|
|
1697
1784
|
construct: target.id,
|
|
1698
1785
|
folder: target.migrations,
|
|
1699
1786
|
applied
|
|
1700
|
-
})),
|
|
1787
|
+
})), seeded.map(({ target, seeded }) => ({
|
|
1701
1788
|
construct: target.id,
|
|
1702
1789
|
folder: target.seeds,
|
|
1703
1790
|
seeded
|
|
@@ -1716,13 +1803,13 @@ async function buildCompose(ctx, run, deps) {
|
|
|
1716
1803
|
...stack.processors
|
|
1717
1804
|
];
|
|
1718
1805
|
const apps = images.map((image) => image.app);
|
|
1719
|
-
if (run
|
|
1806
|
+
if (buildsOnly(run)) {
|
|
1720
1807
|
run.files = await writeStack(ctx.cwd, run.dir, stack);
|
|
1721
1808
|
printPlan(ctx, run);
|
|
1722
1809
|
}
|
|
1723
1810
|
const prerendered = prerenderedHere(run);
|
|
1724
|
-
if (run
|
|
1725
|
-
const held = new Set(run
|
|
1811
|
+
if (buildsOnly(run)) await stageAnswers(ctx, run, deps, prerendered);
|
|
1812
|
+
const held = new Set(buildsOnly(run) ? [] : prerendered.map(({ app }) => app));
|
|
1726
1813
|
const now = images.filter((image) => !held.has(image.app));
|
|
1727
1814
|
if (run.mode === "build") {
|
|
1728
1815
|
ctx.logger.info("\n🐳 Building images…");
|
|
@@ -1731,10 +1818,18 @@ async function buildCompose(ctx, run, deps) {
|
|
|
1731
1818
|
ctx.logger.info(`\n🐳 Pulling ${stageTag(ctx.tag, ctx.stage)}…`);
|
|
1732
1819
|
await deps.docker.pull(ref, apps);
|
|
1733
1820
|
}
|
|
1821
|
+
if (run.check) await startupCheck(ctx, run, deps);
|
|
1734
1822
|
if (run.push) ctx.logger.info("\n📤 Pushing images…");
|
|
1735
1823
|
await recordBuilt(ctx, run, deps, now);
|
|
1736
1824
|
}
|
|
1737
1825
|
/**
|
|
1826
|
+
* Whether the run only builds — to push, or to check — so nothing is
|
|
1827
|
+
* provisioned, released or recorded, and no stage's server is reached.
|
|
1828
|
+
*/
|
|
1829
|
+
function buildsOnly(run) {
|
|
1830
|
+
return run.push || run.check;
|
|
1831
|
+
}
|
|
1832
|
+
/**
|
|
1738
1833
|
* Each image's tag as it resolved — the registry's digest for a pushed or
|
|
1739
1834
|
* pulled image, or, for one built here and never pushed, its content id —
|
|
1740
1835
|
* in the run, and said.
|
|
@@ -1837,13 +1932,25 @@ async function releaseCompose(ctx, run, deps) {
|
|
|
1837
1932
|
* health's, and it is thrown as it was.
|
|
1838
1933
|
*/
|
|
1839
1934
|
async function unhealthyAfterUp(ctx, run, deps, error, except = /* @__PURE__ */ new Set()) {
|
|
1840
|
-
const
|
|
1841
|
-
|
|
1935
|
+
const down = await notHealthy(ctx, run, deps, imageServices(run.stack).filter((service) => !except.has(service)));
|
|
1936
|
+
if (down.length === 0) throw error;
|
|
1937
|
+
ctx.logger.warn(`\n⚠️ ${down.map(({ app }) => app).join(", ")} did not turn healthy; the rest of the stack is released and routed.`);
|
|
1938
|
+
return down;
|
|
1939
|
+
}
|
|
1940
|
+
/** Every service of the stack that runs one of its images: apps, workers, processors. */
|
|
1941
|
+
function imageServices(stack) {
|
|
1942
|
+
return [
|
|
1842
1943
|
...stack.apps.flatMap(replicaNames),
|
|
1843
1944
|
...stack.workers.map((worker) => worker.name),
|
|
1844
1945
|
...stack.processors.map((unit) => unit.name)
|
|
1845
|
-
]
|
|
1846
|
-
|
|
1946
|
+
];
|
|
1947
|
+
}
|
|
1948
|
+
/**
|
|
1949
|
+
* Each of `services` that is not healthy once its health settles — waited on
|
|
1950
|
+
* while it is still starting, as `--wait` stops at the first that is not.
|
|
1951
|
+
*/
|
|
1952
|
+
async function notHealthy(ctx, run, deps, services) {
|
|
1953
|
+
return (await Promise.all(services.map(async (service) => {
|
|
1847
1954
|
let last;
|
|
1848
1955
|
for (let attempt = 1; attempt <= deps.healthAttempts; attempt++) {
|
|
1849
1956
|
ctx.signal.throwIfAborted();
|
|
@@ -1861,9 +1968,46 @@ async function unhealthyAfterUp(ctx, run, deps, error, except = /* @__PURE__ */
|
|
|
1861
1968
|
url,
|
|
1862
1969
|
last: last ?? "not running"
|
|
1863
1970
|
}));
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1971
|
+
}
|
|
1972
|
+
/**
|
|
1973
|
+
* The startup check (`--check`, see `startupCheck.ts`): every image built
|
|
1974
|
+
* here started on this machine, as its own compose project, with the stage's
|
|
1975
|
+
* secrets and the stack's backing services — migrated, not seeded — and
|
|
1976
|
+
* each one healthy by its own check. One that is not fails the run, named,
|
|
1977
|
+
* with its last log lines. The project is removed, volumes and all, however
|
|
1978
|
+
* it ends.
|
|
1979
|
+
*/
|
|
1980
|
+
async function startupCheck(ctx, run, deps) {
|
|
1981
|
+
const { stack, ref } = run;
|
|
1982
|
+
const services = imageServices(stack);
|
|
1983
|
+
ctx.logger.info(`\n🩺 Starting ${services.length} image(s) with ${ctx.stage}'s secrets, before anything is pushed…`);
|
|
1984
|
+
try {
|
|
1985
|
+
for (const network of Object.values(stack.compose.networks ?? {})) if (network.external) await deps.docker.ensureNetwork(ref, network.name);
|
|
1986
|
+
if (stack.infra.length > 0) {
|
|
1987
|
+
ctx.logger.info(`🗄️ Starting ${stack.infra.join(", ")}…`);
|
|
1988
|
+
await deps.docker.up(ref, stack.infra);
|
|
1989
|
+
}
|
|
1990
|
+
if (stack.storage && stack.infra.includes("minio")) await prepareBuckets(ctx, run, deps);
|
|
1991
|
+
if (stack.infra.includes("postgres")) await reachLoopback(run, deps, (ports) => migrateAndSeed(ctx, run, deps, ports, false));
|
|
1992
|
+
const down = await deps.docker.up(ref, services).then(() => [], async (error) => {
|
|
1993
|
+
const found = await notHealthy(ctx, run, deps, services);
|
|
1994
|
+
if (found.length === 0) throw error;
|
|
1995
|
+
return found;
|
|
1996
|
+
});
|
|
1997
|
+
if (down.length > 0) {
|
|
1998
|
+
const failed = await Promise.all(down.map(async ({ app, last }) => ({
|
|
1999
|
+
app,
|
|
2000
|
+
last,
|
|
2001
|
+
logs: await deps.docker.logs(ref, app, 50).catch(() => "")
|
|
2002
|
+
})));
|
|
2003
|
+
throw new StartupCheckFailed(ctx.stage, failed);
|
|
2004
|
+
}
|
|
2005
|
+
} finally {
|
|
2006
|
+
await deps.docker.down(ref, { volumes: true }).catch((error) => {
|
|
2007
|
+
ctx.logger.warn(`⚠️ Could not remove the check's stack (${ref.project}): ${error instanceof Error ? error.message : String(error)}. Remove it with \`docker compose -p ${ref.project} down --volumes\`.`);
|
|
2008
|
+
});
|
|
2009
|
+
}
|
|
2010
|
+
ctx.logger.info(`✅ Every image started with ${ctx.stage}'s secrets and passed its health check.`);
|
|
1867
2011
|
}
|
|
1868
2012
|
/**
|
|
1869
2013
|
* Where a check through the edge connects: this machine for the local stage,
|
|
@@ -1928,7 +2072,7 @@ async function stageAnswers(ctx, run, deps, sites) {
|
|
|
1928
2072
|
ctx.logger.info(`\n🩺 Checking the APIs ${listNames(sites)} ${sites.length > 1 ? "pre-render" : "pre-renders"} from…`);
|
|
1929
2073
|
const ca = await verifyAuthority(stack);
|
|
1930
2074
|
const edge = edgeTarget(run, deps);
|
|
1931
|
-
const results = await Promise.all(apps.map((app) => app.id === stack.wildcard?.site && !run
|
|
2075
|
+
const results = await Promise.all(apps.map((app) => app.id === stack.wildcard?.site && !buildsOnly(run) ? checkContainer(ctx, run, deps, app.name) : checkApp(ctx, app, deps, {
|
|
1932
2076
|
ca,
|
|
1933
2077
|
edge
|
|
1934
2078
|
})));
|
|
@@ -1938,7 +2082,7 @@ async function stageAnswers(ctx, run, deps, sites) {
|
|
|
1938
2082
|
const result = down.get(name);
|
|
1939
2083
|
return result ? [result] : [];
|
|
1940
2084
|
});
|
|
1941
|
-
if (blocking.length > 0) throw new SitePrerenderApisDown(site.name, blocking, run
|
|
2085
|
+
if (blocking.length > 0) throw new SitePrerenderApisDown(site.name, blocking, buildsOnly(run) ? "push" : "edge");
|
|
1942
2086
|
}
|
|
1943
2087
|
}
|
|
1944
2088
|
/**
|
|
@@ -2448,13 +2592,21 @@ function printPlan(ctx, run) {
|
|
|
2448
2592
|
* readiness check runs, so a stage whose keys the deploy has yet to write
|
|
2449
2593
|
* still builds.
|
|
2450
2594
|
*
|
|
2595
|
+
* With `check` (`gkm compose --build --check`), also run with `buildOnly`,
|
|
2596
|
+
* every image built is started on this machine with the stage's secrets and
|
|
2597
|
+
* the stack's backing services, and must turn healthy before any is pushed
|
|
2598
|
+
* — see `startupCheck.ts`.
|
|
2599
|
+
*
|
|
2451
2600
|
* `gkm compose` is this target with a few more switches (`--build`, `--pull`,
|
|
2452
2601
|
* `--down`), run through the same `deploy()`.
|
|
2453
2602
|
*/
|
|
2454
|
-
var compose_exports = /* @__PURE__ */ __exportAll({
|
|
2603
|
+
var compose_exports = /* @__PURE__ */ __exportAll({
|
|
2604
|
+
CHECK_LOG_LINES: () => 50,
|
|
2605
|
+
composeTarget: () => composeTarget
|
|
2606
|
+
});
|
|
2455
2607
|
/** The compose target, with its Docker, bundler and probe as given. */
|
|
2456
2608
|
function composeTarget(options = {}) {
|
|
2457
|
-
const { mode, push, pin, report, ...given } = options;
|
|
2609
|
+
const { mode, push, check, pin, report, ...given } = options;
|
|
2458
2610
|
const deps = {
|
|
2459
2611
|
...defaultDeps,
|
|
2460
2612
|
...given
|
|
@@ -2474,6 +2626,7 @@ function composeTarget(options = {}) {
|
|
|
2474
2626
|
validate: (ctx) => validateCompose(ctx, deps, {
|
|
2475
2627
|
...mode ? { mode } : {},
|
|
2476
2628
|
...push ? { push } : {},
|
|
2629
|
+
...check ? { check } : {},
|
|
2477
2630
|
...pin ? { pin } : {}
|
|
2478
2631
|
}),
|
|
2479
2632
|
ready: (ctx, run) => readyCompose(ctx, run, deps),
|
|
@@ -2489,6 +2642,6 @@ function composeTarget(options = {}) {
|
|
|
2489
2642
|
});
|
|
2490
2643
|
}
|
|
2491
2644
|
//#endregion
|
|
2492
|
-
export { stackOverrideFile as a,
|
|
2645
|
+
export { stackOverrideFile as a, deployedStackSecrets as c, composeServer as d, dockerHost as f, ComposePushNeedsBuild as i, parseDigests as l, sshTarget as m, compose_exports as n, StartupCheckNeedsBuild as o, sshAccess as p, ComposePinNeedsPull as r, assertCheckable as s, composeTarget as t, pinnedRef as u };
|
|
2493
2646
|
|
|
2494
|
-
//# sourceMappingURL=compose-
|
|
2647
|
+
//# sourceMappingURL=compose-BE2Fi1Bs.mjs.map
|