@geekmidas/cli 10.0.0-alpha.98 → 10.0.0-alpha.99
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{GoDaddyProvider-C2fK-zeQ.mjs → GoDaddyProvider-206NguW1.mjs} +2 -2
- package/dist/{GoDaddyProvider-C2fK-zeQ.mjs.map → GoDaddyProvider-206NguW1.mjs.map} +1 -1
- package/dist/{GoDaddyProvider-SLlyDwD1.cjs → GoDaddyProvider-D1aQy2i1.cjs} +2 -2
- package/dist/{GoDaddyProvider-SLlyDwD1.cjs.map → GoDaddyProvider-D1aQy2i1.cjs.map} +1 -1
- package/dist/{LegacyStateStore-CAvxM8U5.cjs → LegacyStateStore-CgJEr1G7.cjs} +3 -3
- package/dist/{LegacyStateStore-CAvxM8U5.cjs.map → LegacyStateStore-CgJEr1G7.cjs.map} +1 -1
- package/dist/{LegacyStateStore-D9QDWCst.mjs → LegacyStateStore-wmFfdzuh.mjs} +3 -3
- package/dist/{LegacyStateStore-D9QDWCst.mjs.map → LegacyStateStore-wmFfdzuh.mjs.map} +1 -1
- package/dist/{LocalStateStore-QcrdjCl6.cjs → LocalStateStore-BD14kra9.cjs} +2 -2
- package/dist/{LocalStateStore-QcrdjCl6.cjs.map → LocalStateStore-BD14kra9.cjs.map} +1 -1
- package/dist/{LocalStateStore-DPQSqkSb.mjs → LocalStateStore-C5mNp91D.mjs} +2 -2
- package/dist/{LocalStateStore-DPQSqkSb.mjs.map → LocalStateStore-C5mNp91D.mjs.map} +1 -1
- package/dist/{S3StateStore-jorgKaee.mjs → S3StateStore-CEGbsDHi.mjs} +4 -4
- package/dist/{S3StateStore-jorgKaee.mjs.map → S3StateStore-CEGbsDHi.mjs.map} +1 -1
- package/dist/{S3StateStore-C16tVikU.cjs → S3StateStore-Csu_kJCy.cjs} +5 -5
- package/dist/{S3StateStore-C16tVikU.cjs.map → S3StateStore-Csu_kJCy.cjs.map} +1 -1
- package/dist/{SSMStateStore-Dvjt_INw.mjs → SSMStateStore-Bd62qwp4.mjs} +2 -2
- package/dist/{SSMStateStore-Dvjt_INw.mjs.map → SSMStateStore-Bd62qwp4.mjs.map} +1 -1
- package/dist/{SSMStateStore-mPAEr2P2.cjs → SSMStateStore-Rp21jtP5.cjs} +2 -2
- package/dist/{SSMStateStore-mPAEr2P2.cjs.map → SSMStateStore-Rp21jtP5.cjs.map} +1 -1
- package/dist/{add-CZIIsTcv.mjs → add-DyIEYI97.mjs} +4 -4
- package/dist/{add-CZIIsTcv.mjs.map → add-DyIEYI97.mjs.map} +1 -1
- package/dist/{add-SRk65Udu.cjs → add-Iuo3ao5E.cjs} +5 -5
- package/dist/{add-SRk65Udu.cjs.map → add-Iuo3ao5E.cjs.map} +1 -1
- package/dist/{bundler-B0Pj5FXT.cjs → bundler-Bgoq8IyR.cjs} +5 -5
- package/dist/{bundler-B0Pj5FXT.cjs.map → bundler-Bgoq8IyR.cjs.map} +1 -1
- package/dist/{bundler-DxJ-cIEt.mjs → bundler-Q6Kp8b0r.mjs} +5 -5
- package/dist/{bundler-DxJ-cIEt.mjs.map → bundler-Q6Kp8b0r.mjs.map} +1 -1
- package/dist/{cli-CV85bY3-.mjs → cli-B9BudUV0.mjs} +2 -4
- package/dist/cli-B9BudUV0.mjs.map +1 -0
- package/dist/{cli-CRDJWWmZ.cjs → cli-W2DMRIbP.cjs} +2 -4
- package/dist/cli-W2DMRIbP.cjs.map +1 -0
- package/dist/compose-CIrFNWHb.cjs +3147 -0
- package/dist/compose-CIrFNWHb.cjs.map +1 -0
- package/dist/compose-CLsRcHkA.mjs +3052 -0
- package/dist/compose-CLsRcHkA.mjs.map +1 -0
- package/dist/{config-pBzLfNef.d.mts → config-BVdHfj8b.d.cts} +4 -4
- package/dist/{config-CS76CzXM.d.cts.map → config-BVdHfj8b.d.cts.map} +1 -1
- package/dist/{config-CS76CzXM.d.cts → config-D2OqCmAM.d.mts} +4 -4
- package/dist/{config-pBzLfNef.d.mts.map → config-D2OqCmAM.d.mts.map} +1 -1
- package/dist/config.cjs +1 -1
- package/dist/config.d.cts +3 -3
- package/dist/config.d.mts +3 -3
- package/dist/config.mjs +1 -1
- package/dist/deploy/public.cjs +9 -8
- package/dist/deploy/public.cjs.map +1 -1
- package/dist/deploy/public.d.cts +5 -16
- package/dist/deploy/public.d.cts.map +1 -1
- package/dist/deploy/public.d.mts +5 -16
- package/dist/deploy/public.d.mts.map +1 -1
- package/dist/deploy/public.mjs +8 -7
- package/dist/deploy/public.mjs.map +1 -1
- package/dist/{deploy-277jek46.cjs → deploy-CbJMJsgX.cjs} +26 -62
- package/dist/deploy-CbJMJsgX.cjs.map +1 -0
- package/dist/{deploy-Dw8g3sLY.mjs → deploy-n_IB8r6H.mjs} +17 -59
- package/dist/deploy-n_IB8r6H.mjs.map +1 -0
- package/dist/{discover-DJCCgimv.d.mts → discover-Caf6Hnv1.d.cts} +2 -2
- package/dist/{discover-CU1LjCOf.d.cts.map → discover-Caf6Hnv1.d.cts.map} +1 -1
- package/dist/{discover-CU1LjCOf.d.cts → discover-Cd5M2jPv.d.mts} +2 -2
- package/dist/{discover-DJCCgimv.d.mts.map → discover-Cd5M2jPv.d.mts.map} +1 -1
- package/dist/{dns-LqWzPb8l.mjs → dns-C_LPS3qV.mjs} +3 -3
- package/dist/{dns-LqWzPb8l.mjs.map → dns-C_LPS3qV.mjs.map} +1 -1
- package/dist/{dns-Dhjbnjgl.cjs → dns-kp8To8Qj.cjs} +3 -3
- package/dist/{dns-Dhjbnjgl.cjs.map → dns-kp8To8Qj.cjs.map} +1 -1
- package/dist/{dokploy-D_uCbZQ7.mjs → dokploy-Dl_kNVeE.mjs} +2 -2
- package/dist/{dokploy-D_uCbZQ7.mjs.map → dokploy-Dl_kNVeE.mjs.map} +1 -1
- package/dist/{dokploy-Dw4oCXqR.cjs → dokploy-gRIae9Ht.cjs} +2 -2
- package/dist/{dokploy-Dw4oCXqR.cjs.map → dokploy-gRIae9Ht.cjs.map} +1 -1
- package/dist/{encryption-C0uKYE9v.mjs → encryption-C3DcVZQs.mjs} +3 -3
- package/dist/{encryption-C0uKYE9v.mjs.map → encryption-C3DcVZQs.mjs.map} +1 -1
- package/dist/{encryption-CtVPHWWq.cjs → encryption-CmQvQOSe.cjs} +3 -3
- package/dist/{encryption-CtVPHWWq.cjs.map → encryption-CmQvQOSe.cjs.map} +1 -1
- package/dist/{engine-BE5PdE8S.mjs → engine-DBXuhHyf.mjs} +5 -4
- package/dist/{engine-BE5PdE8S.mjs.map → engine-DBXuhHyf.mjs.map} +1 -1
- package/dist/{engine-HI8aLw1M.cjs → engine-Dk19Mxc4.cjs} +27 -26
- package/dist/{engine-HI8aLw1M.cjs.map → engine-Dk19Mxc4.cjs.map} +1 -1
- package/dist/{github-BCdfZ9zO.cjs → github-Ds2RYnSU.cjs} +9 -8
- package/dist/{github-BCdfZ9zO.cjs.map → github-Ds2RYnSU.cjs.map} +1 -1
- package/dist/{github-CT3X720_.mjs → github-RawRLERq.mjs} +7 -6
- package/dist/{github-CT3X720_.mjs.map → github-RawRLERq.mjs.map} +1 -1
- package/dist/identity-CBXr4wNi.mjs +129 -0
- package/dist/identity-CBXr4wNi.mjs.map +1 -0
- package/dist/identity-CbLfgQNT.cjs +182 -0
- package/dist/identity-CbLfgQNT.cjs.map +1 -0
- package/dist/{index-DKtB01YC.d.cts → index-BU4G20G6.d.cts} +2 -2
- package/dist/{index-DKtB01YC.d.cts.map → index-BU4G20G6.d.cts.map} +1 -1
- package/dist/{index-ZAUrXH6Q.d.mts → index-yDbd1WcM.d.mts} +2 -2
- package/dist/{index-ZAUrXH6Q.d.mts.map → index-yDbd1WcM.d.mts.map} +1 -1
- package/dist/index.cjs +131 -141
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +128 -138
- package/dist/index.mjs.map +1 -1
- package/dist/{migrate-CCZUgxMK.mjs → migrate-CZIGT3kB.mjs} +3 -3
- package/dist/{migrate-CCZUgxMK.mjs.map → migrate-CZIGT3kB.mjs.map} +1 -1
- package/dist/{migrate-DBGyoBvZ.cjs → migrate-CxZYzF_u.cjs} +3 -3
- package/dist/{migrate-DBGyoBvZ.cjs.map → migrate-CxZYzF_u.cjs.map} +1 -1
- package/dist/{migrate-DH-lOK3j.mjs → migrate-DR1x96I4.mjs} +3 -3
- package/dist/{migrate-DH-lOK3j.mjs.map → migrate-DR1x96I4.mjs.map} +1 -1
- package/dist/{migrate-Cs7kQxD5.cjs → migrate-DjrTwWJA.cjs} +3 -3
- package/dist/{migrate-Cs7kQxD5.cjs.map → migrate-DjrTwWJA.cjs.map} +1 -1
- package/dist/openapi.cjs +1 -1
- package/dist/openapi.d.cts +1 -1
- package/dist/openapi.d.mts +1 -1
- package/dist/openapi.mjs +1 -1
- package/dist/{projectBucket-DrkEht-j.mjs → projectBucket-BYOxRnHY.mjs} +2 -2
- package/dist/{projectBucket-DrkEht-j.mjs.map → projectBucket-BYOxRnHY.mjs.map} +1 -1
- package/dist/{projectBucket-BjeDcAYy.cjs → projectBucket-CDu5rXjp.cjs} +2 -2
- package/dist/{projectBucket-BjeDcAYy.cjs.map → projectBucket-CDu5rXjp.cjs.map} +1 -1
- package/dist/reconcile/public.d.cts +2 -2
- package/dist/reconcile/public.d.mts +2 -2
- package/dist/{resolve-OfLaxaxY.mjs → resolve-CNYbGH8g.mjs} +3 -3
- package/dist/{resolve-OfLaxaxY.mjs.map → resolve-CNYbGH8g.mjs.map} +1 -1
- package/dist/{resolve-CScrqgdC.cjs → resolve-DC98Rl1t.cjs} +3 -3
- package/dist/{resolve-CScrqgdC.cjs.map → resolve-DC98Rl1t.cjs.map} +1 -1
- package/dist/{rollback-DQBSN-i7.mjs → rollback-BkIkE8Qe.mjs} +5 -5
- package/dist/{rollback-DQBSN-i7.mjs.map → rollback-BkIkE8Qe.mjs.map} +1 -1
- package/dist/{rollback-D7p4wJNO.cjs → rollback-DBfLvC8k.cjs} +5 -5
- package/dist/{rollback-D7p4wJNO.cjs.map → rollback-DBfLvC8k.cjs.map} +1 -1
- package/dist/{runtime-BlHOVx8L.d.cts → runtime-CLz3bf07.d.mts} +2 -2
- package/dist/{runtime-BlHOVx8L.d.cts.map → runtime-CLz3bf07.d.mts.map} +1 -1
- package/dist/{runtime-DMq9C3KB.d.mts → runtime-CUWf0IUk.d.cts} +2 -2
- package/dist/{runtime-DMq9C3KB.d.mts.map → runtime-CUWf0IUk.d.cts.map} +1 -1
- package/dist/{s3-CUKzBBae.mjs → s3-BwhQk3QM.mjs} +3 -3
- package/dist/{s3-CUKzBBae.mjs.map → s3-BwhQk3QM.mjs.map} +1 -1
- package/dist/{s3-QQi4sNOQ.cjs → s3-DLp0V-Ox.cjs} +3 -3
- package/dist/{s3-QQi4sNOQ.cjs.map → s3-DLp0V-Ox.cjs.map} +1 -1
- package/dist/{sandbox-Cm4X6HRh.d.mts → sandbox-CfpLWTPP.d.mts} +2 -2
- package/dist/{sandbox-ArJ_hEKk.d.cts.map → sandbox-CfpLWTPP.d.mts.map} +1 -1
- package/dist/{sandbox-ArJ_hEKk.d.cts → sandbox-D1XeNEJ9.d.cts} +2 -2
- package/dist/{sandbox-Cm4X6HRh.d.mts.map → sandbox-D1XeNEJ9.d.cts.map} +1 -1
- package/dist/{seeds-Df4BI-T3.cjs → seeds-BNHSpjNP.cjs} +9 -179
- package/dist/seeds-BNHSpjNP.cjs.map +1 -0
- package/dist/{seeds-BvxWUGKJ.mjs → seeds-C4bZ8L-T.mjs} +10 -132
- package/dist/seeds-C4bZ8L-T.mjs.map +1 -0
- package/dist/{sniffer-BqjXvcaK.mjs → sniffer-BIBm9dAb.mjs} +7 -7
- package/dist/{sniffer-BqjXvcaK.mjs.map → sniffer-BIBm9dAb.mjs.map} +1 -1
- package/dist/{sniffer-DZeQJKty.cjs → sniffer-Cylp9W2D.cjs} +7 -7
- package/dist/{sniffer-DZeQJKty.cjs.map → sniffer-Cylp9W2D.cjs.map} +1 -1
- package/dist/{stages-6SEoRA4x.mjs → stages-CcS9vnNu.mjs} +3 -17
- package/dist/stages-CcS9vnNu.mjs.map +1 -0
- package/dist/{stages-DH5z89eT.cjs → stages-DdBV7msu.cjs} +3 -17
- package/dist/stages-DdBV7msu.cjs.map +1 -0
- package/dist/target/public.cjs +1 -1
- package/dist/target/public.d.cts +2 -2
- package/dist/target/public.d.mts +2 -2
- package/dist/target/public.mjs +1 -1
- package/dist/{types-Drpl9HX9.d.mts → types-BhThob0H.d.mts} +29 -13
- package/dist/types-BhThob0H.d.mts.map +1 -0
- package/dist/{types-DipUP9zp.d.cts → types-DwoLHelT.d.cts} +29 -13
- package/dist/types-DwoLHelT.d.cts.map +1 -0
- package/dist/workspace/index.cjs +1 -1
- package/dist/workspace/index.d.cts +2 -2
- package/dist/workspace/index.d.mts +2 -2
- package/dist/workspace/index.mjs +1 -1
- package/dist/{workspace-BBeT6Pil.mjs → workspace-D5CpOp1y.mjs} +22 -2
- package/dist/workspace-D5CpOp1y.mjs.map +1 -0
- package/dist/{workspace-BJ78Bgvm.cjs → workspace-DRjdu1OY.cjs} +22 -2
- package/dist/workspace-DRjdu1OY.cjs.map +1 -0
- package/package.json +15 -15
- package/dist/cli-CRDJWWmZ.cjs.map +0 -1
- package/dist/cli-CV85bY3-.mjs.map +0 -1
- package/dist/compose-CQQRRJC3.mjs +0 -1511
- package/dist/compose-CQQRRJC3.mjs.map +0 -1
- package/dist/compose-DMY4ouEk.cjs +0 -1558
- package/dist/compose-DMY4ouEk.cjs.map +0 -1
- package/dist/deploy-277jek46.cjs.map +0 -1
- package/dist/deploy-Dw8g3sLY.mjs.map +0 -1
- package/dist/dns-4RAiVFa7.cjs +0 -55
- package/dist/dns-4RAiVFa7.cjs.map +0 -1
- package/dist/dns-CU22K_i0.mjs +0 -44
- package/dist/dns-CU22K_i0.mjs.map +0 -1
- package/dist/secrets-AA_tQUl-.mjs +0 -36
- package/dist/secrets-AA_tQUl-.mjs.map +0 -1
- package/dist/secrets-B_biKsKx.cjs +0 -47
- package/dist/secrets-B_biKsKx.cjs.map +0 -1
- package/dist/seeds-BvxWUGKJ.mjs.map +0 -1
- package/dist/seeds-Df4BI-T3.cjs.map +0 -1
- package/dist/stack-A6MAFZ6u.mjs +0 -1201
- package/dist/stack-A6MAFZ6u.mjs.map +0 -1
- package/dist/stack-BpkZEEfB.cjs +0 -1308
- package/dist/stack-BpkZEEfB.cjs.map +0 -1
- package/dist/stages-6SEoRA4x.mjs.map +0 -1
- package/dist/stages-DH5z89eT.cjs.map +0 -1
- package/dist/types-DipUP9zp.d.cts.map +0 -1
- package/dist/types-Drpl9HX9.d.mts.map +0 -1
- package/dist/workspace-BBeT6Pil.mjs.map +0 -1
- package/dist/workspace-BJ78Bgvm.cjs.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -5,9 +5,10 @@ import { r as DEFAULT_TIMEOUT_MS, t as CommandFailed } from "./run-BJLIerMM.mjs"
|
|
|
5
5
|
import { a as getDokployCredentials, d as removeGoDaddyCredentials, f as storeDokployCredentials, i as getCredentialsPath, l as readCredentials, m as storeHostingerToken, o as getDokployRegistryId, p as storeGoDaddyToken, s as getDokployToken, u as removeDokployCredentials } from "./credentials-B5N5yKk6.mjs";
|
|
6
6
|
import { l as withOwningTsconfigJsx, r as discover, u as ConstructGenerator } from "./discover-qjFapetL.mjs";
|
|
7
7
|
import { t as appKey } from "./derive-B4vDpzgP.mjs";
|
|
8
|
-
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-
|
|
8
|
+
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-D5CpOp1y.mjs";
|
|
9
9
|
import { ConfigNotFound, NotABackendApp, NotInAnApp, loadAppConfig, loadConfig, loadWorkspaceConfig, loadWorkspaceSettings, parseModuleConfig } from "./config.mjs";
|
|
10
|
-
import { C as assertDevServicesFlag, Cn as loadEnvFiles, Ct as LOCAL_CA_PATH, En as prepareEntryCredentials, Ft as pgClient,
|
|
10
|
+
import { Bn as withCustomSecret, C as assertDevServicesFlag, Cn as loadEnvFiles, Ct as LOCAL_CA_PATH, En as prepareEntryCredentials, Ft as pgClient, Jt as imageBuildCredentials, Ln as maskPassword, Mn as getKeyPath, On as secretsStoreFor, Pn as projectKey, Qt as providerOf, Sn as isPortAvailable, Tn as loadSecretsForApp, Vn as LOCAL_LOGS_EMAIL, Xt as cacheBackendFor, Yt as isImageBuild, Zt as eventsBackendFor, _n as portsOf, at as CronGenerator, bn as createEntryWrapper, ct as constructGlobs, dn as telemetryOf, en as CLUSTER_DATABASE, et as workerUnits, g as describeActor, hn as fakeKey, ht as readLocalCredentials, it as QueueGenerator, jn as FileSecretsStore, jt as quoteIdentifier, kt as postgresDatabaseNames, ln as scopeTelemetryEnv, lt as derivedContainers, mn as describeServices, nt as workerBundleName, ot as FAKE_ENV, p as dnsResources, rn as TELEMETRY_CONTAINER, rt as workerEntryDir, s as dockerCommand, sn as appTelemetry, st as backendsOf$1, tt as WorkerGenerator, un as surfaceClientTraced, ut as reconcileWorkspace, vn as primaryPortKey, wn as loadPortState, wt as forgetState, xn as findAvailablePort, yn as createCredentialsPreload, zn as toEmbeddableSecrets } from "./seeds-C4bZ8L-T.mjs";
|
|
11
|
+
import { n as deployIdentity } from "./identity-CBXr4wNi.mjs";
|
|
11
12
|
import { c as startTelemetryCode, l as telemetryFor, n as runtimeFor, o as mountRequestSpansCode, r as parseTelemetryFlag, s as routeTelemetry, t as EndpointGenerator, u as writeTelemetryModule } from "./EndpointGenerator-Bor2tZCm.mjs";
|
|
12
13
|
import { generateOpenApi, openapiCommand, resolveOpenApiConfig } from "./openapi.mjs";
|
|
13
14
|
import { s as isCacheBackend, t as SubscriberGenerator } from "./SubscriberGenerator-CyN2VF5X.mjs";
|
|
@@ -15,12 +16,11 @@ import { a as describeHolder, i as assignAppPorts, o as holderOf, r as appTag, s
|
|
|
15
16
|
import { n as driversFor, r as eventsBackendsIn, t as cacheBackendsIn } from "./drivers-CTaWrA_L.mjs";
|
|
16
17
|
import { n as withCompute, r as withRoutes, t as manifestModule } from "./emit-C1e8qD08.mjs";
|
|
17
18
|
import { t as LocalSandbox } from "./local-BwC2v2Y8.mjs";
|
|
18
|
-
import { S as createStateStore, k as keyFingerprint, n as sniffAppEnvironment, o as DokployApi } from "./sniffer-
|
|
19
|
-
import { t as deploy$1 } from "./deploy-
|
|
19
|
+
import { S as createStateStore, k as keyFingerprint, n as sniffAppEnvironment, o as DokployApi } from "./sniffer-BIBm9dAb.mjs";
|
|
20
|
+
import { t as deploy$1 } from "./deploy-n_IB8r6H.mjs";
|
|
20
21
|
import { o as loadCredentialSchemas, t as CredentialsInvalid } from "./credentialSchemas-BJFvfkaz.mjs";
|
|
21
|
-
import { a as stackOverrideFile, c as dockerCompose, i as ComposePushNeedsBuild, o as
|
|
22
|
-
import {
|
|
23
|
-
import { t as LocalStateStore } from "./LocalStateStore-DPQSqkSb.mjs";
|
|
22
|
+
import { a as stackOverrideFile, c as composeServer, d as parseDigests, f as pinnedRef, g as dockerCompose, h as EDGE_PROJECT, i as ComposePushNeedsBuild, l as dockerHost, m as removeEdgeRoutes, o as composeProject, p as edgeRef, r as ComposePinNeedsPull, s as stackDir, t as composeTarget, u as sshTarget } from "./compose-CLsRcHkA.mjs";
|
|
23
|
+
import { t as LocalStateStore } from "./LocalStateStore-C5mNp91D.mjs";
|
|
24
24
|
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";
|
|
25
25
|
import { a as writeTestHarness, i as TEST_MANIFEST_ENV, n as TEST_READY_FILE, t as TEST_READY_ENV } from "./ready-naOSJpeJ.mjs";
|
|
26
26
|
import { createRequire } from "node:module";
|
|
@@ -50,7 +50,7 @@ import crypto from "crypto";
|
|
|
50
50
|
import { Function } from "@geekmidas/constructs/functions";
|
|
51
51
|
import { Topic } from "@geekmidas/constructs/topic";
|
|
52
52
|
//#region package.json
|
|
53
|
-
var version = "10.0.0-alpha.
|
|
53
|
+
var version = "10.0.0-alpha.99";
|
|
54
54
|
//#endregion
|
|
55
55
|
//#region src/prompt.ts
|
|
56
56
|
/**
|
|
@@ -133,7 +133,7 @@ const logger$8 = console;
|
|
|
133
133
|
* Validate Dokploy token by making a test API call
|
|
134
134
|
*/
|
|
135
135
|
async function validateDokployToken(endpoint, token) {
|
|
136
|
-
const { DokployApi } = await import("./sniffer-
|
|
136
|
+
const { DokployApi } = await import("./sniffer-BIBm9dAb.mjs").then((n) => n.c);
|
|
137
137
|
return new DokployApi({
|
|
138
138
|
baseUrl: endpoint,
|
|
139
139
|
token
|
|
@@ -2327,9 +2327,9 @@ async function workspaceDevCommand(configured, options) {
|
|
|
2327
2327
|
for (const { id, port } of fakes) logger$5.log(`🎭 ${id} fake: http://localhost:${port}`);
|
|
2328
2328
|
logger$5.log(options.migrate || options.seed ? "🗄️ Migrating the databases" : "🗄️ Checking for pending migrations");
|
|
2329
2329
|
if (options.migrate || options.seed) {
|
|
2330
|
-
const { prepareDevDatabases } = await import("./migrate-
|
|
2330
|
+
const { prepareDevDatabases } = await import("./migrate-CZIGT3kB.mjs");
|
|
2331
2331
|
await prepareDevDatabases(workspace, reconciled.env, { seed: !!options.seed });
|
|
2332
|
-
} else await import("./migrate-
|
|
2332
|
+
} else await import("./migrate-CZIGT3kB.mjs").then(({ reportPendingMigrations }) => reportPendingMigrations(workspace, reconciled.env)).catch((error) => {
|
|
2333
2333
|
logger$5.log(`⚠️ Could not check for pending migrations: ${error instanceof Error ? error.message : String(error)}`);
|
|
2334
2334
|
});
|
|
2335
2335
|
const appUrls = {};
|
|
@@ -3382,7 +3382,7 @@ async function buildApp(input) {
|
|
|
3382
3382
|
...production,
|
|
3383
3383
|
...telemetry ? { telemetry } : {}
|
|
3384
3384
|
});
|
|
3385
|
-
const { bundleServer } = await import("./bundler-
|
|
3385
|
+
const { bundleServer } = await import("./bundler-Q6Kp8b0r.mjs");
|
|
3386
3386
|
await bundleServer({
|
|
3387
3387
|
entryPoint,
|
|
3388
3388
|
outputDir: join(outputDir, "dist"),
|
|
@@ -3527,7 +3527,7 @@ async function buildWorkers(input) {
|
|
|
3527
3527
|
});
|
|
3528
3528
|
logger$4.log(`Generated worker ${worker.id}: ${crons.length} crons, ${queues.length} queues, ${subscribers.length} subscribers`);
|
|
3529
3529
|
if (!input.bundle) continue;
|
|
3530
|
-
const { bundleServer } = await import("./bundler-
|
|
3530
|
+
const { bundleServer } = await import("./bundler-Q6Kp8b0r.mjs");
|
|
3531
3531
|
const outfile = workerBundleName(worker.id);
|
|
3532
3532
|
await bundleServer({
|
|
3533
3533
|
entryPoint,
|
|
@@ -3613,7 +3613,7 @@ async function buildForTarget(target, context, appRoot, workspaceRoot, endpointG
|
|
|
3613
3613
|
let masterKey;
|
|
3614
3614
|
if (context.production?.bundle && !skipBundle) {
|
|
3615
3615
|
logger$4.log(`\n📦 Bundling production server...`);
|
|
3616
|
-
const { bundleServer } = await import("./bundler-
|
|
3616
|
+
const { bundleServer } = await import("./bundler-Q6Kp8b0r.mjs");
|
|
3617
3617
|
const allConstructs = [
|
|
3618
3618
|
...endpoints.map((e) => e.construct),
|
|
3619
3619
|
...functions.map((f) => f.construct),
|
|
@@ -3871,15 +3871,26 @@ async function composeCommand(options, deps = {}) {
|
|
|
3871
3871
|
const { workspace } = await loadWorkspaceConfig(cwd);
|
|
3872
3872
|
const { stage } = options;
|
|
3873
3873
|
if (options.down) {
|
|
3874
|
+
const local = stage === workspace.stages.local;
|
|
3875
|
+
const server = local ? void 0 : composeServer({
|
|
3876
|
+
stage,
|
|
3877
|
+
local,
|
|
3878
|
+
config: workspace.deploy?.compose?.server,
|
|
3879
|
+
custom: (await (await secretsStoreFor(workspace, stage)).read(stage))?.custom
|
|
3880
|
+
});
|
|
3874
3881
|
const override = stackOverrideFile(workspace.root, stage);
|
|
3882
|
+
const dir = join(workspace.root, stackDir(stage));
|
|
3875
3883
|
const ref = {
|
|
3876
3884
|
project: composeProject(deployIdentity(workspace, stage)),
|
|
3877
|
-
file: join(
|
|
3885
|
+
file: join(dir, "docker-compose.yml"),
|
|
3878
3886
|
...existsSync(override) ? { overrides: [override] } : {},
|
|
3879
|
-
cwd: workspace.root
|
|
3887
|
+
cwd: workspace.root,
|
|
3888
|
+
...server ? { host: dockerHost(server) } : {}
|
|
3880
3889
|
};
|
|
3881
|
-
|
|
3882
|
-
|
|
3890
|
+
const docker = deps.docker ?? dockerCompose;
|
|
3891
|
+
if (server) console.log(`→ ${sshTarget(server)} (docker over ssh)`);
|
|
3892
|
+
if (server && await removeEdgeRoutes(docker, edgeRef(join(dir, `gkm-edge.yml`), { host: ref.host }), ref.project)) console.log(`🌐 Removed ${ref.project}'s routes from ${EDGE_PROJECT}.`);
|
|
3893
|
+
await docker.down(ref);
|
|
3883
3894
|
console.log(`🛑 Stopped ${ref.project}. Its volumes are kept.`);
|
|
3884
3895
|
return;
|
|
3885
3896
|
}
|
|
@@ -3908,8 +3919,6 @@ async function composeCommand(options, deps = {}) {
|
|
|
3908
3919
|
...options.push ? { buildOnly: true } : {},
|
|
3909
3920
|
...options.allowDevServices ? { allowDevServices: true } : {},
|
|
3910
3921
|
...options.skipDns ? { skipDns: true } : {},
|
|
3911
|
-
...options.resourcesOnly ? { resourcesOnly: true } : {},
|
|
3912
|
-
...options.skipResources ? { skipResources: true } : {},
|
|
3913
3922
|
...options.rotateKeys ? { rotateKeys: true } : {},
|
|
3914
3923
|
...options.retireOldKeys ? { retireOldKeys: true } : {},
|
|
3915
3924
|
logger: {
|
|
@@ -5432,25 +5441,25 @@ function loadPackageJson() {
|
|
|
5432
5441
|
* Run: pnpm --filter @geekmidas/cli sync-versions
|
|
5433
5442
|
*/
|
|
5434
5443
|
const GEEKMIDAS_VERSIONS = {
|
|
5435
|
-
"@geekmidas/audit": "~10.0.0-alpha.
|
|
5436
|
-
"@geekmidas/auth": "~10.0.0-alpha.
|
|
5437
|
-
"@geekmidas/cache": "~10.0.0-alpha.
|
|
5438
|
-
"@geekmidas/client": "~10.0.0-alpha.
|
|
5439
|
-
"@geekmidas/cloud": "~10.0.0-alpha.
|
|
5440
|
-
"@geekmidas/constructs": "~10.0.0-alpha.
|
|
5441
|
-
"@geekmidas/db": "~10.0.0-alpha.
|
|
5442
|
-
"@geekmidas/emailkit": "~10.0.0-alpha.
|
|
5443
|
-
"@geekmidas/envkit": "~10.0.0-alpha.
|
|
5444
|
-
"@geekmidas/errors": "~10.0.0-alpha.
|
|
5445
|
-
"@geekmidas/events": "~10.0.0-alpha.
|
|
5446
|
-
"@geekmidas/logger": "~10.0.0-alpha.
|
|
5447
|
-
"@geekmidas/manifest": "~10.0.0-alpha.
|
|
5448
|
-
"@geekmidas/rate-limit": "~10.0.0-alpha.
|
|
5449
|
-
"@geekmidas/schema": "~10.0.0-alpha.
|
|
5450
|
-
"@geekmidas/services": "~10.0.0-alpha.
|
|
5451
|
-
"@geekmidas/storage": "~10.0.0-alpha.
|
|
5452
|
-
"@geekmidas/telescope": "~10.0.0-alpha.
|
|
5453
|
-
"@geekmidas/testkit": "~10.0.0-alpha.
|
|
5444
|
+
"@geekmidas/audit": "~10.0.0-alpha.99",
|
|
5445
|
+
"@geekmidas/auth": "~10.0.0-alpha.99",
|
|
5446
|
+
"@geekmidas/cache": "~10.0.0-alpha.99",
|
|
5447
|
+
"@geekmidas/client": "~10.0.0-alpha.99",
|
|
5448
|
+
"@geekmidas/cloud": "~10.0.0-alpha.99",
|
|
5449
|
+
"@geekmidas/constructs": "~10.0.0-alpha.99",
|
|
5450
|
+
"@geekmidas/db": "~10.0.0-alpha.99",
|
|
5451
|
+
"@geekmidas/emailkit": "~10.0.0-alpha.99",
|
|
5452
|
+
"@geekmidas/envkit": "~10.0.0-alpha.99",
|
|
5453
|
+
"@geekmidas/errors": "~10.0.0-alpha.99",
|
|
5454
|
+
"@geekmidas/events": "~10.0.0-alpha.99",
|
|
5455
|
+
"@geekmidas/logger": "~10.0.0-alpha.99",
|
|
5456
|
+
"@geekmidas/manifest": "~10.0.0-alpha.99",
|
|
5457
|
+
"@geekmidas/rate-limit": "~10.0.0-alpha.99",
|
|
5458
|
+
"@geekmidas/schema": "~10.0.0-alpha.99",
|
|
5459
|
+
"@geekmidas/services": "~10.0.0-alpha.99",
|
|
5460
|
+
"@geekmidas/storage": "~10.0.0-alpha.99",
|
|
5461
|
+
"@geekmidas/telescope": "~10.0.0-alpha.99",
|
|
5462
|
+
"@geekmidas/testkit": "~10.0.0-alpha.99",
|
|
5454
5463
|
"@geekmidas/cli": `~${loadPackageJson().version}`
|
|
5455
5464
|
};
|
|
5456
5465
|
//#endregion
|
|
@@ -5851,7 +5860,7 @@ const COMMIT = /^[0-9a-f]{40}$/;
|
|
|
5851
5860
|
* The `uses:` value for the stages action, with a comment saying which CLI
|
|
5852
5861
|
* release the pinned commit is.
|
|
5853
5862
|
*/
|
|
5854
|
-
function stagesActionUses(commit = "
|
|
5863
|
+
function stagesActionUses(commit = "c9e539e1dbb06bad206fc9c356648b8927fd6181", version = cliVersion()) {
|
|
5855
5864
|
return commit && COMMIT.test(commit) ? `${STAGES_ACTION}@${commit} # @geekmidas/cli ${version}` : `${STAGES_ACTION}@main # pin to a commit SHA: see the action's README`;
|
|
5856
5865
|
}
|
|
5857
5866
|
//#endregion
|
|
@@ -6103,7 +6112,6 @@ function stagesJob(options) {
|
|
|
6103
6112
|
has-build: \${{ steps.stages.outputs.has-build }}
|
|
6104
6113
|
has-deploy: \${{ steps.stages.outputs.has-deploy }}
|
|
6105
6114
|
aws-region: \${{ steps.stages.outputs.aws-region }}
|
|
6106
|
-
resources: \${{ steps.stages.outputs.resources }}
|
|
6107
6115
|
steps:
|
|
6108
6116
|
- uses: actions/checkout@v4
|
|
6109
6117
|
|
|
@@ -6121,10 +6129,6 @@ ${pm.setup}
|
|
|
6121
6129
|
stage: \${{ inputs.stage }}
|
|
6122
6130
|
`;
|
|
6123
6131
|
}
|
|
6124
|
-
/** Every step in `steps` run only when `condition` holds. */
|
|
6125
|
-
function onlyIf(steps, condition) {
|
|
6126
|
-
return steps.replace(/^ {6}- /gm, ` - if: ${condition}\n `);
|
|
6127
|
-
}
|
|
6128
6132
|
/**
|
|
6129
6133
|
* The registry login a compose build pushes with: GitHub's own token on
|
|
6130
6134
|
* ghcr.io, otherwise a username variable and a password secret.
|
|
@@ -6141,19 +6145,17 @@ function registryLogin(registry) {
|
|
|
6141
6145
|
}
|
|
6142
6146
|
/**
|
|
6143
6147
|
* The compose deploy: images are built and pushed by the runner, where the
|
|
6144
|
-
* code is, and
|
|
6148
|
+
* code is, and run by the stage's server — whose Docker engine the runner
|
|
6149
|
+
* drives over SSH.
|
|
6145
6150
|
*
|
|
6146
6151
|
* - `build` (on a push): every deployed stage's images, tagged with the
|
|
6147
6152
|
* commit, and their digests kept as the artifact `digests-<stage>`.
|
|
6148
6153
|
* - `deploy`: the commit the event names — a release's tag, a manual run's
|
|
6149
|
-
* `ref` — then that commit's push build, whose digests pin each image.
|
|
6150
|
-
*
|
|
6151
|
-
*
|
|
6152
|
-
*
|
|
6153
|
-
*
|
|
6154
|
-
* first (`gkm deploy --resources-only`) with the stage's role and the DNS
|
|
6155
|
-
* token from its environment, and the server deploys with
|
|
6156
|
-
* `--skip-resources`: neither credential reaches the server.
|
|
6154
|
+
* `ref` — then that commit's push build, whose digests pin each image. One
|
|
6155
|
+
* `gkm compose` on the runner, with the stage's role and DNS token, creates
|
|
6156
|
+
* the stage's resources and DNS records and runs exactly those images on the
|
|
6157
|
+
* server's engine (`DOCKER_HOST=ssh://…`, from `deploy.compose.server`).
|
|
6158
|
+
* The server holds Docker and the deploy user's key, and no credential.
|
|
6157
6159
|
*/
|
|
6158
6160
|
function composeDeploy(options) {
|
|
6159
6161
|
const pm = tooling(options);
|
|
@@ -6229,13 +6231,8 @@ ${registryLogin(registry)}
|
|
|
6229
6231
|
permissions:
|
|
6230
6232
|
contents: read
|
|
6231
6233
|
actions: read
|
|
6234
|
+
packages: read
|
|
6232
6235
|
id-token: write
|
|
6233
|
-
env:
|
|
6234
|
-
# Whether the stage has resources the deploy creates — a provider's
|
|
6235
|
-
# bucket and key (deploy.<kind>.<stage>), DNS records through a provider
|
|
6236
|
-
# in dns: the runner creates them with the stage's role and DNS token,
|
|
6237
|
-
# so neither reaches the server, which deploys with --skip-resources.
|
|
6238
|
-
RESOURCES_ON_RUNNER: \${{ contains(fromJSON(needs.stages.outputs.resources || '[]'), matrix.stage) }}
|
|
6239
6236
|
steps:
|
|
6240
6237
|
# A release deploys its tag's commit, never its target_commitish — the
|
|
6241
6238
|
# branch it was drafted against, which has moved on since.
|
|
@@ -6258,40 +6255,30 @@ ${registryLogin(registry)}
|
|
|
6258
6255
|
REF: \${{ inputs.ref }}
|
|
6259
6256
|
SHA: \${{ github.sha }}
|
|
6260
6257
|
|
|
6261
|
-
# The deploy's resources, here on the runner: each provider's bucket
|
|
6262
|
-
# and key (written into the stage's secrets store), and every public
|
|
6263
|
-
# host's DNS record — a new app's included, one per host, never a
|
|
6264
|
-
# wildcard — written through the provider where it is missing or out of
|
|
6265
|
-
# date and read back from it. The stage's secrets (GKM_SERVER_IPV4
|
|
6266
|
-
# among them) are read with the stage's role; the DNS token is a secret
|
|
6267
|
-
# on this stage's environment. A missing credential fails here, before
|
|
6268
|
-
# anything is deployed.
|
|
6269
6258
|
- name: Check out the commit
|
|
6270
|
-
if: env.RESOURCES_ON_RUNNER == 'true'
|
|
6271
6259
|
uses: actions/checkout@v4
|
|
6272
6260
|
with:
|
|
6273
6261
|
ref: \${{ steps.commit.outputs.sha }}
|
|
6274
6262
|
|
|
6275
|
-
${
|
|
6263
|
+
${pm.setup}
|
|
6276
6264
|
- name: Install
|
|
6277
|
-
if: env.RESOURCES_ON_RUNNER == 'true'
|
|
6278
6265
|
run: ${pm.install}
|
|
6279
6266
|
|
|
6267
|
+
# The server's engine pulls with the login docker sends from here: it
|
|
6268
|
+
# holds none of its own.
|
|
6269
|
+
${registryLogin(registry)}
|
|
6270
|
+
# The stage's secrets and deploy state are read and written here, with
|
|
6271
|
+
# the stage's role (AWS_ROLE_ARN, set by gkm deploy:github). With the
|
|
6272
|
+
# default 'file' secrets store there is no role, and no secrets file in
|
|
6273
|
+
# a checkout: set secrets.store in gkm.config.ts to a store on AWS to
|
|
6274
|
+
# deploy from CI.
|
|
6280
6275
|
- name: Assume the stage's AWS role
|
|
6281
|
-
if:
|
|
6276
|
+
if: needs.stages.outputs.aws-region != ''
|
|
6282
6277
|
uses: aws-actions/configure-aws-credentials@v4
|
|
6283
6278
|
with:
|
|
6284
6279
|
role-to-assume: \${{ vars.AWS_ROLE_ARN }}
|
|
6285
6280
|
aws-region: \${{ needs.stages.outputs.aws-region }}
|
|
6286
6281
|
|
|
6287
|
-
- name: Create the stage's resources
|
|
6288
|
-
if: env.RESOURCES_ON_RUNNER == 'true'
|
|
6289
|
-
run: ${pm.exec} gkm deploy --stage "$STAGE" --resources-only
|
|
6290
|
-
env:
|
|
6291
|
-
STAGE: \${{ matrix.stage }}
|
|
6292
|
-
GODADDY_API_TOKEN: \${{ secrets.GODADDY_API_TOKEN }}
|
|
6293
|
-
HOSTINGER_API_TOKEN: \${{ secrets.HOSTINGER_API_TOKEN }}
|
|
6294
|
-
|
|
6295
6282
|
# The push run of this workflow that built the commit for this stage:
|
|
6296
6283
|
# this run on a push, the newest one with the stage's digests otherwise.
|
|
6297
6284
|
- name: Find the commit's push build
|
|
@@ -6336,48 +6323,42 @@ ${onlyIf(pm.setup, "env.RESOURCES_ON_RUNNER == 'true'")}
|
|
|
6336
6323
|
STAGE: \${{ matrix.stage }}
|
|
6337
6324
|
SHA: \${{ steps.commit.outputs.sha }}
|
|
6338
6325
|
|
|
6339
|
-
#
|
|
6340
|
-
#
|
|
6341
|
-
#
|
|
6342
|
-
#
|
|
6343
|
-
|
|
6344
|
-
#
|
|
6345
|
-
# Every value reaches the server as an argument to a quoted heredoc —
|
|
6346
|
-
# nothing is pasted into the script.
|
|
6347
|
-
- name: Deploy on the server
|
|
6326
|
+
# The deploy user's key (DEPLOY_SSH_KEY, a secret) and the server's
|
|
6327
|
+
# pinned host key (DEPLOY_KNOWN_HOSTS, a variable) on each environment:
|
|
6328
|
+
# never accepted on first sight. The server — user and host — is
|
|
6329
|
+
# deploy.compose.server in gkm.config.ts and the stage's GKM_SERVER_IPV4.
|
|
6330
|
+
- name: SSH to the server
|
|
6348
6331
|
run: |
|
|
6349
6332
|
mkdir -p ~/.ssh && chmod 700 ~/.ssh
|
|
6350
6333
|
(umask 077 && printf '%s\\n' "$SSH_KEY" > ~/.ssh/deploy_key)
|
|
6351
6334
|
printf '%s\\n' "$KNOWN_HOSTS" > ~/.ssh/known_hosts
|
|
6352
|
-
|
|
6353
|
-
|
|
6354
|
-
|
|
6355
|
-
|
|
6356
|
-
|
|
6357
|
-
|
|
6358
|
-
|
|
6359
|
-
|
|
6360
|
-
|
|
6361
|
-
git checkout --quiet --detach "$sha"
|
|
6362
|
-
${pm.install}
|
|
6363
|
-
args=(--stage "$stage" --tag "$sha")
|
|
6364
|
-
if [ -n "$digests" ]; then
|
|
6365
|
-
mkdir -p .gkm
|
|
6366
|
-
printf '%s' "$digests" | base64 -d > ".gkm/digests-$stage.json"
|
|
6367
|
-
args+=(--digests-file ".gkm/digests-$stage.json")
|
|
6368
|
-
fi
|
|
6369
|
-
# Created and confirmed from the runner already.
|
|
6370
|
-
if [ "$resources_on_runner" = true ]; then args+=(--skip-resources); fi
|
|
6371
|
-
${pm.exec} gkm compose "\${args[@]}"
|
|
6372
|
-
REMOTE
|
|
6335
|
+
cat > ~/.ssh/config <<'CONFIG'
|
|
6336
|
+
Host *
|
|
6337
|
+
IdentityFile ~/.ssh/deploy_key
|
|
6338
|
+
IdentitiesOnly yes
|
|
6339
|
+
StrictHostKeyChecking yes
|
|
6340
|
+
ControlMaster auto
|
|
6341
|
+
ControlPath ~/.ssh/cm-%C
|
|
6342
|
+
ControlPersist 5m
|
|
6343
|
+
CONFIG
|
|
6373
6344
|
env:
|
|
6374
6345
|
SSH_KEY: \${{ secrets.DEPLOY_SSH_KEY }}
|
|
6375
6346
|
KNOWN_HOSTS: \${{ vars.DEPLOY_KNOWN_HOSTS }}
|
|
6376
|
-
|
|
6377
|
-
|
|
6378
|
-
|
|
6347
|
+
|
|
6348
|
+
# Everything, from here: the stage's resources and DNS records, its
|
|
6349
|
+
# databases migrated through an SSH tunnel, and exactly the pushed
|
|
6350
|
+
# images run on the server's Docker. The DNS token is a secret on the
|
|
6351
|
+
# stage's environment, and never leaves the runner.
|
|
6352
|
+
- name: Deploy
|
|
6353
|
+
run: |
|
|
6354
|
+
args=(--stage "$STAGE" --tag "$SHA")
|
|
6355
|
+
if [ -f digests.json ]; then args+=(--digests-file digests.json); fi
|
|
6356
|
+
${pm.exec} gkm compose "\${args[@]}"
|
|
6357
|
+
env:
|
|
6379
6358
|
STAGE: \${{ matrix.stage }}
|
|
6380
6359
|
SHA: \${{ steps.commit.outputs.sha }}
|
|
6360
|
+
GODADDY_API_TOKEN: \${{ secrets.GODADDY_API_TOKEN }}
|
|
6361
|
+
HOSTINGER_API_TOKEN: \${{ secrets.HOSTINGER_API_TOKEN }}
|
|
6381
6362
|
`;
|
|
6382
6363
|
}
|
|
6383
6364
|
/**
|
|
@@ -7816,13 +7797,24 @@ ${stateBlock(options)} secrets: {
|
|
|
7816
7797
|
* `gkm build` builds for, and which backends a cache or a broker resolves to.
|
|
7817
7798
|
*/
|
|
7818
7799
|
function deployBlock(options) {
|
|
7819
|
-
if (options.deployTarget === "compose")
|
|
7820
|
-
|
|
7821
|
-
|
|
7822
|
-
|
|
7800
|
+
if (options.deployTarget === "compose") {
|
|
7801
|
+
const key = (stage) => /^[A-Za-z_$][\w$]*$/.test(stage) ? stage : `'${stage}'`;
|
|
7802
|
+
const servers = options.stages.deployed.map((stage) => `${key(stage)}: { user: 'deploy' }`).join(", ");
|
|
7803
|
+
return `
|
|
7804
|
+
// \`gkm compose --stage <stage>\` runs a stage as one Docker Compose stack:
|
|
7805
|
+
// the local stage on this machine, a deployed stage on its server, whose
|
|
7806
|
+
// Docker it drives over SSH. CI builds every image and pushes it here, and
|
|
7807
|
+
// the server runs exactly those. On ghcr.io the owner is the repository's —
|
|
7823
7808
|
// the user or organisation whose packages the workflow's token can write.
|
|
7824
|
-
deploy: {
|
|
7809
|
+
deploy: {
|
|
7810
|
+
default: 'compose',
|
|
7811
|
+
registry: '${options.registry}',
|
|
7812
|
+
// Each deployed stage's server: the SSH user, in its docker group. The
|
|
7813
|
+
// host is the stage's GKM_SERVER_IPV4 secret unless \`host\` is set.
|
|
7814
|
+
compose: { server: { ${servers} } },
|
|
7815
|
+
},
|
|
7825
7816
|
`;
|
|
7817
|
+
}
|
|
7826
7818
|
if (options.deployTarget !== "sst") return "";
|
|
7827
7819
|
return `
|
|
7828
7820
|
// \`gkm deploy\` runs \`sst deploy\` on the manifest \`gkm build\` writes to
|
|
@@ -10839,8 +10831,8 @@ function printNextSteps(projectName, options, pkgManager) {
|
|
|
10839
10831
|
if (options.deployTarget === "compose") {
|
|
10840
10832
|
console.log("🚀 Deployment (Docker Compose, on your server):");
|
|
10841
10833
|
console.log(` Images are pushed to ${options.registry}; .github/workflows/deploy.yml builds them`);
|
|
10842
|
-
console.log(" and
|
|
10843
|
-
console.log("
|
|
10834
|
+
console.log(" and deploys each stage to its server's Docker over SSH (deploy.compose.server");
|
|
10835
|
+
console.log(" in gkm.config.ts). See the comments in it for the secrets each stage needs.");
|
|
10844
10836
|
console.log("");
|
|
10845
10837
|
}
|
|
10846
10838
|
if (options.deployTarget === "sst") {
|
|
@@ -11606,7 +11598,7 @@ function testDatabases(reconciled) {
|
|
|
11606
11598
|
* starts without the reference data the app needs.
|
|
11607
11599
|
*/
|
|
11608
11600
|
async function migrateTestStage(workspace, env) {
|
|
11609
|
-
const { migrateAndSeed } = await import("./migrate-
|
|
11601
|
+
const { migrateAndSeed } = await import("./migrate-CZIGT3kB.mjs");
|
|
11610
11602
|
const { discover } = await import("./discover-qjFapetL.mjs").then((n) => n.i);
|
|
11611
11603
|
const sources = {};
|
|
11612
11604
|
const manifest = await discover({
|
|
@@ -12042,7 +12034,7 @@ program.command("migrate").description("Apply each database construct's migratio
|
|
|
12042
12034
|
try {
|
|
12043
12035
|
const globalOptions = program.opts();
|
|
12044
12036
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12045
|
-
const { migrateCommand } = await import("./migrate-
|
|
12037
|
+
const { migrateCommand } = await import("./migrate-CZIGT3kB.mjs");
|
|
12046
12038
|
await migrateCommand({
|
|
12047
12039
|
...options,
|
|
12048
12040
|
...construct ? { construct } : {}
|
|
@@ -12055,7 +12047,7 @@ program.command("seed").description("Migrate, then run each database construct's
|
|
|
12055
12047
|
try {
|
|
12056
12048
|
const globalOptions = program.opts();
|
|
12057
12049
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12058
|
-
const { seedCommand } = await import("./migrate-
|
|
12050
|
+
const { seedCommand } = await import("./migrate-CZIGT3kB.mjs");
|
|
12059
12051
|
await seedCommand({
|
|
12060
12052
|
...options,
|
|
12061
12053
|
...construct ? { construct } : {}
|
|
@@ -12068,7 +12060,7 @@ program.command("migration").description("Write a construct's next migration: an
|
|
|
12068
12060
|
try {
|
|
12069
12061
|
const globalOptions = program.opts();
|
|
12070
12062
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12071
|
-
const { migrationCommand } = await import("./migrate-
|
|
12063
|
+
const { migrationCommand } = await import("./migrate-CZIGT3kB.mjs");
|
|
12072
12064
|
await migrationCommand({
|
|
12073
12065
|
construct,
|
|
12074
12066
|
...name ? { name } : {}
|
|
@@ -12114,7 +12106,7 @@ program.command("docker").description("Generate Docker deployment files").option
|
|
|
12114
12106
|
exitWithError(error);
|
|
12115
12107
|
}
|
|
12116
12108
|
});
|
|
12117
|
-
program.command("compose").description("Run the workspace's APIs and sites for a stage as one Docker Compose stack behind Caddy").requiredOption("--stage <stage>", "Stage to run — always named, so a stack is never a deployed stage by accident").option("--tag <tag>", "Run the images CI pushed at this tag (sites: <tag>-<stage>); nothing is built").option("--build", "Build images from this checkout, tagged with the commit").option("--pull", "Pull images (at --tag, or latest) rather than build them").option("--push", "With --build: push every image to deploy.registry and start nothing (for CI)").option("--digests-file <path>", "With --push: write each image as <ref>@sha256:… (JSON). With --tag: run the images at those digests").option("--dry-run", "Write the files and print the plan; start nothing").option("--down", "Stop the stage's stack (its volumes are kept)").option("--allow-dev-services", "Deployed stage: run the dev service (MinIO, Mailpit) for every bucket and mail the stage doesn't account for. Not production-grade").option("--skip-dns", "Deployed stage: neither write the public hosts' DNS records nor check they point at GKM_SERVER_IPV4 (a CDN or proxy in front, or records written elsewhere)").option("--
|
|
12109
|
+
program.command("compose").description("Run the workspace's APIs and sites for a stage as one Docker Compose stack behind Caddy").requiredOption("--stage <stage>", "Stage to run — always named, so a stack is never a deployed stage by accident").option("--tag <tag>", "Run the images CI pushed at this tag (sites: <tag>-<stage>); nothing is built").option("--build", "Build images from this checkout, tagged with the commit").option("--pull", "Pull images (at --tag, or latest) rather than build them").option("--push", "With --build: push every image to deploy.registry and start nothing (for CI)").option("--digests-file <path>", "With --push: write each image as <ref>@sha256:… (JSON). With --tag: run the images at those digests").option("--dry-run", "Write the files and print the plan; start nothing").option("--down", "Stop the stage's stack (its volumes are kept)").option("--allow-dev-services", "Deployed stage: run the dev service (MinIO, Mailpit) for every bucket and mail the stage doesn't account for. Not production-grade").option("--skip-dns", "Deployed stage: neither write the public hosts' DNS records nor check they point at GKM_SERVER_IPV4 (a CDN or proxy in front, or records written elsewhere)").option("--rotate-keys", "Deployed stage: each provider issues its runtime keys a successor (the old one is deleted by the next deploy)").option("--retire-old-keys", "Deployed stage: delete a rotated-out key now instead of on the next deploy").action(async (options) => {
|
|
12118
12110
|
try {
|
|
12119
12111
|
const globalOptions = program.opts();
|
|
12120
12112
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
@@ -12168,7 +12160,7 @@ program.command("secrets:add").description("Build the keys a stage must be given
|
|
|
12168
12160
|
try {
|
|
12169
12161
|
const globalOptions = program.opts();
|
|
12170
12162
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12171
|
-
const { secretsAddCommand } = await import("./add-
|
|
12163
|
+
const { secretsAddCommand } = await import("./add-DyIEYI97.mjs");
|
|
12172
12164
|
await secretsAddCommand(options);
|
|
12173
12165
|
} catch (error) {
|
|
12174
12166
|
exitWithError(error);
|
|
@@ -12178,7 +12170,7 @@ program.command("encryption:rotate").description("Add a new current key to an En
|
|
|
12178
12170
|
try {
|
|
12179
12171
|
const globalOptions = program.opts();
|
|
12180
12172
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12181
|
-
const { encryptionRotateCommand } = await import("./encryption-
|
|
12173
|
+
const { encryptionRotateCommand } = await import("./encryption-C3DcVZQs.mjs");
|
|
12182
12174
|
await encryptionRotateCommand(construct, options);
|
|
12183
12175
|
} catch (error) {
|
|
12184
12176
|
exitWithError(error);
|
|
@@ -12188,7 +12180,7 @@ program.command("encryption:retire").description("Remove an old key from an Encr
|
|
|
12188
12180
|
try {
|
|
12189
12181
|
const globalOptions = program.opts();
|
|
12190
12182
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12191
|
-
const { encryptionRetireCommand } = await import("./encryption-
|
|
12183
|
+
const { encryptionRetireCommand } = await import("./encryption-C3DcVZQs.mjs");
|
|
12192
12184
|
await encryptionRetireCommand(construct, key, options);
|
|
12193
12185
|
} catch (error) {
|
|
12194
12186
|
exitWithError(error);
|
|
@@ -12227,7 +12219,7 @@ program.command("secrets:reconcile").description("Backfill missing custom secret
|
|
|
12227
12219
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12228
12220
|
const { loadWorkspaceConfig } = await import("./config.mjs");
|
|
12229
12221
|
const { reconcileMissingSecrets } = await import("./reconcile--I7V4Klj.mjs");
|
|
12230
|
-
const { secretsStoreFor } = await import("./seeds-
|
|
12222
|
+
const { secretsStoreFor } = await import("./seeds-C4bZ8L-T.mjs").then((n) => n.An);
|
|
12231
12223
|
const { workspace } = await loadWorkspaceConfig();
|
|
12232
12224
|
const stage = options.stage ?? workspace.stages.local;
|
|
12233
12225
|
const store = await secretsStoreFor(workspace, stage);
|
|
@@ -12236,7 +12228,7 @@ program.command("secrets:reconcile").description("Backfill missing custom secret
|
|
|
12236
12228
|
console.error(`No secrets found for stage "${stage}". Run "gkm secrets:init --stage ${stage}" first.`);
|
|
12237
12229
|
process.exit(1);
|
|
12238
12230
|
}
|
|
12239
|
-
const { derivedContainers } = await import("./seeds-
|
|
12231
|
+
const { derivedContainers } = await import("./seeds-C4bZ8L-T.mjs").then((n) => n.dt);
|
|
12240
12232
|
const result = reconcileMissingSecrets(secrets, workspace, await derivedContainers(workspace, stage));
|
|
12241
12233
|
if (!result) {
|
|
12242
12234
|
console.log(`\n✓ Secrets for stage "${stage}" are up-to-date`);
|
|
@@ -12253,14 +12245,14 @@ program.command("secrets:migrate").description("Copy a deployed stage's secrets
|
|
|
12253
12245
|
try {
|
|
12254
12246
|
const globalOptions = program.opts();
|
|
12255
12247
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12256
|
-
const { secretsMigrateCommand } = await import("./migrate-
|
|
12248
|
+
const { secretsMigrateCommand } = await import("./migrate-DR1x96I4.mjs");
|
|
12257
12249
|
await secretsMigrateCommand(options);
|
|
12258
12250
|
} catch (error) {
|
|
12259
12251
|
exitWithError(error);
|
|
12260
12252
|
}
|
|
12261
12253
|
});
|
|
12262
|
-
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("--
|
|
12263
|
-
const { deployCli } = await import("./cli-
|
|
12254
|
+
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) => {
|
|
12255
|
+
const { deployCli } = await import("./cli-B9BudUV0.mjs");
|
|
12264
12256
|
const globalOptions = program.opts();
|
|
12265
12257
|
const code = await deployCli({
|
|
12266
12258
|
cwd: resolve(globalOptions.cwd ?? process.cwd()),
|
|
@@ -12273,8 +12265,6 @@ program.command("deploy").description("Deploy a stage through its target").optio
|
|
|
12273
12265
|
...options.atomic ? { atomic: true } : {},
|
|
12274
12266
|
...options.allowDevServices ? { allowDevServices: true } : {},
|
|
12275
12267
|
...options.skipDns ? { skipDns: true } : {},
|
|
12276
|
-
...options.resourcesOnly ? { resourcesOnly: true } : {},
|
|
12277
|
-
...options.skipResources ? { skipResources: true } : {},
|
|
12278
12268
|
...options.rotateKeys ? { rotateKeys: true } : {},
|
|
12279
12269
|
...options.retireOldKeys ? { retireOldKeys: true } : {}
|
|
12280
12270
|
});
|
|
@@ -12282,7 +12272,7 @@ program.command("deploy").description("Deploy a stage through its target").optio
|
|
|
12282
12272
|
});
|
|
12283
12273
|
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) => {
|
|
12284
12274
|
try {
|
|
12285
|
-
const { rollbackStage } = await import("./rollback-
|
|
12275
|
+
const { rollbackStage } = await import("./rollback-BkIkE8Qe.mjs").then((n) => n.a);
|
|
12286
12276
|
const { terminalCredentials } = await import("./terminal-iNmAXXjs.mjs");
|
|
12287
12277
|
const globalOptions = program.opts();
|
|
12288
12278
|
await rollbackStage({
|
|
@@ -12316,7 +12306,7 @@ program.command("deploy:github").description("Let GitHub Actions deploy a stage:
|
|
|
12316
12306
|
try {
|
|
12317
12307
|
const globalOptions = program.opts();
|
|
12318
12308
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12319
|
-
const { deployGithubCommand } = await import("./github-
|
|
12309
|
+
const { deployGithubCommand } = await import("./github-RawRLERq.mjs");
|
|
12320
12310
|
await deployGithubCommand(options);
|
|
12321
12311
|
} catch (error) {
|
|
12322
12312
|
exitWithError(error);
|
|
@@ -12326,7 +12316,7 @@ program.command("stages").description("The workspace's stages from gkm.config.ts
|
|
|
12326
12316
|
try {
|
|
12327
12317
|
const globalOptions = program.opts();
|
|
12328
12318
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12329
|
-
const { stagesCommand } = await import("./stages-
|
|
12319
|
+
const { stagesCommand } = await import("./stages-CcS9vnNu.mjs");
|
|
12330
12320
|
await stagesCommand(options);
|
|
12331
12321
|
} catch (error) {
|
|
12332
12322
|
exitWithError(error);
|