npm-pkgbuild 7.22.3 → 7.22.7
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/package.json +11 -11
- package/src/extract-from-package.mjs +37 -36
- package/src/publish.mjs +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "npm-pkgbuild",
|
|
3
|
-
"version": "7.22.
|
|
3
|
+
"version": "7.22.7",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -38,21 +38,21 @@
|
|
|
38
38
|
"lint:docs": "documentation lint ./src/**/*.mjs"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@npmcli/arborist": "^4.
|
|
42
|
-
"aggregate-async-iterator": "^1.1.
|
|
41
|
+
"@npmcli/arborist": "^4.3.0",
|
|
42
|
+
"aggregate-async-iterator": "^1.1.9",
|
|
43
43
|
"commander": "^8.3.0",
|
|
44
44
|
"content-entry": "^4.1.2",
|
|
45
|
-
"content-entry-filesystem": "^4.0.
|
|
46
|
-
"content-entry-transform": "^1.3.
|
|
45
|
+
"content-entry-filesystem": "^4.0.4",
|
|
46
|
+
"content-entry-transform": "^1.3.7",
|
|
47
47
|
"execa": "^6.0.0",
|
|
48
|
-
"expression-expander": "^7.0.
|
|
49
|
-
"globby": "^13.
|
|
50
|
-
"iterable-string-interceptor": "^1.0.
|
|
51
|
-
"key-value-transformer": "^2.0.
|
|
48
|
+
"expression-expander": "^7.0.14",
|
|
49
|
+
"globby": "^13.1.0",
|
|
50
|
+
"iterable-string-interceptor": "^1.0.13",
|
|
51
|
+
"key-value-transformer": "^2.0.2",
|
|
52
52
|
"node-fetch": "^3.2.0",
|
|
53
|
-
"npm-package-walker": "^5.0.
|
|
53
|
+
"npm-package-walker": "^5.0.5",
|
|
54
54
|
"npm-packlist": "^3.0.0",
|
|
55
|
-
"pacote": "^12.0.
|
|
55
|
+
"pacote": "^12.0.3",
|
|
56
56
|
"pkg-dir": "^6.0.1",
|
|
57
57
|
"tar-stream": "^2.2.0"
|
|
58
58
|
},
|
|
@@ -63,53 +63,54 @@ export async function extractFromPackage(pkg, dir) {
|
|
|
63
63
|
let arch = new Set();
|
|
64
64
|
|
|
65
65
|
const processPkg = (pkg, dir, modulePath) => {
|
|
66
|
-
if (pkg.cpu) {
|
|
67
|
-
for (const a of asArray(pkg.cpu)) {
|
|
68
|
-
arch.add(npmArchMapping[a]);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
66
|
if (pkg.pkg) {
|
|
73
67
|
const pkgbuild = pkg.pkg;
|
|
74
68
|
|
|
75
|
-
if (pkgbuild.
|
|
76
|
-
|
|
77
|
-
|
|
69
|
+
if (pkgbuild.abstract || !modulePath) {
|
|
70
|
+
if (pkgbuild.arch) {
|
|
71
|
+
for (const a of asArray(pkgbuild.arch)) {
|
|
72
|
+
arch.add(a);
|
|
73
|
+
}
|
|
78
74
|
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
Object.assign(output, pkgbuild.output);
|
|
82
|
-
|
|
83
|
-
Object.entries(pkgbuild)
|
|
84
|
-
.filter(([k, v]) => typeof v === "string")
|
|
85
|
-
.forEach(([k, v]) => (properties[k] = v));
|
|
86
|
-
|
|
87
|
-
if (pkgbuild.content && !modulePath) {
|
|
88
|
-
Object.entries(pkgbuild.content).forEach(
|
|
89
|
-
([destination, definitions]) => {
|
|
90
|
-
for (const definition of asArray(definitions)) {
|
|
91
|
-
const entryProperties = { destination };
|
|
92
75
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
76
|
+
if (pkg.cpu) {
|
|
77
|
+
for (const a of asArray(pkg.cpu)) {
|
|
78
|
+
arch.add(npmArchMapping[a]);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
Object.assign(output, pkgbuild.output);
|
|
83
|
+
|
|
84
|
+
Object.entries(pkgbuild)
|
|
85
|
+
.filter(([k, v]) => typeof v === "string")
|
|
86
|
+
.forEach(([k, v]) => (properties[k] = v));
|
|
87
|
+
|
|
88
|
+
if (pkgbuild.content && !modulePath) {
|
|
89
|
+
Object.entries(pkgbuild.content).forEach(
|
|
90
|
+
([destination, definitions]) => {
|
|
91
|
+
for (const definition of asArray(definitions)) {
|
|
92
|
+
const entryProperties = { destination };
|
|
93
|
+
|
|
94
|
+
if (definition.type) {
|
|
95
|
+
const type = allInputs.find(i => i.name === definition.type);
|
|
96
|
+
if (type) {
|
|
97
|
+
delete definition.type;
|
|
98
|
+
sources.push(
|
|
99
|
+
new type({ ...definition, dir }, entryProperties)
|
|
100
|
+
);
|
|
101
|
+
} else {
|
|
102
|
+
console.error(`Unknown type '${type}'`);
|
|
103
|
+
}
|
|
104
|
+
} else {
|
|
97
105
|
sources.push(
|
|
98
|
-
new
|
|
106
|
+
new FileContentProvider(definition, entryProperties)
|
|
99
107
|
);
|
|
100
|
-
} else {
|
|
101
|
-
console.error(`Unknown type '${type}'`);
|
|
102
108
|
}
|
|
103
|
-
} else {
|
|
104
|
-
sources.push(
|
|
105
|
-
new FileContentProvider(definition, entryProperties)
|
|
106
|
-
);
|
|
107
109
|
}
|
|
108
110
|
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
+
);
|
|
112
|
+
}
|
|
111
113
|
}
|
|
112
|
-
|
|
113
114
|
Object.assign(dependencies, pkgbuild.depends);
|
|
114
115
|
}
|
|
115
116
|
};
|
package/src/publish.mjs
CHANGED
|
@@ -8,7 +8,7 @@ export function analysePublish(publish, properties) {
|
|
|
8
8
|
(match, key, offset, string) => properties[key] || '{{' + key + '}}'
|
|
9
9
|
);
|
|
10
10
|
|
|
11
|
-
const m = publish.url.match(/^([
|
|
11
|
+
const m = publish.url.match(/^([^:]+:)\/\/(.*)/);
|
|
12
12
|
|
|
13
13
|
publish.scheme = m ? m[1] : "file:";
|
|
14
14
|
|