@allurereport/plugin-api 3.0.1 → 3.1.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.d.ts CHANGED
@@ -24,6 +24,7 @@ export interface PluginContext {
24
24
  reportName: string;
25
25
  reportFiles: ReportFiles;
26
26
  reportUrl?: string;
27
+ output: string;
27
28
  ci?: CiDescriptor;
28
29
  }
29
30
  export type SummaryTestResult = Pick<TestResult, "name" | "id" | "status" | "duration">;
@@ -77,5 +78,5 @@ export interface Plugin {
77
78
  start?(context: PluginContext, store: AllureStore, realtime: RealtimeSubscriber): Promise<void>;
78
79
  update?(context: PluginContext, store: AllureStore): Promise<void>;
79
80
  done?(context: PluginContext, store: AllureStore): Promise<void>;
80
- info?(context: PluginContext, store: AllureStore): Promise<PluginSummary>;
81
+ info?(context: PluginContext, store: AllureStore): Promise<PluginSummary | undefined>;
81
82
  }
@@ -39,7 +39,8 @@ const createTree = (data, classifier, leafFactory, groupFactory, addLeafToGroup
39
39
  if (groupsByClassifier[parentId] === undefined) {
40
40
  groupsByClassifier[parentId] = {};
41
41
  }
42
- if (groupsByClassifier[parentId][group] === undefined) {
42
+ if (groupsByClassifier[parentId][group] === undefined ||
43
+ typeof groupsByClassifier[parentId][group] === "function") {
43
44
  const newGroup = groupFactory(parentId, group);
44
45
  groupsByClassifier[parentId][group] = newGroup;
45
46
  groupsById[newGroup.nodeId] = newGroup;
@@ -51,7 +52,9 @@ const createTree = (data, classifier, leafFactory, groupFactory, addLeafToGroup
51
52
  });
52
53
  });
53
54
  }
54
- parentGroups.forEach((parentGroup) => addLeaf(parentGroup, leaf.nodeId));
55
+ parentGroups.forEach((parentGroup) => {
56
+ addLeaf(parentGroup, leaf.nodeId);
57
+ });
55
58
  }
56
59
  return {
57
60
  root,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allurereport/plugin-api",
3
- "version": "3.0.1",
3
+ "version": "3.1.0",
4
4
  "description": "Allure Plugin API",
5
5
  "keywords": [
6
6
  "allure"
@@ -26,7 +26,7 @@
26
26
  "test": "rimraf ./out && vitest run"
27
27
  },
28
28
  "dependencies": {
29
- "@allurereport/core-api": "3.0.1"
29
+ "@allurereport/core-api": "3.1.0"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@stylistic/eslint-plugin": "^2.6.1",