@allurereport/reader 3.0.0-beta.18 → 3.0.0-beta.20
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/bundle.js +11 -5
- package/package.json +4 -4
package/dist/xcresult/bundle.js
CHANGED
|
@@ -19,6 +19,7 @@ necessary (the path to Xcode's Developer directory might be different on your ma
|
|
|
19
19
|
|
|
20
20
|
The original error that led to this message is shown below.
|
|
21
21
|
`;
|
|
22
|
+
const MDLS_CONTENT_TYPE_PATTERN = /\s*"(?<uti>[^"]+)"/;
|
|
22
23
|
const bundleInfoFilePaths = new Set([
|
|
23
24
|
"Info.plist",
|
|
24
25
|
"Contents/Info.plist",
|
|
@@ -34,18 +35,23 @@ export const isXcResultBundle = async (directory) => {
|
|
|
34
35
|
};
|
|
35
36
|
export const checkUniformTypeIdentifier = async (itemPath, uti) => {
|
|
36
37
|
const mdlsArgs = ["-raw", "-attr", "kMDItemContentTypeTree", itemPath];
|
|
37
|
-
|
|
38
|
+
let contentTypeTreeAvailable = false;
|
|
38
39
|
try {
|
|
39
|
-
for await (const line of invokeStdoutCliTool("mdls", mdlsArgs)) {
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
for await (const line of invokeStdoutCliTool("mdls", mdlsArgs, { encoding: "utf-8" })) {
|
|
41
|
+
const match = MDLS_CONTENT_TYPE_PATTERN.exec(line);
|
|
42
|
+
if (match) {
|
|
43
|
+
contentTypeTreeAvailable = true;
|
|
44
|
+
const [, matchedUti] = match;
|
|
45
|
+
if (matchedUti === uti) {
|
|
46
|
+
return true;
|
|
47
|
+
}
|
|
42
48
|
}
|
|
43
49
|
}
|
|
44
50
|
}
|
|
45
51
|
catch {
|
|
46
52
|
return undefined;
|
|
47
53
|
}
|
|
48
|
-
return false;
|
|
54
|
+
return contentTypeTreeAvailable ? false : undefined;
|
|
49
55
|
};
|
|
50
56
|
export const isMostProbablyXcResultBundle = async (directory) => isDefined(await findBundleInfoFile(directory)) || followsXcResultNaming(directory);
|
|
51
57
|
export const followsXcResultNaming = (directory) => directory.endsWith(".xcresult");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allurereport/reader",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.20",
|
|
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
|
"test": "vitest run"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@allurereport/core-api": "3.0.0-beta.
|
|
30
|
-
"@allurereport/plugin-api": "3.0.0-beta.
|
|
31
|
-
"@allurereport/reader-api": "3.0.0-beta.
|
|
29
|
+
"@allurereport/core-api": "3.0.0-beta.20",
|
|
30
|
+
"@allurereport/plugin-api": "3.0.0-beta.20",
|
|
31
|
+
"@allurereport/reader-api": "3.0.0-beta.20",
|
|
32
32
|
"fast-xml-parser": "^4.5.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|