@bobfrankston/miscassists 1.0.39 → 1.0.41

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/.gitattributes CHANGED
@@ -1,5 +1,12 @@
1
- * text=auto eol=lf
2
- *.ts text eol=lf
3
- *.js text eol=lf
4
- *.json text eol=lf
5
- *.md text eol=lf
1
+ # Ensure consistent line endings
2
+ * text=auto eol=lf
3
+
4
+ # Explicitly declare text files
5
+ *.js text eol=lf
6
+ *.ts text eol=lf
7
+ *.json text eol=lf
8
+ *.md text eol=lf
9
+
10
+ # Denote binary files
11
+ *.png binary
12
+ *.jpg binary
@@ -0,0 +1,18 @@
1
+ {
2
+ // Use IntelliSense to learn about possible attributes.
3
+ // Hover to view descriptions of existing attributes.
4
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5
+ "version": "0.2.0",
6
+ "configurations": [
7
+ {
8
+ "type": "node",
9
+ "request": "launch",
10
+ "name": "Launch Program",
11
+ "program": "${workspaceFolder}/index.js",
12
+ "skipFiles": [ "<node_internals>/**" ],
13
+ "outFiles": [
14
+ "${workspaceFolder}/**/*.js"
15
+ ]
16
+ }
17
+ ]
18
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "workbench.colorTheme": "Visual Studio 2019 Dark",
3
+ "workbench.colorCustomizations": {
4
+ "activityBar.activeBackground": "#77a8ff",
5
+ "activityBar.background": "#77a8ff",
6
+ "activityBar.foreground": "#15202b",
7
+ "activityBar.inactiveForeground": "#15202b99",
8
+ "activityBarBadge.background": "#df0050",
9
+ "activityBarBadge.foreground": "#e7e7e7",
10
+ "commandCenter.border": "#15202b99",
11
+ "sash.hoverBorder": "#77a8ff",
12
+ "statusBar.background": "#4488ff",
13
+ "statusBar.foreground": "#15202b",
14
+ "statusBarItem.hoverBackground": "#1168ff",
15
+ "statusBarItem.remoteBackground": "#4488ff",
16
+ "statusBarItem.remoteForeground": "#15202b",
17
+ "titleBar.activeBackground": "#4488ff",
18
+ "titleBar.activeForeground": "#15202b",
19
+ "titleBar.inactiveBackground": "#4488ff99",
20
+ "titleBar.inactiveForeground": "#15202b99"
21
+ },
22
+ "peacock.color": "4488ff"
23
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "version": "2.0.0",
3
+ "tasks": [
4
+ {
5
+ "label": "tsc: watch",
6
+ "type": "shell",
7
+ "command": "tsc",
8
+ "args": ["--watch"],
9
+ "runOptions": {
10
+ "runOn": "folderOpen"
11
+ },
12
+ "problemMatcher": "$tsc-watch",
13
+ "isBackground": true,
14
+ "group": {
15
+ "kind": "build",
16
+ "isDefault": true
17
+ }
18
+ }
19
+ ]
20
+ }
package/checkaddress.js CHANGED
@@ -1,130 +1,137 @@
1
1
  // From y:\dev\homecontrol\Others\LifX\Apps\lzlan\lants-address.ts
2
- export {};
2
+ // import { isIPv6 } from 'net';
3
+ import os, { networkInterfaces } from 'os';
3
4
  // Quck hack - using namespace to hid this until we debug and integrate it for v6 support
