🚀. Socket Launch Week Day 2:Introducing Manifest Alerts.Learn more
Sign In

@allurereport/plugin-api

Package Overview
Dependencies
Maintainers
2
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@allurereport/plugin-api - npm Package Compare versions

Comparing version
3.0.0-beta.7
to
3.0.0-beta.8
+2
-0
dist/config.d.ts
import type { PluginDescriptor } from "./plugin.js";
import type { QualityGateConfig } from "./qualityGate.js";
export type DefaultLabelsConfig = Record<string, string | string[]>;
export interface Config {

@@ -10,3 +11,4 @@ name?: string;

plugins?: Record<string, PluginDescriptor>;
defaultLabels?: DefaultLabelsConfig;
}
export declare const defineConfig: (allureConfig: Config) => Config;

@@ -5,4 +5,5 @@ import { type Comparator, type DefaultTreeGroup, type DefaultTreeLeaf, type TestResult, type TreeData, type TreeGroup, type TreeLeaf } from "@allurereport/core-api";

export declare const createTreeByLabels: <T = TestResult, L = DefaultTreeLeaf, G = DefaultTreeGroup>(data: T[], labelNames: string[], leafFactory?: (item: T) => TreeLeaf<L>, groupFactory?: (parentGroup: string | undefined, groupClassifier: string) => TreeGroup<G>, addLeafToGroup?: (group: TreeGroup<G>, leaf: TreeLeaf<L>) => void) => TreeData<L, G>;
export declare const preciseTreeLabels: <T = TestResult>(labelNames: string[], trs: T[], labelNamesAccessor?: (tr: T) => string[]) => string[];
export declare const filterTree: <L, G>(tree: TreeData<L, G>, predicate: (leaf: TreeLeaf<L>) => boolean) => TreeData<L, G>;
export declare const sortTree: <L, G>(tree: TreeData<L, G>, comparator: Comparator<TreeLeaf<L>>) => TreeData<L, G>;
export declare const transformTree: <L, G>(tree: TreeData<L, G>, transformer: (leaf: TreeLeaf<L>, idx: number) => TreeLeaf<L>) => TreeData<L, G>;

@@ -90,2 +90,11 @@ import { findByLabelName, } from "@allurereport/core-api";

};
export const preciseTreeLabels = (labelNames, trs, labelNamesAccessor = (tr) => tr.labels.map(({ name }) => name)) => {
const result = new Set();
for (const labelName of labelNames) {
if (trs.some((tr) => labelNamesAccessor(tr).includes(labelName))) {
result.add(labelName);
}
}
return Array.from(result);
};
export const filterTree = (tree, predicate) => {

@@ -92,0 +101,0 @@ const visitedGroups = new Set();

+3
-3
{
"name": "@allurereport/plugin-api",
"version": "3.0.0-beta.7",
"version": "3.0.0-beta.8",
"description": "Allure Plugin API",

@@ -29,3 +29,3 @@ "keywords": [

"dependencies": {
"@allurereport/core-api": "3.0.0-beta.7"
"@allurereport/core-api": "3.0.0-beta.8"
},

@@ -40,3 +40,3 @@ "devDependencies": {

"@vitest/snapshot": "^2.1.8",
"allure-vitest": "^3.0.7",
"allure-vitest": "^3.0.9",
"eslint": "^8.57.0",

@@ -43,0 +43,0 @@ "eslint-config-prettier": "^9.1.0",