@geekmidas/cli 10.0.0-alpha.98 → 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-C2fK-zeQ.mjs → GoDaddyProvider-206NguW1.mjs} +2 -2
- package/dist/{GoDaddyProvider-C2fK-zeQ.mjs.map → GoDaddyProvider-206NguW1.mjs.map} +1 -1
- package/dist/{GoDaddyProvider-SLlyDwD1.cjs → GoDaddyProvider-D1aQy2i1.cjs} +2 -2
- package/dist/{GoDaddyProvider-SLlyDwD1.cjs.map → GoDaddyProvider-D1aQy2i1.cjs.map} +1 -1
- package/dist/{LegacyStateStore-CAvxM8U5.cjs → LegacyStateStore-CgJEr1G7.cjs} +3 -3
- package/dist/{LegacyStateStore-CAvxM8U5.cjs.map → LegacyStateStore-CgJEr1G7.cjs.map} +1 -1
- package/dist/{LegacyStateStore-D9QDWCst.mjs → LegacyStateStore-wmFfdzuh.mjs} +3 -3
- package/dist/{LegacyStateStore-D9QDWCst.mjs.map → LegacyStateStore-wmFfdzuh.mjs.map} +1 -1
- package/dist/{LocalStateStore-QcrdjCl6.cjs → LocalStateStore-BD14kra9.cjs} +2 -2
- package/dist/{LocalStateStore-QcrdjCl6.cjs.map → LocalStateStore-BD14kra9.cjs.map} +1 -1
- package/dist/{LocalStateStore-DPQSqkSb.mjs → LocalStateStore-C5mNp91D.mjs} +2 -2
- package/dist/{LocalStateStore-DPQSqkSb.mjs.map → LocalStateStore-C5mNp91D.mjs.map} +1 -1
- package/dist/{S3StateStore-jorgKaee.mjs → S3StateStore-CEGbsDHi.mjs} +4 -4
- package/dist/{S3StateStore-jorgKaee.mjs.map → S3StateStore-CEGbsDHi.mjs.map} +1 -1
- package/dist/{S3StateStore-C16tVikU.cjs → S3StateStore-Csu_kJCy.cjs} +5 -5
- package/dist/{S3StateStore-C16tVikU.cjs.map → S3StateStore-Csu_kJCy.cjs.map} +1 -1
- package/dist/{SSMStateStore-Dvjt_INw.mjs → SSMStateStore-Bd62qwp4.mjs} +2 -2
- package/dist/{SSMStateStore-Dvjt_INw.mjs.map → SSMStateStore-Bd62qwp4.mjs.map} +1 -1
- package/dist/{SSMStateStore-mPAEr2P2.cjs → SSMStateStore-Rp21jtP5.cjs} +2 -2
- package/dist/{SSMStateStore-mPAEr2P2.cjs.map → SSMStateStore-Rp21jtP5.cjs.map} +1 -1
- package/dist/{add-CZIIsTcv.mjs → add-DyIEYI97.mjs} +4 -4
- package/dist/{add-CZIIsTcv.mjs.map → add-DyIEYI97.mjs.map} +1 -1
- package/dist/{add-SRk65Udu.cjs → add-Iuo3ao5E.cjs} +5 -5
- package/dist/{add-SRk65Udu.cjs.map → add-Iuo3ao5E.cjs.map} +1 -1
- package/dist/{bundler-B0Pj5FXT.cjs → bundler-Bgoq8IyR.cjs} +5 -5
- package/dist/{bundler-B0Pj5FXT.cjs.map → bundler-Bgoq8IyR.cjs.map} +1 -1
- package/dist/{bundler-DxJ-cIEt.mjs → bundler-Q6Kp8b0r.mjs} +5 -5
- package/dist/{bundler-DxJ-cIEt.mjs.map → bundler-Q6Kp8b0r.mjs.map} +1 -1
- package/dist/{cli-CV85bY3-.mjs → cli-B9BudUV0.mjs} +2 -4
- package/dist/cli-B9BudUV0.mjs.map +1 -0
- package/dist/{cli-CRDJWWmZ.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-pBzLfNef.d.mts → config-BVdHfj8b.d.cts} +4 -4
- package/dist/{config-CS76CzXM.d.cts.map → config-BVdHfj8b.d.cts.map} +1 -1
- package/dist/{config-CS76CzXM.d.cts → config-D2OqCmAM.d.mts} +4 -4
- package/dist/{config-pBzLfNef.d.mts.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-277jek46.cjs → deploy-CbJMJsgX.cjs} +26 -62
- package/dist/deploy-CbJMJsgX.cjs.map +1 -0
- package/dist/{deploy-Dw8g3sLY.mjs → deploy-n_IB8r6H.mjs} +17 -59
- package/dist/deploy-n_IB8r6H.mjs.map +1 -0
- package/dist/{discover-DJCCgimv.d.mts → discover-Caf6Hnv1.d.cts} +2 -2
- package/dist/{discover-CU1LjCOf.d.cts.map → discover-Caf6Hnv1.d.cts.map} +1 -1
- package/dist/{discover-CU1LjCOf.d.cts → discover-Cd5M2jPv.d.mts} +2 -2
- package/dist/{discover-DJCCgimv.d.mts.map → discover-Cd5M2jPv.d.mts.map} +1 -1
- package/dist/{dns-LqWzPb8l.mjs → dns-C_LPS3qV.mjs} +3 -3
- package/dist/{dns-LqWzPb8l.mjs.map → dns-C_LPS3qV.mjs.map} +1 -1
- package/dist/{dns-Dhjbnjgl.cjs → dns-kp8To8Qj.cjs} +3 -3
- package/dist/{dns-Dhjbnjgl.cjs.map → dns-kp8To8Qj.cjs.map} +1 -1
- package/dist/{dokploy-D_uCbZQ7.mjs → dokploy-Dl_kNVeE.mjs} +2 -2
- package/dist/{dokploy-D_uCbZQ7.mjs.map → dokploy-Dl_kNVeE.mjs.map} +1 -1
- package/dist/{dokploy-Dw4oCXqR.cjs → dokploy-gRIae9Ht.cjs} +2 -2
- package/dist/{dokploy-Dw4oCXqR.cjs.map → dokploy-gRIae9Ht.cjs.map} +1 -1
- package/dist/{encryption-C0uKYE9v.mjs → encryption-C3DcVZQs.mjs} +3 -3
- package/dist/{encryption-C0uKYE9v.mjs.map → encryption-C3DcVZQs.mjs.map} +1 -1
- package/dist/{encryption-CtVPHWWq.cjs → encryption-CmQvQOSe.cjs} +3 -3
- package/dist/{encryption-CtVPHWWq.cjs.map → encryption-CmQvQOSe.cjs.map} +1 -1
- package/dist/{engine-BE5PdE8S.mjs → engine-DBXuhHyf.mjs} +5 -4
- package/dist/{engine-BE5PdE8S.mjs.map → engine-DBXuhHyf.mjs.map} +1 -1
- package/dist/{engine-HI8aLw1M.cjs → engine-Dk19Mxc4.cjs} +27 -26
- package/dist/{engine-HI8aLw1M.cjs.map → engine-Dk19Mxc4.cjs.map} +1 -1
- package/dist/{github-BCdfZ9zO.cjs → github-Ds2RYnSU.cjs} +9 -8
- package/dist/{github-BCdfZ9zO.cjs.map → github-Ds2RYnSU.cjs.map} +1 -1
- package/dist/{github-CT3X720_.mjs → github-RawRLERq.mjs} +7 -6
- package/dist/{github-CT3X720_.mjs.map → github-RawRLERq.mjs.map} +1 -1
- 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-DKtB01YC.d.cts → index-BU4G20G6.d.cts} +2 -2
- package/dist/{index-DKtB01YC.d.cts.map → index-BU4G20G6.d.cts.map} +1 -1
- package/dist/{index-ZAUrXH6Q.d.mts → index-yDbd1WcM.d.mts} +2 -2
- package/dist/{index-ZAUrXH6Q.d.mts.map → index-yDbd1WcM.d.mts.map} +1 -1
- package/dist/index.cjs +131 -141
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +128 -138
- package/dist/index.mjs.map +1 -1
- package/dist/{migrate-CCZUgxMK.mjs → migrate-CZIGT3kB.mjs} +3 -3
- package/dist/{migrate-CCZUgxMK.mjs.map → migrate-CZIGT3kB.mjs.map} +1 -1
- package/dist/{migrate-DBGyoBvZ.cjs → migrate-CxZYzF_u.cjs} +3 -3
- package/dist/{migrate-DBGyoBvZ.cjs.map → migrate-CxZYzF_u.cjs.map} +1 -1
- package/dist/{migrate-DH-lOK3j.mjs → migrate-DR1x96I4.mjs} +3 -3
- package/dist/{migrate-DH-lOK3j.mjs.map → migrate-DR1x96I4.mjs.map} +1 -1
- package/dist/{migrate-Cs7kQxD5.cjs → migrate-DjrTwWJA.cjs} +3 -3
- package/dist/{migrate-Cs7kQxD5.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-DrkEht-j.mjs → projectBucket-BYOxRnHY.mjs} +2 -2
- package/dist/{projectBucket-DrkEht-j.mjs.map → projectBucket-BYOxRnHY.mjs.map} +1 -1
- package/dist/{projectBucket-BjeDcAYy.cjs → projectBucket-CDu5rXjp.cjs} +2 -2
- package/dist/{projectBucket-BjeDcAYy.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-OfLaxaxY.mjs → resolve-CNYbGH8g.mjs} +3 -3
- package/dist/{resolve-OfLaxaxY.mjs.map → resolve-CNYbGH8g.mjs.map} +1 -1
- package/dist/{resolve-CScrqgdC.cjs → resolve-DC98Rl1t.cjs} +3 -3
- package/dist/{resolve-CScrqgdC.cjs.map → resolve-DC98Rl1t.cjs.map} +1 -1
- package/dist/{rollback-DQBSN-i7.mjs → rollback-BkIkE8Qe.mjs} +5 -5
- package/dist/{rollback-DQBSN-i7.mjs.map → rollback-BkIkE8Qe.mjs.map} +1 -1
- package/dist/{rollback-D7p4wJNO.cjs → rollback-DBfLvC8k.cjs} +5 -5
- package/dist/{rollback-D7p4wJNO.cjs.map → rollback-DBfLvC8k.cjs.map} +1 -1
- package/dist/{runtime-BlHOVx8L.d.cts → runtime-CLz3bf07.d.mts} +2 -2
- package/dist/{runtime-BlHOVx8L.d.cts.map → runtime-CLz3bf07.d.mts.map} +1 -1
- package/dist/{runtime-DMq9C3KB.d.mts → runtime-CUWf0IUk.d.cts} +2 -2
- package/dist/{runtime-DMq9C3KB.d.mts.map → runtime-CUWf0IUk.d.cts.map} +1 -1
- package/dist/{s3-CUKzBBae.mjs → s3-BwhQk3QM.mjs} +3 -3
- package/dist/{s3-CUKzBBae.mjs.map → s3-BwhQk3QM.mjs.map} +1 -1
- package/dist/{s3-QQi4sNOQ.cjs → s3-DLp0V-Ox.cjs} +3 -3
- package/dist/{s3-QQi4sNOQ.cjs.map → s3-DLp0V-Ox.cjs.map} +1 -1
- package/dist/{sandbox-Cm4X6HRh.d.mts → sandbox-CfpLWTPP.d.mts} +2 -2
- package/dist/{sandbox-ArJ_hEKk.d.cts.map → sandbox-CfpLWTPP.d.mts.map} +1 -1
- package/dist/{sandbox-ArJ_hEKk.d.cts → sandbox-D1XeNEJ9.d.cts} +2 -2
- package/dist/{sandbox-Cm4X6HRh.d.mts.map → sandbox-D1XeNEJ9.d.cts.map} +1 -1
- package/dist/{seeds-Df4BI-T3.cjs → seeds-BNHSpjNP.cjs} +9 -179
- package/dist/seeds-BNHSpjNP.cjs.map +1 -0
- package/dist/{seeds-BvxWUGKJ.mjs → seeds-C4bZ8L-T.mjs} +10 -132
- package/dist/seeds-C4bZ8L-T.mjs.map +1 -0
- package/dist/{sniffer-BqjXvcaK.mjs → sniffer-BIBm9dAb.mjs} +7 -7
- package/dist/{sniffer-BqjXvcaK.mjs.map → sniffer-BIBm9dAb.mjs.map} +1 -1
- package/dist/{sniffer-DZeQJKty.cjs → sniffer-Cylp9W2D.cjs} +7 -7
- package/dist/{sniffer-DZeQJKty.cjs.map → sniffer-Cylp9W2D.cjs.map} +1 -1
- package/dist/{stages-6SEoRA4x.mjs → stages-CcS9vnNu.mjs} +3 -17
- package/dist/stages-CcS9vnNu.mjs.map +1 -0
- package/dist/{stages-DH5z89eT.cjs → stages-DdBV7msu.cjs} +3 -17
- 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-Drpl9HX9.d.mts → types-BhThob0H.d.mts} +29 -13
- package/dist/types-BhThob0H.d.mts.map +1 -0
- package/dist/{types-DipUP9zp.d.cts → types-DwoLHelT.d.cts} +29 -13
- 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-BBeT6Pil.mjs → workspace-D5CpOp1y.mjs} +22 -2
- package/dist/workspace-D5CpOp1y.mjs.map +1 -0
- package/dist/{workspace-BJ78Bgvm.cjs → workspace-DRjdu1OY.cjs} +22 -2
- package/dist/workspace-DRjdu1OY.cjs.map +1 -0
- package/package.json +15 -15
- package/dist/cli-CRDJWWmZ.cjs.map +0 -1
- package/dist/cli-CV85bY3-.mjs.map +0 -1
- package/dist/compose-CQQRRJC3.mjs +0 -1511
- package/dist/compose-CQQRRJC3.mjs.map +0 -1
- package/dist/compose-DMY4ouEk.cjs +0 -1558
- package/dist/compose-DMY4ouEk.cjs.map +0 -1
- package/dist/deploy-277jek46.cjs.map +0 -1
- package/dist/deploy-Dw8g3sLY.mjs.map +0 -1
- package/dist/dns-4RAiVFa7.cjs +0 -55
- package/dist/dns-4RAiVFa7.cjs.map +0 -1
- package/dist/dns-CU22K_i0.mjs +0 -44
- package/dist/dns-CU22K_i0.mjs.map +0 -1
- package/dist/secrets-AA_tQUl-.mjs +0 -36
- package/dist/secrets-AA_tQUl-.mjs.map +0 -1
- package/dist/secrets-B_biKsKx.cjs +0 -47
- package/dist/secrets-B_biKsKx.cjs.map +0 -1
- package/dist/seeds-BvxWUGKJ.mjs.map +0 -1
- package/dist/seeds-Df4BI-T3.cjs.map +0 -1
- package/dist/stack-A6MAFZ6u.mjs +0 -1201
- package/dist/stack-A6MAFZ6u.mjs.map +0 -1
- package/dist/stack-BpkZEEfB.cjs +0 -1308
- package/dist/stack-BpkZEEfB.cjs.map +0 -1
- package/dist/stages-6SEoRA4x.mjs.map +0 -1
- package/dist/stages-DH5z89eT.cjs.map +0 -1
- package/dist/types-DipUP9zp.d.cts.map +0 -1
- package/dist/types-Drpl9HX9.d.mts.map +0 -1
- package/dist/workspace-BBeT6Pil.mjs.map +0 -1
- package/dist/workspace-BJ78Bgvm.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-QcrdjCl6.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);
|
|
@@ -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
|
/**
|
|
@@ -7822,13 +7803,24 @@ ${stateBlock(options)} secrets: {
|
|
|
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
|
|
@@ -10845,8 +10837,8 @@ function printNextSteps(projectName, options, pkgManager) {
|
|
|
10845
10837
|
if (options.deployTarget === "compose") {
|
|
10846
10838
|
console.log("🚀 Deployment (Docker Compose, on your server):");
|
|
10847
10839
|
console.log(` Images are pushed to ${options.registry}; .github/workflows/deploy.yml builds them`);
|
|
10848
|
-
console.log(" and
|
|
10849
|
-
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.");
|
|
10850
10842
|
console.log("");
|
|
10851
10843
|
}
|
|
10852
10844
|
if (options.deployTarget === "sst") {
|
|
@@ -11612,7 +11604,7 @@ function testDatabases(reconciled) {
|
|
|
11612
11604
|
* starts without the reference data the app needs.
|
|
11613
11605
|
*/
|
|
11614
11606
|
async function migrateTestStage(workspace, env) {
|
|
11615
|
-
const { migrateAndSeed } = await Promise.resolve().then(() => require("./migrate-
|
|
11607
|
+
const { migrateAndSeed } = await Promise.resolve().then(() => require("./migrate-DjrTwWJA.cjs"));
|
|
11616
11608
|
const { discover } = await Promise.resolve().then(() => require("./discover-DPgu-ScS.cjs")).then((n) => n.discover_exports);
|
|
11617
11609
|
const sources = {};
|
|
11618
11610
|
const manifest = await discover({
|
|
@@ -12048,7 +12040,7 @@ program.command("migrate").description("Apply each database construct's migratio
|
|
|
12048
12040
|
try {
|
|
12049
12041
|
const globalOptions = program.opts();
|
|
12050
12042
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12051
|
-
const { migrateCommand } = await Promise.resolve().then(() => require("./migrate-
|
|
12043
|
+
const { migrateCommand } = await Promise.resolve().then(() => require("./migrate-DjrTwWJA.cjs"));
|
|
12052
12044
|
await migrateCommand({
|
|
12053
12045
|
...options,
|
|
12054
12046
|
...construct ? { construct } : {}
|
|
@@ -12061,7 +12053,7 @@ program.command("seed").description("Migrate, then run each database construct's
|
|
|
12061
12053
|
try {
|
|
12062
12054
|
const globalOptions = program.opts();
|
|
12063
12055
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12064
|
-
const { seedCommand } = await Promise.resolve().then(() => require("./migrate-
|
|
12056
|
+
const { seedCommand } = await Promise.resolve().then(() => require("./migrate-DjrTwWJA.cjs"));
|
|
12065
12057
|
await seedCommand({
|
|
12066
12058
|
...options,
|
|
12067
12059
|
...construct ? { construct } : {}
|
|
@@ -12074,7 +12066,7 @@ program.command("migration").description("Write a construct's next migration: an
|
|
|
12074
12066
|
try {
|
|
12075
12067
|
const globalOptions = program.opts();
|
|
12076
12068
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12077
|
-
const { migrationCommand } = await Promise.resolve().then(() => require("./migrate-
|
|
12069
|
+
const { migrationCommand } = await Promise.resolve().then(() => require("./migrate-DjrTwWJA.cjs"));
|
|
12078
12070
|
await migrationCommand({
|
|
12079
12071
|
construct,
|
|
12080
12072
|
...name ? { name } : {}
|
|
@@ -12120,7 +12112,7 @@ program.command("docker").description("Generate Docker deployment files").option
|
|
|
12120
12112
|
exitWithError(error);
|
|
12121
12113
|
}
|
|
12122
12114
|
});
|
|
12123
|
-
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) => {
|
|
12124
12116
|
try {
|
|
12125
12117
|
const globalOptions = program.opts();
|
|
12126
12118
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
@@ -12174,7 +12166,7 @@ program.command("secrets:add").description("Build the keys a stage must be given
|
|
|
12174
12166
|
try {
|
|
12175
12167
|
const globalOptions = program.opts();
|
|
12176
12168
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12177
|
-
const { secretsAddCommand } = await Promise.resolve().then(() => require("./add-
|
|
12169
|
+
const { secretsAddCommand } = await Promise.resolve().then(() => require("./add-Iuo3ao5E.cjs"));
|
|
12178
12170
|
await secretsAddCommand(options);
|
|
12179
12171
|
} catch (error) {
|
|
12180
12172
|
exitWithError(error);
|
|
@@ -12184,7 +12176,7 @@ program.command("encryption:rotate").description("Add a new current key to an En
|
|
|
12184
12176
|
try {
|
|
12185
12177
|
const globalOptions = program.opts();
|
|
12186
12178
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12187
|
-
const { encryptionRotateCommand } = await Promise.resolve().then(() => require("./encryption-
|
|
12179
|
+
const { encryptionRotateCommand } = await Promise.resolve().then(() => require("./encryption-CmQvQOSe.cjs"));
|
|
12188
12180
|
await encryptionRotateCommand(construct, options);
|
|
12189
12181
|
} catch (error) {
|
|
12190
12182
|
exitWithError(error);
|
|
@@ -12194,7 +12186,7 @@ program.command("encryption:retire").description("Remove an old key from an Encr
|
|
|
12194
12186
|
try {
|
|
12195
12187
|
const globalOptions = program.opts();
|
|
12196
12188
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12197
|
-
const { encryptionRetireCommand } = await Promise.resolve().then(() => require("./encryption-
|
|
12189
|
+
const { encryptionRetireCommand } = await Promise.resolve().then(() => require("./encryption-CmQvQOSe.cjs"));
|
|
12198
12190
|
await encryptionRetireCommand(construct, key, options);
|
|
12199
12191
|
} catch (error) {
|
|
12200
12192
|
exitWithError(error);
|
|
@@ -12233,7 +12225,7 @@ program.command("secrets:reconcile").description("Backfill missing custom secret
|
|
|
12233
12225
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12234
12226
|
const { loadWorkspaceConfig } = await Promise.resolve().then(() => require("./config.cjs"));
|
|
12235
12227
|
const { reconcileMissingSecrets } = await Promise.resolve().then(() => require("./reconcile-CuCQBa5-.cjs"));
|
|
12236
|
-
const { secretsStoreFor } = await Promise.resolve().then(() => require("./seeds-
|
|
12228
|
+
const { secretsStoreFor } = await Promise.resolve().then(() => require("./seeds-BNHSpjNP.cjs")).then((n) => n.store_exports);
|
|
12237
12229
|
const { workspace } = await loadWorkspaceConfig();
|
|
12238
12230
|
const stage = options.stage ?? workspace.stages.local;
|
|
12239
12231
|
const store = await secretsStoreFor(workspace, stage);
|
|
@@ -12242,7 +12234,7 @@ program.command("secrets:reconcile").description("Backfill missing custom secret
|
|
|
12242
12234
|
console.error(`No secrets found for stage "${stage}". Run "gkm secrets:init --stage ${stage}" first.`);
|
|
12243
12235
|
process.exit(1);
|
|
12244
12236
|
}
|
|
12245
|
-
const { derivedContainers } = await Promise.resolve().then(() => require("./seeds-
|
|
12237
|
+
const { derivedContainers } = await Promise.resolve().then(() => require("./seeds-BNHSpjNP.cjs")).then((n) => n.workspace_exports);
|
|
12246
12238
|
const result = reconcileMissingSecrets(secrets, workspace, await derivedContainers(workspace, stage));
|
|
12247
12239
|
if (!result) {
|
|
12248
12240
|
console.log(`\n✓ Secrets for stage "${stage}" are up-to-date`);
|
|
@@ -12259,14 +12251,14 @@ program.command("secrets:migrate").description("Copy a deployed stage's secrets
|
|
|
12259
12251
|
try {
|
|
12260
12252
|
const globalOptions = program.opts();
|
|
12261
12253
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12262
|
-
const { secretsMigrateCommand } = await Promise.resolve().then(() => require("./migrate-
|
|
12254
|
+
const { secretsMigrateCommand } = await Promise.resolve().then(() => require("./migrate-CxZYzF_u.cjs"));
|
|
12263
12255
|
await secretsMigrateCommand(options);
|
|
12264
12256
|
} catch (error) {
|
|
12265
12257
|
exitWithError(error);
|
|
12266
12258
|
}
|
|
12267
12259
|
});
|
|
12268
|
-
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("--
|
|
12269
|
-
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"));
|
|
12270
12262
|
const globalOptions = program.opts();
|
|
12271
12263
|
const code = await deployCli({
|
|
12272
12264
|
cwd: (0, node_path.resolve)(globalOptions.cwd ?? process.cwd()),
|
|
@@ -12279,8 +12271,6 @@ program.command("deploy").description("Deploy a stage through its target").optio
|
|
|
12279
12271
|
...options.atomic ? { atomic: true } : {},
|
|
12280
12272
|
...options.allowDevServices ? { allowDevServices: true } : {},
|
|
12281
12273
|
...options.skipDns ? { skipDns: true } : {},
|
|
12282
|
-
...options.resourcesOnly ? { resourcesOnly: true } : {},
|
|
12283
|
-
...options.skipResources ? { skipResources: true } : {},
|
|
12284
12274
|
...options.rotateKeys ? { rotateKeys: true } : {},
|
|
12285
12275
|
...options.retireOldKeys ? { retireOldKeys: true } : {}
|
|
12286
12276
|
});
|
|
@@ -12288,7 +12278,7 @@ program.command("deploy").description("Deploy a stage through its target").optio
|
|
|
12288
12278
|
});
|
|
12289
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) => {
|
|
12290
12280
|
try {
|
|
12291
|
-
const { rollbackStage } = await Promise.resolve().then(() => require("./rollback-
|
|
12281
|
+
const { rollbackStage } = await Promise.resolve().then(() => require("./rollback-DBfLvC8k.cjs")).then((n) => n.rollback_exports);
|
|
12292
12282
|
const { terminalCredentials } = await Promise.resolve().then(() => require("./terminal-CPHuH4S1.cjs"));
|
|
12293
12283
|
const globalOptions = program.opts();
|
|
12294
12284
|
await rollbackStage({
|
|
@@ -12322,7 +12312,7 @@ program.command("deploy:github").description("Let GitHub Actions deploy a stage:
|
|
|
12322
12312
|
try {
|
|
12323
12313
|
const globalOptions = program.opts();
|
|
12324
12314
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12325
|
-
const { deployGithubCommand } = await Promise.resolve().then(() => require("./github-
|
|
12315
|
+
const { deployGithubCommand } = await Promise.resolve().then(() => require("./github-Ds2RYnSU.cjs"));
|
|
12326
12316
|
await deployGithubCommand(options);
|
|
12327
12317
|
} catch (error) {
|
|
12328
12318
|
exitWithError(error);
|
|
@@ -12332,7 +12322,7 @@ program.command("stages").description("The workspace's stages from gkm.config.ts
|
|
|
12332
12322
|
try {
|
|
12333
12323
|
const globalOptions = program.opts();
|
|
12334
12324
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12335
|
-
const { stagesCommand } = await Promise.resolve().then(() => require("./stages-
|
|
12325
|
+
const { stagesCommand } = await Promise.resolve().then(() => require("./stages-DdBV7msu.cjs"));
|
|
12336
12326
|
await stagesCommand(options);
|
|
12337
12327
|
} catch (error) {
|
|
12338
12328
|
exitWithError(error);
|