@allurereport/plugin-api 3.4.1 → 3.6.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/config.d.ts +2 -0
- package/dist/plugin.d.ts +14 -5
- package/dist/store.d.ts +4 -2
- package/package.json +2 -2
package/dist/config.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export interface Config {
|
|
|
13
13
|
defaultLabels?: DefaultLabelsConfig;
|
|
14
14
|
dump?: string;
|
|
15
15
|
environment?: string;
|
|
16
|
+
allowedEnvironments?: string[];
|
|
16
17
|
environments?: EnvironmentsConfig;
|
|
17
18
|
variables?: ReportVariables;
|
|
18
19
|
plugins?: Record<string, PluginDescriptor>;
|
|
@@ -22,5 +23,6 @@ export interface Config {
|
|
|
22
23
|
accessToken?: string;
|
|
23
24
|
};
|
|
24
25
|
categories?: CategoriesConfig;
|
|
26
|
+
globalAttachments?: string[];
|
|
25
27
|
}
|
|
26
28
|
export declare const defineConfig: (allureConfig: Config) => Config;
|
package/dist/plugin.d.ts
CHANGED
|
@@ -52,10 +52,18 @@ export interface ExitCode {
|
|
|
52
52
|
actual?: number;
|
|
53
53
|
original: number;
|
|
54
54
|
}
|
|
55
|
+
export type PluginGlobalError = TestError & {
|
|
56
|
+
environment?: string;
|
|
57
|
+
};
|
|
58
|
+
export type PluginGlobalAttachment = AttachmentLink & {
|
|
59
|
+
environment?: string;
|
|
60
|
+
};
|
|
55
61
|
export interface PluginGlobals {
|
|
56
62
|
exitCode?: ExitCode;
|
|
57
|
-
errors:
|
|
58
|
-
attachments:
|
|
63
|
+
errors: PluginGlobalError[];
|
|
64
|
+
attachments: PluginGlobalAttachment[];
|
|
65
|
+
errorsByEnv?: Record<string, PluginGlobalError[]>;
|
|
66
|
+
attachmentsByEnv?: Record<string, PluginGlobalAttachment[]>;
|
|
59
67
|
}
|
|
60
68
|
export interface BatchOptions {
|
|
61
69
|
maxTimeout?: number;
|
|
@@ -64,18 +72,19 @@ export interface RealtimeSubscriber {
|
|
|
64
72
|
onGlobalAttachment(listener: (payload: {
|
|
65
73
|
attachment: ResultFile;
|
|
66
74
|
fileName?: string;
|
|
75
|
+
environment?: string;
|
|
67
76
|
}) => Promise<void>): () => void;
|
|
68
77
|
onGlobalExitCode(listener: (payload: ExitCode) => Promise<void>): () => void;
|
|
69
|
-
onGlobalError(listener: (error:
|
|
78
|
+
onGlobalError(listener: (error: PluginGlobalError) => Promise<void>): () => void;
|
|
70
79
|
onQualityGateResults(listener: (payload: QualityGateValidationResult[]) => Promise<void>): () => void;
|
|
71
80
|
onTestResults(listener: (trIds: string[]) => Promise<void>, options?: BatchOptions): () => void;
|
|
72
81
|
onTestFixtureResults(listener: (tfrIds: string[]) => Promise<void>, options?: BatchOptions): () => void;
|
|
73
82
|
onAttachmentFiles(listener: (afIds: string[]) => Promise<void>, options?: BatchOptions): () => void;
|
|
74
83
|
}
|
|
75
84
|
export interface RealtimeEventsDispatcher {
|
|
76
|
-
sendGlobalAttachment(attachment: ResultFile, fileName?: string): void;
|
|
85
|
+
sendGlobalAttachment(attachment: ResultFile, fileName?: string, environment?: string): void;
|
|
77
86
|
sendGlobalExitCode(payload: ExitCode): void;
|
|
78
|
-
sendGlobalError(error:
|
|
87
|
+
sendGlobalError(error: PluginGlobalError): void;
|
|
79
88
|
sendQualityGateResults(payload: QualityGateValidationResult[]): void;
|
|
80
89
|
sendTestResult(trId: string): void;
|
|
81
90
|
sendTestFixtureResult(tfrId: string): void;
|
package/dist/store.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AttachmentLink, EnvironmentIdentity, HistoryDataPoint, HistoryTestResult, KnownTestFailure, ReportVariables, Statistic, TestCase, TestEnvGroup, TestError, TestFixtureResult, TestResult } from "@allurereport/core-api";
|
|
2
|
-
import type { ExitCode } from "./plugin.js";
|
|
2
|
+
import type { ExitCode, PluginGlobalAttachment, PluginGlobalError } from "./plugin.js";
|
|
3
3
|
import type { QualityGateValidationResult } from "./qualityGate.js";
|
|
4
4
|
import type { ResultFile } from "./resultFile.js";
|
|
5
5
|
export type TestResultFilter = (testResult: TestResult) => boolean;
|
|
@@ -22,7 +22,9 @@ export interface AllureStore {
|
|
|
22
22
|
qualityGateResultsByEnvironmentId: () => Promise<Record<string, QualityGateValidationResult[]>>;
|
|
23
23
|
globalExitCode: () => Promise<ExitCode | undefined>;
|
|
24
24
|
allGlobalErrors: () => Promise<TestError[]>;
|
|
25
|
+
allGlobalErrorsByEnv: () => Promise<Record<string, PluginGlobalError[]>>;
|
|
25
26
|
allGlobalAttachments: () => Promise<AttachmentLink[]>;
|
|
27
|
+
allGlobalAttachmentsByEnv: () => Promise<Record<string, PluginGlobalAttachment[]>>;
|
|
26
28
|
testCaseById: (tcId: string) => Promise<TestCase | undefined>;
|
|
27
29
|
testResultById: (trId: string) => Promise<TestResult | undefined>;
|
|
28
30
|
attachmentById: (attachmentId: string) => Promise<AttachmentLink | undefined>;
|
|
@@ -59,7 +61,7 @@ export interface AllureStoreDump {
|
|
|
59
61
|
testResults: Record<string, TestResult>;
|
|
60
62
|
attachments: Record<string, AttachmentLink>;
|
|
61
63
|
globalAttachmentIds: string[];
|
|
62
|
-
globalErrors:
|
|
64
|
+
globalErrors: PluginGlobalError[];
|
|
63
65
|
testCases: Record<string, TestCase>;
|
|
64
66
|
fixtures: Record<string, TestFixtureResult>;
|
|
65
67
|
environments: Array<string | EnvironmentIdentity>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allurereport/plugin-api",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.6.0",
|
|
4
4
|
"description": "Allure Plugin API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"allure"
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"lint:fix": "oxlint --import-plugin --fix src test features stories"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@allurereport/core-api": "3.
|
|
29
|
+
"@allurereport/core-api": "3.6.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/node": "^20.17.9",
|