@geekmidas/cli 10.0.0-alpha.121 → 10.0.0-alpha.123
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{GoDaddyProvider-D0MQoOM4.mjs → GoDaddyProvider-BlB5nJky.mjs} +2 -2
- package/dist/{GoDaddyProvider-D0MQoOM4.mjs.map → GoDaddyProvider-BlB5nJky.mjs.map} +1 -1
- package/dist/{GoDaddyProvider-3C8U_tVu.cjs → GoDaddyProvider-Dubq-pCc.cjs} +2 -2
- package/dist/{GoDaddyProvider-3C8U_tVu.cjs.map → GoDaddyProvider-Dubq-pCc.cjs.map} +1 -1
- package/dist/{LegacyStateStore-DHsoQGOo.cjs → LegacyStateStore-ClvUC8qy.cjs} +3 -3
- package/dist/{LegacyStateStore-DHsoQGOo.cjs.map → LegacyStateStore-ClvUC8qy.cjs.map} +1 -1
- package/dist/{LegacyStateStore-CRi7TosX.mjs → LegacyStateStore-DGALQGZu.mjs} +3 -3
- package/dist/{LegacyStateStore-CRi7TosX.mjs.map → LegacyStateStore-DGALQGZu.mjs.map} +1 -1
- package/dist/{LocalStateStore-BQXTkeoS.cjs → LocalStateStore-43kSYNpw.cjs} +2 -2
- package/dist/{LocalStateStore-BQXTkeoS.cjs.map → LocalStateStore-43kSYNpw.cjs.map} +1 -1
- package/dist/{LocalStateStore-Dkth0jXX.mjs → LocalStateStore-CBYUzVR5.mjs} +2 -2
- package/dist/{LocalStateStore-Dkth0jXX.mjs.map → LocalStateStore-CBYUzVR5.mjs.map} +1 -1
- package/dist/{S3StateStore-pZZnLLBd.mjs → S3StateStore-DLHjDYYP.mjs} +2 -2
- package/dist/{S3StateStore-pZZnLLBd.mjs.map → S3StateStore-DLHjDYYP.mjs.map} +1 -1
- package/dist/{S3StateStore-DGKZgyKz.cjs → S3StateStore-ahE7hSNK.cjs} +2 -2
- package/dist/{S3StateStore-DGKZgyKz.cjs.map → S3StateStore-ahE7hSNK.cjs.map} +1 -1
- package/dist/{SSMStateStore-CZRMERDA.mjs → SSMStateStore-j5RuMkch.mjs} +2 -2
- package/dist/{SSMStateStore-CZRMERDA.mjs.map → SSMStateStore-j5RuMkch.mjs.map} +1 -1
- package/dist/{SSMStateStore-DzkyjQ5D.cjs → SSMStateStore-qIzIuazA.cjs} +2 -2
- package/dist/{SSMStateStore-DzkyjQ5D.cjs.map → SSMStateStore-qIzIuazA.cjs.map} +1 -1
- package/dist/{add-C0kXOsWS.mjs → add-Bm-C56lH.mjs} +4 -4
- package/dist/{add-C0kXOsWS.mjs.map → add-Bm-C56lH.mjs.map} +1 -1
- package/dist/{add-Df8cmz0H.cjs → add-C2CvXrYw.cjs} +4 -4
- package/dist/{add-Df8cmz0H.cjs.map → add-C2CvXrYw.cjs.map} +1 -1
- package/dist/{bundler-Dx_grUmc.cjs → bundler-Dk7tAvAX.cjs} +5 -5
- package/dist/{bundler-Dx_grUmc.cjs.map → bundler-Dk7tAvAX.cjs.map} +1 -1
- package/dist/{bundler-B-I4Du99.mjs → bundler-DnkFt4mn.mjs} +5 -5
- package/dist/{bundler-B-I4Du99.mjs.map → bundler-DnkFt4mn.mjs.map} +1 -1
- package/dist/{cli-DL7GxGAe.mjs → cli-CVeHFXNE.mjs} +2 -2
- package/dist/{cli-DL7GxGAe.mjs.map → cli-CVeHFXNE.mjs.map} +1 -1
- package/dist/{cli-Cd9exatJ.cjs → cli-Di464j1O.cjs} +2 -2
- package/dist/{cli-Cd9exatJ.cjs.map → cli-Di464j1O.cjs.map} +1 -1
- package/dist/{compose-Mdgea4Yt.cjs → compose-ChVvb3xM.cjs} +65 -13
- package/dist/compose-ChVvb3xM.cjs.map +1 -0
- package/dist/{compose-C43c03WZ.mjs → compose-cHkF---f.mjs} +65 -13
- package/dist/compose-cHkF---f.mjs.map +1 -0
- package/dist/{config-D48erO2j.d.mts → config-B3iz9BtK.d.cts} +4 -4
- package/dist/{config-D48erO2j.d.mts.map → config-B3iz9BtK.d.cts.map} +1 -1
- package/dist/{config-DHDtsQrB.d.cts → config-DrOX29sT.d.mts} +4 -4
- package/dist/{config-DHDtsQrB.d.cts.map → config-DrOX29sT.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/deploy/public.cjs +7 -7
- package/dist/deploy/public.d.cts +5 -5
- package/dist/deploy/public.d.cts.map +1 -1
- package/dist/deploy/public.d.mts +5 -5
- package/dist/deploy/public.d.mts.map +1 -1
- package/dist/deploy/public.mjs +7 -7
- package/dist/{deploy-BMM2hx-K.cjs → deploy-BffR_uEN.cjs} +7 -6
- package/dist/{deploy-BMM2hx-K.cjs.map → deploy-BffR_uEN.cjs.map} +1 -1
- package/dist/{deploy-D5YhwDng.mjs → deploy-DO4djCHb.mjs} +7 -6
- package/dist/{deploy-D5YhwDng.mjs.map → deploy-DO4djCHb.mjs.map} +1 -1
- package/dist/{discover-CSW_BMWa.d.cts → discover-C08meHhu.d.mts} +2 -2
- package/dist/{discover-CSW_BMWa.d.cts.map → discover-C08meHhu.d.mts.map} +1 -1
- package/dist/{discover-xtT7fgWg.d.mts → discover-DipvfWpK.d.cts} +2 -2
- package/dist/{discover-xtT7fgWg.d.mts.map → discover-DipvfWpK.d.cts.map} +1 -1
- package/dist/{dns-BIYf20p7.cjs → dns-Bmnuttja.cjs} +346 -27
- package/dist/dns-Bmnuttja.cjs.map +1 -0
- package/dist/{dns-agf2VCdV.mjs → dns-DFvO5a53.mjs} +317 -30
- package/dist/dns-DFvO5a53.mjs.map +1 -0
- package/dist/{dokploy-2p4PK6ej.mjs → dokploy-BcZm93Cc.mjs} +2 -2
- package/dist/{dokploy-2p4PK6ej.mjs.map → dokploy-BcZm93Cc.mjs.map} +1 -1
- package/dist/{dokploy-BANMTroy.cjs → dokploy-CsdvfH3t.cjs} +2 -2
- package/dist/{dokploy-BANMTroy.cjs.map → dokploy-CsdvfH3t.cjs.map} +1 -1
- package/dist/{eas-iT2JDHCh.mjs → eas-CBShP20v.mjs} +2 -2
- package/dist/{eas-iT2JDHCh.mjs.map → eas-CBShP20v.mjs.map} +1 -1
- package/dist/{eas-CNi16SoO.cjs → eas-CN_cUXth.cjs} +2 -2
- package/dist/{eas-CNi16SoO.cjs.map → eas-CN_cUXth.cjs.map} +1 -1
- package/dist/{encryption-DkXVbyZc.mjs → encryption-CITa6dXL.mjs} +3 -3
- package/dist/{encryption-DkXVbyZc.mjs.map → encryption-CITa6dXL.mjs.map} +1 -1
- package/dist/{encryption-d2lLtkYx.cjs → encryption-CPDM49Hi.cjs} +3 -3
- package/dist/{encryption-d2lLtkYx.cjs.map → encryption-CPDM49Hi.cjs.map} +1 -1
- package/dist/{engine-CatKW6E-.mjs → engine-CTnHmHjz.mjs} +4 -4
- package/dist/{engine-CatKW6E-.mjs.map → engine-CTnHmHjz.mjs.map} +1 -1
- package/dist/{engine-DlEHexED.cjs → engine-D-jfMVj-.cjs} +4 -4
- package/dist/{engine-DlEHexED.cjs.map → engine-D-jfMVj-.cjs.map} +1 -1
- package/dist/{github-DErsqKGN.mjs → github-9RlA7EjN.mjs} +5 -5
- package/dist/{github-DErsqKGN.mjs.map → github-9RlA7EjN.mjs.map} +1 -1
- package/dist/{github-BAeaC1Pl.cjs → github-D56PSK39.cjs} +5 -5
- package/dist/{github-BAeaC1Pl.cjs.map → github-D56PSK39.cjs.map} +1 -1
- package/dist/{googlePlay-BXJ5ZjMK.mjs → googlePlay-COi5LXON.mjs} +3 -3
- package/dist/{googlePlay-BXJ5ZjMK.mjs.map → googlePlay-COi5LXON.mjs.map} +1 -1
- package/dist/{googlePlay-BVcfFWRO.cjs → googlePlay-SX_jQeJf.cjs} +3 -3
- package/dist/{googlePlay-BVcfFWRO.cjs.map → googlePlay-SX_jQeJf.cjs.map} +1 -1
- package/dist/{index-8OfpOtSI.d.cts → index-DcyRA5Rf.d.mts} +2 -2
- package/dist/{index-8OfpOtSI.d.cts.map → index-DcyRA5Rf.d.mts.map} +1 -1
- package/dist/{index-Dpji6Bxq.d.mts → index-DjLSMgAL.d.cts} +2 -2
- package/dist/{index-Dpji6Bxq.d.mts.map → index-DjLSMgAL.d.cts.map} +1 -1
- package/dist/index.cjs +53 -53
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +53 -53
- package/dist/index.mjs.map +1 -1
- package/dist/{migrate-s4QizIoM.mjs → migrate-0J6gsfrQ.mjs} +3 -3
- package/dist/{migrate-s4QizIoM.mjs.map → migrate-0J6gsfrQ.mjs.map} +1 -1
- package/dist/{migrate-L4a273dY.cjs → migrate-BCz1lkh_.cjs} +3 -3
- package/dist/{migrate-L4a273dY.cjs.map → migrate-BCz1lkh_.cjs.map} +1 -1
- package/dist/{migrate-D79GI0XM.cjs → migrate-CrtxXeGY.cjs} +3 -3
- package/dist/{migrate-D79GI0XM.cjs.map → migrate-CrtxXeGY.cjs.map} +1 -1
- package/dist/{migrate-Bb1MmGHl.mjs → migrate-DJa_Dlsl.mjs} +3 -3
- package/dist/{migrate-Bb1MmGHl.mjs.map → migrate-DJa_Dlsl.mjs.map} +1 -1
- package/dist/openapi.cjs +1 -1
- package/dist/openapi.d.cts +1 -1
- package/dist/openapi.d.mts +1 -1
- package/dist/openapi.mjs +1 -1
- package/dist/{publish-CcTlmJT6.mjs → publish-CuQlOW5p.mjs} +2 -2
- package/dist/{publish-CcTlmJT6.mjs.map → publish-CuQlOW5p.mjs.map} +1 -1
- package/dist/{publish-ydscCYsW.cjs → publish-qSpnvmdX.cjs} +2 -2
- package/dist/{publish-ydscCYsW.cjs.map → publish-qSpnvmdX.cjs.map} +1 -1
- package/dist/reconcile/public.d.cts +2 -2
- package/dist/reconcile/public.d.mts +2 -2
- package/dist/{resolve-BgL-brF9.cjs → resolve-AsfohXd1.cjs} +3 -3
- package/dist/{resolve-BgL-brF9.cjs.map → resolve-AsfohXd1.cjs.map} +1 -1
- package/dist/{resolve-BLp2trep.mjs → resolve-j8hUcbGz.mjs} +3 -3
- package/dist/{resolve-BLp2trep.mjs.map → resolve-j8hUcbGz.mjs.map} +1 -1
- package/dist/{rollback-2cyLXEH1.cjs → rollback-Bxq_URgL.cjs} +5 -5
- package/dist/{rollback-2cyLXEH1.cjs.map → rollback-Bxq_URgL.cjs.map} +1 -1
- package/dist/{rollback-DwqZ8zzj.mjs → rollback-JgbAY43C.mjs} +5 -5
- package/dist/{rollback-DwqZ8zzj.mjs.map → rollback-JgbAY43C.mjs.map} +1 -1
- package/dist/{runtime-YyQuekxi.d.mts → runtime-DIZTeGJV.d.cts} +2 -2
- package/dist/{runtime-ACdfK59n.d.cts.map → runtime-DIZTeGJV.d.cts.map} +1 -1
- package/dist/{runtime-ACdfK59n.d.cts → runtime-WMLJY-db.d.mts} +2 -2
- package/dist/{runtime-YyQuekxi.d.mts.map → runtime-WMLJY-db.d.mts.map} +1 -1
- package/dist/{s3-DQXZdmCM.mjs → s3-B4FTQQkV.mjs} +2 -2
- package/dist/{s3-DQXZdmCM.mjs.map → s3-B4FTQQkV.mjs.map} +1 -1
- package/dist/{s3-CrPoA89T.cjs → s3-DwKLXwUT.cjs} +2 -2
- package/dist/{s3-CrPoA89T.cjs.map → s3-DwKLXwUT.cjs.map} +1 -1
- package/dist/{sandbox-CdKgQ3XU.d.cts → sandbox-Co1y2CmF.d.mts} +2 -2
- package/dist/{sandbox-C4g1eG31.d.mts.map → sandbox-Co1y2CmF.d.mts.map} +1 -1
- package/dist/{sandbox-C4g1eG31.d.mts → sandbox-DvNqr6od.d.cts} +2 -2
- package/dist/{sandbox-CdKgQ3XU.d.cts.map → sandbox-DvNqr6od.d.cts.map} +1 -1
- package/dist/{seeds-C2w4UqVP.cjs → seeds-BWC-qjSI.cjs} +11 -5
- package/dist/{seeds-C2w4UqVP.cjs.map → seeds-BWC-qjSI.cjs.map} +1 -1
- package/dist/{seeds-Cwtv-U9-.mjs → seeds-Dv78P9LS.mjs} +6 -6
- package/dist/{seeds-Cwtv-U9-.mjs.map → seeds-Dv78P9LS.mjs.map} +1 -1
- package/dist/{serverSetup-BdFOD93s.cjs → serverSetup-CtV80a5M.cjs} +6 -6
- package/dist/{serverSetup-BdFOD93s.cjs.map → serverSetup-CtV80a5M.cjs.map} +1 -1
- package/dist/{serverSetup-utKsoyGH.mjs → serverSetup-DB6sKwAy.mjs} +6 -6
- package/dist/{serverSetup-utKsoyGH.mjs.map → serverSetup-DB6sKwAy.mjs.map} +1 -1
- package/dist/{sniffer-CF7wNxMo.cjs → sniffer-ctpwBBkT.cjs} +7 -7
- package/dist/{sniffer-CF7wNxMo.cjs.map → sniffer-ctpwBBkT.cjs.map} +1 -1
- package/dist/{sniffer-8C4q6Szd.mjs → sniffer-qDFUQmWP.mjs} +7 -7
- package/dist/{sniffer-8C4q6Szd.mjs.map → sniffer-qDFUQmWP.mjs.map} +1 -1
- package/dist/{stage-BvM_u2z4.mjs → stage-C7lf36az.mjs} +5 -5
- package/dist/{stage-BvM_u2z4.mjs.map → stage-C7lf36az.mjs.map} +1 -1
- package/dist/{stage-DEQJGW3r.cjs → stage-DzALYUwY.cjs} +5 -5
- package/dist/{stage-DEQJGW3r.cjs.map → stage-DzALYUwY.cjs.map} +1 -1
- package/dist/{stages-D4SnG5yl.cjs → stages-B7mCWI_R.cjs} +2 -2
- package/dist/{stages-D4SnG5yl.cjs.map → stages-B7mCWI_R.cjs.map} +1 -1
- package/dist/{stages-Cb9rqRbN.mjs → stages-DSltTW2d.mjs} +2 -2
- package/dist/{stages-Cb9rqRbN.mjs.map → stages-DSltTW2d.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/{types-B6UXlEkf.d.cts → types-C8gXOLWL.d.mts} +22 -3
- package/dist/{types-HqVPddRK.d.mts.map → types-C8gXOLWL.d.mts.map} +1 -1
- package/dist/{types-HqVPddRK.d.mts → types-Q2SC_ly2.d.cts} +23 -2
- package/dist/{types-B6UXlEkf.d.cts.map → types-Q2SC_ly2.d.cts.map} +1 -1
- package/dist/workspace/index.cjs +1 -1
- package/dist/workspace/index.d.cts +2 -2
- package/dist/workspace/index.d.mts +2 -2
- package/dist/workspace/index.mjs +1 -1
- package/dist/{workspace-BwqQnool.cjs → workspace-C82GLPnf.cjs} +8 -2
- package/dist/workspace-C82GLPnf.cjs.map +1 -0
- package/dist/{workspace-D1QbNd55.mjs → workspace-DUnnVjqC.mjs} +8 -2
- package/dist/workspace-DUnnVjqC.mjs.map +1 -0
- package/package.json +17 -16
- package/dist/compose-C43c03WZ.mjs.map +0 -1
- package/dist/compose-Mdgea4Yt.cjs.map +0 -1
- package/dist/dns-BIYf20p7.cjs.map +0 -1
- package/dist/dns-agf2VCdV.mjs.map +0 -1
- package/dist/workspace-BwqQnool.cjs.map +0 -1
- package/dist/workspace-D1QbNd55.mjs.map +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-BhDjJH2R.mjs";
|
|
2
2
|
import { t as GkmError } from "./errors-D8Gwp5kU.mjs";
|
|
3
3
|
import { a as runOutput, i as run } from "./run-BJLIerMM.mjs";
|
|
4
|
-
import { B as LOGS_PORT, I as otlpTelemetryEnv, L as resolveStageTelemetry, at as certificateFor, ft as SERVER_IPV4_KEY, ht as isReservedStageKey, it as ComposeTlsFileMissing, ot as proxyFor, z as telemetryEnv } from "./workspace-
|
|
5
|
-
import { a as serverAddressHint,
|
|
4
|
+
import { B as LOGS_PORT, I as otlpTelemetryEnv, L as resolveStageTelemetry, at as certificateFor, ft as SERVER_IPV4_KEY, ht as isReservedStageKey, it as ComposeTlsFileMissing, ot as proxyFor, z as telemetryEnv } from "./workspace-DUnnVjqC.mjs";
|
|
5
|
+
import { E as stageBackups, a as serverAddressHint, b as stackBackups, d as passwordSites, f as siteAuth, h as BACKUPS_SERVICE, i as requiredServerAddress, l as systemLookup, m as withSitePasswords, o as stackHosts, p as siteNames, r as isLocalHost, s as stageDns, t as HostNotPointingAtServer, v as backupsRoleStatements, y as backupsService } from "./dns-DFvO5a53.mjs";
|
|
6
6
|
import { t as defineTarget } from "./define-6poNqm5O.mjs";
|
|
7
|
-
import { $ as
|
|
7
|
+
import { $n as stackLogs, $t as publicBuildValues, An as localRolePassword, B as workerDockerfile, Bn as EMULATOR_ACCESS_KEY_ID, Bt as initStageSecrets, Cn as REDIS_SERVICE, Ct as composeFor, Dn as stackRedis, En as runsRedis, Fn as isTelemetryKey, Gn as portKeys, Gt as composeBuildPaths, Hn as DEFAULT_IMAGES, In as scopeTelemetryEnv, Jn as primaryPortKey, Jt as WORKER_PORT, Kt as imageLayout, L as appDockerfile, Mn as planFor, N as stageProviderNotes, On as withRedisPassword, Qn as logsService, Rn as telemetryOf, S as recordRelease, Sn as withGeneratedSecrets, Tn as redisService, Vn as hostFor, Xn as LOGS_SERVICE, Xt as findBuildRoot, Zn as logsAccess, a as dnsResources, an as applyPostgres, at as suppliedOnly, bt as bucketClient, c as currentActor, ct as networkEnv, d as DeployJournal, er as withLogsPassword, et as devServicesUsed, fn as LOCAL_RABBITMQ_USER, ft as constructGlobs, hn as postgresSuperuser, in as applyPolicies, it as stageServiceDeclarations, kn as envFor, ln as postgresStatements, lt as workerEnvKeys, n as reportDatabaseRuns, nn as applyBuckets, nr as isMainFrontendApp, o as forgetDnsResource, on as bucketLifecycles, ot as appEnvKeys, pn as loadLocalCredentials, q as validateImageRef, qt as TURBO_VERSION, r as reportPlannedSeeds, rn as applyLifecycles, rr as resolveHost, s as recordDnsChanges, sn as bucketPolicies, t as DeploySeedsFailed, tn as workerUnits, tr as NoDomainForStage, tt as externalServices, v as createComposeState, vt as LEGACY_LOCAL_LOGIN, wn as STACK_CACHE, xt as pgClient, yt as ensurePostgresLogin, z as ensureDockerignore, zn as usesTelemetry } from "./seeds-Dv78P9LS.mjs";
|
|
8
8
|
import { t as appKey } from "./derive-B4vDpzgP.mjs";
|
|
9
9
|
import { n as subscriberRoute, s as DEFAULT_EVENTS } from "./SubscriberGenerator-y3pncae_.mjs";
|
|
10
10
|
import { a as imageRef } from "./identity-CBXr4wNi.mjs";
|
|
@@ -684,7 +684,7 @@ function edgeCaddyfile(routes, options) {
|
|
|
684
684
|
` : tls.kind === "files" ? `
|
|
685
685
|
tls ${tls.certFile} ${tls.keyFile}
|
|
686
686
|
` : "";
|
|
687
|
-
const blocks = routes.map(({ host, upstreams, prefix, allow, paths, streaming }) => `https://${host} {${certificate}
|
|
687
|
+
const blocks = routes.map(({ host, upstreams, prefix, allow, auth, paths, streaming }) => `https://${host} {${certificate}
|
|
688
688
|
# gkm's own header, which only a service of this stack may send: the auth
|
|
689
689
|
# server rate-limits by the client address it carries.
|
|
690
690
|
request_header -${CLIENT_IP_HEADER}
|
|
@@ -693,6 +693,11 @@ ${allow ? `
|
|
|
693
693
|
# could set. Everything else is refused before it reaches the upstream.
|
|
694
694
|
@denied not remote_ip ${allow.join(" ")}
|
|
695
695
|
respond @denied 403
|
|
696
|
+
` : ""}${auth ? `
|
|
697
|
+
# The stage's login, asked for before anything reaches the upstream.
|
|
698
|
+
basic_auth {
|
|
699
|
+
${auth.user} ${auth.hash}
|
|
700
|
+
}
|
|
696
701
|
` : ""}${paths ? `
|
|
697
702
|
# Only these paths answer. Everything else on this host is refused before
|
|
698
703
|
# it reaches the upstream.
|
|
@@ -720,7 +725,8 @@ const HEADER = `# Generated by gkm compose from the construct manifest — do no
|
|
|
720
725
|
# One host per API and site, each in front of its own container, one per
|
|
721
726
|
# file server in front of the stack's MinIO, one per worker SNS pushes to,
|
|
722
727
|
# answering only those routes, and — when its logs are served publicly — one
|
|
723
|
-
# for OpenObserve, to the addresses it allows.
|
|
728
|
+
# for OpenObserve, to the addresses it allows. A site the stage puts behind a
|
|
729
|
+
# password asks for its login first.
|
|
724
730
|
`;
|
|
725
731
|
//#endregion
|
|
726
732
|
//#region src/compose/images.ts
|
|
@@ -1015,6 +1021,10 @@ function traefikDynamic(routes, options) {
|
|
|
1015
1021
|
middlewares[name(route, "allow")] = { ipAllowList: { sourceRange: [...route.allow] } };
|
|
1016
1022
|
chain.push(name(route, "allow"));
|
|
1017
1023
|
}
|
|
1024
|
+
if (route.auth) {
|
|
1025
|
+
middlewares[name(route, "auth")] = { basicAuth: { users: [`${route.auth.user}:${route.auth.hash}`] } };
|
|
1026
|
+
chain.push(name(route, "auth"));
|
|
1027
|
+
}
|
|
1018
1028
|
if (route.prefix) {
|
|
1019
1029
|
middlewares[name(route, "prefix")] = { addPrefix: { prefix: route.prefix } };
|
|
1020
1030
|
chain.push(name(route, "prefix"));
|
|
@@ -1647,6 +1657,11 @@ function composeStack(input) {
|
|
|
1647
1657
|
proxy,
|
|
1648
1658
|
edge: new Map([...edgeServices].map((service) => [service, hostOf(service)]))
|
|
1649
1659
|
});
|
|
1660
|
+
if (!local) {
|
|
1661
|
+
const sites = apps.filter((app) => app.kind === "site");
|
|
1662
|
+
const chosen = passwordSites(workspace, stage, sites.map((app) => app.name));
|
|
1663
|
+
for (const app of sites) if (chosen.includes(app.name)) app.auth = siteAuth(stage, app.name, custom);
|
|
1664
|
+
}
|
|
1650
1665
|
const routes = [
|
|
1651
1666
|
...apps.map((app) => ({
|
|
1652
1667
|
name: app.name,
|
|
@@ -1656,6 +1671,10 @@ function composeStack(input) {
|
|
|
1656
1671
|
port: app.port
|
|
1657
1672
|
}],
|
|
1658
1673
|
streaming: true,
|
|
1674
|
+
...app.auth ? { auth: {
|
|
1675
|
+
user: app.auth.user,
|
|
1676
|
+
hash: app.auth.hash
|
|
1677
|
+
} } : {},
|
|
1659
1678
|
health: app.kind === "site" ? "/" : "/health"
|
|
1660
1679
|
})),
|
|
1661
1680
|
...[...fileServers.values()].map(({ route }) => route),
|
|
@@ -2166,12 +2185,14 @@ function deployedStackSecrets(workspace, stage, stored, manifest) {
|
|
|
2166
2185
|
secrets: withLogs.secrets,
|
|
2167
2186
|
generated: []
|
|
2168
2187
|
};
|
|
2188
|
+
const withSites = withSitePasswords(withRedis.secrets, passwordSites(workspace, stage, siteNames(manifest)));
|
|
2169
2189
|
return {
|
|
2170
|
-
secrets:
|
|
2190
|
+
secrets: withSites.secrets,
|
|
2171
2191
|
generated: [
|
|
2172
2192
|
...withSeed.generated,
|
|
2173
2193
|
...withLogs.generated,
|
|
2174
|
-
...withRedis.generated
|
|
2194
|
+
...withRedis.generated,
|
|
2195
|
+
...withSites.generated
|
|
2175
2196
|
]
|
|
2176
2197
|
};
|
|
2177
2198
|
}
|
|
@@ -2199,7 +2220,7 @@ var HealthRequestTimedOut = class extends GkmError {
|
|
|
2199
2220
|
}
|
|
2200
2221
|
};
|
|
2201
2222
|
/** The real probe: one HTTPS GET, the certificate verified. */
|
|
2202
|
-
const httpsProbe = ({ url, ca, connectTo, connectPort, timeoutMs, signal }) => {
|
|
2223
|
+
const httpsProbe = ({ url, ca, connectTo, connectPort, authorization, timeoutMs, signal }) => {
|
|
2203
2224
|
const target = new URL(url);
|
|
2204
2225
|
return new Promise((resolve, reject) => {
|
|
2205
2226
|
const req = request({
|
|
@@ -2208,7 +2229,10 @@ const httpsProbe = ({ url, ca, connectTo, connectPort, timeoutMs, signal }) => {
|
|
|
2208
2229
|
servername: target.hostname,
|
|
2209
2230
|
path: `${target.pathname}${target.search}`,
|
|
2210
2231
|
method: "GET",
|
|
2211
|
-
headers: {
|
|
2232
|
+
headers: {
|
|
2233
|
+
host: target.host,
|
|
2234
|
+
...authorization ? { authorization } : {}
|
|
2235
|
+
},
|
|
2212
2236
|
...ca ? { ca } : {},
|
|
2213
2237
|
...signal ? { signal } : {},
|
|
2214
2238
|
timeout: timeoutMs
|
|
@@ -2477,7 +2501,8 @@ async function readyCompose(ctx, run, deps) {
|
|
|
2477
2501
|
}
|
|
2478
2502
|
if (stack.local) return;
|
|
2479
2503
|
if (run.server && !ctx.dryRun && !run.push) await deps.server.check(run.server);
|
|
2480
|
-
await stageHostsDns(ctx, deps, stackHosts(stack).filter((host) => !isLocalHost(host)), run.secrets?.custom);
|
|
2504
|
+
const prune = await stageHostsDns(ctx, deps, stackHosts(stack).filter((host) => !isLocalHost(host)), run.secrets?.custom);
|
|
2505
|
+
if (prune) run.pruneDns = prune;
|
|
2481
2506
|
}
|
|
2482
2507
|
/** A stack whose caches are in Redis, built for an app that has no client. */
|
|
2483
2508
|
var RedisClientMissing = class extends GkmError {
|
|
@@ -2510,7 +2535,8 @@ function assertRedisClient(workspace, stack, manifest, runnables) {
|
|
|
2510
2535
|
* domain's provider in `dns` where they differ, read back from it, and
|
|
2511
2536
|
* recorded in the stage's state; hosts no provider writes resolved with the
|
|
2512
2537
|
* system resolver. A dry run prints the plan and writes nothing, and warns
|
|
2513
|
-
* rather than stops.
|
|
2538
|
+
* rather than stops. Returns the prune of the records gkm wrote for hosts the
|
|
2539
|
+
* stage no longer serves — which a dry run prints there and then.
|
|
2514
2540
|
*
|
|
2515
2541
|
* @throws {ServerAddressMissing} when the stage has a domain and no address
|
|
2516
2542
|
* @throws {ServerAddressInvalid} for a value that is not an address
|
|
@@ -2531,11 +2557,13 @@ async function stageHostsDns(ctx, deps, hosts, custom) {
|
|
|
2531
2557
|
const log = (line) => ctx.logger.info(line);
|
|
2532
2558
|
if (workspace.dns) log(`🌐 DNS for '${stage}' → ${server.ipv4}${server.ipv6 ? ` / ${server.ipv6}` : ""}${ctx.dryRun ? " (dry run — nothing is written)" : ""}`);
|
|
2533
2559
|
try {
|
|
2560
|
+
const stored = await ctx.state.read(stage);
|
|
2534
2561
|
const result = await stageDns({
|
|
2535
2562
|
stage,
|
|
2536
2563
|
hosts,
|
|
2537
2564
|
server,
|
|
2538
2565
|
dns: workspace.dns,
|
|
2566
|
+
recorded: dnsResources(stored?.resources ?? {}),
|
|
2539
2567
|
credentials: ctx.credentials,
|
|
2540
2568
|
log,
|
|
2541
2569
|
lookup: deps.lookup ?? systemLookup,
|
|
@@ -2549,6 +2577,11 @@ async function stageHostsDns(ctx, deps, hosts, custom) {
|
|
|
2549
2577
|
}
|
|
2550
2578
|
const parts = [result.confirmed.length > 0 ? `${result.confirmed.length} host${result.confirmed.length === 1 ? "" : "s"} confirmed by the DNS provider` : "", result.resolved.length > 0 ? `${result.resolved.length} host${result.resolved.length === 1 ? "" : "s"} resolve${result.resolved.length === 1 ? "s" : ""} to ${server.ipv4}` : ""].filter(Boolean);
|
|
2551
2579
|
if (parts.length > 0) log(`🌐 ${parts.join(", ")}`);
|
|
2580
|
+
if (ctx.dryRun) {
|
|
2581
|
+
await result.prune();
|
|
2582
|
+
return;
|
|
2583
|
+
}
|
|
2584
|
+
return result.recorded.stale.length > 0 ? result.prune : void 0;
|
|
2552
2585
|
} catch (error) {
|
|
2553
2586
|
if (ctx.dryRun && error instanceof HostNotPointingAtServer) {
|
|
2554
2587
|
ctx.logger.warn(`⚠ ${error.message}`);
|
|
@@ -2558,6 +2591,19 @@ async function stageHostsDns(ctx, deps, hosts, custom) {
|
|
|
2558
2591
|
}
|
|
2559
2592
|
}
|
|
2560
2593
|
/**
|
|
2594
|
+
* The records gkm wrote for hosts the stage no longer serves, deleted once it
|
|
2595
|
+
* answers on its new ones — and forgotten from its state, deleted or not:
|
|
2596
|
+
* none is gkm's to manage any more.
|
|
2597
|
+
*/
|
|
2598
|
+
async function pruneStageDns(ctx, run) {
|
|
2599
|
+
if (!run.pruneDns) return;
|
|
2600
|
+
const pruned = await run.pruneDns();
|
|
2601
|
+
const journal = await DeployJournal.open(ctx.state, ctx.stage, () => createComposeState(ctx.stage));
|
|
2602
|
+
for (const { record } of pruned) await forgetDnsResource(journal, record);
|
|
2603
|
+
const deleted = pruned.filter((p) => p.action === "delete").length;
|
|
2604
|
+
if (deleted > 0) ctx.logger.info(`🌐 ${deleted} record${deleted === 1 ? "" : "s"} deleted`);
|
|
2605
|
+
}
|
|
2606
|
+
/**
|
|
2561
2607
|
* The stage's secrets — and, for a deployed stage, everything it generates
|
|
2562
2608
|
* once: its seed, and each declared secret and keyring. Kept only once the
|
|
2563
2609
|
* run goes ahead (`provision`), so a dry run, or a tag that is not there,
|
|
@@ -2915,7 +2961,7 @@ async function releaseCompose(ctx, run, deps) {
|
|
|
2915
2961
|
via: run.previous[worker.name] ? "recorded" : "created"
|
|
2916
2962
|
});
|
|
2917
2963
|
ctx.logger.info(`\n✅ ${stack.project} is running:`);
|
|
2918
|
-
for (const app of stack.apps) ctx.logger.info(` ${app.name.padEnd(12)} ${app.url}`);
|
|
2964
|
+
for (const app of stack.apps) ctx.logger.info(` ${app.name.padEnd(12)} ${app.url}${app.auth ? ` 🔒 user: ${app.auth.user}, password: gkm secrets:show --stage ${ctx.stage} --reveal → ${app.auth.key}` : ""}`);
|
|
2919
2965
|
for (const worker of stack.workers) ctx.logger.info(` ${worker.name.padEnd(12)} worker ${worker.id}`);
|
|
2920
2966
|
if (stack.local) ctx.logger.info(`\n🔐 Certificates are from Caddy's local CA: NODE_EXTRA_CA_CERTS=${join(stackDir(ctx.stage), "caddy-root.crt")}`);
|
|
2921
2967
|
}
|
|
@@ -2964,6 +3010,7 @@ async function verifyCompose(ctx, run, deps) {
|
|
|
2964
3010
|
last
|
|
2965
3011
|
}));
|
|
2966
3012
|
if (down.length > 0) throw new ComposeAppsUnhealthy(stack.project, down, stack.proxy);
|
|
3013
|
+
await pruneStageDns(ctx, run);
|
|
2967
3014
|
if (stack.logs) reportLogs(ctx, stack.logs, stack.local, run.server);
|
|
2968
3015
|
}
|
|
2969
3016
|
/**
|
|
@@ -3006,6 +3053,10 @@ async function checkContainer(ctx, run, deps, service) {
|
|
|
3006
3053
|
healthy: false
|
|
3007
3054
|
};
|
|
3008
3055
|
}
|
|
3056
|
+
/** A login, as the `Authorization` header that carries it. */
|
|
3057
|
+
function basicAuthorization(auth) {
|
|
3058
|
+
return `Basic ${Buffer.from(`${auth.user}:${auth.password}`).toString("base64")}`;
|
|
3059
|
+
}
|
|
3009
3060
|
/** How to open the logs, printed — and as an event, for a headless caller. */
|
|
3010
3061
|
function reportLogs(ctx, logs, local, server) {
|
|
3011
3062
|
const lines = logsAccess(logs, {
|
|
@@ -3043,6 +3094,7 @@ async function checkApp(ctx, app, deps, options) {
|
|
|
3043
3094
|
status = await deps.probe({
|
|
3044
3095
|
url,
|
|
3045
3096
|
...options.ca ? { ca: options.ca } : {},
|
|
3097
|
+
...app.auth ? { authorization: basicAuthorization(app.auth) } : {},
|
|
3046
3098
|
...options.edge,
|
|
3047
3099
|
timeoutMs: 1e4,
|
|
3048
3100
|
signal: ctx.signal
|
|
@@ -3281,4 +3333,4 @@ function composeTarget(options = {}) {
|
|
|
3281
3333
|
//#endregion
|
|
3282
3334
|
export { dockerCompose as C, sshTarget as S, parseDigests as _, edgePorts as a, dockerHost as b, edgeRef as c, composeStack as d, derivedCredentials as f, edgeAlias as g, EDGE_PROJECT as h, ComposePushNeedsBuild as i, removeEdgeRoutes as l, stackPlan as m, compose_exports as n, stackOverrideFile as o, stackDir as p, ComposePinNeedsPull as r, deployedStackSecrets as s, composeTarget as t, composeProject as u, pinnedRef as v, projectNetwork as w, sshAccess as x, composeServer as y };
|
|
3283
3335
|
|
|
3284
|
-
//# sourceMappingURL=compose-
|
|
3336
|
+
//# sourceMappingURL=compose-cHkF---f.mjs.map
|