pmcf 6.39.3 → 6.39.5

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
@@ -41,7 +41,7 @@ generates config packages for:
41
41
 
42
42
  ### Table of Contents
43
43
 
44
- * [Base](#base)
44
+ * [base](#base)
45
45
  * [enabled](#enabled)
46
46
  * [priority](#priority)
47
47
  * [templateContentAttributes](#templatecontentattributes)
@@ -50,72 +50,74 @@ generates config packages for:
50
50
  * [Parameters](#parameters-1)
51
51
  * [isTemplate](#istemplate)
52
52
  * [access](#access)
53
- * [serviceEndpoints](#serviceendpoints)
53
+ * [loadHooks](#loadhooks)
54
54
  * [Parameters](#parameters-2)
55
- * [attributeIterator](#attributeiterator)
55
+ * [serviceEndpoints](#serviceendpoints)
56
56
  * [Parameters](#parameters-3)
57
- * [getAttributes](#getattributes)
57
+ * [attributeIterator](#attributeiterator)
58
58
  * [Parameters](#parameters-4)
59
- * [property](#property)
59
+ * [getAttributes](#getattributes)
60
60
  * [Parameters](#parameters-5)
61
- * [attribute](#attribute)
61
+ * [property](#property)
62
62
  * [Parameters](#parameters-6)
63
- * [walkDirections](#walkdirections)
63
+ * [attribute](#attribute)
64
64
  * [Parameters](#parameters-7)
65
- * [mapFromDirections](#mapfromdirections)
65
+ * [walkDirections](#walkdirections)
66
66
  * [Parameters](#parameters-8)
67
- * [unionFromDirections](#unionfromdirections)
67
+ * [mapFromDirections](#mapfromdirections)
68
68
  * [Parameters](#parameters-9)
69
- * [expand](#expand)
69
+ * [unionFromDirections](#unionfromdirections)
70
70
  * [Parameters](#parameters-10)
71
- * [expression](#expression)
71
+ * [expand](#expand)
72
72
  * [Parameters](#parameters-11)
73
- * [PortEndpoint](#portendpoint)
73
+ * [expression](#expression)
74
74
  * [Parameters](#parameters-12)
75
+ * [PortEndpoint](#portendpoint)
76
+ * [Parameters](#parameters-13)
75
77
  * [port](#port)
76
78
  * [socketAddress](#socketaddress)
77
79
  * [HTTPEndpoint](#httpendpoint)
78
- * [Parameters](#parameters-13)
80
+ * [Parameters](#parameters-14)
79
81
  * [port](#port-1)
80
82
  * [domainNames](#domainnames)
81
83
  * [InitializationContext](#initializationcontext)
82
- * [Parameters](#parameters-14)
84
+ * [Parameters](#parameters-15)
83
85
  * [SkeletonNetworkInterface](#skeletonnetworkinterface)
84
86
  * [networkAddresses](#networkaddresses)
85
- * [Parameters](#parameters-15)
87
+ * [Parameters](#parameters-16)
86
88
  * [zones](#zones)
87
89
  * [addressesStatement](#addressesstatement)
88
- * [Parameters](#parameters-16)
90
+ * [Parameters](#parameters-17)
89
91
  * [SystemdJournalRemoteService](#systemdjournalremoteservice)
90
92
  * [Properties](#properties)
91
93
  * [systemdConfigs](#systemdconfigs)
92
- * [Parameters](#parameters-17)
94
+ * [Parameters](#parameters-18)
93
95
  * [SystemdJournalUploadService](#systemdjournaluploadservice)
94
96
  * [Properties](#properties-1)
95
97
  * [systemdConfigs](#systemdconfigs-1)
96
- * [Parameters](#parameters-18)
98
+ * [Parameters](#parameters-19)
97
99
  * [NetworkAddress](#networkaddress)
98
- * [Parameters](#parameters-19)
100
+ * [Parameters](#parameters-20)
99
101
  * [subnet](#subnet)
100
102
  * [networkInterface](#networkinterface)
101
103
  * [address](#address)
102
104
  * [addresses](#addresses)
103
- * [Parameters](#parameters-20)
104
- * [cidrAddresses](#cidraddresses)
105
105
  * [Parameters](#parameters-21)
106
+ * [cidrAddresses](#cidraddresses)
107
+ * [Parameters](#parameters-22)
106
108
  * [families](#families)
107
109
  * [secretName](#secretname)
108
110
  * [directHosts](#directhosts)
109
111
  * [subnetForAddress](#subnetforaddress)
110
- * [Parameters](#parameters-22)
111
- * [domainName](#domainname)
112
112
  * [Parameters](#parameters-23)
113
- * [domainFromDominName](#domainfromdominname)
113
+ * [domainName](#domainname)
114
114
  * [Parameters](#parameters-24)
115
- * [sectionLines](#sectionlines)
115
+ * [domainFromDominName](#domainfromdominname)
116
116
  * [Parameters](#parameters-25)
117
+ * [sectionLines](#sectionlines)
118
+ * [Parameters](#parameters-26)
117
119
 
118
- ## Base
120
+ ## base
119
121
 
120
122
  **Extends core**
121
123
 
@@ -155,6 +157,12 @@ Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/
155
157
 
156
158
  Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
157
159
 
160
+ ## loadHooks
161
+
162
+ ### Parameters
163
+
164
+ * `packageData` **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 
165
+
158
166
  ## serviceEndpoints
159
167
 
160
168
  ### Parameters
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmcf",
3
- "version": "6.39.3",
3
+ "version": "6.39.5",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -53,7 +53,7 @@
53
53
  "aggregated-map": "^1.0.10",
54
54
  "content-entry-transform": "^1.7.4",
55
55
  "ip-utilties": "^3.13.0",
56
- "npm-pkgbuild": "^21.0.2",
56
+ "npm-pkgbuild": "^22.0.1",
57
57
  "pacc": "^11.6.0",
58
58
  "package-directory": "^8.2.0",
59
59
  "yaml": "^2.9.0"
package/src/content.mjs CHANGED
@@ -1,10 +1,11 @@
1
- import { join } from "node:path";
1
+ import path, { join } from "node:path";
2
2
  import {
3
3
  name_attribute_writable,
4
4
  string_attribute_writable,
5
5
  string_set_attribute_writable,
6
6
  default_collection_attribute_writable,
7
- description_attribute_writable
7
+ description_attribute_writable,
8
+ extendingAttributeIterator
8
9
  } from "pacc";
9
10
  import { allOutputs } from "npm-pkgbuild";
10
11
  import { core, addType } from "pmcf";
@@ -31,8 +32,8 @@ export class permission extends core {
31
32
 
32
33
  export class content extends core {
33
34
  static attributes = {
34
- name: name_attribute_writable,
35
- description: description_attribute_writable,
35
+ name: { ...name_attribute_writable, packagingProperty: true },
36
+ description: { ...description_attribute_writable, packagingProperty: true },
36
37
  permissions: {
37
38
  ...default_collection_attribute_writable,
38
39
  type: permission,
@@ -43,13 +44,41 @@ export class content extends core {
43
44
  name: "access",
44
45
  default: "private"
45
46
  },
46
- depends: { ...string_set_attribute_writable, name: "depends" },
47
- provides: { ...string_set_attribute_writable, name: "provides" },
48
- replaces: { ...string_set_attribute_writable, name: "replaces" },
49
- optional: { ...string_set_attribute_writable, name: "optional" },
50
- groups: { ...string_set_attribute_writable, name: "groups" },
51
- backup: { ...string_set_attribute_writable, name: "backup" },
52
- hooks: { ...string_set_attribute_writable, name: "hooks" },
47
+ depends: {
48
+ ...string_set_attribute_writable,
49
+ name: "depends",
50
+ packagingProperty: true
51
+ },
52
+ provides: {
53
+ ...string_set_attribute_writable,
54
+ name: "provides",
55
+ packagingProperty: true
56
+ },
57
+ replaces: {
58
+ ...string_set_attribute_writable,
59
+ name: "replaces",
60
+ packagingProperty: true
61
+ },
62
+ optional: {
63
+ ...string_set_attribute_writable,
64
+ name: "optional",
65
+ packagingProperty: true
66
+ },
67
+ groups: {
68
+ ...string_set_attribute_writable,
69
+ name: "groups",
70
+ packagingProperty: true
71
+ },
72
+ backup: {
73
+ ...string_set_attribute_writable,
74
+ name: "backup",
75
+ packagingProperty: true
76
+ },
77
+ hooks: {
78
+ ...string_set_attribute_writable,
79
+ name: "hooks",
80
+ packagingProperty: true
81
+ },
53
82
  packaging: { ...string_set_attribute_writable, name: "packaging" }
54
83
  };
55
84
 
@@ -219,8 +248,8 @@ export class content extends core {
219
248
  }
220
249
 
221
250
  /**
222
- *
223
- * @param {object} packageData
251
+ *
252
+ * @param {object} packageData
224
253
  */
225
254
  async loadHooks(packageData) {
226
255
  for (const node of this.walkDirections(["this", "extends"])) {
@@ -234,17 +263,12 @@ export class content extends core {
234
263
  const packageData = {
235
264
  sources: [],
236
265
  outputs: this.outputs,
237
- properties: {
238
- name: this.name,
239
- description: this.description,
240
- access: this.access,
241
- groups: [...this.groups],
242
- depends: [...this.depends],
243
- provides: [...this.provides],
244
- replaces: [...this.replaces],
245
- optional: [...this.optional],
246
- backup: [...this.backup]
247
- }
266
+ properties: Object.fromEntries(
267
+ extendingAttributeIterator(
268
+ this.constructor,
269
+ attribute => attribute.packagingProperty
270
+ ).map(([path, attribute]) => [path[0], this[path[0]]])
271
+ )
248
272
  };
249
273
 
250
274
  await this.loadHooks(packageData);
package/src/core.mjs CHANGED
@@ -1,5 +1,4 @@
1
1
  import { AggregatedMap } from "aggregated-map";
2
-
3
2
  import {
4
3
  toExternal,
5
4
  filterPublic,