@allurereport/web-awesome 3.0.0-beta.14 → 3.0.0-beta.15

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.
Files changed (41) hide show
  1. package/dist/multi/app-35b67161.js +2 -0
  2. package/dist/multi/manifest.json +20 -20
  3. package/dist/multi/{styles-1829fb8f.css → styles-35b67161.css} +2 -2
  4. package/dist/single/app-f5ecfcd9.js +2 -0
  5. package/dist/single/manifest.json +1 -1
  6. package/package.json +5 -4
  7. package/src/components/BaseLayout/styles.scss +1 -1
  8. package/src/components/Header/styles.scss +1 -2
  9. package/src/components/TestResult/TrSteps/TrAttachment.tsx +1 -1
  10. package/src/locales/de.json +0 -1
  11. package/src/stores/chart.ts +4 -2
  12. package/src/stores/env.ts +1 -1
  13. package/src/stores/envInfo.ts +2 -2
  14. package/src/stores/stats.ts +2 -2
  15. package/src/stores/testResults.ts +6 -2
  16. package/src/stores/tree.ts +1 -1
  17. package/src/stores/variables.ts +3 -1
  18. package/types.d.ts +1 -0
  19. package/webpack.config.js +14 -0
  20. package/dist/multi/app-1829fb8f.js +0 -2
  21. package/dist/single/app-3a6e31c7.js +0 -2
  22. /package/dist/multi/{173.app-1829fb8f.js → 173.app-35b67161.js} +0 -0
  23. /package/dist/multi/{174.app-1829fb8f.js → 174.app-35b67161.js} +0 -0
  24. /package/dist/multi/{252.app-1829fb8f.js → 252.app-35b67161.js} +0 -0
  25. /package/dist/multi/{282.app-1829fb8f.js → 282.app-35b67161.js} +0 -0
  26. /package/dist/multi/{29.app-1829fb8f.js → 29.app-35b67161.js} +0 -0
  27. /package/dist/multi/{416.app-1829fb8f.js → 416.app-35b67161.js} +0 -0
  28. /package/dist/multi/{527.app-1829fb8f.js → 527.app-35b67161.js} +0 -0
  29. /package/dist/multi/{600.app-1829fb8f.js → 600.app-35b67161.js} +0 -0
  30. /package/dist/multi/{605.app-1829fb8f.js → 605.app-35b67161.js} +0 -0
  31. /package/dist/multi/{638.app-1829fb8f.js → 638.app-35b67161.js} +0 -0
  32. /package/dist/multi/{672.app-1829fb8f.js → 672.app-35b67161.js} +0 -0
  33. /package/dist/multi/{686.app-1829fb8f.js → 686.app-35b67161.js} +0 -0
  34. /package/dist/multi/{725.app-1829fb8f.js → 725.app-35b67161.js} +0 -0
  35. /package/dist/multi/{741.app-1829fb8f.js → 741.app-35b67161.js} +0 -0
  36. /package/dist/multi/{755.app-1829fb8f.js → 755.app-35b67161.js} +0 -0
  37. /package/dist/multi/{894.app-1829fb8f.js → 894.app-35b67161.js} +0 -0
  38. /package/dist/multi/{943.app-1829fb8f.js → 943.app-35b67161.js} +0 -0
  39. /package/dist/multi/{980.app-1829fb8f.js → 980.app-35b67161.js} +0 -0
  40. /package/dist/multi/{app-1829fb8f.js.LICENSE.txt → app-35b67161.js.LICENSE.txt} +0 -0
  41. /package/dist/single/{app-3a6e31c7.js.LICENSE.txt → app-f5ecfcd9.js.LICENSE.txt} +0 -0
