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.11 to 2.0.13

dist/cjs/src/access-points/access-points-updater.js

6

dist/cjs/src/cyclic-register.js

@@ -5,5 +5,5 @@ "use strict";

exports.getRegisterCyclic = void 0;
const logger_stub_1 = require("./logger-stub");
const color_1 = require("./color");
const utils_1 = require("./utils");
const logger_stub_1 = require("./lib/logger-stub");
const color_1 = require("./lib/color");
const utils_1 = require("./lib/utils");
const constants_1 = require("./constants");

@@ -10,0 +10,0 @@ const prefix = 'CONSUL-REG:';

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

const constants_1 = require("./constants");
const hash_1 = require("./hash");
const hash_1 = require("./lib/hash");
const get_register_config_1 = require("./get-register-config");
const utils_1 = require("./utils");
const utils_1 = require("./lib/utils");
const cyclic_register_1 = require("./cyclic-register");
const color_1 = require("./color");
var access_points_updater_1 = require("./access-points-updater");
const color_1 = require("./lib/color");
var access_points_updater_1 = require("./access-points/access-points-updater");
Object.defineProperty(exports, "accessPointsUpdater", { enumerable: true, get: function () { return access_points_updater_1.accessPointsUpdater; } });

@@ -16,0 +16,0 @@ const defaultGetConsulUIAddress = (serviceId) => {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getRegisterConfig = exports.getServiceID = void 0;
const utils_1 = require("./utils");
const fqdn_1 = require("./fqdn");
const utils_1 = require("./lib/utils");
const fqdn_1 = require("./lib/fqdn");
const constants_1 = require("./constants");

@@ -7,0 +7,0 @@ const getServiceID = (name, instance, projectId = '') => {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getFQDNCached = exports.getFQDN = exports.prepareConsulAPI = exports.getConsulApiCached = exports.getServiceID = exports.getRegisterConfig = exports.getAPI = exports.accessPointsUpdater = exports.AccessPoints = void 0;
var access_points_1 = require("./access-points");
var access_points_1 = require("./access-points/access-points");
Object.defineProperty(exports, "AccessPoints", { enumerable: true, get: function () { return access_points_1.AccessPoints; } });
var access_points_updater_1 = require("./access-points-updater");
var access_points_updater_1 = require("./access-points/access-points-updater");
Object.defineProperty(exports, "accessPointsUpdater", { enumerable: true, get: function () { return access_points_updater_1.accessPointsUpdater; } });

@@ -16,5 +16,5 @@ var get_api_1 = require("./get-api");

Object.defineProperty(exports, "prepareConsulAPI", { enumerable: true, get: function () { return prepare_consul_api_1.prepareConsulAPI; } });
var fqdn_1 = require("./fqdn");
var fqdn_1 = require("./lib/fqdn");
Object.defineProperty(exports, "getFQDN", { enumerable: true, get: function () { return fqdn_1.getFQDN; } });
Object.defineProperty(exports, "getFQDNCached", { enumerable: true, get: function () { return fqdn_1.getFQDNCached; } });
//# sourceMappingURL=index.js.map

@@ -10,10 +10,10 @@ "use strict";

const consulUtils = require("consul/lib/utils.js");
const color_1 = require("./color");
const curl_text_1 = require("./curl-text");
const http_request_text_1 = require("./http-request-text");
const logger_stub_1 = require("./logger-stub");
const fqdn_1 = require("./fqdn");
const color_1 = require("./lib/color");
const curl_text_1 = require("./lib/curl-text");
const http_request_text_1 = require("./lib/http-request-text");
const logger_stub_1 = require("./lib/logger-stub");
const fqdn_1 = require("./lib/fqdn");
const constants_1 = require("./constants");
const utils_1 = require("./utils");
const hash_1 = require("./hash");
const utils_1 = require("./lib/utils");
const hash_1 = require("./lib/hash");
const mutex = new async_mutex_1.Mutex();

@@ -20,0 +20,0 @@ const dbg = { on: constants_1.CONSUL_DEBUG_ON, curl: /af-consul:curl/i.test(constants_1.DEBUG) };

// noinspection JSUnusedGlobalSymbols
import loggerStub from './logger-stub';
import { cyan, green, reset } from './color';
import { toMills } from './utils';
import loggerStub from './lib/logger-stub';
import { cyan, green, reset } from './lib/color';
import { toMills } from './lib/utils';
import { FORCE_EVERY_REGISTER_ATTEMPT } from './constants';

@@ -6,0 +6,0 @@ const prefix = 'CONSUL-REG:';

@@ -5,8 +5,8 @@ /* eslint-disable no-console */

import { CONSUL_DEBUG_ON, MAX_API_CACHED, PREFIX } from './constants';
import { getConfigHash } from './hash';
import { getConfigHash } from './lib/hash';
import { getRegisterConfig } from './get-register-config';
import { minimizeCache } from './utils';
import { minimizeCache } from './lib/utils';
import { getRegisterCyclic } from './cyclic-register';
import { magenta, reset, yellow } from './color';
export { accessPointsUpdater } from './access-points-updater';
import { magenta, reset, yellow } from './lib/color';
export { accessPointsUpdater } from './access-points/access-points-updater';
const defaultGetConsulUIAddress = (serviceId) => {

@@ -13,0 +13,0 @@ const { NODE_ENV, CONSUL_UI_HOST, CONSUL_DC_PROD, CONSUL_DC_DEV } = process.env;

@@ -1,3 +0,3 @@

import { getPackageJson, parseMeta, parseTags, removeAroundQuotas } from './utils';
import { getFQDNCached } from './fqdn';
import { getPackageJson, parseMeta, parseTags, removeAroundQuotas } from './lib/utils';
import { getFQDNCached } from './lib/fqdn';
import { PREFIX } from './constants';

@@ -4,0 +4,0 @@ export const getServiceID = (name, instance, projectId = '') => {

@@ -1,7 +0,7 @@

export { AccessPoints } from './access-points';
export { accessPointsUpdater } from './access-points-updater';
export { AccessPoints } from './access-points/access-points';
export { accessPointsUpdater } from './access-points/access-points-updater';
export { getAPI } from './get-api';
export { getRegisterConfig, getServiceID } from './get-register-config';
export { getConsulApiCached, prepareConsulAPI } from './prepare-consul-api';
export { getFQDN, getFQDNCached } from './fqdn';
export { getFQDN, getFQDNCached } from './lib/fqdn';
//# sourceMappingURL=index.js.map

@@ -7,10 +7,10 @@ /* eslint-disable no-console */

import * as consulUtils from 'consul/lib/utils.js';
import { blue, cyan, magenta, reset, yellow } from './color';
import getCurl from './curl-text';
import getHttpRequestText from './http-request-text';
import loggerStub from './logger-stub';
import { getFQDNCached } from './fqdn';
import { blue, cyan, magenta, reset, yellow } from './lib/color';
import getCurl from './lib/curl-text';
import getHttpRequestText from './lib/http-request-text';
import loggerStub from './lib/logger-stub';
import { getFQDNCached } from './lib/fqdn';
import { CONSUL_DEBUG_ON, DEBUG, MAX_API_CACHED, PREFIX } from './constants';
import { minimizeCache, parseBoolean, serviceConfigDiff } from './utils';
import { getConfigHash } from './hash';
import { minimizeCache, parseBoolean, serviceConfigDiff } from './lib/utils';
import { getConfigHash } from './lib/hash';
const mutex = new Mutex();

@@ -17,0 +17,0 @@ const dbg = { on: CONSUL_DEBUG_ON, curl: /af-consul:curl/i.test(DEBUG) };

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

@@ -1,7 +0,7 @@

export { AccessPoints } from './access-points';
export { accessPointsUpdater } from './access-points-updater';
export { AccessPoints } from './access-points/access-points';
export { accessPointsUpdater } from './access-points/access-points-updater';
export { getAPI } from './get-api';
export { getRegisterConfig, getServiceID } from './get-register-config';
export { getConsulApiCached, prepareConsulAPI } from './prepare-consul-api';
export { getFQDN, getFQDNCached } from './fqdn';
export { getFQDN, getFQDNCached } from './lib/fqdn';
//# sourceMappingURL=index.d.ts.map

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

}
export interface IConfig {
export interface IAFConsulConfig {
accessPoints?: IAccessPoints;

@@ -94,3 +94,3 @@ consul: {

export interface ICLOptions {
config: IConfig;
config: IAFConsulConfig;
logger?: ILogger;

@@ -133,3 +133,3 @@ em?: EventEmitter;

agentOptions: IConsulAgentOptions;
getConsulAgentOptions: (config: IConfig) => Promise<IConsulAgentOptions>;
getConsulAgentOptions: (config: IAFConsulConfig) => Promise<IConsulAgentOptions>;
}

@@ -136,0 +136,0 @@ export interface ICyclicStartArgs {

{
"name": "af-consul",
"version": "2.0.11",
"version": "2.0.13",
"description": "A highly specialized function library",

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

// noinspection JSUnusedGlobalSymbols
import loggerStub from './logger-stub';
import loggerStub from './lib/logger-stub';
import { ICLOptions, IConsulAPI, ICyclicStartArgs, IRegisterConfig, IRegisterCyclic } from './interfaces';
import { cyan, green, reset } from './color';
import { toMills } from './utils';
import { cyan, green, reset } from './lib/color';
import { toMills } from './lib/utils';
import { FORCE_EVERY_REGISTER_ATTEMPT } from './constants';

@@ -8,0 +8,0 @@

@@ -7,9 +7,9 @@ /* eslint-disable no-console */

import { CONSUL_DEBUG_ON, MAX_API_CACHED, PREFIX } from './constants';
import { getConfigHash } from './hash';
import { getConfigHash } from './lib/hash';
import { getRegisterConfig } from './get-register-config';
import { minimizeCache } from './utils';
import { minimizeCache } from './lib/utils';
import { getRegisterCyclic } from './cyclic-register';
import { magenta, reset, yellow } from './color';
import { magenta, reset, yellow } from './lib/color';
export { accessPointsUpdater } from './access-points-updater';
export { accessPointsUpdater } from './access-points/access-points-updater';

@@ -16,0 +16,0 @@ const defaultGetConsulUIAddress = (serviceId: string): string => {

@@ -1,4 +0,4 @@

import { getPackageJson, parseMeta, parseTags, removeAroundQuotas } from './utils';
import { getPackageJson, parseMeta, parseTags, removeAroundQuotas } from './lib/utils';
import { ICLOptions, IRegisterConfig } from './interfaces';
import { getFQDNCached } from './fqdn';
import { getFQDNCached } from './lib/fqdn';
import { PREFIX } from './constants';

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

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

export { AccessPoints } from './access-points';
export { accessPointsUpdater } from './access-points-updater';
export { AccessPoints } from './access-points/access-points';
export { accessPointsUpdater } from './access-points/access-points-updater';
export { getAPI } from './get-api';
export { getRegisterConfig, getServiceID } from './get-register-config';
export { getConsulApiCached, prepareConsulAPI } from './prepare-consul-api';
export { getFQDN, getFQDNCached } from './fqdn';
export { getFQDN, getFQDNCached } from './lib/fqdn';

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

export interface IConfig {
export interface IAFConsulConfig {
accessPoints?: IAccessPoints,

@@ -112,3 +112,3 @@ consul: {

export interface ICLOptions {
config: IConfig,
config: IAFConsulConfig,
logger?: ILogger,

@@ -151,3 +151,3 @@ em?: EventEmitter,

agentOptions: IConsulAgentOptions,
getConsulAgentOptions: (config: IConfig) => Promise<IConsulAgentOptions>,
getConsulAgentOptions: (config: IAFConsulConfig) => Promise<IConsulAgentOptions>,
}

@@ -154,0 +154,0 @@

@@ -8,9 +8,9 @@ /* eslint-disable no-console */

import * as consulUtils from 'consul/lib/utils.js';
import { blue, cyan, magenta, reset, yellow } from './color';
import getCurl from './curl-text';
import getHttpRequestText from './http-request-text';
import { blue, cyan, magenta, reset, yellow } from './lib/color';
import getCurl from './lib/curl-text';
import getHttpRequestText from './lib/http-request-text';
import {
ICache,
ICLOptions,
IConfig,
IAFConsulConfig,
IConsul,

@@ -27,7 +27,7 @@ IConsulAgentOptions,

} from './interfaces';
import loggerStub from './logger-stub';
import { getFQDNCached } from './fqdn';
import loggerStub from './lib/logger-stub';
import { getFQDNCached } from './lib/fqdn';
import { CONSUL_DEBUG_ON, DEBUG, MAX_API_CACHED, PREFIX } from './constants';
import { minimizeCache, parseBoolean, serviceConfigDiff } from './utils';
import { getConfigHash } from './hash';
import { minimizeCache, parseBoolean, serviceConfigDiff } from './lib/utils';
import { getConfigHash } from './lib/hash';

@@ -43,3 +43,3 @@ const mutex = new Mutex();

const getConsulAgentOptions = async (config: IConfig): Promise<IConsulAgentOptions> => {
const getConsulAgentOptions = async (config: IAFConsulConfig): Promise<IConsulAgentOptions> => {
const { host, port, secure, token } = config.consul.agent;

@@ -46,0 +46,0 @@ const host_ = host || (await getFQDNCached()) || process.env.HOST_HOSTNAME || config.consul.service?.host || '127.0.0.1';

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

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

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

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