pmcf 3.5.1 → 3.6.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.
Files changed (33) hide show
  1. package/package.json +2 -2
  2. package/src/base.mjs +11 -7
  3. package/src/network-interfaces/loopback.mjs +3 -0
  4. package/src/network-interfaces/network-interface.mjs +1 -1
  5. package/src/network-support.mjs +6 -9
  6. package/src/service.mjs +5 -4
  7. package/types/base.d.mts +3 -29
  8. package/types/cluster.d.mts +4 -56
  9. package/types/extra-source-service.d.mts +6 -45
  10. package/types/host.d.mts +3 -29
  11. package/types/location.d.mts +5 -57
  12. package/types/network-interfaces/ethernet.d.mts +14 -92
  13. package/types/network-interfaces/loopback.d.mts +16 -92
  14. package/types/network-interfaces/network-interface.d.mts +14 -92
  15. package/types/network-interfaces/tun.d.mts +14 -92
  16. package/types/network-interfaces/wireguard.d.mts +14 -92
  17. package/types/network-interfaces/wlan.d.mts +21 -138
  18. package/types/network-support.d.mts +6 -18
  19. package/types/network.d.mts +6 -45
  20. package/types/owner.d.mts +2 -28
  21. package/types/root.d.mts +4 -56
  22. package/types/service.d.mts +13 -91
  23. package/types/services/bind.d.mts +12 -90
  24. package/types/services/chrony.d.mts +13 -91
  25. package/types/services/influxdb.d.mts +13 -91
  26. package/types/services/kea.d.mts +13 -91
  27. package/types/services/mosquitto.d.mts +13 -91
  28. package/types/services/openldap.d.mts +13 -91
  29. package/types/services/systemd-journal-remote.d.mts +12 -90
  30. package/types/services/systemd-journal-upload.d.mts +12 -90
  31. package/types/services/systemd-journal.d.mts +12 -90
  32. package/types/services/systemd-resolved.d.mts +12 -90
  33. package/types/services/systemd-timesyncd.d.mts +12 -90
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmcf",
3
- "version": "3.5.1",
3
+ "version": "3.6.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -52,7 +52,7 @@
52
52
  "dependencies": {
53
53
  "ip-utilties": "^1.4.7",
54
54
  "npm-pkgbuild": "^18.2.16",
55
- "pacc": "^4.5.1",
55
+ "pacc": "^4.5.3",
56
56
  "package-directory": "^8.1.0"
57
57
  },
58
58
  "devDependencies": {
package/src/base.mjs CHANGED
@@ -4,10 +4,10 @@ import {
4
4
  getAttribute,
5
5
  name_attribute,
6
6
  string_attribute,
7
- string_collection_attribute,
8
- number_attribute,
7
+ string_collection_attribute_writable,
8
+ number_attribute_writable,
9
9
  description_attribute,
10
- boolean_attribute_writable_false
10
+ boolean_attribute_writable
11
11
  } from "pacc";
12
12
  import { addType, primitives, typeFactory } from "./types.mjs";
13
13
  import { asArray } from "./utils.mjs";
@@ -23,11 +23,11 @@ const BaseTypeDefinition = {
23
23
  writable: true
24
24
  },
25
25
  description: { ...description_attribute, writable: true },
26
- priority: { ...number_attribute, writable: true },
26
+ priority: number_attribute_writable,
27
27
  directory: { ...string_attribute, writable: false },
28
28
  packaging: { ...string_attribute, writable: true },
29
- disabled: boolean_attribute_writable_false,
30
- tags: { ...string_collection_attribute, writable: true }
29
+ disabled: boolean_attribute_writable,
30
+ tags: string_collection_attribute_writable
31
31
  }
32
32
  };
33
33
 
