@allurereport/plugin-dashboard 3.16.1 → 3.18.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/plugin.js CHANGED
@@ -9,7 +9,7 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (
9
9
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
10
10
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
11
11
  };
12
- var _DashboardPlugin_writer, _DashboardPlugin_generate;
12
+ var _DashboardPlugin_writer, _DashboardPlugin_generateAfterStart, _DashboardPlugin_generate;
13
13
  import { createPluginSummary, } from "@allurereport/plugin-api";
14
14
  import { generateAllCharts, generateEnvirontmentsList, generateStaticFiles } from "./generators.js";
15
15
  import { InMemoryDashboardDataWriter, ReportFileDashboardDataWriter } from "./writer.js";
@@ -17,6 +17,12 @@ export class DashboardPlugin {
17
17
  constructor(options = {}) {
18
18
  this.options = options;
19
19
  _DashboardPlugin_writer.set(this, void 0);
20
+ _DashboardPlugin_generateAfterStart.set(this, async (context, store) => {
21
+ if (!__classPrivateFieldGet(this, _DashboardPlugin_writer, "f")) {
22
+ throw new Error("call start first");
23
+ }
24
+ await __classPrivateFieldGet(this, _DashboardPlugin_generate, "f").call(this, context, store);
25
+ });
20
26
  _DashboardPlugin_generate.set(this, async (context, store) => {
21
27
  await generateAllCharts(__classPrivateFieldGet(this, _DashboardPlugin_writer, "f"), store, this.options, context, this.options.filter);
22
28
  await generateEnvirontmentsList(__classPrivateFieldGet(this, _DashboardPlugin_writer, "f"), store);
@@ -39,16 +45,10 @@ export class DashboardPlugin {
39
45
  }
40
46
  };
41
47
  this.update = async (context, store) => {
42
- if (!__classPrivateFieldGet(this, _DashboardPlugin_writer, "f")) {
43
- throw new Error("call start first");
44
- }
45
- await __classPrivateFieldGet(this, _DashboardPlugin_generate, "f").call(this, context, store);
48
+ await __classPrivateFieldGet(this, _DashboardPlugin_generateAfterStart, "f").call(this, context, store);
46
49
  };
47
50
  this.done = async (context, store) => {
48
- if (!__classPrivateFieldGet(this, _DashboardPlugin_writer, "f")) {
49
- throw new Error("call start first");
50
- }
51
- await __classPrivateFieldGet(this, _DashboardPlugin_generate, "f").call(this, context, store);
51
+ await __classPrivateFieldGet(this, _DashboardPlugin_generateAfterStart, "f").call(this, context, store);
52
52
  };
53
53
  }
54
54
  async info(context, store) {
@@ -66,4 +66,4 @@ export class DashboardPlugin {
66
66
  });
67
67
  }
68
68
  }
69
- _DashboardPlugin_writer = new WeakMap(), _DashboardPlugin_generate = new WeakMap();
69
+ _DashboardPlugin_writer = new WeakMap(), _DashboardPlugin_generateAfterStart = new WeakMap(), _DashboardPlugin_generate = new WeakMap();
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allurereport/plugin-dashboard",
3
- "version": "3.16.1",
3
+ "version": "3.18.0",
4
4
  "description": "Allure Dashboard Plugin – plugin for generating dashboard with a mix of charts",
5
5
  "keywords": [
6
6
  "allure",
@@ -32,15 +32,15 @@
32
32
  "lint:fix": "oxlint --import-plugin --fix src test features stories"
33
33
  },
34
34
  "dependencies": {
35
- "@allurereport/charts-api": "3.16.1",
36
- "@allurereport/core-api": "3.16.1",
37
- "@allurereport/plugin-api": "3.16.1",
38
- "@allurereport/web-commons": "3.16.1",
35
+ "@allurereport/charts-api": "3.18.0",
36
+ "@allurereport/core-api": "3.18.0",
37
+ "@allurereport/plugin-api": "3.18.0",
38
+ "@allurereport/web-commons": "3.18.0",
39
39
  "d3-shape": "^3.2.0",
40
40
  "handlebars": "^4.7.9"
41
41
  },
42
42
  "devDependencies": {
43
- "@allurereport/web-dashboard": "3.16.1",
43
+ "@allurereport/web-dashboard": "3.18.0",
44
44
  "@types/d3-shape": "^3.1.8",
45
45
  "@types/node": "^20",
46
46
  "@vitest/runner": "^2",