🚀 Big News:Socket Has Acquired Secure Annex.Learn More
Socket
Book a DemoSign in
Socket

@cardano-sdk/util

Package Overview
Dependencies
Maintainers
2
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cardano-sdk/util - npm Package Compare versions

Comparing version
0.12.0
to
0.12.1
+0
-1
dist/cjs/network.d.ts

@@ -1,3 +0,2 @@

export declare const connectionErrorCodes: string[];
export declare const isConnectionError: (error: any) => boolean;
//# sourceMappingURL=network.d.ts.map
+1
-1

@@ -1,1 +0,1 @@

{"version":3,"file":"network.d.ts","sourceRoot":"","sources":["../../src/network.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB,UAShC,CAAC;AAEF,eAAO,MAAM,iBAAiB,UAAW,GAAG,YAQ3C,CAAC"}
{"version":3,"file":"network.d.ts","sourceRoot":"","sources":["../../src/network.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,iBAAiB,UAAW,GAAG,KAAG,OAM9C,CAAC"}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isConnectionError = exports.connectionErrorCodes = void 0;
exports.connectionErrorCodes = [
exports.isConnectionError = void 0;
const connectionErrorCodes = new Set([
'ETIMEDOUT',

@@ -11,13 +11,14 @@ 'ECONNRESET',

'ENETUNREACH',
'EAI_AGAIN',
'WebSocket is closed'
];
'EAI_AGAIN'
]);
const connectionErrorNames = new Set(['WebSocketClosed', 'ServerNotReady']);
const isConnectionError = (error) => {
if ((error?.code && exports.connectionErrorCodes.includes(error.code)) ||
(error?.message && exports.connectionErrorCodes.some((err) => error.message.includes(err)))) {
if (!error || typeof error !== 'object')
return false;
if ((error?.name && connectionErrorNames.has(error.name)) || (error?.code && connectionErrorCodes.has(error.code))) {
return true;
}
return false;
return (0, exports.isConnectionError)(error.innerError);
};
exports.isConnectionError = isConnectionError;
//# sourceMappingURL=network.js.map

@@ -1,1 +0,1 @@

{"version":3,"file":"network.js","sourceRoot":"","sources":["../../src/network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iB,EAAC,KAAK,CAAC,UAAU,CAAC,CAAC;AAC7C,CAAC,CAAC;AANW,QAAA,iBAAiB,qBAM5B"}

@@ -1,3 +0,2 @@

export declare const connectionErrorCodes: string[];
export declare const isConnectionError: (error: any) => boolean;
//# sourceMappingURL=network.d.ts.map

@@ -1,1 +0,1 @@

{"version":3,"file":"network.d.ts","sourceRoot":"","sources":["../../src/network.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB,UAShC,CAAC;AAEF,eAAO,MAAM,iBAAiB,UAAW,GAAG,YAQ3C,CAAC"}
{"version":3,"file":"network.d.ts","sourceRoot":"","sources":["../../src/network.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,iBAAiB,UAAW,GAAG,KAAG,OAM9C,CAAC"}

@@ -1,2 +0,2 @@

export const connectionErrorCodes = [
const connectionErrorCodes = new Set([
'ETIMEDOUT',

@@ -8,12 +8,13 @@ 'ECONNRESET',

'ENETUNREACH',
'EAI_AGAIN',
'WebSocket is closed'
];
'EAI_AGAIN'
]);
const connectionErrorNames = new Set(['WebSocketClosed', 'ServerNotReady']);
export const isConnectionError = (error) => {
if ((error?.code && connectionErrorCodes.includes(error.code)) ||
(error?.message && connectionErrorCodes.some((err) => error.message.includes(err)))) {
if (!error || typeof error !== 'object')
return false;
if ((error?.name && connectionErrorNames.has(error.name)) || (error?.code && connectionErrorCodes.has(error.code))) {
return true;
}
return false;
return isConnectionError(error.innerError);
};
//# sourceMappingURL=network.js.map

@@ -1,1 +0,1 @@

{"version":3,"file":"network.js","sourceRoot":"","sources":["../../src/network.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,WAAW;IACX,YAAY;IACZ,cAAc;IACd,OAAO;IACP,WAAW;IACX,aAAa;IACb,WAAW;IACX,qBAAqB;CACtB,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAAU,EAAE,EAAE;IAC9C,IACE,CAAC,KAAK,EAAE,IAAI,IAAI,oBAAoB,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC1D,CAAC,KAAK,EAAE,OAAO,IAAI,oBAAoB,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EACnF;QACA,OAAO,IAAI,CAAC;KACb;IACD,OAAO,KAAK,CAAC;AACf,CAAC,CAAC"}
{"version":3,"file":"network.js","sourceRoot":"","sources":["../../src/network.ts"],"names":[],"mappings":"AAEA,MAAM,oBAAoB,GAAG,IAAI,GAAG,CAAC;IACnC,WAAW;IACX,YAAY;IACZ,cAAc;IACd,OAAO;IACP,WAAW;IACX,aAAa;IACb,WAAW;CACZ,CAAC,CAAC;AAEH,MAAM,oBAAoB,GAAG,IAAI,GAAG,CAAC,CAAC,iBAAiB,EAAE,gBAAgB,CAAC,CAAC,CAAC;AAE5E,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAAU,EAAW,EAAE;IACvD,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IACtD,IAAI,CAAC,KAAK,EAAE,IAAI,IAAI,oBAAoB,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,IAAI,oBAAoB,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,EAAE;QAClH,OAAO,IAAI,CAAC;KACb;IACD,OAAO,iBAAiB,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;AAC7C,CAAC,CAAC"}
{
"name": "@cardano-sdk/util",
"version": "0.12.0",
"version": "0.12.1",
"description": "General, not cardano-specific utils",

@@ -65,3 +65,3 @@ "engines": {

],
"gitHead": "46029ae65c25ce6cfef394249c7ff5a32259757f"
"gitHead": "13adbccfb323611b1972ccc7a5498a033ea5fcc5"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet