pmcf 6.44.6 → 6.44.7

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 CHANGED
@@ -82,29 +82,29 @@ generates config packages for:
82
82
  * [domainNames](#domainnames)
83
83
  * [InitializationContext](#initializationcontext)
84
84
  * [Parameters](#parameters-14)
85
+ * [SkeletonNetworkInterface](#skeletonnetworkinterface)
86
+ * [networkAddresses](#networkaddresses)
87
+ * [Parameters](#parameters-15)
85
88
  * [zones](#zones)
86
89
  * [addressesStatement](#addressesstatement)
87
- * [Parameters](#parameters-15)
90
+ * [Parameters](#parameters-16)
88
91
  * [SystemdJournalRemoteService](#systemdjournalremoteservice)
89
92
  * [Properties](#properties)
90
93
  * [systemdConfigs](#systemdconfigs)
91
- * [Parameters](#parameters-16)
94
+ * [Parameters](#parameters-17)
92
95
  * [SystemdJournalUploadService](#systemdjournaluploadservice)
93
96
  * [Properties](#properties-1)
94
97
  * [systemdConfigs](#systemdconfigs-1)
95
- * [Parameters](#parameters-17)
98
+ * [Parameters](#parameters-18)
96
99
  * [NetworkAddress](#networkaddress)
97
- * [Parameters](#parameters-18)
100
+ * [Parameters](#parameters-19)
98
101
  * [subnet](#subnet)
99
102
  * [networkInterface](#networkinterface)
100
103
  * [address](#address)
101
104
  * [addresses](#addresses)
102
- * [Parameters](#parameters-19)
103
- * [cidrAddresses](#cidraddresses)
104
105
  * [Parameters](#parameters-20)
105
- * [SkeletonNetworkInterface](#skeletonnetworkinterface)
106
- * [networkAddresses](#networkaddresses)
107
- * [Parameters](#parameters-21)
106
+ * [cidrAddresses](#cidraddresses)
107
+ * [Parameters](#parameters-21)
108
108
  * [families](#families)
109
109
  * [secretName](#secretname)
110
110
  * [directHosts](#directhosts)
@@ -293,7 +293,7 @@ Endpoint based on http
293
293
  ### Parameters
294
294
 
295
295
  * `service` **Service** 
296
- * `address` **any** 
296
+ * `address` **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) | [URL](https://developer.mozilla.org/docs/Web/API/URL/URL))** 
297
297
  * `data` **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 
298
298
 
299
299
  ### port
@@ -312,6 +312,18 @@ Keeps track of all in flight object creations and loose ends during config initi
312
312
 
313
313
  * `directory` (optional, default `"/"`)
314
314
 
315
+ ## SkeletonNetworkInterface
316
+
317
+ **Extends ServiceOwner**
318
+
319
+ ### networkAddresses
320
+
321
+ #### Parameters
322
+
323
+ * `filter` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** (optional, default `n=>true`)
324
+
325
+ Returns **Iterable<[NetworkAddress](#networkaddress)>**&#x20;
326
+
315
327
  ## zones
316
328
 
317
329
  Type: [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\<bind\_zone>
@@ -402,18 +414,6 @@ Returns **Iterable<[string](https://developer.mozilla.org/docs/Web/JavaScript/Re
402
414
 
403
415
  Returns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>**&#x20;
404
416
 
405
- ## SkeletonNetworkInterface
406
-
407
- **Extends ServiceOwner**
408
-
409
- ### networkAddresses
410
-
411
- #### Parameters
412
-
413
- * `filter` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** (optional, default `n=>true`)
414
-
415
- Returns **Iterable<[NetworkAddress](#networkaddress)>**&#x20;
416
-
417
417
  ## families
418
418
 
419
419
  Returns **[Set](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Set)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>**&#x20;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmcf",
3
- "version": "6.44.6",
3
+ "version": "6.44.7",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -15,7 +15,7 @@ import {
15
15
 
16
16
  export const networkAddressType = "network|host|network_interface";
17
17
 
18
- export const extends_attribute = {
18
+ export const extends_attribute = {
19
19
  ...default_collection_attribute_writable,
20
20
  name: "extends"
21
21
  };
@@ -78,6 +78,21 @@ export const clusters_attribute = {
78
78
  backpointer: owner_attribute
79
79
  };
80
80
 
81
+ export const address_attribute = {
82
+ ...string_attribute_writable,
83
+ name: "address"
84
+ };
85
+
86
+ export const cidr_address_attribute = {
87
+ ...string_attribute_writable,
88
+ name: "cidrAddress"
89
+ };
90
+
91
+ export const cidr_addresses_attribute = {
92
+ ...string_collection_attribute_writable,
93
+ name: "cidrAddresses"
94
+ };
95
+
81
96
  export const subnets_attribute = {
82
97
  ...default_collection_attribute_writable,
83
98
  name: "subnets",
@@ -140,15 +155,13 @@ export const networkAttributes = {
140
155
  multicastDNS: { ...boolean_attribute_writable, name: "multicastDNS" }
141
156
  };
142
157
 
158
+
143
159
  export const networkAddressAttributes = {
144
160
  hostName: hostname_attribute,
145
- cidrAddresses: {
146
- ...string_collection_attribute_writable,
147
- name: "cidrAddresses"
148
- },
149
- cidrAddress: { ...string_attribute_writable, name: "cidrAddress" },
161
+ cidrAddresses: cidr_addresses_attribute,
162
+ cidrAddress: cidr_address_attribute,
150
163
  addresses: { ...string_collection_attribute_writable, name: "addresses" },
151
- address: { ...string_attribute_writable, name: "address" }
164
+ address: address_attribute
152
165
  };
153
166
 
154
167
  export const endpointAttributes = {
@@ -162,4 +175,3 @@ export const endpointAttributes = {
162
175
  tls: { ...boolean_attribute_false, name: "tls" },
163
176
  address: { ...string_attribute, name: "address" }
164
177
  };
165
-
@@ -9,7 +9,7 @@ import { familyIP, formatCIDR, decodeIP, addressType } from "ip-utilties";
9
9
  import { Subnet } from "./subnet.mjs";
10
10
  import { Owner, addType } from "pmcf";
11
11
  import { NetworkInterface } from "./network-interfaces/network-interface.mjs";
12
- import { family_attribute, subnet_attribute } from "./common-attributes.mjs";
12
+ import { family_attribute, subnet_attribute, address_attribute, cidr_address_attribute } from "./common-attributes.mjs";
13
13
  /**
14
14
  *
15
15
  */
@@ -18,9 +18,9 @@ export class NetworkAddress {
18
18
  static priority = 1;
19
19
  static key = "address";
20
20
  static attributes = {
21
- address: { ...string_attribute, name: "address" },
21
+ address: address_attribute,
22
22
  type: type_attribute,
23
- cidrAddress: { ...string_attribute, name: "cidrAddress" },
23
+ cidrAddress: cidr_address_attribute,
24
24
  networkInterface: {
25
25
  ...default_attribute,
26
26
  name: "networkInterface",
@@ -1,62 +0,0 @@
1
- import {
2
- default_attribute_writable,
3
- string_collection_attribute_writable,
4
- string_attribute_writable,
5
- integer_attribute_writable,
6
- hostname_attribute as hostname_attribute_base,
7
- boolean_attribute_writable
8
- } from "pacc";
9
-
10
- export const networkAddressType = "network|host|network_interface";
11
-
12
- export const networks_attribute = {
13
- ...default_attribute_writable,
14
- name: "networks",
15
- type: "network",
16
- collection: true
17
- };
18
-
19
- export const psk_attribute = { ...string_attribute_writable, name: "psk" };
20
- export const ssid_attribute = { ...string_attribute_writable, name: "ssid" };
21
- export const hostname_attribute = {
22
- ...hostname_attribute_base,
23
- name: "hostName",
24
- writable: true
25
- };
26
-
27
- export const networkAttributes = {
28
- scope: {
29
- ...string_attribute_writable,
30
- name: "scope",
31
- values: ["global", "site", "link", "host"]
32
- // default: "global"
33
- },
34
- class: {
35
- ...string_attribute_writable,
36
- name: "class",
37
- values: ["10GBASE-T", "1000BASE-T", "100BASE-T", "10BASE-T"]
38
- },
39
- kind: {
40
- ...string_attribute_writable,
41
- name: "kind",
42
- values: ["loopback", "ethernet", "wlan", "wireguard", "fiber", "dsl"]
43
- },
44
- ssid: ssid_attribute,
45
- psk: psk_attribute,
46
- secretName: { ...string_attribute_writable, name: "secretName" },
47
- metric: { ...integer_attribute_writable, name: "metric" /*default: 1004*/ },
48
- mtu: { ...integer_attribute_writable, name: "mtu", default: 1500 },
49
- gateway: { ...default_attribute_writable, name: "gateway", type: "host" },
50
- multicastDNS: { ...boolean_attribute_writable, name: "multicastDNS" }
51
- };
52
-
53
- export const networkAddressAttributes = {
54
- hostName: hostname_attribute,
55
- cidrAddresses: {
56
- ...string_collection_attribute_writable,
57
- name: "cidrAddresses"
58
- },
59
- cidrAddress: { ...string_attribute_writable, name: "cidrAddress" },
60
- addresses: { ...string_collection_attribute_writable, name: "addresses" },
61
- address: { ...string_attribute_writable, name: "address" }
62
- };