npm-pkgbuild 17.0.2 → 17.1.1

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/README.md CHANGED
@@ -466,7 +466,7 @@ Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/
466
466
 
467
467
  ### prepare
468
468
 
469
- Prepares artifact generation
469
+ Prepares artifact generation.
470
470
 
471
471
  #### Parameters
472
472
 
@@ -528,7 +528,7 @@ Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/
528
528
 
529
529
  ### prepare
530
530
 
531
- Prepares artifact generation
531
+ Prepares artifact generation.
532
532
 
533
533
  #### Parameters
534
534
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "npm-pkgbuild",
3
- "version": "17.0.2",
3
+ "version": "17.1.1",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": false
@@ -52,7 +52,7 @@
52
52
  },
53
53
  "dependencies": {
54
54
  "@npmcli/arborist": "^9.0.0",
55
- "@vercel/nft": "^0.29.1",
55
+ "@vercel/nft": "^0.29.2",
56
56
  "aggregate-async-iterator": "^1.2.1",
57
57
  "commander": "^13.1.0",
58
58
  "compare-versions": "^6.1.1",
@@ -25,7 +25,7 @@ export class Packager {
25
25
  }
26
26
 
27
27
  /**
28
- * @return {{named:object,others:[]}}
28
+ * @return {{named:object,others:string[]}}
29
29
  */
30
30
  static get workspaceLayout() {
31
31
  return {
@@ -46,6 +46,7 @@ export class Packager {
46
46
  }
47
47
 
48
48
  #properties;
49
+ #prepared;
49
50
 
50
51
  /**
51
52
  * Base Packager
@@ -113,12 +114,17 @@ export class Packager {
113
114
  }
114
115
 
115
116
  /**
116
- * Prepares artifact generation
117
+ * Prepares artifact generation.
117
118
  * @param {Object} options
118
119
  * @param {Object} [publishingDetail]
119
120
  * @returns {Promise<{properties:Object, destination:string, tmpdir:string, staging:string}>}
120
121
  */
121
122
  async prepare(options, publishingDetail) {
123
+
124
+ if(this.#prepared) {
125
+ return this.#prepared;
126
+ }
127
+
122
128
  const tmpdir = await this.tmpdir;
123
129
 
124
130
  const out = {
@@ -150,6 +156,7 @@ export class Packager {
150
156
  await mkdir(out.destination, mdo);
151
157
  }
152
158
 
159
+ this.#prepared = out;
153
160
  return out;
154
161
  }
155
162
 
@@ -41,7 +41,7 @@ const hookMapping = {
41
41
  };
42
42
 
43
43
  /**
44
- * produce rpm packages
44
+ * Produce rpm packages.
45
45
  */
46
46
  export class RPM extends Packager {
47
47
  static get name() {
@@ -31,7 +31,7 @@ export const allInputs: (typeof NPMPackContentProvider)[];
31
31
  /**
32
32
  * All output formats
33
33
  */
34
- export const allOutputs: (typeof RPM | typeof OCI | typeof DOCKER)[];
34
+ export const allOutputs: (typeof OCI | typeof DOCKER)[];
35
35
  export namespace npmArchMapping {
36
36
  let arm64: string;
37
37
  let arm: string;
@@ -68,7 +68,6 @@ export type PackageDefinition = {
68
68
  };
69
69
  };
70
70
  import { NPMPackContentProvider } from "./content/npm-pack-content-provider.mjs";
71
- import { RPM } from "./output/rpm.mjs";
72
71
  import { OCI } from "./output/oci.mjs";
73
72
  import { DOCKER } from "./output/docker.mjs";
74
73
  import { ContentProvider } from "./content/content-provider.mjs";
@@ -15,11 +15,11 @@
15
15
  export class Packager {
16
16
  static get fields(): {};
17
17
  /**
18
- * @return {{named:object,others:[]}}
18
+ * @return {{named:object,others:string[]}}
19
19
  */
20
20
  static get workspaceLayout(): {
21
21
  named: object;
22
- others: [];
22
+ others: string[];
23
23
  };
24
24
  /**
25
25
  * @param {Object} options
@@ -47,7 +47,7 @@ export class Packager {
47
47
  */
48
48
  get tmpdir(): Promise<string>;
49
49
  /**
50
- * Prepares artifact generation
50
+ * Prepares artifact generation.
51
51
  * @param {Object} options
52
52
  * @param {Object} [publishingDetail]
53
53
  * @returns {Promise<{properties:Object, destination:string, tmpdir:string, staging:string}>}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * produce rpm packages
2
+ * Produce rpm packages.
3
3
  */
4
4
  export class RPM extends Packager {
5
5
  static get description(): string;