pmcf 6.8.4 → 6.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmcf",
3
- "version": "6.8.4",
3
+ "version": "6.9.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -63,7 +63,7 @@
63
63
  "ava": "^8.0.1",
64
64
  "c8": "^12.0.0",
65
65
  "documentation": "^14.0.3",
66
- "semantic-release": "^25.0.7"
66
+ "semantic-release": "^25.0.8"
67
67
  },
68
68
  "engines": {
69
69
  "node": ">=26.4.0"
@@ -156,12 +156,13 @@ class bind_group extends Base {
156
156
  }
157
157
 
158
158
  async packageContent(outputControl) {
159
- return await this.generateACLs(outputControl) && await this.generateZoneDefs(outputControl, this.entries);
159
+ return (
160
+ (await this.generateACLs(outputControl)) &&
161
+ (await this.generateZoneDefs(outputControl, this.entries))
162
+ );
160
163
  }
161
164
 
162
165
  async generateACLs(outputControl) {
163
- console.log("generateACLs", this.name);
164
-
165
166
  const acls = addressesStatement(
166
167
  `acl ${this.name}`,
167
168
  addresses(this.access, { aggregate: true })
@@ -181,8 +182,6 @@ class bind_group extends Base {
181
182
  }
182
183
 
183
184
  async generateZoneDefs(outputControl, sources) {
184
- console.log("generateZoneDefs", this.name);
185
-
186
185
  for (const source of sources) {
187
186
  console.log(
188
187
  "ZONE",
@@ -494,27 +493,38 @@ export class bind extends ExtraSourceService {
494
493
  `forwarders.conf`,
495
494
  addressesStatement("forwarders", forwarders)
496
495
  );
496
+
497
+ return true;
497
498
  }
498
499
 
499
- return forwarders.length > 0;
500
+ return false;
500
501
  }
501
502
 
502
503
  async *preparePackages(dir) {
504
+ const permissions = this.packageContentPermissions;
503
505
  const packageData = this.packageData;
504
- packageData.sources.push(new FileContentProvider(dir));
505
506
 
506
- const outputControl = newOutputControl(packageData, dir);
507
+ packageData.sources = await Array.fromAsync(
508
+ this.templateContent(...permissions)
509
+ );
510
+
511
+ let hasContent = packageData.sources.length > 0;
507
512
 
508
- let hasContent = false;
513
+ packageData.sources.push(
514
+ new FileContentProvider(dir + "/", ...permissions)
515
+ );
516
+
517
+ const outputControl = newOutputControl(packageData, dir);
509
518
 
510
519
  for (const group of this.groups.values()) {
511
520
  const present = await group.packageContent(outputControl);
512
521
  hasContent ||= present;
513
522
  }
514
523
 
515
- hasContent ||= await this.writeForwarders(outputControl);
524
+ const present = await this.writeForwarders(outputControl);
516
525
 
517
- if (hasContent) {
526
+ if (hasContent || present) {
527
+ console.log(packageData);
518
528
  yield packageData;
519
529
  }
520
530