@geekmidas/cli 10.0.0-alpha.16 → 10.0.0-alpha.18
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/{bundler-BeNDZdHQ.cjs → bundler-mjqGAvu1.cjs} +2 -2
- package/dist/{bundler-BeNDZdHQ.cjs.map → bundler-mjqGAvu1.cjs.map} +1 -1
- package/dist/{bundler-BodTL4kf.mjs → bundler-mwH7WOb1.mjs} +2 -2
- package/dist/{bundler-BodTL4kf.mjs.map → bundler-mwH7WOb1.mjs.map} +1 -1
- package/dist/{config-Q1rvKHvw.cjs → config-DSXI480r.cjs} +2 -2
- package/dist/{config-Q1rvKHvw.cjs.map → config-DSXI480r.cjs.map} +1 -1
- package/dist/{config-pqGD3hF9.mjs → config-DdKkoUE1.mjs} +2 -2
- package/dist/{config-pqGD3hF9.mjs.map → config-DdKkoUE1.mjs.map} +1 -1
- package/dist/config.cjs +2 -2
- package/dist/config.d.cts +2 -2
- package/dist/config.d.mts +2 -2
- package/dist/config.mjs +2 -2
- package/dist/{credentials-Q6F0uqJq.cjs → credentials-C6Pfn6GY.cjs} +31 -9
- package/dist/credentials-C6Pfn6GY.cjs.map +1 -0
- package/dist/{credentials-BekkKtY_.mjs → credentials-lbv-j0Be.mjs} +32 -10
- package/dist/{credentials-BekkKtY_.mjs.map → credentials-lbv-j0Be.mjs.map} +1 -1
- package/dist/discover-BERGFg8v.cjs.map +1 -1
- package/dist/discover-CK-n3w6b.mjs.map +1 -1
- package/dist/{github-CRwnxKmD.mjs → github-DlIrXPee.mjs} +21 -8
- package/dist/github-DlIrXPee.mjs.map +1 -0
- package/dist/{github-BfflNPVe.cjs → github-n7N9yOff.cjs} +22 -9
- package/dist/github-n7N9yOff.cjs.map +1 -0
- package/dist/{index-C-VLwB_Y.d.mts → index-B4H4XF7A.d.mts} +2 -2
- package/dist/{index-C-HkOEBt.d.cts.map → index-B4H4XF7A.d.mts.map} +1 -1
- package/dist/{index-C-HkOEBt.d.cts → index-RCUizGxL.d.cts} +2 -2
- package/dist/{index-C-VLwB_Y.d.mts.map → index-RCUizGxL.d.cts.map} +1 -1
- package/dist/index.cjs +164 -172
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +159 -167
- package/dist/index.mjs.map +1 -1
- package/dist/{openapi-Dcbme-Us.cjs → openapi-B8bu_OXN.cjs} +2 -2
- package/dist/{openapi-Dcbme-Us.cjs.map → openapi-B8bu_OXN.cjs.map} +1 -1
- package/dist/{openapi-vy4JzhUv.mjs → openapi-DfjbhrsM.mjs} +2 -2
- package/dist/{openapi-vy4JzhUv.mjs.map → openapi-DfjbhrsM.mjs.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/reconcile/public.d.cts +1 -1
- package/dist/reconcile/public.d.mts +1 -1
- package/dist/{fullstack-secrets-DXsWO-5m.cjs → reconcile-Cq4cO83R.cjs} +45 -1
- package/dist/reconcile-Cq4cO83R.cjs.map +1 -0
- package/dist/{fullstack-secrets-BET8gqwK.mjs → reconcile-fmoluZmZ.mjs} +34 -2
- package/dist/reconcile-fmoluZmZ.mjs.map +1 -0
- package/dist/ssm-BKN1Cg4z.mjs +60 -0
- package/dist/ssm-BKN1Cg4z.mjs.map +1 -0
- package/dist/ssm-FxeSAt35.cjs +60 -0
- package/dist/ssm-FxeSAt35.cjs.map +1 -0
- package/dist/{storage-C-30BD1e.cjs → storage-DgypfSD6.cjs} +83 -4
- package/dist/storage-DgypfSD6.cjs.map +1 -0
- package/dist/{storage-P_b3w7uj.mjs → storage-TP0x118M.mjs} +77 -4
- package/dist/storage-TP0x118M.mjs.map +1 -0
- package/dist/transfer-2aRVVJ6I.mjs +122 -0
- package/dist/transfer-2aRVVJ6I.mjs.map +1 -0
- package/dist/transfer-C3WZVmj_.cjs +151 -0
- package/dist/transfer-C3WZVmj_.cjs.map +1 -0
- package/dist/{types-RhXmHR-e.d.cts → types-7R81hu0i.d.mts} +138 -1
- package/dist/types-7R81hu0i.d.mts.map +1 -0
- package/dist/{types-kvBQjpPo.d.mts → types-N7c2O2m7.d.cts} +140 -1
- package/dist/types-N7c2O2m7.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-CgwmXEtc.mjs → workspace-Bu3xNCej.mjs} +14 -3
- package/dist/{workspace-CgwmXEtc.mjs.map → workspace-Bu3xNCej.mjs.map} +1 -1
- package/dist/{workspace-mFpI_ky_.cjs → workspace-CRD9YinV.cjs} +19 -2
- package/dist/{workspace-mFpI_ky_.cjs.map → workspace-CRD9YinV.cjs.map} +1 -1
- package/package.json +11 -11
- package/dist/credentials-Q6F0uqJq.cjs.map +0 -1
- package/dist/fullstack-secrets-BET8gqwK.mjs.map +0 -1
- package/dist/fullstack-secrets-DXsWO-5m.cjs.map +0 -1
- package/dist/github-BfflNPVe.cjs.map +0 -1
- package/dist/github-CRwnxKmD.mjs.map +0 -1
- package/dist/keystore-B4PRlbgE.mjs +0 -81
- package/dist/keystore-B4PRlbgE.mjs.map +0 -1
- package/dist/keystore-DgGRj2Yy.cjs +0 -98
- package/dist/keystore-DgGRj2Yy.cjs.map +0 -1
- package/dist/reconcile-Dd2iyILf.cjs +0 -34
- package/dist/reconcile-Dd2iyILf.cjs.map +0 -1
- package/dist/reconcile-DhQ00DpU.mjs +0 -34
- package/dist/reconcile-DhQ00DpU.mjs.map +0 -1
- package/dist/storage-C-30BD1e.cjs.map +0 -1
- package/dist/storage-P_b3w7uj.mjs.map +0 -1
- package/dist/sync-B3xxXtJT.mjs +0 -88
- package/dist/sync-B3xxXtJT.mjs.map +0 -1
- package/dist/sync-D7uTIIEi.cjs +0 -111
- package/dist/sync-D7uTIIEi.cjs.map +0 -1
- package/dist/types-RhXmHR-e.d.cts.map +0 -1
- package/dist/types-kvBQjpPo.d.mts.map +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-BhDjJH2R.mjs";
|
|
2
2
|
import { a as DEFAULT_EVENTS$1, i as DEFAULT_CACHE, o as DEFAULT_STORAGE, t as discover } from "./discover-CK-n3w6b.mjs";
|
|
3
|
-
import { a as loadWorkspaceAppInfo, c as appKey, n as getAppNameFromCwd } from "./config-
|
|
4
|
-
import { s as getDependencyEnvVars, t as allConstructGlobs } from "./workspace-
|
|
3
|
+
import { a as loadWorkspaceAppInfo, c as appKey, n as getAppNameFromCwd, o as loadWorkspaceConfig } from "./config-DdKkoUE1.mjs";
|
|
4
|
+
import { s as getDependencyEnvVars, t as allConstructGlobs, w as TEST_STAGE } from "./workspace-Bu3xNCej.mjs";
|
|
5
5
|
import { r as generatePgBossUrl } from "./generator-LfZU7NlU.mjs";
|
|
6
|
-
import { n as readStageSecrets, o as toEmbeddableSecrets, r as secretsExist } from "./storage-
|
|
6
|
+
import { n as readStageSecrets, o as toEmbeddableSecrets, r as secretsExist } from "./storage-TP0x118M.mjs";
|
|
7
7
|
import { existsSync, readFileSync } from "node:fs";
|
|
8
|
-
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
8
|
+
import { mkdir, readFile, readdir, rm, writeFile } from "node:fs/promises";
|
|
9
9
|
import { dirname, join, resolve } from "node:path";
|
|
10
10
|
import { execFile, execSync } from "node:child_process";
|
|
11
11
|
import { DEFAULT_POSTGRES_VERSION, cacheTable, cookieDomain, dependentsOf, provideKey, providedKeyFor, provisionOrder, publicEnvFor } from "@geekmidas/manifest";
|
|
@@ -2109,6 +2109,11 @@ async function reconcile(options) {
|
|
|
2109
2109
|
if (plan.containers.includes("caddy")) {
|
|
2110
2110
|
await write(join(root, CADDYFILE_PATH), caddyfileRoot());
|
|
2111
2111
|
await write(join(root, caddySitesPath(stage)), caddyfile);
|
|
2112
|
+
await pruneCaddySites(root, [
|
|
2113
|
+
stage,
|
|
2114
|
+
options.localStage,
|
|
2115
|
+
TEST_STAGE
|
|
2116
|
+
]);
|
|
2112
2117
|
}
|
|
2113
2118
|
if (start && plan.containers.length > 0) await docker.up(composePath, plan.containers);
|
|
2114
2119
|
if (start && plan.containers.includes("caddy")) await docker.reload(composePath, "caddy").catch(() => {});
|
|
@@ -2174,6 +2179,20 @@ function addressesFor(containers, ports) {
|
|
|
2174
2179
|
return addresses;
|
|
2175
2180
|
}
|
|
2176
2181
|
/** Write a file only when its content would change, so mtimes stay meaningful. */
|
|
2182
|
+
/**
|
|
2183
|
+
* Remove the routes of stages this project no longer reconciles.
|
|
2184
|
+
*
|
|
2185
|
+
* Only the local stage and `test` are ever written, so any other file is left
|
|
2186
|
+
* over from a stage that was renamed — `development` becoming `dev`. Caddy
|
|
2187
|
+
* imports every file, and the leftover declares the same hosts as its
|
|
2188
|
+
* replacement: it refuses the whole config as ambiguous, and every URL behind
|
|
2189
|
+
* the edge goes with it.
|
|
2190
|
+
*/
|
|
2191
|
+
async function pruneCaddySites(root, stages) {
|
|
2192
|
+
const dir = dirname(join(root, caddySitesPath(TEST_STAGE)));
|
|
2193
|
+
const keep = new Set(stages.map((stage) => stage && `${stage}.caddy`));
|
|
2194
|
+
for (const file of await readdir(dir)) if (file.endsWith(".caddy") && !keep.has(file)) await rm(join(dir, file));
|
|
2195
|
+
}
|
|
2177
2196
|
async function write(path, content) {
|
|
2178
2197
|
try {
|
|
2179
2198
|
if (await readFile(path, "utf-8") === content) return;
|
|
@@ -2688,24 +2707,27 @@ async function prepareEntryCredentials(options) {
|
|
|
2688
2707
|
let secretsRoot = cwd;
|
|
2689
2708
|
let appName;
|
|
2690
2709
|
let appInfo;
|
|
2710
|
+
let workspace;
|
|
2691
2711
|
try {
|
|
2692
2712
|
appInfo = await loadWorkspaceAppInfo(cwd);
|
|
2713
|
+
workspace = appInfo.workspace;
|
|
2693
2714
|
workspaceAppPort = appInfo.app.port;
|
|
2694
2715
|
secretsRoot = appInfo.workspaceRoot;
|
|
2695
2716
|
appName = appInfo.appName;
|
|
2696
2717
|
} catch {
|
|
2697
|
-
|
|
2718
|
+
workspace = await loadWorkspaceConfig(cwd).then((loaded) => loaded.workspace).catch(() => void 0);
|
|
2719
|
+
secretsRoot = workspace?.root ?? findSecretsRoot(cwd);
|
|
2698
2720
|
appName = getAppNameFromCwd(cwd) ?? void 0;
|
|
2699
2721
|
}
|
|
2700
2722
|
const resolvedPort = options.explicitPort ?? workspaceAppPort ?? 3e3;
|
|
2701
|
-
const stage = options.stage ??
|
|
2723
|
+
const stage = options.stage ?? workspace?.stages.local;
|
|
2702
2724
|
const credentials = stage ? await loadSecretsForApp(secretsRoot, stage, appName) : {};
|
|
2703
2725
|
credentials.PORT = String(resolvedPort);
|
|
2704
2726
|
const declaredKeys = [];
|
|
2705
|
-
if (
|
|
2727
|
+
if (workspace && usesConstructs(workspace)) {
|
|
2706
2728
|
const { reconcileWorkspace } = await Promise.resolve().then(() => workspace_exports);
|
|
2707
|
-
const reconciled = await reconcileWorkspace(
|
|
2708
|
-
stage: options.reconcileStage ??
|
|
2729
|
+
const reconciled = await reconcileWorkspace(workspace, {
|
|
2730
|
+
stage: options.reconcileStage ?? workspace.stages.local,
|
|
2709
2731
|
start: options.startDocker ?? false
|
|
2710
2732
|
});
|
|
2711
2733
|
Object.assign(credentials, reconciled.env);
|
|
@@ -2777,4 +2799,4 @@ async function prepareEntryCredentials(options) {
|
|
|
2777
2799
|
//#endregion
|
|
2778
2800
|
export { storageBackendFor as C, providerOf as S, LOCAL_CA_PATH as _, loadEnvFiles as a, cacheBackendFor as b, resolveServicePorts as c, constructGlobs as d, derivedContainers as f, COMPOSE_PATH as g, workspace_exports as h, isPortAvailable as i, rewriteUrlsWithPorts as l, usesConstructs as m, createEntryWrapper as n, loadSecretsForApp as o, reconcileWorkspace as p, findAvailablePort as r, prepareEntryCredentials as s, createCredentialsPreload as t, startWorkspaceServices as u, applyPostgres as v, eventsBackendFor as x, resourceName as y };
|
|
2779
2801
|
|
|
2780
|
-
//# sourceMappingURL=credentials-
|
|
2802
|
+
//# sourceMappingURL=credentials-lbv-j0Be.mjs.map
|