@geekmidas/cli 10.0.0-alpha.93 → 10.0.0-alpha.95
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-Mi3vptSR.mjs → GoDaddyProvider-BwW51hPm.mjs} +3 -3
- package/dist/{GoDaddyProvider-Mi3vptSR.mjs.map → GoDaddyProvider-BwW51hPm.mjs.map} +1 -1
- package/dist/{GoDaddyProvider-BZb-V14e.cjs → GoDaddyProvider-C_DgIkMv.cjs} +3 -3
- package/dist/{GoDaddyProvider-BZb-V14e.cjs.map → GoDaddyProvider-C_DgIkMv.cjs.map} +1 -1
- package/dist/{HostingerProvider-1mqD6aG8.mjs → HostingerProvider-BNpS9aRJ.mjs} +9 -4
- package/dist/{HostingerProvider-1mqD6aG8.mjs.map → HostingerProvider-BNpS9aRJ.mjs.map} +1 -1
- package/dist/{HostingerProvider-C6t-PSNe.cjs → HostingerProvider-DR1iws1P.cjs} +9 -4
- package/dist/HostingerProvider-DR1iws1P.cjs.map +1 -0
- package/dist/{LegacyStateStore-BlYXQQSE.cjs → LegacyStateStore-BawjE_5n.cjs} +10 -9
- package/dist/{LegacyStateStore-BlYXQQSE.cjs.map → LegacyStateStore-BawjE_5n.cjs.map} +1 -1
- package/dist/{LegacyStateStore-CtwO7fwy.mjs → LegacyStateStore-D5DarNA2.mjs} +3 -2
- package/dist/{LegacyStateStore-CtwO7fwy.mjs.map → LegacyStateStore-D5DarNA2.mjs.map} +1 -1
- package/dist/{LocalStateStore-oX_zxj9V.cjs → LocalStateStore-D8fu5WiF.cjs} +8 -8
- package/dist/{LocalStateStore-oX_zxj9V.cjs.map → LocalStateStore-D8fu5WiF.cjs.map} +1 -1
- package/dist/{LocalStateStore-D40_SDmJ.mjs → LocalStateStore-YjIqlgAz.mjs} +2 -2
- package/dist/{LocalStateStore-D40_SDmJ.mjs.map → LocalStateStore-YjIqlgAz.mjs.map} +1 -1
- package/dist/{S3StateStore-BzS0IeSt.mjs → S3StateStore-CjTAVsWh.mjs} +2 -2
- package/dist/{S3StateStore-BzS0IeSt.mjs.map → S3StateStore-CjTAVsWh.mjs.map} +1 -1
- package/dist/{S3StateStore-DeI7jtvi.cjs → S3StateStore-Cm-v2IPI.cjs} +5 -5
- package/dist/{S3StateStore-DeI7jtvi.cjs.map → S3StateStore-Cm-v2IPI.cjs.map} +1 -1
- package/dist/{SSMStateStore-CaCtrzFL.cjs → SSMStateStore-BS4BiZCN.cjs} +9 -9
- package/dist/{SSMStateStore-CaCtrzFL.cjs.map → SSMStateStore-BS4BiZCN.cjs.map} +1 -1
- package/dist/{SSMStateStore-k_Ew7TWx.mjs → SSMStateStore-BhtM6jOh.mjs} +2 -2
- package/dist/{SSMStateStore-k_Ew7TWx.mjs.map → SSMStateStore-BhtM6jOh.mjs.map} +1 -1
- package/dist/{add-VcyJnsPX.cjs → add-D-3IKT7W.cjs} +24 -53
- package/dist/add-D-3IKT7W.cjs.map +1 -0
- package/dist/{add-CP1podDH.mjs → add-ylx8dejw.mjs} +23 -52
- package/dist/add-ylx8dejw.mjs.map +1 -0
- package/dist/{bundler-Dfsr6KXU.cjs → bundler-CI3elfZS.cjs} +5 -5
- package/dist/{bundler-Dfsr6KXU.cjs.map → bundler-CI3elfZS.cjs.map} +1 -1
- package/dist/{bundler-BWrh-AJH.mjs → bundler-ywR3C1B_.mjs} +5 -5
- package/dist/{bundler-BWrh-AJH.mjs.map → bundler-ywR3C1B_.mjs.map} +1 -1
- package/dist/{cli-B8otnZfX.mjs → cli-BCSuCfQk.mjs} +9 -5
- package/dist/cli-BCSuCfQk.mjs.map +1 -0
- package/dist/{cli-DL19w4OE.cjs → cli-Dewt2T21.cjs} +9 -5
- package/dist/cli-Dewt2T21.cjs.map +1 -0
- package/dist/{compose-DrEB_4F-.mjs → compose-C4js1JDv.mjs} +82 -47
- package/dist/compose-C4js1JDv.mjs.map +1 -0
- package/dist/{compose-BHVKLluX.cjs → compose-Dd0XphvF.cjs} +94 -59
- package/dist/compose-Dd0XphvF.cjs.map +1 -0
- package/dist/{config-DCCcrOSo.d.cts → config-4yirvxS8.d.cts} +4 -4
- package/dist/{config-CHX5GOo3.d.mts.map → config-4yirvxS8.d.cts.map} +1 -1
- package/dist/{config-CHX5GOo3.d.mts → config-C8NPCn1l.d.mts} +4 -4
- package/dist/{config-DCCcrOSo.d.cts.map → config-C8NPCn1l.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-C4KII3PD.mjs → credentials-B5N5yKk6.mjs} +12 -134
- package/dist/credentials-B5N5yKk6.mjs.map +1 -0
- package/dist/{credentials-QBu7VgaQ.cjs → credentials-Zqr3QQYB.cjs} +11 -175
- package/dist/credentials-Zqr3QQYB.cjs.map +1 -0
- package/dist/deploy/public.cjs +19 -18
- package/dist/deploy/public.cjs.map +1 -1
- package/dist/deploy/public.d.cts +24 -9
- package/dist/deploy/public.d.cts.map +1 -1
- package/dist/deploy/public.d.mts +24 -9
- package/dist/deploy/public.d.mts.map +1 -1
- package/dist/deploy/public.mjs +11 -10
- package/dist/deploy/public.mjs.map +1 -1
- package/dist/deploy-B0drCD6s.mjs +1854 -0
- package/dist/deploy-B0drCD6s.mjs.map +1 -0
- package/dist/deploy-Bw1FjX_x.cjs +1903 -0
- package/dist/deploy-Bw1FjX_x.cjs.map +1 -0
- package/dist/{discover-vk2r5giK.d.cts → discover-BtFofyQB.d.cts} +2 -2
- package/dist/{discover-DqwlBVyY.d.mts.map → discover-BtFofyQB.d.cts.map} +1 -1
- package/dist/{discover-DqwlBVyY.d.mts → discover-D-MdXZgm.d.mts} +2 -2
- package/dist/{discover-vk2r5giK.d.cts.map → discover-D-MdXZgm.d.mts.map} +1 -1
- package/dist/dns-Bmk7P9c2.cjs +663 -0
- package/dist/dns-Bmk7P9c2.cjs.map +1 -0
- package/dist/dns-CyMIq6to.cjs +55 -0
- package/dist/dns-CyMIq6to.cjs.map +1 -0
- package/dist/dns-X3oqEV4C.mjs +44 -0
- package/dist/dns-X3oqEV4C.mjs.map +1 -0
- package/dist/dns-idXfyCay.mjs +610 -0
- package/dist/dns-idXfyCay.mjs.map +1 -0
- package/dist/{dokploy-o4I6vb9W.mjs → dokploy-CZYxXeMa.mjs} +2 -2
- package/dist/{dokploy-o4I6vb9W.mjs.map → dokploy-CZYxXeMa.mjs.map} +1 -1
- package/dist/{dokploy-rivb1RFt.cjs → dokploy-DaT0mgLU.cjs} +2 -2
- package/dist/{dokploy-rivb1RFt.cjs.map → dokploy-DaT0mgLU.cjs.map} +1 -1
- package/dist/{encryption-B6ilrT7p.mjs → encryption-D0ucY4O7.mjs} +3 -3
- package/dist/{encryption-B6ilrT7p.mjs.map → encryption-D0ucY4O7.mjs.map} +1 -1
- package/dist/{encryption-D7zmwzWz.cjs → encryption-Dp0IvLVX.cjs} +3 -3
- package/dist/{encryption-D7zmwzWz.cjs.map → encryption-Dp0IvLVX.cjs.map} +1 -1
- package/dist/{engine-DjEcovm-.mjs → engine-BcuhnyQO.mjs} +14 -31
- package/dist/{engine-DjEcovm-.mjs.map → engine-BcuhnyQO.mjs.map} +1 -1
- package/dist/{engine-Cfx8fEZU.cjs → engine-WY6j_kvA.cjs} +18 -35
- package/dist/engine-WY6j_kvA.cjs.map +1 -0
- package/dist/{github-CzBbs43W.mjs → github-DUGA57du.mjs} +96 -6
- package/dist/github-DUGA57du.mjs.map +1 -0
- package/dist/{github-zneTMvnO.cjs → github-DgmW83OP.cjs} +96 -6
- package/dist/github-DgmW83OP.cjs.map +1 -0
- package/dist/{index-BiYU7cUl.d.mts → index-5eL8rM6H.d.mts} +2 -2
- package/dist/{index-BiYU7cUl.d.mts.map → index-5eL8rM6H.d.mts.map} +1 -1
- package/dist/{index-Dm6V9bwh.d.cts → index-Dz-gyjm_.d.cts} +2 -2
- package/dist/{index-Dm6V9bwh.d.cts.map → index-Dz-gyjm_.d.cts.map} +1 -1
- package/dist/index.cjs +150 -118
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +144 -112
- package/dist/index.mjs.map +1 -1
- package/dist/{local-Otp74ak0.mjs → local-BwC2v2Y8.mjs} +2 -2
- package/dist/{local-Otp74ak0.mjs.map → local-BwC2v2Y8.mjs.map} +1 -1
- package/dist/{local-B61kUh0w.cjs → local-DNhnkugT.cjs} +3 -3
- package/dist/{local-B61kUh0w.cjs.map → local-DNhnkugT.cjs.map} +1 -1
- package/dist/{migrate-DFjbGnSr.cjs → migrate-BBcG1dhS.cjs} +3 -3
- package/dist/{migrate-DFjbGnSr.cjs.map → migrate-BBcG1dhS.cjs.map} +1 -1
- package/dist/{migrate-CsBZKALY.mjs → migrate-CZ-v5WV0.mjs} +3 -3
- package/dist/{migrate-CsBZKALY.mjs.map → migrate-CZ-v5WV0.mjs.map} +1 -1
- package/dist/{migrate-BaC4w0sb.mjs → migrate-D6PlNv2o.mjs} +3 -3
- package/dist/{migrate-BaC4w0sb.mjs.map → migrate-D6PlNv2o.mjs.map} +1 -1
- package/dist/{migrate-C8wTpakT.cjs → migrate-afgRL3Hg.cjs} +3 -3
- package/dist/{migrate-C8wTpakT.cjs.map → migrate-afgRL3Hg.cjs.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/reconcile/public.d.cts +2 -2
- package/dist/reconcile/public.d.mts +2 -2
- package/dist/{resolve-g8htuR80.cjs → resolve-CFb4Navi.cjs} +4 -4
- package/dist/{resolve-g8htuR80.cjs.map → resolve-CFb4Navi.cjs.map} +1 -1
- package/dist/{resolve-Ccjlpnd9.mjs → resolve-DakDhr6Z.mjs} +4 -4
- package/dist/{resolve-Ccjlpnd9.mjs.map → resolve-DakDhr6Z.mjs.map} +1 -1
- package/dist/{rollback--ympG9ss.cjs → rollback-B-1dPP0m.cjs} +9 -8
- package/dist/{rollback--ympG9ss.cjs.map → rollback-B-1dPP0m.cjs.map} +1 -1
- package/dist/{rollback-Drbg0OeR.mjs → rollback-B1TIpjdE.mjs} +7 -6
- package/dist/{rollback-Drbg0OeR.mjs.map → rollback-B1TIpjdE.mjs.map} +1 -1
- package/dist/run-BJLIerMM.mjs +133 -0
- package/dist/run-BJLIerMM.mjs.map +1 -0
- package/dist/run-fVZ-rLnc.cjs +174 -0
- package/dist/run-fVZ-rLnc.cjs.map +1 -0
- package/dist/{runtime-_wEVtshH.d.mts → runtime-DUQdM-mW.d.cts} +2 -2
- package/dist/{runtime-D_J3ExJn.d.cts.map → runtime-DUQdM-mW.d.cts.map} +1 -1
- package/dist/{runtime-D_J3ExJn.d.cts → runtime-Vr6mleo2.d.mts} +2 -2
- package/dist/{runtime-_wEVtshH.d.mts.map → runtime-Vr6mleo2.d.mts.map} +1 -1
- package/dist/{sandbox-CPJq1Kia.d.mts → sandbox-BbJmh2rI.d.cts} +2 -2
- package/dist/{sandbox-CPJq1Kia.d.mts.map → sandbox-BbJmh2rI.d.cts.map} +1 -1
- package/dist/{sandbox-JwuPAl7I.d.cts → sandbox-DGOsMPMf.d.mts} +2 -2
- package/dist/{sandbox-JwuPAl7I.d.cts.map → sandbox-DGOsMPMf.d.mts.map} +1 -1
- package/dist/{secrets-DJteijZo.cjs → secrets-CPM0Qffe.cjs} +3 -3
- package/dist/secrets-CPM0Qffe.cjs.map +1 -0
- package/dist/{secrets-DbPmAS4k.mjs → secrets-oI9ClAPR.mjs} +3 -3
- package/dist/secrets-oI9ClAPR.mjs.map +1 -0
- package/dist/{seeds-c-ByX9je.cjs → seeds-CnXkgKUv.cjs} +1339 -3594
- package/dist/seeds-CnXkgKUv.cjs.map +1 -0
- package/dist/{seeds-BSL55F6q.mjs → seeds-CoKkrSny.mjs} +1126 -3266
- package/dist/seeds-CoKkrSny.mjs.map +1 -0
- package/dist/{sniffer-BTtGAtm3.mjs → sniffer-CFRzIrby.mjs} +496 -5
- package/dist/sniffer-CFRzIrby.mjs.map +1 -0
- package/dist/{sniffer-Dq5BS98f.cjs → sniffer-vbiQ2Isn.cjs} +572 -3
- package/dist/sniffer-vbiQ2Isn.cjs.map +1 -0
- package/dist/{sst-BaRXp2Dd.mjs → sst-CGdjHn2A.mjs} +4 -3
- package/dist/{sst-BaRXp2Dd.mjs.map → sst-CGdjHn2A.mjs.map} +1 -1
- package/dist/{sst-CnKY-CSh.cjs → sst-DGuHDxVU.cjs} +5 -4
- package/dist/{sst-CnKY-CSh.cjs.map → sst-DGuHDxVU.cjs.map} +1 -1
- package/dist/{stack-1PeLJS2j.cjs → stack-1g57OfOw.cjs} +14 -52
- package/dist/stack-1g57OfOw.cjs.map +1 -0
- package/dist/{stack-Co4uZkAo.mjs → stack-B7O975TR.mjs} +14 -52
- package/dist/stack-B7O975TR.mjs.map +1 -0
- package/dist/{stages-DY-fQKmo.mjs → stages-Bt4OggMm.mjs} +17 -3
- package/dist/stages-Bt4OggMm.mjs.map +1 -0
- package/dist/{stages-BI8JvPzI.cjs → stages-BujUB4we.cjs} +17 -3
- package/dist/stages-BujUB4we.cjs.map +1 -0
- 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-8XngdSTo.cjs → terminal-CPHuH4S1.cjs} +2 -2
- package/dist/{terminal-8XngdSTo.cjs.map → terminal-CPHuH4S1.cjs.map} +1 -1
- package/dist/{terminal-C4XRdwnU.mjs → terminal-iNmAXXjs.mjs} +2 -2
- package/dist/{terminal-C4XRdwnU.mjs.map → terminal-iNmAXXjs.mjs.map} +1 -1
- package/dist/{types-BibpiHKB.d.cts → types-bkqVscdN.d.mts} +43 -11
- package/dist/types-bkqVscdN.d.mts.map +1 -0
- package/dist/{types-B6lmD3en.d.mts → types-dipJRmKV.d.cts} +44 -10
- package/dist/types-dipJRmKV.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-Bzw7Zs82.mjs → workspace-DWK1PTXP.mjs} +4 -4
- package/dist/workspace-DWK1PTXP.mjs.map +1 -0
- package/dist/{workspace-CHOB2Xg3.cjs → workspace-cSyi5nb1.cjs} +4 -4
- package/dist/workspace-cSyi5nb1.cjs.map +1 -0
- package/package.json +15 -15
- package/dist/HostingerProvider-C6t-PSNe.cjs.map +0 -1
- package/dist/add-CP1podDH.mjs.map +0 -1
- package/dist/add-VcyJnsPX.cjs.map +0 -1
- package/dist/cli-B8otnZfX.mjs.map +0 -1
- package/dist/cli-DL19w4OE.cjs.map +0 -1
- package/dist/compose-BHVKLluX.cjs.map +0 -1
- package/dist/compose-DrEB_4F-.mjs.map +0 -1
- package/dist/credentials-C4KII3PD.mjs.map +0 -1
- package/dist/credentials-QBu7VgaQ.cjs.map +0 -1
- package/dist/deploy-C3Mhnmus.cjs +0 -556
- package/dist/deploy-C3Mhnmus.cjs.map +0 -1
- package/dist/deploy-DYIyIUYd.mjs +0 -527
- package/dist/deploy-DYIyIUYd.mjs.map +0 -1
- package/dist/engine-Cfx8fEZU.cjs.map +0 -1
- package/dist/github-CzBbs43W.mjs.map +0 -1
- package/dist/github-zneTMvnO.cjs.map +0 -1
- package/dist/secrets-DJteijZo.cjs.map +0 -1
- package/dist/secrets-DbPmAS4k.mjs.map +0 -1
- package/dist/seeds-BSL55F6q.mjs.map +0 -1
- package/dist/seeds-c-ByX9je.cjs.map +0 -1
- package/dist/sniffer-BTtGAtm3.mjs.map +0 -1
- package/dist/sniffer-Dq5BS98f.cjs.map +0 -1
- package/dist/stack-1PeLJS2j.cjs.map +0 -1
- package/dist/stack-Co4uZkAo.mjs.map +0 -1
- package/dist/stages-BI8JvPzI.cjs.map +0 -1
- package/dist/stages-DY-fQKmo.mjs.map +0 -1
- package/dist/types-B6lmD3en.d.mts.map +0 -1
- package/dist/types-BibpiHKB.d.cts.map +0 -1
- package/dist/workspace-Bzw7Zs82.mjs.map +0 -1
- package/dist/workspace-CHOB2Xg3.cjs.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
#!/usr/bin/env -S npx tsx
|
|
2
2
|
import { n as __require, t as __exportAll } from "./rolldown-runtime-BhDjJH2R.mjs";
|
|
3
3
|
import { n as isGkmError, t as GkmError } from "./errors-D8Gwp5kU.mjs";
|
|
4
|
-
import {
|
|
4
|
+
import { r as DEFAULT_TIMEOUT_MS, t as CommandFailed } from "./run-BJLIerMM.mjs";
|
|
5
|
+
import { a as getDokployCredentials, d as removeGoDaddyCredentials, f as storeDokployCredentials, i as getCredentialsPath, l as readCredentials, m as storeHostingerToken, o as getDokployRegistryId, p as storeGoDaddyToken, s as getDokployToken, u as removeDokployCredentials } from "./credentials-B5N5yKk6.mjs";
|
|
5
6
|
import { l as withOwningTsconfigJsx, r as discover, u as ConstructGenerator } from "./discover-qjFapetL.mjs";
|
|
6
7
|
import { t as appKey } from "./derive-B4vDpzgP.mjs";
|
|
7
|
-
import { A as InvalidStages, F as stageProblems, P as deployedProblems, R as stageSampleRate, a as allConstructGlobs, d as getAppGkmConfig, j as TEST_STAGE, u as getAppBuildOrder } from "./workspace-
|
|
8
|
+
import { A as InvalidStages, F as stageProblems, P as deployedProblems, R as stageSampleRate, a as allConstructGlobs, d as getAppGkmConfig, j as TEST_STAGE, u as getAppBuildOrder } from "./workspace-DWK1PTXP.mjs";
|
|
8
9
|
import { ConfigNotFound, NotABackendApp, NotInAnApp, loadAppConfig, loadConfig, loadWorkspaceConfig, loadWorkspaceSettings, parseModuleConfig } from "./config.mjs";
|
|
9
|
-
import {
|
|
10
|
+
import { C as assertDevServicesFlag, Cn as loadEnvFiles, Ct as LOCAL_CA_PATH, En as prepareEntryCredentials, Ft as pgClient, Gn as maskPassword, Jn as withCustomSecret, Jt as imageBuildCredentials, Ln as deployIdentity, Mn as getKeyPath, On as secretsStoreFor, Pn as projectKey, Qt as providerOf, Sn as isPortAvailable, Tn as loadSecretsForApp, Xt as cacheBackendFor, Yn as LOCAL_LOGS_EMAIL, Yt as isImageBuild, Zt as eventsBackendFor, _n as portsOf, at as CronGenerator, bn as createEntryWrapper, ct as constructGlobs, dn as telemetryOf, en as CLUSTER_DATABASE, et as workerUnits, g as describeActor, hn as fakeKey, ht as readLocalCredentials, it as QueueGenerator, jn as FileSecretsStore, jt as quoteIdentifier, kt as postgresDatabaseNames, ln as scopeTelemetryEnv, lt as derivedContainers, mn as describeServices, nt as workerBundleName, ot as FAKE_ENV, p as dnsResources, qn as toEmbeddableSecrets, rn as TELEMETRY_CONTAINER, rt as workerEntryDir, s as dockerCommand, sn as appTelemetry, st as backendsOf$1, tt as WorkerGenerator, un as surfaceClientTraced, ut as reconcileWorkspace, vn as primaryPortKey, wn as loadPortState, wt as forgetState, xn as findAvailablePort, yn as createCredentialsPreload } from "./seeds-CoKkrSny.mjs";
|
|
10
11
|
import { c as startTelemetryCode, l as telemetryFor, n as runtimeFor, o as mountRequestSpansCode, r as parseTelemetryFlag, s as routeTelemetry, t as EndpointGenerator, u as writeTelemetryModule } from "./EndpointGenerator-Bor2tZCm.mjs";
|
|
11
12
|
import { generateOpenApi, openapiCommand, resolveOpenApiConfig } from "./openapi.mjs";
|
|
12
13
|
import { s as isCacheBackend, t as SubscriberGenerator } from "./SubscriberGenerator-CyN2VF5X.mjs";
|
|
13
14
|
import { a as describeHolder, i as assignAppPorts, o as holderOf, r as appTag, s as withAppPorts, t as APP_TAG_ENV } from "./appPorts-C9z9Pzn9.mjs";
|
|
14
15
|
import { n as driversFor, r as eventsBackendsIn, t as cacheBackendsIn } from "./drivers-CTaWrA_L.mjs";
|
|
15
16
|
import { n as withCompute, r as withRoutes, t as manifestModule } from "./emit-C1e8qD08.mjs";
|
|
16
|
-
import { t as LocalSandbox } from "./local-
|
|
17
|
-
import {
|
|
18
|
-
import { t as deploy$1 } from "./deploy-
|
|
19
|
-
import { a as stackOverrideFile, c as dockerCompose, i as ComposePushNeedsBuild, o as edgeDir, r as ComposePinNeedsPull, s as removeEdgeRoutes, t as composeTarget } from "./compose-DrEB_4F-.mjs";
|
|
20
|
-
import { d as parseDigests, h as EDGE_PROJECT, i as composeProject, p as pinnedRef, s as stackDir } from "./stack-Co4uZkAo.mjs";
|
|
17
|
+
import { t as LocalSandbox } from "./local-BwC2v2Y8.mjs";
|
|
18
|
+
import { T as keyFingerprint, n as sniffAppEnvironment, o as DokployApi, y as createStateStore } from "./sniffer-CFRzIrby.mjs";
|
|
19
|
+
import { t as deploy$1 } from "./deploy-B0drCD6s.mjs";
|
|
21
20
|
import { o as loadCredentialSchemas, t as CredentialsInvalid } from "./credentialSchemas-BJFvfkaz.mjs";
|
|
22
|
-
import { t as
|
|
21
|
+
import { a as stackOverrideFile, c as dockerCompose, i as ComposePushNeedsBuild, o as edgeDir, r as ComposePinNeedsPull, s as removeEdgeRoutes, t as composeTarget } from "./compose-C4js1JDv.mjs";
|
|
22
|
+
import { d as parseDigests, h as EDGE_PROJECT, i as composeProject, p as pinnedRef, s as stackDir } from "./stack-B7O975TR.mjs";
|
|
23
|
+
import { t as LocalStateStore } from "./LocalStateStore-YjIqlgAz.mjs";
|
|
23
24
|
import { a as getExecCommand, c as validateProjectName, i as findWorkspaceRoot, n as detectPackageManager$1, o as getInstallCommand, r as findWorkspacePackages, s as getRunCommand, t as checkDirectoryExists } from "./utils-D_fxUqvU.mjs";
|
|
24
|
-
import "./awsStore-BWa1KNY-.mjs";
|
|
25
25
|
import { a as writeTestHarness, i as TEST_MANIFEST_ENV, n as TEST_READY_FILE, t as TEST_READY_ENV } from "./ready-naOSJpeJ.mjs";
|
|
26
26
|
import { createRequire } from "node:module";
|
|
27
27
|
import { basename, dirname, isAbsolute, join, relative, resolve } from "node:path";
|
|
@@ -50,7 +50,7 @@ import crypto from "crypto";
|
|
|
50
50
|
import { Function } from "@geekmidas/constructs/functions";
|
|
51
51
|
import { Topic } from "@geekmidas/constructs/topic";
|
|
52
52
|
//#region package.json
|
|
53
|
-
var version = "10.0.0-alpha.
|
|
53
|
+
var version = "10.0.0-alpha.95";
|
|
54
54
|
//#endregion
|
|
55
55
|
//#region src/prompt.ts
|
|
56
56
|
/**
|
|
@@ -133,7 +133,7 @@ const logger$8 = console;
|
|
|
133
133
|
* Validate Dokploy token by making a test API call
|
|
134
134
|
*/
|
|
135
135
|
async function validateDokployToken(endpoint, token) {
|
|
136
|
-
const { DokployApi } = await import("./sniffer-
|
|
136
|
+
const { DokployApi } = await import("./sniffer-CFRzIrby.mjs").then((n) => n.c);
|
|
137
137
|
return new DokployApi({
|
|
138
138
|
baseUrl: endpoint,
|
|
139
139
|
token
|
|
@@ -209,7 +209,7 @@ async function loginCommand(options) {
|
|
|
209
209
|
* Store a GoDaddy Personal Access Token. Not validated: the only call that
|
|
210
210
|
* proves a token without a domain is an account call (`GET /v1/domains`),
|
|
211
211
|
* which a token scoped to `domains.dns:update` alone may not make — the first
|
|
212
|
-
*
|
|
212
|
+
* deploy that writes a record is where a bad token reports itself.
|
|
213
213
|
*/
|
|
214
214
|
async function loginGoDaddy(options) {
|
|
215
215
|
logger$8.log("\n🔐 Logging in to GoDaddy...\n");
|
|
@@ -230,7 +230,7 @@ async function loginGoDaddy(options) {
|
|
|
230
230
|
logger$8.log("\n✓ GoDaddy token stored.");
|
|
231
231
|
logger$8.log(` Token: ${maskToken(token)}`);
|
|
232
232
|
logger$8.log(` Credentials stored in: ${getCredentialsPath(where)}`);
|
|
233
|
-
logger$8.log(" Not validated here: proving a token without a domain needs an account\n scope a DNS-only token does not have, so the first
|
|
233
|
+
logger$8.log(" Not validated here: proving a token without a domain needs an account\n scope a DNS-only token does not have, so the first deploy that\n writes a record is where a bad token reports itself.");
|
|
234
234
|
logger$8.log("\nYou can now use it as a DNS provider without setting GODADDY_API_TOKEN.");
|
|
235
235
|
}
|
|
236
236
|
/**
|
|
@@ -2327,9 +2327,9 @@ async function workspaceDevCommand(configured, options) {
|
|
|
2327
2327
|
for (const { id, port } of fakes) logger$5.log(`🎭 ${id} fake: http://localhost:${port}`);
|
|
2328
2328
|
logger$5.log(options.migrate || options.seed ? "🗄️ Migrating the databases" : "🗄️ Checking for pending migrations");
|
|
2329
2329
|
if (options.migrate || options.seed) {
|
|
2330
|
-
const { prepareDevDatabases } = await import("./migrate-
|
|
2330
|
+
const { prepareDevDatabases } = await import("./migrate-CZ-v5WV0.mjs");
|
|
2331
2331
|
await prepareDevDatabases(workspace, reconciled.env, { seed: !!options.seed });
|
|
2332
|
-
} else await import("./migrate-
|
|
2332
|
+
} else await import("./migrate-CZ-v5WV0.mjs").then(({ reportPendingMigrations }) => reportPendingMigrations(workspace, reconciled.env)).catch((error) => {
|
|
2333
2333
|
logger$5.log(`⚠️ Could not check for pending migrations: ${error instanceof Error ? error.message : String(error)}`);
|
|
2334
2334
|
});
|
|
2335
2335
|
const appUrls = {};
|
|
@@ -3382,7 +3382,7 @@ async function buildApp(input) {
|
|
|
3382
3382
|
...production,
|
|
3383
3383
|
...telemetry ? { telemetry } : {}
|
|
3384
3384
|
});
|
|
3385
|
-
const { bundleServer } = await import("./bundler-
|
|
3385
|
+
const { bundleServer } = await import("./bundler-ywR3C1B_.mjs");
|
|
3386
3386
|
await bundleServer({
|
|
3387
3387
|
entryPoint,
|
|
3388
3388
|
outputDir: join(outputDir, "dist"),
|
|
@@ -3527,7 +3527,7 @@ async function buildWorkers(input) {
|
|
|
3527
3527
|
});
|
|
3528
3528
|
logger$4.log(`Generated worker ${worker.id}: ${crons.length} crons, ${queues.length} queues, ${subscribers.length} subscribers`);
|
|
3529
3529
|
if (!input.bundle) continue;
|
|
3530
|
-
const { bundleServer } = await import("./bundler-
|
|
3530
|
+
const { bundleServer } = await import("./bundler-ywR3C1B_.mjs");
|
|
3531
3531
|
const outfile = workerBundleName(worker.id);
|
|
3532
3532
|
await bundleServer({
|
|
3533
3533
|
entryPoint,
|
|
@@ -3613,7 +3613,7 @@ async function buildForTarget(target, context, appRoot, workspaceRoot, endpointG
|
|
|
3613
3613
|
let masterKey;
|
|
3614
3614
|
if (context.production?.bundle && !skipBundle) {
|
|
3615
3615
|
logger$4.log(`\n📦 Bundling production server...`);
|
|
3616
|
-
const { bundleServer } = await import("./bundler-
|
|
3616
|
+
const { bundleServer } = await import("./bundler-ywR3C1B_.mjs");
|
|
3617
3617
|
const allConstructs = [
|
|
3618
3618
|
...endpoints.map((e) => e.construct),
|
|
3619
3619
|
...functions.map((f) => f.construct),
|
|
@@ -3907,7 +3907,11 @@ async function composeCommand(options, deps = {}) {
|
|
|
3907
3907
|
...options.dryRun ? { dryRun: true } : {},
|
|
3908
3908
|
...options.push ? { buildOnly: true } : {},
|
|
3909
3909
|
...options.allowDevServices ? { allowDevServices: true } : {},
|
|
3910
|
-
...options.
|
|
3910
|
+
...options.skipDns ? { skipDns: true } : {},
|
|
3911
|
+
...options.resourcesOnly ? { resourcesOnly: true } : {},
|
|
3912
|
+
...options.skipResources ? { skipResources: true } : {},
|
|
3913
|
+
...options.rotateKeys ? { rotateKeys: true } : {},
|
|
3914
|
+
...options.retireOldKeys ? { retireOldKeys: true } : {},
|
|
3911
3915
|
logger: {
|
|
3912
3916
|
info: (message) => console.log(message),
|
|
3913
3917
|
warn: (message) => console.warn(message),
|
|
@@ -5424,25 +5428,25 @@ function loadPackageJson() {
|
|
|
5424
5428
|
* Run: pnpm --filter @geekmidas/cli sync-versions
|
|
5425
5429
|
*/
|
|
5426
5430
|
const GEEKMIDAS_VERSIONS = {
|
|
5427
|
-
"@geekmidas/audit": "~10.0.0-alpha.
|
|
5428
|
-
"@geekmidas/auth": "~10.0.0-alpha.
|
|
5429
|
-
"@geekmidas/cache": "~10.0.0-alpha.
|
|
5430
|
-
"@geekmidas/client": "~10.0.0-alpha.
|
|
5431
|
-
"@geekmidas/cloud": "~10.0.0-alpha.
|
|
5432
|
-
"@geekmidas/constructs": "~10.0.0-alpha.
|
|
5433
|
-
"@geekmidas/db": "~10.0.0-alpha.
|
|
5434
|
-
"@geekmidas/emailkit": "~10.0.0-alpha.
|
|
5435
|
-
"@geekmidas/envkit": "~10.0.0-alpha.
|
|
5436
|
-
"@geekmidas/errors": "~10.0.0-alpha.
|
|
5437
|
-
"@geekmidas/events": "~10.0.0-alpha.
|
|
5438
|
-
"@geekmidas/logger": "~10.0.0-alpha.
|
|
5439
|
-
"@geekmidas/manifest": "~10.0.0-alpha.
|
|
5440
|
-
"@geekmidas/rate-limit": "~10.0.0-alpha.
|
|
5441
|
-
"@geekmidas/schema": "~10.0.0-alpha.
|
|
5442
|
-
"@geekmidas/services": "~10.0.0-alpha.
|
|
5443
|
-
"@geekmidas/storage": "~10.0.0-alpha.
|
|
5444
|
-
"@geekmidas/telescope": "~10.0.0-alpha.
|
|
5445
|
-
"@geekmidas/testkit": "~10.0.0-alpha.
|
|
5431
|
+
"@geekmidas/audit": "~10.0.0-alpha.95",
|
|
5432
|
+
"@geekmidas/auth": "~10.0.0-alpha.95",
|
|
5433
|
+
"@geekmidas/cache": "~10.0.0-alpha.95",
|
|
5434
|
+
"@geekmidas/client": "~10.0.0-alpha.95",
|
|
5435
|
+
"@geekmidas/cloud": "~10.0.0-alpha.95",
|
|
5436
|
+
"@geekmidas/constructs": "~10.0.0-alpha.95",
|
|
5437
|
+
"@geekmidas/db": "~10.0.0-alpha.95",
|
|
5438
|
+
"@geekmidas/emailkit": "~10.0.0-alpha.95",
|
|
5439
|
+
"@geekmidas/envkit": "~10.0.0-alpha.95",
|
|
5440
|
+
"@geekmidas/errors": "~10.0.0-alpha.95",
|
|
5441
|
+
"@geekmidas/events": "~10.0.0-alpha.95",
|
|
5442
|
+
"@geekmidas/logger": "~10.0.0-alpha.95",
|
|
5443
|
+
"@geekmidas/manifest": "~10.0.0-alpha.95",
|
|
5444
|
+
"@geekmidas/rate-limit": "~10.0.0-alpha.95",
|
|
5445
|
+
"@geekmidas/schema": "~10.0.0-alpha.95",
|
|
5446
|
+
"@geekmidas/services": "~10.0.0-alpha.95",
|
|
5447
|
+
"@geekmidas/storage": "~10.0.0-alpha.95",
|
|
5448
|
+
"@geekmidas/telescope": "~10.0.0-alpha.95",
|
|
5449
|
+
"@geekmidas/testkit": "~10.0.0-alpha.95",
|
|
5446
5450
|
"@geekmidas/cli": `~${loadPackageJson().version}`
|
|
5447
5451
|
};
|
|
5448
5452
|
//#endregion
|
|
@@ -5843,7 +5847,7 @@ const COMMIT = /^[0-9a-f]{40}$/;
|
|
|
5843
5847
|
* The `uses:` value for the stages action, with a comment saying which CLI
|
|
5844
5848
|
* release the pinned commit is.
|
|
5845
5849
|
*/
|
|
5846
|
-
function stagesActionUses(commit = "
|
|
5850
|
+
function stagesActionUses(commit = "6872ad96b3244965b8a15e38e14ce79b966d5fba", version = cliVersion()) {
|
|
5847
5851
|
return commit && COMMIT.test(commit) ? `${STAGES_ACTION}@${commit} # @geekmidas/cli ${version}` : `${STAGES_ACTION}@main # pin to a commit SHA: see the action's README`;
|
|
5848
5852
|
}
|
|
5849
5853
|
//#endregion
|
|
@@ -6095,6 +6099,7 @@ function stagesJob(options) {
|
|
|
6095
6099
|
has-build: \${{ steps.stages.outputs.has-build }}
|
|
6096
6100
|
has-deploy: \${{ steps.stages.outputs.has-deploy }}
|
|
6097
6101
|
aws-region: \${{ steps.stages.outputs.aws-region }}
|
|
6102
|
+
resources: \${{ steps.stages.outputs.resources }}
|
|
6098
6103
|
steps:
|
|
6099
6104
|
- uses: actions/checkout@v4
|
|
6100
6105
|
|
|
@@ -6112,6 +6117,10 @@ ${pm.setup}
|
|
|
6112
6117
|
stage: \${{ inputs.stage }}
|
|
6113
6118
|
`;
|
|
6114
6119
|
}
|
|
6120
|
+
/** Every step in `steps` run only when `condition` holds. */
|
|
6121
|
+
function onlyIf(steps, condition) {
|
|
6122
|
+
return steps.replace(/^ {6}- /gm, ` - if: ${condition}\n `);
|
|
6123
|
+
}
|
|
6115
6124
|
/**
|
|
6116
6125
|
* The registry login a compose build pushes with: GitHub's own token on
|
|
6117
6126
|
* ghcr.io, otherwise a username variable and a password secret.
|
|
@@ -6136,6 +6145,11 @@ function registryLogin(registry) {
|
|
|
6136
6145
|
* `ref` — then that commit's push build, whose digests pin each image. Over
|
|
6137
6146
|
* SSH, with a pinned host key, the server checks the commit out and runs
|
|
6138
6147
|
* `gkm compose` on exactly those images.
|
|
6148
|
+
* - Resources: where the stage has some the deploy creates — a provider's
|
|
6149
|
+
* bucket and key, DNS records through a provider — the runner creates them
|
|
6150
|
+
* first (`gkm deploy --resources-only`) with the stage's role and the DNS
|
|
6151
|
+
* token from its environment, and the server deploys with
|
|
6152
|
+
* `--skip-resources`: neither credential reaches the server.
|
|
6139
6153
|
*/
|
|
6140
6154
|
function composeDeploy(options) {
|
|
6141
6155
|
const pm = tooling(options);
|
|
@@ -6211,6 +6225,13 @@ ${registryLogin(registry)}
|
|
|
6211
6225
|
permissions:
|
|
6212
6226
|
contents: read
|
|
6213
6227
|
actions: read
|
|
6228
|
+
id-token: write
|
|
6229
|
+
env:
|
|
6230
|
+
# Whether the stage has resources the deploy creates — a provider's
|
|
6231
|
+
# bucket and key (deploy.<kind>.<stage>), DNS records through a provider
|
|
6232
|
+
# in dns: the runner creates them with the stage's role and DNS token,
|
|
6233
|
+
# so neither reaches the server, which deploys with --skip-resources.
|
|
6234
|
+
RESOURCES_ON_RUNNER: \${{ contains(fromJSON(needs.stages.outputs.resources || '[]'), matrix.stage) }}
|
|
6214
6235
|
steps:
|
|
6215
6236
|
# A release deploys its tag's commit, never its target_commitish — the
|
|
6216
6237
|
# branch it was drafted against, which has moved on since.
|
|
@@ -6233,6 +6254,40 @@ ${registryLogin(registry)}
|
|
|
6233
6254
|
REF: \${{ inputs.ref }}
|
|
6234
6255
|
SHA: \${{ github.sha }}
|
|
6235
6256
|
|
|
6257
|
+
# The deploy's resources, here on the runner: each provider's bucket
|
|
6258
|
+
# and key (written into the stage's secrets store), and every public
|
|
6259
|
+
# host's DNS record — a new app's included, one per host, never a
|
|
6260
|
+
# wildcard — written through the provider where it is missing or out of
|
|
6261
|
+
# date and read back from it. The stage's secrets (GKM_SERVER_IPV4
|
|
6262
|
+
# among them) are read with the stage's role; the DNS token is a secret
|
|
6263
|
+
# on this stage's environment. A missing credential fails here, before
|
|
6264
|
+
# anything is deployed.
|
|
6265
|
+
- name: Check out the commit
|
|
6266
|
+
if: env.RESOURCES_ON_RUNNER == 'true'
|
|
6267
|
+
uses: actions/checkout@v4
|
|
6268
|
+
with:
|
|
6269
|
+
ref: \${{ steps.commit.outputs.sha }}
|
|
6270
|
+
|
|
6271
|
+
${onlyIf(pm.setup, "env.RESOURCES_ON_RUNNER == 'true'")}
|
|
6272
|
+
- name: Install
|
|
6273
|
+
if: env.RESOURCES_ON_RUNNER == 'true'
|
|
6274
|
+
run: ${pm.install}
|
|
6275
|
+
|
|
6276
|
+
- name: Assume the stage's AWS role
|
|
6277
|
+
if: env.RESOURCES_ON_RUNNER == 'true' && needs.stages.outputs.aws-region != ''
|
|
6278
|
+
uses: aws-actions/configure-aws-credentials@v4
|
|
6279
|
+
with:
|
|
6280
|
+
role-to-assume: \${{ vars.AWS_ROLE_ARN }}
|
|
6281
|
+
aws-region: \${{ needs.stages.outputs.aws-region }}
|
|
6282
|
+
|
|
6283
|
+
- name: Create the stage's resources
|
|
6284
|
+
if: env.RESOURCES_ON_RUNNER == 'true'
|
|
6285
|
+
run: ${pm.exec} gkm deploy --stage "$STAGE" --resources-only
|
|
6286
|
+
env:
|
|
6287
|
+
STAGE: \${{ matrix.stage }}
|
|
6288
|
+
GODADDY_API_TOKEN: \${{ secrets.GODADDY_API_TOKEN }}
|
|
6289
|
+
HOSTINGER_API_TOKEN: \${{ secrets.HOSTINGER_API_TOKEN }}
|
|
6290
|
+
|
|
6236
6291
|
# The push run of this workflow that built the commit for this stage:
|
|
6237
6292
|
# this run on a push, the newest one with the stage's digests otherwise.
|
|
6238
6293
|
- name: Find the commit's push build
|
|
@@ -6294,9 +6349,9 @@ ${registryLogin(registry)}
|
|
|
6294
6349
|
if [ -f digests.json ]; then digests=$(base64 -w0 < digests.json); fi
|
|
6295
6350
|
ssh -i ~/.ssh/deploy_key -o IdentitiesOnly=yes -o StrictHostKeyChecking=yes \\
|
|
6296
6351
|
"$DEPLOY_USER@$DEPLOY_HOST" \\
|
|
6297
|
-
"bash -s -- $(printf '%q ' "$STAGE" "$SHA" "$DEPLOY_PATH" "$digests")" <<'REMOTE'
|
|
6352
|
+
"bash -s -- $(printf '%q ' "$STAGE" "$SHA" "$DEPLOY_PATH" "$digests" "$RESOURCES_ON_RUNNER")" <<'REMOTE'
|
|
6298
6353
|
set -euo pipefail
|
|
6299
|
-
stage=$1 sha=$2 dir=$3 digests=$4
|
|
6354
|
+
stage=$1 sha=$2 dir=$3 digests=$4 resources_on_runner=$5
|
|
6300
6355
|
cd "$dir"
|
|
6301
6356
|
git fetch --quiet origin
|
|
6302
6357
|
git checkout --quiet --detach "$sha"
|
|
@@ -6307,6 +6362,8 @@ ${registryLogin(registry)}
|
|
|
6307
6362
|
printf '%s' "$digests" | base64 -d > ".gkm/digests-$stage.json"
|
|
6308
6363
|
args+=(--digests-file ".gkm/digests-$stage.json")
|
|
6309
6364
|
fi
|
|
6365
|
+
# Created and confirmed from the runner already.
|
|
6366
|
+
if [ "$resources_on_runner" = true ]; then args+=(--skip-resources); fi
|
|
6310
6367
|
${pm.exec} gkm compose "\${args[@]}"
|
|
6311
6368
|
REMOTE
|
|
6312
6369
|
env:
|
|
@@ -6355,7 +6412,9 @@ function targetDeploy(options) {
|
|
|
6355
6412
|
`;
|
|
6356
6413
|
const deployEnv = sst ? "" : `
|
|
6357
6414
|
DOKPLOY_API_TOKEN: \${{ secrets.DOKPLOY_API_TOKEN }}
|
|
6358
|
-
DOKPLOY_ENDPOINT: \${{ vars.DOKPLOY_ENDPOINT }}
|
|
6415
|
+
DOKPLOY_ENDPOINT: \${{ vars.DOKPLOY_ENDPOINT }}
|
|
6416
|
+
GODADDY_API_TOKEN: \${{ secrets.GODADDY_API_TOKEN }}
|
|
6417
|
+
HOSTINGER_API_TOKEN: \${{ secrets.HOSTINGER_API_TOKEN }}`;
|
|
6359
6418
|
return `${deployHeader(false)}
|
|
6360
6419
|
jobs:
|
|
6361
6420
|
${stagesJob(options)}
|
|
@@ -11127,6 +11186,7 @@ function maskUrl(url) {
|
|
|
11127
11186
|
//#endregion
|
|
11128
11187
|
//#region src/setup/index.ts
|
|
11129
11188
|
var setup_exports = /* @__PURE__ */ __exportAll({
|
|
11189
|
+
SetupIsLocal: () => SetupIsLocal,
|
|
11130
11190
|
createFreshWorkspaceSecrets: () => createFreshWorkspaceSecrets,
|
|
11131
11191
|
ensureStageSecrets: () => ensureStageSecrets,
|
|
11132
11192
|
reconcileSecrets: () => reconcileSecrets,
|
|
@@ -11134,14 +11194,21 @@ var setup_exports = /* @__PURE__ */ __exportAll({
|
|
|
11134
11194
|
});
|
|
11135
11195
|
const logger$1 = console;
|
|
11136
11196
|
/**
|
|
11137
|
-
*
|
|
11138
|
-
*
|
|
11139
|
-
|
|
11140
|
-
|
|
11141
|
-
|
|
11142
|
-
|
|
11143
|
-
|
|
11144
|
-
|
|
11197
|
+
* `gkm setup --stage <deployed stage>`: setup is this machine's, done once,
|
|
11198
|
+
* and creates nothing for a deployed stage — the deploy does.
|
|
11199
|
+
*/
|
|
11200
|
+
var SetupIsLocal = class extends GkmError {
|
|
11201
|
+
stage;
|
|
11202
|
+
constructor(stage) {
|
|
11203
|
+
super(`gkm setup sets up this machine — its secrets and its containers — and '${stage}' is a deployed stage: nothing of it is set up from here. The deploy creates what '${stage}' needs — its buckets and keys, its DNS records — every time it runs: gkm deploy --stage ${stage} (gkm compose --stage ${stage} is the same deploy). Its --dry-run prints what it would create.`);
|
|
11204
|
+
this.stage = stage;
|
|
11205
|
+
this.name = "SetupIsLocal";
|
|
11206
|
+
}
|
|
11207
|
+
};
|
|
11208
|
+
/**
|
|
11209
|
+
* Set this machine up for the workspace, once: the local stage's secrets
|
|
11210
|
+
* (local → the stage's store → generated) and its containers. A deployed
|
|
11211
|
+
* stage is refused with {@link SetupIsLocal}: its resources are the deploy's.
|
|
11145
11212
|
*/
|
|
11146
11213
|
async function setupCommand(options = {}) {
|
|
11147
11214
|
let loadedConfig;
|
|
@@ -11153,27 +11220,15 @@ async function setupCommand(options = {}) {
|
|
|
11153
11220
|
}
|
|
11154
11221
|
const stage = options.stage ?? loadedConfig.workspace.stages.local;
|
|
11155
11222
|
const { workspace } = loadedConfig;
|
|
11156
|
-
|
|
11157
|
-
logger$1.log(
|
|
11223
|
+
if (workspace.stages.deployed.includes(stage)) throw new SetupIsLocal(stage);
|
|
11224
|
+
logger$1.log("\n🔧 Setting up the local environment...\n");
|
|
11158
11225
|
logger$1.log(`📦 Workspace: ${workspace.name}`);
|
|
11159
11226
|
logger$1.log(`📱 Apps: ${Object.keys(workspace.apps).join(", ")}`);
|
|
11160
11227
|
logger$1.log(`🔑 Stage: ${stage}\n`);
|
|
11161
|
-
if (!local) {
|
|
11162
|
-
const store = await secretsStoreFor(workspace, stage, { ...options.profile ? { profile: options.profile } : {} });
|
|
11163
|
-
assertStageServer(workspace, stage, await store.read(stage));
|
|
11164
|
-
}
|
|
11165
|
-
if (!local && options.dryRun) {
|
|
11166
|
-
await provisionDeployed(workspace, stage, options);
|
|
11167
|
-
return;
|
|
11168
|
-
}
|
|
11169
11228
|
if (!await resolveSecrets(stage, workspace, options)) {
|
|
11170
11229
|
logger$1.error("❌ Failed to resolve secrets. Exiting.");
|
|
11171
11230
|
process.exit(1);
|
|
11172
11231
|
}
|
|
11173
|
-
if (!local) {
|
|
11174
|
-
await provisionDeployed(workspace, stage, options);
|
|
11175
|
-
return;
|
|
11176
|
-
}
|
|
11177
11232
|
if (!options.skipDocker) {
|
|
11178
11233
|
logger$1.log("");
|
|
11179
11234
|
await reconcileLocal(workspace, stage, options);
|
|
@@ -11181,33 +11236,6 @@ async function setupCommand(options = {}) {
|
|
|
11181
11236
|
printSummary(workspace, stage);
|
|
11182
11237
|
}
|
|
11183
11238
|
/**
|
|
11184
|
-
* A deployed stage's providers: each one's `ensure()`, in the stage's own
|
|
11185
|
-
* account, its keys written into the stage's secrets.
|
|
11186
|
-
*/
|
|
11187
|
-
async function provisionDeployed(workspace, stage, options) {
|
|
11188
|
-
logger$1.log(options.dryRun ? `\n☁️ Providers for '${stage}' (dry run — nothing is created or written)` : `\n☁️ Providers for '${stage}'`);
|
|
11189
|
-
const configured = (await provisionStage({
|
|
11190
|
-
workspace,
|
|
11191
|
-
stage,
|
|
11192
|
-
...options.dryRun ? { dryRun: true } : {},
|
|
11193
|
-
...options.profile ? { profile: options.profile } : {},
|
|
11194
|
-
...options.rotateKeys ? { rotateKeys: true } : {},
|
|
11195
|
-
...options.retireOldKeys ? { retireOldKeys: true } : {},
|
|
11196
|
-
log: (line) => logger$1.log(line)
|
|
11197
|
-
})).filter((r) => r.mode === "provider");
|
|
11198
|
-
if (configured.length === 0) logger$1.log(` None configured: '${stage}' takes every key from its secrets (gkm secrets:add --stage ${stage}). Name one in gkm.config.ts — deploy: { objects: { ${stage}: { provider: 's3' } } } — to have ${provisionCommand(stage)} create it.`);
|
|
11199
|
-
const dns = await provisionStageDns({
|
|
11200
|
-
workspace,
|
|
11201
|
-
stage,
|
|
11202
|
-
...options.dryRun ? { dryRun: true } : {},
|
|
11203
|
-
...options.profile ? { profile: options.profile } : {},
|
|
11204
|
-
log: (line) => logger$1.log(line)
|
|
11205
|
-
});
|
|
11206
|
-
const changes = configured.reduce((n, r) => n + r.actions.length, 0) + dns.changes.filter((c) => c.action !== "unchanged" && c.action !== "manual").length;
|
|
11207
|
-
if (configured.length === 0 && dns.mode === "none") return;
|
|
11208
|
-
logger$1.log(options.dryRun ? `\n${changes === 0 ? "✅ Nothing to change" : `📋 ${changes} change${changes === 1 ? "" : "s"} planned`}` : `\n✅ '${stage}' provisioned${changes === 0 ? " — already up to date" : ` (${changes} change${changes === 1 ? "" : "s"})`}`);
|
|
11209
|
-
}
|
|
11210
|
-
/**
|
|
11211
11239
|
* Converge this machine on what the manifest declares.
|
|
11212
11240
|
*
|
|
11213
11241
|
* Says what it did in one line and stays silent when it did nothing, because
|
|
@@ -11232,7 +11260,7 @@ async function reconcileLocal(workspace, stage, options) {
|
|
|
11232
11260
|
/**
|
|
11233
11261
|
* Resolve secrets with priority:
|
|
11234
11262
|
* 1. Local secrets exist → use them (preserves manual additions)
|
|
11235
|
-
* 2.
|
|
11263
|
+
* 2. The stage's store has secrets → use them
|
|
11236
11264
|
* 3. Neither → generate fresh secrets
|
|
11237
11265
|
*
|
|
11238
11266
|
* --force skips checks 1 and 2 and always regenerates.
|
|
@@ -11559,7 +11587,7 @@ function testDatabases(reconciled) {
|
|
|
11559
11587
|
* starts without the reference data the app needs.
|
|
11560
11588
|
*/
|
|
11561
11589
|
async function migrateTestStage(workspace, env) {
|
|
11562
|
-
const { migrateAndSeed } = await import("./migrate-
|
|
11590
|
+
const { migrateAndSeed } = await import("./migrate-CZ-v5WV0.mjs");
|
|
11563
11591
|
const { discover } = await import("./discover-qjFapetL.mjs").then((n) => n.i);
|
|
11564
11592
|
const sources = {};
|
|
11565
11593
|
const manifest = await discover({
|
|
@@ -11913,7 +11941,7 @@ program.command("trust").description("Trust the local edge's certificate authori
|
|
|
11913
11941
|
exitWithError(error);
|
|
11914
11942
|
}
|
|
11915
11943
|
});
|
|
11916
|
-
program.command("setup").description("
|
|
11944
|
+
program.command("setup").description("Set this machine up for the workspace, once: the local stage's secrets and containers. A deployed stage's resources are created by its deploy").option("--stage <stage>", "Stage name (default: stages.local); never a deployed stage").option("--force", "Regenerate secrets even if they exist").option("--skip-docker", "Skip starting Docker services").option("-y, --yes", "Skip prompts").action(async (options) => {
|
|
11917
11945
|
try {
|
|
11918
11946
|
const globalOptions = program.opts();
|
|
11919
11947
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
@@ -11995,7 +12023,7 @@ program.command("migrate").description("Apply each database construct's migratio
|
|
|
11995
12023
|
try {
|
|
11996
12024
|
const globalOptions = program.opts();
|
|
11997
12025
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
11998
|
-
const { migrateCommand } = await import("./migrate-
|
|
12026
|
+
const { migrateCommand } = await import("./migrate-CZ-v5WV0.mjs");
|
|
11999
12027
|
await migrateCommand({
|
|
12000
12028
|
...options,
|
|
12001
12029
|
...construct ? { construct } : {}
|
|
@@ -12008,7 +12036,7 @@ program.command("seed").description("Migrate, then run each database construct's
|
|
|
12008
12036
|
try {
|
|
12009
12037
|
const globalOptions = program.opts();
|
|
12010
12038
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12011
|
-
const { seedCommand } = await import("./migrate-
|
|
12039
|
+
const { seedCommand } = await import("./migrate-CZ-v5WV0.mjs");
|
|
12012
12040
|
await seedCommand({
|
|
12013
12041
|
...options,
|
|
12014
12042
|
...construct ? { construct } : {}
|
|
@@ -12021,7 +12049,7 @@ program.command("migration").description("Write a construct's next migration: an
|
|
|
12021
12049
|
try {
|
|
12022
12050
|
const globalOptions = program.opts();
|
|
12023
12051
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12024
|
-
const { migrationCommand } = await import("./migrate-
|
|
12052
|
+
const { migrationCommand } = await import("./migrate-CZ-v5WV0.mjs");
|
|
12025
12053
|
await migrationCommand({
|
|
12026
12054
|
construct,
|
|
12027
12055
|
...name ? { name } : {}
|
|
@@ -12067,7 +12095,7 @@ program.command("docker").description("Generate Docker deployment files").option
|
|
|
12067
12095
|
exitWithError(error);
|
|
12068
12096
|
}
|
|
12069
12097
|
});
|
|
12070
|
-
program.command("compose").description("Run the workspace's APIs and sites for a stage as one Docker Compose stack behind Caddy").requiredOption("--stage <stage>", "Stage to run — always named, so a stack is never a deployed stage by accident").option("--tag <tag>", "Run the images CI pushed at this tag (sites: <tag>-<stage>); nothing is built").option("--build", "Build images from this checkout, tagged with the commit").option("--pull", "Pull images (at --tag, or latest) rather than build them").option("--push", "With --build: push every image to deploy.registry and start nothing (for CI)").option("--digests-file <path>", "With --push: write each image as <ref>@sha256:… (JSON). With --tag: run the images at those digests").option("--dry-run", "Write the files and print the plan; start nothing").option("--down", "Stop the stage's stack (its volumes are kept)").option("--allow-dev-services", "Deployed stage: run the dev service (MinIO, Mailpit) for every bucket and mail the stage doesn't account for. Not production-grade").option("--skip-dns
|
|
12098
|
+
program.command("compose").description("Run the workspace's APIs and sites for a stage as one Docker Compose stack behind Caddy").requiredOption("--stage <stage>", "Stage to run — always named, so a stack is never a deployed stage by accident").option("--tag <tag>", "Run the images CI pushed at this tag (sites: <tag>-<stage>); nothing is built").option("--build", "Build images from this checkout, tagged with the commit").option("--pull", "Pull images (at --tag, or latest) rather than build them").option("--push", "With --build: push every image to deploy.registry and start nothing (for CI)").option("--digests-file <path>", "With --push: write each image as <ref>@sha256:… (JSON). With --tag: run the images at those digests").option("--dry-run", "Write the files and print the plan; start nothing").option("--down", "Stop the stage's stack (its volumes are kept)").option("--allow-dev-services", "Deployed stage: run the dev service (MinIO, Mailpit) for every bucket and mail the stage doesn't account for. Not production-grade").option("--skip-dns", "Deployed stage: neither write the public hosts' DNS records nor check they point at GKM_SERVER_IPV4 (a CDN or proxy in front, or records written elsewhere)").option("--resources-only", "Deployed stage: create its resources — deploy.<kind>.<stage> providers' buckets and keys, and its DNS records — and nothing else (a CI runner, before the server deploys)").option("--skip-resources", "Deployed stage: an earlier --resources-only run created its resources; run no provider and write or check no DNS record").option("--rotate-keys", "Deployed stage: each provider issues its runtime keys a successor (the old one is deleted by the next deploy)").option("--retire-old-keys", "Deployed stage: delete a rotated-out key now instead of on the next deploy").action(async (options) => {
|
|
12071
12099
|
try {
|
|
12072
12100
|
const globalOptions = program.opts();
|
|
12073
12101
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
@@ -12121,7 +12149,7 @@ program.command("secrets:add").description("Build the keys a stage must be given
|
|
|
12121
12149
|
try {
|
|
12122
12150
|
const globalOptions = program.opts();
|
|
12123
12151
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12124
|
-
const { secretsAddCommand } = await import("./add-
|
|
12152
|
+
const { secretsAddCommand } = await import("./add-ylx8dejw.mjs");
|
|
12125
12153
|
await secretsAddCommand(options);
|
|
12126
12154
|
} catch (error) {
|
|
12127
12155
|
exitWithError(error);
|
|
@@ -12131,7 +12159,7 @@ program.command("encryption:rotate").description("Add a new current key to an En
|
|
|
12131
12159
|
try {
|
|
12132
12160
|
const globalOptions = program.opts();
|
|
12133
12161
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12134
|
-
const { encryptionRotateCommand } = await import("./encryption-
|
|
12162
|
+
const { encryptionRotateCommand } = await import("./encryption-D0ucY4O7.mjs");
|
|
12135
12163
|
await encryptionRotateCommand(construct, options);
|
|
12136
12164
|
} catch (error) {
|
|
12137
12165
|
exitWithError(error);
|
|
@@ -12141,7 +12169,7 @@ program.command("encryption:retire").description("Remove an old key from an Encr
|
|
|
12141
12169
|
try {
|
|
12142
12170
|
const globalOptions = program.opts();
|
|
12143
12171
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12144
|
-
const { encryptionRetireCommand } = await import("./encryption-
|
|
12172
|
+
const { encryptionRetireCommand } = await import("./encryption-D0ucY4O7.mjs");
|
|
12145
12173
|
await encryptionRetireCommand(construct, key, options);
|
|
12146
12174
|
} catch (error) {
|
|
12147
12175
|
exitWithError(error);
|
|
@@ -12180,7 +12208,7 @@ program.command("secrets:reconcile").description("Backfill missing custom secret
|
|
|
12180
12208
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12181
12209
|
const { loadWorkspaceConfig } = await import("./config.mjs");
|
|
12182
12210
|
const { reconcileMissingSecrets } = await import("./reconcile--I7V4Klj.mjs");
|
|
12183
|
-
const { secretsStoreFor } = await import("./seeds-
|
|
12211
|
+
const { secretsStoreFor } = await import("./seeds-CoKkrSny.mjs").then((n) => n.An);
|
|
12184
12212
|
const { workspace } = await loadWorkspaceConfig();
|
|
12185
12213
|
const stage = options.stage ?? workspace.stages.local;
|
|
12186
12214
|
const store = await secretsStoreFor(workspace, stage);
|
|
@@ -12189,7 +12217,7 @@ program.command("secrets:reconcile").description("Backfill missing custom secret
|
|
|
12189
12217
|
console.error(`No secrets found for stage "${stage}". Run "gkm secrets:init --stage ${stage}" first.`);
|
|
12190
12218
|
process.exit(1);
|
|
12191
12219
|
}
|
|
12192
|
-
const { derivedContainers } = await import("./seeds-
|
|
12220
|
+
const { derivedContainers } = await import("./seeds-CoKkrSny.mjs").then((n) => n.dt);
|
|
12193
12221
|
const result = reconcileMissingSecrets(secrets, workspace, await derivedContainers(workspace, stage));
|
|
12194
12222
|
if (!result) {
|
|
12195
12223
|
console.log(`\n✓ Secrets for stage "${stage}" are up-to-date`);
|
|
@@ -12206,14 +12234,14 @@ program.command("secrets:migrate").description("Copy a deployed stage's secrets
|
|
|
12206
12234
|
try {
|
|
12207
12235
|
const globalOptions = program.opts();
|
|
12208
12236
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12209
|
-
const { secretsMigrateCommand } = await import("./migrate-
|
|
12237
|
+
const { secretsMigrateCommand } = await import("./migrate-D6PlNv2o.mjs");
|
|
12210
12238
|
await secretsMigrateCommand(options);
|
|
12211
12239
|
} catch (error) {
|
|
12212
12240
|
exitWithError(error);
|
|
12213
12241
|
}
|
|
12214
12242
|
});
|
|
12215
|
-
program.command("deploy").description("Deploy a stage through its target").option("--target <name>", "Deploy target: dokploy, compose, sst, or one named in deploy.targets (default: deploy.default)").option("--provider <provider>", "[DEPRECATED] Use --target instead").requiredOption("--stage <stage>", "Deployment stage (e.g., production, staging)").option("--tag <tag>", "Image tag (default: stage-timestamp; compose: the commit). Compose pulls a given tag").option("--skip-push", "Skip pushing image to registry").option("--skip-build", "Skip build step (use existing build)").option("--json", "Write events as JSON lines instead of progress; never prompts").option("--dry-run", "Show what would be created or reused; change, build and push nothing").option("--atomic", "If the release fails, roll back every app it released, not only the failed ones").option("--allow-dev-services", "Server targets: run the dev service (MinIO, Mailpit) for every bucket and mail the stage doesn't account for. Not production-grade").option("--skip-dns
|
|
12216
|
-
const { deployCli } = await import("./cli-
|
|
12243
|
+
program.command("deploy").description("Deploy a stage through its target").option("--target <name>", "Deploy target: dokploy, compose, sst, or one named in deploy.targets (default: deploy.default)").option("--provider <provider>", "[DEPRECATED] Use --target instead").requiredOption("--stage <stage>", "Deployment stage (e.g., production, staging)").option("--tag <tag>", "Image tag (default: stage-timestamp; compose: the commit). Compose pulls a given tag").option("--skip-push", "Skip pushing image to registry").option("--skip-build", "Skip build step (use existing build)").option("--json", "Write events as JSON lines instead of progress; never prompts").option("--dry-run", "Show what would be created or reused; change, build and push nothing").option("--atomic", "If the release fails, roll back every app it released, not only the failed ones").option("--allow-dev-services", "Server targets: run the dev service (MinIO, Mailpit) for every bucket and mail the stage doesn't account for. Not production-grade").option("--skip-dns", "Compose: neither write the public hosts' DNS records nor check they point at GKM_SERVER_IPV4 (a CDN or proxy in front, or records written elsewhere)").option("--resources-only", "Deployed stage: create its resources — deploy.<kind>.<stage> providers' buckets and keys, and its DNS records — and nothing else (a CI runner, before the server deploys)").option("--skip-resources", "Deployed stage: an earlier --resources-only run created its resources; run no provider and write or check no DNS record").option("--rotate-keys", "Deployed stage: each provider issues its runtime keys a successor (the old one is deleted by the next deploy)").option("--retire-old-keys", "Deployed stage: delete a rotated-out key now instead of on the next deploy").action(async (options) => {
|
|
12244
|
+
const { deployCli } = await import("./cli-BCSuCfQk.mjs");
|
|
12217
12245
|
const globalOptions = program.opts();
|
|
12218
12246
|
const code = await deployCli({
|
|
12219
12247
|
cwd: resolve(globalOptions.cwd ?? process.cwd()),
|
|
@@ -12225,14 +12253,18 @@ program.command("deploy").description("Deploy a stage through its target").optio
|
|
|
12225
12253
|
...options.dryRun ? { dryRun: true } : {},
|
|
12226
12254
|
...options.atomic ? { atomic: true } : {},
|
|
12227
12255
|
...options.allowDevServices ? { allowDevServices: true } : {},
|
|
12228
|
-
...options.
|
|
12256
|
+
...options.skipDns ? { skipDns: true } : {},
|
|
12257
|
+
...options.resourcesOnly ? { resourcesOnly: true } : {},
|
|
12258
|
+
...options.skipResources ? { skipResources: true } : {},
|
|
12259
|
+
...options.rotateKeys ? { rotateKeys: true } : {},
|
|
12260
|
+
...options.retireOldKeys ? { retireOldKeys: true } : {}
|
|
12229
12261
|
});
|
|
12230
12262
|
if (code !== 0) process.exit(code);
|
|
12231
12263
|
});
|
|
12232
12264
|
program.command("deploy:rollback").description("Put a stage's app back on its previous release (Dokploy): one app with --app, every app with --atomic").requiredOption("--stage <stage>", "A deployed stage").option("--app <app>", "The app to roll back").option("--atomic", "Roll back every app that has an earlier release").action(async (options) => {
|
|
12233
12265
|
try {
|
|
12234
|
-
const { rollbackStage } = await import("./rollback-
|
|
12235
|
-
const { terminalCredentials } = await import("./terminal-
|
|
12266
|
+
const { rollbackStage } = await import("./rollback-B1TIpjdE.mjs").then((n) => n.a);
|
|
12267
|
+
const { terminalCredentials } = await import("./terminal-iNmAXXjs.mjs");
|
|
12236
12268
|
const globalOptions = program.opts();
|
|
12237
12269
|
await rollbackStage({
|
|
12238
12270
|
cwd: resolve(globalOptions.cwd ?? process.cwd()),
|
|
@@ -12265,7 +12297,7 @@ program.command("deploy:github").description("Let GitHub Actions deploy a stage:
|
|
|
12265
12297
|
try {
|
|
12266
12298
|
const globalOptions = program.opts();
|
|
12267
12299
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12268
|
-
const { deployGithubCommand } = await import("./github-
|
|
12300
|
+
const { deployGithubCommand } = await import("./github-DUGA57du.mjs");
|
|
12269
12301
|
await deployGithubCommand(options);
|
|
12270
12302
|
} catch (error) {
|
|
12271
12303
|
exitWithError(error);
|
|
@@ -12275,7 +12307,7 @@ program.command("stages").description("The workspace's stages from gkm.config.ts
|
|
|
12275
12307
|
try {
|
|
12276
12308
|
const globalOptions = program.opts();
|
|
12277
12309
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12278
|
-
const { stagesCommand } = await import("./stages-
|
|
12310
|
+
const { stagesCommand } = await import("./stages-Bt4OggMm.mjs");
|
|
12279
12311
|
await stagesCommand(options);
|
|
12280
12312
|
} catch (error) {
|
|
12281
12313
|
exitWithError(error);
|