@geekmidas/cli 10.0.0-alpha.92 → 10.0.0-alpha.94
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-BqYGk9XT.mjs → GoDaddyProvider-BRZUWD8z.mjs} +3 -3
- package/dist/{GoDaddyProvider-BqYGk9XT.mjs.map → GoDaddyProvider-BRZUWD8z.mjs.map} +1 -1
- package/dist/{GoDaddyProvider-CJwg2r_9.cjs → GoDaddyProvider-DzguxU_a.cjs} +3 -3
- package/dist/{GoDaddyProvider-CJwg2r_9.cjs.map → GoDaddyProvider-DzguxU_a.cjs.map} +1 -1
- package/dist/{HostingerProvider-1mqD6aG8.mjs → HostingerProvider-Cjh_2Ml6.mjs} +9 -4
- package/dist/{HostingerProvider-1mqD6aG8.mjs.map → HostingerProvider-Cjh_2Ml6.mjs.map} +1 -1
- package/dist/{HostingerProvider-C6t-PSNe.cjs → HostingerProvider-OdQmKXE3.cjs} +9 -4
- package/dist/HostingerProvider-OdQmKXE3.cjs.map +1 -0
- package/dist/LegacyStateStore-BQZb6-j2.mjs +124 -0
- package/dist/LegacyStateStore-BQZb6-j2.mjs.map +1 -0
- package/dist/LegacyStateStore-D50dgUPc.cjs +124 -0
- package/dist/LegacyStateStore-D50dgUPc.cjs.map +1 -0
- package/dist/{LocalStateStore-Y8XHdoCR.mjs → LocalStateStore-BSaS2535.mjs} +2 -2
- package/dist/{LocalStateStore-Y8XHdoCR.mjs.map → LocalStateStore-BSaS2535.mjs.map} +1 -1
- package/dist/{LocalStateStore-BMfseje2.cjs → LocalStateStore-EFBUjuMX.cjs} +8 -8
- package/dist/{LocalStateStore-BMfseje2.cjs.map → LocalStateStore-EFBUjuMX.cjs.map} +1 -1
- package/dist/{S3StateStore-BmMt2HhW.cjs → S3StateStore-C5mv8To3.cjs} +5 -5
- package/dist/{S3StateStore-BmMt2HhW.cjs.map → S3StateStore-C5mv8To3.cjs.map} +1 -1
- package/dist/{S3StateStore-BfoY4MvD.mjs → S3StateStore-CrFq4UZU.mjs} +2 -2
- package/dist/{S3StateStore-BfoY4MvD.mjs.map → S3StateStore-CrFq4UZU.mjs.map} +1 -1
- package/dist/{SSMStateStore-Bdyw_0Jj.mjs → SSMStateStore-D3Z6mZnA.mjs} +2 -2
- package/dist/{SSMStateStore-Bdyw_0Jj.mjs.map → SSMStateStore-D3Z6mZnA.mjs.map} +1 -1
- package/dist/{SSMStateStore-D9K62wM4.cjs → SSMStateStore-DuZCH7_v.cjs} +9 -9
- package/dist/{SSMStateStore-D9K62wM4.cjs.map → SSMStateStore-DuZCH7_v.cjs.map} +1 -1
- package/dist/{add-2Opn2VVE.mjs → add-C85isXFl.mjs} +4 -5
- package/dist/add-C85isXFl.mjs.map +1 -0
- package/dist/{add-oN0b18HN.cjs → add-DsVDdvon.cjs} +5 -6
- package/dist/add-DsVDdvon.cjs.map +1 -0
- package/dist/{bundler-CXQDrhzN.cjs → bundler-BEgUKc4j.cjs} +5 -5
- package/dist/{bundler-CXQDrhzN.cjs.map → bundler-BEgUKc4j.cjs.map} +1 -1
- package/dist/{bundler-C-AdesaG.mjs → bundler-BSHog8CH.mjs} +5 -5
- package/dist/{bundler-C-AdesaG.mjs.map → bundler-BSHog8CH.mjs.map} +1 -1
- package/dist/{cli-BjhaVObS.mjs → cli-BsFenyaf.mjs} +10 -6
- package/dist/cli-BsFenyaf.mjs.map +1 -0
- package/dist/{cli-BRZFYvdb.cjs → cli-BvBdv660.cjs} +9 -5
- package/dist/cli-BvBdv660.cjs.map +1 -0
- package/dist/compose-Cd09gW-n.cjs +1562 -0
- package/dist/compose-Cd09gW-n.cjs.map +1 -0
- package/dist/compose-D2RFYd_f.mjs +1515 -0
- package/dist/compose-D2RFYd_f.mjs.map +1 -0
- package/dist/{config-C9zx7KsX.d.cts → config-DvHNMoOp.d.cts} +4 -4
- package/dist/{config-BJo8Wggp.d.mts.map → config-DvHNMoOp.d.cts.map} +1 -1
- package/dist/{config-BJo8Wggp.d.mts → config-Ngesg4O8.d.mts} +4 -4
- package/dist/{config-C9zx7KsX.d.cts.map → config-Ngesg4O8.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-QBu7VgaQ.cjs → credentials-D7XJypNd.cjs} +9 -3
- package/dist/{credentials-QBu7VgaQ.cjs.map → credentials-D7XJypNd.cjs.map} +1 -1
- package/dist/{credentials-C4KII3PD.mjs → credentials-DpfnUvIR.mjs} +9 -3
- package/dist/{credentials-C4KII3PD.mjs.map → credentials-DpfnUvIR.mjs.map} +1 -1
- package/dist/deploy/public.cjs +13 -12
- package/dist/deploy/public.d.cts +25 -10
- package/dist/deploy/public.d.cts.map +1 -1
- package/dist/deploy/public.d.mts +25 -10
- package/dist/deploy/public.d.mts.map +1 -1
- package/dist/deploy/public.mjs +11 -11
- package/dist/{deploy-6ToUHJmM.cjs → deploy-C911Akkn.cjs} +125 -10
- package/dist/deploy-C911Akkn.cjs.map +1 -0
- package/dist/{deploy-yuJHlkY0.mjs → deploy-CeJ5D0xn.mjs} +124 -9
- package/dist/deploy-CeJ5D0xn.mjs.map +1 -0
- package/dist/{discover-G76EQ4vY.d.mts → discover-CTzOSGUF.d.cts} +2 -2
- package/dist/{discover-CRMhvHG9.d.cts.map → discover-CTzOSGUF.d.cts.map} +1 -1
- package/dist/{discover-CRMhvHG9.d.cts → discover-CihAtaoj.d.mts} +2 -2
- package/dist/{discover-G76EQ4vY.d.mts.map → discover-CihAtaoj.d.mts.map} +1 -1
- package/dist/{dokploy-Bvvfj2qe.cjs → dokploy-CV7GcobZ.cjs} +2 -2
- package/dist/{dokploy-Bvvfj2qe.cjs.map → dokploy-CV7GcobZ.cjs.map} +1 -1
- package/dist/{dokploy-BvbJ_A4Q.mjs → dokploy-D_aat2Xj.mjs} +2 -2
- package/dist/{dokploy-BvbJ_A4Q.mjs.map → dokploy-D_aat2Xj.mjs.map} +1 -1
- package/dist/{encryption-CgW167LO.cjs → encryption-DFcivJaO.cjs} +3 -3
- package/dist/{encryption-CgW167LO.cjs.map → encryption-DFcivJaO.cjs.map} +1 -1
- package/dist/{encryption-C9Jm9dfn.mjs → encryption-_4qKqtTx.mjs} +3 -3
- package/dist/{encryption-C9Jm9dfn.mjs.map → encryption-_4qKqtTx.mjs.map} +1 -1
- package/dist/{engine-Dj7ZKO8H.cjs → engine-Bv-LZpmj.cjs} +13 -11
- package/dist/engine-Bv-LZpmj.cjs.map +1 -0
- package/dist/{engine-C8Ye9MUm.mjs → engine-DPMHThkg.mjs} +11 -9
- package/dist/engine-DPMHThkg.mjs.map +1 -0
- package/dist/{github-BD051KZZ.cjs → github-Br42NMrW.cjs} +94 -6
- package/dist/github-Br42NMrW.cjs.map +1 -0
- package/dist/{github-B1k42hIt.mjs → github-xsDT19im.mjs} +94 -6
- package/dist/github-xsDT19im.mjs.map +1 -0
- package/dist/{index-D1pHwqkK.d.mts → index-BlpcClwM.d.mts} +2 -2
- package/dist/{index-B5uuwx-Y.d.cts.map → index-BlpcClwM.d.mts.map} +1 -1
- package/dist/{index-B5uuwx-Y.d.cts → index-CwLvFqtH.d.cts} +2 -2
- package/dist/{index-D1pHwqkK.d.mts.map → index-CwLvFqtH.d.cts.map} +1 -1
- package/dist/index.cjs +240 -250
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +234 -243
- package/dist/index.mjs.map +1 -1
- package/dist/{local-Otp74ak0.mjs → local-B7Zv1NoA.mjs} +2 -2
- package/dist/{local-Otp74ak0.mjs.map → local-B7Zv1NoA.mjs.map} +1 -1
- package/dist/{local-B61kUh0w.cjs → local-OPC9BCZt.cjs} +2 -2
- package/dist/{local-B61kUh0w.cjs.map → local-OPC9BCZt.cjs.map} +1 -1
- package/dist/{migrate-IZsYyZ5F.mjs → migrate-B7evHv7O.mjs} +3 -3
- package/dist/{migrate-IZsYyZ5F.mjs.map → migrate-B7evHv7O.mjs.map} +1 -1
- package/dist/{migrate-D3VVsiHp.cjs → migrate-D5jUz20_.cjs} +3 -3
- package/dist/{migrate-D3VVsiHp.cjs.map → migrate-D5jUz20_.cjs.map} +1 -1
- package/dist/{migrate-BSbZ7-9n.mjs → migrate-DhvFPGLi.mjs} +4 -4
- package/dist/{migrate-BSbZ7-9n.mjs.map → migrate-DhvFPGLi.mjs.map} +1 -1
- package/dist/{migrate-f6JDjyCp.cjs → migrate-SkWJotn5.cjs} +3 -3
- package/dist/{migrate-f6JDjyCp.cjs.map → migrate-SkWJotn5.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/providers-BFeP_mYw.cjs +1098 -0
- package/dist/providers-BFeP_mYw.cjs.map +1 -0
- package/dist/providers-sTj-BG0S.mjs +1079 -0
- package/dist/providers-sTj-BG0S.mjs.map +1 -0
- package/dist/reconcile/public.d.cts +2 -2
- package/dist/reconcile/public.d.mts +2 -2
- package/dist/{reconcile-Dh1Jk7WE.mjs → reconcile--I7V4Klj.mjs} +2 -2
- package/dist/{reconcile-Dh1Jk7WE.mjs.map → reconcile--I7V4Klj.mjs.map} +1 -1
- package/dist/{resolve-DUp65SnJ.cjs → resolve-CFEOtRsl.cjs} +4 -4
- package/dist/{resolve-DUp65SnJ.cjs.map → resolve-CFEOtRsl.cjs.map} +1 -1
- package/dist/{resolve-Be4bF1w4.mjs → resolve-Dyd1S2wn.mjs} +4 -4
- package/dist/{resolve-Be4bF1w4.mjs.map → resolve-Dyd1S2wn.mjs.map} +1 -1
- package/dist/{rollback-DDHtd0GJ.cjs → rollback-D720SFhV.cjs} +11 -8
- package/dist/rollback-D720SFhV.cjs.map +1 -0
- package/dist/{rollback-D1d-fW0r.mjs → rollback-NroNbGC0.mjs} +10 -7
- package/dist/rollback-NroNbGC0.mjs.map +1 -0
- package/dist/{runtime-Es1V4e9M.d.mts → runtime-BRCq6dQ7.d.mts} +2 -2
- package/dist/{runtime-DDrHlYe5.d.cts.map → runtime-BRCq6dQ7.d.mts.map} +1 -1
- package/dist/{runtime-DDrHlYe5.d.cts → runtime-VktAo_8B.d.cts} +2 -2
- package/dist/{runtime-Es1V4e9M.d.mts.map → runtime-VktAo_8B.d.cts.map} +1 -1
- package/dist/{sandbox-MaxSeU92.d.cts → sandbox-D1gd0iDz.d.cts} +2 -2
- package/dist/{sandbox-C3WsTa5m.d.mts.map → sandbox-D1gd0iDz.d.cts.map} +1 -1
- package/dist/{sandbox-C3WsTa5m.d.mts → sandbox-zHnRLCj0.d.mts} +2 -2
- package/dist/{sandbox-MaxSeU92.d.cts.map → sandbox-zHnRLCj0.d.mts.map} +1 -1
- package/dist/secrets-CwLauUB_.mjs +36 -0
- package/dist/secrets-CwLauUB_.mjs.map +1 -0
- package/dist/secrets-DAvi_O9g.cjs +47 -0
- package/dist/secrets-DAvi_O9g.cjs.map +1 -0
- package/dist/{seeds-BKoJYsE7.cjs → seeds-BCg8X36S.cjs} +1732 -2300
- package/dist/seeds-BCg8X36S.cjs.map +1 -0
- package/dist/{seeds-CvGQJnPO.mjs → seeds-CTxTZa-R.mjs} +1637 -2270
- package/dist/seeds-CTxTZa-R.mjs.map +1 -0
- package/dist/{sniffer-Dq5BS98f.cjs → sniffer-C0z3NB2A.cjs} +572 -3
- package/dist/sniffer-C0z3NB2A.cjs.map +1 -0
- package/dist/{sniffer-BTtGAtm3.mjs → sniffer-DCcuzHz_.mjs} +496 -5
- package/dist/sniffer-DCcuzHz_.mjs.map +1 -0
- package/dist/{sst-CnKY-CSh.cjs → sst-DKNH243z.cjs} +3 -3
- package/dist/{sst-CnKY-CSh.cjs.map → sst-DKNH243z.cjs.map} +1 -1
- package/dist/{sst-BaRXp2Dd.mjs → sst-DRDSDwOk.mjs} +3 -3
- package/dist/{sst-BaRXp2Dd.mjs.map → sst-DRDSDwOk.mjs.map} +1 -1
- package/dist/stack-B3fPDTBg.cjs +1346 -0
- package/dist/stack-B3fPDTBg.cjs.map +1 -0
- package/dist/stack-NrdH5ngX.mjs +1239 -0
- package/dist/stack-NrdH5ngX.mjs.map +1 -0
- package/dist/{stages-BI8JvPzI.cjs → stages-CkqP1N4S.cjs} +16 -3
- package/dist/stages-CkqP1N4S.cjs.map +1 -0
- package/dist/{stages-DY-fQKmo.mjs → stages-veC4TcQe.mjs} +16 -3
- package/dist/stages-veC4TcQe.mjs.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-CkUYuAPd.cjs} +2 -2
- package/dist/{terminal-8XngdSTo.cjs.map → terminal-CkUYuAPd.cjs.map} +1 -1
- package/dist/{terminal-Dtd6BZX9.mjs → terminal-DAHs2Zko.mjs} +3 -3
- package/dist/{terminal-Dtd6BZX9.mjs.map → terminal-DAHs2Zko.mjs.map} +1 -1
- package/dist/{types-Bk9st2cd.d.cts → types-DMoaFrjg.d.mts} +108 -33
- package/dist/types-DMoaFrjg.d.mts.map +1 -0
- package/dist/{types-B3Gqs175.d.mts → types-DXyaSmqu.d.cts} +109 -32
- package/dist/types-DXyaSmqu.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/LegacyStateStore-CeEwayMB.cjs +0 -89
- package/dist/LegacyStateStore-CeEwayMB.cjs.map +0 -1
- package/dist/LegacyStateStore-DdJ1bCRV.mjs +0 -89
- package/dist/LegacyStateStore-DdJ1bCRV.mjs.map +0 -1
- package/dist/add-2Opn2VVE.mjs.map +0 -1
- package/dist/add-oN0b18HN.cjs.map +0 -1
- package/dist/cli-BRZFYvdb.cjs.map +0 -1
- package/dist/cli-BjhaVObS.mjs.map +0 -1
- package/dist/compose-CTdVeeVk.mjs +0 -3151
- package/dist/compose-CTdVeeVk.mjs.map +0 -1
- package/dist/compose-fnYmPk_c.cjs +0 -3276
- package/dist/compose-fnYmPk_c.cjs.map +0 -1
- package/dist/deploy-6ToUHJmM.cjs.map +0 -1
- package/dist/deploy-yuJHlkY0.mjs.map +0 -1
- package/dist/engine-C8Ye9MUm.mjs.map +0 -1
- package/dist/engine-Dj7ZKO8H.cjs.map +0 -1
- package/dist/github-B1k42hIt.mjs.map +0 -1
- package/dist/github-BD051KZZ.cjs.map +0 -1
- package/dist/rollback-D1d-fW0r.mjs.map +0 -1
- package/dist/rollback-DDHtd0GJ.cjs.map +0 -1
- package/dist/seeds-BKoJYsE7.cjs.map +0 -1
- package/dist/seeds-CvGQJnPO.mjs.map +0 -1
- package/dist/sniffer-BTtGAtm3.mjs.map +0 -1
- package/dist/sniffer-Dq5BS98f.cjs.map +0 -1
- package/dist/stages-BI8JvPzI.cjs.map +0 -1
- package/dist/stages-DY-fQKmo.mjs.map +0 -1
- package/dist/types-B3Gqs175.d.mts.map +0 -1
- package/dist/types-Bk9st2cd.d.cts.map +0 -1
- package/dist/workspace-Bzw7Zs82.mjs.map +0 -1
- package/dist/workspace-CHOB2Xg3.cjs.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -2,26 +2,26 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const require_rolldown_runtime = require("./rolldown-runtime-C0BPl7ul.cjs");
|
|
4
4
|
const require_errors = require("./errors-DMC4Umsb.cjs");
|
|
5
|
-
const require_credentials = require("./credentials-
|
|
5
|
+
const require_credentials = require("./credentials-D7XJypNd.cjs");
|
|
6
6
|
const require_discover = require("./discover-DPgu-ScS.cjs");
|
|
7
7
|
const require_derive = require("./derive-DAbo49sm.cjs");
|
|
8
|
-
const require_workspace = require("./workspace-
|
|
8
|
+
const require_workspace = require("./workspace-cSyi5nb1.cjs");
|
|
9
9
|
const require_config = require("./config.cjs");
|
|
10
|
-
const require_seeds = require("./seeds-
|
|
10
|
+
const require_seeds = require("./seeds-BCg8X36S.cjs");
|
|
11
11
|
const require_EndpointGenerator = require("./EndpointGenerator-De03t1hd.cjs");
|
|
12
12
|
const require_openapi = require("./openapi.cjs");
|
|
13
13
|
const require_SubscriberGenerator = require("./SubscriberGenerator-Dvz7EzqK.cjs");
|
|
14
14
|
const require_appPorts = require("./appPorts-Cu79hJF6.cjs");
|
|
15
15
|
const require_drivers = require("./drivers-DDojgzz0.cjs");
|
|
16
16
|
const require_emit = require("./emit-Dmc1nvdS.cjs");
|
|
17
|
-
const require_local = require("./local-
|
|
18
|
-
const require_sniffer = require("./sniffer-
|
|
19
|
-
const require_deploy = require("./deploy-
|
|
20
|
-
const require_compose = require("./compose-
|
|
17
|
+
const require_local = require("./local-OPC9BCZt.cjs");
|
|
18
|
+
const require_sniffer = require("./sniffer-C0z3NB2A.cjs");
|
|
19
|
+
const require_deploy = require("./deploy-C911Akkn.cjs");
|
|
20
|
+
const require_compose = require("./compose-Cd09gW-n.cjs");
|
|
21
|
+
const require_stack = require("./stack-B3fPDTBg.cjs");
|
|
21
22
|
const require_credentialSchemas = require("./credentialSchemas-CAPKFkrG.cjs");
|
|
22
|
-
const require_LocalStateStore = require("./LocalStateStore-
|
|
23
|
+
const require_LocalStateStore = require("./LocalStateStore-EFBUjuMX.cjs");
|
|
23
24
|
const require_utils = require("./utils-D2Nk1Nv2.cjs");
|
|
24
|
-
require("./awsStore-B5We7bMg.cjs");
|
|
25
25
|
const require_ready = require("./ready-D3PIjx3S.cjs");
|
|
26
26
|
let node_path = require("node:path");
|
|
27
27
|
let commander = require("commander");
|
|
@@ -55,7 +55,7 @@ crypto = require_rolldown_runtime.__toESM(crypto, 1);
|
|
|
55
55
|
let _geekmidas_constructs_functions = require("@geekmidas/constructs/functions");
|
|
56
56
|
let _geekmidas_constructs_topic = require("@geekmidas/constructs/topic");
|
|
57
57
|
//#region package.json
|
|
58
|
-
var version = "10.0.0-alpha.
|
|
58
|
+
var version = "10.0.0-alpha.94";
|
|
59
59
|
//#endregion
|
|
60
60
|
//#region src/prompt.ts
|
|
61
61
|
/**
|
|
@@ -138,7 +138,7 @@ const logger$8 = console;
|
|
|
138
138
|
* Validate Dokploy token by making a test API call
|
|
139
139
|
*/
|
|
140
140
|
async function validateDokployToken(endpoint, token) {
|
|
141
|
-
const { DokployApi } = await Promise.resolve().then(() => require("./sniffer-
|
|
141
|
+
const { DokployApi } = await Promise.resolve().then(() => require("./sniffer-C0z3NB2A.cjs")).then((n) => n.dokploy_api_exports);
|
|
142
142
|
return new DokployApi({
|
|
143
143
|
baseUrl: endpoint,
|
|
144
144
|
token
|
|
@@ -214,7 +214,7 @@ async function loginCommand(options) {
|
|
|
214
214
|
* Store a GoDaddy Personal Access Token. Not validated: the only call that
|
|
215
215
|
* proves a token without a domain is an account call (`GET /v1/domains`),
|
|
216
216
|
* which a token scoped to `domains.dns:update` alone may not make — the first
|
|
217
|
-
*
|
|
217
|
+
* deploy that writes a record is where a bad token reports itself.
|
|
218
218
|
*/
|
|
219
219
|
async function loginGoDaddy(options) {
|
|
220
220
|
logger$8.log("\n🔐 Logging in to GoDaddy...\n");
|
|
@@ -235,7 +235,7 @@ async function loginGoDaddy(options) {
|
|
|
235
235
|
logger$8.log("\n✓ GoDaddy token stored.");
|
|
236
236
|
logger$8.log(` Token: ${maskToken(token)}`);
|
|
237
237
|
logger$8.log(` Credentials stored in: ${require_credentials.getCredentialsPath(where)}`);
|
|
238
|
-
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
|
|
238
|
+
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.");
|
|
239
239
|
logger$8.log("\nYou can now use it as a DNS provider without setting GODADDY_API_TOKEN.");
|
|
240
240
|
}
|
|
241
241
|
/**
|
|
@@ -2332,9 +2332,9 @@ async function workspaceDevCommand(configured, options) {
|
|
|
2332
2332
|
for (const { id, port } of fakes) logger$5.log(`🎭 ${id} fake: http://localhost:${port}`);
|
|
2333
2333
|
logger$5.log(options.migrate || options.seed ? "🗄️ Migrating the databases" : "🗄️ Checking for pending migrations");
|
|
2334
2334
|
if (options.migrate || options.seed) {
|
|
2335
|
-
const { prepareDevDatabases } = await Promise.resolve().then(() => require("./migrate-
|
|
2335
|
+
const { prepareDevDatabases } = await Promise.resolve().then(() => require("./migrate-D5jUz20_.cjs"));
|
|
2336
2336
|
await prepareDevDatabases(workspace, reconciled.env, { seed: !!options.seed });
|
|
2337
|
-
} else await Promise.resolve().then(() => require("./migrate-
|
|
2337
|
+
} else await Promise.resolve().then(() => require("./migrate-D5jUz20_.cjs")).then(({ reportPendingMigrations }) => reportPendingMigrations(workspace, reconciled.env)).catch((error) => {
|
|
2338
2338
|
logger$5.log(`⚠️ Could not check for pending migrations: ${error instanceof Error ? error.message : String(error)}`);
|
|
2339
2339
|
});
|
|
2340
2340
|
const appUrls = {};
|
|
@@ -3387,7 +3387,7 @@ async function buildApp(input) {
|
|
|
3387
3387
|
...production,
|
|
3388
3388
|
...telemetry ? { telemetry } : {}
|
|
3389
3389
|
});
|
|
3390
|
-
const { bundleServer } = await Promise.resolve().then(() => require("./bundler-
|
|
3390
|
+
const { bundleServer } = await Promise.resolve().then(() => require("./bundler-BEgUKc4j.cjs"));
|
|
3391
3391
|
await bundleServer({
|
|
3392
3392
|
entryPoint,
|
|
3393
3393
|
outputDir: (0, node_path.join)(outputDir, "dist"),
|
|
@@ -3532,7 +3532,7 @@ async function buildWorkers(input) {
|
|
|
3532
3532
|
});
|
|
3533
3533
|
logger$4.log(`Generated worker ${worker.id}: ${crons.length} crons, ${queues.length} queues, ${subscribers.length} subscribers`);
|
|
3534
3534
|
if (!input.bundle) continue;
|
|
3535
|
-
const { bundleServer } = await Promise.resolve().then(() => require("./bundler-
|
|
3535
|
+
const { bundleServer } = await Promise.resolve().then(() => require("./bundler-BEgUKc4j.cjs"));
|
|
3536
3536
|
const outfile = require_seeds.workerBundleName(worker.id);
|
|
3537
3537
|
await bundleServer({
|
|
3538
3538
|
entryPoint,
|
|
@@ -3618,7 +3618,7 @@ async function buildForTarget(target, context, appRoot, workspaceRoot, endpointG
|
|
|
3618
3618
|
let masterKey;
|
|
3619
3619
|
if (context.production?.bundle && !skipBundle) {
|
|
3620
3620
|
logger$4.log(`\n📦 Bundling production server...`);
|
|
3621
|
-
const { bundleServer } = await Promise.resolve().then(() => require("./bundler-
|
|
3621
|
+
const { bundleServer } = await Promise.resolve().then(() => require("./bundler-BEgUKc4j.cjs"));
|
|
3622
3622
|
const allConstructs = [
|
|
3623
3623
|
...endpoints.map((e) => e.construct),
|
|
3624
3624
|
...functions.map((f) => f.construct),
|
|
@@ -3864,7 +3864,7 @@ var ComposeModeConflict = class extends require_errors.GkmError {
|
|
|
3864
3864
|
};
|
|
3865
3865
|
/** Each pushed image as `<ref>@sha256:…`, by app. */
|
|
3866
3866
|
function pushedDigests(run) {
|
|
3867
|
-
return Object.fromEntries(Object.entries(run.images).filter(([, image]) => image.digest).sort(([a], [b]) => a.localeCompare(b)).map(([app, image]) => [app,
|
|
3867
|
+
return Object.fromEntries(Object.entries(run.images).filter(([, image]) => image.digest).sort(([a], [b]) => a.localeCompare(b)).map(([app, image]) => [app, require_stack.pinnedRef(image.ref, image.digest)]));
|
|
3868
3868
|
}
|
|
3869
3869
|
/** `gkm compose`. */
|
|
3870
3870
|
async function composeCommand(options, deps = {}) {
|
|
@@ -3878,12 +3878,12 @@ async function composeCommand(options, deps = {}) {
|
|
|
3878
3878
|
if (options.down) {
|
|
3879
3879
|
const override = require_compose.stackOverrideFile(workspace.root, stage);
|
|
3880
3880
|
const ref = {
|
|
3881
|
-
project:
|
|
3882
|
-
file: (0, node_path.join)(workspace.root,
|
|
3881
|
+
project: require_stack.composeProject(require_seeds.deployIdentity(workspace, stage)),
|
|
3882
|
+
file: (0, node_path.join)(workspace.root, require_stack.stackDir(stage), "docker-compose.yml"),
|
|
3883
3883
|
...(0, node_fs.existsSync)(override) ? { overrides: [override] } : {},
|
|
3884
3884
|
cwd: workspace.root
|
|
3885
3885
|
};
|
|
3886
|
-
if (await require_compose.removeEdgeRoutes(require_compose.edgeDir(deps.env ?? process.env), ref.project)) console.log(`🌐 Removed ${ref.project}'s routes from ${
|
|
3886
|
+
if (await require_compose.removeEdgeRoutes(require_compose.edgeDir(deps.env ?? process.env), ref.project)) console.log(`🌐 Removed ${ref.project}'s routes from ${require_stack.EDGE_PROJECT}.`);
|
|
3887
3887
|
await (deps.docker ?? require_compose.dockerCompose).down(ref);
|
|
3888
3888
|
console.log(`🛑 Stopped ${ref.project}. Its volumes are kept.`);
|
|
3889
3889
|
return;
|
|
@@ -3893,7 +3893,7 @@ async function composeCommand(options, deps = {}) {
|
|
|
3893
3893
|
const tag = options.tag ?? (options.pull ? "latest" : void 0);
|
|
3894
3894
|
const pin = options.digestsFile && pulls ? {
|
|
3895
3895
|
file: options.digestsFile,
|
|
3896
|
-
digests:
|
|
3896
|
+
digests: require_stack.parseDigests(options.digestsFile, await (0, node_fs_promises.readFile)((0, node_path.resolve)(cwd, options.digestsFile), "utf-8"))
|
|
3897
3897
|
} : void 0;
|
|
3898
3898
|
const result = await require_deploy.deploy({
|
|
3899
3899
|
cwd,
|
|
@@ -3912,7 +3912,11 @@ async function composeCommand(options, deps = {}) {
|
|
|
3912
3912
|
...options.dryRun ? { dryRun: true } : {},
|
|
3913
3913
|
...options.push ? { buildOnly: true } : {},
|
|
3914
3914
|
...options.allowDevServices ? { allowDevServices: true } : {},
|
|
3915
|
-
...options.
|
|
3915
|
+
...options.skipDns ? { skipDns: true } : {},
|
|
3916
|
+
...options.resourcesOnly ? { resourcesOnly: true } : {},
|
|
3917
|
+
...options.skipResources ? { skipResources: true } : {},
|
|
3918
|
+
...options.rotateKeys ? { rotateKeys: true } : {},
|
|
3919
|
+
...options.retireOldKeys ? { retireOldKeys: true } : {},
|
|
3916
3920
|
logger: {
|
|
3917
3921
|
info: (message) => console.log(message),
|
|
3918
3922
|
warn: (message) => console.warn(message),
|
|
@@ -4139,6 +4143,7 @@ const MASKED = "********";
|
|
|
4139
4143
|
*/
|
|
4140
4144
|
function maskStateSecrets(state) {
|
|
4141
4145
|
const masked = structuredClone(state);
|
|
4146
|
+
if (masked.provider !== "dokploy") return masked;
|
|
4142
4147
|
for (const credentials of Object.values(masked.appCredentials ?? {})) credentials.dbPassword = MASKED;
|
|
4143
4148
|
for (const secrets of Object.values(masked.generatedSecrets ?? {})) for (const name of Object.keys(secrets)) secrets[name] = MASKED;
|
|
4144
4149
|
if (masked.backups) {
|
|
@@ -4181,7 +4186,7 @@ async function statePushCommand(options) {
|
|
|
4181
4186
|
*/
|
|
4182
4187
|
async function stateShowCommand(options) {
|
|
4183
4188
|
const { workspace } = await require_config.loadWorkspaceConfig();
|
|
4184
|
-
const stored = await (await
|
|
4189
|
+
const stored = await (await require_sniffer.createStateStore({
|
|
4185
4190
|
config: workspace.state,
|
|
4186
4191
|
workspaceRoot: workspace.root,
|
|
4187
4192
|
workspaceName: workspace.name
|
|
@@ -4194,6 +4199,7 @@ async function stateShowCommand(options) {
|
|
|
4194
4199
|
if (options.json) console.log(JSON.stringify(state, null, 2));
|
|
4195
4200
|
else {
|
|
4196
4201
|
printStateDetails(state);
|
|
4202
|
+
printDnsRecords(stored.resources);
|
|
4197
4203
|
printUnfinished(stored.resources);
|
|
4198
4204
|
}
|
|
4199
4205
|
}
|
|
@@ -4207,7 +4213,7 @@ async function stateShowCommand(options) {
|
|
|
4207
4213
|
*/
|
|
4208
4214
|
async function stateUnlockCommand(options) {
|
|
4209
4215
|
const { workspace } = await require_config.loadWorkspaceConfig();
|
|
4210
|
-
const holder = await (await
|
|
4216
|
+
const holder = await (await require_sniffer.createStateStore({
|
|
4211
4217
|
config: workspace.state,
|
|
4212
4218
|
workspaceRoot: workspace.root,
|
|
4213
4219
|
workspaceName: workspace.name
|
|
@@ -4238,8 +4244,8 @@ async function stateDiffCommand(options) {
|
|
|
4238
4244
|
if (!remote) console.log("Remote: (none)");
|
|
4239
4245
|
else console.log(`Remote: Last deployed ${remote.lastDeployedAt}`);
|
|
4240
4246
|
console.log("");
|
|
4241
|
-
const localApps = local?.applications ?? {};
|
|
4242
|
-
const remoteApps = remote?.applications ?? {};
|
|
4247
|
+
const localApps = dokploy(local)?.applications ?? {};
|
|
4248
|
+
const remoteApps = dokploy(remote)?.applications ?? {};
|
|
4243
4249
|
const allApps = /* @__PURE__ */ new Set([...Object.keys(localApps), ...Object.keys(remoteApps)]);
|
|
4244
4250
|
if (allApps.size > 0) {
|
|
4245
4251
|
console.log("Applications:");
|
|
@@ -4252,8 +4258,8 @@ async function stateDiffCommand(options) {
|
|
|
4252
4258
|
else console.log(` ${app}: ${localId} (local) != ${remoteId} (remote) [MISMATCH]`);
|
|
4253
4259
|
}
|
|
4254
4260
|
}
|
|
4255
|
-
const localServices = local?.services ?? {};
|
|
4256
|
-
const remoteServices = remote?.services ?? {};
|
|
4261
|
+
const localServices = dokploy(local)?.services ?? {};
|
|
4262
|
+
const remoteServices = dokploy(remote)?.services ?? {};
|
|
4257
4263
|
if (Object.keys(localServices).length > 0 || Object.keys(remoteServices).length > 0) {
|
|
4258
4264
|
console.log("\nServices:");
|
|
4259
4265
|
const serviceKeys = /* @__PURE__ */ new Set([...Object.keys(localServices), ...Object.keys(remoteServices)]);
|
|
@@ -4284,7 +4290,7 @@ async function remoteAndLocal(workspace, hint = ["Add a remote provider in gkm.c
|
|
|
4284
4290
|
}
|
|
4285
4291
|
return {
|
|
4286
4292
|
local: new require_LocalStateStore.LocalStateStore(workspace.root),
|
|
4287
|
-
remote: await
|
|
4293
|
+
remote: await require_sniffer.createStateStore({
|
|
4288
4294
|
config: workspace.state,
|
|
4289
4295
|
workspaceRoot: workspace.root,
|
|
4290
4296
|
workspaceName: workspace.name
|
|
@@ -4318,6 +4324,10 @@ async function copyStage(from, to, stage) {
|
|
|
4318
4324
|
for (const { updatedAt: _stamped, ...record } of Object.values(source.resources)) version = await to.putResource(stage, record, { expectedVersion: version });
|
|
4319
4325
|
return source;
|
|
4320
4326
|
}
|
|
4327
|
+
/** `state` if Dokploy wrote it — the only shape with ids of its own. */
|
|
4328
|
+
function dokploy(state) {
|
|
4329
|
+
return state?.provider === "dokploy" ? state : null;
|
|
4330
|
+
}
|
|
4321
4331
|
function describeRecord(record) {
|
|
4322
4332
|
if (!record) return "(none)";
|
|
4323
4333
|
return record.id ? `${record.status} ${record.id}` : record.status;
|
|
@@ -4331,6 +4341,12 @@ function printUnfinished(resources) {
|
|
|
4331
4341
|
for (const record of pending) console.log(` ${record.key}`);
|
|
4332
4342
|
}
|
|
4333
4343
|
function printStateSummary(state) {
|
|
4344
|
+
if (state.provider !== "dokploy") {
|
|
4345
|
+
console.log(` Stage: ${state.stage} (${state.provider})`);
|
|
4346
|
+
console.log(` Apps released: ${Object.keys(state.releases ?? {}).length}`);
|
|
4347
|
+
console.log(` Last deployed: ${state.lastDeployedAt}`);
|
|
4348
|
+
return;
|
|
4349
|
+
}
|
|
4334
4350
|
const appCount = Object.keys(state.applications).length;
|
|
4335
4351
|
const hasPostgres = !!state.services.postgresId;
|
|
4336
4352
|
const hasRedis = !!state.services.redisId;
|
|
@@ -4341,6 +4357,14 @@ function printStateSummary(state) {
|
|
|
4341
4357
|
console.log(` Last deployed: ${state.lastDeployedAt}`);
|
|
4342
4358
|
}
|
|
4343
4359
|
function printStateDetails(state) {
|
|
4360
|
+
if (state.provider !== "dokploy") {
|
|
4361
|
+
console.log(`Stage: ${state.stage} (${state.provider})`);
|
|
4362
|
+
console.log(`Last Deployed: ${state.lastDeployedAt}`);
|
|
4363
|
+
if (state.identity) console.log(`Identity: ${state.identity}`);
|
|
4364
|
+
console.log("");
|
|
4365
|
+
printReleases(state.releases);
|
|
4366
|
+
return;
|
|
4367
|
+
}
|
|
4344
4368
|
console.log(`Stage: ${state.stage}`);
|
|
4345
4369
|
console.log(`Environment ID: ${state.environmentId}`);
|
|
4346
4370
|
console.log(`Last Deployed: ${state.lastDeployedAt}`);
|
|
@@ -4382,6 +4406,62 @@ function printStateDetails(state) {
|
|
|
4382
4406
|
for (const [hostname, info] of Object.entries(state.dnsVerified)) console.log(` ${hostname}: ${info.serverIp} (${info.verifiedAt})`);
|
|
4383
4407
|
}
|
|
4384
4408
|
}
|
|
4409
|
+
/** Each app's current release, and who released it. */
|
|
4410
|
+
function printReleases(releases) {
|
|
4411
|
+
console.log("Releases:");
|
|
4412
|
+
const apps = Object.entries(releases ?? {});
|
|
4413
|
+
if (apps.length === 0) {
|
|
4414
|
+
console.log(" (none)");
|
|
4415
|
+
return;
|
|
4416
|
+
}
|
|
4417
|
+
for (const [app, { current }] of apps) console.log(` ${app}: ${describeRelease(current)}`);
|
|
4418
|
+
}
|
|
4419
|
+
/** `ghcr.io/acme/api:v2 (sha256:…) · 2026-… · ada@laptop` */
|
|
4420
|
+
function describeRelease(release) {
|
|
4421
|
+
return [
|
|
4422
|
+
`${release.ref}${release.digest ? ` (${release.digest})` : ""}`,
|
|
4423
|
+
release.releasedAt,
|
|
4424
|
+
require_seeds.describeActor(release.releasedBy)
|
|
4425
|
+
].join(" · ");
|
|
4426
|
+
}
|
|
4427
|
+
/** The DNS records gkm wrote for the stage. */
|
|
4428
|
+
function printDnsRecords(resources) {
|
|
4429
|
+
const records = require_seeds.dnsResources(resources);
|
|
4430
|
+
if (records.length === 0) return;
|
|
4431
|
+
console.log("");
|
|
4432
|
+
console.log("DNS Records:");
|
|
4433
|
+
for (const record of records) console.log(` ${record.fqdn} ${record.type} ${record.value} (TTL ${record.ttl}${record.provider ? `, ${record.provider}` : ""})`);
|
|
4434
|
+
}
|
|
4435
|
+
/**
|
|
4436
|
+
* Who wrote a stage's state, newest first, and what each app runs.
|
|
4437
|
+
* `gkm state:history --stage=<stage>`
|
|
4438
|
+
*/
|
|
4439
|
+
async function stateHistoryCommand(options) {
|
|
4440
|
+
const { workspace } = await require_config.loadWorkspaceConfig();
|
|
4441
|
+
const stored = await (await require_sniffer.createStateStore({
|
|
4442
|
+
config: workspace.state,
|
|
4443
|
+
workspaceRoot: workspace.root,
|
|
4444
|
+
workspaceName: workspace.name
|
|
4445
|
+
})).read(options.stage);
|
|
4446
|
+
if (!stored) {
|
|
4447
|
+
console.log(`No state found for stage: ${options.stage}`);
|
|
4448
|
+
return;
|
|
4449
|
+
}
|
|
4450
|
+
const history = {
|
|
4451
|
+
stage: options.stage,
|
|
4452
|
+
history: stored.history,
|
|
4453
|
+
releases: Object.fromEntries(Object.entries(stored.state.releases ?? {}).map(([app, releases]) => [app, releases.current]))
|
|
4454
|
+
};
|
|
4455
|
+
if (options.json) {
|
|
4456
|
+
console.log(JSON.stringify(history, null, 2));
|
|
4457
|
+
return;
|
|
4458
|
+
}
|
|
4459
|
+
console.log(`History of stage ${options.stage} (newest first):`);
|
|
4460
|
+
if (history.history.length === 0) console.log(" (none recorded)");
|
|
4461
|
+
for (const entry of history.history) console.log(` ${entry.serial} · ${entry.at} · ${require_seeds.describeActor(entry.by)} · ${entry.operation}`);
|
|
4462
|
+
console.log("");
|
|
4463
|
+
printReleases(stored.state.releases);
|
|
4464
|
+
}
|
|
4385
4465
|
//#endregion
|
|
4386
4466
|
//#region src/secrets/generator.ts
|
|
4387
4467
|
/**
|
|
@@ -5353,25 +5433,25 @@ function loadPackageJson() {
|
|
|
5353
5433
|
* Run: pnpm --filter @geekmidas/cli sync-versions
|
|
5354
5434
|
*/
|
|
5355
5435
|
const GEEKMIDAS_VERSIONS = {
|
|
5356
|
-
"@geekmidas/audit": "~10.0.0-alpha.
|
|
5357
|
-
"@geekmidas/auth": "~10.0.0-alpha.
|
|
5358
|
-
"@geekmidas/cache": "~10.0.0-alpha.
|
|
5359
|
-
"@geekmidas/client": "~10.0.0-alpha.
|
|
5360
|
-
"@geekmidas/cloud": "~10.0.0-alpha.
|
|
5361
|
-
"@geekmidas/constructs": "~10.0.0-alpha.
|
|
5362
|
-
"@geekmidas/db": "~10.0.0-alpha.
|
|
5363
|
-
"@geekmidas/emailkit": "~10.0.0-alpha.
|
|
5364
|
-
"@geekmidas/envkit": "~10.0.0-alpha.
|
|
5365
|
-
"@geekmidas/errors": "~10.0.0-alpha.
|
|
5366
|
-
"@geekmidas/events": "~10.0.0-alpha.
|
|
5367
|
-
"@geekmidas/logger": "~10.0.0-alpha.
|
|
5368
|
-
"@geekmidas/manifest": "~10.0.0-alpha.
|
|
5369
|
-
"@geekmidas/rate-limit": "~10.0.0-alpha.
|
|
5370
|
-
"@geekmidas/schema": "~10.0.0-alpha.
|
|
5371
|
-
"@geekmidas/services": "~10.0.0-alpha.
|
|
5372
|
-
"@geekmidas/storage": "~10.0.0-alpha.
|
|
5373
|
-
"@geekmidas/telescope": "~10.0.0-alpha.
|
|
5374
|
-
"@geekmidas/testkit": "~10.0.0-alpha.
|
|
5436
|
+
"@geekmidas/audit": "~10.0.0-alpha.94",
|
|
5437
|
+
"@geekmidas/auth": "~10.0.0-alpha.94",
|
|
5438
|
+
"@geekmidas/cache": "~10.0.0-alpha.94",
|
|
5439
|
+
"@geekmidas/client": "~10.0.0-alpha.94",
|
|
5440
|
+
"@geekmidas/cloud": "~10.0.0-alpha.94",
|
|
5441
|
+
"@geekmidas/constructs": "~10.0.0-alpha.94",
|
|
5442
|
+
"@geekmidas/db": "~10.0.0-alpha.94",
|
|
5443
|
+
"@geekmidas/emailkit": "~10.0.0-alpha.94",
|
|
5444
|
+
"@geekmidas/envkit": "~10.0.0-alpha.94",
|
|
5445
|
+
"@geekmidas/errors": "~10.0.0-alpha.94",
|
|
5446
|
+
"@geekmidas/events": "~10.0.0-alpha.94",
|
|
5447
|
+
"@geekmidas/logger": "~10.0.0-alpha.94",
|
|
5448
|
+
"@geekmidas/manifest": "~10.0.0-alpha.94",
|
|
5449
|
+
"@geekmidas/rate-limit": "~10.0.0-alpha.94",
|
|
5450
|
+
"@geekmidas/schema": "~10.0.0-alpha.94",
|
|
5451
|
+
"@geekmidas/services": "~10.0.0-alpha.94",
|
|
5452
|
+
"@geekmidas/storage": "~10.0.0-alpha.94",
|
|
5453
|
+
"@geekmidas/telescope": "~10.0.0-alpha.94",
|
|
5454
|
+
"@geekmidas/testkit": "~10.0.0-alpha.94",
|
|
5375
5455
|
"@geekmidas/cli": `~${loadPackageJson().version}`
|
|
5376
5456
|
};
|
|
5377
5457
|
//#endregion
|
|
@@ -5772,7 +5852,7 @@ const COMMIT = /^[0-9a-f]{40}$/;
|
|
|
5772
5852
|
* The `uses:` value for the stages action, with a comment saying which CLI
|
|
5773
5853
|
* release the pinned commit is.
|
|
5774
5854
|
*/
|
|
5775
|
-
function stagesActionUses(commit = "
|
|
5855
|
+
function stagesActionUses(commit = "dcab6fe1ee033518c7901452ee9c49102749c9ed", version = cliVersion()) {
|
|
5776
5856
|
return commit && COMMIT.test(commit) ? `${STAGES_ACTION}@${commit} # @geekmidas/cli ${version}` : `${STAGES_ACTION}@main # pin to a commit SHA: see the action's README`;
|
|
5777
5857
|
}
|
|
5778
5858
|
//#endregion
|
|
@@ -6024,6 +6104,7 @@ function stagesJob(options) {
|
|
|
6024
6104
|
has-build: \${{ steps.stages.outputs.has-build }}
|
|
6025
6105
|
has-deploy: \${{ steps.stages.outputs.has-deploy }}
|
|
6026
6106
|
aws-region: \${{ steps.stages.outputs.aws-region }}
|
|
6107
|
+
resources: \${{ steps.stages.outputs.resources }}
|
|
6027
6108
|
steps:
|
|
6028
6109
|
- uses: actions/checkout@v4
|
|
6029
6110
|
|
|
@@ -6041,6 +6122,10 @@ ${pm.setup}
|
|
|
6041
6122
|
stage: \${{ inputs.stage }}
|
|
6042
6123
|
`;
|
|
6043
6124
|
}
|
|
6125
|
+
/** Every step in `steps` run only when `condition` holds. */
|
|
6126
|
+
function onlyIf(steps, condition) {
|
|
6127
|
+
return steps.replace(/^ {6}- /gm, ` - if: ${condition}\n `);
|
|
6128
|
+
}
|
|
6044
6129
|
/**
|
|
6045
6130
|
* The registry login a compose build pushes with: GitHub's own token on
|
|
6046
6131
|
* ghcr.io, otherwise a username variable and a password secret.
|
|
@@ -6065,6 +6150,11 @@ function registryLogin(registry) {
|
|
|
6065
6150
|
* `ref` — then that commit's push build, whose digests pin each image. Over
|
|
6066
6151
|
* SSH, with a pinned host key, the server checks the commit out and runs
|
|
6067
6152
|
* `gkm compose` on exactly those images.
|
|
6153
|
+
* - Resources: where the stage has some the deploy creates — a provider's
|
|
6154
|
+
* bucket and key, DNS records through a provider — the runner creates them
|
|
6155
|
+
* first (`gkm deploy --resources-only`) with the stage's role and the DNS
|
|
6156
|
+
* token from its environment, and the server deploys with
|
|
6157
|
+
* `--skip-resources`: neither credential reaches the server.
|
|
6068
6158
|
*/
|
|
6069
6159
|
function composeDeploy(options) {
|
|
6070
6160
|
const pm = tooling(options);
|
|
@@ -6140,6 +6230,13 @@ ${registryLogin(registry)}
|
|
|
6140
6230
|
permissions:
|
|
6141
6231
|
contents: read
|
|
6142
6232
|
actions: read
|
|
6233
|
+
id-token: write
|
|
6234
|
+
env:
|
|
6235
|
+
# Whether the stage has resources the deploy creates — a provider's
|
|
6236
|
+
# bucket and key (deploy.<kind>.<stage>), DNS records through a provider
|
|
6237
|
+
# in dns: the runner creates them with the stage's role and DNS token,
|
|
6238
|
+
# so neither reaches the server, which deploys with --skip-resources.
|
|
6239
|
+
RESOURCES_ON_RUNNER: \${{ contains(fromJSON(needs.stages.outputs.resources || '[]'), matrix.stage) }}
|
|
6143
6240
|
steps:
|
|
6144
6241
|
# A release deploys its tag's commit, never its target_commitish — the
|
|
6145
6242
|
# branch it was drafted against, which has moved on since.
|
|
@@ -6162,6 +6259,40 @@ ${registryLogin(registry)}
|
|
|
6162
6259
|
REF: \${{ inputs.ref }}
|
|
6163
6260
|
SHA: \${{ github.sha }}
|
|
6164
6261
|
|
|
6262
|
+
# The deploy's resources, here on the runner: each provider's bucket
|
|
6263
|
+
# and key (written into the stage's secrets store), and every public
|
|
6264
|
+
# host's DNS record — a new app's included, one per host, never a
|
|
6265
|
+
# wildcard — written through the provider where it is missing or out of
|
|
6266
|
+
# date and read back from it. The stage's secrets (GKM_SERVER_IPV4
|
|
6267
|
+
# among them) are read with the stage's role; the DNS token is a secret
|
|
6268
|
+
# on this stage's environment. A missing credential fails here, before
|
|
6269
|
+
# anything is deployed.
|
|
6270
|
+
- name: Check out the commit
|
|
6271
|
+
if: env.RESOURCES_ON_RUNNER == 'true'
|
|
6272
|
+
uses: actions/checkout@v4
|
|
6273
|
+
with:
|
|
6274
|
+
ref: \${{ steps.commit.outputs.sha }}
|
|
6275
|
+
|
|
6276
|
+
${onlyIf(pm.setup, "env.RESOURCES_ON_RUNNER == 'true'")}
|
|
6277
|
+
- name: Install
|
|
6278
|
+
if: env.RESOURCES_ON_RUNNER == 'true'
|
|
6279
|
+
run: ${pm.install}
|
|
6280
|
+
|
|
6281
|
+
- name: Assume the stage's AWS role
|
|
6282
|
+
if: env.RESOURCES_ON_RUNNER == 'true' && needs.stages.outputs.aws-region != ''
|
|
6283
|
+
uses: aws-actions/configure-aws-credentials@v4
|
|
6284
|
+
with:
|
|
6285
|
+
role-to-assume: \${{ vars.AWS_ROLE_ARN }}
|
|
6286
|
+
aws-region: \${{ needs.stages.outputs.aws-region }}
|
|
6287
|
+
|
|
6288
|
+
- name: Create the stage's resources
|
|
6289
|
+
if: env.RESOURCES_ON_RUNNER == 'true'
|
|
6290
|
+
run: ${pm.exec} gkm deploy --stage "$STAGE" --resources-only
|
|
6291
|
+
env:
|
|
6292
|
+
STAGE: \${{ matrix.stage }}
|
|
6293
|
+
GODADDY_API_TOKEN: \${{ secrets.GODADDY_API_TOKEN }}
|
|
6294
|
+
HOSTINGER_API_TOKEN: \${{ secrets.HOSTINGER_API_TOKEN }}
|
|
6295
|
+
|
|
6165
6296
|
# The push run of this workflow that built the commit for this stage:
|
|
6166
6297
|
# this run on a push, the newest one with the stage's digests otherwise.
|
|
6167
6298
|
- name: Find the commit's push build
|
|
@@ -6223,9 +6354,9 @@ ${registryLogin(registry)}
|
|
|
6223
6354
|
if [ -f digests.json ]; then digests=$(base64 -w0 < digests.json); fi
|
|
6224
6355
|
ssh -i ~/.ssh/deploy_key -o IdentitiesOnly=yes -o StrictHostKeyChecking=yes \\
|
|
6225
6356
|
"$DEPLOY_USER@$DEPLOY_HOST" \\
|
|
6226
|
-
"bash -s -- $(printf '%q ' "$STAGE" "$SHA" "$DEPLOY_PATH" "$digests")" <<'REMOTE'
|
|
6357
|
+
"bash -s -- $(printf '%q ' "$STAGE" "$SHA" "$DEPLOY_PATH" "$digests" "$RESOURCES_ON_RUNNER")" <<'REMOTE'
|
|
6227
6358
|
set -euo pipefail
|
|
6228
|
-
stage=$1 sha=$2 dir=$3 digests=$4
|
|
6359
|
+
stage=$1 sha=$2 dir=$3 digests=$4 resources_on_runner=$5
|
|
6229
6360
|
cd "$dir"
|
|
6230
6361
|
git fetch --quiet origin
|
|
6231
6362
|
git checkout --quiet --detach "$sha"
|
|
@@ -6236,6 +6367,8 @@ ${registryLogin(registry)}
|
|
|
6236
6367
|
printf '%s' "$digests" | base64 -d > ".gkm/digests-$stage.json"
|
|
6237
6368
|
args+=(--digests-file ".gkm/digests-$stage.json")
|
|
6238
6369
|
fi
|
|
6370
|
+
# Created and confirmed from the runner already.
|
|
6371
|
+
if [ "$resources_on_runner" = true ]; then args+=(--skip-resources); fi
|
|
6239
6372
|
${pm.exec} gkm compose "\${args[@]}"
|
|
6240
6373
|
REMOTE
|
|
6241
6374
|
env:
|
|
@@ -6284,7 +6417,9 @@ function targetDeploy(options) {
|
|
|
6284
6417
|
`;
|
|
6285
6418
|
const deployEnv = sst ? "" : `
|
|
6286
6419
|
DOKPLOY_API_TOKEN: \${{ secrets.DOKPLOY_API_TOKEN }}
|
|
6287
|
-
DOKPLOY_ENDPOINT: \${{ vars.DOKPLOY_ENDPOINT }}
|
|
6420
|
+
DOKPLOY_ENDPOINT: \${{ vars.DOKPLOY_ENDPOINT }}
|
|
6421
|
+
GODADDY_API_TOKEN: \${{ secrets.GODADDY_API_TOKEN }}
|
|
6422
|
+
HOSTINGER_API_TOKEN: \${{ secrets.HOSTINGER_API_TOKEN }}`;
|
|
6288
6423
|
return `${deployHeader(false)}
|
|
6289
6424
|
jobs:
|
|
6290
6425
|
${stagesJob(options)}
|
|
@@ -11054,137 +11189,9 @@ function maskUrl(url) {
|
|
|
11054
11189
|
}
|
|
11055
11190
|
}
|
|
11056
11191
|
//#endregion
|
|
11057
|
-
//#region src/providers/dns.ts
|
|
11058
|
-
/** Whether the workspace deploys through the compose target. */
|
|
11059
|
-
function deploysWithCompose(workspace) {
|
|
11060
|
-
return workspace.deploy?.default === "compose" || Object.values(workspace.apps).some((app) => app.resolvedDeployTarget === "compose");
|
|
11061
|
-
}
|
|
11062
|
-
/**
|
|
11063
|
-
* A compose stage that serves a domain has its server's address in its
|
|
11064
|
-
* secrets — checked before `gkm setup --stage` does anything else.
|
|
11065
|
-
*
|
|
11066
|
-
* @throws {ServerAddressMissing} for a compose stage with a domain and none
|
|
11067
|
-
* @throws {ServerAddressInvalid} for a value that is not an address
|
|
11068
|
-
*/
|
|
11069
|
-
function assertStageServer(workspace, stage, secrets) {
|
|
11070
|
-
if (stage === workspace.stages.local) return void 0;
|
|
11071
|
-
if (!deploysWithCompose(workspace)) return require_compose.serverAddress(stage, secrets?.custom);
|
|
11072
|
-
return require_compose.requiredServerAddress(stage, workspace.domains?.[stage], secrets?.custom);
|
|
11073
|
-
}
|
|
11074
|
-
/**
|
|
11075
|
-
* The hosts a compose stage serves: its stack composed as a deploy would —
|
|
11076
|
-
* with the secrets it would generate made up in memory, never written — and
|
|
11077
|
-
* every route's host read off it.
|
|
11078
|
-
*/
|
|
11079
|
-
async function composeStageHosts(options) {
|
|
11080
|
-
const { workspace, stage } = options;
|
|
11081
|
-
const runnables = options.runnables ?? {};
|
|
11082
|
-
const background = options.background ?? {};
|
|
11083
|
-
const manifest = options.manifest ?? await require_discover.discover({
|
|
11084
|
-
patterns: require_seeds.constructGlobs(workspace),
|
|
11085
|
-
cwd: workspace.root,
|
|
11086
|
-
runnables,
|
|
11087
|
-
background
|
|
11088
|
-
});
|
|
11089
|
-
const stored = await (await require_seeds.secretsStoreFor(workspace, stage, {
|
|
11090
|
-
...options.profile ? { profile: options.profile } : {},
|
|
11091
|
-
...options.home ? { home: options.home } : {}
|
|
11092
|
-
})).read(stage);
|
|
11093
|
-
const { deployedStackSecrets } = await Promise.resolve().then(() => require("./compose-fnYmPk_c.cjs")).then((n) => n.secrets_exports);
|
|
11094
|
-
const { composeStack } = await Promise.resolve().then(() => require("./compose-fnYmPk_c.cjs")).then((n) => n.stack_exports);
|
|
11095
|
-
const { secrets } = deployedStackSecrets(workspace, stage, stored, manifest);
|
|
11096
|
-
const stack = composeStack({
|
|
11097
|
-
workspace,
|
|
11098
|
-
manifest,
|
|
11099
|
-
runnables,
|
|
11100
|
-
background,
|
|
11101
|
-
stage,
|
|
11102
|
-
identity: require_seeds.deployIdentity(workspace, stage),
|
|
11103
|
-
images: {
|
|
11104
|
-
mode: "pull",
|
|
11105
|
-
tag: "dns",
|
|
11106
|
-
...workspace.deploy?.registry ? { registry: workspace.deploy.registry } : {}
|
|
11107
|
-
},
|
|
11108
|
-
secrets,
|
|
11109
|
-
buildOnly: true,
|
|
11110
|
-
allowDevServices: true
|
|
11111
|
-
});
|
|
11112
|
-
return require_compose.stackHosts(stack);
|
|
11113
|
-
}
|
|
11114
|
-
/**
|
|
11115
|
-
* `GKM_SERVER_IPV4` from the stage's secrets and `dns`: each public host's
|
|
11116
|
-
* records, created or corrected. A dry run reads and prints, and writes
|
|
11117
|
-
* nothing.
|
|
11118
|
-
*/
|
|
11119
|
-
async function provisionStageDns(options) {
|
|
11120
|
-
const { workspace, stage } = options;
|
|
11121
|
-
const log = options.log ?? ((line) => console.log(line));
|
|
11122
|
-
if (stage === workspace.stages.local || !workspace.dns || !deploysWithCompose(workspace)) return {
|
|
11123
|
-
mode: "none",
|
|
11124
|
-
hosts: [],
|
|
11125
|
-
changes: []
|
|
11126
|
-
};
|
|
11127
|
-
const store = await require_seeds.secretsStoreFor(workspace, stage, {
|
|
11128
|
-
...options.profile ? { profile: options.profile } : {},
|
|
11129
|
-
...options.home ? { home: options.home } : {}
|
|
11130
|
-
});
|
|
11131
|
-
const server = require_compose.serverAddress(stage, (await store.read(stage))?.custom);
|
|
11132
|
-
if (!server) {
|
|
11133
|
-
log(`\n🌐 DNS for '${stage}': no GKM_SERVER_IPV4 in its secrets, so no records — ${require_compose.serverAddressHint(stage)}`);
|
|
11134
|
-
return {
|
|
11135
|
-
mode: "none",
|
|
11136
|
-
hosts: [],
|
|
11137
|
-
changes: []
|
|
11138
|
-
};
|
|
11139
|
-
}
|
|
11140
|
-
const hosts = [...options.hosts ?? await composeStageHosts({
|
|
11141
|
-
workspace,
|
|
11142
|
-
stage,
|
|
11143
|
-
...options.profile ? { profile: options.profile } : {},
|
|
11144
|
-
...options.home ? { home: options.home } : {},
|
|
11145
|
-
...options.manifest ? { manifest: options.manifest } : {},
|
|
11146
|
-
...options.runnables ? { runnables: options.runnables } : {},
|
|
11147
|
-
...options.background ? { background: options.background } : {}
|
|
11148
|
-
})];
|
|
11149
|
-
log(`\n🌐 DNS for '${stage}' → ${server.ipv4}${server.ipv6 ? ` / ${server.ipv6}` : ""}${options.dryRun ? " (dry run — nothing is written)" : ""}`);
|
|
11150
|
-
const plan = require_compose.planStackDns({
|
|
11151
|
-
stage,
|
|
11152
|
-
hosts,
|
|
11153
|
-
server,
|
|
11154
|
-
dns: workspace.dns
|
|
11155
|
-
});
|
|
11156
|
-
try {
|
|
11157
|
-
return {
|
|
11158
|
-
mode: "records",
|
|
11159
|
-
hosts,
|
|
11160
|
-
changes: await require_compose.applyStackDns(plan, {
|
|
11161
|
-
...options.dryRun ? { dryRun: true } : {},
|
|
11162
|
-
log,
|
|
11163
|
-
credentials: {
|
|
11164
|
-
env: options.env ?? process.env,
|
|
11165
|
-
...options.home ? { home: options.home } : {},
|
|
11166
|
-
log
|
|
11167
|
-
},
|
|
11168
|
-
...options.providerFor ? { providerFor: options.providerFor } : {}
|
|
11169
|
-
})
|
|
11170
|
-
};
|
|
11171
|
-
} catch (error) {
|
|
11172
|
-
if (error instanceof require_credentials.MissingCredential) {
|
|
11173
|
-
log(` ⚠ ${error.message}`);
|
|
11174
|
-
log(" Until then, create these records yourself:");
|
|
11175
|
-
for (const domain of plan.domains) for (const r of domain.records) log(` ${r.host.padEnd(32)} ${r.type.padEnd(5)} ${r.value} (TTL ${r.ttl})`);
|
|
11176
|
-
return {
|
|
11177
|
-
mode: "records",
|
|
11178
|
-
hosts,
|
|
11179
|
-
changes: []
|
|
11180
|
-
};
|
|
11181
|
-
}
|
|
11182
|
-
throw error;
|
|
11183
|
-
}
|
|
11184
|
-
}
|
|
11185
|
-
//#endregion
|
|
11186
11192
|
//#region src/setup/index.ts
|
|
11187
11193
|
var setup_exports = /* @__PURE__ */ require_rolldown_runtime.__exportAll({
|
|
11194
|
+
SetupIsLocal: () => SetupIsLocal,
|
|
11188
11195
|
createFreshWorkspaceSecrets: () => createFreshWorkspaceSecrets,
|
|
11189
11196
|
ensureStageSecrets: () => ensureStageSecrets,
|
|
11190
11197
|
reconcileSecrets: () => reconcileSecrets,
|
|
@@ -11192,14 +11199,21 @@ var setup_exports = /* @__PURE__ */ require_rolldown_runtime.__exportAll({
|
|
|
11192
11199
|
});
|
|
11193
11200
|
const logger$1 = console;
|
|
11194
11201
|
/**
|
|
11195
|
-
*
|
|
11196
|
-
*
|
|
11197
|
-
|
|
11198
|
-
|
|
11199
|
-
|
|
11200
|
-
|
|
11201
|
-
|
|
11202
|
-
|
|
11202
|
+
* `gkm setup --stage <deployed stage>`: setup is this machine's, done once,
|
|
11203
|
+
* and creates nothing for a deployed stage — the deploy does.
|
|
11204
|
+
*/
|
|
11205
|
+
var SetupIsLocal = class extends require_errors.GkmError {
|
|
11206
|
+
stage;
|
|
11207
|
+
constructor(stage) {
|
|
11208
|
+
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.`);
|
|
11209
|
+
this.stage = stage;
|
|
11210
|
+
this.name = "SetupIsLocal";
|
|
11211
|
+
}
|
|
11212
|
+
};
|
|
11213
|
+
/**
|
|
11214
|
+
* Set this machine up for the workspace, once: the local stage's secrets
|
|
11215
|
+
* (local → the stage's store → generated) and its containers. A deployed
|
|
11216
|
+
* stage is refused with {@link SetupIsLocal}: its resources are the deploy's.
|
|
11203
11217
|
*/
|
|
11204
11218
|
async function setupCommand(options = {}) {
|
|
11205
11219
|
let loadedConfig;
|
|
@@ -11211,24 +11225,15 @@ async function setupCommand(options = {}) {
|
|
|
11211
11225
|
}
|
|
11212
11226
|
const stage = options.stage ?? loadedConfig.workspace.stages.local;
|
|
11213
11227
|
const { workspace } = loadedConfig;
|
|
11214
|
-
|
|
11215
|
-
logger$1.log(
|
|
11228
|
+
if (workspace.stages.deployed.includes(stage)) throw new SetupIsLocal(stage);
|
|
11229
|
+
logger$1.log("\n🔧 Setting up the local environment...\n");
|
|
11216
11230
|
logger$1.log(`📦 Workspace: ${workspace.name}`);
|
|
11217
11231
|
logger$1.log(`📱 Apps: ${Object.keys(workspace.apps).join(", ")}`);
|
|
11218
11232
|
logger$1.log(`🔑 Stage: ${stage}\n`);
|
|
11219
|
-
if (!local) assertStageServer(workspace, stage, await (await require_seeds.secretsStoreFor(workspace, stage, { ...options.profile ? { profile: options.profile } : {} })).read(stage));
|
|
11220
|
-
if (!local && options.dryRun) {
|
|
11221
|
-
await provisionDeployed(workspace, stage, options);
|
|
11222
|
-
return;
|
|
11223
|
-
}
|
|
11224
11233
|
if (!await resolveSecrets(stage, workspace, options)) {
|
|
11225
11234
|
logger$1.error("❌ Failed to resolve secrets. Exiting.");
|
|
11226
11235
|
process.exit(1);
|
|
11227
11236
|
}
|
|
11228
|
-
if (!local) {
|
|
11229
|
-
await provisionDeployed(workspace, stage, options);
|
|
11230
|
-
return;
|
|
11231
|
-
}
|
|
11232
11237
|
if (!options.skipDocker) {
|
|
11233
11238
|
logger$1.log("");
|
|
11234
11239
|
await reconcileLocal(workspace, stage, options);
|
|
@@ -11236,33 +11241,6 @@ async function setupCommand(options = {}) {
|
|
|
11236
11241
|
printSummary(workspace, stage);
|
|
11237
11242
|
}
|
|
11238
11243
|
/**
|
|
11239
|
-
* A deployed stage's providers: each one's `ensure()`, in the stage's own
|
|
11240
|
-
* account, its keys written into the stage's secrets.
|
|
11241
|
-
*/
|
|
11242
|
-
async function provisionDeployed(workspace, stage, options) {
|
|
11243
|
-
logger$1.log(options.dryRun ? `\n☁️ Providers for '${stage}' (dry run — nothing is created or written)` : `\n☁️ Providers for '${stage}'`);
|
|
11244
|
-
const configured = (await require_seeds.provisionStage({
|
|
11245
|
-
workspace,
|
|
11246
|
-
stage,
|
|
11247
|
-
...options.dryRun ? { dryRun: true } : {},
|
|
11248
|
-
...options.profile ? { profile: options.profile } : {},
|
|
11249
|
-
...options.rotateKeys ? { rotateKeys: true } : {},
|
|
11250
|
-
...options.retireOldKeys ? { retireOldKeys: true } : {},
|
|
11251
|
-
log: (line) => logger$1.log(line)
|
|
11252
|
-
})).filter((r) => r.mode === "provider");
|
|
11253
|
-
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 ${require_seeds.provisionCommand(stage)} create it.`);
|
|
11254
|
-
const dns = await provisionStageDns({
|
|
11255
|
-
workspace,
|
|
11256
|
-
stage,
|
|
11257
|
-
...options.dryRun ? { dryRun: true } : {},
|
|
11258
|
-
...options.profile ? { profile: options.profile } : {},
|
|
11259
|
-
log: (line) => logger$1.log(line)
|
|
11260
|
-
});
|
|
11261
|
-
const changes = configured.reduce((n, r) => n + r.actions.length, 0) + dns.changes.filter((c) => c.action !== "unchanged" && c.action !== "manual").length;
|
|
11262
|
-
if (configured.length === 0 && dns.mode === "none") return;
|
|
11263
|
-
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"})`}`);
|
|
11264
|
-
}
|
|
11265
|
-
/**
|
|
11266
11244
|
* Converge this machine on what the manifest declares.
|
|
11267
11245
|
*
|
|
11268
11246
|
* Says what it did in one line and stays silent when it did nothing, because
|
|
@@ -11287,7 +11265,7 @@ async function reconcileLocal(workspace, stage, options) {
|
|
|
11287
11265
|
/**
|
|
11288
11266
|
* Resolve secrets with priority:
|
|
11289
11267
|
* 1. Local secrets exist → use them (preserves manual additions)
|
|
11290
|
-
* 2.
|
|
11268
|
+
* 2. The stage's store has secrets → use them
|
|
11291
11269
|
* 3. Neither → generate fresh secrets
|
|
11292
11270
|
*
|
|
11293
11271
|
* --force skips checks 1 and 2 and always regenerates.
|
|
@@ -11614,7 +11592,7 @@ function testDatabases(reconciled) {
|
|
|
11614
11592
|
* starts without the reference data the app needs.
|
|
11615
11593
|
*/
|
|
11616
11594
|
async function migrateTestStage(workspace, env) {
|
|
11617
|
-
const { migrateAndSeed } = await Promise.resolve().then(() => require("./migrate-
|
|
11595
|
+
const { migrateAndSeed } = await Promise.resolve().then(() => require("./migrate-D5jUz20_.cjs"));
|
|
11618
11596
|
const { discover } = await Promise.resolve().then(() => require("./discover-DPgu-ScS.cjs")).then((n) => n.discover_exports);
|
|
11619
11597
|
const sources = {};
|
|
11620
11598
|
const manifest = await discover({
|
|
@@ -11968,7 +11946,7 @@ program.command("trust").description("Trust the local edge's certificate authori
|
|
|
11968
11946
|
exitWithError(error);
|
|
11969
11947
|
}
|
|
11970
11948
|
});
|
|
11971
|
-
program.command("setup").description("
|
|
11949
|
+
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) => {
|
|
11972
11950
|
try {
|
|
11973
11951
|
const globalOptions = program.opts();
|
|
11974
11952
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
@@ -12050,7 +12028,7 @@ program.command("migrate").description("Apply each database construct's migratio
|
|
|
12050
12028
|
try {
|
|
12051
12029
|
const globalOptions = program.opts();
|
|
12052
12030
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12053
|
-
const { migrateCommand } = await Promise.resolve().then(() => require("./migrate-
|
|
12031
|
+
const { migrateCommand } = await Promise.resolve().then(() => require("./migrate-D5jUz20_.cjs"));
|
|
12054
12032
|
await migrateCommand({
|
|
12055
12033
|
...options,
|
|
12056
12034
|
...construct ? { construct } : {}
|
|
@@ -12063,7 +12041,7 @@ program.command("seed").description("Migrate, then run each database construct's
|
|
|
12063
12041
|
try {
|
|
12064
12042
|
const globalOptions = program.opts();
|
|
12065
12043
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12066
|
-
const { seedCommand } = await Promise.resolve().then(() => require("./migrate-
|
|
12044
|
+
const { seedCommand } = await Promise.resolve().then(() => require("./migrate-D5jUz20_.cjs"));
|
|
12067
12045
|
await seedCommand({
|
|
12068
12046
|
...options,
|
|
12069
12047
|
...construct ? { construct } : {}
|
|
@@ -12076,7 +12054,7 @@ program.command("migration").description("Write a construct's next migration: an
|
|
|
12076
12054
|
try {
|
|
12077
12055
|
const globalOptions = program.opts();
|
|
12078
12056
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12079
|
-
const { migrationCommand } = await Promise.resolve().then(() => require("./migrate-
|
|
12057
|
+
const { migrationCommand } = await Promise.resolve().then(() => require("./migrate-D5jUz20_.cjs"));
|
|
12080
12058
|
await migrationCommand({
|
|
12081
12059
|
construct,
|
|
12082
12060
|
...name ? { name } : {}
|
|
@@ -12122,7 +12100,7 @@ program.command("docker").description("Generate Docker deployment files").option
|
|
|
12122
12100
|
exitWithError(error);
|
|
12123
12101
|
}
|
|
12124
12102
|
});
|
|
12125
|
-
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
|
|
12103
|
+
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) => {
|
|
12126
12104
|
try {
|
|
12127
12105
|
const globalOptions = program.opts();
|
|
12128
12106
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
@@ -12176,7 +12154,7 @@ program.command("secrets:add").description("Build the keys a stage must be given
|
|
|
12176
12154
|
try {
|
|
12177
12155
|
const globalOptions = program.opts();
|
|
12178
12156
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12179
|
-
const { secretsAddCommand } = await Promise.resolve().then(() => require("./add-
|
|
12157
|
+
const { secretsAddCommand } = await Promise.resolve().then(() => require("./add-DsVDdvon.cjs"));
|
|
12180
12158
|
await secretsAddCommand(options);
|
|
12181
12159
|
} catch (error) {
|
|
12182
12160
|
exitWithError(error);
|
|
@@ -12186,7 +12164,7 @@ program.command("encryption:rotate").description("Add a new current key to an En
|
|
|
12186
12164
|
try {
|
|
12187
12165
|
const globalOptions = program.opts();
|
|
12188
12166
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12189
|
-
const { encryptionRotateCommand } = await Promise.resolve().then(() => require("./encryption-
|
|
12167
|
+
const { encryptionRotateCommand } = await Promise.resolve().then(() => require("./encryption-DFcivJaO.cjs"));
|
|
12190
12168
|
await encryptionRotateCommand(construct, options);
|
|
12191
12169
|
} catch (error) {
|
|
12192
12170
|
exitWithError(error);
|
|
@@ -12196,7 +12174,7 @@ program.command("encryption:retire").description("Remove an old key from an Encr
|
|
|
12196
12174
|
try {
|
|
12197
12175
|
const globalOptions = program.opts();
|
|
12198
12176
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12199
|
-
const { encryptionRetireCommand } = await Promise.resolve().then(() => require("./encryption-
|
|
12177
|
+
const { encryptionRetireCommand } = await Promise.resolve().then(() => require("./encryption-DFcivJaO.cjs"));
|
|
12200
12178
|
await encryptionRetireCommand(construct, key, options);
|
|
12201
12179
|
} catch (error) {
|
|
12202
12180
|
exitWithError(error);
|
|
@@ -12235,7 +12213,7 @@ program.command("secrets:reconcile").description("Backfill missing custom secret
|
|
|
12235
12213
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12236
12214
|
const { loadWorkspaceConfig } = await Promise.resolve().then(() => require("./config.cjs"));
|
|
12237
12215
|
const { reconcileMissingSecrets } = await Promise.resolve().then(() => require("./reconcile-CuCQBa5-.cjs"));
|
|
12238
|
-
const { secretsStoreFor } = await Promise.resolve().then(() => require("./seeds-
|
|
12216
|
+
const { secretsStoreFor } = await Promise.resolve().then(() => require("./seeds-BCg8X36S.cjs")).then((n) => n.store_exports);
|
|
12239
12217
|
const { workspace } = await loadWorkspaceConfig();
|
|
12240
12218
|
const stage = options.stage ?? workspace.stages.local;
|
|
12241
12219
|
const store = await secretsStoreFor(workspace, stage);
|
|
@@ -12244,7 +12222,7 @@ program.command("secrets:reconcile").description("Backfill missing custom secret
|
|
|
12244
12222
|
console.error(`No secrets found for stage "${stage}". Run "gkm secrets:init --stage ${stage}" first.`);
|
|
12245
12223
|
process.exit(1);
|
|
12246
12224
|
}
|
|
12247
|
-
const { derivedContainers } = await Promise.resolve().then(() => require("./seeds-
|
|
12225
|
+
const { derivedContainers } = await Promise.resolve().then(() => require("./seeds-BCg8X36S.cjs")).then((n) => n.workspace_exports);
|
|
12248
12226
|
const result = reconcileMissingSecrets(secrets, workspace, await derivedContainers(workspace, stage));
|
|
12249
12227
|
if (!result) {
|
|
12250
12228
|
console.log(`\n✓ Secrets for stage "${stage}" are up-to-date`);
|
|
@@ -12261,14 +12239,14 @@ program.command("secrets:migrate").description("Copy a deployed stage's secrets
|
|
|
12261
12239
|
try {
|
|
12262
12240
|
const globalOptions = program.opts();
|
|
12263
12241
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12264
|
-
const { secretsMigrateCommand } = await Promise.resolve().then(() => require("./migrate-
|
|
12242
|
+
const { secretsMigrateCommand } = await Promise.resolve().then(() => require("./migrate-SkWJotn5.cjs"));
|
|
12265
12243
|
await secretsMigrateCommand(options);
|
|
12266
12244
|
} catch (error) {
|
|
12267
12245
|
exitWithError(error);
|
|
12268
12246
|
}
|
|
12269
12247
|
});
|
|
12270
|
-
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
|
|
12271
|
-
const { deployCli } = await Promise.resolve().then(() => require("./cli-
|
|
12248
|
+
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) => {
|
|
12249
|
+
const { deployCli } = await Promise.resolve().then(() => require("./cli-BvBdv660.cjs"));
|
|
12272
12250
|
const globalOptions = program.opts();
|
|
12273
12251
|
const code = await deployCli({
|
|
12274
12252
|
cwd: (0, node_path.resolve)(globalOptions.cwd ?? process.cwd()),
|
|
@@ -12280,14 +12258,18 @@ program.command("deploy").description("Deploy a stage through its target").optio
|
|
|
12280
12258
|
...options.dryRun ? { dryRun: true } : {},
|
|
12281
12259
|
...options.atomic ? { atomic: true } : {},
|
|
12282
12260
|
...options.allowDevServices ? { allowDevServices: true } : {},
|
|
12283
|
-
...options.
|
|
12261
|
+
...options.skipDns ? { skipDns: true } : {},
|
|
12262
|
+
...options.resourcesOnly ? { resourcesOnly: true } : {},
|
|
12263
|
+
...options.skipResources ? { skipResources: true } : {},
|
|
12264
|
+
...options.rotateKeys ? { rotateKeys: true } : {},
|
|
12265
|
+
...options.retireOldKeys ? { retireOldKeys: true } : {}
|
|
12284
12266
|
});
|
|
12285
12267
|
if (code !== 0) process.exit(code);
|
|
12286
12268
|
});
|
|
12287
12269
|
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) => {
|
|
12288
12270
|
try {
|
|
12289
|
-
const { rollbackStage } = await Promise.resolve().then(() => require("./rollback-
|
|
12290
|
-
const { terminalCredentials } = await Promise.resolve().then(() => require("./terminal-
|
|
12271
|
+
const { rollbackStage } = await Promise.resolve().then(() => require("./rollback-D720SFhV.cjs")).then((n) => n.rollback_exports);
|
|
12272
|
+
const { terminalCredentials } = await Promise.resolve().then(() => require("./terminal-CkUYuAPd.cjs"));
|
|
12291
12273
|
const globalOptions = program.opts();
|
|
12292
12274
|
await rollbackStage({
|
|
12293
12275
|
cwd: (0, node_path.resolve)(globalOptions.cwd ?? process.cwd()),
|
|
@@ -12320,7 +12302,7 @@ program.command("deploy:github").description("Let GitHub Actions deploy a stage:
|
|
|
12320
12302
|
try {
|
|
12321
12303
|
const globalOptions = program.opts();
|
|
12322
12304
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12323
|
-
const { deployGithubCommand } = await Promise.resolve().then(() => require("./github-
|
|
12305
|
+
const { deployGithubCommand } = await Promise.resolve().then(() => require("./github-Br42NMrW.cjs"));
|
|
12324
12306
|
await deployGithubCommand(options);
|
|
12325
12307
|
} catch (error) {
|
|
12326
12308
|
exitWithError(error);
|
|
@@ -12330,7 +12312,7 @@ program.command("stages").description("The workspace's stages from gkm.config.ts
|
|
|
12330
12312
|
try {
|
|
12331
12313
|
const globalOptions = program.opts();
|
|
12332
12314
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12333
|
-
const { stagesCommand } = await Promise.resolve().then(() => require("./stages-
|
|
12315
|
+
const { stagesCommand } = await Promise.resolve().then(() => require("./stages-CkqP1N4S.cjs"));
|
|
12334
12316
|
await stagesCommand(options);
|
|
12335
12317
|
} catch (error) {
|
|
12336
12318
|
exitWithError(error);
|
|
@@ -12429,6 +12411,15 @@ program.command("state:show").description("Show deployment state for a stage").r
|
|
|
12429
12411
|
exitWithError(error);
|
|
12430
12412
|
}
|
|
12431
12413
|
});
|
|
12414
|
+
program.command("state:history").description("Show who wrote a stage's deploy state, newest first, and what each app runs").requiredOption("--stage <stage>", "Deployment stage (e.g., production, staging)").option("--json", "Output as JSON").action(async (options) => {
|
|
12415
|
+
try {
|
|
12416
|
+
const globalOptions = program.opts();
|
|
12417
|
+
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12418
|
+
await stateHistoryCommand(options);
|
|
12419
|
+
} catch (error) {
|
|
12420
|
+
exitWithError(error);
|
|
12421
|
+
}
|
|
12422
|
+
});
|
|
12432
12423
|
program.command("state:unlock").description("Release a stage deploy lock left behind by a run that crashed").requiredOption("--stage <stage>", "Deployment stage (e.g., production, staging)").action(async (options) => {
|
|
12433
12424
|
try {
|
|
12434
12425
|
const globalOptions = program.opts();
|
|
@@ -12464,7 +12455,6 @@ try {
|
|
|
12464
12455
|
program.parse();
|
|
12465
12456
|
//#endregion
|
|
12466
12457
|
exports.canPrompt = canPrompt;
|
|
12467
|
-
exports.deploysWithCompose = deploysWithCompose;
|
|
12468
12458
|
exports.formatError = formatError;
|
|
12469
12459
|
exports.generateFullstackCustomSecrets = generateFullstackCustomSecrets;
|
|
12470
12460
|
exports.prompt = prompt;
|