npm-pkgbuild 11.8.5 → 11.8.6

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
@@ -98,6 +98,8 @@ see [mf-hosting](https://www.npmjs.com/package/mf-hosting) or [mf-hosting-fronte
98
98
  * [packageNameMapping](#packagenamemapping)
99
99
  * [decodePassword](#decodepassword)
100
100
  * [Parameters](#parameters-1)
101
+ * [FunctionDecl](#functiondecl)
102
+ * [Properties](#properties-2)
101
103
  * [extractFunctions](#extractfunctions)
102
104
  * [Parameters](#parameters-2)
103
105
  * [fieldProvider](#fieldprovider)
@@ -111,10 +113,11 @@ see [mf-hosting](https://www.npmjs.com/package/mf-hosting) or [mf-hosting-fronte
111
113
  * [name](#name-1)
112
114
  * [NodeModulesContentProvider](#nodemodulescontentprovider)
113
115
  * [Parameters](#parameters-7)
114
- * [Properties](#properties-2)
116
+ * [Properties](#properties-3)
115
117
  * [name](#name-2)
116
118
  * [NPMPackContentProvider](#npmpackcontentprovider)
117
119
  * [Parameters](#parameters-8)
120
+ * [Properties](#properties-4)
118
121
  * [name](#name-3)
119
122
  * [pkgKeyValuePairOptions](#pkgkeyvaluepairoptions)
120
123
  * [fields](#fields)
@@ -126,7 +129,7 @@ see [mf-hosting](https://www.npmjs.com/package/mf-hosting) or [mf-hosting-fronte
126
129
  * [prepare](#prepare)
127
130
  * [Parameters](#parameters-9)
128
131
  * [Field](#field)
129
- * [Properties](#properties-3)
132
+ * [Properties](#properties-5)
130
133
  * [Packager](#packager)
131
134
  * [Parameters](#parameters-10)
132
135
  * [tmpdir](#tmpdir)
@@ -192,6 +195,15 @@ Decode a password
192
195
 
193
196
  Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** plaintext password
194
197
 
198
+ ## FunctionDecl
199
+
200
+ Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)
201
+
202
+ ### Properties
203
+
204
+ * `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
205
+ * `body` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>**&#x20;
206
+
195
207
  ## extractFunctions
196
208
 
197
209
  Extract shell functions from a given text.
@@ -200,7 +212,7 @@ Extract shell functions from a given text.
200
212
 
201
213
  * `source` **AsyncIterator<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>**&#x20;
202
214
 
203
- Returns **AsyncIterator\<FunctionDecl>**&#x20;
215
+ Returns **AsyncIterator<[FunctionDecl](#functiondecl)>**&#x20;
204
216
 
205
217
  ## fieldProvider
206
218
 
@@ -280,6 +292,10 @@ Content from npm pack.
280
292
  * `definitions` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**&#x20;
281
293
  * `entryProperties` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** to be set for each entry
282
294
 
295
+ ### Properties
296
+
297
+ * `dir` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**&#x20;
298
+
283
299
  ### name
284
300
 
285
301
  Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** name of the content provider
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "npm-pkgbuild",
3
- "version": "11.8.5",
3
+ "version": "11.8.6",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -19,6 +19,11 @@ import {
19
19
  packageNameMapping
20
20
  } from "../util.mjs";
21
21
 
22
+
23
+ function quoteFile(name) {
24
+ return name.match(/\s/) ? "\"" + name + "\"" : name;
25
+ }
26
+
22
27
  /**
23
28
  * map install hook named from arch to rpm
24
29
  */
@@ -132,7 +137,7 @@ export class RPM extends Packager {
132
137
 
133
138
  yield `%files\n\n`;
134
139
  for (const file of files) {
135
- yield "/" + file + "\n";
140
+ yield quoteFile("/" + file) + "\n";
136
141
  }
137
142
 
138
143
  for await (const file of copyEntries(