@allurereport/reader 3.4.0 → 3.4.1
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/xcresult/index.d.ts
CHANGED
package/dist/xcresult/index.js
CHANGED
|
@@ -18,6 +18,15 @@ export const readXcResultBundle = async (visitor, directory) => {
|
|
|
18
18
|
}
|
|
19
19
|
return false;
|
|
20
20
|
};
|
|
21
|
+
export const isXcResultToolAvailable = async () => {
|
|
22
|
+
try {
|
|
23
|
+
await version();
|
|
24
|
+
return true;
|
|
25
|
+
}
|
|
26
|
+
catch {
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
};
|
|
21
30
|
const maybeGetXcResultToolVersion = async () => {
|
|
22
31
|
try {
|
|
23
32
|
return await version();
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import type { AttachmentFileFactory } from "./model.js";
|
|
2
2
|
export declare const parseWithExportedAttachments: (xcResultPath: string, fn: (createAttachmentFile: AttachmentFileFactory) => Promise<void>) => Promise<void>;
|
|
3
3
|
export declare const mapWellKnownAttachmentName: (name: string | undefined, timestamp: number | undefined) => string | undefined;
|
|
4
|
+
export declare const createAttachmentFileFactory: (attachmentsDir: string) => AttachmentFileFactory;
|
|
@@ -11,7 +11,7 @@ export const parseWithExportedAttachments = async (xcResultPath, fn) => {
|
|
|
11
11
|
try {
|
|
12
12
|
attachmentsDir = await mkdtemp(path.join(tmpdir(), "allure-reader-xcresult-"));
|
|
13
13
|
await exportAttachments(xcResultPath, attachmentsDir);
|
|
14
|
-
await fn(
|
|
14
|
+
await fn(createAttachmentFileFactory(attachmentsDir));
|
|
15
15
|
}
|
|
16
16
|
finally {
|
|
17
17
|
if (attachmentsDir) {
|
|
@@ -46,7 +46,7 @@ const timestampToString = (timestamp) => {
|
|
|
46
46
|
fractionalSecondDigits: 3,
|
|
47
47
|
});
|
|
48
48
|
};
|
|
49
|
-
const
|
|
49
|
+
export const createAttachmentFileFactory = (attachmentsDir) => async (attachmentUuid, uniqueFileName) => {
|
|
50
50
|
const fileExtension = path.extname(uniqueFileName);
|
|
51
51
|
const attachmentFilePath = path.join(attachmentsDir, attachmentUuid);
|
|
52
52
|
const [firstAttemptOk, firstAttemptResult] = await tryReadFile(attachmentFilePath, uniqueFileName);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allurereport/reader",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.1",
|
|
4
4
|
"description": "Collection of utilities which helps to process different kind of test results as Allure Results",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"allure",
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
"lint:fix": "oxlint --import-plugin --fix src test features stories"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@allurereport/core-api": "3.4.
|
|
30
|
-
"@allurereport/plugin-api": "3.4.
|
|
31
|
-
"@allurereport/reader-api": "3.4.
|
|
29
|
+
"@allurereport/core-api": "3.4.1",
|
|
30
|
+
"@allurereport/plugin-api": "3.4.1",
|
|
31
|
+
"@allurereport/reader-api": "3.4.1",
|
|
32
32
|
"fast-xml-parser": "^5.5.7"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|