@geekmidas/cli 0.33.0 → 0.34.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/dist/index.cjs +5 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +5 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
- package/src/dev/index.ts +5 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geekmidas/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.34.0",
|
|
4
4
|
"description": "CLI tools for building Lambda handlers, server applications, and generating OpenAPI specs",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
@@ -49,10 +49,10 @@
|
|
|
49
49
|
"openapi-typescript": "^7.4.2",
|
|
50
50
|
"prompts": "~2.4.2",
|
|
51
51
|
"@geekmidas/constructs": "~0.6.0",
|
|
52
|
-
"@geekmidas/
|
|
53
|
-
"@geekmidas/errors": "~0.1.0",
|
|
52
|
+
"@geekmidas/logger": "~0.4.0",
|
|
54
53
|
"@geekmidas/envkit": "~0.5.0",
|
|
55
|
-
"@geekmidas/
|
|
54
|
+
"@geekmidas/schema": "~0.1.0",
|
|
55
|
+
"@geekmidas/errors": "~0.1.0"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@types/lodash.kebabcase": "^4.1.9",
|
package/src/dev/index.ts
CHANGED
|
@@ -329,6 +329,7 @@ export async function devCommand(options: DevOptions): Promise<void> {
|
|
|
329
329
|
let appRoot: string = process.cwd();
|
|
330
330
|
let secretsRoot: string = process.cwd(); // Where .gkm/secrets/ lives
|
|
331
331
|
let workspaceAppName: string | undefined; // Set if in workspace mode
|
|
332
|
+
let workspaceAppPort: number | undefined; // Port from workspace config
|
|
332
333
|
|
|
333
334
|
if (appName) {
|
|
334
335
|
// Try to load app-specific config from workspace
|
|
@@ -338,7 +339,8 @@ export async function devCommand(options: DevOptions): Promise<void> {
|
|
|
338
339
|
appRoot = appConfig.appRoot;
|
|
339
340
|
secretsRoot = appConfig.workspaceRoot;
|
|
340
341
|
workspaceAppName = appConfig.appName;
|
|
341
|
-
|
|
342
|
+
workspaceAppPort = appConfig.app.port;
|
|
343
|
+
logger.log(`📦 Running app: ${appConfig.appName} on port ${workspaceAppPort}`);
|
|
342
344
|
} catch {
|
|
343
345
|
// Not in a workspace or app not found in workspace - fall back to regular loading
|
|
344
346
|
const loadedConfig = await loadWorkspaceConfig();
|
|
@@ -463,9 +465,10 @@ export async function devCommand(options: DevOptions): Promise<void> {
|
|
|
463
465
|
}
|
|
464
466
|
|
|
465
467
|
// Start the dev server
|
|
468
|
+
// Priority: explicit --port option > workspace app port > default 3000
|
|
466
469
|
const devServer = new DevServer(
|
|
467
470
|
resolved.providers[0] as LegacyProvider,
|
|
468
|
-
options.port
|
|
471
|
+
options.port ?? workspaceAppPort ?? 3000,
|
|
469
472
|
options.portExplicit ?? false,
|
|
470
473
|
enableOpenApi,
|
|
471
474
|
telescope,
|