ortoni-report 2.0.9 → 3.0.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.
@@ -3,7 +3,7 @@ import {
3
3
  __require,
4
4
  __toESM,
5
5
  startReportServer
6
- } from "./chunk-RHM5OWYN.mjs";
6
+ } from "./chunk-DW4XGLAZ.mjs";
7
7
 
8
8
  // node_modules/handlebars/dist/cjs/handlebars/utils.js
9
9
  var require_utils = __commonJS({
@@ -785,8 +785,7 @@ var require_runtime = __commonJS({
785
785
  var newObj = {};
786
786
  if (obj != null) {
787
787
  for (var key in obj) {
788
- if (Object.prototype.hasOwnProperty.call(obj, key))
789
- newObj[key] = obj[key];
788
+ if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
790
789
  }
791
790
  }
792
791
  newObj["default"] = obj;
@@ -1081,8 +1080,7 @@ var require_no_conflict = __commonJS({
1081
1080
  exports.__esModule = true;
1082
1081
  exports["default"] = function(Handlebars2) {
1083
1082
  (function() {
1084
- if (typeof globalThis === "object")
1085
- return;
1083
+ if (typeof globalThis === "object") return;
1086
1084
  Object.prototype.__defineGetter__("__magic__", function() {
1087
1085
  return this;
1088
1086
  });
@@ -1116,8 +1114,7 @@ var require_handlebars_runtime = __commonJS({
1116
1114
  var newObj = {};
1117
1115
  if (obj != null) {
1118
1116
  for (var key in obj) {
1119
- if (Object.prototype.hasOwnProperty.call(obj, key))
1120
- newObj[key] = obj[key];
1117
+ if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
1121
1118
  }
1122
1119
  }
1123
1120
  newObj["default"] = obj;
@@ -1456,13 +1453,11 @@ var require_parser = __commonJS({
1456
1453
  this.lexer.yy = this.yy;
1457
1454
  this.yy.lexer = this.lexer;
1458
1455
  this.yy.parser = this;
1459
- if (typeof this.lexer.yylloc == "undefined")
1460
- this.lexer.yylloc = {};
1456
+ if (typeof this.lexer.yylloc == "undefined") this.lexer.yylloc = {};
1461
1457
  var yyloc = this.lexer.yylloc;
1462
1458
  lstack.push(yyloc);
1463
1459
  var ranges = this.lexer.options && this.lexer.options.ranges;
1464
- if (typeof this.yy.parseError === "function")
1465
- this.parseError = this.yy.parseError;
1460
+ if (typeof this.yy.parseError === "function") this.parseError = this.yy.parseError;
1466
1461
  function popStack(n) {
1467
1462
  stack.length = stack.length - 2 * n;
1468
1463
  vstack.length = vstack.length - n;
@@ -1491,10 +1486,9 @@ var require_parser = __commonJS({
1491
1486
  var errStr = "";
1492
1487
  if (!recovering) {
1493
1488
  expected = [];
1494
- for (p in table[state])
1495
- if (this.terminals_[p] && p > 2) {
1496
- expected.push("'" + this.terminals_[p] + "'");
1497
- }
1489
+ for (p in table[state]) if (this.terminals_[p] && p > 2) {
1490
+ expected.push("'" + this.terminals_[p] + "'");
1491
+ }
1498
1492
  if (this.lexer.showPosition) {
1499
1493
  errStr = "Parse error on line " + (yylineno + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
1500
1494
  } else {
@@ -1518,8 +1512,7 @@ var require_parser = __commonJS({
1518
1512
  yytext = this.lexer.yytext;
1519
1513
  yylineno = this.lexer.yylineno;
1520
1514
  yyloc = this.lexer.yylloc;
1521
- if (recovering > 0)
1522
- recovering--;
1515
+ if (recovering > 0) recovering--;
1523
1516
  } else {
1524
1517
  symbol = preErrorSymbol;
1525
1518
  preErrorSymbol = null;
@@ -1571,8 +1564,7 @@ var require_parser = __commonJS({
1571
1564
  this.yytext = this.matched = this.match = "";
1572
1565
  this.conditionStack = ["INITIAL"];
1573
1566
  this.yylloc = { first_line: 1, first_column: 0, last_line: 1, last_column: 0 };
1574
- if (this.options.ranges)
1575
- this.yylloc.range = [0, 0];
1567
+ if (this.options.ranges) this.yylloc.range = [0, 0];
1576
1568
  this.offset = 0;
1577
1569
  return this;
1578
1570
  },
@@ -1590,8 +1582,7 @@ var require_parser = __commonJS({
1590
1582
  } else {
1591
1583
  this.yylloc.last_column++;
1592
1584
  }
1593
- if (this.options.ranges)
1594
- this.yylloc.range[1]++;
1585
+ if (this.options.ranges) this.yylloc.range[1]++;
1595
1586
  this._input = this._input.slice(1);
1596
1587
  return ch;
1597
1588
  },
@@ -1604,8 +1595,7 @@ var require_parser = __commonJS({
1604
1595
  var oldLines = this.match.split(/(?:\r\n?|\n)/g);
1605
1596
  this.match = this.match.substr(0, this.match.length - 1);
1606
1597
  this.matched = this.matched.substr(0, this.matched.length - 1);
1607
- if (lines.length - 1)
1608
- this.yylineno -= lines.length - 1;
1598
+ if (lines.length - 1) this.yylineno -= lines.length - 1;
1609
1599
  var r = this.yylloc.range;
1610
1600
  this.yylloc = {
1611
1601
  first_line: this.yylloc.first_line,
@@ -1645,8 +1635,7 @@ var require_parser = __commonJS({
1645
1635
  if (this.done) {
1646
1636
  return this.EOF;
1647
1637
  }
1648
- if (!this._input)
1649
- this.done = true;
1638
+ if (!this._input) this.done = true;
1650
1639
  var token, match, tempMatch, index, col, lines;
1651
1640
  if (!this._more) {
1652
1641
  this.yytext = "";
@@ -1658,14 +1647,12 @@ var require_parser = __commonJS({
1658
1647
  if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
1659
1648
  match = tempMatch;
1660
1649
  index = i;
1661
- if (!this.options.flex)
1662
- break;
1650
+ if (!this.options.flex) break;
1663
1651
  }
1664
1652
  }
1665
1653
  if (match) {
1666
1654
  lines = match[0].match(/(?:\r\n?|\n).*/g);
1667
- if (lines)
1668
- this.yylineno += lines.length;
1655
+ if (lines) this.yylineno += lines.length;
1669
1656
  this.yylloc = {
1670
1657
  first_line: this.yylloc.last_line,
1671
1658
  last_line: this.yylineno + 1,
@@ -1683,12 +1670,9 @@ var require_parser = __commonJS({
1683
1670
  this._input = this._input.slice(match[0].length);
1684
1671
  this.matched += match[0];
1685
1672
  token = this.performAction.call(this, this.yy, this, rules[index], this.conditionStack[this.conditionStack.length - 1]);
1686
- if (this.done && this._input)
1687
- this.done = false;
1688
- if (token)
1689
- return token;
1690
- else
1691
- return;
1673
+ if (this.done && this._input) this.done = false;
1674
+ if (token) return token;
1675
+ else return;
1692
1676
  }
1693
1677
  if (this._input === "") {
1694
1678
  return this.EOF;
@@ -1737,8 +1721,7 @@ var require_parser = __commonJS({
1737
1721
  } else {
1738
1722
  this.begin("mu");
1739
1723
  }
1740
- if (yy_.yytext)
1741
- return 15;
1724
+ if (yy_.yytext) return 15;
1742
1725
  break;
1743
1726
  case 1:
1744
1727
  return 15;
@@ -2385,8 +2368,7 @@ var require_base2 = __commonJS({
2385
2368
  var newObj = {};
2386
2369
  if (obj != null) {
2387
2370
  for (var key in obj) {
2388
- if (Object.prototype.hasOwnProperty.call(obj, key))
2389
- newObj[key] = obj[key];
2371
+ if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
2390
2372
  }
2391
2373
  }
2392
2374
  newObj["default"] = obj;
@@ -2782,8 +2764,7 @@ var require_compiler = __commonJS({
2782
2764
  return new env.JavaScriptCompiler().compile(environment, options);
2783
2765
  }
2784
2766
  function compile(input, options, env) {
2785
- if (options === void 0)
2786
- options = {};
2767
+ if (options === void 0) options = {};
2787
2768
  if (input == null || typeof input !== "string" && input.type !== "Program") {
2788
2769
  throw new _exception2["default"]("You must pass a string or Handlebars AST to Handlebars.compile. You passed " + input);
2789
2770
  }
@@ -2851,6 +2832,7 @@ var require_compiler = __commonJS({
2851
2832
  // node_modules/source-map/lib/base64.js
2852
2833
  var require_base64 = __commonJS({
2853
2834
  "node_modules/source-map/lib/base64.js"(exports) {
2835
+ "use strict";
2854
2836
  var intToCharMap = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");
2855
2837
  exports.encode = function(number) {
2856
2838
  if (0 <= number && number < intToCharMap.length) {
@@ -2892,6 +2874,7 @@ var require_base64 = __commonJS({
2892
2874
  // node_modules/source-map/lib/base64-vlq.js
2893
2875
  var require_base64_vlq = __commonJS({
2894
2876
  "node_modules/source-map/lib/base64-vlq.js"(exports) {
2877
+ "use strict";
2895
2878
  var base64 = require_base64();
2896
2879
  var VLQ_BASE_SHIFT = 5;
2897
2880
  var VLQ_BASE = 1 << VLQ_BASE_SHIFT;
@@ -2946,6 +2929,7 @@ var require_base64_vlq = __commonJS({
2946
2929
  // node_modules/source-map/lib/util.js
2947
2930
  var require_util = __commonJS({
2948
2931
  "node_modules/source-map/lib/util.js"(exports) {
2932
+ "use strict";
2949
2933
  function getArg(aArgs, aName, aDefaultValue) {
2950
2934
  if (aName in aArgs) {
2951
2935
  return aArgs[aName];
@@ -3247,6 +3231,7 @@ var require_util = __commonJS({
3247
3231
  // node_modules/source-map/lib/array-set.js
3248
3232
  var require_array_set = __commonJS({
3249
3233
  "node_modules/source-map/lib/array-set.js"(exports) {
3234
+ "use strict";
3250
3235
  var util = require_util();
3251
3236
  var has = Object.prototype.hasOwnProperty;
3252
3237
  var hasNativeMap = typeof Map !== "undefined";
@@ -3317,6 +3302,7 @@ var require_array_set = __commonJS({
3317
3302
  // node_modules/source-map/lib/mapping-list.js
3318
3303
  var require_mapping_list = __commonJS({
3319
3304
  "node_modules/source-map/lib/mapping-list.js"(exports) {
3305
+ "use strict";
3320
3306
  var util = require_util();
3321
3307
  function generatedPositionAfter(mappingA, mappingB) {
3322
3308
  var lineA = mappingA.generatedLine;
@@ -3356,6 +3342,7 @@ var require_mapping_list = __commonJS({
3356
3342
  // node_modules/source-map/lib/source-map-generator.js
3357
3343
  var require_source_map_generator = __commonJS({
3358
3344
  "node_modules/source-map/lib/source-map-generator.js"(exports) {
3345
+ "use strict";
3359
3346
  var base64VLQ = require_base64_vlq();
3360
3347
  var util = require_util();
3361
3348
  var ArraySet = require_array_set().ArraySet;
@@ -3632,6 +3619,7 @@ var require_source_map_generator = __commonJS({
3632
3619
  // node_modules/source-map/lib/binary-search.js
3633
3620
  var require_binary_search = __commonJS({
3634
3621
  "node_modules/source-map/lib/binary-search.js"(exports) {
3622
+ "use strict";
3635
3623
  exports.GREATEST_LOWER_BOUND = 1;
3636
3624
  exports.LEAST_UPPER_BOUND = 2;
3637
3625
  function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {
@@ -3688,6 +3676,7 @@ var require_binary_search = __commonJS({
3688
3676
  // node_modules/source-map/lib/quick-sort.js
3689
3677
  var require_quick_sort = __commonJS({
3690
3678
  "node_modules/source-map/lib/quick-sort.js"(exports) {
3679
+ "use strict";
3691
3680
  function swap(ary, x, y) {
3692
3681
  var temp = ary[x];
3693
3682
  ary[x] = ary[y];
@@ -3723,6 +3712,7 @@ var require_quick_sort = __commonJS({
3723
3712
  // node_modules/source-map/lib/source-map-consumer.js
3724
3713
  var require_source_map_consumer = __commonJS({
3725
3714
  "node_modules/source-map/lib/source-map-consumer.js"(exports) {
3715
+ "use strict";
3726
3716
  var util = require_util();
3727
3717
  var binarySearch = require_binary_search();
3728
3718
  var ArraySet = require_array_set().ArraySet;
@@ -4324,6 +4314,7 @@ var require_source_map_consumer = __commonJS({
4324
4314
  // node_modules/source-map/lib/source-node.js
4325
4315
  var require_source_node = __commonJS({
4326
4316
  "node_modules/source-map/lib/source-node.js"(exports) {
4317
+ "use strict";
4327
4318
  var SourceMapGenerator = require_source_map_generator().SourceMapGenerator;
4328
4319
  var util = require_util();
4329
4320
  var REGEX_NEWLINE = /(\r?\n)/;
@@ -4337,8 +4328,7 @@ var require_source_node = __commonJS({
4337
4328
  this.source = aSource == null ? null : aSource;
4338
4329
  this.name = aName == null ? null : aName;
4339
4330
  this[isSourceNode] = true;
4340
- if (aChunks != null)
4341
- this.add(aChunks);
4331
+ if (aChunks != null) this.add(aChunks);
4342
4332
  }
4343
4333
  SourceNode.fromStringWithSourceMap = function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {
4344
4334
  var node = new SourceNode();
@@ -4590,6 +4580,7 @@ var require_source_node = __commonJS({
4590
4580
  // node_modules/source-map/source-map.js
4591
4581
  var require_source_map = __commonJS({
4592
4582
  "node_modules/source-map/source-map.js"(exports) {
4583
+ "use strict";
4593
4584
  exports.SourceMapGenerator = require_source_map_generator().SourceMapGenerator;
4594
4585
  exports.SourceMapConsumer = require_source_map_consumer().SourceMapConsumer;
4595
4586
  exports.SourceNode = require_source_node().SourceNode;
@@ -5844,6 +5835,7 @@ var require_printer = __commonJS({
5844
5835
  // node_modules/handlebars/lib/index.js
5845
5836
  var require_lib = __commonJS({
5846
5837
  "node_modules/handlebars/lib/index.js"(exports, module) {
5838
+ "use strict";
5847
5839
  var handlebars = require_handlebars()["default"];
5848
5840
  var printer = require_printer();
5849
5841
  handlebars.PrintVisitor = printer.PrintVisitor;
@@ -6163,30 +6155,25 @@ var require_ansi_to_html = __commonJS({
6163
6155
  var descriptor = props[i];
6164
6156
  descriptor.enumerable = descriptor.enumerable || false;
6165
6157
  descriptor.configurable = true;
6166
- if ("value" in descriptor)
6167
- descriptor.writable = true;
6158
+ if ("value" in descriptor) descriptor.writable = true;
6168
6159
  Object.defineProperty(target, descriptor.key, descriptor);
6169
6160
  }
6170
6161
  }
6171
6162
  function _createClass(Constructor, protoProps, staticProps) {
6172
- if (protoProps)
6173
- _defineProperties(Constructor.prototype, protoProps);
6174
- if (staticProps)
6175
- _defineProperties(Constructor, staticProps);
6163
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
6164
+ if (staticProps) _defineProperties(Constructor, staticProps);
6176
6165
  return Constructor;
6177
6166
  }
6178
6167
  function _createForOfIteratorHelper(o, allowArrayLike) {
6179
6168
  var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
6180
6169
  if (!it) {
6181
6170
  if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
6182
- if (it)
6183
- o = it;
6171
+ if (it) o = it;
6184
6172
  var i = 0;
6185
6173
  var F = function F2() {
6186
6174
  };
6187
6175
  return { s: F, n: function n() {
6188
- if (i >= o.length)
6189
- return { done: true };
6176
+ if (i >= o.length) return { done: true };
6190
6177
  return { done: false, value: o[i++] };
6191
6178
  }, e: function e(_e) {
6192
6179
  throw _e;
@@ -6206,30 +6193,22 @@ var require_ansi_to_html = __commonJS({
6206
6193
  err = _e2;
6207
6194
  }, f: function f() {
6208
6195
  try {
6209
- if (!normalCompletion && it["return"] != null)
6210
- it["return"]();
6196
+ if (!normalCompletion && it["return"] != null) it["return"]();
6211
6197
  } finally {
6212
- if (didErr)
6213
- throw err;
6198
+ if (didErr) throw err;
6214
6199
  }
6215
6200
  } };
6216
6201
  }
6217
6202
  function _unsupportedIterableToArray(o, minLen) {
6218
- if (!o)
6219
- return;
6220
- if (typeof o === "string")
6221
- return _arrayLikeToArray(o, minLen);
6203
+ if (!o) return;
6204
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
6222
6205
  var n = Object.prototype.toString.call(o).slice(8, -1);
6223
- if (n === "Object" && o.constructor)
6224
- n = o.constructor.name;
6225
- if (n === "Map" || n === "Set")
6226
- return Array.from(o);
6227
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
6228
- return _arrayLikeToArray(o, minLen);
6206
+ if (n === "Object" && o.constructor) n = o.constructor.name;
6207
+ if (n === "Map" || n === "Set") return Array.from(o);
6208
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
6229
6209
  }
6230
6210
  function _arrayLikeToArray(arr, len) {
6231
- if (len == null || len > arr.length)
6232
- len = arr.length;
6211
+ if (len == null || len > arr.length) len = arr.length;
6233
6212
  for (var i = 0, arr2 = new Array(len); i < len; i++) {
6234
6213
  arr2[i] = arr[i];
6235
6214
  }
@@ -6579,22 +6558,21 @@ var require_ansi_to_html = __commonJS({
6579
6558
  }
6580
6559
  var results1 = [];
6581
6560
  var _text = text, length = _text.length;
6582
- outer:
6583
- while (length > 0) {
6584
- for (var i = 0, o = 0, len = tokens.length; o < len; i = ++o) {
6585
- var handler = tokens[i];
6586
- process2(handler, i);
6587
- if (text.length !== length) {
6588
- length = text.length;
6589
- continue outer;
6590
- }
6591
- }
6592
- if (text.length === length) {
6593
- break;
6561
+ outer: while (length > 0) {
6562
+ for (var i = 0, o = 0, len = tokens.length; o < len; i = ++o) {
6563
+ var handler = tokens[i];
6564
+ process2(handler, i);
6565
+ if (text.length !== length) {
6566
+ length = text.length;
6567
+ continue outer;
6594
6568
  }
6595
- results1.push(0);
6596
- length = text.length;
6597
6569
  }
6570
+ if (text.length === length) {
6571
+ break;
6572
+ }
6573
+ results1.push(0);
6574
+ length = text.length;
6575
+ }
6598
6576
  return results1;
6599
6577
  }
6600
6578
  function updateStickyStack(stickyStack, token, data) {
@@ -6684,14 +6662,12 @@ var FileManager = class {
6684
6662
  const traceViewerAssetsTargetFolder = path.join(traceViewerTargetFolder, "assets");
6685
6663
  fs.mkdirSync(traceViewerAssetsTargetFolder, { recursive: true });
6686
6664
  for (const file of fs.readdirSync(traceViewerFolder)) {
6687
- if (file.endsWith(".map") || file.includes("watch") || file.includes("assets"))
6688
- continue;
6665
+ if (file.endsWith(".map") || file.includes("watch") || file.includes("assets")) continue;
6689
6666
  fs.copyFileSync(path.join(traceViewerFolder, file), path.join(traceViewerTargetFolder, file));
6690
6667
  }
6691
6668
  const assetsFolder = path.join(traceViewerFolder, "assets");
6692
6669
  for (const file of fs.readdirSync(assetsFolder)) {
6693
- if (file.endsWith(".map") || file.includes("xtermModule"))
6694
- continue;
6670
+ if (file.endsWith(".map") || file.includes("xtermModule")) continue;
6695
6671
  fs.copyFileSync(path.join(assetsFolder, file), path.join(traceViewerAssetsTargetFolder, file));
6696
6672
  }
6697
6673
  }
@@ -6826,8 +6802,16 @@ var HTMLGenerator = class {
6826
6802
  this.dbManager = dbManager;
6827
6803
  }
6828
6804
  async generateHTML(filteredResults, totalDuration, cssContent, results, projectSet) {
6829
- const data = await this.prepareReportData(filteredResults, totalDuration, results, projectSet);
6830
- const templateSource = fs2.readFileSync(path3.resolve(__dirname, "views", "main.hbs"), "utf-8");
6805
+ const data = await this.prepareReportData(
6806
+ filteredResults,
6807
+ totalDuration,
6808
+ results,
6809
+ projectSet
6810
+ );
6811
+ const templateSource = fs2.readFileSync(
6812
+ path3.resolve(__dirname, "views", "main.hbs"),
6813
+ "utf-8"
6814
+ );
6831
6815
  const template = import_handlebars.default.compile(templateSource);
6832
6816
  return template({ ...data, inlineCss: cssContent });
6833
6817
  }
@@ -6835,21 +6819,31 @@ var HTMLGenerator = class {
6835
6819
  const totalTests = filteredResults.length;
6836
6820
  const passedTests = results.filter((r) => r.status === "passed").length;
6837
6821
  const flakyTests = results.filter((r) => r.flaky === "flaky").length;
6838
- const failed = filteredResults.filter((r) => r.status === "failed" || r.status === "timedOut").length;
6822
+ const failed = filteredResults.filter(
6823
+ (r) => r.status === "failed" || r.status === "timedOut"
6824
+ ).length;
6839
6825
  const successRate = ((passedTests + flakyTests) / totalTests * 100).toFixed(2);
6840
6826
  const allTags = /* @__PURE__ */ new Set();
6841
- results.forEach((result) => result.testTags.forEach((tag) => allTags.add(tag)));
6842
- const projectResults = this.calculateProjectResults(filteredResults, results, projectSet);
6827
+ results.forEach(
6828
+ (result) => result.testTags.forEach((tag) => allTags.add(tag))
6829
+ );
6830
+ const projectResults = this.calculateProjectResults(
6831
+ filteredResults,
6832
+ results,
6833
+ projectSet
6834
+ );
6843
6835
  const utcRunDate = formatDateUTC(/* @__PURE__ */ new Date());
6844
6836
  const localRunDate = formatDateLocal(utcRunDate);
6845
- const testHistories = await Promise.all(results.map(async (result) => {
6846
- const testId = `${result.filePath}:${result.projectName}:${result.title}`;
6847
- const history = await this.dbManager.getTestHistory(testId);
6848
- return {
6849
- testId,
6850
- history
6851
- };
6852
- }));
6837
+ const testHistories = await Promise.all(
6838
+ results.map(async (result) => {
6839
+ const testId = `${result.filePath}:${result.projectName}:${result.title}`;
6840
+ const history = await this.dbManager.getTestHistory(testId);
6841
+ return {
6842
+ testId,
6843
+ history
6844
+ };
6845
+ })
6846
+ );
6853
6847
  return {
6854
6848
  utcRunDate,
6855
6849
  localRunDate,
@@ -6866,6 +6860,7 @@ var HTMLGenerator = class {
6866
6860
  groupedResults: groupResults(this.ortoniConfig, results),
6867
6861
  projectName: this.ortoniConfig.projectName,
6868
6862
  authorName: this.ortoniConfig.authorName,
6863
+ meta: this.ortoniConfig.meta,
6869
6864
  testType: this.ortoniConfig.testType,
6870
6865
  preferredTheme: this.ortoniConfig.preferredTheme,
6871
6866
  successRate,
@@ -6879,12 +6874,18 @@ var HTMLGenerator = class {
6879
6874
  }
6880
6875
  calculateProjectResults(filteredResults, results, projectSet) {
6881
6876
  return Array.from(projectSet).map((projectName) => {
6882
- const projectTests = filteredResults.filter((r) => r.projectName === projectName);
6883
- const allProjectTests = results.filter((r) => r.projectName === projectName);
6877
+ const projectTests = filteredResults.filter(
6878
+ (r) => r.projectName === projectName
6879
+ );
6880
+ const allProjectTests = results.filter(
6881
+ (r) => r.projectName === projectName
6882
+ );
6884
6883
  return {
6885
6884
  projectName,
6886
6885
  passedTests: projectTests.filter((r) => r.status === "passed").length,
6887
- failedTests: projectTests.filter((r) => r.status === "failed" || r.status === "timedOut").length,
6886
+ failedTests: projectTests.filter(
6887
+ (r) => r.status === "failed" || r.status === "timedOut"
6888
+ ).length,
6888
6889
  skippedTests: allProjectTests.filter((r) => r.status === "skipped").length,
6889
6890
  retryTests: allProjectTests.filter((r) => r.status === "flaky").length,
6890
6891
  totalTests: projectTests.length
@@ -6904,8 +6905,14 @@ var HTMLGenerator = class {
6904
6905
  registerHandlebarsHelpers() {
6905
6906
  import_handlebars.default.registerHelper("joinWithSpace", (array) => array.join(" "));
6906
6907
  import_handlebars.default.registerHelper("json", (context) => safeStringify(context));
6907
- import_handlebars.default.registerHelper("eq", (actualStatus, expectedStatus) => actualStatus === expectedStatus);
6908
- import_handlebars.default.registerHelper("includes", (actualStatus, expectedStatus) => actualStatus.includes(expectedStatus));
6908
+ import_handlebars.default.registerHelper(
6909
+ "eq",
6910
+ (actualStatus, expectedStatus) => actualStatus === expectedStatus
6911
+ );
6912
+ import_handlebars.default.registerHelper(
6913
+ "includes",
6914
+ (actualStatus, expectedStatus) => actualStatus.includes(expectedStatus)
6915
+ );
6909
6916
  import_handlebars.default.registerHelper("gr", (count) => count > 0);
6910
6917
  import_handlebars.default.registerHelper("or", function(a, b) {
6911
6918
  return a || b;
@@ -6916,11 +6923,24 @@ var HTMLGenerator = class {
6916
6923
  });
6917
6924
  }
6918
6925
  registerPartials() {
6919
- ["head", "navbar", "testPanel", "summaryCard", "userInfo", "project", "testStatus", "testIcons"].forEach((partialName) => {
6920
- import_handlebars.default.registerPartial(partialName, fs2.readFileSync(
6921
- path3.resolve(__dirname, "views", `${partialName}.hbs`),
6922
- "utf-8"
6923
- ));
6926
+ [
6927
+ "head",
6928
+ "navbar",
6929
+ "sidebar",
6930
+ "testPanel",
6931
+ "summaryCard",
6932
+ "userInfo",
6933
+ "project",
6934
+ "testStatus",
6935
+ "testIcons"
6936
+ ].forEach((partialName) => {
6937
+ import_handlebars.default.registerPartial(
6938
+ partialName,
6939
+ fs2.readFileSync(
6940
+ path3.resolve(__dirname, "views", `${partialName}.hbs`),
6941
+ "utf-8"
6942
+ )
6943
+ );
6924
6944
  });
6925
6945
  }
6926
6946
  };
@@ -6938,14 +6958,12 @@ function attachFiles(subFolder, result, testResult, config) {
6938
6958
  if (!fs3.existsSync(attachmentsFolder)) {
6939
6959
  fs3.mkdirSync(attachmentsFolder, { recursive: true });
6940
6960
  }
6941
- if (!result.attachments)
6942
- return;
6961
+ if (!result.attachments) return;
6943
6962
  const { base64Image } = config;
6944
6963
  testResult.screenshots = [];
6945
6964
  result.attachments.forEach((attachment) => {
6946
6965
  const { contentType, name, path: attachmentPath, body } = attachment;
6947
- if (!attachmentPath && !body)
6948
- return;
6966
+ if (!attachmentPath && !body) return;
6949
6967
  const fileName = attachmentPath ? path4.basename(attachmentPath) : `${name}.${getFileExtension(contentType)}`;
6950
6968
  const relativePath = path4.join("ortoni-data", "attachments", subFolder, fileName);
6951
6969
  const fullPath = path4.join(attachmentsFolder, fileName);
@@ -7048,10 +7066,15 @@ var ServerManager = class {
7048
7066
  this.ortoniConfig = ortoniConfig;
7049
7067
  }
7050
7068
  startServer(folderPath, outputFilename, overAllStatus) {
7051
- const openOption = this.ortoniConfig.open || "always";
7069
+ const openOption = this.ortoniConfig.open || "never";
7052
7070
  const hasFailures = overAllStatus === "failed";
7053
7071
  if (openOption === "always" || openOption === "on-failure" && hasFailures) {
7054
- startReportServer(folderPath, outputFilename, this.ortoniConfig.port, openOption);
7072
+ startReportServer(
7073
+ folderPath,
7074
+ outputFilename,
7075
+ this.ortoniConfig.port,
7076
+ openOption
7077
+ );
7055
7078
  }
7056
7079
  }
7057
7080
  };