@geekmidas/cli 10.0.0-alpha.92 → 10.0.0-alpha.93
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-CJwg2r_9.cjs → GoDaddyProvider-BZb-V14e.cjs} +2 -2
- package/dist/{GoDaddyProvider-CJwg2r_9.cjs.map → GoDaddyProvider-BZb-V14e.cjs.map} +1 -1
- package/dist/{GoDaddyProvider-BqYGk9XT.mjs → GoDaddyProvider-Mi3vptSR.mjs} +2 -2
- package/dist/{GoDaddyProvider-BqYGk9XT.mjs.map → GoDaddyProvider-Mi3vptSR.mjs.map} +1 -1
- package/dist/{LegacyStateStore-CeEwayMB.cjs → LegacyStateStore-BlYXQQSE.cjs} +44 -10
- package/dist/LegacyStateStore-BlYXQQSE.cjs.map +1 -0
- package/dist/LegacyStateStore-CtwO7fwy.mjs +123 -0
- package/dist/LegacyStateStore-CtwO7fwy.mjs.map +1 -0
- package/dist/{LocalStateStore-Y8XHdoCR.mjs → LocalStateStore-D40_SDmJ.mjs} +2 -2
- package/dist/{LocalStateStore-Y8XHdoCR.mjs.map → LocalStateStore-D40_SDmJ.mjs.map} +1 -1
- package/dist/{LocalStateStore-BMfseje2.cjs → LocalStateStore-oX_zxj9V.cjs} +2 -2
- package/dist/{LocalStateStore-BMfseje2.cjs.map → LocalStateStore-oX_zxj9V.cjs.map} +1 -1
- package/dist/{S3StateStore-BfoY4MvD.mjs → S3StateStore-BzS0IeSt.mjs} +2 -2
- package/dist/{S3StateStore-BfoY4MvD.mjs.map → S3StateStore-BzS0IeSt.mjs.map} +1 -1
- package/dist/{S3StateStore-BmMt2HhW.cjs → S3StateStore-DeI7jtvi.cjs} +2 -2
- package/dist/{S3StateStore-BmMt2HhW.cjs.map → S3StateStore-DeI7jtvi.cjs.map} +1 -1
- package/dist/{SSMStateStore-D9K62wM4.cjs → SSMStateStore-CaCtrzFL.cjs} +2 -2
- package/dist/{SSMStateStore-D9K62wM4.cjs.map → SSMStateStore-CaCtrzFL.cjs.map} +1 -1
- package/dist/{SSMStateStore-Bdyw_0Jj.mjs → SSMStateStore-k_Ew7TWx.mjs} +2 -2
- package/dist/{SSMStateStore-Bdyw_0Jj.mjs.map → SSMStateStore-k_Ew7TWx.mjs.map} +1 -1
- package/dist/{add-2Opn2VVE.mjs → add-CP1podDH.mjs} +2 -3
- package/dist/{add-2Opn2VVE.mjs.map → add-CP1podDH.mjs.map} +1 -1
- package/dist/{add-oN0b18HN.cjs → add-VcyJnsPX.cjs} +3 -4
- package/dist/{add-oN0b18HN.cjs.map → add-VcyJnsPX.cjs.map} +1 -1
- package/dist/{bundler-C-AdesaG.mjs → bundler-BWrh-AJH.mjs} +3 -3
- package/dist/{bundler-C-AdesaG.mjs.map → bundler-BWrh-AJH.mjs.map} +1 -1
- package/dist/{bundler-CXQDrhzN.cjs → bundler-Dfsr6KXU.cjs} +3 -3
- package/dist/{bundler-CXQDrhzN.cjs.map → bundler-Dfsr6KXU.cjs.map} +1 -1
- package/dist/{cli-BjhaVObS.mjs → cli-B8otnZfX.mjs} +4 -4
- package/dist/{cli-BjhaVObS.mjs.map → cli-B8otnZfX.mjs.map} +1 -1
- package/dist/{cli-BRZFYvdb.cjs → cli-DL19w4OE.cjs} +2 -2
- package/dist/{cli-BRZFYvdb.cjs.map → cli-DL19w4OE.cjs.map} +1 -1
- package/dist/compose-BHVKLluX.cjs +1523 -0
- package/dist/compose-BHVKLluX.cjs.map +1 -0
- package/dist/compose-DrEB_4F-.mjs +1476 -0
- package/dist/compose-DrEB_4F-.mjs.map +1 -0
- package/dist/{config-BJo8Wggp.d.mts → config-CHX5GOo3.d.mts} +4 -4
- package/dist/{config-BJo8Wggp.d.mts.map → config-CHX5GOo3.d.mts.map} +1 -1
- package/dist/{config-C9zx7KsX.d.cts → config-DCCcrOSo.d.cts} +4 -4
- package/dist/{config-C9zx7KsX.d.cts.map → config-DCCcrOSo.d.cts.map} +1 -1
- package/dist/config.d.cts +3 -3
- package/dist/config.d.mts +3 -3
- package/dist/deploy/public.cjs +6 -5
- package/dist/deploy/public.d.cts +6 -6
- package/dist/deploy/public.d.cts.map +1 -1
- package/dist/deploy/public.d.mts +6 -6
- package/dist/deploy/public.d.mts.map +1 -1
- package/dist/deploy/public.mjs +6 -6
- package/dist/{deploy-6ToUHJmM.cjs → deploy-C3Mhnmus.cjs} +4 -3
- package/dist/deploy-C3Mhnmus.cjs.map +1 -0
- package/dist/{deploy-yuJHlkY0.mjs → deploy-DYIyIUYd.mjs} +4 -3
- package/dist/deploy-DYIyIUYd.mjs.map +1 -0
- package/dist/{discover-CRMhvHG9.d.cts → discover-DqwlBVyY.d.mts} +2 -2
- package/dist/{discover-CRMhvHG9.d.cts.map → discover-DqwlBVyY.d.mts.map} +1 -1
- package/dist/{discover-G76EQ4vY.d.mts → discover-vk2r5giK.d.cts} +2 -2
- package/dist/{discover-G76EQ4vY.d.mts.map → discover-vk2r5giK.d.cts.map} +1 -1
- package/dist/{dokploy-BvbJ_A4Q.mjs → dokploy-o4I6vb9W.mjs} +2 -2
- package/dist/{dokploy-BvbJ_A4Q.mjs.map → dokploy-o4I6vb9W.mjs.map} +1 -1
- package/dist/{dokploy-Bvvfj2qe.cjs → dokploy-rivb1RFt.cjs} +2 -2
- package/dist/{dokploy-Bvvfj2qe.cjs.map → dokploy-rivb1RFt.cjs.map} +1 -1
- package/dist/{encryption-C9Jm9dfn.mjs → encryption-B6ilrT7p.mjs} +2 -2
- package/dist/{encryption-C9Jm9dfn.mjs.map → encryption-B6ilrT7p.mjs.map} +1 -1
- package/dist/{encryption-CgW167LO.cjs → encryption-D7zmwzWz.cjs} +2 -2
- package/dist/{encryption-CgW167LO.cjs.map → encryption-D7zmwzWz.cjs.map} +1 -1
- package/dist/{engine-Dj7ZKO8H.cjs → engine-Cfx8fEZU.cjs} +6 -5
- package/dist/engine-Cfx8fEZU.cjs.map +1 -0
- package/dist/{engine-C8Ye9MUm.mjs → engine-DjEcovm-.mjs} +6 -5
- package/dist/engine-DjEcovm-.mjs.map +1 -0
- package/dist/{github-B1k42hIt.mjs → github-CzBbs43W.mjs} +2 -2
- package/dist/{github-B1k42hIt.mjs.map → github-CzBbs43W.mjs.map} +1 -1
- package/dist/{github-BD051KZZ.cjs → github-zneTMvnO.cjs} +2 -2
- package/dist/{github-BD051KZZ.cjs.map → github-zneTMvnO.cjs.map} +1 -1
- package/dist/{index-D1pHwqkK.d.mts → index-BiYU7cUl.d.mts} +2 -2
- package/dist/{index-B5uuwx-Y.d.cts.map → index-BiYU7cUl.d.mts.map} +1 -1
- package/dist/{index-B5uuwx-Y.d.cts → index-Dm6V9bwh.d.cts} +2 -2
- package/dist/{index-D1pHwqkK.d.mts.map → index-Dm6V9bwh.d.cts.map} +1 -1
- package/dist/index.cjs +143 -184
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +141 -181
- package/dist/index.mjs.map +1 -1
- package/dist/{migrate-IZsYyZ5F.mjs → migrate-BaC4w0sb.mjs} +2 -2
- package/dist/{migrate-IZsYyZ5F.mjs.map → migrate-BaC4w0sb.mjs.map} +1 -1
- package/dist/{migrate-D3VVsiHp.cjs → migrate-C8wTpakT.cjs} +2 -2
- package/dist/{migrate-D3VVsiHp.cjs.map → migrate-C8wTpakT.cjs.map} +1 -1
- package/dist/{migrate-BSbZ7-9n.mjs → migrate-CsBZKALY.mjs} +3 -3
- package/dist/{migrate-BSbZ7-9n.mjs.map → migrate-CsBZKALY.mjs.map} +1 -1
- package/dist/{migrate-f6JDjyCp.cjs → migrate-DFjbGnSr.cjs} +2 -2
- package/dist/{migrate-f6JDjyCp.cjs.map → migrate-DFjbGnSr.cjs.map} +1 -1
- package/dist/openapi.d.cts +1 -1
- package/dist/openapi.d.mts +1 -1
- package/dist/reconcile/public.d.cts +2 -2
- package/dist/reconcile/public.d.mts +2 -2
- package/dist/{reconcile-Dh1Jk7WE.mjs → reconcile--I7V4Klj.mjs} +2 -2
- package/dist/{reconcile-Dh1Jk7WE.mjs.map → reconcile--I7V4Klj.mjs.map} +1 -1
- package/dist/{resolve-Be4bF1w4.mjs → resolve-Ccjlpnd9.mjs} +3 -3
- package/dist/{resolve-Be4bF1w4.mjs.map → resolve-Ccjlpnd9.mjs.map} +1 -1
- package/dist/{resolve-DUp65SnJ.cjs → resolve-g8htuR80.cjs} +3 -3
- package/dist/{resolve-DUp65SnJ.cjs.map → resolve-g8htuR80.cjs.map} +1 -1
- package/dist/{rollback-DDHtd0GJ.cjs → rollback--ympG9ss.cjs} +5 -4
- package/dist/rollback--ympG9ss.cjs.map +1 -0
- package/dist/{rollback-D1d-fW0r.mjs → rollback-Drbg0OeR.mjs} +5 -4
- package/dist/rollback-Drbg0OeR.mjs.map +1 -0
- package/dist/{runtime-Es1V4e9M.d.mts → runtime-D_J3ExJn.d.cts} +2 -2
- package/dist/{runtime-DDrHlYe5.d.cts.map → runtime-D_J3ExJn.d.cts.map} +1 -1
- package/dist/{runtime-DDrHlYe5.d.cts → runtime-_wEVtshH.d.mts} +2 -2
- package/dist/{runtime-Es1V4e9M.d.mts.map → runtime-_wEVtshH.d.mts.map} +1 -1
- package/dist/{sandbox-C3WsTa5m.d.mts → sandbox-CPJq1Kia.d.mts} +2 -2
- package/dist/{sandbox-C3WsTa5m.d.mts.map → sandbox-CPJq1Kia.d.mts.map} +1 -1
- package/dist/{sandbox-MaxSeU92.d.cts → sandbox-JwuPAl7I.d.cts} +2 -2
- package/dist/{sandbox-MaxSeU92.d.cts.map → sandbox-JwuPAl7I.d.cts.map} +1 -1
- package/dist/secrets-DJteijZo.cjs +47 -0
- package/dist/secrets-DJteijZo.cjs.map +1 -0
- package/dist/secrets-DbPmAS4k.mjs +36 -0
- package/dist/secrets-DbPmAS4k.mjs.map +1 -0
- package/dist/{seeds-CvGQJnPO.mjs → seeds-BSL55F6q.mjs} +897 -59
- package/dist/seeds-BSL55F6q.mjs.map +1 -0
- package/dist/{seeds-BKoJYsE7.cjs → seeds-c-ByX9je.cjs} +1014 -80
- package/dist/seeds-c-ByX9je.cjs.map +1 -0
- package/dist/stack-1PeLJS2j.cjs +1346 -0
- package/dist/stack-1PeLJS2j.cjs.map +1 -0
- package/dist/stack-Co4uZkAo.mjs +1239 -0
- package/dist/stack-Co4uZkAo.mjs.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/{terminal-Dtd6BZX9.mjs → terminal-C4XRdwnU.mjs} +2 -2
- package/dist/{terminal-Dtd6BZX9.mjs.map → terminal-C4XRdwnU.mjs.map} +1 -1
- package/dist/{types-Bk9st2cd.d.cts → types-B6lmD3en.d.mts} +77 -26
- package/dist/types-B6lmD3en.d.mts.map +1 -0
- package/dist/{types-B3Gqs175.d.mts → types-BibpiHKB.d.cts} +78 -25
- package/dist/types-BibpiHKB.d.cts.map +1 -0
- package/dist/workspace/index.d.cts +2 -2
- package/dist/workspace/index.d.mts +2 -2
- package/package.json +15 -15
- package/dist/LegacyStateStore-CeEwayMB.cjs.map +0 -1
- package/dist/LegacyStateStore-DdJ1bCRV.mjs +0 -89
- package/dist/LegacyStateStore-DdJ1bCRV.mjs.map +0 -1
- package/dist/compose-CTdVeeVk.mjs +0 -3151
- package/dist/compose-CTdVeeVk.mjs.map +0 -1
- package/dist/compose-fnYmPk_c.cjs +0 -3276
- package/dist/compose-fnYmPk_c.cjs.map +0 -1
- package/dist/deploy-6ToUHJmM.cjs.map +0 -1
- package/dist/deploy-yuJHlkY0.mjs.map +0 -1
- package/dist/engine-C8Ye9MUm.mjs.map +0 -1
- package/dist/engine-Dj7ZKO8H.cjs.map +0 -1
- package/dist/rollback-D1d-fW0r.mjs.map +0 -1
- package/dist/rollback-DDHtd0GJ.cjs.map +0 -1
- package/dist/seeds-BKoJYsE7.cjs.map +0 -1
- package/dist/seeds-CvGQJnPO.mjs.map +0 -1
- package/dist/types-B3Gqs175.d.mts.map +0 -1
- package/dist/types-Bk9st2cd.d.cts.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env -S npx tsx
|
|
2
2
|
import { n as __require, t as __exportAll } from "./rolldown-runtime-BhDjJH2R.mjs";
|
|
3
3
|
import { n as isGkmError, t as GkmError } from "./errors-D8Gwp5kU.mjs";
|
|
4
|
-
import { _ as storeDokployCredentials, d as getDokployRegistryId, f as getDokployToken, g as removeGoDaddyCredentials, h as removeDokployCredentials, i as CommandFailed, l as getCredentialsPath, m as readCredentials, o as DEFAULT_TIMEOUT_MS,
|
|
4
|
+
import { _ as storeDokployCredentials, d as getDokployRegistryId, f as getDokployToken, g as removeGoDaddyCredentials, h as removeDokployCredentials, i as CommandFailed, l as getCredentialsPath, m as readCredentials, o as DEFAULT_TIMEOUT_MS, u as getDokployCredentials, v as storeGoDaddyToken, y as storeHostingerToken } from "./credentials-C4KII3PD.mjs";
|
|
5
5
|
import { l as withOwningTsconfigJsx, r as discover, u as ConstructGenerator } from "./discover-qjFapetL.mjs";
|
|
6
6
|
import { t as appKey } from "./derive-B4vDpzgP.mjs";
|
|
7
7
|
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-Bzw7Zs82.mjs";
|
|
8
8
|
import { ConfigNotFound, NotABackendApp, NotInAnApp, loadAppConfig, loadConfig, loadWorkspaceConfig, loadWorkspaceSettings, parseModuleConfig } from "./config.mjs";
|
|
9
|
-
import { $n as
|
|
9
|
+
import { $n as projectKey, An as telemetryOf, Bn as findAvailablePort, Ct as QueueGenerator, Dt as constructGlobs, En as appTelemetry, Et as backendsOf$1, Gn as prepareEntryCredentials, Hn as loadEnvFiles, Ht as LOCAL_CA_PATH, In as portsOf, Jt as postgresDatabaseNames, Ln as primaryPortKey, Nn as describeServices, On as scopeTelemetryEnv, Ot as derivedContainers, Pn as fakeKey, Pt as readLocalCredentials, Rn as createCredentialsPreload, Sn as TELEMETRY_CONTAINER, St as workerEntryDir, Tt as FAKE_ENV, Un as loadPortState, Ut as forgetState, Vn as isPortAvailable, Wn as loadSecretsForApp, Xn as FileSecretsStore, Xt as quoteIdentifier, Zn as getKeyPath, _n as providerOf, a as provisionStage, at as describeActor, bt as WorkerGenerator, dt as assertDevServicesFlag, en as pgClient, et as createStateStore, fr as toEmbeddableSecrets, gn as eventsBackendFor, hn as cacheBackendFor, kn as surfaceClientTraced, kt as reconcileWorkspace, l as provisionStageDns, mn as isImageBuild, mr as LOCAL_LOGS_EMAIL, nr as deployIdentity, p as provisionCommand, pn as imageBuildCredentials, pr as withCustomSecret, qn as secretsStoreFor, rt as dnsResources, s as assertStageServer, ur as maskPassword, v as dockerCommand, wt as CronGenerator, xt as workerBundleName, yn as CLUSTER_DATABASE, yt as workerUnits, zn as createEntryWrapper } from "./seeds-BSL55F6q.mjs";
|
|
10
10
|
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";
|
|
11
11
|
import { generateOpenApi, openapiCommand, resolveOpenApiConfig } from "./openapi.mjs";
|
|
12
12
|
import { s as isCacheBackend, t as SubscriberGenerator } from "./SubscriberGenerator-CyN2VF5X.mjs";
|
|
@@ -15,10 +15,11 @@ import { n as driversFor, r as eventsBackendsIn, t as cacheBackendsIn } from "./
|
|
|
15
15
|
import { n as withCompute, r as withRoutes, t as manifestModule } from "./emit-C1e8qD08.mjs";
|
|
16
16
|
import { t as LocalSandbox } from "./local-Otp74ak0.mjs";
|
|
17
17
|
import { f as keyFingerprint, n as sniffAppEnvironment, o as DokployApi } from "./sniffer-BTtGAtm3.mjs";
|
|
18
|
-
import { t as deploy$1 } from "./deploy-
|
|
19
|
-
import {
|
|
18
|
+
import { t as deploy$1 } from "./deploy-DYIyIUYd.mjs";
|
|
19
|
+
import { a as stackOverrideFile, c as dockerCompose, i as ComposePushNeedsBuild, o as edgeDir, r as ComposePinNeedsPull, s as removeEdgeRoutes, t as composeTarget } from "./compose-DrEB_4F-.mjs";
|
|
20
|
+
import { d as parseDigests, h as EDGE_PROJECT, i as composeProject, p as pinnedRef, s as stackDir } from "./stack-Co4uZkAo.mjs";
|
|
20
21
|
import { o as loadCredentialSchemas, t as CredentialsInvalid } from "./credentialSchemas-BJFvfkaz.mjs";
|
|
21
|
-
import { t as LocalStateStore } from "./LocalStateStore-
|
|
22
|
+
import { t as LocalStateStore } from "./LocalStateStore-D40_SDmJ.mjs";
|
|
22
23
|
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";
|
|
23
24
|
import "./awsStore-BWa1KNY-.mjs";
|
|
24
25
|
import { a as writeTestHarness, i as TEST_MANIFEST_ENV, n as TEST_READY_FILE, t as TEST_READY_ENV } from "./ready-naOSJpeJ.mjs";
|
|
@@ -49,7 +50,7 @@ import crypto from "crypto";
|
|
|
49
50
|
import { Function } from "@geekmidas/constructs/functions";
|
|
50
51
|
import { Topic } from "@geekmidas/constructs/topic";
|
|
51
52
|
//#region package.json
|
|
52
|
-
var version = "10.0.0-alpha.
|
|
53
|
+
var version = "10.0.0-alpha.93";
|
|
53
54
|
//#endregion
|
|
54
55
|
//#region src/prompt.ts
|
|
55
56
|
/**
|
|
@@ -2326,9 +2327,9 @@ async function workspaceDevCommand(configured, options) {
|
|
|
2326
2327
|
for (const { id, port } of fakes) logger$5.log(`🎭 ${id} fake: http://localhost:${port}`);
|
|
2327
2328
|
logger$5.log(options.migrate || options.seed ? "🗄️ Migrating the databases" : "🗄️ Checking for pending migrations");
|
|
2328
2329
|
if (options.migrate || options.seed) {
|
|
2329
|
-
const { prepareDevDatabases } = await import("./migrate-
|
|
2330
|
+
const { prepareDevDatabases } = await import("./migrate-CsBZKALY.mjs");
|
|
2330
2331
|
await prepareDevDatabases(workspace, reconciled.env, { seed: !!options.seed });
|
|
2331
|
-
} else await import("./migrate-
|
|
2332
|
+
} else await import("./migrate-CsBZKALY.mjs").then(({ reportPendingMigrations }) => reportPendingMigrations(workspace, reconciled.env)).catch((error) => {
|
|
2332
2333
|
logger$5.log(`⚠️ Could not check for pending migrations: ${error instanceof Error ? error.message : String(error)}`);
|
|
2333
2334
|
});
|
|
2334
2335
|
const appUrls = {};
|
|
@@ -3381,7 +3382,7 @@ async function buildApp(input) {
|
|
|
3381
3382
|
...production,
|
|
3382
3383
|
...telemetry ? { telemetry } : {}
|
|
3383
3384
|
});
|
|
3384
|
-
const { bundleServer } = await import("./bundler-
|
|
3385
|
+
const { bundleServer } = await import("./bundler-BWrh-AJH.mjs");
|
|
3385
3386
|
await bundleServer({
|
|
3386
3387
|
entryPoint,
|
|
3387
3388
|
outputDir: join(outputDir, "dist"),
|
|
@@ -3526,7 +3527,7 @@ async function buildWorkers(input) {
|
|
|
3526
3527
|
});
|
|
3527
3528
|
logger$4.log(`Generated worker ${worker.id}: ${crons.length} crons, ${queues.length} queues, ${subscribers.length} subscribers`);
|
|
3528
3529
|
if (!input.bundle) continue;
|
|
3529
|
-
const { bundleServer } = await import("./bundler-
|
|
3530
|
+
const { bundleServer } = await import("./bundler-BWrh-AJH.mjs");
|
|
3530
3531
|
const outfile = workerBundleName(worker.id);
|
|
3531
3532
|
await bundleServer({
|
|
3532
3533
|
entryPoint,
|
|
@@ -3612,7 +3613,7 @@ async function buildForTarget(target, context, appRoot, workspaceRoot, endpointG
|
|
|
3612
3613
|
let masterKey;
|
|
3613
3614
|
if (context.production?.bundle && !skipBundle) {
|
|
3614
3615
|
logger$4.log(`\n📦 Bundling production server...`);
|
|
3615
|
-
const { bundleServer } = await import("./bundler-
|
|
3616
|
+
const { bundleServer } = await import("./bundler-BWrh-AJH.mjs");
|
|
3616
3617
|
const allConstructs = [
|
|
3617
3618
|
...endpoints.map((e) => e.construct),
|
|
3618
3619
|
...functions.map((f) => f.construct),
|
|
@@ -4133,6 +4134,7 @@ const MASKED = "********";
|
|
|
4133
4134
|
*/
|
|
4134
4135
|
function maskStateSecrets(state) {
|
|
4135
4136
|
const masked = structuredClone(state);
|
|
4137
|
+
if (masked.provider !== "dokploy") return masked;
|
|
4136
4138
|
for (const credentials of Object.values(masked.appCredentials ?? {})) credentials.dbPassword = MASKED;
|
|
4137
4139
|
for (const secrets of Object.values(masked.generatedSecrets ?? {})) for (const name of Object.keys(secrets)) secrets[name] = MASKED;
|
|
4138
4140
|
if (masked.backups) {
|
|
@@ -4188,6 +4190,7 @@ async function stateShowCommand(options) {
|
|
|
4188
4190
|
if (options.json) console.log(JSON.stringify(state, null, 2));
|
|
4189
4191
|
else {
|
|
4190
4192
|
printStateDetails(state);
|
|
4193
|
+
printDnsRecords(stored.resources);
|
|
4191
4194
|
printUnfinished(stored.resources);
|
|
4192
4195
|
}
|
|
4193
4196
|
}
|
|
@@ -4232,8 +4235,8 @@ async function stateDiffCommand(options) {
|
|
|
4232
4235
|
if (!remote) console.log("Remote: (none)");
|
|
4233
4236
|
else console.log(`Remote: Last deployed ${remote.lastDeployedAt}`);
|
|
4234
4237
|
console.log("");
|
|
4235
|
-
const localApps = local?.applications ?? {};
|
|
4236
|
-
const remoteApps = remote?.applications ?? {};
|
|
4238
|
+
const localApps = dokploy(local)?.applications ?? {};
|
|
4239
|
+
const remoteApps = dokploy(remote)?.applications ?? {};
|
|
4237
4240
|
const allApps = /* @__PURE__ */ new Set([...Object.keys(localApps), ...Object.keys(remoteApps)]);
|
|
4238
4241
|
if (allApps.size > 0) {
|
|
4239
4242
|
console.log("Applications:");
|
|
@@ -4246,8 +4249,8 @@ async function stateDiffCommand(options) {
|
|
|
4246
4249
|
else console.log(` ${app}: ${localId} (local) != ${remoteId} (remote) [MISMATCH]`);
|
|
4247
4250
|
}
|
|
4248
4251
|
}
|
|
4249
|
-
const localServices = local?.services ?? {};
|
|
4250
|
-
const remoteServices = remote?.services ?? {};
|
|
4252
|
+
const localServices = dokploy(local)?.services ?? {};
|
|
4253
|
+
const remoteServices = dokploy(remote)?.services ?? {};
|
|
4251
4254
|
if (Object.keys(localServices).length > 0 || Object.keys(remoteServices).length > 0) {
|
|
4252
4255
|
console.log("\nServices:");
|
|
4253
4256
|
const serviceKeys = /* @__PURE__ */ new Set([...Object.keys(localServices), ...Object.keys(remoteServices)]);
|
|
@@ -4312,6 +4315,10 @@ async function copyStage(from, to, stage) {
|
|
|
4312
4315
|
for (const { updatedAt: _stamped, ...record } of Object.values(source.resources)) version = await to.putResource(stage, record, { expectedVersion: version });
|
|
4313
4316
|
return source;
|
|
4314
4317
|
}
|
|
4318
|
+
/** `state` if Dokploy wrote it — the only shape with ids of its own. */
|
|
4319
|
+
function dokploy(state) {
|
|
4320
|
+
return state?.provider === "dokploy" ? state : null;
|
|
4321
|
+
}
|
|
4315
4322
|
function describeRecord(record) {
|
|
4316
4323
|
if (!record) return "(none)";
|
|
4317
4324
|
return record.id ? `${record.status} ${record.id}` : record.status;
|
|
@@ -4325,6 +4332,12 @@ function printUnfinished(resources) {
|
|
|
4325
4332
|
for (const record of pending) console.log(` ${record.key}`);
|
|
4326
4333
|
}
|
|
4327
4334
|
function printStateSummary(state) {
|
|
4335
|
+
if (state.provider !== "dokploy") {
|
|
4336
|
+
console.log(` Stage: ${state.stage} (${state.provider})`);
|
|
4337
|
+
console.log(` Apps released: ${Object.keys(state.releases ?? {}).length}`);
|
|
4338
|
+
console.log(` Last deployed: ${state.lastDeployedAt}`);
|
|
4339
|
+
return;
|
|
4340
|
+
}
|
|
4328
4341
|
const appCount = Object.keys(state.applications).length;
|
|
4329
4342
|
const hasPostgres = !!state.services.postgresId;
|
|
4330
4343
|
const hasRedis = !!state.services.redisId;
|
|
@@ -4335,6 +4348,14 @@ function printStateSummary(state) {
|
|
|
4335
4348
|
console.log(` Last deployed: ${state.lastDeployedAt}`);
|
|
4336
4349
|
}
|
|
4337
4350
|
function printStateDetails(state) {
|
|
4351
|
+
if (state.provider !== "dokploy") {
|
|
4352
|
+
console.log(`Stage: ${state.stage} (${state.provider})`);
|
|
4353
|
+
console.log(`Last Deployed: ${state.lastDeployedAt}`);
|
|
4354
|
+
if (state.identity) console.log(`Identity: ${state.identity}`);
|
|
4355
|
+
console.log("");
|
|
4356
|
+
printReleases(state.releases);
|
|
4357
|
+
return;
|
|
4358
|
+
}
|
|
4338
4359
|
console.log(`Stage: ${state.stage}`);
|
|
4339
4360
|
console.log(`Environment ID: ${state.environmentId}`);
|
|
4340
4361
|
console.log(`Last Deployed: ${state.lastDeployedAt}`);
|
|
@@ -4376,6 +4397,62 @@ function printStateDetails(state) {
|
|
|
4376
4397
|
for (const [hostname, info] of Object.entries(state.dnsVerified)) console.log(` ${hostname}: ${info.serverIp} (${info.verifiedAt})`);
|
|
4377
4398
|
}
|
|
4378
4399
|
}
|
|
4400
|
+
/** Each app's current release, and who released it. */
|
|
4401
|
+
function printReleases(releases) {
|
|
4402
|
+
console.log("Releases:");
|
|
4403
|
+
const apps = Object.entries(releases ?? {});
|
|
4404
|
+
if (apps.length === 0) {
|
|
4405
|
+
console.log(" (none)");
|
|
4406
|
+
return;
|
|
4407
|
+
}
|
|
4408
|
+
for (const [app, { current }] of apps) console.log(` ${app}: ${describeRelease(current)}`);
|
|
4409
|
+
}
|
|
4410
|
+
/** `ghcr.io/acme/api:v2 (sha256:…) · 2026-… · ada@laptop` */
|
|
4411
|
+
function describeRelease(release) {
|
|
4412
|
+
return [
|
|
4413
|
+
`${release.ref}${release.digest ? ` (${release.digest})` : ""}`,
|
|
4414
|
+
release.releasedAt,
|
|
4415
|
+
describeActor(release.releasedBy)
|
|
4416
|
+
].join(" · ");
|
|
4417
|
+
}
|
|
4418
|
+
/** The DNS records gkm wrote for the stage. */
|
|
4419
|
+
function printDnsRecords(resources) {
|
|
4420
|
+
const records = dnsResources(resources);
|
|
4421
|
+
if (records.length === 0) return;
|
|
4422
|
+
console.log("");
|
|
4423
|
+
console.log("DNS Records:");
|
|
4424
|
+
for (const record of records) console.log(` ${record.fqdn} ${record.type} ${record.value} (TTL ${record.ttl}${record.provider ? `, ${record.provider}` : ""})`);
|
|
4425
|
+
}
|
|
4426
|
+
/**
|
|
4427
|
+
* Who wrote a stage's state, newest first, and what each app runs.
|
|
4428
|
+
* `gkm state:history --stage=<stage>`
|
|
4429
|
+
*/
|
|
4430
|
+
async function stateHistoryCommand(options) {
|
|
4431
|
+
const { workspace } = await loadWorkspaceConfig();
|
|
4432
|
+
const stored = await (await createStateStore({
|
|
4433
|
+
config: workspace.state,
|
|
4434
|
+
workspaceRoot: workspace.root,
|
|
4435
|
+
workspaceName: workspace.name
|
|
4436
|
+
})).read(options.stage);
|
|
4437
|
+
if (!stored) {
|
|
4438
|
+
console.log(`No state found for stage: ${options.stage}`);
|
|
4439
|
+
return;
|
|
4440
|
+
}
|
|
4441
|
+
const history = {
|
|
4442
|
+
stage: options.stage,
|
|
4443
|
+
history: stored.history,
|
|
4444
|
+
releases: Object.fromEntries(Object.entries(stored.state.releases ?? {}).map(([app, releases]) => [app, releases.current]))
|
|
4445
|
+
};
|
|
4446
|
+
if (options.json) {
|
|
4447
|
+
console.log(JSON.stringify(history, null, 2));
|
|
4448
|
+
return;
|
|
4449
|
+
}
|
|
4450
|
+
console.log(`History of stage ${options.stage} (newest first):`);
|
|
4451
|
+
if (history.history.length === 0) console.log(" (none recorded)");
|
|
4452
|
+
for (const entry of history.history) console.log(` ${entry.serial} · ${entry.at} · ${describeActor(entry.by)} · ${entry.operation}`);
|
|
4453
|
+
console.log("");
|
|
4454
|
+
printReleases(stored.state.releases);
|
|
4455
|
+
}
|
|
4379
4456
|
//#endregion
|
|
4380
4457
|
//#region src/secrets/generator.ts
|
|
4381
4458
|
/**
|
|
@@ -5347,25 +5424,25 @@ function loadPackageJson() {
|
|
|
5347
5424
|
* Run: pnpm --filter @geekmidas/cli sync-versions
|
|
5348
5425
|
*/
|
|
5349
5426
|
const GEEKMIDAS_VERSIONS = {
|
|
5350
|
-
"@geekmidas/audit": "~10.0.0-alpha.
|
|
5351
|
-
"@geekmidas/auth": "~10.0.0-alpha.
|
|
5352
|
-
"@geekmidas/cache": "~10.0.0-alpha.
|
|
5353
|
-
"@geekmidas/client": "~10.0.0-alpha.
|
|
5354
|
-
"@geekmidas/cloud": "~10.0.0-alpha.
|
|
5355
|
-
"@geekmidas/constructs": "~10.0.0-alpha.
|
|
5356
|
-
"@geekmidas/db": "~10.0.0-alpha.
|
|
5357
|
-
"@geekmidas/emailkit": "~10.0.0-alpha.
|
|
5358
|
-
"@geekmidas/envkit": "~10.0.0-alpha.
|
|
5359
|
-
"@geekmidas/errors": "~10.0.0-alpha.
|
|
5360
|
-
"@geekmidas/events": "~10.0.0-alpha.
|
|
5361
|
-
"@geekmidas/logger": "~10.0.0-alpha.
|
|
5362
|
-
"@geekmidas/manifest": "~10.0.0-alpha.
|
|
5363
|
-
"@geekmidas/rate-limit": "~10.0.0-alpha.
|
|
5364
|
-
"@geekmidas/schema": "~10.0.0-alpha.
|
|
5365
|
-
"@geekmidas/services": "~10.0.0-alpha.
|
|
5366
|
-
"@geekmidas/storage": "~10.0.0-alpha.
|
|
5367
|
-
"@geekmidas/telescope": "~10.0.0-alpha.
|
|
5368
|
-
"@geekmidas/testkit": "~10.0.0-alpha.
|
|
5427
|
+
"@geekmidas/audit": "~10.0.0-alpha.93",
|
|
5428
|
+
"@geekmidas/auth": "~10.0.0-alpha.93",
|
|
5429
|
+
"@geekmidas/cache": "~10.0.0-alpha.93",
|
|
5430
|
+
"@geekmidas/client": "~10.0.0-alpha.93",
|
|
5431
|
+
"@geekmidas/cloud": "~10.0.0-alpha.93",
|
|
5432
|
+
"@geekmidas/constructs": "~10.0.0-alpha.93",
|
|
5433
|
+
"@geekmidas/db": "~10.0.0-alpha.93",
|
|
5434
|
+
"@geekmidas/emailkit": "~10.0.0-alpha.93",
|
|
5435
|
+
"@geekmidas/envkit": "~10.0.0-alpha.93",
|
|
5436
|
+
"@geekmidas/errors": "~10.0.0-alpha.93",
|
|
5437
|
+
"@geekmidas/events": "~10.0.0-alpha.93",
|
|
5438
|
+
"@geekmidas/logger": "~10.0.0-alpha.93",
|
|
5439
|
+
"@geekmidas/manifest": "~10.0.0-alpha.93",
|
|
5440
|
+
"@geekmidas/rate-limit": "~10.0.0-alpha.93",
|
|
5441
|
+
"@geekmidas/schema": "~10.0.0-alpha.93",
|
|
5442
|
+
"@geekmidas/services": "~10.0.0-alpha.93",
|
|
5443
|
+
"@geekmidas/storage": "~10.0.0-alpha.93",
|
|
5444
|
+
"@geekmidas/telescope": "~10.0.0-alpha.93",
|
|
5445
|
+
"@geekmidas/testkit": "~10.0.0-alpha.93",
|
|
5369
5446
|
"@geekmidas/cli": `~${loadPackageJson().version}`
|
|
5370
5447
|
};
|
|
5371
5448
|
//#endregion
|
|
@@ -5766,7 +5843,7 @@ const COMMIT = /^[0-9a-f]{40}$/;
|
|
|
5766
5843
|
* The `uses:` value for the stages action, with a comment saying which CLI
|
|
5767
5844
|
* release the pinned commit is.
|
|
5768
5845
|
*/
|
|
5769
|
-
function stagesActionUses(commit = "
|
|
5846
|
+
function stagesActionUses(commit = "a619ff213e362417b184dff08c8175a86f5d9d07", version = cliVersion()) {
|
|
5770
5847
|
return commit && COMMIT.test(commit) ? `${STAGES_ACTION}@${commit} # @geekmidas/cli ${version}` : `${STAGES_ACTION}@main # pin to a commit SHA: see the action's README`;
|
|
5771
5848
|
}
|
|
5772
5849
|
//#endregion
|
|
@@ -11048,135 +11125,6 @@ function maskUrl(url) {
|
|
|
11048
11125
|
}
|
|
11049
11126
|
}
|
|
11050
11127
|
//#endregion
|
|
11051
|
-
//#region src/providers/dns.ts
|
|
11052
|
-
/** Whether the workspace deploys through the compose target. */
|
|
11053
|
-
function deploysWithCompose(workspace) {
|
|
11054
|
-
return workspace.deploy?.default === "compose" || Object.values(workspace.apps).some((app) => app.resolvedDeployTarget === "compose");
|
|
11055
|
-
}
|
|
11056
|
-
/**
|
|
11057
|
-
* A compose stage that serves a domain has its server's address in its
|
|
11058
|
-
* secrets — checked before `gkm setup --stage` does anything else.
|
|
11059
|
-
*
|
|
11060
|
-
* @throws {ServerAddressMissing} for a compose stage with a domain and none
|
|
11061
|
-
* @throws {ServerAddressInvalid} for a value that is not an address
|
|
11062
|
-
*/
|
|
11063
|
-
function assertStageServer(workspace, stage, secrets) {
|
|
11064
|
-
if (stage === workspace.stages.local) return void 0;
|
|
11065
|
-
if (!deploysWithCompose(workspace)) return serverAddress(stage, secrets?.custom);
|
|
11066
|
-
return requiredServerAddress(stage, workspace.domains?.[stage], secrets?.custom);
|
|
11067
|
-
}
|
|
11068
|
-
/**
|
|
11069
|
-
* The hosts a compose stage serves: its stack composed as a deploy would —
|
|
11070
|
-
* with the secrets it would generate made up in memory, never written — and
|
|
11071
|
-
* every route's host read off it.
|
|
11072
|
-
*/
|
|
11073
|
-
async function composeStageHosts(options) {
|
|
11074
|
-
const { workspace, stage } = options;
|
|
11075
|
-
const runnables = options.runnables ?? {};
|
|
11076
|
-
const background = options.background ?? {};
|
|
11077
|
-
const manifest = options.manifest ?? await discover({
|
|
11078
|
-
patterns: constructGlobs(workspace),
|
|
11079
|
-
cwd: workspace.root,
|
|
11080
|
-
runnables,
|
|
11081
|
-
background
|
|
11082
|
-
});
|
|
11083
|
-
const stored = await (await secretsStoreFor(workspace, stage, {
|
|
11084
|
-
...options.profile ? { profile: options.profile } : {},
|
|
11085
|
-
...options.home ? { home: options.home } : {}
|
|
11086
|
-
})).read(stage);
|
|
11087
|
-
const { deployedStackSecrets } = await import("./compose-CTdVeeVk.mjs").then((n) => n.l);
|
|
11088
|
-
const { composeStack } = await import("./compose-CTdVeeVk.mjs").then((n) => n.c);
|
|
11089
|
-
const { secrets } = deployedStackSecrets(workspace, stage, stored, manifest);
|
|
11090
|
-
const stack = composeStack({
|
|
11091
|
-
workspace,
|
|
11092
|
-
manifest,
|
|
11093
|
-
runnables,
|
|
11094
|
-
background,
|
|
11095
|
-
stage,
|
|
11096
|
-
identity: deployIdentity(workspace, stage),
|
|
11097
|
-
images: {
|
|
11098
|
-
mode: "pull",
|
|
11099
|
-
tag: "dns",
|
|
11100
|
-
...workspace.deploy?.registry ? { registry: workspace.deploy.registry } : {}
|
|
11101
|
-
},
|
|
11102
|
-
secrets,
|
|
11103
|
-
buildOnly: true,
|
|
11104
|
-
allowDevServices: true
|
|
11105
|
-
});
|
|
11106
|
-
return stackHosts(stack);
|
|
11107
|
-
}
|
|
11108
|
-
/**
|
|
11109
|
-
* `GKM_SERVER_IPV4` from the stage's secrets and `dns`: each public host's
|
|
11110
|
-
* records, created or corrected. A dry run reads and prints, and writes
|
|
11111
|
-
* nothing.
|
|
11112
|
-
*/
|
|
11113
|
-
async function provisionStageDns(options) {
|
|
11114
|
-
const { workspace, stage } = options;
|
|
11115
|
-
const log = options.log ?? ((line) => console.log(line));
|
|
11116
|
-
if (stage === workspace.stages.local || !workspace.dns || !deploysWithCompose(workspace)) return {
|
|
11117
|
-
mode: "none",
|
|
11118
|
-
hosts: [],
|
|
11119
|
-
changes: []
|
|
11120
|
-
};
|
|
11121
|
-
const store = await secretsStoreFor(workspace, stage, {
|
|
11122
|
-
...options.profile ? { profile: options.profile } : {},
|
|
11123
|
-
...options.home ? { home: options.home } : {}
|
|
11124
|
-
});
|
|
11125
|
-
const server = serverAddress(stage, (await store.read(stage))?.custom);
|
|
11126
|
-
if (!server) {
|
|
11127
|
-
log(`\n🌐 DNS for '${stage}': no GKM_SERVER_IPV4 in its secrets, so no records — ${serverAddressHint(stage)}`);
|
|
11128
|
-
return {
|
|
11129
|
-
mode: "none",
|
|
11130
|
-
hosts: [],
|
|
11131
|
-
changes: []
|
|
11132
|
-
};
|
|
11133
|
-
}
|
|
11134
|
-
const hosts = [...options.hosts ?? await composeStageHosts({
|
|
11135
|
-
workspace,
|
|
11136
|
-
stage,
|
|
11137
|
-
...options.profile ? { profile: options.profile } : {},
|
|
11138
|
-
...options.home ? { home: options.home } : {},
|
|
11139
|
-
...options.manifest ? { manifest: options.manifest } : {},
|
|
11140
|
-
...options.runnables ? { runnables: options.runnables } : {},
|
|
11141
|
-
...options.background ? { background: options.background } : {}
|
|
11142
|
-
})];
|
|
11143
|
-
log(`\n🌐 DNS for '${stage}' → ${server.ipv4}${server.ipv6 ? ` / ${server.ipv6}` : ""}${options.dryRun ? " (dry run — nothing is written)" : ""}`);
|
|
11144
|
-
const plan = planStackDns({
|
|
11145
|
-
stage,
|
|
11146
|
-
hosts,
|
|
11147
|
-
server,
|
|
11148
|
-
dns: workspace.dns
|
|
11149
|
-
});
|
|
11150
|
-
try {
|
|
11151
|
-
return {
|
|
11152
|
-
mode: "records",
|
|
11153
|
-
hosts,
|
|
11154
|
-
changes: await applyStackDns(plan, {
|
|
11155
|
-
...options.dryRun ? { dryRun: true } : {},
|
|
11156
|
-
log,
|
|
11157
|
-
credentials: {
|
|
11158
|
-
env: options.env ?? process.env,
|
|
11159
|
-
...options.home ? { home: options.home } : {},
|
|
11160
|
-
log
|
|
11161
|
-
},
|
|
11162
|
-
...options.providerFor ? { providerFor: options.providerFor } : {}
|
|
11163
|
-
})
|
|
11164
|
-
};
|
|
11165
|
-
} catch (error) {
|
|
11166
|
-
if (error instanceof MissingCredential) {
|
|
11167
|
-
log(` ⚠ ${error.message}`);
|
|
11168
|
-
log(" Until then, create these records yourself:");
|
|
11169
|
-
for (const domain of plan.domains) for (const r of domain.records) log(` ${r.host.padEnd(32)} ${r.type.padEnd(5)} ${r.value} (TTL ${r.ttl})`);
|
|
11170
|
-
return {
|
|
11171
|
-
mode: "records",
|
|
11172
|
-
hosts,
|
|
11173
|
-
changes: []
|
|
11174
|
-
};
|
|
11175
|
-
}
|
|
11176
|
-
throw error;
|
|
11177
|
-
}
|
|
11178
|
-
}
|
|
11179
|
-
//#endregion
|
|
11180
11128
|
//#region src/setup/index.ts
|
|
11181
11129
|
var setup_exports = /* @__PURE__ */ __exportAll({
|
|
11182
11130
|
createFreshWorkspaceSecrets: () => createFreshWorkspaceSecrets,
|
|
@@ -11210,7 +11158,10 @@ async function setupCommand(options = {}) {
|
|
|
11210
11158
|
logger$1.log(`📦 Workspace: ${workspace.name}`);
|
|
11211
11159
|
logger$1.log(`📱 Apps: ${Object.keys(workspace.apps).join(", ")}`);
|
|
11212
11160
|
logger$1.log(`🔑 Stage: ${stage}\n`);
|
|
11213
|
-
if (!local)
|
|
11161
|
+
if (!local) {
|
|
11162
|
+
const store = await secretsStoreFor(workspace, stage, { ...options.profile ? { profile: options.profile } : {} });
|
|
11163
|
+
assertStageServer(workspace, stage, await store.read(stage));
|
|
11164
|
+
}
|
|
11214
11165
|
if (!local && options.dryRun) {
|
|
11215
11166
|
await provisionDeployed(workspace, stage, options);
|
|
11216
11167
|
return;
|
|
@@ -11608,7 +11559,7 @@ function testDatabases(reconciled) {
|
|
|
11608
11559
|
* starts without the reference data the app needs.
|
|
11609
11560
|
*/
|
|
11610
11561
|
async function migrateTestStage(workspace, env) {
|
|
11611
|
-
const { migrateAndSeed } = await import("./migrate-
|
|
11562
|
+
const { migrateAndSeed } = await import("./migrate-CsBZKALY.mjs");
|
|
11612
11563
|
const { discover } = await import("./discover-qjFapetL.mjs").then((n) => n.i);
|
|
11613
11564
|
const sources = {};
|
|
11614
11565
|
const manifest = await discover({
|
|
@@ -12044,7 +11995,7 @@ program.command("migrate").description("Apply each database construct's migratio
|
|
|
12044
11995
|
try {
|
|
12045
11996
|
const globalOptions = program.opts();
|
|
12046
11997
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12047
|
-
const { migrateCommand } = await import("./migrate-
|
|
11998
|
+
const { migrateCommand } = await import("./migrate-CsBZKALY.mjs");
|
|
12048
11999
|
await migrateCommand({
|
|
12049
12000
|
...options,
|
|
12050
12001
|
...construct ? { construct } : {}
|
|
@@ -12057,7 +12008,7 @@ program.command("seed").description("Migrate, then run each database construct's
|
|
|
12057
12008
|
try {
|
|
12058
12009
|
const globalOptions = program.opts();
|
|
12059
12010
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12060
|
-
const { seedCommand } = await import("./migrate-
|
|
12011
|
+
const { seedCommand } = await import("./migrate-CsBZKALY.mjs");
|
|
12061
12012
|
await seedCommand({
|
|
12062
12013
|
...options,
|
|
12063
12014
|
...construct ? { construct } : {}
|
|
@@ -12070,7 +12021,7 @@ program.command("migration").description("Write a construct's next migration: an
|
|
|
12070
12021
|
try {
|
|
12071
12022
|
const globalOptions = program.opts();
|
|
12072
12023
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12073
|
-
const { migrationCommand } = await import("./migrate-
|
|
12024
|
+
const { migrationCommand } = await import("./migrate-CsBZKALY.mjs");
|
|
12074
12025
|
await migrationCommand({
|
|
12075
12026
|
construct,
|
|
12076
12027
|
...name ? { name } : {}
|
|
@@ -12170,7 +12121,7 @@ program.command("secrets:add").description("Build the keys a stage must be given
|
|
|
12170
12121
|
try {
|
|
12171
12122
|
const globalOptions = program.opts();
|
|
12172
12123
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12173
|
-
const { secretsAddCommand } = await import("./add-
|
|
12124
|
+
const { secretsAddCommand } = await import("./add-CP1podDH.mjs");
|
|
12174
12125
|
await secretsAddCommand(options);
|
|
12175
12126
|
} catch (error) {
|
|
12176
12127
|
exitWithError(error);
|
|
@@ -12180,7 +12131,7 @@ program.command("encryption:rotate").description("Add a new current key to an En
|
|
|
12180
12131
|
try {
|
|
12181
12132
|
const globalOptions = program.opts();
|
|
12182
12133
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12183
|
-
const { encryptionRotateCommand } = await import("./encryption-
|
|
12134
|
+
const { encryptionRotateCommand } = await import("./encryption-B6ilrT7p.mjs");
|
|
12184
12135
|
await encryptionRotateCommand(construct, options);
|
|
12185
12136
|
} catch (error) {
|
|
12186
12137
|
exitWithError(error);
|
|
@@ -12190,7 +12141,7 @@ program.command("encryption:retire").description("Remove an old key from an Encr
|
|
|
12190
12141
|
try {
|
|
12191
12142
|
const globalOptions = program.opts();
|
|
12192
12143
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12193
|
-
const { encryptionRetireCommand } = await import("./encryption-
|
|
12144
|
+
const { encryptionRetireCommand } = await import("./encryption-B6ilrT7p.mjs");
|
|
12194
12145
|
await encryptionRetireCommand(construct, key, options);
|
|
12195
12146
|
} catch (error) {
|
|
12196
12147
|
exitWithError(error);
|
|
@@ -12228,8 +12179,8 @@ program.command("secrets:reconcile").description("Backfill missing custom secret
|
|
|
12228
12179
|
const globalOptions = program.opts();
|
|
12229
12180
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12230
12181
|
const { loadWorkspaceConfig } = await import("./config.mjs");
|
|
12231
|
-
const { reconcileMissingSecrets } = await import("./reconcile
|
|
12232
|
-
const { secretsStoreFor } = await import("./seeds-
|
|
12182
|
+
const { reconcileMissingSecrets } = await import("./reconcile--I7V4Klj.mjs");
|
|
12183
|
+
const { secretsStoreFor } = await import("./seeds-BSL55F6q.mjs").then((n) => n.Yn);
|
|
12233
12184
|
const { workspace } = await loadWorkspaceConfig();
|
|
12234
12185
|
const stage = options.stage ?? workspace.stages.local;
|
|
12235
12186
|
const store = await secretsStoreFor(workspace, stage);
|
|
@@ -12238,7 +12189,7 @@ program.command("secrets:reconcile").description("Backfill missing custom secret
|
|
|
12238
12189
|
console.error(`No secrets found for stage "${stage}". Run "gkm secrets:init --stage ${stage}" first.`);
|
|
12239
12190
|
process.exit(1);
|
|
12240
12191
|
}
|
|
12241
|
-
const { derivedContainers } = await import("./seeds-
|
|
12192
|
+
const { derivedContainers } = await import("./seeds-BSL55F6q.mjs").then((n) => n.At);
|
|
12242
12193
|
const result = reconcileMissingSecrets(secrets, workspace, await derivedContainers(workspace, stage));
|
|
12243
12194
|
if (!result) {
|
|
12244
12195
|
console.log(`\n✓ Secrets for stage "${stage}" are up-to-date`);
|
|
@@ -12255,14 +12206,14 @@ program.command("secrets:migrate").description("Copy a deployed stage's secrets
|
|
|
12255
12206
|
try {
|
|
12256
12207
|
const globalOptions = program.opts();
|
|
12257
12208
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12258
|
-
const { secretsMigrateCommand } = await import("./migrate-
|
|
12209
|
+
const { secretsMigrateCommand } = await import("./migrate-BaC4w0sb.mjs");
|
|
12259
12210
|
await secretsMigrateCommand(options);
|
|
12260
12211
|
} catch (error) {
|
|
12261
12212
|
exitWithError(error);
|
|
12262
12213
|
}
|
|
12263
12214
|
});
|
|
12264
12215
|
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-check", "Compose: do not check that each public host resolves to GKM_SERVER_IPV4 in the stage secrets before starting (a CDN or proxy in front)").action(async (options) => {
|
|
12265
|
-
const { deployCli } = await import("./cli-
|
|
12216
|
+
const { deployCli } = await import("./cli-B8otnZfX.mjs");
|
|
12266
12217
|
const globalOptions = program.opts();
|
|
12267
12218
|
const code = await deployCli({
|
|
12268
12219
|
cwd: resolve(globalOptions.cwd ?? process.cwd()),
|
|
@@ -12280,8 +12231,8 @@ program.command("deploy").description("Deploy a stage through its target").optio
|
|
|
12280
12231
|
});
|
|
12281
12232
|
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) => {
|
|
12282
12233
|
try {
|
|
12283
|
-
const { rollbackStage } = await import("./rollback-
|
|
12284
|
-
const { terminalCredentials } = await import("./terminal-
|
|
12234
|
+
const { rollbackStage } = await import("./rollback-Drbg0OeR.mjs").then((n) => n.a);
|
|
12235
|
+
const { terminalCredentials } = await import("./terminal-C4XRdwnU.mjs");
|
|
12285
12236
|
const globalOptions = program.opts();
|
|
12286
12237
|
await rollbackStage({
|
|
12287
12238
|
cwd: resolve(globalOptions.cwd ?? process.cwd()),
|
|
@@ -12314,7 +12265,7 @@ program.command("deploy:github").description("Let GitHub Actions deploy a stage:
|
|
|
12314
12265
|
try {
|
|
12315
12266
|
const globalOptions = program.opts();
|
|
12316
12267
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12317
|
-
const { deployGithubCommand } = await import("./github-
|
|
12268
|
+
const { deployGithubCommand } = await import("./github-CzBbs43W.mjs");
|
|
12318
12269
|
await deployGithubCommand(options);
|
|
12319
12270
|
} catch (error) {
|
|
12320
12271
|
exitWithError(error);
|
|
@@ -12423,6 +12374,15 @@ program.command("state:show").description("Show deployment state for a stage").r
|
|
|
12423
12374
|
exitWithError(error);
|
|
12424
12375
|
}
|
|
12425
12376
|
});
|
|
12377
|
+
program.command("state:history").description("Show who wrote a stage's deploy state, newest first, and what each app runs").requiredOption("--stage <stage>", "Deployment stage (e.g., production, staging)").option("--json", "Output as JSON").action(async (options) => {
|
|
12378
|
+
try {
|
|
12379
|
+
const globalOptions = program.opts();
|
|
12380
|
+
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12381
|
+
await stateHistoryCommand(options);
|
|
12382
|
+
} catch (error) {
|
|
12383
|
+
exitWithError(error);
|
|
12384
|
+
}
|
|
12385
|
+
});
|
|
12426
12386
|
program.command("state:unlock").description("Release a stage deploy lock left behind by a run that crashed").requiredOption("--stage <stage>", "Deployment stage (e.g., production, staging)").action(async (options) => {
|
|
12427
12387
|
try {
|
|
12428
12388
|
const globalOptions = program.opts();
|
|
@@ -12457,6 +12417,6 @@ try {
|
|
|
12457
12417
|
}
|
|
12458
12418
|
program.parse();
|
|
12459
12419
|
//#endregion
|
|
12460
|
-
export {
|
|
12420
|
+
export { validateDokployToken as a, formatError as i, slug as n, canPrompt as o, stamp as r, prompt as s, generateFullstackCustomSecrets as t };
|
|
12461
12421
|
|
|
12462
12422
|
//# sourceMappingURL=index.mjs.map
|