@reportforge/playwright-pdf 0.6.2 → 0.6.3
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 +15 -0
- package/README.md +3 -3
- package/dist/{demo/cli.js → cli/index.js} +5671 -5267
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +2 -3
- package/dist/cli/export-feedback.js +0 -87
package/dist/index.js
CHANGED
|
@@ -13237,7 +13237,7 @@ var PdfReporter = class {
|
|
|
13237
13237
|
this.dataCollector = new DataCollector();
|
|
13238
13238
|
this.pdfGenerator = new PdfGenerator();
|
|
13239
13239
|
this.options = parseOptions(rawOptions);
|
|
13240
|
-
const version = true ? "0.6.
|
|
13240
|
+
const version = true ? "0.6.3" : "0.x";
|
|
13241
13241
|
logger.info(`@reportforge/playwright-pdf v${version} initialised`);
|
|
13242
13242
|
this.licenseClient = new LicenseClient({
|
|
13243
13243
|
licenseKey: this.options.licenseKey,
|
package/dist/index.mjs
CHANGED
|
@@ -13238,7 +13238,7 @@ var PdfReporter = class {
|
|
|
13238
13238
|
this.dataCollector = new DataCollector();
|
|
13239
13239
|
this.pdfGenerator = new PdfGenerator();
|
|
13240
13240
|
this.options = parseOptions(rawOptions);
|
|
13241
|
-
const version = true ? "0.6.
|
|
13241
|
+
const version = true ? "0.6.3" : "0.x";
|
|
13242
13242
|
logger.info(`@reportforge/playwright-pdf v${version} initialised`);
|
|
13243
13243
|
this.licenseClient = new LicenseClient({
|
|
13244
13244
|
licenseKey: this.options.licenseKey,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reportforge/playwright-pdf",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.3",
|
|
4
4
|
"description": "Enterprise-ready PDF reports for Playwright Test — minimal, detailed, and executive templates with CI/CD integrations",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "ReportForge",
|
|
@@ -34,8 +34,7 @@
|
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
36
|
"bin": {
|
|
37
|
-
"
|
|
38
|
-
"reportforge-export-feedback": "./dist/cli/export-feedback.js"
|
|
37
|
+
"playwright-pdf": "./dist/cli/index.js"
|
|
39
38
|
},
|
|
40
39
|
"publishConfig": {
|
|
41
40
|
"access": "public"
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
var __create = Object.create;
|
|
4
|
-
var __defProp = Object.defineProperty;
|
|
5
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
-
var __export = (target, all) => {
|
|
10
|
-
for (var name in all)
|
|
11
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
-
};
|
|
13
|
-
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
-
for (let key of __getOwnPropNames(from))
|
|
16
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
17
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
|
-
}
|
|
19
|
-
return to;
|
|
20
|
-
};
|
|
21
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
-
mod
|
|
28
|
-
));
|
|
29
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
-
|
|
31
|
-
// src/cli/export-feedback.ts
|
|
32
|
-
var export_feedback_exports = {};
|
|
33
|
-
__export(export_feedback_exports, {
|
|
34
|
-
exportFeedback: () => exportFeedback
|
|
35
|
-
});
|
|
36
|
-
module.exports = __toCommonJS(export_feedback_exports);
|
|
37
|
-
var import_node_fs = __toESM(require("fs"));
|
|
38
|
-
var import_node_os = __toESM(require("os"));
|
|
39
|
-
var import_node_path = __toESM(require("path"));
|
|
40
|
-
|
|
41
|
-
// src/analysis/feedback-csv.ts
|
|
42
|
-
var FEEDBACK_HEADER = "category,margin,text";
|
|
43
|
-
function parseFeedbackRows(content) {
|
|
44
|
-
return content.trim().split("\n").slice(1).filter(Boolean).map((line) => {
|
|
45
|
-
const parts = line.split(",");
|
|
46
|
-
return { category: parts[0], margin: parts[1], text: parts.slice(2).join(","), raw: line };
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
// src/cli/export-feedback.ts
|
|
51
|
-
function exportFeedback(deps = {}) {
|
|
52
|
-
const home = deps.home ?? import_node_os.default.homedir();
|
|
53
|
-
const cwd = deps.cwd ?? process.cwd();
|
|
54
|
-
const root = import_node_path.default.join(home, ".reportforge");
|
|
55
|
-
const rows = [];
|
|
56
|
-
if (import_node_fs.default.existsSync(root)) {
|
|
57
|
-
for (const entry of import_node_fs.default.readdirSync(root)) {
|
|
58
|
-
const file = import_node_path.default.join(root, entry, "unclassified.csv");
|
|
59
|
-
if (!import_node_fs.default.existsSync(file)) continue;
|
|
60
|
-
for (const r of parseFeedbackRows(import_node_fs.default.readFileSync(file, "utf8"))) {
|
|
61
|
-
rows.push(r.raw);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
if (rows.length === 0) return { rowCount: 0, outFile: null };
|
|
66
|
-
const outFile = import_node_path.default.join(cwd, "reportforge-feedback.csv");
|
|
67
|
-
import_node_fs.default.writeFileSync(outFile, `${FEEDBACK_HEADER}
|
|
68
|
-
${rows.join("\n")}
|
|
69
|
-
`, "utf8");
|
|
70
|
-
return { rowCount: rows.length, outFile };
|
|
71
|
-
}
|
|
72
|
-
if (process.argv[1] && process.argv[1].endsWith("export-feedback.js")) {
|
|
73
|
-
const res = exportFeedback();
|
|
74
|
-
if (res.rowCount === 0) {
|
|
75
|
-
process.stdout.write("No locally collected failures found (~/.reportforge/*/unclassified.csv).\n");
|
|
76
|
-
} else {
|
|
77
|
-
process.stdout.write(
|
|
78
|
-
`Saved ${res.rowCount} row(s) to ${res.outFile} - tokenized + redacted, LOCAL only.
|
|
79
|
-
Review it before sharing; there is no upload.
|
|
80
|
-
`
|
|
81
|
-
);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
85
|
-
0 && (module.exports = {
|
|
86
|
-
exportFeedback
|
|
87
|
-
});
|