@testrelic/playwright-analytics 2.16.4-next.186 → 2.16.4-next.193
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/api-fixture.cjs +4 -4
- package/dist/api-fixture.cjs.map +1 -1
- package/dist/api-fixture.js +4 -4
- package/dist/api-fixture.js.map +1 -1
- package/dist/cli.cjs +14 -14
- package/dist/fixture.cjs.map +1 -1
- package/dist/fixture.js.map +1 -1
- package/dist/index.cjs +109 -76
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +109 -76
- package/dist/index.js.map +1 -1
- package/dist/reporter-entry.cjs +102 -69
- package/dist/reporter-entry.cjs.map +1 -1
- package/dist/reporter-entry.js +101 -68
- package/dist/reporter-entry.js.map +1 -1
- package/dist/visual.cjs.map +1 -1
- package/dist/visual.js.map +1 -1
- package/package.json +2 -2
- package/timeline-schema.json +1 -0
package/dist/cli.cjs
CHANGED
|
@@ -181,8 +181,8 @@ function handleTestDetail(_req, res, reportDir, testId) {
|
|
|
181
181
|
const data = (0, import_node_fs3.readFileSync)(filePath, "utf-8");
|
|
182
182
|
res.writeHead(200, { "Content-Type": "application/json" });
|
|
183
183
|
res.end(data);
|
|
184
|
-
} catch
|
|
185
|
-
sendJson(res, 500, { error:
|
|
184
|
+
} catch {
|
|
185
|
+
sendJson(res, 500, { error: "Failed to read the test data file" });
|
|
186
186
|
}
|
|
187
187
|
}
|
|
188
188
|
async function handleTestDataFile(req, res, reportDir, testId, dataType) {
|
|
@@ -226,8 +226,8 @@ async function handleTestDataFile(req, res, reportDir, testId, dataType) {
|
|
|
226
226
|
}
|
|
227
227
|
const result = await readJsonlPage(jsonlPath, page, pageSize, knownTotal);
|
|
228
228
|
sendJson(res, 200, result);
|
|
229
|
-
} catch
|
|
230
|
-
sendJson(res, 500, { error:
|
|
229
|
+
} catch {
|
|
230
|
+
sendJson(res, 500, { error: "Failed to read the report data" });
|
|
231
231
|
}
|
|
232
232
|
}
|
|
233
233
|
function handleFiles(_req, res, reportDir) {
|
|
@@ -285,8 +285,8 @@ function handleArtifactsList(_req, res, artifactsDir) {
|
|
|
285
285
|
}
|
|
286
286
|
runs.sort((a, b) => b.folderName.localeCompare(a.folderName));
|
|
287
287
|
sendJson(res, 200, { runs, totalSizeBytes });
|
|
288
|
-
} catch
|
|
289
|
-
sendJson(res, 500, { error:
|
|
288
|
+
} catch {
|
|
289
|
+
sendJson(res, 500, { error: "Failed to read the report data" });
|
|
290
290
|
}
|
|
291
291
|
}
|
|
292
292
|
function handleArtifactsDeleteAll(_req, res, artifactsDir) {
|
|
@@ -305,8 +305,8 @@ function handleArtifactsDeleteAll(_req, res, artifactsDir) {
|
|
|
305
305
|
}
|
|
306
306
|
}
|
|
307
307
|
sendJson(res, 200, { deletedCount, freedBytes });
|
|
308
|
-
} catch
|
|
309
|
-
sendJson(res, 500, { error:
|
|
308
|
+
} catch {
|
|
309
|
+
sendJson(res, 500, { error: "Failed to read the report data" });
|
|
310
310
|
}
|
|
311
311
|
}
|
|
312
312
|
function handleArtifactDelete(_req, res, artifactsDir, folderName) {
|
|
@@ -329,8 +329,8 @@ function handleArtifactDelete(_req, res, artifactsDir, folderName) {
|
|
|
329
329
|
const freedBytes = getDirSize(runDir);
|
|
330
330
|
(0, import_node_fs3.rmSync)(runDir, { recursive: true, force: true });
|
|
331
331
|
sendJson(res, 200, { deleted: folderName, freedBytes });
|
|
332
|
-
} catch
|
|
333
|
-
sendJson(res, 500, { error:
|
|
332
|
+
} catch {
|
|
333
|
+
sendJson(res, 500, { error: "Failed to read the report data" });
|
|
334
334
|
}
|
|
335
335
|
}
|
|
336
336
|
function handleShutdown(_req, res, server) {
|
|
@@ -368,8 +368,8 @@ function serveStaticFile(req, res, filePath) {
|
|
|
368
368
|
"Accept-Ranges": "bytes"
|
|
369
369
|
});
|
|
370
370
|
pipeOrFail((0, import_node_fs3.createReadStream)(filePath), res);
|
|
371
|
-
} catch
|
|
372
|
-
sendJson(res, 500, { error:
|
|
371
|
+
} catch {
|
|
372
|
+
sendJson(res, 500, { error: "Failed to read the report data" });
|
|
373
373
|
}
|
|
374
374
|
}
|
|
375
375
|
function pipeOrFail(stream, res) {
|
|
@@ -593,8 +593,8 @@ function openInBrowser(filePath) {
|
|
|
593
593
|
file = "open";
|
|
594
594
|
args = [filePath];
|
|
595
595
|
} else if (platform === "win32") {
|
|
596
|
-
file = "
|
|
597
|
-
args = [
|
|
596
|
+
file = "explorer.exe";
|
|
597
|
+
args = [filePath];
|
|
598
598
|
} else {
|
|
599
599
|
file = "xdg-open";
|
|
600
600
|
args = [filePath];
|