npm-pkgbuild 16.1.1 → 17.0.0
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 +57 -62
- package/package.json +2 -2
- package/src/output/arch.mjs +8 -2
- package/types/output/arch.d.mts +0 -3
package/README.md
CHANGED
|
@@ -99,25 +99,24 @@ See [mf-hosting](https://www.npmjs.com/package/mf-hosting) or [mf-hosting-fronte
|
|
|
99
99
|
* [Properties](#properties)
|
|
100
100
|
* [extractFromPackage](#extractfrompackage)
|
|
101
101
|
* [Parameters](#parameters-1)
|
|
102
|
-
* [
|
|
103
|
-
* [ContentProvider](#contentprovider)
|
|
102
|
+
* [NPMPackContentProvider](#npmpackcontentprovider)
|
|
104
103
|
* [Parameters](#parameters-2)
|
|
105
104
|
* [Properties](#properties-1)
|
|
106
|
-
* [asyncIterator](#asynciterator)
|
|
107
|
-
* [FileContentProvider](#filecontentprovider)
|
|
108
|
-
* [Parameters](#parameters-3)
|
|
109
105
|
* [name](#name)
|
|
110
106
|
* [NodeModulesContentProvider](#nodemodulescontentprovider)
|
|
111
|
-
* [Parameters](#parameters-
|
|
107
|
+
* [Parameters](#parameters-3)
|
|
112
108
|
* [Properties](#properties-2)
|
|
113
109
|
* [name](#name-1)
|
|
114
|
-
* [
|
|
115
|
-
* [Parameters](#parameters-
|
|
116
|
-
* [Properties](#properties-3)
|
|
110
|
+
* [FileContentProvider](#filecontentprovider)
|
|
111
|
+
* [Parameters](#parameters-4)
|
|
117
112
|
* [name](#name-2)
|
|
118
113
|
* [NFTContentProvider](#nftcontentprovider)
|
|
119
|
-
* [Parameters](#parameters-
|
|
114
|
+
* [Parameters](#parameters-5)
|
|
120
115
|
* [name](#name-3)
|
|
116
|
+
* [ContentProvider](#contentprovider)
|
|
117
|
+
* [Parameters](#parameters-6)
|
|
118
|
+
* [Properties](#properties-3)
|
|
119
|
+
* [asyncIterator](#asynciterator)
|
|
121
120
|
* [hookMapping](#hookmapping)
|
|
122
121
|
* [hookMapping](#hookmapping-1)
|
|
123
122
|
* [DEBIAN](#debian)
|
|
@@ -127,16 +126,17 @@ See [mf-hosting](https://www.npmjs.com/package/mf-hosting) or [mf-hosting-fronte
|
|
|
127
126
|
* [fields](#fields-1)
|
|
128
127
|
* [fields](#fields-2)
|
|
129
128
|
* [fields](#fields-3)
|
|
129
|
+
* [pkgKeyValuePairOptions](#pkgkeyvaluepairoptions)
|
|
130
130
|
* [quoteFile](#quotefile)
|
|
131
131
|
* [Parameters](#parameters-8)
|
|
132
132
|
* [RPM](#rpm)
|
|
133
133
|
* [prepare](#prepare-1)
|
|
134
134
|
* [Parameters](#parameters-9)
|
|
135
|
-
* [pkgKeyValuePairOptions](#pkgkeyvaluepairoptions)
|
|
136
135
|
* [OCI](#oci)
|
|
137
136
|
* [DOCKER](#docker)
|
|
138
137
|
* [prepare](#prepare-2)
|
|
139
138
|
* [Parameters](#parameters-10)
|
|
139
|
+
* [BUILDAH](#buildah)
|
|
140
140
|
* [Packager](#packager)
|
|
141
141
|
* [Parameters](#parameters-11)
|
|
142
142
|
* [packageName](#packagename)
|
|
@@ -172,11 +172,10 @@ See [mf-hosting](https://www.npmjs.com/package/mf-hosting) or [mf-hosting-fronte
|
|
|
172
172
|
* [publish](#publish)
|
|
173
173
|
* [Parameters](#parameters-23)
|
|
174
174
|
* [utf8StreamOptions](#utf8streamoptions)
|
|
175
|
-
* [Properties](#properties-6)
|
|
176
175
|
* [decodePassword](#decodepassword)
|
|
177
176
|
* [Parameters](#parameters-24)
|
|
178
177
|
* [FunctionDecl](#functiondecl)
|
|
179
|
-
* [Properties](#properties-
|
|
178
|
+
* [Properties](#properties-6)
|
|
180
179
|
* [extractFunctions](#extractfunctions)
|
|
181
180
|
* [Parameters](#parameters-25)
|
|
182
181
|
* [fieldProvider](#fieldprovider)
|
|
@@ -245,45 +244,20 @@ Extract package definition from package.json.
|
|
|
245
244
|
|
|
246
245
|
Returns **AsyncIterable<[PackageDefinition](#packagedefinition)>** 
|
|
247
246
|
|
|
248
|
-
##
|
|
249
|
-
|
|
250
|
-
**Extends DOCKER**
|
|
251
|
-
|
|
252
|
-
Use buildah @see <https://buildah.io>
|
|
247
|
+
## NPMPackContentProvider
|
|
253
248
|
|
|
254
|
-
|
|
249
|
+
**Extends ContentProvider**
|
|
255
250
|
|
|
256
|
-
|
|
251
|
+
Content from npm pack.
|
|
257
252
|
|
|
258
253
|
### Parameters
|
|
259
254
|
|
|
260
|
-
* `definitions`
|
|
261
|
-
* `entryProperties`
|
|
255
|
+
* `definitions` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 
|
|
256
|
+
* `entryProperties` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** to be set for each entry
|
|
262
257
|
|
|
263
258
|
### Properties
|
|
264
259
|
|
|
265
260
|
* `dir` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
|
|
266
|
-
* `transformer` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\<Transformer>** 
|
|
267
|
-
|
|
268
|
-
### asyncIterator
|
|
269
|
-
|
|
270
|
-
List all entries.
|
|
271
|
-
|
|
272
|
-
Returns **AsyncIterable\<ContentEntry>** all entries
|
|
273
|
-
|
|
274
|
-
## FileContentProvider
|
|
275
|
-
|
|
276
|
-
**Extends ContentProvider**
|
|
277
|
-
|
|
278
|
-
Content provided form the file system.
|
|
279
|
-
|
|
280
|
-
### Parameters
|
|
281
|
-
|
|
282
|
-
* `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))** 
|
|
283
|
-
|
|
284
|
-
* `definitions.pattern` **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) | [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>)** 
|
|
285
|
-
* `definitions.base` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** base directory where to find the files
|
|
286
|
-
* `entryProperties`  
|
|
287
261
|
|
|
288
262
|
### name
|
|
289
263
|
|
|
@@ -309,20 +283,19 @@ Requires .npmrc or NPM\_TOKEN environment
|
|
|
309
283
|
|
|
310
284
|
Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** name of the content provider
|
|
311
285
|
|
|
312
|
-
##
|
|
286
|
+
## FileContentProvider
|
|
313
287
|
|
|
314
288
|
**Extends ContentProvider**
|
|
315
289
|
|
|
316
|
-
Content
|
|
290
|
+
Content provided form the file system.
|
|
317
291
|
|
|
318
292
|
### Parameters
|
|
319
293
|
|
|
320
|
-
* `definitions` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 
|
|
321
|
-
* `entryProperties` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** to be set for each entry
|
|
322
|
-
|
|
323
|
-
### Properties
|
|
294
|
+
* `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))** 
|
|
324
295
|
|
|
325
|
-
* `
|
|
296
|
+
* `definitions.pattern` **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) | [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>)** 
|
|
297
|
+
* `definitions.base` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** base directory where to find the files
|
|
298
|
+
* `entryProperties`  
|
|
326
299
|
|
|
327
300
|
### name
|
|
328
301
|
|
|
@@ -346,6 +319,26 @@ Content provided form the file system.
|
|
|
346
319
|
|
|
347
320
|
Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** name of the content provider
|
|
348
321
|
|
|
322
|
+
## ContentProvider
|
|
323
|
+
|
|
324
|
+
Source of package content.
|
|
325
|
+
|
|
326
|
+
### Parameters
|
|
327
|
+
|
|
328
|
+
* `definitions`  
|
|
329
|
+
* `entryProperties`  
|
|
330
|
+
|
|
331
|
+
### Properties
|
|
332
|
+
|
|
333
|
+
* `dir` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
|
|
334
|
+
* `transformer` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\<Transformer>** 
|
|
335
|
+
|
|
336
|
+
### asyncIterator
|
|
337
|
+
|
|
338
|
+
List all entries.
|
|
339
|
+
|
|
340
|
+
Returns **AsyncIterable\<ContentEntry>** all entries
|
|
341
|
+
|
|
349
342
|
## hookMapping
|
|
350
343
|
|
|
351
344
|
map install hook named from arch to deb
|
|
@@ -378,17 +371,21 @@ Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/
|
|
|
378
371
|
|
|
379
372
|
## fields
|
|
380
373
|
|
|
381
|
-
|
|
374
|
+
well known package properties
|
|
375
|
+
<https://www.archlinux.org/pacman/PKGBUILD.5.html>
|
|
382
376
|
|
|
383
377
|
## fields
|
|
384
378
|
|
|
385
|
-
|
|
386
|
-
<https://www.archlinux.org/pacman/PKGBUILD.5.html>
|
|
379
|
+
* **See**: <https://rpm-packaging-guide.github.io>
|
|
387
380
|
|
|
388
381
|
## fields
|
|
389
382
|
|
|
390
383
|
* **See**: <https://docs.docker.com/engine/reference/builder/>
|
|
391
384
|
|
|
385
|
+
## pkgKeyValuePairOptions
|
|
386
|
+
|
|
387
|
+
Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)
|
|
388
|
+
|
|
392
389
|
## quoteFile
|
|
393
390
|
|
|
394
391
|
### Parameters
|
|
@@ -414,10 +411,6 @@ Check for rpmbuild presence.
|
|
|
414
411
|
|
|
415
412
|
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
|
|
416
413
|
|
|
417
|
-
## pkgKeyValuePairOptions
|
|
418
|
-
|
|
419
|
-
Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)
|
|
420
|
-
|
|
421
414
|
## OCI
|
|
422
415
|
|
|
423
416
|
**Extends Packager**
|
|
@@ -443,6 +436,12 @@ Check for docker presence.
|
|
|
443
436
|
|
|
444
437
|
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
|
|
445
438
|
|
|
439
|
+
## BUILDAH
|
|
440
|
+
|
|
441
|
+
**Extends DOCKER**
|
|
442
|
+
|
|
443
|
+
Use buildah @see <https://buildah.io>
|
|
444
|
+
|
|
446
445
|
## Packager
|
|
447
446
|
|
|
448
447
|
### Parameters
|
|
@@ -622,11 +621,7 @@ Returns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Gl
|
|
|
622
621
|
|
|
623
622
|
## utf8StreamOptions
|
|
624
623
|
|
|
625
|
-
Type:
|
|
626
|
-
|
|
627
|
-
### Properties
|
|
628
|
-
|
|
629
|
-
* `encoding` **BufferEncoding** 
|
|
624
|
+
Type: BufferEncoding
|
|
630
625
|
|
|
631
626
|
## decodePassword
|
|
632
627
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "npm-pkgbuild",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "17.0.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"provenance": false
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"ini": "^5.0.0",
|
|
66
66
|
"iterable-string-interceptor": "^3.0.0",
|
|
67
67
|
"key-value-transformer": "^3.2.3",
|
|
68
|
-
"npm-package-walker": "^
|
|
68
|
+
"npm-package-walker": "^8.0.0",
|
|
69
69
|
"npm-packlist": "^10.0.0",
|
|
70
70
|
"pacote": "^21.0.0",
|
|
71
71
|
"pkg-dir": "^8.0.0",
|
package/src/output/arch.mjs
CHANGED
|
@@ -117,6 +117,12 @@ export class ARCH extends Packager {
|
|
|
117
117
|
}
|
|
118
118
|
|
|
119
119
|
makeDepends(dependencies={}) {
|
|
120
|
+
if(Array.isArray(dependencies)) {
|
|
121
|
+
dependencies = Object.fromEntries(dependencies.map(d => {
|
|
122
|
+
const m = d.match(/^([^=<>]+)(.*)/)
|
|
123
|
+
return [m[1],m[2]];
|
|
124
|
+
}));
|
|
125
|
+
}
|
|
120
126
|
return Object.entries(dependencies)
|
|
121
127
|
.filter(filterOutUnwantedDependencies())
|
|
122
128
|
.map(
|
|
@@ -146,7 +152,7 @@ export class ARCH extends Packager {
|
|
|
146
152
|
yield `
|
|
147
153
|
package() {
|
|
148
154
|
depends=(${self
|
|
149
|
-
.makeDepends(properties.
|
|
155
|
+
.makeDepends(properties.depends)
|
|
150
156
|
.map(v => quote(v))
|
|
151
157
|
.join(" ")})
|
|
152
158
|
|
|
@@ -267,7 +273,7 @@ const fields = {
|
|
|
267
273
|
groups: default_array_attribute,
|
|
268
274
|
arch: { ...default_array_attribute, default: ["any"], mandatory: true },
|
|
269
275
|
backup: default_array_attribute,
|
|
270
|
-
depends: default_array_attribute,
|
|
276
|
+
//depends: default_array_attribute,
|
|
271
277
|
makedepends: default_attribute,
|
|
272
278
|
checkdepends: default_attribute,
|
|
273
279
|
optdepends: default_attribute,
|