pmcf 6.12.0 → 6.13.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/README.md +7 -0
- package/package.json +1 -1
- package/src/services/bind.mjs +9 -18
package/README.md
CHANGED
|
@@ -80,6 +80,7 @@ generates config packages for:
|
|
|
80
80
|
* [SkeletonNetworkInterface](#skeletonnetworkinterface)
|
|
81
81
|
* [networkAddresses](#networkaddresses)
|
|
82
82
|
* [Parameters](#parameters-14)
|
|
83
|
+
* [type](#type)
|
|
83
84
|
* [SystemdJournalRemoteService](#systemdjournalremoteservice)
|
|
84
85
|
* [Properties](#properties)
|
|
85
86
|
* [systemdConfigs](#systemdconfigs)
|
|
@@ -298,6 +299,12 @@ Keeps track of all in flight object creations and loose ends during config initi
|
|
|
298
299
|
|
|
299
300
|
Returns **Iterable<[NetworkAddress](#networkaddress)>** 
|
|
300
301
|
|
|
302
|
+
## type
|
|
303
|
+
|
|
304
|
+
Type of the group.
|
|
305
|
+
|
|
306
|
+
Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** view | unknown
|
|
307
|
+
|
|
301
308
|
## SystemdJournalRemoteService
|
|
302
309
|
|
|
303
310
|
**Extends CoreService**
|
package/package.json
CHANGED
package/src/services/bind.mjs
CHANGED
|
@@ -166,10 +166,15 @@ class bind_group extends Base {
|
|
|
166
166
|
}
|
|
167
167
|
|
|
168
168
|
async packageContent(outputControl) {
|
|
169
|
+
outputControl.packageData.sources.push(
|
|
170
|
+
...(await Array.fromAsync(
|
|
171
|
+
this.templateContent(...outputControl.permissions)
|
|
172
|
+
))
|
|
173
|
+
);
|
|
174
|
+
|
|
169
175
|
return (
|
|
170
176
|
await Promise.all([
|
|
171
177
|
this.generateACLs(outputControl),
|
|
172
|
-
this.generateTypeDefinition(outputControl),
|
|
173
178
|
this.generateZoneDefs(outputControl, this.entries)
|
|
174
179
|
])
|
|
175
180
|
).find(r => r)
|
|
@@ -177,20 +182,6 @@ class bind_group extends Base {
|
|
|
177
182
|
: false;
|
|
178
183
|
}
|
|
179
184
|
|
|
180
|
-
async generateTypeDefinition(outputControl) {
|
|
181
|
-
if (this.type === "view") {
|
|
182
|
-
await writeLines(
|
|
183
|
-
join(outputControl.dir, "etc/named/views"),
|
|
184
|
-
`gen-${this.name}.conf`,
|
|
185
|
-
[
|
|
186
|
-
`view ${this.name} {`,
|
|
187
|
-
`include "/etc/named/views/${this.name}/*.conf";`,
|
|
188
|
-
"};"
|
|
189
|
-
]
|
|
190
|
-
);
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
|
|
194
185
|
async generateACLs(outputControl) {
|
|
195
186
|
const acls = addressesStatement(
|
|
196
187
|
`acl ${this.name}`,
|
|
@@ -552,7 +543,7 @@ export class bind extends ExtraSourceService {
|
|
|
552
543
|
new FileContentProvider(dir + "/", ...permissions)
|
|
553
544
|
);
|
|
554
545
|
|
|
555
|
-
const outputControl = newOutputControl(packageData, dir);
|
|
546
|
+
const outputControl = newOutputControl(packageData, dir, permissions);
|
|
556
547
|
|
|
557
548
|
for (const group of this.groups.values()) {
|
|
558
549
|
const present = await group.packageContent(outputControl);
|
|
@@ -638,6 +629,6 @@ export class bind extends ExtraSourceService {
|
|
|
638
629
|
}
|
|
639
630
|
}
|
|
640
631
|
|
|
641
|
-
function newOutputControl(packageData, dir) {
|
|
642
|
-
return { configs: [], catalogs: new Map(), packageData, dir };
|
|
632
|
+
function newOutputControl(packageData, dir, permissions) {
|
|
633
|
+
return { configs: [], catalogs: new Map(), packageData, dir, permissions };
|
|
643
634
|
}
|