pmcf 6.27.0 → 6.27.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/bin/pmcf-info CHANGED
@@ -96,16 +96,20 @@ function show(value, indent = 0, options = { short: false, maxDepth: 5 }) {
96
96
  }
97
97
  }
98
98
  } else {
99
- const l = [...v];
99
+ try {
100
+ const l = [...v];
100
101
 
101
- if (l.length > 1) {
102
- console.log(name(attribute));
102
+ if (l.length > 1) {
103
+ console.log(name(attribute));
103
104
 
104
- for (const o of l) {
105
- console.log(prefix(indent + 2) + o.fullName);
105
+ for (const o of l) {
106
+ console.log(prefix(indent + 2) + o.fullName);
107
+ }
108
+ } else if (l.length === 1) {
109
+ console.log(name(attribute) + l[0].fullName);
106
110
  }
107
- } else if (l.length === 1) {
108
- console.log(name(attribute) + l[0].fullName);
111
+ } catch (e) {
112
+ console.log(name(attribute), v);
109
113
  }
110
114
  }
111
115
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmcf",
3
- "version": "6.27.0",
3
+ "version": "6.27.2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -54,7 +54,7 @@
54
54
  "content-entry-transform": "^1.7.0",
55
55
  "ip-utilties": "^3.12.0",
56
56
  "npm-pkgbuild": "^20.8.13",
57
- "pacc": "^11.1.3",
57
+ "pacc": "^11.2.0",
58
58
  "package-directory": "^8.2.0",
59
59
  "yaml": "^2.9.0"
60
60
  },
package/src/host.mjs CHANGED
@@ -40,7 +40,7 @@ export class Host extends ServiceOwner {
40
40
  name: "os",
41
41
  values: new Set(["osx", "windows", "linux"])
42
42
  },
43
- "machine-id": { ...string_attribute_writable, name: "machine-id" },
43
+ id: { ...string_attribute_writable, name: "id" },
44
44
  distribution: { ...string_attribute_writable, name: "distribution" },
45
45
  deployment: {
46
46
  ...string_attribute_writable,
@@ -136,13 +136,6 @@ export class Host extends ServiceOwner {
136
136
  return this.attribute("_vendor");
137
137
  }
138
138
 
139
- /**
140
- * @return {string}
141
- */
142
- get id() {
143
- return this["machine-id"];
144
- }
145
-
146
139
  set keymap(value) {
147
140
  this._keymap = value;
148
141
  }
package/src/type.mjs CHANGED
@@ -39,9 +39,13 @@ export function assign(attribute, object, value) {
39
39
  }
40
40
 
41
41
  if (attribute.deferredExpression) {
42
- Object.defineProperty(object, attribute.name, {
43
- get: () => object.expression(value)
44
- });
42
+ if (object.hasOwnProperty(attribute.name)) {
43
+ error(`attribute ${attribute.name} of ${object.fullName} already defined`, attribute );
44
+ } else {
45
+ Object.defineProperty(object, attribute.name, {
46
+ get: () => object.expression(value)
47
+ });
48
+ }
45
49
  return value;
46
50
  }
47
51