pmcf 1.94.0 → 1.94.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmcf",
3
- "version": "1.94.0",
3
+ "version": "1.94.2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
package/src/base.mjs CHANGED
@@ -15,7 +15,7 @@ const BaseTypeDefinition = {
15
15
  identifier: true,
16
16
  writeable: true
17
17
  },
18
- /* fullName: {
18
+ /* fullName: {
19
19
  type: "string",
20
20
  collection: false,
21
21
  identifier: true,
@@ -198,9 +198,13 @@ export class Base {
198
198
  instantiateAndAssign(property, v);
199
199
  }
200
200
  } else {
201
- for (const [objectName, objectData] of Object.entries(value)) {
202
- objectData[type.identifier.name] = objectName;
203
- instantiateAndAssign(property, objectData);
201
+ if (value instanceof Base) {
202
+ assign(property, value);
203
+ } else {
204
+ for (const [objectName, objectData] of Object.entries(value)) {
205
+ objectData[type.identifier.name] = objectName;
206
+ instantiateAndAssign(property, objectData);
207
+ }
204
208
  }
205
209
  }
206
210
  continue;
@@ -370,13 +374,11 @@ export class Base {
370
374
  };
371
375
  }
372
376
 
373
- get tags()
374
- {
377
+ get tags() {
375
378
  return this.#tags;
376
379
  }
377
380
 
378
- set tags(value)
379
- {
381
+ set tags(value) {
380
382
  if (value instanceof Set) {
381
383
  this.#tags = this.#tags.union(value);
382
384
  } else {
package/src/host.mjs CHANGED
@@ -187,7 +187,7 @@ export class Host extends Base {
187
187
  }
188
188
 
189
189
  get aliases() {
190
- return this.#aliases;
190
+ return this.extends.reduce((a, c) => a.union(c.aliases), this.#aliases);
191
191
  }
192
192
 
193
193
  set extends(value) {
package/types/host.d.mts CHANGED
@@ -185,8 +185,8 @@ export class Host extends Base {
185
185
  get isTemplate(): true | RegExpMatchArray;
186
186
  get isModel(): boolean;
187
187
  get model(): any;
188
- set aliases(value: Set<any>);
189
- get aliases(): Set<any>;
188
+ set aliases(value: any);
189
+ get aliases(): any;
190
190
  set extends(value: any[]);
191
191
  get extends(): any[];
192
192
  set master(value: boolean);