@io-orkes/conductor-javascript 1.2.0-rc.8 → 1.2.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/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +12 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -2
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -3509,6 +3509,9 @@ var DnsCacheResolver = class {
|
|
|
3509
3509
|
clearCache() {
|
|
3510
3510
|
this._cache.clear();
|
|
3511
3511
|
}
|
|
3512
|
+
removeCache(host) {
|
|
3513
|
+
this._cache.delete(host);
|
|
3514
|
+
}
|
|
3512
3515
|
get cache() {
|
|
3513
3516
|
return this._cache;
|
|
3514
3517
|
}
|
|
@@ -3555,8 +3558,15 @@ var fetchCatchDns = (fetch3, {
|
|
|
3555
3558
|
...options,
|
|
3556
3559
|
headers: headersOverride
|
|
3557
3560
|
};
|
|
3558
|
-
|
|
3559
|
-
|
|
3561
|
+
try {
|
|
3562
|
+
const res = await fetch3(target.toString(), optionsOverride);
|
|
3563
|
+
return res;
|
|
3564
|
+
} catch (e) {
|
|
3565
|
+
if (e && e?.code === "ETIMEDOUT") {
|
|
3566
|
+
dnsCache.removeCache(hostname);
|
|
3567
|
+
}
|
|
3568
|
+
throw e;
|
|
3569
|
+
}
|
|
3560
3570
|
};
|
|
3561
3571
|
return fetchWithDns;
|
|
3562
3572
|
};
|