@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,50 +1,4 @@
|
|
|
1
1
|
let node_path = require("node:path");
|
|
2
|
-
//#region src/workspace/publicEnv.ts
|
|
3
|
-
/**
|
|
4
|
-
* All public env-var prefixes the toolbox understands.
|
|
5
|
-
*
|
|
6
|
-
* Used when resolving incoming var names back to a dependency
|
|
7
|
-
* (e.g. `VITE_AUTH_URL` → `auth`). A var matching any of these
|
|
8
|
-
* is considered safe to inline into a client bundle.
|
|
9
|
-
*/
|
|
10
|
-
const PUBLIC_ENV_PREFIXES = [
|
|
11
|
-
"NEXT_PUBLIC_",
|
|
12
|
-
"VITE_",
|
|
13
|
-
"EXPO_PUBLIC_"
|
|
14
|
-
];
|
|
15
|
-
/**
|
|
16
|
-
* Resolve the public env-var prefix that a frontend framework's bundler
|
|
17
|
-
* inlines into client code at build time:
|
|
18
|
-
*
|
|
19
|
-
* - `nextjs` → `NEXT_PUBLIC_`
|
|
20
|
-
* - `vite` → `VITE_`
|
|
21
|
-
* - `tanstack-start` → `VITE_` (uses Vite under the hood)
|
|
22
|
-
* - `expo` → `EXPO_PUBLIC_`
|
|
23
|
-
* - `remix` → `''` (Remix exposes via loaders, no prefix convention)
|
|
24
|
-
*
|
|
25
|
-
* For backend frameworks or unspecified, falls back to `NEXT_PUBLIC_` to
|
|
26
|
-
* preserve the historical default. Backend apps never read these vars
|
|
27
|
-
* from a bundle, so the prefix only affects scaffolding/symmetry.
|
|
28
|
-
*/
|
|
29
|
-
function getPublicEnvPrefix(framework) {
|
|
30
|
-
switch (framework) {
|
|
31
|
-
case "vite":
|
|
32
|
-
case "tanstack-start": return "VITE_";
|
|
33
|
-
case "expo": return "EXPO_PUBLIC_";
|
|
34
|
-
case "remix": return "";
|
|
35
|
-
case "nextjs": return "NEXT_PUBLIC_";
|
|
36
|
-
default: return "NEXT_PUBLIC_";
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Strip a known public prefix from a var name.
|
|
41
|
-
* Returns the un-prefixed name, or `null` if no prefix matched.
|
|
42
|
-
*/
|
|
43
|
-
function stripPublicPrefix(name) {
|
|
44
|
-
for (const prefix of PUBLIC_ENV_PREFIXES) if (prefix && name.startsWith(prefix)) return name.slice(prefix.length);
|
|
45
|
-
return null;
|
|
46
|
-
}
|
|
47
|
-
//#endregion
|
|
48
2
|
//#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/util.js
|
|
49
3
|
function getEnumValues(entries) {
|
|
50
4
|
const numericValues = Object.values(entries).filter((v) => typeof v === "number");
|
|
@@ -6261,6 +6215,52 @@ const WORKSPACE_KEYS = /* @__PURE__ */ new Set([
|
|
|
6261
6215
|
"state"
|
|
6262
6216
|
]);
|
|
6263
6217
|
//#endregion
|
|
6218
|
+
//#region src/workspace/publicEnv.ts
|
|
6219
|
+
/**
|
|
6220
|
+
* All public env-var prefixes the toolbox understands.
|
|
6221
|
+
*
|
|
6222
|
+
* Used when resolving incoming var names back to a dependency
|
|
6223
|
+
* (e.g. `VITE_AUTH_URL` → `auth`). A var matching any of these
|
|
6224
|
+
* is considered safe to inline into a client bundle.
|
|
6225
|
+
*/
|
|
6226
|
+
const PUBLIC_ENV_PREFIXES = [
|
|
6227
|
+
"NEXT_PUBLIC_",
|
|
6228
|
+
"VITE_",
|
|
6229
|
+
"EXPO_PUBLIC_"
|
|
6230
|
+
];
|
|
6231
|
+
/**
|
|
6232
|
+
* Resolve the public env-var prefix that a frontend framework's bundler
|
|
6233
|
+
* inlines into client code at build time:
|
|
6234
|
+
*
|
|
6235
|
+
* - `nextjs` → `NEXT_PUBLIC_`
|
|
6236
|
+
* - `vite` → `VITE_`
|
|
6237
|
+
* - `tanstack-start` → `VITE_` (uses Vite under the hood)
|
|
6238
|
+
* - `expo` → `EXPO_PUBLIC_`
|
|
6239
|
+
* - `remix` → `''` (Remix exposes via loaders, no prefix convention)
|
|
6240
|
+
*
|
|
6241
|
+
* For backend frameworks or unspecified, falls back to `NEXT_PUBLIC_` to
|
|
6242
|
+
* preserve the historical default. Backend apps never read these vars
|
|
6243
|
+
* from a bundle, so the prefix only affects scaffolding/symmetry.
|
|
6244
|
+
*/
|
|
6245
|
+
function getPublicEnvPrefix(framework) {
|
|
6246
|
+
switch (framework) {
|
|
6247
|
+
case "vite":
|
|
6248
|
+
case "tanstack-start": return "VITE_";
|
|
6249
|
+
case "expo": return "EXPO_PUBLIC_";
|
|
6250
|
+
case "remix": return "";
|
|
6251
|
+
case "nextjs": return "NEXT_PUBLIC_";
|
|
6252
|
+
default: return "NEXT_PUBLIC_";
|
|
6253
|
+
}
|
|
6254
|
+
}
|
|
6255
|
+
/**
|
|
6256
|
+
* Strip a known public prefix from a var name.
|
|
6257
|
+
* Returns the un-prefixed name, or `null` if no prefix matched.
|
|
6258
|
+
*/
|
|
6259
|
+
function stripPublicPrefix(name) {
|
|
6260
|
+
for (const prefix of PUBLIC_ENV_PREFIXES) if (prefix && name.startsWith(prefix)) return name.slice(prefix.length);
|
|
6261
|
+
return null;
|
|
6262
|
+
}
|
|
6263
|
+
//#endregion
|
|
6264
6264
|
//#region src/workspace/index.ts
|
|
6265
6265
|
/**
|
|
6266
6266
|
* Validate that all dependencies reference existing apps.
|
|
@@ -6501,31 +6501,6 @@ function getAppBuildOrder(workspace) {
|
|
|
6501
6501
|
return result;
|
|
6502
6502
|
}
|
|
6503
6503
|
/**
|
|
6504
|
-
* Generate environment variables for app dependencies.
|
|
6505
|
-
*
|
|
6506
|
-
* Each dependency gets the un-prefixed `{DEP}_URL` (for server-side use) and,
|
|
6507
|
-
* when the consuming app's framework supports a public-var prefix, also the
|
|
6508
|
-
* prefixed form (e.g. `NEXT_PUBLIC_{DEP}_URL` for Next.js, `VITE_{DEP}_URL`
|
|
6509
|
-
* for Vite/TanStack Start). The prefixed form is what gets bundled into the
|
|
6510
|
-
* client at build time.
|
|
6511
|
-
*/
|
|
6512
|
-
function getDependencyEnvVars(workspace, appName, urlPrefix = "http://localhost") {
|
|
6513
|
-
const app = workspace.apps[appName];
|
|
6514
|
-
if (!app) return {};
|
|
6515
|
-
const env = {};
|
|
6516
|
-
const publicPrefix = getPublicEnvPrefix(app.framework);
|
|
6517
|
-
for (const depName of app.dependencies) {
|
|
6518
|
-
const dep = workspace.apps[depName];
|
|
6519
|
-
if (dep) {
|
|
6520
|
-
const url = `${urlPrefix}:${dep.port}`;
|
|
6521
|
-
const envKey = `${depName.toUpperCase()}_URL`;
|
|
6522
|
-
env[envKey] = url;
|
|
6523
|
-
if (publicPrefix) env[`${publicPrefix}${envKey}`] = url;
|
|
6524
|
-
}
|
|
6525
|
-
}
|
|
6526
|
-
return env;
|
|
6527
|
-
}
|
|
6528
|
-
/**
|
|
6529
6504
|
* Resolve the Dokploy endpoint for a specific stage.
|
|
6530
6505
|
*
|
|
6531
6506
|
* Uses per-stage endpoint from `endpoints` if available,
|
|
@@ -6647,12 +6622,6 @@ Object.defineProperty(exports, "getAppGkmConfig", {
|
|
|
6647
6622
|
return getAppGkmConfig;
|
|
6648
6623
|
}
|
|
6649
6624
|
});
|
|
6650
|
-
Object.defineProperty(exports, "getDependencyEnvVars", {
|
|
6651
|
-
enumerable: true,
|
|
6652
|
-
get: function() {
|
|
6653
|
-
return getDependencyEnvVars;
|
|
6654
|
-
}
|
|
6655
|
-
});
|
|
6656
6625
|
Object.defineProperty(exports, "getDeployTargetError", {
|
|
6657
6626
|
enumerable: true,
|
|
6658
6627
|
get: function() {
|
|
@@ -6738,4 +6707,4 @@ Object.defineProperty(exports, "wrapSingleAppAsWorkspace", {
|
|
|
6738
6707
|
}
|
|
6739
6708
|
});
|
|
6740
6709
|
|
|
6741
|
-
//# sourceMappingURL=workspace-
|
|
6710
|
+
//# sourceMappingURL=workspace-Bav3TVrP.cjs.map
|