zgrzyt 2.1.0 → 2.1.1
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/lib/config.js +7 -1
- package/package.json +3 -3
package/lib/config.js
CHANGED
|
@@ -21,10 +21,16 @@ function prepareConfig(config) {
|
|
|
21
21
|
cluster = {}
|
|
22
22
|
} = config;
|
|
23
23
|
|
|
24
|
-
if (!cloudflare
|
|
24
|
+
if (!cloudflare?.token) {
|
|
25
25
|
console.error('Cloudflare API token not configured');
|
|
26
26
|
return;
|
|
27
27
|
}
|
|
28
|
+
if (typeof cloudflare.timeout === 'string') {
|
|
29
|
+
cloudflare.timeout = parseInt(cloudflare.timeout);
|
|
30
|
+
}
|
|
31
|
+
if (typeof cloudflare.retry === 'string') {
|
|
32
|
+
cloudflare.retry = parseInt(cloudflare.retry);
|
|
33
|
+
}
|
|
28
34
|
|
|
29
35
|
// collect all APIs
|
|
30
36
|
const apis = [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zgrzyt",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"description": "Poor man's load balancing DNS switcher.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": {
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"debug": "~4",
|
|
30
|
-
"got": "~
|
|
31
|
-
"parse-domain": "~
|
|
30
|
+
"got": "~14",
|
|
31
|
+
"parse-domain": "~8",
|
|
32
32
|
"rc": "^1.2.8",
|
|
33
33
|
"sprintfjs": "^1.2.16"
|
|
34
34
|
},
|