ortoni-report 4.0.4 → 4.0.5

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/cli.js CHANGED
@@ -68,7 +68,6 @@ var DatabaseManager = class {
68
68
  test_id TEXT,
69
69
  status TEXT,
70
70
  duration INTEGER, -- store duration as raw ms
71
- error_message TEXT,
72
71
  FOREIGN KEY (run_id) REFERENCES test_runs (id)
73
72
  );
74
73
  `);
@@ -118,17 +117,16 @@ var DatabaseManager = class {
118
117
  try {
119
118
  await this.db.exec("BEGIN TRANSACTION;");
120
119
  const stmt = await this.db.prepare(`
121
- INSERT INTO test_results (run_id, test_id, status, duration, error_message)
122
- VALUES (?, ?, ?, ?, ?)
120
+ INSERT INTO test_results (run_id, test_id, status, duration)
121
+ VALUES (?, ?, ?, ?)
123
122
  `);
124
123
  for (const result of results) {
125
124
  await stmt.run([
126
125
  runId,
127
126
  `${result.filePath}:${result.projectName}:${result.title}`,
128
127
  result.status,
129
- result.duration,
128
+ result.duration
130
129
  // store raw ms
131
- result.errors.join("\n")
132
130
  ]);
133
131
  }
134
132
  await stmt.finalize();
@@ -138,7 +136,7 @@ var DatabaseManager = class {
138
136
  console.error("OrtoniReport: Error saving test results:", error);
139
137
  }
140
138
  }
141
- async getTestHistory(testId, limit = 10) {
139
+ async getTestHistory(testId, limit = 25) {
142
140
  if (!this.db) {
143
141
  console.error("OrtoniReport: Database not initialized");
144
142
  return [];
@@ -146,7 +144,7 @@ var DatabaseManager = class {
146
144
  try {
147
145
  const results = await this.db.all(
148
146
  `
149
- SELECT tr.status, tr.duration, tr.error_message, trun.run_date
147
+ SELECT tr.status, tr.duration, trun.run_date
150
148
  FROM test_results tr
151
149
  JOIN test_runs trun ON tr.run_id = trun.id
152
150
  WHERE tr.test_id = ?
package/dist/cli.mjs CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  FileManager,
5
5
  HTMLGenerator,
6
6
  startReportServer
7
- } from "./chunk-L6VOLEP2.mjs";
7
+ } from "./chunk-SQZD7MJL.mjs";
8
8
 
9
9
  // src/cli.ts
10
10
  import { program } from "commander";
@@ -6,10 +6,14 @@ export class ServerManager {
6
6
  async startServer(folderPath, outputFilename, overAllStatus) {
7
7
  const openOption = this.ortoniConfig.open || "never";
8
8
  const hasFailures = overAllStatus === "failed";
9
- if (openOption === "always" ||
10
- (openOption === "on-failure" && hasFailures)) {
9
+ const isCI = !!process.env.CI;
10
+ if (!isCI &&
11
+ (openOption === "always" || (openOption === "on-failure" && hasFailures))) {
11
12
  startReportServer(folderPath, outputFilename, this.ortoniConfig.port, openOption);
12
13
  await new Promise((_resolve) => { });
13
14
  }
15
+ else if (isCI && openOption !== "never") {
16
+ console.info("Ortoni Report: 'open' option ignored because process is running in CI.");
17
+ }
14
18
  }
15
19
  }