pmcf 6.22.0 → 6.22.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 CHANGED
@@ -327,7 +327,7 @@ Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G
327
327
  * `empty` **([boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean) | [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String))** (optional, default `false`)
328
328
  * `indent` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** (optional, default `""`)
329
329
 
330
- 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;
330
+ 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) | [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;
331
331
 
332
332
  ## SystemdJournalRemoteService
333
333
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmcf",
3
- "version": "6.22.0",
3
+ "version": "6.22.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -54,7 +54,7 @@
54
54
  "content-entry-transform": "^1.7.0",
55
55
  "ip-utilties": "^3.10.1",
56
56
  "npm-pkgbuild": "^20.8.13",
57
- "pacc": "^11.1.0",
57
+ "pacc": "^11.1.2",
58
58
  "package-directory": "^8.2.0",
59
59
  "yaml": "^2.9.0"
60
60
  },
@@ -12,7 +12,15 @@ import {
12
12
 
13
13
  export const networkAddressType = "network|host|network_interface";
14
14
 
15
- export const aliases_attribute = { ...string_set_attribute_writable, name: "aliases" };
15
+ export const extends_attribute = {
16
+ ...default_collection_attribute_writable,
17
+ name: "extends"
18
+ };
19
+
20
+ export const aliases_attribute = {
21
+ ...string_set_attribute_writable,
22
+ name: "aliases"
23
+ };
16
24
 
17
25
  export const owner_attribute = {
18
26
  ...default_attribute,
@@ -103,7 +111,14 @@ export const networkAttributes = {
103
111
  kind: {
104
112
  ...string_attribute_writable,
105
113
  name: "kind",
106
- values: new Set(["loopback", "ethernet", "wlan", "wireguard", "fiber", "dsl"])
114
+ values: new Set([
115
+ "loopback",
116
+ "ethernet",
117
+ "wlan",
118
+ "wireguard",
119
+ "fiber",
120
+ "dsl"
121
+ ])
107
122
  },
108
123
  ssid: ssid_attribute,
109
124
  psk: psk_attribute,
@@ -21,7 +21,10 @@ import {
21
21
  FAMILY_DNS
22
22
  } from "pmcf";
23
23
  import { asArray } from "./utils.mjs";
24
- import { networkAddressAttributes } from "./common-attributes.mjs";
24
+ import {
25
+ networkAddressAttributes,
26
+ extends_attribute
27
+ } from "./common-attributes.mjs";
25
28
  import {
26
29
  serviceTypeEndpoints,
27
30
  serviceTypes,
@@ -68,8 +71,7 @@ export class CoreService extends Base {
68
71
  ...networkAddressAttributes,
69
72
  ...endpointAttributes,
70
73
  extends: {
71
- ...default_collection_attribute_writable,
72
- name: "extends",
74
+ ...extends_attribute,
73
75
  type: CoreService
74
76
  },
75
77
  priority: priority_attribute,
package/src/host.mjs CHANGED
@@ -14,7 +14,8 @@ import { addresses, addType, assign } from "pmcf";
14
14
  import {
15
15
  networkAddressAttributes,
16
16
  networkInterfaces_attribute,
17
- hosts_attribute
17
+ hosts_attribute,
18
+ extends_attribute
18
19
  } from "./common-attributes.mjs";
19
20
  import { ServiceOwner } from "./service-owner.mjs";
20
21
  import { addHook } from "./hooks.mjs";
@@ -79,8 +80,7 @@ export class Host extends ServiceOwner {
79
80
  depends: { ...string_set_attribute_writable, name: "depends" },
80
81
  provides: { ...string_set_attribute_writable, name: "provides" },
81
82
  extends: {
82
- ...default_collection_attribute_writable,
83
- name: "extends",
83
+ ...extends_attribute,
84
84
  type: Host
85
85
  },
86
86
  model: { ...string_attribute, name: "model" }
package/src/service.mjs CHANGED
@@ -1,11 +1,7 @@
1
- import { string_attribute_writable } from "pacc";
2
1
  import { setBaseService, CoreService, addType } from "pmcf";
3
2
 
4
3
  export class Service extends CoreService {
5
4
  static name = "service";
6
- static attributes = {
7
- type: { ...string_attribute_writable, name: "type" }
8
- };
9
5
  static {
10
6
  addType(this);
11
7
  setBaseService(this);
@@ -17,10 +13,6 @@ export class Service extends CoreService {
17
13
  this._type = value;
18
14
  }
19
15
 
20
- set type(value) {
21
- this._type = value;
22
- }
23
-
24
16
  get type() {
25
17
  return this.attribute("_type") ?? this.name;
26
18
  }