pmcf 4.29.2 → 4.29.3

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": "4.29.2",
3
+ "version": "4.29.3",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
package/src/base.mjs CHANGED
@@ -244,12 +244,6 @@ export class Base {
244
244
  return name[0] === "/" ? this.fullName === name : this.name === name;
245
245
  }
246
246
 
247
- relativeName(name) {
248
- return name?.[0] === "/"
249
- ? name.substring(this.owner.fullName.length + 1)
250
- : name;
251
- }
252
-
253
247
  *find(pattern) {
254
248
  for (const node of this.walkDirections(["children"])) {
255
249
  for (const p of pattern) {
package/src/cluster.mjs CHANGED
@@ -5,12 +5,11 @@ import {
5
5
  default_attribute_writable,
6
6
  default_attribute,
7
7
  number_attribute_writable,
8
- duration_attribute_writable,
9
- addType
8
+ duration_attribute_writable
10
9
  } from "pacc";
11
10
  import { Owner } from "./owner.mjs";
12
11
  import { Host } from "./host.mjs";
13
- import { serviceEndpoints } from "pmcf";
12
+ import { addType, serviceEndpoints } from "pmcf";
14
13
  import { writeLines } from "./utils.mjs";
15
14
 
16
15
  export class Cluster extends Host {
package/src/endpoint.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { FAMILY_IPV6 } from "ip-utilties";
2
- import { addType } from "pacc";
2
+ import { addType } from "pmcf";
3
3
  import { endpointAttributes, Service } from "./service.mjs";
4
4
 
5
5
  class BaseEndpoint {
package/src/host.mjs CHANGED
@@ -7,10 +7,9 @@ import {
7
7
  string_attribute_writable,
8
8
  string_set_attribute_writable,
9
9
  number_attribute_writable,
10
- boolean_attribute_false,
11
- addType
10
+ boolean_attribute_false
12
11
  } from "pacc";
13
- import { NetworkInterface, addresses } from "pmcf";
12
+ import { NetworkInterface, addresses, addType } from "pmcf";
14
13
  import { ServiceOwner } from "./service-owner.mjs";
15
14
  import { networkAddressAttributes } from "./network-support.mjs";
16
15
  import { addHook } from "./hooks.mjs";
@@ -74,7 +73,12 @@ export class Host extends ServiceOwner {
74
73
  replaces: string_set_attribute_writable,
75
74
  depends: string_set_attribute_writable,
76
75
  provides: string_set_attribute_writable,
77
- extends: { ...default_attribute_writable, type: Host, collection: true, owner: false },
76
+ extends: {
77
+ ...default_attribute_writable,
78
+ type: Host,
79
+ collection: true,
80
+ owner: false
81
+ },
78
82
  model: string_attribute,
79
83
  isModel: boolean_attribute_false
80
84
  };
package/src/location.mjs CHANGED
@@ -1,6 +1,5 @@
1
1
  import { FileContentProvider } from "npm-pkgbuild";
2
- import { addType } from "pacc";
3
- import { Owner } from "pmcf";
2
+ import { Owner, addType } from "pmcf";
4
3
  import { loadHooks } from "./hooks.mjs";
5
4
 
6
5
  export class Location extends Owner {
package/src/network.mjs CHANGED
@@ -1,4 +1,5 @@
1
- import { default_attribute_writable, addType } from "pacc";
1
+ import { default_attribute_writable } from "pacc";
2
+ import { addType } from "pmcf";
2
3
  import { Owner } from "./owner.mjs";
3
4
  import { Subnet } from "./subnet.mjs";
4
5
  import { networkAttributes } from "./network-support.mjs";
package/src/owner.mjs CHANGED
@@ -4,10 +4,9 @@ import {
4
4
  string_set_attribute_writable,
5
5
  string_attribute_writable,
6
6
  boolean_attribute_writable,
7
- email_attribute,
8
- addType,
9
- types
7
+ email_attribute
10
8
  } from "pacc";
9
+ import { addType } from "pacc";
11
10
  import { asIterator, union } from "./utils.mjs";
12
11
  import { Base } from "./base.mjs";
13
12
  import { Subnet, SUBNET_GLOBAL_IPV4, SUBNET_GLOBAL_IPV6 } from "./subnet.mjs";
@@ -160,7 +159,7 @@ export class Owner extends Base {
160
159
  get hosts() {
161
160
  let hosts = this.directHosts();
162
161
 
163
- for (const type of types.host.owners) {
162
+ for (const type of Host.owners) {
164
163
  for (const object of this.typeList(type)) {
165
164
  hosts = hosts.union(object.hosts);
166
165
  }
package/src/root.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { addType } from "pacc";
1
+ import { addType } from "pmcf";
2
2
  import { Location } from "./location.mjs";
3
3
 
4
4
  export class root extends Location {
@@ -1,5 +1,5 @@
1
- import { default_attribute_writable, addType } from "pacc";
2
- import { Base, Service } from "pmcf";
1
+ import { default_attribute_writable } from "pacc";
2
+ import { Base, Service, addType } from "pmcf";
3
3
 
4
4
  export class ServiceOwner extends Base {
5
5
  static name = "service-owner";
@@ -64,5 +64,5 @@ export class ServiceOwner extends Base {
64
64
  throw new Error("invalidType", { cause: typeName });
65
65
  }
66
66
  return super.typeNamed(typeName, name);
67
- }
67
+ }
68
68
  }
package/src/service.mjs CHANGED
@@ -4,8 +4,7 @@ import {
4
4
  number_attribute_writable,
5
5
  string_set_attribute,
6
6
  default_attribute_writable,
7
- boolean_attribute_false,
8
- addType
7
+ boolean_attribute_false
9
8
  } from "pacc";
10
9
  import {
11
10
  Base,
@@ -13,7 +12,8 @@ import {
13
12
  Endpoint,
14
13
  DomainNameEndpoint,
15
14
  HTTPEndpoint,
16
- UnixEndpoint
15
+ UnixEndpoint,
16
+ addType
17
17
  } from "pmcf";
18
18
  import { asArray } from "./utils.mjs";
19
19
  import { networkAddressAttributes } from "./network-support.mjs";
package/src/subnet.mjs CHANGED
@@ -6,14 +6,10 @@ import {
6
6
  familyIP,
7
7
  matchPrefixIP
8
8
  } from "ip-utilties";
9
- import {
10
- string_attribute,
11
- name_attribute,
12
- number_attribute,
13
- addType
14
- } from "pacc";
9
+ import { string_attribute, name_attribute, number_attribute } from "pacc";
15
10
  import { networks_attribute } from "./network-support.mjs";
16
11
  import { Base } from "./base.mjs";
12
+ import { addType } from "pmcf";
17
13
 
18
14
  export class Subnet extends Base {
19
15
  static name = "subnet";