npm-pkgbuild 22.1.10 → 22.1.11
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 +2 -2
- package/package.json +1 -1
- package/src/util.mjs +8 -5
package/README.md
CHANGED
|
@@ -350,7 +350,7 @@ Source of package content.
|
|
|
350
350
|
* `dir` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
|
|
351
351
|
* `destination` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
|
|
352
352
|
* `defaultProperties` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 
|
|
353
|
-
* `permissions` **[Map](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Map)<[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object), [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)
|
|
353
|
+
* `permissions` **([Map](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Map)<[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object), [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)> | [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object))** 
|
|
354
354
|
|
|
355
355
|
### propertiesFor
|
|
356
356
|
|
|
@@ -676,7 +676,7 @@ Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Globa
|
|
|
676
676
|
|
|
677
677
|
### Parameters
|
|
678
678
|
|
|
679
|
-
* `locations` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)
|
|
679
|
+
* `locations` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>** 
|
|
680
680
|
* `properties` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** 
|
|
681
681
|
|
|
682
682
|
* `properties.PKGBUILD_PUBLISH` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** 
|
package/package.json
CHANGED
package/src/util.mjs
CHANGED
|
@@ -222,17 +222,20 @@ export async function* copyEntries(
|
|
|
222
222
|
entry.destination = name;
|
|
223
223
|
const destination = join(destinationDirectory, name);
|
|
224
224
|
|
|
225
|
+
let options;
|
|
226
|
+
const mode = await entry.mode;
|
|
227
|
+
if (mode) {
|
|
228
|
+
options = { mode };
|
|
229
|
+
}
|
|
230
|
+
|
|
225
231
|
if (entry.isCollection) {
|
|
226
|
-
await mkdir(destination, { recursive: true,
|
|
232
|
+
await mkdir(destination, { recursive: true, ...options });
|
|
227
233
|
} else {
|
|
228
234
|
await mkdir(dirname(destination), { recursive: true });
|
|
229
235
|
|
|
230
236
|
await pipeline(
|
|
231
237
|
Readable.fromWeb(await entry.stream),
|
|
232
|
-
createWriteStream(
|
|
233
|
-
destination,
|
|
234
|
-
entry.mode ? { mode: await entry.mode } : undefined
|
|
235
|
-
)
|
|
238
|
+
createWriteStream(destination, options)
|
|
236
239
|
);
|
|
237
240
|
}
|
|
238
241
|
|