@allurereport/core 3.0.0-beta.3 → 3.0.0-beta.5
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/api.d.ts +3 -2
- package/dist/config.d.ts +8 -16
- package/dist/config.js +47 -41
- package/dist/history.js +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.js +2 -2
- package/dist/plugin.d.ts +1 -1
- package/dist/report.js +4 -4
- package/dist/store/convert.d.ts +2 -2
- package/dist/store/convert.js +9 -9
- package/dist/store/store.d.ts +6 -6
- package/dist/store/store.js +4 -6
- package/dist/utils/module.js +4 -1
- package/dist/utils/path.d.ts +1 -0
- package/dist/utils/path.js +4 -0
- package/package.json +14 -12
package/dist/api.d.ts
CHANGED
|
@@ -7,9 +7,10 @@ export interface FullConfig {
|
|
|
7
7
|
reportFiles: ReportFiles;
|
|
8
8
|
readers?: ResultsReader[];
|
|
9
9
|
plugins?: PluginInstance[];
|
|
10
|
-
history
|
|
11
|
-
historyPath
|
|
10
|
+
history: HistoryDataPoint[];
|
|
11
|
+
historyPath: string;
|
|
12
12
|
appendHistory?: boolean;
|
|
13
|
+
knownIssuesPath: string;
|
|
13
14
|
known?: KnownTestFailure[];
|
|
14
15
|
qualityGate?: QualityGateConfig;
|
|
15
16
|
realTime?: any;
|
package/dist/config.d.ts
CHANGED
|
@@ -1,22 +1,14 @@
|
|
|
1
1
|
import type { Config } from "@allurereport/plugin-api";
|
|
2
|
-
import type {
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
|
|
2
|
+
import type { FullConfig } from "./api.js";
|
|
3
|
+
export declare const getPluginId: (key: string) => string;
|
|
4
|
+
export declare const findConfig: (cwd: string, configPath?: string) => Promise<string | undefined>;
|
|
5
|
+
export interface ConfigOverride {
|
|
6
|
+
name?: string;
|
|
7
7
|
output?: string;
|
|
8
8
|
historyPath?: string;
|
|
9
9
|
knownIssuesPath?: string;
|
|
10
|
-
|
|
11
|
-
|
|
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>;
|
|
10
|
+
}
|
|
11
|
+
export declare const readConfig: (cwd?: string, configPath?: string, override?: ConfigOverride) => Promise<FullConfig>;
|
|
17
12
|
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>;
|
|
13
|
+
export declare const resolveConfig: (config: Config, override?: ConfigOverride) => Promise<FullConfig>;
|
|
22
14
|
export declare const resolvePlugin: (path: string) => Promise<any>;
|
package/dist/config.js
CHANGED
|
@@ -1,63 +1,69 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import * as console from "node:console";
|
|
2
|
+
import { stat } from "node:fs/promises";
|
|
3
|
+
import { resolve } from "node:path";
|
|
3
4
|
import * as process from "node:process";
|
|
4
5
|
import { readHistory } from "./history.js";
|
|
5
6
|
import { readKnownIssues } from "./known.js";
|
|
6
7
|
import { FileSystemReportFiles } from "./plugin.js";
|
|
7
8
|
import { importWrapper } from "./utils/module.js";
|
|
8
|
-
|
|
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 = {};
|
|
9
|
+
import { normalizeImportPath } from "./utils/path.js";
|
|
27
10
|
export const getPluginId = (key) => {
|
|
28
11
|
return key.replace(/^@.*\//, "").replace(/[/\\]/g, "-");
|
|
29
12
|
};
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
13
|
+
const configNames = ["allurerc.js", "allurerc.mjs"];
|
|
14
|
+
const defaultConfig = {};
|
|
15
|
+
export const findConfig = async (cwd, configPath) => {
|
|
16
|
+
if (configPath) {
|
|
17
|
+
const resolved = resolve(cwd, configPath);
|
|
18
|
+
try {
|
|
19
|
+
const stats = await stat(resolved);
|
|
20
|
+
if (stats.isFile()) {
|
|
21
|
+
return resolved;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
catch (e) {
|
|
25
|
+
console.error(e);
|
|
26
|
+
}
|
|
27
|
+
throw new Error(`invalid config path ${resolved}: not a regular file`);
|
|
34
28
|
}
|
|
35
|
-
|
|
36
|
-
|
|
29
|
+
for (const configName of configNames) {
|
|
30
|
+
const resolved = resolve(cwd, configName);
|
|
31
|
+
try {
|
|
32
|
+
const stats = await stat(resolved);
|
|
33
|
+
if (stats.isFile()) {
|
|
34
|
+
return resolved;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
catch (ignored) {
|
|
38
|
+
}
|
|
37
39
|
}
|
|
38
|
-
return undefined;
|
|
39
40
|
};
|
|
40
|
-
export const
|
|
41
|
-
const
|
|
42
|
-
const
|
|
43
|
-
return await resolveConfig(
|
|
41
|
+
export const readConfig = async (cwd = process.cwd(), configPath, override) => {
|
|
42
|
+
const cfg = await findConfig(cwd, configPath);
|
|
43
|
+
const config = cfg ? await loadConfig(cfg) : { ...defaultConfig };
|
|
44
|
+
return await resolveConfig(config, override);
|
|
44
45
|
};
|
|
45
46
|
export const loadConfig = async (configPath) => {
|
|
46
|
-
return (await import(configPath)).default;
|
|
47
|
+
return (await import(normalizeImportPath(configPath))).default;
|
|
47
48
|
};
|
|
48
49
|
export const resolveConfig = async (config, override = {}) => {
|
|
49
|
-
const
|
|
50
|
-
const
|
|
51
|
-
const
|
|
52
|
-
const
|
|
50
|
+
const name = override.name ?? config.name ?? "Allure Report";
|
|
51
|
+
const historyPath = resolve(override.historyPath ?? config.historyPath ?? "./.allure/history.jsonl");
|
|
52
|
+
const knownIssuesPath = resolve(override.knownIssuesPath ?? config.knownIssuesPath ?? "./allure/known.json");
|
|
53
|
+
const output = resolve(override.output ?? config.output ?? "./allure-report");
|
|
54
|
+
const history = await readHistory(historyPath);
|
|
55
|
+
const known = await readKnownIssues(knownIssuesPath);
|
|
56
|
+
const pluginInstances = await resolvePlugins(config.plugins ?? {});
|
|
53
57
|
return {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
reportFiles: new FileSystemReportFiles(out),
|
|
58
|
+
name,
|
|
59
|
+
reportFiles: new FileSystemReportFiles(output),
|
|
57
60
|
plugins: pluginInstances,
|
|
58
|
-
output
|
|
61
|
+
output,
|
|
59
62
|
history,
|
|
60
63
|
historyPath,
|
|
64
|
+
knownIssuesPath,
|
|
65
|
+
known,
|
|
66
|
+
qualityGate: config.qualityGate,
|
|
61
67
|
};
|
|
62
68
|
};
|
|
63
69
|
export const resolvePlugin = async (path) => {
|
package/dist/history.js
CHANGED
|
@@ -54,5 +54,5 @@ export const writeHistory = async (historyPath, data) => {
|
|
|
54
54
|
const path = resolve(historyPath);
|
|
55
55
|
const parentDir = dirname(path);
|
|
56
56
|
await mkdir(parentDir, { recursive: true });
|
|
57
|
-
await writeFile(path, JSON.stringify(data)
|
|
57
|
+
await writeFile(path, `${JSON.stringify(data)}\n`, { encoding: "utf-8", flag: "a+" });
|
|
58
58
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
export * from "./api.js";
|
|
1
|
+
export type * from "./api.js";
|
|
2
2
|
export * from "./utils/misc.js";
|
|
3
3
|
export * from "./utils/crypto.js";
|
|
4
|
+
export * from "./utils/path.js";
|
|
4
5
|
export * from "./history.js";
|
|
5
6
|
export * from "./known.js";
|
|
6
|
-
export
|
|
7
|
+
export { resolveConfig, readConfig } from "./config.js";
|
|
7
8
|
export * from "./report.js";
|
|
8
9
|
export * from "./plugin.js";
|
|
9
10
|
export * from "./qualityGate.js";
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export * from "./api.js";
|
|
2
1
|
export * from "./utils/misc.js";
|
|
3
2
|
export * from "./utils/crypto.js";
|
|
3
|
+
export * from "./utils/path.js";
|
|
4
4
|
export * from "./history.js";
|
|
5
5
|
export * from "./known.js";
|
|
6
|
-
export
|
|
6
|
+
export { resolveConfig, readConfig } from "./config.js";
|
|
7
7
|
export * from "./report.js";
|
|
8
8
|
export * from "./plugin.js";
|
|
9
9
|
export * from "./qualityGate.js";
|
package/dist/plugin.d.ts
CHANGED
package/dist/report.js
CHANGED
|
@@ -10,7 +10,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
10
10
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
11
11
|
};
|
|
12
12
|
var _AllureReport_instances, _AllureReport_reportUuid, _AllureReport_reportName, _AllureReport_store, _AllureReport_readers, _AllureReport_plugins, _AllureReport_reportFiles, _AllureReport_eventEmitter, _AllureReport_events, _AllureReport_qualityGate, _AllureReport_appendHistory, _AllureReport_historyPath, _AllureReport_realTime, _AllureReport_state, _AllureReport_stage, _AllureReport_update, _AllureReport_eachPlugin, _AllureReport_getPluginState;
|
|
13
|
-
import { allure1, allure2, attachments, junitXml } from "@allurereport/reader";
|
|
13
|
+
import { allure1, allure2, attachments, cucumberjson, junitXml } from "@allurereport/reader";
|
|
14
14
|
import { PathResultFile } from "@allurereport/reader-api";
|
|
15
15
|
import console from "node:console";
|
|
16
16
|
import { randomUUID } from "node:crypto";
|
|
@@ -126,7 +126,7 @@ export class AllureReport {
|
|
|
126
126
|
if (initState) {
|
|
127
127
|
__classPrivateFieldSet(this, _AllureReport_state, {}, "f");
|
|
128
128
|
}
|
|
129
|
-
for (
|
|
129
|
+
for (const descriptor of __classPrivateFieldGet(this, _AllureReport_plugins, "f")) {
|
|
130
130
|
if (!descriptor.enabled) {
|
|
131
131
|
continue;
|
|
132
132
|
}
|
|
@@ -159,14 +159,14 @@ export class AllureReport {
|
|
|
159
159
|
this.validate = async () => {
|
|
160
160
|
await __classPrivateFieldGet(this, _AllureReport_qualityGate, "f").validate(__classPrivateFieldGet(this, _AllureReport_store, "f"));
|
|
161
161
|
};
|
|
162
|
-
const { name, readers = [allure1, allure2, junitXml, attachments], plugins = [], history, known, reportFiles, qualityGate, realTime, appendHistory, historyPath, } = opts;
|
|
162
|
+
const { name, readers = [allure1, allure2, cucumberjson, junitXml, attachments], plugins = [], history, known, reportFiles, qualityGate, realTime, appendHistory, historyPath, } = opts;
|
|
163
163
|
__classPrivateFieldSet(this, _AllureReport_reportUuid, randomUUID(), "f");
|
|
164
164
|
__classPrivateFieldSet(this, _AllureReport_reportName, name, "f");
|
|
165
165
|
__classPrivateFieldSet(this, _AllureReport_eventEmitter, new EventEmitter(), "f");
|
|
166
166
|
__classPrivateFieldSet(this, _AllureReport_events, new Events(__classPrivateFieldGet(this, _AllureReport_eventEmitter, "f")), "f");
|
|
167
167
|
__classPrivateFieldSet(this, _AllureReport_realTime, realTime, "f");
|
|
168
168
|
__classPrivateFieldSet(this, _AllureReport_appendHistory, appendHistory ?? true, "f");
|
|
169
|
-
__classPrivateFieldSet(this, _AllureReport_historyPath, historyPath
|
|
169
|
+
__classPrivateFieldSet(this, _AllureReport_historyPath, historyPath, "f");
|
|
170
170
|
__classPrivateFieldSet(this, _AllureReport_store, new DefaultAllureStore(history, known, __classPrivateFieldGet(this, _AllureReport_eventEmitter, "f")), "f");
|
|
171
171
|
__classPrivateFieldSet(this, _AllureReport_readers, [...readers], "f");
|
|
172
172
|
__classPrivateFieldSet(this, _AllureReport_plugins, [...plugins], "f");
|
package/dist/store/convert.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AttachmentLink, TestCase, TestFixtureResult, TestResult } from "@allurereport/core-api";
|
|
2
|
-
import { RawFixtureResult, RawTestResult, ReaderContext } from "@allurereport/reader-api";
|
|
1
|
+
import type { AttachmentLink, TestCase, TestFixtureResult, TestResult } from "@allurereport/core-api";
|
|
2
|
+
import type { RawFixtureResult, RawTestResult, ReaderContext } from "@allurereport/reader-api";
|
|
3
3
|
export declare const __unknown = "#___unknown_value___#";
|
|
4
4
|
export type StateData = {
|
|
5
5
|
testCases: Map<string, TestCase>;
|
package/dist/store/convert.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { notNull
|
|
1
|
+
import { notNull } from "@allurereport/core-api";
|
|
2
2
|
import { findByLabelName } from "@allurereport/core-api";
|
|
3
3
|
import { md5 } from "@allurereport/plugin-api";
|
|
4
4
|
import MarkdownIt from "markdown-it";
|
|
@@ -100,9 +100,9 @@ const processAttachmentLink = ({ attachments, visitAttachmentLink }, attach) =>
|
|
|
100
100
|
});
|
|
101
101
|
}
|
|
102
102
|
const id = md5(attach.originalFileName);
|
|
103
|
-
|
|
103
|
+
const previous = attachments.get(id);
|
|
104
104
|
if (!previous) {
|
|
105
|
-
const
|
|
105
|
+
const linkExpected = {
|
|
106
106
|
id,
|
|
107
107
|
originalFileName: attach.originalFileName,
|
|
108
108
|
ext: extname(attach.originalFileName),
|
|
@@ -111,9 +111,9 @@ const processAttachmentLink = ({ attachments, visitAttachmentLink }, attach) =>
|
|
|
111
111
|
used: true,
|
|
112
112
|
missed: true,
|
|
113
113
|
};
|
|
114
|
-
attachments.set(id,
|
|
115
|
-
visitAttachmentLink(
|
|
116
|
-
return createAttachmentStep(
|
|
114
|
+
attachments.set(id, linkExpected);
|
|
115
|
+
visitAttachmentLink(linkExpected);
|
|
116
|
+
return createAttachmentStep(linkExpected);
|
|
117
117
|
}
|
|
118
118
|
if (previous.used) {
|
|
119
119
|
return createAttachmentStep({
|
|
@@ -240,13 +240,13 @@ const processTagLabels = (label) => {
|
|
|
240
240
|
if (label.name === "tag" && label.value) {
|
|
241
241
|
const matchTag = label.value.match(idLabelMatcher);
|
|
242
242
|
if (matchTag) {
|
|
243
|
-
const id = matchTag?.groups?.
|
|
243
|
+
const id = matchTag?.groups?.id;
|
|
244
244
|
return id ? [{ name: "ALLURE_ID", value: id }] : [];
|
|
245
245
|
}
|
|
246
246
|
const matchLabel = label.value.match(tagLabelMatcher);
|
|
247
247
|
if (matchLabel) {
|
|
248
|
-
const name = matchLabel?.groups?.
|
|
249
|
-
const value = matchLabel?.groups?.
|
|
248
|
+
const name = matchLabel?.groups?.name;
|
|
249
|
+
const value = matchLabel?.groups?.value;
|
|
250
250
|
return name && value ? [{ name, value }] : [];
|
|
251
251
|
}
|
|
252
252
|
}
|
package/dist/store/store.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { AttachmentLink, HistoryDataPoint, HistoryTestResult, KnownTestFailure, Statistic, TestCase, TestFixtureResult, TestResult } from "@allurereport/core-api";
|
|
2
|
-
import { AllureStore, ResultFile } from "@allurereport/plugin-api";
|
|
1
|
+
import type { AttachmentLink, HistoryDataPoint, HistoryTestResult, KnownTestFailure, Statistic, TestCase, TestFixtureResult, TestResult } from "@allurereport/core-api";
|
|
2
|
+
import type { AllureStore, ResultFile } from "@allurereport/plugin-api";
|
|
3
3
|
import type { RawFixtureResult, RawMetadata, RawTestResult, ReaderContext, ResultsVisitor } from "@allurereport/reader-api";
|
|
4
|
-
import { EventEmitter } from "node:events";
|
|
5
|
-
import { AllureStoreEvents } from "../utils/event.js";
|
|
4
|
+
import type { EventEmitter } from "node:events";
|
|
5
|
+
import type { AllureStoreEvents } from "../utils/event.js";
|
|
6
6
|
export declare class DefaultAllureStore implements AllureStore, ResultsVisitor {
|
|
7
7
|
#private;
|
|
8
8
|
readonly indexTestResultByTestCase: Map<string, TestResult[]>;
|
|
@@ -15,8 +15,8 @@ export declare class DefaultAllureStore implements AllureStore, ResultsVisitor {
|
|
|
15
15
|
constructor(history?: HistoryDataPoint[], known?: KnownTestFailure[], eventEmitter?: EventEmitter<AllureStoreEvents>);
|
|
16
16
|
visitTestResult(raw: RawTestResult, context: ReaderContext): Promise<void>;
|
|
17
17
|
visitTestFixtureResult(result: RawFixtureResult, context: ReaderContext): Promise<void>;
|
|
18
|
-
visitAttachmentFile(resultFile: ResultFile
|
|
19
|
-
visitMetadata(metadata: RawMetadata
|
|
18
|
+
visitAttachmentFile(resultFile: ResultFile): Promise<void>;
|
|
19
|
+
visitMetadata(metadata: RawMetadata): Promise<void>;
|
|
20
20
|
allTestCases(): Promise<TestCase[]>;
|
|
21
21
|
allTestResults(options?: {
|
|
22
22
|
includeHidden: boolean;
|
package/dist/store/store.js
CHANGED
|
@@ -10,7 +10,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
10
10
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
11
11
|
};
|
|
12
12
|
var _DefaultAllureStore_testResults, _DefaultAllureStore_attachments, _DefaultAllureStore_attachmentContents, _DefaultAllureStore_testCases, _DefaultAllureStore_metadata, _DefaultAllureStore_history, _DefaultAllureStore_known, _DefaultAllureStore_fixtures, _DefaultAllureStore_eventEmitter;
|
|
13
|
-
import { compareBy, nullsLast, ordinal, reverse
|
|
13
|
+
import { compareBy, nullsLast, ordinal, reverse } from "@allurereport/core-api";
|
|
14
14
|
import { md5 } from "@allurereport/plugin-api";
|
|
15
15
|
import { extname } from "node:path";
|
|
16
16
|
import { testFixtureResultRawToState, testResultRawToState } from "./convert.js";
|
|
@@ -93,7 +93,7 @@ export class DefaultAllureStore {
|
|
|
93
93
|
index(this.indexAttachmentByFixture, testFixtureResult.id, ...attachmentLinks);
|
|
94
94
|
__classPrivateFieldGet(this, _DefaultAllureStore_eventEmitter, "f")?.emit("testFixtureResult", testFixtureResult.id);
|
|
95
95
|
}
|
|
96
|
-
async visitAttachmentFile(resultFile
|
|
96
|
+
async visitAttachmentFile(resultFile) {
|
|
97
97
|
const originalFileName = resultFile.getOriginalFileName();
|
|
98
98
|
const id = md5(originalFileName);
|
|
99
99
|
__classPrivateFieldGet(this, _DefaultAllureStore_attachmentContents, "f").set(id, resultFile);
|
|
@@ -118,7 +118,7 @@ export class DefaultAllureStore {
|
|
|
118
118
|
}
|
|
119
119
|
__classPrivateFieldGet(this, _DefaultAllureStore_eventEmitter, "f")?.emit("attachmentFile", id);
|
|
120
120
|
}
|
|
121
|
-
async visitMetadata(metadata
|
|
121
|
+
async visitMetadata(metadata) {
|
|
122
122
|
Object.keys(metadata).forEach((key) => __classPrivateFieldGet(this, _DefaultAllureStore_metadata, "f").set(key, metadata[key]));
|
|
123
123
|
}
|
|
124
124
|
async allTestCases() {
|
|
@@ -145,7 +145,6 @@ export class DefaultAllureStore {
|
|
|
145
145
|
return Array.from(__classPrivateFieldGet(this, _DefaultAllureStore_fixtures, "f").values());
|
|
146
146
|
}
|
|
147
147
|
async allHistoryDataPoints() {
|
|
148
|
-
console.log(__classPrivateFieldGet(this, _DefaultAllureStore_history, "f"));
|
|
149
148
|
return __classPrivateFieldGet(this, _DefaultAllureStore_history, "f");
|
|
150
149
|
}
|
|
151
150
|
async allKnownIssues() {
|
|
@@ -178,11 +177,10 @@ export class DefaultAllureStore {
|
|
|
178
177
|
return [];
|
|
179
178
|
}
|
|
180
179
|
return (this.indexTestResultByHistoryId.get(tr.historyId) ?? [])
|
|
181
|
-
.filter((
|
|
180
|
+
.filter((r) => r.hidden)
|
|
182
181
|
.sort(nullsLast(compareBy("start", reverse(ordinal()))));
|
|
183
182
|
}
|
|
184
183
|
async historyByTrId(trId) {
|
|
185
|
-
console.log(__classPrivateFieldGet(this, _DefaultAllureStore_history, "f"));
|
|
186
184
|
const tr = await this.testResultById(trId);
|
|
187
185
|
if (!tr?.historyId) {
|
|
188
186
|
return [];
|
package/dist/utils/module.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
import { normalizeImportPath } from "./path.js";
|
|
3
|
+
const require = createRequire(import.meta.url);
|
|
1
4
|
export const importWrapper = async (path) => {
|
|
2
|
-
return import(path);
|
|
5
|
+
return import(normalizeImportPath(require.resolve(path)));
|
|
3
6
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const normalizeImportPath: (path: string) => string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allurereport/core",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.5",
|
|
4
4
|
"description": "Collection of generic Allure utilities used across the entire project",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"allure"
|
|
@@ -20,20 +20,22 @@
|
|
|
20
20
|
"scripts": {
|
|
21
21
|
"build": "run clean && tsc --project ./tsconfig.json",
|
|
22
22
|
"clean": "rimraf ./dist",
|
|
23
|
+
"eslint": "eslint ./src/**/*.{js,jsx,ts,tsx}",
|
|
24
|
+
"eslint:format": "eslint --fix ./src/**/*.{js,jsx,ts,tsx}",
|
|
23
25
|
"test": "vitest run"
|
|
24
26
|
},
|
|
25
27
|
"dependencies": {
|
|
26
|
-
"@allurereport/core-api": "3.0.0-beta.
|
|
27
|
-
"@allurereport/plugin-api": "3.0.0-beta.
|
|
28
|
-
"@allurereport/plugin-awesome": "3.0.0-beta.
|
|
29
|
-
"@allurereport/plugin-classic": "3.0.0-beta.
|
|
30
|
-
"@allurereport/plugin-csv": "3.0.0-beta.
|
|
31
|
-
"@allurereport/plugin-log": "3.0.0-beta.
|
|
32
|
-
"@allurereport/plugin-progress": "3.0.0-beta.
|
|
33
|
-
"@allurereport/plugin-slack": "3.0.0-beta.
|
|
34
|
-
"@allurereport/plugin-testplan": "3.0.0-beta.
|
|
35
|
-
"@allurereport/reader": "3.0.0-beta.
|
|
36
|
-
"@allurereport/reader-api": "3.0.0-beta.
|
|
28
|
+
"@allurereport/core-api": "3.0.0-beta.5",
|
|
29
|
+
"@allurereport/plugin-api": "3.0.0-beta.5",
|
|
30
|
+
"@allurereport/plugin-awesome": "3.0.0-beta.5",
|
|
31
|
+
"@allurereport/plugin-classic": "3.0.0-beta.5",
|
|
32
|
+
"@allurereport/plugin-csv": "3.0.0-beta.5",
|
|
33
|
+
"@allurereport/plugin-log": "3.0.0-beta.5",
|
|
34
|
+
"@allurereport/plugin-progress": "3.0.0-beta.5",
|
|
35
|
+
"@allurereport/plugin-slack": "3.0.0-beta.5",
|
|
36
|
+
"@allurereport/plugin-testplan": "3.0.0-beta.5",
|
|
37
|
+
"@allurereport/reader": "3.0.0-beta.5",
|
|
38
|
+
"@allurereport/reader-api": "3.0.0-beta.5",
|
|
37
39
|
"markdown-it": "^14.1.0"
|
|
38
40
|
},
|
|
39
41
|
"devDependencies": {
|