pmcf 3.2.1 → 3.3.0

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": "3.2.1",
3
+ "version": "3.3.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -2,7 +2,12 @@ import { join } from "node:path";
2
2
  import { createHmac } from "node:crypto";
3
3
  import { FileContentProvider } from "npm-pkgbuild";
4
4
  import { isLinkLocal, reverseArpa } from "ip-utilties";
5
- import { default_attribute, boolean_attribute, number_attribute } from "pacc";
5
+ import {
6
+ default_attribute,
7
+ boolean_attribute_writeable_true,
8
+ boolean_attribute_writeable_false,
9
+ number_attribute
10
+ } from "pacc";
6
11
  import { writeLines, asArray } from "../utils.mjs";
7
12
  import {
8
13
  DNSRecord,
@@ -38,35 +43,17 @@ const BindServiceTypeDefinition = {
38
43
  },
39
44
  protected: { type: address_types, collection: true, writable: true },
40
45
  internal: { type: address_types, collection: true, writable: true },
41
- hasSVRRecords: {
42
- ...boolean_attribute,
43
- writable: true
44
- },
45
- hasCatalog: {
46
- ...boolean_attribute,
47
- writable: true
48
- },
49
- hasLinkLocalAdresses: {
50
- ...boolean_attribute,
51
- writable: true
52
- },
53
- hasLocationRecord: {
54
- ...boolean_attribute,
55
- writable: true,
56
- default: true
57
- },
46
+ hasSVRRecords: boolean_attribute_writeable_false,
47
+ hasCatalog: boolean_attribute_writeable_true,
48
+ hasLinkLocalAdresses: boolean_attribute_writeable_true,
49
+ hasLocationRecord: boolean_attribute_writeable_true,
58
50
  excludeInterfaceKinds: {
59
51
  ...default_attribute,
60
52
  collection: true,
61
53
  writable: true
62
54
  },
63
-
64
55
  exclude: { type: address_types, collection: true, writable: true },
65
- notify: {
66
- ...boolean_attribute,
67
- writable: true,
68
- default: false
69
- },
56
+ notify: boolean_attribute_writeable_false,
70
57
  recordTTL: { ...default_attribute, writable: true },
71
58
  serial: { ...number_attribute, writable: true },
72
59
  refresh: { ...default_attribute, writable: true },
@@ -501,6 +488,11 @@ export class BindService extends ExtraSourceService {
501
488
 
502
489
  outfacingZones(host, view, records) {
503
490
  return host.foreignDomainNames.map(domain => {
491
+ const wildcard = domain.startsWith("*.");
492
+ if (wildcard) {
493
+ domain = domain.substring(2);
494
+ }
495
+
504
496
  const zone = {
505
497
  id: domain,
506
498
  file: `OUTFACING/${domain}.zone`,
@@ -522,6 +514,12 @@ export class BindService extends ExtraSourceService {
522
514
  zone.records.add(
523
515
  DNSRecord("@", dnsRecordTypeForAddressFamily(na.family), na.address)
524
516
  );
517
+
518
+ if (wildcard) {
519
+ zone.records.add(
520
+ DNSRecord("*", dnsRecordTypeForAddressFamily(na.family), na.address)
521
+ );
522
+ }
525
523
  }
526
524
 
527
525
  return config;
@@ -614,62 +614,10 @@ export class BindService extends ExtraSourceService {
614
614
  collection: boolean;
615
615
  writable: boolean;
616
616
  };
617
- hasSVRRecords: {
618
- writable: boolean;
619
- type: string;
620
- isKey: boolean;
621
- mandatory: boolean;
622
- collection: boolean;
623
- private?: boolean;
624
- depends?: string;
625
- description?: string;
626
- default?: any;
627
- set?: Function;
628
- get?: Function;
629
- env?: string[] | string;
630
- };
631
- hasCatalog: {
632
- writable: boolean;
633
- type: string;
634
- isKey: boolean;
635
- mandatory: boolean;
636
- collection: boolean;
637
- private?: boolean;
638
- depends?: string;
639
- description?: string;
640
- default?: any;
641
- set?: Function;
642
- get?: Function;
643
- env?: string[] | string;
644
- };
645
- hasLinkLocalAdresses: {
646
- writable: boolean;
647
- type: string;
648
- isKey: boolean;
649
- mandatory: boolean;
650
- collection: boolean;
651
- private?: boolean;
652
- depends?: string;
653
- description?: string;
654
- default?: any;
655
- set?: Function;
656
- get?: Function;
657
- env?: string[] | string;
658
- };
659
- hasLocationRecord: {
660
- writable: boolean;
661
- default: boolean;
662
- type: string;
663
- isKey: boolean;
664
- mandatory: boolean;
665
- collection: boolean;
666
- private?: boolean;
667
- depends?: string;
668
- description?: string;
669
- set?: Function;
670
- get?: Function;
671
- env?: string[] | string;
672
- };
617
+ hasSVRRecords: import("pacc").AttributeDefinition;
618
+ hasCatalog: import("pacc").AttributeDefinition;
619
+ hasLinkLocalAdresses: import("pacc").AttributeDefinition;
620
+ hasLocationRecord: import("pacc").AttributeDefinition;
673
621
  excludeInterfaceKinds: {
674
622
  collection: boolean;
675
623
  writable: boolean;
@@ -689,20 +637,7 @@ export class BindService extends ExtraSourceService {
689
637
  collection: boolean;
690
638
  writable: boolean;
691
639
  };
692
- notify: {
693
- writable: boolean;
694
- default: boolean;
695
- type: string;
696
- isKey: boolean;
697
- mandatory: boolean;
698
- collection: boolean;
699
- private?: boolean;
700
- depends?: string;
701
- description?: string;
702
- set?: Function;
703
- get?: Function;
704
- env?: string[] | string;
705
- };
640
+ notify: import("pacc").AttributeDefinition;
706
641
  recordTTL: {
707
642
  writable: boolean;
708
643
  type: string;