New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

af-consul

Package Overview
Dependencies
Maintainers
1
Versions
133
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

af-consul - npm Package Compare versions

Comparing version 2.0.15 to 2.0.16

6

dist/types/get-api.d.ts

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

import { IApi, ICache, ICLOptions } from './interfaces';
import { IAFConsulAPI, ICache, ICLOptions } from './interfaces';
export { accessPointsUpdater } from './access-points/access-points-updater';
export declare const apiCache: ICache<IApi>;
export declare const getAPI: (options: ICLOptions) => Promise<IApi>;
export declare const apiCache: ICache<IAFConsulAPI>;
export declare const getAPI: (options: ICLOptions) => Promise<IAFConsulAPI>;
//# sourceMappingURL=get-api.d.ts.map

@@ -153,3 +153,3 @@ /// <reference types="node" />

}
export interface IApi extends IConsulAPI {
export interface IAFConsulAPI extends IConsulAPI {
registerConfig: IRegisterConfig;

@@ -156,0 +156,0 @@ getConsulUIAddress: TMethod<string>;

{
"name": "af-consul",
"version": "2.0.15",
"version": "2.0.16",
"description": "A highly specialized function library",

@@ -5,0 +5,0 @@ "main": "./dist/cjs/src/index.js",

/* eslint-disable no-console */
// noinspection JSUnusedGlobalSymbols
import { IApi, ICache, ICLOptions, IConsulAPI, TRegisterType } from './interfaces';
import { IAFConsulAPI, ICache, ICLOptions, IConsulAPI, TRegisterType } from './interfaces';
import { getConsulApiCached } from './prepare-consul-api';

@@ -29,8 +29,8 @@ import { CONSUL_DEBUG_ON, MAX_API_CACHED, PREFIX } from './constants';

export const apiCache: ICache<IApi> = {};
export const apiCache: ICache<IAFConsulAPI> = {};
export const getAPI = async (options: ICLOptions): Promise<IApi> => {
export const getAPI = async (options: ICLOptions): Promise<IAFConsulAPI> => {
const hash = getConfigHash(options);
if (!apiCache[hash]) {
const api: IConsulAPI = await getConsulApiCached(options) as IApi;
const api: IConsulAPI = await getConsulApiCached(options) as IAFConsulAPI;
const registerConfig = await getRegisterConfig(options);

@@ -51,3 +51,3 @@ const serviceId = registerConfig.id;

deregister: (svcId?: string, agentHost?: string, agentPort?: string) => api.deregisterIfNeed(svcId || serviceId, agentHost, agentPort),
} as IApi;
} as IAFConsulAPI;

@@ -54,0 +54,0 @@ Object.entries(api).forEach(([k, v]) => {

@@ -175,3 +175,3 @@ import Consul from 'consul';

export interface IApi extends IConsulAPI {
export interface IAFConsulAPI extends IConsulAPI {
registerConfig: IRegisterConfig,

@@ -178,0 +178,0 @@ getConsulUIAddress: TMethod<string>,

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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