pmcf 1.11.0 → 1.12.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": "1.11.0",
3
+ "version": "1.12.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
package/src/model.mjs CHANGED
@@ -863,15 +863,15 @@ export class Subnet extends Base {
863
863
  }
864
864
 
865
865
  const ServiceTypes = {
866
- dns: { srvPrefix: "_dns._udp", port: 53 },
867
- ldap: { srvPrefix: "_ldap._tcp", port: 389 },
868
- http: { srvPrefix: "_http._tcp", port: 80 },
869
- https: { srvPrefix: "_http._tcp", port: 443 },
870
- rtsp: { srvPrefix: "_rtsp._tcp", port: 554 },
871
- smtp: { srvPrefix: "_smtp._tcp", port: 25 },
872
- ssh: { srvPrefix: "_ssh._tcp", port: 22 },
873
- imap: { srvPrefix: "_imap._tcp", port: 143 },
874
- imaps: { srvPrefix: "_imaps._tcp", port: 993 },
866
+ dns: { protocol: "udp", port: 53 },
867
+ ldap: { protocol: "tcp", port: 389 },
868
+ http: { protocol: "tcp", port: 80 },
869
+ https: { protocol: "tcp", port: 443 },
870
+ rtsp: { protocol: "tcp", port: 554 },
871
+ smtp: { protocol: "tcp", port: 25 },
872
+ ssh: { protocol: "tcp", port: 22 },
873
+ imap: { protocol: "tcp", port: 143 },
874
+ imaps: { protocol: "tcp", port: 993 },
875
875
  dhcp: {}
876
876
  };
877
877
 
@@ -941,8 +941,16 @@ export class Service extends Base {
941
941
  return this;
942
942
  }
943
943
 
944
+ get protocol()
945
+ {
946
+ return ServiceTypes[this.type]?.protocol;
947
+ }
948
+
944
949
  get srvPrefix() {
945
- return ServiceTypes[this.type]?.srvPrefix;
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
@@ -135,7 +135,8 @@ export class Subnet extends Base {
135
135
  }
136
136
  export class Service extends Base {
137
137
  alias: any;
138
- get srvPrefix(): any;
138
+ get protocol(): any;
139
+ get srvPrefix(): string;
139
140
  get ipAddress(): any;
140
141
  get port(): any;
141
142
  get priority(): any;