testeranto 0.218.1 → 0.219.3

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.
@@ -19,9 +19,12 @@ export const nodeDockerComposeFile = (config, container_name, fpath) => {
19
19
  const externalTests = true;
20
20
  export const nodeBuildCommand = (fpath) => {
21
21
  if (externalTests) {
22
- return `yarn tsx node_modules/testeranto/src/server/runtimes/node/node.ts /workspace/${fpath}`;
22
+ console.log("external tests");
23
+ return `yarn tsx /workspace/node_modules/testeranto/src/server/runtimes/node/node.ts /workspace/${fpath}`;
24
+ // return `/workspace/node_modules/testeranto/src/server/runtimes/node/node.ts`
23
25
  }
24
26
  else {
27
+ console.log("not external tests");
25
28
  return `yarn tsx src/server/runtimes/node/node.ts /workspace/${fpath}`;
26
29
  }
27
30
  };
@@ -1,6 +1,7 @@
1
1
  import fs from "fs";
2
2
  import readline from "readline";
3
3
  import { Server_Docker } from "./Server_Docker";
4
+ console.log("hello server !?");
4
5
  readline.emitKeypressEvents(process.stdin);
5
6
  if (process.stdin.isTTY)
6
7
  process.stdin.setRawMode(true);
@@ -295,7 +295,7 @@ ${x}
295
295
  // console.warn(`[Server_Docker] Container for ${serviceName} did not appear after ${maxAttempts} attempts`);
296
296
  // return false;
297
297
  // }
298
- async startServiceLogging(serviceName, containerName, runtime, testName) {
298
+ async startServiceLogging(serviceName, runtime) {
299
299
  var _a, _b;
300
300
  // Create report directory
301
301
  const reportDir = path.join(process.cwd(), "testeranto", "reports", "allTests", "example", runtime);
@@ -443,6 +443,9 @@ ${x}
443
443
  console.log(`[Server_Docker] Starting builder service: ${serviceName}`);
444
444
  try {
445
445
  await this.spawnPromise(`docker compose -f "testeranto/docker-compose.yml" up -d ${serviceName}`);
446
+ this.startServiceLogging(serviceName, runtime)
447
+ .catch(error => console.error(`[Server_Docker] Failed to start logging for ${serviceName}:`, error));
448
+ this.captureExistingLogs(serviceName, runtime);
446
449
  }
447
450
  catch (error) {
448
451
  console.error(`[Server_Docker] Failed to start ${serviceName}: ${error.message}`);
@@ -473,8 +476,10 @@ ${x}
473
476
  try {
474
477
  await this.spawnPromise(`docker compose -f "testeranto/docker-compose.yml" up -d ${aiderServiceName}`);
475
478
  // Start logging for aider services
476
- this.startServiceLogging(aiderServiceName, aiderServiceName, runtime, testName)
479
+ this.startServiceLogging(aiderServiceName, runtime)
477
480
  .catch(error => console.error(`[Server_Docker] Failed to start logging for ${aiderServiceName}:`, error));
481
+ this.captureExistingLogs(aiderServiceName, runtime)
482
+ .catch(error => console.error(`[Server_Docker] Failed to capture existing logs for ${aiderServiceName}:`, error));
478
483
  }
479
484
  catch (error) {
480
485
  console.error(`[Server_Docker] Failed to start ${aiderServiceName}: ${error.message}`);
@@ -496,16 +501,16 @@ ${x}
496
501
  await this.spawnPromise(`docker compose -f "testeranto/docker-compose.yml" up -d ${bddServiceName}`);
497
502
  // Immediately start logging in the background
498
503
  // Don't wait for it to complete
499
- this.startServiceLogging(bddServiceName, bddServiceName, runtime, testName)
504
+ this.startServiceLogging(bddServiceName, runtime)
500
505
  .catch(error => console.error(`[Server_Docker] Failed to start logging for ${bddServiceName}:`, error));
501
506
  // Also capture any existing logs from the container (in case it already produced output)
502
- this.captureExistingLogs(bddServiceName, runtime, testName)
507
+ this.captureExistingLogs(bddServiceName, runtime)
503
508
  .catch(error => console.error(`[Server_Docker] Failed to capture existing logs for ${bddServiceName}:`, error));
504
509
  }
505
510
  catch (error) {
506
511
  console.error(`[Server_Docker] Failed to start ${bddServiceName}: ${error.message}`);
507
512
  // Even if starting failed, try to capture any logs that might exist
508
- this.captureExistingLogs(bddServiceName, runtime, testName)
513
+ this.captureExistingLogs(bddServiceName, runtime)
509
514
  .catch(err => console.error(`[Server_Docker] Also failed to capture logs:`, err));
510
515
  }
511
516
  }
@@ -525,23 +530,23 @@ ${x}
525
530
  try {
526
531
  await this.spawnPromise(`docker compose -f "testeranto/docker-compose.yml" up -d ${staticServiceName}`);
527
532
  // Start logging for this service
528
- this.startServiceLogging(staticServiceName, staticServiceName, runtime, testName)
533
+ this.startServiceLogging(staticServiceName, runtime)
529
534
  .catch(error => console.error(`[Server_Docker] Failed to start logging for ${staticServiceName}:`, error));
530
535
  // Also capture any existing logs
531
- this.captureExistingLogs(staticServiceName, runtime, testName)
536
+ this.captureExistingLogs(staticServiceName, runtime)
532
537
  .catch(error => console.error(`[Server_Docker] Failed to capture existing logs for ${staticServiceName}:`, error));
533
538
  }
534
539
  catch (error) {
535
540
  console.error(`[Server_Docker] Failed to start ${staticServiceName}: ${error.message}`);
536
541
  // Try to capture logs even if starting failed
537
- this.captureExistingLogs(staticServiceName, runtime, testName)
542
+ this.captureExistingLogs(staticServiceName, runtime)
538
543
  .catch(err => console.error(`[Server_Docker] Also failed to capture logs:`, err));
539
544
  }
540
545
  }
541
546
  }
542
547
  }
543
548
  }
544
- async captureExistingLogs(serviceName, runtime, testName) {
549
+ async captureExistingLogs(serviceName, runtime) {
545
550
  // Create report directory
546
551
  const reportDir = path.join(process.cwd(), "testeranto", "reports", "allTests", "example", runtime);
547
552
  try {