@allurereport/plugin-classic 3.3.1 → 3.4.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.
- package/dist/generators.js +5 -5
- package/dist/writer.js +10 -10
- package/package.json +20 -31
package/dist/generators.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { compareBy, createBaseUrlScript, createFontLinkTag, createReportDataScript, createScriptTag, createStylesLinkTag, incrementStatistic, nullsLast, ordinal, } from "@allurereport/core-api";
|
|
2
|
-
import { createTreeByCategories, createTreeByLabels, filterTree, sortTree, transformTree, } from "@allurereport/plugin-api";
|
|
3
|
-
import { getPieChartValues } from "@allurereport/web-commons";
|
|
4
|
-
import Handlebars from "handlebars";
|
|
5
1
|
import { readFile } from "node:fs/promises";
|
|
6
2
|
import { createRequire } from "node:module";
|
|
7
3
|
import { basename, join } from "node:path";
|
|
4
|
+
import { compareBy, createBaseUrlScript, createFontLinkTag, createReportDataScript, stringifyForInlineScript, createScriptTag, createStylesLinkTag, incrementStatistic, nullsLast, ordinal, } from "@allurereport/core-api";
|
|
5
|
+
import { createTreeByCategories, createTreeByLabels, filterTree, sortTree, transformTree, } from "@allurereport/plugin-api";
|
|
6
|
+
import { getPieChartValues } from "@allurereport/web-commons";
|
|
7
|
+
import Handlebars from "handlebars";
|
|
8
8
|
import { matchCategories } from "./categories.js";
|
|
9
9
|
import { convertFixtureResult, convertTestResult } from "./converters.js";
|
|
10
10
|
const require = createRequire(import.meta.url);
|
|
@@ -217,7 +217,7 @@ export const generateStaticFiles = async (payload) => {
|
|
|
217
217
|
headTags: headTags.join("\n"),
|
|
218
218
|
bodyTags: bodyTags.join("\n"),
|
|
219
219
|
reportFilesScript: createReportDataScript(reportDataFiles),
|
|
220
|
-
reportOptions:
|
|
220
|
+
reportOptions: stringifyForInlineScript(reportOptions),
|
|
221
221
|
analyticsEnable: true,
|
|
222
222
|
allureVersion,
|
|
223
223
|
reportUuid,
|
package/dist/writer.js
CHANGED
|
@@ -5,8 +5,8 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
5
5
|
};
|
|
6
6
|
var _InMemoryReportDataWriter_data;
|
|
7
7
|
import { mkdir, writeFile } from "node:fs/promises";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
8
|
+
import { resolve } from "node:path";
|
|
9
|
+
import { joinPosixPath } from "@allurereport/core-api";
|
|
10
10
|
export class FileSystemReportDataWriter {
|
|
11
11
|
constructor(output) {
|
|
12
12
|
this.output = output;
|
|
@@ -37,19 +37,19 @@ export class InMemoryReportDataWriter {
|
|
|
37
37
|
_InMemoryReportDataWriter_data.set(this, {});
|
|
38
38
|
}
|
|
39
39
|
async writeData(fileName, data) {
|
|
40
|
-
const dist =
|
|
40
|
+
const dist = joinPosixPath("data", fileName);
|
|
41
41
|
__classPrivateFieldGet(this, _InMemoryReportDataWriter_data, "f")[dist] = Buffer.from(JSON.stringify(data), "utf-8");
|
|
42
42
|
}
|
|
43
43
|
async writeWidget(fileName, data) {
|
|
44
|
-
const dist =
|
|
44
|
+
const dist = joinPosixPath("widgets", fileName);
|
|
45
45
|
__classPrivateFieldGet(this, _InMemoryReportDataWriter_data, "f")[dist] = Buffer.from(JSON.stringify(data), "utf-8");
|
|
46
46
|
}
|
|
47
47
|
async writeTestCase(test) {
|
|
48
|
-
const dist =
|
|
48
|
+
const dist = joinPosixPath("data", "test-results", `${test.id}.json`);
|
|
49
49
|
__classPrivateFieldGet(this, _InMemoryReportDataWriter_data, "f")[dist] = Buffer.from(JSON.stringify(test), "utf-8");
|
|
50
50
|
}
|
|
51
51
|
async writeAttachment(fileName, file) {
|
|
52
|
-
const dist =
|
|
52
|
+
const dist = joinPosixPath("data", "attachments", fileName);
|
|
53
53
|
const content = await file.asBuffer();
|
|
54
54
|
if (content) {
|
|
55
55
|
__classPrivateFieldGet(this, _InMemoryReportDataWriter_data, "f")[dist] = content;
|
|
@@ -68,19 +68,19 @@ export class ReportFileDataWriter {
|
|
|
68
68
|
this.reportFiles = reportFiles;
|
|
69
69
|
}
|
|
70
70
|
async writeData(fileName, data) {
|
|
71
|
-
await this.reportFiles.addFile(
|
|
71
|
+
await this.reportFiles.addFile(joinPosixPath("data", fileName), Buffer.from(JSON.stringify(data), "utf-8"));
|
|
72
72
|
}
|
|
73
73
|
async writeWidget(fileName, data) {
|
|
74
|
-
await this.reportFiles.addFile(
|
|
74
|
+
await this.reportFiles.addFile(joinPosixPath("widgets", fileName), Buffer.from(JSON.stringify(data), "utf-8"));
|
|
75
75
|
}
|
|
76
76
|
async writeAttachment(source, file) {
|
|
77
77
|
const contentBuffer = await file.asBuffer();
|
|
78
78
|
if (!contentBuffer) {
|
|
79
79
|
return;
|
|
80
80
|
}
|
|
81
|
-
await this.reportFiles.addFile(
|
|
81
|
+
await this.reportFiles.addFile(joinPosixPath("data", "attachments", source), contentBuffer);
|
|
82
82
|
}
|
|
83
83
|
async writeTestCase(test) {
|
|
84
|
-
await this.reportFiles.addFile(
|
|
84
|
+
await this.reportFiles.addFile(joinPosixPath("data", "test-results", `${test.id}.json`), Buffer.from(JSON.stringify(test), "utf8"));
|
|
85
85
|
}
|
|
86
86
|
}
|
package/package.json
CHANGED
|
@@ -1,61 +1,50 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allurereport/plugin-classic",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0",
|
|
4
4
|
"description": "The classic version of Allure HTML report",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"allure",
|
|
7
|
-
"
|
|
8
|
-
"report",
|
|
7
|
+
"html",
|
|
9
8
|
"plugin",
|
|
10
|
-
"
|
|
9
|
+
"report",
|
|
10
|
+
"testing"
|
|
11
11
|
],
|
|
12
|
-
"repository": "https://github.com/allure-framework/allure3",
|
|
13
12
|
"license": "Apache-2.0",
|
|
14
13
|
"author": "Qameta Software",
|
|
14
|
+
"repository": "https://github.com/allure-framework/allure3",
|
|
15
|
+
"files": [
|
|
16
|
+
"./dist"
|
|
17
|
+
],
|
|
15
18
|
"type": "module",
|
|
16
|
-
"exports": {
|
|
17
|
-
".": "./dist/index.js"
|
|
18
|
-
},
|
|
19
19
|
"main": "./dist/index.js",
|
|
20
20
|
"module": "./dist/index.js",
|
|
21
21
|
"types": "./dist/index.d.ts",
|
|
22
|
-
"
|
|
23
|
-
"./dist"
|
|
24
|
-
|
|
22
|
+
"exports": {
|
|
23
|
+
".": "./dist/index.js"
|
|
24
|
+
},
|
|
25
25
|
"scripts": {
|
|
26
26
|
"build": "run clean && tsc --project ./tsconfig.json",
|
|
27
27
|
"clean": "rimraf ./dist",
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
28
|
+
"test": "rimraf ./out && vitest run",
|
|
29
|
+
"lint": "oxlint --import-plugin src test features stories",
|
|
30
|
+
"lint:fix": "oxlint --import-plugin --fix src test features stories"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@allurereport/core-api": "3.
|
|
34
|
-
"@allurereport/plugin-api": "3.
|
|
35
|
-
"@allurereport/web-awesome": "3.
|
|
36
|
-
"@allurereport/web-classic": "3.
|
|
37
|
-
"@allurereport/web-commons": "3.
|
|
33
|
+
"@allurereport/core-api": "3.4.0",
|
|
34
|
+
"@allurereport/plugin-api": "3.4.0",
|
|
35
|
+
"@allurereport/web-awesome": "3.4.0",
|
|
36
|
+
"@allurereport/web-classic": "3.4.0",
|
|
37
|
+
"@allurereport/web-commons": "3.4.0",
|
|
38
38
|
"d3-shape": "^3.2.0",
|
|
39
|
-
"handlebars": "^4.7.
|
|
39
|
+
"handlebars": "^4.7.9",
|
|
40
40
|
"markdown-it": "^14.1.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@stylistic/eslint-plugin": "^2.6.1",
|
|
44
43
|
"@types/d3-shape": "^3.1.6",
|
|
45
|
-
"@types/eslint": "^8.56.11",
|
|
46
44
|
"@types/markdown-it": "^14.1.2",
|
|
47
45
|
"@types/node": "^20.17.9",
|
|
48
|
-
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
49
|
-
"@typescript-eslint/parser": "^8.0.0",
|
|
50
46
|
"@vitest/runner": "^2.1.9",
|
|
51
47
|
"allure-vitest": "^3.3.3",
|
|
52
|
-
"eslint": "^8.57.0",
|
|
53
|
-
"eslint-config-prettier": "^9.1.0",
|
|
54
|
-
"eslint-plugin-import": "^2.29.1",
|
|
55
|
-
"eslint-plugin-jsdoc": "^50.0.0",
|
|
56
|
-
"eslint-plugin-n": "^17.10.1",
|
|
57
|
-
"eslint-plugin-no-null": "^1.0.2",
|
|
58
|
-
"eslint-plugin-prefer-arrow": "^1.2.3",
|
|
59
48
|
"rimraf": "^6.0.1",
|
|
60
49
|
"typescript": "^5.6.3",
|
|
61
50
|
"vitest": "^2.1.9"
|