Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@colearn/microservices-kit

Package Overview
Dependencies
Maintainers
3
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@colearn/microservices-kit - npm Package Compare versions

Comparing version 0.0.49 to 0.0.50

5

lib/client.d.ts

@@ -10,2 +10,7 @@ /// <reference types="node" />

}, token?: string): Promise<Response>;
fetchData<T extends {
error: any;
}>(url: string, init?: RequestInit & {
params?: URLSearchParams | string;
}, token?: string): Promise<T>;
}

@@ -12,0 +17,0 @@ export declare class ClientFactory<T> {

@@ -8,2 +8,3 @@ "use strict";

const isomorphic_fetch_1 = __importDefault(require("isomorphic-fetch"));
const errors_1 = require("./errors");
class MicroserviceHttpClient {

@@ -31,2 +32,11 @@ constructor(baseURL, token) {

}
async fetchData(url, init = {}, token) {
var _a;
const resp = await this.fetch(url, init, token);
const data = (await resp.json());
if (!resp.ok || data.error) {
throw new errors_1.InternalServerError((_a = data.error) === null || _a === void 0 ? void 0 : _a.message);
}
return data;
}
}

@@ -33,0 +43,0 @@ exports.MicroserviceHttpClient = MicroserviceHttpClient;

2

package.json
{
"name": "@colearn/microservices-kit",
"version": "0.0.49",
"version": "0.0.50",
"description": "colearn microservice kit",

@@ -5,0 +5,0 @@ "author": "Colearn",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc