mybase 1.1.33 → 1.1.34

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.
Files changed (124) hide show
  1. package/package.json +5 -1
  2. package/jest/isLANIp.test.js +0 -36
  3. package/jest/isLoopbackIP.test.js +0 -31
  4. package/jest.config.js +0 -6
  5. package/ts/funcs/Geoip2Paths.d.ts +0 -7
  6. package/ts/funcs/Geoip2Paths.js +0 -26
  7. package/ts/funcs/Geoip2Paths.test.ts +0 -11
  8. package/ts/funcs/Geoip2Paths.ts +0 -26
  9. package/ts/funcs/MaxRuntimeHours.d.ts +0 -1
  10. package/ts/funcs/MaxRuntimeHours.js +0 -11
  11. package/ts/funcs/MaxRuntimeHours.ts +0 -7
  12. package/ts/funcs/asJSON.d.ts +0 -1
  13. package/ts/funcs/asJSON.js +0 -14
  14. package/ts/funcs/asJSON.test.js +0 -72
  15. package/ts/funcs/asJSON.ts +0 -6
  16. package/ts/funcs/ensureFolder.d.ts +0 -3
  17. package/ts/funcs/ensureFolder.js +0 -50
  18. package/ts/funcs/ensureFolder.test.ts +0 -79
  19. package/ts/funcs/ensureFolder.ts +0 -21
  20. package/ts/funcs/fileCacheIsValid.d.ts +0 -1
  21. package/ts/funcs/fileCacheIsValid.js +0 -40
  22. package/ts/funcs/fileCacheIsValid.ts +0 -13
  23. package/ts/funcs/getMysql1.d.ts +0 -8
  24. package/ts/funcs/getMysql1.js +0 -62
  25. package/ts/funcs/getMysql1.ts +0 -41
  26. package/ts/funcs/getMysql2.d.ts +0 -9
  27. package/ts/funcs/getMysql2.js +0 -62
  28. package/ts/funcs/getMysql2.ts +0 -42
  29. package/ts/funcs/getWeekNumber.d.ts +0 -1
  30. package/ts/funcs/getWeekNumber.js +0 -36
  31. package/ts/funcs/getWeekNumber.test.ts +0 -9
  32. package/ts/funcs/getWeekNumber.ts +0 -31
  33. package/ts/funcs/hash_sha512.d.ts +0 -1
  34. package/ts/funcs/hash_sha512.js +0 -11
  35. package/ts/funcs/hash_sha512.ts +0 -7
  36. package/ts/funcs/initMysql2Pool.d.ts +0 -3
  37. package/ts/funcs/initMysql2Pool.js +0 -39
  38. package/ts/funcs/initMysql2Pool.ts +0 -11
  39. package/ts/funcs/int2ip.d.ts +0 -1
  40. package/ts/funcs/int2ip.js +0 -18
  41. package/ts/funcs/int2ip.test.js +0 -33
  42. package/ts/funcs/int2ip.ts +0 -9
  43. package/ts/funcs/ip2int.d.ts +0 -1
  44. package/ts/funcs/ip2int.js +0 -18
  45. package/ts/funcs/ip2int.test.js +0 -30
  46. package/ts/funcs/ip2int.ts +0 -10
  47. package/ts/funcs/isLANIp.d.ts +0 -4
  48. package/ts/funcs/isLANIp.js +0 -47
  49. package/ts/funcs/isLANIp.test.ts +0 -59
  50. package/ts/funcs/isLANIp.ts +0 -37
  51. package/ts/funcs/isLocal.d.ts +0 -1
  52. package/ts/funcs/isLocal.js +0 -12
  53. package/ts/funcs/isLocal.test.ts +0 -16
  54. package/ts/funcs/isLocal.ts +0 -5
  55. package/ts/funcs/isLoopbackIP.d.ts +0 -4
  56. package/ts/funcs/isLoopbackIP.js +0 -42
  57. package/ts/funcs/isLoopbackIP.test.ts +0 -72
  58. package/ts/funcs/isLoopbackIP.ts +0 -32
  59. package/ts/funcs/promiseTimeout.d.ts +0 -1
  60. package/ts/funcs/promiseTimeout.js +0 -19
  61. package/ts/funcs/promiseTimeout.test.js +0 -104
  62. package/ts/funcs/promiseTimeout.ts +0 -19
  63. package/ts/funcs/randomIP.d.ts +0 -1
  64. package/ts/funcs/randomIP.js +0 -11
  65. package/ts/funcs/randomIP.test.ts +0 -16
  66. package/ts/funcs/randomIP.ts +0 -10
  67. package/ts/funcs/randomIP6.d.ts +0 -1
  68. package/ts/funcs/randomIP6.js +0 -17
  69. package/ts/funcs/randomIP6.test.js +0 -18
  70. package/ts/funcs/randomIP6.ts +0 -12
  71. package/ts/funcs/randomString.d.ts +0 -1
  72. package/ts/funcs/randomString.js +0 -8
  73. package/ts/funcs/randomString.test.ts +0 -15
  74. package/ts/funcs/randomString.ts +0 -5
  75. package/ts/funcs/randomTCPPort.d.ts +0 -12
  76. package/ts/funcs/randomTCPPort.js +0 -88
  77. package/ts/funcs/randomTCPPort.test.ts +0 -62
  78. package/ts/funcs/randomTCPPort.ts +0 -58
  79. package/ts/funcs/randomUTFString.d.ts +0 -1
  80. package/ts/funcs/randomUTFString.js +0 -31
  81. package/ts/funcs/randomUTFString.test.ts +0 -44
  82. package/ts/funcs/randomUTFString.ts +0 -33
  83. package/ts/funcs/utcnow.d.ts +0 -2
  84. package/ts/funcs/utcnow.js +0 -8
  85. package/ts/funcs/utcnow.ts +0 -5
  86. package/ts/funcs/validEmail.d.ts +0 -1
  87. package/ts/funcs/validEmail.js +0 -21
  88. package/ts/funcs/validEmail.test.js +0 -31
  89. package/ts/funcs/validEmail.ts +0 -13
  90. package/ts/funcs/validIp.d.ts +0 -1
  91. package/ts/funcs/validIp.js +0 -32
  92. package/ts/funcs/validIp.test.ts +0 -33
  93. package/ts/funcs/validIp.ts +0 -5
  94. package/ts/funcs/vaultFill.d.ts +0 -2
  95. package/ts/funcs/vaultFill.js +0 -86
  96. package/ts/funcs/vaultFill.ts +0 -89
  97. package/ts/funcs/vaultRead.d.ts +0 -2
  98. package/ts/funcs/vaultRead.js +0 -52
  99. package/ts/funcs/vaultRead.ts +0 -45
  100. package/ts/funcs/wait.d.ts +0 -1
  101. package/ts/funcs/wait.js +0 -10
  102. package/ts/funcs/wait.ts +0 -7
  103. package/ts/global.d.ts +0 -1
  104. package/ts/global.js +0 -16
  105. package/ts/global.ts +0 -10
  106. package/ts/index.d.ts +0 -30
  107. package/ts/index.js +0 -48
  108. package/ts/index.test.ts +0 -7
  109. package/ts/index.ts +0 -33
  110. package/ts/models/IPAddress.d.ts +0 -40
  111. package/ts/models/IPAddress.js +0 -254
  112. package/ts/models/IPAddress.test.ts +0 -393
  113. package/ts/models/IPAddress.ts +0 -271
  114. package/ts/models/Timespan.d.ts +0 -18
  115. package/ts/models/Timespan.js +0 -52
  116. package/ts/models/Timespan.ts +0 -63
  117. package/ts/models/Unixtime.d.ts +0 -32
  118. package/ts/models/Unixtime.js +0 -137
  119. package/ts/models/Unixtime.test.ts +0 -102
  120. package/ts/models/Unixtime.ts +0 -164
  121. package/ts/types.d.ts +0 -1
  122. package/ts/types.js +0 -3
  123. package/ts/types.ts +0 -1
  124. package/tsconfig.json +0 -36
