npm-pkgbuild 18.2.6 → 18.2.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 +1 -1
- package/src/npm-pkgbuild-cli.mjs +8 -7
package/package.json
CHANGED
package/src/npm-pkgbuild-cli.mjs
CHANGED
|
@@ -106,24 +106,25 @@ program
|
|
|
106
106
|
const transformer = [
|
|
107
107
|
{
|
|
108
108
|
name: "skip-architecutes",
|
|
109
|
-
match: (entry) => entry.name.endsWith(".node"),
|
|
109
|
+
match: (entry) => entry.name.endsWith(".node") && entry.filename,
|
|
110
110
|
async transform(entry) {
|
|
111
|
-
const proc = await execa("file", ["-b", entry.
|
|
111
|
+
const proc = await execa("file", ["-b", entry.filename], {
|
|
112
112
|
cwd: options.dir
|
|
113
113
|
});
|
|
114
|
-
|
|
114
|
+
let arch = proc.stdout.split(/\s*,\s*/)[1];
|
|
115
115
|
|
|
116
|
-
|
|
116
|
+
const archs = { "ARM aarch64" : "aarch64" };
|
|
117
|
+
arch = archs[arch] || arch;
|
|
117
118
|
|
|
118
|
-
if(arch
|
|
119
|
+
if(properties.arch.indexOf(arch) >= 0) {
|
|
119
120
|
return entry;
|
|
120
121
|
}
|
|
121
122
|
|
|
122
|
-
|
|
123
|
+
console.log('SKIP', entry.name, arch);
|
|
123
124
|
}
|
|
124
125
|
},
|
|
125
126
|
createExpressionTransformer(
|
|
126
|
-
entry => uc.fileNameConformsTo(entry.name, "public.text") && !uc.fileNameConformsTo(entry.name, "com.netscape.javascript-source"),
|
|
127
|
+
entry => entry.isBlob && uc.fileNameConformsTo(entry.name, "public.text") && !uc.fileNameConformsTo(entry.name, "com.netscape.javascript-source"),
|
|
127
128
|
properties
|
|
128
129
|
)
|
|
129
130
|
];
|