@@ -1,3 +1,3 @@
1
1
  {
2
- "main.js": "app-3a6e31c7.js"
2
+ "main.js": "app-f5ecfcd9.js"
3
3
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allurereport/web-awesome",
3
- "version": "3.0.0-beta.14",
3
+ "version": "3.0.0-beta.15",
4
4
  "description": "The static files for Allure Awesome Report",
5
5
  "keywords": [
6
6
  "allure",
@@ -31,9 +31,9 @@
31
31
  "IE 11"
32
32
  ],
33
33
  "dependencies": {
34
- "@allurereport/core-api": "3.0.0-beta.14",
35
- "@allurereport/web-commons": "3.0.0-beta.14",
36
- "@allurereport/web-components": "3.0.0-beta.14",
34
+ "@allurereport/core-api": "3.0.0-beta.15",
35
+ "@allurereport/web-commons": "3.0.0-beta.15",
36
+ "@allurereport/web-components": "3.0.0-beta.15",
37
37
  "@preact/signals": "^1.3.0",
38
38
  "clsx": "^2.1.1",
39
39
  "d3-shape": "^3.2.0",
@@ -96,6 +96,7 @@
96
96
  "split.js": "^1.6.5",
97
97
  "style-loader": "^4.0.0",
98
98
  "svg-sprite-loader": "^6.0.11",
99
+ "terser-webpack-plugin": "^5.3.14",
99
100
  "typescript": "^5.6.3",
100
101
  "typescript-eslint": "^8.6.0",
101
102
  "vitest": "^2.1.8",
@@ -1,6 +1,6 @@
1
1
  .layout {
2
2
  margin: auto;
3
- padding: 12px 32px;
3
+ padding: 0 32px;
4
4
  background: var(--bg-base-secondary);
5
5
  color: var(--on-text-primary);
6
6
  font-size: 14px;
@@ -5,8 +5,7 @@
5
5
  justify-content: space-between;
6
6
  align-items: center;
7
7
  gap: 12px;
8
- padding: 0 24px;
9
- padding-top: 8px;
8
+ padding: 8px 24px 12px;
10
9
  }
11
10
 
12
11
  .logoWrapper {
@@ -1,8 +1,8 @@
1
1
  import type { AttachmentTestStepResult } from "@allurereport/core-api";
2
2
  import { attachmentType } from "@allurereport/web-commons";
3
3
  import { ArrowButton, Attachment, Code, SvgIcon, Text, allureIcons } from "@allurereport/web-components";
4
- import type { FunctionComponent } from "preact";
5
4
  import cx from "clsx";
5
+ import type { FunctionComponent } from "preact";
6
6
  import { useState } from "preact/hooks";
7
7
  import { TrAttachmentInfo } from "@/components/TestResult/TrSteps/TrAttachmentInfo";
8
8
  import * as styles from "@/components/TestResult/TrSteps/styles.scss";
@@ -155,5 +155,4 @@
155
155
  "title": "Testerfolgsrate"
156
156
  }
157
157
  }
158
-
159
158
  }
@@ -18,7 +18,9 @@ export const fetchPieChartData = async (env: string) => {
18
18
  };
19
19
 
