@geekmidas/cli 1.3.0 → 1.4.0
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/CHANGELOG.md +6 -0
- package/dist/index.cjs +14 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +14 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/deploy/__tests__/env-resolver.spec.ts +145 -2
- package/src/deploy/__tests__/index.spec.ts +393 -5
- package/src/deploy/env-resolver.ts +10 -0
- package/src/deploy/index.ts +11 -0
- package/src/init/generators/monorepo.ts +3 -1
package/dist/index.mjs
CHANGED
|
@@ -32,7 +32,7 @@ import prompts from "prompts";
|
|
|
32
32
|
|
|
33
33
|
//#region package.json
|
|
34
34
|
var name = "@geekmidas/cli";
|
|
35
|
-
var version = "1.
|
|
35
|
+
var version = "1.3.0";
|
|
36
36
|
var description = "CLI tools for building Lambda handlers, server applications, and generating OpenAPI specs";
|
|
37
37
|
var private$1 = false;
|
|
38
38
|
var type = "module";
|
|
@@ -4224,6 +4224,10 @@ function resolveEnvVar(varName, context) {
|
|
|
4224
4224
|
if (context.masterKey) return context.masterKey;
|
|
4225
4225
|
break;
|
|
4226
4226
|
}
|
|
4227
|
+
if (context.dependencyUrls && varName.endsWith("_URL")) {
|
|
4228
|
+
const depName = varName.slice(0, -4).toLowerCase();
|
|
4229
|
+
if (context.dependencyUrls[depName]) return context.dependencyUrls[depName];
|
|
4230
|
+
}
|
|
4227
4231
|
if (context.userSecrets) {
|
|
4228
4232
|
if (context.userSecrets.custom[varName]) return context.userSecrets.custom[varName];
|
|
4229
4233
|
if (varName in context.userSecrets.urls) return context.userSecrets.urls[varName];
|
|
@@ -5596,6 +5600,10 @@ async function workspaceDeployCommand(workspace, options) {
|
|
|
5596
5600
|
buildArgs
|
|
5597
5601
|
});
|
|
5598
5602
|
const backendHost = resolveHost(appName, app, stage, dokployConfig, false);
|
|
5603
|
+
const dependencyUrls = {};
|
|
5604
|
+
if (app.dependencies) {
|
|
5605
|
+
for (const dep of app.dependencies) if (publicUrls[dep]) dependencyUrls[dep] = publicUrls[dep];
|
|
5606
|
+
}
|
|
5599
5607
|
const envContext = {
|
|
5600
5608
|
app,
|
|
5601
5609
|
appName,
|
|
@@ -5615,7 +5623,8 @@ async function workspaceDeployCommand(workspace, options) {
|
|
|
5615
5623
|
appHostname: backendHost,
|
|
5616
5624
|
frontendUrls,
|
|
5617
5625
|
userSecrets: stageSecrets ?? void 0,
|
|
5618
|
-
masterKey: appSecrets?.masterKey
|
|
5626
|
+
masterKey: appSecrets?.masterKey,
|
|
5627
|
+
dependencyUrls
|
|
5619
5628
|
};
|
|
5620
5629
|
const appRequirements = sniffedApps.get(appName);
|
|
5621
5630
|
const sniffedVars = appRequirements?.requiredEnvVars ?? [];
|
|
@@ -7083,6 +7092,7 @@ function generateMonorepoFiles(options, _template) {
|
|
|
7083
7092
|
"@biomejs/biome": "~2.3.0",
|
|
7084
7093
|
"@geekmidas/cli": GEEKMIDAS_VERSIONS["@geekmidas/cli"],
|
|
7085
7094
|
esbuild: "~0.27.0",
|
|
7095
|
+
tsx: "~4.20.0",
|
|
7086
7096
|
turbo: "~2.3.0",
|
|
7087
7097
|
typescript: "~5.8.2",
|
|
7088
7098
|
vitest: "~4.0.0"
|
|
@@ -7329,7 +7339,8 @@ export default defineWorkspace({
|
|
|
7329
7339
|
port: 3000,
|
|
7330
7340
|
routes: '${getRoutesGlob()}',
|
|
7331
7341
|
envParser: './src/config/env#envParser',
|
|
7332
|
-
logger: './src/config/logger#logger'
|
|
7342
|
+
logger: './src/config/logger#logger',
|
|
7343
|
+
dependencies: ['auth'],`;
|
|
7333
7344
|
if (telescope) config$1 += `
|
|
7334
7345
|
telescope: {
|
|
7335
7346
|
enabled: true,
|