4
- // namespace hidden {
5
- // type netinfo = os.NetworkInterfaceInfo & { ints: { address: number, mask: number } }
6
- // const NetworkInterfaces: netinfo[] = []; // Need to fix this signature
7
- // export function assureNetworkInterfaces() {
8
- // // Note we don't detect changes to the interfaces
9
- // if (networkInterfaces.length > 0) return;
10
- // const netifs = os.networkInterfaces();
11
- // for (const dev in netifs) {
12
- // netifs[dev].forEach((info) => {
13
- // let family = info.family;
14
- // if (typeof family == "number")
15
- // family = `IPv${family}`; // Strange change work-around
16
- // if (family !== 'IPv4' || info.internal === true) {
17
- // return;
18
- // }
19
- // // let info4 = info as os.NetworkInterfaceInfoIPv4;
20
- // // (<any>info)['broadcast'] = _getBroadcastAddress(info4);
21
- // const mask = ipToUnsignedInt(info.netmask);
22
- // const address = ipToUnsignedInt(info.address) & mask;
23
- // const ni = { ...info, ints: { mask, address } };
24
- // NetworkInterfaces.push(ni);
25
- // })
26
- // }
27
- // return NetworkInterfaces;
28
- // };
29
- // export function isLocalIp4Address(ip4Address: string) {
30
- // if (ip4Address == '127.0.0.1')
31
- // return true;
32
- // const ipa = ipToUnsignedInt(ip4Address);
33
- // assureNetworkInterfaces();
34
- // return NetworkInterfaces.some((ni) => (ni.ints.address & ni.ints.mask) === (ipa & ni.ints.mask));
35
- // }
36
- // function ipToUnsignedInt(ipAddress: string): number {
37
- // const parts = ipAddress.split('.');
38
- // if (parts.length !== 4) {
39
- // throw new Error('Invalid IP address format');
40
- // }
41
- // const num = parts.map((part) => parseInt(part, 10));
42
- // if (num.some((part) => isNaN(part) || part < 0 || part > 255)) {
43
- // throw new Error(`Invalid IP address ${ipAddress}`);
44
- // }
45
- // const signed = (num[0] << 24) + (num[1] << 16) + (num[2] << 8) + num[3];
46
- // const unsigned = signed >>> 0;
47
- // return unsigned;
48
- // }
49
- // let pretendRemote = false;
50
- // export function isLocalIpAddress(ipAddress: string) {
51
- // // '::ffff:172.20.3.39'
52
- // if (pretendRemote) return false;
53
- // ipAddress = ipAddress.toLowerCase(); // Safety
54
- // if (ipAddress.startsWith('fe80:'))
55
- // return true; // Link local
56
- // if (ipAddress == "::1")
57
- // return true;
58
- // ipAddress = ipAddress.replace(/^::ffff:/, ''); // If it's like V5
59
- // if (/^[0-9.]+$/.test(ipAddress))
60
- // return isLocalIp4Address(ipAddress)
61
- // return isIPv6LocalAddress(ipAddress);
62
- // // const localIps = getLocalAddresses();
63
- // // for (const localIp of localIps) {
64
- // // const range = new AddressInfo(localIp);
65
- // // if (range.family === 'IPv4' && net.isIPv4(ipAddress)) {
66
- // // if (range.address === ipAddress) {
67
- // // return true;
68
- // // }
69
- // // } else if (range.family === 'IPv6' && net.isIPv6(ipAddress)) {
70
- // // if (range.address === ipAddress) {
71
- // // return true;
72
- // // }
73
- // // }
74
- // // }
75
- // return false;
76
- // }
77
- // // function isIPv6LocalAddress(ipv6Address: string): boolean {
78
- // // const interfaces = networkInterfaces();
79
- // // for (const interfaceName of Object.keys(interfaces)) {
80
- // // const addresses = interfaces[interfaceName].filter(
81
- // // (iface) => iface.family === 'IPv6'
82
- // // );
83
- // // for (const iface of addresses) {
84
- // // if (iface.address === ipv6Address) {
85
- // // return true;
86
- // // }
87
- // // }
88
- // // }
89
- // // return false;
90
- // // }
91
- // function isIPv6LocalAddress(ipv6Address: string): boolean {
92
- // const interfaces = networkInterfaces();
93
- // for (const interfaceName of Object.keys(interfaces)) {
94
- // const addresses = interfaces[interfaceName].filter((iface) => iface.family === 'IPv6');
95
- // for (const iface of addresses) {
96
- // if (iface.cidr) {
97
- // const [ifaceAddress, networkMask] = iface.cidr.split('/');
98
- // if (isSameNetwork(ipv6Address, networkMask, ifaceAddress)) {
99
- // return true;
100
- // }
101
- // }
102
- // }
103
- // }
104
- // return false;
105
- // }
106
- // function isSameNetwork(ipv6Address: string, networkMaskLength: string, ifaceAddress: string): boolean {
107
- // const maskLength = parseInt(networkMaskLength, 10);
108
- // const bufferLength = Math.ceil(maskLength / 8);
109
- // const addressBuffer = Buffer.from(ipv6Address.split(':').map((part) => parseInt(part, 16)));
110
- // const ifaceBuffer = Buffer.from(ifaceAddress.split(':').map((part) => parseInt(part, 16)));
111
- // for (let i = 0; i < bufferLength; i++) {
112
- // const maskBits = Math.min(maskLength - i * 8, 8);
113
- // const mask = (0xff00 >> maskBits) & 0xff;
114
- // if ((addressBuffer[i] & mask) !== ifaceBuffer[i]) {
115
- // return false;
116
- // }
117
- // }
118
- // return true;
119
- // }
120
- // // Example usage
121
- // // const ipv6AddressToCheck = 'fdb7:3df3:9615:193e:3743:1a24:69e8:127a';
122
- // // const isLocalAddress = isIPv6LocalAddress(ipv6AddressToCheck);
123
- // // console.log(`Is IPv6 Address ${ipv6AddressToCheck} on the same local network? ${isLocalAddress}`);
124
- // // // Example usage
125
- // // const ipv6AddressToCheck = 'fdb7:3df3:9615:193e:3743:1a24:69e8:127a';
126
- // // const networkMask = 'ffff:ffff:ffff:ffff::'; // Replace with the actual subnet mask
127
- // // const isLocalAddress = isIPv6LocalAddress(ipv6AddressToCheck, networkMask);
128
- // // console.log(`Is IPv6 Address ${ipv6AddressToCheck} on the same local network? ${isLocalAddress}`);
129
- // }
5
+ var hidden;
6
+ (function (hidden) {
7
+ const NetworkInterfaces = []; // Need to fix this signature
8
+ function assureNetworkInterfaces() {
9
+ // Note we don't detect changes to the interfaces
10
+ if (networkInterfaces.length > 0)
11
+ return;
12
+ const netifs = os.networkInterfaces();
13
+ for (const dev in netifs) {
14
+ netifs[dev].forEach((info) => {
15
+ let family = info.family;
16
+ if (typeof family == "number")
17
+ family = `IPv${family}`; // Strange change work-around
18
+ if (family !== 'IPv4' || info.internal === true) {
19
+ return;
20
+ }
21
+ // let info4 = info as os.NetworkInterfaceInfoIPv4;
22
+ // (<any>info)['broadcast'] = _getBroadcastAddress(info4);
23
+ const mask = ipToUnsignedInt(info.netmask);
24
+ const address = ipToUnsignedInt(info.address) & mask;
25
+ const ni = { ...info, ints: { mask, address } };
26
+ NetworkInterfaces.push(ni);
27
+ });
28
+ }
29
+ return NetworkInterfaces;
30
+ }
31
+ hidden.assureNetworkInterfaces = assureNetworkInterfaces;
32
+ ;
33
+ function isLocalIp4Address(ip4Address) {
34
+ if (ip4Address == '127.0.0.1')
35
+ return true;
36
+ const ipa = ipToUnsignedInt(ip4Address);
37
+ assureNetworkInterfaces();
38
+ return NetworkInterfaces.some((ni) => (ni.ints.address & ni.ints.mask) === (ipa & ni.ints.mask));
39
+ }
40
+ hidden.isLocalIp4Address = isLocalIp4Address;
41
+ function ipToUnsignedInt(ipAddress) {
42
+ const parts = ipAddress.split('.');
43
+ if (parts.length !== 4) {
44
+ throw new Error('Invalid IP address format');
45
+ }
46
+ const num = parts.map((part) => parseInt(part, 10));
47
+ if (num.some((part) => isNaN(part) || part < 0 || part > 255)) {
48
+ throw new Error(`Invalid IP address ${ipAddress}`);
49
+ }
50
+ const signed = (num[0] << 24) + (num[1] << 16) + (num[2] << 8) + num[3];
51
+ const unsigned = signed >>> 0;
52
+ return unsigned;
53
+ }
54
+ let pretendRemote = false;
55
+ function isLocalIpAddress(ipAddress) {
56
+ // '::ffff:172.20.3.39'
57
+ if (pretendRemote)
58
+ return false;
59
+ ipAddress = ipAddress.toLowerCase(); // Safety
60
+ if (ipAddress.startsWith('fe80:'))
61
+ return true; // Link local
62
+ if (ipAddress == "::1")
63
+ return true;
64
+ ipAddress = ipAddress.replace(/^::ffff:/, ''); // If it's like V5
65
+ if (/^[0-9.]+$/.test(ipAddress))
66
+ return isLocalIp4Address(ipAddress);
67
+ return isIPv6LocalAddress(ipAddress);
68
+ // const localIps = getLocalAddresses();
69
+ // for (const localIp of localIps) {
70
+ // const range = new AddressInfo(localIp);
71
+ // if (range.family === 'IPv4' && net.isIPv4(ipAddress)) {
72
+ // if (range.address === ipAddress) {
73
+ // return true;
74
+ // }
75
+ // } else if (range.family === 'IPv6' && net.isIPv6(ipAddress)) {
76
+ // if (range.address === ipAddress) {
77
+ // return true;
78
+ // }
79
+ // }
80
+ // }
81
+ return false;
82
+ }
83
+ hidden.isLocalIpAddress = isLocalIpAddress;
84
+ // function isIPv6LocalAddress(ipv6Address: string): boolean {
85
+ // const interfaces = networkInterfaces();
86
+ // for (const interfaceName of Object.keys(interfaces)) {
87
+ // const addresses = interfaces[interfaceName].filter(
88
+ // (iface) => iface.family === 'IPv6'
89
+ // );
90
+ // for (const iface of addresses) {
91
+ // if (iface.address === ipv6Address) {
92
+ // return true;
93
+ // }
94
+ // }
95
+ // }
96
+ // return false;
97
+ // }
98
+ function isIPv6LocalAddress(ipv6Address) {
99
+ const interfaces = networkInterfaces();
100
+ for (const interfaceName of Object.keys(interfaces)) {
101
+ const addresses = interfaces[interfaceName].filter((iface) => iface.family === 'IPv6');
102
+ for (const iface of addresses) {
103
+ if (iface.cidr) {
104
+ const [ifaceAddress, networkMask] = iface.cidr.split('/');
105
+ if (isSameNetwork(ipv6Address, networkMask, ifaceAddress)) {
106
+ return true;
107
+ }
108
+ }
109
+ }
110
+ }
111
+ return false;
112
+ }
113
+ function isSameNetwork(ipv6Address, networkMaskLength, ifaceAddress) {
114
+ const maskLength = parseInt(networkMaskLength, 10);
115
+ const bufferLength = Math.ceil(maskLength / 8);
116
+ const addressBuffer = Buffer.from(ipv6Address.split(':').map((part) => parseInt(part, 16)));
117
+ const ifaceBuffer = Buffer.from(ifaceAddress.split(':').map((part) => parseInt(part, 16)));
118
+ for (let i = 0; i < bufferLength; i++) {
119
+ const maskBits = Math.min(maskLength - i * 8, 8);
120
+ const mask = (0xff00 >> maskBits) & 0xff;
121
+ if ((addressBuffer[i] & mask) !== ifaceBuffer[i]) {
122
+ return false;
123
+ }
124
+ }
125
+ return true;
126
+ }
127
+ // Example usage
128
+ // const ipv6AddressToCheck = 'fdb7:3df3:9615:193e:3743:1a24:69e8:127a';
129
+ // const isLocalAddress = isIPv6LocalAddress(ipv6AddressToCheck);
130
+ // console.log(`Is IPv6 Address ${ipv6AddressToCheck} on the same local network? ${isLocalAddress}`);
131
+ // // Example usage
132
+ // const ipv6AddressToCheck = 'fdb7:3df3:9615:193e:3743:1a24:69e8:127a';
133
+ // const networkMask = 'ffff:ffff:ffff:ffff::'; // Replace with the actual subnet mask
134
+ // const isLocalAddress = isIPv6LocalAddress(ipv6AddressToCheck, networkMask);
135
+ // console.log(`Is IPv6 Address ${ipv6AddressToCheck} on the same local network? ${isLocalAddress}`);
136
+ })(hidden || (hidden = {}));
130
137
  //# sourceMappingURL=checkaddress.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"checkaddress.js","sourceRoot":"","sources":["checkaddress.ts"],"names":[],"mappings":"AAAA,kEAAkE;;AAKlE,yFAAyF;AACzF,qBAAqB;AACrB,2FAA2F;AAE3F,6EAA6E;AAE7E,kDAAkD;AAClD,4DAA4D;AAC5D,oDAAoD;AAEpD,iDAAiD;AACjD,sCAAsC;AACtC,8CAA8C;AAE9C,4CAA4C;AAE5C,iDAAiD;AACjD,6EAA6E;AAE7E,qEAAqE;AACrE,8BAA8B;AAC9B,oBAAoB;AACpB,sEAAsE;AACtE,6EAA6E;AAE7E,8DAA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AC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;QAC5F,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;QAE3F,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,YAAY,EAAE,CAAC,EAAE,EAAE,CAAC;YACpC,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,UAAU,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;YACjD,MAAM,IAAI,GAAG,CAAC,MAAM,IAAI,QAAQ,CAAC,GAAG,IAAI,CAAC;YACzC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC;gBAC/C,OAAO,KAAK,CAAC;YACjB,CAAC;QACL,CAAC;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,gBAAgB;IAChB,wEAAwE;IACxE,iEAAiE;IACjE,qGAAqG;IAGrG,mBAAmB;IACnB,wEAAwE;IACxE,sFAAsF;IACtF,8EAA8E;IAC9E,qGAAqG;AACzG,CAAC,EAvJS,MAAM,KAAN,MAAM,QAuJf"}