20
20
  try {
21
- const res = await fetchReportJsonData(env ? `widgets/${env}/pie_chart.json` : "widgets/pie_chart.json");
21
+ const res = await fetchReportJsonData(env ? `widgets/${env}/pie_chart.json` : "widgets/pie_chart.json", {
22
+ bustCache: true,
23
+ });
22
24
 
23
25
  pieChartStore.value = {
24
26
  data: res,
@@ -47,7 +49,7 @@ export const fetchChartsData = async () => {
47
49
  };
48
50
 
49
51
  try {
50
- const res = await fetchReportJsonData<ChartsResponse>("widgets/charts.json");
52
+ const res = await fetchReportJsonData<ChartsResponse>("widgets/charts.json", { bustCache: true });
51
53
 
52
54
  chartsStore.value = {
53
55
  data: createCharts(res),
package/src/stores/env.ts CHANGED
@@ -32,7 +32,7 @@ export const fetchEnvironments = async () => {
32
32
  };
33
33
 
34
34
  try {
35
- const res = await fetchReportJsonData<string[]>("widgets/environments.json");
35
+ const res = await fetchReportJsonData<string[]>("widgets/environments.json", { bustCache: true });
36
36
 
37
37
  environmentsStore.value = {
38
38
  data: res,
@@ -1,7 +1,7 @@
1
1
  import type { EnvironmentItem } from "@allurereport/core-api";
2
2
  import { fetchReportJsonData } from "@allurereport/web-commons";
3
3
  import { signal } from "@preact/signals";
4
- import { StoreSignalState } from "@/stores/types";
4
+ import type { StoreSignalState } from "@/stores/types";
5
5
 
6
6
  export const envInfoStore = signal<StoreSignalState<EnvironmentItem[]>>({
7
7
  loading: false,
@@ -17,7 +17,7 @@ export const fetchEnvInfo = async () => {
17
17
  };
18
18
 
19
19
  try {
20
- const res = await fetchReportJsonData<EnvironmentItem[]>("widgets/allure_environment.json");
20
+ const res = await fetchReportJsonData<EnvironmentItem[]>("widgets/allure_environment.json", { bustCache: true });
21
21
 
22
22
  envInfoStore.value = {
23
23
  data: res,
@@ -26,7 +26,7 @@ export const fetchReportStats = async () => {
26
26
  };
27
27
 
28
28
  try {
29
- const res = await fetchReportJsonData<Statistic>("widgets/statistic.json");
29
+ const res = await fetchReportJsonData<Statistic>("widgets/statistic.json", { bustCache: true });
30
30
 
31
31
  reportStatsStore.value = {
32
32
  data: res,
@@ -58,7 +58,7 @@ export const fetchEnvStats = async (envs: string[]) => {
58
58
 
59
59
  try {
60
60
  const data = await Promise.all(
61
- envsToFetch.map((env) => fetchReportJsonData<AwesomeTree>(`widgets/${env}/statistic.json`)),
61
+ envsToFetch.map((env) => fetchReportJsonData<AwesomeTree>(`widgets/${env}/statistic.json`, { bustCache: true })),
62
62
  );
63
63
 
64
64
  statsByEnvStore.value = {
@@ -21,7 +21,9 @@ export const testResultNavStore = signal<StoreSignalState<TrNavStoreState>>({
21
21
 
22
22
  export const fetchTestResultNav = async (env?: string) => {
23
23
  try {
24
- const data = await fetchReportJsonData<string[]>(env ? `widgets/${env}/nav.json` : "widgets/nav.json");
24
+ const data = await fetchReportJsonData<string[]>(env ? `widgets/${env}/nav.json` : "widgets/nav.json", {
25
+ bustCache: true,
26
+ });
25
27
 
26
28
  testResultNavStore.value = {
27
29
  data,
@@ -49,7 +51,9 @@ export const fetchTestResult = async (testResultId: string) => {
49
51
  };
50
52
 
51
53
  try {
52
- const data = await fetchReportJsonData<AwesomeTestResult>(`data/test-results/${testResultId}.json`);
54
+ const data = await fetchReportJsonData<AwesomeTestResult>(`data/test-results/${testResultId}.json`, {
55
+ bustCache: true,
56
+ });
53
57
 
54
58
  testResultStore.value = {
55
59
  data: { ...testResultStore.value.data, [testResultId]: data },
@@ -164,7 +164,7 @@ export const fetchEnvTreesData = async (envs: string[]) => {
164
164
 
165
165
  try {
166
166
  const data = await Promise.all(
167
- envsToFetch.map((env) => fetchReportJsonData<AwesomeTree>(`widgets/${env}/tree.json`)),
167
+ envsToFetch.map((env) => fetchReportJsonData<AwesomeTree>(`widgets/${env}/tree.json`, { bustCache: true })),
168
168
  );
169
169
 
170
170
  const previous = treeStore.value.data;
@@ -18,7 +18,9 @@ export const fetchVariables = async (env: string = "default") => {
18
18
  };
19
19
 
20
20
  try {
21
- const res = await fetchReportJsonData<string[]>(env ? `widgets/${env}/variables.json` : "widgets/variables.json");
21
+ const res = await fetchReportJsonData<string[]>(env ? `widgets/${env}/variables.json` : "widgets/variables.json", {
22
+ bustCache: true,
23
+ });
22
24
 
23
25
  variables.value = {
24
26
  data: {
package/types.d.ts CHANGED
@@ -24,6 +24,7 @@ export type AwesomeReportOptions = {
24
24
  layout?: Layout;
25
25
  defaultSection?: string;
26
26
  sections?: string[];
27
+ cacheKey: string;
27
28
  };
28
29
 
29
30
  export type AwesomeFixtureResult = Omit<
package/webpack.config.js CHANGED
@@ -7,6 +7,7 @@ import SpriteLoaderPlugin from "svg-sprite-loader/plugin.js";
7
7
  import webpack from "webpack";
8
8
  import { WebpackManifestPlugin } from "webpack-manifest-plugin";
9
9
  import ForkTsCheckerPlugin from "fork-ts-checker-webpack-plugin";
10
+ import TerserPlugin from "terser-webpack-plugin";
10
11
 
11
12
  const { SINGLE_FILE_MODE } = env;
12
13
  const baseDir = dirname(fileURLToPath(import.meta.url));
@@ -21,6 +22,19 @@ export default (env, argv) => {
21
22
  assetModuleFilename: devMode ? `[name].[ext]` : `[name]-[hash:8].[ext]`,
22
23
  },
23
24
  devtool: devMode ? "inline-source-map" : false,
25
+ optimization: {
26
+ minimize: !devMode,
27
+ minimizer: [
28
+ new TerserPlugin({
29
+ terserOptions: {
30
+ compress: {
31
+ drop_console: false,
32
+ drop_debugger: false,
33
+ },
34
+ },
35
+ }),
36
+ ],
37
+ },
24
38
  module: {
25
39
  rules: [
26
40
  {