npm-pkgbuild 11.8.9 → 11.8.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 +5 -0
- package/package.json +8 -8
- package/src/output/docker.mjs +6 -1
- package/src/output/packager.mjs +13 -3
package/README.md
CHANGED
|
@@ -135,6 +135,7 @@ see [mf-hosting](https://www.npmjs.com/package/mf-hosting) or [mf-hosting-fronte
|
|
|
135
135
|
* [tmpdir](#tmpdir)
|
|
136
136
|
* [execute](#execute)
|
|
137
137
|
* [Parameters](#parameters-11)
|
|
138
|
+
* [workspaceLayout](#workspacelayout)
|
|
138
139
|
* [prepare](#prepare-1)
|
|
139
140
|
* [Parameters](#parameters-12)
|
|
140
141
|
* [RPM](#rpm)
|
|
@@ -378,6 +379,10 @@ Execute package generation.
|
|
|
378
379
|
|
|
379
380
|
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>** location of the resulting package
|
|
380
381
|
|
|
382
|
+
### workspaceLayout
|
|
383
|
+
|
|
384
|
+
Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 
|
|
385
|
+
|
|
381
386
|
### prepare
|
|
382
387
|
|
|
383
388
|
#### Parameters
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "npm-pkgbuild",
|
|
3
|
-
"version": "11.8.
|
|
3
|
+
"version": "11.8.11",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"tsc:types": "tsc -d --allowJs --declarationDir dist --emitDeclarationOnly ./src/extract-from-package.mjs"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@npmcli/arborist": "^6.2.
|
|
45
|
+
"@npmcli/arborist": "^6.2.10",
|
|
46
46
|
"@vercel/nft": "^0.22.5",
|
|
47
47
|
"aggregate-async-iterator": "^1.1.16",
|
|
48
48
|
"commander": "^11.0.0",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"content-entry-transform": "^1.4.29",
|
|
53
53
|
"execa": "^7.1.1",
|
|
54
54
|
"expression-expander": "^7.1.3",
|
|
55
|
-
"globby": "^13.2.
|
|
55
|
+
"globby": "^13.2.1",
|
|
56
56
|
"ini": "^4.1.0",
|
|
57
57
|
"iterable-string-interceptor": "^2.2.4",
|
|
58
58
|
"key-value-transformer": "^3.1.1",
|
|
@@ -61,19 +61,19 @@
|
|
|
61
61
|
"npm-packlist": "^7.0.4",
|
|
62
62
|
"pacote": "^15.2.0",
|
|
63
63
|
"pkg-dir": "^7.0.0",
|
|
64
|
-
"tar-stream": "^3.
|
|
64
|
+
"tar-stream": "^3.1.4"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
|
-
"@types/node": "^20.3.
|
|
67
|
+
"@types/node": "^20.3.3",
|
|
68
68
|
"ava": "^5.3.1",
|
|
69
69
|
"c8": "^8.0.0",
|
|
70
70
|
"documentation": "^14.0.2",
|
|
71
|
-
"semantic-release": "^21.0.
|
|
71
|
+
"semantic-release": "^21.0.6",
|
|
72
72
|
"stream-buffers": "^3.0.2",
|
|
73
|
-
"typescript": "^5.1.
|
|
73
|
+
"typescript": "^5.1.6"
|
|
74
74
|
},
|
|
75
75
|
"engines": {
|
|
76
|
-
"node": ">=16.20.
|
|
76
|
+
"node": ">=16.20.1"
|
|
77
77
|
},
|
|
78
78
|
"repository": {
|
|
79
79
|
"type": "git",
|
package/src/output/docker.mjs
CHANGED
|
@@ -42,6 +42,10 @@ export class DOCKER extends Packager {
|
|
|
42
42
|
return `generate container image with ${this.name}`;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
+
static get fields() {
|
|
46
|
+
return fields;
|
|
47
|
+
}
|
|
48
|
+
|
|
45
49
|
async execute(
|
|
46
50
|
sources,
|
|
47
51
|
transformer,
|
|
@@ -50,7 +54,7 @@ export class DOCKER extends Packager {
|
|
|
50
54
|
expander = v => v
|
|
51
55
|
) {
|
|
52
56
|
const { properties, staging } = await this.prepareExecute(options);
|
|
53
|
-
|
|
57
|
+
|
|
54
58
|
async function* headLines() {
|
|
55
59
|
let scratch = true;
|
|
56
60
|
for (const [k, v] of Object.entries({
|
|
@@ -141,6 +145,7 @@ export class DOCKER extends Packager {
|
|
|
141
145
|
* @see {@link https://docs.docker.com/engine/reference/builder/}
|
|
142
146
|
*/
|
|
143
147
|
const fields = {
|
|
148
|
+
name: { type: "string", mandatory: true, set: value => value.toLowerCase() },
|
|
144
149
|
version: { type: "string", mandatory: true },
|
|
145
150
|
description: { type: "string" },
|
|
146
151
|
author: { alias: "maintainer", type: "string" },
|
package/src/output/packager.mjs
CHANGED
|
@@ -19,6 +19,9 @@ export class Packager {
|
|
|
19
19
|
return {};
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
/**
|
|
23
|
+
* @return {Object}
|
|
24
|
+
*/
|
|
22
25
|
static get workspaceLayout() {
|
|
23
26
|
return {
|
|
24
27
|
named: {
|
|
@@ -37,8 +40,10 @@ export class Packager {
|
|
|
37
40
|
return false;
|
|
38
41
|
}
|
|
39
42
|
|
|
43
|
+
#properties;
|
|
44
|
+
|
|
40
45
|
constructor(properties) {
|
|
41
|
-
this
|
|
46
|
+
this.#properties = { ...properties };
|
|
42
47
|
}
|
|
43
48
|
|
|
44
49
|
get fileNameExtension()
|
|
@@ -51,13 +56,18 @@ export class Packager {
|
|
|
51
56
|
}
|
|
52
57
|
|
|
53
58
|
get properties() {
|
|
54
|
-
const properties = this
|
|
59
|
+
const properties = this.#properties;
|
|
55
60
|
|
|
56
61
|
Object.entries(this.fields).forEach(([k, v]) => {
|
|
62
|
+
if(v.set && properties[k] !== undefined) {
|
|
63
|
+
properties[k] = v.set(properties[k]);
|
|
64
|
+
}
|
|
65
|
+
|
|
57
66
|
const e = properties[v.alias];
|
|
58
67
|
if (e !== undefined) {
|
|
59
|
-
properties[k] = e;
|
|
68
|
+
properties[k] = v.set ? v.set(e) : e;
|
|
60
69
|
} else {
|
|
70
|
+
|
|
61
71
|
const vak = v.alias || k;
|
|
62
72
|
if (v.default !== undefined) {
|
|
63
73
|
if (
|