@@ -0,0 +1,158 @@
1
+ // From y:\dev\homecontrol\Others\LifX\Apps\lzlan\lants-address.ts
2
+
3
+ // import { isIPv6 } from 'net';
4
+ import os, { networkInterfaces } from 'os';
5
+
6
+ // Quck hack - using namespace to hid this until we debug and integrate it for v6 support
7
+ namespace hidden {
8
+ type netinfo = os.NetworkInterfaceInfo & { ints: { address: number, mask: number } }
9
+
10
+ const NetworkInterfaces: netinfo[] = []; // Need to fix this signature
11
+
12
+ export function assureNetworkInterfaces() {
13
+ // Note we don't detect changes to the interfaces
14
+ if (networkInterfaces.length > 0) return;
15
+
16
+ const netifs = os.networkInterfaces();
17
+ for (const dev in netifs) {
18
+ netifs[dev].forEach((info) => {
19
+
20
+ let family = info.family;
21
+
22
+ if (typeof family == "number")
23
+ family = `IPv${family}`; // Strange change work-around
24
+
25
+ if (family !== 'IPv4' || info.internal === true) {
26
+ return;
27
+ }
28
+ // let info4 = info as os.NetworkInterfaceInfoIPv4;
29
+ // (<any>info)['broadcast'] = _getBroadcastAddress(info4);
30
+
31
+ const mask = ipToUnsignedInt(info.netmask);
32
+ const address = ipToUnsignedInt(info.address) & mask;
33
+ const ni = { ...info, ints: { mask, address } };
34
+ NetworkInterfaces.push(ni);
35
+ })
36
+ }
37
+ return NetworkInterfaces;
38
+ };
39
+
40
+ export function isLocalIp4Address(ip4Address: string) {
41
+ if (ip4Address == '127.0.0.1')
42
+ return true;
43
+ const ipa = ipToUnsignedInt(ip4Address);
44
+ assureNetworkInterfaces();
45
+ return NetworkInterfaces.some((ni) => (ni.ints.address & ni.ints.mask) === (ipa & ni.ints.mask));
46
+ }
47
+
48
+ function ipToUnsignedInt(ipAddress: string): number {
49
+ const parts = ipAddress.split('.');
50
+ if (parts.length !== 4) {
51
+ throw new Error('Invalid IP address format');
52
+ }
53
+
54
+ const num = parts.map((part) => parseInt(part, 10));
55
+ if (num.some((part) => isNaN(part) || part < 0 || part > 255)) {
56
+ throw new Error(`Invalid IP address ${ipAddress}`);
57
+ }
58
+
59
+ const signed = (num[0] << 24) + (num[1] << 16) + (num[2] << 8) + num[3];
60
+ const unsigned = signed >>> 0;
61
+ return unsigned;
62
+ }
63
+
64
+ let pretendRemote = false;
65
+
66
+ export function isLocalIpAddress(ipAddress: string) {
67
+ // '::ffff:172.20.3.39'
68
+ if (pretendRemote) return false;
69
+ ipAddress = ipAddress.toLowerCase(); // Safety
70
+ if (ipAddress.startsWith('fe80:'))
71
+ return true; // Link local
72
+ if (ipAddress == "::1")
73
+ return true;
74
+ ipAddress = ipAddress.replace(/^::ffff:/, ''); // If it's like V5
75
+
76
+ if (/^[0-9.]+$/.test(ipAddress))
77
+ return isLocalIp4Address(ipAddress)
78
+ return isIPv6LocalAddress(ipAddress);
79
+
80
+
81
+ // const localIps = getLocalAddresses();
82
+
83
+ // for (const localIp of localIps) {
84
+ // const range = new AddressInfo(localIp);
85
+
86
+ // if (range.family === 'IPv4' && net.isIPv4(ipAddress)) {
87
+ // if (range.address === ipAddress) {
88
+ // return true;
89
+ // }
90
+ // } else if (range.family === 'IPv6' && net.isIPv6(ipAddress)) {
91
+ // if (range.address === ipAddress) {
92
+ // return true;
93
+ // }
94
+ // }
95
+ // }
96
+
97
+ return false;
98
+ }
99
+
100
+ // function isIPv6LocalAddress(ipv6Address: string): boolean {
101
+ // const interfaces = networkInterfaces();
102
+ // for (const interfaceName of Object.keys(interfaces)) {
103
+ // const addresses = interfaces[interfaceName].filter(
104
+ // (iface) => iface.family === 'IPv6'
105
+ // );
106
+ // for (const iface of addresses) {
107
+ // if (iface.address === ipv6Address) {
108
+ // return true;
109
+ // }
110
+ // }
111
+ // }
112
+ // return false;
113
+ // }
114
+
115
+ function isIPv6LocalAddress(ipv6Address: string): boolean {
116
+ const interfaces = networkInterfaces();
117
+ for (const interfaceName of Object.keys(interfaces)) {
118
+ const addresses = interfaces[interfaceName].filter((iface) => iface.family === 'IPv6');
119
+ for (const iface of addresses) {
120
+ if (iface.cidr) {
121
+ const [ifaceAddress, networkMask] = iface.cidr.split('/');
122
+ if (isSameNetwork(ipv6Address, networkMask, ifaceAddress)) {
123
+ return true;
124
+ }
125
+ }
126
+ }
127
+ }
128
+ return false;
129
+ }
130
+
131
+ function isSameNetwork(ipv6Address: string, networkMaskLength: string, ifaceAddress: string): boolean {
132
+ const maskLength = parseInt(networkMaskLength, 10);
133
+ const bufferLength = Math.ceil(maskLength / 8);
134
+ const addressBuffer = Buffer.from(ipv6Address.split(':').map((part) => parseInt(part, 16)));
135
+ const ifaceBuffer = Buffer.from(ifaceAddress.split(':').map((part) => parseInt(part, 16)));
136
+
137
+ for (let i = 0; i < bufferLength; i++) {
138
+ const maskBits = Math.min(maskLength - i * 8, 8);
139
+ const mask = (0xff00 >> maskBits) & 0xff;
140
+ if ((addressBuffer[i] & mask) !== ifaceBuffer[i]) {
141
+ return false;
142
+ }
143
+ }
144
+ return true;
145
+ }
146
+
147
+ // Example usage
148
+ // const ipv6AddressToCheck = 'fdb7:3df3:9615:193e:3743:1a24:69e8:127a';
149
+ // const isLocalAddress = isIPv6LocalAddress(ipv6AddressToCheck);
150
+ // console.log(`Is IPv6 Address ${ipv6AddressToCheck} on the same local network? ${isLocalAddress}`);
151
+
152
+
153
+ // // Example usage
154
+ // const ipv6AddressToCheck = 'fdb7:3df3:9615:193e:3743:1a24:69e8:127a';
155
+ // const networkMask = 'ffff:ffff:ffff:ffff::'; // Replace with the actual subnet mask
156
+ // const isLocalAddress = isIPv6LocalAddress(ipv6AddressToCheck, networkMask);
157
+ // console.log(`Is IPv6 Address ${ipv6AddressToCheck} on the same local network? ${isLocalAddress}`);
158
+ }
package/dnsassist.ts ADDED
@@ -0,0 +1,113 @@
1
+ import dns from 'dns';
2
+ import os from 'os'
3
+
4
+ /***
5
+ * return IPv4 address giving local addresses priority
6
+ */
7
+
8
+ export const default_fqdn = 'aaz.lt'; // For now
9
+
10
+ export async function resolve4(name: string, local?: boolean): Promise<string> {
11
+ if (!name?.includes('.')) name += '.' + default_fqdn; // FQDN Hack
12
+
13
+ return new Promise((resolve, reject) => dns.resolve4(name,
14
+ (err: any, ips) => {
15
+ if (err)
16
+ return resolve(null);
17
+
18
+ const locals = ips.filter(ip => isLocalIP(ip));
19
+ if (locals.length > 0)
20
+ return resolve(locals[0]);
21
+ if (local)
22
+ return resolve(null);
23
+
24
+ resolve(ips[0]);
25
+ }
26
+ ));
27
+ }
28
+
29
+ export async function resolveLocal4(name: string): Promise<string> {
30
+ return await resolve4(name, true);
31
+ }
32
+
33
+ // #region Local IP address
34
+
35
+ interface localIPAndMask { ipn: number, mask: number, s: { ip: string, mask: string } };
36
+ export let localIPAndMasks: localIPAndMask[] = null;
37
+
38
+ function ipv4ToInt(ip: string): number {
39
+ ip = ip.replace('::ffff:', ''); // Convert IPv4-mapped IPv6 addresses to their IPv4 representation
40
+ const octets = ip.split(".").map(o => parseInt(o));
41
+ // let z8 = octets.reduce((acc, octet) => (acc << 8) + octet);
42
+ let x8 = arrayToUint32(octets.reverse());
43
+ return x8;
44
+ }
45
+
46
+ function arrayToUint32(arr: number[]): number {
47
+ const uint8Arr = Uint8Array.from(arr);
48
+ const uint32Arr = new Uint32Array(uint8Arr.buffer);
49
+ return uint32Arr[0];
50
+ }
51
+
52
+ function assureLocalV4Address() {
53
+ // 2023-12-18 removed caching so we can change it on the fly
54
+ // if (localIPAndMasks)
55
+ // return localIPAndMasks;
56
+ localIPAndMasks = [];
57
+ const interfaces = os.networkInterfaces();
58
+
59
+ for (const name of Object.keys(interfaces)) {
60
+ for (const netinterface of interfaces[name]) {
61
+ if (netinterface.family !== 'IPv4') continue;
62
+ if (netinterface.internal) continue;
63
+ const mask = ipv4ToInt(netinterface.netmask);
64
+ const ipn = ipv4ToInt(netinterface.address) & mask;
65
+ localIPAndMasks.push({ ipn, mask, s: { ip: netinterface.address, mask: netinterface.netmask } });
66
+ }
67
+ }
68
+ return localIPAndMasks;
69
+ }
70
+
71
+ export function isLocalIP(ip: string) {
72
+ if (isThisMachine(ip))
73
+ return true; // It handles special cases better
74
+ const ipn = ipv4ToInt(ip);
75
+ for (var ipm of assureLocalV4Address()) {
76
+ if ((ipn & ipm.mask) === ipm.ipn) return true;
77
+ }
78
+ return false;
79
+ }
80
+
81
+ // // Function to get all IP addresses of the local machine, both IPv4 and IPv6
82
+ // const getLocalIPs = (): string[] => {
83
+ // const interfaces = os.networkInterfaces();
84
+ // const ips: string[] = [];
85
+
86
+ // for (const interfaceName in interfaces) {
87
+ // const iface = interfaces[interfaceName];
88
+ // if (iface) {P
89
+ // for (const alias of iface) {
90
+ // if ((alias.family === 'IPv4' || alias.family === 'IPv6') && !alias.internal) {
91
+ // // Store IPv4 addresses directly and IPv6 addresses in their full representation
92
+ // ips.push(alias.family === 'IPv4' ? alias.address : `::ffff:${alias.address}`);
93
+ // }
94
+ // }
95
+ // }
96
+ // }
97
+
98
+ // return ips;
99
+ // };
100
+
101
+ // Function to check if the IP address is from this machine
102
+ export function isThisMachine(ip: string) {
103
+ // Convert IPv4-mapped IPv6 addresses to their IPv4 representation
104
+ ip = ip.replace('::ffff:', '');
105
+
106
+ // Handling the case where IP is ::1 (localhost in IPv6)
107
+ if (ip === '::1' || ip == '127.0.0.1') {
108
+ return true;
109
+ }
110
+
111
+ const localIPs = assureLocalV4Address().map(ipm => ipm.s.ip);
112
+ return localIPs.includes(ip);
113
+ };
package/index.js CHANGED
@@ -1,11 +1,10 @@
1
1
  import { resolve4, resolveLocal4, isLocalIP, isThisMachine, default_fqdn } from './dnsassist.js';
