@bfchain/bnrtc2-client-api
Advanced tools
Comparing version 2.0.6 to 2.0.7
@@ -30,4 +30,4 @@ import "@bfchain/bnrtc2-client-typings"; | ||
isOnline(address: string): Promise<boolean>; | ||
getServerConfig(): Promise<Bnrtc2.Bnrtc2ServerConfig>; | ||
getDwebServiceConfig(): Promise<Bnrtc2.Bnrtc2DwebServiceConfig>; | ||
getServerConfig(): Promise<Bnrtc2.Bnrtc2ServerConfig | undefined>; | ||
getDwebServiceConfig(): Promise<Bnrtc2.Bnrtc2DwebServiceConfig | undefined>; | ||
getServiceAddresses(service: string): Promise<string[]>; | ||
@@ -34,0 +34,0 @@ connectAddress(address: string): Promise<boolean>; |
@@ -82,5 +82,5 @@ "use strict"; | ||
} | ||
httpFetchError(e) { | ||
httpFetchError(e, res) { | ||
console.log("Http Error:", e); | ||
return false; | ||
return res; | ||
} | ||
@@ -99,3 +99,3 @@ connectChannel() { | ||
return yield this.httpBoolResult(res); | ||
})).catch((e) => { return this.httpFetchError(e); }); | ||
})).catch((e) => { return this.httpFetchError(e, false); }); | ||
}); | ||
@@ -108,3 +108,3 @@ } | ||
return yield this.httpBoolResult(res); | ||
})).catch((e) => { return this.httpFetchError(e); }); | ||
})).catch((e) => { return this.httpFetchError(e, false); }); | ||
}); | ||
@@ -117,3 +117,3 @@ } | ||
return yield this.httpBoolResult(res); | ||
})).catch((e) => { return this.httpFetchError(e); }); | ||
})).catch((e) => { return this.httpFetchError(e, false); }); | ||
}); | ||
@@ -126,3 +126,3 @@ } | ||
return yield this.httpJson(res); | ||
})).catch((e) => { return this.httpFetchError(e); }); | ||
})).catch((e) => { return this.httpFetchError(e, undefined); }); | ||
}); | ||
@@ -135,3 +135,3 @@ } | ||
return yield this.httpJson(res); | ||
})).catch((e) => { return this.httpFetchError(e); }); | ||
})).catch((e) => { return this.httpFetchError(e, undefined); }); | ||
}); | ||
@@ -143,4 +143,4 @@ } | ||
return this.httpFetch(url).then((res) => __awaiter(this, void 0, void 0, function* () { | ||
return yield this.httpJson(res); | ||
})).catch((e) => { return this.httpFetchError(e); }); | ||
return (yield this.httpJson(res)) || []; | ||
})).catch((e) => { return this.httpFetchError(e, []); }); | ||
}); | ||
@@ -153,3 +153,3 @@ } | ||
return yield this.httpBoolResult(res); | ||
})).catch((e) => { return this.httpFetchError(e); }); | ||
})).catch((e) => { return this.httpFetchError(e, false); }); | ||
}); | ||
@@ -162,3 +162,3 @@ } | ||
return yield this.httpBoolResult(res); | ||
})).catch((e) => { return this.httpFetchError(e); }); | ||
})).catch((e) => { return this.httpFetchError(e, false); }); | ||
}); | ||
@@ -171,3 +171,3 @@ } | ||
return yield this.httpBoolResult(res); | ||
})).catch((e) => { return this.httpFetchError(e); }); | ||
})).catch((e) => { return this.httpFetchError(e, false); }); | ||
}); | ||
@@ -179,4 +179,4 @@ } | ||
return this.httpFetch(url).then((res) => __awaiter(this, void 0, void 0, function* () { | ||
return yield this.httpJson(res); | ||
})).catch((e) => { return this.httpFetchError(e); }); | ||
return (yield this.httpJson(res)) || []; | ||
})).catch((e) => { return this.httpFetchError(e, []); }); | ||
}); | ||
@@ -183,0 +183,0 @@ } |
{ | ||
"name": "@bfchain/bnrtc2-client-api", | ||
"version": "2.0.6", | ||
"version": "2.0.7", | ||
"main": "./build/index.js", | ||
@@ -8,3 +8,3 @@ "types": "./build/index.d.ts", | ||
"dependencies": { | ||
"@bfchain/bnrtc2-client-typings": "^2.0.6", | ||
"@bfchain/bnrtc2-client-typings": "^2.0.7", | ||
"@bfcs/util-evt": "^0.0.1-alpha.2" | ||
@@ -11,0 +11,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13240