querysub 0.108.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.108.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.71.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 (prevValues.some(x => x.content === value && x.proxied === !!proxied)) return;
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;
@@ -113,9 +115,11 @@ export async function setRecord(type: string, key: string, value: string, proxie
113
115
  export async function addRecord(type: string, key: string, value: string, proxied?: "proxied") {
114
116
  if (key.endsWith(".")) key = key.slice(0, -1);
115
117
  let zoneId = await getZoneId(getRootDomain(key));
116
- let prevValues = await getRecords(type, key);
117
- if (prevValues.includes(value)) return;
118
- console.log(`Adding ${type} record for ${key} to ${value} (previously had ${JSON.stringify(prevValues)})`);
118
+ let prevValues = await getRecordsRaw(type, key);
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;
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`, {
121
125
  type: type,
@@ -232,6 +232,7 @@ async function edgeNodeFunction(config: {
232
232
 
233
233
  async function tryToBoot(): Promise<boolean> {
234
234
  let nodeConfig = await getEdgeNodeConfig();
235
+ progressUI.setMessage("Connecting to server...");
235
236
  await bootEdgeNode(nodeConfig);
236
237
  return true;
237
238
  }