@geekmidas/cli 10.0.0-alpha.97 → 10.0.0-alpha.99
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-AqNu60WQ.mjs → GoDaddyProvider-206NguW1.mjs} +2 -2
- package/dist/{GoDaddyProvider-AqNu60WQ.mjs.map → GoDaddyProvider-206NguW1.mjs.map} +1 -1
- package/dist/{GoDaddyProvider-B4R_QFl8.cjs → GoDaddyProvider-D1aQy2i1.cjs} +2 -2
- package/dist/{GoDaddyProvider-B4R_QFl8.cjs.map → GoDaddyProvider-D1aQy2i1.cjs.map} +1 -1
- package/dist/{LegacyStateStore-B-aRqRdD.cjs → LegacyStateStore-CgJEr1G7.cjs} +3 -3
- package/dist/{LegacyStateStore-B-aRqRdD.cjs.map → LegacyStateStore-CgJEr1G7.cjs.map} +1 -1
- package/dist/{LegacyStateStore-8F05-BOo.mjs → LegacyStateStore-wmFfdzuh.mjs} +3 -3
- package/dist/{LegacyStateStore-8F05-BOo.mjs.map → LegacyStateStore-wmFfdzuh.mjs.map} +1 -1
- package/dist/{LocalStateStore-B_bRI8M7.cjs → LocalStateStore-BD14kra9.cjs} +2 -2
- package/dist/{LocalStateStore-B_bRI8M7.cjs.map → LocalStateStore-BD14kra9.cjs.map} +1 -1
- package/dist/{LocalStateStore-B_mfgcO8.mjs → LocalStateStore-C5mNp91D.mjs} +2 -2
- package/dist/{LocalStateStore-B_mfgcO8.mjs.map → LocalStateStore-C5mNp91D.mjs.map} +1 -1
- package/dist/{S3StateStore-CMN0Uzdp.mjs → S3StateStore-CEGbsDHi.mjs} +10 -9
- package/dist/S3StateStore-CEGbsDHi.mjs.map +1 -0
- package/dist/{S3StateStore-zK9zcd9f.cjs → S3StateStore-Csu_kJCy.cjs} +11 -10
- package/dist/S3StateStore-Csu_kJCy.cjs.map +1 -0
- package/dist/{SSMStateStore-Cv7VcMak.mjs → SSMStateStore-Bd62qwp4.mjs} +2 -2
- package/dist/{SSMStateStore-Cv7VcMak.mjs.map → SSMStateStore-Bd62qwp4.mjs.map} +1 -1
- package/dist/{SSMStateStore-C489DnR6.cjs → SSMStateStore-Rp21jtP5.cjs} +2 -2
- package/dist/{SSMStateStore-C489DnR6.cjs.map → SSMStateStore-Rp21jtP5.cjs.map} +1 -1
- package/dist/{add-BA5d4pA0.mjs → add-DyIEYI97.mjs} +4 -4
- package/dist/{add-BA5d4pA0.mjs.map → add-DyIEYI97.mjs.map} +1 -1
- package/dist/{add-HXzTCy_I.cjs → add-Iuo3ao5E.cjs} +5 -5
- package/dist/{add-HXzTCy_I.cjs.map → add-Iuo3ao5E.cjs.map} +1 -1
- package/dist/{aws-Dz2bYxK1.mjs → aws-8QQ8n-t6.mjs} +2 -2
- package/dist/{aws-Dz2bYxK1.mjs.map → aws-8QQ8n-t6.mjs.map} +1 -1
- package/dist/{aws-BTReGjpY.cjs → aws-DY9NqQIT.cjs} +2 -2
- package/dist/{aws-BTReGjpY.cjs.map → aws-DY9NqQIT.cjs.map} +1 -1
- package/dist/{awsStore-BWa1KNY-.mjs → awsStore-Bx5nCFnS.mjs} +8 -6
- package/dist/awsStore-Bx5nCFnS.mjs.map +1 -0
- package/dist/{awsStore-B5We7bMg.cjs → awsStore-u3ehhMoY.cjs} +8 -6
- package/dist/awsStore-u3ehhMoY.cjs.map +1 -0
- package/dist/{bundler-SX3Uy8qT.cjs → bundler-Bgoq8IyR.cjs} +5 -5
- package/dist/{bundler-SX3Uy8qT.cjs.map → bundler-Bgoq8IyR.cjs.map} +1 -1
- package/dist/{bundler-CBomFsnd.mjs → bundler-Q6Kp8b0r.mjs} +5 -5
- package/dist/{bundler-CBomFsnd.mjs.map → bundler-Q6Kp8b0r.mjs.map} +1 -1
- package/dist/{cli-D7z1lQtO.mjs → cli-B9BudUV0.mjs} +2 -4
- package/dist/cli-B9BudUV0.mjs.map +1 -0
- package/dist/{cli-1l0L9LCA.cjs → cli-W2DMRIbP.cjs} +2 -4
- package/dist/cli-W2DMRIbP.cjs.map +1 -0
- package/dist/compose-CIrFNWHb.cjs +3147 -0
- package/dist/compose-CIrFNWHb.cjs.map +1 -0
- package/dist/compose-CLsRcHkA.mjs +3052 -0
- package/dist/compose-CLsRcHkA.mjs.map +1 -0
- package/dist/{config-xIWIaDhW.d.cts → config-BVdHfj8b.d.cts} +4 -4
- package/dist/{config-D-k0gaAr.d.mts.map → config-BVdHfj8b.d.cts.map} +1 -1
- package/dist/{config-D-k0gaAr.d.mts → config-D2OqCmAM.d.mts} +4 -4
- package/dist/{config-xIWIaDhW.d.cts.map → config-D2OqCmAM.d.mts.map} +1 -1
- package/dist/config.cjs +1 -1
- package/dist/config.d.cts +3 -3
- package/dist/config.d.mts +3 -3
- package/dist/config.mjs +1 -1
- package/dist/deploy/public.cjs +9 -8
- package/dist/deploy/public.cjs.map +1 -1
- package/dist/deploy/public.d.cts +5 -16
- package/dist/deploy/public.d.cts.map +1 -1
- package/dist/deploy/public.d.mts +5 -16
- package/dist/deploy/public.d.mts.map +1 -1
- package/dist/deploy/public.mjs +8 -7
- package/dist/deploy/public.mjs.map +1 -1
- package/dist/{deploy-Cu_HyWoJ.cjs → deploy-CbJMJsgX.cjs} +26 -62
- package/dist/deploy-CbJMJsgX.cjs.map +1 -0
- package/dist/{deploy-LY-20Yeb.mjs → deploy-n_IB8r6H.mjs} +17 -59
- package/dist/deploy-n_IB8r6H.mjs.map +1 -0
- package/dist/{discover-CbJCQq4J.d.mts → discover-Caf6Hnv1.d.cts} +2 -2
- package/dist/{discover-CbJCQq4J.d.mts.map → discover-Caf6Hnv1.d.cts.map} +1 -1
- package/dist/{discover-RCW5mBXb.d.cts → discover-Cd5M2jPv.d.mts} +2 -2
- package/dist/{discover-RCW5mBXb.d.cts.map → discover-Cd5M2jPv.d.mts.map} +1 -1
- package/dist/{dns-BbTOzmVp.mjs → dns-C_LPS3qV.mjs} +3 -3
- package/dist/{dns-BbTOzmVp.mjs.map → dns-C_LPS3qV.mjs.map} +1 -1
- package/dist/{dns-BFnoawgh.cjs → dns-kp8To8Qj.cjs} +3 -3
- package/dist/{dns-BFnoawgh.cjs.map → dns-kp8To8Qj.cjs.map} +1 -1
- package/dist/{dokploy-LR94sBVI.mjs → dokploy-Dl_kNVeE.mjs} +2 -2
- package/dist/{dokploy-LR94sBVI.mjs.map → dokploy-Dl_kNVeE.mjs.map} +1 -1
- package/dist/{dokploy-CKgSww82.cjs → dokploy-gRIae9Ht.cjs} +2 -2
- package/dist/{dokploy-CKgSww82.cjs.map → dokploy-gRIae9Ht.cjs.map} +1 -1
- package/dist/{encryption-C0plOf4a.mjs → encryption-C3DcVZQs.mjs} +3 -3
- package/dist/{encryption-C0plOf4a.mjs.map → encryption-C3DcVZQs.mjs.map} +1 -1
- package/dist/{encryption-CUyw-8sc.cjs → encryption-CmQvQOSe.cjs} +3 -3
- package/dist/{encryption-CUyw-8sc.cjs.map → encryption-CmQvQOSe.cjs.map} +1 -1
- package/dist/{engine-DqbqQhck.mjs → engine-DBXuhHyf.mjs} +5 -4
- package/dist/{engine-DqbqQhck.mjs.map → engine-DBXuhHyf.mjs.map} +1 -1
- package/dist/{engine-D8TeraDK.cjs → engine-Dk19Mxc4.cjs} +27 -26
- package/dist/{engine-D8TeraDK.cjs.map → engine-Dk19Mxc4.cjs.map} +1 -1
- package/dist/{github-DC4SIqV1.cjs → github-Ds2RYnSU.cjs} +43 -20
- package/dist/github-Ds2RYnSU.cjs.map +1 -0
- package/dist/{github-zgaBOQvh.mjs → github-RawRLERq.mjs} +42 -19
- package/dist/github-RawRLERq.mjs.map +1 -0
- package/dist/identity-CBXr4wNi.mjs +129 -0
- package/dist/identity-CBXr4wNi.mjs.map +1 -0
- package/dist/identity-CbLfgQNT.cjs +182 -0
- package/dist/identity-CbLfgQNT.cjs.map +1 -0
- package/dist/{index-ClqOsbBl.d.mts → index-BU4G20G6.d.cts} +2 -2
- package/dist/{index-ClqOsbBl.d.mts.map → index-BU4G20G6.d.cts.map} +1 -1
- package/dist/{index-DgOBAEl5.d.cts → index-yDbd1WcM.d.mts} +2 -2
- package/dist/{index-DgOBAEl5.d.cts.map → index-yDbd1WcM.d.mts.map} +1 -1
- package/dist/index.cjs +156 -151
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +153 -148
- package/dist/index.mjs.map +1 -1
- package/dist/{migrate-BJ8aLOWk.mjs → migrate-CZIGT3kB.mjs} +3 -3
- package/dist/{migrate-BJ8aLOWk.mjs.map → migrate-CZIGT3kB.mjs.map} +1 -1
- package/dist/migrate-CxZYzF_u.cjs +181 -0
- package/dist/migrate-CxZYzF_u.cjs.map +1 -0
- package/dist/migrate-DR1x96I4.mjs +181 -0
- package/dist/migrate-DR1x96I4.mjs.map +1 -0
- package/dist/{migrate-CWq8-s21.cjs → migrate-DjrTwWJA.cjs} +3 -3
- package/dist/{migrate-CWq8-s21.cjs.map → migrate-DjrTwWJA.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/{projectBucket-BFp-SFee.mjs → projectBucket-BYOxRnHY.mjs} +2 -2
- package/dist/{projectBucket-BFp-SFee.mjs.map → projectBucket-BYOxRnHY.mjs.map} +1 -1
- package/dist/{projectBucket-Cho9DpSh.cjs → projectBucket-CDu5rXjp.cjs} +2 -2
- package/dist/{projectBucket-Cho9DpSh.cjs.map → projectBucket-CDu5rXjp.cjs.map} +1 -1
- package/dist/reconcile/public.d.cts +2 -2
- package/dist/reconcile/public.d.mts +2 -2
- package/dist/{resolve-6EYNqYdr.mjs → resolve-CNYbGH8g.mjs} +3 -3
- package/dist/{resolve-6EYNqYdr.mjs.map → resolve-CNYbGH8g.mjs.map} +1 -1
- package/dist/{resolve-C8VkR4oW.cjs → resolve-DC98Rl1t.cjs} +3 -3
- package/dist/{resolve-C8VkR4oW.cjs.map → resolve-DC98Rl1t.cjs.map} +1 -1
- package/dist/{rollback-BsThTeSN.mjs → rollback-BkIkE8Qe.mjs} +5 -5
- package/dist/{rollback-BsThTeSN.mjs.map → rollback-BkIkE8Qe.mjs.map} +1 -1
- package/dist/{rollback-CvGfm4DX.cjs → rollback-DBfLvC8k.cjs} +5 -5
- package/dist/{rollback-CvGfm4DX.cjs.map → rollback-DBfLvC8k.cjs.map} +1 -1
- package/dist/{runtime-CaW4QqF2.d.cts → runtime-CLz3bf07.d.mts} +2 -2
- package/dist/{runtime-CaW4QqF2.d.cts.map → runtime-CLz3bf07.d.mts.map} +1 -1
- package/dist/{runtime-K5uxp6HE.d.mts → runtime-CUWf0IUk.d.cts} +2 -2
- package/dist/{runtime-K5uxp6HE.d.mts.map → runtime-CUWf0IUk.d.cts.map} +1 -1
- package/dist/s3-BwhQk3QM.mjs +215 -0
- package/dist/s3-BwhQk3QM.mjs.map +1 -0
- package/dist/s3-DLp0V-Ox.cjs +215 -0
- package/dist/s3-DLp0V-Ox.cjs.map +1 -0
- package/dist/{sandbox-D8cfZUAA.d.cts → sandbox-CfpLWTPP.d.mts} +2 -2
- package/dist/{sandbox-B_BkfmTP.d.mts.map → sandbox-CfpLWTPP.d.mts.map} +1 -1
- package/dist/{sandbox-B_BkfmTP.d.mts → sandbox-D1XeNEJ9.d.cts} +2 -2
- package/dist/{sandbox-D8cfZUAA.d.cts.map → sandbox-D1XeNEJ9.d.cts.map} +1 -1
- package/dist/{secretsManager-C6wm-9uZ.mjs → secretsManager-CQORubp9.mjs} +2 -2
- package/dist/{secretsManager-C6wm-9uZ.mjs.map → secretsManager-CQORubp9.mjs.map} +1 -1
- package/dist/{secretsManager-Cwwgs81g.cjs → secretsManager-RAGcEDX1.cjs} +2 -2
- package/dist/{secretsManager-Cwwgs81g.cjs.map → secretsManager-RAGcEDX1.cjs.map} +1 -1
- package/dist/{seeds-BQlj9Fsg.cjs → seeds-BNHSpjNP.cjs} +22 -166
- package/dist/seeds-BNHSpjNP.cjs.map +1 -0
- package/dist/{seeds-BsJRUL1K.mjs → seeds-C4bZ8L-T.mjs} +23 -119
- package/dist/seeds-C4bZ8L-T.mjs.map +1 -0
- package/dist/{sniffer-DVsvP8s-.mjs → sniffer-BIBm9dAb.mjs} +7 -7
- package/dist/{sniffer-DVsvP8s-.mjs.map → sniffer-BIBm9dAb.mjs.map} +1 -1
- package/dist/{sniffer-CeUKUoHn.cjs → sniffer-Cylp9W2D.cjs} +7 -7
- package/dist/{sniffer-CeUKUoHn.cjs.map → sniffer-Cylp9W2D.cjs.map} +1 -1
- package/dist/{stages-DEmn7qI8.mjs → stages-CcS9vnNu.mjs} +5 -18
- package/dist/stages-CcS9vnNu.mjs.map +1 -0
- package/dist/{stages-BpDXFPGg.cjs → stages-DdBV7msu.cjs} +5 -18
- package/dist/stages-DdBV7msu.cjs.map +1 -0
- package/dist/target/public.cjs +1 -1
- package/dist/target/public.d.cts +2 -2
- package/dist/target/public.d.mts +2 -2
- package/dist/target/public.mjs +1 -1
- package/dist/{types-4vPS_YFX.d.cts → types-BhThob0H.d.mts} +90 -21
- package/dist/types-BhThob0H.d.mts.map +1 -0
- package/dist/{types-CFsEyFb1.d.mts → types-DwoLHelT.d.cts} +91 -20
- package/dist/types-DwoLHelT.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-Bv4xROeu.mjs → workspace-D5CpOp1y.mjs} +77 -5
- package/dist/workspace-D5CpOp1y.mjs.map +1 -0
- package/dist/{workspace-C1M-S4al.cjs → workspace-DRjdu1OY.cjs} +88 -4
- package/dist/workspace-DRjdu1OY.cjs.map +1 -0
- package/package.json +15 -15
- package/dist/S3StateStore-CMN0Uzdp.mjs.map +0 -1
- package/dist/S3StateStore-zK9zcd9f.cjs.map +0 -1
- package/dist/awsStore-B5We7bMg.cjs.map +0 -1
- package/dist/awsStore-BWa1KNY-.mjs.map +0 -1
- package/dist/cli-1l0L9LCA.cjs.map +0 -1
- package/dist/cli-D7z1lQtO.mjs.map +0 -1
- package/dist/compose-C39XupJu.cjs +0 -1558
- package/dist/compose-C39XupJu.cjs.map +0 -1
- package/dist/compose-DgWrNd2k.mjs +0 -1511
- package/dist/compose-DgWrNd2k.mjs.map +0 -1
- package/dist/deploy-Cu_HyWoJ.cjs.map +0 -1
- package/dist/deploy-LY-20Yeb.mjs.map +0 -1
- package/dist/dns-Bmbhmz41.mjs +0 -44
- package/dist/dns-Bmbhmz41.mjs.map +0 -1
- package/dist/dns-Dro_vbk9.cjs +0 -55
- package/dist/dns-Dro_vbk9.cjs.map +0 -1
- package/dist/github-DC4SIqV1.cjs.map +0 -1
- package/dist/github-zgaBOQvh.mjs.map +0 -1
- package/dist/migrate-C230QeXU.mjs +0 -94
- package/dist/migrate-C230QeXU.mjs.map +0 -1
- package/dist/migrate-CsMrI7Dk.cjs +0 -94
- package/dist/migrate-CsMrI7Dk.cjs.map +0 -1
- package/dist/secrets-BTY6JhTp.cjs +0 -47
- package/dist/secrets-BTY6JhTp.cjs.map +0 -1
- package/dist/secrets-HzKNTWg9.mjs +0 -36
- package/dist/secrets-HzKNTWg9.mjs.map +0 -1
- package/dist/seeds-BQlj9Fsg.cjs.map +0 -1
- package/dist/seeds-BsJRUL1K.mjs.map +0 -1
- package/dist/stack-BQOyqaVG.mjs +0 -1201
- package/dist/stack-BQOyqaVG.mjs.map +0 -1
- package/dist/stack-Clzi40EE.cjs +0 -1308
- package/dist/stack-Clzi40EE.cjs.map +0 -1
- package/dist/stages-BpDXFPGg.cjs.map +0 -1
- package/dist/stages-DEmn7qI8.mjs.map +0 -1
- package/dist/types-4vPS_YFX.d.cts.map +0 -1
- package/dist/types-CFsEyFb1.d.mts.map +0 -1
- package/dist/workspace-Bv4xROeu.mjs.map +0 -1
- package/dist/workspace-C1M-S4al.cjs.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -6,9 +6,10 @@ const require_run = require("./run-fVZ-rLnc.cjs");
|
|
|
6
6
|
const require_credentials = require("./credentials-Zqr3QQYB.cjs");
|
|
7
7
|
const require_discover = require("./discover-DPgu-ScS.cjs");
|
|
8
8
|
const require_derive = require("./derive-DAbo49sm.cjs");
|
|
9
|
-
const require_workspace = require("./workspace-
|
|
9
|
+
const require_workspace = require("./workspace-DRjdu1OY.cjs");
|
|
10
10
|
const require_config = require("./config.cjs");
|
|
11
|
-
const require_seeds = require("./seeds-
|
|
11
|
+
const require_seeds = require("./seeds-BNHSpjNP.cjs");
|
|
12
|
+
const require_identity = require("./identity-CbLfgQNT.cjs");
|
|
12
13
|
const require_EndpointGenerator = require("./EndpointGenerator-De03t1hd.cjs");
|
|
13
14
|
const require_openapi = require("./openapi.cjs");
|
|
14
15
|
const require_SubscriberGenerator = require("./SubscriberGenerator-Dvz7EzqK.cjs");
|
|
@@ -16,12 +17,11 @@ const require_appPorts = require("./appPorts-Cu79hJF6.cjs");
|
|
|
16
17
|
const require_drivers = require("./drivers-DDojgzz0.cjs");
|
|
17
18
|
const require_emit = require("./emit-Dmc1nvdS.cjs");
|
|
18
19
|
const require_local = require("./local-DNhnkugT.cjs");
|
|
19
|
-
const require_sniffer = require("./sniffer-
|
|
20
|
-
const require_deploy = require("./deploy-
|
|
20
|
+
const require_sniffer = require("./sniffer-Cylp9W2D.cjs");
|
|
21
|
+
const require_deploy = require("./deploy-CbJMJsgX.cjs");
|
|
21
22
|
const require_credentialSchemas = require("./credentialSchemas-CAPKFkrG.cjs");
|
|
22
|
-
const require_compose = require("./compose-
|
|
23
|
-
const
|
|
24
|
-
const require_LocalStateStore = require("./LocalStateStore-B_bRI8M7.cjs");
|
|
23
|
+
const require_compose = require("./compose-CIrFNWHb.cjs");
|
|
24
|
+
const require_LocalStateStore = require("./LocalStateStore-BD14kra9.cjs");
|
|
25
25
|
const require_utils = require("./utils-D2Nk1Nv2.cjs");
|
|
26
26
|
const require_ready = require("./ready-D3PIjx3S.cjs");
|
|
27
27
|
let node_path = require("node:path");
|
|
@@ -56,7 +56,7 @@ crypto = require_rolldown_runtime.__toESM(crypto, 1);
|
|
|
56
56
|
let _geekmidas_constructs_functions = require("@geekmidas/constructs/functions");
|
|
57
57
|
let _geekmidas_constructs_topic = require("@geekmidas/constructs/topic");
|
|
58
58
|
//#region package.json
|
|
59
|
-
var version = "10.0.0-alpha.
|
|
59
|
+
var version = "10.0.0-alpha.99";
|
|
60
60
|
//#endregion
|
|
61
61
|
//#region src/prompt.ts
|
|
62
62
|
/**
|
|
@@ -139,7 +139,7 @@ const logger$8 = console;
|
|
|
139
139
|
* Validate Dokploy token by making a test API call
|
|
140
140
|
*/
|
|
141
141
|
async function validateDokployToken(endpoint, token) {
|
|
142
|
-
const { DokployApi } = await Promise.resolve().then(() => require("./sniffer-
|
|
142
|
+
const { DokployApi } = await Promise.resolve().then(() => require("./sniffer-Cylp9W2D.cjs")).then((n) => n.dokploy_api_exports);
|
|
143
143
|
return new DokployApi({
|
|
144
144
|
baseUrl: endpoint,
|
|
145
145
|
token
|
|
@@ -2333,9 +2333,9 @@ async function workspaceDevCommand(configured, options) {
|
|
|
2333
2333
|
for (const { id, port } of fakes) logger$5.log(`🎭 ${id} fake: http://localhost:${port}`);
|
|
2334
2334
|
logger$5.log(options.migrate || options.seed ? "🗄️ Migrating the databases" : "🗄️ Checking for pending migrations");
|
|
2335
2335
|
if (options.migrate || options.seed) {
|
|
2336
|
-
const { prepareDevDatabases } = await Promise.resolve().then(() => require("./migrate-
|
|
2336
|
+
const { prepareDevDatabases } = await Promise.resolve().then(() => require("./migrate-DjrTwWJA.cjs"));
|
|
2337
2337
|
await prepareDevDatabases(workspace, reconciled.env, { seed: !!options.seed });
|
|
2338
|
-
} else await Promise.resolve().then(() => require("./migrate-
|
|
2338
|
+
} else await Promise.resolve().then(() => require("./migrate-DjrTwWJA.cjs")).then(({ reportPendingMigrations }) => reportPendingMigrations(workspace, reconciled.env)).catch((error) => {
|
|
2339
2339
|
logger$5.log(`⚠️ Could not check for pending migrations: ${error instanceof Error ? error.message : String(error)}`);
|
|
2340
2340
|
});
|
|
2341
2341
|
const appUrls = {};
|
|
@@ -3388,7 +3388,7 @@ async function buildApp(input) {
|
|
|
3388
3388
|
...production,
|
|
3389
3389
|
...telemetry ? { telemetry } : {}
|
|
3390
3390
|
});
|
|
3391
|
-
const { bundleServer } = await Promise.resolve().then(() => require("./bundler-
|
|
3391
|
+
const { bundleServer } = await Promise.resolve().then(() => require("./bundler-Bgoq8IyR.cjs"));
|
|
3392
3392
|
await bundleServer({
|
|
3393
3393
|
entryPoint,
|
|
3394
3394
|
outputDir: (0, node_path.join)(outputDir, "dist"),
|
|
@@ -3533,7 +3533,7 @@ async function buildWorkers(input) {
|
|
|
3533
3533
|
});
|
|
3534
3534
|
logger$4.log(`Generated worker ${worker.id}: ${crons.length} crons, ${queues.length} queues, ${subscribers.length} subscribers`);
|
|
3535
3535
|
if (!input.bundle) continue;
|
|
3536
|
-
const { bundleServer } = await Promise.resolve().then(() => require("./bundler-
|
|
3536
|
+
const { bundleServer } = await Promise.resolve().then(() => require("./bundler-Bgoq8IyR.cjs"));
|
|
3537
3537
|
const outfile = require_seeds.workerBundleName(worker.id);
|
|
3538
3538
|
await bundleServer({
|
|
3539
3539
|
entryPoint,
|
|
@@ -3619,7 +3619,7 @@ async function buildForTarget(target, context, appRoot, workspaceRoot, endpointG
|
|
|
3619
3619
|
let masterKey;
|
|
3620
3620
|
if (context.production?.bundle && !skipBundle) {
|
|
3621
3621
|
logger$4.log(`\n📦 Bundling production server...`);
|
|
3622
|
-
const { bundleServer } = await Promise.resolve().then(() => require("./bundler-
|
|
3622
|
+
const { bundleServer } = await Promise.resolve().then(() => require("./bundler-Bgoq8IyR.cjs"));
|
|
3623
3623
|
const allConstructs = [
|
|
3624
3624
|
...endpoints.map((e) => e.construct),
|
|
3625
3625
|
...functions.map((f) => f.construct),
|
|
@@ -3865,7 +3865,7 @@ var ComposeModeConflict = class extends require_errors.GkmError {
|
|
|
3865
3865
|
};
|
|
3866
3866
|
/** Each pushed image as `<ref>@sha256:…`, by app. */
|
|
3867
3867
|
function pushedDigests(run) {
|
|
3868
|
-
return Object.fromEntries(Object.entries(run.images).filter(([, image]) => image.digest).sort(([a], [b]) => a.localeCompare(b)).map(([app, image]) => [app,
|
|
3868
|
+
return Object.fromEntries(Object.entries(run.images).filter(([, image]) => image.digest).sort(([a], [b]) => a.localeCompare(b)).map(([app, image]) => [app, require_compose.pinnedRef(image.ref, image.digest)]));
|
|
3869
3869
|
}
|
|
3870
3870
|
/** `gkm compose`. */
|
|
3871
3871
|
async function composeCommand(options, deps = {}) {
|
|
@@ -3877,15 +3877,26 @@ async function composeCommand(options, deps = {}) {
|
|
|
3877
3877
|
const { workspace } = await require_config.loadWorkspaceConfig(cwd);
|
|
3878
3878
|
const { stage } = options;
|
|
3879
3879
|
if (options.down) {
|
|
3880
|
+
const local = stage === workspace.stages.local;
|
|
3881
|
+
const server = local ? void 0 : require_compose.composeServer({
|
|
3882
|
+
stage,
|
|
3883
|
+
local,
|
|
3884
|
+
config: workspace.deploy?.compose?.server,
|
|
3885
|
+
custom: (await (await require_seeds.secretsStoreFor(workspace, stage)).read(stage))?.custom
|
|
3886
|
+
});
|
|
3880
3887
|
const override = require_compose.stackOverrideFile(workspace.root, stage);
|
|
3888
|
+
const dir = (0, node_path.join)(workspace.root, require_compose.stackDir(stage));
|
|
3881
3889
|
const ref = {
|
|
3882
|
-
project:
|
|
3883
|
-
file: (0, node_path.join)(
|
|
3890
|
+
project: require_compose.composeProject(require_identity.deployIdentity(workspace, stage)),
|
|
3891
|
+
file: (0, node_path.join)(dir, "docker-compose.yml"),
|
|
3884
3892
|
...(0, node_fs.existsSync)(override) ? { overrides: [override] } : {},
|
|
3885
|
-
cwd: workspace.root
|
|
3893
|
+
cwd: workspace.root,
|
|
3894
|
+
...server ? { host: require_compose.dockerHost(server) } : {}
|
|
3886
3895
|
};
|
|
3887
|
-
|
|
3888
|
-
|
|
3896
|
+
const docker = deps.docker ?? require_compose.dockerCompose;
|
|
3897
|
+
if (server) console.log(`→ ${require_compose.sshTarget(server)} (docker over ssh)`);
|
|
3898
|
+
if (server && await require_compose.removeEdgeRoutes(docker, require_compose.edgeRef((0, node_path.join)(dir, `gkm-edge.yml`), { host: ref.host }), ref.project)) console.log(`🌐 Removed ${ref.project}'s routes from ${require_compose.EDGE_PROJECT}.`);
|
|
3899
|
+
await docker.down(ref);
|
|
3889
3900
|
console.log(`🛑 Stopped ${ref.project}. Its volumes are kept.`);
|
|
3890
3901
|
return;
|
|
3891
3902
|
}
|
|
@@ -3894,7 +3905,7 @@ async function composeCommand(options, deps = {}) {
|
|
|
3894
3905
|
const tag = options.tag ?? (options.pull ? "latest" : void 0);
|
|
3895
3906
|
const pin = options.digestsFile && pulls ? {
|
|
3896
3907
|
file: options.digestsFile,
|
|
3897
|
-
digests:
|
|
3908
|
+
digests: require_compose.parseDigests(options.digestsFile, await (0, node_fs_promises.readFile)((0, node_path.resolve)(cwd, options.digestsFile), "utf-8"))
|
|
3898
3909
|
} : void 0;
|
|
3899
3910
|
const result = await require_deploy.deploy({
|
|
3900
3911
|
cwd,
|
|
@@ -3914,8 +3925,6 @@ async function composeCommand(options, deps = {}) {
|
|
|
3914
3925
|
...options.push ? { buildOnly: true } : {},
|
|
3915
3926
|
...options.allowDevServices ? { allowDevServices: true } : {},
|
|
3916
3927
|
...options.skipDns ? { skipDns: true } : {},
|
|
3917
|
-
...options.resourcesOnly ? { resourcesOnly: true } : {},
|
|
3918
|
-
...options.skipResources ? { skipResources: true } : {},
|
|
3919
3928
|
...options.rotateKeys ? { rotateKeys: true } : {},
|
|
3920
3929
|
...options.retireOldKeys ? { retireOldKeys: true } : {},
|
|
3921
3930
|
logger: {
|
|
@@ -5438,25 +5447,25 @@ function loadPackageJson() {
|
|
|
5438
5447
|
* Run: pnpm --filter @geekmidas/cli sync-versions
|
|
5439
5448
|
*/
|
|
5440
5449
|
const GEEKMIDAS_VERSIONS = {
|
|
5441
|
-
"@geekmidas/audit": "~10.0.0-alpha.
|
|
5442
|
-
"@geekmidas/auth": "~10.0.0-alpha.
|
|
5443
|
-
"@geekmidas/cache": "~10.0.0-alpha.
|
|
5444
|
-
"@geekmidas/client": "~10.0.0-alpha.
|
|
5445
|
-
"@geekmidas/cloud": "~10.0.0-alpha.
|
|
5446
|
-
"@geekmidas/constructs": "~10.0.0-alpha.
|
|
5447
|
-
"@geekmidas/db": "~10.0.0-alpha.
|
|
5448
|
-
"@geekmidas/emailkit": "~10.0.0-alpha.
|
|
5449
|
-
"@geekmidas/envkit": "~10.0.0-alpha.
|
|
5450
|
-
"@geekmidas/errors": "~10.0.0-alpha.
|
|
5451
|
-
"@geekmidas/events": "~10.0.0-alpha.
|
|
5452
|
-
"@geekmidas/logger": "~10.0.0-alpha.
|
|
5453
|
-
"@geekmidas/manifest": "~10.0.0-alpha.
|
|
5454
|
-
"@geekmidas/rate-limit": "~10.0.0-alpha.
|
|
5455
|
-
"@geekmidas/schema": "~10.0.0-alpha.
|
|
5456
|
-
"@geekmidas/services": "~10.0.0-alpha.
|
|
5457
|
-
"@geekmidas/storage": "~10.0.0-alpha.
|
|
5458
|
-
"@geekmidas/telescope": "~10.0.0-alpha.
|
|
5459
|
-
"@geekmidas/testkit": "~10.0.0-alpha.
|
|
5450
|
+
"@geekmidas/audit": "~10.0.0-alpha.99",
|
|
5451
|
+
"@geekmidas/auth": "~10.0.0-alpha.99",
|
|
5452
|
+
"@geekmidas/cache": "~10.0.0-alpha.99",
|
|
5453
|
+
"@geekmidas/client": "~10.0.0-alpha.99",
|
|
5454
|
+
"@geekmidas/cloud": "~10.0.0-alpha.99",
|
|
5455
|
+
"@geekmidas/constructs": "~10.0.0-alpha.99",
|
|
5456
|
+
"@geekmidas/db": "~10.0.0-alpha.99",
|
|
5457
|
+
"@geekmidas/emailkit": "~10.0.0-alpha.99",
|
|
5458
|
+
"@geekmidas/envkit": "~10.0.0-alpha.99",
|
|
5459
|
+
"@geekmidas/errors": "~10.0.0-alpha.99",
|
|
5460
|
+
"@geekmidas/events": "~10.0.0-alpha.99",
|
|
5461
|
+
"@geekmidas/logger": "~10.0.0-alpha.99",
|
|
5462
|
+
"@geekmidas/manifest": "~10.0.0-alpha.99",
|
|
5463
|
+
"@geekmidas/rate-limit": "~10.0.0-alpha.99",
|
|
5464
|
+
"@geekmidas/schema": "~10.0.0-alpha.99",
|
|
5465
|
+
"@geekmidas/services": "~10.0.0-alpha.99",
|
|
5466
|
+
"@geekmidas/storage": "~10.0.0-alpha.99",
|
|
5467
|
+
"@geekmidas/telescope": "~10.0.0-alpha.99",
|
|
5468
|
+
"@geekmidas/testkit": "~10.0.0-alpha.99",
|
|
5460
5469
|
"@geekmidas/cli": `~${loadPackageJson().version}`
|
|
5461
5470
|
};
|
|
5462
5471
|
//#endregion
|
|
@@ -5857,7 +5866,7 @@ const COMMIT = /^[0-9a-f]{40}$/;
|
|
|
5857
5866
|
* The `uses:` value for the stages action, with a comment saying which CLI
|
|
5858
5867
|
* release the pinned commit is.
|
|
5859
5868
|
*/
|
|
5860
|
-
function stagesActionUses(commit = "
|
|
5869
|
+
function stagesActionUses(commit = "c9e539e1dbb06bad206fc9c356648b8927fd6181", version = cliVersion()) {
|
|
5861
5870
|
return commit && COMMIT.test(commit) ? `${STAGES_ACTION}@${commit} # @geekmidas/cli ${version}` : `${STAGES_ACTION}@main # pin to a commit SHA: see the action's README`;
|
|
5862
5871
|
}
|
|
5863
5872
|
//#endregion
|
|
@@ -6109,7 +6118,6 @@ function stagesJob(options) {
|
|
|
6109
6118
|
has-build: \${{ steps.stages.outputs.has-build }}
|
|
6110
6119
|
has-deploy: \${{ steps.stages.outputs.has-deploy }}
|
|
6111
6120
|
aws-region: \${{ steps.stages.outputs.aws-region }}
|
|
6112
|
-
resources: \${{ steps.stages.outputs.resources }}
|
|
6113
6121
|
steps:
|
|
6114
6122
|
- uses: actions/checkout@v4
|
|
6115
6123
|
|
|
@@ -6127,10 +6135,6 @@ ${pm.setup}
|
|
|
6127
6135
|
stage: \${{ inputs.stage }}
|
|
6128
6136
|
`;
|
|
6129
6137
|
}
|
|
6130
|
-
/** Every step in `steps` run only when `condition` holds. */
|
|
6131
|
-
function onlyIf(steps, condition) {
|
|
6132
|
-
return steps.replace(/^ {6}- /gm, ` - if: ${condition}\n `);
|
|
6133
|
-
}
|
|
6134
6138
|
/**
|
|
6135
6139
|
* The registry login a compose build pushes with: GitHub's own token on
|
|
6136
6140
|
* ghcr.io, otherwise a username variable and a password secret.
|
|
@@ -6147,19 +6151,17 @@ function registryLogin(registry) {
|
|
|
6147
6151
|
}
|
|
6148
6152
|
/**
|
|
6149
6153
|
* The compose deploy: images are built and pushed by the runner, where the
|
|
6150
|
-
* code is, and
|
|
6154
|
+
* code is, and run by the stage's server — whose Docker engine the runner
|
|
6155
|
+
* drives over SSH.
|
|
6151
6156
|
*
|
|
6152
6157
|
* - `build` (on a push): every deployed stage's images, tagged with the
|
|
6153
6158
|
* commit, and their digests kept as the artifact `digests-<stage>`.
|
|
6154
6159
|
* - `deploy`: the commit the event names — a release's tag, a manual run's
|
|
6155
|
-
* `ref` — then that commit's push build, whose digests pin each image.
|
|
6156
|
-
*
|
|
6157
|
-
*
|
|
6158
|
-
*
|
|
6159
|
-
*
|
|
6160
|
-
* first (`gkm deploy --resources-only`) with the stage's role and the DNS
|
|
6161
|
-
* token from its environment, and the server deploys with
|
|
6162
|
-
* `--skip-resources`: neither credential reaches the server.
|
|
6160
|
+
* `ref` — then that commit's push build, whose digests pin each image. One
|
|
6161
|
+
* `gkm compose` on the runner, with the stage's role and DNS token, creates
|
|
6162
|
+
* the stage's resources and DNS records and runs exactly those images on the
|
|
6163
|
+
* server's engine (`DOCKER_HOST=ssh://…`, from `deploy.compose.server`).
|
|
6164
|
+
* The server holds Docker and the deploy user's key, and no credential.
|
|
6163
6165
|
*/
|
|
6164
6166
|
function composeDeploy(options) {
|
|
6165
6167
|
const pm = tooling(options);
|
|
@@ -6191,7 +6193,7 @@ ${pm.setup}
|
|
|
6191
6193
|
|
|
6192
6194
|
${registryLogin(registry)}
|
|
6193
6195
|
# A site's public URLs are built into it, so the build reads the stage's
|
|
6194
|
-
# secrets store. With secrets.store on SSM or Secrets Manager the job
|
|
6196
|
+
# secrets store. With secrets.store on S3, SSM or Secrets Manager the job
|
|
6195
6197
|
# assumes the stage's role (AWS_ROLE_ARN, set by gkm deploy:github);
|
|
6196
6198
|
# with the default 'file' store there is no role to assume.
|
|
6197
6199
|
- name: Assume the stage's AWS role
|
|
@@ -6235,13 +6237,8 @@ ${registryLogin(registry)}
|
|
|
6235
6237
|
permissions:
|
|
6236
6238
|
contents: read
|
|
6237
6239
|
actions: read
|
|
6240
|
+
packages: read
|
|
6238
6241
|
id-token: write
|
|
6239
|
-
env:
|
|
6240
|
-
# Whether the stage has resources the deploy creates — a provider's
|
|
6241
|
-
# bucket and key (deploy.<kind>.<stage>), DNS records through a provider
|
|
6242
|
-
# in dns: the runner creates them with the stage's role and DNS token,
|
|
6243
|
-
# so neither reaches the server, which deploys with --skip-resources.
|
|
6244
|
-
RESOURCES_ON_RUNNER: \${{ contains(fromJSON(needs.stages.outputs.resources || '[]'), matrix.stage) }}
|
|
6245
6242
|
steps:
|
|
6246
6243
|
# A release deploys its tag's commit, never its target_commitish — the
|
|
6247
6244
|
# branch it was drafted against, which has moved on since.
|
|
@@ -6264,40 +6261,30 @@ ${registryLogin(registry)}
|
|
|
6264
6261
|
REF: \${{ inputs.ref }}
|
|
6265
6262
|
SHA: \${{ github.sha }}
|
|
6266
6263
|
|
|
6267
|
-
# The deploy's resources, here on the runner: each provider's bucket
|
|
6268
|
-
# and key (written into the stage's secrets store), and every public
|
|
6269
|
-
# host's DNS record — a new app's included, one per host, never a
|
|
6270
|
-
# wildcard — written through the provider where it is missing or out of
|
|
6271
|
-
# date and read back from it. The stage's secrets (GKM_SERVER_IPV4
|
|
6272
|
-
# among them) are read with the stage's role; the DNS token is a secret
|
|
6273
|
-
# on this stage's environment. A missing credential fails here, before
|
|
6274
|
-
# anything is deployed.
|
|
6275
6264
|
- name: Check out the commit
|
|
6276
|
-
if: env.RESOURCES_ON_RUNNER == 'true'
|
|
6277
6265
|
uses: actions/checkout@v4
|
|
6278
6266
|
with:
|
|
6279
6267
|
ref: \${{ steps.commit.outputs.sha }}
|
|
6280
6268
|
|
|
6281
|
-
${
|
|
6269
|
+
${pm.setup}
|
|
6282
6270
|
- name: Install
|
|
6283
|
-
if: env.RESOURCES_ON_RUNNER == 'true'
|
|
6284
6271
|
run: ${pm.install}
|
|
6285
6272
|
|
|
6273
|
+
# The server's engine pulls with the login docker sends from here: it
|
|
6274
|
+
# holds none of its own.
|
|
6275
|
+
${registryLogin(registry)}
|
|
6276
|
+
# The stage's secrets and deploy state are read and written here, with
|
|
6277
|
+
# the stage's role (AWS_ROLE_ARN, set by gkm deploy:github). With the
|
|
6278
|
+
# default 'file' secrets store there is no role, and no secrets file in
|
|
6279
|
+
# a checkout: set secrets.store in gkm.config.ts to a store on AWS to
|
|
6280
|
+
# deploy from CI.
|
|
6286
6281
|
- name: Assume the stage's AWS role
|
|
6287
|
-
if:
|
|
6282
|
+
if: needs.stages.outputs.aws-region != ''
|
|
6288
6283
|
uses: aws-actions/configure-aws-credentials@v4
|
|
6289
6284
|
with:
|
|
6290
6285
|
role-to-assume: \${{ vars.AWS_ROLE_ARN }}
|
|
6291
6286
|
aws-region: \${{ needs.stages.outputs.aws-region }}
|
|
6292
6287
|
|
|
6293
|
-
- name: Create the stage's resources
|
|
6294
|
-
if: env.RESOURCES_ON_RUNNER == 'true'
|
|
6295
|
-
run: ${pm.exec} gkm deploy --stage "$STAGE" --resources-only
|
|
6296
|
-
env:
|
|
6297
|
-
STAGE: \${{ matrix.stage }}
|
|
6298
|
-
GODADDY_API_TOKEN: \${{ secrets.GODADDY_API_TOKEN }}
|
|
6299
|
-
HOSTINGER_API_TOKEN: \${{ secrets.HOSTINGER_API_TOKEN }}
|
|
6300
|
-
|
|
6301
6288
|
# The push run of this workflow that built the commit for this stage:
|
|
6302
6289
|
# this run on a push, the newest one with the stage's digests otherwise.
|
|
6303
6290
|
- name: Find the commit's push build
|
|
@@ -6342,48 +6329,42 @@ ${onlyIf(pm.setup, "env.RESOURCES_ON_RUNNER == 'true'")}
|
|
|
6342
6329
|
STAGE: \${{ matrix.stage }}
|
|
6343
6330
|
SHA: \${{ steps.commit.outputs.sha }}
|
|
6344
6331
|
|
|
6345
|
-
#
|
|
6346
|
-
#
|
|
6347
|
-
#
|
|
6348
|
-
#
|
|
6349
|
-
|
|
6350
|
-
#
|
|
6351
|
-
# Every value reaches the server as an argument to a quoted heredoc —
|
|
6352
|
-
# nothing is pasted into the script.
|
|
6353
|
-
- name: Deploy on the server
|
|
6332
|
+
# The deploy user's key (DEPLOY_SSH_KEY, a secret) and the server's
|
|
6333
|
+
# pinned host key (DEPLOY_KNOWN_HOSTS, a variable) on each environment:
|
|
6334
|
+
# never accepted on first sight. The server — user and host — is
|
|
6335
|
+
# deploy.compose.server in gkm.config.ts and the stage's GKM_SERVER_IPV4.
|
|
6336
|
+
- name: SSH to the server
|
|
6354
6337
|
run: |
|
|
6355
6338
|
mkdir -p ~/.ssh && chmod 700 ~/.ssh
|
|
6356
6339
|
(umask 077 && printf '%s\\n' "$SSH_KEY" > ~/.ssh/deploy_key)
|
|
6357
6340
|
printf '%s\\n' "$KNOWN_HOSTS" > ~/.ssh/known_hosts
|
|
6358
|
-
|
|
6359
|
-
|
|
6360
|
-
|
|
6361
|
-
|
|
6362
|
-
|
|
6363
|
-
|
|
6364
|
-
|
|
6365
|
-
|
|
6366
|
-
|
|
6367
|
-
git checkout --quiet --detach "$sha"
|
|
6368
|
-
${pm.install}
|
|
6369
|
-
args=(--stage "$stage" --tag "$sha")
|
|
6370
|
-
if [ -n "$digests" ]; then
|
|
6371
|
-
mkdir -p .gkm
|
|
6372
|
-
printf '%s' "$digests" | base64 -d > ".gkm/digests-$stage.json"
|
|
6373
|
-
args+=(--digests-file ".gkm/digests-$stage.json")
|
|
6374
|
-
fi
|
|
6375
|
-
# Created and confirmed from the runner already.
|
|
6376
|
-
if [ "$resources_on_runner" = true ]; then args+=(--skip-resources); fi
|
|
6377
|
-
${pm.exec} gkm compose "\${args[@]}"
|
|
6378
|
-
REMOTE
|
|
6341
|
+
cat > ~/.ssh/config <<'CONFIG'
|
|
6342
|
+
Host *
|
|
6343
|
+
IdentityFile ~/.ssh/deploy_key
|
|
6344
|
+
IdentitiesOnly yes
|
|
6345
|
+
StrictHostKeyChecking yes
|
|
6346
|
+
ControlMaster auto
|
|
6347
|
+
ControlPath ~/.ssh/cm-%C
|
|
6348
|
+
ControlPersist 5m
|
|
6349
|
+
CONFIG
|
|
6379
6350
|
env:
|
|
6380
6351
|
SSH_KEY: \${{ secrets.DEPLOY_SSH_KEY }}
|
|
6381
6352
|
KNOWN_HOSTS: \${{ vars.DEPLOY_KNOWN_HOSTS }}
|
|
6382
|
-
|
|
6383
|
-
|
|
6384
|
-
|
|
6353
|
+
|
|
6354
|
+
# Everything, from here: the stage's resources and DNS records, its
|
|
6355
|
+
# databases migrated through an SSH tunnel, and exactly the pushed
|
|
6356
|
+
# images run on the server's Docker. The DNS token is a secret on the
|
|
6357
|
+
# stage's environment, and never leaves the runner.
|
|
6358
|
+
- name: Deploy
|
|
6359
|
+
run: |
|
|
6360
|
+
args=(--stage "$STAGE" --tag "$SHA")
|
|
6361
|
+
if [ -f digests.json ]; then args+=(--digests-file digests.json); fi
|
|
6362
|
+
${pm.exec} gkm compose "\${args[@]}"
|
|
6363
|
+
env:
|
|
6385
6364
|
STAGE: \${{ matrix.stage }}
|
|
6386
6365
|
SHA: \${{ steps.commit.outputs.sha }}
|
|
6366
|
+
GODADDY_API_TOKEN: \${{ secrets.GODADDY_API_TOKEN }}
|
|
6367
|
+
HOSTINGER_API_TOKEN: \${{ secrets.HOSTINGER_API_TOKEN }}
|
|
6387
6368
|
`;
|
|
6388
6369
|
}
|
|
6389
6370
|
/**
|
|
@@ -7811,7 +7792,7 @@ ${deployBlock(options)}
|
|
|
7811
7792
|
${workspaceConstructsGlobs(options.routesStructure, (0, node_path.dirname)(options.apiPath)).map((glob) => ` '${glob}',`).join("\n")}
|
|
7812
7793
|
],
|
|
7813
7794
|
|
|
7814
|
-
secrets: {
|
|
7795
|
+
${stateBlock(options)} secrets: {
|
|
7815
7796
|
enabled: true,${secretsStore(options)}
|
|
7816
7797
|
},
|
|
7817
7798
|
});
|
|
@@ -7822,13 +7803,24 @@ ${workspaceConstructsGlobs(options.routesStructure, (0, node_path.dirname)(optio
|
|
|
7822
7803
|
* `gkm build` builds for, and which backends a cache or a broker resolves to.
|
|
7823
7804
|
*/
|
|
7824
7805
|
function deployBlock(options) {
|
|
7825
|
-
if (options.deployTarget === "compose")
|
|
7826
|
-
|
|
7827
|
-
|
|
7828
|
-
|
|
7806
|
+
if (options.deployTarget === "compose") {
|
|
7807
|
+
const key = (stage) => /^[A-Za-z_$][\w$]*$/.test(stage) ? stage : `'${stage}'`;
|
|
7808
|
+
const servers = options.stages.deployed.map((stage) => `${key(stage)}: { user: 'deploy' }`).join(", ");
|
|
7809
|
+
return `
|
|
7810
|
+
// \`gkm compose --stage <stage>\` runs a stage as one Docker Compose stack:
|
|
7811
|
+
// the local stage on this machine, a deployed stage on its server, whose
|
|
7812
|
+
// Docker it drives over SSH. CI builds every image and pushes it here, and
|
|
7813
|
+
// the server runs exactly those. On ghcr.io the owner is the repository's —
|
|
7829
7814
|
// the user or organisation whose packages the workflow's token can write.
|
|
7830
|
-
deploy: {
|
|
7815
|
+
deploy: {
|
|
7816
|
+
default: 'compose',
|
|
7817
|
+
registry: '${options.registry}',
|
|
7818
|
+
// Each deployed stage's server: the SSH user, in its docker group. The
|
|
7819
|
+
// host is the stage's GKM_SERVER_IPV4 secret unless \`host\` is set.
|
|
7820
|
+
compose: { server: { ${servers} } },
|
|
7821
|
+
},
|
|
7831
7822
|
`;
|
|
7823
|
+
}
|
|
7832
7824
|
if (options.deployTarget !== "sst") return "";
|
|
7833
7825
|
return `
|
|
7834
7826
|
// \`gkm deploy\` runs \`sst deploy\` on the manifest \`gkm build\` writes to
|
|
@@ -7837,17 +7829,32 @@ function deployBlock(options) {
|
|
|
7837
7829
|
`;
|
|
7838
7830
|
}
|
|
7839
7831
|
/**
|
|
7840
|
-
* Where a deployed stage's
|
|
7841
|
-
*
|
|
7842
|
-
*
|
|
7832
|
+
* Where a deployed stage's deploy state lives: on AWS, the project bucket —
|
|
7833
|
+
* one bucket per project and account, created by the first deploy — which
|
|
7834
|
+
* the stage's secrets share.
|
|
7835
|
+
*/
|
|
7836
|
+
function stateBlock(options) {
|
|
7837
|
+
if (options.deployTarget !== "sst" || !options.region) return "";
|
|
7838
|
+
return ` // Deploy state, secrets and backups share one bucket per project and
|
|
7839
|
+
// account, gkm-<project>-<account id>, created by the first deploy:
|
|
7840
|
+
// versioned, encrypted, never public.
|
|
7841
|
+
state: { provider: 's3', region: '${options.region}' },
|
|
7842
|
+
|
|
7843
|
+
`;
|
|
7844
|
+
}
|
|
7845
|
+
/**
|
|
7846
|
+
* Where a deployed stage's secrets live. On AWS that is the project bucket,
|
|
7847
|
+
* beside the deploy state, in the stage's own account, which the deploy job
|
|
7848
|
+
* reaches with the role it already assumed; a server target keeps the
|
|
7849
|
+
* encrypted local file, the default.
|
|
7843
7850
|
*/
|
|
7844
7851
|
function secretsStore(options) {
|
|
7845
7852
|
if (options.deployTarget !== "sst" || !options.region) return "";
|
|
7846
7853
|
return `
|
|
7847
|
-
// Deployed stages keep their secrets in
|
|
7848
|
-
//
|
|
7849
|
-
//
|
|
7850
|
-
store: { provider: '
|
|
7854
|
+
// Deployed stages keep their secrets in the project bucket, beside the
|
|
7855
|
+
// state, in the account each stage deploys to:
|
|
7856
|
+
// \`gkm secrets:set <KEY> '…' --stage <stage>\` writes there.
|
|
7857
|
+
store: { provider: 's3' },`;
|
|
7851
7858
|
}
|
|
7852
7859
|
/**
|
|
7853
7860
|
* The workspace's constructs, at its root rather than inside an app.
|
|
@@ -10830,8 +10837,8 @@ function printNextSteps(projectName, options, pkgManager) {
|
|
|
10830
10837
|
if (options.deployTarget === "compose") {
|
|
10831
10838
|
console.log("🚀 Deployment (Docker Compose, on your server):");
|
|
10832
10839
|
console.log(` Images are pushed to ${options.registry}; .github/workflows/deploy.yml builds them`);
|
|
10833
|
-
console.log(" and
|
|
10834
|
-
console.log("
|
|
10840
|
+
console.log(" and deploys each stage to its server's Docker over SSH (deploy.compose.server");
|
|
10841
|
+
console.log(" in gkm.config.ts). See the comments in it for the secrets each stage needs.");
|
|
10835
10842
|
console.log("");
|
|
10836
10843
|
}
|
|
10837
10844
|
if (options.deployTarget === "sst") {
|
|
@@ -11597,7 +11604,7 @@ function testDatabases(reconciled) {
|
|
|
11597
11604
|
* starts without the reference data the app needs.
|
|
11598
11605
|
*/
|
|
11599
11606
|
async function migrateTestStage(workspace, env) {
|
|
11600
|
-
const { migrateAndSeed } = await Promise.resolve().then(() => require("./migrate-
|
|
11607
|
+
const { migrateAndSeed } = await Promise.resolve().then(() => require("./migrate-DjrTwWJA.cjs"));
|
|
11601
11608
|
const { discover } = await Promise.resolve().then(() => require("./discover-DPgu-ScS.cjs")).then((n) => n.discover_exports);
|
|
11602
11609
|
const sources = {};
|
|
11603
11610
|
const manifest = await discover({
|
|
@@ -12033,7 +12040,7 @@ program.command("migrate").description("Apply each database construct's migratio
|
|
|
12033
12040
|
try {
|
|
12034
12041
|
const globalOptions = program.opts();
|
|
12035
12042
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12036
|
-
const { migrateCommand } = await Promise.resolve().then(() => require("./migrate-
|
|
12043
|
+
const { migrateCommand } = await Promise.resolve().then(() => require("./migrate-DjrTwWJA.cjs"));
|
|
12037
12044
|
await migrateCommand({
|
|
12038
12045
|
...options,
|
|
12039
12046
|
...construct ? { construct } : {}
|
|
@@ -12046,7 +12053,7 @@ program.command("seed").description("Migrate, then run each database construct's
|
|
|
12046
12053
|
try {
|
|
12047
12054
|
const globalOptions = program.opts();
|
|
12048
12055
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12049
|
-
const { seedCommand } = await Promise.resolve().then(() => require("./migrate-
|
|
12056
|
+
const { seedCommand } = await Promise.resolve().then(() => require("./migrate-DjrTwWJA.cjs"));
|
|
12050
12057
|
await seedCommand({
|
|
12051
12058
|
...options,
|
|
12052
12059
|
...construct ? { construct } : {}
|
|
@@ -12059,7 +12066,7 @@ program.command("migration").description("Write a construct's next migration: an
|
|
|
12059
12066
|
try {
|
|
12060
12067
|
const globalOptions = program.opts();
|
|
12061
12068
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12062
|
-
const { migrationCommand } = await Promise.resolve().then(() => require("./migrate-
|
|
12069
|
+
const { migrationCommand } = await Promise.resolve().then(() => require("./migrate-DjrTwWJA.cjs"));
|
|
12063
12070
|
await migrationCommand({
|
|
12064
12071
|
construct,
|
|
12065
12072
|
...name ? { name } : {}
|
|
@@ -12105,7 +12112,7 @@ program.command("docker").description("Generate Docker deployment files").option
|
|
|
12105
12112
|
exitWithError(error);
|
|
12106
12113
|
}
|
|
12107
12114
|
});
|
|
12108
|
-
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("--
|
|
12115
|
+
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("--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) => {
|
|
12109
12116
|
try {
|
|
12110
12117
|
const globalOptions = program.opts();
|
|
12111
12118
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
@@ -12159,7 +12166,7 @@ program.command("secrets:add").description("Build the keys a stage must be given
|
|
|
12159
12166
|
try {
|
|
12160
12167
|
const globalOptions = program.opts();
|
|
12161
12168
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12162
|
-
const { secretsAddCommand } = await Promise.resolve().then(() => require("./add-
|
|
12169
|
+
const { secretsAddCommand } = await Promise.resolve().then(() => require("./add-Iuo3ao5E.cjs"));
|
|
12163
12170
|
await secretsAddCommand(options);
|
|
12164
12171
|
} catch (error) {
|
|
12165
12172
|
exitWithError(error);
|
|
@@ -12169,7 +12176,7 @@ program.command("encryption:rotate").description("Add a new current key to an En
|
|
|
12169
12176
|
try {
|
|
12170
12177
|
const globalOptions = program.opts();
|
|
12171
12178
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12172
|
-
const { encryptionRotateCommand } = await Promise.resolve().then(() => require("./encryption-
|
|
12179
|
+
const { encryptionRotateCommand } = await Promise.resolve().then(() => require("./encryption-CmQvQOSe.cjs"));
|
|
12173
12180
|
await encryptionRotateCommand(construct, options);
|
|
12174
12181
|
} catch (error) {
|
|
12175
12182
|
exitWithError(error);
|
|
@@ -12179,7 +12186,7 @@ program.command("encryption:retire").description("Remove an old key from an Encr
|
|
|
12179
12186
|
try {
|
|
12180
12187
|
const globalOptions = program.opts();
|
|
12181
12188
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12182
|
-
const { encryptionRetireCommand } = await Promise.resolve().then(() => require("./encryption-
|
|
12189
|
+
const { encryptionRetireCommand } = await Promise.resolve().then(() => require("./encryption-CmQvQOSe.cjs"));
|
|
12183
12190
|
await encryptionRetireCommand(construct, key, options);
|
|
12184
12191
|
} catch (error) {
|
|
12185
12192
|
exitWithError(error);
|
|
@@ -12218,7 +12225,7 @@ program.command("secrets:reconcile").description("Backfill missing custom secret
|
|
|
12218
12225
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12219
12226
|
const { loadWorkspaceConfig } = await Promise.resolve().then(() => require("./config.cjs"));
|
|
12220
12227
|
const { reconcileMissingSecrets } = await Promise.resolve().then(() => require("./reconcile-CuCQBa5-.cjs"));
|
|
12221
|
-
const { secretsStoreFor } = await Promise.resolve().then(() => require("./seeds-
|
|
12228
|
+
const { secretsStoreFor } = await Promise.resolve().then(() => require("./seeds-BNHSpjNP.cjs")).then((n) => n.store_exports);
|
|
12222
12229
|
const { workspace } = await loadWorkspaceConfig();
|
|
12223
12230
|
const stage = options.stage ?? workspace.stages.local;
|
|
12224
12231
|
const store = await secretsStoreFor(workspace, stage);
|
|
@@ -12227,7 +12234,7 @@ program.command("secrets:reconcile").description("Backfill missing custom secret
|
|
|
12227
12234
|
console.error(`No secrets found for stage "${stage}". Run "gkm secrets:init --stage ${stage}" first.`);
|
|
12228
12235
|
process.exit(1);
|
|
12229
12236
|
}
|
|
12230
|
-
const { derivedContainers } = await Promise.resolve().then(() => require("./seeds-
|
|
12237
|
+
const { derivedContainers } = await Promise.resolve().then(() => require("./seeds-BNHSpjNP.cjs")).then((n) => n.workspace_exports);
|
|
12231
12238
|
const result = reconcileMissingSecrets(secrets, workspace, await derivedContainers(workspace, stage));
|
|
12232
12239
|
if (!result) {
|
|
12233
12240
|
console.log(`\n✓ Secrets for stage "${stage}" are up-to-date`);
|
|
@@ -12240,18 +12247,18 @@ program.command("secrets:reconcile").description("Backfill missing custom secret
|
|
|
12240
12247
|
exitWithError(error);
|
|
12241
12248
|
}
|
|
12242
12249
|
});
|
|
12243
|
-
program.command("secrets:migrate").description("Copy a deployed stage's secrets from the configured store to another (
|
|
12250
|
+
program.command("secrets:migrate").description("Copy a deployed stage's secrets from the configured store to another (s3, ssm, secrets-manager, file), verify the copy, and print how to delete the source").requiredOption("--stage <stage>", "A deployed stage").requiredOption("--to <provider>", "s3, ssm, secrets-manager or file").option("--region <region>", "The target's AWS region (default: the S3 state's for s3, else the configured store's)").option("--profile <profile>", "AWS profile for the stage's account").option("--force", "Replace different secrets the target already holds").action(async (options) => {
|
|
12244
12251
|
try {
|
|
12245
12252
|
const globalOptions = program.opts();
|
|
12246
12253
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12247
|
-
const { secretsMigrateCommand } = await Promise.resolve().then(() => require("./migrate-
|
|
12254
|
+
const { secretsMigrateCommand } = await Promise.resolve().then(() => require("./migrate-CxZYzF_u.cjs"));
|
|
12248
12255
|
await secretsMigrateCommand(options);
|
|
12249
12256
|
} catch (error) {
|
|
12250
12257
|
exitWithError(error);
|
|
12251
12258
|
}
|
|
12252
12259
|
});
|
|
12253
|
-
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("--
|
|
12254
|
-
const { deployCli } = await Promise.resolve().then(() => require("./cli-
|
|
12260
|
+
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("--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) => {
|
|
12261
|
+
const { deployCli } = await Promise.resolve().then(() => require("./cli-W2DMRIbP.cjs"));
|
|
12255
12262
|
const globalOptions = program.opts();
|
|
12256
12263
|
const code = await deployCli({
|
|
12257
12264
|
cwd: (0, node_path.resolve)(globalOptions.cwd ?? process.cwd()),
|
|
@@ -12264,8 +12271,6 @@ program.command("deploy").description("Deploy a stage through its target").optio
|
|
|
12264
12271
|
...options.atomic ? { atomic: true } : {},
|
|
12265
12272
|
...options.allowDevServices ? { allowDevServices: true } : {},
|
|
12266
12273
|
...options.skipDns ? { skipDns: true } : {},
|
|
12267
|
-
...options.resourcesOnly ? { resourcesOnly: true } : {},
|
|
12268
|
-
...options.skipResources ? { skipResources: true } : {},
|
|
12269
12274
|
...options.rotateKeys ? { rotateKeys: true } : {},
|
|
12270
12275
|
...options.retireOldKeys ? { retireOldKeys: true } : {}
|
|
12271
12276
|
});
|
|
@@ -12273,7 +12278,7 @@ program.command("deploy").description("Deploy a stage through its target").optio
|
|
|
12273
12278
|
});
|
|
12274
12279
|
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) => {
|
|
12275
12280
|
try {
|
|
12276
|
-
const { rollbackStage } = await Promise.resolve().then(() => require("./rollback-
|
|
12281
|
+
const { rollbackStage } = await Promise.resolve().then(() => require("./rollback-DBfLvC8k.cjs")).then((n) => n.rollback_exports);
|
|
12277
12282
|
const { terminalCredentials } = await Promise.resolve().then(() => require("./terminal-CPHuH4S1.cjs"));
|
|
12278
12283
|
const globalOptions = program.opts();
|
|
12279
12284
|
await rollbackStage({
|
|
@@ -12307,7 +12312,7 @@ program.command("deploy:github").description("Let GitHub Actions deploy a stage:
|
|
|
12307
12312
|
try {
|
|
12308
12313
|
const globalOptions = program.opts();
|
|
12309
12314
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12310
|
-
const { deployGithubCommand } = await Promise.resolve().then(() => require("./github-
|
|
12315
|
+
const { deployGithubCommand } = await Promise.resolve().then(() => require("./github-Ds2RYnSU.cjs"));
|
|
12311
12316
|
await deployGithubCommand(options);
|
|
12312
12317
|
} catch (error) {
|
|
12313
12318
|
exitWithError(error);
|
|
@@ -12317,7 +12322,7 @@ program.command("stages").description("The workspace's stages from gkm.config.ts
|
|
|
12317
12322
|
try {
|
|
12318
12323
|
const globalOptions = program.opts();
|
|
12319
12324
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12320
|
-
const { stagesCommand } = await Promise.resolve().then(() => require("./stages-
|
|
12325
|
+
const { stagesCommand } = await Promise.resolve().then(() => require("./stages-DdBV7msu.cjs"));
|
|
12321
12326
|
await stagesCommand(options);
|
|
12322
12327
|
} catch (error) {
|
|
12323
12328
|
exitWithError(error);
|