@geekmidas/cli 10.0.0-alpha.172 → 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-CIhg_ymt.mjs → GoDaddyProvider-BxQYQT7E.mjs} +2 -2
- package/dist/{GoDaddyProvider-CIhg_ymt.mjs.map → GoDaddyProvider-BxQYQT7E.mjs.map} +1 -1
- package/dist/{GoDaddyProvider-BLCCgWNA.cjs → GoDaddyProvider-gn-UeZl_.cjs} +7 -7
- package/dist/{GoDaddyProvider-BLCCgWNA.cjs.map → GoDaddyProvider-gn-UeZl_.cjs.map} +1 -1
- package/dist/{HostingerProvider-BOFzH5JM.mjs → HostingerProvider-B-FP4-z6.mjs} +2 -2
- package/dist/{HostingerProvider-BOFzH5JM.mjs.map → HostingerProvider-B-FP4-z6.mjs.map} +1 -1
- package/dist/{HostingerProvider-BUBeLZFT.cjs → HostingerProvider-znlxfl_p.cjs} +4 -4
- package/dist/{HostingerProvider-BUBeLZFT.cjs.map → HostingerProvider-znlxfl_p.cjs.map} +1 -1
- package/dist/{LegacyStateStore-CrkjCaSU.mjs → LegacyStateStore-Bds2IJbE.mjs} +2 -2
- package/dist/{LegacyStateStore-CrkjCaSU.mjs.map → LegacyStateStore-Bds2IJbE.mjs.map} +1 -1
- package/dist/{LegacyStateStore-CLuyua0d.cjs → LegacyStateStore-bS6W95Cq.cjs} +2 -2
- package/dist/{LegacyStateStore-CLuyua0d.cjs.map → LegacyStateStore-bS6W95Cq.cjs.map} +1 -1
- package/dist/{LocalStateStore-Bu1mGMUv.cjs → LocalStateStore-DN0_SCii.cjs} +2 -2
- package/dist/{LocalStateStore-Bu1mGMUv.cjs.map → LocalStateStore-DN0_SCii.cjs.map} +1 -1
- package/dist/{LocalStateStore-DV4jBo8p.mjs → LocalStateStore-Zvirfsr4.mjs} +2 -2
- package/dist/{LocalStateStore-DV4jBo8p.mjs.map → LocalStateStore-Zvirfsr4.mjs.map} +1 -1
- package/dist/{S3StateStore-kbkBod12.cjs → S3StateStore-Cs_ONSe7.cjs} +5 -5
- package/dist/{S3StateStore-kbkBod12.cjs.map → S3StateStore-Cs_ONSe7.cjs.map} +1 -1
- package/dist/{S3StateStore-B4FDrGY1.mjs → S3StateStore-CxNPJKqU.mjs} +4 -4
- package/dist/{S3StateStore-B4FDrGY1.mjs.map → S3StateStore-CxNPJKqU.mjs.map} +1 -1
- package/dist/{SSMStateStore-5MSu94ua.mjs → SSMStateStore-CK52ONQn.mjs} +2 -2
- package/dist/{SSMStateStore-5MSu94ua.mjs.map → SSMStateStore-CK52ONQn.mjs.map} +1 -1
- package/dist/{SSMStateStore-DbsAcN97.cjs → SSMStateStore-CzF_ghlT.cjs} +2 -2
- package/dist/{SSMStateStore-DbsAcN97.cjs.map → SSMStateStore-CzF_ghlT.cjs.map} +1 -1
- package/dist/{add-CLEIQtcF.mjs → add-D570rDKN.mjs} +5 -5
- package/dist/{add-CLEIQtcF.mjs.map → add-D570rDKN.mjs.map} +1 -1
- package/dist/{add-CB1o52l-.cjs → add-DD5bYU31.cjs} +7 -7
- package/dist/{add-CB1o52l-.cjs.map → add-DD5bYU31.cjs.map} +1 -1
- package/dist/{apps-CTyacCpW.cjs → apps-CIKiSUxH.cjs} +15 -13
- package/dist/apps-CIKiSUxH.cjs.map +1 -0
- package/dist/{apps-B4qOLFEC.mjs → apps-iHK70h_F.mjs} +11 -9
- package/dist/apps-iHK70h_F.mjs.map +1 -0
- package/dist/{bundler-Bma2_DTI.cjs → bundler-CMieQ_0t.cjs} +18 -10
- package/dist/bundler-CMieQ_0t.cjs.map +1 -0
- package/dist/{bundler-CSSYSsl8.mjs → bundler-Cdhf7lv3.mjs} +16 -8
- package/dist/bundler-Cdhf7lv3.mjs.map +1 -0
- package/dist/{cli-BFEuBKiU.mjs → cli-CcWMO_-0.mjs} +4 -4
- package/dist/{cli-BFEuBKiU.mjs.map → cli-CcWMO_-0.mjs.map} +1 -1
- package/dist/{cli-DXGl3fsc.cjs → cli-DHnkkrXz.cjs} +6 -6
- package/dist/{cli-DXGl3fsc.cjs.map → cli-DHnkkrXz.cjs.map} +1 -1
- package/dist/{compose-SSYHdZMN.mjs → compose-CFCSlSXx.mjs} +8 -8
- package/dist/{compose-SSYHdZMN.mjs.map → compose-CFCSlSXx.mjs.map} +1 -1
- package/dist/{compose-DpDrZwZS.cjs → compose-D8cd13Eo.cjs} +16 -16
- package/dist/{compose-DpDrZwZS.cjs.map → compose-D8cd13Eo.cjs.map} +1 -1
- package/dist/{compose-CANkT9bL.mjs → compose-DsFvWwAu.mjs} +5 -5
- package/dist/{compose-CANkT9bL.mjs.map → compose-DsFvWwAu.mjs.map} +1 -1
- package/dist/{compose-BNWFrHHE.cjs → compose-SAxadQy7.cjs} +25 -25
- package/dist/{compose-BNWFrHHE.cjs.map → compose-SAxadQy7.cjs.map} +1 -1
- package/dist/config.cjs +1 -1
- package/dist/config.mjs +1 -1
- package/dist/deploy/public.cjs +20 -20
- package/dist/deploy/public.cjs.map +1 -1
- package/dist/deploy/public.mjs +11 -11
- package/dist/{deploy-Qa7wXYS4.mjs → deploy-CyrHJ5tR.mjs} +13 -24
- package/dist/deploy-CyrHJ5tR.mjs.map +1 -0
- package/dist/{deploy-DHrbzHxT.cjs → deploy-DnkGdwUd.cjs} +54 -65
- package/dist/deploy-DnkGdwUd.cjs.map +1 -0
- package/dist/{destroy-CKuYg9JQ.mjs → destroy-C2VQEDji.mjs} +9 -9
- package/dist/{destroy-CKuYg9JQ.mjs.map → destroy-C2VQEDji.mjs.map} +1 -1
- package/dist/{destroy-CJ6wwQRQ.cjs → destroy-Qb0MuIV4.cjs} +24 -24
- package/dist/{destroy-CJ6wwQRQ.cjs.map → destroy-Qb0MuIV4.cjs.map} +1 -1
- package/dist/{credentials-DmNpxlFO.mjs → dns-BMtL2ytM.mjs} +123 -123
- package/dist/dns-BMtL2ytM.mjs.map +1 -0
- package/dist/{credentials-BAeWfaj3.cjs → dns-DSzsbU2g.cjs} +122 -122
- package/dist/dns-DSzsbU2g.cjs.map +1 -0
- package/dist/{docker-CrNWM0jN.mjs → docker-D89imkq2.mjs} +186 -13
- package/dist/docker-D89imkq2.mjs.map +1 -0
- package/dist/{docker-C9ObsT80.cjs → docker-aJbcdGKT.cjs} +220 -11
- package/dist/docker-aJbcdGKT.cjs.map +1 -0
- package/dist/{dokploy-C6KfcyOG.cjs → dokploy-DvG19W0p.cjs} +2 -2
- package/dist/{dokploy-C6KfcyOG.cjs.map → dokploy-DvG19W0p.cjs.map} +1 -1
- package/dist/{dokploy-DITW2LHL.mjs → dokploy-QAThjPQL.mjs} +2 -2
- package/dist/{dokploy-DITW2LHL.mjs.map → dokploy-QAThjPQL.mjs.map} +1 -1
- package/dist/{eas-BBwlSGd8.cjs → eas-DvKir935.cjs} +3 -3
- package/dist/{eas-BBwlSGd8.cjs.map → eas-DvKir935.cjs.map} +1 -1
- package/dist/{eas-BE7tu9eH.mjs → eas-VxFCgjQa.mjs} +3 -3
- package/dist/{eas-BE7tu9eH.mjs.map → eas-VxFCgjQa.mjs.map} +1 -1
- package/dist/{encryption-D0jmwRdU.cjs → encryption-D88IRxkV.cjs} +6 -6
- package/dist/{encryption-D0jmwRdU.cjs.map → encryption-D88IRxkV.cjs.map} +1 -1
- package/dist/{encryption-Bn_pIrIe.mjs → encryption-_GRjwxGO.mjs} +3 -3
- package/dist/{encryption-Bn_pIrIe.mjs.map → encryption-_GRjwxGO.mjs.map} +1 -1
- package/dist/{engine-BDqBychY.cjs → engine-7oDEgerp.cjs} +58 -58
- package/dist/{engine-BDqBychY.cjs.map → engine-7oDEgerp.cjs.map} +1 -1
- package/dist/{engine-Dv4SfML2.mjs → engine-CQfdAI92.mjs} +9 -9
- package/dist/{engine-Dv4SfML2.mjs.map → engine-CQfdAI92.mjs.map} +1 -1
- package/dist/{github-7vONG88-.mjs → github-BE-0zZ0H.mjs} +7 -7
- package/dist/{github-7vONG88-.mjs.map → github-BE-0zZ0H.mjs.map} +1 -1
- package/dist/{github-orgDU5Ta.cjs → github-CaUfjXXt.cjs} +16 -16
- package/dist/{github-orgDU5Ta.cjs.map → github-CaUfjXXt.cjs.map} +1 -1
- package/dist/{googlePlay-DOPEv_Uu.mjs → googlePlay-DrBrk6dZ.mjs} +4 -4
- package/dist/{googlePlay-DOPEv_Uu.mjs.map → googlePlay-DrBrk6dZ.mjs.map} +1 -1
- package/dist/{googlePlay-DWiYD2Up.cjs → googlePlay-FCJulaVY.cjs} +5 -5
- package/dist/{googlePlay-DWiYD2Up.cjs.map → googlePlay-FCJulaVY.cjs.map} +1 -1
- package/dist/{iam-FA95ku7l.cjs → iam-CGd_oEyz.cjs} +2 -2
- package/dist/{iam-FA95ku7l.cjs.map → iam-CGd_oEyz.cjs.map} +1 -1
- package/dist/{iam-BE0qX5Lb.mjs → iam-Cs2Ph5f2.mjs} +2 -2
- package/dist/{iam-BE0qX5Lb.mjs.map → iam-Cs2Ph5f2.mjs.map} +1 -1
- package/dist/index.cjs +204 -253
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +156 -205
- package/dist/index.mjs.map +1 -1
- package/dist/{local-Dx_1DLrj.cjs → local-BclGW_Zo.cjs} +3 -3
- package/dist/{local-Dx_1DLrj.cjs.map → local-BclGW_Zo.cjs.map} +1 -1
- package/dist/{local-s-ReaV9D.mjs → local-DbxB0Fg4.mjs} +2 -2
- package/dist/{local-s-ReaV9D.mjs.map → local-DbxB0Fg4.mjs.map} +1 -1
- package/dist/{migrate-83OqvIDr.mjs → migrate-C2Kjfwui.mjs} +3 -3
- package/dist/{migrate-83OqvIDr.mjs.map → migrate-C2Kjfwui.mjs.map} +1 -1
- package/dist/{migrate-BwKps39u.cjs → migrate-D2mp7qyM.cjs} +6 -6
- package/dist/{migrate-BwKps39u.cjs.map → migrate-D2mp7qyM.cjs.map} +1 -1
- package/dist/{migrate-rZPQE2lm.mjs → migrate-lidIEoZm.mjs} +5 -5
- package/dist/{migrate-rZPQE2lm.mjs.map → migrate-lidIEoZm.mjs.map} +1 -1
- package/dist/{migrate-BCnC1nUd.cjs → migrate-z_MuES4x.cjs} +6 -6
- package/dist/{migrate-BCnC1nUd.cjs.map → migrate-z_MuES4x.cjs.map} +1 -1
- package/dist/{notes-Chp3yhjU.cjs → notes-Cs0rVvlG.cjs} +3 -3
- package/dist/{notes-Chp3yhjU.cjs.map → notes-Cs0rVvlG.cjs.map} +1 -1
- package/dist/{notes-BvER-Te2.mjs → notes-Dw9BWRJP.mjs} +3 -3
- package/dist/{notes-BvER-Te2.mjs.map → notes-Dw9BWRJP.mjs.map} +1 -1
- package/dist/openapi.cjs +1 -1
- package/dist/openapi.mjs +1 -1
- package/dist/{projectBucket-BcbirdBj.cjs → projectBucket-BvcErpo0.cjs} +2 -2
- package/dist/{projectBucket-BcbirdBj.cjs.map → projectBucket-BvcErpo0.cjs.map} +1 -1
- package/dist/{projectBucket-BfE46Zj9.mjs → projectBucket-DHuBZDPJ.mjs} +2 -2
- package/dist/{projectBucket-BfE46Zj9.mjs.map → projectBucket-DHuBZDPJ.mjs.map} +1 -1
- package/dist/{publish-N7RjKFiU.cjs → publish-DzMQWBW8.cjs} +2 -2
- package/dist/{publish-N7RjKFiU.cjs.map → publish-DzMQWBW8.cjs.map} +1 -1
- package/dist/{publish-Cm7fGhl3.mjs → publish-yslBcYWN.mjs} +2 -2
- package/dist/{publish-Cm7fGhl3.mjs.map → publish-yslBcYWN.mjs.map} +1 -1
- package/dist/{resolve-Bjz8vr36.cjs → resolve-CQvEtM5c.cjs} +4 -4
- package/dist/{resolve-Bjz8vr36.cjs.map → resolve-CQvEtM5c.cjs.map} +1 -1
- package/dist/{resolve-BP-wvD7F.mjs → resolve-Dfind5fY.mjs} +4 -4
- package/dist/{resolve-BP-wvD7F.mjs.map → resolve-Dfind5fY.mjs.map} +1 -1
- package/dist/{rollback-C0QxGS7N.cjs → rollback-DUbm19zl.cjs} +9 -9
- package/dist/{rollback-C0QxGS7N.cjs.map → rollback-DUbm19zl.cjs.map} +1 -1
- package/dist/{rollback-OWocmLZ3.mjs → rollback-j8X0RdpU.mjs} +6 -6
- package/dist/{rollback-OWocmLZ3.mjs.map → rollback-j8X0RdpU.mjs.map} +1 -1
- package/dist/{s3-CQHYU8Iy.cjs → s3-Ba3WIaGU.cjs} +3 -3
- package/dist/{s3-CQHYU8Iy.cjs.map → s3-Ba3WIaGU.cjs.map} +1 -1
- package/dist/{s3-BrXDNOOi.mjs → s3-Bs1qUnxt.mjs} +3 -3
- package/dist/{s3-BrXDNOOi.mjs.map → s3-Bs1qUnxt.mjs.map} +1 -1
- package/dist/{serverSetup-DAXGkiFf.mjs → serverSetup-DUrSo7HL.mjs} +6 -6
- package/dist/{serverSetup-DAXGkiFf.mjs.map → serverSetup-DUrSo7HL.mjs.map} +1 -1
- package/dist/{serverSetup-DcyafYuO.cjs → serverSetup-Drh_mhxR.cjs} +8 -8
- package/dist/{serverSetup-DcyafYuO.cjs.map → serverSetup-Drh_mhxR.cjs.map} +1 -1
- package/dist/{sniffer-D6dwbd7L.mjs → sniffer-DgjWtfBW.mjs} +7 -7
- package/dist/{sniffer-D6dwbd7L.mjs.map → sniffer-DgjWtfBW.mjs.map} +1 -1
- package/dist/{sniffer-DpiPHtcR.cjs → sniffer-zsLNtFK0.cjs} +7 -7
- package/dist/{sniffer-DpiPHtcR.cjs.map → sniffer-zsLNtFK0.cjs.map} +1 -1
- package/dist/{snsSubscriptions-BVaZU0qQ.mjs → snsSubscriptions-BLfWAnzg.mjs} +5 -78
- package/dist/snsSubscriptions-BLfWAnzg.mjs.map +1 -0
- package/dist/{snsSubscriptions-CXpZqb-Y.cjs → snsSubscriptions-CGO6EO7H.cjs} +20 -111
- package/dist/snsSubscriptions-CGO6EO7H.cjs.map +1 -0
- package/dist/{sst-CglMlWMQ.mjs → sst-B2h4rE6j.mjs} +5 -5
- package/dist/{sst-CglMlWMQ.mjs.map → sst-B2h4rE6j.mjs.map} +1 -1
- package/dist/{sst-C0VMb3o0.cjs → sst-Bih36ADr.cjs} +7 -7
- package/dist/{sst-C0VMb3o0.cjs.map → sst-Bih36ADr.cjs.map} +1 -1
- package/dist/{stack-DKloCsy6.cjs → stack-D0CC6_b-.cjs} +162 -14
- package/dist/stack-D0CC6_b-.cjs.map +1 -0
- package/dist/{stack-DXHdVCsD.mjs → stack-DI4qbrtn.mjs} +141 -12
- package/dist/stack-DI4qbrtn.mjs.map +1 -0
- package/dist/{stage-CcsCwU8-.cjs → stage--Z6-pM9E.cjs} +8 -8
- package/dist/{stage-CcsCwU8-.cjs.map → stage--Z6-pM9E.cjs.map} +1 -1
- package/dist/{stage-BOOoPl_k.mjs → stage-C-qe-Lye.mjs} +6 -6
- package/dist/{stage-BOOoPl_k.mjs.map → stage-C-qe-Lye.mjs.map} +1 -1
- package/dist/{stages-D49CUpBY.cjs → stages-8izznWib.cjs} +2 -2
- package/dist/{stages-D49CUpBY.cjs.map → stages-8izznWib.cjs.map} +1 -1
- package/dist/{stages-CCAAe1tP.mjs → stages-QPWgbm9P.mjs} +2 -2
- package/dist/{stages-CCAAe1tP.mjs.map → stages-QPWgbm9P.mjs.map} +1 -1
- package/dist/target/public.cjs +1 -1
- package/dist/target/public.mjs +1 -1
- package/dist/{terminal-Bc0XhkqW.cjs → terminal-CnhNSW3v.cjs} +5 -5
- package/dist/{terminal-Bc0XhkqW.cjs.map → terminal-CnhNSW3v.cjs.map} +1 -1
- package/dist/{terminal-D92VjzyD.mjs → terminal-DtO0Eh3g.mjs} +2 -2
- package/dist/{terminal-D92VjzyD.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/dist/workspace/index.cjs +1 -1
- package/dist/workspace/index.mjs +1 -1
- package/dist/{workspace-B0PI9k9p.mjs → workspace-BBa1Ck5j.mjs} +16 -2
- package/dist/workspace-BBa1Ck5j.mjs.map +1 -0
- package/dist/{workspace-LR9DFjU8.cjs → workspace-DirP2-ed.cjs} +21 -7
- package/dist/workspace-DirP2-ed.cjs.map +1 -0
- package/package.json +15 -15
- package/dist/apps-B4qOLFEC.mjs.map +0 -1
- package/dist/apps-CTyacCpW.cjs.map +0 -1
- package/dist/bundler-Bma2_DTI.cjs.map +0 -1
- package/dist/bundler-CSSYSsl8.mjs.map +0 -1
- package/dist/credentials-BAeWfaj3.cjs.map +0 -1
- package/dist/credentials-DmNpxlFO.mjs.map +0 -1
- package/dist/deploy-DHrbzHxT.cjs.map +0 -1
- package/dist/deploy-Qa7wXYS4.mjs.map +0 -1
- package/dist/docker-C9ObsT80.cjs.map +0 -1
- package/dist/docker-CrNWM0jN.mjs.map +0 -1
- package/dist/snsSubscriptions-BVaZU0qQ.mjs.map +0 -1
- package/dist/snsSubscriptions-CXpZqb-Y.cjs.map +0 -1
- package/dist/stack-DKloCsy6.cjs.map +0 -1
- package/dist/stack-DXHdVCsD.mjs.map +0 -1
- package/dist/workspace-B0PI9k9p.mjs.map +0 -1
- package/dist/workspace-LR9DFjU8.cjs.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -2,31 +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
|
|
6
|
-
const require_compose = require("./compose-
|
|
7
|
-
const require_workspace = require("./workspace-
|
|
8
|
-
const require_apps = require("./apps-
|
|
5
|
+
const require_dns = require("./dns-DSzsbU2g.cjs");
|
|
6
|
+
const require_compose = require("./compose-SAxadQy7.cjs");
|
|
7
|
+
const require_workspace = require("./workspace-DirP2-ed.cjs");
|
|
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-
|
|
19
|
-
const require_snsSubscriptions = require("./snsSubscriptions-CXpZqb-Y.cjs");
|
|
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");
|
|
20
19
|
const require_openapi = require("./openapi.cjs");
|
|
21
20
|
const require_appPorts = require("./appPorts-IW-OZmRi.cjs");
|
|
22
21
|
const require_drivers = require("./drivers-BhdC9Efj.cjs");
|
|
23
22
|
const require_emit = require("./emit-DiW0kbue.cjs");
|
|
24
|
-
const require_local = require("./local-
|
|
25
|
-
const require_sniffer = require("./sniffer-
|
|
26
|
-
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");
|
|
27
26
|
const require_seeds = require("./seeds-Bc3niNVb.cjs");
|
|
28
27
|
const require_credentialSchemas = require("./credentialSchemas-OVXofU-r.cjs");
|
|
29
|
-
const require_LocalStateStore = require("./LocalStateStore-
|
|
28
|
+
const require_LocalStateStore = require("./LocalStateStore-DN0_SCii.cjs");
|
|
30
29
|
const require_utils = require("./utils-D2Nk1Nv2.cjs");
|
|
31
30
|
const require_ready = require("./ready-DcD0SCnV.cjs");
|
|
32
31
|
let node_path = require("node:path");
|
|
@@ -61,7 +60,7 @@ let crypto = require("crypto");
|
|
|
61
60
|
crypto = require_rolldown_runtime.__toESM(crypto, 1);
|
|
62
61
|
let _geekmidas_constructs_topic = require("@geekmidas/constructs/topic");
|
|
63
62
|
//#region package.json
|
|
64
|
-
var version = "10.0.0-alpha.
|
|
63
|
+
var version = "10.0.0-alpha.174";
|
|
65
64
|
//#endregion
|
|
66
65
|
//#region src/prompt.ts
|
|
67
66
|
/**
|
|
@@ -144,7 +143,7 @@ const logger$8 = console;
|
|
|
144
143
|
* Validate Dokploy token by making a test API call
|
|
145
144
|
*/
|
|
146
145
|
async function validateDokployToken(endpoint, token) {
|
|
147
|
-
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);
|
|
148
147
|
return new DokployApi({
|
|
149
148
|
baseUrl: endpoint,
|
|
150
149
|
token
|
|
@@ -185,10 +184,10 @@ async function loginCommand(options) {
|
|
|
185
184
|
logger$8.error("\n✗ Invalid credentials. Please check your token and try again.");
|
|
186
185
|
process.exit(1);
|
|
187
186
|
}
|
|
188
|
-
await
|
|
187
|
+
await require_dns.storeDokployCredentials(token, endpoint);
|
|
189
188
|
logger$8.log("\n✓ Successfully logged in to Dokploy!");
|
|
190
189
|
logger$8.log(` Endpoint: ${endpoint}`);
|
|
191
|
-
logger$8.log(` Credentials stored in: ${
|
|
190
|
+
logger$8.log(` Credentials stored in: ${require_dns.getCredentialsPath()}`);
|
|
192
191
|
logger$8.log("\nYou can now use deploy commands without setting DOKPLOY_API_TOKEN.");
|
|
193
192
|
}
|
|
194
193
|
if (provider === "godaddy") {
|
|
@@ -209,9 +208,9 @@ async function loginCommand(options) {
|
|
|
209
208
|
logger$8.error("Token is required");
|
|
210
209
|
process.exit(1);
|
|
211
210
|
}
|
|
212
|
-
await
|
|
211
|
+
await require_dns.storeHostingerToken(token);
|
|
213
212
|
logger$8.log("\n✓ Hostinger token stored.");
|
|
214
|
-
logger$8.log(` Credentials stored in: ${
|
|
213
|
+
logger$8.log(` Credentials stored in: ${require_dns.getCredentialsPath()}`);
|
|
215
214
|
logger$8.log(" Not validated here: every DNS endpoint is scoped to a domain, so the\n first deploy that touches DNS is where a bad token reports itself.");
|
|
216
215
|
logger$8.log("\nYou can now use it as a DNS provider without setting HOSTINGER_API_TOKEN.");
|
|
217
216
|
}
|
|
@@ -237,10 +236,10 @@ async function loginGoDaddy(options) {
|
|
|
237
236
|
process.exit(1);
|
|
238
237
|
}
|
|
239
238
|
const where = options.home ? { home: options.home } : void 0;
|
|
240
|
-
await
|
|
239
|
+
await require_dns.storeGoDaddyToken(token, where);
|
|
241
240
|
logger$8.log("\n✓ GoDaddy token stored.");
|
|
242
241
|
logger$8.log(` Token: ${maskToken(token)}`);
|
|
243
|
-
logger$8.log(` Credentials stored in: ${
|
|
242
|
+
logger$8.log(` Credentials stored in: ${require_dns.getCredentialsPath(where)}`);
|
|
244
243
|
logger$8.log(" Not validated here: proving a token without a domain needs an account\n scope a DNS-only token does not have, so the first deploy that\n writes a record is where a bad token reports itself.");
|
|
245
244
|
logger$8.log("\nYou can now use it as a DNS provider without setting GODADDY_API_TOKEN.");
|
|
246
245
|
}
|
|
@@ -250,19 +249,19 @@ async function loginGoDaddy(options) {
|
|
|
250
249
|
async function logoutCommand(options) {
|
|
251
250
|
const { provider = "dokploy" } = options;
|
|
252
251
|
if (provider === "all") {
|
|
253
|
-
const dokployRemoved = await
|
|
254
|
-
const godaddyRemoved = await
|
|
252
|
+
const dokployRemoved = await require_dns.removeDokployCredentials();
|
|
253
|
+
const godaddyRemoved = await require_dns.removeGoDaddyCredentials();
|
|
255
254
|
if (dokployRemoved || godaddyRemoved) logger$8.log("\n✓ Logged out from all services");
|
|
256
255
|
else logger$8.log("\nNo stored credentials found");
|
|
257
256
|
return;
|
|
258
257
|
}
|
|
259
258
|
if (provider === "godaddy") {
|
|
260
|
-
const removed = await
|
|
259
|
+
const removed = await require_dns.removeGoDaddyCredentials();
|
|
261
260
|
logger$8.log(removed ? "\n✓ Logged out from GoDaddy" : "\nNo GoDaddy credentials found");
|
|
262
261
|
return;
|
|
263
262
|
}
|
|
264
263
|
if (provider === "dokploy") {
|
|
265
|
-
if (await
|
|
264
|
+
if (await require_dns.removeDokployCredentials()) logger$8.log("\n✓ Logged out from Dokploy");
|
|
266
265
|
else logger$8.log("\nNo Dokploy credentials found");
|
|
267
266
|
}
|
|
268
267
|
}
|
|
@@ -271,15 +270,15 @@ async function logoutCommand(options) {
|
|
|
271
270
|
*/
|
|
272
271
|
async function whoamiCommand() {
|
|
273
272
|
logger$8.log("\n📋 Current credentials:\n");
|
|
274
|
-
const dokploy = await
|
|
273
|
+
const dokploy = await require_dns.getDokployCredentials();
|
|
275
274
|
if (dokploy) {
|
|
276
275
|
logger$8.log(" Dokploy:");
|
|
277
276
|
logger$8.log(` Endpoint: ${dokploy.endpoint}`);
|
|
278
277
|
logger$8.log(` Token: ${maskToken(dokploy.token)}`);
|
|
279
278
|
} else logger$8.log(" Dokploy: Not logged in");
|
|
280
|
-
const godaddy = (await
|
|
279
|
+
const godaddy = (await require_dns.readCredentials()).godaddy;
|
|
281
280
|
logger$8.log(godaddy ? ` GoDaddy:\n Token: ${maskToken(godaddy.token)}` : " GoDaddy: Not logged in");
|
|
282
|
-
logger$8.log(`\n Credentials file: ${
|
|
281
|
+
logger$8.log(`\n Credentials file: ${require_dns.getCredentialsPath()}`);
|
|
283
282
|
}
|
|
284
283
|
/**
|
|
285
284
|
* Mask a token for display
|
|
@@ -792,11 +791,11 @@ async function resolveStage(options) {
|
|
|
792
791
|
const choice = require_apps.stageBackups(workspace, manifest, stage);
|
|
793
792
|
if (choice.mode === "disabled") throw new BackupsNotOn(stage, `deploy.backups.${stage} is false`);
|
|
794
793
|
if (choice.mode === "none") throw new BackupsNotOn(stage, choice.reason === "local" ? "it is the local stage" : choice.reason === "no-postgres" ? "its stack runs no Postgres" : "the compose target does not deploy it");
|
|
795
|
-
const secrets = await (await
|
|
794
|
+
const secrets = await (await require_dns.secretsStoreFor(workspace, stage)).read(stage);
|
|
796
795
|
return {
|
|
797
796
|
workspace,
|
|
798
797
|
manifest,
|
|
799
|
-
project: require_stack.composeProject(
|
|
798
|
+
project: require_stack.composeProject(require_dns.deployIdentity(workspace, stage)),
|
|
800
799
|
prefix: require_apps.backupsPrefix(workspace, stage),
|
|
801
800
|
databases: require_apps.backupDatabases(require_stack.stackPlan(workspace, manifest, stage).resources),
|
|
802
801
|
custom: secrets?.custom ?? {},
|
|
@@ -822,14 +821,14 @@ async function callerS3(resolved, options) {
|
|
|
822
821
|
const url = resolved.custom[require_apps.BACKUPS_URL_KEY];
|
|
823
822
|
if (!url) throw new BackupsNotProvisioned(options.stage);
|
|
824
823
|
const address = (await import("@geekmidas/storage/s3-url")).parse(url);
|
|
825
|
-
const credential = await
|
|
824
|
+
const credential = await require_stack.awsProvisioningCredentials({
|
|
826
825
|
stage: options.stage,
|
|
827
826
|
env: process.env,
|
|
828
827
|
...options.profile ? { profile: options.profile } : {}
|
|
829
828
|
}) ?? { chain: true };
|
|
830
829
|
const region = address.region ?? "us-east-1";
|
|
831
|
-
const config = await
|
|
832
|
-
const endpoint =
|
|
830
|
+
const config = await require_stack.awsClientConfig(credential, region);
|
|
831
|
+
const endpoint = require_stack.awsEndpoint(process.env, "S3");
|
|
833
832
|
const { S3Client } = await import("@aws-sdk/client-s3");
|
|
834
833
|
return {
|
|
835
834
|
s3: new S3Client({
|
|
@@ -2443,7 +2442,7 @@ async function execCommand(commandArgs, options = {}, stageDeps) {
|
|
|
2443
2442
|
const cwd = options.cwd ?? process.cwd();
|
|
2444
2443
|
if (!commandArgs[0]) throw new NoCommandSpecified();
|
|
2445
2444
|
if (options.stage && !require_apps.isImageBuild()) {
|
|
2446
|
-
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);
|
|
2447
2446
|
const { loadWorkspaceConfig } = await Promise.resolve().then(() => require("./config.cjs"));
|
|
2448
2447
|
const { workspace } = await loadWorkspaceConfig(cwd);
|
|
2449
2448
|
if (options.stage !== workspace.stages.local) {
|
|
@@ -2626,10 +2625,11 @@ async function devCommand(options) {
|
|
|
2626
2625
|
config,
|
|
2627
2626
|
workspaceRoot: workspace?.root ?? secretsRoot,
|
|
2628
2627
|
appRoot,
|
|
2628
|
+
app: workspaceAppName,
|
|
2629
2629
|
target: "server",
|
|
2630
2630
|
enableOpenApi,
|
|
2631
|
-
cacheBackend:
|
|
2632
|
-
eventsBackend:
|
|
2631
|
+
cacheBackend: require_dns.cacheBackendFor(require_dns.providerOf(workspace ?? config)),
|
|
2632
|
+
eventsBackend: require_dns.eventsBackendFor(require_dns.providerOf(workspace ?? config)),
|
|
2633
2633
|
telescope,
|
|
2634
2634
|
databaseApi: true,
|
|
2635
2635
|
hooks,
|
|
@@ -2646,7 +2646,7 @@ async function devCommand(options) {
|
|
|
2646
2646
|
let publicUrl;
|
|
2647
2647
|
let manifest;
|
|
2648
2648
|
let telemetryUi;
|
|
2649
|
-
const appSecrets = await require_compose$1.loadSecretsForApp(workspace ? await
|
|
2649
|
+
const appSecrets = await require_compose$1.loadSecretsForApp(workspace ? await require_dns.secretsStoreFor(workspace, config.stages.local) : new require_dns.FileSecretsStore(secretsRoot), config.stages.local);
|
|
2650
2650
|
if (workspace) {
|
|
2651
2651
|
const reconciled = await require_apps.reconcileWorkspace(workspace, {
|
|
2652
2652
|
stage: workspace.stages.local,
|
|
@@ -2687,7 +2687,7 @@ async function devCommand(options) {
|
|
|
2687
2687
|
secretsJsonPath = (0, node_path.join)(secretsDir, secretsFileName);
|
|
2688
2688
|
await (0, node_fs_promises.writeFile)(secretsJsonPath, JSON.stringify(appSecrets, null, 2));
|
|
2689
2689
|
}
|
|
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);
|
|
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);
|
|
2691
2691
|
devServer.label = workspaceAppName ?? "server";
|
|
2692
2692
|
devServer.publicUrl = publicUrl;
|
|
2693
2693
|
await devServer.start();
|
|
@@ -2953,8 +2953,8 @@ async function validateFrontendApps(workspace) {
|
|
|
2953
2953
|
async function loadDevSecrets(workspace) {
|
|
2954
2954
|
if (!workspace.secrets.enabled) return {};
|
|
2955
2955
|
const stage = workspace.stages.local;
|
|
2956
|
-
const secrets = await (await
|
|
2957
|
-
if (secrets) return
|
|
2956
|
+
const secrets = await (await require_dns.secretsStoreFor(workspace, stage)).read(stage);
|
|
2957
|
+
if (secrets) return require_dns.toEmbeddableSecrets(secrets);
|
|
2958
2958
|
return {};
|
|
2959
2959
|
}
|
|
2960
2960
|
/**
|
|
@@ -3018,9 +3018,9 @@ async function workspaceDevCommand(configured, options) {
|
|
|
3018
3018
|
for (const { id, port } of fakes) logger$5.log(`🎭 ${id} fake: http://localhost:${port}`);
|
|
3019
3019
|
logger$5.log(options.migrate || options.seed ? "🗄️ Migrating the databases" : "🗄️ Checking for pending migrations");
|
|
3020
3020
|
if (options.migrate || options.seed) {
|
|
3021
|
-
const { prepareDevDatabases } = await Promise.resolve().then(() => require("./migrate-
|
|
3021
|
+
const { prepareDevDatabases } = await Promise.resolve().then(() => require("./migrate-z_MuES4x.cjs"));
|
|
3022
3022
|
await prepareDevDatabases(workspace, secretsEnv, { seed: !!options.seed });
|
|
3023
|
-
} 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) => {
|
|
3024
3024
|
logger$5.log(`⚠️ Could not check for pending migrations: ${error instanceof Error ? error.message : String(error)}`);
|
|
3025
3025
|
});
|
|
3026
3026
|
const appUrls = {};
|
|
@@ -3484,11 +3484,12 @@ var DevServer = class {
|
|
|
3484
3484
|
appRoot;
|
|
3485
3485
|
secretsJsonPath;
|
|
3486
3486
|
selfServing;
|
|
3487
|
+
serverDir;
|
|
3487
3488
|
serverProcess = null;
|
|
3488
3489
|
isRunning = false;
|
|
3489
3490
|
actualPort;
|
|
3490
3491
|
startTime = Date.now();
|
|
3491
|
-
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")) {
|
|
3492
3493
|
this.requestedPort = requestedPort;
|
|
3493
3494
|
this.portExplicit = portExplicit;
|
|
3494
3495
|
this.enableOpenApi = enableOpenApi;
|
|
@@ -3498,6 +3499,7 @@ var DevServer = class {
|
|
|
3498
3499
|
this.appRoot = appRoot;
|
|
3499
3500
|
this.secretsJsonPath = secretsJsonPath;
|
|
3500
3501
|
this.selfServing = selfServing;
|
|
3502
|
+
this.serverDir = serverDir;
|
|
3501
3503
|
this.actualPort = requestedPort;
|
|
3502
3504
|
}
|
|
3503
3505
|
/** What the ready line calls this app. */
|
|
@@ -3523,7 +3525,7 @@ var DevServer = class {
|
|
|
3523
3525
|
this.actualPort = await require_compose$1.findAvailablePort(this.requestedPort);
|
|
3524
3526
|
if (this.actualPort !== this.requestedPort) logger$5.log(`ℹ️ Port ${this.requestedPort} was in use, using port ${this.actualPort} instead`);
|
|
3525
3527
|
}
|
|
3526
|
-
const serverEntryPath = (0, node_path.join)(this.
|
|
3528
|
+
const serverEntryPath = (0, node_path.join)(this.serverDir, "server.ts");
|
|
3527
3529
|
await this.createServerEntry();
|
|
3528
3530
|
this.serverProcess = (0, node_child_process.spawn)(...tsxCommand(this.appRoot, [
|
|
3529
3531
|
serverEntryPath,
|
|
@@ -3600,7 +3602,7 @@ var DevServer = class {
|
|
|
3600
3602
|
}
|
|
3601
3603
|
async createServerEntry() {
|
|
3602
3604
|
const { writeFile: fsWriteFile } = await import("node:fs/promises");
|
|
3603
|
-
await fsWriteFile((0, node_path.join)(this.
|
|
3605
|
+
await fsWriteFile((0, node_path.join)(this.serverDir, "server.ts"), generateServerEntryContent({
|
|
3604
3606
|
secretsJsonPath: this.secretsJsonPath,
|
|
3605
3607
|
runtime: this.runtime,
|
|
3606
3608
|
enableOpenApi: this.enableOpenApi,
|
|
@@ -3680,107 +3682,6 @@ var TopicGenerator = class extends require_discover.ConstructGenerator {
|
|
|
3680
3682
|
}
|
|
3681
3683
|
};
|
|
3682
3684
|
//#endregion
|
|
3683
|
-
//#region src/build/types.ts
|
|
3684
|
-
/**
|
|
3685
|
-
* Where `gkm dev` serves the database's read-only JSON API
|
|
3686
|
-
* (`@geekmidas/db/introspect`). Under `/__gkm` with the rest of what the dev
|
|
3687
|
-
* server adds, so it cannot collide with an application route.
|
|
3688
|
-
*/
|
|
3689
|
-
const DEV_DATABASE_API_PATH = "/__gkm/db";
|
|
3690
|
-
//#endregion
|
|
3691
|
-
//#region src/build/owners.ts
|
|
3692
|
-
/**
|
|
3693
|
-
* What a generated entry imports its runtime from, read off the discovered
|
|
3694
|
-
* constructs: the surface it serves, every construct a runnable can be built
|
|
3695
|
-
* from, and the database the dev server's JSON API reads.
|
|
3696
|
-
*
|
|
3697
|
-
* `gkm build` and `gkm dev` both write entries that import the surface for its
|
|
3698
|
-
* logger and environment parser, so both ask here. A dev server that skipped it
|
|
3699
|
-
* had nothing to import them from.
|
|
3700
|
-
*/
|
|
3701
|
-
function ownersContext(options) {
|
|
3702
|
-
const { declared, sources, workspaceRoot, appRoot, databaseApi } = options;
|
|
3703
|
-
const surfaces = restApis(declared);
|
|
3704
|
-
const primary = servedSurface(declared, workspaceRoot, appRoot) ?? surfaces.find((d) => !d.servesItself) ?? surfaces[0];
|
|
3705
|
-
const browsable = Object.entries(declared).find(([, d]) => d.kind === "database");
|
|
3706
|
-
const browsableSource = browsable ? sources[browsable[0]] : void 0;
|
|
3707
|
-
const owners = {};
|
|
3708
|
-
for (const [id, declaration] of Object.entries(declared)) {
|
|
3709
|
-
if (declaration.kind !== "rest-api" && declaration.kind !== "worker") continue;
|
|
3710
|
-
const source = sources[id];
|
|
3711
|
-
if (!source) continue;
|
|
3712
|
-
owners[id] = {
|
|
3713
|
-
specifier: source.file,
|
|
3714
|
-
exportName: source.exportName
|
|
3715
|
-
};
|
|
3716
|
-
}
|
|
3717
|
-
const primarySource = primary ? sources[primary.id] : void 0;
|
|
3718
|
-
return {
|
|
3719
|
-
owners,
|
|
3720
|
-
...primary ? { surface: {
|
|
3721
|
-
id: primary.id,
|
|
3722
|
-
trustedOriginsKey: (0, _geekmidas_manifest.providedKeyFor)(primary.id, "rest-api", "trustedOrigins"),
|
|
3723
|
-
...primary.cors ? { cors: primary.cors } : {},
|
|
3724
|
-
...primarySource ? { module: {
|
|
3725
|
-
specifier: primarySource.file,
|
|
3726
|
-
exportName: primarySource.exportName
|
|
3727
|
-
} } : {}
|
|
3728
|
-
} } : {},
|
|
3729
|
-
...databaseApi && browsableSource ? { databaseApi: {
|
|
3730
|
-
path: DEV_DATABASE_API_PATH,
|
|
3731
|
-
database: {
|
|
3732
|
-
specifier: browsableSource.file,
|
|
3733
|
-
exportName: browsableSource.exportName
|
|
3734
|
-
}
|
|
3735
|
-
} } : {}
|
|
3736
|
-
};
|
|
3737
|
-
}
|
|
3738
|
-
/**
|
|
3739
|
-
* The endpoints one surface serves.
|
|
3740
|
-
*
|
|
3741
|
-
* One glob finds every surface's endpoints, wherever their files live. A build
|
|
3742
|
-
* keeps the ones built from the surface it serves; one built from no surface at
|
|
3743
|
-
* all has nowhere else to go.
|
|
3744
|
-
*/
|
|
3745
|
-
function servedBy(endpoints, surface) {
|
|
3746
|
-
if (!surface) return endpoints;
|
|
3747
|
-
return endpoints.filter(({ construct }) => !construct.surface || construct.surface.id === surface.id);
|
|
3748
|
-
}
|
|
3749
|
-
function restApis(declared) {
|
|
3750
|
-
return Object.values(declared).filter((d) => d.kind === "rest-api");
|
|
3751
|
-
}
|
|
3752
|
-
/**
|
|
3753
|
-
* The surface whose declared `path` is the directory being built — asked of
|
|
3754
|
-
* every surface, because a workspace has several and each app's build serves
|
|
3755
|
-
* exactly one.
|
|
3756
|
-
*/
|
|
3757
|
-
function servedSurface(declared, workspaceRoot, appRoot) {
|
|
3758
|
-
return restApis(declared).find((d) => (0, node_path.resolve)(workspaceRoot, d.path) === (0, node_path.resolve)(appRoot));
|
|
3759
|
-
}
|
|
3760
|
-
/**
|
|
3761
|
-
* The declarations one process reaches: the constructs it runs as — a surface,
|
|
3762
|
-
* a worker — what each declared an edge to, and what each runnable it runs
|
|
3763
|
-
* depends on or consumes.
|
|
3764
|
-
*
|
|
3765
|
-
* What decides which drivers its entry registers: a process that reaches no
|
|
3766
|
-
* cache never resolves a cache client because another process in the
|
|
3767
|
-
* workspace does.
|
|
3768
|
-
*/
|
|
3769
|
-
function reachedBy(declared, processes, runnables) {
|
|
3770
|
-
const reached = /* @__PURE__ */ new Set();
|
|
3771
|
-
for (const id of processes) {
|
|
3772
|
-
const declaration = declared[id];
|
|
3773
|
-
if (!declaration) continue;
|
|
3774
|
-
reached.add(id);
|
|
3775
|
-
for (const edge of (0, _geekmidas_manifest.dependenciesOf)(declaration)) reached.add(edge.target);
|
|
3776
|
-
}
|
|
3777
|
-
for (const { construct } of runnables) {
|
|
3778
|
-
for (const id of construct.constructs ?? []) reached.add((0, _geekmidas_manifest.canonicalId)(id));
|
|
3779
|
-
for (const id of require_discover.consumedBy(construct)) reached.add(id);
|
|
3780
|
-
}
|
|
3781
|
-
return Object.fromEntries(Object.entries(declared).filter(([id]) => reached.has(id)));
|
|
3782
|
-
}
|
|
3783
|
-
//#endregion
|
|
3784
3685
|
//#region src/build/surfaceEntry.ts
|
|
3785
3686
|
/** Whether a construct serves itself, asked of the construct. */
|
|
3786
3687
|
function servesItself(construct) {
|
|
@@ -3795,8 +3696,8 @@ function servesItself(construct) {
|
|
|
3795
3696
|
* the construct from the outside. The construct can simply be asked.
|
|
3796
3697
|
*/
|
|
3797
3698
|
function selfServingSurface(options) {
|
|
3798
|
-
const { declared, sources, workspaceRoot, appRoot } = options;
|
|
3799
|
-
const served =
|
|
3699
|
+
const { declared, sources, workspaceRoot, appRoot, app } = options;
|
|
3700
|
+
const served = require_docker.surfaceAt(declared, workspaceRoot, appRoot, app);
|
|
3800
3701
|
const source = served ? sources[served.id] : void 0;
|
|
3801
3702
|
if (!served || !source || !servesItself(source.construct)) return void 0;
|
|
3802
3703
|
return {
|
|
@@ -3804,10 +3705,6 @@ function selfServingSurface(options) {
|
|
|
3804
3705
|
source
|
|
3805
3706
|
};
|
|
3806
3707
|
}
|
|
3807
|
-
/** The WebSocket surface whose `path` is the directory being built. */
|
|
3808
|
-
function servedWebSocketApi(declared, workspaceRoot, appRoot) {
|
|
3809
|
-
return Object.values(declared).find((d) => d.kind === "websocket-api" && (0, node_path.resolve)(workspaceRoot, d.path) === (0, node_path.resolve)(appRoot));
|
|
3810
|
-
}
|
|
3811
3708
|
/** An import specifier for `file`, from `outputDir`, as the bundle sees it. */
|
|
3812
3709
|
function specifierOf$1(outputDir, file) {
|
|
3813
3710
|
const rel = (0, node_path.relative)(outputDir, file).replace(/\.ts$/, ".js");
|
|
@@ -4070,20 +3967,26 @@ async function buildCommand(options) {
|
|
|
4070
3967
|
const workspaceRoot = (0, node_path.resolve)(loadedConfig.workspace.root);
|
|
4071
3968
|
const isAtWorkspaceRoot = cwd === workspaceRoot;
|
|
4072
3969
|
const someAppIsElsewhere = Object.values(loadedConfig.workspace.apps).some((app) => (0, node_path.resolve)(workspaceRoot, app.path) !== workspaceRoot);
|
|
4073
|
-
if (isAtWorkspaceRoot && someAppIsElsewhere) {
|
|
3970
|
+
if (isAtWorkspaceRoot && someAppIsElsewhere && !options.app) {
|
|
4074
3971
|
logger$4.log("📦 Detected workspace configuration");
|
|
4075
3972
|
return workspaceBuildCommand(loadedConfig.workspace, options);
|
|
4076
3973
|
}
|
|
4077
3974
|
}
|
|
4078
|
-
const config = loadedConfig.type !== "workspace" ?
|
|
4079
|
-
|
|
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();
|
|
3982
|
+
const target = options.provider ?? require_dns.providerOf(loadedConfig.workspace);
|
|
4080
3983
|
const workspaceRoot = loadedConfig.workspace.root;
|
|
4081
|
-
const appRoot = process.cwd();
|
|
4082
3984
|
const output = await buildOneApp({
|
|
4083
3985
|
config,
|
|
4084
3986
|
options,
|
|
4085
3987
|
workspace: loadedConfig.workspace,
|
|
4086
3988
|
appRoot,
|
|
3989
|
+
...appName ? { appName } : {},
|
|
4087
3990
|
target
|
|
4088
3991
|
});
|
|
4089
3992
|
if ((0, node_path.resolve)(appRoot) === (0, node_path.resolve)(workspaceRoot)) await writeManifest({
|
|
@@ -4096,6 +3999,38 @@ async function buildCommand(options) {
|
|
|
4096
3999
|
});
|
|
4097
4000
|
return output;
|
|
4098
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
|
+
};
|
|
4099
4034
|
/** What the workspace declares, read through a config's globs. */
|
|
4100
4035
|
async function declaredIn(config, cwd) {
|
|
4101
4036
|
return require_discover.discover({
|
|
@@ -4109,15 +4044,15 @@ async function declaredIn(config, cwd) {
|
|
|
4109
4044
|
*/
|
|
4110
4045
|
function backendsOf(workspace) {
|
|
4111
4046
|
return {
|
|
4112
|
-
cache:
|
|
4047
|
+
cache: require_dns.cacheBackendFor(require_dns.providerOf(workspace)),
|
|
4113
4048
|
email: "ses"
|
|
4114
4049
|
};
|
|
4115
4050
|
}
|
|
4116
4051
|
/** One app's build, from its config and the command's options. */
|
|
4117
4052
|
async function buildOneApp(input) {
|
|
4118
|
-
const { config, options, workspace, appRoot, target } = input;
|
|
4119
|
-
const cacheBackend = options.cache ??
|
|
4120
|
-
const eventsBackend =
|
|
4053
|
+
const { config, options, workspace, appRoot, appName, target } = input;
|
|
4054
|
+
const cacheBackend = options.cache ?? require_dns.cacheBackendFor(require_dns.providerOf(workspace));
|
|
4055
|
+
const eventsBackend = require_dns.eventsBackendFor(require_dns.providerOf(workspace));
|
|
4121
4056
|
const production = normalizeProductionConfig(options.production ?? false);
|
|
4122
4057
|
if (production) logger$4.log(`🏭 Building for PRODUCTION`);
|
|
4123
4058
|
logger$4.log(`Building for ${target}`);
|
|
@@ -4130,6 +4065,7 @@ async function buildOneApp(input) {
|
|
|
4130
4065
|
config,
|
|
4131
4066
|
workspaceRoot: workspace.root,
|
|
4132
4067
|
appRoot,
|
|
4068
|
+
...appName ? { app: appName } : {},
|
|
4133
4069
|
target,
|
|
4134
4070
|
enableOpenApi: options.enableOpenApi ?? false,
|
|
4135
4071
|
cacheBackend,
|
|
@@ -4188,6 +4124,7 @@ async function writeManifest(input) {
|
|
|
4188
4124
|
async function buildApp(input) {
|
|
4189
4125
|
const { config, workspaceRoot, appRoot, target, enableOpenApi, cacheBackend, eventsBackend, production, telescope, databaseApi, hooks, bustCache = false } = input;
|
|
4190
4126
|
const constructGlobs = config.constructs;
|
|
4127
|
+
const appName = appNameOf(input);
|
|
4191
4128
|
const constructSources = {};
|
|
4192
4129
|
const background = {};
|
|
4193
4130
|
const served = {};
|
|
@@ -4199,32 +4136,36 @@ async function buildApp(input) {
|
|
|
4199
4136
|
background,
|
|
4200
4137
|
served
|
|
4201
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");
|
|
4202
4142
|
const selfServing = selfServingSurface({
|
|
4203
4143
|
declared,
|
|
4204
4144
|
sources: constructSources,
|
|
4205
4145
|
workspaceRoot,
|
|
4206
|
-
appRoot
|
|
4146
|
+
appRoot,
|
|
4147
|
+
app: appName
|
|
4207
4148
|
});
|
|
4208
4149
|
if (selfServing) {
|
|
4209
|
-
await writeSurfaceEntry(
|
|
4150
|
+
await writeSurfaceEntry(serverDir, selfServing.source, served[selfServing.id] ?? []);
|
|
4210
4151
|
const telemetry = require_EndpointGenerator.telemetryFor({
|
|
4211
4152
|
node: require_compose$1.telemetryOf(declared, selfServing.id),
|
|
4212
4153
|
appRoot,
|
|
4213
|
-
app:
|
|
4154
|
+
app: appName,
|
|
4214
4155
|
cwd: workspaceRoot,
|
|
4215
4156
|
serviceName: selfServing.id,
|
|
4216
4157
|
...input.workspaceName && { workspaceName: input.workspaceName }
|
|
4217
4158
|
});
|
|
4218
|
-
await require_EndpointGenerator.writeTelemetryModule(
|
|
4159
|
+
await require_EndpointGenerator.writeTelemetryModule(serverDir, telemetry);
|
|
4219
4160
|
logger$4.log(`Generated a server for ${selfServing.id} from its own declaration`);
|
|
4220
4161
|
if (production?.bundle && !input.skipBundle) {
|
|
4221
|
-
const outputDir =
|
|
4162
|
+
const outputDir = serverDir;
|
|
4222
4163
|
const entryPoint = await writeSurfaceServer(outputDir, {
|
|
4223
4164
|
...production,
|
|
4224
4165
|
...telemetry ? { telemetry } : {},
|
|
4225
4166
|
trustedOriginsKey: (0, _geekmidas_manifest.providedKeyFor)(selfServing.id, "rest-api", "trustedOrigins")
|
|
4226
4167
|
});
|
|
4227
|
-
const { bundleServer } = await Promise.resolve().then(() => require("./bundler-
|
|
4168
|
+
const { bundleServer } = await Promise.resolve().then(() => require("./bundler-CMieQ_0t.cjs"));
|
|
4228
4169
|
await bundleServer({
|
|
4229
4170
|
entryPoint,
|
|
4230
4171
|
outputDir: (0, node_path.join)(outputDir, "dist"),
|
|
@@ -4233,12 +4174,12 @@ async function buildApp(input) {
|
|
|
4233
4174
|
external: production.external,
|
|
4234
4175
|
...input.stage ? { stage: input.stage } : {}
|
|
4235
4176
|
});
|
|
4236
|
-
logger$4.log(`✅ Bundle complete: .
|
|
4177
|
+
logger$4.log(`✅ Bundle complete: ${(0, node_path.relative)(appRoot, (0, node_path.join)(outputDir, "dist", "server.mjs"))}`);
|
|
4237
4178
|
}
|
|
4238
4179
|
const surface = declared[selfServing.id];
|
|
4239
4180
|
if (target === "aws" && surface?.kind === "websocket-api") {
|
|
4240
4181
|
const websocketRoutes = await writeWebSocketLambdas({
|
|
4241
|
-
outputDir: (
|
|
4182
|
+
outputDir: outputOf("aws"),
|
|
4242
4183
|
appRoot,
|
|
4243
4184
|
workspaceRoot,
|
|
4244
4185
|
surface: selfServing.source,
|
|
@@ -4247,6 +4188,7 @@ async function buildApp(input) {
|
|
|
4247
4188
|
logger$4.log(`Generated ${websocketRoutes.length} API Gateway handlers for ${selfServing.id}`);
|
|
4248
4189
|
return {
|
|
4249
4190
|
selfServing: selfServing.id,
|
|
4191
|
+
serverDir,
|
|
4250
4192
|
built: {
|
|
4251
4193
|
surface: selfServing.id,
|
|
4252
4194
|
routes: [],
|
|
@@ -4258,13 +4200,17 @@ async function buildApp(input) {
|
|
|
4258
4200
|
}
|
|
4259
4201
|
};
|
|
4260
4202
|
}
|
|
4261
|
-
return {
|
|
4203
|
+
return {
|
|
4204
|
+
selfServing: selfServing.id,
|
|
4205
|
+
serverDir
|
|
4206
|
+
};
|
|
4262
4207
|
}
|
|
4263
|
-
const derived = ownersContext({
|
|
4208
|
+
const derived = require_docker.ownersContext({
|
|
4264
4209
|
declared,
|
|
4265
4210
|
sources: constructSources,
|
|
4266
4211
|
workspaceRoot,
|
|
4267
4212
|
appRoot,
|
|
4213
|
+
app: appName,
|
|
4268
4214
|
databaseApi
|
|
4269
4215
|
});
|
|
4270
4216
|
const buildContext = {
|
|
@@ -4292,8 +4238,7 @@ async function buildApp(input) {
|
|
|
4292
4238
|
queueGenerator.load(code, appRoot, bustCache),
|
|
4293
4239
|
topicGenerator.load(code, appRoot, bustCache)
|
|
4294
4240
|
]);
|
|
4295
|
-
const allEndpoints = servedBy(loadedEndpoints, derived.surface);
|
|
4296
|
-
const appName = appNameOf(input);
|
|
4241
|
+
const allEndpoints = require_docker.servedBy(loadedEndpoints, derived.surface);
|
|
4297
4242
|
const hosted = require_apps.workerUnits(input.workspace, declared, background).filter((unit) => unit.app === appName);
|
|
4298
4243
|
const hostedIds = new Set(hosted.map((unit) => unit.id));
|
|
4299
4244
|
const appRootAbs = (0, node_path.resolve)(appRoot);
|
|
@@ -4315,7 +4260,7 @@ async function buildApp(input) {
|
|
|
4315
4260
|
queues: hostedQueues,
|
|
4316
4261
|
subscribers: hostedSubscribers
|
|
4317
4262
|
};
|
|
4318
|
-
const reach = derived.surface ? reachedBy(declared, [
|
|
4263
|
+
const reach = derived.surface ? require_docker.reachedBy(declared, [
|
|
4319
4264
|
derived.surface.id,
|
|
4320
4265
|
...servesOnly ? [] : hosted.map((unit) => unit.id),
|
|
4321
4266
|
...production?.enabled ? [] : hostedUnits.flatMap((unit) => {
|
|
@@ -4340,7 +4285,7 @@ async function buildApp(input) {
|
|
|
4340
4285
|
if (target === "server") buildContext.telemetry = require_EndpointGenerator.telemetryFor({
|
|
4341
4286
|
node: processTelemetry(declared, derived.surface?.id, servesOnly ? [] : hosted.map((unit) => unit.id)),
|
|
4342
4287
|
appRoot,
|
|
4343
|
-
app:
|
|
4288
|
+
app: appName,
|
|
4344
4289
|
cwd: workspaceRoot,
|
|
4345
4290
|
serviceName: derived.surface?.id ?? (0, node_path.basename)(appRoot),
|
|
4346
4291
|
...input.workspaceName && { workspaceName: input.workspaceName },
|
|
@@ -4354,23 +4299,23 @@ async function buildApp(input) {
|
|
|
4354
4299
|
logger$4.log(`Found ${allTopics.length} topics`);
|
|
4355
4300
|
if (!input.serveEmpty && allEndpoints.length === 0 && allFunctions.length === 0 && allCrons.length === 0 && allSubscribers.length === 0 && allQueues.length === 0 && allTopics.length === 0) {
|
|
4356
4301
|
logger$4.log("No endpoints, functions, crons, subscribers, queues, or topics found to process");
|
|
4357
|
-
return {};
|
|
4302
|
+
return { serverDir };
|
|
4358
4303
|
}
|
|
4359
4304
|
if (servesOnly && production) buildContext.production = {
|
|
4360
4305
|
...production,
|
|
4361
4306
|
subscribers: "exclude"
|
|
4362
4307
|
};
|
|
4363
4308
|
if (target === "server" && !production?.enabled && hostedProcessors.length) {
|
|
4364
|
-
await processorGenerator.buildDev(
|
|
4309
|
+
await processorGenerator.buildDev(serverDir, hostedProcessors);
|
|
4365
4310
|
buildContext.devProcessors = true;
|
|
4366
4311
|
}
|
|
4367
|
-
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);
|
|
4368
4313
|
if (target === "server" && production?.enabled) await buildWorkers({
|
|
4369
4314
|
context: (workerId, work) => ({
|
|
4370
4315
|
...buildContext,
|
|
4371
4316
|
...runtimeDrivers({
|
|
4372
4317
|
appRoot,
|
|
4373
|
-
reach: reachedBy(declared, [workerId], work),
|
|
4318
|
+
reach: require_docker.reachedBy(declared, [workerId], work),
|
|
4374
4319
|
cacheBackend,
|
|
4375
4320
|
eventsBackend,
|
|
4376
4321
|
target
|
|
@@ -4379,13 +4324,13 @@ async function buildApp(input) {
|
|
|
4379
4324
|
telemetry: (workerId) => require_EndpointGenerator.telemetryFor({
|
|
4380
4325
|
node: require_compose$1.telemetryOf(declared, workerId),
|
|
4381
4326
|
appRoot,
|
|
4382
|
-
app:
|
|
4327
|
+
app: appName,
|
|
4383
4328
|
cwd: workspaceRoot,
|
|
4384
4329
|
serviceName: workerId,
|
|
4385
4330
|
...input.workspaceName && { workspaceName: input.workspaceName }
|
|
4386
4331
|
}),
|
|
4387
4332
|
workers: hosted,
|
|
4388
|
-
serverDir
|
|
4333
|
+
serverDir,
|
|
4389
4334
|
crons: hostedCrons,
|
|
4390
4335
|
queues: hostedQueues,
|
|
4391
4336
|
subscribers: hostedSubscribers,
|
|
@@ -4393,19 +4338,19 @@ async function buildApp(input) {
|
|
|
4393
4338
|
...input.stage ? { stage: input.stage } : {}
|
|
4394
4339
|
});
|
|
4395
4340
|
let processors = [];
|
|
4396
|
-
if (target === "aws") processors = await processorGenerator.build(buildContext, hostedProcessors, (
|
|
4341
|
+
if (target === "aws") processors = await processorGenerator.build(buildContext, hostedProcessors, outputOf(target), {
|
|
4397
4342
|
target,
|
|
4398
4343
|
root: workspaceRoot
|
|
4399
4344
|
});
|
|
4400
4345
|
else if (production?.enabled) processors = await buildProcessors({
|
|
4401
4346
|
context: buildContext,
|
|
4402
4347
|
units: hostedUnits.map((unit) => unit.id),
|
|
4403
|
-
serverDir
|
|
4348
|
+
serverDir,
|
|
4404
4349
|
processors: hostedProcessors,
|
|
4405
4350
|
telemetry: (fileServerId) => require_EndpointGenerator.telemetryFor({
|
|
4406
4351
|
node: require_compose$1.telemetryOf(declared, fileServerId),
|
|
4407
4352
|
appRoot,
|
|
4408
|
-
app:
|
|
4353
|
+
app: appName,
|
|
4409
4354
|
cwd: workspaceRoot,
|
|
4410
4355
|
serviceName: fileServerId,
|
|
4411
4356
|
...input.workspaceName && { workspaceName: input.workspaceName }
|
|
@@ -4431,6 +4376,7 @@ async function buildApp(input) {
|
|
|
4431
4376
|
});
|
|
4432
4377
|
return {
|
|
4433
4378
|
...result,
|
|
4379
|
+
serverDir,
|
|
4434
4380
|
...buildContext.databaseApi ? { databaseApi: buildContext.databaseApi.path } : {},
|
|
4435
4381
|
...!servesOnly && hosted.length > 0 ? { workers: hosted.map((unit) => unit.id) } : {}
|
|
4436
4382
|
};
|
|
@@ -4494,7 +4440,7 @@ async function buildWorkers(input) {
|
|
|
4494
4440
|
});
|
|
4495
4441
|
logger$4.log(`Generated worker ${worker.id}: ${crons.length} crons, ${queues.length} queues, ${subscribers.length} subscribers`);
|
|
4496
4442
|
if (!input.bundle) continue;
|
|
4497
|
-
const { bundleServer } = await Promise.resolve().then(() => require("./bundler-
|
|
4443
|
+
const { bundleServer } = await Promise.resolve().then(() => require("./bundler-CMieQ_0t.cjs"));
|
|
4498
4444
|
const outfile = require_docker.workerBundleName(worker.id);
|
|
4499
4445
|
await bundleServer({
|
|
4500
4446
|
entryPoint,
|
|
@@ -4510,7 +4456,7 @@ async function buildWorkers(input) {
|
|
|
4510
4456
|
...subscribers
|
|
4511
4457
|
].map((c) => c.construct)
|
|
4512
4458
|
});
|
|
4513
|
-
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))}`);
|
|
4514
4460
|
}
|
|
4515
4461
|
}
|
|
4516
4462
|
/**
|
|
@@ -4536,7 +4482,7 @@ async function buildProcessors(input) {
|
|
|
4536
4482
|
for (const { key, construct } of processors) infos.push(await require_docker.processorInfo(key, construct, handler, context));
|
|
4537
4483
|
logger$4.log(`Generated processors for ${fileServerId}: ${processors.map(({ key }) => key).join(", ")}`);
|
|
4538
4484
|
if (!input.bundle) continue;
|
|
4539
|
-
const { bundleServer } = await Promise.resolve().then(() => require("./bundler-
|
|
4485
|
+
const { bundleServer } = await Promise.resolve().then(() => require("./bundler-CMieQ_0t.cjs"));
|
|
4540
4486
|
const outfile = require_docker.processorBundleName(fileServerId);
|
|
4541
4487
|
await bundleServer({
|
|
4542
4488
|
entryPoint,
|
|
@@ -4548,7 +4494,7 @@ async function buildProcessors(input) {
|
|
|
4548
4494
|
...input.stage ? { stage: input.stage } : {},
|
|
4549
4495
|
constructs: processors.map((p) => p.construct)
|
|
4550
4496
|
});
|
|
4551
|
-
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))}`);
|
|
4552
4498
|
}
|
|
4553
4499
|
return infos;
|
|
4554
4500
|
}
|
|
@@ -4564,12 +4510,15 @@ function clientTelemetry(options) {
|
|
|
4564
4510
|
const sampleRate = require_workspace.stageSampleRate(options.telemetry, options.stage ?? "", local);
|
|
4565
4511
|
return sampleRate === void 0 ? {} : { telemetry: { sampleRate } };
|
|
4566
4512
|
}
|
|
4567
|
-
/**
|
|
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
|
+
*/
|
|
4568
4517
|
function appNameOf(input) {
|
|
4518
|
+
if (input.app) return input.app;
|
|
4569
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);
|
|
4570
4520
|
}
|
|
4571
|
-
async function buildForTarget(target, context, appRoot, workspaceRoot, endpointGenerator, functionGenerator, cronGenerator, subscriberGenerator, queueGenerator, topicGenerator, endpoints, functions, crons, subscribers, queues, topics, enableOpenApi, skipBundle, stage) {
|
|
4572
|
-
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) {
|
|
4573
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, {
|
|
4574
4523
|
recursive: true,
|
|
4575
4524
|
force: true
|
|
@@ -4619,7 +4568,7 @@ async function buildForTarget(target, context, appRoot, workspaceRoot, endpointG
|
|
|
4619
4568
|
let masterKey;
|
|
4620
4569
|
if (context.production?.bundle && !skipBundle) {
|
|
4621
4570
|
logger$4.log(`\n📦 Bundling production server...`);
|
|
4622
|
-
const { bundleServer } = await Promise.resolve().then(() => require("./bundler-
|
|
4571
|
+
const { bundleServer } = await Promise.resolve().then(() => require("./bundler-CMieQ_0t.cjs"));
|
|
4623
4572
|
const allConstructs = [
|
|
4624
4573
|
...endpoints.map((e) => e.construct),
|
|
4625
4574
|
...functions.map((f) => f.construct),
|
|
@@ -4636,7 +4585,7 @@ async function buildForTarget(target, context, appRoot, workspaceRoot, endpointG
|
|
|
4636
4585
|
stage,
|
|
4637
4586
|
constructs: allConstructs
|
|
4638
4587
|
})).masterKey;
|
|
4639
|
-
logger$4.log(`✅ Bundle complete: .
|
|
4588
|
+
logger$4.log(`✅ Bundle complete: ${(0, node_path.relative)(appRoot, (0, node_path.join)(outputDir, "dist", "server.mjs"))}`);
|
|
4640
4589
|
if (masterKey) {
|
|
4641
4590
|
const keyPath = (0, node_path.join)(outputDir, MASTER_KEY_FILE);
|
|
4642
4591
|
await (0, node_fs_promises.writeFile)(keyPath, `${masterKey}\n`, { mode: 384 });
|
|
@@ -4751,7 +4700,7 @@ async function workspaceBuildCommand(workspace, options) {
|
|
|
4751
4700
|
const buildOrder = require_workspace.getAppBuildOrder(workspace);
|
|
4752
4701
|
logger$4.log(` Build order: ${buildOrder.join(" → ")}`);
|
|
4753
4702
|
try {
|
|
4754
|
-
const target = options.provider ??
|
|
4703
|
+
const target = options.provider ?? require_dns.providerOf(workspace);
|
|
4755
4704
|
const builds = [];
|
|
4756
4705
|
for (const appName of buildOrder) {
|
|
4757
4706
|
const app = workspace.apps[appName];
|
|
@@ -4763,6 +4712,7 @@ async function workspaceBuildCommand(workspace, options) {
|
|
|
4763
4712
|
options,
|
|
4764
4713
|
workspace,
|
|
4765
4714
|
appRoot: (0, node_path.join)(workspace.root, app.path),
|
|
4715
|
+
appName,
|
|
4766
4716
|
target
|
|
4767
4717
|
});
|
|
4768
4718
|
if (output.built) builds.push(output.built);
|
|
@@ -4795,10 +4745,10 @@ async function workspaceBuildCommand(workspace, options) {
|
|
|
4795
4745
|
...sandbox.env,
|
|
4796
4746
|
NODE_ENV: options.production ? "production" : "development"
|
|
4797
4747
|
},
|
|
4798
|
-
timeoutMs:
|
|
4748
|
+
timeoutMs: require_dns.DEFAULT_TIMEOUT_MS,
|
|
4799
4749
|
output: "inherit"
|
|
4800
4750
|
});
|
|
4801
|
-
if (built.exitCode !== 0) throw new
|
|
4751
|
+
if (built.exitCode !== 0) throw new require_dns.CommandFailed(turboBin, turboArgs, built.exitCode, built.signal);
|
|
4802
4752
|
}
|
|
4803
4753
|
for (const [appName, app] of apps) {
|
|
4804
4754
|
const outputPath = getAppOutputPath(workspace, appName, app);
|
|
@@ -4897,7 +4847,7 @@ async function composeCommand(options, deps = {}) {
|
|
|
4897
4847
|
["tag", "--tag"]
|
|
4898
4848
|
].find(([key]) => options[key] !== void 0 && options[key] !== false)?.[1];
|
|
4899
4849
|
if (flag) throw new ComposeDestroyConflict(flag);
|
|
4900
|
-
const { composeDestroyCommand } = await Promise.resolve().then(() => require("./destroy-
|
|
4850
|
+
const { composeDestroyCommand } = await Promise.resolve().then(() => require("./destroy-Qb0MuIV4.cjs"));
|
|
4901
4851
|
await composeDestroyCommand({
|
|
4902
4852
|
stage: options.stage,
|
|
4903
4853
|
...options.cwd ? { cwd: options.cwd } : {},
|
|
@@ -4915,7 +4865,7 @@ async function composeCommand(options, deps = {}) {
|
|
|
4915
4865
|
const { workspace } = loaded;
|
|
4916
4866
|
const { stage } = options;
|
|
4917
4867
|
if (options.down) {
|
|
4918
|
-
const { composeStackRef } = await Promise.resolve().then(() => require("./destroy-
|
|
4868
|
+
const { composeStackRef } = await Promise.resolve().then(() => require("./destroy-Qb0MuIV4.cjs"));
|
|
4919
4869
|
const { ref, dir, server } = await composeStackRef(workspace, stage);
|
|
4920
4870
|
const docker = deps.docker ?? require_compose.dockerCompose;
|
|
4921
4871
|
if (server) console.log(`→ ${require_compose.sshTarget(server)} (docker over ssh)`);
|
|
@@ -5035,7 +4985,7 @@ const logger$3 = console;
|
|
|
5035
4985
|
* Get the Dokploy API token from stored credentials or environment
|
|
5036
4986
|
*/
|
|
5037
4987
|
async function getApiToken() {
|
|
5038
|
-
const token = await
|
|
4988
|
+
const token = await require_dns.getDokployToken();
|
|
5039
4989
|
if (!token) throw new Error("Dokploy credentials not found.\nRun \"gkm login --service dokploy\" to authenticate, or set DOKPLOY_API_TOKEN.");
|
|
5040
4990
|
return token;
|
|
5041
4991
|
}
|
|
@@ -5044,7 +4994,7 @@ async function getApiToken() {
|
|
|
5044
4994
|
*/
|
|
5045
4995
|
async function getEndpoint(providedEndpoint) {
|
|
5046
4996
|
if (providedEndpoint) return providedEndpoint;
|
|
5047
|
-
const stored = await
|
|
4997
|
+
const stored = await require_dns.getDokployCredentials();
|
|
5048
4998
|
if (stored) return stored.endpoint;
|
|
5049
4999
|
throw new Error("Dokploy endpoint not specified.\nEither run \"gkm login --service dokploy\" first, or provide --endpoint.");
|
|
5050
5000
|
}
|
|
@@ -5147,7 +5097,7 @@ async function deployListCommand(options) {
|
|
|
5147
5097
|
logger$3.log(" Run \"gkm registry:setup\" to configure a registry");
|
|
5148
5098
|
return;
|
|
5149
5099
|
}
|
|
5150
|
-
const storedRegistryId = await
|
|
5100
|
+
const storedRegistryId = await require_dns.getDokployRegistryId();
|
|
5151
5101
|
for (const registry of registries) {
|
|
5152
5102
|
const marker = registry.registryId === storedRegistryId ? " (default)" : "";
|
|
5153
5103
|
logger$3.log(`\n ${registry.registryName}${marker} (${registry.registryId})`);
|
|
@@ -6496,25 +6446,25 @@ function loadPackageJson() {
|
|
|
6496
6446
|
* Run: pnpm --filter @geekmidas/cli sync-versions
|
|
6497
6447
|
*/
|
|
6498
6448
|
const GEEKMIDAS_VERSIONS = {
|
|
6499
|
-
"@geekmidas/audit": ">=10.0.0-alpha.
|
|
6500
|
-
"@geekmidas/auth": ">=10.0.0-alpha.
|
|
6501
|
-
"@geekmidas/cache": ">=10.0.0-alpha.
|
|
6502
|
-
"@geekmidas/client": ">=10.0.0-alpha.
|
|
6503
|
-
"@geekmidas/cloud": ">=10.0.0-alpha.
|
|
6504
|
-
"@geekmidas/constructs": ">=10.0.0-alpha.
|
|
6505
|
-
"@geekmidas/db": ">=10.0.0-alpha.
|
|
6506
|
-
"@geekmidas/emailkit": ">=10.0.0-alpha.
|
|
6507
|
-
"@geekmidas/envkit": ">=10.0.0-alpha.
|
|
6508
|
-
"@geekmidas/errors": ">=10.0.0-alpha.
|
|
6509
|
-
"@geekmidas/events": ">=10.0.0-alpha.
|
|
6510
|
-
"@geekmidas/logger": ">=10.0.0-alpha.
|
|
6511
|
-
"@geekmidas/manifest": ">=10.0.0-alpha.
|
|
6512
|
-
"@geekmidas/rate-limit": ">=10.0.0-alpha.
|
|
6513
|
-
"@geekmidas/schema": ">=10.0.0-alpha.
|
|
6514
|
-
"@geekmidas/services": ">=10.0.0-alpha.
|
|
6515
|
-
"@geekmidas/storage": ">=10.0.0-alpha.
|
|
6516
|
-
"@geekmidas/telescope": ">=10.0.0-alpha.
|
|
6517
|
-
"@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",
|
|
6518
6468
|
"@geekmidas/cli": versionRange(loadPackageJson().version)
|
|
6519
6469
|
};
|
|
6520
6470
|
//#endregion
|
|
@@ -7707,7 +7657,7 @@ const COMMIT = /^[0-9a-f]{40}$/;
|
|
|
7707
7657
|
* The `uses:` value for the stages action, with a comment saying which CLI
|
|
7708
7658
|
* release the pinned commit is.
|
|
7709
7659
|
*/
|
|
7710
|
-
function stagesActionUses(commit = "
|
|
7660
|
+
function stagesActionUses(commit = "aeadef4c851eb294b367b692e6c5935a3ef45e71", version = cliVersion()) {
|
|
7711
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`;
|
|
7712
7662
|
}
|
|
7713
7663
|
//#endregion
|
|
@@ -8256,7 +8206,7 @@ function targetDeploy(options) {
|
|
|
8256
8206
|
role-to-assume: \${{ vars.AWS_ROLE_ARN }}
|
|
8257
8207
|
aws-region: ${options.region}
|
|
8258
8208
|
` : "";
|
|
8259
|
-
const keyDir = `~/.gkm/keys/${
|
|
8209
|
+
const keyDir = `~/.gkm/keys/${require_dns.projectKey({ name: options.name })}`;
|
|
8260
8210
|
const stageSecrets = sst ? credentials : `
|
|
8261
8211
|
# The stage's secrets are kept in the encrypted .gkm/secrets/<stage>.json,
|
|
8262
8212
|
# and each environment holds its key as GKM_SECRETS_KEY. .gkm/ is
|
|
@@ -15781,11 +15731,11 @@ async function initCommand(projectName, options = {}) {
|
|
|
15781
15731
|
}
|
|
15782
15732
|
devSecrets.custom = customSecrets;
|
|
15783
15733
|
const keys = {
|
|
15784
|
-
key:
|
|
15734
|
+
key: require_dns.projectKey({ name }),
|
|
15785
15735
|
legacy: [(0, node_path.basename)(targetDir)]
|
|
15786
15736
|
};
|
|
15787
|
-
await new
|
|
15788
|
-
const keyPath =
|
|
15737
|
+
await new require_dns.FileSecretsStore(targetDir, keys).write(local, devSecrets);
|
|
15738
|
+
const keyPath = require_dns.getKeyPath(local, keys);
|
|
15789
15739
|
console.log(` Secrets: .gkm/secrets/${local}.json (encrypted)`);
|
|
15790
15740
|
console.log(` Key: ${keyPath}\n`);
|
|
15791
15741
|
if (!options.skipInstall) {
|
|
@@ -16013,9 +15963,9 @@ const logger$2 = console;
|
|
|
16013
15963
|
*/
|
|
16014
15964
|
async function storeFor(stage) {
|
|
16015
15965
|
try {
|
|
16016
|
-
return await
|
|
15966
|
+
return await require_dns.secretsStoreFor(await require_config.loadWorkspaceSettings(), stage);
|
|
16017
15967
|
} catch (error) {
|
|
16018
|
-
if (error instanceof require_config.ConfigNotFound) return new
|
|
15968
|
+
if (error instanceof require_config.ConfigNotFound) return new require_dns.FileSecretsStore(process.cwd());
|
|
16019
15969
|
throw error;
|
|
16020
15970
|
}
|
|
16021
15971
|
}
|
|
@@ -16086,7 +16036,7 @@ async function secretsSetCommand(key, value, options) {
|
|
|
16086
16036
|
process.exit(1);
|
|
16087
16037
|
}
|
|
16088
16038
|
await assertCredentialValue(key, secretValue, stage);
|
|
16089
|
-
await store.write(stage,
|
|
16039
|
+
await store.write(stage, require_dns.withCustomSecret(secrets, key, secretValue));
|
|
16090
16040
|
logger$2.log(`\n✓ Secret "${key}" set for stage "${stage}" (${store.name})`);
|
|
16091
16041
|
}
|
|
16092
16042
|
/** `gkm secrets:unset` for a key the stage does not hold. */
|
|
@@ -16175,7 +16125,7 @@ async function secretsShowCommand(options) {
|
|
|
16175
16125
|
logger$2.log(` host: ${creds.host}`);
|
|
16176
16126
|
logger$2.log(` port: ${creds.port}`);
|
|
16177
16127
|
logger$2.log(` username: ${creds.username}`);
|
|
16178
|
-
logger$2.log(` password: ${reveal ? creds.password :
|
|
16128
|
+
logger$2.log(` password: ${reveal ? creds.password : require_dns.maskPassword(creds.password)}`);
|
|
16179
16129
|
if (creds.database) logger$2.log(` database: ${creds.database}`);
|
|
16180
16130
|
if (creds.bucket) logger$2.log(` bucket: ${creds.bucket}`);
|
|
16181
16131
|
}
|
|
@@ -16185,7 +16135,7 @@ async function secretsShowCommand(options) {
|
|
|
16185
16135
|
if (secrets.urls.STORAGE_ENDPOINT) logger$2.log(` STORAGE_ENDPOINT: ${secrets.urls.STORAGE_ENDPOINT}`);
|
|
16186
16136
|
if (Object.keys(secrets.custom).length > 0) {
|
|
16187
16137
|
logger$2.log("\nCustom Secrets:");
|
|
16188
|
-
for (const [key, value] of Object.entries(secrets.custom)) logger$2.log(` ${key}: ${reveal ? value :
|
|
16138
|
+
for (const [key, value] of Object.entries(secrets.custom)) logger$2.log(` ${key}: ${reveal ? value : require_dns.maskPassword(value)}`);
|
|
16189
16139
|
}
|
|
16190
16140
|
if (!reveal) logger$2.log("\nUse --reveal to show actual values");
|
|
16191
16141
|
}
|
|
@@ -16265,7 +16215,7 @@ async function secretsImportCommand(file, options) {
|
|
|
16265
16215
|
function maskUrl(url) {
|
|
16266
16216
|
try {
|
|
16267
16217
|
const parsed = new URL(url);
|
|
16268
|
-
if (parsed.password) parsed.password =
|
|
16218
|
+
if (parsed.password) parsed.password = require_dns.maskPassword(parsed.password);
|
|
16269
16219
|
return parsed.toString();
|
|
16270
16220
|
} catch {
|
|
16271
16221
|
return url;
|
|
@@ -16358,7 +16308,7 @@ async function resolveSecrets(stage, workspace, options) {
|
|
|
16358
16308
|
logger$1.log("🔐 Generating fresh secrets (--force)...");
|
|
16359
16309
|
return generateFreshSecrets(stage, workspace);
|
|
16360
16310
|
}
|
|
16361
|
-
const store = await
|
|
16311
|
+
const store = await require_dns.secretsStoreFor(workspace, stage);
|
|
16362
16312
|
const secrets = await store.read(stage);
|
|
16363
16313
|
if (secrets) {
|
|
16364
16314
|
logger$1.log("🔐 Using existing secrets");
|
|
@@ -16464,7 +16414,7 @@ function createFreshWorkspaceSecrets(stage, workspace, containers = []) {
|
|
|
16464
16414
|
*/
|
|
16465
16415
|
async function ensureStageSecrets(stage, cwd = process.cwd()) {
|
|
16466
16416
|
const { workspace } = await require_config.loadWorkspaceConfig(cwd);
|
|
16467
|
-
const store = await
|
|
16417
|
+
const store = await require_dns.secretsStoreFor(workspace, stage);
|
|
16468
16418
|
if (await store.read(stage)) return false;
|
|
16469
16419
|
const secrets = createFreshWorkspaceSecrets(stage, workspace, await require_apps.derivedContainers(workspace, stage));
|
|
16470
16420
|
await store.write(stage, secrets);
|
|
@@ -16475,7 +16425,7 @@ async function ensureStageSecrets(stage, cwd = process.cwd()) {
|
|
|
16475
16425
|
*/
|
|
16476
16426
|
async function generateFreshSecrets(stage, workspace) {
|
|
16477
16427
|
const secrets = createFreshWorkspaceSecrets(stage, workspace, await require_apps.derivedContainers(workspace, stage));
|
|
16478
|
-
const store = await
|
|
16428
|
+
const store = await require_dns.secretsStoreFor(workspace, stage);
|
|
16479
16429
|
await store.write(stage, secrets);
|
|
16480
16430
|
logger$1.log(` Secrets written to the "${stage}" store (${store.name})`);
|
|
16481
16431
|
return secrets;
|
|
@@ -16679,7 +16629,7 @@ function testDatabases(reconciled) {
|
|
|
16679
16629
|
* starts without the reference data the app needs.
|
|
16680
16630
|
*/
|
|
16681
16631
|
async function migrateTestStage(workspace, env) {
|
|
16682
|
-
const { migrateAndSeed } = await Promise.resolve().then(() => require("./migrate-
|
|
16632
|
+
const { migrateAndSeed } = await Promise.resolve().then(() => require("./migrate-z_MuES4x.cjs"));
|
|
16683
16633
|
const { discover } = await Promise.resolve().then(() => require("./discover-39VKSE2i.cjs")).then((n) => n.discover_exports);
|
|
16684
16634
|
const sources = {};
|
|
16685
16635
|
const manifest = await discover({
|
|
@@ -17071,7 +17021,7 @@ program.command("setup").description("Set this machine up for the workspace, onc
|
|
|
17071
17021
|
exitWithError(error);
|
|
17072
17022
|
}
|
|
17073
17023
|
});
|
|
17074
|
-
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) => {
|
|
17075
17025
|
try {
|
|
17076
17026
|
const globalOptions = program.opts();
|
|
17077
17027
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
@@ -17080,6 +17030,7 @@ program.command("build").description("Build handlers and the manifest from decla
|
|
|
17080
17030
|
await buildCommand({
|
|
17081
17031
|
...options.provider ? { provider: options.provider } : {},
|
|
17082
17032
|
...options.cache ? { cache: options.cache } : {},
|
|
17033
|
+
...options.app ? { app: options.app } : {},
|
|
17083
17034
|
enableOpenApi: options.enableOpenapi || false,
|
|
17084
17035
|
production: options.production || false,
|
|
17085
17036
|
skipBundle: options.skipBundle || false,
|
|
@@ -17132,7 +17083,7 @@ program.command("eas:sync").description("Set up a mobile app's EAS project for a
|
|
|
17132
17083
|
try {
|
|
17133
17084
|
const globalOptions = program.opts();
|
|
17134
17085
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
17135
|
-
const { easSync } = await Promise.resolve().then(() => require("./eas-
|
|
17086
|
+
const { easSync } = await Promise.resolve().then(() => require("./eas-DvKir935.cjs"));
|
|
17136
17087
|
await easSync(options);
|
|
17137
17088
|
} catch (error) {
|
|
17138
17089
|
exitWithError(error);
|
|
@@ -17142,7 +17093,7 @@ program.command("publish").description("Ship a mobile app for a deployed stage:
|
|
|
17142
17093
|
try {
|
|
17143
17094
|
const globalOptions = program.opts();
|
|
17144
17095
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
17145
|
-
const { publish, PublishModeConflict } = await Promise.resolve().then(() => require("./publish-
|
|
17096
|
+
const { publish, PublishModeConflict } = await Promise.resolve().then(() => require("./publish-DzMQWBW8.cjs"));
|
|
17146
17097
|
if (options.build && options.update) throw new PublishModeConflict();
|
|
17147
17098
|
const { build, update, ...rest } = options;
|
|
17148
17099
|
await publish({
|
|
@@ -17158,7 +17109,7 @@ program.command("deploy:google-play").description("Let EAS Submit publish a mobi
|
|
|
17158
17109
|
try {
|
|
17159
17110
|
const globalOptions = program.opts();
|
|
17160
17111
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
17161
|
-
const { deployGooglePlay } = await Promise.resolve().then(() => require("./googlePlay-
|
|
17112
|
+
const { deployGooglePlay } = await Promise.resolve().then(() => require("./googlePlay-FCJulaVY.cjs"));
|
|
17162
17113
|
await deployGooglePlay(options);
|
|
17163
17114
|
} catch (error) {
|
|
17164
17115
|
exitWithError(error);
|
|
@@ -17180,7 +17131,7 @@ program.command("migrate").description("Apply each database construct's migratio
|
|
|
17180
17131
|
try {
|
|
17181
17132
|
const globalOptions = program.opts();
|
|
17182
17133
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
17183
|
-
const { migrateCommand } = await Promise.resolve().then(() => require("./migrate-
|
|
17134
|
+
const { migrateCommand } = await Promise.resolve().then(() => require("./migrate-z_MuES4x.cjs"));
|
|
17184
17135
|
await migrateCommand({
|
|
17185
17136
|
...options,
|
|
17186
17137
|
...construct ? { construct } : {}
|
|
@@ -17193,7 +17144,7 @@ program.command("seed").description("Migrate, then run each database construct's
|
|
|
17193
17144
|
try {
|
|
17194
17145
|
const globalOptions = program.opts();
|
|
17195
17146
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
17196
|
-
const { seedCommand } = await Promise.resolve().then(() => require("./migrate-
|
|
17147
|
+
const { seedCommand } = await Promise.resolve().then(() => require("./migrate-z_MuES4x.cjs"));
|
|
17197
17148
|
await seedCommand({
|
|
17198
17149
|
...options,
|
|
17199
17150
|
...construct ? { construct } : {}
|
|
@@ -17206,7 +17157,7 @@ program.command("migration").description("Write a construct's next migration: an
|
|
|
17206
17157
|
try {
|
|
17207
17158
|
const globalOptions = program.opts();
|
|
17208
17159
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
17209
|
-
const { migrationCommand } = await Promise.resolve().then(() => require("./migrate-
|
|
17160
|
+
const { migrationCommand } = await Promise.resolve().then(() => require("./migrate-z_MuES4x.cjs"));
|
|
17210
17161
|
await migrationCommand({
|
|
17211
17162
|
construct,
|
|
17212
17163
|
...name ? { name } : {}
|
|
@@ -17306,7 +17257,7 @@ program.command("secrets:add").description("Build the keys a stage must be given
|
|
|
17306
17257
|
try {
|
|
17307
17258
|
const globalOptions = program.opts();
|
|
17308
17259
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
17309
|
-
const { secretsAddCommand } = await Promise.resolve().then(() => require("./add-
|
|
17260
|
+
const { secretsAddCommand } = await Promise.resolve().then(() => require("./add-DD5bYU31.cjs"));
|
|
17310
17261
|
await secretsAddCommand(options);
|
|
17311
17262
|
} catch (error) {
|
|
17312
17263
|
exitWithError(error);
|
|
@@ -17316,7 +17267,7 @@ program.command("encryption:rotate").description("Add a new current key to an En
|
|
|
17316
17267
|
try {
|
|
17317
17268
|
const globalOptions = program.opts();
|
|
17318
17269
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
17319
|
-
const { encryptionRotateCommand } = await Promise.resolve().then(() => require("./encryption-
|
|
17270
|
+
const { encryptionRotateCommand } = await Promise.resolve().then(() => require("./encryption-D88IRxkV.cjs"));
|
|
17320
17271
|
await encryptionRotateCommand(construct, options);
|
|
17321
17272
|
} catch (error) {
|
|
17322
17273
|
exitWithError(error);
|
|
@@ -17326,7 +17277,7 @@ program.command("encryption:retire").description("Remove an old key from an Encr
|
|
|
17326
17277
|
try {
|
|
17327
17278
|
const globalOptions = program.opts();
|
|
17328
17279
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
17329
|
-
const { encryptionRetireCommand } = await Promise.resolve().then(() => require("./encryption-
|
|
17280
|
+
const { encryptionRetireCommand } = await Promise.resolve().then(() => require("./encryption-D88IRxkV.cjs"));
|
|
17330
17281
|
await encryptionRetireCommand(construct, key, options);
|
|
17331
17282
|
} catch (error) {
|
|
17332
17283
|
exitWithError(error);
|
|
@@ -17365,7 +17316,7 @@ program.command("secrets:reconcile").description("Backfill missing custom secret
|
|
|
17365
17316
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
17366
17317
|
const { loadWorkspaceConfig } = await Promise.resolve().then(() => require("./config.cjs"));
|
|
17367
17318
|
const { reconcileMissingSecrets } = await Promise.resolve().then(() => require("./reconcile-CuCQBa5-.cjs"));
|
|
17368
|
-
const { secretsStoreFor } = await Promise.resolve().then(() => require("./
|
|
17319
|
+
const { secretsStoreFor } = await Promise.resolve().then(() => require("./dns-DSzsbU2g.cjs")).then((n) => n.store_exports);
|
|
17369
17320
|
const { workspace } = await loadWorkspaceConfig();
|
|
17370
17321
|
const stage = options.stage ?? workspace.stages.local;
|
|
17371
17322
|
const store = await secretsStoreFor(workspace, stage);
|
|
@@ -17374,7 +17325,7 @@ program.command("secrets:reconcile").description("Backfill missing custom secret
|
|
|
17374
17325
|
console.error(`No secrets found for stage "${stage}". Run "gkm secrets:init --stage ${stage}" first.`);
|
|
17375
17326
|
process.exit(1);
|
|
17376
17327
|
}
|
|
17377
|
-
const { derivedContainers } = await Promise.resolve().then(() => require("./apps-
|
|
17328
|
+
const { derivedContainers } = await Promise.resolve().then(() => require("./apps-CIKiSUxH.cjs")).then((n) => n.workspace_exports);
|
|
17378
17329
|
const result = reconcileMissingSecrets(secrets, workspace, await derivedContainers(workspace, stage));
|
|
17379
17330
|
if (!result) {
|
|
17380
17331
|
console.log(`\n✓ Secrets for stage "${stage}" are up-to-date`);
|
|
@@ -17391,14 +17342,14 @@ program.command("secrets:migrate").description("Copy a deployed stage's secrets
|
|
|
17391
17342
|
try {
|
|
17392
17343
|
const globalOptions = program.opts();
|
|
17393
17344
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
17394
|
-
const { secretsMigrateCommand } = await Promise.resolve().then(() => require("./migrate-
|
|
17345
|
+
const { secretsMigrateCommand } = await Promise.resolve().then(() => require("./migrate-D2mp7qyM.cjs"));
|
|
17395
17346
|
await secretsMigrateCommand(options);
|
|
17396
17347
|
} catch (error) {
|
|
17397
17348
|
exitWithError(error);
|
|
17398
17349
|
}
|
|
17399
17350
|
});
|
|
17400
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) => {
|
|
17401
|
-
const { deployCli } = await Promise.resolve().then(() => require("./cli-
|
|
17352
|
+
const { deployCli } = await Promise.resolve().then(() => require("./cli-DHnkkrXz.cjs"));
|
|
17402
17353
|
const globalOptions = program.opts();
|
|
17403
17354
|
const code = await deployCli({
|
|
17404
17355
|
cwd: (0, node_path.resolve)(globalOptions.cwd ?? process.cwd()),
|
|
@@ -17418,8 +17369,8 @@ program.command("deploy").description("Deploy a stage through its target").optio
|
|
|
17418
17369
|
});
|
|
17419
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) => {
|
|
17420
17371
|
try {
|
|
17421
|
-
const { rollbackStage } = await Promise.resolve().then(() => require("./rollback-
|
|
17422
|
-
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"));
|
|
17423
17374
|
const globalOptions = program.opts();
|
|
17424
17375
|
await rollbackStage({
|
|
17425
17376
|
cwd: (0, node_path.resolve)(globalOptions.cwd ?? process.cwd()),
|
|
@@ -17437,7 +17388,7 @@ program.command("compose:server").description("Set up a stage's server for compo
|
|
|
17437
17388
|
try {
|
|
17438
17389
|
const globalOptions = program.opts();
|
|
17439
17390
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
17440
|
-
const { composeServerCommand } = await Promise.resolve().then(() => require("./serverSetup-
|
|
17391
|
+
const { composeServerCommand } = await Promise.resolve().then(() => require("./serverSetup-Drh_mhxR.cjs"));
|
|
17441
17392
|
await composeServerCommand(options);
|
|
17442
17393
|
} catch (error) {
|
|
17443
17394
|
exitWithError(error);
|
|
@@ -17462,7 +17413,7 @@ program.command("deploy:github").description("Let GitHub Actions deploy a stage:
|
|
|
17462
17413
|
try {
|
|
17463
17414
|
const globalOptions = program.opts();
|
|
17464
17415
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
17465
|
-
const { deployGithubCommand } = await Promise.resolve().then(() => require("./github-
|
|
17416
|
+
const { deployGithubCommand } = await Promise.resolve().then(() => require("./github-CaUfjXXt.cjs"));
|
|
17466
17417
|
await deployGithubCommand(options);
|
|
17467
17418
|
} catch (error) {
|
|
17468
17419
|
exitWithError(error);
|
|
@@ -17472,7 +17423,7 @@ program.command("stages").description("The workspace's stages from gkm.config.ts
|
|
|
17472
17423
|
try {
|
|
17473
17424
|
const globalOptions = program.opts();
|
|
17474
17425
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
17475
|
-
const { stagesCommand } = await Promise.resolve().then(() => require("./stages-
|
|
17426
|
+
const { stagesCommand } = await Promise.resolve().then(() => require("./stages-8izznWib.cjs"));
|
|
17476
17427
|
await stagesCommand(options);
|
|
17477
17428
|
} catch (error) {
|
|
17478
17429
|
exitWithError(error);
|