npm-pkgbuild 19.1.5 → 19.2.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 +65 -65
- package/package.json +4 -4
- package/src/content/content-provider.mjs +13 -2
- package/src/content/file-content-provider.mjs +23 -20
- package/src/content/nft-content-provider.mjs +15 -11
- package/src/npm-pkgbuild-cli.mjs +6 -2
- package/src/output/arch.mjs +6 -1
- package/types/content/content-provider.d.mts +21 -5
- package/types/content/file-content-provider.d.mts +10 -5
- package/types/content/nft-content-provider.d.mts +14 -4
- package/types/content/node-modules-content-provider.d.mts +1 -0
- package/types/content/npm-pack-content-provider.d.mts +1 -0
- package/types/output/arch.d.mts +1 -0
package/README.md
CHANGED
|
@@ -98,47 +98,47 @@ See [mf-hosting](https://www.npmjs.com/package/mf-hosting) or [mf-hosting-fronte
|
|
|
98
98
|
* [Properties](#properties)
|
|
99
99
|
* [extractFromPackage](#extractfrompackage)
|
|
100
100
|
* [Parameters](#parameters-1)
|
|
101
|
-
* [
|
|
101
|
+
* [BUILDAH](#buildah)
|
|
102
|
+
* [ContentProvider](#contentprovider)
|
|
102
103
|
* [Parameters](#parameters-2)
|
|
103
104
|
* [Properties](#properties-1)
|
|
105
|
+
* [asyncIterator](#asynciterator)
|
|
106
|
+
* [FileContentProvider](#filecontentprovider)
|
|
107
|
+
* [Parameters](#parameters-3)
|
|
108
|
+
* [asyncIterator](#asynciterator-1)
|
|
104
109
|
* [name](#name)
|
|
105
110
|
* [NodeModulesContentProvider](#nodemodulescontentprovider)
|
|
106
|
-
* [Parameters](#parameters-
|
|
111
|
+
* [Parameters](#parameters-4)
|
|
107
112
|
* [Properties](#properties-2)
|
|
108
|
-
* [asyncIterator](#asynciterator)
|
|
113
|
+
* [asyncIterator](#asynciterator-2)
|
|
109
114
|
* [name](#name-1)
|
|
110
|
-
* [
|
|
111
|
-
* [Parameters](#parameters-
|
|
112
|
-
* [
|
|
115
|
+
* [NPMPackContentProvider](#npmpackcontentprovider)
|
|
116
|
+
* [Parameters](#parameters-5)
|
|
117
|
+
* [Properties](#properties-3)
|
|
113
118
|
* [name](#name-2)
|
|
114
119
|
* [NFTContentProvider](#nftcontentprovider)
|
|
115
|
-
* [Parameters](#parameters-5)
|
|
116
|
-
* [asyncIterator](#asynciterator-2)
|
|
117
|
-
* [name](#name-3)
|
|
118
|
-
* [ContentProvider](#contentprovider)
|
|
119
120
|
* [Parameters](#parameters-6)
|
|
120
|
-
* [Properties](#properties-3)
|
|
121
121
|
* [asyncIterator](#asynciterator-3)
|
|
122
|
+
* [name](#name-3)
|
|
122
123
|
* [DEBIAN](#debian)
|
|
123
124
|
* [hookMapping](#hookmapping)
|
|
124
125
|
* [attributes](#attributes)
|
|
125
126
|
* [prepare](#prepare)
|
|
126
127
|
* [Parameters](#parameters-7)
|
|
127
|
-
* [pkgKeyValuePairOptions](#pkgkeyvaluepairoptions)
|
|
128
|
-
* [attributes](#attributes-1)
|
|
129
128
|
* [quoteFile](#quotefile)
|
|
130
129
|
* [Parameters](#parameters-8)
|
|
131
130
|
* [RPM](#rpm)
|
|
132
131
|
* [hookMapping](#hookmapping-1)
|
|
133
|
-
* [attributes](#attributes-
|
|
132
|
+
* [attributes](#attributes-1)
|
|
134
133
|
* [prepare](#prepare-1)
|
|
135
134
|
* [Parameters](#parameters-9)
|
|
135
|
+
* [pkgKeyValuePairOptions](#pkgkeyvaluepairoptions)
|
|
136
|
+
* [attributes](#attributes-2)
|
|
136
137
|
* [OCI](#oci)
|
|
137
138
|
* [DOCKER](#docker)
|
|
138
139
|
* [attributes](#attributes-3)
|
|
139
140
|
* [prepare](#prepare-2)
|
|
140
141
|
* [Parameters](#parameters-10)
|
|
141
|
-
* [BUILDAH](#buildah)
|
|
142
142
|
* [Packager](#packager)
|
|
143
143
|
* [Parameters](#parameters-11)
|
|
144
144
|
* [packageName](#packagename)
|
|
@@ -248,21 +248,51 @@ Extract package definition from package.json.
|
|
|
248
248
|
|
|
249
249
|
Returns **AsyncIterable<[PackageDefinition](#packagedefinition)>** 
|
|
250
250
|
|
|
251
|
-
##
|
|
251
|
+
## BUILDAH
|
|
252
252
|
|
|
253
|
-
**Extends
|
|
253
|
+
**Extends DOCKER**
|
|
254
254
|
|
|
255
|
-
|
|
255
|
+
Use buildah @see <https://buildah.io>
|
|
256
|
+
|
|
257
|
+
## ContentProvider
|
|
258
|
+
|
|
259
|
+
Source of package content.
|
|
256
260
|
|
|
257
261
|
### Parameters
|
|
258
262
|
|
|
259
|
-
* `definitions`
|
|
260
|
-
* `entryProperties`
|
|
263
|
+
* `definitions`  
|
|
264
|
+
* `entryProperties`  
|
|
261
265
|
* `directoryProperties`  
|
|
262
266
|
|
|
263
267
|
### Properties
|
|
264
268
|
|
|
265
269
|
* `dir` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
|
|
270
|
+
* `transformer` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\<Transformer>** 
|
|
271
|
+
|
|
272
|
+
### asyncIterator
|
|
273
|
+
|
|
274
|
+
List all entries.
|
|
275
|
+
|
|
276
|
+
Returns **AsyncIterable<(ContentEntry | CollectionEntry)>** all entries
|
|
277
|
+
|
|
278
|
+
## FileContentProvider
|
|
279
|
+
|
|
280
|
+
**Extends ContentProvider**
|
|
281
|
+
|
|
282
|
+
Content provided form the file system.
|
|
283
|
+
|
|
284
|
+
### Parameters
|
|
285
|
+
|
|
286
|
+
* `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))** 
|
|
287
|
+
|
|
288
|
+
* `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)>)** 
|
|
289
|
+
* `definitions.base` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** base directory where to find the files
|
|
290
|
+
* `entryProperties`  
|
|
291
|
+
* `directoryProperties`  
|
|
292
|
+
|
|
293
|
+
### asyncIterator
|
|
294
|
+
|
|
295
|
+
Returns **AsyncIterable<(ContentEntry | CollectionEntry)>** all entries
|
|
266
296
|
|
|
267
297
|
### name
|
|
268
298
|
|
|
@@ -295,24 +325,21 @@ Returns **AsyncIterable<(ContentEntry | CollectionEntry)>** all entries
|
|
|
295
325
|
|
|
296
326
|
Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** name of the content provider
|
|
297
327
|
|
|
298
|
-
##
|
|
328
|
+
## NPMPackContentProvider
|
|
299
329
|
|
|
300
330
|
**Extends ContentProvider**
|
|
301
331
|
|
|
302
|
-
Content
|
|
332
|
+
Content from npm pack.
|
|
303
333
|
|
|
304
334
|
### Parameters
|
|
305
335
|
|
|
306
|
-
* `definitions` **
|
|
307
|
-
|
|
308
|
-
* `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)>)** 
|
|
309
|
-
* `definitions.base` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** base directory where to find the files
|
|
310
|
-
* `entryProperties`  
|
|
336
|
+
* `definitions` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 
|
|
337
|
+
* `entryProperties` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** to be set for each entry
|
|
311
338
|
* `directoryProperties`  
|
|
312
339
|
|
|
313
|
-
###
|
|
340
|
+
### Properties
|
|
314
341
|
|
|
315
|
-
|
|
342
|
+
* `dir` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
|
|
316
343
|
|
|
317
344
|
### name
|
|
318
345
|
|
|
@@ -341,27 +368,6 @@ Returns **AsyncIterable\<ContentEntry>** all entries
|
|
|
341
368
|
|
|
342
369
|
Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** name of the content provider
|
|
343
370
|
|
|
344
|
-
## ContentProvider
|
|
345
|
-
|
|
346
|
-
Source of package content.
|
|
347
|
-
|
|
348
|
-
### Parameters
|
|
349
|
-
|
|
350
|
-
* `definitions`  
|
|
351
|
-
* `entryProperties`  
|
|
352
|
-
* `directoryProperties`  
|
|
353
|
-
|
|
354
|
-
### Properties
|
|
355
|
-
|
|
356
|
-
* `dir` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
|
|
357
|
-
* `transformer` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\<Transformer>** 
|
|
358
|
-
|
|
359
|
-
### asyncIterator
|
|
360
|
-
|
|
361
|
-
List all entries.
|
|
362
|
-
|
|
363
|
-
Returns **AsyncIterable<(ContentEntry | CollectionEntry)>** all entries
|
|
364
|
-
|
|
365
371
|
## DEBIAN
|
|
366
372
|
|
|
367
373
|
**Extends Packager**
|
|
@@ -388,15 +394,6 @@ Map install hook named from default (arch) to deb.
|
|
|
388
394
|
|
|
389
395
|
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)>** 
|
|
390
396
|
|
|
391
|
-
## pkgKeyValuePairOptions
|
|
392
|
-
|
|
393
|
-
Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)
|
|
394
|
-
|
|
395
|
-
## attributes
|
|
396
|
-
|
|
397
|
-
well known package properties
|
|
398
|
-
<https://www.archlinux.org/pacman/PKGBUILD.5.html>
|
|
399
|
-
|
|
400
397
|
## quoteFile
|
|
401
398
|
|
|
402
399
|
### Parameters
|
|
@@ -430,6 +427,15 @@ Check for rpmbuild presence.
|
|
|
430
427
|
|
|
431
428
|
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
|
|
432
429
|
|
|
430
|
+
## pkgKeyValuePairOptions
|
|
431
|
+
|
|
432
|
+
Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)
|
|
433
|
+
|
|
434
|
+
## attributes
|
|
435
|
+
|
|
436
|
+
well known package properties
|
|
437
|
+
<https://www.archlinux.org/pacman/PKGBUILD.5.html>
|
|
438
|
+
|
|
433
439
|
## OCI
|
|
434
440
|
|
|
435
441
|
**Extends Packager**
|
|
@@ -459,12 +465,6 @@ Check for docker presence.
|
|
|
459
465
|
|
|
460
466
|
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
|
|
461
467
|
|
|
462
|
-
## BUILDAH
|
|
463
|
-
|
|
464
|
-
**Extends DOCKER**
|
|
465
|
-
|
|
466
|
-
Use buildah @see <https://buildah.io>
|
|
467
|
-
|
|
468
468
|
## Packager
|
|
469
469
|
|
|
470
470
|
### Parameters
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "npm-pkgbuild",
|
|
3
|
-
"version": "19.1
|
|
3
|
+
"version": "19.2.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"provenance": false
|
|
@@ -59,11 +59,11 @@
|
|
|
59
59
|
"compare-versions": "^6.1.1",
|
|
60
60
|
"content-entry": "^14.2.7",
|
|
61
61
|
"content-entry-filesystem": "^9.0.14",
|
|
62
|
-
"content-entry-transform": "^1.5.
|
|
62
|
+
"content-entry-transform": "^1.5.17",
|
|
63
63
|
"execa": "^9.6.0",
|
|
64
64
|
"expression-expander": "^7.2.8",
|
|
65
65
|
"ini": "^6.0.0",
|
|
66
|
-
"iterable-string-interceptor": "^3.0.
|
|
66
|
+
"iterable-string-interceptor": "^3.0.5",
|
|
67
67
|
"key-value-transformer": "^3.3.1",
|
|
68
68
|
"npm-package-walker": "^8.0.11",
|
|
69
69
|
"npm-packlist": "^10.0.3",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"uti": "^8.10.3"
|
|
75
75
|
},
|
|
76
76
|
"devDependencies": {
|
|
77
|
-
"@types/node": "^25.0.
|
|
77
|
+
"@types/node": "^25.0.8",
|
|
78
78
|
"ava": "^6.4.1",
|
|
79
79
|
"c8": "^10.1.3",
|
|
80
80
|
"documentation": "^14.0.3",
|
|
@@ -3,15 +3,26 @@ import { ContentEntry, CollectionEntry } from "content-entry";
|
|
|
3
3
|
/**
|
|
4
4
|
* Source of package content.
|
|
5
5
|
* @property {string} dir
|
|
6
|
-
* @property {Transformer[]}
|
|
6
|
+
* @property {Transformer[]} transformers
|
|
7
7
|
*/
|
|
8
8
|
export class ContentProvider {
|
|
9
|
-
transformers
|
|
9
|
+
transformers;
|
|
10
10
|
entryProperties;
|
|
11
11
|
directoryProperties;
|
|
12
12
|
dir;
|
|
13
13
|
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* @param {Object} definitions
|
|
17
|
+
* @param {Array<Transformer>} [definitions.transformers]
|
|
18
|
+
* @param {string} [definitions.dir]
|
|
19
|
+
* @param {Object} [entryProperties]
|
|
20
|
+
* @param {string} [entryProperties.destination]
|
|
21
|
+
* @param {Object} [directoryProperties]
|
|
22
|
+
*/
|
|
14
23
|
constructor(definitions, entryProperties, directoryProperties) {
|
|
24
|
+
this.transformers = definitions.transformers || [];
|
|
25
|
+
this.dir = definitions.dir;
|
|
15
26
|
this.entryProperties = entryProperties;
|
|
16
27
|
this.directoryProperties = directoryProperties;
|
|
17
28
|
if (this.entryProperties?.destination) {
|
|
@@ -10,9 +10,6 @@ const DEFAULT_PATTERN = ["**/*", "!.*"];
|
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Content provided form the file system.
|
|
13
|
-
* @param {Object|string} definitions
|
|
14
|
-
* @param {string|string[]} definitions.pattern
|
|
15
|
-
* @param {string} definitions.base base directory where to find the files
|
|
16
13
|
*/
|
|
17
14
|
export class FileContentProvider extends ContentProvider {
|
|
18
15
|
/**
|
|
@@ -26,48 +23,54 @@ export class FileContentProvider extends ContentProvider {
|
|
|
26
23
|
return "use plain files source";
|
|
27
24
|
}
|
|
28
25
|
|
|
26
|
+
base;
|
|
27
|
+
pattern = DEFAULT_PATTERN;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Content provided form the file system.
|
|
31
|
+
* @param {Object|string} definitions
|
|
32
|
+
* @param {string|string[]} [definitions.pattern]
|
|
33
|
+
* @param {string} [definitions.base] base directory where to find the files
|
|
34
|
+
*/
|
|
29
35
|
constructor(definitions, entryProperties, directoryProperties) {
|
|
30
36
|
super(definitions, entryProperties, directoryProperties);
|
|
31
37
|
|
|
32
38
|
if (typeof definitions === "string") {
|
|
33
39
|
if (definitions.endsWith("/")) {
|
|
34
|
-
this.
|
|
35
|
-
|
|
36
|
-
pattern: DEFAULT_PATTERN
|
|
37
|
-
};
|
|
40
|
+
this.base = definitions.substring(0, definitions.length - 1);
|
|
41
|
+
this.pattern = DEFAULT_PATTERN;
|
|
38
42
|
} else {
|
|
39
43
|
const base = dirname(definitions);
|
|
40
|
-
this.
|
|
41
|
-
|
|
42
|
-
pattern: [definitions.substring(base.length + 1)]
|
|
43
|
-
};
|
|
44
|
+
this.base = base;
|
|
45
|
+
this.pattern = [definitions.substring(base.length + 1)];
|
|
44
46
|
}
|
|
45
47
|
} else {
|
|
46
|
-
this.
|
|
47
|
-
|
|
48
|
+
this.base = definitions.base;
|
|
49
|
+
if(definitions.pattern) {
|
|
50
|
+
this.pattern = asArray(definitions.pattern);
|
|
51
|
+
}
|
|
48
52
|
}
|
|
49
53
|
|
|
50
|
-
this.
|
|
54
|
+
this.base = resolve(cwd(), this.base);
|
|
51
55
|
}
|
|
52
56
|
|
|
53
57
|
get isPatternMatch() {
|
|
54
|
-
return this.
|
|
58
|
+
return this.pattern.find(p => p.match(/[\*\?]/));
|
|
55
59
|
}
|
|
56
60
|
|
|
57
61
|
toString() {
|
|
58
|
-
return `${this.constructor.name}: ${this.
|
|
62
|
+
return `${this.constructor.name}: ${this.base}, ${this.pattern} -> ${this.entryProperties?.destination}`;
|
|
59
63
|
}
|
|
60
64
|
|
|
61
65
|
/**
|
|
62
66
|
* @return {AsyncIterable<ContentEntry|CollectionEntry>} all entries
|
|
63
67
|
*/
|
|
64
68
|
async *[Symbol.asyncIterator]() {
|
|
65
|
-
const
|
|
66
|
-
const baseDir = definitions.base;
|
|
69
|
+
const baseDir = this.base;
|
|
67
70
|
const startPos = baseDir.length + 1;
|
|
68
71
|
|
|
69
72
|
let count = 0;
|
|
70
|
-
for await (const entry of glob(
|
|
73
|
+
for await (const entry of glob(this.pattern, {
|
|
71
74
|
cwd: baseDir,
|
|
72
75
|
withFileTypes: true
|
|
73
76
|
})) {
|
|
@@ -86,7 +89,7 @@ export class FileContentProvider extends ContentProvider {
|
|
|
86
89
|
}
|
|
87
90
|
|
|
88
91
|
if (!this.isPatternMatch && count < 1) {
|
|
89
|
-
const file = join(baseDir, this.
|
|
92
|
+
const file = join(baseDir, this.pattern[0]);
|
|
90
93
|
const error = new Error(`File not found ${file}`);
|
|
91
94
|
error.file = file;
|
|
92
95
|
throw error;
|
|
@@ -6,9 +6,6 @@ import { ContentProvider } from "./content-provider.mjs";
|
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Content provided form the file system.
|
|
9
|
-
* @param {Object|string} definitions
|
|
10
|
-
* @param {string|string[]} definitions.pattern
|
|
11
|
-
* @param {string} definitions.base base directory where to find the files
|
|
12
9
|
*/
|
|
13
10
|
export class NFTContentProvider extends ContentProvider {
|
|
14
11
|
/**
|
|
@@ -22,29 +19,36 @@ export class NFTContentProvider extends ContentProvider {
|
|
|
22
19
|
return "user vercels NFT as source";
|
|
23
20
|
}
|
|
24
21
|
|
|
22
|
+
/**
|
|
23
|
+
* Content provided form the file system.
|
|
24
|
+
* @param {Object|string} definitions
|
|
25
|
+
* @param {string} definitions.start base directory where to find the files
|
|
26
|
+
* @param {Array<Transformer>} [definitions.transformers]
|
|
27
|
+
* @param {string} [definitions.dir]
|
|
28
|
+
* @param {Object} [entryProperties]
|
|
29
|
+
* @param {string} [entryProperties.destination]
|
|
30
|
+
* @param {Object} [directoryProperties]
|
|
31
|
+
*/
|
|
25
32
|
constructor(definitions, entryProperties, directoryProperties) {
|
|
26
33
|
super(definitions, entryProperties, directoryProperties);
|
|
27
34
|
|
|
28
35
|
if (typeof definitions === "string") {
|
|
29
|
-
this.
|
|
36
|
+
this.start = [definitions];
|
|
30
37
|
} else {
|
|
31
|
-
this.
|
|
32
|
-
this.definitions.start = asArray(this.definitions.start);
|
|
38
|
+
this.start = asArray(definitions.start);
|
|
33
39
|
}
|
|
34
40
|
}
|
|
35
41
|
|
|
36
42
|
toString() {
|
|
37
|
-
return `${this.constructor.name}: ${this.
|
|
43
|
+
return `${this.constructor.name}: ${this.start} -> ${this.entryProperties.destination}`;
|
|
38
44
|
}
|
|
39
45
|
|
|
40
46
|
/**
|
|
41
47
|
* @return {AsyncIterable<ContentEntry>} all entries
|
|
42
48
|
*/
|
|
43
49
|
async *[Symbol.asyncIterator]() {
|
|
44
|
-
const
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
const { fileList } = await nodeFileTrace(definitions.start);
|
|
50
|
+
const baseDir = this.base || process.cwd();
|
|
51
|
+
const { fileList } = await nodeFileTrace(this.start);
|
|
48
52
|
|
|
49
53
|
for (const name of fileList) {
|
|
50
54
|
yield new FileSystemEntry(
|
package/src/npm-pkgbuild-cli.mjs
CHANGED
|
@@ -17,8 +17,12 @@ import pkg from "../package.json" with { type: "json" };
|
|
|
17
17
|
program.description(pkg.description).version(pkg.version);
|
|
18
18
|
|
|
19
19
|
allOutputs.forEach(o => {
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
for(const name of [o.name,o.alias]) {
|
|
21
|
+
if(name) {
|
|
22
|
+
program.option(`--${name}`, o.description);
|
|
23
|
+
program.option(`--no-${name}`, `do not ${o.description} output`);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
22
26
|
});
|
|
23
27
|
|
|
24
28
|
allInputs.forEach(i => {
|
package/src/output/arch.mjs
CHANGED
|
@@ -61,12 +61,17 @@ let _prepared;
|
|
|
61
61
|
let _architecture = "aarch64";
|
|
62
62
|
|
|
63
63
|
export class ARCH extends Packager {
|
|
64
|
+
|
|
65
|
+
static get alias() {
|
|
66
|
+
return "alpm";
|
|
67
|
+
}
|
|
68
|
+
|
|
64
69
|
static get name() {
|
|
65
70
|
return "arch";
|
|
66
71
|
}
|
|
67
72
|
|
|
68
73
|
static get description() {
|
|
69
|
-
return "generate Arch-Linux package";
|
|
74
|
+
return "generate Arch-Linux package (ALPM)";
|
|
70
75
|
}
|
|
71
76
|
|
|
72
77
|
static get fileNameExtension() {
|
|
@@ -1,14 +1,30 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Source of package content.
|
|
3
3
|
* @property {string} dir
|
|
4
|
-
* @property {Transformer[]}
|
|
4
|
+
* @property {Transformer[]} transformers
|
|
5
5
|
*/
|
|
6
6
|
export class ContentProvider {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
/**
|
|
8
|
+
*
|
|
9
|
+
* @param {Object} definitions
|
|
10
|
+
* @param {Array<Transformer>} [definitions.transformers]
|
|
11
|
+
* @param {string} [definitions.dir]
|
|
12
|
+
* @param {Object} [entryProperties]
|
|
13
|
+
* @param {string} [entryProperties.destination]
|
|
14
|
+
* @param {Object} [directoryProperties]
|
|
15
|
+
*/
|
|
16
|
+
constructor(definitions: {
|
|
17
|
+
transformers?: Array<Transformer>;
|
|
18
|
+
dir?: string;
|
|
19
|
+
}, entryProperties?: {
|
|
20
|
+
destination?: string;
|
|
21
|
+
}, directoryProperties?: any);
|
|
22
|
+
transformers: Transformer<any, any>[];
|
|
23
|
+
entryProperties: {
|
|
24
|
+
destination?: string;
|
|
25
|
+
};
|
|
10
26
|
directoryProperties: any;
|
|
11
|
-
dir:
|
|
27
|
+
dir: string;
|
|
12
28
|
/**
|
|
13
29
|
* List all entries.
|
|
14
30
|
* @return {AsyncIterable<ContentEntry|CollectionEntry>} all entries
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Content provided form the file system.
|
|
3
|
-
* @param {Object|string} definitions
|
|
4
|
-
* @param {string|string[]} definitions.pattern
|
|
5
|
-
* @param {string} definitions.base base directory where to find the files
|
|
6
3
|
*/
|
|
7
4
|
export class FileContentProvider extends ContentProvider {
|
|
8
5
|
static get description(): string;
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Content provided form the file system.
|
|
8
|
+
* @param {Object|string} definitions
|
|
9
|
+
* @param {string|string[]} [definitions.pattern]
|
|
10
|
+
* @param {string} [definitions.base] base directory where to find the files
|
|
11
|
+
*/
|
|
12
|
+
constructor(definitions: any | string, entryProperties: any, directoryProperties: any);
|
|
13
|
+
base: string;
|
|
14
|
+
pattern: string[];
|
|
15
|
+
get isPatternMatch(): string;
|
|
11
16
|
}
|
|
12
17
|
import { ContentProvider } from "./content-provider.mjs";
|
|
@@ -1,12 +1,22 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Content provided form the file system.
|
|
3
|
-
* @param {Object|string} definitions
|
|
4
|
-
* @param {string|string[]} definitions.pattern
|
|
5
|
-
* @param {string} definitions.base base directory where to find the files
|
|
6
3
|
*/
|
|
7
4
|
export class NFTContentProvider extends ContentProvider {
|
|
8
5
|
static get description(): string;
|
|
9
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Content provided form the file system.
|
|
8
|
+
* @param {Object|string} definitions
|
|
9
|
+
* @param {string} definitions.start base directory where to find the files
|
|
10
|
+
* @param {Array<Transformer>} [definitions.transformers]
|
|
11
|
+
* @param {string} [definitions.dir]
|
|
12
|
+
* @param {Object} [entryProperties]
|
|
13
|
+
* @param {string} [entryProperties.destination]
|
|
14
|
+
* @param {Object} [directoryProperties]
|
|
15
|
+
*/
|
|
16
|
+
constructor(definitions: any | string, entryProperties?: {
|
|
17
|
+
destination?: string;
|
|
18
|
+
}, directoryProperties?: any);
|
|
19
|
+
start: any[];
|
|
10
20
|
/**
|
|
11
21
|
* @return {AsyncIterable<ContentEntry>} all entries
|
|
12
22
|
*/
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export class NodeModulesContentProvider extends ContentProvider {
|
|
7
7
|
static get description(): string;
|
|
8
|
+
constructor(definitions: any, entryProperties: any, directoryProperties: any);
|
|
8
9
|
withoutDevelpmentDependencies: boolean;
|
|
9
10
|
}
|
|
10
11
|
import { ContentProvider } from "./content-provider.mjs";
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
export class NPMPackContentProvider extends ContentProvider {
|
|
9
9
|
static get description(): string;
|
|
10
|
+
constructor(definitions: any, entryProperties: any, directoryProperties: any);
|
|
10
11
|
[Symbol.asyncIterator](): AsyncGenerator<any, void, unknown>;
|
|
11
12
|
}
|
|
12
13
|
import { ContentProvider } from "./content-provider.mjs";
|