@geekmidas/cli 10.0.0-alpha.25 → 10.0.0-alpha.27
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/{config-Dn9DW2Fz.cjs → config-7R_-WyHq.cjs} +24 -3
- package/dist/{config-Dn9DW2Fz.cjs.map → config-7R_-WyHq.cjs.map} +1 -1
- package/dist/{config-DBGpRTUy.mjs → config-DXrrYvob.mjs} +19 -4
- package/dist/{config-DBGpRTUy.mjs.map → config-DXrrYvob.mjs.map} +1 -1
- package/dist/config.cjs +3 -2
- package/dist/config.d.cts +12 -1
- package/dist/config.d.cts.map +1 -1
- package/dist/config.d.mts +12 -1
- package/dist/config.d.mts.map +1 -1
- package/dist/config.mjs +3 -3
- package/dist/{github-BOaa3kQR.mjs → github-Ba5kXEJo.mjs} +4 -4
- package/dist/{github-BOaa3kQR.mjs.map → github-Ba5kXEJo.mjs.map} +1 -1
- package/dist/{github-CUjW3G91.cjs → github-CQflOKKV.cjs} +4 -4
- package/dist/{github-CUjW3G91.cjs.map → github-CQflOKKV.cjs.map} +1 -1
- package/dist/{index-RCUizGxL.d.cts → index-BPN7kghQ.d.cts} +2 -12
- package/dist/{index-B4H4XF7A.d.mts.map → index-BPN7kghQ.d.cts.map} +1 -1
- package/dist/{index-B4H4XF7A.d.mts → index-BqWKWRm0.d.mts} +2 -12
- package/dist/{index-RCUizGxL.d.cts.map → index-BqWKWRm0.d.mts.map} +1 -1
- package/dist/index.cjs +170 -169
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +123 -122
- package/dist/index.mjs.map +1 -1
- package/dist/{openapi-DHQlstv6.mjs → openapi-3NLVvtz-.mjs} +2 -2
- package/dist/{openapi-DHQlstv6.mjs.map → openapi-3NLVvtz-.mjs.map} +1 -1
- package/dist/{openapi-BAKQLho-.cjs → openapi-rhJdy2GC.cjs} +2 -2
- package/dist/{openapi-BAKQLho-.cjs.map → openapi-rhJdy2GC.cjs.map} +1 -1
- package/dist/openapi.cjs +1 -1
- package/dist/openapi.mjs +1 -1
- package/dist/{generator-LfZU7NlU.mjs → reconcile-DhbCvh4K.mjs} +111 -2
- package/dist/reconcile-DhbCvh4K.mjs.map +1 -0
- package/dist/{generator-Wdfp0jCS.cjs → reconcile-szmJw_Sb.cjs} +130 -3
- package/dist/reconcile-szmJw_Sb.cjs.map +1 -0
- package/dist/{transfer-B88fTvnh.mjs → transfer-BV00TxZv.mjs} +4 -4
- package/dist/{transfer-B88fTvnh.mjs.map → transfer-BV00TxZv.mjs.map} +1 -1
- package/dist/{transfer-D59M4aaR.cjs → transfer-BYIn7z8m.cjs} +4 -4
- package/dist/{transfer-D59M4aaR.cjs.map → transfer-BYIn7z8m.cjs.map} +1 -1
- package/dist/workspace/index.cjs +1 -2
- package/dist/workspace/index.d.cts +2 -2
- package/dist/workspace/index.d.mts +2 -2
- package/dist/workspace/index.mjs +2 -2
- package/dist/{workspace-CRD9YinV.cjs → workspace-Bav3TVrP.cjs} +47 -78
- package/dist/workspace-Bav3TVrP.cjs.map +1 -0
- package/dist/{credentials-BpoOUa74.mjs → workspace-CUmR_k4J.mjs} +228 -492
- package/dist/workspace-CUmR_k4J.mjs.map +1 -0
- package/dist/{credentials-Dbyccl3A.cjs → workspace-DgeVgxmm.cjs} +229 -517
- package/dist/workspace-DgeVgxmm.cjs.map +1 -0
- package/dist/{workspace-Bu3xNCej.mjs → workspace-T4IVGSoB.mjs} +48 -73
- package/dist/workspace-T4IVGSoB.mjs.map +1 -0
- package/package.json +14 -14
- package/dist/credentials-BpoOUa74.mjs.map +0 -1
- package/dist/credentials-Dbyccl3A.cjs.map +0 -1
- package/dist/generator-LfZU7NlU.mjs.map +0 -1
- package/dist/generator-Wdfp0jCS.cjs.map +0 -1
- package/dist/reconcile-gb1lz1Dk.mjs +0 -113
- package/dist/reconcile-gb1lz1Dk.mjs.map +0 -1
- package/dist/reconcile-hx_vBvux.cjs +0 -136
- package/dist/reconcile-hx_vBvux.cjs.map +0 -1
- package/dist/workspace-Bu3xNCej.mjs.map +0 -1
- package/dist/workspace-CRD9YinV.cjs.map +0 -1
|
@@ -1,51 +1,5 @@
|
|
|
1
1
|
import { n as __require } from "./rolldown-runtime-BhDjJH2R.mjs";
|
|
2
2
|
import { basename, isAbsolute, join } from "node:path";
|
|
3
|
-
//#region src/workspace/publicEnv.ts
|
|
4
|
-
/**
|
|
5
|
-
* All public env-var prefixes the toolbox understands.
|
|
6
|
-
*
|
|
7
|
-
* Used when resolving incoming var names back to a dependency
|
|
8
|
-
* (e.g. `VITE_AUTH_URL` → `auth`). A var matching any of these
|
|
9
|
-
* is considered safe to inline into a client bundle.
|
|
10
|
-
*/
|
|
11
|
-
const PUBLIC_ENV_PREFIXES = [
|
|
12
|
-
"NEXT_PUBLIC_",
|
|
13
|
-
"VITE_",
|
|
14
|
-
"EXPO_PUBLIC_"
|
|
15
|
-
];
|
|
16
|
-
/**
|
|
17
|
-
* Resolve the public env-var prefix that a frontend framework's bundler
|
|
18
|
-
* inlines into client code at build time:
|
|
19
|
-
*
|
|
20
|
-
* - `nextjs` → `NEXT_PUBLIC_`
|
|
21
|
-
* - `vite` → `VITE_`
|
|
22
|
-
* - `tanstack-start` → `VITE_` (uses Vite under the hood)
|
|
23
|
-
* - `expo` → `EXPO_PUBLIC_`
|
|
24
|
-
* - `remix` → `''` (Remix exposes via loaders, no prefix convention)
|
|
25
|
-
*
|
|
26
|
-
* For backend frameworks or unspecified, falls back to `NEXT_PUBLIC_` to
|
|
27
|
-
* preserve the historical default. Backend apps never read these vars
|
|
28
|
-
* from a bundle, so the prefix only affects scaffolding/symmetry.
|
|
29
|
-
*/
|
|
30
|
-
function getPublicEnvPrefix(framework) {
|
|
31
|
-
switch (framework) {
|
|
32
|
-
case "vite":
|
|
33
|
-
case "tanstack-start": return "VITE_";
|
|
34
|
-
case "expo": return "EXPO_PUBLIC_";
|
|
35
|
-
case "remix": return "";
|
|
36
|
-
case "nextjs": return "NEXT_PUBLIC_";
|
|
37
|
-
default: return "NEXT_PUBLIC_";
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Strip a known public prefix from a var name.
|
|
42
|
-
* Returns the un-prefixed name, or `null` if no prefix matched.
|
|
43
|
-
*/
|
|
44
|
-
function stripPublicPrefix(name) {
|
|
45
|
-
for (const prefix of PUBLIC_ENV_PREFIXES) if (prefix && name.startsWith(prefix)) return name.slice(prefix.length);
|
|
46
|
-
return null;
|
|
47
|
-
}
|
|
48
|
-
//#endregion
|
|
49
3
|
//#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/util.js
|
|
50
4
|
function getEnumValues(entries) {
|
|
51
5
|
const numericValues = Object.values(entries).filter((v) => typeof v === "number");
|
|
@@ -6262,6 +6216,52 @@ const WORKSPACE_KEYS = /* @__PURE__ */ new Set([
|
|
|
6262
6216
|
"state"
|
|
6263
6217
|
]);
|
|
6264
6218
|
//#endregion
|
|
6219
|
+
//#region src/workspace/publicEnv.ts
|
|
6220
|
+
/**
|
|
6221
|
+
* All public env-var prefixes the toolbox understands.
|
|
6222
|
+
*
|
|
6223
|
+
* Used when resolving incoming var names back to a dependency
|
|
6224
|
+
* (e.g. `VITE_AUTH_URL` → `auth`). A var matching any of these
|
|
6225
|
+
* is considered safe to inline into a client bundle.
|
|
6226
|
+
*/
|
|
6227
|
+
const PUBLIC_ENV_PREFIXES = [
|
|
6228
|
+
"NEXT_PUBLIC_",
|
|
6229
|
+
"VITE_",
|
|
6230
|
+
"EXPO_PUBLIC_"
|
|
6231
|
+
];
|
|
6232
|
+
/**
|
|
6233
|
+
* Resolve the public env-var prefix that a frontend framework's bundler
|
|
6234
|
+
* inlines into client code at build time:
|
|
6235
|
+
*
|
|
6236
|
+
* - `nextjs` → `NEXT_PUBLIC_`
|
|
6237
|
+
* - `vite` → `VITE_`
|
|
6238
|
+
* - `tanstack-start` → `VITE_` (uses Vite under the hood)
|
|
6239
|
+
* - `expo` → `EXPO_PUBLIC_`
|
|
6240
|
+
* - `remix` → `''` (Remix exposes via loaders, no prefix convention)
|
|
6241
|
+
*
|
|
6242
|
+
* For backend frameworks or unspecified, falls back to `NEXT_PUBLIC_` to
|
|
6243
|
+
* preserve the historical default. Backend apps never read these vars
|
|
6244
|
+
* from a bundle, so the prefix only affects scaffolding/symmetry.
|
|
6245
|
+
*/
|
|
6246
|
+
function getPublicEnvPrefix(framework) {
|
|
6247
|
+
switch (framework) {
|
|
6248
|
+
case "vite":
|
|
6249
|
+
case "tanstack-start": return "VITE_";
|
|
6250
|
+
case "expo": return "EXPO_PUBLIC_";
|
|
6251
|
+
case "remix": return "";
|
|
6252
|
+
case "nextjs": return "NEXT_PUBLIC_";
|
|
6253
|
+
default: return "NEXT_PUBLIC_";
|
|
6254
|
+
}
|
|
6255
|
+
}
|
|
6256
|
+
/**
|
|
6257
|
+
* Strip a known public prefix from a var name.
|
|
6258
|
+
* Returns the un-prefixed name, or `null` if no prefix matched.
|
|
6259
|
+
*/
|
|
6260
|
+
function stripPublicPrefix(name) {
|
|
6261
|
+
for (const prefix of PUBLIC_ENV_PREFIXES) if (prefix && name.startsWith(prefix)) return name.slice(prefix.length);
|
|
6262
|
+
return null;
|
|
6263
|
+
}
|
|
6264
|
+
//#endregion
|
|
6265
6265
|
//#region src/workspace/index.ts
|
|
6266
6266
|
/**
|
|
6267
6267
|
* Validate that all dependencies reference existing apps.
|
|
@@ -6502,31 +6502,6 @@ function getAppBuildOrder(workspace) {
|
|
|
6502
6502
|
return result;
|
|
6503
6503
|
}
|
|
6504
6504
|
/**
|
|
6505
|
-
* Generate environment variables for app dependencies.
|
|
6506
|
-
*
|
|
6507
|
-
* Each dependency gets the un-prefixed `{DEP}_URL` (for server-side use) and,
|
|
6508
|
-
* when the consuming app's framework supports a public-var prefix, also the
|
|
6509
|
-
* prefixed form (e.g. `NEXT_PUBLIC_{DEP}_URL` for Next.js, `VITE_{DEP}_URL`
|
|
6510
|
-
* for Vite/TanStack Start). The prefixed form is what gets bundled into the
|
|
6511
|
-
* client at build time.
|
|
6512
|
-
*/
|
|
6513
|
-
function getDependencyEnvVars(workspace, appName, urlPrefix = "http://localhost") {
|
|
6514
|
-
const app = workspace.apps[appName];
|
|
6515
|
-
if (!app) return {};
|
|
6516
|
-
const env = {};
|
|
6517
|
-
const publicPrefix = getPublicEnvPrefix(app.framework);
|
|
6518
|
-
for (const depName of app.dependencies) {
|
|
6519
|
-
const dep = workspace.apps[depName];
|
|
6520
|
-
if (dep) {
|
|
6521
|
-
const url = `${urlPrefix}:${dep.port}`;
|
|
6522
|
-
const envKey = `${depName.toUpperCase()}_URL`;
|
|
6523
|
-
env[envKey] = url;
|
|
6524
|
-
if (publicPrefix) env[`${publicPrefix}${envKey}`] = url;
|
|
6525
|
-
}
|
|
6526
|
-
}
|
|
6527
|
-
return env;
|
|
6528
|
-
}
|
|
6529
|
-
/**
|
|
6530
6505
|
* Resolve the Dokploy endpoint for a specific stage.
|
|
6531
6506
|
*
|
|
6532
6507
|
* Uses per-stage endpoint from `endpoints` if available,
|
|
@@ -6558,6 +6533,6 @@ function getEndpointForStage(dokployConfig, stage) {
|
|
|
6558
6533
|
return dokployConfig.endpoint;
|
|
6559
6534
|
}
|
|
6560
6535
|
//#endregion
|
|
6561
|
-
export {
|
|
6536
|
+
export { safeValidateWorkspaceConfig as C, assertDeployedStage as D, TEST_STAGE as E, deployedProblems as O, isPhase2DeployTarget as S, InvalidStages as T, SUPPORTED_DEPLOY_TARGETS as _, getAppBuildOrder as a, getDeployTargetError as b, normalizeWorkspace as c, wrapSingleAppAsWorkspace as d, PUBLIC_ENV_PREFIXES as f, PHASE_2_DEPLOY_TARGETS as g, isWorkspaceConfig as h, defineWorkspace as i, stageProblems as k, processConfig as l, stripPublicPrefix as m, appConstructGlobs as n, getAppGkmConfig as o, getPublicEnvPrefix as p, constructPatterns as r, getEndpointForStage as s, allConstructGlobs as t, workspaceConstructGlobs as u, WorkspaceConfigSchema as v, validateWorkspaceConfig as w, isDeployTargetSupported as x, formatValidationErrors as y };
|
|
6562
6537
|
|
|
6563
|
-
//# sourceMappingURL=workspace-
|
|
6538
|
+
//# sourceMappingURL=workspace-T4IVGSoB.mjs.map
|