pmcf 3.2.1 → 3.3.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 +1 -1
- package/src/services/bind.mjs +26 -28
- package/types/services/bind.d.mts +9 -74
package/package.json
CHANGED
package/src/services/bind.mjs
CHANGED
|
@@ -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 {
|
|
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,41 +43,23 @@ 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
|
-
|
|
43
|
-
|
|
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
|
-
refresh: { ...default_attribute, writable: true },
|
|
73
|
-
retry: { ...default_attribute, writable: true },
|
|
74
|
-
expire: { ...default_attribute, writable: true },
|
|
75
|
-
minimum: { ...default_attribute, writable: true },
|
|
59
|
+
refresh: { ...default_attribute, writable: true, default: 36000 },
|
|
60
|
+
retry: { ...default_attribute, writable: true, default: 72000 },
|
|
61
|
+
expire: { ...default_attribute, writable: true, default: 600000 },
|
|
62
|
+
minimum: { ...default_attribute, writable: true, default: 60000 },
|
|
76
63
|
allowedUpdates: { ...default_attribute, collection: true, writable: true }
|
|
77
64
|
},
|
|
78
65
|
|
|
@@ -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
|
-
|
|
619
|
-
|
|
620
|
-
|
|
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;
|
|
@@ -733,6 +668,7 @@ export class BindService extends ExtraSourceService {
|
|
|
733
668
|
};
|
|
734
669
|
refresh: {
|
|
735
670
|
writable: boolean;
|
|
671
|
+
default: number;
|
|
736
672
|
type: string;
|
|
737
673
|
isKey: boolean;
|
|
738
674
|
mandatory: boolean;
|
|
@@ -740,13 +676,13 @@ export class BindService extends ExtraSourceService {
|
|
|
740
676
|
private?: boolean;
|
|
741
677
|
depends?: string;
|
|
742
678
|
description?: string;
|
|
743
|
-
default?: any;
|
|
744
679
|
set?: Function;
|
|
745
680
|
get?: Function;
|
|
746
681
|
env?: string[] | string;
|
|
747
682
|
};
|
|
748
683
|
retry: {
|
|
749
684
|
writable: boolean;
|
|
685
|
+
default: number;
|
|
750
686
|
type: string;
|
|
751
687
|
isKey: boolean;
|
|
752
688
|
mandatory: boolean;
|
|
@@ -754,13 +690,13 @@ export class BindService extends ExtraSourceService {
|
|
|
754
690
|
private?: boolean;
|
|
755
691
|
depends?: string;
|
|
756
692
|
description?: string;
|
|
757
|
-
default?: any;
|
|
758
693
|
set?: Function;
|
|
759
694
|
get?: Function;
|
|
760
695
|
env?: string[] | string;
|
|
761
696
|
};
|
|
762
697
|
expire: {
|
|
763
698
|
writable: boolean;
|
|
699
|
+
default: number;
|
|
764
700
|
type: string;
|
|
765
701
|
isKey: boolean;
|
|
766
702
|
mandatory: boolean;
|
|
@@ -768,13 +704,13 @@ export class BindService extends ExtraSourceService {
|
|
|
768
704
|
private?: boolean;
|
|
769
705
|
depends?: string;
|
|
770
706
|
description?: string;
|
|
771
|
-
default?: any;
|
|
772
707
|
set?: Function;
|
|
773
708
|
get?: Function;
|
|
774
709
|
env?: string[] | string;
|
|
775
710
|
};
|
|
776
711
|
minimum: {
|
|
777
712
|
writable: boolean;
|
|
713
|
+
default: number;
|
|
778
714
|
type: string;
|
|
779
715
|
isKey: boolean;
|
|
780
716
|
mandatory: boolean;
|
|
@@ -782,7 +718,6 @@ export class BindService extends ExtraSourceService {
|
|
|
782
718
|
private?: boolean;
|
|
783
719
|
depends?: string;
|
|
784
720
|
description?: string;
|
|
785
|
-
default?: any;
|
|
786
721
|
set?: Function;
|
|
787
722
|
get?: Function;
|
|
788
723
|
env?: string[] | string;
|