ortoni-report 4.0.2-beta.0 → 4.1.0-test.0
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} +369 -144
- package/dist/cli.mjs +195 -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 +214 -90
- package/dist/ortoni-report.mjs +28 -16
- 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 -80
- 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,17 +1427,29 @@ 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,
|
|
1435
1435
|
duration: totalDuration,
|
|
1436
1436
|
results: this.results,
|
|
1437
|
-
projectSet: Array.from(this.projectSet)
|
|
1437
|
+
projectSet: Array.from(this.projectSet),
|
|
1438
|
+
userConfig: {
|
|
1439
|
+
projectName: this.ortoniConfig.projectName,
|
|
1440
|
+
authorName: this.ortoniConfig.authorName,
|
|
1441
|
+
type: this.ortoniConfig.testType,
|
|
1442
|
+
title: this.ortoniConfig.title
|
|
1443
|
+
},
|
|
1444
|
+
userMeta: {
|
|
1445
|
+
meta: this.ortoniConfig.meta
|
|
1446
|
+
}
|
|
1438
1447
|
};
|
|
1439
|
-
this.fileManager.writeRawFile(
|
|
1440
|
-
|
|
1448
|
+
const shardFilePath = this.fileManager.writeRawFile(
|
|
1449
|
+
shardFile,
|
|
1450
|
+
shardData
|
|
1451
|
+
);
|
|
1452
|
+
console.info(`Ortoni Report: Shard data written to ${shardFilePath}`);
|
|
1441
1453
|
this.shouldGenerateReport = false;
|
|
1442
1454
|
return;
|
|
1443
1455
|
}
|
|
@@ -1450,21 +1462,21 @@ var OrtoniReport = class {
|
|
|
1450
1462
|
this.results,
|
|
1451
1463
|
this.projectSet
|
|
1452
1464
|
);
|
|
1453
|
-
this.outputPath = this.fileManager.writeReportFile(
|
|
1465
|
+
this.outputPath = await this.fileManager.writeReportFile(
|
|
1454
1466
|
this.outputFilename,
|
|
1455
1467
|
finalReportData
|
|
1456
1468
|
);
|
|
1457
1469
|
} else {
|
|
1458
|
-
console.error("
|
|
1470
|
+
console.error("Ortoni Report: Error saving test run to database");
|
|
1459
1471
|
}
|
|
1460
1472
|
} else {
|
|
1461
1473
|
console.error(
|
|
1462
|
-
"
|
|
1474
|
+
"Ortoni Report: Report generation skipped due to error in Playwright worker!"
|
|
1463
1475
|
);
|
|
1464
1476
|
}
|
|
1465
1477
|
} catch (error) {
|
|
1466
1478
|
this.shouldGenerateReport = false;
|
|
1467
|
-
console.error("
|
|
1479
|
+
console.error("Ortoni Report: Error generating report:", error);
|
|
1468
1480
|
}
|
|
1469
1481
|
}
|
|
1470
1482
|
async onExit() {
|
|
@@ -1472,7 +1484,7 @@ var OrtoniReport = class {
|
|
|
1472
1484
|
await this.dbManager.close();
|
|
1473
1485
|
if (this.shouldGenerateReport) {
|
|
1474
1486
|
this.fileManager.copyTraceViewerAssets(this.skipTraceViewer);
|
|
1475
|
-
console.info(`Ortoni
|
|
1487
|
+
console.info(`Ortoni Report generated at ${this.outputPath}`);
|
|
1476
1488
|
this.serverManager.startServer(
|
|
1477
1489
|
this.folderPath,
|
|
1478
1490
|
this.outputFilename,
|
|
@@ -1482,7 +1494,7 @@ var OrtoniReport = class {
|
|
|
1482
1494
|
});
|
|
1483
1495
|
}
|
|
1484
1496
|
} catch (error) {
|
|
1485
|
-
console.error("
|
|
1497
|
+
console.error("Ortoni Report: Error in onExit:", error);
|
|
1486
1498
|
}
|
|
1487
1499
|
}
|
|
1488
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.0",
|
|
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
|
}
|