2
2
  import { ports, mqtt } from './ports.js';
3
3
  import { jprivs } from './jserve.js';
4
- // Misc values
4
+ export { resolve4, resolveLocal4, isLocalIP, isThisMachine, default_fqdn, ports, mqtt, jprivs };
5
5
  export const values = {
6
- exitRunit: 99
6
+ exitRunit: 99,
7
7
  };
8
- export { resolve4, resolveLocal4, isLocalIP, isThisMachine, default_fqdn, ports, mqtt, jprivs };
9
8
  export default {
10
9
  resolve4,
11
10
  resolveLocal4,
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,SAAS,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAChG,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAExC,OAAO,EAAuB,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1D,cAAc;AAEd,MAAM,CAAC,MAAM,MAAM,GAAG;IAClB,SAAS,EAAE,EAAE;CAChB,CAAA;AAED,OAAO,EACH,QAAQ,EAAE,aAAa,EAAE,SAAS,EAAE,aAAa,EAAE,YAAY,EAC/D,KAAK,EAAE,IAAI,EAAE,MAAM,EACtB,CAAC;AAIF,eAAe;IACX,QAAQ;IACR,aAAa;IACb,SAAS;IACT,aAAa;IACb,YAAY;IACZ,KAAK;IACL,IAAI;IACJ,MAAM;IACN,MAAM;CACT,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,SAAS,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAChG,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAExC,OAAO,EAAuB,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1D,OAAO,EACH,QAAQ,EAAE,aAAa,EAAE,SAAS,EAAE,aAAa,EAAE,YAAY,EAC/D,KAAK,EAAE,IAAI,EAAqC,MAAM,EACzD,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAAG;IAClB,SAAS,EAAE,EAAE;CAChB,CAAA;AAED,eAAe;IACX,QAAQ;IACR,aAAa;IACb,SAAS;IACT,aAAa;IACb,YAAY;IACZ,KAAK;IACL,IAAI;IACJ,MAAM;IACN,MAAM;CACT,CAAA"}
package/index.ts ADDED
@@ -0,0 +1,25 @@
1
+ import { resolve4, resolveLocal4, isLocalIP, isThisMachine, default_fqdn } from './dnsassist.js'
2
+ import { ports, mqtt } from './ports.js'
3
+ import { makerPayload } from './maker.js';
4
+ import { jSubSiteInfo, jpriv, jprivs } from './jserve.js';
5
+
6
+ export {
7
+ resolve4, resolveLocal4, isLocalIP, isThisMachine, default_fqdn,
8
+ ports, mqtt, makerPayload, jSubSiteInfo, jpriv, jprivs
9
+ };
10
+
11
+ export const values = {
12
+ exitRunit: 99,
13
+ }
14
+
15
+ export default {
16
+ resolve4,
17
+ resolveLocal4,
18
+ isLocalIP,
19
+ isThisMachine,
20
+ default_fqdn,
21
+ ports,
22
+ mqtt,
23
+ jprivs,
24
+ values
25
+ }
package/jserve.ts ADDED
@@ -0,0 +1,25 @@
1
+ // Support for connecting with jserve
2
+
3
+ // This can be passed via the default value or, better, via the JExport
4
+
5
+ // Note that a client entry is
6
+ // name or pfx:name so you can say "ui:useful"
7
+ // * means deafult so you can /subpapp rather than /subapp/name
8
+
9
+ export const jprivs = [
10
+ "admin", // Uber privilege
11
+ "user", // Normal user
12
+ "guest", // Low privilege guest
13
+ "home", // Home control
14
+ "bbs"]; // bbs (bbt) app
15
+ export type jpriv = typeof jprivs[number];
16
+
17
+ // export type jpriv = "admin" | "user" | "guest";
18
+
19
+ export interface jSubSiteInfo {
20
+ app: object; // Express -- so we don't nee the Express definition in miscassists
21
+ AppInit?: () => Promise<void>
22
+ subClients?: string[]; // Dirname or path to html file
23
+ privs?: jpriv[];
24
+ localLogin?: boolean; // If true, use local login. Allow remember?
25
+ }
package/maker.ts ADDED
@@ -0,0 +1,14 @@
1
+ // Support for Hubitat and Devqtt
2
+
3
+
4
+ export interface makerPayload {
5
+ content: {
6
+ name: string,
7
+ value: string,
8
+ displayName: string,
9
+ deviceId: string,
10
+ descriptionText: string,
11
+ unit: object,
12
+ data: object
13
+ }
14
+ }
package/package.json CHANGED
@@ -1,35 +1,25 @@
1
1
  {
2
2
  "name": "@bobfrankston/miscassists",
3
- "version": "1.0.39",
4
- "description": "Miscellaneous Node.js utilities",
3
+ "version": "1.0.41",
4
+ "description": "",
5
5
  "main": "index.js",
6
- "types": "index.d.ts",
6
+ "module": "main.js",
7
7
  "scripts": {
8
8
  "test": "echo \"Error: no test specified\" && exit 1",
9
- "release": "tsc && git add -A && git diff-index --quiet HEAD || git commit -m \"Pre-release changes\" && npm version patch -m \"Release %s\" && git push && git push --tags && sleep 5 && npm publish --loglevel=error"
9
+ "build": "tsc",
10
+ "prerelease:local": "git add -A && (git diff-index --quiet HEAD || git commit -m \"Pre-release commit\")",
11
+ "preversion": "npm run build && git add -A",
12
+ "postversion": "git push && git push --tags",
13
+ "release": "npm run prerelease:local && npm version patch && npm publish"
10
14
  },
11
- "publishConfig": {
12
- "access": "public"
13
- },
14
- "keywords": [
15
- "misc",
16
- "constants"
17
- ],
18
- "author": "Bob Frankston",
15
+ "keywords": [],
16
+ "author": "",
19
17
  "license": "ISC",
20
18
  "type": "module",
21
19
  "dependencies": {
22
20
  "esm": "^3.2.25"
23
21
  },
24
22
  "devDependencies": {
25
- "@types/node": "^25.0.6"
26
- },
27
- "repository": {
28
- "type": "git",
29
- "url": "git+https://github.com/BobFrankston/miscassists.git"
30
- },
31
- "bugs": {
32
- "url": "https://github.com/BobFrankston/miscassists/issues"
33
- },
34
- "homepage": "https://github.com/BobFrankston/miscassists#readme"
23
+ "@types/node": "^20.12.7"
24
+ }
35
25
  }
