@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.mjs
CHANGED
|
@@ -3408,6 +3408,9 @@ var DnsCacheResolver = class {
|
|
|
3408
3408
|
clearCache() {
|
|
3409
3409
|
this._cache.clear();
|
|
3410
3410
|
}
|
|
3411
|
+
removeCache(host) {
|
|
3412
|
+
this._cache.delete(host);
|
|
3413
|
+
}
|
|
3411
3414
|
get cache() {
|
|
3412
3415
|
return this._cache;
|
|
3413
3416
|
}
|
|
@@ -3454,8 +3457,15 @@ var fetchCatchDns = (fetch3, {
|
|
|
3454
3457
|
...options,
|
|
3455
3458
|
headers: headersOverride
|
|
3456
3459
|
};
|
|
3457
|
-
|
|
3458
|
-
|
|
3460
|
+
try {
|
|
3461
|
+
const res = await fetch3(target.toString(), optionsOverride);
|
|
3462
|
+
return res;
|
|
3463
|
+
} catch (e) {
|
|
3464
|
+
if (e && e?.code === "ETIMEDOUT") {
|
|
3465
|
+
dnsCache.removeCache(hostname);
|
|
3466
|
+
}
|
|
3467
|
+
throw e;
|
|
3468
|
+
}
|
|
3459
3469
|
};
|
|
3460
3470
|
return fetchWithDns;
|
|
3461
3471
|
};
|