package/ts/index.js DELETED
@@ -1,48 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./funcs/getWeekNumber"), exports);
18
- __exportStar(require("./funcs/Geoip2Paths"), exports);
19
- __exportStar(require("./funcs/isLocal"), exports);
20
- __exportStar(require("./funcs/randomString"), exports);
21
- __exportStar(require("./funcs/utcnow"), exports);
22
- __exportStar(require("./funcs/validIp"), exports);
23
- __exportStar(require("./funcs/wait"), exports);
24
- __exportStar(require("./funcs/fileCacheIsValid"), exports);
25
- __exportStar(require("./funcs/hash_sha512"), exports);
26
- __exportStar(require("./funcs/vaultRead"), exports);
27
- __exportStar(require("./funcs/vaultFill"), exports);
28
- __exportStar(require("./funcs/asJSON"), exports);
29
- __exportStar(require("./funcs/promiseTimeout"), exports);
30
- __exportStar(require("./funcs/randomIP"), exports);
31
- __exportStar(require("./funcs/ip2int"), exports);
32
- __exportStar(require("./funcs/int2ip"), exports);
33
- __exportStar(require("./funcs/randomIP6"), exports);
34
- __exportStar(require("./funcs/randomTCPPort"), exports);
35
- __exportStar(require("./funcs/validEmail"), exports);
36
- __exportStar(require("./funcs/isLoopbackIP"), exports);
37
- __exportStar(require("./funcs/isLANIp"), exports);
38
- __exportStar(require("./funcs/getMysql1"), exports);
39
- __exportStar(require("./funcs/getMysql2"), exports);
40
- __exportStar(require("./funcs/initMysql2Pool"), exports);
41
- __exportStar(require("./funcs/randomUTFString"), exports);
42
- __exportStar(require("./funcs/MaxRuntimeHours"), exports);
43
- __exportStar(require("./funcs/ensureFolder"), exports);
44
- // models
45
- __exportStar(require("./models/Unixtime"), exports);
46
- __exportStar(require("./models/Timespan"), exports);
47
- __exportStar(require("./models/IPAddress"), exports);
48
- //# sourceMappingURL=index.js.map
package/ts/index.test.ts DELETED
@@ -1,7 +0,0 @@
1
- import * as IMPORTS from "./index";
2
-
3
- test('exports', () => {
4
- for(let fn of Object.values(IMPORTS)) {
5
- expect(typeof fn=='function' || typeof fn==='object').toBe(true)
6
- }
7
- })
package/ts/index.ts DELETED
@@ -1,33 +0,0 @@
1
- export * from "./funcs/getWeekNumber"
2
- export * from "./funcs/Geoip2Paths";
3
- export * from "./funcs/isLocal"
4
- export * from "./funcs/randomString"
5
- export * from "./funcs/utcnow"
6
- export * from "./funcs/validIp"
7
- export * from "./funcs/wait"
8
- export * from "./funcs/fileCacheIsValid"
9
- export * from "./funcs/hash_sha512"
10
- export * from "./funcs/vaultRead"
11
- export * from "./funcs/vaultFill"
12
- export * from "./funcs/asJSON"
13
- export * from "./funcs/promiseTimeout"
14
- export * from "./funcs/randomIP"
15
- export * from "./funcs/ip2int"
16
- export * from "./funcs/int2ip"
17
- export * from "./funcs/randomIP6"
18
- export * from "./funcs/randomTCPPort"
19
- export * from "./funcs/validEmail"
20
- export * from "./funcs/isLoopbackIP"
21
- export * from "./funcs/isLANIp"
22
- export * from "./funcs/getMysql1"
23
- export * from "./funcs/getMysql2"
24
- export * from "./funcs/initMysql2Pool"
25
- export * from "./funcs/randomUTFString"
26
- export * from "./funcs/MaxRuntimeHours"
27
- export * from "./funcs/ensureFolder"
28
-
29
-
30
- // models
31
- export * from "./models/Unixtime"
32
- export * from "./models/Timespan"
33
- export * from "./models/IPAddress"
@@ -1,40 +0,0 @@
1
- /// <reference types="@root/ip6addr" />
2
- import ip6addr, { ToStringOpts } from 'ip6addr';
3
- export declare class IPAddress {
4
- private _ip;
5
- static loopback_cidrs4: ip6addr.CIDR[];
6
- static loopback_cidrs6: ip6addr.CIDR[];
7
- static loopback_cidrs: ip6addr.CIDR[];
8
- static lan_cidrs4: ip6addr.CIDR[];
9
- static lan_cidrs6: ip6addr.CIDR[];
10
- static lan_cidrs: ip6addr.CIDR[];
11
- static local_cidrs: ip6addr.CIDR[];
12
- static local_cidrs4: ip6addr.CIDR[];
13
- static local_cidrs6: ip6addr.CIDR[];
14
- constructor(ip: string);
15
- abbreviated(): string;
16
- toString(opts?: ToStringOpts): string;
17
- static validate(ip: string): boolean;
18
- static try(ip: string): IPAddress | undefined;
19
- static fromString(ip: string): IPAddress;
20
- static get Empty(): IPAddress;
21
- isLoopbackIP(): boolean;
22
- isLANIP(): boolean;
23
- isLocalIP(): boolean;
24
- partOfCIDR(cidr_networks: ip6addr.CIDR[]): boolean;
25
- static partOfCIDR(_ip: string, cidr_networks: ip6addr.CIDR[]): boolean;
26
- isPublicIP(): boolean;
27
- static unserialize(serializedIpString: string): IPAddress;
28
- static randomIP4(): IPAddress;
29
- static randomIP6(): IPAddress;
30
- static randomCIDRIp(cidr: ip6addr.CIDR[] | 'loopback' | 'lan' | 'local' | 'loopback4' | 'loopback6' | 'lan4' | 'lan6' | 'local4' | 'local6'): IPAddress;
31
- serialize(): string;
32
- kind(): number;
33
- equals(secondIp: IPAddress): boolean;
34
- randomPad(): string;
35
- normalized(): string;
36
- private padIp6;
37
- private padIp4;
38
- asciiChecksum(): string;
39
- checksum1(): string;
40
- }
@@ -1,254 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.IPAddress = void 0;
7
- const debug_1 = __importDefault(require("debug"));
8
- const __1 = require("./../");
9
- const ip6addr_1 = __importDefault(require("ip6addr"));
10
- const net_1 = __importDefault(require("net"));
11
- const ip6 = require('ip6'); // "url": "https://github.com/elgs/ip6"
12
- const dbg = (0, debug_1.default)('_IPAddress');
13
- dbg.enabled = true;
14
- // need version "ip6": "0.2.7",!!
15
- class IPAddress {
16
- constructor(ip) {
17
- if (ip === '-')
18
- ip = '0.0.0.0'; // is this really required?
19
- try {
20
- this._ip = ip6addr_1.default.parse(ip);
21
- if (this._ip._attrs.ipv4Mapped) {
22
- // we wany to convert it to ipv4
23
- this._ip = ip6addr_1.default.parse(this._ip.toString({ format: 'v4' }));
24
- }
25
- }
26
- catch (err) {
27
- if (err instanceof Error)
28
- throw new Error(`IPAddress: '${ip}' Error: ${err.message}`);
29
- throw err;
30
- }
31
- }
32
- abbreviated() {
33
- return this.toString(); // default behaviour of ip6addr
34
- }
35
- toString(opts = { format: 'auto', zeroElide: false, zeroPad: false }) {
36
- return this._ip.toString();
37
- }
38
- static validate(ip) {
39
- try {
40
- new IPAddress(ip);
41
- return true;
42
- }
43
- catch (_) {
44
- return false;
45
- }
46
- }
47
- static try(ip) {
48
- try {
49
- return new IPAddress(ip);
50
- }
51
- catch (_) {
52
- return undefined;
53
- }
54
- }
55
- static fromString(ip) {
56
- return new IPAddress(ip);
57
- }
58
- static get Empty() {
59
- //The IP address 0.0.0.0 is a non-routable meta-address used to denote an invalid, unknown,
60
- // or non-applicable target. It's not assigned to any individual device.
61
- // It is used in different contexts to mean "any IPv4-enabled network interface" or as a default route
62
- return new IPAddress('0.0.0.0');
63
- }
64
- isLoopbackIP() {
65
- return this.partOfCIDR(IPAddress.loopback_cidrs);
66
- }
67
- isLANIP() {
68
- return this.partOfCIDR(IPAddress.lan_cidrs);
69
- }
70
- isLocalIP() {
71
- return this.partOfCIDR(IPAddress.local_cidrs);
72
- }
73
- partOfCIDR(cidr_networks) {
74
- const ipNormalized = this.toString();
75
- let ipVersion = net_1.default.isIPv4(ipNormalized) ? 'ipv4' : 'ipv6';
76
- for (let cidr of cidr_networks) {
77
- if (!cidr)
78
- continue;
79
- let first = cidr.first();
80
- if (first.kind() !== ipVersion)
81
- continue;
82
- if (cidr.contains(ipNormalized))
83
- return true;
84
- }
85
- return false;
86
- }
87
- static partOfCIDR(_ip, cidr_networks) {
88
- const ip = IPAddress.try(_ip);
89
- if (ip === undefined)
90
- return false;
91
- return ip.partOfCIDR(cidr_networks);
92
- }
93
- isPublicIP() {
94
- return this.toString() !== '0.0.0.0' && !this.isLoopbackIP() && !this.isLANIP();
95
- }
96
- static unserialize(serializedIpString) {
97
- var _a, _b;
98
- if (serializedIpString.length === 32) {
99
- // we have possible ipv6
100
- let ip = (_a = serializedIpString.match(/.{1,4}/g)) === null || _a === void 0 ? void 0 : _a.join(':');
101
- if (ip)
102
- return new IPAddress(ip);
103
- }
104
- // we have possible ipv4
105
- let ip = (_b = serializedIpString.match(/.{1,3}/g)) === null || _b === void 0 ? void 0 : _b.join('.');
106
- if (ip)
107
- try {
108
- return new IPAddress(ip);
109
- }
110
- catch (_) { }
111
- throw new Error(`Invalid SerializationString: ${serializedIpString}`);
112
- }
113
- static randomIP4() {
114
- return new IPAddress((0, __1.randomIP)());
115
- }
116
- static randomIP6() {
117
- return new IPAddress((0, __1.randomIP6)());
118
- }
119
- static randomCIDRIp(cidr) {
120
- if (cidr === 'loopback')
121
- cidr = IPAddress.loopback_cidrs;
122
- if (cidr === 'loopback4')
123
- cidr = IPAddress.loopback_cidrs4;
124
- if (cidr === 'loopback6')
125
- cidr = IPAddress.loopback_cidrs6;
126
- if (cidr === 'lan')
127
- cidr = IPAddress.lan_cidrs;
128
- if (cidr === 'lan4')
129
- cidr = IPAddress.lan_cidrs4;
130
- if (cidr === 'lan6')
131
- cidr = IPAddress.lan_cidrs6;
132
- if (cidr === 'local')
133
- cidr = IPAddress.local_cidrs;
134
- if (cidr === 'local4')
135
- cidr = IPAddress.local_cidrs4;
136
- if (cidr === 'local6')
137
- cidr = IPAddress.local_cidrs6;
138
- // dbg('randomCIDRIp', cidr)
139
- if (cidr.length === 0)
140
- throw new Error('CIDR array is empty');
141
- // Pick a random CIDR network
142
- const network = cidr[Math.floor(Math.random() * cidr.length)];
143
- // dbg('randomCIDRIp:network', network)
144
- // Get the range of IPs in this CIDR
145
- const start = network.first().toBigInt();
146
- // dbg('randomCIDRIp:first', network.first().toString(),start)
147
- const end = network.last().toBigInt();
148
- // dbg('randomCIDRIp:last', network.last().toString(),end)
149
- let range = end - start;
150
- // dbg('randomCIDRIp:first:last', start, end)
151
- // Generate a random Long between the start and end
152
- // if start-end > Maximum integer number
153
- // we need to use BigInt
154
- if (range > BigInt(Number.MAX_SAFE_INTEGER))
155
- range = (Number.MAX_SAFE_INTEGER);
156
- const randomBigInt = BigInt(Math.floor(Math.random() * (Number(range) + 1))) + start;
157
- // dbg('randomBigInt', randomBigInt)
158
- // Convert the BigInt back to an IP address
159
- const randomIp = ip6addr_1.default.parse(randomBigInt);
160
- // dbg('randomCIDRIp', randomIp.toString())
161
- return new IPAddress(randomIp.toString());
162
- }
163
- serialize() {
164
- if (this.kind() === 4) {
165
- // zero pad ipv4
166
- return this._ip.toString().split('.').map((octet) => {
167
- return octet.padStart(3, '0');
168
- }).join('.').replace(/\./g, '');
169
- }
170
- // zero pad ipv6
171
- return ip6.normalize(this._ip.toString()).split(':').map((hextet) => {
172
- return hextet.padStart(4, '0');
173
- }).join(':').replace(/:/g, '');
174
- }
175
- kind() {
176
- return this._ip.kind() === 'ipv6' ? 6 : 4;
177
- }
178
- equals(secondIp) {
179
- return this._ip.compare(secondIp._ip) === 0;
180
- }
181
- randomPad() {
182
- if (this.kind() === 4)
183
- return this.padIp4();
184
- return this.padIp6();
185
- }
186
- normalized() {
187
- if (this.kind() === 4)
188
- return this._ip.toString();
189
- return ip6.normalize(this._ip.toString());
190
- }
191
- padIp6() {
192
- const hextets = this.normalized().split(':'); // we need to have the full form
193
- const paddedHextets = hextets.map(hextet => {
194
- const cleanHextet = Number(`0x${hextet}`).toString(16);
195
- const padLength = Math.floor(Math.random() * (4 - cleanHextet.length));
196
- return cleanHextet.padStart(padLength + cleanHextet.length, '0');
197
- });
198
- return paddedHextets.join(':');
199
- }
200
- padIp4() {
201
- const octets = this._ip.toString().split('.');
202
- const paddedOctets = octets.map(octet => {
203
- const cleanOctet = String(Number(octet));
204
- const padLength = Math.floor(Math.random() * (3 - cleanOctet.length));
205
- return cleanOctet.padStart(padLength + cleanOctet.length, '0');
206
- });
207
- return paddedOctets.join('.');
208
- }
209
- asciiChecksum() {
210
- // support ipv4 and ipv6
211
- // FNV-1a hash parameters
212
- const FNV_PRIME = 0x01000193;
213
- const FNV_OFFSET_BASIS = 0x811c9dc5;
214
- const CHAR_SET = 'abcdefghijklmnopqrstuvwxyz0123456789';
215
- let hash = FNV_OFFSET_BASIS;
216
- const ip = this.normalized();
217
- for (let i = 0; i < ip.length; i++) {
218
- hash ^= ip.charCodeAt(i);
219
- hash *= FNV_PRIME;
220
- hash >>>= 0; // Ensure hash is always a positive 32-bit integer
221
- }
222
- // Map the hash to a character in the CHAR_SET
223
- const index = hash % CHAR_SET.length;
224
- return CHAR_SET.charAt(index);
225
- }
226
- checksum1() {
227
- // this shall check that the ip is ipv4 and return the last octet as checksum
228
- if (this.kind() !== 4)
229
- return 'x';
230
- return this._ip.toString().split('.').pop() || '-';
231
- }
232
- }
233
- exports.IPAddress = IPAddress;
234
- IPAddress.loopback_cidrs4 = [
235
- ip6addr_1.default.createCIDR('127.0.0.0/8'),
236
- ];
237
- IPAddress.loopback_cidrs6 = [
238
- ip6addr_1.default.createCIDR('::1/128') // yes ipv6 has single address
239
- ];
240
- IPAddress.loopback_cidrs = IPAddress.loopback_cidrs4.concat(IPAddress.loopback_cidrs6);
241
- IPAddress.lan_cidrs4 = [
242
- ip6addr_1.default.createCIDR('10.0.0.0/8'),
243
- ip6addr_1.default.createCIDR('172.16.0.0/12'),
244
- ip6addr_1.default.createCIDR('192.168.0.0/16'),
245
- ];
246
- IPAddress.lan_cidrs6 = [
247
- ip6addr_1.default.createCIDR('fd00::/8'), // Reserved by IETF for future use, but not currently in active use.
248
- ip6addr_1.default.createCIDR('fc00::/8'), // The range currently in use for local communications within a site or organization.
249
- ];
250
- IPAddress.lan_cidrs = IPAddress.lan_cidrs4.concat(IPAddress.lan_cidrs6);
251
- IPAddress.local_cidrs = IPAddress.loopback_cidrs.concat(IPAddress.lan_cidrs);
252
- IPAddress.local_cidrs4 = IPAddress.loopback_cidrs4.concat(IPAddress.lan_cidrs4);
253
- IPAddress.local_cidrs6 = IPAddress.loopback_cidrs6.concat(IPAddress.lan_cidrs6);
254
- //# sourceMappingURL=IPAddress.js.map