@serenity-js/console-reporter 3.41.2 → 3.42.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.
Files changed (131) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/esm/index.d.ts +6 -0
  3. package/esm/index.d.ts.map +1 -0
  4. package/esm/index.js +6 -0
  5. package/esm/index.js.map +1 -0
  6. package/esm/stage/crew/console-reporter/ConsoleReporter.d.ts +187 -0
  7. package/esm/stage/crew/console-reporter/ConsoleReporter.d.ts.map +1 -0
  8. package/esm/stage/crew/console-reporter/ConsoleReporter.js +423 -0
  9. package/esm/stage/crew/console-reporter/ConsoleReporter.js.map +1 -0
  10. package/esm/stage/crew/console-reporter/ConsoleReporterConfig.d.ts +13 -0
  11. package/esm/stage/crew/console-reporter/ConsoleReporterConfig.d.ts.map +1 -0
  12. package/esm/stage/crew/console-reporter/ConsoleReporterConfig.js +2 -0
  13. package/esm/stage/crew/console-reporter/ConsoleReporterConfig.js.map +1 -0
  14. package/esm/stage/crew/console-reporter/Printer.d.ts +32 -0
  15. package/esm/stage/crew/console-reporter/Printer.d.ts.map +1 -0
  16. package/esm/stage/crew/console-reporter/Printer.js +67 -0
  17. package/esm/stage/crew/console-reporter/Printer.js.map +1 -0
  18. package/esm/stage/crew/console-reporter/Summary.d.ts +39 -0
  19. package/esm/stage/crew/console-reporter/Summary.d.ts.map +1 -0
  20. package/esm/stage/crew/console-reporter/Summary.js +49 -0
  21. package/esm/stage/crew/console-reporter/Summary.js.map +1 -0
  22. package/esm/stage/crew/console-reporter/SummaryFormatter.d.ts +14 -0
  23. package/esm/stage/crew/console-reporter/SummaryFormatter.d.ts.map +1 -0
  24. package/esm/stage/crew/console-reporter/SummaryFormatter.js +57 -0
  25. package/esm/stage/crew/console-reporter/SummaryFormatter.js.map +1 -0
  26. package/esm/stage/crew/console-reporter/index.d.ts +3 -0
  27. package/esm/stage/crew/console-reporter/index.d.ts.map +1 -0
  28. package/esm/stage/crew/console-reporter/index.js +3 -0
  29. package/esm/stage/crew/console-reporter/index.js.map +1 -0
  30. package/esm/stage/crew/console-reporter/themes/TerminalTheme.d.ts +21 -0
  31. package/esm/stage/crew/console-reporter/themes/TerminalTheme.d.ts.map +1 -0
  32. package/esm/stage/crew/console-reporter/themes/TerminalTheme.js +24 -0
  33. package/esm/stage/crew/console-reporter/themes/TerminalTheme.js.map +1 -0
  34. package/esm/stage/crew/console-reporter/themes/ThemeForColourTerminals.d.ts +29 -0
  35. package/esm/stage/crew/console-reporter/themes/ThemeForColourTerminals.d.ts.map +1 -0
  36. package/esm/stage/crew/console-reporter/themes/ThemeForColourTerminals.js +50 -0
  37. package/esm/stage/crew/console-reporter/themes/ThemeForColourTerminals.js.map +1 -0
  38. package/esm/stage/crew/console-reporter/themes/ThemeForDarkTerminals.d.ts +32 -0
  39. package/esm/stage/crew/console-reporter/themes/ThemeForDarkTerminals.d.ts.map +1 -0
  40. package/esm/stage/crew/console-reporter/themes/ThemeForDarkTerminals.js +39 -0
  41. package/esm/stage/crew/console-reporter/themes/ThemeForDarkTerminals.js.map +1 -0
  42. package/esm/stage/crew/console-reporter/themes/ThemeForLightTerminals.d.ts +32 -0
  43. package/esm/stage/crew/console-reporter/themes/ThemeForLightTerminals.d.ts.map +1 -0
  44. package/esm/stage/crew/console-reporter/themes/ThemeForLightTerminals.js +39 -0
  45. package/esm/stage/crew/console-reporter/themes/ThemeForLightTerminals.js.map +1 -0
  46. package/esm/stage/crew/console-reporter/themes/ThemeForMonochromaticTerminals.d.ts +41 -0
  47. package/esm/stage/crew/console-reporter/themes/ThemeForMonochromaticTerminals.d.ts.map +1 -0
  48. package/esm/stage/crew/console-reporter/themes/ThemeForMonochromaticTerminals.js +48 -0
  49. package/esm/stage/crew/console-reporter/themes/ThemeForMonochromaticTerminals.js.map +1 -0
  50. package/esm/stage/crew/console-reporter/themes/index.d.ts +5 -0
  51. package/esm/stage/crew/console-reporter/themes/index.d.ts.map +1 -0
  52. package/esm/stage/crew/console-reporter/themes/index.js +5 -0
  53. package/esm/stage/crew/console-reporter/themes/index.js.map +1 -0
  54. package/esm/stage/crew/index.d.ts +2 -0
  55. package/esm/stage/crew/index.d.ts.map +1 -0
  56. package/esm/stage/crew/index.js +2 -0
  57. package/esm/stage/crew/index.js.map +1 -0
  58. package/esm/stage/index.d.ts +2 -0
  59. package/esm/stage/index.d.ts.map +1 -0
  60. package/esm/stage/index.js +2 -0
  61. package/esm/stage/index.js.map +1 -0
  62. package/lib/index.d.ts +3 -3
  63. package/lib/index.d.ts.map +1 -1
  64. package/lib/index.js +3 -3
  65. package/lib/index.js.map +1 -1
  66. package/lib/package.json +1 -0
  67. package/lib/stage/crew/console-reporter/ConsoleReporter.d.ts +4 -4
  68. package/lib/stage/crew/console-reporter/ConsoleReporter.d.ts.map +1 -1
  69. package/lib/stage/crew/console-reporter/ConsoleReporter.js +36 -29
  70. package/lib/stage/crew/console-reporter/ConsoleReporter.js.map +1 -1
  71. package/lib/stage/crew/console-reporter/Printer.d.ts +1 -1
  72. package/lib/stage/crew/console-reporter/Printer.d.ts.map +1 -1
  73. package/lib/stage/crew/console-reporter/Summary.d.ts +1 -1
  74. package/lib/stage/crew/console-reporter/Summary.d.ts.map +1 -1
  75. package/lib/stage/crew/console-reporter/Summary.js +1 -1
  76. package/lib/stage/crew/console-reporter/Summary.js.map +1 -1
  77. package/lib/stage/crew/console-reporter/SummaryFormatter.d.ts +2 -2
  78. package/lib/stage/crew/console-reporter/SummaryFormatter.d.ts.map +1 -1
  79. package/lib/stage/crew/console-reporter/SummaryFormatter.js +1 -1
  80. package/lib/stage/crew/console-reporter/SummaryFormatter.js.map +1 -1
  81. package/lib/stage/crew/console-reporter/index.d.ts +2 -2
  82. package/lib/stage/crew/console-reporter/index.d.ts.map +1 -1
  83. package/lib/stage/crew/console-reporter/index.js +2 -2
  84. package/lib/stage/crew/console-reporter/index.js.map +1 -1
  85. package/lib/stage/crew/console-reporter/themes/TerminalTheme.d.ts +1 -1
  86. package/lib/stage/crew/console-reporter/themes/TerminalTheme.d.ts.map +1 -1
  87. package/lib/stage/crew/console-reporter/themes/ThemeForColourTerminals.d.ts +2 -2
  88. package/lib/stage/crew/console-reporter/themes/ThemeForColourTerminals.d.ts.map +1 -1
  89. package/lib/stage/crew/console-reporter/themes/ThemeForColourTerminals.js +3 -3
  90. package/lib/stage/crew/console-reporter/themes/ThemeForColourTerminals.js.map +1 -1
  91. package/lib/stage/crew/console-reporter/themes/ThemeForDarkTerminals.d.ts +1 -1
  92. package/lib/stage/crew/console-reporter/themes/ThemeForDarkTerminals.d.ts.map +1 -1
  93. package/lib/stage/crew/console-reporter/themes/ThemeForDarkTerminals.js +2 -2
  94. package/lib/stage/crew/console-reporter/themes/ThemeForDarkTerminals.js.map +1 -1
  95. package/lib/stage/crew/console-reporter/themes/ThemeForLightTerminals.d.ts +1 -1
  96. package/lib/stage/crew/console-reporter/themes/ThemeForLightTerminals.d.ts.map +1 -1
  97. package/lib/stage/crew/console-reporter/themes/ThemeForLightTerminals.js +2 -2
  98. package/lib/stage/crew/console-reporter/themes/ThemeForLightTerminals.js.map +1 -1
  99. package/lib/stage/crew/console-reporter/themes/ThemeForMonochromaticTerminals.d.ts +2 -2
  100. package/lib/stage/crew/console-reporter/themes/ThemeForMonochromaticTerminals.d.ts.map +1 -1
  101. package/lib/stage/crew/console-reporter/themes/ThemeForMonochromaticTerminals.js +2 -2
  102. package/lib/stage/crew/console-reporter/themes/ThemeForMonochromaticTerminals.js.map +1 -1
  103. package/lib/stage/crew/console-reporter/themes/index.d.ts +4 -4
  104. package/lib/stage/crew/console-reporter/themes/index.d.ts.map +1 -1
  105. package/lib/stage/crew/console-reporter/themes/index.js +4 -4
  106. package/lib/stage/crew/console-reporter/themes/index.js.map +1 -1
  107. package/lib/stage/crew/index.d.ts +1 -1
  108. package/lib/stage/crew/index.d.ts.map +1 -1
  109. package/lib/stage/crew/index.js +1 -1
  110. package/lib/stage/crew/index.js.map +1 -1
  111. package/lib/stage/index.d.ts +1 -1
  112. package/lib/stage/index.d.ts.map +1 -1
  113. package/lib/stage/index.js +1 -1
  114. package/lib/stage/index.js.map +1 -1
  115. package/package.json +29 -8
  116. package/src/index.ts +3 -3
  117. package/src/stage/crew/console-reporter/ConsoleReporter.ts +32 -27
  118. package/src/stage/crew/console-reporter/Printer.ts +1 -1
  119. package/src/stage/crew/console-reporter/Summary.ts +2 -2
  120. package/src/stage/crew/console-reporter/SummaryFormatter.ts +3 -3
  121. package/src/stage/crew/console-reporter/index.ts +2 -2
  122. package/src/stage/crew/console-reporter/themes/TerminalTheme.ts +1 -1
  123. package/src/stage/crew/console-reporter/themes/ThemeForColourTerminals.ts +2 -2
  124. package/src/stage/crew/console-reporter/themes/ThemeForDarkTerminals.ts +1 -1
  125. package/src/stage/crew/console-reporter/themes/ThemeForLightTerminals.ts +1 -1
  126. package/src/stage/crew/console-reporter/themes/ThemeForMonochromaticTerminals.ts +2 -2
  127. package/src/stage/crew/console-reporter/themes/index.ts +4 -4
  128. package/src/stage/crew/index.ts +1 -1
  129. package/src/stage/index.ts +1 -1
  130. package/tsconfig-cjs.build.json +18 -0
  131. package/tsconfig-esm.build.json +18 -0
