@geekmidas/cli 1.10.18 → 1.10.20
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 +12 -0
- package/dist/index.cjs +16 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +16 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/dev/index.ts +24 -2
- package/src/init/versions.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @geekmidas/cli
|
|
2
2
|
|
|
3
|
+
## 1.10.20
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 🐛 [`02991d4`](https://github.com/geekmidas/toolbox/commit/02991d410c4f2fab5fbaa568300e5d8943b3ba45) Thanks [@geekmidas](https://github.com/geekmidas)! - Fix dev command port credentials resolution
|
|
8
|
+
|
|
9
|
+
## 1.10.19
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- ✨ [`ac041cc`](https://github.com/geekmidas/toolbox/commit/ac041cc459e87107ffb4e508e85c04c3079bf040) Thanks [@geekmidas](https://github.com/geekmidas)! - Add objection pagination and fix secret loading for server apps
|
|
14
|
+
|
|
3
15
|
## 1.10.18
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
|
@@ -35,7 +35,7 @@ const prompts = require_chunk.__toESM(require("prompts"));
|
|
|
35
35
|
|
|
36
36
|
//#region package.json
|
|
37
37
|
var name = "@geekmidas/cli";
|
|
38
|
-
var version = "1.10.
|
|
38
|
+
var version = "1.10.19";
|
|
39
39
|
var description = "CLI tools for building Lambda handlers, server applications, and generating OpenAPI specs";
|
|
40
40
|
var private$1 = false;
|
|
41
41
|
var type = "module";
|
|
@@ -1254,6 +1254,7 @@ async function devCommand(options) {
|
|
|
1254
1254
|
let secretsRoot = process.cwd();
|
|
1255
1255
|
let workspaceAppName;
|
|
1256
1256
|
let workspaceAppPort;
|
|
1257
|
+
let workspace;
|
|
1257
1258
|
if (appName) try {
|
|
1258
1259
|
const appConfig = await require_config.loadAppConfig();
|
|
1259
1260
|
config = appConfig.gkmConfig;
|
|
@@ -1261,6 +1262,7 @@ async function devCommand(options) {
|
|
|
1261
1262
|
secretsRoot = appConfig.workspaceRoot;
|
|
1262
1263
|
workspaceAppName = appConfig.appName;
|
|
1263
1264
|
workspaceAppPort = appConfig.app.port;
|
|
1265
|
+
workspace = appConfig.workspace;
|
|
1264
1266
|
logger$11.log(`📦 Running app: ${appConfig.appName} on port ${workspaceAppPort}`);
|
|
1265
1267
|
if (appConfig.app.entry) {
|
|
1266
1268
|
logger$11.log(`📄 Using entry point: ${appConfig.app.entry}`);
|
|
@@ -1324,10 +1326,21 @@ async function devCommand(options) {
|
|
|
1324
1326
|
const runtime = config.runtime ?? "node";
|
|
1325
1327
|
let secretsJsonPath;
|
|
1326
1328
|
const appSecrets = await loadSecretsForApp(secretsRoot, workspaceAppName);
|
|
1329
|
+
const resolvedPorts = await resolveServicePorts(secretsRoot);
|
|
1330
|
+
if (Object.keys(resolvedPorts.ports).length > 0) {
|
|
1331
|
+
const rewritten = rewriteUrlsWithPorts(appSecrets, resolvedPorts);
|
|
1332
|
+
Object.assign(appSecrets, rewritten);
|
|
1333
|
+
logger$11.log(`🔌 Applied ${Object.keys(resolvedPorts.ports).length} port mapping(s)`);
|
|
1334
|
+
}
|
|
1335
|
+
if (workspace && workspaceAppName) {
|
|
1336
|
+
const depEnv = require_workspace.getDependencyEnvVars(workspace, workspaceAppName);
|
|
1337
|
+
Object.assign(appSecrets, depEnv);
|
|
1338
|
+
}
|
|
1327
1339
|
if (Object.keys(appSecrets).length > 0) {
|
|
1328
1340
|
const secretsDir = (0, node_path.join)(secretsRoot, ".gkm");
|
|
1329
1341
|
await (0, node_fs_promises.mkdir)(secretsDir, { recursive: true });
|
|
1330
|
-
|
|
1342
|
+
const secretsFileName = workspaceAppName ? `dev-secrets-${workspaceAppName}.json` : "dev-secrets.json";
|
|
1343
|
+
secretsJsonPath = (0, node_path.join)(secretsDir, secretsFileName);
|
|
1331
1344
|
await (0, node_fs_promises.writeFile)(secretsJsonPath, JSON.stringify(appSecrets, null, 2));
|
|
1332
1345
|
logger$11.log(`🔐 Loaded ${Object.keys(appSecrets).length} secret(s)`);
|
|
1333
1346
|
}
|
|
@@ -6789,7 +6802,7 @@ const GEEKMIDAS_VERSIONS = {
|
|
|
6789
6802
|
"@geekmidas/client": "~4.0.0",
|
|
6790
6803
|
"@geekmidas/cloud": "~1.0.0",
|
|
6791
6804
|
"@geekmidas/constructs": "~3.0.2",
|
|
6792
|
-
"@geekmidas/db": "~1.0.
|
|
6805
|
+
"@geekmidas/db": "~1.0.1",
|
|
6793
6806
|
"@geekmidas/emailkit": "~1.0.0",
|
|
6794
6807
|
"@geekmidas/envkit": "~1.0.4",
|
|
6795
6808
|
"@geekmidas/errors": "~1.0.0",
|