pmcf 4.12.1 → 4.12.2

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": "4.12.1",
3
+ "version": "4.12.2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -337,9 +337,7 @@ export class BindService extends ExtraSourceService {
337
337
 
338
338
  for (const source of sources) {
339
339
  for (const host of source.hosts()) {
340
- configs.push(
341
- ...this.outfacingZones(host, view, this.defaultRecords)
342
- );
340
+ configs.push(...this.outfacingZones(host, view, this.defaultRecords));
343
341
  }
344
342
  }
345
343
 
@@ -347,9 +345,13 @@ export class BindService extends ExtraSourceService {
347
345
 
348
346
  if (outfacingZones.length) {
349
347
  if (this.hasCatalog) {
350
- const { catalogZone, config } = this.createCatalogZone(location, view, location);
348
+ const { catalogZone, config } = this.createCatalogZone(
349
+ location,
350
+ view,
351
+ location
352
+ );
351
353
  configs.push(config);
352
- outfacingZones.forEach(zone=>zone.catalogZone=catalogZone);
354
+ outfacingZones.forEach(zone => (zone.catalogZone = catalogZone));
353
355
  }
354
356
 
355
357
  addHook(
@@ -366,28 +368,6 @@ export class BindService extends ExtraSourceService {
366
368
  }
367
369
  }
368
370
 
369
- createCatalogZone(name, view, directory) {
370
- const config = {
371
- view,
372
- name: `catalog.${name}.zone.conf`,
373
- type: "master",
374
- zones: []
375
- };
376
-
377
- const catalogZone = {
378
- catalog: true,
379
- id: `catalog.${name}`,
380
- file: `${directory}/catalog.${name}.zone`,
381
- records: new Set([
382
- ...this.defaultRecords,
383
- DNSRecord(dnsFullName(`version.catalog.${name}`), "TXT", '"1"')
384
- ])
385
- };
386
- config.zones.push(catalogZone);
387
-
388
- return { config, catalogZone };
389
- }
390
-
391
371
  async generateZoneDefs(sources, packageData) {
392
372
  const configs = [];
393
373
 
@@ -425,7 +405,11 @@ export class BindService extends ExtraSourceService {
425
405
  config.zones.push(zone);
426
406
 
427
407
  if (this.hasCatalog) {
428
- const { catalogZone, config } = this.createCatalogZone(domain, view, locationName);
408
+ const { catalogZone, config } = this.createCatalogZone(
409
+ domain,
410
+ view,
411
+ locationName
412
+ );
429
413
  configs.push(config);
430
414
  zone.catalogZone = catalogZone;
431
415
  }
@@ -433,7 +417,7 @@ export class BindService extends ExtraSourceService {
433
417
  const hosts = new Set();
434
418
  const addresses = new Set();
435
419
 
436
- for await (const {
420
+ for (const {
437
421
  address,
438
422
  subnet,
439
423
  networkInterface,
@@ -575,6 +559,28 @@ export class BindService extends ExtraSourceService {
575
559
  });
576
560
  }
577
561
 
562
+ createCatalogZone(name, view, directory) {
563
+ const config = {
564
+ view,
565
+ name: `catalog.${name}.zone.conf`,
566
+ type: "master",
567
+ zones: []
568
+ };
569
+
570
+ const catalogZone = {
571
+ catalog: true,
572
+ id: `catalog.${name}`,
573
+ file: `${directory}/catalog.${name}.zone`,
574
+ records: new Set([
575
+ ...this.defaultRecords,
576
+ DNSRecord(dnsFullName(`version.catalog.${name}`), "TXT", '"1"')
577
+ ])
578
+ };
579
+ config.zones.push(catalogZone);
580
+
581
+ return { config, catalogZone };
582
+ }
583
+
578
584
  get defaultRecords() {
579
585
  const nameService = this.findService('in("dns",types) && priority>=300');
580
586
 
@@ -1480,6 +1480,8 @@ export class BindService extends ExtraSourceService {
1480
1480
  get excludeInterfaceKinds(): Set<any>;
1481
1481
  preparePackages(dir: any): AsyncGenerator<any, void, unknown>;
1482
1482
  generateOutfacingDefs(sources: any, packageData: any, location: any): AsyncGenerator<any, void, unknown>;
1483
+ generateZoneDefs(sources: any, packageData: any): Promise<any>;
1484
+ outfacingZones(host: any, view: any, records: any): any;
1483
1485
  createCatalogZone(name: any, view: any, directory: any): {
1484
1486
  config: {
1485
1487
  view: any;
@@ -1499,8 +1501,6 @@ export class BindService extends ExtraSourceService {
1499
1501
  }>;
1500
1502
  };
1501
1503
  };
1502
- generateZoneDefs(sources: any, packageData: any): Promise<any>;
1503
- outfacingZones(host: any, view: any, records: any): any;
1504
1504
  get defaultRecords(): {
1505
1505
  type: any;
1506
1506
  key: any;