pmcf 2.62.0 → 2.62.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmcf",
3
- "version": "2.62.0",
3
+ "version": "2.62.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
package/src/base.mjs CHANGED
@@ -31,7 +31,7 @@ const BaseTypeDefinition = {
31
31
  };
32
32
 
33
33
  /**
34
- *
34
+ *
35
35
  */
36
36
  export class Base {
37
37
  owner;
@@ -142,7 +142,11 @@ export class Base {
142
142
 
143
143
  const instantiateAndAssign = (property, value) => {
144
144
  if (primitives.has(property.type[0])) {
145
- assign(property, value);
145
+ if (value !== undefined) {
146
+ value = this.expand(value);
147
+ assign(property, value);
148
+ //console.log("A1",property.name,value);
149
+ }
146
150
  return;
147
151
  }
148
152
 
@@ -222,7 +226,7 @@ export class Base {
222
226
  }
223
227
  };
224
228
 
225
- if(data?.properties) {
229
+ if (data?.properties) {
226
230
  this._properties = data.properties;
227
231
  }
228
232
 
@@ -382,8 +386,8 @@ export class Base {
382
386
  }
383
387
 
384
388
  /**
385
- *
386
- * @param {any} filter
389
+ *
390
+ * @param {any} filter
387
391
  * @returns service with the highest priority
388
392
  */
389
393
  findService(filter) {
@@ -459,7 +463,7 @@ export class Base {
459
463
 
460
464
  property(name) {
461
465
  const value = this._properties?.[name];
462
- if(value === undefined && this.owner) {
466
+ if (value === undefined && this.owner) {
463
467
  return this.owner.property(name);
464
468
  }
465
469
 
package/src/host.mjs CHANGED
@@ -211,7 +211,7 @@ export class Host extends ServiceOwner {
211
211
  }
212
212
 
213
213
  get isTemplate() {
214
- return this.isModel || this.name.match(/services\//); // TODO
214
+ return this.isModel || this.name?.match(/services\//); // TODO
215
215
  }
216
216
 
217
217
  get isModel() {
@@ -27,7 +27,7 @@ export class SkeletonNetworkInterface extends ServiceOwner {
27
27
  }
28
28
 
29
29
  get isTemplate() {
30
- return this.name.indexOf("*") >= 0;
30
+ return this.name?.indexOf("*") >= 0;
31
31
  }
32
32
 
33
33
  get host() {