npm-pkgbuild 7.22.3 → 7.22.4
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 +1 -1
- package/src/extract-from-package.mjs +31 -30
package/package.json
CHANGED
|
@@ -72,44 +72,45 @@ export async function extractFromPackage(pkg, dir) {
|
|
|
72
72
|
if (pkg.pkg) {
|
|
73
73
|
const pkgbuild = pkg.pkg;
|
|
74
74
|
|
|
75
|
-
if (pkgbuild.
|
|
76
|
-
|
|
77
|
-
|
|
75
|
+
if (pkgbuild.abstract || !modulePath) {
|
|
76
|
+
if (pkgbuild.arch) {
|
|
77
|
+
for (const a of asArray(pkgbuild.arch)) {
|
|
78
|
+
arch.add(a);
|
|
79
|
+
}
|
|
78
80
|
}
|
|
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
81
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
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
|
};
|