package/ports.js CHANGED
@@ -14,12 +14,10 @@ export const ports = {
14
14
  jvport: 9180, // These are copied in hlib
15
15
  jvports: 9143,
16
16
  sqltcp: 9098,
17
- sqldbg: 9096,
18
17
  sqlhttp: 9099, // For now
19
18
  sqlproxy2: 9097, // Replace sqlproxy and share a port for http/https
20
19
  sqlproxy: 9080,
21
20
  sqlproxys: 9043,
22
- pinst: 9299, // Used for my pings server [currently it has a local value because --install-links isn't cooperating]
23
21
  mlplanel: 9300, // Note: This must jibe with mlpanel since we copy it to another system
24
22
  mlpanels: 9301,
25
23
  wizzer: 9310, // Work in progress Wiz control. Internal only so not https for now
@@ -32,17 +30,9 @@ export const ports = {
32
30
  syncer: 9317,
33
31
  lifxer: 9318,
34
32
  itemw: 9319,
33
+ pinst: 9299, // Used for my pings server [currently it has a local value because --install-links isn't cooperating]
35
34
  stephanie: 9320, // For testing stephanie site locally
36
- asyncer: 9321,
37
- // 9322 is used by Windows
38
- psyncer: 9324, // Used for the powershell version
39
- rmfAlpha2: 9325, // So we can try alternative clients.
40
- gcard: 9326,
41
- oauth: 9326, // Same as gcard because sahred
42
- logit: 9328,
43
- carder: 9329,
44
- cardaid: 9330,
45
- httpUDP: 9331, // HTTP UDP server
35
+ httpudp: 9321
46
36
  };
47
37
  const mqttHost = "pi4c";
48
38
  const mqttPort = 1883;
package/ports.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"ports.js","sourceRoot":"","sources":["ports.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,MAAM,CAAC,MAAM,KAAK,GAAG;IACjB,OAAO,EAAG,KAAK;IACf,QAAQ,EAAE,KAAK,EAAS,mDAAmD;IAE3E,SAAS,EAAE,IAAI,EAAS,+BAA+B;IACvD,QAAQ,EAAE,IAAI,EAAU,sCAAsC;IAE9D,OAAO,EAAE,IAAI,EAAW,+CAA+C;IACvE,QAAQ,EAAE,IAAI,EAAU,oDAAoD;IAE5E,OAAO,EAAE,IAAI,EAAW,oDAAoD;IAC5E,OAAO,EAAE,IAAI,EAAW,8CAA8C;IACtE,QAAQ,EAAE,IAAI,EAAU,uCAAuC;IAE/D,IAAI,EAAE,IAAI,EAAc,0CAA0C;IAClE,KAAK,EAAE,IAAI,EAAa,GAAG;IAE3B,MAAM,EAAE,IAAI,EAAY,2BAA2B;IACnD,OAAO,EAAE,IAAI;IAEb,MAAM,EAAE,IAAI;IACZ,MAAM,EAAE,IAAI;IACZ,OAAO,EAAE,IAAI,EAAW,UAAU;IAElC,SAAS,EAAE,IAAI,EAAS,mDAAmD;IAE3E,QAAQ,EAAE,IAAI;IACd,SAAS,EAAE,IAAI;IAEf,KAAK,EAAE,IAAI,EAAa,sGAAsG;IAE9H,QAAQ,EAAE,IAAI,EAAU,uEAAuE;IAC/F,QAAQ,EAAE,IAAI;IAEd,MAAM,EAAE,IAAI,EAAY,mEAAmE;IAE3F,MAAM,EAAE,IAAI,EAAY,eAAe;IACvC,MAAM,EAAE,IAAI,EAAY,wBAAwB;IAChD,SAAS,EAAE,IAAI;IAEf,GAAG,EAAE,IAAI,EAAe,0BAA0B;IAClD,MAAM,EAAE,IAAI;IACZ,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Q,GAAG,IAAI,CAAC;AAEtB,MAAM,CAAC,MAAM,IAAI,GAAG;IAChB,IAAI,EAAE,QAAQ;IACd,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE;QACH,GAAG,EAAE,KAAK;QACV,SAAS,EAAE;YACP,OAAO,EAAE,SAAS;SACrB;QACD,MAAM,EAAE;YACJ,GAAG,EAAE,KAAK;YACV,GAAG,EAAE,QAAQ;SAChB;KACJ;IACD,GAAG,EAAE,UAAU,QAAQ,IAAI,YAAY,IAAI,QAAQ,EAAE;CACxD,CAAA;AAED,iEAAiE;AACjE,2CAA2C;AAC3C,+DAA+D;AAC/D,uEAAuE;AACvE,4DAA4D;AAC5D,4CAA4C;AAC5C,2DAA2D;AAC3D,uCAAuC;AACvC,qDAAqD;AACrD,oDAAoD;AACpD,2DAA2D;AAC3D,6CAA6C;AAC7C,sCAAsC;AACtC,wDAAwD;AACxD,oDAAoD;AACpD,6DAA6D;AAC7D,uCAAuC;AACvC,yCAAyC;AACzC,uCAAuC;AACvC,8CAA8C;AAC9C,gDAAgD;AAChD,EAAE"}
package/ports.ts ADDED
@@ -0,0 +1,97 @@
1
+ import { default_fqdn } from "./dnsassist.js";
2
+
3
+ export const ports = {
4
+ jserve2: 10080,
5
+ jserve2s: 10443, // For now, we use the same port for http and https
6
+
7
+ devlisten: 9070, // Hubitat MakerAPI http server
8
+ halisten: 9071, // Home Assistant MakerAPI http server
9
+
10
+ rmfsite: 9081, // These will be phased out for the new version
11
+ rmfsites: 9082, // used to be for SSL but now any port is ssl or not
12
+
13
+ rmfprod: 9081, // Secondary port for production version (debugging)
14
+ rmfbeta: 9082, // Secondary port for beta version (debugging)
15
+ rmfalpha: 9083, // Secondary port for the alpha version
16
+
17
+ shim: 9084, // Warming -- these are current forwarded!
18
+ shims: 9085, //
19
+
20
+ jvport: 9180, // These are copied in hlib
21
+ jvports: 9143,
22
+
23
+ sqltcp: 9098,
24
+ sqlhttp: 9099, // For now
25
+
26
+ sqlproxy2: 9097, // Replace sqlproxy and share a port for http/https
27
+
28
+ sqlproxy: 9080,
29
+ sqlproxys: 9043,
30
+
31
+ mlplanel: 9300, // Note: This must jibe with mlpanel since we copy it to another system
32
+ mlpanels: 9301,
33
+
34
+ wizzer: 9310, // Work in progress Wiz control. Internal only so not https for now
35
+
36
+ pserve: 9311, // Photo server
37
+ vserve: 9312, // Video server from IIS
38
+ checkmake: 9313,
39
+
40
+ bbt: 9314, // Bulletin board test
41
+ backts: 9315,
42
+ backserve: 9316,
43
+
44
+ syncer: 9317,
45
+
46
+ lifxer: 9318,
47
+ itemw: 9319,
48
+
49
+ pinst: 9299, // Used for my pings server [currently it has a local value because --install-links isn't cooperating]
50
+
51
+ stephanie: 9320, // For testing stephanie site locally
52
+
53
+ httpudp: 9321
54
+
55
+ }
56
+
57
+ const mqttHost = "pi4c";
58
+ const mqttPort = 1883;
59
+
60
+ export const mqtt = {
61
+ host: mqttHost,
62
+ port: mqttPort,
63
+ topic: { // Default for our own use
64
+ rmf: "rmf",
65
+ subtopics: {
66
+ restart: "restart",
67
+ },
68
+ devqtt: {
69
+ top: "rmf",
70
+ sub: "devqtt"
71
+ }
72
+ },
73
+ URL: `mstt://${mqttHost}.${default_fqdn}:${mqttPort}`
74
+ }
75
+
76
+ // <port port="9070" name="Listen for Hubitat (experimental)" />
77
+ // <port port="9080" name="birdbox1:80" />
78
+ // <port port="9081" name="Home port for home.rmf.vc et al" />
79
+ // <port port="9082" name="Home port for home.rmf.vc et al for SSL" />
80
+ // <port port="9083" name="Web Sockets for home control" />
81
+ // <port port="9084" name="Insteon Shim" />
82
+ // <port port="9085" name="Insteon Shim SSL (reserved)" />
83
+ // <port port="9086" name="shimmer" />
84
+ // <port port="9087" name="shimmer SSL (not yet)" />
85
+ // <port port="9088" name="TCP For NodeSQLAssit" />
86
+ // <port port="9089" name="TCP Shelly Listener (HTLog)" />
87
+ // <port port="9389" name="Birdbox1:3389" />
88
+ // <port port="9920" name="HC XML" />
89
+ // <!-- <port port="9994" name="HC TCP Listener" /> -->
90
+ // <port port="9800-9899" name="HC TCP Listener" />
91
+ // <!-- <port port="9960-9969" name="HC TCP Listener" /> -->
92
+ // <port port="9995" name="HC xcmd" />
93
+ // <port port="9996" name="HC Manual" />
94
+ // <port port="9997" name="HC HTTP" />
95
+ // <port port="9970-9979" name="HC Telnet" />
96
+ // <port port="9901" name="Lightify Client1" />
97
+ //
package/tsconfig.json ADDED
@@ -0,0 +1,14 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "esnext",
4
+ "module": "esnext",
5
+ "moduleResolution": "node",
6
+ "sourceMap": true,
7
+ "esModuleInterop": true,
8
+ "forceConsistentCasingInFileNames": true,
9
+ "strict": true,
10
+ "strictNullChecks": false,
11
+ "skipLibCheck": true,
12
+ "newLine": "lf"
13
+ }
14
+ }
@@ -1,12 +0,0 @@
1
- {
2
- "permissions": {
3
- "allow": [
4
- "Bash(npx tsc)",
5
- "Bash(dir:*)",
6
- "Bash(npx tsc:*)",
7
- "Bash(git config:*)",
8
- "Bash(npm config set:*)",
9
- "Bash(git add:*)"
10
- ]
11
- }
12
- }
package/README.md DELETED
@@ -1,21 +0,0 @@
1
- # @bobfrankston/miscassists
2
-
3
- <!-- Reminder: See c:\users\bob\onedrive\documents\ai\programming.md -->
4
-
5
- Miscellaneous Node.js utilities including DNS helpers, port definitions, and server utilities.
6
-
7
- ## Installation
8
-
9
- ```bash
10
- npm install @bobfrankston/miscassists
11
- ```
12
-
13
- ## Usage
14
-
15
- ```javascript
16
- import { resolve4, isLocalIP, ports, jprivs, values} from '@bobfrankston/miscassists';
17
- ```
18
-
19
- ## License
20
-
21
- ISC
package/checkaddress.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=checkaddress.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"checkaddress.d.ts","sourceRoot":"","sources":["checkaddress.ts"],"names":[],"mappings":""}
package/dnsassist.d.ts DELETED
@@ -1,19 +0,0 @@
1
- /***
2
- * return IPv4 address giving local addresses priority
3
- */
4
- export declare const default_fqdn = "aaz.lt";
5
- export declare function resolve4(name: string, local?: boolean): Promise<string>;
6
- export declare function resolveLocal4(name: string): Promise<string>;
7
- interface localIPAndMask {
8
- ipn: number;
9
- mask: number;
10
- s: {
11
- ip: string;
12
- mask: string;
13
- };
14
- }
15
- export declare let localIPAndMasks: localIPAndMask[];
16
- export declare function isLocalIP(ip: string): boolean;
17
- export declare function isThisMachine(ip: string): boolean;
18
- export {};
19
- //# sourceMappingURL=dnsassist.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dnsassist.d.ts","sourceRoot":"","sources":["dnsassist.ts"],"names":[],"mappings":"AAGA;;GAEG;AAEH,eAAO,MAAM,YAAY,WAAW,CAAC;AAErC,wBAAsB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAiB7E;AAED,wBAAsB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAEjE;AAID,UAAU,cAAc;IAAG,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE;AACvF,eAAO,IAAI,eAAe,EAAE,cAAc,EAAS,CAAC;AAmCpD,wBAAgB,SAAS,CAAC,EAAE,EAAE,MAAM,WAQnC;AAuBD,wBAAgB,aAAa,CAAC,EAAE,EAAE,MAAM,WAWvC"}
package/index.d.ts DELETED
@@ -1,81 +0,0 @@
1
- import { resolve4, resolveLocal4, isLocalIP, isThisMachine, default_fqdn } from './dnsassist.js';
2
- import { ports, mqtt } from './ports.js';
3
- import { makerPayload } from './maker.js';
4
- import { jSubSiteInfo, jpriv, jprivs } from './jserve.js';
5
- export declare const values: {
6
- exitRunit: number;
7
- };
8
- export { resolve4, resolveLocal4, isLocalIP, isThisMachine, default_fqdn, ports, mqtt, jprivs };
9
- export type { makerPayload, jSubSiteInfo, jpriv };
10
- declare const _default: {
11
- resolve4: typeof resolve4;
12
- resolveLocal4: typeof resolveLocal4;
13
- isLocalIP: typeof isLocalIP;
14
- isThisMachine: typeof isThisMachine;
15
- default_fqdn: string;
16
- ports: {
17
- jserve2: number;
18
- jserve2s: number;
19
- devlisten: number;
20
- halisten: number;
21
- rmfsite: number;
22
- rmfsites: number;
23
- rmfprod: number;
24
- rmfbeta: number;
25
- rmfalpha: number;
26
- shim: number;
27
- shims: number;
28
- jvport: number;
29
- jvports: number;
30
- sqltcp: number;
31
- sqldbg: number;
32
- sqlhttp: number;
33
- sqlproxy2: number;
34
- sqlproxy: number;
35
- sqlproxys: number;
36
- pinst: number;
37
- mlplanel: number;
38
- mlpanels: number;
39
- wizzer: number;
40
- pserve: number;
41
- vserve: number;
42
- checkmake: number;
43
- bbt: number;
44
- backts: number;
45
- backserve: number;
46
- syncer: number;
47
- lifxer: number;
48
- itemw: number;
49
- stephanie: number;
50
- asyncer: number;
51
- psyncer: number;
52
- rmfAlpha2: number;
53
- gcard: number;
54
- oauth: number;
55
- logit: number;
56
- carder: number;
57
- cardaid: number;
58
- httpUDP: number;
59
- };
60
- mqtt: {
61
- host: string;
62
- port: number;
63
- topic: {
64
- rmf: string;
65
- subtopics: {
66
- restart: string;
67
- };
68
- devqtt: {
69
- top: string;
70
- sub: string;
71
- };
72
- };
73
- URL: string;
74
- };
75
- jprivs: string[];
76
- values: {
77
- exitRunit: number;
78
- };
79
- };
80
- export default _default;
81
- //# sourceMappingURL=index.d.ts.map
package/index.d.ts.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,SAAS,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAChG,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAI1D,eAAO,MAAM,MAAM;;CAElB,CAAA;AAED,OAAO,EACH,QAAQ,EAAE,aAAa,EAAE,SAAS,EAAE,aAAa,EAAE,YAAY,EAC/D,KAAK,EAAE,IAAI,EAAE,MAAM,EACtB,CAAC;AAEF,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAElD,wBAUC"}
package/jserve.d.ts DELETED
@@ -1,10 +0,0 @@
1
- export declare const jprivs: string[];
2
- export type jpriv = typeof jprivs[number];
3
- export interface jSubSiteInfo {
4
- app: object;
5
- AppInit?: () => Promise<void>;
6
- subClients?: string[];
7
- privs?: jpriv[];
8
- localLogin?: boolean;
9
- }
10
- //# sourceMappingURL=jserve.d.ts.map
package/jserve.d.ts.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"jserve.d.ts","sourceRoot":"","sources":["jserve.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,MAAM,UAKT,CAAC;AACX,MAAM,MAAM,KAAK,GAAG,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC;AAI1C,MAAM,WAAW,YAAY;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IAC7B,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,KAAK,CAAC,EAAE,KAAK,EAAE,CAAC;IAChB,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB"}
package/maker.d.ts DELETED
@@ -1,12 +0,0 @@
1
- export interface makerPayload {
2
- content: {
3
- name: string;
4
- value: string;
5
- displayName: string;
6
- deviceId: string;
7
- descriptionText: string;
8
- unit: object;
9
- data: object;
10
- };
11
- }
12
- //# sourceMappingURL=maker.d.ts.map
package/maker.d.ts.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"maker.d.ts","sourceRoot":"","sources":["maker.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,YAAY;IACzB,OAAO,EAAE;QACL,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,WAAW,EAAE,MAAM,CAAC;QACpB,QAAQ,EAAE,MAAM,CAAC;QACjB,eAAe,EAAE,MAAM,CAAC;QACxB,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAA;KACf,CAAA;CACJ"}
package/ports.d.ts DELETED
@@ -1,60 +0,0 @@
1
- export declare const ports: {
2
- jserve2: number;
3
- jserve2s: number;
4
- devlisten: number;
5
- halisten: number;
6
- rmfsite: number;
7
- rmfsites: number;
8
- rmfprod: number;
9
- rmfbeta: number;
10
- rmfalpha: number;
11
- shim: number;
12
- shims: number;
13
- jvport: number;
14
- jvports: number;
15
- sqltcp: number;
16
- sqldbg: number;
17
- sqlhttp: number;
18
- sqlproxy2: number;
19
- sqlproxy: number;
20
- sqlproxys: number;
21
- pinst: number;
22
- mlplanel: number;
23
- mlpanels: number;
24
- wizzer: number;
25
- pserve: number;
26
- vserve: number;
27
- checkmake: number;
28
- bbt: number;
29
- backts: number;
30
- backserve: number;
31
- syncer: number;
32
- lifxer: number;
33
- itemw: number;
34
- stephanie: number;
35
- asyncer: number;
36
- psyncer: number;
37
- rmfAlpha2: number;
38
- gcard: number;
39
- oauth: number;
40
- logit: number;
41
- carder: number;
42
- cardaid: number;
43
- httpUDP: number;
44
- };
45
- export declare const mqtt: {
46
- host: string;
47
- port: number;
48
- topic: {
49
- rmf: string;
50
- subtopics: {
51
- restart: string;
52
- };
53
- devqtt: {
54
- top: string;
55
- sub: string;
56
- };
57
- };
58
- URL: string;
59
- };
60
- //# sourceMappingURL=ports.d.ts.map
package/ports.d.ts.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"ports.d.ts","sourceRoot":"","sources":["ports.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+DjB,CAAA;AAKD,eAAO,MAAM,IAAI;;;;;;;;;;;;;;CAchB,CAAA"}