@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.mjs
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
#!/usr/bin/env -S npx tsx
|
|
2
2
|
import { n as __require, t as __exportAll } from "./rolldown-runtime-BhDjJH2R.mjs";
|
|
3
3
|
import { n as isGkmError, t as GkmError } from "./errors-D8Gwp5kU.mjs";
|
|
4
|
-
import { B as FileSecretsStore, E as providerOf, F as toEmbeddableSecrets, I as withCustomSecret, N as maskPassword, T as eventsBackendFor, U as getKeyPath, X as deployIdentity, _t as storeGoDaddyToken, at as DEFAULT_TIMEOUT_MS, ct as getCredentialsPath, dt as getDokployToken, gt as storeDokployCredentials, ht as removeGoDaddyCredentials, k as secretsStoreFor, lt as getDokployCredentials, mt as removeDokployCredentials, pt as readCredentials, q as projectKey, rt as CommandFailed, ut as getDokployRegistryId, vt as storeHostingerToken, w as cacheBackendFor } from "./dns-
|
|
5
|
-
import { _ as projectNetwork, c as edgeRef, d as dockerHost, g as dockerCompose, h as ContainersNotStopped, i as ComposePushNeedsBuild, l as removeEdgeRoutes, m as ContainersNotStarted, p as sshTarget, r as ComposePinNeedsPull, t as composeTarget, u as composeServer } from "./compose-
|
|
4
|
+
import { B as FileSecretsStore, E as providerOf, F as toEmbeddableSecrets, I as withCustomSecret, N as maskPassword, T as eventsBackendFor, U as getKeyPath, X as deployIdentity, _t as storeGoDaddyToken, at as DEFAULT_TIMEOUT_MS, ct as getCredentialsPath, dt as getDokployToken, gt as storeDokployCredentials, ht as removeGoDaddyCredentials, k as secretsStoreFor, lt as getDokployCredentials, mt as removeDokployCredentials, pt as readCredentials, q as projectKey, rt as CommandFailed, ut as getDokployRegistryId, vt as storeHostingerToken, w as cacheBackendFor } from "./dns-BMtL2ytM.mjs";
|
|
5
|
+
import { _ as projectNetwork, c as edgeRef, d as dockerHost, g as dockerCompose, h as ContainersNotStopped, i as ComposePushNeedsBuild, l as removeEdgeRoutes, m as ContainersNotStarted, p as sshTarget, r as ComposePinNeedsPull, t as composeTarget, u as composeServer } from "./compose-CFCSlSXx.mjs";
|
|
6
6
|
import { A as InvalidStages, F as stageProblems, P as deployedProblems, R as stageSampleRate, a as allConstructGlobs, ct as protectedSubdomains, d as getAppGkmConfig, j as TEST_STAGE, lt as wildcardSite, ot as appKey, u as getAppBuildOrder } from "./workspace-BBa1Ck5j.mjs";
|
|
7
|
-
import { $ as imageBuildCredentials, Ct as postgresDatabaseNames, Ft as runTime, It as stageBackups, Nt as backupFile, Pt as backupsPrefix, S as ensureLocalAuthority, Tt as quoteIdentifier, _ as forgetState, ct as processorUnits, d as backendsOf$1, dt as BACKUPS_URL_KEY, et as isImageBuild, f as constructGlobs, ft as RUNNER_PATH, jt as backupDatabases, kt as stageEnv$1, lt as workerUnits, m as reconcileWorkspace, n as appProcess, o as processEnv, ot as isUnder, p as derivedContainers, u as FAKE_ENV, ut as BACKUPS_SERVICE, w as localAuthorityPaths, x as pgClient } from "./apps-
|
|
7
|
+
import { $ as imageBuildCredentials, Ct as postgresDatabaseNames, Ft as runTime, It as stageBackups, Nt as backupFile, Pt as backupsPrefix, S as ensureLocalAuthority, Tt as quoteIdentifier, _ as forgetState, ct as processorUnits, d as backendsOf$1, dt as BACKUPS_URL_KEY, et as isImageBuild, f as constructGlobs, ft as RUNNER_PATH, jt as backupDatabases, kt as stageEnv$1, lt as workerUnits, m as reconcileWorkspace, n as appProcess, o as processEnv, ot as isUnder, p as derivedContainers, u as FAKE_ENV, ut as BACKUPS_SERVICE, w as localAuthorityPaths, x as pgClient } from "./apps-iHK70h_F.mjs";
|
|
8
8
|
import { o as email } from "./schemas-BCwKKA42.mjs";
|
|
9
|
-
import { I as surfaceClientTraced, L as telemetryOf, N as scopeTelemetryEnv, O as TELEMETRY_CONTAINER, _ as readLocalCredentials, a as createEntryWrapper, c as loadEnvFiles, d as prepareEntryCredentials, dt as primaryPortKey, i as createCredentialsPreload, j as appTelemetry, l as loadPortState, lt as portsOf, o as findAvailablePort, ot as describeServices, pt as LOCAL_LOGS_EMAIL, s as isPortAvailable, st as fakeKey, t as CLUSTER_DATABASE, u as loadSecretsForApp } from "./compose-
|
|
9
|
+
import { I as surfaceClientTraced, L as telemetryOf, N as scopeTelemetryEnv, O as TELEMETRY_CONTAINER, _ as readLocalCredentials, a as createEntryWrapper, c as loadEnvFiles, d as prepareEntryCredentials, dt as primaryPortKey, i as createCredentialsPreload, j as appTelemetry, l as loadPortState, lt as portsOf, o as findAvailablePort, ot as describeServices, pt as LOCAL_LOGS_EMAIL, s as isPortAvailable, st as fakeKey, t as CLUSTER_DATABASE, u as loadSecretsForApp } from "./compose-DsFvWwAu.mjs";
|
|
10
10
|
import { n as assertTestCredentials, t as SubscriberGenerator } from "./SubscriberGenerator-CfZWX0lT.mjs";
|
|
11
11
|
import { a as isCacheBackend } from "./types-Y1NfWlyG.mjs";
|
|
12
12
|
import { a as startTelemetryCode, c as parseTelemetryFlag, i as routeTelemetry, n as runtimeFor, o as telemetryFor, r as mountRequestSpansCode, s as writeTelemetryModule, t as EndpointGenerator } from "./EndpointGenerator-CSKhAD6W.mjs";
|
|
13
|
-
import { i as discover,
|
|
13
|
+
import { i as discover, u as withOwningTsconfigJsx, v as ConstructGenerator } from "./discover-B_PDDaVj.mjs";
|
|
14
14
|
import { ConfigNotFound, NotABackendApp, NotInAnApp, loadAppConfig, loadConfig, loadWorkspaceConfig, loadWorkspaceSettings, parseModuleConfig } from "./config.mjs";
|
|
15
|
-
import { d as assertDevServicesFlag } from "./notes-
|
|
16
|
-
import { A as pinnedRef, M as awsClientConfig, N as awsEndpoint, O as parseDigests, P as awsProvisioningCredentials, a as composeProject, c as derivedCredentials, f as stackPlan, y as EDGE_PROJECT } from "./stack-
|
|
17
|
-
import { _ as processorInfo, d as workerEntryDir, f as QueueGenerator, g as processorEntryDir, h as processorBundleName, i as dockerCommand, l as WorkerGenerator, m as ProcessorGenerator, p as CronGenerator, u as workerBundleName } from "./docker-
|
|
15
|
+
import { d as assertDevServicesFlag } from "./notes-Dw9BWRJP.mjs";
|
|
16
|
+
import { A as pinnedRef, M as awsClientConfig, N as awsEndpoint, O as parseDigests, P as awsProvisioningCredentials, a as composeProject, c as derivedCredentials, f as stackPlan, y as EDGE_PROJECT } from "./stack-DI4qbrtn.mjs";
|
|
17
|
+
import { C as surfaceAt, S as servedBy, _ as processorInfo, b as ownersContext, d as workerEntryDir, f as QueueGenerator, g as processorEntryDir, h as processorBundleName, i as dockerCommand, l as WorkerGenerator, m as ProcessorGenerator, p as CronGenerator, u as workerBundleName, v as appOutputDir, x as reachedBy, y as sharedDirectoryTree } from "./docker-D89imkq2.mjs";
|
|
18
18
|
import { generateOpenApi, openapiCommand, resolveOpenApiConfig } from "./openapi.mjs";
|
|
19
19
|
import { a as describeHolder, c as withAppPorts, i as assignAppPorts, o as describeMove, r as appTag, s as holderOf, t as APP_TAG_ENV } from "./appPorts-BoXMwolc.mjs";
|
|
20
20
|
import { a as opensKmsKeys, n as driversFor, o as publishesToApiGateway, r as eventsBackendsIn, t as cacheBackendsIn } from "./drivers-wcDnzf7l.mjs";
|
|
21
21
|
import { n as withHandlers, t as manifestModule } from "./emit-C4KSXOeS.mjs";
|
|
22
|
-
import { t as LocalSandbox } from "./local-
|
|
23
|
-
import { S as createStateStore, k as keyFingerprint, n as sniffAppEnvironment, o as DokployApi } from "./sniffer-
|
|
24
|
-
import { t as deploy$1 } from "./deploy-
|
|
22
|
+
import { t as LocalSandbox } from "./local-DbxB0Fg4.mjs";
|
|
23
|
+
import { S as createStateStore, k as keyFingerprint, n as sniffAppEnvironment, o as DokployApi } from "./sniffer-DgjWtfBW.mjs";
|
|
24
|
+
import { t as deploy$1 } from "./deploy-CyrHJ5tR.mjs";
|
|
25
25
|
import { a as describeActor, d as dnsResources } from "./seeds-Ccn0Ru2T.mjs";
|
|
26
26
|
import { o as loadCredentialSchemas, t as CredentialsInvalid } from "./credentialSchemas-BzJiK1nQ.mjs";
|
|
27
|
-
import { t as LocalStateStore } from "./LocalStateStore-
|
|
27
|
+
import { t as LocalStateStore } from "./LocalStateStore-Zvirfsr4.mjs";
|
|
28
28
|
import { a as getExecCommand, c as validateProjectName, i as findWorkspaceRoot, n as detectPackageManager$1, o as getInstallCommand, r as findWorkspacePackages, s as getRunCommand, t as checkDirectoryExists } from "./utils-D_fxUqvU.mjs";
|
|
29
29
|
import { a as writeTestHarness, i as TEST_MANIFEST_ENV, n as TEST_READY_FILE, t as TEST_READY_ENV } from "./ready-COJHr1Yi.mjs";
|
|
30
30
|
import { createRequire } from "node:module";
|
|
@@ -38,7 +38,7 @@ import { homedir } from "node:os";
|
|
|
38
38
|
import { execFile, execSync, spawn } from "node:child_process";
|
|
39
39
|
import { connect } from "node:net";
|
|
40
40
|
import { createHash, randomBytes, timingSafeEqual } from "node:crypto";
|
|
41
|
-
import { canonicalId,
|
|
41
|
+
import { canonicalId, kebabCase, migrationFolder, providedKeyFor, schemeBase, seedFolder, serviceKey, wildcardDomainOf } from "@geekmidas/manifest";
|
|
42
42
|
import { pathToFileURL } from "node:url";
|
|
43
43
|
import { promisify } from "node:util";
|
|
44
44
|
import { Function } from "@geekmidas/constructs/functions";
|
|
@@ -54,7 +54,7 @@ import { Readable as Readable$1 } from "stream";
|
|
|
54
54
|
import crypto from "crypto";
|
|
55
55
|
import { Topic } from "@geekmidas/constructs/topic";
|
|
56
56
|
//#region package.json
|
|
57
|
-
var version = "10.0.0-alpha.
|
|
57
|
+
var version = "10.0.0-alpha.174";
|
|
58
58
|
//#endregion
|
|
59
59
|
//#region src/prompt.ts
|
|
60
60
|
/**
|
|
@@ -137,7 +137,7 @@ const logger$8 = console;
|
|
|
137
137
|
* Validate Dokploy token by making a test API call
|
|
138
138
|
*/
|
|
139
139
|
async function validateDokployToken(endpoint, token) {
|
|
140
|
-
const { DokployApi } = await import("./sniffer-
|
|
140
|
+
const { DokployApi } = await import("./sniffer-DgjWtfBW.mjs").then((n) => n.c);
|
|
141
141
|
return new DokployApi({
|
|
142
142
|
baseUrl: endpoint,
|
|
143
143
|
token
|
|
@@ -2436,7 +2436,7 @@ async function execCommand(commandArgs, options = {}, stageDeps) {
|
|
|
2436
2436
|
const cwd = options.cwd ?? process.cwd();
|
|
2437
2437
|
if (!commandArgs[0]) throw new NoCommandSpecified();
|
|
2438
2438
|
if (options.stage && !isImageBuild()) {
|
|
2439
|
-
const { execOnStage } = await import("./stage-
|
|
2439
|
+
const { execOnStage } = await import("./stage-C-qe-Lye.mjs").then((n) => n.n);
|
|
2440
2440
|
const { loadWorkspaceConfig } = await import("./config.mjs");
|
|
2441
2441
|
const { workspace } = await loadWorkspaceConfig(cwd);
|
|
2442
2442
|
if (options.stage !== workspace.stages.local) {
|
|
@@ -2619,6 +2619,7 @@ async function devCommand(options) {
|
|
|
2619
2619
|
config,
|
|
2620
2620
|
workspaceRoot: workspace?.root ?? secretsRoot,
|
|
2621
2621
|
appRoot,
|
|
2622
|
+
app: workspaceAppName,
|
|
2622
2623
|
target: "server",
|
|
2623
2624
|
enableOpenApi,
|
|
2624
2625
|
cacheBackend: cacheBackendFor(providerOf(workspace ?? config)),
|
|
@@ -2680,7 +2681,7 @@ async function devCommand(options) {
|
|
|
2680
2681
|
secretsJsonPath = join(secretsDir, secretsFileName);
|
|
2681
2682
|
await writeFile(secretsJsonPath, JSON.stringify(appSecrets, null, 2));
|
|
2682
2683
|
}
|
|
2683
|
-
const devServer = new DevServer(options.port ?? workspaceAppPort ?? 3e3, options.portExplicit ?? workspaceAppPort !== void 0, enableOpenApi, telescope, initial.databaseApi, runtime, appRoot, secretsJsonPath, initial.selfServing !== void 0);
|
|
2684
|
+
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);
|
|
2684
2685
|
devServer.label = workspaceAppName ?? "server";
|
|
2685
2686
|
devServer.publicUrl = publicUrl;
|
|
2686
2687
|
await devServer.start();
|
|
@@ -3011,9 +3012,9 @@ async function workspaceDevCommand(configured, options) {
|
|
|
3011
3012
|
for (const { id, port } of fakes) logger$5.log(`🎭 ${id} fake: http://localhost:${port}`);
|
|
3012
3013
|
logger$5.log(options.migrate || options.seed ? "🗄️ Migrating the databases" : "🗄️ Checking for pending migrations");
|
|
3013
3014
|
if (options.migrate || options.seed) {
|
|
3014
|
-
const { prepareDevDatabases } = await import("./migrate-
|
|
3015
|
+
const { prepareDevDatabases } = await import("./migrate-lidIEoZm.mjs");
|
|
3015
3016
|
await prepareDevDatabases(workspace, secretsEnv, { seed: !!options.seed });
|
|
3016
|
-
} else await import("./migrate-
|
|
3017
|
+
} else await import("./migrate-lidIEoZm.mjs").then(({ reportPendingMigrations }) => reportPendingMigrations(workspace, reconciled.env)).catch((error) => {
|
|
3017
3018
|
logger$5.log(`⚠️ Could not check for pending migrations: ${error instanceof Error ? error.message : String(error)}`);
|
|
3018
3019
|
});
|
|
3019
3020
|
const appUrls = {};
|
|
@@ -3477,11 +3478,12 @@ var DevServer = class {
|
|
|
3477
3478
|
appRoot;
|
|
3478
3479
|
secretsJsonPath;
|
|
3479
3480
|
selfServing;
|
|
3481
|
+
serverDir;
|
|
3480
3482
|
serverProcess = null;
|
|
3481
3483
|
isRunning = false;
|
|
3482
3484
|
actualPort;
|
|
3483
3485
|
startTime = Date.now();
|
|
3484
|
-
constructor(requestedPort, portExplicit, enableOpenApi, telescope, databaseApi, runtime = "node", appRoot = process.cwd(), secretsJsonPath, selfServing = false) {
|
|
3486
|
+
constructor(requestedPort, portExplicit, enableOpenApi, telescope, databaseApi, runtime = "node", appRoot = process.cwd(), secretsJsonPath, selfServing = false, serverDir = join(appRoot, ".gkm", "server")) {
|
|
3485
3487
|
this.requestedPort = requestedPort;
|
|
3486
3488
|
this.portExplicit = portExplicit;
|
|
3487
3489
|
this.enableOpenApi = enableOpenApi;
|
|
@@ -3491,6 +3493,7 @@ var DevServer = class {
|
|
|
3491
3493
|
this.appRoot = appRoot;
|
|
3492
3494
|
this.secretsJsonPath = secretsJsonPath;
|
|
3493
3495
|
this.selfServing = selfServing;
|
|
3496
|
+
this.serverDir = serverDir;
|
|
3494
3497
|
this.actualPort = requestedPort;
|
|
3495
3498
|
}
|
|
3496
3499
|
/** What the ready line calls this app. */
|
|
@@ -3516,7 +3519,7 @@ var DevServer = class {
|
|
|
3516
3519
|
this.actualPort = await findAvailablePort(this.requestedPort);
|
|
3517
3520
|
if (this.actualPort !== this.requestedPort) logger$5.log(`ℹ️ Port ${this.requestedPort} was in use, using port ${this.actualPort} instead`);
|
|
3518
3521
|
}
|
|
3519
|
-
const serverEntryPath = join(this.
|
|
3522
|
+
const serverEntryPath = join(this.serverDir, "server.ts");
|
|
3520
3523
|
await this.createServerEntry();
|
|
3521
3524
|
this.serverProcess = spawn(...tsxCommand(this.appRoot, [
|
|
3522
3525
|
serverEntryPath,
|
|
@@ -3593,7 +3596,7 @@ var DevServer = class {
|
|
|
3593
3596
|
}
|
|
3594
3597
|
async createServerEntry() {
|
|
3595
3598
|
const { writeFile: fsWriteFile } = await import("node:fs/promises");
|
|
3596
|
-
await fsWriteFile(join(this.
|
|
3599
|
+
await fsWriteFile(join(this.serverDir, "server.ts"), generateServerEntryContent({
|
|
3597
3600
|
secretsJsonPath: this.secretsJsonPath,
|
|
3598
3601
|
runtime: this.runtime,
|
|
3599
3602
|
enableOpenApi: this.enableOpenApi,
|
|
@@ -3673,107 +3676,6 @@ var TopicGenerator = class extends ConstructGenerator {
|
|
|
3673
3676
|
}
|
|
3674
3677
|
};
|
|
3675
3678
|
//#endregion
|
|
3676
|
-
//#region src/build/types.ts
|
|
3677
|
-
/**
|
|
3678
|
-
* Where `gkm dev` serves the database's read-only JSON API
|
|
3679
|
-
* (`@geekmidas/db/introspect`). Under `/__gkm` with the rest of what the dev
|
|
3680
|
-
* server adds, so it cannot collide with an application route.
|
|
3681
|
-
*/
|
|
3682
|
-
const DEV_DATABASE_API_PATH = "/__gkm/db";
|
|
3683
|
-
//#endregion
|
|
3684
|
-
//#region src/build/owners.ts
|
|
3685
|
-
/**
|
|
3686
|
-
* What a generated entry imports its runtime from, read off the discovered
|
|
3687
|
-
* constructs: the surface it serves, every construct a runnable can be built
|
|
3688
|
-
* from, and the database the dev server's JSON API reads.
|
|
3689
|
-
*
|
|
3690
|
-
* `gkm build` and `gkm dev` both write entries that import the surface for its
|
|
3691
|
-
* logger and environment parser, so both ask here. A dev server that skipped it
|
|
3692
|
-
* had nothing to import them from.
|
|
3693
|
-
*/
|
|
3694
|
-
function ownersContext(options) {
|
|
3695
|
-
const { declared, sources, workspaceRoot, appRoot, databaseApi } = options;
|
|
3696
|
-
const surfaces = restApis(declared);
|
|
3697
|
-
const primary = servedSurface(declared, workspaceRoot, appRoot) ?? surfaces.find((d) => !d.servesItself) ?? surfaces[0];
|
|
3698
|
-
const browsable = Object.entries(declared).find(([, d]) => d.kind === "database");
|
|
3699
|
-
const browsableSource = browsable ? sources[browsable[0]] : void 0;
|
|
3700
|
-
const owners = {};
|
|
3701
|
-
for (const [id, declaration] of Object.entries(declared)) {
|
|
3702
|
-
if (declaration.kind !== "rest-api" && declaration.kind !== "worker") continue;
|
|
3703
|
-
const source = sources[id];
|
|
3704
|
-
if (!source) continue;
|
|
3705
|
-
owners[id] = {
|
|
3706
|
-
specifier: source.file,
|
|
3707
|
-
exportName: source.exportName
|
|
3708
|
-
};
|
|
3709
|
-
}
|
|
3710
|
-
const primarySource = primary ? sources[primary.id] : void 0;
|
|
3711
|
-
return {
|
|
3712
|
-
owners,
|
|
3713
|
-
...primary ? { surface: {
|
|
3714
|
-
id: primary.id,
|
|
3715
|
-
trustedOriginsKey: providedKeyFor(primary.id, "rest-api", "trustedOrigins"),
|
|
3716
|
-
...primary.cors ? { cors: primary.cors } : {},
|
|
3717
|
-
...primarySource ? { module: {
|
|
3718
|
-
specifier: primarySource.file,
|
|
3719
|
-
exportName: primarySource.exportName
|
|
3720
|
-
} } : {}
|
|
3721
|
-
} } : {},
|
|
3722
|
-
...databaseApi && browsableSource ? { databaseApi: {
|
|
3723
|
-
path: DEV_DATABASE_API_PATH,
|
|
3724
|
-
database: {
|
|
3725
|
-
specifier: browsableSource.file,
|
|
3726
|
-
exportName: browsableSource.exportName
|
|
3727
|
-
}
|
|
3728
|
-
} } : {}
|
|
3729
|
-
};
|
|
3730
|
-
}
|
|
3731
|
-
/**
|
|
3732
|
-
* The endpoints one surface serves.
|
|
3733
|
-
*
|
|
3734
|
-
* One glob finds every surface's endpoints, wherever their files live. A build
|
|
3735
|
-
* keeps the ones built from the surface it serves; one built from no surface at
|
|
3736
|
-
* all has nowhere else to go.
|
|
3737
|
-
*/
|
|
3738
|
-
function servedBy(endpoints, surface) {
|
|
3739
|
-
if (!surface) return endpoints;
|
|
3740
|
-
return endpoints.filter(({ construct }) => !construct.surface || construct.surface.id === surface.id);
|
|
3741
|
-
}
|
|
3742
|
-
function restApis(declared) {
|
|
3743
|
-
return Object.values(declared).filter((d) => d.kind === "rest-api");
|
|
3744
|
-
}
|
|
3745
|
-
/**
|
|
3746
|
-
* The surface whose declared `path` is the directory being built — asked of
|
|
3747
|
-
* every surface, because a workspace has several and each app's build serves
|
|
3748
|
-
* exactly one.
|
|
3749
|
-
*/
|
|
3750
|
-
function servedSurface(declared, workspaceRoot, appRoot) {
|
|
3751
|
-
return restApis(declared).find((d) => resolve(workspaceRoot, d.path) === resolve(appRoot));
|
|
3752
|
-
}
|
|
3753
|
-
/**
|
|
3754
|
-
* The declarations one process reaches: the constructs it runs as — a surface,
|
|
3755
|
-
* a worker — what each declared an edge to, and what each runnable it runs
|
|
3756
|
-
* depends on or consumes.
|
|
3757
|
-
*
|
|
3758
|
-
* What decides which drivers its entry registers: a process that reaches no
|
|
3759
|
-
* cache never resolves a cache client because another process in the
|
|
3760
|
-
* workspace does.
|
|
3761
|
-
*/
|
|
3762
|
-
function reachedBy(declared, processes, runnables) {
|
|
3763
|
-
const reached = /* @__PURE__ */ new Set();
|
|
3764
|
-
for (const id of processes) {
|
|
3765
|
-
const declaration = declared[id];
|
|
3766
|
-
if (!declaration) continue;
|
|
3767
|
-
reached.add(id);
|
|
3768
|
-
for (const edge of dependenciesOf(declaration)) reached.add(edge.target);
|
|
3769
|
-
}
|
|
3770
|
-
for (const { construct } of runnables) {
|
|
3771
|
-
for (const id of construct.constructs ?? []) reached.add(canonicalId(id));
|
|
3772
|
-
for (const id of consumedBy(construct)) reached.add(id);
|
|
3773
|
-
}
|
|
3774
|
-
return Object.fromEntries(Object.entries(declared).filter(([id]) => reached.has(id)));
|
|
3775
|
-
}
|
|
3776
|
-
//#endregion
|
|
3777
3679
|
//#region src/build/surfaceEntry.ts
|
|
3778
3680
|
/** Whether a construct serves itself, asked of the construct. */
|
|
3779
3681
|
function servesItself(construct) {
|
|
@@ -3788,8 +3690,8 @@ function servesItself(construct) {
|
|
|
3788
3690
|
* the construct from the outside. The construct can simply be asked.
|
|
3789
3691
|
*/
|
|
3790
3692
|
function selfServingSurface(options) {
|
|
3791
|
-
const { declared, sources, workspaceRoot, appRoot } = options;
|
|
3792
|
-
const served =
|
|
3693
|
+
const { declared, sources, workspaceRoot, appRoot, app } = options;
|
|
3694
|
+
const served = surfaceAt(declared, workspaceRoot, appRoot, app);
|
|
3793
3695
|
const source = served ? sources[served.id] : void 0;
|
|
3794
3696
|
if (!served || !source || !servesItself(source.construct)) return void 0;
|
|
3795
3697
|
return {
|
|
@@ -3797,10 +3699,6 @@ function selfServingSurface(options) {
|
|
|
3797
3699
|
source
|
|
3798
3700
|
};
|
|
3799
3701
|
}
|
|
3800
|
-
/** The WebSocket surface whose `path` is the directory being built. */
|
|
3801
|
-
function servedWebSocketApi(declared, workspaceRoot, appRoot) {
|
|
3802
|
-
return Object.values(declared).find((d) => d.kind === "websocket-api" && resolve(workspaceRoot, d.path) === resolve(appRoot));
|
|
3803
|
-
}
|
|
3804
3702
|
/** An import specifier for `file`, from `outputDir`, as the bundle sees it. */
|
|
3805
3703
|
function specifierOf$1(outputDir, file) {
|
|
3806
3704
|
const rel = relative(outputDir, file).replace(/\.ts$/, ".js");
|
|
@@ -4063,20 +3961,26 @@ async function buildCommand(options) {
|
|
|
4063
3961
|
const workspaceRoot = resolve(loadedConfig.workspace.root);
|
|
4064
3962
|
const isAtWorkspaceRoot = cwd === workspaceRoot;
|
|
4065
3963
|
const someAppIsElsewhere = Object.values(loadedConfig.workspace.apps).some((app) => resolve(workspaceRoot, app.path) !== workspaceRoot);
|
|
4066
|
-
if (isAtWorkspaceRoot && someAppIsElsewhere) {
|
|
3964
|
+
if (isAtWorkspaceRoot && someAppIsElsewhere && !options.app) {
|
|
4067
3965
|
logger$4.log("📦 Detected workspace configuration");
|
|
4068
3966
|
return workspaceBuildCommand(loadedConfig.workspace, options);
|
|
4069
3967
|
}
|
|
4070
3968
|
}
|
|
4071
|
-
const config = loadedConfig.type !== "workspace" ?
|
|
3969
|
+
const { config, appName, appRoot } = loadedConfig.type !== "workspace" ? {
|
|
3970
|
+
config: await loadConfig(),
|
|
3971
|
+
appRoot: process.cwd()
|
|
3972
|
+
} : options.app ? namedApp(loadedConfig.workspace, options.app) : resolve(process.cwd()) === resolve(loadedConfig.workspace.root) ? {
|
|
3973
|
+
config: rootGkmConfig(loadedConfig.workspace),
|
|
3974
|
+
appRoot: process.cwd()
|
|
3975
|
+
} : await appHere();
|
|
4072
3976
|
const target = options.provider ?? providerOf(loadedConfig.workspace);
|
|
4073
3977
|
const workspaceRoot = loadedConfig.workspace.root;
|
|
4074
|
-
const appRoot = process.cwd();
|
|
4075
3978
|
const output = await buildOneApp({
|
|
4076
3979
|
config,
|
|
4077
3980
|
options,
|
|
4078
3981
|
workspace: loadedConfig.workspace,
|
|
4079
3982
|
appRoot,
|
|
3983
|
+
...appName ? { appName } : {},
|
|
4080
3984
|
target
|
|
4081
3985
|
});
|
|
4082
3986
|
if (resolve(appRoot) === resolve(workspaceRoot)) await writeManifest({
|
|
@@ -4089,6 +3993,38 @@ async function buildCommand(options) {
|
|
|
4089
3993
|
});
|
|
4090
3994
|
return output;
|
|
4091
3995
|
}
|
|
3996
|
+
/** The app this directory is part of, by its path. */
|
|
3997
|
+
async function appHere() {
|
|
3998
|
+
const { gkmConfig, appName } = await loadAppConfig();
|
|
3999
|
+
return {
|
|
4000
|
+
config: gkmConfig,
|
|
4001
|
+
appName,
|
|
4002
|
+
appRoot: process.cwd()
|
|
4003
|
+
};
|
|
4004
|
+
}
|
|
4005
|
+
/** The app `--app` names, built from its own directory. */
|
|
4006
|
+
function namedApp(workspace, appName) {
|
|
4007
|
+
const app = workspace.apps[appName];
|
|
4008
|
+
if (!app) throw new UnknownBuildApp(appName, Object.keys(workspace.apps));
|
|
4009
|
+
const config = getAppGkmConfig(workspace, appName);
|
|
4010
|
+
if (!config) throw new NotABackendApp(appName);
|
|
4011
|
+
return {
|
|
4012
|
+
config,
|
|
4013
|
+
appName,
|
|
4014
|
+
appRoot: join(workspace.root, app.path)
|
|
4015
|
+
};
|
|
4016
|
+
}
|
|
4017
|
+
/** `--app` named no app in the workspace. */
|
|
4018
|
+
var UnknownBuildApp = class extends GkmError {
|
|
4019
|
+
app;
|
|
4020
|
+
apps;
|
|
4021
|
+
constructor(app, apps) {
|
|
4022
|
+
super(`'${app}' is not an app in this workspace. Pass --app with one of: ${apps.join(", ")}.`);
|
|
4023
|
+
this.app = app;
|
|
4024
|
+
this.apps = apps;
|
|
4025
|
+
this.name = "UnknownBuildApp";
|
|
4026
|
+
}
|
|
4027
|
+
};
|
|
4092
4028
|
/** What the workspace declares, read through a config's globs. */
|
|
4093
4029
|
async function declaredIn(config, cwd) {
|
|
4094
4030
|
return discover({
|
|
@@ -4108,7 +4044,7 @@ function backendsOf(workspace) {
|
|
|
4108
4044
|
}
|
|
4109
4045
|
/** One app's build, from its config and the command's options. */
|
|
4110
4046
|
async function buildOneApp(input) {
|
|
4111
|
-
const { config, options, workspace, appRoot, target } = input;
|
|
4047
|
+
const { config, options, workspace, appRoot, appName, target } = input;
|
|
4112
4048
|
const cacheBackend = options.cache ?? cacheBackendFor(providerOf(workspace));
|
|
4113
4049
|
const eventsBackend = eventsBackendFor(providerOf(workspace));
|
|
4114
4050
|
const production = normalizeProductionConfig(options.production ?? false);
|
|
@@ -4123,6 +4059,7 @@ async function buildOneApp(input) {
|
|
|
4123
4059
|
config,
|
|
4124
4060
|
workspaceRoot: workspace.root,
|
|
4125
4061
|
appRoot,
|
|
4062
|
+
...appName ? { app: appName } : {},
|
|
4126
4063
|
target,
|
|
4127
4064
|
enableOpenApi: options.enableOpenApi ?? false,
|
|
4128
4065
|
cacheBackend,
|
|
@@ -4181,6 +4118,7 @@ async function writeManifest(input) {
|
|
|
4181
4118
|
async function buildApp(input) {
|
|
4182
4119
|
const { config, workspaceRoot, appRoot, target, enableOpenApi, cacheBackend, eventsBackend, production, telescope, databaseApi, hooks, bustCache = false } = input;
|
|
4183
4120
|
const constructGlobs = config.constructs;
|
|
4121
|
+
const appName = appNameOf(input);
|
|
4184
4122
|
const constructSources = {};
|
|
4185
4123
|
const background = {};
|
|
4186
4124
|
const served = {};
|
|
@@ -4192,32 +4130,36 @@ async function buildApp(input) {
|
|
|
4192
4130
|
background,
|
|
4193
4131
|
served
|
|
4194
4132
|
}) : {};
|
|
4133
|
+
const tree = sharedDirectoryTree(declared, workspaceRoot, appRoot, appName);
|
|
4134
|
+
const outputOf = (target) => appOutputDir(appRoot, target, tree);
|
|
4135
|
+
const serverDir = outputOf("server");
|
|
4195
4136
|
const selfServing = selfServingSurface({
|
|
4196
4137
|
declared,
|
|
4197
4138
|
sources: constructSources,
|
|
4198
4139
|
workspaceRoot,
|
|
4199
|
-
appRoot
|
|
4140
|
+
appRoot,
|
|
4141
|
+
app: appName
|
|
4200
4142
|
});
|
|
4201
4143
|
if (selfServing) {
|
|
4202
|
-
await writeSurfaceEntry(
|
|
4144
|
+
await writeSurfaceEntry(serverDir, selfServing.source, served[selfServing.id] ?? []);
|
|
4203
4145
|
const telemetry = telemetryFor({
|
|
4204
4146
|
node: telemetryOf(declared, selfServing.id),
|
|
4205
4147
|
appRoot,
|
|
4206
|
-
app:
|
|
4148
|
+
app: appName,
|
|
4207
4149
|
cwd: workspaceRoot,
|
|
4208
4150
|
serviceName: selfServing.id,
|
|
4209
4151
|
...input.workspaceName && { workspaceName: input.workspaceName }
|
|
4210
4152
|
});
|
|
4211
|
-
await writeTelemetryModule(
|
|
4153
|
+
await writeTelemetryModule(serverDir, telemetry);
|
|
4212
4154
|
logger$4.log(`Generated a server for ${selfServing.id} from its own declaration`);
|
|
4213
4155
|
if (production?.bundle && !input.skipBundle) {
|
|
4214
|
-
const outputDir =
|
|
4156
|
+
const outputDir = serverDir;
|
|
4215
4157
|
const entryPoint = await writeSurfaceServer(outputDir, {
|
|
4216
4158
|
...production,
|
|
4217
4159
|
...telemetry ? { telemetry } : {},
|
|
4218
4160
|
trustedOriginsKey: providedKeyFor(selfServing.id, "rest-api", "trustedOrigins")
|
|
4219
4161
|
});
|
|
4220
|
-
const { bundleServer } = await import("./bundler-
|
|
4162
|
+
const { bundleServer } = await import("./bundler-Cdhf7lv3.mjs");
|
|
4221
4163
|
await bundleServer({
|
|
4222
4164
|
entryPoint,
|
|
4223
4165
|
outputDir: join(outputDir, "dist"),
|
|
@@ -4226,12 +4168,12 @@ async function buildApp(input) {
|
|
|
4226
4168
|
external: production.external,
|
|
4227
4169
|
...input.stage ? { stage: input.stage } : {}
|
|
4228
4170
|
});
|
|
4229
|
-
logger$4.log(`✅ Bundle complete:
|
|
4171
|
+
logger$4.log(`✅ Bundle complete: ${relative(appRoot, join(outputDir, "dist", "server.mjs"))}`);
|
|
4230
4172
|
}
|
|
4231
4173
|
const surface = declared[selfServing.id];
|
|
4232
4174
|
if (target === "aws" && surface?.kind === "websocket-api") {
|
|
4233
4175
|
const websocketRoutes = await writeWebSocketLambdas({
|
|
4234
|
-
outputDir:
|
|
4176
|
+
outputDir: outputOf("aws"),
|
|
4235
4177
|
appRoot,
|
|
4236
4178
|
workspaceRoot,
|
|
4237
4179
|
surface: selfServing.source,
|
|
@@ -4240,6 +4182,7 @@ async function buildApp(input) {
|
|
|
4240
4182
|
logger$4.log(`Generated ${websocketRoutes.length} API Gateway handlers for ${selfServing.id}`);
|
|
4241
4183
|
return {
|
|
4242
4184
|
selfServing: selfServing.id,
|
|
4185
|
+
serverDir,
|
|
4243
4186
|
built: {
|
|
4244
4187
|
surface: selfServing.id,
|
|
4245
4188
|
routes: [],
|
|
@@ -4251,13 +4194,17 @@ async function buildApp(input) {
|
|
|
4251
4194
|
}
|
|
4252
4195
|
};
|
|
4253
4196
|
}
|
|
4254
|
-
return {
|
|
4197
|
+
return {
|
|
4198
|
+
selfServing: selfServing.id,
|
|
4199
|
+
serverDir
|
|
4200
|
+
};
|
|
4255
4201
|
}
|
|
4256
4202
|
const derived = ownersContext({
|
|
4257
4203
|
declared,
|
|
4258
4204
|
sources: constructSources,
|
|
4259
4205
|
workspaceRoot,
|
|
4260
4206
|
appRoot,
|
|
4207
|
+
app: appName,
|
|
4261
4208
|
databaseApi
|
|
4262
4209
|
});
|
|
4263
4210
|
const buildContext = {
|
|
@@ -4286,7 +4233,6 @@ async function buildApp(input) {
|
|
|
4286
4233
|
topicGenerator.load(code, appRoot, bustCache)
|
|
4287
4234
|
]);
|
|
4288
4235
|
const allEndpoints = servedBy(loadedEndpoints, derived.surface);
|
|
4289
|
-
const appName = appNameOf(input);
|
|
4290
4236
|
const hosted = workerUnits(input.workspace, declared, background).filter((unit) => unit.app === appName);
|
|
4291
4237
|
const hostedIds = new Set(hosted.map((unit) => unit.id));
|
|
4292
4238
|
const appRootAbs = resolve(appRoot);
|
|
@@ -4333,7 +4279,7 @@ async function buildApp(input) {
|
|
|
4333
4279
|
if (target === "server") buildContext.telemetry = telemetryFor({
|
|
4334
4280
|
node: processTelemetry(declared, derived.surface?.id, servesOnly ? [] : hosted.map((unit) => unit.id)),
|
|
4335
4281
|
appRoot,
|
|
4336
|
-
app:
|
|
4282
|
+
app: appName,
|
|
4337
4283
|
cwd: workspaceRoot,
|
|
4338
4284
|
serviceName: derived.surface?.id ?? basename(appRoot),
|
|
4339
4285
|
...input.workspaceName && { workspaceName: input.workspaceName },
|
|
@@ -4347,17 +4293,17 @@ async function buildApp(input) {
|
|
|
4347
4293
|
logger$4.log(`Found ${allTopics.length} topics`);
|
|
4348
4294
|
if (!input.serveEmpty && allEndpoints.length === 0 && allFunctions.length === 0 && allCrons.length === 0 && allSubscribers.length === 0 && allQueues.length === 0 && allTopics.length === 0) {
|
|
4349
4295
|
logger$4.log("No endpoints, functions, crons, subscribers, queues, or topics found to process");
|
|
4350
|
-
return {};
|
|
4296
|
+
return { serverDir };
|
|
4351
4297
|
}
|
|
4352
4298
|
if (servesOnly && production) buildContext.production = {
|
|
4353
4299
|
...production,
|
|
4354
4300
|
subscribers: "exclude"
|
|
4355
4301
|
};
|
|
4356
4302
|
if (target === "server" && !production?.enabled && hostedProcessors.length) {
|
|
4357
|
-
await processorGenerator.buildDev(
|
|
4303
|
+
await processorGenerator.buildDev(serverDir, hostedProcessors);
|
|
4358
4304
|
buildContext.devProcessors = true;
|
|
4359
4305
|
}
|
|
4360
|
-
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);
|
|
4306
|
+
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);
|
|
4361
4307
|
if (target === "server" && production?.enabled) await buildWorkers({
|
|
4362
4308
|
context: (workerId, work) => ({
|
|
4363
4309
|
...buildContext,
|
|
@@ -4372,13 +4318,13 @@ async function buildApp(input) {
|
|
|
4372
4318
|
telemetry: (workerId) => telemetryFor({
|
|
4373
4319
|
node: telemetryOf(declared, workerId),
|
|
4374
4320
|
appRoot,
|
|
4375
|
-
app:
|
|
4321
|
+
app: appName,
|
|
4376
4322
|
cwd: workspaceRoot,
|
|
4377
4323
|
serviceName: workerId,
|
|
4378
4324
|
...input.workspaceName && { workspaceName: input.workspaceName }
|
|
4379
4325
|
}),
|
|
4380
4326
|
workers: hosted,
|
|
4381
|
-
serverDir
|
|
4327
|
+
serverDir,
|
|
4382
4328
|
crons: hostedCrons,
|
|
4383
4329
|
queues: hostedQueues,
|
|
4384
4330
|
subscribers: hostedSubscribers,
|
|
@@ -4386,19 +4332,19 @@ async function buildApp(input) {
|
|
|
4386
4332
|
...input.stage ? { stage: input.stage } : {}
|
|
4387
4333
|
});
|
|
4388
4334
|
let processors = [];
|
|
4389
|
-
if (target === "aws") processors = await processorGenerator.build(buildContext, hostedProcessors,
|
|
4335
|
+
if (target === "aws") processors = await processorGenerator.build(buildContext, hostedProcessors, outputOf(target), {
|
|
4390
4336
|
target,
|
|
4391
4337
|
root: workspaceRoot
|
|
4392
4338
|
});
|
|
4393
4339
|
else if (production?.enabled) processors = await buildProcessors({
|
|
4394
4340
|
context: buildContext,
|
|
4395
4341
|
units: hostedUnits.map((unit) => unit.id),
|
|
4396
|
-
serverDir
|
|
4342
|
+
serverDir,
|
|
4397
4343
|
processors: hostedProcessors,
|
|
4398
4344
|
telemetry: (fileServerId) => telemetryFor({
|
|
4399
4345
|
node: telemetryOf(declared, fileServerId),
|
|
4400
4346
|
appRoot,
|
|
4401
|
-
app:
|
|
4347
|
+
app: appName,
|
|
4402
4348
|
cwd: workspaceRoot,
|
|
4403
4349
|
serviceName: fileServerId,
|
|
4404
4350
|
...input.workspaceName && { workspaceName: input.workspaceName }
|
|
@@ -4424,6 +4370,7 @@ async function buildApp(input) {
|
|
|
4424
4370
|
});
|
|
4425
4371
|
return {
|
|
4426
4372
|
...result,
|
|
4373
|
+
serverDir,
|
|
4427
4374
|
...buildContext.databaseApi ? { databaseApi: buildContext.databaseApi.path } : {},
|
|
4428
4375
|
...!servesOnly && hosted.length > 0 ? { workers: hosted.map((unit) => unit.id) } : {}
|
|
4429
4376
|
};
|
|
@@ -4487,7 +4434,7 @@ async function buildWorkers(input) {
|
|
|
4487
4434
|
});
|
|
4488
4435
|
logger$4.log(`Generated worker ${worker.id}: ${crons.length} crons, ${queues.length} queues, ${subscribers.length} subscribers`);
|
|
4489
4436
|
if (!input.bundle) continue;
|
|
4490
|
-
const { bundleServer } = await import("./bundler-
|
|
4437
|
+
const { bundleServer } = await import("./bundler-Cdhf7lv3.mjs");
|
|
4491
4438
|
const outfile = workerBundleName(worker.id);
|
|
4492
4439
|
await bundleServer({
|
|
4493
4440
|
entryPoint,
|
|
@@ -4503,7 +4450,7 @@ async function buildWorkers(input) {
|
|
|
4503
4450
|
...subscribers
|
|
4504
4451
|
].map((c) => c.construct)
|
|
4505
4452
|
});
|
|
4506
|
-
logger$4.log(`✅ Bundle complete: .
|
|
4453
|
+
logger$4.log(`✅ Bundle complete: ${relative(process.cwd(), join(input.serverDir, "dist", outfile))}`);
|
|
4507
4454
|
}
|
|
4508
4455
|
}
|
|
4509
4456
|
/**
|
|
@@ -4529,7 +4476,7 @@ async function buildProcessors(input) {
|
|
|
4529
4476
|
for (const { key, construct } of processors) infos.push(await processorInfo(key, construct, handler, context));
|
|
4530
4477
|
logger$4.log(`Generated processors for ${fileServerId}: ${processors.map(({ key }) => key).join(", ")}`);
|
|
4531
4478
|
if (!input.bundle) continue;
|
|
4532
|
-
const { bundleServer } = await import("./bundler-
|
|
4479
|
+
const { bundleServer } = await import("./bundler-Cdhf7lv3.mjs");
|
|
4533
4480
|
const outfile = processorBundleName(fileServerId);
|
|
4534
4481
|
await bundleServer({
|
|
4535
4482
|
entryPoint,
|
|
@@ -4541,7 +4488,7 @@ async function buildProcessors(input) {
|
|
|
4541
4488
|
...input.stage ? { stage: input.stage } : {},
|
|
4542
4489
|
constructs: processors.map((p) => p.construct)
|
|
4543
4490
|
});
|
|
4544
|
-
logger$4.log(`✅ Bundle complete: .
|
|
4491
|
+
logger$4.log(`✅ Bundle complete: ${relative(process.cwd(), join(input.serverDir, "dist", outfile))}`);
|
|
4545
4492
|
}
|
|
4546
4493
|
return infos;
|
|
4547
4494
|
}
|
|
@@ -4557,12 +4504,15 @@ function clientTelemetry(options) {
|
|
|
4557
4504
|
const sampleRate = stageSampleRate(options.telemetry, options.stage ?? "", local);
|
|
4558
4505
|
return sampleRate === void 0 ? {} : { telemetry: { sampleRate } };
|
|
4559
4506
|
}
|
|
4560
|
-
/**
|
|
4507
|
+
/**
|
|
4508
|
+
* The app being built: the one the caller named, else the workspace app
|
|
4509
|
+
* whose path is the directory, else the directory's own name.
|
|
4510
|
+
*/
|
|
4561
4511
|
function appNameOf(input) {
|
|
4512
|
+
if (input.app) return input.app;
|
|
4562
4513
|
return (input.workspace ? Object.entries(input.workspace.apps).find(([, app]) => resolve(input.workspace.root, app.path) === resolve(input.appRoot))?.[0] : void 0) ?? basename(input.appRoot);
|
|
4563
4514
|
}
|
|
4564
|
-
async function buildForTarget(target, context, appRoot, workspaceRoot, endpointGenerator, functionGenerator, cronGenerator, subscriberGenerator, queueGenerator, topicGenerator, endpoints, functions, crons, subscribers, queues, topics, enableOpenApi, skipBundle, stage) {
|
|
4565
|
-
const outputDir = join(appRoot, ".gkm", target);
|
|
4515
|
+
async function buildForTarget(target, context, appRoot, outputDir, workspaceRoot, endpointGenerator, functionGenerator, cronGenerator, subscriberGenerator, queueGenerator, topicGenerator, endpoints, functions, crons, subscribers, queues, topics, enableOpenApi, skipBundle, stage) {
|
|
4566
4516
|
await Promise.all([...SUPERSEDED_OUTPUT.map((dir) => join(appRoot, ".gkm", dir)), ...appRoot === workspaceRoot ? [] : [join(appRoot, ".gkm", "manifest")]].map((dir) => rm(dir, {
|
|
4567
4517
|
recursive: true,
|
|
4568
4518
|
force: true
|
|
@@ -4612,7 +4562,7 @@ async function buildForTarget(target, context, appRoot, workspaceRoot, endpointG
|
|
|
4612
4562
|
let masterKey;
|
|
4613
4563
|
if (context.production?.bundle && !skipBundle) {
|
|
4614
4564
|
logger$4.log(`\n📦 Bundling production server...`);
|
|
4615
|
-
const { bundleServer } = await import("./bundler-
|
|
4565
|
+
const { bundleServer } = await import("./bundler-Cdhf7lv3.mjs");
|
|
4616
4566
|
const allConstructs = [
|
|
4617
4567
|
...endpoints.map((e) => e.construct),
|
|
4618
4568
|
...functions.map((f) => f.construct),
|
|
@@ -4629,7 +4579,7 @@ async function buildForTarget(target, context, appRoot, workspaceRoot, endpointG
|
|
|
4629
4579
|
stage,
|
|
4630
4580
|
constructs: allConstructs
|
|
4631
4581
|
})).masterKey;
|
|
4632
|
-
logger$4.log(`✅ Bundle complete:
|
|
4582
|
+
logger$4.log(`✅ Bundle complete: ${relative(appRoot, join(outputDir, "dist", "server.mjs"))}`);
|
|
4633
4583
|
if (masterKey) {
|
|
4634
4584
|
const keyPath = join(outputDir, MASTER_KEY_FILE);
|
|
4635
4585
|
await writeFile(keyPath, `${masterKey}\n`, { mode: 384 });
|
|
@@ -4756,6 +4706,7 @@ async function workspaceBuildCommand(workspace, options) {
|
|
|
4756
4706
|
options,
|
|
4757
4707
|
workspace,
|
|
4758
4708
|
appRoot: join(workspace.root, app.path),
|
|
4709
|
+
appName,
|
|
4759
4710
|
target
|
|
4760
4711
|
});
|
|
4761
4712
|
if (output.built) builds.push(output.built);
|
|
@@ -4890,7 +4841,7 @@ async function composeCommand(options, deps = {}) {
|
|
|
4890
4841
|
["tag", "--tag"]
|
|
4891
4842
|
].find(([key]) => options[key] !== void 0 && options[key] !== false)?.[1];
|
|
4892
4843
|
if (flag) throw new ComposeDestroyConflict(flag);
|
|
4893
|
-
const { composeDestroyCommand } = await import("./destroy-
|
|
4844
|
+
const { composeDestroyCommand } = await import("./destroy-C2VQEDji.mjs");
|
|
4894
4845
|
await composeDestroyCommand({
|
|
4895
4846
|
stage: options.stage,
|
|
4896
4847
|
...options.cwd ? { cwd: options.cwd } : {},
|
|
@@ -4908,7 +4859,7 @@ async function composeCommand(options, deps = {}) {
|
|
|
4908
4859
|
const { workspace } = loaded;
|
|
4909
4860
|
const { stage } = options;
|
|
4910
4861
|
if (options.down) {
|
|
4911
|
-
const { composeStackRef } = await import("./destroy-
|
|
4862
|
+
const { composeStackRef } = await import("./destroy-C2VQEDji.mjs");
|
|
4912
4863
|
const { ref, dir, server } = await composeStackRef(workspace, stage);
|
|
4913
4864
|
const docker = deps.docker ?? dockerCompose;
|
|
4914
4865
|
if (server) console.log(`→ ${sshTarget(server)} (docker over ssh)`);
|
|
@@ -6489,25 +6440,25 @@ function loadPackageJson() {
|
|
|
6489
6440
|
* Run: pnpm --filter @geekmidas/cli sync-versions
|
|
6490
6441
|
*/
|
|
6491
6442
|
const GEEKMIDAS_VERSIONS = {
|
|
6492
|
-
"@geekmidas/audit": ">=10.0.0-alpha.
|
|
6493
|
-
"@geekmidas/auth": ">=10.0.0-alpha.
|
|
6494
|
-
"@geekmidas/cache": ">=10.0.0-alpha.
|
|
6495
|
-
"@geekmidas/client": ">=10.0.0-alpha.
|
|
6496
|
-
"@geekmidas/cloud": ">=10.0.0-alpha.
|
|
6497
|
-
"@geekmidas/constructs": ">=10.0.0-alpha.
|
|
6498
|
-
"@geekmidas/db": ">=10.0.0-alpha.
|
|
6499
|
-
"@geekmidas/emailkit": ">=10.0.0-alpha.
|
|
6500
|
-
"@geekmidas/envkit": ">=10.0.0-alpha.
|
|
6501
|
-
"@geekmidas/errors": ">=10.0.0-alpha.
|
|
6502
|
-
"@geekmidas/events": ">=10.0.0-alpha.
|
|
6503
|
-
"@geekmidas/logger": ">=10.0.0-alpha.
|
|
6504
|
-
"@geekmidas/manifest": ">=10.0.0-alpha.
|
|
6505
|
-
"@geekmidas/rate-limit": ">=10.0.0-alpha.
|
|
6506
|
-
"@geekmidas/schema": ">=10.0.0-alpha.
|
|
6507
|
-
"@geekmidas/services": ">=10.0.0-alpha.
|
|
6508
|
-
"@geekmidas/storage": ">=10.0.0-alpha.
|
|
6509
|
-
"@geekmidas/telescope": ">=10.0.0-alpha.
|
|
6510
|
-
"@geekmidas/testkit": ">=10.0.0-alpha.
|
|
6443
|
+
"@geekmidas/audit": ">=10.0.0-alpha.174 <10.0.0",
|
|
6444
|
+
"@geekmidas/auth": ">=10.0.0-alpha.174 <10.0.0",
|
|
6445
|
+
"@geekmidas/cache": ">=10.0.0-alpha.174 <10.0.0",
|
|
6446
|
+
"@geekmidas/client": ">=10.0.0-alpha.174 <10.0.0",
|
|
6447
|
+
"@geekmidas/cloud": ">=10.0.0-alpha.174 <10.0.0",
|
|
6448
|
+
"@geekmidas/constructs": ">=10.0.0-alpha.174 <10.0.0",
|
|
6449
|
+
"@geekmidas/db": ">=10.0.0-alpha.174 <10.0.0",
|
|
6450
|
+
"@geekmidas/emailkit": ">=10.0.0-alpha.174 <10.0.0",
|
|
6451
|
+
"@geekmidas/envkit": ">=10.0.0-alpha.174 <10.0.0",
|
|
6452
|
+
"@geekmidas/errors": ">=10.0.0-alpha.174 <10.0.0",
|
|
6453
|
+
"@geekmidas/events": ">=10.0.0-alpha.174 <10.0.0",
|
|
6454
|
+
"@geekmidas/logger": ">=10.0.0-alpha.174 <10.0.0",
|
|
6455
|
+
"@geekmidas/manifest": ">=10.0.0-alpha.174 <10.0.0",
|
|
6456
|
+
"@geekmidas/rate-limit": ">=10.0.0-alpha.174 <10.0.0",
|
|
6457
|
+
"@geekmidas/schema": ">=10.0.0-alpha.174 <10.0.0",
|
|
6458
|
+
"@geekmidas/services": ">=10.0.0-alpha.174 <10.0.0",
|
|
6459
|
+
"@geekmidas/storage": ">=10.0.0-alpha.174 <10.0.0",
|
|
6460
|
+
"@geekmidas/telescope": ">=10.0.0-alpha.174 <10.0.0",
|
|
6461
|
+
"@geekmidas/testkit": ">=10.0.0-alpha.174 <10.0.0",
|
|
6511
6462
|
"@geekmidas/cli": versionRange(loadPackageJson().version)
|
|
6512
6463
|
};
|
|
6513
6464
|
//#endregion
|
|
@@ -7700,7 +7651,7 @@ const COMMIT = /^[0-9a-f]{40}$/;
|
|
|
7700
7651
|
* The `uses:` value for the stages action, with a comment saying which CLI
|
|
7701
7652
|
* release the pinned commit is.
|
|
7702
7653
|
*/
|
|
7703
|
-
function stagesActionUses(commit = "
|
|
7654
|
+
function stagesActionUses(commit = "aeadef4c851eb294b367b692e6c5935a3ef45e71", version = cliVersion()) {
|
|
7704
7655
|
return commit && COMMIT.test(commit) ? `${STAGES_ACTION}@${commit} # @geekmidas/cli ${version}` : `${STAGES_ACTION}@main # pin to a commit SHA: see the action's README`;
|
|
7705
7656
|
}
|
|
7706
7657
|
//#endregion
|
|
@@ -16672,7 +16623,7 @@ function testDatabases(reconciled) {
|
|
|
16672
16623
|
* starts without the reference data the app needs.
|
|
16673
16624
|
*/
|
|
16674
16625
|
async function migrateTestStage(workspace, env) {
|
|
16675
|
-
const { migrateAndSeed } = await import("./migrate-
|
|
16626
|
+
const { migrateAndSeed } = await import("./migrate-lidIEoZm.mjs");
|
|
16676
16627
|
const { discover } = await import("./discover-B_PDDaVj.mjs").then((n) => n.a);
|
|
16677
16628
|
const sources = {};
|
|
16678
16629
|
const manifest = await discover({
|
|
@@ -17064,7 +17015,7 @@ program.command("setup").description("Set this machine up for the workspace, onc
|
|
|
17064
17015
|
exitWithError(error);
|
|
17065
17016
|
}
|
|
17066
17017
|
});
|
|
17067
|
-
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 Option("--cache <backend>", "Register the drivers for this cache backend rather than the target default").hideHelp()).action(async (options) => {
|
|
17018
|
+
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 Option("--cache <backend>", "Register the drivers for this cache backend rather than the target default").hideHelp()).action(async (options) => {
|
|
17068
17019
|
try {
|
|
17069
17020
|
const globalOptions = program.opts();
|
|
17070
17021
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
@@ -17073,6 +17024,7 @@ program.command("build").description("Build handlers and the manifest from decla
|
|
|
17073
17024
|
await buildCommand({
|
|
17074
17025
|
...options.provider ? { provider: options.provider } : {},
|
|
17075
17026
|
...options.cache ? { cache: options.cache } : {},
|
|
17027
|
+
...options.app ? { app: options.app } : {},
|
|
17076
17028
|
enableOpenApi: options.enableOpenapi || false,
|
|
17077
17029
|
production: options.production || false,
|
|
17078
17030
|
skipBundle: options.skipBundle || false,
|
|
@@ -17125,7 +17077,7 @@ program.command("eas:sync").description("Set up a mobile app's EAS project for a
|
|
|
17125
17077
|
try {
|
|
17126
17078
|
const globalOptions = program.opts();
|
|
17127
17079
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
17128
|
-
const { easSync } = await import("./eas-
|
|
17080
|
+
const { easSync } = await import("./eas-VxFCgjQa.mjs");
|
|
17129
17081
|
await easSync(options);
|
|
17130
17082
|
} catch (error) {
|
|
17131
17083
|
exitWithError(error);
|
|
@@ -17135,7 +17087,7 @@ program.command("publish").description("Ship a mobile app for a deployed stage:
|
|
|
17135
17087
|
try {
|
|
17136
17088
|
const globalOptions = program.opts();
|
|
17137
17089
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
17138
|
-
const { publish, PublishModeConflict } = await import("./publish-
|
|
17090
|
+
const { publish, PublishModeConflict } = await import("./publish-yslBcYWN.mjs");
|
|
17139
17091
|
if (options.build && options.update) throw new PublishModeConflict();
|
|
17140
17092
|
const { build, update, ...rest } = options;
|
|
17141
17093
|
await publish({
|
|
@@ -17151,7 +17103,7 @@ program.command("deploy:google-play").description("Let EAS Submit publish a mobi
|
|
|
17151
17103
|
try {
|
|
17152
17104
|
const globalOptions = program.opts();
|
|
17153
17105
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
17154
|
-
const { deployGooglePlay } = await import("./googlePlay-
|
|
17106
|
+
const { deployGooglePlay } = await import("./googlePlay-DrBrk6dZ.mjs");
|
|
17155
17107
|
await deployGooglePlay(options);
|
|
17156
17108
|
} catch (error) {
|
|
17157
17109
|
exitWithError(error);
|
|
@@ -17173,7 +17125,7 @@ program.command("migrate").description("Apply each database construct's migratio
|
|
|
17173
17125
|
try {
|
|
17174
17126
|
const globalOptions = program.opts();
|
|
17175
17127
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
17176
|
-
const { migrateCommand } = await import("./migrate-
|
|
17128
|
+
const { migrateCommand } = await import("./migrate-lidIEoZm.mjs");
|
|
17177
17129
|
await migrateCommand({
|
|
17178
17130
|
...options,
|
|
17179
17131
|
...construct ? { construct } : {}
|
|
@@ -17186,7 +17138,7 @@ program.command("seed").description("Migrate, then run each database construct's
|
|
|
17186
17138
|
try {
|
|
17187
17139
|
const globalOptions = program.opts();
|
|
17188
17140
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
17189
|
-
const { seedCommand } = await import("./migrate-
|
|
17141
|
+
const { seedCommand } = await import("./migrate-lidIEoZm.mjs");
|
|
17190
17142
|
await seedCommand({
|
|
17191
17143
|
...options,
|
|
17192
17144
|
...construct ? { construct } : {}
|
|
@@ -17199,7 +17151,7 @@ program.command("migration").description("Write a construct's next migration: an
|
|
|
17199
17151
|
try {
|
|
17200
17152
|
const globalOptions = program.opts();
|
|
17201
17153
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
17202
|
-
const { migrationCommand } = await import("./migrate-
|
|
17154
|
+
const { migrationCommand } = await import("./migrate-lidIEoZm.mjs");
|
|
17203
17155
|
await migrationCommand({
|
|
17204
17156
|
construct,
|
|
17205
17157
|
...name ? { name } : {}
|
|
@@ -17299,7 +17251,7 @@ program.command("secrets:add").description("Build the keys a stage must be given
|
|
|
17299
17251
|
try {
|
|
17300
17252
|
const globalOptions = program.opts();
|
|
17301
17253
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
17302
|
-
const { secretsAddCommand } = await import("./add-
|
|
17254
|
+
const { secretsAddCommand } = await import("./add-D570rDKN.mjs");
|
|
17303
17255
|
await secretsAddCommand(options);
|
|
17304
17256
|
} catch (error) {
|
|
17305
17257
|
exitWithError(error);
|
|
@@ -17309,7 +17261,7 @@ program.command("encryption:rotate").description("Add a new current key to an En
|
|
|
17309
17261
|
try {
|
|
17310
17262
|
const globalOptions = program.opts();
|
|
17311
17263
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
17312
|
-
const { encryptionRotateCommand } = await import("./encryption-
|
|
17264
|
+
const { encryptionRotateCommand } = await import("./encryption-_GRjwxGO.mjs");
|
|
17313
17265
|
await encryptionRotateCommand(construct, options);
|
|
17314
17266
|
} catch (error) {
|
|
17315
17267
|
exitWithError(error);
|
|
@@ -17319,7 +17271,7 @@ program.command("encryption:retire").description("Remove an old key from an Encr
|
|
|
17319
17271
|
try {
|
|
17320
17272
|
const globalOptions = program.opts();
|
|
17321
17273
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
17322
|
-
const { encryptionRetireCommand } = await import("./encryption-
|
|
17274
|
+
const { encryptionRetireCommand } = await import("./encryption-_GRjwxGO.mjs");
|
|
17323
17275
|
await encryptionRetireCommand(construct, key, options);
|
|
17324
17276
|
} catch (error) {
|
|
17325
17277
|
exitWithError(error);
|
|
@@ -17358,7 +17310,7 @@ program.command("secrets:reconcile").description("Backfill missing custom secret
|
|
|
17358
17310
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
17359
17311
|
const { loadWorkspaceConfig } = await import("./config.mjs");
|
|
17360
17312
|
const { reconcileMissingSecrets } = await import("./reconcile--I7V4Klj.mjs");
|
|
17361
|
-
const { secretsStoreFor } = await import("./dns-
|
|
17313
|
+
const { secretsStoreFor } = await import("./dns-BMtL2ytM.mjs").then((n) => n.j);
|
|
17362
17314
|
const { workspace } = await loadWorkspaceConfig();
|
|
17363
17315
|
const stage = options.stage ?? workspace.stages.local;
|
|
17364
17316
|
const store = await secretsStoreFor(workspace, stage);
|
|
@@ -17367,7 +17319,7 @@ program.command("secrets:reconcile").description("Backfill missing custom secret
|
|
|
17367
17319
|
console.error(`No secrets found for stage "${stage}". Run "gkm secrets:init --stage ${stage}" first.`);
|
|
17368
17320
|
process.exit(1);
|
|
17369
17321
|
}
|
|
17370
|
-
const { derivedContainers } = await import("./apps-
|
|
17322
|
+
const { derivedContainers } = await import("./apps-iHK70h_F.mjs").then((n) => n.h);
|
|
17371
17323
|
const result = reconcileMissingSecrets(secrets, workspace, await derivedContainers(workspace, stage));
|
|
17372
17324
|
if (!result) {
|
|
17373
17325
|
console.log(`\n✓ Secrets for stage "${stage}" are up-to-date`);
|
|
@@ -17384,14 +17336,14 @@ program.command("secrets:migrate").description("Copy a deployed stage's secrets
|
|
|
17384
17336
|
try {
|
|
17385
17337
|
const globalOptions = program.opts();
|
|
17386
17338
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
17387
|
-
const { secretsMigrateCommand } = await import("./migrate-
|
|
17339
|
+
const { secretsMigrateCommand } = await import("./migrate-C2Kjfwui.mjs");
|
|
17388
17340
|
await secretsMigrateCommand(options);
|
|
17389
17341
|
} catch (error) {
|
|
17390
17342
|
exitWithError(error);
|
|
17391
17343
|
}
|
|
17392
17344
|
});
|
|
17393
17345
|
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) => {
|
|
17394
|
-
const { deployCli } = await import("./cli-
|
|
17346
|
+
const { deployCli } = await import("./cli-CcWMO_-0.mjs");
|
|
17395
17347
|
const globalOptions = program.opts();
|
|
17396
17348
|
const code = await deployCli({
|
|
17397
17349
|
cwd: resolve(globalOptions.cwd ?? process.cwd()),
|
|
@@ -17411,8 +17363,8 @@ program.command("deploy").description("Deploy a stage through its target").optio
|
|
|
17411
17363
|
});
|
|
17412
17364
|
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) => {
|
|
17413
17365
|
try {
|
|
17414
|
-
const { rollbackStage } = await import("./rollback-
|
|
17415
|
-
const { terminalCredentials } = await import("./terminal-
|
|
17366
|
+
const { rollbackStage } = await import("./rollback-j8X0RdpU.mjs").then((n) => n.a);
|
|
17367
|
+
const { terminalCredentials } = await import("./terminal-DtO0Eh3g.mjs");
|
|
17416
17368
|
const globalOptions = program.opts();
|
|
17417
17369
|
await rollbackStage({
|
|
17418
17370
|
cwd: resolve(globalOptions.cwd ?? process.cwd()),
|
|
@@ -17430,7 +17382,7 @@ program.command("compose:server").description("Set up a stage's server for compo
|
|
|
17430
17382
|
try {
|
|
17431
17383
|
const globalOptions = program.opts();
|
|
17432
17384
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
17433
|
-
const { composeServerCommand } = await import("./serverSetup-
|
|
17385
|
+
const { composeServerCommand } = await import("./serverSetup-DUrSo7HL.mjs");
|
|
17434
17386
|
await composeServerCommand(options);
|
|
17435
17387
|
} catch (error) {
|
|
17436
17388
|
exitWithError(error);
|
|
@@ -17455,7 +17407,7 @@ program.command("deploy:github").description("Let GitHub Actions deploy a stage:
|
|
|
17455
17407
|
try {
|
|
17456
17408
|
const globalOptions = program.opts();
|
|
17457
17409
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
17458
|
-
const { deployGithubCommand } = await import("./github-
|
|
17410
|
+
const { deployGithubCommand } = await import("./github-BE-0zZ0H.mjs");
|
|
17459
17411
|
await deployGithubCommand(options);
|
|
17460
17412
|
} catch (error) {
|
|
17461
17413
|
exitWithError(error);
|