pmcf 1.9.0 → 1.9.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.
@@ -62,7 +62,7 @@ async function generateLocationDefs(location, dir) {
62
62
  await mkdir(locationDir, { recursive: true });
63
63
 
64
64
  copyFile(
65
- join(world.directory, location.directory, "location.json"),
65
+ join(location.directory, "location.json"),
66
66
  join(locationDir, "location.json")
67
67
  );
68
68
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmcf",
3
- "version": "1.9.0",
3
+ "version": "1.9.2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
package/src/model.mjs CHANGED
@@ -572,11 +572,6 @@ export class Host extends Base {
572
572
  constructor(owner, data) {
573
573
  super(owner, data);
574
574
 
575
- if (data.model) {
576
- this.#isModel = true;
577
- delete data.model;
578
- }
579
-
580
575
  if (data.location !== undefined) {
581
576
  this.#location = data.location;
582
577
  delete data.location;
@@ -652,6 +647,14 @@ export class Host extends Base {
652
647
  return this.#vendor || this.extends.find(e => e.vendor)?.vendor;
653
648
  }
654
649
 
650
+ get isModel() {
651
+ return (this.#vendor || this.#chassis) ? true : false;
652
+ }
653
+
654
+ get model() {
655
+ return this.extends.find(h => h.isModel);
656
+ }
657
+
655
658
  get extends() {
656
659
  return this.#extends.map(e => this.expand(e));
657
660
  }
@@ -694,14 +697,6 @@ export class Host extends Base {
694
697
  return this.#distribution || this.extends.find(e => e.distribution);
695
698
  }
696
699
 
697
- get isModel() {
698
- return this.#isModel;
699
- }
700
-
701
- get model() {
702
- return this.extends.find(h => h.isModel);
703
- }
704
-
705
700
  get domain() {
706
701
  return this.location?.domain;
707
702
  }
package/types/model.d.mts CHANGED
@@ -97,6 +97,8 @@ export class Host extends Base {
97
97
  get deployment(): any;
98
98
  get chassis(): any;
99
99
  get vendor(): any;
100
+ get isModel(): boolean;
101
+ get model(): any;
100
102
  get extends(): any[];
101
103
  get provides(): Set<any>;
102
104
  get replaces(): Set<any>;
@@ -105,8 +107,6 @@ export class Host extends Base {
105
107
  get master(): boolean;
106
108
  get os(): any;
107
109
  get distribution(): any;
108
- get isModel(): boolean;
109
- get model(): any;
110
110
  get domain(): any;
111
111
  get modelName(): any;
112
112
  get hostName(): any;