genbox 1.0.41 → 1.0.42

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.
@@ -771,6 +771,8 @@ function buildPayload(resolved, config, publicKey, privateKey, configLoader) {
771
771
  framework: a.framework,
772
772
  runner: a.runner,
773
773
  docker: a.docker,
774
+ healthcheck: a.healthcheck,
775
+ dependsOn: a.dependsOn,
774
776
  commands: a.commands,
775
777
  })),
776
778
  infrastructure: resolved.infrastructure.map(i => ({
@@ -583,8 +583,15 @@ exports.initCommand = new commander_1.Command('init')
583
583
  console.log(` ... and ${scan.apps.length - 5} more`);
584
584
  }
585
585
  }
586
- if (scan.compose) {
587
- console.log(` ${chalk_1.default.dim('Docker:')} ${scan.compose.applications.length} services`);
586
+ // Show Docker app count (apps with runner: 'docker')
587
+ const dockerApps = scan.apps.filter(a => a.runner === 'docker');
588
+ if (dockerApps.length > 0) {
589
+ console.log(` ${chalk_1.default.dim('Docker:')} ${dockerApps.length} app(s) with docker runner`);
590
+ }
591
+ // Show infrastructure services from docker-compose (databases, caches, etc.)
592
+ if (scan.compose && scan.compose.databases.length + scan.compose.caches.length + scan.compose.queues.length > 0) {
593
+ const infraCount = scan.compose.databases.length + scan.compose.caches.length + scan.compose.queues.length;
594
+ console.log(` ${chalk_1.default.dim('Infra:')} ${infraCount} infrastructure service(s)`);
588
595
  }
589
596
  if (scan.git) {
590
597
  console.log(` ${chalk_1.default.dim('Git:')} ${scan.git.remote} (${scan.git.type})`);
@@ -1886,24 +1893,28 @@ function convertDetectedToScan(detected) {
1886
1893
  lockfile: r.lockfile,
1887
1894
  }));
1888
1895
  // Convert infrastructure to compose analysis
1896
+ // Note: docker_services is deprecated - apps with runner: 'docker' are now tracked per-app
1889
1897
  let compose = null;
1890
1898
  const hasInfra = detected.infrastructure && detected.infrastructure.length > 0;
1891
- const hasDockerServices = detected.docker_services && detected.docker_services.length > 0;
1892
- if (hasInfra || hasDockerServices) {
1899
+ // Get docker apps from apps with runner: 'docker' (new approach)
1900
+ const dockerApps = Object.entries(detected.apps || {})
1901
+ .filter(([, app]) => app.runner === 'docker')
1902
+ .map(([name, app]) => ({
1903
+ name,
1904
+ image: app.docker?.service || name,
1905
+ build: app.docker?.build_context ? {
1906
+ context: app.docker.build_context,
1907
+ dockerfile: app.docker.dockerfile,
1908
+ } : undefined,
1909
+ ports: app.port ? [{ host: app.port, container: app.port }] : [],
1910
+ environment: {},
1911
+ dependsOn: app.depends_on || [],
1912
+ volumes: [],
1913
+ }));
1914
+ if (hasInfra || dockerApps.length > 0) {
1893
1915
  compose = {
1894
1916
  files: ['docker-compose.yml'],
1895
- applications: (detected.docker_services || []).map(svc => ({
1896
- name: svc.name,
1897
- image: svc.image,
1898
- build: svc.build_context ? {
1899
- context: svc.build_context,
1900
- dockerfile: svc.dockerfile,
1901
- } : undefined,
1902
- ports: svc.port ? [{ host: svc.port, container: svc.port }] : [],
1903
- environment: {},
1904
- dependsOn: svc.depends_on || [],
1905
- volumes: [],
1906
- })),
1917
+ applications: dockerApps,
1907
1918
  databases: (detected.infrastructure || [])
1908
1919
  .filter(i => i.type === 'database')
1909
1920
  .map(i => ({
@@ -514,11 +514,17 @@ async function editAppConfig(name, app, rootDir) {
514
514
  build_context: dockerContext,
515
515
  dockerfile: dockerfile || app.docker?.dockerfile,
516
516
  };
517
- // Auto-set port from docker-compose
517
+ // Auto-set values from docker-compose
518
518
  if (composeInfo?.port) {
519
519
  result.port = composeInfo.port;
520
520
  result.port_source = 'docker-compose.yml';
521
521
  }
522
+ if (composeInfo?.healthcheck) {
523
+ result.healthcheck = composeInfo.healthcheck;
524
+ }
525
+ if (composeInfo?.dependsOn?.length) {
526
+ result.depends_on = composeInfo.dependsOn;
527
+ }
522
528
  }
523
529
  // Edit port (only if not a library and not already set by docker-compose)
524
530
  if (newRunner !== 'none' && result.type !== 'library') {
@@ -242,6 +242,8 @@ class ProfileResolver {
242
242
  const v4Config = appConfig;
243
243
  const runner = v4Config.runner;
244
244
  const docker = v4Config.docker;
245
+ const healthcheck = v4Config.healthcheck;
246
+ const dependsOn = v4Config.depends_on;
245
247
  return {
246
248
  name: appName,
247
249
  path: appConfig.path,
@@ -253,6 +255,8 @@ class ProfileResolver {
253
255
  env: appConfig.env,
254
256
  runner,
255
257
  docker,
258
+ healthcheck,
259
+ dependsOn,
256
260
  dependencies,
257
261
  };
258
262
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "genbox",
3
- "version": "1.0.41",
3
+ "version": "1.0.42",
4
4
  "description": "Genbox CLI - AI-Powered Development Environments",
5
5
  "main": "dist/index.js",
6
6
  "bin": {