@allurereport/core 3.0.0-beta.3

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/README.md ADDED
@@ -0,0 +1,25 @@
1
+ # Core
2
+
3
+ [<img src="https://allurereport.org/public/img/allure-report.svg" height="85px" alt="Allure Report logo" align="right" />](https://allurereport.org "Allure Report")
4
+
5
+ - Learn more about Allure Report at https://allurereport.org
6
+ - 📚 [Documentation](https://allurereport.org/docs/) – discover official documentation for Allure Report
7
+ - ❓ [Questions and Support](https://github.com/orgs/allure-framework/discussions/categories/questions-support) – get help from the team and community
8
+ - 📢 [Official announcements](https://github.com/orgs/allure-framework/discussions/categories/announcements) – be in touch with the latest updates
9
+ - 💬 [General Discussion ](https://github.com/orgs/allure-framework/discussions/categories/general-discussion) – engage in casual conversations, share insights and ideas with the community
10
+
11
+ ---
12
+
13
+ ## Overview
14
+
15
+ The package includes a collection of utilities which are used across all Allure packages.
16
+
17
+ ## Install
18
+
19
+ Use your favorite package manager to install the package:
20
+
21
+ ```shell
22
+ npm add @allurereport/core
23
+ yarn add @allurereport/core
24
+ pnpm add @allurereport/core
25
+ ```
package/dist/api.d.ts ADDED
@@ -0,0 +1,22 @@
1
+ import type { HistoryDataPoint, KnownTestFailure } from "@allurereport/core-api";
2
+ import type { Plugin, QualityGateConfig, ReportFiles } from "@allurereport/plugin-api";
3
+ import type { ResultsReader } from "@allurereport/reader-api";
4
+ export interface FullConfig {
5
+ name: string;
6
+ output: string;
7
+ reportFiles: ReportFiles;
8
+ readers?: ResultsReader[];
9
+ plugins?: PluginInstance[];
10
+ history?: HistoryDataPoint[];
11
+ historyPath?: string;
12
+ appendHistory?: boolean;
13
+ known?: KnownTestFailure[];
14
+ qualityGate?: QualityGateConfig;
15
+ realTime?: any;
16
+ }
17
+ export interface PluginInstance {
18
+ id: string;
19
+ enabled: boolean;
20
+ plugin: Plugin;
21
+ options: Record<string, any>;
22
+ }
package/dist/api.js ADDED
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,22 @@
1
+ import type { Config } from "@allurereport/plugin-api";
2
+ import type { QualityGateConfig } from "@allurereport/plugin-api";
3
+ import type { FullConfig, PluginInstance } from "./api.js";
4
+ export { defineConfig } from "@allurereport/plugin-api";
5
+ export declare const createConfig: (opts: {
6
+ reportName?: string;
7
+ output?: string;
8
+ historyPath?: string;
9
+ knownIssuesPath?: string;
10
+ plugins?: PluginInstance[];
11
+ qualityGate?: QualityGateConfig;
12
+ cwd?: string;
13
+ }) => Promise<FullConfig>;
14
+ export declare const getPluginId: (key: string) => string;
15
+ export declare const findRuntimeConfigPath: (cwd?: string) => Promise<string | undefined>;
16
+ export declare const readRuntimeConfig: (configPath?: string, cwd?: string, output?: string, name?: string) => Promise<FullConfig>;
17
+ export declare const loadConfig: (configPath: string) => Promise<Config>;
18
+ export declare const resolveConfig: (config: Config, override?: {
19
+ name?: string;
20
+ output?: string;
21
+ }) => Promise<FullConfig>;
22
+ export declare const resolvePlugin: (path: string) => Promise<any>;
package/dist/config.js ADDED
@@ -0,0 +1,92 @@
1
+ import { readdir } from "node:fs/promises";
2
+ import { join, resolve } from "node:path";
3
+ import * as process from "node:process";
4
+ import { readHistory } from "./history.js";
5
+ import { readKnownIssues } from "./known.js";
6
+ import { FileSystemReportFiles } from "./plugin.js";
7
+ import { importWrapper } from "./utils/module.js";
8
+ export { defineConfig } from "@allurereport/plugin-api";
9
+ export const createConfig = async (opts) => {
10
+ const { reportName = "Allure Report", output = "allure-report", historyPath, knownIssuesPath, qualityGate, cwd, } = opts;
11
+ const workingDirectory = cwd ?? process.cwd();
12
+ const target = resolve(workingDirectory, output);
13
+ const history = historyPath ? await readHistory(resolve(workingDirectory, historyPath)) : [];
14
+ const known = knownIssuesPath ? await readKnownIssues(resolve(workingDirectory, knownIssuesPath)) : [];
15
+ return {
16
+ name: reportName,
17
+ history,
18
+ historyPath,
19
+ known,
20
+ qualityGate,
21
+ plugins: opts.plugins ?? [],
22
+ reportFiles: new FileSystemReportFiles(target),
23
+ output: target,
24
+ };
25
+ };
26
+ const defaultRuntimeConfig = {};
27
+ export const getPluginId = (key) => {
28
+ return key.replace(/^@.*\//, "").replace(/[/\\]/g, "-");
29
+ };
30
+ export const findRuntimeConfigPath = async (cwd = process.cwd()) => {
31
+ const files = await readdir(cwd);
32
+ if (files.includes("allurerc.js")) {
33
+ return join(cwd, "allurerc.js");
34
+ }
35
+ if (files.includes("allurerc.mjs")) {
36
+ return join(cwd, "allurerc.mjs");
37
+ }
38
+ return undefined;
39
+ };
40
+ export const readRuntimeConfig = async (configPath, cwd, output, name) => {
41
+ const runtimeConfigPath = !configPath ? await findRuntimeConfigPath(cwd) : resolve(cwd ?? process.cwd(), configPath);
42
+ const runtimeConfig = runtimeConfigPath ? await loadConfig(runtimeConfigPath) : defaultRuntimeConfig;
43
+ return await resolveConfig(runtimeConfig, { output, name });
44
+ };
45
+ export const loadConfig = async (configPath) => {
46
+ return (await import(configPath)).default;
47
+ };
48
+ export const resolveConfig = async (config, override = {}) => {
49
+ const { plugins = {}, name, output, historyPath, ...rest } = config;
50
+ const pluginInstances = await resolvePlugins(plugins);
51
+ const out = resolve(override.output ?? output ?? "./allure-report");
52
+ const history = historyPath ? await readHistory(historyPath) : [];
53
+ return {
54
+ ...rest,
55
+ name: override.name ?? name ?? "Allure Report",
56
+ reportFiles: new FileSystemReportFiles(out),
57
+ plugins: pluginInstances,
58
+ output: out,
59
+ history,
60
+ historyPath,
61
+ };
62
+ };
63
+ export const resolvePlugin = async (path) => {
64
+ if (!path.startsWith("@allurereport/plugin-")) {
65
+ try {
66
+ const module = await importWrapper(`@allurereport/plugin-${path}`);
67
+ return module.default;
68
+ }
69
+ catch (err) { }
70
+ }
71
+ try {
72
+ const module = await importWrapper(path);
73
+ return module.default;
74
+ }
75
+ catch (err) {
76
+ throw new Error(`Cannot resolve plugin: ${path}`);
77
+ }
78
+ };
79
+ const resolvePlugins = async (plugins) => {
80
+ const pluginInstances = [];
81
+ for (const id in plugins) {
82
+ const pluginConfig = plugins[id];
83
+ const Plugin = await resolvePlugin(pluginConfig.import ?? id);
84
+ pluginInstances.push({
85
+ id: getPluginId(id),
86
+ enabled: pluginConfig.enabled ?? true,
87
+ options: pluginConfig.options ?? {},
88
+ plugin: new Plugin(pluginConfig.options),
89
+ });
90
+ }
91
+ return pluginInstances;
92
+ };
@@ -0,0 +1,4 @@
1
+ import type { HistoryDataPoint, TestCase, TestResult } from "@allurereport/core-api";
2
+ export declare const createHistory: (reportUuid: string, reportName: string | undefined, testCases: TestCase[], testResults: TestResult[]) => HistoryDataPoint;
3
+ export declare const readHistory: (historyPath: string) => Promise<HistoryDataPoint[]>;
4
+ export declare const writeHistory: (historyPath: string, data: HistoryDataPoint) => Promise<void>;
@@ -0,0 +1,58 @@
1
+ import { mkdir, readFile, writeFile } from "node:fs/promises";
2
+ import { dirname, resolve } from "node:path";
3
+ import { isFileNotFoundError } from "./utils/misc.js";
4
+ const createHistoryItems = (testResults) => {
5
+ return testResults
6
+ .filter((tr) => tr.historyId)
7
+ .map(({ id, name, fullName, historyId, status, message, trace, start, stop, duration }) => {
8
+ return {
9
+ id,
10
+ name,
11
+ fullName,
12
+ status,
13
+ message,
14
+ trace,
15
+ start,
16
+ stop,
17
+ duration,
18
+ historyId: historyId,
19
+ reportLinks: [],
20
+ };
21
+ })
22
+ .reduce((previousValue, currentValue) => {
23
+ previousValue[currentValue.historyId] = currentValue;
24
+ return previousValue;
25
+ }, {});
26
+ };
27
+ export const createHistory = (reportUuid, reportName = "Allure Report", testCases, testResults) => {
28
+ const knownTestCaseIds = testCases.map((tc) => tc.id);
29
+ return {
30
+ uuid: reportUuid,
31
+ name: reportName,
32
+ timestamp: new Date().getTime(),
33
+ knownTestCaseIds,
34
+ testResults: createHistoryItems(testResults),
35
+ metrics: {},
36
+ };
37
+ };
38
+ export const readHistory = async (historyPath) => {
39
+ const path = resolve(historyPath);
40
+ try {
41
+ return (await readFile(path, { encoding: "utf-8" }))
42
+ .split("\n")
43
+ .filter((line) => line && line.trim() !== "")
44
+ .map((line) => JSON.parse(line));
45
+ }
46
+ catch (e) {
47
+ if (isFileNotFoundError(e)) {
48
+ return [];
49
+ }
50
+ throw e;
51
+ }
52
+ };
53
+ export const writeHistory = async (historyPath, data) => {
54
+ const path = resolve(historyPath);
55
+ const parentDir = dirname(path);
56
+ await mkdir(parentDir, { recursive: true });
57
+ await writeFile(path, JSON.stringify(data) + "\n", { encoding: "utf-8", flag: "a+" });
58
+ };
@@ -0,0 +1,9 @@
1
+ export * from "./api.js";
2
+ export * from "./utils/misc.js";
3
+ export * from "./utils/crypto.js";
4
+ export * from "./history.js";
5
+ export * from "./known.js";
6
+ export * from "./config.js";
7
+ export * from "./report.js";
8
+ export * from "./plugin.js";
9
+ export * from "./qualityGate.js";
package/dist/index.js ADDED
@@ -0,0 +1,9 @@
1
+ export * from "./api.js";
2
+ export * from "./utils/misc.js";
3
+ export * from "./utils/crypto.js";
4
+ export * from "./history.js";
5
+ export * from "./known.js";
6
+ export * from "./config.js";
7
+ export * from "./report.js";
8
+ export * from "./plugin.js";
9
+ export * from "./qualityGate.js";
@@ -0,0 +1,4 @@
1
+ import type { KnownTestFailure } from "@allurereport/core-api";
2
+ import type { AllureStore } from "@allurereport/plugin-api";
3
+ export declare const readKnownIssues: (knownIssuePath: string) => Promise<KnownTestFailure[]>;
4
+ export declare const writeKnownIssues: (store: AllureStore, knownIssuesPath?: string) => Promise<void>;
package/dist/known.js ADDED
@@ -0,0 +1,32 @@
1
+ import { readFile, writeFile } from "node:fs/promises";
2
+ import { resolve } from "node:path";
3
+ import { isFileNotFoundError } from "./utils/misc.js";
4
+ const failedStatuses = new Set(["failed", "broken"]);
5
+ export const readKnownIssues = async (knownIssuePath) => {
6
+ const path = resolve(knownIssuePath);
7
+ try {
8
+ const content = await readFile(path, { encoding: "utf-8" });
9
+ return JSON.parse(content);
10
+ }
11
+ catch (e) {
12
+ if (isFileNotFoundError(e)) {
13
+ return [];
14
+ }
15
+ throw e;
16
+ }
17
+ };
18
+ export const writeKnownIssues = async (store, knownIssuesPath) => {
19
+ if (!knownIssuesPath) {
20
+ return;
21
+ }
22
+ const testResults = await store.allTestResults();
23
+ const knownIssues = testResults
24
+ .filter((tr) => failedStatuses.has(tr.status))
25
+ .filter((tr) => tr.historyId)
26
+ .map(({ historyId, links }) => ({
27
+ historyId: historyId,
28
+ issues: links.filter((l) => l.type === "issue"),
29
+ comment: "automatically generated from failure by allure known-issue command",
30
+ }));
31
+ await writeFile(knownIssuesPath, JSON.stringify(knownIssues));
32
+ };
@@ -0,0 +1,22 @@
1
+ import { PluginState, ReportFiles } from "@allurereport/plugin-api";
2
+ export declare class DefaultPluginState implements PluginState {
3
+ #private;
4
+ constructor(state: Record<string, any>);
5
+ set: (key: string, value: any) => Promise<void>;
6
+ get: (key: string) => Promise<void>;
7
+ unset: (key: string) => Promise<void>;
8
+ }
9
+ export declare class PluginFiles implements ReportFiles {
10
+ #private;
11
+ constructor(parent: ReportFiles, pluginId: string);
12
+ addFile: (key: string, data: Buffer) => Promise<void>;
13
+ }
14
+ export declare class InMemoryReportFiles implements ReportFiles {
15
+ #private;
16
+ addFile: (path: string, data: Buffer) => Promise<void>;
17
+ }
18
+ export declare class FileSystemReportFiles implements ReportFiles {
19
+ #private;
20
+ constructor(output: string);
21
+ addFile: (path: string, data: Buffer) => Promise<void>;
22
+ }
package/dist/plugin.js ADDED
@@ -0,0 +1,64 @@
1
+ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
2
+ if (kind === "m") throw new TypeError("Private method is not writable");
3
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
4
+ 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");
5
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
6
+ };
7
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
8
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
9
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
10
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
11
+ };
12
+ var _DefaultPluginState_state, _PluginFiles_parent, _PluginFiles_pluginId, _InMemoryReportFiles_state, _FileSystemReportFiles_output;
13
+ import { mkdir, writeFile } from "node:fs/promises";
14
+ import { dirname, join, resolve } from "node:path";
15
+ export class DefaultPluginState {
16
+ constructor(state) {
17
+ _DefaultPluginState_state.set(this, void 0);
18
+ this.set = async (key, value) => {
19
+ __classPrivateFieldGet(this, _DefaultPluginState_state, "f")[key] = value;
20
+ };
21
+ this.get = async (key) => {
22
+ return __classPrivateFieldGet(this, _DefaultPluginState_state, "f")[key];
23
+ };
24
+ this.unset = async (key) => {
25
+ delete __classPrivateFieldGet(this, _DefaultPluginState_state, "f")[key];
26
+ };
27
+ __classPrivateFieldSet(this, _DefaultPluginState_state, state, "f");
28
+ }
29
+ }
30
+ _DefaultPluginState_state = new WeakMap();
31
+ export class PluginFiles {
32
+ constructor(parent, pluginId) {
33
+ _PluginFiles_parent.set(this, void 0);
34
+ _PluginFiles_pluginId.set(this, void 0);
35
+ this.addFile = async (key, data) => {
36
+ await __classPrivateFieldGet(this, _PluginFiles_parent, "f").addFile(join(__classPrivateFieldGet(this, _PluginFiles_pluginId, "f"), key), data);
37
+ };
38
+ __classPrivateFieldSet(this, _PluginFiles_parent, parent, "f");
39
+ __classPrivateFieldSet(this, _PluginFiles_pluginId, pluginId, "f");
40
+ }
41
+ }
42
+ _PluginFiles_parent = new WeakMap(), _PluginFiles_pluginId = new WeakMap();
43
+ export class InMemoryReportFiles {
44
+ constructor() {
45
+ _InMemoryReportFiles_state.set(this, {});
46
+ this.addFile = async (path, data) => {
47
+ __classPrivateFieldGet(this, _InMemoryReportFiles_state, "f")[path] = data;
48
+ };
49
+ }
50
+ }
51
+ _InMemoryReportFiles_state = new WeakMap();
52
+ export class FileSystemReportFiles {
53
+ constructor(output) {
54
+ _FileSystemReportFiles_output.set(this, void 0);
55
+ this.addFile = async (path, data) => {
56
+ const targetPath = resolve(__classPrivateFieldGet(this, _FileSystemReportFiles_output, "f"), path);
57
+ const targetDirPath = dirname(targetPath);
58
+ await mkdir(targetDirPath, { recursive: true });
59
+ await writeFile(targetPath, data, { encoding: "utf-8" });
60
+ };
61
+ __classPrivateFieldSet(this, _FileSystemReportFiles_output, resolve(output), "f");
62
+ }
63
+ }
64
+ _FileSystemReportFiles_output = new WeakMap();
@@ -0,0 +1,25 @@
1
+ import type { AllureStore, QualityGateConfig, QualityGateRulesMeta, QualityGateValidationResult, QualityGateValidator } from "@allurereport/plugin-api";
2
+ export declare abstract class AbstractQualityGateValidator implements QualityGateValidator {
3
+ readonly limit: number;
4
+ readonly meta?: QualityGateRulesMeta | undefined;
5
+ constructor(limit: number, meta?: QualityGateRulesMeta | undefined);
6
+ getTestResultsFilteredByMeta(store: AllureStore): Promise<import("@allurereport/core-api").TestResult[]>;
7
+ abstract validate(store: AllureStore): Promise<QualityGateValidationResult>;
8
+ }
9
+ export declare class MaxFailuresValidator extends AbstractQualityGateValidator {
10
+ validate(store: AllureStore): Promise<QualityGateValidationResult>;
11
+ }
12
+ export declare class MinTestsCountValidator extends AbstractQualityGateValidator {
13
+ validate(store: AllureStore): Promise<QualityGateValidationResult>;
14
+ }
15
+ export declare class SuccessRateValidator extends AbstractQualityGateValidator {
16
+ validate(store: AllureStore): Promise<QualityGateValidationResult>;
17
+ }
18
+ export declare class QualityGate {
19
+ #private;
20
+ readonly config?: QualityGateConfig | undefined;
21
+ result: QualityGateValidationResult[];
22
+ constructor(config?: QualityGateConfig | undefined);
23
+ get exitCode(): 0 | 1;
24
+ validate: (store: AllureStore) => Promise<void>;
25
+ }
@@ -0,0 +1,116 @@
1
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
2
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
3
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
4
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
+ };
6
+ var _QualityGate_instances, _QualityGate_mappedValidators_get, _QualityGate_createRulesValidator;
7
+ import { filterSuccessful, filterUnsuccessful } from "@allurereport/core-api";
8
+ export class AbstractQualityGateValidator {
9
+ constructor(limit, meta) {
10
+ this.limit = limit;
11
+ this.meta = meta;
12
+ }
13
+ async getTestResultsFilteredByMeta(store) {
14
+ const allTrs = await store.allTestResults();
15
+ if (!this.meta) {
16
+ return allTrs;
17
+ }
18
+ return allTrs.filter((tr) => {
19
+ switch (this.meta?.type) {
20
+ case "label":
21
+ return tr.labels.some((label) => label.name === this.meta.name && label.value === this.meta.value);
22
+ case "parameter":
23
+ return tr.parameters.some((parameter) => parameter.name === this.meta.name && parameter.value === this.meta.value);
24
+ default:
25
+ return tr;
26
+ }
27
+ });
28
+ }
29
+ }
30
+ export class MaxFailuresValidator extends AbstractQualityGateValidator {
31
+ async validate(store) {
32
+ const trs = (await this.getTestResultsFilteredByMeta(store)).filter((tr) => !tr.hidden).filter(filterUnsuccessful);
33
+ return {
34
+ success: trs.length <= this.limit,
35
+ rule: "maxFailures",
36
+ meta: this.meta,
37
+ expected: this.limit,
38
+ actual: trs.length,
39
+ };
40
+ }
41
+ }
42
+ export class MinTestsCountValidator extends AbstractQualityGateValidator {
43
+ async validate(store) {
44
+ const trs = (await this.getTestResultsFilteredByMeta(store)).filter((tr) => !tr.hidden);
45
+ return {
46
+ success: trs.length >= this.limit,
47
+ rule: "minTestsCount",
48
+ meta: this.meta,
49
+ expected: this.limit,
50
+ actual: trs.length,
51
+ };
52
+ }
53
+ }
54
+ export class SuccessRateValidator extends AbstractQualityGateValidator {
55
+ async validate(store) {
56
+ const knownIssues = await store.allKnownIssues();
57
+ const trs = (await this.getTestResultsFilteredByMeta(store)).filter((tr) => !tr.hidden);
58
+ const knownIssuesHistoryIds = knownIssues.map((ki) => ki.historyId);
59
+ const unknown = trs.filter((tr) => !tr.historyId || !knownIssuesHistoryIds.includes(tr.historyId));
60
+ const passed = unknown.filter(filterSuccessful);
61
+ const rate = passed.length === 0 ? 0 : passed.length / unknown.length;
62
+ return {
63
+ success: rate >= this.limit,
64
+ rule: "successRate",
65
+ meta: this.meta,
66
+ expected: this.limit,
67
+ actual: rate,
68
+ };
69
+ }
70
+ }
71
+ export class QualityGate {
72
+ constructor(config) {
73
+ _QualityGate_instances.add(this);
74
+ this.config = config;
75
+ this.result = [];
76
+ _QualityGate_createRulesValidator.set(this, (rules, meta) => {
77
+ const validators = [];
78
+ Object.keys(rules).forEach((rule) => {
79
+ const Validator = __classPrivateFieldGet(this, _QualityGate_instances, "a", _QualityGate_mappedValidators_get)[rule];
80
+ if (!Validator) {
81
+ return;
82
+ }
83
+ const validator = new Validator(rules[rule], meta);
84
+ validators.push(validator);
85
+ });
86
+ return validators;
87
+ });
88
+ this.validate = async (store) => {
89
+ const { rules, enforce = [] } = this.config ?? {};
90
+ const validators = [];
91
+ const result = [];
92
+ if (rules) {
93
+ validators.push(...__classPrivateFieldGet(this, _QualityGate_createRulesValidator, "f").call(this, rules));
94
+ }
95
+ enforce.forEach((enforceConfig) => {
96
+ const { rules: enforceRules, ...meta } = enforceConfig;
97
+ validators.push(...__classPrivateFieldGet(this, _QualityGate_createRulesValidator, "f").call(this, enforceRules, meta));
98
+ });
99
+ for (const validator of validators) {
100
+ result.push(await validator.validate(store));
101
+ }
102
+ this.result = result;
103
+ };
104
+ }
105
+ get exitCode() {
106
+ return this.result.some((res) => !res.success) ? 1 : 0;
107
+ }
108
+ }
109
+ _QualityGate_createRulesValidator = new WeakMap(), _QualityGate_instances = new WeakSet(), _QualityGate_mappedValidators_get = function _QualityGate_mappedValidators_get() {
110
+ return {
111
+ maxFailures: MaxFailuresValidator,
112
+ minTestsCount: MinTestsCountValidator,
113
+ successRate: SuccessRateValidator,
114
+ ...this.config?.validators,
115
+ };
116
+ };
@@ -0,0 +1,16 @@
1
+ import type { ResultFile } from "@allurereport/plugin-api";
2
+ import type { FullConfig } from "./api.js";
3
+ import { DefaultAllureStore } from "./store/store.js";
4
+ export declare class AllureReport {
5
+ #private;
6
+ constructor(opts: FullConfig);
7
+ get store(): DefaultAllureStore;
8
+ get exitCode(): 0 | 1;
9
+ get validationResults(): import("@allurereport/plugin-api").QualityGateValidationResult[];
10
+ readDirectory: (resultsDir: string) => Promise<void>;
11
+ readFile: (resultsFile: string) => Promise<void>;
12
+ readResult: (data: ResultFile) => Promise<void>;
13
+ start: () => Promise<void>;
14
+ done: () => Promise<void>;
15
+ validate: () => Promise<void>;
16
+ }