allure-js-commons 3.4.5 → 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/cjs/facade.js +19 -1
- package/dist/cjs/facade.js.map +1 -1
- package/dist/cjs/index.js +18 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/model.js.map +1 -1
- package/dist/cjs/sdk/index.js +12 -0
- package/dist/cjs/sdk/index.js.map +1 -1
- package/dist/cjs/sdk/reporter/ReporterRuntime.js +91 -15
- package/dist/cjs/sdk/reporter/ReporterRuntime.js.map +1 -1
- package/dist/cjs/sdk/reporter/types.js.map +1 -1
- package/dist/cjs/sdk/reporter/utils/envInfo.js +2 -1
- package/dist/cjs/sdk/reporter/utils/envInfo.js.map +1 -1
- package/dist/cjs/sdk/reporter/writer/FileSystemWriter.js +4 -0
- package/dist/cjs/sdk/reporter/writer/FileSystemWriter.js.map +1 -1
- package/dist/cjs/sdk/reporter/writer/InMemoryWriter.js +6 -0
- package/dist/cjs/sdk/reporter/writer/InMemoryWriter.js.map +1 -1
- package/dist/cjs/sdk/reporter/writer/MessageReader.js +15 -1
- package/dist/cjs/sdk/reporter/writer/MessageReader.js.map +1 -1
- package/dist/cjs/sdk/reporter/writer/MessageWriter.js +3 -0
- package/dist/cjs/sdk/reporter/writer/MessageWriter.js.map +1 -1
- package/dist/cjs/sdk/runtime/MessageTestRuntime.js +79 -23
- package/dist/cjs/sdk/runtime/MessageTestRuntime.js.map +1 -1
- package/dist/cjs/sdk/runtime/NoopTestRuntime.js +31 -13
- package/dist/cjs/sdk/runtime/NoopTestRuntime.js.map +1 -1
- package/dist/cjs/sdk/runtime/index.js +6 -0
- package/dist/cjs/sdk/runtime/index.js.map +1 -1
- package/dist/cjs/sdk/runtime/runtime.js +2 -1
- package/dist/cjs/sdk/runtime/runtime.js.map +1 -1
- package/dist/cjs/sdk/runtime/types.js.map +1 -1
- package/dist/cjs/sdk/types.js.map +1 -1
- package/dist/cjs/sdk/utils.js +17 -1
- package/dist/cjs/sdk/utils.js.map +1 -1
- package/dist/esm/facade.js +15 -0
- package/dist/esm/facade.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/model.js.map +1 -1
- package/dist/esm/sdk/index.js +1 -1
- package/dist/esm/sdk/index.js.map +1 -1
- package/dist/esm/sdk/reporter/ReporterRuntime.js +91 -15
- package/dist/esm/sdk/reporter/ReporterRuntime.js.map +1 -1
- package/dist/esm/sdk/reporter/types.js.map +1 -1
- package/dist/esm/sdk/reporter/utils/envInfo.js +2 -1
- package/dist/esm/sdk/reporter/utils/envInfo.js.map +1 -1
- package/dist/esm/sdk/reporter/writer/FileSystemWriter.js +4 -0
- package/dist/esm/sdk/reporter/writer/FileSystemWriter.js.map +1 -1
- package/dist/esm/sdk/reporter/writer/InMemoryWriter.js +6 -0
- package/dist/esm/sdk/reporter/writer/InMemoryWriter.js.map +1 -1
- package/dist/esm/sdk/reporter/writer/MessageReader.js +15 -1
- package/dist/esm/sdk/reporter/writer/MessageReader.js.map +1 -1
- package/dist/esm/sdk/reporter/writer/MessageWriter.js +3 -0
- package/dist/esm/sdk/reporter/writer/MessageWriter.js.map +1 -1
- package/dist/esm/sdk/runtime/MessageTestRuntime.js +77 -21
- package/dist/esm/sdk/runtime/MessageTestRuntime.js.map +1 -1
- package/dist/esm/sdk/runtime/NoopTestRuntime.js +31 -13
- package/dist/esm/sdk/runtime/NoopTestRuntime.js.map +1 -1
- package/dist/esm/sdk/runtime/index.js +1 -1
- package/dist/esm/sdk/runtime/index.js.map +1 -1
- package/dist/esm/sdk/runtime/runtime.js +1 -1
- package/dist/esm/sdk/runtime/runtime.js.map +1 -1
- package/dist/esm/sdk/runtime/types.js.map +1 -1
- package/dist/esm/sdk/types.js.map +1 -1
- package/dist/esm/sdk/utils.js +14 -4
- package/dist/esm/sdk/utils.js.map +1 -1
- package/dist/types/facade.d.ts +5 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/types/model.d.ts +10 -0
- package/dist/types/sdk/index.d.ts +2 -2
- package/dist/types/sdk/reporter/ReporterRuntime.d.ts +1 -0
- package/dist/types/sdk/reporter/types.d.ts +2 -1
- package/dist/types/sdk/reporter/writer/FileSystemWriter.d.ts +2 -1
- package/dist/types/sdk/reporter/writer/InMemoryWriter.d.ts +3 -1
- package/dist/types/sdk/reporter/writer/MessageWriter.d.ts +2 -1
- package/dist/types/sdk/runtime/MessageTestRuntime.d.ts +10 -3
- package/dist/types/sdk/runtime/NoopTestRuntime.d.ts +3 -0
- package/dist/types/sdk/runtime/index.d.ts +1 -1
- package/dist/types/sdk/runtime/types.d.ts +5 -2
- package/dist/types/sdk/types.d.ts +23 -2
- package/dist/types/sdk/utils.d.ts +7 -1
- package/package.json +3 -3
package/dist/types/facade.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import type { Status } from "./model.js";
|
|
2
|
+
import type { Status, StatusDetails } from "./model.js";
|
|
3
3
|
import { type ContentType } from "./model.js";
|
|
4
4
|
import { type AttachmentOptions, type Label, type Link, type ParameterMode, type ParameterOptions } from "./model.js";
|
|
5
5
|
import { LabelName, LinkType } from "./model.js";
|
|
@@ -13,7 +13,10 @@ export declare const descriptionHtml: (html: string) => PromiseLike<void>;
|
|
|
13
13
|
export declare const displayName: (name: string) => PromiseLike<void>;
|
|
14
14
|
export declare const historyId: (value: string) => PromiseLike<void>;
|
|
15
15
|
export declare const testCaseId: (value: string) => PromiseLike<void>;
|
|
16
|
-
export declare const attachment: (name: string, content: Buffer | string, options: ContentType | string | AttachmentOptions) => PromiseLike<void>;
|
|
16
|
+
export declare const attachment: (name: string, content: Buffer | Uint8Array | string, options: ContentType | string | AttachmentOptions) => PromiseLike<void>;
|
|
17
|
+
export declare const globalAttachment: (name: string, content: Buffer | Uint8Array | string, options: ContentType | string | AttachmentOptions) => PromiseLike<void>;
|
|
18
|
+
export declare const globalAttachmentPath: (name: string, path: string, options: ContentType | string | Omit<AttachmentOptions, "encoding">) => PromiseLike<void>;
|
|
19
|
+
export declare const globalError: (details: StatusDetails) => PromiseLike<void>;
|
|
17
20
|
export declare const attachTrace: (name: string, path: string) => PromiseLike<void>;
|
|
18
21
|
export declare const attachmentPath: (name: string, path: string, options: ContentType | string | Omit<AttachmentOptions, "encoding">) => PromiseLike<void>;
|
|
19
22
|
export type StepContext = {
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { allureId, attachment, attachmentPath, attachTrace, description, descriptionHtml, displayName, epic, feature, historyId, issue, label, labels, layer, link, links, logStep, owner, parameter, parentSuite, severity, step, story, subSuite, suite, tag, tags, testCaseId, tms, } from "./facade.js";
|
|
1
|
+
export { allureId, attachment, attachmentPath, attachTrace, description, descriptionHtml, displayName, epic, feature, globalAttachment, globalAttachmentPath, globalError, historyId, issue, label, labels, layer, link, links, logStep, owner, parameter, parentSuite, severity, step, story, subSuite, suite, tag, tags, testCaseId, tms, } from "./facade.js";
|
|
2
2
|
export type { StepContext } from "./facade.js";
|
|
3
|
-
export type { Attachment, AttachmentOptions, FixtureResult, ImageDiffAttachment, Label, Link, Parameter, ParameterMode, ParameterOptions, StatusDetails, StepResult, TestOrStepResult, TestResult, TestResultContainer, } from "./model.js";
|
|
3
|
+
export type { Attachment, AttachmentOptions, FixtureResult, ImageDiffAttachment, Label, Link, Globals, Parameter, ParameterMode, ParameterOptions, StatusDetails, StepResult, TestOrStepResult, TestResult, TestResultContainer, } from "./model.js";
|
|
4
4
|
export { ContentType, LinkType, LabelName, Severity, Stage, Status, StatusByPriority } from "./model.js";
|
package/dist/types/model.d.ts
CHANGED
|
@@ -35,6 +35,16 @@ export interface StatusDetails {
|
|
|
35
35
|
actual?: string;
|
|
36
36
|
expected?: string;
|
|
37
37
|
}
|
|
38
|
+
export interface GlobalAttachment extends Attachment {
|
|
39
|
+
timestamp: number;
|
|
40
|
+
}
|
|
41
|
+
export interface GlobalError extends StatusDetails {
|
|
42
|
+
timestamp: number;
|
|
43
|
+
}
|
|
44
|
+
export interface Globals {
|
|
45
|
+
attachments: GlobalAttachment[];
|
|
46
|
+
errors: GlobalError[];
|
|
47
|
+
}
|
|
38
48
|
interface Executable {
|
|
39
49
|
name?: string;
|
|
40
50
|
status?: Status;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type { AllureResults, Category, EnvironmentInfo, ExecutorInfo, RuntimeMessage, RuntimeMetadataMessage, RuntimeAttachmentContentMessage, RuntimeAttachmentPathMessage, RuntimeStartStepMessage, RuntimeStepMetadataMessage, RuntimeStopStepMessage, TestPlanV1Test, TestPlanV1, } from "./types.js";
|
|
2
|
-
export { getStatusFromError, getMessageAndTraceFromError, isMetadataTag, getMetadataLabel, extractMetadataFromString, isAllStepsEnded, isAnyStepFailed, getUnfinishedStepsMessages, hasStepMessage, isPromise, hasLabel, stripAnsi, serialize, } from "./utils.js";
|
|
1
|
+
export type { AllureResults, Category, EnvironmentInfo, ExecutorInfo, RuntimeMessage, RuntimeMetadataMessage, RuntimeAttachmentContentMessage, RuntimeAttachmentPathMessage, RuntimeGlobalAttachmentContentMessage, RuntimeGlobalAttachmentPathMessage, RuntimeGlobalErrorMessage, RuntimeStartStepMessage, RuntimeStepMetadataMessage, RuntimeStopStepMessage, TestPlanV1Test, TestPlanV1, } from "./types.js";
|
|
2
|
+
export { getStatusFromError, getMessageAndTraceFromError, isMetadataTag, getMetadataLabel, extractMetadataFromString, isAllStepsEnded, isAnyStepFailed, getUnfinishedStepsMessages, hasStepMessage, isGlobalRuntimeMessage, isPromise, hasLabel, stripAnsi, serialize, uint8ArrayToBase64, } from "./utils.js";
|
|
@@ -86,4 +86,5 @@ export declare class ReporterRuntime {
|
|
|
86
86
|
writeEnvironmentInfo: () => void;
|
|
87
87
|
writeCategoriesDefinitions: () => void;
|
|
88
88
|
applyRuntimeMessages: (rootUuid: string, messages: RuntimeMessage[]) => void;
|
|
89
|
+
applyGlobalRuntimeMessages: (messages: RuntimeMessage[]) => void;
|
|
89
90
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import type { FixtureResult, Label, LabelName, Link, LinkType, Parameter, StepResult, TestResult, TestResultContainer } from "../../model.js";
|
|
2
|
+
import type { FixtureResult, Globals, Label, LabelName, Link, LinkType, Parameter, StepResult, TestResult, TestResultContainer } from "../../model.js";
|
|
3
3
|
import type { Category, EnvironmentInfo } from "../types.js";
|
|
4
4
|
export declare const ALLURE_METADATA_CONTENT_TYPE = "application/vnd.allure.metadata+json";
|
|
5
5
|
export declare const ALLURE_RUNTIME_MESSAGE_CONTENT_TYPE = "application/vnd.allure.message+json";
|
|
@@ -41,6 +41,7 @@ export interface Writer {
|
|
|
41
41
|
writeAttachmentFromPath(distFileName: string, from: string): void;
|
|
42
42
|
writeEnvironmentInfo(info: EnvironmentInfo): void;
|
|
43
43
|
writeCategoriesDefinitions(categories: Category[]): void;
|
|
44
|
+
writeGlobals(distFileName: string, info: Globals): void;
|
|
44
45
|
}
|
|
45
46
|
export type TestScope = {
|
|
46
47
|
uuid: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import type { TestResult, TestResultContainer } from "../../../model.js";
|
|
2
|
+
import type { Globals, TestResult, TestResultContainer } from "../../../model.js";
|
|
3
3
|
import type { Category, EnvironmentInfo } from "../../types.js";
|
|
4
4
|
import type { Writer } from "../types.js";
|
|
5
5
|
export declare class FileSystemWriter implements Writer {
|
|
@@ -13,5 +13,6 @@ export declare class FileSystemWriter implements Writer {
|
|
|
13
13
|
writeCategoriesDefinitions(categories: Category[]): void;
|
|
14
14
|
writeGroup(result: TestResultContainer): void;
|
|
15
15
|
writeResult(result: TestResult): void;
|
|
16
|
+
writeGlobals(distFileName: string, info: Globals): void;
|
|
16
17
|
private buildPath;
|
|
17
18
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import type { TestResult, TestResultContainer } from "../../../model.js";
|
|
2
|
+
import type { Globals, TestResult, TestResultContainer } from "../../../model.js";
|
|
3
3
|
import type { AllureResults, Category, EnvironmentInfo } from "../../types.js";
|
|
4
4
|
import type { Writer } from "../types.js";
|
|
5
5
|
export declare class InMemoryWriter implements Writer, AllureResults {
|
|
@@ -8,10 +8,12 @@ export declare class InMemoryWriter implements Writer, AllureResults {
|
|
|
8
8
|
attachments: Record<string, Buffer>;
|
|
9
9
|
categories?: Category[];
|
|
10
10
|
envInfo?: Record<string, string | undefined>;
|
|
11
|
+
globals?: Record<string, Globals>;
|
|
11
12
|
writeGroup(result: TestResultContainer): void;
|
|
12
13
|
writeResult(result: TestResult): void;
|
|
13
14
|
writeAttachment(distFileName: string, content: Buffer): void;
|
|
14
15
|
writeAttachmentFromPath(distFileName: string, from: string): void;
|
|
15
16
|
writeCategoriesDefinitions(categories: Category[]): void;
|
|
16
17
|
writeEnvironmentInfo(envInfo: EnvironmentInfo): void;
|
|
18
|
+
writeGlobals(distFileName: string, info: Globals): void;
|
|
17
19
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
/// <reference types="node" />
|
|
3
3
|
import type { EventEmitter } from "node:events";
|
|
4
|
-
import type { TestResult, TestResultContainer } from "../../../model.js";
|
|
4
|
+
import type { Globals, TestResult, TestResultContainer } from "../../../model.js";
|
|
5
5
|
import type { Category, EnvironmentInfo } from "../../types.js";
|
|
6
6
|
import type { Writer } from "../types.js";
|
|
7
7
|
export declare class MessageWriter implements Writer {
|
|
@@ -15,4 +15,5 @@ export declare class MessageWriter implements Writer {
|
|
|
15
15
|
writeCategoriesDefinitions(categories: Category[]): void;
|
|
16
16
|
writeGroup(result: TestResultContainer): void;
|
|
17
17
|
writeResult(result: TestResult): void;
|
|
18
|
+
writeGlobals(distFileName: string, info: Globals): void;
|
|
18
19
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import { type AttachmentOptions, type Label, type LabelName, type Link, type LinkType, type ParameterMode, type ParameterOptions, Status } from "../../model.js";
|
|
2
|
+
import { type AttachmentOptions, type Label, type LabelName, type Link, type LinkType, type ParameterMode, type ParameterOptions, Status, type StatusDetails } from "../../model.js";
|
|
3
3
|
import type { RuntimeMessage } from "../types.js";
|
|
4
4
|
import type { TestRuntime } from "./types.js";
|
|
5
|
-
export declare abstract class
|
|
5
|
+
export declare abstract class BaseMessageTestRuntime implements TestRuntime {
|
|
6
6
|
label(name: LabelName | string, value: string): Promise<void>;
|
|
7
7
|
labels(...labels: Label[]): Promise<void>;
|
|
8
8
|
link(url: string, type?: LinkType | string, name?: string): Promise<void>;
|
|
@@ -13,11 +13,18 @@ export declare abstract class MessageTestRuntime implements TestRuntime {
|
|
|
13
13
|
displayName(name: string): Promise<void>;
|
|
14
14
|
historyId(value: string): Promise<void>;
|
|
15
15
|
testCaseId(value: string): Promise<void>;
|
|
16
|
-
attachment(name: string, content: Buffer | string, options: AttachmentOptions): Promise<void>;
|
|
16
|
+
attachment(name: string, content: Buffer | Uint8Array | string, options: AttachmentOptions): Promise<void>;
|
|
17
17
|
attachmentFromPath(name: string, path: string, options: AttachmentOptions): Promise<void>;
|
|
18
|
+
globalAttachment(name: string, content: Buffer | Uint8Array | string, options: AttachmentOptions): Promise<void>;
|
|
19
|
+
globalAttachmentFromPath(name: string, path: string, options: Omit<AttachmentOptions, "encoding">): Promise<void>;
|
|
20
|
+
globalError(details: StatusDetails): Promise<void>;
|
|
18
21
|
logStep(name: string, status?: Status, error?: Error): Promise<void>;
|
|
19
22
|
step<T = void>(name: string, body: () => T | PromiseLike<T>): Promise<T>;
|
|
20
23
|
stepDisplayName(name: string): Promise<void>;
|
|
21
24
|
stepParameter(name: string, value: string, mode?: ParameterMode): Promise<void>;
|
|
22
25
|
abstract sendMessage(message: RuntimeMessage): Promise<void>;
|
|
23
26
|
}
|
|
27
|
+
export declare abstract class MessageTestRuntime extends BaseMessageTestRuntime {
|
|
28
|
+
attachment(name: string, content: Buffer | Uint8Array | string, options: AttachmentOptions): Promise<void>;
|
|
29
|
+
globalAttachment(name: string, content: Buffer | Uint8Array | string, options: AttachmentOptions): Promise<void>;
|
|
30
|
+
}
|
|
@@ -2,6 +2,9 @@ import type { TestRuntime } from "./types.js";
|
|
|
2
2
|
export declare class NoopTestRuntime implements TestRuntime {
|
|
3
3
|
attachment(): Promise<void>;
|
|
4
4
|
attachmentFromPath(): Promise<void>;
|
|
5
|
+
globalAttachment(): Promise<void>;
|
|
6
|
+
globalAttachmentFromPath(): Promise<void>;
|
|
7
|
+
globalError(): Promise<void>;
|
|
5
8
|
description(): Promise<void>;
|
|
6
9
|
descriptionHtml(): Promise<void>;
|
|
7
10
|
displayName(): Promise<void>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { setGlobalTestRuntime, getGlobalTestRuntime, getGlobalTestRuntimeWithAutoconfig } from "./runtime.js";
|
|
2
2
|
export type { TestRuntime } from "./types.js";
|
|
3
|
-
export { MessageTestRuntime } from "./MessageTestRuntime.js";
|
|
3
|
+
export { BaseMessageTestRuntime, MessageTestRuntime } from "./MessageTestRuntime.js";
|
|
4
4
|
export { MessageHolderTestRuntime } from "./MessageHolderTestRuntime.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import type { AttachmentOptions, Label, Link, ParameterMode, ParameterOptions, Status } from "../../model.js";
|
|
2
|
+
import type { AttachmentOptions, Label, Link, ParameterMode, ParameterOptions, Status, StatusDetails } from "../../model.js";
|
|
3
3
|
export interface TestRuntime {
|
|
4
4
|
labels: (...labels: Label[]) => PromiseLike<void>;
|
|
5
5
|
links: (...links: Link[]) => PromiseLike<void>;
|
|
@@ -9,7 +9,10 @@ export interface TestRuntime {
|
|
|
9
9
|
displayName: (name: string) => PromiseLike<void>;
|
|
10
10
|
historyId: (value: string) => PromiseLike<void>;
|
|
11
11
|
testCaseId: (value: string) => PromiseLike<void>;
|
|
12
|
-
attachment: (name: string, content: Buffer | string, options: AttachmentOptions) => PromiseLike<void>;
|
|
12
|
+
attachment: (name: string, content: Buffer | Uint8Array | string, options: AttachmentOptions) => PromiseLike<void>;
|
|
13
|
+
globalAttachment: (name: string, content: Buffer | Uint8Array | string, options: AttachmentOptions) => PromiseLike<void>;
|
|
14
|
+
globalAttachmentFromPath: (name: string, path: string, options: Omit<AttachmentOptions, "encoding">) => PromiseLike<void>;
|
|
15
|
+
globalError: (details: StatusDetails) => PromiseLike<void>;
|
|
13
16
|
attachmentFromPath: (name: string, path: string, options: Omit<AttachmentOptions, "encoding">) => PromiseLike<void>;
|
|
14
17
|
logStep: (name: string, status?: Status, error?: Error) => PromiseLike<void>;
|
|
15
18
|
step: <T = void>(name: string, body: () => T | PromiseLike<T>) => PromiseLike<T>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import type { Label, Link, Parameter, Status, StatusDetails, TestResult, TestResultContainer } from "../model.js";
|
|
2
|
+
import type { Globals, Label, Link, Parameter, Status, StatusDetails, TestResult, TestResultContainer } from "../model.js";
|
|
3
3
|
type RuntimeMessageBase<T extends string> = {
|
|
4
4
|
type: T;
|
|
5
5
|
};
|
|
@@ -55,7 +55,27 @@ export type RuntimeAttachmentPathMessage = RuntimeMessageBase<"attachment_path">
|
|
|
55
55
|
timestamp?: number;
|
|
56
56
|
};
|
|
57
57
|
};
|
|
58
|
-
export type
|
|
58
|
+
export type RuntimeGlobalAttachmentContentMessage = RuntimeMessageBase<"global_attachment_content"> & {
|
|
59
|
+
data: {
|
|
60
|
+
name: string;
|
|
61
|
+
content: string;
|
|
62
|
+
encoding: BufferEncoding;
|
|
63
|
+
contentType: string;
|
|
64
|
+
fileExtension?: string;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
export type RuntimeGlobalAttachmentPathMessage = RuntimeMessageBase<"global_attachment_path"> & {
|
|
68
|
+
data: {
|
|
69
|
+
name: string;
|
|
70
|
+
path: string;
|
|
71
|
+
contentType: string;
|
|
72
|
+
fileExtension?: string;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
export type RuntimeGlobalErrorMessage = RuntimeMessageBase<"global_error"> & {
|
|
76
|
+
data: StatusDetails;
|
|
77
|
+
};
|
|
78
|
+
export type RuntimeMessage = RuntimeMetadataMessage | RuntimeStartStepMessage | RuntimeStepMetadataMessage | RuntimeStopStepMessage | RuntimeAttachmentContentMessage | RuntimeAttachmentPathMessage | RuntimeGlobalAttachmentContentMessage | RuntimeGlobalAttachmentPathMessage | RuntimeGlobalErrorMessage;
|
|
59
79
|
export interface TestPlanV1Test {
|
|
60
80
|
id?: string | number;
|
|
61
81
|
selector?: string;
|
|
@@ -88,6 +108,7 @@ export interface AllureResults {
|
|
|
88
108
|
tests: TestResult[];
|
|
89
109
|
groups: TestResultContainer[];
|
|
90
110
|
attachments: Record<string, Buffer | string>;
|
|
111
|
+
globals?: Record<string, Globals>;
|
|
91
112
|
envInfo?: EnvironmentInfo;
|
|
92
113
|
categories?: Category[];
|
|
93
114
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { FixtureResult, Label, Link, StatusDetails, StepResult, TestResult } from "../model.js";
|
|
2
2
|
import { LabelName, Status } from "../model.js";
|
|
3
|
-
import type { RuntimeMessage, SerializeOptions } from "./types.js";
|
|
3
|
+
import type { RuntimeGlobalAttachmentContentMessage, RuntimeGlobalAttachmentPathMessage, RuntimeGlobalErrorMessage, RuntimeMessage, SerializeOptions, SerializerReplacerFunc } from "./types.js";
|
|
4
4
|
export declare const getStatusFromError: (error: Partial<Error>) => Status;
|
|
5
5
|
/**
|
|
6
6
|
* https://github.com/chalk/strip-ansi
|
|
@@ -37,8 +37,14 @@ export declare const isAnyStepFailed: (item: StepResult | TestResult | FixtureRe
|
|
|
37
37
|
export declare const isAllStepsEnded: (item: StepResult | TestResult | FixtureResult) => boolean;
|
|
38
38
|
export declare const hasLabel: (testResult: TestResult, labelName: LabelName | string) => boolean;
|
|
39
39
|
export declare const hasStepMessage: (messages: RuntimeMessage[]) => boolean;
|
|
40
|
+
export declare const isGlobalRuntimeMessage: (message: RuntimeMessage) => message is RuntimeGlobalAttachmentContentMessage | RuntimeGlobalAttachmentPathMessage | RuntimeGlobalErrorMessage;
|
|
40
41
|
export declare const getStepsMessagesPair: (messages: RuntimeMessage[]) => RuntimeMessage[][];
|
|
41
42
|
export declare const getUnfinishedStepsMessages: (messages: RuntimeMessage[]) => RuntimeMessage[][];
|
|
42
43
|
export declare const isPromise: <T = any>(obj: any) => obj is PromiseLike<T>;
|
|
43
44
|
export declare const serialize: (value: any, { maxDepth, maxLength, replacer }?: SerializeOptions) => string;
|
|
45
|
+
export declare const composeReplacers: (first: SerializerReplacerFunc, second: SerializerReplacerFunc) => SerializerReplacerFunc;
|
|
46
|
+
export declare const excludeCircularRefsFromMap: (parents: any[], map: Map<any, any>) => any[][];
|
|
47
|
+
export declare const excludeCircularRefsFromSet: (parents: any[], set: Set<any>) => any[];
|
|
48
|
+
export declare const limitString: (value: string, maxLength: number) => string;
|
|
49
|
+
export declare const uint8ArrayToBase64: (data: Uint8Array) => string;
|
|
44
50
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "allure-js-commons",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.6.0",
|
|
4
4
|
"description": "Allure JS Commons",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"allure",
|
|
@@ -102,10 +102,10 @@
|
|
|
102
102
|
"npm-run-all2": "^8.0.0",
|
|
103
103
|
"rimraf": "^6.0.0",
|
|
104
104
|
"typescript": "^5.2.2",
|
|
105
|
-
"vitest": "^4.0.
|
|
105
|
+
"vitest": "^4.0.18"
|
|
106
106
|
},
|
|
107
107
|
"peerDependencies": {
|
|
108
|
-
"allure-playwright": "3.
|
|
108
|
+
"allure-playwright": "3.6.0"
|
|
109
109
|
},
|
|
110
110
|
"peerDependenciesMeta": {
|
|
111
111
|
"allure-playwright": {
|