@geekmidas/cli 10.0.0-alpha.93 → 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-Mi3vptSR.mjs → GoDaddyProvider-BRZUWD8z.mjs} +3 -3
- package/dist/{GoDaddyProvider-Mi3vptSR.mjs.map → GoDaddyProvider-BRZUWD8z.mjs.map} +1 -1
- package/dist/{GoDaddyProvider-BZb-V14e.cjs → GoDaddyProvider-DzguxU_a.cjs} +3 -3
- package/dist/{GoDaddyProvider-BZb-V14e.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-CtwO7fwy.mjs → LegacyStateStore-BQZb6-j2.mjs} +3 -2
- package/dist/{LegacyStateStore-CtwO7fwy.mjs.map → LegacyStateStore-BQZb6-j2.mjs.map} +1 -1
- package/dist/{LegacyStateStore-BlYXQQSE.cjs → LegacyStateStore-D50dgUPc.cjs} +10 -9
- package/dist/{LegacyStateStore-BlYXQQSE.cjs.map → LegacyStateStore-D50dgUPc.cjs.map} +1 -1
- package/dist/{LocalStateStore-D40_SDmJ.mjs → LocalStateStore-BSaS2535.mjs} +2 -2
- package/dist/{LocalStateStore-D40_SDmJ.mjs.map → LocalStateStore-BSaS2535.mjs.map} +1 -1
- package/dist/{LocalStateStore-oX_zxj9V.cjs → LocalStateStore-EFBUjuMX.cjs} +8 -8
- package/dist/{LocalStateStore-oX_zxj9V.cjs.map → LocalStateStore-EFBUjuMX.cjs.map} +1 -1
- package/dist/{S3StateStore-DeI7jtvi.cjs → S3StateStore-C5mv8To3.cjs} +5 -5
- package/dist/{S3StateStore-DeI7jtvi.cjs.map → S3StateStore-C5mv8To3.cjs.map} +1 -1
- package/dist/{S3StateStore-BzS0IeSt.mjs → S3StateStore-CrFq4UZU.mjs} +2 -2
- package/dist/{S3StateStore-BzS0IeSt.mjs.map → S3StateStore-CrFq4UZU.mjs.map} +1 -1
- package/dist/{SSMStateStore-k_Ew7TWx.mjs → SSMStateStore-D3Z6mZnA.mjs} +2 -2
- package/dist/{SSMStateStore-k_Ew7TWx.mjs.map → SSMStateStore-D3Z6mZnA.mjs.map} +1 -1
- package/dist/{SSMStateStore-CaCtrzFL.cjs → SSMStateStore-DuZCH7_v.cjs} +9 -9
- package/dist/{SSMStateStore-CaCtrzFL.cjs.map → SSMStateStore-DuZCH7_v.cjs.map} +1 -1
- package/dist/{add-CP1podDH.mjs → add-C85isXFl.mjs} +4 -4
- package/dist/add-C85isXFl.mjs.map +1 -0
- package/dist/{add-VcyJnsPX.cjs → add-DsVDdvon.cjs} +4 -4
- package/dist/add-DsVDdvon.cjs.map +1 -0
- package/dist/{bundler-Dfsr6KXU.cjs → bundler-BEgUKc4j.cjs} +5 -5
- package/dist/{bundler-Dfsr6KXU.cjs.map → bundler-BEgUKc4j.cjs.map} +1 -1
- package/dist/{bundler-BWrh-AJH.mjs → bundler-BSHog8CH.mjs} +5 -5
- package/dist/{bundler-BWrh-AJH.mjs.map → bundler-BSHog8CH.mjs.map} +1 -1
- package/dist/{cli-B8otnZfX.mjs → cli-BsFenyaf.mjs} +9 -5
- package/dist/cli-BsFenyaf.mjs.map +1 -0
- package/dist/{cli-DL19w4OE.cjs → cli-BvBdv660.cjs} +9 -5
- package/dist/cli-BvBdv660.cjs.map +1 -0
- package/dist/{compose-BHVKLluX.cjs → compose-Cd09gW-n.cjs} +58 -19
- package/dist/compose-Cd09gW-n.cjs.map +1 -0
- package/dist/{compose-DrEB_4F-.mjs → compose-D2RFYd_f.mjs} +56 -17
- package/dist/compose-D2RFYd_f.mjs.map +1 -0
- package/dist/{config-DCCcrOSo.d.cts → config-DvHNMoOp.d.cts} +4 -4
- package/dist/{config-CHX5GOo3.d.mts.map → config-DvHNMoOp.d.cts.map} +1 -1
- package/dist/{config-CHX5GOo3.d.mts → config-Ngesg4O8.d.mts} +4 -4
- package/dist/{config-DCCcrOSo.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 -13
- 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 +10 -10
- package/dist/{deploy-C3Mhnmus.cjs → deploy-C911Akkn.cjs} +125 -11
- package/dist/deploy-C911Akkn.cjs.map +1 -0
- package/dist/{deploy-DYIyIUYd.mjs → deploy-CeJ5D0xn.mjs} +123 -9
- package/dist/deploy-CeJ5D0xn.mjs.map +1 -0
- package/dist/{discover-vk2r5giK.d.cts → discover-CTzOSGUF.d.cts} +2 -2
- package/dist/{discover-DqwlBVyY.d.mts.map → discover-CTzOSGUF.d.cts.map} +1 -1
- package/dist/{discover-DqwlBVyY.d.mts → discover-CihAtaoj.d.mts} +2 -2
- package/dist/{discover-vk2r5giK.d.cts.map → discover-CihAtaoj.d.mts.map} +1 -1
- package/dist/{dokploy-rivb1RFt.cjs → dokploy-CV7GcobZ.cjs} +2 -2
- package/dist/{dokploy-rivb1RFt.cjs.map → dokploy-CV7GcobZ.cjs.map} +1 -1
- package/dist/{dokploy-o4I6vb9W.mjs → dokploy-D_aat2Xj.mjs} +2 -2
- package/dist/{dokploy-o4I6vb9W.mjs.map → dokploy-D_aat2Xj.mjs.map} +1 -1
- package/dist/{encryption-D7zmwzWz.cjs → encryption-DFcivJaO.cjs} +3 -3
- package/dist/{encryption-D7zmwzWz.cjs.map → encryption-DFcivJaO.cjs.map} +1 -1
- package/dist/{encryption-B6ilrT7p.mjs → encryption-_4qKqtTx.mjs} +3 -3
- package/dist/{encryption-B6ilrT7p.mjs.map → encryption-_4qKqtTx.mjs.map} +1 -1
- package/dist/{engine-Cfx8fEZU.cjs → engine-Bv-LZpmj.cjs} +10 -9
- package/dist/{engine-Cfx8fEZU.cjs.map → engine-Bv-LZpmj.cjs.map} +1 -1
- package/dist/{engine-DjEcovm-.mjs → engine-DPMHThkg.mjs} +7 -6
- package/dist/{engine-DjEcovm-.mjs.map → engine-DPMHThkg.mjs.map} +1 -1
- package/dist/{github-zneTMvnO.cjs → github-Br42NMrW.cjs} +94 -6
- package/dist/github-Br42NMrW.cjs.map +1 -0
- package/dist/{github-CzBbs43W.mjs → github-xsDT19im.mjs} +94 -6
- package/dist/github-xsDT19im.mjs.map +1 -0
- package/dist/{index-BiYU7cUl.d.mts → index-BlpcClwM.d.mts} +2 -2
- package/dist/{index-BiYU7cUl.d.mts.map → index-BlpcClwM.d.mts.map} +1 -1
- package/dist/{index-Dm6V9bwh.d.cts → index-CwLvFqtH.d.cts} +2 -2
- package/dist/{index-Dm6V9bwh.d.cts.map → index-CwLvFqtH.d.cts.map} +1 -1
- package/dist/index.cjs +147 -116
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +143 -112
- 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-BaC4w0sb.mjs → migrate-B7evHv7O.mjs} +3 -3
- package/dist/{migrate-BaC4w0sb.mjs.map → migrate-B7evHv7O.mjs.map} +1 -1
- package/dist/{migrate-C8wTpakT.cjs → migrate-D5jUz20_.cjs} +3 -3
- package/dist/{migrate-C8wTpakT.cjs.map → migrate-D5jUz20_.cjs.map} +1 -1
- package/dist/{migrate-CsBZKALY.mjs → migrate-DhvFPGLi.mjs} +3 -3
- package/dist/{migrate-CsBZKALY.mjs.map → migrate-DhvFPGLi.mjs.map} +1 -1
- package/dist/{migrate-DFjbGnSr.cjs → migrate-SkWJotn5.cjs} +3 -3
- package/dist/{migrate-DFjbGnSr.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/{resolve-g8htuR80.cjs → resolve-CFEOtRsl.cjs} +4 -4
- package/dist/{resolve-g8htuR80.cjs.map → resolve-CFEOtRsl.cjs.map} +1 -1
- package/dist/{resolve-Ccjlpnd9.mjs → resolve-Dyd1S2wn.mjs} +4 -4
- package/dist/{resolve-Ccjlpnd9.mjs.map → resolve-Dyd1S2wn.mjs.map} +1 -1
- package/dist/{rollback--ympG9ss.cjs → rollback-D720SFhV.cjs} +11 -9
- package/dist/{rollback--ympG9ss.cjs.map → rollback-D720SFhV.cjs.map} +1 -1
- package/dist/{rollback-Drbg0OeR.mjs → rollback-NroNbGC0.mjs} +8 -6
- package/dist/{rollback-Drbg0OeR.mjs.map → rollback-NroNbGC0.mjs.map} +1 -1
- package/dist/{runtime-_wEVtshH.d.mts → runtime-BRCq6dQ7.d.mts} +2 -2
- package/dist/{runtime-D_J3ExJn.d.cts.map → runtime-BRCq6dQ7.d.mts.map} +1 -1
- package/dist/{runtime-D_J3ExJn.d.cts → runtime-VktAo_8B.d.cts} +2 -2
- package/dist/{runtime-_wEVtshH.d.mts.map → runtime-VktAo_8B.d.cts.map} +1 -1
- package/dist/{sandbox-CPJq1Kia.d.mts → sandbox-D1gd0iDz.d.cts} +2 -2
- package/dist/{sandbox-CPJq1Kia.d.mts.map → sandbox-D1gd0iDz.d.cts.map} +1 -1
- package/dist/{sandbox-JwuPAl7I.d.cts → sandbox-zHnRLCj0.d.mts} +2 -2
- package/dist/{sandbox-JwuPAl7I.d.cts.map → sandbox-zHnRLCj0.d.mts.map} +1 -1
- package/dist/{secrets-DbPmAS4k.mjs → secrets-CwLauUB_.mjs} +3 -3
- package/dist/secrets-CwLauUB_.mjs.map +1 -0
- package/dist/{secrets-DJteijZo.cjs → secrets-DAvi_O9g.cjs} +3 -3
- package/dist/secrets-DAvi_O9g.cjs.map +1 -0
- package/dist/{seeds-c-ByX9je.cjs → seeds-BCg8X36S.cjs} +1143 -2645
- package/dist/seeds-BCg8X36S.cjs.map +1 -0
- package/dist/{seeds-BSL55F6q.mjs → seeds-CTxTZa-R.mjs} +1289 -2760
- 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-1PeLJS2j.cjs → stack-B3fPDTBg.cjs} +3 -3
- package/dist/{stack-1PeLJS2j.cjs.map → stack-B3fPDTBg.cjs.map} +1 -1
- package/dist/{stack-Co4uZkAo.mjs → stack-NrdH5ngX.mjs} +3 -3
- package/dist/{stack-Co4uZkAo.mjs.map → stack-NrdH5ngX.mjs.map} +1 -1
- 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-C4XRdwnU.mjs → terminal-DAHs2Zko.mjs} +2 -2
- package/dist/{terminal-C4XRdwnU.mjs.map → terminal-DAHs2Zko.mjs.map} +1 -1
- package/dist/{types-BibpiHKB.d.cts → types-DMoaFrjg.d.mts} +32 -9
- package/dist/types-DMoaFrjg.d.mts.map +1 -0
- package/dist/{types-B6lmD3en.d.mts → types-DXyaSmqu.d.cts} +33 -8
- 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/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/deploy-C3Mhnmus.cjs.map +0 -1
- package/dist/deploy-DYIyIUYd.mjs.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/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.cjs
CHANGED
|
@@ -2,27 +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-
|
|
21
|
-
const require_stack = require("./stack-
|
|
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");
|
|
22
22
|
const require_credentialSchemas = require("./credentialSchemas-CAPKFkrG.cjs");
|
|
23
|
-
const require_LocalStateStore = require("./LocalStateStore-
|
|
23
|
+
const require_LocalStateStore = require("./LocalStateStore-EFBUjuMX.cjs");
|
|
24
24
|
const require_utils = require("./utils-D2Nk1Nv2.cjs");
|
|
25
|
-
require("./awsStore-B5We7bMg.cjs");
|
|
26
25
|
const require_ready = require("./ready-D3PIjx3S.cjs");
|
|
27
26
|
let node_path = require("node:path");
|
|
28
27
|
let commander = require("commander");
|
|
@@ -56,7 +55,7 @@ crypto = require_rolldown_runtime.__toESM(crypto, 1);
|
|
|
56
55
|
let _geekmidas_constructs_functions = require("@geekmidas/constructs/functions");
|
|
57
56
|
let _geekmidas_constructs_topic = require("@geekmidas/constructs/topic");
|
|
58
57
|
//#region package.json
|
|
59
|
-
var version = "10.0.0-alpha.
|
|
58
|
+
var version = "10.0.0-alpha.94";
|
|
60
59
|
//#endregion
|
|
61
60
|
//#region src/prompt.ts
|
|
62
61
|
/**
|
|
@@ -139,7 +138,7 @@ const logger$8 = console;
|
|
|
139
138
|
* Validate Dokploy token by making a test API call
|
|
140
139
|
*/
|
|
141
140
|
async function validateDokployToken(endpoint, token) {
|
|
142
|
-
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);
|
|
143
142
|
return new DokployApi({
|
|
144
143
|
baseUrl: endpoint,
|
|
145
144
|
token
|
|
@@ -215,7 +214,7 @@ async function loginCommand(options) {
|
|
|
215
214
|
* Store a GoDaddy Personal Access Token. Not validated: the only call that
|
|
216
215
|
* proves a token without a domain is an account call (`GET /v1/domains`),
|
|
217
216
|
* which a token scoped to `domains.dns:update` alone may not make — the first
|
|
218
|
-
*
|
|
217
|
+
* deploy that writes a record is where a bad token reports itself.
|
|
219
218
|
*/
|
|
220
219
|
async function loginGoDaddy(options) {
|
|
221
220
|
logger$8.log("\n🔐 Logging in to GoDaddy...\n");
|
|
@@ -236,7 +235,7 @@ async function loginGoDaddy(options) {
|
|
|
236
235
|
logger$8.log("\n✓ GoDaddy token stored.");
|
|
237
236
|
logger$8.log(` Token: ${maskToken(token)}`);
|
|
238
237
|
logger$8.log(` Credentials stored in: ${require_credentials.getCredentialsPath(where)}`);
|
|
239
|
-
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.");
|
|
240
239
|
logger$8.log("\nYou can now use it as a DNS provider without setting GODADDY_API_TOKEN.");
|
|
241
240
|
}
|
|
242
241
|
/**
|
|
@@ -2333,9 +2332,9 @@ async function workspaceDevCommand(configured, options) {
|
|
|
2333
2332
|
for (const { id, port } of fakes) logger$5.log(`🎭 ${id} fake: http://localhost:${port}`);
|
|
2334
2333
|
logger$5.log(options.migrate || options.seed ? "🗄️ Migrating the databases" : "🗄️ Checking for pending migrations");
|
|
2335
2334
|
if (options.migrate || options.seed) {
|
|
2336
|
-
const { prepareDevDatabases } = await Promise.resolve().then(() => require("./migrate-
|
|
2335
|
+
const { prepareDevDatabases } = await Promise.resolve().then(() => require("./migrate-D5jUz20_.cjs"));
|
|
2337
2336
|
await prepareDevDatabases(workspace, reconciled.env, { seed: !!options.seed });
|
|
2338
|
-
} 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) => {
|
|
2339
2338
|
logger$5.log(`⚠️ Could not check for pending migrations: ${error instanceof Error ? error.message : String(error)}`);
|
|
2340
2339
|
});
|
|
2341
2340
|
const appUrls = {};
|
|
@@ -3388,7 +3387,7 @@ async function buildApp(input) {
|
|
|
3388
3387
|
...production,
|
|
3389
3388
|
...telemetry ? { telemetry } : {}
|
|
3390
3389
|
});
|
|
3391
|
-
const { bundleServer } = await Promise.resolve().then(() => require("./bundler-
|
|
3390
|
+
const { bundleServer } = await Promise.resolve().then(() => require("./bundler-BEgUKc4j.cjs"));
|
|
3392
3391
|
await bundleServer({
|
|
3393
3392
|
entryPoint,
|
|
3394
3393
|
outputDir: (0, node_path.join)(outputDir, "dist"),
|
|
@@ -3533,7 +3532,7 @@ async function buildWorkers(input) {
|
|
|
3533
3532
|
});
|
|
3534
3533
|
logger$4.log(`Generated worker ${worker.id}: ${crons.length} crons, ${queues.length} queues, ${subscribers.length} subscribers`);
|
|
3535
3534
|
if (!input.bundle) continue;
|
|
3536
|
-
const { bundleServer } = await Promise.resolve().then(() => require("./bundler-
|
|
3535
|
+
const { bundleServer } = await Promise.resolve().then(() => require("./bundler-BEgUKc4j.cjs"));
|
|
3537
3536
|
const outfile = require_seeds.workerBundleName(worker.id);
|
|
3538
3537
|
await bundleServer({
|
|
3539
3538
|
entryPoint,
|
|
@@ -3619,7 +3618,7 @@ async function buildForTarget(target, context, appRoot, workspaceRoot, endpointG
|
|
|
3619
3618
|
let masterKey;
|
|
3620
3619
|
if (context.production?.bundle && !skipBundle) {
|
|
3621
3620
|
logger$4.log(`\n📦 Bundling production server...`);
|
|
3622
|
-
const { bundleServer } = await Promise.resolve().then(() => require("./bundler-
|
|
3621
|
+
const { bundleServer } = await Promise.resolve().then(() => require("./bundler-BEgUKc4j.cjs"));
|
|
3623
3622
|
const allConstructs = [
|
|
3624
3623
|
...endpoints.map((e) => e.construct),
|
|
3625
3624
|
...functions.map((f) => f.construct),
|
|
@@ -3913,7 +3912,11 @@ async function composeCommand(options, deps = {}) {
|
|
|
3913
3912
|
...options.dryRun ? { dryRun: true } : {},
|
|
3914
3913
|
...options.push ? { buildOnly: true } : {},
|
|
3915
3914
|
...options.allowDevServices ? { allowDevServices: true } : {},
|
|
3916
|
-
...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 } : {},
|
|
3917
3920
|
logger: {
|
|
3918
3921
|
info: (message) => console.log(message),
|
|
3919
3922
|
warn: (message) => console.warn(message),
|
|
@@ -4183,7 +4186,7 @@ async function statePushCommand(options) {
|
|
|
4183
4186
|
*/
|
|
4184
4187
|
async function stateShowCommand(options) {
|
|
4185
4188
|
const { workspace } = await require_config.loadWorkspaceConfig();
|
|
4186
|
-
const stored = await (await
|
|
4189
|
+
const stored = await (await require_sniffer.createStateStore({
|
|
4187
4190
|
config: workspace.state,
|
|
4188
4191
|
workspaceRoot: workspace.root,
|
|
4189
4192
|
workspaceName: workspace.name
|
|
@@ -4210,7 +4213,7 @@ async function stateShowCommand(options) {
|
|
|
4210
4213
|
*/
|
|
4211
4214
|
async function stateUnlockCommand(options) {
|
|
4212
4215
|
const { workspace } = await require_config.loadWorkspaceConfig();
|
|
4213
|
-
const holder = await (await
|
|
4216
|
+
const holder = await (await require_sniffer.createStateStore({
|
|
4214
4217
|
config: workspace.state,
|
|
4215
4218
|
workspaceRoot: workspace.root,
|
|
4216
4219
|
workspaceName: workspace.name
|
|
@@ -4287,7 +4290,7 @@ async function remoteAndLocal(workspace, hint = ["Add a remote provider in gkm.c
|
|
|
4287
4290
|
}
|
|
4288
4291
|
return {
|
|
4289
4292
|
local: new require_LocalStateStore.LocalStateStore(workspace.root),
|
|
4290
|
-
remote: await
|
|
4293
|
+
remote: await require_sniffer.createStateStore({
|
|
4291
4294
|
config: workspace.state,
|
|
4292
4295
|
workspaceRoot: workspace.root,
|
|
4293
4296
|
workspaceName: workspace.name
|
|
@@ -4435,7 +4438,7 @@ function printDnsRecords(resources) {
|
|
|
4435
4438
|
*/
|
|
4436
4439
|
async function stateHistoryCommand(options) {
|
|
4437
4440
|
const { workspace } = await require_config.loadWorkspaceConfig();
|
|
4438
|
-
const stored = await (await
|
|
4441
|
+
const stored = await (await require_sniffer.createStateStore({
|
|
4439
4442
|
config: workspace.state,
|
|
4440
4443
|
workspaceRoot: workspace.root,
|
|
4441
4444
|
workspaceName: workspace.name
|
|
@@ -5430,25 +5433,25 @@ function loadPackageJson() {
|
|
|
5430
5433
|
* Run: pnpm --filter @geekmidas/cli sync-versions
|
|
5431
5434
|
*/
|
|
5432
5435
|
const GEEKMIDAS_VERSIONS = {
|
|
5433
|
-
"@geekmidas/audit": "~10.0.0-alpha.
|
|
5434
|
-
"@geekmidas/auth": "~10.0.0-alpha.
|
|
5435
|
-
"@geekmidas/cache": "~10.0.0-alpha.
|
|
5436
|
-
"@geekmidas/client": "~10.0.0-alpha.
|
|
5437
|
-
"@geekmidas/cloud": "~10.0.0-alpha.
|
|
5438
|
-
"@geekmidas/constructs": "~10.0.0-alpha.
|
|
5439
|
-
"@geekmidas/db": "~10.0.0-alpha.
|
|
5440
|
-
"@geekmidas/emailkit": "~10.0.0-alpha.
|
|
5441
|
-
"@geekmidas/envkit": "~10.0.0-alpha.
|
|
5442
|
-
"@geekmidas/errors": "~10.0.0-alpha.
|
|
5443
|
-
"@geekmidas/events": "~10.0.0-alpha.
|
|
5444
|
-
"@geekmidas/logger": "~10.0.0-alpha.
|
|
5445
|
-
"@geekmidas/manifest": "~10.0.0-alpha.
|
|
5446
|
-
"@geekmidas/rate-limit": "~10.0.0-alpha.
|
|
5447
|
-
"@geekmidas/schema": "~10.0.0-alpha.
|
|
5448
|
-
"@geekmidas/services": "~10.0.0-alpha.
|
|
5449
|
-
"@geekmidas/storage": "~10.0.0-alpha.
|
|
5450
|
-
"@geekmidas/telescope": "~10.0.0-alpha.
|
|
5451
|
-
"@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",
|
|
5452
5455
|
"@geekmidas/cli": `~${loadPackageJson().version}`
|
|
5453
5456
|
};
|
|
5454
5457
|
//#endregion
|
|
@@ -5849,7 +5852,7 @@ const COMMIT = /^[0-9a-f]{40}$/;
|
|
|
5849
5852
|
* The `uses:` value for the stages action, with a comment saying which CLI
|
|
5850
5853
|
* release the pinned commit is.
|
|
5851
5854
|
*/
|
|
5852
|
-
function stagesActionUses(commit = "
|
|
5855
|
+
function stagesActionUses(commit = "dcab6fe1ee033518c7901452ee9c49102749c9ed", version = cliVersion()) {
|
|
5853
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`;
|
|
5854
5857
|
}
|
|
5855
5858
|
//#endregion
|
|
@@ -6101,6 +6104,7 @@ function stagesJob(options) {
|
|
|
6101
6104
|
has-build: \${{ steps.stages.outputs.has-build }}
|
|
6102
6105
|
has-deploy: \${{ steps.stages.outputs.has-deploy }}
|
|
6103
6106
|
aws-region: \${{ steps.stages.outputs.aws-region }}
|
|
6107
|
+
resources: \${{ steps.stages.outputs.resources }}
|
|
6104
6108
|
steps:
|
|
6105
6109
|
- uses: actions/checkout@v4
|
|
6106
6110
|
|
|
@@ -6118,6 +6122,10 @@ ${pm.setup}
|
|
|
6118
6122
|
stage: \${{ inputs.stage }}
|
|
6119
6123
|
`;
|
|
6120
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
|
+
}
|
|
6121
6129
|
/**
|
|
6122
6130
|
* The registry login a compose build pushes with: GitHub's own token on
|
|
6123
6131
|
* ghcr.io, otherwise a username variable and a password secret.
|
|
@@ -6142,6 +6150,11 @@ function registryLogin(registry) {
|
|
|
6142
6150
|
* `ref` — then that commit's push build, whose digests pin each image. Over
|
|
6143
6151
|
* SSH, with a pinned host key, the server checks the commit out and runs
|
|
6144
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.
|
|
6145
6158
|
*/
|
|
6146
6159
|
function composeDeploy(options) {
|
|
6147
6160
|
const pm = tooling(options);
|
|
@@ -6217,6 +6230,13 @@ ${registryLogin(registry)}
|
|
|
6217
6230
|
permissions:
|
|
6218
6231
|
contents: read
|
|
6219
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) }}
|
|
6220
6240
|
steps:
|
|
6221
6241
|
# A release deploys its tag's commit, never its target_commitish — the
|
|
6222
6242
|
# branch it was drafted against, which has moved on since.
|
|
@@ -6239,6 +6259,40 @@ ${registryLogin(registry)}
|
|
|
6239
6259
|
REF: \${{ inputs.ref }}
|
|
6240
6260
|
SHA: \${{ github.sha }}
|
|
6241
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
|
+
|
|
6242
6296
|
# The push run of this workflow that built the commit for this stage:
|
|
6243
6297
|
# this run on a push, the newest one with the stage's digests otherwise.
|
|
6244
6298
|
- name: Find the commit's push build
|
|
@@ -6300,9 +6354,9 @@ ${registryLogin(registry)}
|
|
|
6300
6354
|
if [ -f digests.json ]; then digests=$(base64 -w0 < digests.json); fi
|
|
6301
6355
|
ssh -i ~/.ssh/deploy_key -o IdentitiesOnly=yes -o StrictHostKeyChecking=yes \\
|
|
6302
6356
|
"$DEPLOY_USER@$DEPLOY_HOST" \\
|
|
6303
|
-
"bash -s -- $(printf '%q ' "$STAGE" "$SHA" "$DEPLOY_PATH" "$digests")" <<'REMOTE'
|
|
6357
|
+
"bash -s -- $(printf '%q ' "$STAGE" "$SHA" "$DEPLOY_PATH" "$digests" "$RESOURCES_ON_RUNNER")" <<'REMOTE'
|
|
6304
6358
|
set -euo pipefail
|
|
6305
|
-
stage=$1 sha=$2 dir=$3 digests=$4
|
|
6359
|
+
stage=$1 sha=$2 dir=$3 digests=$4 resources_on_runner=$5
|
|
6306
6360
|
cd "$dir"
|
|
6307
6361
|
git fetch --quiet origin
|
|
6308
6362
|
git checkout --quiet --detach "$sha"
|
|
@@ -6313,6 +6367,8 @@ ${registryLogin(registry)}
|
|
|
6313
6367
|
printf '%s' "$digests" | base64 -d > ".gkm/digests-$stage.json"
|
|
6314
6368
|
args+=(--digests-file ".gkm/digests-$stage.json")
|
|
6315
6369
|
fi
|
|
6370
|
+
# Created and confirmed from the runner already.
|
|
6371
|
+
if [ "$resources_on_runner" = true ]; then args+=(--skip-resources); fi
|
|
6316
6372
|
${pm.exec} gkm compose "\${args[@]}"
|
|
6317
6373
|
REMOTE
|
|
6318
6374
|
env:
|
|
@@ -6361,7 +6417,9 @@ function targetDeploy(options) {
|
|
|
6361
6417
|
`;
|
|
6362
6418
|
const deployEnv = sst ? "" : `
|
|
6363
6419
|
DOKPLOY_API_TOKEN: \${{ secrets.DOKPLOY_API_TOKEN }}
|
|
6364
|
-
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 }}`;
|
|
6365
6423
|
return `${deployHeader(false)}
|
|
6366
6424
|
jobs:
|
|
6367
6425
|
${stagesJob(options)}
|
|
@@ -11133,6 +11191,7 @@ function maskUrl(url) {
|
|
|
11133
11191
|
//#endregion
|
|
11134
11192
|
//#region src/setup/index.ts
|
|
11135
11193
|
var setup_exports = /* @__PURE__ */ require_rolldown_runtime.__exportAll({
|
|
11194
|
+
SetupIsLocal: () => SetupIsLocal,
|
|
11136
11195
|
createFreshWorkspaceSecrets: () => createFreshWorkspaceSecrets,
|
|
11137
11196
|
ensureStageSecrets: () => ensureStageSecrets,
|
|
11138
11197
|
reconcileSecrets: () => reconcileSecrets,
|
|
@@ -11140,14 +11199,21 @@ var setup_exports = /* @__PURE__ */ require_rolldown_runtime.__exportAll({
|
|
|
11140
11199
|
});
|
|
11141
11200
|
const logger$1 = console;
|
|
11142
11201
|
/**
|
|
11143
|
-
*
|
|
11144
|
-
*
|
|
11145
|
-
|
|
11146
|
-
|
|
11147
|
-
|
|
11148
|
-
|
|
11149
|
-
|
|
11150
|
-
|
|
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.
|
|
11151
11217
|
*/
|
|
11152
11218
|
async function setupCommand(options = {}) {
|
|
11153
11219
|
let loadedConfig;
|
|
@@ -11159,27 +11225,15 @@ async function setupCommand(options = {}) {
|
|
|
11159
11225
|
}
|
|
11160
11226
|
const stage = options.stage ?? loadedConfig.workspace.stages.local;
|
|
11161
11227
|
const { workspace } = loadedConfig;
|
|
11162
|
-
|
|
11163
|
-
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");
|
|
11164
11230
|
logger$1.log(`📦 Workspace: ${workspace.name}`);
|
|
11165
11231
|
logger$1.log(`📱 Apps: ${Object.keys(workspace.apps).join(", ")}`);
|
|
11166
11232
|
logger$1.log(`🔑 Stage: ${stage}\n`);
|
|
11167
|
-
if (!local) {
|
|
11168
|
-
const store = await require_seeds.secretsStoreFor(workspace, stage, { ...options.profile ? { profile: options.profile } : {} });
|
|
11169
|
-
require_seeds.assertStageServer(workspace, stage, await store.read(stage));
|
|
11170
|
-
}
|
|
11171
|
-
if (!local && options.dryRun) {
|
|
11172
|
-
await provisionDeployed(workspace, stage, options);
|
|
11173
|
-
return;
|
|
11174
|
-
}
|
|
11175
11233
|
if (!await resolveSecrets(stage, workspace, options)) {
|
|
11176
11234
|
logger$1.error("❌ Failed to resolve secrets. Exiting.");
|
|
11177
11235
|
process.exit(1);
|
|
11178
11236
|
}
|
|
11179
|
-
if (!local) {
|
|
11180
|
-
await provisionDeployed(workspace, stage, options);
|
|
11181
|
-
return;
|
|
11182
|
-
}
|
|
11183
11237
|
if (!options.skipDocker) {
|
|
11184
11238
|
logger$1.log("");
|
|
11185
11239
|
await reconcileLocal(workspace, stage, options);
|
|
@@ -11187,33 +11241,6 @@ async function setupCommand(options = {}) {
|
|
|
11187
11241
|
printSummary(workspace, stage);
|
|
11188
11242
|
}
|
|
11189
11243
|
/**
|
|
11190
|
-
* A deployed stage's providers: each one's `ensure()`, in the stage's own
|
|
11191
|
-
* account, its keys written into the stage's secrets.
|
|
11192
|
-
*/
|
|
11193
|
-
async function provisionDeployed(workspace, stage, options) {
|
|
11194
|
-
logger$1.log(options.dryRun ? `\n☁️ Providers for '${stage}' (dry run — nothing is created or written)` : `\n☁️ Providers for '${stage}'`);
|
|
11195
|
-
const configured = (await require_seeds.provisionStage({
|
|
11196
|
-
workspace,
|
|
11197
|
-
stage,
|
|
11198
|
-
...options.dryRun ? { dryRun: true } : {},
|
|
11199
|
-
...options.profile ? { profile: options.profile } : {},
|
|
11200
|
-
...options.rotateKeys ? { rotateKeys: true } : {},
|
|
11201
|
-
...options.retireOldKeys ? { retireOldKeys: true } : {},
|
|
11202
|
-
log: (line) => logger$1.log(line)
|
|
11203
|
-
})).filter((r) => r.mode === "provider");
|
|
11204
|
-
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.`);
|
|
11205
|
-
const dns = await require_seeds.provisionStageDns({
|
|
11206
|
-
workspace,
|
|
11207
|
-
stage,
|
|
11208
|
-
...options.dryRun ? { dryRun: true } : {},
|
|
11209
|
-
...options.profile ? { profile: options.profile } : {},
|
|
11210
|
-
log: (line) => logger$1.log(line)
|
|
11211
|
-
});
|
|
11212
|
-
const changes = configured.reduce((n, r) => n + r.actions.length, 0) + dns.changes.filter((c) => c.action !== "unchanged" && c.action !== "manual").length;
|
|
11213
|
-
if (configured.length === 0 && dns.mode === "none") return;
|
|
11214
|
-
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"})`}`);
|
|
11215
|
-
}
|
|
11216
|
-
/**
|
|
11217
11244
|
* Converge this machine on what the manifest declares.
|
|
11218
11245
|
*
|
|
11219
11246
|
* Says what it did in one line and stays silent when it did nothing, because
|
|
@@ -11238,7 +11265,7 @@ async function reconcileLocal(workspace, stage, options) {
|
|
|
11238
11265
|
/**
|
|
11239
11266
|
* Resolve secrets with priority:
|
|
11240
11267
|
* 1. Local secrets exist → use them (preserves manual additions)
|
|
11241
|
-
* 2.
|
|
11268
|
+
* 2. The stage's store has secrets → use them
|
|
11242
11269
|
* 3. Neither → generate fresh secrets
|
|
11243
11270
|
*
|
|
11244
11271
|
* --force skips checks 1 and 2 and always regenerates.
|
|
@@ -11565,7 +11592,7 @@ function testDatabases(reconciled) {
|
|
|
11565
11592
|
* starts without the reference data the app needs.
|
|
11566
11593
|
*/
|
|
11567
11594
|
async function migrateTestStage(workspace, env) {
|
|
11568
|
-
const { migrateAndSeed } = await Promise.resolve().then(() => require("./migrate-
|
|
11595
|
+
const { migrateAndSeed } = await Promise.resolve().then(() => require("./migrate-D5jUz20_.cjs"));
|
|
11569
11596
|
const { discover } = await Promise.resolve().then(() => require("./discover-DPgu-ScS.cjs")).then((n) => n.discover_exports);
|
|
11570
11597
|
const sources = {};
|
|
11571
11598
|
const manifest = await discover({
|
|
@@ -11919,7 +11946,7 @@ program.command("trust").description("Trust the local edge's certificate authori
|
|
|
11919
11946
|
exitWithError(error);
|
|
11920
11947
|
}
|
|
11921
11948
|
});
|
|
11922
|
-
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) => {
|
|
11923
11950
|
try {
|
|
11924
11951
|
const globalOptions = program.opts();
|
|
11925
11952
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
@@ -12001,7 +12028,7 @@ program.command("migrate").description("Apply each database construct's migratio
|
|
|
12001
12028
|
try {
|
|
12002
12029
|
const globalOptions = program.opts();
|
|
12003
12030
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12004
|
-
const { migrateCommand } = await Promise.resolve().then(() => require("./migrate-
|
|
12031
|
+
const { migrateCommand } = await Promise.resolve().then(() => require("./migrate-D5jUz20_.cjs"));
|
|
12005
12032
|
await migrateCommand({
|
|
12006
12033
|
...options,
|
|
12007
12034
|
...construct ? { construct } : {}
|
|
@@ -12014,7 +12041,7 @@ program.command("seed").description("Migrate, then run each database construct's
|
|
|
12014
12041
|
try {
|
|
12015
12042
|
const globalOptions = program.opts();
|
|
12016
12043
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12017
|
-
const { seedCommand } = await Promise.resolve().then(() => require("./migrate-
|
|
12044
|
+
const { seedCommand } = await Promise.resolve().then(() => require("./migrate-D5jUz20_.cjs"));
|
|
12018
12045
|
await seedCommand({
|
|
12019
12046
|
...options,
|
|
12020
12047
|
...construct ? { construct } : {}
|
|
@@ -12027,7 +12054,7 @@ program.command("migration").description("Write a construct's next migration: an
|
|
|
12027
12054
|
try {
|
|
12028
12055
|
const globalOptions = program.opts();
|
|
12029
12056
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12030
|
-
const { migrationCommand } = await Promise.resolve().then(() => require("./migrate-
|
|
12057
|
+
const { migrationCommand } = await Promise.resolve().then(() => require("./migrate-D5jUz20_.cjs"));
|
|
12031
12058
|
await migrationCommand({
|
|
12032
12059
|
construct,
|
|
12033
12060
|
...name ? { name } : {}
|
|
@@ -12073,7 +12100,7 @@ program.command("docker").description("Generate Docker deployment files").option
|
|
|
12073
12100
|
exitWithError(error);
|
|
12074
12101
|
}
|
|
12075
12102
|
});
|
|
12076
|
-
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) => {
|
|
12077
12104
|
try {
|
|
12078
12105
|
const globalOptions = program.opts();
|
|
12079
12106
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
@@ -12127,7 +12154,7 @@ program.command("secrets:add").description("Build the keys a stage must be given
|
|
|
12127
12154
|
try {
|
|
12128
12155
|
const globalOptions = program.opts();
|
|
12129
12156
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12130
|
-
const { secretsAddCommand } = await Promise.resolve().then(() => require("./add-
|
|
12157
|
+
const { secretsAddCommand } = await Promise.resolve().then(() => require("./add-DsVDdvon.cjs"));
|
|
12131
12158
|
await secretsAddCommand(options);
|
|
12132
12159
|
} catch (error) {
|
|
12133
12160
|
exitWithError(error);
|
|
@@ -12137,7 +12164,7 @@ program.command("encryption:rotate").description("Add a new current key to an En
|
|
|
12137
12164
|
try {
|
|
12138
12165
|
const globalOptions = program.opts();
|
|
12139
12166
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12140
|
-
const { encryptionRotateCommand } = await Promise.resolve().then(() => require("./encryption-
|
|
12167
|
+
const { encryptionRotateCommand } = await Promise.resolve().then(() => require("./encryption-DFcivJaO.cjs"));
|
|
12141
12168
|
await encryptionRotateCommand(construct, options);
|
|
12142
12169
|
} catch (error) {
|
|
12143
12170
|
exitWithError(error);
|
|
@@ -12147,7 +12174,7 @@ program.command("encryption:retire").description("Remove an old key from an Encr
|
|
|
12147
12174
|
try {
|
|
12148
12175
|
const globalOptions = program.opts();
|
|
12149
12176
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12150
|
-
const { encryptionRetireCommand } = await Promise.resolve().then(() => require("./encryption-
|
|
12177
|
+
const { encryptionRetireCommand } = await Promise.resolve().then(() => require("./encryption-DFcivJaO.cjs"));
|
|
12151
12178
|
await encryptionRetireCommand(construct, key, options);
|
|
12152
12179
|
} catch (error) {
|
|
12153
12180
|
exitWithError(error);
|
|
@@ -12186,7 +12213,7 @@ program.command("secrets:reconcile").description("Backfill missing custom secret
|
|
|
12186
12213
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12187
12214
|
const { loadWorkspaceConfig } = await Promise.resolve().then(() => require("./config.cjs"));
|
|
12188
12215
|
const { reconcileMissingSecrets } = await Promise.resolve().then(() => require("./reconcile-CuCQBa5-.cjs"));
|
|
12189
|
-
const { secretsStoreFor } = await Promise.resolve().then(() => require("./seeds-
|
|
12216
|
+
const { secretsStoreFor } = await Promise.resolve().then(() => require("./seeds-BCg8X36S.cjs")).then((n) => n.store_exports);
|
|
12190
12217
|
const { workspace } = await loadWorkspaceConfig();
|
|
12191
12218
|
const stage = options.stage ?? workspace.stages.local;
|
|
12192
12219
|
const store = await secretsStoreFor(workspace, stage);
|
|
@@ -12195,7 +12222,7 @@ program.command("secrets:reconcile").description("Backfill missing custom secret
|
|
|
12195
12222
|
console.error(`No secrets found for stage "${stage}". Run "gkm secrets:init --stage ${stage}" first.`);
|
|
12196
12223
|
process.exit(1);
|
|
12197
12224
|
}
|
|
12198
|
-
const { derivedContainers } = await Promise.resolve().then(() => require("./seeds-
|
|
12225
|
+
const { derivedContainers } = await Promise.resolve().then(() => require("./seeds-BCg8X36S.cjs")).then((n) => n.workspace_exports);
|
|
12199
12226
|
const result = reconcileMissingSecrets(secrets, workspace, await derivedContainers(workspace, stage));
|
|
12200
12227
|
if (!result) {
|
|
12201
12228
|
console.log(`\n✓ Secrets for stage "${stage}" are up-to-date`);
|
|
@@ -12212,14 +12239,14 @@ program.command("secrets:migrate").description("Copy a deployed stage's secrets
|
|
|
12212
12239
|
try {
|
|
12213
12240
|
const globalOptions = program.opts();
|
|
12214
12241
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12215
|
-
const { secretsMigrateCommand } = await Promise.resolve().then(() => require("./migrate-
|
|
12242
|
+
const { secretsMigrateCommand } = await Promise.resolve().then(() => require("./migrate-SkWJotn5.cjs"));
|
|
12216
12243
|
await secretsMigrateCommand(options);
|
|
12217
12244
|
} catch (error) {
|
|
12218
12245
|
exitWithError(error);
|
|
12219
12246
|
}
|
|
12220
12247
|
});
|
|
12221
|
-
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
|
|
12222
|
-
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"));
|
|
12223
12250
|
const globalOptions = program.opts();
|
|
12224
12251
|
const code = await deployCli({
|
|
12225
12252
|
cwd: (0, node_path.resolve)(globalOptions.cwd ?? process.cwd()),
|
|
@@ -12231,14 +12258,18 @@ program.command("deploy").description("Deploy a stage through its target").optio
|
|
|
12231
12258
|
...options.dryRun ? { dryRun: true } : {},
|
|
12232
12259
|
...options.atomic ? { atomic: true } : {},
|
|
12233
12260
|
...options.allowDevServices ? { allowDevServices: true } : {},
|
|
12234
|
-
...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 } : {}
|
|
12235
12266
|
});
|
|
12236
12267
|
if (code !== 0) process.exit(code);
|
|
12237
12268
|
});
|
|
12238
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) => {
|
|
12239
12270
|
try {
|
|
12240
|
-
const { rollbackStage } = await Promise.resolve().then(() => require("./rollback
|
|
12241
|
-
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"));
|
|
12242
12273
|
const globalOptions = program.opts();
|
|
12243
12274
|
await rollbackStage({
|
|
12244
12275
|
cwd: (0, node_path.resolve)(globalOptions.cwd ?? process.cwd()),
|
|
@@ -12271,7 +12302,7 @@ program.command("deploy:github").description("Let GitHub Actions deploy a stage:
|
|
|
12271
12302
|
try {
|
|
12272
12303
|
const globalOptions = program.opts();
|
|
12273
12304
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12274
|
-
const { deployGithubCommand } = await Promise.resolve().then(() => require("./github-
|
|
12305
|
+
const { deployGithubCommand } = await Promise.resolve().then(() => require("./github-Br42NMrW.cjs"));
|
|
12275
12306
|
await deployGithubCommand(options);
|
|
12276
12307
|
} catch (error) {
|
|
12277
12308
|
exitWithError(error);
|
|
@@ -12281,7 +12312,7 @@ program.command("stages").description("The workspace's stages from gkm.config.ts
|
|
|
12281
12312
|
try {
|
|
12282
12313
|
const globalOptions = program.opts();
|
|
12283
12314
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12284
|
-
const { stagesCommand } = await Promise.resolve().then(() => require("./stages-
|
|
12315
|
+
const { stagesCommand } = await Promise.resolve().then(() => require("./stages-CkqP1N4S.cjs"));
|
|
12285
12316
|
await stagesCommand(options);
|
|
12286
12317
|
} catch (error) {
|
|
12287
12318
|
exitWithError(error);
|