@allurereport/plugin-dashboard 3.20.0 → 3.21.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.d.ts +1 -0
- package/dist/generators.js +5 -4
- package/dist/plugin.js +1 -0
- package/dist/static/report.tar +0 -0
- package/package.json +10 -7
package/dist/generators.d.ts
CHANGED
package/dist/generators.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { randomUUID } from "node:crypto";
|
|
2
2
|
import { defaultChartsConfig } from "@allurereport/charts-api";
|
|
3
|
-
import { createBaseUrlScript, createFontLinkTag,
|
|
3
|
+
import { createBaseUrlScript, createFontLinkTag, injectReportDataScript, reportDataScriptPlaceholder, stringifyForInlineScript, createScriptTag, createStylesLinkTag, } from "@allurereport/core-api";
|
|
4
4
|
import { copyReportStaticAssets, getReportStaticAsset, readReportStaticAssets, } from "@allurereport/plugin-api/static-assets";
|
|
5
5
|
import { generateCharts } from "@allurereport/web-commons";
|
|
6
6
|
import Handlebars from "handlebars";
|
|
@@ -57,7 +57,7 @@ export const generateEnvirontmentsList = async (writer, store) => {
|
|
|
57
57
|
await writer.writeWidget("environments.json", environments);
|
|
58
58
|
};
|
|
59
59
|
export const generateStaticFiles = async (payload) => {
|
|
60
|
-
const { reportName = "Allure Report", reportLanguage = "en", logo = "", theme = "light", reportFiles, reportDataFiles, reportUuid, allureVersion, } = payload;
|
|
60
|
+
const { reportName = "Allure Report", reportLanguage = "en", logo = "", theme = "light", reportFiles, reportDataFiles, reportUuid, allureVersion, overviewHref, } = payload;
|
|
61
61
|
const compile = Handlebars.compile(template);
|
|
62
62
|
const staticAssets = await readReportStaticAssets(reportStaticArchive);
|
|
63
63
|
const { manifest } = staticAssets;
|
|
@@ -96,12 +96,13 @@ export const generateStaticFiles = async (payload) => {
|
|
|
96
96
|
createdAt: Date.now(),
|
|
97
97
|
reportUuid,
|
|
98
98
|
allureVersion,
|
|
99
|
+
overviewHref,
|
|
99
100
|
};
|
|
100
101
|
try {
|
|
101
102
|
const html = compile({
|
|
102
103
|
headTags: headTags.join("\n"),
|
|
103
104
|
bodyTags: bodyTags.join("\n"),
|
|
104
|
-
reportFilesScript:
|
|
105
|
+
reportFilesScript: reportDataScriptPlaceholder,
|
|
105
106
|
reportOptions: stringifyForInlineScript(reportOptions),
|
|
106
107
|
analyticsEnable: true,
|
|
107
108
|
allureVersion,
|
|
@@ -109,7 +110,7 @@ export const generateStaticFiles = async (payload) => {
|
|
|
109
110
|
reportName,
|
|
110
111
|
singleFile: payload.singleFile,
|
|
111
112
|
});
|
|
112
|
-
await reportFiles.addFile("index.html",
|
|
113
|
+
await reportFiles.addFile("index.html", injectReportDataScript(html, reportDataFiles));
|
|
113
114
|
}
|
|
114
115
|
catch (err) {
|
|
115
116
|
if (err instanceof RangeError) {
|
package/dist/plugin.js
CHANGED
package/dist/static/report.tar
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allurereport/plugin-dashboard",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.21.0",
|
|
4
4
|
"description": "Allure Dashboard Plugin – plugin for generating dashboard with a mix of charts",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"allure",
|
|
@@ -28,21 +28,24 @@
|
|
|
28
28
|
"build": "run clean && tsc --project ./tsconfig.json && node ../../scripts/pack-report-static.mjs ../web-dashboard/dist/multi ./dist/static/report.tar",
|
|
29
29
|
"clean": "rimraf ./dist",
|
|
30
30
|
"test": "rimraf ./out && vitest run",
|
|
31
|
+
"test:unit": "yarn test",
|
|
31
32
|
"lint": "oxlint --import-plugin src test features stories",
|
|
32
33
|
"lint:fix": "oxlint --import-plugin --fix src test features stories"
|
|
33
34
|
},
|
|
34
35
|
"dependencies": {
|
|
35
|
-
"@allurereport/charts-api": "3.
|
|
36
|
-
"@allurereport/core-api": "3.
|
|
37
|
-
"@allurereport/plugin-api": "3.
|
|
38
|
-
"@allurereport/web-commons": "3.
|
|
36
|
+
"@allurereport/charts-api": "3.21.0",
|
|
37
|
+
"@allurereport/core-api": "3.21.0",
|
|
38
|
+
"@allurereport/plugin-api": "3.21.0",
|
|
39
|
+
"@allurereport/web-commons": "3.21.0",
|
|
39
40
|
"d3-shape": "^3.2.0",
|
|
40
|
-
"handlebars": "
|
|
41
|
+
"handlebars": "4.7.10"
|
|
41
42
|
},
|
|
42
43
|
"devDependencies": {
|
|
43
|
-
"@allurereport/
|
|
44
|
+
"@allurereport/test-config": "3.21.0",
|
|
45
|
+
"@allurereport/web-dashboard": "3.21.0",
|
|
44
46
|
"@types/d3-shape": "^3.1.8",
|
|
45
47
|
"@types/node": "^20",
|
|
48
|
+
"@vitest/coverage-istanbul": "^4.1.0",
|
|
46
49
|
"@vitest/runner": "^2",
|
|
47
50
|
"allure-js-commons": "^3",
|
|
48
51
|
"allure-vitest": "^3",
|