npm-pkgbuild 22.1.8 → 22.1.10
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/content/nft-content-provider.mjs +2 -1
- package/src/publish.mjs +5 -3
- package/src/util.mjs +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "npm-pkgbuild",
|
|
3
|
-
"version": "22.1.
|
|
3
|
+
"version": "22.1.10",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"provenance": false
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"key-value-transformer": "^3.3.2",
|
|
62
62
|
"npm-package-walker": "^8.0.11",
|
|
63
63
|
"npm-packlist": "^11.3.0",
|
|
64
|
-
"pacc": "^11.10.
|
|
64
|
+
"pacc": "^11.10.2",
|
|
65
65
|
"package-directory": "^8.2.0",
|
|
66
66
|
"pacote": "^22.0.0",
|
|
67
67
|
"picomatch": "^4.0.7",
|
|
@@ -37,7 +37,8 @@ export class NFTContentProvider extends ContentProvider {
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
toString() {
|
|
40
|
-
|
|
40
|
+
const str = `${this.constructor.name}: ${this.start}`;
|
|
41
|
+
return this.destination ? str + " -> " + this.destination : str;
|
|
41
42
|
}
|
|
42
43
|
|
|
43
44
|
/**
|
package/src/publish.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { basename } from "node:path";
|
|
2
2
|
import { createReadStream } from "node:fs";
|
|
3
3
|
import { mkdir, copyFile } from "node:fs/promises";
|
|
4
|
+
import { asArray } from "pacc";
|
|
4
5
|
import { decodePassword } from "./util.mjs";
|
|
5
6
|
|
|
6
7
|
/**
|
|
@@ -22,8 +23,8 @@ import { decodePassword } from "./util.mjs";
|
|
|
22
23
|
* @param {string} [properties.username]
|
|
23
24
|
* @return {PublishingDetail[]}
|
|
24
25
|
*/
|
|
25
|
-
export function createPublishingDetails(locations
|
|
26
|
-
locations =
|
|
26
|
+
export function createPublishingDetails(locations, properties) {
|
|
27
|
+
locations = asArray(locations);
|
|
27
28
|
|
|
28
29
|
let publishPropertyFound = false;
|
|
29
30
|
|
|
@@ -150,7 +151,8 @@ export async function publish(
|
|
|
150
151
|
|
|
151
152
|
if (!response.ok) {
|
|
152
153
|
throw new Error(
|
|
153
|
-
`Unable to publish to ${url}: ${response.statusText}(${response.status})`,
|
|
154
|
+
`Unable to publish to ${url}: ${response.statusText}(${response.status})`,
|
|
155
|
+
{ cause: response }
|
|
154
156
|
);
|
|
155
157
|
}
|
|
156
158
|
}
|
package/src/util.mjs
CHANGED
|
@@ -162,7 +162,7 @@ export function fieldProvider(properties, attributes) {
|
|
|
162
162
|
if (attribute.mandatory) {
|
|
163
163
|
console.error(`Missing value for mandatory attribute ${name}`);
|
|
164
164
|
}
|
|
165
|
-
if (attribute.
|
|
165
|
+
if (attribute.skipEmpty) {
|
|
166
166
|
continue;
|
|
167
167
|
}
|
|
168
168
|
} else {
|
|
@@ -171,7 +171,7 @@ export function fieldProvider(properties, attributes) {
|
|
|
171
171
|
} else {
|
|
172
172
|
if (attribute.mapping) {
|
|
173
173
|
const mappedValue = attribute.mapping[value];
|
|
174
|
-
if (mappedValue) {
|
|
174
|
+
if (mappedValue !== undefined) {
|
|
175
175
|
value = mappedValue;
|
|
176
176
|
}
|
|
177
177
|
}
|