npm-pkgbuild 11.1.14 → 11.1.16
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 +2 -2
- package/src/extract-from-package.mjs +10 -6
- package/src/output/docker.mjs +12 -3
- package/src/output/rpm.mjs +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "npm-pkgbuild",
|
|
3
|
-
"version": "11.1.
|
|
3
|
+
"version": "11.1.16",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"lint:docs": "documentation lint ./src/**/*.mjs"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@npmcli/arborist": "^6.2.
|
|
42
|
+
"@npmcli/arborist": "^6.2.1",
|
|
43
43
|
"@vercel/nft": "^0.22.5",
|
|
44
44
|
"aggregate-async-iterator": "^1.1.15",
|
|
45
45
|
"commander": "^10.0.0",
|
|
@@ -150,13 +150,19 @@ export async function* extractFromPackage(options = {}, env = {}) {
|
|
|
150
150
|
}
|
|
151
151
|
|
|
152
152
|
if (fullfilled) {
|
|
153
|
-
|
|
153
|
+
if(options.verbose) {
|
|
154
|
+
console.log(`${name}: requirement fullfilled`, requires);
|
|
155
|
+
}
|
|
154
156
|
} else {
|
|
155
|
-
|
|
157
|
+
if(options.verbose) {
|
|
158
|
+
console.log(`${name}: requirement not fullfilled`, requires);
|
|
159
|
+
}
|
|
156
160
|
continue;
|
|
157
161
|
}
|
|
158
162
|
} else {
|
|
159
|
-
|
|
163
|
+
if(options.verbose) {
|
|
164
|
+
console.log(`${name}: load`);
|
|
165
|
+
}
|
|
160
166
|
}
|
|
161
167
|
|
|
162
168
|
const fragment = {
|
|
@@ -316,9 +322,7 @@ export async function* extractFromPackage(options = {}, env = {}) {
|
|
|
316
322
|
yield result;
|
|
317
323
|
} else {
|
|
318
324
|
for (const a of [...arch].sort()) {
|
|
319
|
-
if (variant.restrictArch.size
|
|
320
|
-
console.log("RESTRICT", a);
|
|
321
|
-
} else {
|
|
325
|
+
if (variant.restrictArch.size === 0 || variant.restrictArch.has(a)) {
|
|
322
326
|
result.variant.arch = a;
|
|
323
327
|
result.properties.arch = [a];
|
|
324
328
|
yield result;
|
package/src/output/docker.mjs
CHANGED
|
@@ -13,13 +13,22 @@ import { fieldProvider, copyEntries, utf8StreamOptions } from "../util.mjs";
|
|
|
13
13
|
|
|
14
14
|
const DOCKERFILE = "Dockerfile";
|
|
15
15
|
|
|
16
|
+
function* keyValueLines(key, value, options) {
|
|
17
|
+
yield `LABEL ${key}=${value}${options.lineEnding}`;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const labelKeyValuePairs = {
|
|
21
|
+
...equalSeparatedKeyValuePairOptions,
|
|
22
|
+
keyValueLines
|
|
23
|
+
};
|
|
24
|
+
|
|
16
25
|
export class DOCKER extends Packager {
|
|
17
26
|
static get name() {
|
|
18
27
|
return "docker";
|
|
19
28
|
}
|
|
20
29
|
|
|
21
30
|
static get description() {
|
|
22
|
-
return "generate container image with docker
|
|
31
|
+
return "generate container image with docker or podman";
|
|
23
32
|
}
|
|
24
33
|
|
|
25
34
|
async execute(
|
|
@@ -49,7 +58,7 @@ ENTRYPOINT ["node", ""]
|
|
|
49
58
|
new ReadableStreamContentEntry(
|
|
50
59
|
entry.name,
|
|
51
60
|
keyValueTransformer(await entry.readStream, fp, {
|
|
52
|
-
...
|
|
61
|
+
...labelKeyValuePairs,
|
|
53
62
|
trailingLines
|
|
54
63
|
})
|
|
55
64
|
),
|
|
@@ -62,7 +71,7 @@ ENTRYPOINT ["node", ""]
|
|
|
62
71
|
expander
|
|
63
72
|
)) {
|
|
64
73
|
if (options.verbose) {
|
|
65
|
-
console.log(
|
|
74
|
+
console.log(file.destination);
|
|
66
75
|
}
|
|
67
76
|
}
|
|
68
77
|
|
package/src/output/rpm.mjs
CHANGED