@geekmidas/cli 10.0.0-alpha.75 → 10.0.0-alpha.76
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/{LegacyStateStore-BFnXUFlx.cjs → LegacyStateStore-DwngfJxr.cjs} +2 -2
- package/dist/{LegacyStateStore-BFnXUFlx.cjs.map → LegacyStateStore-DwngfJxr.cjs.map} +1 -1
- package/dist/{LegacyStateStore-cpt3K1vx.mjs → LegacyStateStore-dyq07_Ir.mjs} +2 -2
- package/dist/{LegacyStateStore-cpt3K1vx.mjs.map → LegacyStateStore-dyq07_Ir.mjs.map} +1 -1
- package/dist/{LocalStateStore-zQGZ9b4J.cjs → LocalStateStore-B0NCde8Z.cjs} +2 -2
- package/dist/{LocalStateStore-zQGZ9b4J.cjs.map → LocalStateStore-B0NCde8Z.cjs.map} +1 -1
- package/dist/{LocalStateStore-RH9F2ZEy.mjs → LocalStateStore-DLxCCatI.mjs} +2 -2
- package/dist/{LocalStateStore-RH9F2ZEy.mjs.map → LocalStateStore-DLxCCatI.mjs.map} +1 -1
- package/dist/{S3StateStore-CT-ZMlQY.cjs → S3StateStore-BOenb-3o.cjs} +2 -2
- package/dist/{S3StateStore-CT-ZMlQY.cjs.map → S3StateStore-BOenb-3o.cjs.map} +1 -1
- package/dist/{S3StateStore-DBeBc0c0.mjs → S3StateStore-CGK_4hlo.mjs} +2 -2
- package/dist/{S3StateStore-DBeBc0c0.mjs.map → S3StateStore-CGK_4hlo.mjs.map} +1 -1
- package/dist/{SSMStateStore-rnzNfOaV.mjs → SSMStateStore-B_5_RqY-.mjs} +2 -2
- package/dist/{SSMStateStore-rnzNfOaV.mjs.map → SSMStateStore-B_5_RqY-.mjs.map} +1 -1
- package/dist/{SSMStateStore-HmsH3c4v.cjs → SSMStateStore-DYeD__7p.cjs} +2 -2
- package/dist/{SSMStateStore-HmsH3c4v.cjs.map → SSMStateStore-DYeD__7p.cjs.map} +1 -1
- package/dist/{add-Cvzdw8cf.mjs → add-B7IMXzou.mjs} +3 -3
- package/dist/{add-Cvzdw8cf.mjs.map → add-B7IMXzou.mjs.map} +1 -1
- package/dist/{add-CHBin8TF.cjs → add-j2yI3cbS.cjs} +3 -3
- package/dist/{add-CHBin8TF.cjs.map → add-j2yI3cbS.cjs.map} +1 -1
- package/dist/{aws-DojzQnLd.mjs → aws-Bja4zGSs.mjs} +13 -9
- package/dist/aws-Bja4zGSs.mjs.map +1 -0
- package/dist/{aws-DkHdTV-p.cjs → aws-CQAuluiu.cjs} +13 -9
- package/dist/aws-CQAuluiu.cjs.map +1 -0
- package/dist/awsStore-7VmS_cZR.cjs +54 -0
- package/dist/awsStore-7VmS_cZR.cjs.map +1 -0
- package/dist/awsStore-B529csle.mjs +43 -0
- package/dist/awsStore-B529csle.mjs.map +1 -0
- package/dist/{bundler-_8AEZhrs.cjs → bundler-Cf6OgaOe.cjs} +5 -5
- package/dist/bundler-Cf6OgaOe.cjs.map +1 -0
- package/dist/{bundler-xjp5RwRS.mjs → bundler-DO6bHhnb.mjs} +5 -5
- package/dist/bundler-DO6bHhnb.mjs.map +1 -0
- package/dist/{cli-BTGfA0B7.mjs → cli-BCPOHmg9.mjs} +3 -3
- package/dist/{cli-BTGfA0B7.mjs.map → cli-BCPOHmg9.mjs.map} +1 -1
- package/dist/{cli-B4ktxAsM.cjs → cli-CNanUB7a.cjs} +3 -3
- package/dist/{cli-B4ktxAsM.cjs.map → cli-CNanUB7a.cjs.map} +1 -1
- package/dist/{compose-DdH2JQJD.mjs → compose-Dq4VCtu5.mjs} +4 -3
- package/dist/compose-Dq4VCtu5.mjs.map +1 -0
- package/dist/{compose-UKyv_1yU.cjs → compose-h_6oNnHC.cjs} +4 -3
- package/dist/compose-h_6oNnHC.cjs.map +1 -0
- package/dist/{config-B38YWicj.d.cts → config-CWyhLSY1.d.cts} +3 -3
- package/dist/{config-B38YWicj.d.cts.map → config-CWyhLSY1.d.cts.map} +1 -1
- package/dist/{config-DA0kRTQe.d.mts → config-CqAvPP-f.d.mts} +3 -3
- package/dist/{config-DA0kRTQe.d.mts.map → config-CqAvPP-f.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 +6 -6
- package/dist/deploy/public.d.cts +3 -3
- package/dist/deploy/public.d.cts.map +1 -1
- package/dist/deploy/public.d.mts +3 -3
- package/dist/deploy/public.d.mts.map +1 -1
- package/dist/deploy/public.mjs +6 -6
- package/dist/{deploy-XUZoA1us.cjs → deploy-CT3R9de9.cjs} +5 -5
- package/dist/{deploy-XUZoA1us.cjs.map → deploy-CT3R9de9.cjs.map} +1 -1
- package/dist/{deploy-CuSsiFIc.mjs → deploy-CVXEx7Nm.mjs} +5 -5
- package/dist/{deploy-CuSsiFIc.mjs.map → deploy-CVXEx7Nm.mjs.map} +1 -1
- package/dist/{dokploy-DZXTQX10.mjs → dokploy-CYm2ozFs.mjs} +2 -2
- package/dist/{dokploy-DZXTQX10.mjs.map → dokploy-CYm2ozFs.mjs.map} +1 -1
- package/dist/{dokploy-Cvgg_pID.cjs → dokploy-eSGmlhhj.cjs} +2 -2
- package/dist/{dokploy-Cvgg_pID.cjs.map → dokploy-eSGmlhhj.cjs.map} +1 -1
- package/dist/{encryption-JkeMPugf.mjs → encryption-DC0rsR1W.mjs} +3 -3
- package/dist/{encryption-JkeMPugf.mjs.map → encryption-DC0rsR1W.mjs.map} +1 -1
- package/dist/{encryption-w-Ehh9DW.cjs → encryption-vS3Qzw73.cjs} +3 -3
- package/dist/{encryption-w-Ehh9DW.cjs.map → encryption-vS3Qzw73.cjs.map} +1 -1
- package/dist/{engine-CmozkHxq.mjs → engine-BOO5TWZd.mjs} +4 -4
- package/dist/{engine-CmozkHxq.mjs.map → engine-BOO5TWZd.mjs.map} +1 -1
- package/dist/{engine-zpWBMsQq.cjs → engine-C0N2d1i5.cjs} +4 -4
- package/dist/{engine-zpWBMsQq.cjs.map → engine-C0N2d1i5.cjs.map} +1 -1
- package/dist/{github-BNngHoId.mjs → github-CEaFDL6t.mjs} +6 -6
- package/dist/github-CEaFDL6t.mjs.map +1 -0
- package/dist/{github-BGdJ-Lnm.cjs → github-ClkdCOL9.cjs} +6 -6
- package/dist/github-ClkdCOL9.cjs.map +1 -0
- package/dist/{index-vMidfqhU.d.cts → index-Ccu0f_2m.d.cts} +2 -2
- package/dist/{index-B-1lLGzy.d.mts.map → index-Ccu0f_2m.d.cts.map} +1 -1
- package/dist/{index-B-1lLGzy.d.mts → index-DOxmDKqv.d.mts} +2 -2
- package/dist/{index-vMidfqhU.d.cts.map → index-DOxmDKqv.d.mts.map} +1 -1
- package/dist/index.cjs +79 -50
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +79 -50
- package/dist/index.mjs.map +1 -1
- package/dist/migrate-BRbYtFXG.cjs +93 -0
- package/dist/migrate-BRbYtFXG.cjs.map +1 -0
- package/dist/migrate-D3NAT7Ns.mjs +93 -0
- package/dist/migrate-D3NAT7Ns.mjs.map +1 -0
- package/dist/{migrate-CgjlYeun.cjs → migrate-D5_-ylI1.cjs} +3 -3
- package/dist/{migrate-CgjlYeun.cjs.map → migrate-D5_-ylI1.cjs.map} +1 -1
- package/dist/{migrate-BLL1RTAj.mjs → migrate-DrO2p9Rl.mjs} +3 -3
- package/dist/{migrate-BLL1RTAj.mjs.map → migrate-DrO2p9Rl.mjs.map} +1 -1
- package/dist/openapi.cjs +16 -6
- package/dist/openapi.cjs.map +1 -1
- package/dist/openapi.d.cts +1 -1
- package/dist/openapi.d.cts.map +1 -1
- package/dist/openapi.d.mts +1 -1
- package/dist/openapi.d.mts.map +1 -1
- package/dist/openapi.mjs +16 -6
- package/dist/openapi.mjs.map +1 -1
- package/dist/reconcile/public.d.cts +1 -1
- package/dist/reconcile/public.d.mts +1 -1
- package/dist/{resolve-DZNx7rLy.mjs → resolve-C1muFos5.mjs} +3 -3
- package/dist/{resolve-DZNx7rLy.mjs.map → resolve-C1muFos5.mjs.map} +1 -1
- package/dist/{resolve-fevXn-wZ.cjs → resolve-Fa1Ii0BK.cjs} +3 -3
- package/dist/{resolve-fevXn-wZ.cjs.map → resolve-Fa1Ii0BK.cjs.map} +1 -1
- package/dist/{rollback-Dw-FW3X2.cjs → rollback-C9N5lKVf.cjs} +5 -5
- package/dist/{rollback-Dw-FW3X2.cjs.map → rollback-C9N5lKVf.cjs.map} +1 -1
- package/dist/{rollback-CLi5Pln_.mjs → rollback-DeQzbRqM.mjs} +5 -5
- package/dist/{rollback-CLi5Pln_.mjs.map → rollback-DeQzbRqM.mjs.map} +1 -1
- package/dist/{runtime-BzZD5HHi.d.cts → runtime-BSvzPqXW.d.mts} +2 -2
- package/dist/{runtime-BzZD5HHi.d.cts.map → runtime-BSvzPqXW.d.mts.map} +1 -1
- package/dist/{runtime-Cm6J6L7n.d.mts → runtime-Cm7QA53H.d.cts} +2 -2
- package/dist/{runtime-Cm6J6L7n.d.mts.map → runtime-Cm7QA53H.d.cts.map} +1 -1
- package/dist/secretsManager-DUXW3fQt.cjs +70 -0
- package/dist/secretsManager-DUXW3fQt.cjs.map +1 -0
- package/dist/secretsManager-Ti0oZwsS.mjs +70 -0
- package/dist/secretsManager-Ti0oZwsS.mjs.map +1 -0
- package/dist/{sniffer-BmCvVyhq.mjs → sniffer-DR8AlRCk.mjs} +17 -17
- package/dist/sniffer-DR8AlRCk.mjs.map +1 -0
- package/dist/{sniffer-bMzrX4cO.cjs → sniffer-Y6GQOCXB.cjs} +17 -17
- package/dist/sniffer-Y6GQOCXB.cjs.map +1 -0
- package/dist/{state-kA4Fkufx.cjs → state-C2qi0iQw.cjs} +187 -24
- package/dist/state-C2qi0iQw.cjs.map +1 -0
- package/dist/{state-BrWIOce_.mjs → state-CUecOCNJ.mjs} +170 -25
- package/dist/state-CUecOCNJ.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/{types-TzCChNrA.d.cts → types-BdptGBFS.d.cts} +59 -6
- package/dist/types-BdptGBFS.d.cts.map +1 -0
- package/dist/{types-Dp9lgx_S.d.mts → types-OxE0OAn2.d.mts} +59 -6
- package/dist/types-OxE0OAn2.d.mts.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-vdrcRI-m.cjs → workspace-DOm81oUo.cjs} +54 -1
- package/dist/workspace-DOm81oUo.cjs.map +1 -0
- package/dist/{workspace-C7NqCsQF.mjs → workspace-QUTqYmVy.mjs} +43 -2
- package/dist/workspace-QUTqYmVy.mjs.map +1 -0
- package/package.json +16 -15
- package/dist/aws-DkHdTV-p.cjs.map +0 -1
- package/dist/aws-DojzQnLd.mjs.map +0 -1
- package/dist/bundler-_8AEZhrs.cjs.map +0 -1
- package/dist/bundler-xjp5RwRS.mjs.map +0 -1
- package/dist/compose-DdH2JQJD.mjs.map +0 -1
- package/dist/compose-UKyv_1yU.cjs.map +0 -1
- package/dist/github-BGdJ-Lnm.cjs.map +0 -1
- package/dist/github-BNngHoId.mjs.map +0 -1
- package/dist/sniffer-BmCvVyhq.mjs.map +0 -1
- package/dist/sniffer-bMzrX4cO.cjs.map +0 -1
- package/dist/state-BrWIOce_.mjs.map +0 -1
- package/dist/state-kA4Fkufx.cjs.map +0 -1
- package/dist/types-Dp9lgx_S.d.mts.map +0 -1
- package/dist/types-TzCChNrA.d.cts.map +0 -1
- package/dist/workspace-C7NqCsQF.mjs.map +0 -1
- package/dist/workspace-vdrcRI-m.cjs.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -4,20 +4,20 @@ import { r as DEFAULT_TIMEOUT_MS, t as CommandFailed } from "./run-BJLIerMM.mjs"
|
|
|
4
4
|
import { c as getDokployCredentials, f as removeDokployCredentials, i as LocalSandbox, l as getDokployRegistryId, m as storeHostingerToken, p as storeDokployCredentials, s as getCredentialsPath, u as getDokployToken } from "./credentials-pAtB70k3.mjs";
|
|
5
5
|
import { l as withOwningTsconfigJsx, r as discover, u as ConstructGenerator } from "./discover-BPelzeGW.mjs";
|
|
6
6
|
import { t as appKey } from "./derive-B4vDpzgP.mjs";
|
|
7
|
-
import { A as deployedProblems, D as InvalidStages, O as TEST_STAGE, c as getAppGkmConfig, j as stageProblems, n as allConstructGlobs, s as getAppBuildOrder } from "./workspace-
|
|
7
|
+
import { A as deployedProblems, D as InvalidStages, O as TEST_STAGE, c as getAppGkmConfig, j as stageProblems, n as allConstructGlobs, s as getAppBuildOrder } from "./workspace-QUTqYmVy.mjs";
|
|
8
8
|
import { ConfigNotFound, NotABackendApp, NotInAnApp, loadAppConfig, loadConfig, loadWorkspaceConfig, loadWorkspaceSettings, parseModuleConfig } from "./config.mjs";
|
|
9
|
-
import { $ as LOCAL_CA_PATH,
|
|
9
|
+
import { $ as LOCAL_CA_PATH, At as providerOf, Bt as isPortAvailable, Dt as isImageBuild, Et as imageBuildCredentials, G as QueueGenerator, Gt as secretsStoreFor, H as WorkerGenerator, Ht as loadSecretsForApp, It as primaryPortKey, J as backendsOf$1, Jt as FileSecretsStore, K as CronGenerator, L as parseDevServices, Lt as createCredentialsPreload, Nt as describeServices, Ot as cacheBackendFor, Pt as fakeKey, Rt as createEntryWrapper, U as workerBundleName, Ut as prepareEntryCredentials, V as workerUnits, Vt as loadEnvFiles, W as workerEntryDir, X as derivedContainers, Y as constructGlobs, Yt as getKeyPath, Z as reconcileWorkspace, Zt as projectKey, at as postgresDatabaseNames, cn as maskPassword, dn as withCustomSecret, en as deployIdentity, et as forgetState, kt as eventsBackendFor, q as FAKE_ENV, st as quoteIdentifier, un as toEmbeddableSecrets, ut as pgClient, v as dockerCommand, zt as findAvailablePort } from "./state-CUecOCNJ.mjs";
|
|
10
10
|
import { i as telemetryFor, n as runtimeFor, t as EndpointGenerator } from "./EndpointGenerator-DftalLYg.mjs";
|
|
11
|
-
import { g as createStateStore, n as sniffAppEnvironment, o as DokployApi, x as keyFingerprint } from "./sniffer-BmCvVyhq.mjs";
|
|
12
11
|
import { generateOpenApi, openapiCommand, resolveOpenApiConfig } from "./openapi.mjs";
|
|
13
12
|
import { s as isCacheBackend, t as SubscriberGenerator } from "./SubscriberGenerator-5looQ3gB.mjs";
|
|
14
13
|
import { a as describeHolder, i as assignAppPorts, o as holderOf, r as appTag, s as withAppPorts, t as APP_TAG_ENV } from "./appPorts-C9z9Pzn9.mjs";
|
|
15
14
|
import { n as driversFor, r as eventsBackendsIn, t as cacheBackendsIn } from "./drivers-Ch1rJitn.mjs";
|
|
16
15
|
import { n as withCompute, r as withRoutes, t as manifestModule } from "./emit-C1e8qD08.mjs";
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
16
|
+
import { g as createStateStore, n as sniffAppEnvironment, o as DokployApi, x as keyFingerprint } from "./sniffer-DR8AlRCk.mjs";
|
|
17
|
+
import { t as deploy$1 } from "./deploy-CVXEx7Nm.mjs";
|
|
18
|
+
import { a as stackOverrideFile, c as parseDigests, i as ComposePushNeedsBuild, l as pinnedRef, o as composeProject, r as ComposePinNeedsPull, s as stackDir, t as composeTarget, u as dockerCompose } from "./compose-Dq4VCtu5.mjs";
|
|
19
19
|
import { o as loadCredentialSchemas, t as CredentialsInvalid } from "./credentialSchemas-BJqRJNK4.mjs";
|
|
20
|
-
import { t as LocalStateStore } from "./LocalStateStore-
|
|
20
|
+
import { t as LocalStateStore } from "./LocalStateStore-DLxCCatI.mjs";
|
|
21
21
|
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";
|
|
22
22
|
import { a as writeTestHarness, i as TEST_MANIFEST_ENV, n as TEST_READY_FILE, t as TEST_READY_ENV } from "./ready-ZZoNskrr.mjs";
|
|
23
23
|
import { createRequire } from "node:module";
|
|
@@ -47,7 +47,7 @@ import crypto from "crypto";
|
|
|
47
47
|
import { Function } from "@geekmidas/constructs/functions";
|
|
48
48
|
import { Topic } from "@geekmidas/constructs/topic";
|
|
49
49
|
//#region package.json
|
|
50
|
-
var version = "10.0.0-alpha.
|
|
50
|
+
var version = "10.0.0-alpha.76";
|
|
51
51
|
//#endregion
|
|
52
52
|
//#region src/prompt.ts
|
|
53
53
|
/**
|
|
@@ -130,7 +130,7 @@ const logger$8 = console;
|
|
|
130
130
|
* Validate Dokploy token by making a test API call
|
|
131
131
|
*/
|
|
132
132
|
async function validateDokployToken(endpoint, token) {
|
|
133
|
-
const { DokployApi } = await import("./sniffer-
|
|
133
|
+
const { DokployApi } = await import("./sniffer-DR8AlRCk.mjs").then((n) => n.c);
|
|
134
134
|
return new DokployApi({
|
|
135
135
|
baseUrl: endpoint,
|
|
136
136
|
token
|
|
@@ -1527,10 +1527,10 @@ async function execCommand(commandArgs, options = {}) {
|
|
|
1527
1527
|
if (!commandArgs[0]) throw new NoCommandSpecified();
|
|
1528
1528
|
const defaultEnv = loadEnvFiles(".env");
|
|
1529
1529
|
if (defaultEnv.loaded.length > 0) logger$6.log(`📦 Loaded env: ${defaultEnv.loaded.join(", ")}`);
|
|
1530
|
-
const { credentials, secretsJsonPath, appName } = await prepareEntryCredentials({ cwd });
|
|
1530
|
+
const { credentials, secretsJsonPath, appName } = isImageBuild() ? await imageBuildEntry(cwd) : await prepareEntryCredentials({ cwd });
|
|
1531
1531
|
if (appName) logger$6.log(`📦 App: ${appName}`);
|
|
1532
1532
|
const secretCount = Object.keys(credentials).filter((k) => k !== "PORT").length;
|
|
1533
|
-
if (secretCount > 0) logger$6.log(`🔐 Loaded ${secretCount} secret(s)`);
|
|
1533
|
+
if (secretCount > 0 && !isImageBuild()) logger$6.log(`🔐 Loaded ${secretCount} secret(s)`);
|
|
1534
1534
|
const preloadDir = join(cwd, ".gkm");
|
|
1535
1535
|
await mkdir(preloadDir, { recursive: true });
|
|
1536
1536
|
const preloadPath = join(preloadDir, "credentials-preload.mjs");
|
|
@@ -1556,6 +1556,23 @@ async function execCommand(commandArgs, options = {}) {
|
|
|
1556
1556
|
});
|
|
1557
1557
|
if (exitCode !== 0) process.exit(exitCode);
|
|
1558
1558
|
}
|
|
1559
|
+
/**
|
|
1560
|
+
* `gkm exec` inside an image build: the public values the Dockerfile's build
|
|
1561
|
+
* args set, written where the preload reads them. No workspace is loaded, no
|
|
1562
|
+
* secret read and no address resolved.
|
|
1563
|
+
*/
|
|
1564
|
+
async function imageBuildEntry(cwd) {
|
|
1565
|
+
const credentials = imageBuildCredentials();
|
|
1566
|
+
logger$6.log(`🐳 Image build: ${Object.keys(credentials).length} public value(s) from the build args`);
|
|
1567
|
+
const dir = join(cwd, ".gkm");
|
|
1568
|
+
await mkdir(dir, { recursive: true });
|
|
1569
|
+
const secretsJsonPath = join(dir, "image-build-env.json");
|
|
1570
|
+
await writeFile(secretsJsonPath, JSON.stringify(credentials, null, 2));
|
|
1571
|
+
return {
|
|
1572
|
+
credentials,
|
|
1573
|
+
secretsJsonPath
|
|
1574
|
+
};
|
|
1575
|
+
}
|
|
1559
1576
|
//#endregion
|
|
1560
1577
|
//#region src/dev/index.ts
|
|
1561
1578
|
const logger$5 = console;
|
|
@@ -2036,9 +2053,9 @@ async function workspaceDevCommand(configured, options) {
|
|
|
2036
2053
|
for (const { id, port } of fakes) logger$5.log(`🎭 ${id} fake: http://localhost:${port}`);
|
|
2037
2054
|
logger$5.log(options.migrate || options.seed ? "🗄️ Migrating the databases" : "🗄️ Checking for pending migrations");
|
|
2038
2055
|
if (options.migrate || options.seed) {
|
|
2039
|
-
const { prepareDevDatabases } = await import("./migrate-
|
|
2056
|
+
const { prepareDevDatabases } = await import("./migrate-DrO2p9Rl.mjs");
|
|
2040
2057
|
await prepareDevDatabases(workspace, reconciled.env, { seed: !!options.seed });
|
|
2041
|
-
} else await import("./migrate-
|
|
2058
|
+
} else await import("./migrate-DrO2p9Rl.mjs").then(({ reportPendingMigrations }) => reportPendingMigrations(workspace, reconciled.env)).catch((error) => {
|
|
2042
2059
|
logger$5.log(`⚠️ Could not check for pending migrations: ${error instanceof Error ? error.message : String(error)}`);
|
|
2043
2060
|
});
|
|
2044
2061
|
const appUrls = {};
|
|
@@ -3046,7 +3063,7 @@ async function buildApp(input) {
|
|
|
3046
3063
|
if (production?.bundle && !input.skipBundle) {
|
|
3047
3064
|
const outputDir = join(appRoot, ".gkm", "server");
|
|
3048
3065
|
const entryPoint = await writeSurfaceServer(outputDir, production);
|
|
3049
|
-
const { bundleServer } = await import("./bundler-
|
|
3066
|
+
const { bundleServer } = await import("./bundler-DO6bHhnb.mjs");
|
|
3050
3067
|
await bundleServer({
|
|
3051
3068
|
entryPoint,
|
|
3052
3069
|
outputDir: join(outputDir, "dist"),
|
|
@@ -3170,7 +3187,7 @@ async function buildWorkers(input) {
|
|
|
3170
3187
|
});
|
|
3171
3188
|
logger$4.log(`Generated worker ${worker.id}: ${crons.length} crons, ${queues.length} queues, ${subscribers.length} subscribers`);
|
|
3172
3189
|
if (!input.bundle) continue;
|
|
3173
|
-
const { bundleServer } = await import("./bundler-
|
|
3190
|
+
const { bundleServer } = await import("./bundler-DO6bHhnb.mjs");
|
|
3174
3191
|
const outfile = workerBundleName(worker.id);
|
|
3175
3192
|
await bundleServer({
|
|
3176
3193
|
entryPoint,
|
|
@@ -3240,7 +3257,7 @@ async function buildForTarget(target, context, appRoot, workspaceRoot, endpointG
|
|
|
3240
3257
|
let masterKey;
|
|
3241
3258
|
if (context.production?.bundle && !skipBundle) {
|
|
3242
3259
|
logger$4.log(`\n📦 Bundling production server...`);
|
|
3243
|
-
const { bundleServer } = await import("./bundler-
|
|
3260
|
+
const { bundleServer } = await import("./bundler-DO6bHhnb.mjs");
|
|
3244
3261
|
const allConstructs = [
|
|
3245
3262
|
...endpoints.map((e) => e.construct),
|
|
3246
3263
|
...functions.map((f) => f.construct),
|
|
@@ -4964,25 +4981,25 @@ function loadPackageJson() {
|
|
|
4964
4981
|
* Run: pnpm --filter @geekmidas/cli sync-versions
|
|
4965
4982
|
*/
|
|
4966
4983
|
const GEEKMIDAS_VERSIONS = {
|
|
4967
|
-
"@geekmidas/audit": "~10.0.0-alpha.
|
|
4968
|
-
"@geekmidas/auth": "~10.0.0-alpha.
|
|
4969
|
-
"@geekmidas/cache": "~10.0.0-alpha.
|
|
4970
|
-
"@geekmidas/client": "~10.0.0-alpha.
|
|
4971
|
-
"@geekmidas/cloud": "~10.0.0-alpha.
|
|
4972
|
-
"@geekmidas/constructs": "~10.0.0-alpha.
|
|
4973
|
-
"@geekmidas/db": "~10.0.0-alpha.
|
|
4974
|
-
"@geekmidas/emailkit": "~10.0.0-alpha.
|
|
4975
|
-
"@geekmidas/envkit": "~10.0.0-alpha.
|
|
4976
|
-
"@geekmidas/errors": "~10.0.0-alpha.
|
|
4977
|
-
"@geekmidas/events": "~10.0.0-alpha.
|
|
4978
|
-
"@geekmidas/logger": "~10.0.0-alpha.
|
|
4979
|
-
"@geekmidas/manifest": "~10.0.0-alpha.
|
|
4980
|
-
"@geekmidas/rate-limit": "~10.0.0-alpha.
|
|
4981
|
-
"@geekmidas/schema": "~10.0.0-alpha.
|
|
4982
|
-
"@geekmidas/services": "~10.0.0-alpha.
|
|
4983
|
-
"@geekmidas/storage": "~10.0.0-alpha.
|
|
4984
|
-
"@geekmidas/telescope": "~10.0.0-alpha.
|
|
4985
|
-
"@geekmidas/testkit": "~10.0.0-alpha.
|
|
4984
|
+
"@geekmidas/audit": "~10.0.0-alpha.76",
|
|
4985
|
+
"@geekmidas/auth": "~10.0.0-alpha.76",
|
|
4986
|
+
"@geekmidas/cache": "~10.0.0-alpha.76",
|
|
4987
|
+
"@geekmidas/client": "~10.0.0-alpha.76",
|
|
4988
|
+
"@geekmidas/cloud": "~10.0.0-alpha.76",
|
|
4989
|
+
"@geekmidas/constructs": "~10.0.0-alpha.76",
|
|
4990
|
+
"@geekmidas/db": "~10.0.0-alpha.76",
|
|
4991
|
+
"@geekmidas/emailkit": "~10.0.0-alpha.76",
|
|
4992
|
+
"@geekmidas/envkit": "~10.0.0-alpha.76",
|
|
4993
|
+
"@geekmidas/errors": "~10.0.0-alpha.76",
|
|
4994
|
+
"@geekmidas/events": "~10.0.0-alpha.76",
|
|
4995
|
+
"@geekmidas/logger": "~10.0.0-alpha.76",
|
|
4996
|
+
"@geekmidas/manifest": "~10.0.0-alpha.76",
|
|
4997
|
+
"@geekmidas/rate-limit": "~10.0.0-alpha.76",
|
|
4998
|
+
"@geekmidas/schema": "~10.0.0-alpha.76",
|
|
4999
|
+
"@geekmidas/services": "~10.0.0-alpha.76",
|
|
5000
|
+
"@geekmidas/storage": "~10.0.0-alpha.76",
|
|
5001
|
+
"@geekmidas/telescope": "~10.0.0-alpha.76",
|
|
5002
|
+
"@geekmidas/testkit": "~10.0.0-alpha.76",
|
|
4986
5003
|
"@geekmidas/cli": `~${loadPackageJson().version}`
|
|
4987
5004
|
};
|
|
4988
5005
|
//#endregion
|
|
@@ -7040,6 +7057,7 @@ function secretsStore(options) {
|
|
|
7040
7057
|
return `
|
|
7041
7058
|
// Deployed stages keep their secrets in SSM, in the account each stage
|
|
7042
7059
|
// deploys to: \`gkm secrets:set <KEY> '…' --stage <stage>\` writes there.
|
|
7060
|
+
// Past 8 KB a stage needs { provider: 'secrets-manager', region } instead.
|
|
7043
7061
|
store: { provider: 'ssm', region: '${options.region}' },`;
|
|
7044
7062
|
}
|
|
7045
7063
|
/**
|
|
@@ -10135,8 +10153,8 @@ ${dbPasswordEntries.map(([key, value]) => `${key}=${value}`).join("\n")}
|
|
|
10135
10153
|
//#region src/secrets/index.ts
|
|
10136
10154
|
const logger$2 = console;
|
|
10137
10155
|
/**
|
|
10138
|
-
* The store the stage named on the command line keeps its secrets in — SSM
|
|
10139
|
-
* its account, for a deployed stage kept there. Outside any workspace nothing
|
|
10156
|
+
* The store the stage named on the command line keeps its secrets in — SSM or
|
|
10157
|
+
* Secrets Manager in its account, for a deployed stage kept there. Outside any workspace nothing
|
|
10140
10158
|
* names a store, so it is the file.
|
|
10141
10159
|
*/
|
|
10142
10160
|
async function storeFor(stage) {
|
|
@@ -10372,7 +10390,7 @@ const logger$1 = console;
|
|
|
10372
10390
|
*
|
|
10373
10391
|
* Orchestrates:
|
|
10374
10392
|
* 1. Load workspace config
|
|
10375
|
-
* 2. Resolve secrets (local →
|
|
10393
|
+
* 2. Resolve secrets (local → the stage's store → generate fresh)
|
|
10376
10394
|
* 3. Write docker/.env from secrets
|
|
10377
10395
|
* 4. Start Docker services
|
|
10378
10396
|
*/
|
|
@@ -10540,7 +10558,7 @@ function reconcileSecrets(secrets, workspace, containers = []) {
|
|
|
10540
10558
|
/**
|
|
10541
10559
|
* Build a fresh StageSecrets object for a workspace: service credentials,
|
|
10542
10560
|
* connection URLs, and custom secrets. Pure — does not write to disk or touch
|
|
10543
|
-
*
|
|
10561
|
+
* any store. Service passwords are freshly randomized, so the result must be the same
|
|
10544
10562
|
* one used to start the matching Docker containers.
|
|
10545
10563
|
* @internal Exported for reuse by `gkm test` auto-setup.
|
|
10546
10564
|
*/
|
|
@@ -10773,7 +10791,7 @@ function testDatabases(reconciled) {
|
|
|
10773
10791
|
* starts without the reference data the app needs.
|
|
10774
10792
|
*/
|
|
10775
10793
|
async function migrateTestStage(workspace, env) {
|
|
10776
|
-
const { migrateAndSeed } = await import("./migrate-
|
|
10794
|
+
const { migrateAndSeed } = await import("./migrate-DrO2p9Rl.mjs");
|
|
10777
10795
|
const { discover } = await import("./discover-BPelzeGW.mjs").then((n) => n.i);
|
|
10778
10796
|
const sources = {};
|
|
10779
10797
|
const manifest = await discover({
|
|
@@ -11206,7 +11224,7 @@ program.command("migrate").description("Apply each database construct's migratio
|
|
|
11206
11224
|
try {
|
|
11207
11225
|
const globalOptions = program.opts();
|
|
11208
11226
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
11209
|
-
const { migrateCommand } = await import("./migrate-
|
|
11227
|
+
const { migrateCommand } = await import("./migrate-DrO2p9Rl.mjs");
|
|
11210
11228
|
await migrateCommand({
|
|
11211
11229
|
...options,
|
|
11212
11230
|
...construct ? { construct } : {}
|
|
@@ -11220,7 +11238,7 @@ program.command("seed").description("Migrate, then run each database construct's
|
|
|
11220
11238
|
try {
|
|
11221
11239
|
const globalOptions = program.opts();
|
|
11222
11240
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
11223
|
-
const { seedCommand } = await import("./migrate-
|
|
11241
|
+
const { seedCommand } = await import("./migrate-DrO2p9Rl.mjs");
|
|
11224
11242
|
await seedCommand({
|
|
11225
11243
|
...options,
|
|
11226
11244
|
...construct ? { construct } : {}
|
|
@@ -11234,7 +11252,7 @@ program.command("migration").description("Write a construct's next migration: an
|
|
|
11234
11252
|
try {
|
|
11235
11253
|
const globalOptions = program.opts();
|
|
11236
11254
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
11237
|
-
const { migrationCommand } = await import("./migrate-
|
|
11255
|
+
const { migrationCommand } = await import("./migrate-DrO2p9Rl.mjs");
|
|
11238
11256
|
await migrationCommand({
|
|
11239
11257
|
construct,
|
|
11240
11258
|
...name ? { name } : {}
|
|
@@ -11328,7 +11346,7 @@ program.command("secrets:add").description("Build the keys a stage must be given
|
|
|
11328
11346
|
try {
|
|
11329
11347
|
const globalOptions = program.opts();
|
|
11330
11348
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
11331
|
-
const { secretsAddCommand } = await import("./add-
|
|
11349
|
+
const { secretsAddCommand } = await import("./add-B7IMXzou.mjs");
|
|
11332
11350
|
await secretsAddCommand(options);
|
|
11333
11351
|
} catch (error) {
|
|
11334
11352
|
console.error(formatError(error));
|
|
@@ -11339,7 +11357,7 @@ program.command("encryption:rotate").description("Add a new current key to an En
|
|
|
11339
11357
|
try {
|
|
11340
11358
|
const globalOptions = program.opts();
|
|
11341
11359
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
11342
|
-
const { encryptionRotateCommand } = await import("./encryption-
|
|
11360
|
+
const { encryptionRotateCommand } = await import("./encryption-DC0rsR1W.mjs");
|
|
11343
11361
|
await encryptionRotateCommand(construct, options);
|
|
11344
11362
|
} catch (error) {
|
|
11345
11363
|
console.error(formatError(error));
|
|
@@ -11350,7 +11368,7 @@ program.command("encryption:retire").description("Remove an old key from an Encr
|
|
|
11350
11368
|
try {
|
|
11351
11369
|
const globalOptions = program.opts();
|
|
11352
11370
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
11353
|
-
const { encryptionRetireCommand } = await import("./encryption-
|
|
11371
|
+
const { encryptionRetireCommand } = await import("./encryption-DC0rsR1W.mjs");
|
|
11354
11372
|
await encryptionRetireCommand(construct, key, options);
|
|
11355
11373
|
} catch (error) {
|
|
11356
11374
|
console.error(formatError(error));
|
|
@@ -11393,7 +11411,7 @@ program.command("secrets:reconcile").description("Backfill missing custom secret
|
|
|
11393
11411
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
11394
11412
|
const { loadWorkspaceConfig } = await import("./config.mjs");
|
|
11395
11413
|
const { reconcileMissingSecrets } = await import("./reconcile--I7V4Klj.mjs");
|
|
11396
|
-
const { secretsStoreFor } = await import("./state-
|
|
11414
|
+
const { secretsStoreFor } = await import("./state-CUecOCNJ.mjs").then((n) => n.qt);
|
|
11397
11415
|
const { workspace } = await loadWorkspaceConfig();
|
|
11398
11416
|
const stage = options.stage ?? workspace.stages.local;
|
|
11399
11417
|
const store = await secretsStoreFor(workspace, stage);
|
|
@@ -11402,7 +11420,7 @@ program.command("secrets:reconcile").description("Backfill missing custom secret
|
|
|
11402
11420
|
console.error(`No secrets found for stage "${stage}". Run "gkm secrets:init --stage ${stage}" first.`);
|
|
11403
11421
|
process.exit(1);
|
|
11404
11422
|
}
|
|
11405
|
-
const { derivedContainers } = await import("./state-
|
|
11423
|
+
const { derivedContainers } = await import("./state-CUecOCNJ.mjs").then((n) => n.Q);
|
|
11406
11424
|
const result = reconcileMissingSecrets(secrets, workspace, await derivedContainers(workspace, stage));
|
|
11407
11425
|
if (!result) {
|
|
11408
11426
|
console.log(`\n✓ Secrets for stage "${stage}" are up-to-date`);
|
|
@@ -11416,8 +11434,19 @@ program.command("secrets:reconcile").description("Backfill missing custom secret
|
|
|
11416
11434
|
process.exit(1);
|
|
11417
11435
|
}
|
|
11418
11436
|
});
|
|
11437
|
+
program.command("secrets:migrate").description("Copy a deployed stage's secrets from the configured store to another (file, ssm, secrets-manager)").requiredOption("--stage <stage>", "A deployed stage").requiredOption("--to <provider>", "file, ssm or secrets-manager").option("--region <region>", "The target's AWS region (default: the configured store's)").option("--profile <profile>", "AWS profile for the stage's account").option("--force", "Replace a stage the target already holds").action(async (options) => {
|
|
11438
|
+
try {
|
|
11439
|
+
const globalOptions = program.opts();
|
|
11440
|
+
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
11441
|
+
const { secretsMigrateCommand } = await import("./migrate-D3NAT7Ns.mjs");
|
|
11442
|
+
await secretsMigrateCommand(options);
|
|
11443
|
+
} catch (error) {
|
|
11444
|
+
console.error(formatError(error));
|
|
11445
|
+
process.exit(1);
|
|
11446
|
+
}
|
|
11447
|
+
});
|
|
11419
11448
|
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 <list>", "Server targets: run MinIO and/or Mailpit (minio,mailpit) for mail and buckets the stage's secrets don't configure. Not production-grade").action(async (options) => {
|
|
11420
|
-
const { deployCli } = await import("./cli-
|
|
11449
|
+
const { deployCli } = await import("./cli-BCPOHmg9.mjs");
|
|
11421
11450
|
const globalOptions = program.opts();
|
|
11422
11451
|
const code = await deployCli({
|
|
11423
11452
|
cwd: resolve(globalOptions.cwd ?? process.cwd()),
|
|
@@ -11434,7 +11463,7 @@ program.command("deploy").description("Deploy a stage through its target").optio
|
|
|
11434
11463
|
});
|
|
11435
11464
|
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) => {
|
|
11436
11465
|
try {
|
|
11437
|
-
const { rollbackStage } = await import("./rollback-
|
|
11466
|
+
const { rollbackStage } = await import("./rollback-DeQzbRqM.mjs").then((n) => n.a);
|
|
11438
11467
|
const { terminalCredentials } = await import("./terminal-BdvrmkaC.mjs");
|
|
11439
11468
|
const globalOptions = program.opts();
|
|
11440
11469
|
await rollbackStage({
|
|
@@ -11470,7 +11499,7 @@ program.command("deploy:github").description("Let GitHub Actions deploy a stage:
|
|
|
11470
11499
|
try {
|
|
11471
11500
|
const globalOptions = program.opts();
|
|
11472
11501
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
11473
|
-
const { deployGithubCommand } = await import("./github-
|
|
11502
|
+
const { deployGithubCommand } = await import("./github-CEaFDL6t.mjs");
|
|
11474
11503
|
await deployGithubCommand(options);
|
|
11475
11504
|
} catch (error) {
|
|
11476
11505
|
console.error(formatError(error));
|