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.
- package/dist/common/src/server/runtimes/node/docker.js +4 -1
- package/dist/common/src/server/serverClasees/Server.js +1 -0
- package/dist/common/src/server/serverClasees/Server_Docker.js +14 -9
- package/dist/common/tsconfig.common.tsbuildinfo +1 -1
- package/dist/module/src/server/runtimes/node/docker.js +4 -1
- package/dist/module/src/server/serverClasees/Server.js +1 -0
- package/dist/module/src/server/serverClasees/Server_Docker.js +14 -9
- package/dist/module/tsconfig.module.tsbuildinfo +1 -1
- package/dist/prebuild/testeranto.mjs +16 -12
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/server/runtimes/node/docker.ts +3 -2
- package/src/server/serverClasees/Server.ts +1 -1
- package/src/server/serverClasees/Server_Docker.ts +17 -9
- package/testeranto/runtimes/node/node.Dockerfile +1 -1
|
@@ -97,10 +97,11 @@ var nodeDockerComposeFile = (config, container_name, fpath) => {
|
|
|
97
97
|
command: nodeBuildCommand(fpath)
|
|
98
98
|
};
|
|
99
99
|
};
|
|
100
|
+
var externalTests = true;
|
|
100
101
|
var nodeBuildCommand = (fpath) => {
|
|
101
|
-
if (
|
|
102
|
+
if (externalTests) {
|
|
102
103
|
console.log("external tests");
|
|
103
|
-
return `yarn tsx node_modules/testeranto/src/server/runtimes/node/node.ts /workspace/${fpath}`;
|
|
104
|
+
return `yarn tsx /workspace/node_modules/testeranto/src/server/runtimes/node/node.ts /workspace/${fpath}`;
|
|
104
105
|
} else {
|
|
105
106
|
console.log("not external tests");
|
|
106
107
|
return `yarn tsx src/server/runtimes/node/node.ts /workspace/${fpath}`;
|
|
@@ -1122,7 +1123,7 @@ ${x}
|
|
|
1122
1123
|
// console.warn(`[Server_Docker] Container for ${serviceName} did not appear after ${maxAttempts} attempts`);
|
|
1123
1124
|
// return false;
|
|
1124
1125
|
// }
|
|
1125
|
-
async startServiceLogging(serviceName,
|
|
1126
|
+
async startServiceLogging(serviceName, runtime) {
|
|
1126
1127
|
const reportDir = path2.join(
|
|
1127
1128
|
process.cwd(),
|
|
1128
1129
|
"testeranto",
|
|
@@ -1258,6 +1259,8 @@ ${x}
|
|
|
1258
1259
|
console.log(`[Server_Docker] Starting builder service: ${serviceName}`);
|
|
1259
1260
|
try {
|
|
1260
1261
|
await this.spawnPromise(`docker compose -f "testeranto/docker-compose.yml" up -d ${serviceName}`);
|
|
1262
|
+
this.startServiceLogging(serviceName, runtime).catch((error) => console.error(`[Server_Docker] Failed to start logging for ${serviceName}:`, error));
|
|
1263
|
+
this.captureExistingLogs(serviceName, runtime);
|
|
1261
1264
|
} catch (error) {
|
|
1262
1265
|
console.error(`[Server_Docker] Failed to start ${serviceName}: ${error.message}`);
|
|
1263
1266
|
}
|
|
@@ -1281,7 +1284,8 @@ ${x}
|
|
|
1281
1284
|
console.log(`[Server_Docker] Starting aider service: ${aiderServiceName} for test ${testName}`);
|
|
1282
1285
|
try {
|
|
1283
1286
|
await this.spawnPromise(`docker compose -f "testeranto/docker-compose.yml" up -d ${aiderServiceName}`);
|
|
1284
|
-
this.startServiceLogging(aiderServiceName,
|
|
1287
|
+
this.startServiceLogging(aiderServiceName, runtime).catch((error) => console.error(`[Server_Docker] Failed to start logging for ${aiderServiceName}:`, error));
|
|
1288
|
+
this.captureExistingLogs(aiderServiceName, runtime).catch((error) => console.error(`[Server_Docker] Failed to capture existing logs for ${aiderServiceName}:`, error));
|
|
1285
1289
|
} catch (error) {
|
|
1286
1290
|
console.error(`[Server_Docker] Failed to start ${aiderServiceName}: ${error.message}`);
|
|
1287
1291
|
}
|
|
@@ -1297,11 +1301,11 @@ ${x}
|
|
|
1297
1301
|
console.log(`[Server_Docker] Starting BDD service: ${bddServiceName}, ${configKey}, ${configValue}`);
|
|
1298
1302
|
try {
|
|
1299
1303
|
await this.spawnPromise(`docker compose -f "testeranto/docker-compose.yml" up -d ${bddServiceName}`);
|
|
1300
|
-
this.startServiceLogging(bddServiceName,
|
|
1301
|
-
this.captureExistingLogs(bddServiceName, runtime
|
|
1304
|
+
this.startServiceLogging(bddServiceName, runtime).catch((error) => console.error(`[Server_Docker] Failed to start logging for ${bddServiceName}:`, error));
|
|
1305
|
+
this.captureExistingLogs(bddServiceName, runtime).catch((error) => console.error(`[Server_Docker] Failed to capture existing logs for ${bddServiceName}:`, error));
|
|
1302
1306
|
} catch (error) {
|
|
1303
1307
|
console.error(`[Server_Docker] Failed to start ${bddServiceName}: ${error.message}`);
|
|
1304
|
-
this.captureExistingLogs(bddServiceName, runtime
|
|
1308
|
+
this.captureExistingLogs(bddServiceName, runtime).catch((err) => console.error(`[Server_Docker] Also failed to capture logs:`, err));
|
|
1305
1309
|
}
|
|
1306
1310
|
}
|
|
1307
1311
|
}
|
|
@@ -1317,17 +1321,17 @@ ${x}
|
|
|
1317
1321
|
console.log(`[Server_Docker] Starting static test service: ${staticServiceName}`);
|
|
1318
1322
|
try {
|
|
1319
1323
|
await this.spawnPromise(`docker compose -f "testeranto/docker-compose.yml" up -d ${staticServiceName}`);
|
|
1320
|
-
this.startServiceLogging(staticServiceName,
|
|
1321
|
-
this.captureExistingLogs(staticServiceName, runtime
|
|
1324
|
+
this.startServiceLogging(staticServiceName, runtime).catch((error) => console.error(`[Server_Docker] Failed to start logging for ${staticServiceName}:`, error));
|
|
1325
|
+
this.captureExistingLogs(staticServiceName, runtime).catch((error) => console.error(`[Server_Docker] Failed to capture existing logs for ${staticServiceName}:`, error));
|
|
1322
1326
|
} catch (error) {
|
|
1323
1327
|
console.error(`[Server_Docker] Failed to start ${staticServiceName}: ${error.message}`);
|
|
1324
|
-
this.captureExistingLogs(staticServiceName, runtime
|
|
1328
|
+
this.captureExistingLogs(staticServiceName, runtime).catch((err) => console.error(`[Server_Docker] Also failed to capture logs:`, err));
|
|
1325
1329
|
}
|
|
1326
1330
|
}
|
|
1327
1331
|
}
|
|
1328
1332
|
}
|
|
1329
1333
|
}
|
|
1330
|
-
async captureExistingLogs(serviceName, runtime
|
|
1334
|
+
async captureExistingLogs(serviceName, runtime) {
|
|
1331
1335
|
const reportDir = path2.join(
|
|
1332
1336
|
process.cwd(),
|
|
1333
1337
|
"testeranto",
|
|
@@ -1648,7 +1652,7 @@ ${x}
|
|
|
1648
1652
|
};
|
|
1649
1653
|
|
|
1650
1654
|
// src/server/serverClasees/Server.ts
|
|
1651
|
-
console.log("hello server");
|
|
1655
|
+
console.log("hello server !?");
|
|
1652
1656
|
readline.emitKeypressEvents(process.stdin);
|
|
1653
1657
|
if (process.stdin.isTTY) process.stdin.setRawMode(true);
|
|
1654
1658
|
var Server = class extends Server_Docker {
|