npm-pkgbuild 10.17.1 → 10.17.2
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/LICENSE +1 -1
- package/package.json +1 -1
- package/src/extract-from-package.mjs +1 -1
- package/src/npm-pkgbuild-cli.mjs +1 -1
- package/src/output/arch.mjs +12 -8
- package/src/output/debian.mjs +1 -1
- package/src/output/oci.mjs +1 -1
- package/src/output/packager.mjs +1 -1
- package/src/output/rpm.mjs +1 -1
package/LICENSE
CHANGED
package/package.json
CHANGED
|
@@ -238,7 +238,7 @@ export async function* extractFromPackage(options = {}) {
|
|
|
238
238
|
|
|
239
239
|
for (const a of arch) {
|
|
240
240
|
if (!restrictArch.size || restrictArch.has(a)) {
|
|
241
|
-
if (!options.
|
|
241
|
+
if (!options.prepare || npmArchMapping[process.arch] === a) {
|
|
242
242
|
numberOfArchs++;
|
|
243
243
|
properties.arch = [a];
|
|
244
244
|
yield {
|
package/src/npm-pkgbuild-cli.mjs
CHANGED
|
@@ -72,7 +72,7 @@ program
|
|
|
72
72
|
for (const outputFactory of allOutputs.filter(
|
|
73
73
|
o => options[o.name] === true || output[o.name] !== undefined
|
|
74
74
|
)) {
|
|
75
|
-
if (options.available && !(await outputFactory.
|
|
75
|
+
if (options.available && !(await outputFactory.prepare)) {
|
|
76
76
|
continute;
|
|
77
77
|
}
|
|
78
78
|
|
package/src/output/arch.mjs
CHANGED
|
@@ -54,7 +54,8 @@ function keyPrefix(key) {
|
|
|
54
54
|
|
|
55
55
|
const PKGBUILD = "PKGBUILD";
|
|
56
56
|
|
|
57
|
-
let
|
|
57
|
+
let _ext = ".pkg.tar.xz";
|
|
58
|
+
let _prepared;
|
|
58
59
|
|
|
59
60
|
export class ARCH extends Packager {
|
|
60
61
|
static get name() {
|
|
@@ -66,14 +67,15 @@ export class ARCH extends Packager {
|
|
|
66
67
|
}
|
|
67
68
|
|
|
68
69
|
static get fileNameExtension() {
|
|
69
|
-
return
|
|
70
|
+
return _ext;
|
|
70
71
|
}
|
|
71
72
|
|
|
72
73
|
static get fields() {
|
|
73
74
|
return fields;
|
|
74
75
|
}
|
|
75
76
|
|
|
76
|
-
static async
|
|
77
|
+
static async prepare() {
|
|
78
|
+
if(_prepared === undefined) {
|
|
77
79
|
try {
|
|
78
80
|
await execa("makepkg", ["-V"]);
|
|
79
81
|
|
|
@@ -84,12 +86,14 @@ export class ARCH extends Packager {
|
|
|
84
86
|
.substring(i)
|
|
85
87
|
.split(/\n/)[0]
|
|
86
88
|
.match(/='([^']+)'/);
|
|
87
|
-
|
|
89
|
+
_ext = m[1];
|
|
88
90
|
}
|
|
89
|
-
|
|
90
|
-
} catch {
|
|
91
|
-
|
|
92
|
-
|
|
91
|
+
_prepared = true;
|
|
92
|
+
} catch {
|
|
93
|
+
_prepared = false;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
return _prepared;
|
|
93
97
|
}
|
|
94
98
|
|
|
95
99
|
get packageFileName() {
|
package/src/output/debian.mjs
CHANGED
package/src/output/oci.mjs
CHANGED
package/src/output/packager.mjs
CHANGED
package/src/output/rpm.mjs
CHANGED