pmcf 6.27.3 → 6.28.0

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": "6.27.3",
3
+ "version": "6.28.0",
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.14",
57
- "pacc": "^11.2.1",
57
+ "pacc": "^11.2.2",
58
58
  "package-directory": "^8.2.0",
59
59
  "yaml": "^2.9.0"
60
60
  },
package/src/base.mjs CHANGED
@@ -44,7 +44,6 @@ export class Base {
44
44
  type: type_attribute_writable,
45
45
  directory: { ...string_attribute_writable, name: "directory" },
46
46
  packaging: { ...string_set_attribute_writable, name: "packaging" },
47
- disabled: { ...boolean_attribute_writable, name: "disabled" },
48
47
  enabled: { ...boolean_attribute_writable, name: "enabled" },
49
48
  tags: { ...string_set_attribute_writable, name: "tags" },
50
49
  template: { ...boolean_attribute_writable, name: "template", private: true }
@@ -404,6 +403,34 @@ export class Base {
404
403
  return this.owner?.timezone;
405
404
  }
406
405
 
406
+ /**
407
+ * @return {boolean}
408
+ */
409
+ get enabled() {
410
+ return this.attribute("_enabled") ?? true;
411
+ }
412
+
413
+ set enabled(value) {
414
+ this._enabled = value;
415
+ }
416
+
417
+ get tags() {
418
+ return this.unionFromDirections(["this", "extends"], "_tags");
419
+ }
420
+
421
+ set tags(value) {
422
+ this._tags = union(value, this._tags);
423
+ }
424
+
425
+ set aliases(value) {
426
+ this._aliases = union(value, this._aliases);
427
+ }
428
+
429
+ get aliases() {
430
+ return this.expand(
431
+ this.unionFromDirections(["this", "extends"], "_aliases")
432
+ );
433
+ }
407
434
  set priority(value) {
408
435
  this._priority = value;
409
436
  }
@@ -565,37 +592,6 @@ export class Base {
565
592
  }
566
593
  }
567
594
 
568
- /**
569
- * @return {boolean}
570
- */
571
- get enabled()
572
- {
573
- return !this.disabled;
574
- }
575
-
576
- set enabled(value)
577
- {
578
- this.disabled = !value;
579
- }
580
-
581
- get tags() {
582
- return this.unionFromDirections(["this", "extends"], "_tags");
583
- }
584
-
585
- set tags(value) {
586
- this._tags = union(value, this._tags);
587
- }
588
-
589
- set aliases(value) {
590
- this._aliases = union(value, this._aliases);
591
- }
592
-
593
- get aliases() {
594
- return this.expand(
595
- this.unionFromDirections(["this", "extends"], "_aliases")
596
- );
597
- }
598
-
599
595
  /**
600
596
  * @return {boolean}
601
597
  */
@@ -196,7 +196,7 @@ export class NetworkInterface extends SkeletonNetworkInterface {
196
196
 
197
197
  if (this.name !== "eth0" && this.hwaddr) {
198
198
  const disabled = {};
199
- if (this.disabled) {
199
+ if (!this.enabled) {
200
200
  disabled.Unmanaged = "yes";
201
201
  }
202
202
  await writeLines(networkDir, `${this.name}.link`, [
@@ -263,7 +263,7 @@ export class NetworkInterface extends SkeletonNetworkInterface {
263
263
 
264
264
  await writeLines(
265
265
  networkDir,
266
- `${this.name}.network${this.disabled ? ".disabled" : ""}`,
266
+ `${this.name}.network${this.enabled ? "" : ".disabled"}`,
267
267
  networkSections
268
268
  );
269
269
  }