querysub 0.109.0 → 0.110.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": "querysub",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.110.0",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"note1": "note on node-forge fork, see https://github.com/digitalbazaar/forge/issues/744 for details",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"node-forge": "https://github.com/sliftist/forge#e618181b469b07bdc70b968b0391beb8ef5fecd6",
|
|
25
25
|
"pako": "^2.1.0",
|
|
26
26
|
"preact": "^10.11.3",
|
|
27
|
-
"socket-function": "^0.
|
|
27
|
+
"socket-function": "^0.73.0",
|
|
28
28
|
"terser": "^5.31.0",
|
|
29
29
|
"typesafecss": "^0.6.3",
|
|
30
30
|
"yaml": "^2.5.0",
|
|
@@ -85,7 +85,9 @@ export async function setRecord(type: string, key: string, value: string, proxie
|
|
|
85
85
|
if (key.endsWith(".")) key = key.slice(0, -1);
|
|
86
86
|
let zoneId = await getZoneId(getRootDomain(key));
|
|
87
87
|
let prevValues = await getRecordsRaw(type, key);
|
|
88
|
-
if
|
|
88
|
+
// NOTE: Apparently if we try to update by just changing proxied, cloudflare complains and
|
|
89
|
+
// says "an identical record already exists", even though it doesn't, we changed the proxied value...
|
|
90
|
+
if (prevValues.some(x => x.content === value)) return;
|
|
89
91
|
|
|
90
92
|
console.log(`Removing previous records of ${type} for ${key} ${JSON.stringify(prevValues.map(x => x.content))}`);
|
|
91
93
|
let didDeletions = false;
|
|
@@ -114,7 +116,9 @@ export async function addRecord(type: string, key: string, value: string, proxie
|
|
|
114
116
|
if (key.endsWith(".")) key = key.slice(0, -1);
|
|
115
117
|
let zoneId = await getZoneId(getRootDomain(key));
|
|
116
118
|
let prevValues = await getRecordsRaw(type, key);
|
|
117
|
-
if
|
|
119
|
+
// NOTE: Apparently if we try to update by just changing proxied, cloudflare complains and
|
|
120
|
+
// says "an identical record already exists", even though it doesn't, we changed the proxied value...
|
|
121
|
+
if (prevValues.some(x => x.content === value)) return;
|
|
118
122
|
console.log(`Adding ${type} record for ${key} to ${value} (previously had ${JSON.stringify(prevValues.map(x => x.content))})`);
|
|
119
123
|
const ttl = DNS_TTLSeconds[type as "A"] || 60;
|
|
120
124
|
await cloudflarePOSTCall(`/zones/${zoneId}/dns_records`, {
|