@@ -1 +1 @@
1
- {"version":3,"file":"ThemeForDarkTerminals.js","sourceRoot":"","sources":["../../../../../src/stage/crew/console-reporter/themes/ThemeForDarkTerminals.ts"],"names":[],"mappings":";;;AAEA,uEAAoE;AAEpE;;GAEG;AACH,MAAa,qBAAsB,SAAQ,iDAAuB;IAE9D;;;;OAIG;IACH,YAAY,KAAY;QACpB,KAAK,CAAC,KAAK,CAAC,CAAC;IACjB,CAAC;IAED;;;;;OAKG;IACH,OAAO,CAAC,GAAG,KAAY;QACnB,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IACrD,CAAC;IAED;;;;;OAKG;IACH,SAAS,CAAC,OAAe;QACrB,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;IACnD,CAAC;IAED;;OAEG;IACH,GAAG,CAAC,GAAG,KAAY;QACf,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IACjD,CAAC;CACJ;AArCD,sDAqCC"}
1
+ {"version":3,"file":"ThemeForDarkTerminals.js","sourceRoot":"","sources":["../../../../../src/stage/crew/console-reporter/themes/ThemeForDarkTerminals.ts"],"names":[],"mappings":";;;AAEA,6EAAuE;AAEvE;;GAEG;AACH,MAAa,qBAAsB,SAAQ,oDAAuB;IAE9D;;;;OAIG;IACH,YAAY,KAAY;QACpB,KAAK,CAAC,KAAK,CAAC,CAAC;IACjB,CAAC;IAED;;;;;OAKG;IACH,OAAO,CAAC,GAAG,KAAY;QACnB,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IACrD,CAAC;IAED;;;;;OAKG;IACH,SAAS,CAAC,OAAe;QACrB,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;IACnD,CAAC;IAED;;OAEG;IACH,GAAG,CAAC,GAAG,KAAY;QACf,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IACjD,CAAC;CACJ;AArCD,sDAqCC"}
@@ -1,5 +1,5 @@
1
1
  import type { Chalk } from 'chalk';
