npm-pkgbuild 21.0.0 → 21.0.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 +162 -173
- package/package.json +4 -4
- package/src/output/alpm.mjs +3 -3
package/README.md
CHANGED
|
@@ -88,124 +88,113 @@ See [mf-hosting](https://www.npmjs.com/package/mf-hosting) or [mf-hosting-fronte
|
|
|
88
88
|
|
|
89
89
|
### Table of Contents
|
|
90
90
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
- [Properties](#properties-6)
|
|
199
|
-
- [extractFunctions](#extractfunctions)
|
|
200
|
-
- [Parameters](#parameters-29)
|
|
201
|
-
- [fieldProvider](#fieldprovider)
|
|
202
|
-
- [Parameters](#parameters-30)
|
|
203
|
-
- [Expander](#expander)
|
|
204
|
-
- [Parameters](#parameters-31)
|
|
205
|
-
- [copyEntries](#copyentries)
|
|
206
|
-
- [Parameters](#parameters-32)
|
|
207
|
-
- [install](#install)
|
|
208
|
-
- [license](#license)
|
|
91
|
+
* [allInputs](#allinputs)
|
|
92
|
+
* [allOutputs](#alloutputs)
|
|
93
|
+
* [npmArchMapping](#npmarchmapping)
|
|
94
|
+
* [content2Sources](#content2sources)
|
|
95
|
+
* [Parameters](#parameters)
|
|
96
|
+
* [PackageDefinition](#packagedefinition)
|
|
97
|
+
* [Properties](#properties)
|
|
98
|
+
* [extractFromPackage](#extractfrompackage)
|
|
99
|
+
* [Parameters](#parameters-1)
|
|
100
|
+
* [BUILDAH](#buildah)
|
|
101
|
+
* [ContentProvider](#contentprovider)
|
|
102
|
+
* [Parameters](#parameters-2)
|
|
103
|
+
* [Properties](#properties-1)
|
|
104
|
+
* [propertiesFor](#propertiesfor)
|
|
105
|
+
* [Parameters](#parameters-3)
|
|
106
|
+
* [asyncIterator](#asynciterator)
|
|
107
|
+
* [FileContentProvider](#filecontentprovider)
|
|
108
|
+
* [Parameters](#parameters-4)
|
|
109
|
+
* [asyncIterator](#asynciterator-1)
|
|
110
|
+
* [name](#name)
|
|
111
|
+
* [NodeModulesContentProvider](#nodemodulescontentprovider)
|
|
112
|
+
* [Parameters](#parameters-5)
|
|
113
|
+
* [Properties](#properties-2)
|
|
114
|
+
* [asyncIterator](#asynciterator-2)
|
|
115
|
+
* [name](#name-1)
|
|
116
|
+
* [NPMPackContentProvider](#npmpackcontentprovider)
|
|
117
|
+
* [Parameters](#parameters-6)
|
|
118
|
+
* [Properties](#properties-3)
|
|
119
|
+
* [name](#name-2)
|
|
120
|
+
* [NFTContentProvider](#nftcontentprovider)
|
|
121
|
+
* [Parameters](#parameters-7)
|
|
122
|
+
* [asyncIterator](#asynciterator-3)
|
|
123
|
+
* [name](#name-3)
|
|
124
|
+
* [DEBIAN](#debian)
|
|
125
|
+
* [hookMapping](#hookmapping)
|
|
126
|
+
* [attributes](#attributes)
|
|
127
|
+
* [prepare](#prepare)
|
|
128
|
+
* [Parameters](#parameters-8)
|
|
129
|
+
* [quoteFile](#quotefile)
|
|
130
|
+
* [Parameters](#parameters-9)
|
|
131
|
+
* [RPM](#rpm)
|
|
132
|
+
* [hookMapping](#hookmapping-1)
|
|
133
|
+
* [attributes](#attributes-1)
|
|
134
|
+
* [prepare](#prepare-1)
|
|
135
|
+
* [Parameters](#parameters-10)
|
|
136
|
+
* [pkgKeyValuePairOptions](#pkgkeyvaluepairoptions)
|
|
137
|
+
* [attributes](#attributes-2)
|
|
138
|
+
* [OCI](#oci)
|
|
139
|
+
* [DOCKER](#docker)
|
|
140
|
+
* [attributes](#attributes-3)
|
|
141
|
+
* [prepare](#prepare-2)
|
|
142
|
+
* [Parameters](#parameters-11)
|
|
143
|
+
* [Packager](#packager)
|
|
144
|
+
* [Parameters](#parameters-12)
|
|
145
|
+
* [packageName](#packagename)
|
|
146
|
+
* [Parameters](#parameters-13)
|
|
147
|
+
* [hookContent](#hookcontent)
|
|
148
|
+
* [dependencyExpression](#dependencyexpression)
|
|
149
|
+
* [Parameters](#parameters-14)
|
|
150
|
+
* [tmpdir](#tmpdir)
|
|
151
|
+
* [prepare](#prepare-3)
|
|
152
|
+
* [Parameters](#parameters-15)
|
|
153
|
+
* [create](#create)
|
|
154
|
+
* [Parameters](#parameters-16)
|
|
155
|
+
* [workspaceLayout](#workspacelayout)
|
|
156
|
+
* [prepare](#prepare-4)
|
|
157
|
+
* [Parameters](#parameters-17)
|
|
158
|
+
* [Packager](#packager-1)
|
|
159
|
+
* [Parameters](#parameters-18)
|
|
160
|
+
* [packageName](#packagename-1)
|
|
161
|
+
* [Parameters](#parameters-19)
|
|
162
|
+
* [hookContent](#hookcontent-1)
|
|
163
|
+
* [dependencyExpression](#dependencyexpression-1)
|
|
164
|
+
* [Parameters](#parameters-20)
|
|
165
|
+
* [tmpdir](#tmpdir-1)
|
|
166
|
+
* [prepare](#prepare-5)
|
|
167
|
+
* [Parameters](#parameters-21)
|
|
168
|
+
* [create](#create-1)
|
|
169
|
+
* [Parameters](#parameters-22)
|
|
170
|
+
* [workspaceLayout](#workspacelayout-1)
|
|
171
|
+
* [prepare](#prepare-6)
|
|
172
|
+
* [Parameters](#parameters-23)
|
|
173
|
+
* [Field](#field)
|
|
174
|
+
* [Properties](#properties-4)
|
|
175
|
+
* [deleteKey](#deletekey)
|
|
176
|
+
* [Parameters](#parameters-24)
|
|
177
|
+
* [copyNodeModules](#copynodemodules)
|
|
178
|
+
* [Parameters](#parameters-25)
|
|
179
|
+
* [PublishingDetail](#publishingdetail)
|
|
180
|
+
* [Properties](#properties-5)
|
|
181
|
+
* [createPublishingDetails](#createpublishingdetails)
|
|
182
|
+
* [Parameters](#parameters-26)
|
|
183
|
+
* [publish](#publish)
|
|
184
|
+
* [Parameters](#parameters-27)
|
|
185
|
+
* [utf8StreamOptions](#utf8streamoptions)
|
|
186
|
+
* [decodePassword](#decodepassword)
|
|
187
|
+
* [Parameters](#parameters-28)
|
|
188
|
+
* [FunctionDecl](#functiondecl)
|
|
189
|
+
* [Properties](#properties-6)
|
|
190
|
+
* [extractFunctions](#extractfunctions)
|
|
191
|
+
* [Parameters](#parameters-29)
|
|
192
|
+
* [fieldProvider](#fieldprovider)
|
|
193
|
+
* [Parameters](#parameters-30)
|
|
194
|
+
* [Expander](#expander)
|
|
195
|
+
* [Parameters](#parameters-31)
|
|
196
|
+
* [copyEntries](#copyentries)
|
|
197
|
+
* [Parameters](#parameters-32)
|
|
209
198
|
|
|
210
199
|
## allInputs
|
|
211
200
|
|
|
@@ -268,22 +257,57 @@ Extract package definition from package.json.
|
|
|
268
257
|
|
|
269
258
|
Returns **AsyncIterable<[PackageDefinition](#packagedefinition)>** 
|
|
270
259
|
|
|
271
|
-
##
|
|
260
|
+
## BUILDAH
|
|
272
261
|
|
|
273
|
-
**Extends
|
|
262
|
+
**Extends DOCKER**
|
|
274
263
|
|
|
275
|
-
|
|
264
|
+
Use buildah @see <https://buildah.io>
|
|
265
|
+
|
|
266
|
+
## ContentProvider
|
|
267
|
+
|
|
268
|
+
Source of package content.
|
|
276
269
|
|
|
277
270
|
### Parameters
|
|
278
271
|
|
|
279
272
|
* `definitions` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 
|
|
280
|
-
* `entryProperties` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)
|
|
281
|
-
* `directoryProperties`
|
|
273
|
+
* `entryProperties` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** 
|
|
274
|
+
* `directoryProperties` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** 
|
|
282
275
|
|
|
283
276
|
### Properties
|
|
284
277
|
|
|
285
278
|
* `dir` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
|
|
286
279
|
|
|
280
|
+
### propertiesFor
|
|
281
|
+
|
|
282
|
+
#### Parameters
|
|
283
|
+
|
|
284
|
+
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
|
|
285
|
+
* `isCollection` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** 
|
|
286
|
+
|
|
287
|
+
Returns **([Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) | [undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined))** 
|
|
288
|
+
|
|
289
|
+
### asyncIterator
|
|
290
|
+
|
|
291
|
+
List all entries.
|
|
292
|
+
|
|
293
|
+
Returns **AsyncIterable<(ContentEntry | CollectionEntry)>** all entries
|
|
294
|
+
|
|
295
|
+
## FileContentProvider
|
|
296
|
+
|
|
297
|
+
**Extends ContentProvider**
|
|
298
|
+
|
|
299
|
+
Content provided form the file system.
|
|
300
|
+
|
|
301
|
+
### Parameters
|
|
302
|
+
|
|
303
|
+
* `definitions` **([Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) | [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String))** 
|
|
304
|
+
* `entryProperties`  
|
|
305
|
+
* `directoryProperties`  
|
|
306
|
+
|
|
307
|
+
### asyncIterator
|
|
308
|
+
|
|
309
|
+
Returns **AsyncIterable<(ContentEntry | CollectionEntry)>** all entries
|
|
310
|
+
|
|
287
311
|
### name
|
|
288
312
|
|
|
289
313
|
Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** name of the content provider
|
|
@@ -315,21 +339,21 @@ Returns **AsyncIterable<(ContentEntry | CollectionEntry)>** all entries
|
|
|
315
339
|
|
|
316
340
|
Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** name of the content provider
|
|
317
341
|
|
|
318
|
-
##
|
|
342
|
+
## NPMPackContentProvider
|
|
319
343
|
|
|
320
344
|
**Extends ContentProvider**
|
|
321
345
|
|
|
322
|
-
Content
|
|
346
|
+
Content from npm pack.
|
|
323
347
|
|
|
324
348
|
### Parameters
|
|
325
349
|
|
|
326
|
-
* `definitions` **
|
|
327
|
-
* `entryProperties`
|
|
350
|
+
* `definitions` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 
|
|
351
|
+
* `entryProperties` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** to be set for each entry
|
|
328
352
|
* `directoryProperties`  
|
|
329
353
|
|
|
330
|
-
###
|
|
354
|
+
### Properties
|
|
331
355
|
|
|
332
|
-
|
|
356
|
+
* `dir` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
|
|
333
357
|
|
|
334
358
|
### name
|
|
335
359
|
|
|
@@ -355,35 +379,6 @@ Returns **AsyncIterable\<ContentEntry>** all entries
|
|
|
355
379
|
|
|
356
380
|
Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** name of the content provider
|
|
357
381
|
|
|
358
|
-
## ContentProvider
|
|
359
|
-
|
|
360
|
-
Source of package content.
|
|
361
|
-
|
|
362
|
-
### Parameters
|
|
363
|
-
|
|
364
|
-
* `definitions` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 
|
|
365
|
-
* `entryProperties` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** 
|
|
366
|
-
* `directoryProperties` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** 
|
|
367
|
-
|
|
368
|
-
### Properties
|
|
369
|
-
|
|
370
|
-
* `dir` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
|
|
371
|
-
|
|
372
|
-
### propertiesFor
|
|
373
|
-
|
|
374
|
-
#### Parameters
|
|
375
|
-
|
|
376
|
-
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
|
|
377
|
-
* `isCollection` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** 
|
|
378
|
-
|
|
379
|
-
Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 
|
|
380
|
-
|
|
381
|
-
### asyncIterator
|
|
382
|
-
|
|
383
|
-
List all entries.
|
|
384
|
-
|
|
385
|
-
Returns **AsyncIterable<(ContentEntry | CollectionEntry)>** all entries
|
|
386
|
-
|
|
387
382
|
## DEBIAN
|
|
388
383
|
|
|
389
384
|
**Extends Packager**
|
|
@@ -410,15 +405,6 @@ Map install hook named from default (arch) to deb.
|
|
|
410
405
|
|
|
411
406
|
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)>** 
|
|
412
407
|
|
|
413
|
-
## pkgKeyValuePairOptions
|
|
414
|
-
|
|
415
|
-
Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)
|
|
416
|
-
|
|
417
|
-
## attributes
|
|
418
|
-
|
|
419
|
-
well known package properties
|
|
420
|
-
<https://www.archlinux.org/pacman/PKGBUILD.5.html>
|
|
421
|
-
|
|
422
408
|
## quoteFile
|
|
423
409
|
|
|
424
410
|
### Parameters
|
|
@@ -452,6 +438,15 @@ Check for rpmbuild presence.
|
|
|
452
438
|
|
|
453
439
|
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)>** true when rpmbuild executable is present
|
|
454
440
|
|
|
441
|
+
## pkgKeyValuePairOptions
|
|
442
|
+
|
|
443
|
+
Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)
|
|
444
|
+
|
|
445
|
+
## attributes
|
|
446
|
+
|
|
447
|
+
well known package properties
|
|
448
|
+
<https://www.archlinux.org/pacman/PKGBUILD.5.html>
|
|
449
|
+
|
|
455
450
|
## OCI
|
|
456
451
|
|
|
457
452
|
**Extends Packager**
|
|
@@ -481,12 +476,6 @@ Check for docker presence.
|
|
|
481
476
|
|
|
482
477
|
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)>** true when docker executable is present
|
|
483
478
|
|
|
484
|
-
## BUILDAH
|
|
485
|
-
|
|
486
|
-
**Extends DOCKER**
|
|
487
|
-
|
|
488
|
-
Use buildah @see <https://buildah.io>
|
|
489
|
-
|
|
490
479
|
## Packager
|
|
491
480
|
|
|
492
481
|
### Parameters
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "npm-pkgbuild",
|
|
3
|
-
"version": "21.0.
|
|
3
|
+
"version": "21.0.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"provenance": false
|
|
@@ -52,9 +52,9 @@
|
|
|
52
52
|
"aggregate-async-iterator": "^1.2.5",
|
|
53
53
|
"commander": "^15.0.0",
|
|
54
54
|
"compare-versions": "^6.1.1",
|
|
55
|
-
"content-entry": "^15.0.
|
|
56
|
-
"content-entry-filesystem": "^9.1.
|
|
57
|
-
"content-entry-transform": "^1.7.
|
|
55
|
+
"content-entry": "^15.0.2",
|
|
56
|
+
"content-entry-filesystem": "^9.1.1",
|
|
57
|
+
"content-entry-transform": "^1.7.3",
|
|
58
58
|
"execa": "^10.0.1",
|
|
59
59
|
"ini": "^7.0.0",
|
|
60
60
|
"iterable-string-interceptor": "^3.0.8",
|
package/src/output/alpm.mjs
CHANGED
|
@@ -68,7 +68,7 @@ let _architecture = "aarch64";
|
|
|
68
68
|
|
|
69
69
|
export class ALPM extends Packager {
|
|
70
70
|
static get alias() {
|
|
71
|
-
return "
|
|
71
|
+
return "arch";
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
static get name() {
|
|
@@ -295,13 +295,13 @@ package() {
|
|
|
295
295
|
const flags = {
|
|
296
296
|
user: ["-u", f => f.user],
|
|
297
297
|
group: ["-g", f => f.group],
|
|
298
|
-
mode: ["-m", f => Number(f.mode).toString(8)]
|
|
298
|
+
mode: ["-m", f => Number(f.mode && 0o7777).toString(8)] // TODO why only 12 bits
|
|
299
299
|
};
|
|
300
300
|
|
|
301
301
|
content =
|
|
302
302
|
content.substring(0, markerPos) +
|
|
303
303
|
permissions
|
|
304
|
-
.filter(f=>f.isBlob)
|
|
304
|
+
.filter(f => f.isBlob)
|
|
305
305
|
.map(f => {
|
|
306
306
|
const options = Object.keys(flags)
|
|
307
307
|
.filter(name => f[name])
|