@geekmidas/cli 10.0.0-alpha.173 → 10.0.0-alpha.174
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-uJkNjoF6.mjs → GoDaddyProvider-BxQYQT7E.mjs} +2 -2
- package/dist/{GoDaddyProvider-uJkNjoF6.mjs.map → GoDaddyProvider-BxQYQT7E.mjs.map} +1 -1
- package/dist/{GoDaddyProvider-CogJfGVY.cjs → GoDaddyProvider-gn-UeZl_.cjs} +2 -2
- package/dist/{GoDaddyProvider-CogJfGVY.cjs.map → GoDaddyProvider-gn-UeZl_.cjs.map} +1 -1
- package/dist/{HostingerProvider-DJFdGv-x.mjs → HostingerProvider-B-FP4-z6.mjs} +2 -2
- package/dist/{HostingerProvider-DJFdGv-x.mjs.map → HostingerProvider-B-FP4-z6.mjs.map} +1 -1
- package/dist/{HostingerProvider-DQEv1dim.cjs → HostingerProvider-znlxfl_p.cjs} +2 -2
- package/dist/{HostingerProvider-DQEv1dim.cjs.map → HostingerProvider-znlxfl_p.cjs.map} +1 -1
- package/dist/{LegacyStateStore-CEAYSDxQ.mjs → LegacyStateStore-Bds2IJbE.mjs} +2 -2
- package/dist/{LegacyStateStore-CEAYSDxQ.mjs.map → LegacyStateStore-Bds2IJbE.mjs.map} +1 -1
- package/dist/{LegacyStateStore-Du-QYvvW.cjs → LegacyStateStore-bS6W95Cq.cjs} +2 -2
- package/dist/{LegacyStateStore-Du-QYvvW.cjs.map → LegacyStateStore-bS6W95Cq.cjs.map} +1 -1
- package/dist/{LocalStateStore-CBnOEVUw.cjs → LocalStateStore-DN0_SCii.cjs} +2 -2
- package/dist/{LocalStateStore-CBnOEVUw.cjs.map → LocalStateStore-DN0_SCii.cjs.map} +1 -1
- package/dist/{LocalStateStore-DyqbqdrE.mjs → LocalStateStore-Zvirfsr4.mjs} +2 -2
- package/dist/{LocalStateStore-DyqbqdrE.mjs.map → LocalStateStore-Zvirfsr4.mjs.map} +1 -1
- package/dist/{S3StateStore-BPPv8S_Q.cjs → S3StateStore-Cs_ONSe7.cjs} +4 -4
- package/dist/{S3StateStore-BPPv8S_Q.cjs.map → S3StateStore-Cs_ONSe7.cjs.map} +1 -1
- package/dist/{S3StateStore-CQ2kN1Pb.mjs → S3StateStore-CxNPJKqU.mjs} +4 -4
- package/dist/{S3StateStore-CQ2kN1Pb.mjs.map → S3StateStore-CxNPJKqU.mjs.map} +1 -1
- package/dist/{SSMStateStore-Ca1_Tv6e.mjs → SSMStateStore-CK52ONQn.mjs} +2 -2
- package/dist/{SSMStateStore-Ca1_Tv6e.mjs.map → SSMStateStore-CK52ONQn.mjs.map} +1 -1
- package/dist/{SSMStateStore-CHy4p884.cjs → SSMStateStore-CzF_ghlT.cjs} +2 -2
- package/dist/{SSMStateStore-CHy4p884.cjs.map → SSMStateStore-CzF_ghlT.cjs.map} +1 -1
- package/dist/{add-wFkYMhYc.mjs → add-D570rDKN.mjs} +4 -4
- package/dist/{add-wFkYMhYc.mjs.map → add-D570rDKN.mjs.map} +1 -1
- package/dist/{add-nvNmOV4h.cjs → add-DD5bYU31.cjs} +4 -4
- package/dist/{add-nvNmOV4h.cjs.map → add-DD5bYU31.cjs.map} +1 -1
- package/dist/{apps-CnTjkv-C.cjs → apps-CIKiSUxH.cjs} +10 -8
- package/dist/apps-CIKiSUxH.cjs.map +1 -0
- package/dist/{apps-Dh2ito9T.mjs → apps-iHK70h_F.mjs} +10 -8
- package/dist/apps-iHK70h_F.mjs.map +1 -0
- package/dist/{bundler-B_2Mxi7l.cjs → bundler-CMieQ_0t.cjs} +15 -7
- package/dist/bundler-CMieQ_0t.cjs.map +1 -0
- package/dist/{bundler-BXS0AEtM.mjs → bundler-Cdhf7lv3.mjs} +16 -8
- package/dist/bundler-Cdhf7lv3.mjs.map +1 -0
- package/dist/{cli-CuCePKEc.mjs → cli-CcWMO_-0.mjs} +4 -4
- package/dist/{cli-CuCePKEc.mjs.map → cli-CcWMO_-0.mjs.map} +1 -1
- package/dist/{cli-Dew5Ay8s.cjs → cli-DHnkkrXz.cjs} +4 -4
- package/dist/{cli-Dew5Ay8s.cjs.map → cli-DHnkkrXz.cjs.map} +1 -1
- package/dist/{compose-DxreKQnX.mjs → compose-CFCSlSXx.mjs} +7 -7
- package/dist/{compose-DxreKQnX.mjs.map → compose-CFCSlSXx.mjs.map} +1 -1
- package/dist/{compose-CpAmz8GF.cjs → compose-D8cd13Eo.cjs} +4 -4
- package/dist/{compose-CpAmz8GF.cjs.map → compose-D8cd13Eo.cjs.map} +1 -1
- package/dist/{compose-Cfd5-ubC.mjs → compose-DsFvWwAu.mjs} +4 -4
- package/dist/{compose-Cfd5-ubC.mjs.map → compose-DsFvWwAu.mjs.map} +1 -1
- package/dist/{compose-B6emrIOB.cjs → compose-SAxadQy7.cjs} +7 -7
- package/dist/{compose-B6emrIOB.cjs.map → compose-SAxadQy7.cjs.map} +1 -1
- package/dist/deploy/public.cjs +10 -10
- package/dist/deploy/public.mjs +10 -10
- package/dist/{deploy-CV-e75Ja.mjs → deploy-CyrHJ5tR.mjs} +11 -11
- package/dist/{deploy-CV-e75Ja.mjs.map → deploy-CyrHJ5tR.mjs.map} +1 -1
- package/dist/{deploy-Cy2mXTnI.cjs → deploy-DnkGdwUd.cjs} +11 -11
- package/dist/{deploy-Cy2mXTnI.cjs.map → deploy-DnkGdwUd.cjs.map} +1 -1
- package/dist/{destroy-DQllGEWe.mjs → destroy-C2VQEDji.mjs} +7 -7
- package/dist/{destroy-DQllGEWe.mjs.map → destroy-C2VQEDji.mjs.map} +1 -1
- package/dist/{destroy-DjUM1nDI.cjs → destroy-Qb0MuIV4.cjs} +7 -7
- package/dist/{destroy-DjUM1nDI.cjs.map → destroy-Qb0MuIV4.cjs.map} +1 -1
- package/dist/{dns-DPHKct-l.mjs → dns-BMtL2ytM.mjs} +5 -5
- package/dist/{dns-DPHKct-l.mjs.map → dns-BMtL2ytM.mjs.map} +1 -1
- package/dist/{dns-efZTlePp.cjs → dns-DSzsbU2g.cjs} +5 -5
- package/dist/{dns-efZTlePp.cjs.map → dns-DSzsbU2g.cjs.map} +1 -1
- package/dist/{docker-CeGpTbYR.mjs → docker-D89imkq2.mjs} +185 -12
- package/dist/docker-D89imkq2.mjs.map +1 -0
- package/dist/{docker-1hv2ehU4.cjs → docker-aJbcdGKT.cjs} +217 -8
- package/dist/docker-aJbcdGKT.cjs.map +1 -0
- package/dist/{dokploy-DMCSZX9P.cjs → dokploy-DvG19W0p.cjs} +2 -2
- package/dist/{dokploy-DMCSZX9P.cjs.map → dokploy-DvG19W0p.cjs.map} +1 -1
- package/dist/{dokploy-Cdy9uxyT.mjs → dokploy-QAThjPQL.mjs} +2 -2
- package/dist/{dokploy-Cdy9uxyT.mjs.map → dokploy-QAThjPQL.mjs.map} +1 -1
- package/dist/{eas-B3vFP-9c.cjs → eas-DvKir935.cjs} +2 -2
- package/dist/{eas-B3vFP-9c.cjs.map → eas-DvKir935.cjs.map} +1 -1
- package/dist/{eas-KsVb80gp.mjs → eas-VxFCgjQa.mjs} +2 -2
- package/dist/{eas-KsVb80gp.mjs.map → eas-VxFCgjQa.mjs.map} +1 -1
- package/dist/{encryption-BYpdYmaT.cjs → encryption-D88IRxkV.cjs} +2 -2
- package/dist/{encryption-BYpdYmaT.cjs.map → encryption-D88IRxkV.cjs.map} +1 -1
- package/dist/{encryption-d_vz6csy.mjs → encryption-_GRjwxGO.mjs} +2 -2
- package/dist/{encryption-d_vz6csy.mjs.map → encryption-_GRjwxGO.mjs.map} +1 -1
- package/dist/{engine-DIzP1hty.cjs → engine-7oDEgerp.cjs} +8 -8
- package/dist/{engine-DIzP1hty.cjs.map → engine-7oDEgerp.cjs.map} +1 -1
- package/dist/{engine-CQTK8HEF.mjs → engine-CQfdAI92.mjs} +8 -8
- package/dist/{engine-CQTK8HEF.mjs.map → engine-CQfdAI92.mjs.map} +1 -1
- package/dist/{github-Ctmgt1Zv.mjs → github-BE-0zZ0H.mjs} +6 -6
- package/dist/{github-Ctmgt1Zv.mjs.map → github-BE-0zZ0H.mjs.map} +1 -1
- package/dist/{github-Chr0rEy5.cjs → github-CaUfjXXt.cjs} +6 -6
- package/dist/{github-Chr0rEy5.cjs.map → github-CaUfjXXt.cjs.map} +1 -1
- package/dist/{googlePlay-D5kL9gs5.mjs → googlePlay-DrBrk6dZ.mjs} +4 -4
- package/dist/{googlePlay-D5kL9gs5.mjs.map → googlePlay-DrBrk6dZ.mjs.map} +1 -1
- package/dist/{googlePlay-C50ZneV3.cjs → googlePlay-FCJulaVY.cjs} +4 -4
- package/dist/{googlePlay-C50ZneV3.cjs.map → googlePlay-FCJulaVY.cjs.map} +1 -1
- package/dist/index.cjs +156 -204
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +154 -202
- package/dist/index.mjs.map +1 -1
- package/dist/{local-CxqlHyVX.cjs → local-BclGW_Zo.cjs} +2 -2
- package/dist/{local-CxqlHyVX.cjs.map → local-BclGW_Zo.cjs.map} +1 -1
- package/dist/{local-Cy6Bb9ta.mjs → local-DbxB0Fg4.mjs} +2 -2
- package/dist/{local-Cy6Bb9ta.mjs.map → local-DbxB0Fg4.mjs.map} +1 -1
- package/dist/{migrate-DU_BqEwZ.mjs → migrate-C2Kjfwui.mjs} +2 -2
- package/dist/{migrate-DU_BqEwZ.mjs.map → migrate-C2Kjfwui.mjs.map} +1 -1
- package/dist/{migrate-uYiBDHF4.cjs → migrate-D2mp7qyM.cjs} +2 -2
- package/dist/{migrate-uYiBDHF4.cjs.map → migrate-D2mp7qyM.cjs.map} +1 -1
- package/dist/{migrate-DB1lxrIj.mjs → migrate-lidIEoZm.mjs} +4 -4
- package/dist/{migrate-DB1lxrIj.mjs.map → migrate-lidIEoZm.mjs.map} +1 -1
- package/dist/{migrate-C7AEA5wP.cjs → migrate-z_MuES4x.cjs} +4 -4
- package/dist/{migrate-C7AEA5wP.cjs.map → migrate-z_MuES4x.cjs.map} +1 -1
- package/dist/{notes-DOj8AhIz.cjs → notes-Cs0rVvlG.cjs} +2 -2
- package/dist/{notes-DOj8AhIz.cjs.map → notes-Cs0rVvlG.cjs.map} +1 -1
- package/dist/{notes-C23PJFnm.mjs → notes-Dw9BWRJP.mjs} +2 -2
- package/dist/{notes-C23PJFnm.mjs.map → notes-Dw9BWRJP.mjs.map} +1 -1
- package/dist/{projectBucket-BNxobT1q.cjs → projectBucket-BvcErpo0.cjs} +2 -2
- package/dist/{projectBucket-BNxobT1q.cjs.map → projectBucket-BvcErpo0.cjs.map} +1 -1
- package/dist/{projectBucket-BpwAxov3.mjs → projectBucket-DHuBZDPJ.mjs} +2 -2
- package/dist/{projectBucket-BpwAxov3.mjs.map → projectBucket-DHuBZDPJ.mjs.map} +1 -1
- package/dist/{publish-DaFTebR5.cjs → publish-DzMQWBW8.cjs} +2 -2
- package/dist/{publish-DaFTebR5.cjs.map → publish-DzMQWBW8.cjs.map} +1 -1
- package/dist/{publish-CM2A0e24.mjs → publish-yslBcYWN.mjs} +2 -2
- package/dist/{publish-CM2A0e24.mjs.map → publish-yslBcYWN.mjs.map} +1 -1
- package/dist/{resolve-DgHrtRXG.cjs → resolve-CQvEtM5c.cjs} +4 -4
- package/dist/{resolve-DgHrtRXG.cjs.map → resolve-CQvEtM5c.cjs.map} +1 -1
- package/dist/{resolve-DO6xu8Da.mjs → resolve-Dfind5fY.mjs} +4 -4
- package/dist/{resolve-DO6xu8Da.mjs.map → resolve-Dfind5fY.mjs.map} +1 -1
- package/dist/{rollback-6Idn2ozU.cjs → rollback-DUbm19zl.cjs} +5 -5
- package/dist/{rollback-6Idn2ozU.cjs.map → rollback-DUbm19zl.cjs.map} +1 -1
- package/dist/{rollback-CmeGUxpC.mjs → rollback-j8X0RdpU.mjs} +5 -5
- package/dist/{rollback-CmeGUxpC.mjs.map → rollback-j8X0RdpU.mjs.map} +1 -1
- package/dist/{s3-du68lLNe.cjs → s3-Ba3WIaGU.cjs} +2 -2
- package/dist/{s3-du68lLNe.cjs.map → s3-Ba3WIaGU.cjs.map} +1 -1
- package/dist/{s3-DKFFpPrS.mjs → s3-Bs1qUnxt.mjs} +2 -2
- package/dist/{s3-DKFFpPrS.mjs.map → s3-Bs1qUnxt.mjs.map} +1 -1
- package/dist/{serverSetup-BHxCT8nA.mjs → serverSetup-DUrSo7HL.mjs} +5 -5
- package/dist/{serverSetup-BHxCT8nA.mjs.map → serverSetup-DUrSo7HL.mjs.map} +1 -1
- package/dist/{serverSetup-Uk07rJqu.cjs → serverSetup-Drh_mhxR.cjs} +5 -5
- package/dist/{serverSetup-Uk07rJqu.cjs.map → serverSetup-Drh_mhxR.cjs.map} +1 -1
- package/dist/{sniffer-FQzApIZ2.mjs → sniffer-DgjWtfBW.mjs} +6 -6
- package/dist/{sniffer-FQzApIZ2.mjs.map → sniffer-DgjWtfBW.mjs.map} +1 -1
- package/dist/{sniffer-_XeLyu2-.cjs → sniffer-zsLNtFK0.cjs} +6 -6
- package/dist/{sniffer-_XeLyu2-.cjs.map → sniffer-zsLNtFK0.cjs.map} +1 -1
- package/dist/{snsSubscriptions-BCLdw-vn.mjs → snsSubscriptions-BLfWAnzg.mjs} +3 -3
- package/dist/{snsSubscriptions-BCLdw-vn.mjs.map → snsSubscriptions-BLfWAnzg.mjs.map} +1 -1
- package/dist/{snsSubscriptions-By_79DkX.cjs → snsSubscriptions-CGO6EO7H.cjs} +3 -3
- package/dist/{snsSubscriptions-By_79DkX.cjs.map → snsSubscriptions-CGO6EO7H.cjs.map} +1 -1
- package/dist/{sst-CtrAb04-.mjs → sst-B2h4rE6j.mjs} +4 -4
- package/dist/{sst-CtrAb04-.mjs.map → sst-B2h4rE6j.mjs.map} +1 -1
- package/dist/{sst--n0v4Fch.cjs → sst-Bih36ADr.cjs} +4 -4
- package/dist/{sst--n0v4Fch.cjs.map → sst-Bih36ADr.cjs.map} +1 -1
- package/dist/{stack-mqaJRhoK.cjs → stack-D0CC6_b-.cjs} +8 -6
- package/dist/{stack-mqaJRhoK.cjs.map → stack-D0CC6_b-.cjs.map} +1 -1
- package/dist/{stack-BfK0IV3V.mjs → stack-DI4qbrtn.mjs} +8 -6
- package/dist/{stack-BfK0IV3V.mjs.map → stack-DI4qbrtn.mjs.map} +1 -1
- package/dist/{stage-NGr_EzmY.cjs → stage--Z6-pM9E.cjs} +5 -5
- package/dist/{stage-NGr_EzmY.cjs.map → stage--Z6-pM9E.cjs.map} +1 -1
- package/dist/{stage-DsfVOAAA.mjs → stage-C-qe-Lye.mjs} +5 -5
- package/dist/{stage-DsfVOAAA.mjs.map → stage-C-qe-Lye.mjs.map} +1 -1
- package/dist/target/public.cjs +1 -1
- package/dist/target/public.mjs +1 -1
- package/dist/{terminal-BpzSISdv.cjs → terminal-CnhNSW3v.cjs} +2 -2
- package/dist/{terminal-BpzSISdv.cjs.map → terminal-CnhNSW3v.cjs.map} +1 -1
- package/dist/{terminal-AVJMJvk5.mjs → terminal-DtO0Eh3g.mjs} +2 -2
- package/dist/{terminal-AVJMJvk5.mjs.map → terminal-DtO0Eh3g.mjs.map} +1 -1
- package/dist/types-Bl_CwZC9.cjs.map +1 -1
- package/dist/types-Y1NfWlyG.mjs.map +1 -1
- package/package.json +15 -15
- package/dist/apps-CnTjkv-C.cjs.map +0 -1
- package/dist/apps-Dh2ito9T.mjs.map +0 -1
- package/dist/bundler-BXS0AEtM.mjs.map +0 -1
- package/dist/bundler-B_2Mxi7l.cjs.map +0 -1
- package/dist/docker-1hv2ehU4.cjs.map +0 -1
- package/dist/docker-CeGpTbYR.mjs.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -2,30 +2,30 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const require_rolldown_runtime = require("./rolldown-runtime-C0BPl7ul.cjs");
|
|
4
4
|
const require_errors = require("./errors-DMC4Umsb.cjs");
|
|
5
|
-
const require_dns = require("./dns-
|
|
6
|
-
const require_compose = require("./compose-
|
|
5
|
+
const require_dns = require("./dns-DSzsbU2g.cjs");
|
|
6
|
+
const require_compose = require("./compose-SAxadQy7.cjs");
|
|
7
7
|
const require_workspace = require("./workspace-DirP2-ed.cjs");
|
|
8
|
-
const require_apps = require("./apps-
|
|
8
|
+
const require_apps = require("./apps-CIKiSUxH.cjs");
|
|
9
9
|
const require_schemas = require("./schemas-BQ_v0lEX.cjs");
|
|
10
|
-
const require_compose$1 = require("./compose-
|
|
10
|
+
const require_compose$1 = require("./compose-D8cd13Eo.cjs");
|
|
11
11
|
const require_SubscriberGenerator = require("./SubscriberGenerator-DMi4siph.cjs");
|
|
12
12
|
const require_types = require("./types-Bl_CwZC9.cjs");
|
|
13
13
|
const require_EndpointGenerator = require("./EndpointGenerator-C1h_wExz.cjs");
|
|
14
14
|
const require_discover = require("./discover-39VKSE2i.cjs");
|
|
15
15
|
const require_config = require("./config.cjs");
|
|
16
|
-
const require_notes = require("./notes-
|
|
17
|
-
const require_stack = require("./stack-
|
|
18
|
-
const require_docker = require("./docker-
|
|
16
|
+
const require_notes = require("./notes-Cs0rVvlG.cjs");
|
|
17
|
+
const require_stack = require("./stack-D0CC6_b-.cjs");
|
|
18
|
+
const require_docker = require("./docker-aJbcdGKT.cjs");
|
|
19
19
|
const require_openapi = require("./openapi.cjs");
|
|
20
20
|
const require_appPorts = require("./appPorts-IW-OZmRi.cjs");
|
|
21
21
|
const require_drivers = require("./drivers-BhdC9Efj.cjs");
|
|
22
22
|
const require_emit = require("./emit-DiW0kbue.cjs");
|
|
23
|
-
const require_local = require("./local-
|
|
24
|
-
const require_sniffer = require("./sniffer-
|
|
25
|
-
const require_deploy = require("./deploy-
|
|
23
|
+
const require_local = require("./local-BclGW_Zo.cjs");
|
|
24
|
+
const require_sniffer = require("./sniffer-zsLNtFK0.cjs");
|
|
25
|
+
const require_deploy = require("./deploy-DnkGdwUd.cjs");
|
|
26
26
|
const require_seeds = require("./seeds-Bc3niNVb.cjs");
|
|
27
27
|
const require_credentialSchemas = require("./credentialSchemas-OVXofU-r.cjs");
|
|
28
|
-
const require_LocalStateStore = require("./LocalStateStore-
|
|
28
|
+
const require_LocalStateStore = require("./LocalStateStore-DN0_SCii.cjs");
|
|
29
29
|
const require_utils = require("./utils-D2Nk1Nv2.cjs");
|
|
30
30
|
const require_ready = require("./ready-DcD0SCnV.cjs");
|
|
31
31
|
let node_path = require("node:path");
|
|
@@ -60,7 +60,7 @@ let crypto = require("crypto");
|
|
|
60
60
|
crypto = require_rolldown_runtime.__toESM(crypto, 1);
|
|
61
61
|
let _geekmidas_constructs_topic = require("@geekmidas/constructs/topic");
|
|
62
62
|
//#region package.json
|
|
63
|
-
var version = "10.0.0-alpha.
|
|
63
|
+
var version = "10.0.0-alpha.174";
|
|
64
64
|
//#endregion
|
|
65
65
|
//#region src/prompt.ts
|
|
66
66
|
/**
|
|
@@ -143,7 +143,7 @@ const logger$8 = console;
|
|
|
143
143
|
* Validate Dokploy token by making a test API call
|
|
144
144
|
*/
|
|
145
145
|
async function validateDokployToken(endpoint, token) {
|
|
146
|
-
const { DokployApi } = await Promise.resolve().then(() => require("./sniffer-
|
|
146
|
+
const { DokployApi } = await Promise.resolve().then(() => require("./sniffer-zsLNtFK0.cjs")).then((n) => n.dokploy_api_exports);
|
|
147
147
|
return new DokployApi({
|
|
148
148
|
baseUrl: endpoint,
|
|
149
149
|
token
|
|
@@ -2442,7 +2442,7 @@ async function execCommand(commandArgs, options = {}, stageDeps) {
|
|
|
2442
2442
|
const cwd = options.cwd ?? process.cwd();
|
|
2443
2443
|
if (!commandArgs[0]) throw new NoCommandSpecified();
|
|
2444
2444
|
if (options.stage && !require_apps.isImageBuild()) {
|
|
2445
|
-
const { execOnStage } = await Promise.resolve().then(() => require("./stage-
|
|
2445
|
+
const { execOnStage } = await Promise.resolve().then(() => require("./stage--Z6-pM9E.cjs")).then((n) => n.stage_exports);
|
|
2446
2446
|
const { loadWorkspaceConfig } = await Promise.resolve().then(() => require("./config.cjs"));
|
|
2447
2447
|
const { workspace } = await loadWorkspaceConfig(cwd);
|
|
2448
2448
|
if (options.stage !== workspace.stages.local) {
|
|
@@ -2625,6 +2625,7 @@ async function devCommand(options) {
|
|
|
2625
2625
|
config,
|
|
2626
2626
|
workspaceRoot: workspace?.root ?? secretsRoot,
|
|
2627
2627
|
appRoot,
|
|
2628
|
+
app: workspaceAppName,
|
|
2628
2629
|
target: "server",
|
|
2629
2630
|
enableOpenApi,
|
|
2630
2631
|
cacheBackend: require_dns.cacheBackendFor(require_dns.providerOf(workspace ?? config)),
|
|
@@ -2686,7 +2687,7 @@ async function devCommand(options) {
|
|
|
2686
2687
|
secretsJsonPath = (0, node_path.join)(secretsDir, secretsFileName);
|
|
2687
2688
|
await (0, node_fs_promises.writeFile)(secretsJsonPath, JSON.stringify(appSecrets, null, 2));
|
|
2688
2689
|
}
|
|
2689
|
-
const devServer = new DevServer(options.port ?? workspaceAppPort ?? 3e3, options.portExplicit ?? workspaceAppPort !== void 0, enableOpenApi, telescope, initial.databaseApi, runtime, appRoot, secretsJsonPath, initial.selfServing !== void 0);
|
|
2690
|
+
const devServer = new DevServer(options.port ?? workspaceAppPort ?? 3e3, options.portExplicit ?? workspaceAppPort !== void 0, enableOpenApi, telescope, initial.databaseApi, runtime, appRoot, secretsJsonPath, initial.selfServing !== void 0, initial.serverDir);
|
|
2690
2691
|
devServer.label = workspaceAppName ?? "server";
|
|
2691
2692
|
devServer.publicUrl = publicUrl;
|
|
2692
2693
|
await devServer.start();
|
|
@@ -3017,9 +3018,9 @@ async function workspaceDevCommand(configured, options) {
|
|
|
3017
3018
|
for (const { id, port } of fakes) logger$5.log(`🎭 ${id} fake: http://localhost:${port}`);
|
|
3018
3019
|
logger$5.log(options.migrate || options.seed ? "🗄️ Migrating the databases" : "🗄️ Checking for pending migrations");
|
|
3019
3020
|
if (options.migrate || options.seed) {
|
|
3020
|
-
const { prepareDevDatabases } = await Promise.resolve().then(() => require("./migrate-
|
|
3021
|
+
const { prepareDevDatabases } = await Promise.resolve().then(() => require("./migrate-z_MuES4x.cjs"));
|
|
3021
3022
|
await prepareDevDatabases(workspace, secretsEnv, { seed: !!options.seed });
|
|
3022
|
-
} else await Promise.resolve().then(() => require("./migrate-
|
|
3023
|
+
} else await Promise.resolve().then(() => require("./migrate-z_MuES4x.cjs")).then(({ reportPendingMigrations }) => reportPendingMigrations(workspace, reconciled.env)).catch((error) => {
|
|
3023
3024
|
logger$5.log(`⚠️ Could not check for pending migrations: ${error instanceof Error ? error.message : String(error)}`);
|
|
3024
3025
|
});
|
|
3025
3026
|
const appUrls = {};
|
|
@@ -3483,11 +3484,12 @@ var DevServer = class {
|
|
|
3483
3484
|
appRoot;
|
|
3484
3485
|
secretsJsonPath;
|
|
3485
3486
|
selfServing;
|
|
3487
|
+
serverDir;
|
|
3486
3488
|
serverProcess = null;
|
|
3487
3489
|
isRunning = false;
|
|
3488
3490
|
actualPort;
|
|
3489
3491
|
startTime = Date.now();
|
|
3490
|
-
constructor(requestedPort, portExplicit, enableOpenApi, telescope, databaseApi, runtime = "node", appRoot = process.cwd(), secretsJsonPath, selfServing = false) {
|
|
3492
|
+
constructor(requestedPort, portExplicit, enableOpenApi, telescope, databaseApi, runtime = "node", appRoot = process.cwd(), secretsJsonPath, selfServing = false, serverDir = (0, node_path.join)(appRoot, ".gkm", "server")) {
|
|
3491
3493
|
this.requestedPort = requestedPort;
|
|
3492
3494
|
this.portExplicit = portExplicit;
|
|
3493
3495
|
this.enableOpenApi = enableOpenApi;
|
|
@@ -3497,6 +3499,7 @@ var DevServer = class {
|
|
|
3497
3499
|
this.appRoot = appRoot;
|
|
3498
3500
|
this.secretsJsonPath = secretsJsonPath;
|
|
3499
3501
|
this.selfServing = selfServing;
|
|
3502
|
+
this.serverDir = serverDir;
|
|
3500
3503
|
this.actualPort = requestedPort;
|
|
3501
3504
|
}
|
|
3502
3505
|
/** What the ready line calls this app. */
|
|
@@ -3522,7 +3525,7 @@ var DevServer = class {
|
|
|
3522
3525
|
this.actualPort = await require_compose$1.findAvailablePort(this.requestedPort);
|
|
3523
3526
|
if (this.actualPort !== this.requestedPort) logger$5.log(`ℹ️ Port ${this.requestedPort} was in use, using port ${this.actualPort} instead`);
|
|
3524
3527
|
}
|
|
3525
|
-
const serverEntryPath = (0, node_path.join)(this.
|
|
3528
|
+
const serverEntryPath = (0, node_path.join)(this.serverDir, "server.ts");
|
|
3526
3529
|
await this.createServerEntry();
|
|
3527
3530
|
this.serverProcess = (0, node_child_process.spawn)(...tsxCommand(this.appRoot, [
|
|
3528
3531
|
serverEntryPath,
|
|
@@ -3599,7 +3602,7 @@ var DevServer = class {
|
|
|
3599
3602
|
}
|
|
3600
3603
|
async createServerEntry() {
|
|
3601
3604
|
const { writeFile: fsWriteFile } = await import("node:fs/promises");
|
|
3602
|
-
await fsWriteFile((0, node_path.join)(this.
|
|
3605
|
+
await fsWriteFile((0, node_path.join)(this.serverDir, "server.ts"), generateServerEntryContent({
|
|
3603
3606
|
secretsJsonPath: this.secretsJsonPath,
|
|
3604
3607
|
runtime: this.runtime,
|
|
3605
3608
|
enableOpenApi: this.enableOpenApi,
|
|
@@ -3679,107 +3682,6 @@ var TopicGenerator = class extends require_discover.ConstructGenerator {
|
|
|
3679
3682
|
}
|
|
3680
3683
|
};
|
|
3681
3684
|
//#endregion
|
|
3682
|
-
//#region src/build/types.ts
|
|
3683
|
-
/**
|
|
3684
|
-
* Where `gkm dev` serves the database's read-only JSON API
|
|
3685
|
-
* (`@geekmidas/db/introspect`). Under `/__gkm` with the rest of what the dev
|
|
3686
|
-
* server adds, so it cannot collide with an application route.
|
|
3687
|
-
*/
|
|
3688
|
-
const DEV_DATABASE_API_PATH = "/__gkm/db";
|
|
3689
|
-
//#endregion
|
|
3690
|
-
//#region src/build/owners.ts
|
|
3691
|
-
/**
|
|
3692
|
-
* What a generated entry imports its runtime from, read off the discovered
|
|
3693
|
-
* constructs: the surface it serves, every construct a runnable can be built
|
|
3694
|
-
* from, and the database the dev server's JSON API reads.
|
|
3695
|
-
*
|
|
3696
|
-
* `gkm build` and `gkm dev` both write entries that import the surface for its
|
|
3697
|
-
* logger and environment parser, so both ask here. A dev server that skipped it
|
|
3698
|
-
* had nothing to import them from.
|
|
3699
|
-
*/
|
|
3700
|
-
function ownersContext(options) {
|
|
3701
|
-
const { declared, sources, workspaceRoot, appRoot, databaseApi } = options;
|
|
3702
|
-
const surfaces = restApis(declared);
|
|
3703
|
-
const primary = servedSurface(declared, workspaceRoot, appRoot) ?? surfaces.find((d) => !d.servesItself) ?? surfaces[0];
|
|
3704
|
-
const browsable = Object.entries(declared).find(([, d]) => d.kind === "database");
|
|
3705
|
-
const browsableSource = browsable ? sources[browsable[0]] : void 0;
|
|
3706
|
-
const owners = {};
|
|
3707
|
-
for (const [id, declaration] of Object.entries(declared)) {
|
|
3708
|
-
if (declaration.kind !== "rest-api" && declaration.kind !== "worker") continue;
|
|
3709
|
-
const source = sources[id];
|
|
3710
|
-
if (!source) continue;
|
|
3711
|
-
owners[id] = {
|
|
3712
|
-
specifier: source.file,
|
|
3713
|
-
exportName: source.exportName
|
|
3714
|
-
};
|
|
3715
|
-
}
|
|
3716
|
-
const primarySource = primary ? sources[primary.id] : void 0;
|
|
3717
|
-
return {
|
|
3718
|
-
owners,
|
|
3719
|
-
...primary ? { surface: {
|
|
3720
|
-
id: primary.id,
|
|
3721
|
-
trustedOriginsKey: (0, _geekmidas_manifest.providedKeyFor)(primary.id, "rest-api", "trustedOrigins"),
|
|
3722
|
-
...primary.cors ? { cors: primary.cors } : {},
|
|
3723
|
-
...primarySource ? { module: {
|
|
3724
|
-
specifier: primarySource.file,
|
|
3725
|
-
exportName: primarySource.exportName
|
|
3726
|
-
} } : {}
|
|
3727
|
-
} } : {},
|
|
3728
|
-
...databaseApi && browsableSource ? { databaseApi: {
|
|
3729
|
-
path: DEV_DATABASE_API_PATH,
|
|
3730
|
-
database: {
|
|
3731
|
-
specifier: browsableSource.file,
|
|
3732
|
-
exportName: browsableSource.exportName
|
|
3733
|
-
}
|
|
3734
|
-
} } : {}
|
|
3735
|
-
};
|
|
3736
|
-
}
|
|
3737
|
-
/**
|
|
3738
|
-
* The endpoints one surface serves.
|
|
3739
|
-
*
|
|
3740
|
-
* One glob finds every surface's endpoints, wherever their files live. A build
|
|
3741
|
-
* keeps the ones built from the surface it serves; one built from no surface at
|
|
3742
|
-
* all has nowhere else to go.
|
|
3743
|
-
*/
|
|
3744
|
-
function servedBy(endpoints, surface) {
|
|
3745
|
-
if (!surface) return endpoints;
|
|
3746
|
-
return endpoints.filter(({ construct }) => !construct.surface || construct.surface.id === surface.id);
|
|
3747
|
-
}
|
|
3748
|
-
function restApis(declared) {
|
|
3749
|
-
return Object.values(declared).filter((d) => d.kind === "rest-api");
|
|
3750
|
-
}
|
|
3751
|
-
/**
|
|
3752
|
-
* The surface whose declared `path` is the directory being built — asked of
|
|
3753
|
-
* every surface, because a workspace has several and each app's build serves
|
|
3754
|
-
* exactly one.
|
|
3755
|
-
*/
|
|
3756
|
-
function servedSurface(declared, workspaceRoot, appRoot) {
|
|
3757
|
-
return restApis(declared).find((d) => (0, node_path.resolve)(workspaceRoot, d.path) === (0, node_path.resolve)(appRoot));
|
|
3758
|
-
}
|
|
3759
|
-
/**
|
|
3760
|
-
* The declarations one process reaches: the constructs it runs as — a surface,
|
|
3761
|
-
* a worker — what each declared an edge to, and what each runnable it runs
|
|
3762
|
-
* depends on or consumes.
|
|
3763
|
-
*
|
|
3764
|
-
* What decides which drivers its entry registers: a process that reaches no
|
|
3765
|
-
* cache never resolves a cache client because another process in the
|
|
3766
|
-
* workspace does.
|
|
3767
|
-
*/
|
|
3768
|
-
function reachedBy(declared, processes, runnables) {
|
|
3769
|
-
const reached = /* @__PURE__ */ new Set();
|
|
3770
|
-
for (const id of processes) {
|
|
3771
|
-
const declaration = declared[id];
|
|
3772
|
-
if (!declaration) continue;
|
|
3773
|
-
reached.add(id);
|
|
3774
|
-
for (const edge of (0, _geekmidas_manifest.dependenciesOf)(declaration)) reached.add(edge.target);
|
|
3775
|
-
}
|
|
3776
|
-
for (const { construct } of runnables) {
|
|
3777
|
-
for (const id of construct.constructs ?? []) reached.add((0, _geekmidas_manifest.canonicalId)(id));
|
|
3778
|
-
for (const id of require_discover.consumedBy(construct)) reached.add(id);
|
|
3779
|
-
}
|
|
3780
|
-
return Object.fromEntries(Object.entries(declared).filter(([id]) => reached.has(id)));
|
|
3781
|
-
}
|
|
3782
|
-
//#endregion
|
|
3783
3685
|
//#region src/build/surfaceEntry.ts
|
|
3784
3686
|
/** Whether a construct serves itself, asked of the construct. */
|
|
3785
3687
|
function servesItself(construct) {
|
|
@@ -3794,8 +3696,8 @@ function servesItself(construct) {
|
|
|
3794
3696
|
* the construct from the outside. The construct can simply be asked.
|
|
3795
3697
|
*/
|
|
3796
3698
|
function selfServingSurface(options) {
|
|
3797
|
-
const { declared, sources, workspaceRoot, appRoot } = options;
|
|
3798
|
-
const served =
|
|
3699
|
+
const { declared, sources, workspaceRoot, appRoot, app } = options;
|
|
3700
|
+
const served = require_docker.surfaceAt(declared, workspaceRoot, appRoot, app);
|
|
3799
3701
|
const source = served ? sources[served.id] : void 0;
|
|
3800
3702
|
if (!served || !source || !servesItself(source.construct)) return void 0;
|
|
3801
3703
|
return {
|
|
@@ -3803,10 +3705,6 @@ function selfServingSurface(options) {
|
|
|
3803
3705
|
source
|
|
3804
3706
|
};
|
|
3805
3707
|
}
|
|
3806
|
-
/** The WebSocket surface whose `path` is the directory being built. */
|
|
3807
|
-
function servedWebSocketApi(declared, workspaceRoot, appRoot) {
|
|
3808
|
-
return Object.values(declared).find((d) => d.kind === "websocket-api" && (0, node_path.resolve)(workspaceRoot, d.path) === (0, node_path.resolve)(appRoot));
|
|
3809
|
-
}
|
|
3810
3708
|
/** An import specifier for `file`, from `outputDir`, as the bundle sees it. */
|
|
3811
3709
|
function specifierOf$1(outputDir, file) {
|
|
3812
3710
|
const rel = (0, node_path.relative)(outputDir, file).replace(/\.ts$/, ".js");
|
|
@@ -4069,20 +3967,26 @@ async function buildCommand(options) {
|
|
|
4069
3967
|
const workspaceRoot = (0, node_path.resolve)(loadedConfig.workspace.root);
|
|
4070
3968
|
const isAtWorkspaceRoot = cwd === workspaceRoot;
|
|
4071
3969
|
const someAppIsElsewhere = Object.values(loadedConfig.workspace.apps).some((app) => (0, node_path.resolve)(workspaceRoot, app.path) !== workspaceRoot);
|
|
4072
|
-
if (isAtWorkspaceRoot && someAppIsElsewhere) {
|
|
3970
|
+
if (isAtWorkspaceRoot && someAppIsElsewhere && !options.app) {
|
|
4073
3971
|
logger$4.log("📦 Detected workspace configuration");
|
|
4074
3972
|
return workspaceBuildCommand(loadedConfig.workspace, options);
|
|
4075
3973
|
}
|
|
4076
3974
|
}
|
|
4077
|
-
const config = loadedConfig.type !== "workspace" ?
|
|
3975
|
+
const { config, appName, appRoot } = loadedConfig.type !== "workspace" ? {
|
|
3976
|
+
config: await require_config.loadConfig(),
|
|
3977
|
+
appRoot: process.cwd()
|
|
3978
|
+
} : options.app ? namedApp(loadedConfig.workspace, options.app) : (0, node_path.resolve)(process.cwd()) === (0, node_path.resolve)(loadedConfig.workspace.root) ? {
|
|
3979
|
+
config: rootGkmConfig(loadedConfig.workspace),
|
|
3980
|
+
appRoot: process.cwd()
|
|
3981
|
+
} : await appHere();
|
|
4078
3982
|
const target = options.provider ?? require_dns.providerOf(loadedConfig.workspace);
|
|
4079
3983
|
const workspaceRoot = loadedConfig.workspace.root;
|
|
4080
|
-
const appRoot = process.cwd();
|
|
4081
3984
|
const output = await buildOneApp({
|
|
4082
3985
|
config,
|
|
4083
3986
|
options,
|
|
4084
3987
|
workspace: loadedConfig.workspace,
|
|
4085
3988
|
appRoot,
|
|
3989
|
+
...appName ? { appName } : {},
|
|
4086
3990
|
target
|
|
4087
3991
|
});
|
|
4088
3992
|
if ((0, node_path.resolve)(appRoot) === (0, node_path.resolve)(workspaceRoot)) await writeManifest({
|
|
@@ -4095,6 +3999,38 @@ async function buildCommand(options) {
|
|
|
4095
3999
|
});
|
|
4096
4000
|
return output;
|
|
4097
4001
|
}
|
|
4002
|
+
/** The app this directory is part of, by its path. */
|
|
4003
|
+
async function appHere() {
|
|
4004
|
+
const { gkmConfig, appName } = await require_config.loadAppConfig();
|
|
4005
|
+
return {
|
|
4006
|
+
config: gkmConfig,
|
|
4007
|
+
appName,
|
|
4008
|
+
appRoot: process.cwd()
|
|
4009
|
+
};
|
|
4010
|
+
}
|
|
4011
|
+
/** The app `--app` names, built from its own directory. */
|
|
4012
|
+
function namedApp(workspace, appName) {
|
|
4013
|
+
const app = workspace.apps[appName];
|
|
4014
|
+
if (!app) throw new UnknownBuildApp(appName, Object.keys(workspace.apps));
|
|
4015
|
+
const config = require_workspace.getAppGkmConfig(workspace, appName);
|
|
4016
|
+
if (!config) throw new require_config.NotABackendApp(appName);
|
|
4017
|
+
return {
|
|
4018
|
+
config,
|
|
4019
|
+
appName,
|
|
4020
|
+
appRoot: (0, node_path.join)(workspace.root, app.path)
|
|
4021
|
+
};
|
|
4022
|
+
}
|
|
4023
|
+
/** `--app` named no app in the workspace. */
|
|
4024
|
+
var UnknownBuildApp = class extends require_errors.GkmError {
|
|
4025
|
+
app;
|
|
4026
|
+
apps;
|
|
4027
|
+
constructor(app, apps) {
|
|
4028
|
+
super(`'${app}' is not an app in this workspace. Pass --app with one of: ${apps.join(", ")}.`);
|
|
4029
|
+
this.app = app;
|
|
4030
|
+
this.apps = apps;
|
|
4031
|
+
this.name = "UnknownBuildApp";
|
|
4032
|
+
}
|
|
4033
|
+
};
|
|
4098
4034
|
/** What the workspace declares, read through a config's globs. */
|
|
4099
4035
|
async function declaredIn(config, cwd) {
|
|
4100
4036
|
return require_discover.discover({
|
|
@@ -4114,7 +4050,7 @@ function backendsOf(workspace) {
|
|
|
4114
4050
|
}
|
|
4115
4051
|
/** One app's build, from its config and the command's options. */
|
|
4116
4052
|
async function buildOneApp(input) {
|
|
4117
|
-
const { config, options, workspace, appRoot, target } = input;
|
|
4053
|
+
const { config, options, workspace, appRoot, appName, target } = input;
|
|
4118
4054
|
const cacheBackend = options.cache ?? require_dns.cacheBackendFor(require_dns.providerOf(workspace));
|
|
4119
4055
|
const eventsBackend = require_dns.eventsBackendFor(require_dns.providerOf(workspace));
|
|
4120
4056
|
const production = normalizeProductionConfig(options.production ?? false);
|
|
@@ -4129,6 +4065,7 @@ async function buildOneApp(input) {
|
|
|
4129
4065
|
config,
|
|
4130
4066
|
workspaceRoot: workspace.root,
|
|
4131
4067
|
appRoot,
|
|
4068
|
+
...appName ? { app: appName } : {},
|
|
4132
4069
|
target,
|
|
4133
4070
|
enableOpenApi: options.enableOpenApi ?? false,
|
|
4134
4071
|
cacheBackend,
|
|
@@ -4187,6 +4124,7 @@ async function writeManifest(input) {
|
|
|
4187
4124
|
async function buildApp(input) {
|
|
4188
4125
|
const { config, workspaceRoot, appRoot, target, enableOpenApi, cacheBackend, eventsBackend, production, telescope, databaseApi, hooks, bustCache = false } = input;
|
|
4189
4126
|
const constructGlobs = config.constructs;
|
|
4127
|
+
const appName = appNameOf(input);
|
|
4190
4128
|
const constructSources = {};
|
|
4191
4129
|
const background = {};
|
|
4192
4130
|
const served = {};
|
|
@@ -4198,32 +4136,36 @@ async function buildApp(input) {
|
|
|
4198
4136
|
background,
|
|
4199
4137
|
served
|
|
4200
4138
|
}) : {};
|
|
4139
|
+
const tree = require_docker.sharedDirectoryTree(declared, workspaceRoot, appRoot, appName);
|
|
4140
|
+
const outputOf = (target) => require_docker.appOutputDir(appRoot, target, tree);
|
|
4141
|
+
const serverDir = outputOf("server");
|
|
4201
4142
|
const selfServing = selfServingSurface({
|
|
4202
4143
|
declared,
|
|
4203
4144
|
sources: constructSources,
|
|
4204
4145
|
workspaceRoot,
|
|
4205
|
-
appRoot
|
|
4146
|
+
appRoot,
|
|
4147
|
+
app: appName
|
|
4206
4148
|
});
|
|
4207
4149
|
if (selfServing) {
|
|
4208
|
-
await writeSurfaceEntry(
|
|
4150
|
+
await writeSurfaceEntry(serverDir, selfServing.source, served[selfServing.id] ?? []);
|
|
4209
4151
|
const telemetry = require_EndpointGenerator.telemetryFor({
|
|
4210
4152
|
node: require_compose$1.telemetryOf(declared, selfServing.id),
|
|
4211
4153
|
appRoot,
|
|
4212
|
-
app:
|
|
4154
|
+
app: appName,
|
|
4213
4155
|
cwd: workspaceRoot,
|
|
4214
4156
|
serviceName: selfServing.id,
|
|
4215
4157
|
...input.workspaceName && { workspaceName: input.workspaceName }
|
|
4216
4158
|
});
|
|
4217
|
-
await require_EndpointGenerator.writeTelemetryModule(
|
|
4159
|
+
await require_EndpointGenerator.writeTelemetryModule(serverDir, telemetry);
|
|
4218
4160
|
logger$4.log(`Generated a server for ${selfServing.id} from its own declaration`);
|
|
4219
4161
|
if (production?.bundle && !input.skipBundle) {
|
|
4220
|
-
const outputDir =
|
|
4162
|
+
const outputDir = serverDir;
|
|
4221
4163
|
const entryPoint = await writeSurfaceServer(outputDir, {
|
|
4222
4164
|
...production,
|
|
4223
4165
|
...telemetry ? { telemetry } : {},
|
|
4224
4166
|
trustedOriginsKey: (0, _geekmidas_manifest.providedKeyFor)(selfServing.id, "rest-api", "trustedOrigins")
|
|
4225
4167
|
});
|
|
4226
|
-
const { bundleServer } = await Promise.resolve().then(() => require("./bundler-
|
|
4168
|
+
const { bundleServer } = await Promise.resolve().then(() => require("./bundler-CMieQ_0t.cjs"));
|
|
4227
4169
|
await bundleServer({
|
|
4228
4170
|
entryPoint,
|
|
4229
4171
|
outputDir: (0, node_path.join)(outputDir, "dist"),
|
|
@@ -4232,12 +4174,12 @@ async function buildApp(input) {
|
|
|
4232
4174
|
external: production.external,
|
|
4233
4175
|
...input.stage ? { stage: input.stage } : {}
|
|
4234
4176
|
});
|
|
4235
|
-
logger$4.log(`✅ Bundle complete: .
|
|
4177
|
+
logger$4.log(`✅ Bundle complete: ${(0, node_path.relative)(appRoot, (0, node_path.join)(outputDir, "dist", "server.mjs"))}`);
|
|
4236
4178
|
}
|
|
4237
4179
|
const surface = declared[selfServing.id];
|
|
4238
4180
|
if (target === "aws" && surface?.kind === "websocket-api") {
|
|
4239
4181
|
const websocketRoutes = await writeWebSocketLambdas({
|
|
4240
|
-
outputDir: (
|
|
4182
|
+
outputDir: outputOf("aws"),
|
|
4241
4183
|
appRoot,
|
|
4242
4184
|
workspaceRoot,
|
|
4243
4185
|
surface: selfServing.source,
|
|
@@ -4246,6 +4188,7 @@ async function buildApp(input) {
|
|
|
4246
4188
|
logger$4.log(`Generated ${websocketRoutes.length} API Gateway handlers for ${selfServing.id}`);
|
|
4247
4189
|
return {
|
|
4248
4190
|
selfServing: selfServing.id,
|
|
4191
|
+
serverDir,
|
|
4249
4192
|
built: {
|
|
4250
4193
|
surface: selfServing.id,
|
|
4251
4194
|
routes: [],
|
|
@@ -4257,13 +4200,17 @@ async function buildApp(input) {
|
|
|
4257
4200
|
}
|
|
4258
4201
|
};
|
|
4259
4202
|
}
|
|
4260
|
-
return {
|
|
4203
|
+
return {
|
|
4204
|
+
selfServing: selfServing.id,
|
|
4205
|
+
serverDir
|
|
4206
|
+
};
|
|
4261
4207
|
}
|
|
4262
|
-
const derived = ownersContext({
|
|
4208
|
+
const derived = require_docker.ownersContext({
|
|
4263
4209
|
declared,
|
|
4264
4210
|
sources: constructSources,
|
|
4265
4211
|
workspaceRoot,
|
|
4266
4212
|
appRoot,
|
|
4213
|
+
app: appName,
|
|
4267
4214
|
databaseApi
|
|
4268
4215
|
});
|
|
4269
4216
|
const buildContext = {
|
|
@@ -4291,8 +4238,7 @@ async function buildApp(input) {
|
|
|
4291
4238
|
queueGenerator.load(code, appRoot, bustCache),
|
|
4292
4239
|
topicGenerator.load(code, appRoot, bustCache)
|
|
4293
4240
|
]);
|
|
4294
|
-
const allEndpoints = servedBy(loadedEndpoints, derived.surface);
|
|
4295
|
-
const appName = appNameOf(input);
|
|
4241
|
+
const allEndpoints = require_docker.servedBy(loadedEndpoints, derived.surface);
|
|
4296
4242
|
const hosted = require_apps.workerUnits(input.workspace, declared, background).filter((unit) => unit.app === appName);
|
|
4297
4243
|
const hostedIds = new Set(hosted.map((unit) => unit.id));
|
|
4298
4244
|
const appRootAbs = (0, node_path.resolve)(appRoot);
|
|
@@ -4314,7 +4260,7 @@ async function buildApp(input) {
|
|
|
4314
4260
|
queues: hostedQueues,
|
|
4315
4261
|
subscribers: hostedSubscribers
|
|
4316
4262
|
};
|
|
4317
|
-
const reach = derived.surface ? reachedBy(declared, [
|
|
4263
|
+
const reach = derived.surface ? require_docker.reachedBy(declared, [
|
|
4318
4264
|
derived.surface.id,
|
|
4319
4265
|
...servesOnly ? [] : hosted.map((unit) => unit.id),
|
|
4320
4266
|
...production?.enabled ? [] : hostedUnits.flatMap((unit) => {
|
|
@@ -4339,7 +4285,7 @@ async function buildApp(input) {
|
|
|
4339
4285
|
if (target === "server") buildContext.telemetry = require_EndpointGenerator.telemetryFor({
|
|
4340
4286
|
node: processTelemetry(declared, derived.surface?.id, servesOnly ? [] : hosted.map((unit) => unit.id)),
|
|
4341
4287
|
appRoot,
|
|
4342
|
-
app:
|
|
4288
|
+
app: appName,
|
|
4343
4289
|
cwd: workspaceRoot,
|
|
4344
4290
|
serviceName: derived.surface?.id ?? (0, node_path.basename)(appRoot),
|
|
4345
4291
|
...input.workspaceName && { workspaceName: input.workspaceName },
|
|
@@ -4353,23 +4299,23 @@ async function buildApp(input) {
|
|
|
4353
4299
|
logger$4.log(`Found ${allTopics.length} topics`);
|
|
4354
4300
|
if (!input.serveEmpty && allEndpoints.length === 0 && allFunctions.length === 0 && allCrons.length === 0 && allSubscribers.length === 0 && allQueues.length === 0 && allTopics.length === 0) {
|
|
4355
4301
|
logger$4.log("No endpoints, functions, crons, subscribers, queues, or topics found to process");
|
|
4356
|
-
return {};
|
|
4302
|
+
return { serverDir };
|
|
4357
4303
|
}
|
|
4358
4304
|
if (servesOnly && production) buildContext.production = {
|
|
4359
4305
|
...production,
|
|
4360
4306
|
subscribers: "exclude"
|
|
4361
4307
|
};
|
|
4362
4308
|
if (target === "server" && !production?.enabled && hostedProcessors.length) {
|
|
4363
|
-
await processorGenerator.buildDev(
|
|
4309
|
+
await processorGenerator.buildDev(serverDir, hostedProcessors);
|
|
4364
4310
|
buildContext.devProcessors = true;
|
|
4365
4311
|
}
|
|
4366
|
-
const result = await buildForTarget(target, buildContext, appRoot, workspaceRoot, endpointGenerator, functionGenerator, cronGenerator, subscriberGenerator, queueGenerator, topicGenerator, allEndpoints, allFunctions, inProcess.crons, inProcess.subscribers, inProcess.queues, allTopics, enableOpenApi, input.skipBundle ?? false, input.stage);
|
|
4312
|
+
const result = await buildForTarget(target, buildContext, appRoot, outputOf(target), workspaceRoot, endpointGenerator, functionGenerator, cronGenerator, subscriberGenerator, queueGenerator, topicGenerator, allEndpoints, allFunctions, inProcess.crons, inProcess.subscribers, inProcess.queues, allTopics, enableOpenApi, input.skipBundle ?? false, input.stage);
|
|
4367
4313
|
if (target === "server" && production?.enabled) await buildWorkers({
|
|
4368
4314
|
context: (workerId, work) => ({
|
|
4369
4315
|
...buildContext,
|
|
4370
4316
|
...runtimeDrivers({
|
|
4371
4317
|
appRoot,
|
|
4372
|
-
reach: reachedBy(declared, [workerId], work),
|
|
4318
|
+
reach: require_docker.reachedBy(declared, [workerId], work),
|
|
4373
4319
|
cacheBackend,
|
|
4374
4320
|
eventsBackend,
|
|
4375
4321
|
target
|
|
@@ -4378,13 +4324,13 @@ async function buildApp(input) {
|
|
|
4378
4324
|
telemetry: (workerId) => require_EndpointGenerator.telemetryFor({
|
|
4379
4325
|
node: require_compose$1.telemetryOf(declared, workerId),
|
|
4380
4326
|
appRoot,
|
|
4381
|
-
app:
|
|
4327
|
+
app: appName,
|
|
4382
4328
|
cwd: workspaceRoot,
|
|
4383
4329
|
serviceName: workerId,
|
|
4384
4330
|
...input.workspaceName && { workspaceName: input.workspaceName }
|
|
4385
4331
|
}),
|
|
4386
4332
|
workers: hosted,
|
|
4387
|
-
serverDir
|
|
4333
|
+
serverDir,
|
|
4388
4334
|
crons: hostedCrons,
|
|
4389
4335
|
queues: hostedQueues,
|
|
4390
4336
|
subscribers: hostedSubscribers,
|
|
@@ -4392,19 +4338,19 @@ async function buildApp(input) {
|
|
|
4392
4338
|
...input.stage ? { stage: input.stage } : {}
|
|
4393
4339
|
});
|
|
4394
4340
|
let processors = [];
|
|
4395
|
-
if (target === "aws") processors = await processorGenerator.build(buildContext, hostedProcessors, (
|
|
4341
|
+
if (target === "aws") processors = await processorGenerator.build(buildContext, hostedProcessors, outputOf(target), {
|
|
4396
4342
|
target,
|
|
4397
4343
|
root: workspaceRoot
|
|
4398
4344
|
});
|
|
4399
4345
|
else if (production?.enabled) processors = await buildProcessors({
|
|
4400
4346
|
context: buildContext,
|
|
4401
4347
|
units: hostedUnits.map((unit) => unit.id),
|
|
4402
|
-
serverDir
|
|
4348
|
+
serverDir,
|
|
4403
4349
|
processors: hostedProcessors,
|
|
4404
4350
|
telemetry: (fileServerId) => require_EndpointGenerator.telemetryFor({
|
|
4405
4351
|
node: require_compose$1.telemetryOf(declared, fileServerId),
|
|
4406
4352
|
appRoot,
|
|
4407
|
-
app:
|
|
4353
|
+
app: appName,
|
|
4408
4354
|
cwd: workspaceRoot,
|
|
4409
4355
|
serviceName: fileServerId,
|
|
4410
4356
|
...input.workspaceName && { workspaceName: input.workspaceName }
|
|
@@ -4430,6 +4376,7 @@ async function buildApp(input) {
|
|
|
4430
4376
|
});
|
|
4431
4377
|
return {
|
|
4432
4378
|
...result,
|
|
4379
|
+
serverDir,
|
|
4433
4380
|
...buildContext.databaseApi ? { databaseApi: buildContext.databaseApi.path } : {},
|
|
4434
4381
|
...!servesOnly && hosted.length > 0 ? { workers: hosted.map((unit) => unit.id) } : {}
|
|
4435
4382
|
};
|
|
@@ -4493,7 +4440,7 @@ async function buildWorkers(input) {
|
|
|
4493
4440
|
});
|
|
4494
4441
|
logger$4.log(`Generated worker ${worker.id}: ${crons.length} crons, ${queues.length} queues, ${subscribers.length} subscribers`);
|
|
4495
4442
|
if (!input.bundle) continue;
|
|
4496
|
-
const { bundleServer } = await Promise.resolve().then(() => require("./bundler-
|
|
4443
|
+
const { bundleServer } = await Promise.resolve().then(() => require("./bundler-CMieQ_0t.cjs"));
|
|
4497
4444
|
const outfile = require_docker.workerBundleName(worker.id);
|
|
4498
4445
|
await bundleServer({
|
|
4499
4446
|
entryPoint,
|
|
@@ -4509,7 +4456,7 @@ async function buildWorkers(input) {
|
|
|
4509
4456
|
...subscribers
|
|
4510
4457
|
].map((c) => c.construct)
|
|
4511
4458
|
});
|
|
4512
|
-
logger$4.log(`✅ Bundle complete: .
|
|
4459
|
+
logger$4.log(`✅ Bundle complete: ${(0, node_path.relative)(process.cwd(), (0, node_path.join)(input.serverDir, "dist", outfile))}`);
|
|
4513
4460
|
}
|
|
4514
4461
|
}
|
|
4515
4462
|
/**
|
|
@@ -4535,7 +4482,7 @@ async function buildProcessors(input) {
|
|
|
4535
4482
|
for (const { key, construct } of processors) infos.push(await require_docker.processorInfo(key, construct, handler, context));
|
|
4536
4483
|
logger$4.log(`Generated processors for ${fileServerId}: ${processors.map(({ key }) => key).join(", ")}`);
|
|
4537
4484
|
if (!input.bundle) continue;
|
|
4538
|
-
const { bundleServer } = await Promise.resolve().then(() => require("./bundler-
|
|
4485
|
+
const { bundleServer } = await Promise.resolve().then(() => require("./bundler-CMieQ_0t.cjs"));
|
|
4539
4486
|
const outfile = require_docker.processorBundleName(fileServerId);
|
|
4540
4487
|
await bundleServer({
|
|
4541
4488
|
entryPoint,
|
|
@@ -4547,7 +4494,7 @@ async function buildProcessors(input) {
|
|
|
4547
4494
|
...input.stage ? { stage: input.stage } : {},
|
|
4548
4495
|
constructs: processors.map((p) => p.construct)
|
|
4549
4496
|
});
|
|
4550
|
-
logger$4.log(`✅ Bundle complete: .
|
|
4497
|
+
logger$4.log(`✅ Bundle complete: ${(0, node_path.relative)(process.cwd(), (0, node_path.join)(input.serverDir, "dist", outfile))}`);
|
|
4551
4498
|
}
|
|
4552
4499
|
return infos;
|
|
4553
4500
|
}
|
|
@@ -4563,12 +4510,15 @@ function clientTelemetry(options) {
|
|
|
4563
4510
|
const sampleRate = require_workspace.stageSampleRate(options.telemetry, options.stage ?? "", local);
|
|
4564
4511
|
return sampleRate === void 0 ? {} : { telemetry: { sampleRate } };
|
|
4565
4512
|
}
|
|
4566
|
-
/**
|
|
4513
|
+
/**
|
|
4514
|
+
* The app being built: the one the caller named, else the workspace app
|
|
4515
|
+
* whose path is the directory, else the directory's own name.
|
|
4516
|
+
*/
|
|
4567
4517
|
function appNameOf(input) {
|
|
4518
|
+
if (input.app) return input.app;
|
|
4568
4519
|
return (input.workspace ? Object.entries(input.workspace.apps).find(([, app]) => (0, node_path.resolve)(input.workspace.root, app.path) === (0, node_path.resolve)(input.appRoot))?.[0] : void 0) ?? (0, node_path.basename)(input.appRoot);
|
|
4569
4520
|
}
|
|
4570
|
-
async function buildForTarget(target, context, appRoot, workspaceRoot, endpointGenerator, functionGenerator, cronGenerator, subscriberGenerator, queueGenerator, topicGenerator, endpoints, functions, crons, subscribers, queues, topics, enableOpenApi, skipBundle, stage) {
|
|
4571
|
-
const outputDir = (0, node_path.join)(appRoot, ".gkm", target);
|
|
4521
|
+
async function buildForTarget(target, context, appRoot, outputDir, workspaceRoot, endpointGenerator, functionGenerator, cronGenerator, subscriberGenerator, queueGenerator, topicGenerator, endpoints, functions, crons, subscribers, queues, topics, enableOpenApi, skipBundle, stage) {
|
|
4572
4522
|
await Promise.all([...SUPERSEDED_OUTPUT.map((dir) => (0, node_path.join)(appRoot, ".gkm", dir)), ...appRoot === workspaceRoot ? [] : [(0, node_path.join)(appRoot, ".gkm", "manifest")]].map((dir) => (0, node_fs_promises.rm)(dir, {
|
|
4573
4523
|
recursive: true,
|
|
4574
4524
|
force: true
|
|
@@ -4618,7 +4568,7 @@ async function buildForTarget(target, context, appRoot, workspaceRoot, endpointG
|
|
|
4618
4568
|
let masterKey;
|
|
4619
4569
|
if (context.production?.bundle && !skipBundle) {
|
|
4620
4570
|
logger$4.log(`\n📦 Bundling production server...`);
|
|
4621
|
-
const { bundleServer } = await Promise.resolve().then(() => require("./bundler-
|
|
4571
|
+
const { bundleServer } = await Promise.resolve().then(() => require("./bundler-CMieQ_0t.cjs"));
|
|
4622
4572
|
const allConstructs = [
|
|
4623
4573
|
...endpoints.map((e) => e.construct),
|
|
4624
4574
|
...functions.map((f) => f.construct),
|
|
@@ -4635,7 +4585,7 @@ async function buildForTarget(target, context, appRoot, workspaceRoot, endpointG
|
|
|
4635
4585
|
stage,
|
|
4636
4586
|
constructs: allConstructs
|
|
4637
4587
|
})).masterKey;
|
|
4638
|
-
logger$4.log(`✅ Bundle complete: .
|
|
4588
|
+
logger$4.log(`✅ Bundle complete: ${(0, node_path.relative)(appRoot, (0, node_path.join)(outputDir, "dist", "server.mjs"))}`);
|
|
4639
4589
|
if (masterKey) {
|
|
4640
4590
|
const keyPath = (0, node_path.join)(outputDir, MASTER_KEY_FILE);
|
|
4641
4591
|
await (0, node_fs_promises.writeFile)(keyPath, `${masterKey}\n`, { mode: 384 });
|
|
@@ -4762,6 +4712,7 @@ async function workspaceBuildCommand(workspace, options) {
|
|
|
4762
4712
|
options,
|
|
4763
4713
|
workspace,
|
|
4764
4714
|
appRoot: (0, node_path.join)(workspace.root, app.path),
|
|
4715
|
+
appName,
|
|
4765
4716
|
target
|
|
4766
4717
|
});
|
|
4767
4718
|
if (output.built) builds.push(output.built);
|
|
@@ -4896,7 +4847,7 @@ async function composeCommand(options, deps = {}) {
|
|
|
4896
4847
|
["tag", "--tag"]
|
|
4897
4848
|
].find(([key]) => options[key] !== void 0 && options[key] !== false)?.[1];
|
|
4898
4849
|
if (flag) throw new ComposeDestroyConflict(flag);
|
|
4899
|
-
const { composeDestroyCommand } = await Promise.resolve().then(() => require("./destroy-
|
|
4850
|
+
const { composeDestroyCommand } = await Promise.resolve().then(() => require("./destroy-Qb0MuIV4.cjs"));
|
|
4900
4851
|
await composeDestroyCommand({
|
|
4901
4852
|
stage: options.stage,
|
|
4902
4853
|
...options.cwd ? { cwd: options.cwd } : {},
|
|
@@ -4914,7 +4865,7 @@ async function composeCommand(options, deps = {}) {
|
|
|
4914
4865
|
const { workspace } = loaded;
|
|
4915
4866
|
const { stage } = options;
|
|
4916
4867
|
if (options.down) {
|
|
4917
|
-
const { composeStackRef } = await Promise.resolve().then(() => require("./destroy-
|
|
4868
|
+
const { composeStackRef } = await Promise.resolve().then(() => require("./destroy-Qb0MuIV4.cjs"));
|
|
4918
4869
|
const { ref, dir, server } = await composeStackRef(workspace, stage);
|
|
4919
4870
|
const docker = deps.docker ?? require_compose.dockerCompose;
|
|
4920
4871
|
if (server) console.log(`→ ${require_compose.sshTarget(server)} (docker over ssh)`);
|
|
@@ -6495,25 +6446,25 @@ function loadPackageJson() {
|
|
|
6495
6446
|
* Run: pnpm --filter @geekmidas/cli sync-versions
|
|
6496
6447
|
*/
|
|
6497
6448
|
const GEEKMIDAS_VERSIONS = {
|
|
6498
|
-
"@geekmidas/audit": ">=10.0.0-alpha.
|
|
6499
|
-
"@geekmidas/auth": ">=10.0.0-alpha.
|
|
6500
|
-
"@geekmidas/cache": ">=10.0.0-alpha.
|
|
6501
|
-
"@geekmidas/client": ">=10.0.0-alpha.
|
|
6502
|
-
"@geekmidas/cloud": ">=10.0.0-alpha.
|
|
6503
|
-
"@geekmidas/constructs": ">=10.0.0-alpha.
|
|
6504
|
-
"@geekmidas/db": ">=10.0.0-alpha.
|
|
6505
|
-
"@geekmidas/emailkit": ">=10.0.0-alpha.
|
|
6506
|
-
"@geekmidas/envkit": ">=10.0.0-alpha.
|
|
6507
|
-
"@geekmidas/errors": ">=10.0.0-alpha.
|
|
6508
|
-
"@geekmidas/events": ">=10.0.0-alpha.
|
|
6509
|
-
"@geekmidas/logger": ">=10.0.0-alpha.
|
|
6510
|
-
"@geekmidas/manifest": ">=10.0.0-alpha.
|
|
6511
|
-
"@geekmidas/rate-limit": ">=10.0.0-alpha.
|
|
6512
|
-
"@geekmidas/schema": ">=10.0.0-alpha.
|
|
6513
|
-
"@geekmidas/services": ">=10.0.0-alpha.
|
|
6514
|
-
"@geekmidas/storage": ">=10.0.0-alpha.
|
|
6515
|
-
"@geekmidas/telescope": ">=10.0.0-alpha.
|
|
6516
|
-
"@geekmidas/testkit": ">=10.0.0-alpha.
|
|
6449
|
+
"@geekmidas/audit": ">=10.0.0-alpha.174 <10.0.0",
|
|
6450
|
+
"@geekmidas/auth": ">=10.0.0-alpha.174 <10.0.0",
|
|
6451
|
+
"@geekmidas/cache": ">=10.0.0-alpha.174 <10.0.0",
|
|
6452
|
+
"@geekmidas/client": ">=10.0.0-alpha.174 <10.0.0",
|
|
6453
|
+
"@geekmidas/cloud": ">=10.0.0-alpha.174 <10.0.0",
|
|
6454
|
+
"@geekmidas/constructs": ">=10.0.0-alpha.174 <10.0.0",
|
|
6455
|
+
"@geekmidas/db": ">=10.0.0-alpha.174 <10.0.0",
|
|
6456
|
+
"@geekmidas/emailkit": ">=10.0.0-alpha.174 <10.0.0",
|
|
6457
|
+
"@geekmidas/envkit": ">=10.0.0-alpha.174 <10.0.0",
|
|
6458
|
+
"@geekmidas/errors": ">=10.0.0-alpha.174 <10.0.0",
|
|
6459
|
+
"@geekmidas/events": ">=10.0.0-alpha.174 <10.0.0",
|
|
6460
|
+
"@geekmidas/logger": ">=10.0.0-alpha.174 <10.0.0",
|
|
6461
|
+
"@geekmidas/manifest": ">=10.0.0-alpha.174 <10.0.0",
|
|
6462
|
+
"@geekmidas/rate-limit": ">=10.0.0-alpha.174 <10.0.0",
|
|
6463
|
+
"@geekmidas/schema": ">=10.0.0-alpha.174 <10.0.0",
|
|
6464
|
+
"@geekmidas/services": ">=10.0.0-alpha.174 <10.0.0",
|
|
6465
|
+
"@geekmidas/storage": ">=10.0.0-alpha.174 <10.0.0",
|
|
6466
|
+
"@geekmidas/telescope": ">=10.0.0-alpha.174 <10.0.0",
|
|
6467
|
+
"@geekmidas/testkit": ">=10.0.0-alpha.174 <10.0.0",
|
|
6517
6468
|
"@geekmidas/cli": versionRange(loadPackageJson().version)
|
|
6518
6469
|
};
|
|
6519
6470
|
//#endregion
|
|
@@ -7706,7 +7657,7 @@ const COMMIT = /^[0-9a-f]{40}$/;
|
|
|
7706
7657
|
* The `uses:` value for the stages action, with a comment saying which CLI
|
|
7707
7658
|
* release the pinned commit is.
|
|
7708
7659
|
*/
|
|
7709
|
-
function stagesActionUses(commit = "
|
|
7660
|
+
function stagesActionUses(commit = "aeadef4c851eb294b367b692e6c5935a3ef45e71", version = cliVersion()) {
|
|
7710
7661
|
return commit && COMMIT.test(commit) ? `${STAGES_ACTION}@${commit} # @geekmidas/cli ${version}` : `${STAGES_ACTION}@main # pin to a commit SHA: see the action's README`;
|
|
7711
7662
|
}
|
|
7712
7663
|
//#endregion
|
|
@@ -16678,7 +16629,7 @@ function testDatabases(reconciled) {
|
|
|
16678
16629
|
* starts without the reference data the app needs.
|
|
16679
16630
|
*/
|
|
16680
16631
|
async function migrateTestStage(workspace, env) {
|
|
16681
|
-
const { migrateAndSeed } = await Promise.resolve().then(() => require("./migrate-
|
|
16632
|
+
const { migrateAndSeed } = await Promise.resolve().then(() => require("./migrate-z_MuES4x.cjs"));
|
|
16682
16633
|
const { discover } = await Promise.resolve().then(() => require("./discover-39VKSE2i.cjs")).then((n) => n.discover_exports);
|
|
16683
16634
|
const sources = {};
|
|
16684
16635
|
const manifest = await discover({
|
|
@@ -17070,7 +17021,7 @@ program.command("setup").description("Set this machine up for the workspace, onc
|
|
|
17070
17021
|
exitWithError(error);
|
|
17071
17022
|
}
|
|
17072
17023
|
});
|
|
17073
|
-
program.command("build").description("Build handlers and the manifest from declared constructs").option("--provider <provider>", "Build for aws or server (default: where gkm.config.ts deploys)").option("--enable-openapi", "Enable OpenAPI documentation generation for server builds").option("--production", "Build for production (no dev tools, bundled output)").option("--skip-bundle", "Skip bundling step in production build").option("--stage <stage>", "Inject encrypted secrets for deployment stage").option("--mark-optional", "Suffix optional env vars with ? in manifest envVars field (e.g. PORT?)").addOption(new commander.Option("--cache <backend>", "Register the drivers for this cache backend rather than the target default").hideHelp()).action(async (options) => {
|
|
17024
|
+
program.command("build").description("Build handlers and the manifest from declared constructs").option("--provider <provider>", "Build for aws or server (default: where gkm.config.ts deploys)").option("--enable-openapi", "Enable OpenAPI documentation generation for server builds").option("--production", "Build for production (no dev tools, bundled output)").option("--skip-bundle", "Skip bundling step in production build").option("--stage <stage>", "Inject encrypted secrets for deployment stage").option("--app <name>", "Build this workspace app, where its directory holds more than one").option("--mark-optional", "Suffix optional env vars with ? in manifest envVars field (e.g. PORT?)").addOption(new commander.Option("--cache <backend>", "Register the drivers for this cache backend rather than the target default").hideHelp()).action(async (options) => {
|
|
17074
17025
|
try {
|
|
17075
17026
|
const globalOptions = program.opts();
|
|
17076
17027
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
@@ -17079,6 +17030,7 @@ program.command("build").description("Build handlers and the manifest from decla
|
|
|
17079
17030
|
await buildCommand({
|
|
17080
17031
|
...options.provider ? { provider: options.provider } : {},
|
|
17081
17032
|
...options.cache ? { cache: options.cache } : {},
|
|
17033
|
+
...options.app ? { app: options.app } : {},
|
|
17082
17034
|
enableOpenApi: options.enableOpenapi || false,
|
|
17083
17035
|
production: options.production || false,
|
|
17084
17036
|
skipBundle: options.skipBundle || false,
|
|
@@ -17131,7 +17083,7 @@ program.command("eas:sync").description("Set up a mobile app's EAS project for a
|
|
|
17131
17083
|
try {
|
|
17132
17084
|
const globalOptions = program.opts();
|
|
17133
17085
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
17134
|
-
const { easSync } = await Promise.resolve().then(() => require("./eas-
|
|
17086
|
+
const { easSync } = await Promise.resolve().then(() => require("./eas-DvKir935.cjs"));
|
|
17135
17087
|
await easSync(options);
|
|
17136
17088
|
} catch (error) {
|
|
17137
17089
|
exitWithError(error);
|
|
@@ -17141,7 +17093,7 @@ program.command("publish").description("Ship a mobile app for a deployed stage:
|
|
|
17141
17093
|
try {
|
|
17142
17094
|
const globalOptions = program.opts();
|
|
17143
17095
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
17144
|
-
const { publish, PublishModeConflict } = await Promise.resolve().then(() => require("./publish-
|
|
17096
|
+
const { publish, PublishModeConflict } = await Promise.resolve().then(() => require("./publish-DzMQWBW8.cjs"));
|
|
17145
17097
|
if (options.build && options.update) throw new PublishModeConflict();
|
|
17146
17098
|
const { build, update, ...rest } = options;
|
|
17147
17099
|
await publish({
|
|
@@ -17157,7 +17109,7 @@ program.command("deploy:google-play").description("Let EAS Submit publish a mobi
|
|
|
17157
17109
|
try {
|
|
17158
17110
|
const globalOptions = program.opts();
|
|
17159
17111
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
17160
|
-
const { deployGooglePlay } = await Promise.resolve().then(() => require("./googlePlay-
|
|
17112
|
+
const { deployGooglePlay } = await Promise.resolve().then(() => require("./googlePlay-FCJulaVY.cjs"));
|
|
17161
17113
|
await deployGooglePlay(options);
|
|
17162
17114
|
} catch (error) {
|
|
17163
17115
|
exitWithError(error);
|
|
@@ -17179,7 +17131,7 @@ program.command("migrate").description("Apply each database construct's migratio
|
|
|
17179
17131
|
try {
|
|
17180
17132
|
const globalOptions = program.opts();
|
|
17181
17133
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
17182
|
-
const { migrateCommand } = await Promise.resolve().then(() => require("./migrate-
|
|
17134
|
+
const { migrateCommand } = await Promise.resolve().then(() => require("./migrate-z_MuES4x.cjs"));
|
|
17183
17135
|
await migrateCommand({
|
|
17184
17136
|
...options,
|
|
17185
17137
|
...construct ? { construct } : {}
|
|
@@ -17192,7 +17144,7 @@ program.command("seed").description("Migrate, then run each database construct's
|
|
|
17192
17144
|
try {
|
|
17193
17145
|
const globalOptions = program.opts();
|
|
17194
17146
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
17195
|
-
const { seedCommand } = await Promise.resolve().then(() => require("./migrate-
|
|
17147
|
+
const { seedCommand } = await Promise.resolve().then(() => require("./migrate-z_MuES4x.cjs"));
|
|
17196
17148
|
await seedCommand({
|
|
17197
17149
|
...options,
|
|
17198
17150
|
...construct ? { construct } : {}
|
|
@@ -17205,7 +17157,7 @@ program.command("migration").description("Write a construct's next migration: an
|
|
|
17205
17157
|
try {
|
|
17206
17158
|
const globalOptions = program.opts();
|
|
17207
17159
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
17208
|
-
const { migrationCommand } = await Promise.resolve().then(() => require("./migrate-
|
|
17160
|
+
const { migrationCommand } = await Promise.resolve().then(() => require("./migrate-z_MuES4x.cjs"));
|
|
17209
17161
|
await migrationCommand({
|
|
17210
17162
|
construct,
|
|
17211
17163
|
...name ? { name } : {}
|
|
@@ -17305,7 +17257,7 @@ program.command("secrets:add").description("Build the keys a stage must be given
|
|
|
17305
17257
|
try {
|
|
17306
17258
|
const globalOptions = program.opts();
|
|
17307
17259
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
17308
|
-
const { secretsAddCommand } = await Promise.resolve().then(() => require("./add-
|
|
17260
|
+
const { secretsAddCommand } = await Promise.resolve().then(() => require("./add-DD5bYU31.cjs"));
|
|
17309
17261
|
await secretsAddCommand(options);
|
|
17310
17262
|
} catch (error) {
|
|
17311
17263
|
exitWithError(error);
|
|
@@ -17315,7 +17267,7 @@ program.command("encryption:rotate").description("Add a new current key to an En
|
|
|
17315
17267
|
try {
|
|
17316
17268
|
const globalOptions = program.opts();
|
|
17317
17269
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
17318
|
-
const { encryptionRotateCommand } = await Promise.resolve().then(() => require("./encryption-
|
|
17270
|
+
const { encryptionRotateCommand } = await Promise.resolve().then(() => require("./encryption-D88IRxkV.cjs"));
|
|
17319
17271
|
await encryptionRotateCommand(construct, options);
|
|
17320
17272
|
} catch (error) {
|
|
17321
17273
|
exitWithError(error);
|
|
@@ -17325,7 +17277,7 @@ program.command("encryption:retire").description("Remove an old key from an Encr
|
|
|
17325
17277
|
try {
|
|
17326
17278
|
const globalOptions = program.opts();
|
|
17327
17279
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
17328
|
-
const { encryptionRetireCommand } = await Promise.resolve().then(() => require("./encryption-
|
|
17280
|
+
const { encryptionRetireCommand } = await Promise.resolve().then(() => require("./encryption-D88IRxkV.cjs"));
|
|
17329
17281
|
await encryptionRetireCommand(construct, key, options);
|
|
17330
17282
|
} catch (error) {
|
|
17331
17283
|
exitWithError(error);
|
|
@@ -17364,7 +17316,7 @@ program.command("secrets:reconcile").description("Backfill missing custom secret
|
|
|
17364
17316
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
17365
17317
|
const { loadWorkspaceConfig } = await Promise.resolve().then(() => require("./config.cjs"));
|
|
17366
17318
|
const { reconcileMissingSecrets } = await Promise.resolve().then(() => require("./reconcile-CuCQBa5-.cjs"));
|
|
17367
|
-
const { secretsStoreFor } = await Promise.resolve().then(() => require("./dns-
|
|
17319
|
+
const { secretsStoreFor } = await Promise.resolve().then(() => require("./dns-DSzsbU2g.cjs")).then((n) => n.store_exports);
|
|
17368
17320
|
const { workspace } = await loadWorkspaceConfig();
|
|
17369
17321
|
const stage = options.stage ?? workspace.stages.local;
|
|
17370
17322
|
const store = await secretsStoreFor(workspace, stage);
|
|
@@ -17373,7 +17325,7 @@ program.command("secrets:reconcile").description("Backfill missing custom secret
|
|
|
17373
17325
|
console.error(`No secrets found for stage "${stage}". Run "gkm secrets:init --stage ${stage}" first.`);
|
|
17374
17326
|
process.exit(1);
|
|
17375
17327
|
}
|
|
17376
|
-
const { derivedContainers } = await Promise.resolve().then(() => require("./apps-
|
|
17328
|
+
const { derivedContainers } = await Promise.resolve().then(() => require("./apps-CIKiSUxH.cjs")).then((n) => n.workspace_exports);
|
|
17377
17329
|
const result = reconcileMissingSecrets(secrets, workspace, await derivedContainers(workspace, stage));
|
|
17378
17330
|
if (!result) {
|
|
17379
17331
|
console.log(`\n✓ Secrets for stage "${stage}" are up-to-date`);
|
|
@@ -17390,14 +17342,14 @@ program.command("secrets:migrate").description("Copy a deployed stage's secrets
|
|
|
17390
17342
|
try {
|
|
17391
17343
|
const globalOptions = program.opts();
|
|
17392
17344
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
17393
|
-
const { secretsMigrateCommand } = await Promise.resolve().then(() => require("./migrate-
|
|
17345
|
+
const { secretsMigrateCommand } = await Promise.resolve().then(() => require("./migrate-D2mp7qyM.cjs"));
|
|
17394
17346
|
await secretsMigrateCommand(options);
|
|
17395
17347
|
} catch (error) {
|
|
17396
17348
|
exitWithError(error);
|
|
17397
17349
|
}
|
|
17398
17350
|
});
|
|
17399
17351
|
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) => {
|
|
17400
|
-
const { deployCli } = await Promise.resolve().then(() => require("./cli-
|
|
17352
|
+
const { deployCli } = await Promise.resolve().then(() => require("./cli-DHnkkrXz.cjs"));
|
|
17401
17353
|
const globalOptions = program.opts();
|
|
17402
17354
|
const code = await deployCli({
|
|
17403
17355
|
cwd: (0, node_path.resolve)(globalOptions.cwd ?? process.cwd()),
|
|
@@ -17417,8 +17369,8 @@ program.command("deploy").description("Deploy a stage through its target").optio
|
|
|
17417
17369
|
});
|
|
17418
17370
|
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) => {
|
|
17419
17371
|
try {
|
|
17420
|
-
const { rollbackStage } = await Promise.resolve().then(() => require("./rollback-
|
|
17421
|
-
const { terminalCredentials } = await Promise.resolve().then(() => require("./terminal-
|
|
17372
|
+
const { rollbackStage } = await Promise.resolve().then(() => require("./rollback-DUbm19zl.cjs")).then((n) => n.rollback_exports);
|
|
17373
|
+
const { terminalCredentials } = await Promise.resolve().then(() => require("./terminal-CnhNSW3v.cjs"));
|
|
17422
17374
|
const globalOptions = program.opts();
|
|
17423
17375
|
await rollbackStage({
|
|
17424
17376
|
cwd: (0, node_path.resolve)(globalOptions.cwd ?? process.cwd()),
|
|
@@ -17436,7 +17388,7 @@ program.command("compose:server").description("Set up a stage's server for compo
|
|
|
17436
17388
|
try {
|
|
17437
17389
|
const globalOptions = program.opts();
|
|
17438
17390
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
17439
|
-
const { composeServerCommand } = await Promise.resolve().then(() => require("./serverSetup-
|
|
17391
|
+
const { composeServerCommand } = await Promise.resolve().then(() => require("./serverSetup-Drh_mhxR.cjs"));
|
|
17440
17392
|
await composeServerCommand(options);
|
|
17441
17393
|
} catch (error) {
|
|
17442
17394
|
exitWithError(error);
|
|
@@ -17461,7 +17413,7 @@ program.command("deploy:github").description("Let GitHub Actions deploy a stage:
|
|
|
17461
17413
|
try {
|
|
17462
17414
|
const globalOptions = program.opts();
|
|
17463
17415
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
17464
|
-
const { deployGithubCommand } = await Promise.resolve().then(() => require("./github-
|
|
17416
|
+
const { deployGithubCommand } = await Promise.resolve().then(() => require("./github-CaUfjXXt.cjs"));
|
|
17465
17417
|
await deployGithubCommand(options);
|
|
17466
17418
|
} catch (error) {
|
|
17467
17419
|
exitWithError(error);
|