ortoni-report 4.0.2-beta.1 → 4.1.0-test.1
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/{chunk-INS3E7E6.mjs → chunk-4RZ5C7KY.mjs} +402 -296
- package/dist/{cli/cli.js → cli.js} +404 -189
- package/dist/cli.mjs +208 -0
- package/dist/index.html +2 -2
- package/dist/ortoni-report.d.mts +8 -1
- package/dist/ortoni-report.d.ts +8 -1
- package/dist/ortoni-report.js +204 -89
- package/dist/ortoni-report.mjs +18 -15
- package/package.json +11 -4
- package/dist/chunk-45EJSEX2.mjs +0 -632
- package/dist/chunk-75EAJL2U.mjs +0 -632
- package/dist/chunk-A6HCKATU.mjs +0 -76
- package/dist/chunk-FGIYOFIC.mjs +0 -632
- package/dist/chunk-FHKWBHU6.mjs +0 -633
- package/dist/chunk-GLICR3VS.mjs +0 -637
- package/dist/chunk-HFO6XSKC.mjs +0 -633
- package/dist/chunk-HOZD6YIV.mjs +0 -634
- package/dist/chunk-IJO2YIFE.mjs +0 -637
- package/dist/chunk-JEIWNUQY.mjs +0 -632
- package/dist/chunk-JPLAGYR7.mjs +0 -632
- package/dist/chunk-NM6ULN2O.mjs +0 -632
- package/dist/chunk-OZS6QIJS.mjs +0 -638
- package/dist/chunk-P57227VN.mjs +0 -633
- package/dist/chunk-QMTRYN5N.js +0 -635
- package/dist/chunk-TI33PMMQ.mjs +0 -639
- package/dist/chunk-Z5NBP5TS.mjs +0 -635
- package/dist/cli/cli.cjs +0 -678
- package/dist/cli/cli.d.cts +0 -1
- package/dist/cli/cli.mjs +0 -103
- package/dist/ortoni-report.cjs +0 -2134
- package/dist/ortoni-report.d.cts +0 -111
- /package/dist/{cli/cli.d.mts → cli.d.mts} +0 -0
- /package/dist/{cli/cli.d.ts → cli.d.ts} +0 -0
package/dist/ortoni-report.mjs
CHANGED
|
@@ -8,9 +8,9 @@ import {
|
|
|
8
8
|
extractSuites,
|
|
9
9
|
normalizeFilePath,
|
|
10
10
|
startReportServer
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-4RZ5C7KY.mjs";
|
|
12
12
|
|
|
13
|
-
// src/helpers/resultProcessor
|
|
13
|
+
// src/helpers/resultProcessor.ts
|
|
14
14
|
import AnsiToHtml from "ansi-to-html";
|
|
15
15
|
import path2 from "path";
|
|
16
16
|
|
|
@@ -1272,7 +1272,7 @@ function getFileExtension(contentType) {
|
|
|
1272
1272
|
return extensions[contentType] || "unknown";
|
|
1273
1273
|
}
|
|
1274
1274
|
|
|
1275
|
-
// src/helpers/resultProcessor
|
|
1275
|
+
// src/helpers/resultProcessor.ts
|
|
1276
1276
|
var TestResultProcessor = class {
|
|
1277
1277
|
constructor(projectRoot) {
|
|
1278
1278
|
this.ansiToHtml = new AnsiToHtml({ fg: "var(--snippet-color)" });
|
|
@@ -1391,7 +1391,7 @@ var OrtoniReport = class {
|
|
|
1391
1391
|
await this.dbManager.initialize(
|
|
1392
1392
|
path3.join(this.folderPath, "ortoni-data-history.sqlite")
|
|
1393
1393
|
);
|
|
1394
|
-
this.
|
|
1394
|
+
this.shardConfig = config?.shard;
|
|
1395
1395
|
}
|
|
1396
1396
|
onStdOut(chunk, _test, _result) {
|
|
1397
1397
|
if (this.reportsCount == 1 && this.showConsoleLogs) {
|
|
@@ -1408,7 +1408,7 @@ var OrtoniReport = class {
|
|
|
1408
1408
|
);
|
|
1409
1409
|
this.results.push(testResult);
|
|
1410
1410
|
} catch (error) {
|
|
1411
|
-
console.error("
|
|
1411
|
+
console.error("Ortoni Report: Error processing test end:", error);
|
|
1412
1412
|
}
|
|
1413
1413
|
}
|
|
1414
1414
|
printsToStdio() {
|
|
@@ -1427,8 +1427,8 @@ var OrtoniReport = class {
|
|
|
1427
1427
|
(r) => r.status !== "skipped"
|
|
1428
1428
|
);
|
|
1429
1429
|
const totalDuration = result.duration;
|
|
1430
|
-
if (this.
|
|
1431
|
-
const shard = this.
|
|
1430
|
+
if (this.shardConfig && this.shardConfig.total > 1) {
|
|
1431
|
+
const shard = this.shardConfig;
|
|
1432
1432
|
const shardFile = `ortoni-shard-${shard.current}-of-${shard.total}.json`;
|
|
1433
1433
|
const shardData = {
|
|
1434
1434
|
status: result.status,
|
|
@@ -1445,8 +1445,11 @@ var OrtoniReport = class {
|
|
|
1445
1445
|
meta: this.ortoniConfig.meta
|
|
1446
1446
|
}
|
|
1447
1447
|
};
|
|
1448
|
-
this.fileManager.writeRawFile(
|
|
1449
|
-
|
|
1448
|
+
const shardFilePath = this.fileManager.writeRawFile(
|
|
1449
|
+
shardFile,
|
|
1450
|
+
shardData
|
|
1451
|
+
);
|
|
1452
|
+
console.info(`Ortoni Report: Shard data written to ${shardFilePath}`);
|
|
1450
1453
|
this.shouldGenerateReport = false;
|
|
1451
1454
|
return;
|
|
1452
1455
|
}
|
|
@@ -1459,21 +1462,21 @@ var OrtoniReport = class {
|
|
|
1459
1462
|
this.results,
|
|
1460
1463
|
this.projectSet
|
|
1461
1464
|
);
|
|
1462
|
-
this.outputPath = this.fileManager.writeReportFile(
|
|
1465
|
+
this.outputPath = await this.fileManager.writeReportFile(
|
|
1463
1466
|
this.outputFilename,
|
|
1464
1467
|
finalReportData
|
|
1465
1468
|
);
|
|
1466
1469
|
} else {
|
|
1467
|
-
console.error("
|
|
1470
|
+
console.error("Ortoni Report: Error saving test run to database");
|
|
1468
1471
|
}
|
|
1469
1472
|
} else {
|
|
1470
1473
|
console.error(
|
|
1471
|
-
"
|
|
1474
|
+
"Ortoni Report: Report generation skipped due to error in Playwright worker!"
|
|
1472
1475
|
);
|
|
1473
1476
|
}
|
|
1474
1477
|
} catch (error) {
|
|
1475
1478
|
this.shouldGenerateReport = false;
|
|
1476
|
-
console.error("
|
|
1479
|
+
console.error("Ortoni Report: Error generating report:", error);
|
|
1477
1480
|
}
|
|
1478
1481
|
}
|
|
1479
1482
|
async onExit() {
|
|
@@ -1481,7 +1484,7 @@ var OrtoniReport = class {
|
|
|
1481
1484
|
await this.dbManager.close();
|
|
1482
1485
|
if (this.shouldGenerateReport) {
|
|
1483
1486
|
this.fileManager.copyTraceViewerAssets(this.skipTraceViewer);
|
|
1484
|
-
console.info(`Ortoni
|
|
1487
|
+
console.info(`Ortoni Report generated at ${this.outputPath}`);
|
|
1485
1488
|
this.serverManager.startServer(
|
|
1486
1489
|
this.folderPath,
|
|
1487
1490
|
this.outputFilename,
|
|
@@ -1491,7 +1494,7 @@ var OrtoniReport = class {
|
|
|
1491
1494
|
});
|
|
1492
1495
|
}
|
|
1493
1496
|
} catch (error) {
|
|
1494
|
-
console.error("
|
|
1497
|
+
console.error("Ortoni Report: Error in onExit:", error);
|
|
1495
1498
|
}
|
|
1496
1499
|
}
|
|
1497
1500
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ortoni-report",
|
|
3
|
-
"version": "4.0
|
|
3
|
+
"version": "4.1.0-test.1",
|
|
4
4
|
"description": "Playwright Report By LetCode with Koushik",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"tsc": "tsc",
|
|
@@ -8,10 +8,11 @@
|
|
|
8
8
|
"release": "npm publish"
|
|
9
9
|
},
|
|
10
10
|
"bin": {
|
|
11
|
-
"ortoni-report": "./dist/cli
|
|
11
|
+
"ortoni-report": "./dist/cli.js"
|
|
12
12
|
},
|
|
13
13
|
"files": [
|
|
14
|
-
"dist",
|
|
14
|
+
"dist/",
|
|
15
|
+
"dist/index.html",
|
|
15
16
|
"README.md",
|
|
16
17
|
"CHANGELOG.md"
|
|
17
18
|
],
|
|
@@ -52,5 +53,11 @@
|
|
|
52
53
|
},
|
|
53
54
|
"main": "dist/ortoni-report.js",
|
|
54
55
|
"module": "dist/ortoni-report.mjs",
|
|
55
|
-
"types": "dist/ortoni-report.d.ts"
|
|
56
|
+
"types": "dist/ortoni-report.d.ts",
|
|
57
|
+
"exports": {
|
|
58
|
+
".": {
|
|
59
|
+
"require": "./dist/ortoni-report.js",
|
|
60
|
+
"import": "./dist/ortoni-report.mjs"
|
|
61
|
+
}
|
|
62
|
+
}
|
|
56
63
|
}
|