ortoni-report 3.0.0 → 3.0.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/changelog.md CHANGED
@@ -1,22 +1,45 @@
1
1
  # Change Log:
2
2
 
3
+ ## v3.0.1
4
+
5
+ #### 👌 Improvements
6
+
7
+ 1. **Logo**:
8
+ - Add project specific logo to the dashboard page
9
+ - If logo is present then Dashboar text is hidden
10
+
11
+ 2. **Bundler size**:
12
+ - Reduced bundler package size from 1.20 mB to 104 kB
13
+ - Reduced bundler unpacked size from 5 mB to 760 kB
14
+
15
+ 3. **Test History**
16
+ - Improved test history UI
17
+
18
+ 4. **Chart**
19
+ - Improved chart layout with plot area chart for summary
20
+
21
+ #### 🐛 Fixes
22
+
23
+ 1. Percentage is taking retry also in count #64
24
+
25
+
3
26
  ## v3.0.0
4
27
 
5
28
  #### 📦 New Features
6
29
  1. **SideBar**:
7
30
 
8
- - Navbar is removed and a new side bar is introduces.
9
- - Summay and Tests in 2 different section
31
+ - Navbar is removed and a new side bar is introduces.
32
+ - Summay and Tests in 2 different section
10
33
 
11
34
  2. **New Color Scheme**:
12
- - All new design to enhance the user viewing and exploring options
13
- - New Color scheme supports both dark and light theme
35
+ - All new design to enhance the user viewing and exploring options
36
+ - New Color scheme supports both dark and light theme
14
37
 
15
38
  3. **Meta section**:
16
- - User can add meta information about the project or release cycle (Refer to the example)
39
+ - User can add meta information about the project or release cycle (Refer to the example)
17
40
 
18
41
  4. **Overall redisgn**:
19
- - A new fresh UI look and perfomance increase
42
+ - A new fresh UI look and perfomance increase
20
43
 
21
44
 
22
45
  ## v2.0.9
@@ -0,0 +1,68 @@
1
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
2
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
3
+ }) : x)(function(x) {
4
+ if (typeof require !== "undefined") return require.apply(this, arguments);
5
+ throw Error('Dynamic require of "' + x + '" is not supported');
6
+ });
7
+
8
+ // src/utils/expressServer.ts
9
+ import express from "express";
10
+ import path from "path";
11
+ import { spawn } from "child_process";
12
+ function startReportServer(reportFolder, reportFilename, port = 2004, open) {
13
+ const app = express();
14
+ app.use(express.static(reportFolder));
15
+ app.get("/", (_req, res) => {
16
+ try {
17
+ res.sendFile(path.resolve(reportFolder, reportFilename));
18
+ } catch (error) {
19
+ console.error("Ortoni-Report: Error sending report file:", error);
20
+ res.status(500).send("Error loading report");
21
+ }
22
+ });
23
+ try {
24
+ const server = app.listen(port, () => {
25
+ console.log(`Server is running at http://localhost:${port}
26
+ Press Ctrl+C to stop.`);
27
+ if (open === "always" || open === "on-failure") {
28
+ try {
29
+ openBrowser(`http://localhost:${port}`);
30
+ } catch (error) {
31
+ console.error("Ortoni-Report: Error opening browser:", error);
32
+ }
33
+ }
34
+ });
35
+ server.on("error", (error) => {
36
+ if (error.code === "EADDRINUSE") {
37
+ console.error(`Ortoni-Report: Port ${port} is already in use. Trying a different port...`);
38
+ } else {
39
+ console.error("Ortoni-Report: Server error:", error);
40
+ }
41
+ });
42
+ } catch (error) {
43
+ console.error("Ortoni-Report: Error starting the server:", error);
44
+ }
45
+ }
46
+ function openBrowser(url) {
47
+ const platform = process.platform;
48
+ let command;
49
+ try {
50
+ if (platform === "win32") {
51
+ command = "cmd";
52
+ spawn(command, ["/c", "start", url]);
53
+ } else if (platform === "darwin") {
54
+ command = "open";
55
+ spawn(command, [url]);
56
+ } else {
57
+ command = "xdg-open";
58
+ spawn(command, [url]);
59
+ }
60
+ } catch (error) {
61
+ console.error("Ortoni-Report: Error opening the browser:", error);
62
+ }
63
+ }
64
+
65
+ export {
66
+ __require,
67
+ startReportServer
68
+ };