pmcf 6.27.3 → 6.28.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": "6.27.3",
3
+ "version": "6.28.1",
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
  */
@@ -14,7 +14,7 @@ import {
14
14
  Endpoint,
15
15
  DomainNameEndpoint,
16
16
  HTTPEndpoint,
17
- UnixEndpoint,
17
+ unix_endpoint,
18
18
  addType,
19
19
  FAMILY_UNIX,
20
20
  FAMILY_DNS
@@ -137,7 +137,7 @@ export class CoreService extends Base {
137
137
  for (const e of data) {
138
138
  switch (e.family) {
139
139
  case FAMILY_UNIX:
140
- result.push(new UnixEndpoint(this, e.path, e));
140
+ result.push(new unix_endpoint(this, e.path, e));
141
141
  break;
142
142
 
143
143
  case undefined:
package/src/endpoint.mjs CHANGED
@@ -240,8 +240,7 @@ export class HTTPEndpoint extends BaseEndpoint {
240
240
  }
241
241
  }
242
242
 
243
- export class UnixEndpoint extends BaseEndpoint {
244
- static name = "unix_endpoint";
243
+ export class unix_endpoint extends BaseEndpoint {
245
244
  static attributes = {
246
245
  url: url_attribute
247
246
  };
@@ -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
  }
@@ -369,11 +369,7 @@ class bind_group extends Base {
369
369
  const address = na.address;
370
370
  const host = na.host;
371
371
 
372
- if (host === undefined) {
373
- console.log("NO HOST", na);
374
- }
375
-
376
- if (!addresses.has(address)) {
372
+ if (host && !addresses.has(address)) {
377
373
  addresses.add(address);
378
374
 
379
375
  const locationName = host.owner.name;
@@ -403,7 +399,7 @@ class bind_group extends Base {
403
399
  )
404
400
  );
405
401
 
406
- if (host && !hosts.has(host)) {
402
+ if (!hosts.has(host)) {
407
403
  hosts.add(host);
408
404
 
409
405
  for (let foreignDomain of host.foreignDomainNames) {