pmcf 6.58.3 → 6.59.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 +2 -2
- package/src/common-attributes.mjs +1 -1
- package/src/core-service.mjs +1 -1
- package/src/core.mjs +4 -0
- package/src/initialization-context.mjs +3 -2
- package/src/module.mjs +1 -0
- package/src/network.mjs +1 -1
- package/src/owner.mjs +3 -3
- package/src/root.mjs +1 -1
- package/src/service-owner.mjs +1 -1
- package/src/site.mjs +16 -0
- package/src/subnet.mjs +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmcf",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.59.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"content-entry-transform": "^1.7.8",
|
|
55
55
|
"ip-utilties": "^3.13.1",
|
|
56
56
|
"npm-pkgbuild": "^22.2.6",
|
|
57
|
-
"pacc": "^11.
|
|
57
|
+
"pacc": "^11.16.0",
|
|
58
58
|
"package-directory": "^8.2.0",
|
|
59
59
|
"yaml": "^2.9.1"
|
|
60
60
|
},
|
|
@@ -160,7 +160,7 @@ export const networkAttributes = {
|
|
|
160
160
|
ssid: ssid_attribute,
|
|
161
161
|
psk: psk_attribute,
|
|
162
162
|
secretName: { ...string_attribute_writable, name: "secretName" },
|
|
163
|
-
metric: { ...integer_attribute_writable, name: "metric"
|
|
163
|
+
metric: { ...integer_attribute_writable, name: "metric" },
|
|
164
164
|
mtu: { ...integer_attribute_writable, name: "mtu", default: 1500 },
|
|
165
165
|
gateway: { ...default_attribute_writable, name: "gateway", type: "host" },
|
|
166
166
|
multicastDNS: {
|
package/src/core-service.mjs
CHANGED
|
@@ -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"
|
|
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
|
@@ -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
|
|
204
|
+
attribute => isExtendingType(type, attribute.type) && attribute.collection
|
|
204
205
|
)) {
|
|
205
206
|
try {
|
|
206
207
|
return assign(
|
package/src/module.mjs
CHANGED
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
|
-
hosts: hosts_attribute,
|
|
30
29
|
clusters: clusters_attribute,
|
|
31
|
-
|
|
30
|
+
hosts: hosts_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
package/src/service-owner.mjs
CHANGED
|
@@ -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 = {
|