Socket
Socket
Sign inDemoInstall

@vitrical/utils

Package Overview
Dependencies
Maintainers
1
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vitrical/utils - npm Package Compare versions

Comparing version 1.1.7 to 1.1.8

11

api.d.ts

@@ -30,1 +30,12 @@ import { Response } from './superagent';

export declare const request: ({ method, url, body, query, headers, }: CustomRequestOptions) => Promise<CustomRequestResponse>;
export declare const makeMicroserviceRequest: (baseURL: string, key: string) => (method: 'get' | 'post' | 'put' | 'delete', url: string, options?: {
body?: string | {
[key: string]: any;
} | undefined;
query?: string | {
[key: string]: any;
} | undefined;
headers?: {
[key: string]: any;
} | undefined;
} | undefined) => Promise<CustomRequestResponse>;

13

api.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.request = exports.handleSuperagentError = exports.ApiError = void 0;
exports.makeMicroserviceRequest = exports.request = exports.handleSuperagentError = exports.ApiError = void 0;
const superagent_1 = require("./superagent");

@@ -89,2 +89,13 @@ class ApiError extends Error {

exports.request = request;
const makeMicroserviceRequest = (baseURL, key) => (method, url, options) => (0, exports.request)({
method,
url: `${baseURL}${url}`,
body: options?.body,
query: options?.query,
headers: {
key,
...options?.headers,
},
});
exports.makeMicroserviceRequest = makeMicroserviceRequest;
//# sourceMappingURL=api.js.map

2

package.json
{
"name": "@vitrical/utils",
"version": "1.1.7",
"version": "1.1.8",
"description": "Collection of useful functions and typings",

@@ -5,0 +5,0 @@ "main": "index.js",

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