@geekmidas/cli 10.0.0-alpha.165 → 10.0.0-alpha.167
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-C7zClznh.mjs → GoDaddyProvider-Dci0SlN5.mjs} +2 -2
- package/dist/{GoDaddyProvider-C7zClznh.mjs.map → GoDaddyProvider-Dci0SlN5.mjs.map} +1 -1
- package/dist/{GoDaddyProvider-Dx6v4Goj.cjs → GoDaddyProvider-o6DJAsBZ.cjs} +2 -2
- package/dist/{GoDaddyProvider-Dx6v4Goj.cjs.map → GoDaddyProvider-o6DJAsBZ.cjs.map} +1 -1
- package/dist/{HostingerProvider-COuTy74z.cjs → HostingerProvider-BzHPhONW.cjs} +2 -2
- package/dist/{HostingerProvider-COuTy74z.cjs.map → HostingerProvider-BzHPhONW.cjs.map} +1 -1
- package/dist/{HostingerProvider-BALtMnss.mjs → HostingerProvider-Dd5x1zvF.mjs} +2 -2
- package/dist/{HostingerProvider-BALtMnss.mjs.map → HostingerProvider-Dd5x1zvF.mjs.map} +1 -1
- package/dist/{LegacyStateStore-CcNLLGX-.mjs → LegacyStateStore-CpF6rmZc.mjs} +2 -2
- package/dist/{LegacyStateStore-CcNLLGX-.mjs.map → LegacyStateStore-CpF6rmZc.mjs.map} +1 -1
- package/dist/{LegacyStateStore-C0rh3dKV.cjs → LegacyStateStore-tqY0hM8z.cjs} +2 -2
- package/dist/{LegacyStateStore-C0rh3dKV.cjs.map → LegacyStateStore-tqY0hM8z.cjs.map} +1 -1
- package/dist/{LocalStateStore-CxCCBQkS.mjs → LocalStateStore-Adp96xPy.mjs} +2 -2
- package/dist/{LocalStateStore-CxCCBQkS.mjs.map → LocalStateStore-Adp96xPy.mjs.map} +1 -1
- package/dist/{LocalStateStore-Dcq3wd1v.cjs → LocalStateStore-BYMUEGZN.cjs} +2 -2
- package/dist/{LocalStateStore-Dcq3wd1v.cjs.map → LocalStateStore-BYMUEGZN.cjs.map} +1 -1
- package/dist/{S3StateStore-DUwCcCgj.mjs → S3StateStore-13Go3hfM.mjs} +4 -4
- package/dist/{S3StateStore-DUwCcCgj.mjs.map → S3StateStore-13Go3hfM.mjs.map} +1 -1
- package/dist/{S3StateStore-Cgf1owUZ.cjs → S3StateStore-DjXyhGIP.cjs} +4 -4
- package/dist/{S3StateStore-Cgf1owUZ.cjs.map → S3StateStore-DjXyhGIP.cjs.map} +1 -1
- package/dist/{SSMStateStore-A_N_T4b0.mjs → SSMStateStore-CQHUyH-c.mjs} +2 -2
- package/dist/{SSMStateStore-A_N_T4b0.mjs.map → SSMStateStore-CQHUyH-c.mjs.map} +1 -1
- package/dist/{SSMStateStore-BarWA07O.cjs → SSMStateStore-DspMPho-.cjs} +2 -2
- package/dist/{SSMStateStore-BarWA07O.cjs.map → SSMStateStore-DspMPho-.cjs.map} +1 -1
- package/dist/{add-DVSNjsI8.cjs → add-DsxJ0Knr.cjs} +8 -8
- package/dist/{add-DVSNjsI8.cjs.map → add-DsxJ0Knr.cjs.map} +1 -1
- package/dist/{add-DAeCqI9O.mjs → add-Dt8QKSOw.mjs} +7 -7
- package/dist/{add-DAeCqI9O.mjs.map → add-Dt8QKSOw.mjs.map} +1 -1
- package/dist/{apps-S3RMvFyk.cjs → apps-C6s-trVp.cjs} +84 -31
- package/dist/apps-C6s-trVp.cjs.map +1 -0
- package/dist/{apps-Ck_Ie6gN.mjs → apps-w2sRQKCr.mjs} +66 -14
- package/dist/apps-w2sRQKCr.mjs.map +1 -0
- package/dist/{bundler-B_vQ_591.cjs → bundler-AzkSRAuu.cjs} +6 -6
- package/dist/{bundler-B_vQ_591.cjs.map → bundler-AzkSRAuu.cjs.map} +1 -1
- package/dist/{bundler-Bbn0opSb.mjs → bundler-BCWWne6N.mjs} +6 -6
- package/dist/{bundler-Bbn0opSb.mjs.map → bundler-BCWWne6N.mjs.map} +1 -1
- package/dist/{cli-CMykD9Py.mjs → cli-DSGw0Mw-.mjs} +5 -5
- package/dist/{cli-CMykD9Py.mjs.map → cli-DSGw0Mw-.mjs.map} +1 -1
- package/dist/{cli-fs4D-3cd.cjs → cli-OGss08bZ.cjs} +5 -5
- package/dist/{cli-fs4D-3cd.cjs.map → cli-OGss08bZ.cjs.map} +1 -1
- package/dist/{compose-CNJO99Tv.cjs → compose-BqTuzitb.cjs} +6 -6
- package/dist/{compose-CNJO99Tv.cjs.map → compose-BqTuzitb.cjs.map} +1 -1
- package/dist/{compose-BtjZNCC-.mjs → compose-Csegtvq_.mjs} +62 -9
- package/dist/compose-Csegtvq_.mjs.map +1 -0
- package/dist/{compose-DmcYTLhO.cjs → compose-QSBmhr4V.cjs} +73 -8
- package/dist/compose-QSBmhr4V.cjs.map +1 -0
- package/dist/{compose-Cm6EWvjX.mjs → compose-RhuFQmZS.mjs} +6 -6
- package/dist/{compose-Cm6EWvjX.mjs.map → compose-RhuFQmZS.mjs.map} +1 -1
- package/dist/config.cjs +457 -19
- package/dist/config.cjs.map +1 -0
- package/dist/config.mjs +440 -2
- package/dist/config.mjs.map +1 -0
- package/dist/{credentials-DVYgFK_H.cjs → credentials-CORvhcrO.cjs} +6 -6
- package/dist/{credentials-DVYgFK_H.cjs.map → credentials-CORvhcrO.cjs.map} +1 -1
- package/dist/{credentials-C-yuISKH.mjs → credentials-D4DUPPPP.mjs} +6 -6
- package/dist/{credentials-C-yuISKH.mjs.map → credentials-D4DUPPPP.mjs.map} +1 -1
- package/dist/deploy/public.cjs +12 -12
- package/dist/deploy/public.d.cts.map +1 -1
- package/dist/deploy/public.d.mts.map +1 -1
- package/dist/deploy/public.mjs +12 -12
- package/dist/{deploy-DGXMqTan.cjs → deploy-BwJ7uWXd.cjs} +119 -34
- package/dist/deploy-BwJ7uWXd.cjs.map +1 -0
- package/dist/{deploy-CuSF9y7t.mjs → deploy-DDfnQm8l.mjs} +110 -25
- package/dist/deploy-DDfnQm8l.mjs.map +1 -0
- package/dist/{destroy-DpRGLdt1.mjs → destroy-DKt8S051.mjs} +10 -10
- package/dist/{destroy-DpRGLdt1.mjs.map → destroy-DKt8S051.mjs.map} +1 -1
- package/dist/{destroy-BROvAzQQ.cjs → destroy-nTNRfdy6.cjs} +10 -10
- package/dist/{destroy-BROvAzQQ.cjs.map → destroy-nTNRfdy6.cjs.map} +1 -1
- package/dist/{docker-qq5xNUP2.cjs → docker-Dy1ZJUzV.cjs} +15 -10
- package/dist/docker-Dy1ZJUzV.cjs.map +1 -0
- package/dist/{docker-CRVWdGH9.mjs → docker-Ele34O8z.mjs} +13 -8
- package/dist/{docker-CRVWdGH9.mjs.map → docker-Ele34O8z.mjs.map} +1 -1
- package/dist/{dokploy-DcH7hY84.mjs → dokploy-BrfA2m5K.mjs} +2 -2
- package/dist/{dokploy-DcH7hY84.mjs.map → dokploy-BrfA2m5K.mjs.map} +1 -1
- package/dist/{dokploy-Duyj4-pa.cjs → dokploy-DN2W1YIH.cjs} +2 -2
- package/dist/{dokploy-Duyj4-pa.cjs.map → dokploy-DN2W1YIH.cjs.map} +1 -1
- package/dist/{eas-DqTDImhv.cjs → eas-BRBdxmwe.cjs} +6 -6
- package/dist/{eas-DqTDImhv.cjs.map → eas-BRBdxmwe.cjs.map} +1 -1
- package/dist/{eas-C11dyfIw.mjs → eas-CO3ogve5.mjs} +3 -3
- package/dist/{eas-C11dyfIw.mjs.map → eas-CO3ogve5.mjs.map} +1 -1
- package/dist/{encryption-CsOfA6QT.cjs → encryption-BZ1zgtF5.cjs} +4 -4
- package/dist/{encryption-CsOfA6QT.cjs.map → encryption-BZ1zgtF5.cjs.map} +1 -1
- package/dist/{encryption-DsZwqQyL.mjs → encryption-CHmfNBAy.mjs} +4 -4
- package/dist/{encryption-DsZwqQyL.mjs.map → encryption-CHmfNBAy.mjs.map} +1 -1
- package/dist/{engine-CdU3Oggs.mjs → engine-B3Gmu8-O.mjs} +13 -14
- package/dist/engine-B3Gmu8-O.mjs.map +1 -0
- package/dist/{engine-WllCnGNy.cjs → engine-DewbDHOq.cjs} +13 -14
- package/dist/engine-DewbDHOq.cjs.map +1 -0
- package/dist/{github-B3lKrKIn.cjs → github-DPNgIxdc.cjs} +116 -72
- package/dist/github-DPNgIxdc.cjs.map +1 -0
- package/dist/{github-Bt3V7pdf.mjs → github-DU3iEmJN.mjs} +116 -72
- package/dist/github-DU3iEmJN.mjs.map +1 -0
- package/dist/{googlePlay-B7P3Ahps.cjs → googlePlay-C2jnPqYn.cjs} +5 -5
- package/dist/{googlePlay-B7P3Ahps.cjs.map → googlePlay-C2jnPqYn.cjs.map} +1 -1
- package/dist/{googlePlay-D-6pUHGU.mjs → googlePlay-KPHn9H2f.mjs} +5 -5
- package/dist/{googlePlay-D-6pUHGU.mjs.map → googlePlay-KPHn9H2f.mjs.map} +1 -1
- package/dist/{iam-BVPpX76R.cjs → iam-C2sf6AUi.cjs} +2 -2
- package/dist/{iam-BVPpX76R.cjs.map → iam-C2sf6AUi.cjs.map} +1 -1
- package/dist/{iam-q9ALh-Y5.mjs → iam-CW61VcT3.mjs} +2 -2
- package/dist/{iam-q9ALh-Y5.mjs.map → iam-CW61VcT3.mjs.map} +1 -1
- package/dist/index.cjs +358 -119
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +352 -113
- package/dist/index.mjs.map +1 -1
- package/dist/{local-Cs_aQJ45.cjs → local-BxjA0EXj.cjs} +2 -2
- package/dist/{local-Cs_aQJ45.cjs.map → local-BxjA0EXj.cjs.map} +1 -1
- package/dist/{local-B4H2Lsr6.mjs → local-CwR2DW6i.mjs} +2 -2
- package/dist/{local-B4H2Lsr6.mjs.map → local-CwR2DW6i.mjs.map} +1 -1
- package/dist/{migrate-BQSPfKHa.cjs → migrate-B0a3WY4X.cjs} +6 -6
- package/dist/{migrate-BQSPfKHa.cjs.map → migrate-B0a3WY4X.cjs.map} +1 -1
- package/dist/{migrate-CphnV0sY.cjs → migrate-CYtM1UBH.cjs} +4 -4
- package/dist/{migrate-CphnV0sY.cjs.map → migrate-CYtM1UBH.cjs.map} +1 -1
- package/dist/{migrate-C8JFuMT-.mjs → migrate-DHWy64pc.mjs} +4 -4
- package/dist/{migrate-C8JFuMT-.mjs.map → migrate-DHWy64pc.mjs.map} +1 -1
- package/dist/{migrate-CQ-PNghX.mjs → migrate-vWy2CUoi.mjs} +6 -6
- package/dist/{migrate-CQ-PNghX.mjs.map → migrate-vWy2CUoi.mjs.map} +1 -1
- package/dist/next.cjs +59 -0
- package/dist/next.cjs.map +1 -0
- package/dist/next.d.cts +44 -0
- package/dist/next.d.cts.map +1 -0
- package/dist/next.d.mts +44 -0
- package/dist/next.d.mts.map +1 -0
- package/dist/next.mjs +58 -0
- package/dist/next.mjs.map +1 -0
- package/dist/{notes-IlQ35E3R.mjs → notes-9bOfe08J.mjs} +7 -8
- package/dist/notes-9bOfe08J.mjs.map +1 -0
- package/dist/{notes-BtyuHcKA.cjs → notes-DRdlsCYV.cjs} +10 -11
- package/dist/notes-DRdlsCYV.cjs.map +1 -0
- package/dist/openapi.cjs +3 -3
- package/dist/openapi.cjs.map +1 -1
- package/dist/openapi.mjs +2 -2
- package/dist/{projectBucket-SHlF0_Pr.mjs → projectBucket-Cd7sEDhG.mjs} +2 -2
- package/dist/{projectBucket-SHlF0_Pr.mjs.map → projectBucket-Cd7sEDhG.mjs.map} +1 -1
- package/dist/{projectBucket-0Lvy2J0h.cjs → projectBucket-gIQUuhGm.cjs} +2 -2
- package/dist/{projectBucket-0Lvy2J0h.cjs.map → projectBucket-gIQUuhGm.cjs.map} +1 -1
- package/dist/{publish-igpjCzZj.cjs → publish-BgDFx08y.cjs} +2 -2
- package/dist/{publish-igpjCzZj.cjs.map → publish-BgDFx08y.cjs.map} +1 -1
- package/dist/{publish-C9IJb1Ez.mjs → publish-DOxz4mxf.mjs} +2 -2
- package/dist/{publish-C9IJb1Ez.mjs.map → publish-DOxz4mxf.mjs.map} +1 -1
- package/dist/{resolve-5T34quci.cjs → resolve-BhQd4IkT.cjs} +4 -4
- package/dist/{resolve-5T34quci.cjs.map → resolve-BhQd4IkT.cjs.map} +1 -1
- package/dist/{resolve-Cl8CVASM.mjs → resolve-CdDyPOE8.mjs} +4 -4
- package/dist/{resolve-Cl8CVASM.mjs.map → resolve-CdDyPOE8.mjs.map} +1 -1
- package/dist/{rollback-DMPb940C.cjs → rollback-Brc-_HBJ.cjs} +7 -7
- package/dist/{rollback-DMPb940C.cjs.map → rollback-Brc-_HBJ.cjs.map} +1 -1
- package/dist/{rollback-1JLE6qPo.mjs → rollback-CLBKeSMl.mjs} +7 -7
- package/dist/{rollback-1JLE6qPo.mjs.map → rollback-CLBKeSMl.mjs.map} +1 -1
- package/dist/{s3-DkiOi5J1.cjs → s3-CuLmr6Q9.cjs} +3 -3
- package/dist/{s3-DkiOi5J1.cjs.map → s3-CuLmr6Q9.cjs.map} +1 -1
- package/dist/{s3-CCuNLgHk.mjs → s3-D0BIG_ml.mjs} +3 -3
- package/dist/{s3-CCuNLgHk.mjs.map → s3-D0BIG_ml.mjs.map} +1 -1
- package/dist/{serverSetup-C0pLpF5w.mjs → serverSetup-An1fE9nd.mjs} +7 -7
- package/dist/{serverSetup-C0pLpF5w.mjs.map → serverSetup-An1fE9nd.mjs.map} +1 -1
- package/dist/{serverSetup-JYZxj371.cjs → serverSetup-BMpzrB1y.cjs} +7 -7
- package/dist/{serverSetup-JYZxj371.cjs.map → serverSetup-BMpzrB1y.cjs.map} +1 -1
- package/dist/{sniffer-DB4Ocija.cjs → sniffer-9a8wQeeD.cjs} +7 -7
- package/dist/{sniffer-DB4Ocija.cjs.map → sniffer-9a8wQeeD.cjs.map} +1 -1
- package/dist/{sniffer-CiV4xGbe.mjs → sniffer-BObBXR5q.mjs} +7 -7
- package/dist/{sniffer-CiV4xGbe.mjs.map → sniffer-BObBXR5q.mjs.map} +1 -1
- package/dist/{snsSubscriptions-DpYvMVR9.cjs → snsSubscriptions-BRmEdsks.cjs} +3 -3
- package/dist/{snsSubscriptions-DpYvMVR9.cjs.map → snsSubscriptions-BRmEdsks.cjs.map} +1 -1
- package/dist/{snsSubscriptions-C_-6fqBd.mjs → snsSubscriptions-oUTOkG-s.mjs} +3 -3
- package/dist/{snsSubscriptions-C_-6fqBd.mjs.map → snsSubscriptions-oUTOkG-s.mjs.map} +1 -1
- package/dist/{sst-D1oSl_1d.cjs → sst-CJQI9GYW.cjs} +6 -6
- package/dist/{sst-D1oSl_1d.cjs.map → sst-CJQI9GYW.cjs.map} +1 -1
- package/dist/{sst-BUzuE84X.mjs → sst-DVIeKWCH.mjs} +5 -5
- package/dist/{sst-BUzuE84X.mjs.map → sst-DVIeKWCH.mjs.map} +1 -1
- package/dist/{stack-TUs2DY7v.cjs → stack-2jMvQfLo.cjs} +12 -13
- package/dist/{stack-TUs2DY7v.cjs.map → stack-2jMvQfLo.cjs.map} +1 -1
- package/dist/{stack-DhBBTTIa.mjs → stack-kcxH-2tZ.mjs} +7 -8
- package/dist/{stack-DhBBTTIa.mjs.map → stack-kcxH-2tZ.mjs.map} +1 -1
- package/dist/{stage-B3qg7LoZ.cjs → stage-AHgVG7H8.cjs} +7 -7
- package/dist/{stage-B3qg7LoZ.cjs.map → stage-AHgVG7H8.cjs.map} +1 -1
- package/dist/{stage-DuLwZ9wu.mjs → stage-BQSSMJL4.mjs} +7 -7
- package/dist/{stage-DuLwZ9wu.mjs.map → stage-BQSSMJL4.mjs.map} +1 -1
- package/dist/{stages-CW7qtiJ2.mjs → stages-BsK1Ro4s.mjs} +3 -3
- package/dist/{stages-CW7qtiJ2.mjs.map → stages-BsK1Ro4s.mjs.map} +1 -1
- package/dist/{stages-CtqmEJJW.cjs → stages-DpF2K3PZ.cjs} +3 -3
- package/dist/{stages-CtqmEJJW.cjs.map → stages-DpF2K3PZ.cjs.map} +1 -1
- package/dist/target/public.cjs +1 -1
- package/dist/target/public.mjs +1 -1
- package/dist/{terminal-CXZWPHMW.cjs → terminal-BNjNr7BN.cjs} +2 -2
- package/dist/{terminal-CXZWPHMW.cjs.map → terminal-BNjNr7BN.cjs.map} +1 -1
- package/dist/{terminal-B_TanNPL.mjs → terminal-DWROY7JE.mjs} +2 -2
- package/dist/{terminal-B_TanNPL.mjs.map → terminal-DWROY7JE.mjs.map} +1 -1
- package/dist/types-DEmuMHsS.d.cts.map +1 -1
- package/dist/types-g_S0_RAi.d.mts.map +1 -1
- package/dist/workspace/index.cjs +1 -1
- package/dist/workspace/index.mjs +1 -1
- package/dist/{workspace-D5Vm2qcy.mjs → workspace-9q4TSHlM.mjs} +330 -3
- package/dist/workspace-9q4TSHlM.mjs.map +1 -0
- package/dist/{workspace-VhzmoxOv.cjs → workspace-Ciw3SnME.cjs} +370 -1
- package/dist/workspace-Ciw3SnME.cjs.map +1 -0
- package/package.json +25 -15
- package/dist/apps-Ck_Ie6gN.mjs.map +0 -1
- package/dist/apps-S3RMvFyk.cjs.map +0 -1
- package/dist/compose-BtjZNCC-.mjs.map +0 -1
- package/dist/compose-DmcYTLhO.cjs.map +0 -1
- package/dist/config-CXj-9eRo.cjs +0 -890
- package/dist/config-CXj-9eRo.cjs.map +0 -1
- package/dist/config-Di0oJwM9.mjs +0 -759
- package/dist/config-Di0oJwM9.mjs.map +0 -1
- package/dist/deploy-CuSF9y7t.mjs.map +0 -1
- package/dist/deploy-DGXMqTan.cjs.map +0 -1
- package/dist/docker-qq5xNUP2.cjs.map +0 -1
- package/dist/engine-CdU3Oggs.mjs.map +0 -1
- package/dist/engine-WllCnGNy.cjs.map +0 -1
- package/dist/github-B3lKrKIn.cjs.map +0 -1
- package/dist/github-Bt3V7pdf.mjs.map +0 -1
- package/dist/notes-BtyuHcKA.cjs.map +0 -1
- package/dist/notes-IlQ35E3R.mjs.map +0 -1
- package/dist/workspace-D5Vm2qcy.mjs.map +0 -1
- package/dist/workspace-VhzmoxOv.cjs.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
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 "./credentials-
|
|
5
|
-
import { c as edgeRef, d as dockerHost, h as
|
|
6
|
-
import { A as InvalidStages, F as stageProblems, P as deployedProblems, R as stageSampleRate, a as allConstructGlobs, d as getAppGkmConfig, j as TEST_STAGE, u as getAppBuildOrder } from "./workspace-
|
|
7
|
-
import { $ as imageBuildCredentials, At as TELEMETRY_CONTAINER, Ct as postgresDatabaseNames, Ft as scopeTelemetryEnv, Jt as runTime, Kt as backupFile, Lt as surfaceClientTraced, Nt as appTelemetry, Rt as telemetryOf, S as ensureLocalAuthority, Tt as quoteIdentifier, Wt as backupDatabases, Yt as stageBackups, _ as forgetState, ct as processorUnits, d as backendsOf$1, dt as BACKUPS_URL_KEY, et as isImageBuild, f as constructGlobs, ft as RUNNER_PATH, kt as stageEnv$1, lt as workerUnits, m as reconcileWorkspace, n as appProcess, o as processEnv, ot as isUnder, p as derivedContainers, qt as backupsPrefix, u as FAKE_ENV, ut as BACKUPS_SERVICE, w as localAuthorityPaths, x as pgClient } from "./apps-
|
|
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 "./credentials-D4DUPPPP.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-Csegtvq_.mjs";
|
|
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-9q4TSHlM.mjs";
|
|
7
|
+
import { $ as imageBuildCredentials, At as TELEMETRY_CONTAINER, Ct as postgresDatabaseNames, Ft as scopeTelemetryEnv, Jt as runTime, Kt as backupFile, Lt as surfaceClientTraced, Nt as appTelemetry, Rt as telemetryOf, S as ensureLocalAuthority, Tt as quoteIdentifier, Wt as backupDatabases, Yt as stageBackups, _ as forgetState, ct as processorUnits, d as backendsOf$1, dt as BACKUPS_URL_KEY, et as isImageBuild, f as constructGlobs, ft as RUNNER_PATH, kt as stageEnv$1, lt as workerUnits, m as reconcileWorkspace, n as appProcess, o as processEnv, ot as isUnder, p as derivedContainers, qt as backupsPrefix, u as FAKE_ENV, ut as BACKUPS_SERVICE, w as localAuthorityPaths, x as pgClient } from "./apps-w2sRQKCr.mjs";
|
|
8
8
|
import { o as email } from "./schemas-BCwKKA42.mjs";
|
|
9
|
-
import { B as fakeKey, H as portsOf, K as LOCAL_LOGS_EMAIL, W as primaryPortKey, _ as readLocalCredentials, a as createEntryWrapper, c as loadEnvFiles, d as prepareEntryCredentials, i as createCredentialsPreload, l as loadPortState, o as findAvailablePort, s as isPortAvailable, t as CLUSTER_DATABASE, u as loadSecretsForApp, z as describeServices } from "./compose-
|
|
10
|
-
import { a as NotABackendApp, b as protectedSubdomains, d as loadConfig, g as parseModuleConfig, h as loadWorkspaceSettings, m as loadWorkspaceConfig, o as NotInAnApp, r as ConfigNotFound, u as loadAppConfig, v as appKey, x as wildcardSite } from "./config-Di0oJwM9.mjs";
|
|
9
|
+
import { B as fakeKey, H as portsOf, K as LOCAL_LOGS_EMAIL, W as primaryPortKey, _ as readLocalCredentials, a as createEntryWrapper, c as loadEnvFiles, d as prepareEntryCredentials, i as createCredentialsPreload, l as loadPortState, o as findAvailablePort, s as isPortAvailable, t as CLUSTER_DATABASE, u as loadSecretsForApp, z as describeServices } from "./compose-RhuFQmZS.mjs";
|
|
11
10
|
import { n as assertTestCredentials, t as SubscriberGenerator } from "./SubscriberGenerator-BybB6uez.mjs";
|
|
12
11
|
import { a as isCacheBackend } from "./types-Y1NfWlyG.mjs";
|
|
13
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-B5BKAoLz.mjs";
|
|
14
13
|
import { i as discover, r as consumedBy, u as withOwningTsconfigJsx, v as ConstructGenerator } from "./discover-DbDrCQ8h.mjs";
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
14
|
+
import { ConfigNotFound, NotABackendApp, NotInAnApp, loadAppConfig, loadConfig, loadWorkspaceConfig, loadWorkspaceSettings, parseModuleConfig } from "./config.mjs";
|
|
15
|
+
import { d as assertDevServicesFlag } from "./notes-9bOfe08J.mjs";
|
|
16
|
+
import { D as parseDigests, a as composeProject, c as derivedCredentials, f as stackPlan, k as pinnedRef, v as EDGE_PROJECT } from "./stack-kcxH-2tZ.mjs";
|
|
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-Ele34O8z.mjs";
|
|
18
|
+
import { S as awsProvisioningCredentials, b as awsClientConfig, x as awsEndpoint } from "./snsSubscriptions-oUTOkG-s.mjs";
|
|
19
19
|
import { generateOpenApi, openapiCommand, resolveOpenApiConfig } from "./openapi.mjs";
|
|
20
20
|
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";
|
|
21
21
|
import { a as opensKmsKeys, n as driversFor, o as publishesToApiGateway, r as eventsBackendsIn, t as cacheBackendsIn } from "./drivers-wcDnzf7l.mjs";
|
|
22
22
|
import { n as withHandlers, t as manifestModule } from "./emit-C4KSXOeS.mjs";
|
|
23
|
-
import { t as LocalSandbox } from "./local-
|
|
24
|
-
import { S as createStateStore, k as keyFingerprint, n as sniffAppEnvironment, o as DokployApi } from "./sniffer-
|
|
25
|
-
import { t as deploy$1 } from "./deploy-
|
|
23
|
+
import { t as LocalSandbox } from "./local-CwR2DW6i.mjs";
|
|
24
|
+
import { S as createStateStore, k as keyFingerprint, n as sniffAppEnvironment, o as DokployApi } from "./sniffer-BObBXR5q.mjs";
|
|
25
|
+
import { t as deploy$1 } from "./deploy-DDfnQm8l.mjs";
|
|
26
26
|
import { a as describeActor, d as dnsResources } from "./seeds-Ccn0Ru2T.mjs";
|
|
27
27
|
import { o as loadCredentialSchemas, t as CredentialsInvalid } from "./credentialSchemas-mz9QZTYh.mjs";
|
|
28
|
-
import { t as LocalStateStore } from "./LocalStateStore-
|
|
28
|
+
import { t as LocalStateStore } from "./LocalStateStore-Adp96xPy.mjs";
|
|
29
29
|
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";
|
|
30
30
|
import { a as writeTestHarness, i as TEST_MANIFEST_ENV, n as TEST_READY_FILE, t as TEST_READY_ENV } from "./ready-BjFMu_1J.mjs";
|
|
31
31
|
import { createRequire } from "node:module";
|
|
@@ -55,7 +55,7 @@ import { Readable as Readable$1 } from "stream";
|
|
|
55
55
|
import crypto from "crypto";
|
|
56
56
|
import { Topic } from "@geekmidas/constructs/topic";
|
|
57
57
|
//#region package.json
|
|
58
|
-
var version = "10.0.0-alpha.
|
|
58
|
+
var version = "10.0.0-alpha.167";
|
|
59
59
|
//#endregion
|
|
60
60
|
//#region src/prompt.ts
|
|
61
61
|
/**
|
|
@@ -138,7 +138,7 @@ const logger$8 = console;
|
|
|
138
138
|
* Validate Dokploy token by making a test API call
|
|
139
139
|
*/
|
|
140
140
|
async function validateDokployToken(endpoint, token) {
|
|
141
|
-
const { DokployApi } = await import("./sniffer-
|
|
141
|
+
const { DokployApi } = await import("./sniffer-BObBXR5q.mjs").then((n) => n.c);
|
|
142
142
|
return new DokployApi({
|
|
143
143
|
baseUrl: endpoint,
|
|
144
144
|
token
|
|
@@ -326,10 +326,10 @@ var BackupRunNotFound = class extends GkmError {
|
|
|
326
326
|
this.name = "BackupRunNotFound";
|
|
327
327
|
}
|
|
328
328
|
};
|
|
329
|
-
/** `--at
|
|
329
|
+
/** Not exactly one of `--at`, `--latest` and `--from`. */
|
|
330
330
|
var BackupRunNotChosen = class extends GkmError {
|
|
331
331
|
constructor() {
|
|
332
|
-
super("Say which backup to restore: --latest
|
|
332
|
+
super("Say which backup to restore, and only one: --latest; --at <time> — a run folder (2026-10-10/02-00-00Z) or a time, for the newest run at or before it; or --from imports/<file>.sql.gz, a prepared import.");
|
|
333
333
|
this.name = "BackupRunNotChosen";
|
|
334
334
|
}
|
|
335
335
|
};
|
|
@@ -357,6 +357,109 @@ var BackupDatabaseMissing = class extends GkmError {
|
|
|
357
357
|
this.name = "BackupDatabaseMissing";
|
|
358
358
|
}
|
|
359
359
|
};
|
|
360
|
+
/** The folder every import is kept in, under the stage's backups prefix. */
|
|
361
|
+
const IMPORTS_FOLDER = "imports";
|
|
362
|
+
/** `--from` names something that is not a file under the stage's `imports/`. */
|
|
363
|
+
var ImportPathInvalid = class extends GkmError {
|
|
364
|
+
from;
|
|
365
|
+
reason;
|
|
366
|
+
constructor(from, reason) {
|
|
367
|
+
super(`--from '${from}' ${reason}. Name a file in the ${IMPORTS_FOLDER}/ folder under the stage's backups prefix: --from ${IMPORTS_FOLDER}/<file>.sql.gz (gkm backup:list shows what is there).`);
|
|
368
|
+
this.from = from;
|
|
369
|
+
this.reason = reason;
|
|
370
|
+
this.name = "ImportPathInvalid";
|
|
371
|
+
}
|
|
372
|
+
};
|
|
373
|
+
/** `--from` without `--database`: a file loads into one database. */
|
|
374
|
+
var ImportNeedsDatabase = class extends GkmError {
|
|
375
|
+
from;
|
|
376
|
+
known;
|
|
377
|
+
constructor(from, known) {
|
|
378
|
+
super(`--from ${from} loads into one database: name it with --database (${known.join(", ") || "the stack runs none"}).`);
|
|
379
|
+
this.from = from;
|
|
380
|
+
this.known = known;
|
|
381
|
+
this.name = "ImportNeedsDatabase";
|
|
382
|
+
}
|
|
383
|
+
};
|
|
384
|
+
/** No file at the key `--from` names. */
|
|
385
|
+
var ImportNotFound = class extends GkmError {
|
|
386
|
+
from;
|
|
387
|
+
location;
|
|
388
|
+
constructor(from, location) {
|
|
389
|
+
super(`There is no ${from} at ${location}. Upload the prepared file there, or pick one gkm backup:list shows.`);
|
|
390
|
+
this.from = from;
|
|
391
|
+
this.location = location;
|
|
392
|
+
this.name = "ImportNotFound";
|
|
393
|
+
}
|
|
394
|
+
};
|
|
395
|
+
/**
|
|
396
|
+
* The stack's apps, stopped for an import, could not be started again.
|
|
397
|
+
* `loaded` says whether the import itself went in.
|
|
398
|
+
*/
|
|
399
|
+
var AppsNotRestarted = class extends GkmError {
|
|
400
|
+
project;
|
|
401
|
+
database;
|
|
402
|
+
loaded;
|
|
403
|
+
ids;
|
|
404
|
+
output;
|
|
405
|
+
constructor(project, database, loaded, ids, output) {
|
|
406
|
+
super(`${loaded ? `${database} was loaded` : `Loading ${database} failed and changed nothing`}, but ${project}'s apps, stopped for it, did not start again (docker said: ${output.trim() || "nothing"}). Start them on the stage's server with \`docker start ${ids.join(" ")}\`, or deploy the stage.`);
|
|
407
|
+
this.project = project;
|
|
408
|
+
this.database = database;
|
|
409
|
+
this.loaded = loaded;
|
|
410
|
+
this.ids = ids;
|
|
411
|
+
this.output = output;
|
|
412
|
+
this.name = "AppsNotRestarted";
|
|
413
|
+
}
|
|
414
|
+
};
|
|
415
|
+
/**
|
|
416
|
+
* The key `--from` names, under the stage's backups prefix — refusing
|
|
417
|
+
* anything that would read outside its `imports/` folder.
|
|
418
|
+
*
|
|
419
|
+
* @throws {ImportPathInvalid}
|
|
420
|
+
*/
|
|
421
|
+
function importKey(prefix, from) {
|
|
422
|
+
if (/^[a-z][a-z\d+.-]*:/i.test(from)) throw new ImportPathInvalid(from, "is a URL, not a path");
|
|
423
|
+
if (from.startsWith("/")) throw new ImportPathInvalid(from, "is absolute");
|
|
424
|
+
if (from.includes("\\")) throw new ImportPathInvalid(from, "has a backslash");
|
|
425
|
+
const segments = from.split("/");
|
|
426
|
+
if (segments.some((s) => s === "" || s === "." || s === "..")) throw new ImportPathInvalid(from, "has an empty, '.' or '..' segment");
|
|
427
|
+
if (segments[0] !== "imports" || segments.length < 2) throw new ImportPathInvalid(from, `is not in ${IMPORTS_FOLDER}/`);
|
|
428
|
+
if (!from.endsWith(".sql.gz")) throw new ImportPathInvalid(from, "is not a gzipped SQL file (.sql.gz)");
|
|
429
|
+
return `${prefix}/${from}`;
|
|
430
|
+
}
|
|
431
|
+
/** Every file under the stage's `imports/`, by name. */
|
|
432
|
+
async function listImports(s3, bucket, prefix) {
|
|
433
|
+
const { ListObjectsV2Command } = await import("@aws-sdk/client-s3");
|
|
434
|
+
const imports = [];
|
|
435
|
+
let token;
|
|
436
|
+
do {
|
|
437
|
+
const page = await s3.send(new ListObjectsV2Command({
|
|
438
|
+
Bucket: bucket,
|
|
439
|
+
Prefix: `${prefix}/${IMPORTS_FOLDER}/`,
|
|
440
|
+
...token ? { ContinuationToken: token } : {}
|
|
441
|
+
}));
|
|
442
|
+
for (const object of page.Contents ?? []) {
|
|
443
|
+
const file = object.Key?.slice(prefix.length + 1) ?? "";
|
|
444
|
+
if (!file || file.endsWith("/")) continue;
|
|
445
|
+
imports.push({
|
|
446
|
+
file,
|
|
447
|
+
size: object.Size ?? 0,
|
|
448
|
+
...object.LastModified ? { modified: object.LastModified } : {}
|
|
449
|
+
});
|
|
450
|
+
}
|
|
451
|
+
token = page.IsTruncated ? page.NextContinuationToken : void 0;
|
|
452
|
+
} while (token);
|
|
453
|
+
return imports.sort((a, b) => a.file.localeCompare(b.file));
|
|
454
|
+
}
|
|
455
|
+
/** The lines `backup:list` prints for the imports, by name. */
|
|
456
|
+
function formatImports(imports) {
|
|
457
|
+
return imports.map((i) => `${i.file} ${formatSize(i.size)}` + (i.modified ? ` uploaded ${formatTime(i.modified)}` : ""));
|
|
458
|
+
}
|
|
459
|
+
/** `2026-10-10 02:00:00Z`. */
|
|
460
|
+
function formatTime(at) {
|
|
461
|
+
return at.toISOString().replace("T", " ").replace(/\.\d{3}Z$/, "Z");
|
|
462
|
+
}
|
|
360
463
|
/** Nobody said yes. */
|
|
361
464
|
var RestoreNotConfirmed = class extends GkmError {
|
|
362
465
|
stage;
|
|
@@ -448,7 +551,7 @@ function formatSize(bytes) {
|
|
|
448
551
|
}
|
|
449
552
|
/** The lines `backup:list` prints, newest first. */
|
|
450
553
|
function formatRuns(runs) {
|
|
451
|
-
return runs.map((run) => `${run.at
|
|
554
|
+
return runs.map((run) => `${formatTime(run.at)} ${run.folder} ` + run.files.map((f) => `${f.database} (${formatSize(f.size)})`).join(", "));
|
|
452
555
|
}
|
|
453
556
|
/**
|
|
454
557
|
* Ask the stack's backups container for a backup now, and wait for it.
|
|
@@ -501,16 +604,38 @@ if ! gunzip | psql -X -q -v ON_ERROR_STOP=1 -o /dev/null; then
|
|
|
501
604
|
fi
|
|
502
605
|
`;
|
|
503
606
|
/**
|
|
504
|
-
*
|
|
505
|
-
*
|
|
506
|
-
* the
|
|
607
|
+
* What runs in the one-off container for `--from`: every other session of
|
|
608
|
+
* the database ended — the stack's apps are already stopped, so nothing
|
|
609
|
+
* comes back — then the file, a data-only dump, run connected to the
|
|
610
|
+
* database itself, in one transaction. A file that fails changes nothing.
|
|
611
|
+
*/
|
|
612
|
+
const IMPORT_SCRIPT = `set -e
|
|
613
|
+
printf '%s\\n' "SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE datname = :'db' AND pid <> pg_backend_pid();" \\
|
|
614
|
+
| psql -X -q -v ON_ERROR_STOP=1 -v db="$RESTORE_DATABASE" -o /dev/null
|
|
615
|
+
gunzip | psql -X -q -v ON_ERROR_STOP=1 --single-transaction -d "$RESTORE_DATABASE" -f - -o /dev/null
|
|
616
|
+
`;
|
|
617
|
+
/**
|
|
618
|
+
* Restore a run's databases into the stack's Postgres — or, with `from`,
|
|
619
|
+
* load a prepared import into one. Asks, takes a fresh backup, then
|
|
620
|
+
* recreates each database from its file. Returns the run (or the import)
|
|
621
|
+
* and the databases restored.
|
|
507
622
|
*
|
|
508
623
|
* @throws {BackupRunNotChosen}, {NoBackups}, {BackupRunNotFound},
|
|
624
|
+
* {ImportPathInvalid}, {ImportNeedsDatabase}, {ImportNotFound},
|
|
509
625
|
* {BackupDatabaseUnknown}, {BackupDatabaseMissing}, {RestoreNotConfirmed},
|
|
510
|
-
* {BackupsContainerNotRunning}, {BackupRunFailed}, {RestoreFailed}
|
|
626
|
+
* {BackupsContainerNotRunning}, {BackupRunFailed}, {RestoreFailed},
|
|
627
|
+
* {ContainersNotStopped}, {AppsNotRestarted}
|
|
511
628
|
*/
|
|
512
629
|
async function restoreBackup(options) {
|
|
513
|
-
if (
|
|
630
|
+
if ([
|
|
631
|
+
options.at,
|
|
632
|
+
options.latest,
|
|
633
|
+
options.from
|
|
634
|
+
].filter(Boolean).length !== 1) throw new BackupRunNotChosen();
|
|
635
|
+
if (options.from) return importBackup({
|
|
636
|
+
...options,
|
|
637
|
+
from: options.from
|
|
638
|
+
});
|
|
514
639
|
const runs = await listBackups(options.s3, options.bucket, options.prefix);
|
|
515
640
|
if (runs.length === 0) throw new NoBackups(options.stage, `s3://${options.bucket}/${options.prefix}/`);
|
|
516
641
|
const run = chooseRun(runs, options);
|
|
@@ -519,10 +644,94 @@ async function restoreBackup(options) {
|
|
|
519
644
|
const targets = options.databases.filter((d) => !options.database || d.file === options.database);
|
|
520
645
|
const has = run.files.map((f) => f.database);
|
|
521
646
|
for (const target of targets) if (!has.includes(target.file)) throw new BackupDatabaseMissing(run.folder, target.file, has);
|
|
647
|
+
const { engine, image } = await beforeRestore(options, `Replace ${targets.map((t) => t.name).join(", ")} on '${options.stage}' with the backup ${run.folder}? Everything written since is lost (a backup is taken first).`);
|
|
648
|
+
const restored = [];
|
|
649
|
+
for (const target of targets) {
|
|
650
|
+
const Key = `${options.prefix}/${run.folder}/${backupFile(target)}`;
|
|
651
|
+
options.log(`♻️ Restoring ${target.name} from s3://${options.bucket}/${Key}…`);
|
|
652
|
+
const code = await streamInto(options, engine, image, {
|
|
653
|
+
Key,
|
|
654
|
+
script: RESTORE_SCRIPT,
|
|
655
|
+
database: target.name
|
|
656
|
+
});
|
|
657
|
+
if (code !== 0) throw new RestoreFailed(target.name, code);
|
|
658
|
+
restored.push(target.file);
|
|
659
|
+
}
|
|
660
|
+
return {
|
|
661
|
+
run,
|
|
662
|
+
restored
|
|
663
|
+
};
|
|
664
|
+
}
|
|
665
|
+
/**
|
|
666
|
+
* Load `from` — a data-only file in the prefix's `imports/` — into one
|
|
667
|
+
* database. The file has to run connected to the database itself, so the
|
|
668
|
+
* database cannot be closed to connections the way a run's restore closes it
|
|
669
|
+
* (that would shut the load out too); the stack's apps are stopped instead,
|
|
670
|
+
* and started again whatever happens.
|
|
671
|
+
*/
|
|
672
|
+
async function importBackup(options) {
|
|
673
|
+
const Key = importKey(options.prefix, options.from);
|
|
674
|
+
const known = options.databases.map((d) => d.file);
|
|
675
|
+
if (!options.database) throw new ImportNeedsDatabase(options.from, known);
|
|
676
|
+
const target = options.databases.find((d) => d.file === options.database);
|
|
677
|
+
if (!target) throw new BackupDatabaseUnknown(options.database, known);
|
|
678
|
+
const { HeadObjectCommand } = await import("@aws-sdk/client-s3");
|
|
679
|
+
try {
|
|
680
|
+
await options.s3.send(new HeadObjectCommand({
|
|
681
|
+
Bucket: options.bucket,
|
|
682
|
+
Key
|
|
683
|
+
}));
|
|
684
|
+
} catch (error) {
|
|
685
|
+
if (error.$metadata?.httpStatusCode !== 404) throw error;
|
|
686
|
+
throw new ImportNotFound(options.from, `s3://${options.bucket}/${options.prefix}/`);
|
|
687
|
+
}
|
|
688
|
+
const { engine, image } = await beforeRestore(options, `Load ${options.from} into ${target.name} on '${options.stage}'? Its apps are stopped while it loads, and what the file replaces is lost (a backup is taken first).`);
|
|
689
|
+
const keep = [
|
|
690
|
+
"postgres",
|
|
691
|
+
BACKUPS_SERVICE,
|
|
692
|
+
...options.keep ?? []
|
|
693
|
+
];
|
|
694
|
+
options.log(`⏸️ Stopping ${options.project}'s apps…`);
|
|
695
|
+
let stopped;
|
|
696
|
+
try {
|
|
697
|
+
stopped = await options.docker.stop(engine, options.project, keep);
|
|
698
|
+
} catch (error) {
|
|
699
|
+
if (error instanceof ContainersNotStopped) await options.docker.start(engine, error.ids).catch(() => {});
|
|
700
|
+
throw error;
|
|
701
|
+
}
|
|
702
|
+
let code;
|
|
703
|
+
try {
|
|
704
|
+
options.log(`📥 Loading ${target.name} from s3://${options.bucket}/${Key}…`);
|
|
705
|
+
code = await streamInto(options, engine, image, {
|
|
706
|
+
Key,
|
|
707
|
+
script: IMPORT_SCRIPT,
|
|
708
|
+
database: target.name
|
|
709
|
+
});
|
|
710
|
+
} catch (error) {
|
|
711
|
+
await options.docker.start(engine, stopped).catch(() => {});
|
|
712
|
+
throw error;
|
|
713
|
+
}
|
|
714
|
+
options.log(`▶️ Starting ${options.project}'s apps again…`);
|
|
715
|
+
try {
|
|
716
|
+
await options.docker.start(engine, stopped);
|
|
717
|
+
} catch (error) {
|
|
718
|
+
throw new AppsNotRestarted(options.project, target.name, code === 0, stopped, error instanceof ContainersNotStarted ? error.output : String(error));
|
|
719
|
+
}
|
|
720
|
+
if (code !== 0) throw new RestoreFailed(target.name, code);
|
|
721
|
+
return {
|
|
722
|
+
from: options.from,
|
|
723
|
+
restored: [target.file]
|
|
724
|
+
};
|
|
725
|
+
}
|
|
726
|
+
/**
|
|
727
|
+
* What every restore does before it changes anything: find the stack's
|
|
728
|
+
* backups container — its image runs the restore — ask, and take a fresh
|
|
729
|
+
* backup.
|
|
730
|
+
*/
|
|
731
|
+
async function beforeRestore(options, question) {
|
|
522
732
|
const engine = options.engine ?? {};
|
|
523
733
|
const container = await options.docker.container(engine, options.project, BACKUPS_SERVICE);
|
|
524
734
|
if (!container) throw new BackupsContainerNotRunning(options.project);
|
|
525
|
-
const question = `Replace ${targets.map((t) => t.name).join(", ")} on '${options.stage}' with the backup ${run.folder}? Everything written since is lost (a backup is taken first).`;
|
|
526
735
|
if (!await options.confirm(question)) throw new RestoreNotConfirmed(options.stage);
|
|
527
736
|
options.log("💾 Taking a backup before restoring…");
|
|
528
737
|
await backupNow({
|
|
@@ -531,42 +740,42 @@ async function restoreBackup(options) {
|
|
|
531
740
|
engine,
|
|
532
741
|
log: options.log
|
|
533
742
|
});
|
|
534
|
-
const { GetObjectCommand } = await import("@aws-sdk/client-s3");
|
|
535
|
-
const restored = [];
|
|
536
|
-
for (const target of targets) {
|
|
537
|
-
const Key = `${options.prefix}/${run.folder}/${backupFile(target)}`;
|
|
538
|
-
options.log(`♻️ Restoring ${target.name} from s3://${options.bucket}/${Key}…`);
|
|
539
|
-
const object = await options.s3.send(new GetObjectCommand({
|
|
540
|
-
Bucket: options.bucket,
|
|
541
|
-
Key
|
|
542
|
-
}));
|
|
543
|
-
const code = await options.docker.runOnce(engine, {
|
|
544
|
-
image: container.image,
|
|
545
|
-
network: projectNetwork(options.project),
|
|
546
|
-
command: [
|
|
547
|
-
"sh",
|
|
548
|
-
"-c",
|
|
549
|
-
RESTORE_SCRIPT
|
|
550
|
-
],
|
|
551
|
-
env: {
|
|
552
|
-
PGHOST: "postgres",
|
|
553
|
-
PGPORT: "5432",
|
|
554
|
-
PGUSER: options.superuser.user,
|
|
555
|
-
PGPASSWORD: options.superuser.password,
|
|
556
|
-
PGDATABASE: "postgres",
|
|
557
|
-
RESTORE_DATABASE: target.name
|
|
558
|
-
},
|
|
559
|
-
stdin: object.Body,
|
|
560
|
-
...options.output ? { output: options.output } : {}
|
|
561
|
-
});
|
|
562
|
-
if (code !== 0) throw new RestoreFailed(target.name, code);
|
|
563
|
-
restored.push(target.file);
|
|
564
|
-
}
|
|
565
743
|
return {
|
|
566
|
-
|
|
567
|
-
|
|
744
|
+
engine,
|
|
745
|
+
image: container.image
|
|
568
746
|
};
|
|
569
747
|
}
|
|
748
|
+
/**
|
|
749
|
+
* Stream a file from S3, with the caller's credentials, into `script` in a
|
|
750
|
+
* one-off container of the backups image on the stack's network, signed in
|
|
751
|
+
* as the stack's superuser. Resolves with its exit code.
|
|
752
|
+
*/
|
|
753
|
+
async function streamInto(options, engine, image, file) {
|
|
754
|
+
const { GetObjectCommand } = await import("@aws-sdk/client-s3");
|
|
755
|
+
const object = await options.s3.send(new GetObjectCommand({
|
|
756
|
+
Bucket: options.bucket,
|
|
757
|
+
Key: file.Key
|
|
758
|
+
}));
|
|
759
|
+
return options.docker.runOnce(engine, {
|
|
760
|
+
image,
|
|
761
|
+
network: projectNetwork(options.project),
|
|
762
|
+
command: [
|
|
763
|
+
"sh",
|
|
764
|
+
"-c",
|
|
765
|
+
file.script
|
|
766
|
+
],
|
|
767
|
+
env: {
|
|
768
|
+
PGHOST: "postgres",
|
|
769
|
+
PGPORT: "5432",
|
|
770
|
+
PGUSER: options.superuser.user,
|
|
771
|
+
PGPASSWORD: options.superuser.password,
|
|
772
|
+
PGDATABASE: "postgres",
|
|
773
|
+
RESTORE_DATABASE: file.database
|
|
774
|
+
},
|
|
775
|
+
stdin: object.Body,
|
|
776
|
+
...options.output ? { output: options.output } : {}
|
|
777
|
+
});
|
|
778
|
+
}
|
|
570
779
|
async function resolveStage(options) {
|
|
571
780
|
const { workspace } = await loadWorkspaceConfig(options.cwd);
|
|
572
781
|
const { stage } = options;
|
|
@@ -632,13 +841,30 @@ async function backupListCommand(options) {
|
|
|
632
841
|
const resolved = await resolveStage(options);
|
|
633
842
|
const { s3, bucket } = await callerS3(resolved, options);
|
|
634
843
|
const runs = await listBackups(s3, bucket, resolved.prefix);
|
|
635
|
-
|
|
636
|
-
|
|
844
|
+
const imports = await listImports(s3, bucket, resolved.prefix);
|
|
845
|
+
if (options.json) {
|
|
846
|
+
console.log(JSON.stringify({
|
|
847
|
+
runs,
|
|
848
|
+
imports
|
|
849
|
+
}, null, 2));
|
|
850
|
+
return {
|
|
851
|
+
runs,
|
|
852
|
+
imports
|
|
853
|
+
};
|
|
854
|
+
}
|
|
855
|
+
if (runs.length === 0) console.log(`No backups of '${options.stage}' yet.`);
|
|
637
856
|
else {
|
|
638
857
|
console.log(`💾 s3://${bucket}/${resolved.prefix}/ — newest first\n`);
|
|
639
858
|
for (const line of formatRuns(runs)) console.log(line);
|
|
640
859
|
}
|
|
641
|
-
|
|
860
|
+
if (imports.length > 0) {
|
|
861
|
+
console.log(`\n📥 Imports — gkm backup:restore --stage ${options.stage} --from <file> --database <name>\n`);
|
|
862
|
+
for (const line of formatImports(imports)) console.log(line);
|
|
863
|
+
}
|
|
864
|
+
return {
|
|
865
|
+
runs,
|
|
866
|
+
imports
|
|
867
|
+
};
|
|
642
868
|
}
|
|
643
869
|
/** `gkm backup:now --stage <stage>`. */
|
|
644
870
|
async function backupNowCommand(options, docker = dockerCompose) {
|
|
@@ -652,10 +878,21 @@ async function backupNowCommand(options, docker = dockerCompose) {
|
|
|
652
878
|
});
|
|
653
879
|
console.log("✅ Backed up.");
|
|
654
880
|
}
|
|
655
|
-
/**
|
|
881
|
+
/** The stack's own proxy: kept running while an import loads. */
|
|
882
|
+
const STACK_PROXY_SERVICE = "caddy";
|
|
883
|
+
/**
|
|
884
|
+
* `gkm backup:restore --stage <stage> (--at <time> | --latest |
|
|
885
|
+
* --from imports/<file> --database <name>)`.
|
|
886
|
+
*/
|
|
656
887
|
async function backupRestoreCommand(options, docker = dockerCompose) {
|
|
657
|
-
if (
|
|
888
|
+
if ([
|
|
889
|
+
options.at,
|
|
890
|
+
options.latest,
|
|
891
|
+
options.from
|
|
892
|
+
].filter(Boolean).length !== 1) throw new BackupRunNotChosen();
|
|
893
|
+
if (options.from) importKey("", options.from);
|
|
658
894
|
const resolved = await resolveStage(options);
|
|
895
|
+
if (options.from && !options.database) throw new ImportNeedsDatabase(options.from, resolved.databases.map((d) => d.file));
|
|
659
896
|
const { s3, bucket } = await callerS3(resolved, options);
|
|
660
897
|
if (!resolved.seed) throw new BackupsNotProvisioned(options.stage);
|
|
661
898
|
const plan = stackPlan(resolved.workspace, resolved.manifest, options.stage);
|
|
@@ -670,8 +907,10 @@ async function backupRestoreCommand(options, docker = dockerCompose) {
|
|
|
670
907
|
stage: options.stage,
|
|
671
908
|
superuser,
|
|
672
909
|
databases: resolved.databases,
|
|
910
|
+
keep: [...plan.containers, STACK_PROXY_SERVICE],
|
|
673
911
|
...options.at ? { at: options.at } : {},
|
|
674
912
|
...options.latest ? { latest: true } : {},
|
|
913
|
+
...options.from ? { from: options.from } : {},
|
|
675
914
|
...options.database ? { database: options.database } : {},
|
|
676
915
|
confirm: async (question) => {
|
|
677
916
|
if (options.yes) return true;
|
|
@@ -680,7 +919,7 @@ async function backupRestoreCommand(options, docker = dockerCompose) {
|
|
|
680
919
|
},
|
|
681
920
|
log: (line) => console.log(line)
|
|
682
921
|
});
|
|
683
|
-
console.log(`✅ Restored ${restored.join(", ")} on '${options.stage}' from ${run.folder}.`);
|
|
922
|
+
console.log(`✅ Restored ${restored.join(", ")} on '${options.stage}' from ${run ? run.folder : options.from}.`);
|
|
684
923
|
}
|
|
685
924
|
//#endregion
|
|
686
925
|
//#region src/reconcile/serviceLogins.ts
|
|
@@ -2198,7 +2437,7 @@ async function execCommand(commandArgs, options = {}, stageDeps) {
|
|
|
2198
2437
|
const cwd = options.cwd ?? process.cwd();
|
|
2199
2438
|
if (!commandArgs[0]) throw new NoCommandSpecified();
|
|
2200
2439
|
if (options.stage && !isImageBuild()) {
|
|
2201
|
-
const { execOnStage } = await import("./stage-
|
|
2440
|
+
const { execOnStage } = await import("./stage-BQSSMJL4.mjs").then((n) => n.n);
|
|
2202
2441
|
const { loadWorkspaceConfig } = await import("./config.mjs");
|
|
2203
2442
|
const { workspace } = await loadWorkspaceConfig(cwd);
|
|
2204
2443
|
if (options.stage !== workspace.stages.local) {
|
|
@@ -2773,9 +3012,9 @@ async function workspaceDevCommand(configured, options) {
|
|
|
2773
3012
|
for (const { id, port } of fakes) logger$5.log(`🎭 ${id} fake: http://localhost:${port}`);
|
|
2774
3013
|
logger$5.log(options.migrate || options.seed ? "🗄️ Migrating the databases" : "🗄️ Checking for pending migrations");
|
|
2775
3014
|
if (options.migrate || options.seed) {
|
|
2776
|
-
const { prepareDevDatabases } = await import("./migrate-
|
|
3015
|
+
const { prepareDevDatabases } = await import("./migrate-vWy2CUoi.mjs");
|
|
2777
3016
|
await prepareDevDatabases(workspace, secretsEnv, { seed: !!options.seed });
|
|
2778
|
-
} else await import("./migrate-
|
|
3017
|
+
} else await import("./migrate-vWy2CUoi.mjs").then(({ reportPendingMigrations }) => reportPendingMigrations(workspace, reconciled.env)).catch((error) => {
|
|
2779
3018
|
logger$5.log(`⚠️ Could not check for pending migrations: ${error instanceof Error ? error.message : String(error)}`);
|
|
2780
3019
|
});
|
|
2781
3020
|
const appUrls = {};
|
|
@@ -3979,7 +4218,7 @@ async function buildApp(input) {
|
|
|
3979
4218
|
...telemetry ? { telemetry } : {},
|
|
3980
4219
|
trustedOriginsKey: provideKey(selfServing.id, "trustedOrigins")
|
|
3981
4220
|
});
|
|
3982
|
-
const { bundleServer } = await import("./bundler-
|
|
4221
|
+
const { bundleServer } = await import("./bundler-BCWWne6N.mjs");
|
|
3983
4222
|
await bundleServer({
|
|
3984
4223
|
entryPoint,
|
|
3985
4224
|
outputDir: join(outputDir, "dist"),
|
|
@@ -4249,7 +4488,7 @@ async function buildWorkers(input) {
|
|
|
4249
4488
|
});
|
|
4250
4489
|
logger$4.log(`Generated worker ${worker.id}: ${crons.length} crons, ${queues.length} queues, ${subscribers.length} subscribers`);
|
|
4251
4490
|
if (!input.bundle) continue;
|
|
4252
|
-
const { bundleServer } = await import("./bundler-
|
|
4491
|
+
const { bundleServer } = await import("./bundler-BCWWne6N.mjs");
|
|
4253
4492
|
const outfile = workerBundleName(worker.id);
|
|
4254
4493
|
await bundleServer({
|
|
4255
4494
|
entryPoint,
|
|
@@ -4291,7 +4530,7 @@ async function buildProcessors(input) {
|
|
|
4291
4530
|
for (const { key, construct } of processors) infos.push(await processorInfo(key, construct, handler, context));
|
|
4292
4531
|
logger$4.log(`Generated processors for ${fileServerId}: ${processors.map(({ key }) => key).join(", ")}`);
|
|
4293
4532
|
if (!input.bundle) continue;
|
|
4294
|
-
const { bundleServer } = await import("./bundler-
|
|
4533
|
+
const { bundleServer } = await import("./bundler-BCWWne6N.mjs");
|
|
4295
4534
|
const outfile = processorBundleName(fileServerId);
|
|
4296
4535
|
await bundleServer({
|
|
4297
4536
|
entryPoint,
|
|
@@ -4374,7 +4613,7 @@ async function buildForTarget(target, context, appRoot, workspaceRoot, endpointG
|
|
|
4374
4613
|
let masterKey;
|
|
4375
4614
|
if (context.production?.bundle && !skipBundle) {
|
|
4376
4615
|
logger$4.log(`\n📦 Bundling production server...`);
|
|
4377
|
-
const { bundleServer } = await import("./bundler-
|
|
4616
|
+
const { bundleServer } = await import("./bundler-BCWWne6N.mjs");
|
|
4378
4617
|
const allConstructs = [
|
|
4379
4618
|
...endpoints.map((e) => e.construct),
|
|
4380
4619
|
...functions.map((f) => f.construct),
|
|
@@ -4652,7 +4891,7 @@ async function composeCommand(options, deps = {}) {
|
|
|
4652
4891
|
["tag", "--tag"]
|
|
4653
4892
|
].find(([key]) => options[key] !== void 0 && options[key] !== false)?.[1];
|
|
4654
4893
|
if (flag) throw new ComposeDestroyConflict(flag);
|
|
4655
|
-
const { composeDestroyCommand } = await import("./destroy-
|
|
4894
|
+
const { composeDestroyCommand } = await import("./destroy-DKt8S051.mjs");
|
|
4656
4895
|
await composeDestroyCommand({
|
|
4657
4896
|
stage: options.stage,
|
|
4658
4897
|
...options.cwd ? { cwd: options.cwd } : {},
|
|
@@ -4670,7 +4909,7 @@ async function composeCommand(options, deps = {}) {
|
|
|
4670
4909
|
const { workspace } = loaded;
|
|
4671
4910
|
const { stage } = options;
|
|
4672
4911
|
if (options.down) {
|
|
4673
|
-
const { composeStackRef } = await import("./destroy-
|
|
4912
|
+
const { composeStackRef } = await import("./destroy-DKt8S051.mjs");
|
|
4674
4913
|
const { ref, dir, server } = await composeStackRef(workspace, stage);
|
|
4675
4914
|
const docker = deps.docker ?? dockerCompose;
|
|
4676
4915
|
if (server) console.log(`→ ${sshTarget(server)} (docker over ssh)`);
|
|
@@ -6251,25 +6490,25 @@ function loadPackageJson() {
|
|
|
6251
6490
|
* Run: pnpm --filter @geekmidas/cli sync-versions
|
|
6252
6491
|
*/
|
|
6253
6492
|
const GEEKMIDAS_VERSIONS = {
|
|
6254
|
-
"@geekmidas/audit": ">=10.0.0-alpha.
|
|
6255
|
-
"@geekmidas/auth": ">=10.0.0-alpha.
|
|
6256
|
-
"@geekmidas/cache": ">=10.0.0-alpha.
|
|
6257
|
-
"@geekmidas/client": ">=10.0.0-alpha.
|
|
6258
|
-
"@geekmidas/cloud": ">=10.0.0-alpha.
|
|
6259
|
-
"@geekmidas/constructs": ">=10.0.0-alpha.
|
|
6260
|
-
"@geekmidas/db": ">=10.0.0-alpha.
|
|
6261
|
-
"@geekmidas/emailkit": ">=10.0.0-alpha.
|
|
6262
|
-
"@geekmidas/envkit": ">=10.0.0-alpha.
|
|
6263
|
-
"@geekmidas/errors": ">=10.0.0-alpha.
|
|
6264
|
-
"@geekmidas/events": ">=10.0.0-alpha.
|
|
6265
|
-
"@geekmidas/logger": ">=10.0.0-alpha.
|
|
6266
|
-
"@geekmidas/manifest": ">=10.0.0-alpha.
|
|
6267
|
-
"@geekmidas/rate-limit": ">=10.0.0-alpha.
|
|
6268
|
-
"@geekmidas/schema": ">=10.0.0-alpha.
|
|
6269
|
-
"@geekmidas/services": ">=10.0.0-alpha.
|
|
6270
|
-
"@geekmidas/storage": ">=10.0.0-alpha.
|
|
6271
|
-
"@geekmidas/telescope": ">=10.0.0-alpha.
|
|
6272
|
-
"@geekmidas/testkit": ">=10.0.0-alpha.
|
|
6493
|
+
"@geekmidas/audit": ">=10.0.0-alpha.167 <10.0.0",
|
|
6494
|
+
"@geekmidas/auth": ">=10.0.0-alpha.167 <10.0.0",
|
|
6495
|
+
"@geekmidas/cache": ">=10.0.0-alpha.167 <10.0.0",
|
|
6496
|
+
"@geekmidas/client": ">=10.0.0-alpha.167 <10.0.0",
|
|
6497
|
+
"@geekmidas/cloud": ">=10.0.0-alpha.167 <10.0.0",
|
|
6498
|
+
"@geekmidas/constructs": ">=10.0.0-alpha.167 <10.0.0",
|
|
6499
|
+
"@geekmidas/db": ">=10.0.0-alpha.167 <10.0.0",
|
|
6500
|
+
"@geekmidas/emailkit": ">=10.0.0-alpha.167 <10.0.0",
|
|
6501
|
+
"@geekmidas/envkit": ">=10.0.0-alpha.167 <10.0.0",
|
|
6502
|
+
"@geekmidas/errors": ">=10.0.0-alpha.167 <10.0.0",
|
|
6503
|
+
"@geekmidas/events": ">=10.0.0-alpha.167 <10.0.0",
|
|
6504
|
+
"@geekmidas/logger": ">=10.0.0-alpha.167 <10.0.0",
|
|
6505
|
+
"@geekmidas/manifest": ">=10.0.0-alpha.167 <10.0.0",
|
|
6506
|
+
"@geekmidas/rate-limit": ">=10.0.0-alpha.167 <10.0.0",
|
|
6507
|
+
"@geekmidas/schema": ">=10.0.0-alpha.167 <10.0.0",
|
|
6508
|
+
"@geekmidas/services": ">=10.0.0-alpha.167 <10.0.0",
|
|
6509
|
+
"@geekmidas/storage": ">=10.0.0-alpha.167 <10.0.0",
|
|
6510
|
+
"@geekmidas/telescope": ">=10.0.0-alpha.167 <10.0.0",
|
|
6511
|
+
"@geekmidas/testkit": ">=10.0.0-alpha.167 <10.0.0",
|
|
6273
6512
|
"@geekmidas/cli": versionRange(loadPackageJson().version)
|
|
6274
6513
|
};
|
|
6275
6514
|
//#endregion
|
|
@@ -7462,7 +7701,7 @@ const COMMIT = /^[0-9a-f]{40}$/;
|
|
|
7462
7701
|
* The `uses:` value for the stages action, with a comment saying which CLI
|
|
7463
7702
|
* release the pinned commit is.
|
|
7464
7703
|
*/
|
|
7465
|
-
function stagesActionUses(commit = "
|
|
7704
|
+
function stagesActionUses(commit = "739e3a7a31bb46ed194b0e77e679b8322c165b8f", version = cliVersion()) {
|
|
7466
7705
|
return commit && COMMIT.test(commit) ? `${STAGES_ACTION}@${commit} # @geekmidas/cli ${version}` : `${STAGES_ACTION}@main # pin to a commit SHA: see the action's README`;
|
|
7467
7706
|
}
|
|
7468
7707
|
//#endregion
|
|
@@ -16434,7 +16673,7 @@ function testDatabases(reconciled) {
|
|
|
16434
16673
|
* starts without the reference data the app needs.
|
|
16435
16674
|
*/
|
|
16436
16675
|
async function migrateTestStage(workspace, env) {
|
|
16437
|
-
const { migrateAndSeed } = await import("./migrate-
|
|
16676
|
+
const { migrateAndSeed } = await import("./migrate-vWy2CUoi.mjs");
|
|
16438
16677
|
const { discover } = await import("./discover-DbDrCQ8h.mjs").then((n) => n.a);
|
|
16439
16678
|
const sources = {};
|
|
16440
16679
|
const manifest = await discover({
|
|
@@ -16887,7 +17126,7 @@ program.command("eas:sync").description("Set up a mobile app's EAS project for a
|
|
|
16887
17126
|
try {
|
|
16888
17127
|
const globalOptions = program.opts();
|
|
16889
17128
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
16890
|
-
const { easSync } = await import("./eas-
|
|
17129
|
+
const { easSync } = await import("./eas-CO3ogve5.mjs");
|
|
16891
17130
|
await easSync(options);
|
|
16892
17131
|
} catch (error) {
|
|
16893
17132
|
exitWithError(error);
|
|
@@ -16897,7 +17136,7 @@ program.command("publish").description("Ship a mobile app for a deployed stage:
|
|
|
16897
17136
|
try {
|
|
16898
17137
|
const globalOptions = program.opts();
|
|
16899
17138
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
16900
|
-
const { publish, PublishModeConflict } = await import("./publish-
|
|
17139
|
+
const { publish, PublishModeConflict } = await import("./publish-DOxz4mxf.mjs");
|
|
16901
17140
|
if (options.build && options.update) throw new PublishModeConflict();
|
|
16902
17141
|
const { build, update, ...rest } = options;
|
|
16903
17142
|
await publish({
|
|
@@ -16913,7 +17152,7 @@ program.command("deploy:google-play").description("Let EAS Submit publish a mobi
|
|
|
16913
17152
|
try {
|
|
16914
17153
|
const globalOptions = program.opts();
|
|
16915
17154
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
16916
|
-
const { deployGooglePlay } = await import("./googlePlay-
|
|
17155
|
+
const { deployGooglePlay } = await import("./googlePlay-KPHn9H2f.mjs");
|
|
16917
17156
|
await deployGooglePlay(options);
|
|
16918
17157
|
} catch (error) {
|
|
16919
17158
|
exitWithError(error);
|
|
@@ -16935,7 +17174,7 @@ program.command("migrate").description("Apply each database construct's migratio
|
|
|
16935
17174
|
try {
|
|
16936
17175
|
const globalOptions = program.opts();
|
|
16937
17176
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
16938
|
-
const { migrateCommand } = await import("./migrate-
|
|
17177
|
+
const { migrateCommand } = await import("./migrate-vWy2CUoi.mjs");
|
|
16939
17178
|
await migrateCommand({
|
|
16940
17179
|
...options,
|
|
16941
17180
|
...construct ? { construct } : {}
|
|
@@ -16948,7 +17187,7 @@ program.command("seed").description("Migrate, then run each database construct's
|
|
|
16948
17187
|
try {
|
|
16949
17188
|
const globalOptions = program.opts();
|
|
16950
17189
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
16951
|
-
const { seedCommand } = await import("./migrate-
|
|
17190
|
+
const { seedCommand } = await import("./migrate-vWy2CUoi.mjs");
|
|
16952
17191
|
await seedCommand({
|
|
16953
17192
|
...options,
|
|
16954
17193
|
...construct ? { construct } : {}
|
|
@@ -16961,7 +17200,7 @@ program.command("migration").description("Write a construct's next migration: an
|
|
|
16961
17200
|
try {
|
|
16962
17201
|
const globalOptions = program.opts();
|
|
16963
17202
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
16964
|
-
const { migrationCommand } = await import("./migrate-
|
|
17203
|
+
const { migrationCommand } = await import("./migrate-vWy2CUoi.mjs");
|
|
16965
17204
|
await migrationCommand({
|
|
16966
17205
|
construct,
|
|
16967
17206
|
...name ? { name } : {}
|
|
@@ -17061,7 +17300,7 @@ program.command("secrets:add").description("Build the keys a stage must be given
|
|
|
17061
17300
|
try {
|
|
17062
17301
|
const globalOptions = program.opts();
|
|
17063
17302
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
17064
|
-
const { secretsAddCommand } = await import("./add-
|
|
17303
|
+
const { secretsAddCommand } = await import("./add-Dt8QKSOw.mjs");
|
|
17065
17304
|
await secretsAddCommand(options);
|
|
17066
17305
|
} catch (error) {
|
|
17067
17306
|
exitWithError(error);
|
|
@@ -17071,7 +17310,7 @@ program.command("encryption:rotate").description("Add a new current key to an En
|
|
|
17071
17310
|
try {
|
|
17072
17311
|
const globalOptions = program.opts();
|
|
17073
17312
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
17074
|
-
const { encryptionRotateCommand } = await import("./encryption-
|
|
17313
|
+
const { encryptionRotateCommand } = await import("./encryption-CHmfNBAy.mjs");
|
|
17075
17314
|
await encryptionRotateCommand(construct, options);
|
|
17076
17315
|
} catch (error) {
|
|
17077
17316
|
exitWithError(error);
|
|
@@ -17081,7 +17320,7 @@ program.command("encryption:retire").description("Remove an old key from an Encr
|
|
|
17081
17320
|
try {
|
|
17082
17321
|
const globalOptions = program.opts();
|
|
17083
17322
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
17084
|
-
const { encryptionRetireCommand } = await import("./encryption-
|
|
17323
|
+
const { encryptionRetireCommand } = await import("./encryption-CHmfNBAy.mjs");
|
|
17085
17324
|
await encryptionRetireCommand(construct, key, options);
|
|
17086
17325
|
} catch (error) {
|
|
17087
17326
|
exitWithError(error);
|
|
@@ -17120,7 +17359,7 @@ program.command("secrets:reconcile").description("Backfill missing custom secret
|
|
|
17120
17359
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
17121
17360
|
const { loadWorkspaceConfig } = await import("./config.mjs");
|
|
17122
17361
|
const { reconcileMissingSecrets } = await import("./reconcile--I7V4Klj.mjs");
|
|
17123
|
-
const { secretsStoreFor } = await import("./credentials-
|
|
17362
|
+
const { secretsStoreFor } = await import("./credentials-D4DUPPPP.mjs").then((n) => n.j);
|
|
17124
17363
|
const { workspace } = await loadWorkspaceConfig();
|
|
17125
17364
|
const stage = options.stage ?? workspace.stages.local;
|
|
17126
17365
|
const store = await secretsStoreFor(workspace, stage);
|
|
@@ -17129,7 +17368,7 @@ program.command("secrets:reconcile").description("Backfill missing custom secret
|
|
|
17129
17368
|
console.error(`No secrets found for stage "${stage}". Run "gkm secrets:init --stage ${stage}" first.`);
|
|
17130
17369
|
process.exit(1);
|
|
17131
17370
|
}
|
|
17132
|
-
const { derivedContainers } = await import("./apps-
|
|
17371
|
+
const { derivedContainers } = await import("./apps-w2sRQKCr.mjs").then((n) => n.h);
|
|
17133
17372
|
const result = reconcileMissingSecrets(secrets, workspace, await derivedContainers(workspace, stage));
|
|
17134
17373
|
if (!result) {
|
|
17135
17374
|
console.log(`\n✓ Secrets for stage "${stage}" are up-to-date`);
|
|
@@ -17146,14 +17385,14 @@ program.command("secrets:migrate").description("Copy a deployed stage's secrets
|
|
|
17146
17385
|
try {
|
|
17147
17386
|
const globalOptions = program.opts();
|
|
17148
17387
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
17149
|
-
const { secretsMigrateCommand } = await import("./migrate-
|
|
17388
|
+
const { secretsMigrateCommand } = await import("./migrate-DHWy64pc.mjs");
|
|
17150
17389
|
await secretsMigrateCommand(options);
|
|
17151
17390
|
} catch (error) {
|
|
17152
17391
|
exitWithError(error);
|
|
17153
17392
|
}
|
|
17154
17393
|
});
|
|
17155
17394
|
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) => {
|
|
17156
|
-
const { deployCli } = await import("./cli-
|
|
17395
|
+
const { deployCli } = await import("./cli-DSGw0Mw-.mjs");
|
|
17157
17396
|
const globalOptions = program.opts();
|
|
17158
17397
|
const code = await deployCli({
|
|
17159
17398
|
cwd: resolve(globalOptions.cwd ?? process.cwd()),
|
|
@@ -17173,8 +17412,8 @@ program.command("deploy").description("Deploy a stage through its target").optio
|
|
|
17173
17412
|
});
|
|
17174
17413
|
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) => {
|
|
17175
17414
|
try {
|
|
17176
|
-
const { rollbackStage } = await import("./rollback-
|
|
17177
|
-
const { terminalCredentials } = await import("./terminal-
|
|
17415
|
+
const { rollbackStage } = await import("./rollback-CLBKeSMl.mjs").then((n) => n.a);
|
|
17416
|
+
const { terminalCredentials } = await import("./terminal-DWROY7JE.mjs");
|
|
17178
17417
|
const globalOptions = program.opts();
|
|
17179
17418
|
await rollbackStage({
|
|
17180
17419
|
cwd: resolve(globalOptions.cwd ?? process.cwd()),
|
|
@@ -17192,7 +17431,7 @@ program.command("compose:server").description("Set up a stage's server for compo
|
|
|
17192
17431
|
try {
|
|
17193
17432
|
const globalOptions = program.opts();
|
|
17194
17433
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
17195
|
-
const { composeServerCommand } = await import("./serverSetup-
|
|
17434
|
+
const { composeServerCommand } = await import("./serverSetup-An1fE9nd.mjs");
|
|
17196
17435
|
await composeServerCommand(options);
|
|
17197
17436
|
} catch (error) {
|
|
17198
17437
|
exitWithError(error);
|
|
@@ -17217,7 +17456,7 @@ program.command("deploy:github").description("Let GitHub Actions deploy a stage:
|
|
|
17217
17456
|
try {
|
|
17218
17457
|
const globalOptions = program.opts();
|
|
17219
17458
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
17220
|
-
const { deployGithubCommand } = await import("./github-
|
|
17459
|
+
const { deployGithubCommand } = await import("./github-DU3iEmJN.mjs");
|
|
17221
17460
|
await deployGithubCommand(options);
|
|
17222
17461
|
} catch (error) {
|
|
17223
17462
|
exitWithError(error);
|
|
@@ -17227,7 +17466,7 @@ program.command("stages").description("The workspace's stages from gkm.config.ts
|
|
|
17227
17466
|
try {
|
|
17228
17467
|
const globalOptions = program.opts();
|
|
17229
17468
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
17230
|
-
const { stagesCommand } = await import("./stages-
|
|
17469
|
+
const { stagesCommand } = await import("./stages-BsK1Ro4s.mjs");
|
|
17231
17470
|
await stagesCommand(options);
|
|
17232
17471
|
} catch (error) {
|
|
17233
17472
|
exitWithError(error);
|
|
@@ -17371,7 +17610,7 @@ program.command("backup:now").description("Back up a compose stage now: runs its
|
|
|
17371
17610
|
exitWithError(error);
|
|
17372
17611
|
}
|
|
17373
17612
|
});
|
|
17374
|
-
program.command("backup:restore").description("Restore a compose stage's databases from a backup — after taking a fresh one").requiredOption("--stage <stage>", "Deployed stage").option("--at <time>", "A run (2026-10-10/02-00-00Z), or a time: the newest run at or before it").option("--latest", "The newest run").option("--database <name>", "One database, by its file name (auth-database); every one by default").option("--profile <profile>", "AWS profile for the stage's account").option("-y, --yes", "Restore without asking").action(async (options) => {
|
|
17613
|
+
program.command("backup:restore").description("Restore a compose stage's databases from a backup — after taking a fresh one").requiredOption("--stage <stage>", "Deployed stage").option("--at <time>", "A run (2026-10-10/02-00-00Z), or a time: the newest run at or before it").option("--latest", "The newest run").option("--from <file>", "A prepared data-only import in the stage's backups prefix (imports/app.sql.gz); needs --database").option("--database <name>", "One database, by its file name (auth-database); every one by default").option("--profile <profile>", "AWS profile for the stage's account").option("-y, --yes", "Restore without asking").action(async (options) => {
|
|
17375
17614
|
try {
|
|
17376
17615
|
const globalOptions = program.opts();
|
|
17377
17616
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|