pmcf 1.48.1 → 1.48.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.
@@ -32,7 +32,7 @@ async function generateNamedDefs(owner, targetDir) {
32
32
  const zones = [];
33
33
  const records = new Set();
34
34
 
35
- const nameserver = (await owner.service({ type: "dns" }))?.owner;
35
+ const nameserver = (await owner.findService({ type: "dns" }))?.owner;
36
36
  const rname = dns.administratorEmail.replace(/@/, ".");
37
37
 
38
38
  let maxKeyLength;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmcf",
3
- "version": "1.48.1",
3
+ "version": "1.48.2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
package/src/utils.mjs CHANGED
@@ -3,9 +3,10 @@ import { join } from "node:path";
3
3
 
4
4
  export async function writeLines(dir, name, lines) {
5
5
  await mkdir(dir, { recursive: true });
6
+ if (typeof lines === "string") lines = [lines];
6
7
  return writeFile(
7
8
  join(dir, name),
8
- [...asArray(lines)]
9
+ [...lines]
9
10
  .flat()
10
11
  .filter(line => line !== undefined)
11
12
  .map(l => l + "\n")
@@ -130,9 +131,8 @@ export function encodeIP(address) {
130
131
  return _encode(isIPv4Address(address) ? ipv4 : ipv6, address);
131
132
  }
132
133
 
133
- export function formatCIDR(address,subnet)
134
- {
135
- return subnet ? `${address}/${subnet.prefixLength}`: address;
134
+ export function formatCIDR(address, subnet) {
135
+ return subnet ? `${address}/${subnet.prefixLength}` : address;
136
136
  }
137
137
 
138
138
  export function normalizeCIDR(address) {
@@ -164,8 +164,7 @@ export function normalizeCIDR(address) {
164
164
  return { prefix, prefixLength, cidr: `${prefix}/${prefixLength}` };
165
165
  }
166
166
 
167
- export function hasWellKnownSubnet(address)
168
- {
167
+ export function hasWellKnownSubnet(address) {
169
168
  const n = encodeIP(address);
170
169
  return n === IPV4_LOCALHOST || n === IPV6_LOCALHOST || isLinkLocal(address);
171
170
  }