pmcf 2.11.4 → 2.12.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": "2.11.4",
3
+ "version": "2.12.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -14,7 +14,14 @@ const NTPServiceTypeDefinition = {
14
14
  owners: ServiceTypeDefinition.owners,
15
15
  extends: ExtraSourceServiceTypeDefinition,
16
16
  priority: 0.1,
17
- properties: {}
17
+ properties: {
18
+ isPool: {
19
+ type: "boolean",
20
+ collection: false,
21
+ writeable: true,
22
+ default: false
23
+ }
24
+ }
18
25
  };
19
26
 
20
27
  const NTP_SERVICE_FILTER = { type: NTPServiceTypeDefinition.name };
package/src/utils.mjs CHANGED
@@ -87,12 +87,13 @@ export function isIPv4Address(address) {
87
87
  return false;
88
88
  }
89
89
 
90
- export function generateEU64(mac) {
91
- //TODO
92
- }
93
-
94
90
  export function isIPv6Address(address) {
95
- return address.indexOf(":") >= 0;
91
+ switch (typeof address) {
92
+ case "string":
93
+ return address.indexOf(":") >= 0;
94
+ }
95
+
96
+ return false;
96
97
  }
97
98
 
98
99
  export function isLinkLocal(address) {
@@ -107,6 +108,10 @@ export function isLinkLocal(address) {
107
108
  return false;
108
109
  }
109
110
 
111
+ export function generateEU64(mac) {
112
+ //TODO
113
+ }
114
+
110
115
  export function isLocalhost(address) {
111
116
  const eaddr = encodeIP(address);
112
117
  return eaddr === IPV4_LOCALHOST || eaddr === IPV6_LOCALHOST;
@@ -263,7 +263,14 @@ export class NTPService extends ExtraSourceService {
263
263
  };
264
264
  };
265
265
  priority: number;
266
- properties: {};
266
+ properties: {
267
+ isPool: {
268
+ type: string;
269
+ collection: boolean;
270
+ writeable: boolean;
271
+ default: boolean;
272
+ };
273
+ };
267
274
  };
268
275
  get systemdConfig(): (string | {
269
276
  NTP: string;
package/types/utils.d.mts CHANGED
@@ -6,9 +6,9 @@ export function bridgeToJSON(bridge: any): any[];
6
6
  export function asArray(value: any): any[];
7
7
  export function asIterator(value: any): any;
8
8
  export function isIPv4Address(address: any): boolean;
9
- export function generateEU64(mac: any): void;
10
9
  export function isIPv6Address(address: any): boolean;
11
10
  export function isLinkLocal(address: any): boolean;
11
+ export function generateEU64(mac: any): void;
12
12
  export function isLocalhost(address: any): boolean;
13
13
  export function normalizeIPAddress(address: any): any;
14
14
  export function addressWithPrefixLength(address: any, prefixLength: any): string;