pmcf 1.11.0 → 1.13.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 +2 -2
- package/src/model.mjs +23 -13
- package/types/model.d.mts +2 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmcf",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.13.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"typescript": "^5.7.3"
|
|
49
49
|
},
|
|
50
50
|
"engines": {
|
|
51
|
-
"node": ">=22.13.
|
|
51
|
+
"node": ">=22.13.1"
|
|
52
52
|
},
|
|
53
53
|
"repository": {
|
|
54
54
|
"type": "git",
|
package/src/model.mjs
CHANGED
|
@@ -430,7 +430,7 @@ class DNSService {
|
|
|
430
430
|
|
|
431
431
|
yield* this.owner.services(filter);
|
|
432
432
|
|
|
433
|
-
for (const s of this.forwardsTo) {
|
|
433
|
+
for (const s of asArray(this.forwardsTo)) {
|
|
434
434
|
const owner = await this.owner.world.load(s);
|
|
435
435
|
yield* owner.services(filter);
|
|
436
436
|
}
|
|
@@ -481,7 +481,6 @@ export class Location extends Owner {
|
|
|
481
481
|
return this.#dns;
|
|
482
482
|
}
|
|
483
483
|
|
|
484
|
-
|
|
485
484
|
async *networkAddresses() {
|
|
486
485
|
for await (const host of this.hosts()) {
|
|
487
486
|
for (const networkAddresses of host.networkAddresses()) {
|
|
@@ -592,7 +591,9 @@ export class Host extends Base {
|
|
|
592
591
|
}
|
|
593
592
|
|
|
594
593
|
if (data.extends) {
|
|
595
|
-
data.extends = await Promise.all(
|
|
594
|
+
data.extends = await Promise.all(
|
|
595
|
+
asArray(data.extends).map(e => world.host(e))
|
|
596
|
+
);
|
|
596
597
|
}
|
|
597
598
|
|
|
598
599
|
return this;
|
|
@@ -863,15 +864,15 @@ export class Subnet extends Base {
|
|
|
863
864
|
}
|
|
864
865
|
|
|
865
866
|
const ServiceTypes = {
|
|
866
|
-
dns: {
|
|
867
|
-
ldap: {
|
|
868
|
-
http: {
|
|
869
|
-
https: {
|
|
870
|
-
rtsp: {
|
|
871
|
-
smtp: {
|
|
872
|
-
ssh: {
|
|
873
|
-
imap: {
|
|
874
|
-
imaps: {
|
|
867
|
+
dns: { protocol: "udp", port: 53 },
|
|
868
|
+
ldap: { protocol: "tcp", port: 389 },
|
|
869
|
+
http: { protocol: "tcp", port: 80 },
|
|
870
|
+
https: { protocol: "tcp", port: 443 },
|
|
871
|
+
rtsp: { protocol: "tcp", port: 554 },
|
|
872
|
+
smtp: { protocol: "tcp", port: 25 },
|
|
873
|
+
ssh: { protocol: "tcp", port: 22 },
|
|
874
|
+
imap: { protocol: "tcp", port: 143 },
|
|
875
|
+
imaps: { protocol: "tcp", port: 993 },
|
|
875
876
|
dhcp: {}
|
|
876
877
|
};
|
|
877
878
|
|
|
@@ -941,8 +942,15 @@ export class Service extends Base {
|
|
|
941
942
|
return this;
|
|
942
943
|
}
|
|
943
944
|
|
|
945
|
+
get protocol() {
|
|
946
|
+
return ServiceTypes[this.type]?.protocol;
|
|
947
|
+
}
|
|
948
|
+
|
|
944
949
|
get srvPrefix() {
|
|
945
|
-
|
|
950
|
+
const st = ServiceTypes[this.type];
|
|
951
|
+
if (st) {
|
|
952
|
+
return `_${this.type}._${st.protocol}`;
|
|
953
|
+
}
|
|
946
954
|
}
|
|
947
955
|
|
|
948
956
|
get ipAddress() {
|
|
@@ -973,6 +981,8 @@ export class Service extends Base {
|
|
|
973
981
|
return [
|
|
974
982
|
...super.propertyNames,
|
|
975
983
|
"ipAddress",
|
|
984
|
+
"port",
|
|
985
|
+
"protocol",
|
|
976
986
|
"alias",
|
|
977
987
|
"type",
|
|
978
988
|
"master",
|
package/types/model.d.mts
CHANGED