pmcf 4.12.0 → 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.0",
3
+ "version": "4.12.2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -308,8 +308,7 @@ export class BindService extends ExtraSourceService {
308
308
  name: `named-zones-${name}`,
309
309
  description: `zone definitions for ${names}`,
310
310
  dependencies: ["mf-named"],
311
- access: "private",
312
- hooks: {}
311
+ access: "private"
313
312
  };
314
313
 
315
314
  yield this.generateZoneDefs(sources, packageData);
@@ -338,9 +337,7 @@ export class BindService extends ExtraSourceService {
338
337
 
339
338
  for (const source of sources) {
340
339
  for (const host of source.hosts()) {
341
- configs.push(
342
- ...this.outfacingZones(host, view, this.defaultRecords)
343
- );
340
+ configs.push(...this.outfacingZones(host, view, this.defaultRecords));
344
341
  }
345
342
  }
346
343
 
@@ -348,9 +345,13 @@ export class BindService extends ExtraSourceService {
348
345
 
349
346
  if (outfacingZones.length) {
350
347
  if (this.hasCatalog) {
351
- const { catalogZone, config } = this.createCatalogZone(location, view, location);
348
+ const { catalogZone, config } = this.createCatalogZone(
349
+ location,
350
+ view,
351
+ location
352
+ );
352
353
  configs.push(config);
353
- outfacingZones.forEach(zone=>zone.catalogZone=catalogZone);
354
+ outfacingZones.forEach(zone => (zone.catalogZone = catalogZone));
354
355
  }
355
356
 
356
357
  addHook(
@@ -367,28 +368,6 @@ export class BindService extends ExtraSourceService {
367
368
  }
368
369
  }
369
370
 
370
- createCatalogZone(name, view, location) {
371
- const config = {
372
- view,
373
- name: `catalog.${name}.zone.conf`,
374
- type: "master",
375
- zones: []
376
- };
377
-
378
- const catalogZone = {
379
- catalog: true,
380
- id: `catalog.${name}`,
381
- file: `${location}/catalog.${name}.zone`,
382
- records: new Set([
383
- ...this.defaultRecords,
384
- DNSRecord(dnsFullName(`version.catalog.${name}`), "TXT", '"1"')
385
- ])
386
- };
387
- config.zones.push(catalogZone);
388
-
389
- return { config, catalogZone };
390
- }
391
-
392
371
  async generateZoneDefs(sources, packageData) {
393
372
  const configs = [];
394
373
 
@@ -426,7 +405,11 @@ export class BindService extends ExtraSourceService {
426
405
  config.zones.push(zone);
427
406
 
428
407
  if (this.hasCatalog) {
429
- const { catalogZone, config } = this.createCatalogZone(domain, view, locationName);
408
+ const { catalogZone, config } = this.createCatalogZone(
409
+ domain,
410
+ view,
411
+ locationName
412
+ );
430
413
  configs.push(config);
431
414
  zone.catalogZone = catalogZone;
432
415
  }
@@ -434,7 +417,7 @@ export class BindService extends ExtraSourceService {
434
417
  const hosts = new Set();
435
418
  const addresses = new Set();
436
419
 
437
- for await (const {
420
+ for (const {
438
421
  address,
439
422
  subnet,
440
423
  networkInterface,
@@ -576,6 +559,28 @@ export class BindService extends ExtraSourceService {
576
559
  });
577
560
  }
578
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
+
579
584
  get defaultRecords() {
580
585
  const nameService = this.findService('in("dns",types) && priority>=300');
581
586
 
@@ -1480,7 +1480,9 @@ 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
- createCatalogZone(name: any, view: any, location: any): {
1483
+ generateZoneDefs(sources: any, packageData: any): Promise<any>;
1484
+ outfacingZones(host: any, view: any, records: any): any;
1485
+ createCatalogZone(name: any, view: any, directory: any): {
1484
1486
  config: {
1485
1487
  view: any;
1486
1488
  name: string;
@@ -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;