pmcf 4.24.1 → 4.24.2
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 +11 -11
- package/package.json +1 -1
- package/src/base.mjs +9 -16
package/README.md
CHANGED
|
@@ -73,11 +73,11 @@ generates config packages for:
|
|
|
73
73
|
* [Parameters](#parameters-12)
|
|
74
74
|
* [port](#port-1)
|
|
75
75
|
* [id](#id)
|
|
76
|
+
* [InitializationContext](#initializationcontext)
|
|
77
|
+
* [Parameters](#parameters-13)
|
|
76
78
|
* [SkeletonNetworkInterface](#skeletonnetworkinterface)
|
|
77
79
|
* [networkAddresses](#networkaddresses)
|
|
78
|
-
* [Parameters](#parameters-
|
|
79
|
-
* [InitializationContext](#initializationcontext)
|
|
80
|
-
* [Parameters](#parameters-14)
|
|
80
|
+
* [Parameters](#parameters-14)
|
|
81
81
|
* [SystemdJournalRemoteService](#systemdjournalremoteservice)
|
|
82
82
|
* [Properties](#properties)
|
|
83
83
|
* [systemdConfigs](#systemdconfigs)
|
|
@@ -263,6 +263,14 @@ Returns **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G
|
|
|
263
263
|
|
|
264
264
|
Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
|
|
265
265
|
|
|
266
|
+
## InitializationContext
|
|
267
|
+
|
|
268
|
+
Keeps track of all in flight object creations and loose ends during config initialization.
|
|
269
|
+
|
|
270
|
+
### Parameters
|
|
271
|
+
|
|
272
|
+
* `directory` (optional, default `"/"`)
|
|
273
|
+
|
|
266
274
|
## SkeletonNetworkInterface
|
|
267
275
|
|
|
268
276
|
**Extends ServiceOwner**
|
|
@@ -275,14 +283,6 @@ Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G
|
|
|
275
283
|
|
|
276
284
|
Returns **Iterable<[NetworkAddress](#networkaddress)>** 
|
|
277
285
|
|
|
278
|
-
## InitializationContext
|
|
279
|
-
|
|
280
|
-
Keeps track of all in flight object creations and loose ends during config initialization.
|
|
281
|
-
|
|
282
|
-
### Parameters
|
|
283
|
-
|
|
284
|
-
* `directory` (optional, default `"/"`)
|
|
285
|
-
|
|
286
286
|
## SystemdJournalRemoteService
|
|
287
287
|
|
|
288
288
|
**Extends Service**
|
package/package.json
CHANGED
package/src/base.mjs
CHANGED
|
@@ -155,31 +155,24 @@ export class Base {
|
|
|
155
155
|
return collected;
|
|
156
156
|
}
|
|
157
157
|
|
|
158
|
-
/*get this()
|
|
159
|
-
{
|
|
160
|
-
return [this];
|
|
161
|
-
}*/
|
|
162
|
-
|
|
163
158
|
/**
|
|
164
159
|
* Walk the object graph in some directions and deliver seen nodes.
|
|
165
160
|
* @param {string[]} directions
|
|
166
161
|
* @return {Iterable<Base>}
|
|
167
162
|
*/
|
|
168
163
|
*walkDirections(directions = ["this", "extends", "owner"]) {
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
directions.
|
|
172
|
-
|
|
173
|
-
|
|
164
|
+
if (directions.indexOf("this") >= 0) {
|
|
165
|
+
yield this;
|
|
166
|
+
directions = directions.filter(d => d != "this");
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
yield* this._walkDirections(directions, new Set());
|
|
174
170
|
}
|
|
175
171
|
|
|
176
|
-
*_walkDirections(directions,
|
|
172
|
+
*_walkDirections(directions, seen) {
|
|
177
173
|
if (!seen.has(this)) {
|
|
178
174
|
seen.add(this);
|
|
179
175
|
|
|
180
|
-
if (withThis) {
|
|
181
|
-
yield this;
|
|
182
|
-
}
|
|
183
176
|
for (const direction of directions) {
|
|
184
177
|
const value = this[direction];
|
|
185
178
|
|
|
@@ -187,11 +180,11 @@ export class Base {
|
|
|
187
180
|
if (value[Symbol.iterator]) {
|
|
188
181
|
for (const node of value) {
|
|
189
182
|
yield node;
|
|
190
|
-
yield* node._walkDirections(directions,
|
|
183
|
+
yield* node._walkDirections(directions, seen);
|
|
191
184
|
}
|
|
192
185
|
} else {
|
|
193
186
|
yield value;
|
|
194
|
-
yield* value._walkDirections(directions,
|
|
187
|
+
yield* value._walkDirections(directions, seen);
|
|
195
188
|
}
|
|
196
189
|
}
|
|
197
190
|
}
|