npm-pkgbuild 20.7.12 → 20.8.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/package.json +5 -5
- package/src/output/debian.mjs +64 -22
- package/src/output/packager.mjs +8 -3
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "npm-pkgbuild",
|
|
3
|
-
"version": "20.
|
|
3
|
+
"version": "20.8.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"provenance": false
|
|
7
7
|
},
|
|
8
|
-
"packageManager": "npm@11.
|
|
8
|
+
"packageManager": "npm@11.18.0",
|
|
9
9
|
"exports": {
|
|
10
10
|
".": {
|
|
11
11
|
"default": "./src/module.mjs"
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"lint:docs": "documentation lint ./src**/*.mjs"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@npmcli/arborist": "^
|
|
49
|
+
"@npmcli/arborist": "^10.0.0",
|
|
50
50
|
"@vercel/nft": "^1.10.2",
|
|
51
51
|
"aggregate-async-iterator": "^1.2.5",
|
|
52
52
|
"commander": "^15.0.0",
|
|
@@ -60,14 +60,14 @@
|
|
|
60
60
|
"key-value-transformer": "^3.3.2",
|
|
61
61
|
"npm-package-walker": "^8.0.11",
|
|
62
62
|
"npm-packlist": "^11.3.0",
|
|
63
|
-
"pacc": "^10.4.
|
|
63
|
+
"pacc": "^10.4.1",
|
|
64
64
|
"package-directory": "^8.2.0",
|
|
65
65
|
"pacote": "^22.0.0",
|
|
66
66
|
"tar-stream": "^3.1.7",
|
|
67
67
|
"uti": "^8.11.2"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
|
-
"@types/node": "^26.1.
|
|
70
|
+
"@types/node": "^26.1.1",
|
|
71
71
|
"ava": "^8.0.1",
|
|
72
72
|
"c8": "^11.0.0",
|
|
73
73
|
"documentation": "^14.0.3",
|
package/src/output/debian.mjs
CHANGED
|
@@ -4,7 +4,8 @@ import { execa } from "execa";
|
|
|
4
4
|
import {
|
|
5
5
|
integer_attribute_writable,
|
|
6
6
|
yesno_attribute_writable,
|
|
7
|
-
string_attribute_writable
|
|
7
|
+
string_attribute_writable,
|
|
8
|
+
string_collection_attribute_writable
|
|
8
9
|
} from "pacc";
|
|
9
10
|
import { ContentEntry, IteratorContentEntry } from "content-entry";
|
|
10
11
|
import {
|
|
@@ -51,41 +52,82 @@ export class DEBIAN extends Packager {
|
|
|
51
52
|
static attributes = {
|
|
52
53
|
Package: {
|
|
53
54
|
...pkgbuild_name_attribute,
|
|
55
|
+
name: "Package",
|
|
54
56
|
set: v => v.toLowerCase()
|
|
55
57
|
},
|
|
56
|
-
Version: pkgbuild_version_attribute,
|
|
58
|
+
Version: { ...pkgbuild_version_attribute, name: "Version" },
|
|
57
59
|
Maintainer: {
|
|
58
60
|
...string_attribute_writable,
|
|
61
|
+
name: "Maintainer",
|
|
59
62
|
alias: "maintainer",
|
|
60
63
|
mandatory: true
|
|
61
64
|
},
|
|
62
|
-
Description: pkgbuild_description_attribute,
|
|
63
|
-
Section: { ...string_attribute_writable, alias: "groups" },
|
|
64
|
-
Priority: string_attribute_writable,
|
|
65
|
-
Essential: yesno_attribute_writable,
|
|
66
|
-
Origin: string_attribute_writable,
|
|
65
|
+
Description: { ...pkgbuild_description_attribute, name: "Description" },
|
|
66
|
+
Section: { ...string_attribute_writable, name: "Section", alias: "groups" },
|
|
67
|
+
Priority: { ...string_attribute_writable, name: "Priority" },
|
|
68
|
+
Essential: { ...yesno_attribute_writable, name: "Essential" },
|
|
69
|
+
Origin: { ...string_attribute_writable, name: "Origin" },
|
|
67
70
|
Architecture: {
|
|
68
71
|
...string_attribute_writable,
|
|
72
|
+
name: "Architecture",
|
|
69
73
|
alias: "arch",
|
|
70
74
|
default: "all",
|
|
71
75
|
mandatory: true,
|
|
72
76
|
mapping: { aarch64: "arm64" }
|
|
73
77
|
},
|
|
74
|
-
Homepage: {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
"
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
"
|
|
78
|
+
Homepage: {
|
|
79
|
+
...string_attribute_writable,
|
|
80
|
+
name: "Homepage",
|
|
81
|
+
alias: "homepage"
|
|
82
|
+
},
|
|
83
|
+
Bugs: { ...string_attribute_writable, name: "Bugs", alias: "bugs" },
|
|
84
|
+
Depends: {
|
|
85
|
+
...debian_dependency_attribute_collection_writable,
|
|
86
|
+
name: "Depends"
|
|
87
|
+
},
|
|
88
|
+
"Pre-Depends": {
|
|
89
|
+
...debian_dependency_attribute_collection_writable,
|
|
90
|
+
name: "Pre-Depends"
|
|
91
|
+
},
|
|
92
|
+
"Build-Depends": {
|
|
93
|
+
...debian_dependency_attribute_collection_writable,
|
|
94
|
+
name: "Build-Depends"
|
|
95
|
+
},
|
|
96
|
+
"Build-Depends-Indep": {
|
|
97
|
+
...debian_dependency_attribute_collection_writable,
|
|
98
|
+
name: "Build-Depends-Indep"
|
|
99
|
+
},
|
|
100
|
+
"Build-Depends-Arch": {
|
|
101
|
+
...debian_dependency_attribute_collection_writable,
|
|
102
|
+
name: "Build-Depends-Arch"
|
|
103
|
+
},
|
|
104
|
+
Recommends: {
|
|
105
|
+
...debian_dependency_attribute_collection_writable,
|
|
106
|
+
name: "Recommends"
|
|
107
|
+
},
|
|
108
|
+
Suggests: {
|
|
109
|
+
...debian_dependency_attribute_collection_writable,
|
|
110
|
+
name: "Suggests"
|
|
111
|
+
},
|
|
112
|
+
Provides: {
|
|
113
|
+
...debian_dependency_attribute_collection_writable,
|
|
114
|
+
name: "Provides"
|
|
115
|
+
},
|
|
116
|
+
Breaks: {
|
|
117
|
+
...debian_dependency_attribute_collection_writable,
|
|
118
|
+
name: "Breaks"
|
|
119
|
+
},
|
|
120
|
+
Replaces: {
|
|
121
|
+
...debian_dependency_attribute_collection_writable,
|
|
122
|
+
name: "Replaces"
|
|
123
|
+
},
|
|
124
|
+
Source: { ...string_attribute_writable, name: "Source", alias: "source" },
|
|
125
|
+
Uploaders: {
|
|
126
|
+
...string_collection_attribute_writable,
|
|
127
|
+
name: "Uploaders",
|
|
128
|
+
mandatory: false
|
|
129
|
+
},
|
|
130
|
+
"Installed-Size": { ...integer_attribute_writable, name: "Installed-Size" }
|
|
89
131
|
};
|
|
90
132
|
|
|
91
133
|
/**
|
package/src/output/packager.mjs
CHANGED
|
@@ -213,12 +213,15 @@ export class Packager {
|
|
|
213
213
|
* @param {Object} options
|
|
214
214
|
* @param {string} [options.staging]
|
|
215
215
|
* @param {string} [options.destination]
|
|
216
|
+
* @param {boolean} [options.noPreserve] do not preserve (tmp) directories
|
|
216
217
|
* @param {Object} [publishingDetail]
|
|
217
218
|
* @returns {Promise<{properties:Object, destination:string, tmpdir:string, staging:string}>}
|
|
218
219
|
*/
|
|
219
220
|
async prepare(options, publishingDetail) {
|
|
220
|
-
if (
|
|
221
|
-
|
|
221
|
+
if (!options.noPreserve) {
|
|
222
|
+
if (this.#prepared) {
|
|
223
|
+
return this.#prepared;
|
|
224
|
+
}
|
|
222
225
|
}
|
|
223
226
|
|
|
224
227
|
const tmpdir = await this.tmpdir;
|
|
@@ -252,7 +255,9 @@ export class Packager {
|
|
|
252
255
|
await mkdir(out.destination, mdo);
|
|
253
256
|
}
|
|
254
257
|
|
|
255
|
-
|
|
258
|
+
if (!options.noPreserve) {
|
|
259
|
+
this.#prepared = out;
|
|
260
|
+
}
|
|
256
261
|
return out;
|
|
257
262
|
}
|
|
258
263
|
|