metascope 0.7.5 → 0.7.6
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/bin/cli.js +30 -28
- package/dist/lib/package.js +1 -1
- package/dist/lib/sources/xcode-info-plist.js +4 -4
- package/package.json +4 -5
package/dist/lib/package.js
CHANGED
|
@@ -5,7 +5,7 @@ import { readFile } from "node:fs/promises";
|
|
|
5
5
|
import { resolve } from "node:path";
|
|
6
6
|
import is from "@sindresorhus/is";
|
|
7
7
|
import { z } from "zod";
|
|
8
|
-
import
|
|
8
|
+
import { parse } from "plist";
|
|
9
9
|
//#region src/lib/sources/xcode-info-plist.ts
|
|
10
10
|
/**
|
|
11
11
|
* Source and parser for Apple `Info.plist` files.
|
|
@@ -71,7 +71,7 @@ const PLATFORM_NAME_MAP = {
|
|
|
71
71
|
* Parse an `Info.plist` content string into a structured object. Returns
|
|
72
72
|
* undefined if the plist is malformed or not a dictionary.
|
|
73
73
|
*/
|
|
74
|
-
function parse(content) {
|
|
74
|
+
function parse$1(content) {
|
|
75
75
|
const data = tryParsePlist(content) ?? tryParsePlist(content.replaceAll(XML_COMMENT_RE, "").trimStart());
|
|
76
76
|
if (!data) return;
|
|
77
77
|
const name = getString(data, "CFBundleDisplayName") ?? getString(data, "CFBundleName") ?? getString(data, "name");
|
|
@@ -105,7 +105,7 @@ function parse(content) {
|
|
|
105
105
|
*/
|
|
106
106
|
function tryParsePlist(content) {
|
|
107
107
|
try {
|
|
108
|
-
const parsed =
|
|
108
|
+
const parsed = parse(content);
|
|
109
109
|
return is.plainObject(parsed) ? parsed : void 0;
|
|
110
110
|
} catch {
|
|
111
111
|
return;
|
|
@@ -216,7 +216,7 @@ const xcodeInfoPlistSource = defineSource({
|
|
|
216
216
|
},
|
|
217
217
|
key: "xcodeInfoPlist",
|
|
218
218
|
async parse(input, context) {
|
|
219
|
-
const data = parse(await readFile(resolve(context.options.path, input), "utf8"));
|
|
219
|
+
const data = parse$1(await readFile(resolve(context.options.path, input), "utf8"));
|
|
220
220
|
if (data !== void 0) return {
|
|
221
221
|
data,
|
|
222
222
|
source: input
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "metascope",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.6",
|
|
4
4
|
"description": "A CLI tool and TypeScript library to easily extract metadata from all kinds of software repositories.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"metadata",
|
|
@@ -47,7 +47,6 @@
|
|
|
47
47
|
"@sindresorhus/is": "^8.1.0",
|
|
48
48
|
"@types/mdast": "^4.0.4",
|
|
49
49
|
"@types/node": "~22.17.2",
|
|
50
|
-
"@types/plist": "^3.0.5",
|
|
51
50
|
"@types/yargs": "^17.0.35",
|
|
52
51
|
"case-police": "^2.2.1",
|
|
53
52
|
"defu": "^6.1.7",
|
|
@@ -61,7 +60,7 @@
|
|
|
61
60
|
"package-json": "^10.0.1",
|
|
62
61
|
"picomatch": "^4.0.4",
|
|
63
62
|
"pkg-types": "^2.3.1",
|
|
64
|
-
"plist": "^
|
|
63
|
+
"plist": "^5.0.0",
|
|
65
64
|
"pretty-ms": "^9.3.0",
|
|
66
65
|
"read-pkg": "^10.1.0",
|
|
67
66
|
"read-pyproject": "^0.3.3",
|
|
@@ -96,8 +95,8 @@
|
|
|
96
95
|
"tree-sitter-python": "^0.25.0",
|
|
97
96
|
"tree-sitter-ruby": "^0.23.1",
|
|
98
97
|
"tsdown": "^0.22.0",
|
|
99
|
-
"tsx": "^4.22.
|
|
100
|
-
"typescript": "~
|
|
98
|
+
"tsx": "^4.22.1",
|
|
99
|
+
"typescript": "~5.9.3",
|
|
101
100
|
"vitest": "^4.1.6"
|
|
102
101
|
},
|
|
103
102
|
"engines": {
|