@@ -98,6 +98,10 @@ export class Base {
98
98
 
99
99
  read(data, type) {
100
100
  const assign = (name, property, value) => {
101
+ if (value === undefined && property.default !== undefined) {
102
+ value = property.default;
103
+ }
104
+
101
105
  if (value !== undefined) {
102
106
  if (property.values) {
103
107
  if (property.values.indexOf(value) < 0) {
@@ -136,7 +140,7 @@ export class Base {
136
140
  break;
137
141
  }
138
142
  } else {
139
- this[name] = value ?? property.default;
143
+ this[name] = value;
140
144
  }
141
145
  }
142
146
  };
@@ -42,6 +42,7 @@ export class LoopbackNetworkInterface extends SkeletonNetworkInterface {
42
42
  return LoopbackNetworkInterfaceTypeDefinition.name;
43
43
  }
44
44
 
45
+ set scope(v) {}
45
46
  get scope() {
46
47
  return "host";
47
48
  }
@@ -62,6 +63,8 @@ export class LoopbackNetworkInterface extends SkeletonNetworkInterface {
62
63
  return _localAddresses;
63
64
  }
64
65
 
66
+ set mtu(v) {}
67
+
65
68
  get mtu()
66
69
  {
67
70
  return 16436;
@@ -165,7 +165,7 @@ export class NetworkInterface extends SkeletonNetworkInterface {
165
165
  }
166
166
 
167
167
  get mtu() {
168
- return this.extendedProperty("_mtu") ?? networkProperties.mtu.default;
168
+ return this.extendedProperty("_mtu"); // ?? networkProperties.mtu.default;
169
169
  }
170
170
 
171
171
  set class(value) {
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  string_collection_attribute,
3
3
  string_attribute,
4
- number_attribute,
4
+ number_attribute_writable,
5
5
  hostname_attribute,
6
- boolean_attribute
6
+ boolean_attribute_writable
7
7
  } from "pacc";
8
8
 
9
9
  export const networkProperties = {
@@ -11,7 +11,7 @@ export const networkProperties = {
11
11
  ...string_attribute,
12
12
  writable: true,
13
13
  values: ["global", "site", "link", "host"],
14
- default: "global"
14
+ // default: "global"
15
15
  },
16
16
  class: {
17
17
  ...string_attribute,
@@ -25,13 +25,10 @@ export const networkProperties = {
25
25
  },
26
26
  ssid: { ...string_attribute, writable: true },
27
27
  psk: { ...string_attribute, writable: true },
28
- metric: { ...number_attribute, writable: true, default: 1004 },
29
- mtu: { ...number_attribute, writable: true, default: 1500 },
28
+ metric: { ...number_attribute_writable, /*default: 1004*/ },
29
+ mtu: { ...number_attribute_writable, default: 1500 },
30
30
  gateway: { type: "host", collection: false, writable: true },
31
- multicastDNS: {
32
- ...boolean_attribute,
33
- writable: true
34
- }
31
+ multicastDNS: boolean_attribute_writable,
35
32
  };
36
33
 
37
34
  export const networkAddressProperties = {
package/src/service.mjs CHANGED
@@ -1,7 +1,8 @@
1
1
  import {
2
2
  string_attribute,
3
3
  string_collection_attribute,
4
- number_attribute,
4
+ string_collection_attribute_writable,
5
+ number_attribute_writable,
5
6
  boolean_attribute_false
6
7
  } from "pacc";
7
8
  import {
@@ -25,7 +26,7 @@ import {
25
26
  } from "./dns-utils.mjs";
26
27
 
27
28
  export const endpointProperties = {
28
- port: { ...number_attribute, writable: true },
29
+ port: { ...number_attribute_writable },
29
30
  protocol: {
30
31
  ...string_attribute,
31
32
  writable: true,
@@ -65,8 +66,8 @@ export const ServiceTypeDefinition = {
65
66
  ...networkAddressProperties,
66
67
  ...endpointProperties,
67
68
  alias: { ...string_attribute, writable: true },
68
- weight: { ...number_attribute, writable: true, default: 1 },
69
- systemd: { ...string_collection_attribute, writable: true }
69
+ weight: { ...number_attribute_writable /*default: 1*/ },
70
+ systemd: string_collection_attribute_writable
70
71
  }
71
72
  };
72
73
 
package/types/base.d.mts CHANGED
@@ -42,20 +42,7 @@ export class Base {
42
42
  get?: Function;
43
43
  env?: string[] | string;
44
44
  };
45
- priority: {
46
- writable: boolean;
47
- type: string;
48
- isKey: boolean;
49
- mandatory: boolean;
50
- collection: boolean;
51
- private?: boolean;
52
- depends?: string;
53
- description?: string;
54
- default?: any;
55
- set?: Function;
56
- get?: Function;
57
- env?: string[] | string;
58
- };
45
+ priority: import("pacc").AttributeDefinition;
59
46
  directory: {
60
47
  writable: boolean;
61
48
  type: string;
@@ -85,20 +72,7 @@ export class Base {
85
72
  env?: string[] | string;
86
73
  };
87
74
  disabled: import("pacc").AttributeDefinition;
88
- tags: {
89
- writable: boolean;
90
- collection: boolean;
91
- type: string;
92
- isKey: boolean;
93
- mandatory: boolean;
94
- private: boolean;
95
- depends: string;
96
- description: string;
97
- default: any;
98
- set: Function;
99
- get: Function;
100
- env: string[] | string;
101
- };
75
+ tags: import("pacc").AttributeDefinition;
102
76
  };
103
77
  };
104
78
  static get typeFileName(): string;
@@ -156,7 +130,7 @@ export class Base {
156
130
  set packaging(value: Set<any>);
157
131
  get packaging(): Set<any>;
158
132
  get derivedPackaging(): any;
159
- get outputs(): Set<typeof import("npm-pkgbuild").ARCH | typeof import("npm-pkgbuild").DOCKER>;
133
+ get outputs(): Set<typeof import("npm-pkgbuild").OCI | typeof import("npm-pkgbuild").DOCKER>;
160
134
  preparePackages(stagingDir: any): AsyncGenerator<never, void, unknown>;
161
135
  set tags(value: Set<any>);
162
136
  get tags(): Set<any>;
@@ -43,20 +43,7 @@ export class Cluster extends Host {
43
43
  get?: Function;
44
44
  env?: string[] | string;
45
45
  };
46
- priority: {
47
- writable: boolean;
48
- type: string;
49
- isKey: boolean;
50
- mandatory: boolean;
51
- collection: boolean;
52
- private?: boolean;
53
- depends?: string;
54
- description?: string;
55
- default?: any;
56
- set?: Function;
57
- get?: Function;
58
- env?: string[] | string;
59
- };
46
+ priority: import("pacc").AttributeDefinition;
60
47
  directory: {
61
48
  writable: boolean;
62
49
  type: string;
@@ -86,20 +73,7 @@ export class Cluster extends Host {
86
73
  env?: string[] | string;
87
74
  };
88
75
  disabled: import("pacc").AttributeDefinition;
89
- tags: {
90
- writable: boolean;
91
- collection: boolean;
92
- type: string;
93
- isKey: boolean;
94
- mandatory: boolean;
95
- private: boolean;
96
- depends: string;
97
- description: string;
98
- default: any;
99
- set: Function;
100
- get: Function;
101
- env: string[] | string;
102
- };
76
+ tags: import("pacc").AttributeDefinition;
103
77
  };
104
78
  };
105
79
  properties: {
@@ -306,20 +280,7 @@ export class Cluster extends Host {
306
280
  get?: Function;
307
281
  env?: string[] | string;
308
282
  };
309
- priority: {
310
- writable: boolean;
311
- type: string;
312
- isKey: boolean;
313
- mandatory: boolean;
314
- collection: boolean;
315
- private?: boolean;
316
- depends?: string;
317
- description?: string;
318
- default?: any;
319
- set?: Function;
320
- get?: Function;
321
- env?: string[] | string;
322
- };
283
+ priority: import("pacc").AttributeDefinition;
323
284
  directory: {
324
285
  writable: boolean;
325
286
  type: string;
@@ -349,20 +310,7 @@ export class Cluster extends Host {
349
310
  env?: string[] | string;
350
311
  };
351
312
  disabled: import("pacc").AttributeDefinition;
352
- tags: {
353
- writable: boolean;
354
- collection: boolean;
355
- type: string;
356
- isKey: boolean;
357
- mandatory: boolean;
358
- private: boolean;
359
- depends: string;
360
- description: string;
361
- default: any;
362
- set: Function;
363
- get: Function;
364
- env: string[] | string;
365
- };
313
+ tags: import("pacc").AttributeDefinition;
366
314
  };
367
315
  };
368
316
  properties: {
@@ -57,20 +57,7 @@ export class ExtraSourceService extends Service {
57
57
  get?: Function;
58
58
  env?: string[] | string;
59
59
  };
60
- priority: {
61
- writable: boolean;
62
- type: string;
63
- isKey: boolean;
64
- mandatory: boolean;
65
- collection: boolean;
66
- private?: boolean;
67
- depends?: string;
68
- description?: string;
69
- default?: any;
70
- set?: Function;
71
- get?: Function;
72
- env?: string[] | string;
73
- };
60
+ priority: import("pacc").AttributeDefinition;
74
61
  directory: {
75
62
  writable: boolean;
76
63
  type: string;
@@ -100,20 +87,7 @@ export class ExtraSourceService extends Service {
100
87
  env?: string[] | string;
101
88
  };
102
89
  disabled: import("pacc").AttributeDefinition;
103
- tags: {
104
- writable: boolean;
105
- collection: boolean;
106
- type: string;
107
- isKey: boolean;
108
- mandatory: boolean;
109
- private: boolean;
110
- depends: string;
111
- description: string;
112
- default: any;
113
- set: Function;
114
- get: Function;
115
- env: string[] | string;
116
- };
90
+ tags: import("pacc").AttributeDefinition;
117
91
  };
118
92
  };
119
93
  specializations: {};
@@ -134,37 +108,24 @@ export class ExtraSourceService extends Service {
134
108
  env?: string[] | string;
135
109
  };
136
110
  weight: {
137
- writable: boolean;
138
- default: number;
139
111
  type: string;
140
112
  isKey: boolean;
113
+ writable: boolean;
141
114
  mandatory: boolean;
142
115
  collection: boolean;
143
116
  private?: boolean;
144
117
  depends?: string;
145
118
  description?: string;
119
+ default?: any;
146
120
  set?: Function;
147
121
  get?: Function;
148
122
  env?: string[] | string;
149
123
  };
150
- systemd: {
151
- writable: boolean;
152
- collection: boolean;
153
- type: string;
154
- isKey: boolean;
155
- mandatory: boolean;
156
- private: boolean;
157
- depends: string;
158
- description: string;
159
- default: any;
160
- set: Function;
161
- get: Function;
162
- env: string[] | string;
163
- };
124
+ systemd: import("pacc").AttributeDefinition;
164
125
  port: {
165
- writable: boolean;
166
126
  type: string;
167
127
  isKey: boolean;
128
+ writable: boolean;
168
129
  mandatory: boolean;
169
130
  collection: boolean;
170
131
  private?: boolean;
package/types/host.d.mts CHANGED
@@ -41,20 +41,7 @@ export class Host extends ServiceOwner {
41
41
  get?: Function;
42
42
  env?: string[] | string;
43
43
  };
44
- priority: {
45
- writable: boolean;
46
- type: string;
47
- isKey: boolean;
48
- mandatory: boolean;
49
- collection: boolean;
50
- private?: boolean;
51
- depends?: string;
52
- description?: string;
53
- default?: any;
54
- set?: Function;
55
- get?: Function;
56
- env?: string[] | string;
57
- };
44
+ priority: import("pacc").AttributeDefinition;
58
45
  directory: {
59
46
  writable: boolean;
60
47
  type: string;
@@ -84,20 +71,7 @@ export class Host extends ServiceOwner {
84
71
  env?: string[] | string;
85
72
  };
86
73
  disabled: import("pacc").AttributeDefinition;
87
- tags: {
88
- writable: boolean;
89
- collection: boolean;
90
- type: string;
91
- isKey: boolean;
92
- mandatory: boolean;
93
- private: boolean;
94
- depends: string;
95
- description: string;
96
- default: any;
97
- set: Function;
98
- get: Function;
99
- env: string[] | string;
100
- };
74
+ tags: import("pacc").AttributeDefinition;
101
75
  };
102
76
  };
103
77
  properties: {
@@ -460,7 +434,7 @@ export class Host extends ServiceOwner {
460
434
  preparePackages(dir: any): AsyncGenerator<{
461
435
  dir: any;
462
436
  sources: FileContentProvider[];
463
- outputs: Set<typeof import("npm-pkgbuild").ARCH | typeof import("npm-pkgbuild").DOCKER>;
437
+ outputs: Set<typeof import("npm-pkgbuild").OCI | typeof import("npm-pkgbuild").DOCKER>;
464
438
  properties: {
465
439
  name: string;
466
440
  description: string;
@@ -43,20 +43,7 @@ export class Location extends Owner {
43
43
  get?: Function;
44
44
  env?: string[] | string;
45
45
  };
46
- priority: {
47
- writable: boolean;
48
- type: string;
49
- isKey: boolean;
50
- mandatory: boolean;
51
- collection: boolean;
52
- private?: boolean;
53
- depends?: string;
54
- description?: string;
55
- default?: any;
56
- set?: Function;
57
- get?: Function;
58
- env?: string[] | string;
59
- };
46
+ priority: import("pacc").AttributeDefinition;
60
47
  directory: {
61
48
  writable: boolean;
62
49
  type: string;
@@ -86,20 +73,7 @@ export class Location extends Owner {
86
73
  env?: string[] | string;
87
74
  };
88
75
  disabled: import("pacc").AttributeDefinition;
89
- tags: {
90
- writable: boolean;
91
- collection: boolean;
92
- type: string;
93
- isKey: boolean;
94
- mandatory: boolean;
95
- private: boolean;
96
- depends: string;
97
- description: string;
98
- default: any;
99
- set: Function;
100
- get: Function;
101
- env: string[] | string;
102
- };
76
+ tags: import("pacc").AttributeDefinition;
103
77
  };
104
78
  };
105
79
  properties: {
@@ -306,20 +280,7 @@ export class Location extends Owner {
306
280
  get?: Function;
307
281
  env?: string[] | string;
308
282
  };
309
- priority: {
310
- writable: boolean;
311
- type: string;
312
- isKey: boolean;
313
- mandatory: boolean;
314
- collection: boolean;
315
- private?: boolean;
316
- depends?: string;
317
- description?: string;
318
- default?: any;
319
- set?: Function;
320
- get?: Function;
321
- env?: string[] | string;
322
- };
283
+ priority: import("pacc").AttributeDefinition;
323
284
  directory: {
324
285
  writable: boolean;
325
286
  type: string;
@@ -349,20 +310,7 @@ export class Location extends Owner {
349
310
  env?: string[] | string;
350
311
  };
351
312
  disabled: import("pacc").AttributeDefinition;
352
- tags: {
353
- writable: boolean;
354
- collection: boolean;
355
- type: string;
356
- isKey: boolean;
357
- mandatory: boolean;
358
- private: boolean;
359
- depends: string;
360
- description: string;
361
- default: any;
362
- set: Function;
363
- get: Function;
364
- env: string[] | string;
365
- };
313
+ tags: import("pacc").AttributeDefinition;
366
314
  };
367
315
  };
368
316
  properties: {
@@ -547,7 +495,7 @@ export class Location extends Owner {
547
495
  preparePackages(dir: any): AsyncGenerator<{
548
496
  dir: any;
549
497
  sources: FileContentProvider[];
550
- outputs: Set<typeof import("npm-pkgbuild").ARCH | typeof import("npm-pkgbuild").DOCKER>;
498
+ outputs: Set<typeof import("npm-pkgbuild").OCI | typeof import("npm-pkgbuild").DOCKER>;
551
499
  properties: {
552
500
  name: string;
553
501
  description: string;