npm-pkgbuild 15.0.0 → 15.1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "npm-pkgbuild",
3
- "version": "15.0.0",
3
+ "version": "15.1.1",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": true
@@ -182,6 +182,7 @@ export async function* extractFromPackage(options = {}, env = {}) {
182
182
  }
183
183
 
184
184
  const fragment = {
185
+ dir,
185
186
  name,
186
187
  requires,
187
188
  priority,
@@ -266,7 +267,6 @@ export async function* extractFromPackage(options = {}, env = {}) {
266
267
  }
267
268
 
268
269
  fragment.properties = Object.assign(properties, pkgbuild);
269
- fragment.dir = dir;
270
270
  fragments[fragment.name] = fragment;
271
271
 
272
272
  if (pkgbuild.variant) {
@@ -333,7 +333,6 @@ export async function* extractFromPackage(options = {}, env = {}) {
333
333
  }
334
334
  }
335
335
 
336
-
337
336
  // @ts-ignore
338
337
  Object.assign(properties, root.properties);
339
338
  delete properties.dependencies;
@@ -346,7 +345,6 @@ export async function* extractFromPackage(options = {}, env = {}) {
346
345
  return a;
347
346
  }, []);
348
347
 
349
-
350
348
  const result = {
351
349
  context,
352
350
  variant: { name, priority: variant.priority },
@@ -380,11 +378,22 @@ export async function* extractFromPackage(options = {}, env = {}) {
380
378
  result.properties.arch = arch;
381
379
  }
382
380
 
381
+ let sources = [];
382
+
383
+ if (output.content) {
384
+ sources = context
385
+ .expand([[output.content, variant.dir]])
386
+ .reduce((a, c) => {
387
+ a.push(...content2Sources(c[0], c[1]));
388
+ return a;
389
+ }, []);
390
+ }
391
+
383
392
  yield {
384
393
  ...result,
385
394
  variant: { ...result.variant, output: name },
386
395
  output: { [name]: output },
387
- // sources: [...result.sources, ...output.sources],
396
+ sources: [...result.sources, ...sources],
388
397
  dependencies: mergeDependencies(
389
398
  result.dependencies,
390
399
  output.dependencies