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.5 to 0.0.6

4

lib/client.d.ts

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

import * as fetch from 'node-fetch';
import fetch from 'isomorphic-unfetch';
export default class MicroserviceHttpClient {
private baseURL;
constructor(baseURL: string);
protected fetch(url: fetch.RequestInfo, init?: fetch.RequestInit, token?: any): Promise<fetch.Response>;
protected fetchJson(url: string, init?: fetch.IsomorphicRequestInit, token?: any): Promise<any>;
}
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const fetch = __importStar(require("node-fetch"));
const isomorphic_unfetch_1 = __importDefault(require("isomorphic-unfetch"));
class MicroserviceHttpClient {

@@ -27,3 +11,3 @@ constructor(baseURL) {

}
async fetch(url, init, token) {
async fetchJson(url, init, token) {
var _a;

@@ -36,3 +20,3 @@ const headers = {

}
const response = await fetch.default(`${this.baseURL}/${url}`, {
const response = await (0, isomorphic_unfetch_1.default)(`${this.baseURL}/${url}`, {
...(init !== null && init !== void 0 ? init : {}),

@@ -39,0 +23,0 @@ method: (_a = init === null || init === void 0 ? void 0 : init.method) !== null && _a !== void 0 ? _a : 'GET',

{
"name": "@colearn/microservices-kit",
"version": "0.0.5",
"version": "0.0.6",
"description": "colearn microservice kit",

@@ -39,3 +39,3 @@ "author": "Colearn",

"express-jwt": "^6.1.0",
"node-fetch": "^3.1.0"
"isomorphic-unfetch": "^3.1.0"
},

@@ -42,0 +42,0 @@ "devDependencies": {

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