pmcf 6.58.2 → 6.59.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.58.2",
3
+ "version": "6.59.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -53,8 +53,8 @@
53
53
  "aggregated-map": "^1.0.11",
54
54
  "content-entry-transform": "^1.7.8",
55
55
  "ip-utilties": "^3.13.1",
56
- "npm-pkgbuild": "^22.2.5",
57
- "pacc": "^11.15.0",
56
+ "npm-pkgbuild": "^22.2.6",
57
+ "pacc": "^11.16.0",
58
58
  "package-directory": "^8.2.0",
59
59
  "yaml": "^2.9.1"
60
60
  },
@@ -74,7 +74,7 @@ export class CoreService extends base {
74
74
  type: CoreService
75
75
  },
76
76
  priority: priority_attribute,
77
- weight: { ...number_attribute_writable, name: "weight" /*default: 1*/ },
77
+ weight: { ...number_attribute_writable, name: "weight" },
78
78
  types: { ...string_set_attribute_writable, name: "types" },
79
79
  systemdService: { ...string_attribute_writable, name: "systemdService" },
80
80
  systemUserName: { ...string_attribute_writable, name: "systemUserName" },
package/src/core.mjs CHANGED
@@ -322,4 +322,8 @@ export class core {
322
322
  get root() {
323
323
  return this.owner?.root;
324
324
  }
325
+
326
+ get site() {
327
+ return this.owner?.site;
328
+ }
325
329
  }
@@ -4,7 +4,8 @@ import {
4
4
  extendingAttributeIterator,
5
5
  types,
6
6
  resolveTypeLinks,
7
- create
7
+ create,
8
+ isExtendingType
8
9
  } from "pacc";
9
10
  import { core } from "./core.mjs";
10
11
  import { root } from "./root.mjs";
@@ -200,7 +201,7 @@ export class InitializationContext {
200
201
 
201
202
  for (const [path, attribute] of extendingAttributeIterator(
202
203
  owner.constructor,
203
- attribute => attribute.type === type && attribute.collection
204
+ attribute => isExtendingType(type, attribute.type) && attribute.collection
204
205
  )) {
205
206
  try {
206
207
  return assign(
package/src/module.mjs CHANGED
@@ -8,6 +8,7 @@ export * from "./cluster.mjs";
8
8
  export * from "./keepalived.mjs";
9
9
 
10
10
  export * from "./owner.mjs";
11
+ export * from "./site.mjs";
11
12
  export * from "./root.mjs";
12
13
  export * from "./subnet.mjs";
13
14
  export * from "./service-owner.mjs";
package/src/network.mjs CHANGED
@@ -5,7 +5,7 @@ import { networkAttributes, bridges_attribute } from "./common-attributes.mjs";
5
5
  import { Subnet } from "./subnet.mjs";
6
6
 
7
7
  export class network extends owner {
8
- static owners = [owner, "root"];
8
+ static owners = [owner, "site", "root"];
9
9
  static attributes = {
10
10
  ...networkAttributes,
11
11
  bridges: bridges_attribute
package/src/owner.mjs CHANGED
@@ -23,14 +23,14 @@ import { loadHooks } from "./hooks.mjs";
23
23
 
24
24
  export class owner extends ServiceOwner {
25
25
  static priority = 2;
26
- static owners = [owner, "root"];
26
+ static owners = [owner, "site", "root"];
27
27
  static attributes = {
28
28
  networks: networks_attribute,
29
29
  hosts: hosts_attribute,
30
30
  clusters: clusters_attribute,
31
- owners: owners_attribute,
32
31
  subnets: subnets_attribute,
33
32
  networkInterfaces: networkInterfaces_attribute,
33
+ owners: owners_attribute,
34
34
  country: { ...string_attribute_writable, name: "country" },
35
35
  domain: { ...string_attribute_writable, name: "domain" },
36
36
  domains: { ...string_set_attribute_writable, name: "domains" },
package/src/root.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { owner, addType } from "pmcf";
2
2
 
3
3
  export class root extends owner {
4
- static priority = 3;
4
+ static priority = 100;
5
5
  static {
6
6
  addType(this);
7
7
  }
@@ -5,7 +5,7 @@ import { owner_attribute } from "./common-attributes.mjs";
5
5
  export class ServiceOwner extends base {
6
6
  static name = "service-owner";
7
7
  static priority = 1.9;
8
- static owners = ["owner", "network", "root"];
8
+ static owners = ["owner", "site", "network", "root"];
9
9
  static attributes = {
10
10
  services: {
11
11
  ...default_collection_attribute_writable,
package/src/site.mjs ADDED
@@ -0,0 +1,16 @@
1
+ import { addType } from "pmcf";
2
+ import { owner } from "./owner.mjs";
3
+
4
+ export class site extends owner {
5
+ static priority = 10;
6
+ static owners = [owner, "root"];
7
+
8
+ static {
9
+ addType(this);
10
+ }
11
+
12
+ get site()
13
+ {
14
+ return this;
15
+ }
16
+ }
package/src/subnet.mjs CHANGED
@@ -12,7 +12,7 @@ import { addType, network, core } from "pmcf";
12
12
  export class Subnet extends core {
13
13
  static name = "subnet";
14
14
  static priority = 1;
15
- static owners = ["owner", "network", "network_interface", "root"];
15
+ static owners = ["owner", "site", "network", "network_interface", "root"];
16
16
  static constructWithIdentifierOnly = true;
17
17
  static key = "address";
18
18
  static attributes = {