npm-pkgbuild 20.9.0 → 20.9.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
CHANGED
|
@@ -117,84 +117,86 @@ See [mf-hosting](https://www.npmjs.com/package/mf-hosting) or [mf-hosting-fronte
|
|
|
117
117
|
* [ContentProvider](#contentprovider)
|
|
118
118
|
* [Parameters](#parameters-6)
|
|
119
119
|
* [Properties](#properties-3)
|
|
120
|
+
* [propertiesFor](#propertiesfor)
|
|
121
|
+
* [Parameters](#parameters-7)
|
|
120
122
|
* [asyncIterator](#asynciterator-3)
|
|
121
123
|
* [DEBIAN](#debian)
|
|
122
124
|
* [hookMapping](#hookmapping)
|
|
123
125
|
* [attributes](#attributes)
|
|
124
126
|
* [prepare](#prepare)
|
|
125
|
-
* [Parameters](#parameters-
|
|
127
|
+
* [Parameters](#parameters-8)
|
|
126
128
|
* [pkgKeyValuePairOptions](#pkgkeyvaluepairoptions)
|
|
127
129
|
* [attributes](#attributes-1)
|
|
128
130
|
* [quoteFile](#quotefile)
|
|
129
|
-
* [Parameters](#parameters-
|
|
131
|
+
* [Parameters](#parameters-9)
|
|
130
132
|
* [RPM](#rpm)
|
|
131
133
|
* [hookMapping](#hookmapping-1)
|
|
132
134
|
* [attributes](#attributes-2)
|
|
133
135
|
* [prepare](#prepare-1)
|
|
134
|
-
* [Parameters](#parameters-
|
|
136
|
+
* [Parameters](#parameters-10)
|
|
135
137
|
* [OCI](#oci)
|
|
136
138
|
* [DOCKER](#docker)
|
|
137
139
|
* [attributes](#attributes-3)
|
|
138
140
|
* [prepare](#prepare-2)
|
|
139
|
-
* [Parameters](#parameters-
|
|
141
|
+
* [Parameters](#parameters-11)
|
|
140
142
|
* [BUILDAH](#buildah)
|
|
141
143
|
* [Packager](#packager)
|
|
142
|
-
* [Parameters](#parameters-
|
|
144
|
+
* [Parameters](#parameters-12)
|
|
143
145
|
* [packageName](#packagename)
|
|
144
|
-
* [Parameters](#parameters-
|
|
146
|
+
* [Parameters](#parameters-13)
|
|
145
147
|
* [hookContent](#hookcontent)
|
|
146
148
|
* [dependencyExpression](#dependencyexpression)
|
|
147
|
-
* [Parameters](#parameters-
|
|
149
|
+
* [Parameters](#parameters-14)
|
|
148
150
|
* [tmpdir](#tmpdir)
|
|
149
151
|
* [prepare](#prepare-3)
|
|
150
|
-
* [Parameters](#parameters-14)
|
|
151
|
-
* [create](#create)
|
|
152
152
|
* [Parameters](#parameters-15)
|
|
153
|
+
* [create](#create)
|
|
154
|
+
* [Parameters](#parameters-16)
|
|
153
155
|
* [workspaceLayout](#workspacelayout)
|
|
154
156
|
* [prepare](#prepare-4)
|
|
155
|
-
* [Parameters](#parameters-
|
|
157
|
+
* [Parameters](#parameters-17)
|
|
156
158
|
* [Packager](#packager-1)
|
|
157
|
-
* [Parameters](#parameters-
|
|
159
|
+
* [Parameters](#parameters-18)
|
|
158
160
|
* [packageName](#packagename-1)
|
|
159
|
-
* [Parameters](#parameters-
|
|
161
|
+
* [Parameters](#parameters-19)
|
|
160
162
|
* [hookContent](#hookcontent-1)
|
|
161
163
|
* [dependencyExpression](#dependencyexpression-1)
|
|
162
|
-
* [Parameters](#parameters-
|
|
164
|
+
* [Parameters](#parameters-20)
|
|
163
165
|
* [tmpdir](#tmpdir-1)
|
|
164
166
|
* [prepare](#prepare-5)
|
|
165
|
-
* [Parameters](#parameters-20)
|
|
166
|
-
* [create](#create-1)
|
|
167
167
|
* [Parameters](#parameters-21)
|
|
168
|
+
* [create](#create-1)
|
|
169
|
+
* [Parameters](#parameters-22)
|
|
168
170
|
* [workspaceLayout](#workspacelayout-1)
|
|
169
171
|
* [prepare](#prepare-6)
|
|
170
|
-
* [Parameters](#parameters-
|
|
172
|
+
* [Parameters](#parameters-23)
|
|
171
173
|
* [Field](#field)
|
|
172
174
|
* [Properties](#properties-4)
|
|
173
175
|
* [deleteKey](#deletekey)
|
|
174
|
-
* [Parameters](#parameters-23)
|
|
175
|
-
* [copyNodeModules](#copynodemodules)
|
|
176
176
|
* [Parameters](#parameters-24)
|
|
177
|
+
* [copyNodeModules](#copynodemodules)
|
|
178
|
+
* [Parameters](#parameters-25)
|
|
177
179
|
* [PublishingDetail](#publishingdetail)
|
|
178
180
|
* [Properties](#properties-5)
|
|
179
181
|
* [createPublishingDetails](#createpublishingdetails)
|
|
180
|
-
* [Parameters](#parameters-25)
|
|
181
|
-
* [publish](#publish)
|
|
182
182
|
* [Parameters](#parameters-26)
|
|
183
|
+
* [publish](#publish)
|
|
184
|
+
* [Parameters](#parameters-27)
|
|
183
185
|
* [utf8StreamOptions](#utf8streamoptions)
|
|
184
186
|
* [decodePassword](#decodepassword)
|
|
185
|
-
* [Parameters](#parameters-
|
|
187
|
+
* [Parameters](#parameters-28)
|
|
186
188
|
* [FunctionDecl](#functiondecl)
|
|
187
189
|
* [Properties](#properties-6)
|
|
188
190
|
* [extractFunctions](#extractfunctions)
|
|
189
|
-
* [Parameters](#parameters-28)
|
|
190
|
-
* [asArray](#asarray)
|
|
191
191
|
* [Parameters](#parameters-29)
|
|
192
|
-
* [
|
|
192
|
+
* [asArray](#asarray)
|
|
193
193
|
* [Parameters](#parameters-30)
|
|
194
|
-
* [
|
|
194
|
+
* [fieldProvider](#fieldprovider)
|
|
195
195
|
* [Parameters](#parameters-31)
|
|
196
|
-
* [
|
|
196
|
+
* [Expander](#expander)
|
|
197
197
|
* [Parameters](#parameters-32)
|
|
198
|
+
* [copyEntries](#copyentries)
|
|
199
|
+
* [Parameters](#parameters-33)
|
|
198
200
|
|
|
199
201
|
## allInputs
|
|
200
202
|
|
|
@@ -358,6 +360,15 @@ Source of package content.
|
|
|
358
360
|
|
|
359
361
|
* `dir` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
|
|
360
362
|
|
|
363
|
+
### propertiesFor
|
|
364
|
+
|
|
365
|
+
#### Parameters
|
|
366
|
+
|
|
367
|
+
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
|
|
368
|
+
* `isCollection` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** 
|
|
369
|
+
|
|
370
|
+
Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 
|
|
371
|
+
|
|
361
372
|
### asyncIterator
|
|
362
373
|
|
|
363
374
|
List all entries.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "npm-pkgbuild",
|
|
3
|
-
"version": "20.9.
|
|
3
|
+
"version": "20.9.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"provenance": false
|
|
@@ -60,7 +60,7 @@
|
|
|
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": "^11.
|
|
63
|
+
"pacc": "^11.3.0",
|
|
64
64
|
"package-directory": "^8.2.0",
|
|
65
65
|
"pacote": "^22.0.0",
|
|
66
66
|
"tar-stream": "^3.1.7",
|
|
@@ -3,7 +3,7 @@ import { cwd } from "node:process";
|
|
|
3
3
|
import { glob } from "node:fs/promises";
|
|
4
4
|
import { ContentEntry, CollectionEntry } from "content-entry";
|
|
5
5
|
import { FileSystemEntry } from "content-entry-filesystem";
|
|
6
|
-
import { asArray } from "
|
|
6
|
+
import { asArray } from "pacc";
|
|
7
7
|
import { ContentProvider } from "./content-provider.mjs";
|
|
8
8
|
|
|
9
9
|
const DEFAULT_PATTERN = ["**/*", "!.*"];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { nodeFileTrace } from "@vercel/nft";
|
|
2
2
|
import { ContentEntry } from "content-entry";
|
|
3
3
|
import { FileSystemEntry } from "content-entry-filesystem";
|
|
4
|
-
import { asArray } from "
|
|
4
|
+
import { asArray } from "pacc";
|
|
5
5
|
import { ContentProvider } from "./content-provider.mjs";
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { join, resolve } from "node:path";
|
|
2
2
|
import { packageDirectory } from "package-directory";
|
|
3
3
|
import { packageWalker } from "npm-package-walker";
|
|
4
|
-
import { expand } from "pacc";
|
|
4
|
+
import { expand, asArray } from "pacc";
|
|
5
5
|
import { satisfies } from "compare-versions";
|
|
6
|
-
import {
|
|
6
|
+
import { mergeDependencies } from "./util.mjs";
|
|
7
7
|
import { NPMPackContentProvider } from "./content/npm-pack-content-provider.mjs";
|
|
8
8
|
import { NodeModulesContentProvider } from "./content/node-modules-content-provider.mjs";
|
|
9
9
|
import { FileContentProvider } from "./content/file-content-provider.mjs";
|
package/src/util.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { mkdir } from "node:fs/promises";
|
|
|
3
3
|
import { pipeline } from "node:stream/promises";
|
|
4
4
|
import { Readable } from "node:stream";
|
|
5
5
|
import { createWriteStream } from "node:fs";
|
|
6
|
-
import { toExternal } from "pacc";
|
|
6
|
+
import { toExternal, asArray } from "pacc";
|
|
7
7
|
import { ContentEntry } from "content-entry";
|
|
8
8
|
import { aggregateFifo } from "aggregate-async-iterator";
|
|
9
9
|
|
|
@@ -138,28 +138,6 @@ export function quote(v, qc = "'") {
|
|
|
138
138
|
return v.match(/^\w+$/) ? v : qc + v + qc;
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
-
/**
|
|
142
|
-
* Convert scalar or iterable into Array.
|
|
143
|
-
* @param {any} value
|
|
144
|
-
* @returns {Array<any>}
|
|
145
|
-
*/
|
|
146
|
-
export function asArray(value) {
|
|
147
|
-
switch (typeof value) {
|
|
148
|
-
case "undefined":
|
|
149
|
-
return [];
|
|
150
|
-
case "object":
|
|
151
|
-
if (Array.isArray(value)) {
|
|
152
|
-
return value;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
if (value instanceof Iterator || value[Symbol.iterator]) {
|
|
156
|
-
return [...value];
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
return [value];
|
|
161
|
-
}
|
|
162
|
-
|
|
163
141
|
/**
|
|
164
142
|
*
|
|
165
143
|
* @param {Object} properties
|