2
- import { ThemeForColourTerminals } from './ThemeForColourTerminals';
2
+ import { ThemeForColourTerminals } from './ThemeForColourTerminals.js';
3
3
  /**
4
4
  * A simple colour theme for terminals with light backgrounds.
5
5
  */
@@ -1 +1 @@
1
- {"version":3,"file":"ThemeForLightTerminals.d.ts","sourceRoot":"","sources":["../../../../../src/stage/crew/console-reporter/themes/ThemeForLightTerminals.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,uBAAuB;IAE/D;;OAEG;gBACS,KAAK,EAAE,KAAK;IAIxB;;;;;OAKG;IACH,OAAO,CAAC,GAAG,KAAK,EAAE,GAAG,EAAE,GAAG,MAAM;IAIhC;;;;;OAKG;IACH,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;IAIlC;;;;OAIG;IACH,GAAG,CAAC,GAAG,KAAK,EAAE,GAAG,EAAE,GAAG,MAAM;CAG/B"}
1
+ {"version":3,"file":"ThemeForLightTerminals.d.ts","sourceRoot":"","sources":["../../../../../src/stage/crew/console-reporter/themes/ThemeForLightTerminals.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAEvE;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,uBAAuB;IAE/D;;OAEG;gBACS,KAAK,EAAE,KAAK;IAIxB;;;;;OAKG;IACH,OAAO,CAAC,GAAG,KAAK,EAAE,GAAG,EAAE,GAAG,MAAM;IAIhC;;;;;OAKG;IACH,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;IAIlC;;;;OAIG;IACH,GAAG,CAAC,GAAG,KAAK,EAAE,GAAG,EAAE,GAAG,MAAM;CAG/B"}
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ThemeForLightTerminals = void 0;
4
- const ThemeForColourTerminals_1 = require("./ThemeForColourTerminals");
4
+ const ThemeForColourTerminals_js_1 = require("./ThemeForColourTerminals.js");
5
5
  /**
6
6
  * A simple colour theme for terminals with light backgrounds.
7
7
  */
8
- class ThemeForLightTerminals extends ThemeForColourTerminals_1.ThemeForColourTerminals {
8
+ class ThemeForLightTerminals extends ThemeForColourTerminals_js_1.ThemeForColourTerminals {
9
9
  /**
10
10
  * @see https://www.npmjs.com/package/chalk
11
11
  */
@@ -1 +1 @@
1
- {"version":3,"file":"ThemeForLightTerminals.js","sourceRoot":"","sources":["../../../../../src/stage/crew/console-reporter/themes/ThemeForLightTerminals.ts"],"names":[],"mappings":";;;AAEA,uEAAoE;AAEpE;;GAEG;AACH,MAAa,sBAAuB,SAAQ,iDAAuB;IAE/D;;OAEG;IACH,YAAY,KAAY;QACpB,KAAK,CAAC,KAAK,CAAC,CAAC;IACjB,CAAC;IAED;;;;;OAKG;IACH,OAAO,CAAC,GAAG,KAAY;QACnB,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IACrD,CAAC;IAED;;;;;OAKG;IACH,SAAS,CAAC,OAAe;QACrB,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAChC,CAAC;IAED;;;;OAIG;IACH,GAAG,CAAC,GAAG,KAAY;QACf,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;CACJ;AArCD,wDAqCC"}
1
+ {"version":3,"file":"ThemeForLightTerminals.js","sourceRoot":"","sources":["../../../../../src/stage/crew/console-reporter/themes/ThemeForLightTerminals.ts"],"names":[],"mappings":";;;AAEA,6EAAuE;AAEvE;;GAEG;AACH,MAAa,sBAAuB,SAAQ,oDAAuB;IAE/D;;OAEG;IACH,YAAY,KAAY;QACpB,KAAK,CAAC,KAAK,CAAC,CAAC;IACjB,CAAC;IAED;;;;;OAKG;IACH,OAAO,CAAC,GAAG,KAAY;QACnB,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IACrD,CAAC;IAED;;;;;OAKG;IACH,SAAS,CAAC,OAAe;QACrB,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAChC,CAAC;IAED;;;;OAIG;IACH,GAAG,CAAC,GAAG,KAAY;QACf,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;CACJ;AArCD,wDAqCC"}
@@ -1,5 +1,5 @@
1
- import type { Outcome } from '@serenity-js/core/lib/model';
2
- import { TerminalTheme } from './TerminalTheme';
1
+ import type { Outcome } from '@serenity-js/core/model';
2
+ import { TerminalTheme } from './TerminalTheme.js';
3
3
  /**
4
4
  * A simple colour theme for terminals with no colour support.
5
5
  */
@@ -1 +1 @@
1
- {"version":3,"file":"ThemeForMonochromaticTerminals.d.ts","sourceRoot":"","sources":["../../../../../src/stage/crew/console-reporter/themes/ThemeForMonochromaticTerminals.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAE3D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD;;GAEG;AACH,qBAAa,8BAA+B,SAAQ,aAAa;IAE7D;;;;;OAKG;IACH,OAAO,CAAC,GAAG,KAAK,EAAE,GAAG,EAAE,GAAG,MAAM;IAIhC;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,GAAG,EAAE,GAAG,MAAM;IAIlD;;;;;OAKG;IACH,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;IAIlC;;;;OAIG;IACH,GAAG,CAAC,GAAG,KAAK,EAAE,GAAG,EAAE,GAAG,MAAM;CAG/B"}
1
+ {"version":3,"file":"ThemeForMonochromaticTerminals.d.ts","sourceRoot":"","sources":["../../../../../src/stage/crew/console-reporter/themes/ThemeForMonochromaticTerminals.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAEvD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;GAEG;AACH,qBAAa,8BAA+B,SAAQ,aAAa;IAE7D;;;;;OAKG;IACH,OAAO,CAAC,GAAG,KAAK,EAAE,GAAG,EAAE,GAAG,MAAM;IAIhC;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,GAAG,EAAE,GAAG,MAAM;IAIlD;;;;;OAKG;IACH,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;IAIlC;;;;OAIG;IACH,GAAG,CAAC,GAAG,KAAK,EAAE,GAAG,EAAE,GAAG,MAAM;CAG/B"}
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ThemeForMonochromaticTerminals = void 0;
4
- const TerminalTheme_1 = require("./TerminalTheme");
4
+ const TerminalTheme_js_1 = require("./TerminalTheme.js");
5
5
  /**
6
6
  * A simple colour theme for terminals with no colour support.
7
7
  */
8
- class ThemeForMonochromaticTerminals extends TerminalTheme_1.TerminalTheme {
8
+ class ThemeForMonochromaticTerminals extends TerminalTheme_js_1.TerminalTheme {
9
9
  /**
10
10
  * Formats the heading
11
11
  *
@@ -1 +1 @@
1
- {"version":3,"file":"ThemeForMonochromaticTerminals.js","sourceRoot":"","sources":["../../../../../src/stage/crew/console-reporter/themes/ThemeForMonochromaticTerminals.ts"],"names":[],"mappings":";;;AAEA,mDAAgD;AAEhD;;GAEG;AACH,MAAa,8BAA+B,SAAQ,6BAAa;IAE7D;;;;;OAKG;IACH,OAAO,CAAC,GAAG,KAAY;QACnB,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;IAED;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,OAAgB,EAAE,GAAG,KAAY;QACrC,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;IAED;;;;;OAKG;IACH,SAAS,CAAC,OAAe;QACrB,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAChC,CAAC;IAED;;;;OAIG;IACH,GAAG,CAAC,GAAG,KAAY;QACf,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;CACJ;AA9CD,wEA8CC"}
1
+ {"version":3,"file":"ThemeForMonochromaticTerminals.js","sourceRoot":"","sources":["../../../../../src/stage/crew/console-reporter/themes/ThemeForMonochromaticTerminals.ts"],"names":[],"mappings":";;;AAEA,yDAAmD;AAEnD;;GAEG;AACH,MAAa,8BAA+B,SAAQ,gCAAa;IAE7D;;;;;OAKG;IACH,OAAO,CAAC,GAAG,KAAY;QACnB,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;IAED;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,OAAgB,EAAE,GAAG,KAAY;QACrC,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;IAED;;;;;OAKG;IACH,SAAS,CAAC,OAAe;QACrB,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAChC,CAAC;IAED;;;;OAIG;IACH,GAAG,CAAC,GAAG,KAAY;QACf,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;CACJ;AA9CD,wEA8CC"}
@@ -1,5 +1,5 @@
1
- export * from './TerminalTheme';
2
- export * from './ThemeForDarkTerminals';
3
- export * from './ThemeForLightTerminals';
4
- export * from './ThemeForMonochromaticTerminals';
1
+ export * from './TerminalTheme.js';
2
+ export * from './ThemeForDarkTerminals.js';
3
+ export * from './ThemeForLightTerminals.js';
4
+ export * from './ThemeForMonochromaticTerminals.js';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/stage/crew/console-reporter/themes/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,kCAAkC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/stage/crew/console-reporter/themes/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qCAAqC,CAAC"}
@@ -14,8 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./TerminalTheme"), exports);
18
- __exportStar(require("./ThemeForDarkTerminals"), exports);
19
- __exportStar(require("./ThemeForLightTerminals"), exports);
20
- __exportStar(require("./ThemeForMonochromaticTerminals"), exports);
17
+ __exportStar(require("./TerminalTheme.js"), exports);
18
+ __exportStar(require("./ThemeForDarkTerminals.js"), exports);
19
+ __exportStar(require("./ThemeForLightTerminals.js"), exports);
20
+ __exportStar(require("./ThemeForMonochromaticTerminals.js"), exports);
21
21
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/stage/crew/console-reporter/themes/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,0DAAwC;AACxC,2DAAyC;AACzC,mEAAiD"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/stage/crew/console-reporter/themes/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC;AACnC,6DAA2C;AAC3C,8DAA4C;AAC5C,sEAAoD"}
@@ -1,2 +1,2 @@
1
- export * from './console-reporter';
1
+ export * from './console-reporter/index.js';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/stage/crew/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/stage/crew/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC"}
@@ -14,5 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./console-reporter"), exports);
17
+ __exportStar(require("./console-reporter/index.js"), exports);
18
18
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/stage/crew/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/stage/crew/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8DAA4C"}
@@ -1,2 +1,2 @@
1
- export * from './crew';
1
+ export * from './crew/index.js';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/stage/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/stage/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC"}
@@ -14,5 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./crew"), exports);
17
+ __exportStar(require("./crew/index.js"), exports);
18
18
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/stage/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAuB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/stage/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@serenity-js/console-reporter",
3
- "version": "3.41.2",
3
+ "version": "3.42.0",
4
4
  "description": "Serenity/JS console reporter that displays test results directly in the standard output",
5
5
  "author": {
6
6
  "name": "Jan Molak",
@@ -16,8 +16,25 @@
16
16
  "access": "public",
17
17
  "provenance": true
18
18
  },
19
- "main": "lib/index.js",
19
+ "main": "./lib/index.js",
20
20
  "types": "./lib/index.d.ts",
21
+ "type": "module",
22
+ "module": "./esm/index.js",
23
+ "exports": {
24
+ ".": {
25
+ "import": {
26
+ "types": "./esm/index.d.ts",
27
+ "default": "./esm/index.js"
28
+ },
29
+ "require": {
30
+ "types": "./lib/index.d.ts",
31
+ "default": "./lib/index.js"
32
+ }
33
+ },
34
+ "./lib/*": "./lib/*",
35
+ "./esm/*": "./esm/*.js",
36
+ "./package.json": "./package.json"
37
+ },
21
38
  "keywords": [
22
39
  "automation",
23
40
  "integration",
@@ -34,8 +51,12 @@
34
51
  "scripts": {
35
52
  "clean": "rimraf target",
36
53
  "test": "c8 npm run test:no-coverage",
37
- "test:no-coverage": "mocha --config ../../.mocharc.yml --spec='spec/**/*.spec.*'",
38
- "compile": "rimraf lib && tsc --project tsconfig.build.json"
54
+ "test:no-coverage": "mocha --config .mocharc.yml --spec='spec/**/*.spec.*'",
55
+ "compile": "npm run compile:clean && npm run compile:esm && npm run compile:cjs-package && npm run compile:cjs",
56
+ "compile:clean": "rimraf lib esm",
57
+ "compile:esm": "tsc --project tsconfig-esm.build.json",
58
+ "compile:cjs-package": "node -e \"require('fs').mkdirSync('lib', { recursive: true }); require('fs').writeFileSync('lib/package.json', '{ \\\"type\\\": \\\"commonjs\\\" }')\"",
59
+ "compile:cjs": "tsc --project tsconfig-cjs.build.json"
39
60
  },
40
61
  "repository": {
41
62
  "type": "git",
@@ -49,9 +70,9 @@
49
70
  "node": "^20 || ^22 || ^24"
50
71
  },
51
72
  "dependencies": {
52
- "@serenity-js/core": "3.41.2",
73
+ "@serenity-js/core": "3.42.0",
53
74
  "chalk": "4.1.2",
54
- "tiny-types": "1.24.3"
75
+ "tiny-types": "2.0.5"
55
76
  },
56
77
  "devDependencies": {
57
78
  "@integration/testing-tools": "3.0.0",
@@ -60,8 +81,8 @@
60
81
  "c8": "11.0.0",
61
82
  "mocha": "11.7.5",
62
83
  "mocha-multi": "1.1.7",
63
- "ts-node": "10.9.2",
84
+ "tsx": "4.20.3",
64
85
  "typescript": "5.9.3"
65
86
  },
66
- "gitHead": "adcfe0c84d167de23a9194d755a90a2fb2b8112d"
87
+ "gitHead": "a415b0066807d7bab9f34b1ceef66a26156aafe1"
67
88
  }
package/src/index.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import type { StageCrewMemberBuilder } from '@serenity-js/core';
2
2
 
3
- import type { ConsoleReporterConfig } from './stage';
4
- import { ConsoleReporter } from './stage';
3
+ import type { ConsoleReporterConfig } from './stage/index.js';
4
+ import { ConsoleReporter } from './stage/index.js';
5
5
 
6
- export * from './stage';
6
+ export * from './stage/index.js';
7
7
 
8
8
  export default function create(config: ConsoleReporterConfig = undefined): StageCrewMemberBuilder<ConsoleReporter> {
9
9
  return ConsoleReporter.fromJSON(config || { theme: 'auto' });
@@ -1,8 +1,8 @@
1
1
  import type { Duration, ListensToDomainEvents, Stage, StageCrewMemberBuilder, Timestamp } from '@serenity-js/core';
2
2
  import { AssertionError, d, DomainEventQueues, LogicError } from '@serenity-js/core';
3
- import type { OutputStream } from '@serenity-js/core/lib/adapter';
3
+ import type { OutputStream } from '@serenity-js/core/adapter';
4
4
  import type {
5
- DomainEvent} from '@serenity-js/core/lib/events';
5
+ DomainEvent} from '@serenity-js/core/events';
6
6
  import {
7
7
  ActivityRelatedArtifactGenerated,
8
8
  InteractionFinished,
@@ -13,11 +13,11 @@ import {
13
13
  TaskStarts,
14
14
  TestRunFinished,
15
15
  TestRunStarts,
16
- } from '@serenity-js/core/lib/events';
16
+ } from '@serenity-js/core/events';
17
17
  import type {
18
18
  CorrelationId,
19
19
  Name,
20
- Outcome} from '@serenity-js/core/lib/model';
20
+ Outcome} from '@serenity-js/core/model';
21
21
  import {
22
22
  ExecutionCompromised,
23
23
  ExecutionFailedWithAssertionError,
@@ -28,16 +28,18 @@ import {
28
28
  ImplementationPending,
29
29
  LogEntry,
30
30
  ProblemIndication,
31
- } from '@serenity-js/core/lib/model';
32
- import { Instance as ChalkInstance } from 'chalk'; // eslint-disable-line unicorn/import-style
31
+ } from '@serenity-js/core/model';
32
+ import chalk from 'chalk';
33
33
  import { ensure, isDefined, match } from 'tiny-types';
34
34
 
35
- import type { ConsoleReporterConfig } from './ConsoleReporterConfig';
36
- import { Printer } from './Printer';
37
- import { Summary } from './Summary';
38
- import { SummaryFormatter } from './SummaryFormatter';
39
- import type { TerminalTheme} from './themes';
40
- import { ThemeForDarkTerminals, ThemeForLightTerminals, ThemeForMonochromaticTerminals } from './themes';
35
+ import type { ConsoleReporterConfig } from './ConsoleReporterConfig.js';
36
+ import { Printer } from './Printer.js';
37
+ import { Summary } from './Summary.js';
38
+ import { SummaryFormatter } from './SummaryFormatter.js';
39
+ import type { TerminalTheme} from './themes/index.js';
40
+ import { ThemeForDarkTerminals, ThemeForLightTerminals, ThemeForMonochromaticTerminals } from './themes/index.js';
41
+
42
+ const ChalkInstance = chalk.Instance;
41
43
 
42
44
  /**
43
45
  * A [`StageCrewMember`](https://serenity-js.org/api/core/interface/StageCrewMember/) that uses [standard output](https://en.wikipedia.org/wiki/Standard_streams)
@@ -446,22 +448,25 @@ export class ConsoleReporter implements ListensToDomainEvents {
446
448
  }
447
449
 
448
450
  private iconFrom(outcome: Outcome): string {
449
- switch (outcome.constructor) {
450
- case ExecutionCompromised:
451
- case ExecutionFailedWithError:
452
- case ExecutionFailedWithAssertionError:
453
- return '✗ ';
454
- case ImplementationPending:
455
- return '☕';
456
- case ExecutionSkipped:
457
- return '⇢ ';
458
- case ExecutionIgnored:
459
- return '? ';
460
- case ExecutionSuccessful:
461
- return '✓ ';
462
- default:
463
- return '';
451
+ // Use instanceof instead of constructor comparison to work across ESM/CJS boundaries
452
+ if (outcome instanceof ExecutionCompromised ||
453
+ outcome instanceof ExecutionFailedWithError ||
454
+ outcome instanceof ExecutionFailedWithAssertionError) {
455
+ return '✗ ';
456
+ }
457
+ if (outcome instanceof ImplementationPending) {
458
+ return '☕';
459
+ }
460
+ if (outcome instanceof ExecutionSkipped) {
461
+ return ' ';
462
+ }
463
+ if (outcome instanceof ExecutionIgnored) {
464
+ return '? ';
465
+ }
466
+ if (outcome instanceof ExecutionSuccessful) {
467
+ return '✓ ';
464
468
  }
469
+ return '';
465
470
  }
466
471
  }
467
472
 
@@ -1,4 +1,4 @@
1
- import type { OutputStream } from '@serenity-js/core/lib/adapter';
1
+ import type { OutputStream } from '@serenity-js/core/adapter';
2
2
 
3
3
  /**
4
4
  * A simple abstraction around the standard output stream
@@ -1,7 +1,7 @@
1
1
  import { Duration, Timestamp } from '@serenity-js/core';
2
2
  import type {
3
3
  Outcome,
4
- ScenarioDetails} from '@serenity-js/core/lib/model';
4
+ ScenarioDetails} from '@serenity-js/core/model';
5
5
  import {
6
6
  ExecutionCompromised,
7
7
  ExecutionFailedWithAssertionError,
@@ -10,7 +10,7 @@ import {
10
10
  ExecutionSkipped,
11
11
  ExecutionSuccessful,
12
12
  ImplementationPending
13
- } from '@serenity-js/core/lib/model';
13
+ } from '@serenity-js/core/model';
14
14
 
15
15
  /**
16
16
  * @package
@@ -1,7 +1,7 @@
1
- import { ExecutionCompromised, ExecutionFailedWithAssertionError, ExecutionFailedWithError, ExecutionIgnored, ExecutionSkipped, ImplementationPending } from '@serenity-js/core/lib/model';
1
+ import { ExecutionCompromised, ExecutionFailedWithAssertionError, ExecutionFailedWithError, ExecutionIgnored, ExecutionSkipped, ImplementationPending } from '@serenity-js/core/model';
2
2
 
3
- import type { AggregatedCategories, AggregatedCategory } from './Summary';
4
- import type { TerminalTheme } from './themes';
3
+ import type { AggregatedCategories, AggregatedCategory } from './Summary.js';
4
+ import type { TerminalTheme } from './themes/index.js';
5
5
 
6
6
  /**
7
7
  * @package
@@ -1,2 +1,2 @@
1
- export * from './ConsoleReporter';
2
- export * from './ConsoleReporterConfig';
1
+ export * from './ConsoleReporter.js';
2
+ export * from './ConsoleReporterConfig.js';
@@ -1,4 +1,4 @@
1
- import type { Outcome } from '@serenity-js/core/lib/model';
1
+ import type { Outcome } from '@serenity-js/core/model';
2
2
 
3
3
  /**
4
4
  * Decorates text with control characters to make the terminal
@@ -1,7 +1,7 @@
1
- import { ExecutionCompromised, ExecutionFailedWithAssertionError, ExecutionFailedWithError, ExecutionIgnored, ExecutionSkipped, ImplementationPending, Outcome } from '@serenity-js/core/lib/model';
1
+ import { ExecutionCompromised, ExecutionFailedWithAssertionError, ExecutionFailedWithError, ExecutionIgnored, ExecutionSkipped, ImplementationPending, Outcome } from '@serenity-js/core/model';
2
2
  import type { Chalk } from 'chalk'; // eslint-disable-line unicorn/import-style
3
3
 
4
- import { TerminalTheme } from './TerminalTheme';
4
+ import { TerminalTheme } from './TerminalTheme.js';
5
5
 
6
6
  /**
7
7
  * Base class for `TerminalTheme` implementations intended
@@ -1,6 +1,6 @@
1
1
  import type { Chalk } from 'chalk'; // eslint-disable-line unicorn/import-style
2
2
 
3
- import { ThemeForColourTerminals } from './ThemeForColourTerminals';
3
+ import { ThemeForColourTerminals } from './ThemeForColourTerminals.js';
4
4
 
5
5
  /**
6
6
  * A simple colour theme for terminals with dark backgrounds.
@@ -1,6 +1,6 @@
1
1
  import type { Chalk } from 'chalk'; // eslint-disable-line unicorn/import-style
2
2
 
3
- import { ThemeForColourTerminals } from './ThemeForColourTerminals';
3
+ import { ThemeForColourTerminals } from './ThemeForColourTerminals.js';
4
4
 
5
5
  /**
6
6
  * A simple colour theme for terminals with light backgrounds.
@@ -1,6 +1,6 @@
1
- import type { Outcome } from '@serenity-js/core/lib/model';
1
+ import type { Outcome } from '@serenity-js/core/model';
2
2
 
3
- import { TerminalTheme } from './TerminalTheme';
3
+ import { TerminalTheme } from './TerminalTheme.js';
4
4
 
5
5
  /**
6
6
  * A simple colour theme for terminals with no colour support.
@@ -1,4 +1,4 @@
1
- export * from './TerminalTheme';
2
- export * from './ThemeForDarkTerminals';
3
- export * from './ThemeForLightTerminals';
4
- export * from './ThemeForMonochromaticTerminals';
1
+ export * from './TerminalTheme.js';
2
+ export * from './ThemeForDarkTerminals.js';
3
+ export * from './ThemeForLightTerminals.js';
4
+ export * from './ThemeForMonochromaticTerminals.js';
@@ -1 +1 @@
1
- export * from './console-reporter';
1
+ export * from './console-reporter/index.js';
@@ -1 +1 @@
1
- export * from './crew';
1
+ export * from './crew/index.js';
@@ -0,0 +1,18 @@
1
+ {
2
+ "extends": "../../tsconfig.build.json",
3
+ "compilerOptions": {
4
+ "module": "CommonJS",
5
+ "moduleResolution": "Node",
6
+ "outDir": "lib",
7
+ "rootDir": "src",
8
+ "target": "es2022",
9
+ "lib": [
10
+ "es2022",
11
+ "dom"
12
+ ],
13
+ "skipLibCheck": true
14
+ },
15
+ "include": [
16
+ "src/**/*.ts"
17
+ ]
18
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "extends": "../../tsconfig-esm.options.json",
3
+ "compilerOptions": {
4
+ "module": "Node20",
5
+ "moduleResolution": "Node16",
6
+ "outDir": "esm",
7
+ "rootDir": "src",
8
+ "target": "es2022",
9
+ "lib": [
10
+ "es2022",
11
+ "dom"
12
+ ],
13
+ "skipLibCheck": true
14
+ },
15
+ "include": [
16
+ "src/**/*.ts"
17
+ ]
18
+ }