pmcf 4.25.20 → 4.25.21
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 +0 -15
- package/package.json +1 -1
- package/src/base.mjs +2 -7
- package/src/initialization-context.mjs +5 -5
package/README.md
CHANGED
|
@@ -75,9 +75,6 @@ generates config packages for:
|
|
|
75
75
|
* [id](#id)
|
|
76
76
|
* [InitializationContext](#initializationcontext)
|
|
77
77
|
* [Parameters](#parameters-13)
|
|
78
|
-
* [SkeletonNetworkInterface](#skeletonnetworkinterface)
|
|
79
|
-
* [networkAddresses](#networkaddresses)
|
|
80
|
-
* [Parameters](#parameters-14)
|
|
81
78
|
* [SystemdJournalRemoteService](#systemdjournalremoteservice)
|
|
82
79
|
* [Properties](#properties)
|
|
83
80
|
* [systemdConfigs](#systemdconfigs)
|
|
@@ -274,18 +271,6 @@ Keeps track of all in flight object creations and loose ends during config initi
|
|
|
274
271
|
|
|
275
272
|
* `directory` (optional, default `"/"`)
|
|
276
273
|
|
|
277
|
-
## SkeletonNetworkInterface
|
|
278
|
-
|
|
279
|
-
**Extends ServiceOwner**
|
|
280
|
-
|
|
281
|
-
### networkAddresses
|
|
282
|
-
|
|
283
|
-
#### Parameters
|
|
284
|
-
|
|
285
|
-
* `filter` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** (optional, default `n=>true`)
|
|
286
|
-
|
|
287
|
-
Returns **Iterable<[NetworkAddress](#networkaddress)>** 
|
|
288
|
-
|
|
289
274
|
## SystemdJournalRemoteService
|
|
290
275
|
|
|
291
276
|
**Extends Service**
|
package/package.json
CHANGED
package/src/base.mjs
CHANGED
|
@@ -52,12 +52,8 @@ export class Base {
|
|
|
52
52
|
addType(this);
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
static get
|
|
56
|
-
return this.name;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
static get typeFileName() {
|
|
60
|
-
return this.typeName + ".json";
|
|
55
|
+
static get fileName() {
|
|
56
|
+
return this.name + ".json";
|
|
61
57
|
}
|
|
62
58
|
|
|
63
59
|
owner;
|
|
@@ -210,7 +206,6 @@ export class Base {
|
|
|
210
206
|
}
|
|
211
207
|
|
|
212
208
|
get typeName() {
|
|
213
|
-
// @ts-ignore
|
|
214
209
|
return this.constructor.name;
|
|
215
210
|
}
|
|
216
211
|
|
|
@@ -244,7 +244,7 @@ export class InitializationContext {
|
|
|
244
244
|
async loadType(name, type) {
|
|
245
245
|
const data = JSON.parse(
|
|
246
246
|
await readFile(
|
|
247
|
-
join(this.directory, name, type.
|
|
247
|
+
join(this.directory, name, type.fileName),
|
|
248
248
|
"utf8"
|
|
249
249
|
)
|
|
250
250
|
);
|
|
@@ -262,7 +262,7 @@ export class InitializationContext {
|
|
|
262
262
|
//console.log("LOAD", [name, owner.fullName, data.name]);
|
|
263
263
|
|
|
264
264
|
const object = this.typeFactory(type, owner, data);
|
|
265
|
-
this.root.addTypeObject(type.
|
|
265
|
+
this.root.addTypeObject(type.name, name, object);
|
|
266
266
|
|
|
267
267
|
return object;
|
|
268
268
|
}
|
|
@@ -279,7 +279,7 @@ export class InitializationContext {
|
|
|
279
279
|
return this.loadType(name, options.type);
|
|
280
280
|
} else {
|
|
281
281
|
for (const type of Object.values(types).filter(
|
|
282
|
-
type => type?.
|
|
282
|
+
type => type?.fileName
|
|
283
283
|
)) {
|
|
284
284
|
try {
|
|
285
285
|
return await this.loadType(name, type);
|
|
@@ -295,8 +295,8 @@ export class InitializationContext {
|
|
|
295
295
|
for (const type of Object.values(types).sort(
|
|
296
296
|
(a, b) => b.priority - a.priority
|
|
297
297
|
)) {
|
|
298
|
-
if (type.
|
|
299
|
-
for await (const name of glob("**/" + type.
|
|
298
|
+
if (type.fileName) {
|
|
299
|
+
for await (const name of glob("**/" + type.fileName, {
|
|
300
300
|
cwd: this.directory
|
|
301
301
|
})) {
|
|
302
302
|
if (type === this.root.constructor) {
|