pmcf 4.16.14 → 4.17.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/README.md CHANGED
@@ -42,65 +42,69 @@ generates config packages for:
42
42
 
43
43
  * [Base](#base)
44
44
  * [Parameters](#parameters)
45
- * [extendedAttribute](#extendedattribute)
45
+ * [walkDirections](#walkdirections)
46
46
  * [Parameters](#parameters-1)
47
- * [propertyIterator](#propertyiterator)
47
+ * [extendedAttribute](#extendedattribute)
48
48
  * [Parameters](#parameters-2)
49
- * [getProperties](#getproperties)
49
+ * [propertyIterator](#propertyiterator)
50
50
  * [Parameters](#parameters-3)
51
+ * [getProperties](#getproperties)
52
+ * [Parameters](#parameters-4)
51
53
  * [priority](#priority)
52
54
  * [expression](#expression)
53
- * [Parameters](#parameters-4)
54
- * [findService](#findservice)
55
55
  * [Parameters](#parameters-5)
56
- * [property](#property)
56
+ * [findService](#findservice)
57
57
  * [Parameters](#parameters-6)
58
- * [expand](#expand)
58
+ * [templateContent](#templatecontent)
59
59
  * [Parameters](#parameters-7)
60
+ * [property](#property)
61
+ * [Parameters](#parameters-8)
62
+ * [expand](#expand)
63
+ * [Parameters](#parameters-9)
60
64
  * [PortEndpoint](#portendpoint)
61
- * [Parameters](#parameters-8)
65
+ * [Parameters](#parameters-10)
62
66
  * [port](#port)
63
67
  * [socketAddress](#socketaddress)
64
68
  * [HTTPEndpoint](#httpendpoint)
65
- * [Parameters](#parameters-9)
69
+ * [Parameters](#parameters-11)
66
70
  * [port](#port-1)
67
71
  * [SkeletonNetworkInterface](#skeletonnetworkinterface)
68
72
  * [networkAddresses](#networkaddresses)
69
- * [Parameters](#parameters-10)
73
+ * [Parameters](#parameters-12)
70
74
  * [SystemdJournalRemoteService](#systemdjournalremoteservice)
71
75
  * [Properties](#properties)
72
76
  * [systemdConfigs](#systemdconfigs)
73
- * [Parameters](#parameters-11)
77
+ * [Parameters](#parameters-13)
74
78
  * [SystemdJournalUploadService](#systemdjournaluploadservice)
75
79
  * [Properties](#properties-1)
76
80
  * [systemdConfigs](#systemdconfigs-1)
77
- * [Parameters](#parameters-12)
81
+ * [Parameters](#parameters-14)
78
82
  * [NetworkAddress](#networkaddress)
79
- * [Parameters](#parameters-13)
83
+ * [Parameters](#parameters-15)
80
84
  * [subnet](#subnet)
81
85
  * [networkInterface](#networkinterface)
82
86
  * [address](#address)
83
87
  * [addresses](#addresses)
84
- * [Parameters](#parameters-14)
88
+ * [Parameters](#parameters-16)
85
89
  * [cidrAddresses](#cidraddresses)
86
- * [Parameters](#parameters-15)
90
+ * [Parameters](#parameters-17)
87
91
  * [isTemplate](#istemplate)
88
92
  * [services](#services)
89
- * [Parameters](#parameters-16)
93
+ * [Parameters](#parameters-18)
90
94
  * [named](#named)
91
- * [Parameters](#parameters-17)
95
+ * [Parameters](#parameters-19)
92
96
  * [serviceEndpoints](#serviceendpoints)
93
- * [Parameters](#parameters-18)
97
+ * [Parameters](#parameters-20)
94
98
  * [domainName](#domainname)
95
- * [Parameters](#parameters-19)
99
+ * [Parameters](#parameters-21)
96
100
  * [domainFromDominName](#domainfromdominname)
97
- * [Parameters](#parameters-20)
101
+ * [Parameters](#parameters-22)
98
102
  * [sectionLines](#sectionlines)
99
- * [Parameters](#parameters-21)
103
+ * [Parameters](#parameters-23)
100
104
  * [asArray](#asarray)
101
- * [Parameters](#parameters-22)
105
+ * [Parameters](#parameters-24)
102
106
  * [asIterator](#asiterator)
103
- * [Parameters](#parameters-23)
107
+ * [Parameters](#parameters-25)
104
108
 
105
109
  ## Base
106
110
 
@@ -112,6 +116,16 @@ properties: use defined values to support attribute value definitions
112
116
  * `owner` **[Base](#base)** 
113
117
  * `data` **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** 
114
118
 
119
+ ### walkDirections
120
+
121
+ Walk the object graph in some directions and deliver seen nodes.
122
+
123
+ #### Parameters
124
+
125
+ * `directions` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>** (optional, default `["this","extends","owner"]`)
126
+
127
+ Returns **Iterable<[Base](#base)>**&#x20;
128
+
115
129
  ### extendedAttribute
116
130
 
117
131
  #### Parameters
@@ -161,6 +175,15 @@ Returns **any**&#x20;
161
175
 
162
176
  Returns **any** service with the highest priority
163
177
 
178
+ ### templateContent
179
+
180
+ #### Parameters
181
+
182
+ * `entryProperties` **any**&#x20;
183
+ * `directoryProperties` **any**&#x20;
184
+
185
+ Returns **AsyncIterable\<ContentProvider>**&#x20;
186
+
164
187
  ### property
165
188
 
166
189
  #### Parameters
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmcf",
3
- "version": "4.16.14",
3
+ "version": "4.17.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
package/src/module.mjs CHANGED
@@ -28,7 +28,7 @@ export * from "./services/influxdb.mjs";
28
28
  export * from "./services/mosquitto.mjs";
29
29
  export * from "./services/headscale.mjs";
30
30
  export * from "./services/tailscale.mjs";
31
- export * from "./services/alpm-repo.mjs";
31
+ export * from "./services/alpm.mjs";
32
32
  export * from "./services/systemd-journald.mjs";
33
33
  export * from "./services/systemd-journal-remote.mjs";
34
34
  export * from "./services/systemd-journal-upload.mjs";
@@ -0,0 +1,64 @@
1
+ import {
2
+ addType,
3
+ default_attribute_writable,
4
+ name_attribute_writable,
5
+ string_attribute_writable,
6
+ string_set_attribute_writable
7
+ } from "pacc";
8
+ import { addServiceType, Base } from "pmcf";
9
+ import { ServiceTypeDefinition, Service } from "../service.mjs";
10
+
11
+ const ALPMRepositoryTypeDefinition = {
12
+ name: "alpm_repository",
13
+ extends: Base.typeDefinition,
14
+ attributes: {
15
+ name: name_attribute_writable,
16
+ base: string_attribute_writable,
17
+ architectures: string_set_attribute_writable
18
+ }
19
+ };
20
+
21
+ class ALPMRepository extends Base {
22
+ static {
23
+ addType(this);
24
+ }
25
+
26
+ static get typeDefinition() {
27
+ return ALPMRepositoryTypeDefinition;
28
+ }
29
+ }
30
+
31
+ const ALPMServiceTypeDefinition = {
32
+ name: "alpm",
33
+ extends: ServiceTypeDefinition,
34
+ specializationOf: ServiceTypeDefinition,
35
+ owners: ServiceTypeDefinition.owners,
36
+ attributes: {
37
+ repositories: {
38
+ ...default_attribute_writable,
39
+ type: "alpm_repository",
40
+ collection: true
41
+ }
42
+ },
43
+
44
+ service: {
45
+ extends: ["https"]
46
+ }
47
+ };
48
+
49
+ export class ALPMService extends Service {
50
+ static {
51
+ addType(this);
52
+ addServiceType(this.typeDefinition.service, this.typeDefinition.name);
53
+ }
54
+
55
+ static get typeDefinition() {
56
+ return ALPMServiceTypeDefinition;
57
+ }
58
+
59
+ _repositories = new Map();
60
+
61
+ set repositories(repository) {
62
+ this._repositories.set(repository.name, repository);
63
+ }
64
+ }
@@ -28,7 +28,7 @@ export * from "./services/influxdb.mjs";
28
28
  export * from "./services/mosquitto.mjs";
29
29
  export * from "./services/headscale.mjs";
30
30
  export * from "./services/tailscale.mjs";
31
- export * from "./services/alpm-repo.mjs";
31
+ export * from "./services/alpm.mjs";
32
32
  export * from "./services/systemd-journald.mjs";
33
33
  export * from "./services/systemd-journal-remote.mjs";
34
34
  export * from "./services/systemd-journal-upload.mjs";
@@ -1,4 +1,4 @@
1
- export class ALPMRepositoryService extends Service {
1
+ export class ALPMService extends Service {
2
2
  static get typeDefinition(): {
3
3
  name: string;
4
4
  extends: {
@@ -6,7 +6,7 @@ export class ALPMRepositoryService extends Service {
6
6
  owners: (string | {
7
7
  name: string;
8
8
  owners: string[];
9
- extends: typeof import("pmcf").Base;
9
+ extends: typeof Base;
10
10
  key: string;
11
11
  attributes: {
12
12
  networkInterfaces: {
@@ -203,7 +203,7 @@ export class ALPMRepositoryService extends Service {
203
203
  address: import("pacc").AttributeDefinition;
204
204
  };
205
205
  })[];
206
- extends: typeof import("pmcf").Base;
206
+ extends: typeof Base;
207
207
  specializations: {};
208
208
  factoryFor(owner: any, value: any): any;
209
209
  key: string;
@@ -291,7 +291,7 @@ export class ALPMRepositoryService extends Service {
291
291
  owners: (string | {
292
292
  name: string;
293
293
  owners: string[];
294
- extends: typeof import("pmcf").Base;
294
+ extends: typeof Base;
295
295
  key: string;
296
296
  attributes: {
297
297
  networkInterfaces: {
@@ -488,7 +488,7 @@ export class ALPMRepositoryService extends Service {
488
488
  address: import("pacc").AttributeDefinition;
489
489
  };
490
490
  })[];
491
- extends: typeof import("pmcf").Base;
491
+ extends: typeof Base;
492
492
  specializations: {};
493
493
  factoryFor(owner: any, value: any): any;
494
494
  key: string;
@@ -574,7 +574,7 @@ export class ALPMRepositoryService extends Service {
574
574
  owners: (string | {
575
575
  name: string;
576
576
  owners: string[];
577
- extends: typeof import("pmcf").Base;
577
+ extends: typeof Base;
578
578
  key: string;
579
579
  attributes: {
580
580
  networkInterfaces: {
@@ -773,12 +773,8 @@ export class ALPMRepositoryService extends Service {
773
773
  })[];
774
774
  attributes: {
775
775
  repositories: {
776
+ type: string;
776
777
  collection: boolean;
777
- configurable: boolean;
778
- attributes: {
779
- name: import("pacc").AttributeDefinition;
780
- };
781
- type: object;
782
778
  isKey: boolean;
783
779
  writable: boolean;
784
780
  mandatory: boolean;
@@ -803,6 +799,8 @@ export class ALPMRepositoryService extends Service {
803
799
  extends: string[];
804
800
  };
805
801
  };
806
- repositories: {};
802
+ _repositories: Map<any, any>;
803
+ set repositories(repository: any);
807
804
  }
808
805
  import { Service } from "../service.mjs";
806
+ import { Base } from "pmcf";
@@ -1,38 +0,0 @@
1
- import { addType, object_attribute, string_attribute_writable } from "pacc";
2
- import { addServiceType } from "pmcf";
3
- import { ServiceTypeDefinition, Service } from "../service.mjs";
4
-
5
- const ALPMRepositoryServiceTypeDefinition = {
6
- name: "alpm-repo",
7
- extends: ServiceTypeDefinition,
8
- specializationOf: ServiceTypeDefinition,
9
- owners: ServiceTypeDefinition.owners,
10
- attributes: {
11
- repositories: {
12
- ...object_attribute,
13
- collection: true,
14
- configurable: true,
15
-
16
- attributes: {
17
- name: string_attribute_writable
18
- }
19
- }
20
- },
21
-
22
- service: {
23
- extends: ["https"]
24
- }
25
- };
26
-
27
- export class ALPMRepositoryService extends Service {
28
- static {
29
- addType(this);
30
- addServiceType(this.typeDefinition.service, this.typeDefinition.name);
31
- }
32
-
33
- static get typeDefinition() {
34
- return ALPMRepositoryServiceTypeDefinition;
35
- }
36
-
37
- repositories = {};
38
- }