pmcf 3.9.3 → 3.10.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.9.3",
3
+ "version": "3.10.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -1,5 +1,6 @@
1
1
  import { addType } from "./types.mjs";
2
2
  import { Service, ServiceTypeDefinition } from "./service.mjs";
3
+ import { networkAddressType } from "pmcf";
3
4
 
4
5
  export const ExtraSourceServiceTypeDefinition = {
5
6
  name: "extra-source-service",
@@ -7,7 +8,7 @@ export const ExtraSourceServiceTypeDefinition = {
7
8
  extends: ServiceTypeDefinition,
8
9
  priority: 0.1,
9
10
  properties: {
10
- source: { type: "network", collection: true, writable: true }
11
+ source: { type: networkAddressType, collection: true, writable: true }
11
12
  }
12
13
  };
13
14
 
@@ -6,6 +6,8 @@ import {
6
6
  boolean_attribute_writable
7
7
  } from "pacc";
8
8
 
9
+ export const networkAddressType = ["network", "host", "network_interface"];
10
+
9
11
  export const networkProperties = {
10
12
  scope: {
11
13
  ...string_attribute_writable,
@@ -16,14 +16,12 @@ import {
16
16
  dnsRecordTypeForAddressFamily,
17
17
  sortZoneRecords
18
18
  } from "../dns-utils.mjs";
19
- import { ExtraSourceService, serviceEndpoints, addresses } from "pmcf";
19
+ import { ExtraSourceService, serviceEndpoints, addresses, networkAddressType } from "pmcf";
20
20
  import { addType } from "../types.mjs";
21
21
  import { Service, ServiceTypeDefinition } from "../service.mjs";
22
22
  import { ExtraSourceServiceTypeDefinition } from "../extra-source-service.mjs";
23
23
  import { addHook } from "../hooks.mjs";
24
24
 
25
- const address_types = ["network", "host", "network_interface"];
26
-
27
25
  const BindServiceTypeDefinition = {
28
26
  name: "bind",
29
27
  specializationOf: ServiceTypeDefinition,
@@ -32,17 +30,17 @@ const BindServiceTypeDefinition = {
32
30
  priority: 0.1,
33
31
  properties: {
34
32
  addresses: {
35
- type: ["network", "host", "network_interface", "location", "owner"],
33
+ type: [...networkAddressType, "location", "owner"],
36
34
  collection: true,
37
35
  writable: true
38
36
  },
39
37
  trusted: {
40
- type: address_types,
38
+ type: networkAddressType,
41
39
  collection: true,
42
40
  writable: true
43
41
  },
44
- protected: { type: address_types, collection: true, writable: true },
45
- internal: { type: address_types, collection: true, writable: true },
42
+ protected: { type: networkAddressType, collection: true, writable: true },
43
+ internal: { type: networkAddressType, collection: true, writable: true },
46
44
  hasSVRRecords: boolean_attribute_writable_false,
47
45
  hasCatalog: boolean_attribute_writable_true,
48
46
  hasLinkLocalAdresses: boolean_attribute_writable_false,
@@ -50,7 +48,7 @@ const BindServiceTypeDefinition = {
50
48
  excludeInterfaceKinds: {
51
49
  ...string_collection_attribute_writable
52
50
  },
53
- exclude: { type: address_types, collection: true, writable: true },
51
+ exclude: { type: networkAddressType, collection: true, writable: true },
54
52
  notify: boolean_attribute_writable_false,
55
53
  recordTTL: { ...string_attribute_writable },
56
54
  serial: { ...number_attribute, writable: true },
@@ -5,9 +5,9 @@ export namespace ExtraSourceServiceTypeDefinition {
5
5
  export let priority: number;
6
6
  export namespace properties {
7
7
  namespace source {
8
- let type: string;
9
- let collection: boolean;
10
- let writable: boolean;
8
+ export { networkAddressType as type };
9
+ export let collection: boolean;
10
+ export let writable: boolean;
11
11
  }
12
12
  }
13
13
  }
@@ -216,7 +216,7 @@ export class ExtraSourceService extends Service {
216
216
  priority: number;
217
217
  properties: {
218
218
  source: {
219
- type: string;
219
+ type: string[];
220
220
  collection: boolean;
221
221
  writable: boolean;
222
222
  };
@@ -228,4 +228,5 @@ export class ExtraSourceService extends Service {
228
228
  get source(): any[];
229
229
  }
230
230
  import { ServiceTypeDefinition } from "./service.mjs";
231
+ import { networkAddressType } from "pmcf";
231
232
  import { Service } from "./service.mjs";
@@ -1,3 +1,4 @@
1
+ export const networkAddressType: string[];
1
2
  export namespace networkProperties {
2
3
  export let scope: {
3
4
  values: string[];
@@ -404,7 +404,7 @@ export class BindService extends ExtraSourceService {
404
404
  priority: number;
405
405
  properties: {
406
406
  source: {
407
- type: string;
407
+ type: string[];
408
408
  collection: boolean;
409
409
  writable: boolean;
410
410
  };
@@ -404,7 +404,7 @@ export class ChronyService extends ExtraSourceService {
404
404
  priority: number;
405
405
  properties: {
406
406
  source: {
407
- type: string;
407
+ type: string[];
408
408
  collection: boolean;
409
409
  writable: boolean;
410
410
  };
@@ -404,7 +404,7 @@ export class HeadscaleService extends ExtraSourceService {
404
404
  priority: number;
405
405
  properties: {
406
406
  source: {
407
- type: string;
407
+ type: string[];
408
408
  collection: boolean;
409
409
  writable: boolean;
410
410
  };
@@ -404,7 +404,7 @@ export class SystemdResolvedService extends ExtraSourceService {
404
404
  priority: number;
405
405
  properties: {
406
406
  source: {
407
- type: string;
407
+ type: string[];
408
408
  collection: boolean;
409
409
  writable: boolean;
410
410
  };
@@ -404,7 +404,7 @@ export class SystemdTimesyncdService extends ExtraSourceService {
404
404
  priority: number;
405
405
  properties: {
406
406
  source: {
407
- type: string;
407
+ type: string[];
408
408
  collection: boolean;
409
409
  writable: boolean;
410
410
  };