@geekmidas/cli 10.0.0-alpha.97 → 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-AqNu60WQ.mjs → GoDaddyProvider-206NguW1.mjs} +2 -2
- package/dist/{GoDaddyProvider-AqNu60WQ.mjs.map → GoDaddyProvider-206NguW1.mjs.map} +1 -1
- package/dist/{GoDaddyProvider-B4R_QFl8.cjs → GoDaddyProvider-D1aQy2i1.cjs} +2 -2
- package/dist/{GoDaddyProvider-B4R_QFl8.cjs.map → GoDaddyProvider-D1aQy2i1.cjs.map} +1 -1
- package/dist/{LegacyStateStore-B-aRqRdD.cjs → LegacyStateStore-CgJEr1G7.cjs} +3 -3
- package/dist/{LegacyStateStore-B-aRqRdD.cjs.map → LegacyStateStore-CgJEr1G7.cjs.map} +1 -1
- package/dist/{LegacyStateStore-8F05-BOo.mjs → LegacyStateStore-wmFfdzuh.mjs} +3 -3
- package/dist/{LegacyStateStore-8F05-BOo.mjs.map → LegacyStateStore-wmFfdzuh.mjs.map} +1 -1
- package/dist/{LocalStateStore-B_bRI8M7.cjs → LocalStateStore-BD14kra9.cjs} +2 -2
- package/dist/{LocalStateStore-B_bRI8M7.cjs.map → LocalStateStore-BD14kra9.cjs.map} +1 -1
- package/dist/{LocalStateStore-B_mfgcO8.mjs → LocalStateStore-C5mNp91D.mjs} +2 -2
- package/dist/{LocalStateStore-B_mfgcO8.mjs.map → LocalStateStore-C5mNp91D.mjs.map} +1 -1
- package/dist/{S3StateStore-CMN0Uzdp.mjs → S3StateStore-CEGbsDHi.mjs} +10 -9
- package/dist/S3StateStore-CEGbsDHi.mjs.map +1 -0
- package/dist/{S3StateStore-zK9zcd9f.cjs → S3StateStore-Csu_kJCy.cjs} +11 -10
- package/dist/S3StateStore-Csu_kJCy.cjs.map +1 -0
- package/dist/{SSMStateStore-Cv7VcMak.mjs → SSMStateStore-Bd62qwp4.mjs} +2 -2
- package/dist/{SSMStateStore-Cv7VcMak.mjs.map → SSMStateStore-Bd62qwp4.mjs.map} +1 -1
- package/dist/{SSMStateStore-C489DnR6.cjs → SSMStateStore-Rp21jtP5.cjs} +2 -2
- package/dist/{SSMStateStore-C489DnR6.cjs.map → SSMStateStore-Rp21jtP5.cjs.map} +1 -1
- package/dist/{add-BA5d4pA0.mjs → add-DyIEYI97.mjs} +4 -4
- package/dist/{add-BA5d4pA0.mjs.map → add-DyIEYI97.mjs.map} +1 -1
- package/dist/{add-HXzTCy_I.cjs → add-Iuo3ao5E.cjs} +5 -5
- package/dist/{add-HXzTCy_I.cjs.map → add-Iuo3ao5E.cjs.map} +1 -1
- package/dist/{aws-Dz2bYxK1.mjs → aws-8QQ8n-t6.mjs} +2 -2
- package/dist/{aws-Dz2bYxK1.mjs.map → aws-8QQ8n-t6.mjs.map} +1 -1
- package/dist/{aws-BTReGjpY.cjs → aws-DY9NqQIT.cjs} +2 -2
- package/dist/{aws-BTReGjpY.cjs.map → aws-DY9NqQIT.cjs.map} +1 -1
- package/dist/{awsStore-BWa1KNY-.mjs → awsStore-Bx5nCFnS.mjs} +8 -6
- package/dist/awsStore-Bx5nCFnS.mjs.map +1 -0
- package/dist/{awsStore-B5We7bMg.cjs → awsStore-u3ehhMoY.cjs} +8 -6
- package/dist/awsStore-u3ehhMoY.cjs.map +1 -0
- package/dist/{bundler-SX3Uy8qT.cjs → bundler-Bgoq8IyR.cjs} +5 -5
- package/dist/{bundler-SX3Uy8qT.cjs.map → bundler-Bgoq8IyR.cjs.map} +1 -1
- package/dist/{bundler-CBomFsnd.mjs → bundler-Q6Kp8b0r.mjs} +5 -5
- package/dist/{bundler-CBomFsnd.mjs.map → bundler-Q6Kp8b0r.mjs.map} +1 -1
- package/dist/{cli-D7z1lQtO.mjs → cli-B9BudUV0.mjs} +2 -4
- package/dist/cli-B9BudUV0.mjs.map +1 -0
- package/dist/{cli-1l0L9LCA.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-xIWIaDhW.d.cts → config-BVdHfj8b.d.cts} +4 -4
- package/dist/{config-D-k0gaAr.d.mts.map → config-BVdHfj8b.d.cts.map} +1 -1
- package/dist/{config-D-k0gaAr.d.mts → config-D2OqCmAM.d.mts} +4 -4
- package/dist/{config-xIWIaDhW.d.cts.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-Cu_HyWoJ.cjs → deploy-CbJMJsgX.cjs} +26 -62
- package/dist/deploy-CbJMJsgX.cjs.map +1 -0
- package/dist/{deploy-LY-20Yeb.mjs → deploy-n_IB8r6H.mjs} +17 -59
- package/dist/deploy-n_IB8r6H.mjs.map +1 -0
- package/dist/{discover-CbJCQq4J.d.mts → discover-Caf6Hnv1.d.cts} +2 -2
- package/dist/{discover-CbJCQq4J.d.mts.map → discover-Caf6Hnv1.d.cts.map} +1 -1
- package/dist/{discover-RCW5mBXb.d.cts → discover-Cd5M2jPv.d.mts} +2 -2
- package/dist/{discover-RCW5mBXb.d.cts.map → discover-Cd5M2jPv.d.mts.map} +1 -1
- package/dist/{dns-BbTOzmVp.mjs → dns-C_LPS3qV.mjs} +3 -3
- package/dist/{dns-BbTOzmVp.mjs.map → dns-C_LPS3qV.mjs.map} +1 -1
- package/dist/{dns-BFnoawgh.cjs → dns-kp8To8Qj.cjs} +3 -3
- package/dist/{dns-BFnoawgh.cjs.map → dns-kp8To8Qj.cjs.map} +1 -1
- package/dist/{dokploy-LR94sBVI.mjs → dokploy-Dl_kNVeE.mjs} +2 -2
- package/dist/{dokploy-LR94sBVI.mjs.map → dokploy-Dl_kNVeE.mjs.map} +1 -1
- package/dist/{dokploy-CKgSww82.cjs → dokploy-gRIae9Ht.cjs} +2 -2
- package/dist/{dokploy-CKgSww82.cjs.map → dokploy-gRIae9Ht.cjs.map} +1 -1
- package/dist/{encryption-C0plOf4a.mjs → encryption-C3DcVZQs.mjs} +3 -3
- package/dist/{encryption-C0plOf4a.mjs.map → encryption-C3DcVZQs.mjs.map} +1 -1
- package/dist/{encryption-CUyw-8sc.cjs → encryption-CmQvQOSe.cjs} +3 -3
- package/dist/{encryption-CUyw-8sc.cjs.map → encryption-CmQvQOSe.cjs.map} +1 -1
- package/dist/{engine-DqbqQhck.mjs → engine-DBXuhHyf.mjs} +5 -4
- package/dist/{engine-DqbqQhck.mjs.map → engine-DBXuhHyf.mjs.map} +1 -1
- package/dist/{engine-D8TeraDK.cjs → engine-Dk19Mxc4.cjs} +27 -26
- package/dist/{engine-D8TeraDK.cjs.map → engine-Dk19Mxc4.cjs.map} +1 -1
- package/dist/{github-DC4SIqV1.cjs → github-Ds2RYnSU.cjs} +43 -20
- package/dist/github-Ds2RYnSU.cjs.map +1 -0
- package/dist/{github-zgaBOQvh.mjs → github-RawRLERq.mjs} +42 -19
- package/dist/github-RawRLERq.mjs.map +1 -0
- 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-ClqOsbBl.d.mts → index-BU4G20G6.d.cts} +2 -2
- package/dist/{index-ClqOsbBl.d.mts.map → index-BU4G20G6.d.cts.map} +1 -1
- package/dist/{index-DgOBAEl5.d.cts → index-yDbd1WcM.d.mts} +2 -2
- package/dist/{index-DgOBAEl5.d.cts.map → index-yDbd1WcM.d.mts.map} +1 -1
- package/dist/index.cjs +156 -151
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +153 -148
- package/dist/index.mjs.map +1 -1
- package/dist/{migrate-BJ8aLOWk.mjs → migrate-CZIGT3kB.mjs} +3 -3
- package/dist/{migrate-BJ8aLOWk.mjs.map → migrate-CZIGT3kB.mjs.map} +1 -1
- package/dist/migrate-CxZYzF_u.cjs +181 -0
- package/dist/migrate-CxZYzF_u.cjs.map +1 -0
- package/dist/migrate-DR1x96I4.mjs +181 -0
- package/dist/migrate-DR1x96I4.mjs.map +1 -0
- package/dist/{migrate-CWq8-s21.cjs → migrate-DjrTwWJA.cjs} +3 -3
- package/dist/{migrate-CWq8-s21.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-BFp-SFee.mjs → projectBucket-BYOxRnHY.mjs} +2 -2
- package/dist/{projectBucket-BFp-SFee.mjs.map → projectBucket-BYOxRnHY.mjs.map} +1 -1
- package/dist/{projectBucket-Cho9DpSh.cjs → projectBucket-CDu5rXjp.cjs} +2 -2
- package/dist/{projectBucket-Cho9DpSh.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-6EYNqYdr.mjs → resolve-CNYbGH8g.mjs} +3 -3
- package/dist/{resolve-6EYNqYdr.mjs.map → resolve-CNYbGH8g.mjs.map} +1 -1
- package/dist/{resolve-C8VkR4oW.cjs → resolve-DC98Rl1t.cjs} +3 -3
- package/dist/{resolve-C8VkR4oW.cjs.map → resolve-DC98Rl1t.cjs.map} +1 -1
- package/dist/{rollback-BsThTeSN.mjs → rollback-BkIkE8Qe.mjs} +5 -5
- package/dist/{rollback-BsThTeSN.mjs.map → rollback-BkIkE8Qe.mjs.map} +1 -1
- package/dist/{rollback-CvGfm4DX.cjs → rollback-DBfLvC8k.cjs} +5 -5
- package/dist/{rollback-CvGfm4DX.cjs.map → rollback-DBfLvC8k.cjs.map} +1 -1
- package/dist/{runtime-CaW4QqF2.d.cts → runtime-CLz3bf07.d.mts} +2 -2
- package/dist/{runtime-CaW4QqF2.d.cts.map → runtime-CLz3bf07.d.mts.map} +1 -1
- package/dist/{runtime-K5uxp6HE.d.mts → runtime-CUWf0IUk.d.cts} +2 -2
- package/dist/{runtime-K5uxp6HE.d.mts.map → runtime-CUWf0IUk.d.cts.map} +1 -1
- package/dist/s3-BwhQk3QM.mjs +215 -0
- package/dist/s3-BwhQk3QM.mjs.map +1 -0
- package/dist/s3-DLp0V-Ox.cjs +215 -0
- package/dist/s3-DLp0V-Ox.cjs.map +1 -0
- package/dist/{sandbox-D8cfZUAA.d.cts → sandbox-CfpLWTPP.d.mts} +2 -2
- package/dist/{sandbox-B_BkfmTP.d.mts.map → sandbox-CfpLWTPP.d.mts.map} +1 -1
- package/dist/{sandbox-B_BkfmTP.d.mts → sandbox-D1XeNEJ9.d.cts} +2 -2
- package/dist/{sandbox-D8cfZUAA.d.cts.map → sandbox-D1XeNEJ9.d.cts.map} +1 -1
- package/dist/{secretsManager-C6wm-9uZ.mjs → secretsManager-CQORubp9.mjs} +2 -2
- package/dist/{secretsManager-C6wm-9uZ.mjs.map → secretsManager-CQORubp9.mjs.map} +1 -1
- package/dist/{secretsManager-Cwwgs81g.cjs → secretsManager-RAGcEDX1.cjs} +2 -2
- package/dist/{secretsManager-Cwwgs81g.cjs.map → secretsManager-RAGcEDX1.cjs.map} +1 -1
- package/dist/{seeds-BQlj9Fsg.cjs → seeds-BNHSpjNP.cjs} +22 -166
- package/dist/seeds-BNHSpjNP.cjs.map +1 -0
- package/dist/{seeds-BsJRUL1K.mjs → seeds-C4bZ8L-T.mjs} +23 -119
- package/dist/seeds-C4bZ8L-T.mjs.map +1 -0
- package/dist/{sniffer-DVsvP8s-.mjs → sniffer-BIBm9dAb.mjs} +7 -7
- package/dist/{sniffer-DVsvP8s-.mjs.map → sniffer-BIBm9dAb.mjs.map} +1 -1
- package/dist/{sniffer-CeUKUoHn.cjs → sniffer-Cylp9W2D.cjs} +7 -7
- package/dist/{sniffer-CeUKUoHn.cjs.map → sniffer-Cylp9W2D.cjs.map} +1 -1
- package/dist/{stages-DEmn7qI8.mjs → stages-CcS9vnNu.mjs} +5 -18
- package/dist/stages-CcS9vnNu.mjs.map +1 -0
- package/dist/{stages-BpDXFPGg.cjs → stages-DdBV7msu.cjs} +5 -18
- 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-4vPS_YFX.d.cts → types-BhThob0H.d.mts} +90 -21
- package/dist/types-BhThob0H.d.mts.map +1 -0
- package/dist/{types-CFsEyFb1.d.mts → types-DwoLHelT.d.cts} +91 -20
- 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-Bv4xROeu.mjs → workspace-D5CpOp1y.mjs} +77 -5
- package/dist/workspace-D5CpOp1y.mjs.map +1 -0
- package/dist/{workspace-C1M-S4al.cjs → workspace-DRjdu1OY.cjs} +88 -4
- package/dist/workspace-DRjdu1OY.cjs.map +1 -0
- package/package.json +15 -15
- package/dist/S3StateStore-CMN0Uzdp.mjs.map +0 -1
- package/dist/S3StateStore-zK9zcd9f.cjs.map +0 -1
- package/dist/awsStore-B5We7bMg.cjs.map +0 -1
- package/dist/awsStore-BWa1KNY-.mjs.map +0 -1
- package/dist/cli-1l0L9LCA.cjs.map +0 -1
- package/dist/cli-D7z1lQtO.mjs.map +0 -1
- package/dist/compose-C39XupJu.cjs +0 -1558
- package/dist/compose-C39XupJu.cjs.map +0 -1
- package/dist/compose-DgWrNd2k.mjs +0 -1511
- package/dist/compose-DgWrNd2k.mjs.map +0 -1
- package/dist/deploy-Cu_HyWoJ.cjs.map +0 -1
- package/dist/deploy-LY-20Yeb.mjs.map +0 -1
- package/dist/dns-Bmbhmz41.mjs +0 -44
- package/dist/dns-Bmbhmz41.mjs.map +0 -1
- package/dist/dns-Dro_vbk9.cjs +0 -55
- package/dist/dns-Dro_vbk9.cjs.map +0 -1
- package/dist/github-DC4SIqV1.cjs.map +0 -1
- package/dist/github-zgaBOQvh.mjs.map +0 -1
- package/dist/migrate-C230QeXU.mjs +0 -94
- package/dist/migrate-C230QeXU.mjs.map +0 -1
- package/dist/migrate-CsMrI7Dk.cjs +0 -94
- package/dist/migrate-CsMrI7Dk.cjs.map +0 -1
- package/dist/secrets-BTY6JhTp.cjs +0 -47
- package/dist/secrets-BTY6JhTp.cjs.map +0 -1
- package/dist/secrets-HzKNTWg9.mjs +0 -36
- package/dist/secrets-HzKNTWg9.mjs.map +0 -1
- package/dist/seeds-BQlj9Fsg.cjs.map +0 -1
- package/dist/seeds-BsJRUL1K.mjs.map +0 -1
- package/dist/stack-BQOyqaVG.mjs +0 -1201
- package/dist/stack-BQOyqaVG.mjs.map +0 -1
- package/dist/stack-Clzi40EE.cjs +0 -1308
- package/dist/stack-Clzi40EE.cjs.map +0 -1
- package/dist/stages-BpDXFPGg.cjs.map +0 -1
- package/dist/stages-DEmn7qI8.mjs.map +0 -1
- package/dist/types-4vPS_YFX.d.cts.map +0 -1
- package/dist/types-CFsEyFb1.d.mts.map +0 -1
- package/dist/workspace-Bv4xROeu.mjs.map +0 -1
- package/dist/workspace-C1M-S4al.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-B_mfgcO8.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);
|
|
@@ -6185,7 +6187,7 @@ ${pm.setup}
|
|
|
6185
6187
|
|
|
6186
6188
|
${registryLogin(registry)}
|
|
6187
6189
|
# A site's public URLs are built into it, so the build reads the stage's
|
|
6188
|
-
# secrets store. With secrets.store on SSM or Secrets Manager the job
|
|
6190
|
+
# secrets store. With secrets.store on S3, SSM or Secrets Manager the job
|
|
6189
6191
|
# assumes the stage's role (AWS_ROLE_ARN, set by gkm deploy:github);
|
|
6190
6192
|
# with the default 'file' store there is no role to assume.
|
|
6191
6193
|
- name: Assume the stage's AWS role
|
|
@@ -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
|
/**
|
|
@@ -7805,7 +7786,7 @@ ${deployBlock(options)}
|
|
|
7805
7786
|
${workspaceConstructsGlobs(options.routesStructure, dirname(options.apiPath)).map((glob) => ` '${glob}',`).join("\n")}
|
|
7806
7787
|
],
|
|
7807
7788
|
|
|
7808
|
-
secrets: {
|
|
7789
|
+
${stateBlock(options)} secrets: {
|
|
7809
7790
|
enabled: true,${secretsStore(options)}
|
|
7810
7791
|
},
|
|
7811
7792
|
});
|
|
@@ -7816,13 +7797,24 @@ ${workspaceConstructsGlobs(options.routesStructure, dirname(options.apiPath)).ma
|
|
|
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
|
|
@@ -7831,17 +7823,32 @@ function deployBlock(options) {
|
|
|
7831
7823
|
`;
|
|
7832
7824
|
}
|
|
7833
7825
|
/**
|
|
7834
|
-
* Where a deployed stage's
|
|
7835
|
-
*
|
|
7836
|
-
*
|
|
7826
|
+
* Where a deployed stage's deploy state lives: on AWS, the project bucket —
|
|
7827
|
+
* one bucket per project and account, created by the first deploy — which
|
|
7828
|
+
* the stage's secrets share.
|
|
7829
|
+
*/
|
|
7830
|
+
function stateBlock(options) {
|
|
7831
|
+
if (options.deployTarget !== "sst" || !options.region) return "";
|
|
7832
|
+
return ` // Deploy state, secrets and backups share one bucket per project and
|
|
7833
|
+
// account, gkm-<project>-<account id>, created by the first deploy:
|
|
7834
|
+
// versioned, encrypted, never public.
|
|
7835
|
+
state: { provider: 's3', region: '${options.region}' },
|
|
7836
|
+
|
|
7837
|
+
`;
|
|
7838
|
+
}
|
|
7839
|
+
/**
|
|
7840
|
+
* Where a deployed stage's secrets live. On AWS that is the project bucket,
|
|
7841
|
+
* beside the deploy state, in the stage's own account, which the deploy job
|
|
7842
|
+
* reaches with the role it already assumed; a server target keeps the
|
|
7843
|
+
* encrypted local file, the default.
|
|
7837
7844
|
*/
|
|
7838
7845
|
function secretsStore(options) {
|
|
7839
7846
|
if (options.deployTarget !== "sst" || !options.region) return "";
|
|
7840
7847
|
return `
|
|
7841
|
-
// Deployed stages keep their secrets in
|
|
7842
|
-
//
|
|
7843
|
-
//
|
|
7844
|
-
store: { provider: '
|
|
7848
|
+
// Deployed stages keep their secrets in the project bucket, beside the
|
|
7849
|
+
// state, in the account each stage deploys to:
|
|
7850
|
+
// \`gkm secrets:set <KEY> '…' --stage <stage>\` writes there.
|
|
7851
|
+
store: { provider: 's3' },`;
|
|
7845
7852
|
}
|
|
7846
7853
|
/**
|
|
7847
7854
|
* The workspace's constructs, at its root rather than inside an app.
|
|
@@ -10824,8 +10831,8 @@ function printNextSteps(projectName, options, pkgManager) {
|
|
|
10824
10831
|
if (options.deployTarget === "compose") {
|
|
10825
10832
|
console.log("🚀 Deployment (Docker Compose, on your server):");
|
|
10826
10833
|
console.log(` Images are pushed to ${options.registry}; .github/workflows/deploy.yml builds them`);
|
|
10827
|
-
console.log(" and
|
|
10828
|
-
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.");
|
|
10829
10836
|
console.log("");
|
|
10830
10837
|
}
|
|
10831
10838
|
if (options.deployTarget === "sst") {
|
|
@@ -11591,7 +11598,7 @@ function testDatabases(reconciled) {
|
|
|
11591
11598
|
* starts without the reference data the app needs.
|
|
11592
11599
|
*/
|
|
11593
11600
|
async function migrateTestStage(workspace, env) {
|
|
11594
|
-
const { migrateAndSeed } = await import("./migrate-
|
|
11601
|
+
const { migrateAndSeed } = await import("./migrate-CZIGT3kB.mjs");
|
|
11595
11602
|
const { discover } = await import("./discover-qjFapetL.mjs").then((n) => n.i);
|
|
11596
11603
|
const sources = {};
|
|
11597
11604
|
const manifest = await discover({
|
|
@@ -12027,7 +12034,7 @@ program.command("migrate").description("Apply each database construct's migratio
|
|
|
12027
12034
|
try {
|
|
12028
12035
|
const globalOptions = program.opts();
|
|
12029
12036
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12030
|
-
const { migrateCommand } = await import("./migrate-
|
|
12037
|
+
const { migrateCommand } = await import("./migrate-CZIGT3kB.mjs");
|
|
12031
12038
|
await migrateCommand({
|
|
12032
12039
|
...options,
|
|
12033
12040
|
...construct ? { construct } : {}
|
|
@@ -12040,7 +12047,7 @@ program.command("seed").description("Migrate, then run each database construct's
|
|
|
12040
12047
|
try {
|
|
12041
12048
|
const globalOptions = program.opts();
|
|
12042
12049
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12043
|
-
const { seedCommand } = await import("./migrate-
|
|
12050
|
+
const { seedCommand } = await import("./migrate-CZIGT3kB.mjs");
|
|
12044
12051
|
await seedCommand({
|
|
12045
12052
|
...options,
|
|
12046
12053
|
...construct ? { construct } : {}
|
|
@@ -12053,7 +12060,7 @@ program.command("migration").description("Write a construct's next migration: an
|
|
|
12053
12060
|
try {
|
|
12054
12061
|
const globalOptions = program.opts();
|
|
12055
12062
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12056
|
-
const { migrationCommand } = await import("./migrate-
|
|
12063
|
+
const { migrationCommand } = await import("./migrate-CZIGT3kB.mjs");
|
|
12057
12064
|
await migrationCommand({
|
|
12058
12065
|
construct,
|
|
12059
12066
|
...name ? { name } : {}
|
|
@@ -12099,7 +12106,7 @@ program.command("docker").description("Generate Docker deployment files").option
|
|
|
12099
12106
|
exitWithError(error);
|
|
12100
12107
|
}
|
|
12101
12108
|
});
|
|
12102
|
-
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) => {
|
|
12103
12110
|
try {
|
|
12104
12111
|
const globalOptions = program.opts();
|
|
12105
12112
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
@@ -12153,7 +12160,7 @@ program.command("secrets:add").description("Build the keys a stage must be given
|
|
|
12153
12160
|
try {
|
|
12154
12161
|
const globalOptions = program.opts();
|
|
12155
12162
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12156
|
-
const { secretsAddCommand } = await import("./add-
|
|
12163
|
+
const { secretsAddCommand } = await import("./add-DyIEYI97.mjs");
|
|
12157
12164
|
await secretsAddCommand(options);
|
|
12158
12165
|
} catch (error) {
|
|
12159
12166
|
exitWithError(error);
|
|
@@ -12163,7 +12170,7 @@ program.command("encryption:rotate").description("Add a new current key to an En
|
|
|
12163
12170
|
try {
|
|
12164
12171
|
const globalOptions = program.opts();
|
|
12165
12172
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12166
|
-
const { encryptionRotateCommand } = await import("./encryption-
|
|
12173
|
+
const { encryptionRotateCommand } = await import("./encryption-C3DcVZQs.mjs");
|
|
12167
12174
|
await encryptionRotateCommand(construct, options);
|
|
12168
12175
|
} catch (error) {
|
|
12169
12176
|
exitWithError(error);
|
|
@@ -12173,7 +12180,7 @@ program.command("encryption:retire").description("Remove an old key from an Encr
|
|
|
12173
12180
|
try {
|
|
12174
12181
|
const globalOptions = program.opts();
|
|
12175
12182
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12176
|
-
const { encryptionRetireCommand } = await import("./encryption-
|
|
12183
|
+
const { encryptionRetireCommand } = await import("./encryption-C3DcVZQs.mjs");
|
|
12177
12184
|
await encryptionRetireCommand(construct, key, options);
|
|
12178
12185
|
} catch (error) {
|
|
12179
12186
|
exitWithError(error);
|
|
@@ -12212,7 +12219,7 @@ program.command("secrets:reconcile").description("Backfill missing custom secret
|
|
|
12212
12219
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12213
12220
|
const { loadWorkspaceConfig } = await import("./config.mjs");
|
|
12214
12221
|
const { reconcileMissingSecrets } = await import("./reconcile--I7V4Klj.mjs");
|
|
12215
|
-
const { secretsStoreFor } = await import("./seeds-
|
|
12222
|
+
const { secretsStoreFor } = await import("./seeds-C4bZ8L-T.mjs").then((n) => n.An);
|
|
12216
12223
|
const { workspace } = await loadWorkspaceConfig();
|
|
12217
12224
|
const stage = options.stage ?? workspace.stages.local;
|
|
12218
12225
|
const store = await secretsStoreFor(workspace, stage);
|
|
@@ -12221,7 +12228,7 @@ program.command("secrets:reconcile").description("Backfill missing custom secret
|
|
|
12221
12228
|
console.error(`No secrets found for stage "${stage}". Run "gkm secrets:init --stage ${stage}" first.`);
|
|
12222
12229
|
process.exit(1);
|
|
12223
12230
|
}
|
|
12224
|
-
const { derivedContainers } = await import("./seeds-
|
|
12231
|
+
const { derivedContainers } = await import("./seeds-C4bZ8L-T.mjs").then((n) => n.dt);
|
|
12225
12232
|
const result = reconcileMissingSecrets(secrets, workspace, await derivedContainers(workspace, stage));
|
|
12226
12233
|
if (!result) {
|
|
12227
12234
|
console.log(`\n✓ Secrets for stage "${stage}" are up-to-date`);
|
|
@@ -12234,18 +12241,18 @@ program.command("secrets:reconcile").description("Backfill missing custom secret
|
|
|
12234
12241
|
exitWithError(error);
|
|
12235
12242
|
}
|
|
12236
12243
|
});
|
|
12237
|
-
program.command("secrets:migrate").description("Copy a deployed stage's secrets from the configured store to another (
|
|
12244
|
+
program.command("secrets:migrate").description("Copy a deployed stage's secrets from the configured store to another (s3, ssm, secrets-manager, file), verify the copy, and print how to delete the source").requiredOption("--stage <stage>", "A deployed stage").requiredOption("--to <provider>", "s3, ssm, secrets-manager or file").option("--region <region>", "The target's AWS region (default: the S3 state's for s3, else the configured store's)").option("--profile <profile>", "AWS profile for the stage's account").option("--force", "Replace different secrets the target already holds").action(async (options) => {
|
|
12238
12245
|
try {
|
|
12239
12246
|
const globalOptions = program.opts();
|
|
12240
12247
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12241
|
-
const { secretsMigrateCommand } = await import("./migrate-
|
|
12248
|
+
const { secretsMigrateCommand } = await import("./migrate-DR1x96I4.mjs");
|
|
12242
12249
|
await secretsMigrateCommand(options);
|
|
12243
12250
|
} catch (error) {
|
|
12244
12251
|
exitWithError(error);
|
|
12245
12252
|
}
|
|
12246
12253
|
});
|
|
12247
|
-
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("--
|
|
12248
|
-
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");
|
|
12249
12256
|
const globalOptions = program.opts();
|
|
12250
12257
|
const code = await deployCli({
|
|
12251
12258
|
cwd: resolve(globalOptions.cwd ?? process.cwd()),
|
|
@@ -12258,8 +12265,6 @@ program.command("deploy").description("Deploy a stage through its target").optio
|
|
|
12258
12265
|
...options.atomic ? { atomic: true } : {},
|
|
12259
12266
|
...options.allowDevServices ? { allowDevServices: true } : {},
|
|
12260
12267
|
...options.skipDns ? { skipDns: true } : {},
|
|
12261
|
-
...options.resourcesOnly ? { resourcesOnly: true } : {},
|
|
12262
|
-
...options.skipResources ? { skipResources: true } : {},
|
|
12263
12268
|
...options.rotateKeys ? { rotateKeys: true } : {},
|
|
12264
12269
|
...options.retireOldKeys ? { retireOldKeys: true } : {}
|
|
12265
12270
|
});
|
|
@@ -12267,7 +12272,7 @@ program.command("deploy").description("Deploy a stage through its target").optio
|
|
|
12267
12272
|
});
|
|
12268
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) => {
|
|
12269
12274
|
try {
|
|
12270
|
-
const { rollbackStage } = await import("./rollback-
|
|
12275
|
+
const { rollbackStage } = await import("./rollback-BkIkE8Qe.mjs").then((n) => n.a);
|
|
12271
12276
|
const { terminalCredentials } = await import("./terminal-iNmAXXjs.mjs");
|
|
12272
12277
|
const globalOptions = program.opts();
|
|
12273
12278
|
await rollbackStage({
|
|
@@ -12301,7 +12306,7 @@ program.command("deploy:github").description("Let GitHub Actions deploy a stage:
|
|
|
12301
12306
|
try {
|
|
12302
12307
|
const globalOptions = program.opts();
|
|
12303
12308
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12304
|
-
const { deployGithubCommand } = await import("./github-
|
|
12309
|
+
const { deployGithubCommand } = await import("./github-RawRLERq.mjs");
|
|
12305
12310
|
await deployGithubCommand(options);
|
|
12306
12311
|
} catch (error) {
|
|
12307
12312
|
exitWithError(error);
|
|
@@ -12311,7 +12316,7 @@ program.command("stages").description("The workspace's stages from gkm.config.ts
|
|
|
12311
12316
|
try {
|
|
12312
12317
|
const globalOptions = program.opts();
|
|
12313
12318
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12314
|
-
const { stagesCommand } = await import("./stages-
|
|
12319
|
+
const { stagesCommand } = await import("./stages-CcS9vnNu.mjs");
|
|
12315
12320
|
await stagesCommand(options);
|
|
12316
12321
|
} catch (error) {
|
|
12317
12322
|
exitWithError(error);
|