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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "npm-pkgbuild",
3
- "version": "11.1.14",
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.0",
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
- console.log(`${name}: requirement fullfilled`, requires);
153
+ if(options.verbose) {
154
+ console.log(`${name}: requirement fullfilled`, requires);
155
+ }
154
156
  } else {
155
- console.log(`${name}: requirement not fullfilled`, requires);
157
+ if(options.verbose) {
158
+ console.log(`${name}: requirement not fullfilled`, requires);
159
+ }
156
160
  continue;
157
161
  }
158
162
  } else {
159
- console.log(`${name}: load`);
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 && !variant.restrictArch.has(a)) {
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;
@@ -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|podman";
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
- ...equalSeparatedKeyValuePairOptions,
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("D", file.destination);
74
+ console.log(file.destination);
66
75
  }
67
76
  }
68
77
 
@@ -162,7 +162,7 @@ export class RPM extends Packager {
162
162
 
163
163
  if (options.verbose) {
164
164
  console.log(
165
- await readFile(join(staging, specFileName), { encoding: "utf8" })
165
+ await readFile(join(staging, specFileName), utf8StreamOptions)
166
166
  );
167
167
  }
168
168