genbox 1.0.221 → 1.0.222
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/commands/create.js +37 -12
- package/package.json +1 -1
package/dist/commands/create.js
CHANGED
|
@@ -1446,18 +1446,43 @@ function buildPayload(resolved, config, publicKey, privateKey, configLoader) {
|
|
|
1446
1446
|
installClaudeCode: config.defaults?.install_claude_code,
|
|
1447
1447
|
envVars: resolved.env,
|
|
1448
1448
|
apps: resolved.apps.map(a => a.name),
|
|
1449
|
-
appConfigs: resolved.apps.map(a =>
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1449
|
+
appConfigs: resolved.apps.map(a => {
|
|
1450
|
+
// Resolve app path - paths in genbox.yaml are relative to workspace root
|
|
1451
|
+
// e.g., path: "api" with workspace "goodpass" -> /home/dev/goodpass/api
|
|
1452
|
+
let resolvedPath;
|
|
1453
|
+
if (a.path.startsWith('/')) {
|
|
1454
|
+
// Absolute path - use as-is
|
|
1455
|
+
resolvedPath = a.path;
|
|
1456
|
+
}
|
|
1457
|
+
else {
|
|
1458
|
+
// Relative path - resolve from workspace root
|
|
1459
|
+
// First check if there's a matching repo with an absolute path
|
|
1460
|
+
const appConfig = config.apps[a.name];
|
|
1461
|
+
if (appConfig?.repo && config.repos?.[appConfig.repo]?.path) {
|
|
1462
|
+
resolvedPath = config.repos[appConfig.repo].path;
|
|
1463
|
+
}
|
|
1464
|
+
else if (config.repos?.[a.name]?.path) {
|
|
1465
|
+
resolvedPath = config.repos[a.name].path;
|
|
1466
|
+
}
|
|
1467
|
+
else {
|
|
1468
|
+
// Fall back to workspace-relative path
|
|
1469
|
+
const workspaceRoot = resolved.repos[0]?.path?.replace(/\/[^/]+$/, '') || '/home/dev';
|
|
1470
|
+
resolvedPath = `${workspaceRoot}/${a.path}`;
|
|
1471
|
+
}
|
|
1472
|
+
}
|
|
1473
|
+
return {
|
|
1474
|
+
name: a.name,
|
|
1475
|
+
path: resolvedPath,
|
|
1476
|
+
type: a.type,
|
|
1477
|
+
port: a.port,
|
|
1478
|
+
framework: a.framework,
|
|
1479
|
+
runner: a.runner,
|
|
1480
|
+
docker: a.docker,
|
|
1481
|
+
healthcheck: a.healthcheck,
|
|
1482
|
+
dependsOn: a.dependsOn,
|
|
1483
|
+
commands: a.commands,
|
|
1484
|
+
};
|
|
1485
|
+
}),
|
|
1461
1486
|
infrastructure: resolved.infrastructure.map(i => ({
|
|
1462
1487
|
name: i.name,
|
|
1463
1488
|
type: i.type,
|