af-consul
Advanced tools
Comparing version 3.0.8 to 3.0.10
@@ -16,7 +16,8 @@ "use strict"; | ||
const getRegisterConfig = async (options) => { | ||
var _a, _b, _c; | ||
var _a, _b, _c, _d, _e; | ||
const { config, projectId = '' } = options; | ||
const { webServer } = config; | ||
// eslint-disable-next-line prefer-const | ||
let { name, instance, version, description, tags, meta, host, port } = (_b = (_a = config === null || config === void 0 ? void 0 : config.consul) === null || _a === void 0 ? void 0 : _a.service) !== null && _b !== void 0 ? _b : {}; | ||
const { host } = (_b = (_a = config === null || config === void 0 ? void 0 : config.consul) === null || _a === void 0 ? void 0 : _a.service) !== null && _b !== void 0 ? _b : {}; | ||
let { name, instance, version, description, tags, meta, port } = (_d = (_c = config === null || config === void 0 ? void 0 : config.consul) === null || _c === void 0 ? void 0 : _c.service) !== null && _d !== void 0 ? _d : {}; | ||
name = (0, utils_1.removeAroundQuotas)(name); | ||
@@ -40,5 +41,3 @@ instance = (0, utils_1.removeAroundQuotas)(instance); | ||
} | ||
meta = (0, utils_1.parseMeta)(meta, { | ||
serviceId, name, instance, address, port, | ||
}); | ||
meta = (0, utils_1.parseMeta)(meta, { serviceId, name, instance, address, port }); | ||
const metaObj = { | ||
@@ -80,3 +79,3 @@ host: address, | ||
}; | ||
const check = { ...(((_c = config.consul) === null || _c === void 0 ? void 0 : _c.check) || {}) }; | ||
const check = { ...(((_e = config.consul) === null || _e === void 0 ? void 0 : _e.check) || {}) }; | ||
[['name', `Service '${name}-${instance}'`], ['timeout', '5s'], ['deregistercriticalserviceafter', '3m']] | ||
@@ -83,0 +82,0 @@ .forEach(([n, v]) => { |
@@ -12,7 +12,8 @@ import { getPackageJson, parseMeta, parseTags, removeAroundQuotas } from './lib/utils'; | ||
export const getRegisterConfig = async (options) => { | ||
var _a, _b, _c; | ||
var _a, _b, _c, _d, _e; | ||
const { config, projectId = '' } = options; | ||
const { webServer } = config; | ||
// eslint-disable-next-line prefer-const | ||
let { name, instance, version, description, tags, meta, host, port } = (_b = (_a = config === null || config === void 0 ? void 0 : config.consul) === null || _a === void 0 ? void 0 : _a.service) !== null && _b !== void 0 ? _b : {}; | ||
const { host } = (_b = (_a = config === null || config === void 0 ? void 0 : config.consul) === null || _a === void 0 ? void 0 : _a.service) !== null && _b !== void 0 ? _b : {}; | ||
let { name, instance, version, description, tags, meta, port } = (_d = (_c = config === null || config === void 0 ? void 0 : config.consul) === null || _c === void 0 ? void 0 : _c.service) !== null && _d !== void 0 ? _d : {}; | ||
name = removeAroundQuotas(name); | ||
@@ -36,5 +37,3 @@ instance = removeAroundQuotas(instance); | ||
} | ||
meta = parseMeta(meta, { | ||
serviceId, name, instance, address, port, | ||
}); | ||
meta = parseMeta(meta, { serviceId, name, instance, address, port }); | ||
const metaObj = { | ||
@@ -76,3 +75,3 @@ host: address, | ||
}; | ||
const check = { ...(((_c = config.consul) === null || _c === void 0 ? void 0 : _c.check) || {}) }; | ||
const check = { ...(((_e = config.consul) === null || _e === void 0 ? void 0 : _e.check) || {}) }; | ||
[['name', `Service '${name}-${instance}'`], ['timeout', '5s'], ['deregistercriticalserviceafter', '3m']] | ||
@@ -79,0 +78,0 @@ .forEach(([n, v]) => { |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import Consul from 'consul'; | ||
import EventEmitter from 'events'; | ||
import { AccessPoints } from './access-points/access-points'; | ||
export declare type Maybe<T> = T | undefined; | ||
export declare type Nullable<T> = T | null; | ||
export declare type TBooleanLike = 'true' | 'false' | 'yes' | 'no' | '1' | '0' | 1 | 0; | ||
export type Maybe<T> = T | undefined; | ||
export type Nullable<T> = T | null; | ||
export type TBooleanLike = 'true' | 'false' | 'yes' | 'no' | '1' | '0' | 1 | 0; | ||
export interface ISocketInfo { | ||
@@ -28,3 +29,3 @@ host: string; | ||
} | ||
export declare type TRegisterType = 'if-not-registered' | 'if-config-differ' | 'force'; | ||
export type TRegisterType = 'if-not-registered' | 'if-config-differ' | 'force'; | ||
export interface IRegisterOptions { | ||
@@ -35,3 +36,3 @@ registerType?: TRegisterType; | ||
} | ||
export declare type TRegisterResult = 'already' | 'just' | false; | ||
export type TRegisterResult = 'already' | 'just' | false; | ||
export interface IConsul extends Consul.Consul { | ||
@@ -52,3 +53,3 @@ _ext(eventName: 'onRequest' | 'onResponse', callback: (request: any, next: Function) => void): void; | ||
} | ||
export declare type TLoggerMethod = (...args: unknown[]) => any; | ||
export type TLoggerMethod = (...args: unknown[]) => any; | ||
export interface ILogger { | ||
@@ -120,4 +121,4 @@ silly: TLoggerMethod; | ||
} | ||
export declare type TCommonFnResult = any; | ||
declare type TMethod<T> = (...args: any[]) => T; | ||
export type TCommonFnResult = any; | ||
type TMethod<T> = (...args: any[]) => T; | ||
export interface ICLOptions { | ||
@@ -124,0 +125,0 @@ config: IAFConfig; |
@@ -1,3 +0,3 @@ | ||
declare const getCurlText: (req: any, isPapi?: boolean | undefined) => string; | ||
declare const getCurlText: (req: any, isPapi?: boolean) => string; | ||
export default getCurlText; | ||
//# sourceMappingURL=curl-text.d.ts.map |
@@ -1,3 +0,3 @@ | ||
export declare const getFQDN: (h?: string | undefined, withError?: boolean | undefined, onlyDomain?: boolean | undefined) => Promise<string | null>; | ||
export declare const getFQDN: (h?: string, withError?: boolean, onlyDomain?: boolean) => Promise<string | null>; | ||
export declare const getFQDNCached: (...args: any[]) => Promise<string | null>; | ||
//# sourceMappingURL=fqdn.d.ts.map |
{ | ||
"name": "af-consul", | ||
"version": "3.0.8", | ||
"version": "3.0.10", | ||
"description": "A highly specialized function library", | ||
@@ -11,3 +11,3 @@ "main": "./dist/cjs/src/index.js", | ||
"engines": { | ||
"node": ">=10" | ||
"node": ">=12" | ||
}, | ||
@@ -18,41 +18,36 @@ "scripts": { | ||
"test:access-points": "jest --config jest.config.js", | ||
"lint": "eslint . --ext .ts", | ||
"lint:fix": "eslint . --ext .ts --fix", | ||
"release": "np --yolo", | ||
"clean": "shx rm -rf dist/*", | ||
"build": "tsc -b tsconfig.json tsconfig.esm.json tsconfig.types.json", | ||
"eslint": "eslint . --ext .ts", | ||
"eslint-fix": "eslint . --ext .ts --fix", | ||
"release": "np --yolo", | ||
"prepack": "npm run clean && npm run build" | ||
"cb": "npm run clean && npm run build" | ||
}, | ||
"dependencies": { | ||
"async-mutex": "^0.4.0", | ||
"consul": "^0.40.0", | ||
"debug": "^4.3.4", | ||
"lodash": "^4.17.21", | ||
"xxhashjs": "^0.2.2" | ||
}, | ||
"devDependencies": { | ||
"@jest/test-sequencer": "^27.4.6", | ||
"@jest/test-sequencer": "^29.3.1", | ||
"@types/consul": "^0.40.0", | ||
"@types/debug": "^4.1.7", | ||
"@types/jest": "^27.4.0", | ||
"@types/lodash": "^4.14.178", | ||
"@types/node": "^17.0.8", | ||
"@types/jest": "^29.2.3", | ||
"@types/lodash": "^4.14.189", | ||
"@types/node": "^18.11.9", | ||
"@types/xxhashjs": "^0.2.2", | ||
"@typescript-eslint/eslint-plugin": "^5.9.1", | ||
"@typescript-eslint/parser": "^5.9.1", | ||
"af-logger": "^2.0.17", | ||
"config": "^3.3.7", | ||
"dotenv": "^11.0.0", | ||
"eslint": "^8.6.0", | ||
"eslint-config-airbnb-base": "^15.0.0", | ||
"eslint-plugin-import": "^2.25.4", | ||
"eslint-plugin-prefer-arrow": "^1.2.3", | ||
"jest": "^27.4.7", | ||
"np": "^7.6.0", | ||
"af-logger": "^2.0.24", | ||
"config": "^3.3.8", | ||
"dotenv": "^16.0.3", | ||
"eslint-config-af-22": "^1.0.8", | ||
"jest": "^29.3.1", | ||
"np": "^7.6.2", | ||
"shx": "^0.3.4", | ||
"ts-jest": "^27.1.2", | ||
"ts-node": "^10.4.0", | ||
"tslog": "^3.3.1", | ||
"typescript": "^4.5.4" | ||
"ts-jest": "^29.0.3", | ||
"ts-node": "^10.9.1", | ||
"tslog": "^3.3.4", | ||
"typescript": "^4.9.3" | ||
}, | ||
"dependencies": { | ||
"async-mutex": "^0.3.2", | ||
"consul": "^0.40.0", | ||
"debug": "^4.3.3", | ||
"lodash": "^4.17.21", | ||
"xxhashjs": "^0.2.2" | ||
}, | ||
"np": { | ||
@@ -59,0 +54,0 @@ "yarn": false, |
@@ -95,1 +95,23 @@ ## Not of interest to third party users | ||
``` | ||
## Идентификаторы отладки | ||
AP-UPDATER - access-points-updater: | ||
- Polling ${CONSUL_ID} | ||
- The data is up-to-date ${CONSUL_ID} | ||
af-consul | ||
`${yellow} REGISTER CONFIG:\n${JSON.stringify(registerConfig, undefined, 2)}\n${reset}` | ||
`CONSUL AGENT OPTIONS:\n${JSON.stringify(fullConsulAgentOptions, undefined, 2)}` | ||
`${rqId}HTTP Status: ${statusCode}` | ||
`${rqId}res.body not found! res: ${res}` | ||
`No info about service ID ${cyan}${serviceName}` | ||
`${prefixG} Skip registration check after health check` | ||
af-consul:curl | ||
const msg = dbg.curl ? getCurl(request, true) : getHttpRequestText(request); | ||
`[${request._id_}] ${yellow}${msg}${reset}` | ||
af-consul:reg | ||
`${PREFIX}: updated ${updatedCount.length} access point(s)` | ||
`${prefixG} Service ${cyan}${registerConfig.id}${reset} registration check...` |
@@ -29,3 +29,3 @@ /* eslint-disable no-console */ | ||
// A stub in case such a function is not set for the access point in the configuration | ||
function retrieveProps(accessPoint: IAccessPoint, host: string, meta?: any) { | ||
function retrieveProps (accessPoint: IAccessPoint, host: string, meta?: any) { | ||
const port = Number(meta?.port) || accessPoint.port; | ||
@@ -36,5 +36,5 @@ return { host, port }; | ||
// Служит для исключения повторного опроса consulID в пределах одного цикла updateAccessPoints | ||
let oneUpdateCache: {[consulServiceName: string] : IConsulHealthServiceInfo[]} = {}; | ||
let oneUpdateCache: { [consulServiceName: string]: IConsulHealthServiceInfo[] } = {}; | ||
export async function updateAccessPoint(clOptions: ICLOptions, accessPoint: IAccessPoint): Promise<-2 | -1 | 0 | 1> { | ||
export async function updateAccessPoint (clOptions: ICLOptions, accessPoint: IAccessPoint): Promise<-2 | -1 | 0 | 1> { | ||
if (!accessPoint.updateIntervalIfSuccessMillis) { | ||
@@ -97,3 +97,3 @@ accessPoint.updateIntervalIfSuccessMillis = UPDATE_INTERVAL_IF_CONSUL_REGISTER_SUCCESS_MILLIS; | ||
export async function updateAccessPoints(clOptions: ICLOptions): Promise<boolean> { | ||
export async function updateAccessPoints (clOptions: ICLOptions): Promise<boolean> { | ||
const accessPoints = Object.values(<IAccessPoints>clOptions.config.accessPoints).filter((ap: any) => ap?.isAP); | ||
@@ -120,3 +120,3 @@ const result = []; | ||
_logger: loggerStub, | ||
start(clOptions: ICLOptions, updateInterval: number = 10_000): number { | ||
start (clOptions: ICLOptions, updateInterval: number = 10_000): number { | ||
if (this.isStarted) { | ||
@@ -144,3 +144,3 @@ return 0; | ||
}, | ||
async waitForAnyUpdated(timeout: number = 10_000): Promise<boolean> { | ||
async waitForAnyUpdated (timeout: number = 10_000): Promise<boolean> { | ||
const start = Date.now(); | ||
@@ -153,3 +153,3 @@ while (!this.isAnyUpdated && (Date.now() - start < timeout)) { | ||
}, | ||
stop() { | ||
stop () { | ||
clearTimeout(this._timerId); | ||
@@ -156,0 +156,0 @@ this.isStarted = false; |
@@ -28,3 +28,3 @@ /* eslint-disable no-await-in-loop */ | ||
constructor(accessPoints: IAccessPoints, logger?: ILogger) { | ||
constructor (accessPoints: IAccessPoints, logger?: ILogger) { | ||
this[_logger_] = logger || loggerStub; | ||
@@ -41,7 +41,7 @@ if (!accessPoints) { | ||
static normalizePort(port: unknown) { | ||
static normalizePort (port: unknown) { | ||
return Number(port) || null; | ||
} | ||
static normalizeProtocol(protocol: string | null) { | ||
static normalizeProtocol (protocol: string | null) { | ||
if (!protocol || !/^https?$/i.test(protocol)) { | ||
@@ -53,3 +53,3 @@ protocol = 'http'; | ||
static normalizeValue(propName: string, propValue: any) { | ||
static normalizeValue (propName: string, propValue: any) { | ||
switch (propName) { | ||
@@ -65,3 +65,3 @@ case 'port': | ||
static getPureProps(accessPointSource: Record<string, any>): IAccessPoint { | ||
static getPureProps (accessPointSource: Record<string, any>): IAccessPoint { | ||
const accessPoint = Object.create(null); | ||
@@ -81,3 +81,3 @@ Object.entries(accessPointSource).forEach(([propName, propValue]) => { | ||
addAP(apKey: string, apData: any): Maybe<IAccessPoint> { | ||
addAP (apKey: string, apData: any): Maybe<IAccessPoint> { | ||
if (!apData || !isObject(apData)) { | ||
@@ -104,3 +104,3 @@ return undefined; | ||
setAP(apKey: string, apData: Record<string, any> | null): Maybe<IAccessPoint> { | ||
setAP (apKey: string, apData: Record<string, any> | null): Maybe<IAccessPoint> { | ||
if (!apData) { | ||
@@ -151,3 +151,3 @@ return undefined; | ||
getAP(accessPointKey: string): Maybe<IAccessPoint> { | ||
getAP (accessPointKey: string): Maybe<IAccessPoint> { | ||
if (accessPointKey) { | ||
@@ -167,3 +167,3 @@ const accessPoint = this[accessPointKey]; | ||
*/ | ||
get(accessPointKey?: string) { | ||
get (accessPointKey?: string) { | ||
if (accessPointKey) { | ||
@@ -170,0 +170,0 @@ const accessPoint = this[accessPointKey]; |
@@ -0,1 +1,2 @@ | ||
/* eslint-disable no-console */ | ||
// noinspection JSUnusedGlobalSymbols | ||
@@ -5,5 +6,5 @@ | ||
import { ICLOptions, IConsulAPI, ICyclicStartArgs, IRegisterConfig, IRegisterCyclic } from './interfaces'; | ||
import { cyan, green, reset } from './lib/color'; | ||
import { cyan, green, magenta, reset } from './lib/color'; | ||
import { toMills } from './lib/utils'; | ||
import { FORCE_EVERY_REGISTER_ATTEMPT } from './constants'; | ||
import { CONSUL_DEBUG_ON, DEBUG, FORCE_EVERY_REGISTER_ATTEMPT, PREFIX } from './constants'; | ||
@@ -15,2 +16,9 @@ const prefix = 'CONSUL-REG:'; | ||
const isDebugReg = CONSUL_DEBUG_ON && /\baf-consul:reg\b/i.test(DEBUG); | ||
const debug = (msg: string) => { | ||
if (isDebugReg) { | ||
console.log(`${magenta}${PREFIX}${reset}: ${msg}`); | ||
} | ||
}; | ||
export const getRegisterCyclic = ( | ||
@@ -29,3 +37,3 @@ opts: ICLOptions, | ||
async start(cyclicStartArgs?: ICyclicStartArgs): Promise<-1 | 0 | 1> { | ||
async start (cyclicStartArgs?: ICyclicStartArgs): Promise<-1 | 0 | 1> { | ||
const { | ||
@@ -59,3 +67,3 @@ cLOptions, | ||
if (this.isStarted) { | ||
this._logger.silly(`${prefixG} Service ${cyan}${registerConfig.id}${reset} registration check...`); | ||
debug(`${prefixG} Service ${cyan}${registerConfig.id}${reset} registration check...`); | ||
} | ||
@@ -73,3 +81,3 @@ await consulApi.registerService(registerConfig, { | ||
} else { | ||
this._logger.silly(`${prefixG} Skip registration check after health check`); | ||
debug(`${prefixG} Skip registration check after health check`); | ||
} | ||
@@ -86,3 +94,3 @@ clearTimeout(this._timerId); | ||
}, | ||
stop() { | ||
stop () { | ||
clearTimeout(this._timerId); | ||
@@ -89,0 +97,0 @@ this.isStarted = false; |
@@ -19,3 +19,4 @@ import { getPackageJson, parseMeta, parseTags, removeAroundQuotas } from './lib/utils'; | ||
// eslint-disable-next-line prefer-const | ||
let { name, instance, version, description, tags, meta, host, port } = config?.consul?.service ?? {}; | ||
const { host } = config?.consul?.service ?? {}; | ||
let { name, instance, version, description, tags, meta, port } = config?.consul?.service ?? {}; | ||
name = removeAroundQuotas(name); | ||
@@ -42,5 +43,3 @@ instance = removeAroundQuotas(instance); | ||
meta = parseMeta(meta, { | ||
serviceId, name, instance, address, port, | ||
}); | ||
meta = parseMeta(meta, { serviceId, name, instance, address, port }); | ||
const metaObj: Record<string, string> = { | ||
@@ -47,0 +46,0 @@ host: address, |
class ToCurl { | ||
private readonly request: any; | ||
constructor(req: any, isPapi?: boolean) { | ||
constructor (req: any, isPapi?: boolean) { | ||
if (isPapi) { | ||
@@ -27,3 +27,3 @@ const { hostname, port, path, method, headers } = req.req; | ||
getHeaders() { | ||
getHeaders () { | ||
let { headers } = this.request; | ||
@@ -55,7 +55,7 @@ let curlHeaders = ''; | ||
getMethod() { | ||
getMethod () { | ||
return `-X ${this.request.method.toUpperCase()}`; | ||
} | ||
getBody() { | ||
getBody () { | ||
const r = this.request; | ||
@@ -77,3 +77,3 @@ const { data } = r; | ||
getUrl() { | ||
getUrl () { | ||
if (this.request.baseURL) { | ||
@@ -91,3 +91,3 @@ const baseUrl = this.request.baseURL; | ||
getQueryString() { | ||
getQueryString () { | ||
if (this.request.paramsSerializer) { | ||
@@ -105,7 +105,7 @@ const params = this.request.paramsSerializer(this.request.params); | ||
getBuiltURL() { | ||
getBuiltURL () { | ||
return (this.getUrl() + this.getQueryString()).trim(); | ||
} | ||
getCURL() { | ||
getCURL () { | ||
return `curl -i ${this.getMethod()} "${this.getBuiltURL()}" ${this.getHeaders()} ${this.getBody()}`; | ||
@@ -112,0 +112,0 @@ } |
@@ -140,3 +140,3 @@ /* eslint-disable no-console */ | ||
function common(fnName: string, { | ||
function common (fnName: string, { | ||
consulInstance, | ||
@@ -183,3 +183,3 @@ agentOptions, | ||
// Returns the services the agent is managing. - список сервисов на этом агенте | ||
async agentServiceList(apiArgs: IAPIArgs = {}) { | ||
async agentServiceList (apiArgs: IAPIArgs = {}) { | ||
// ### GET http://<*.host>:<*.port>/v1/agent/services | ||
@@ -193,3 +193,3 @@ if (!apiArgs.consulInstance && !apiArgs.agentOptions) { | ||
// Lists services in a given datacenter | ||
async catalogServiceList(dc: string, apiArgs: IAPIArgs = {}): Promise<{ [serviceId: string]: string[] }> { | ||
async catalogServiceList (dc: string, apiArgs: IAPIArgs = {}): Promise<{ [serviceId: string]: string[] }> { | ||
// ### GET https://<context.host>:<context.port>/v1/catalog/services?dc=<dc> | ||
@@ -205,3 +205,3 @@ if (!apiArgs.consulInstance && !apiArgs.agentOptions) { | ||
// Returns the nodes and health info of a service | ||
async consulHealthService(apiArgs: IAPIArgs): Promise<IConsulHealthServiceInfo[]> { | ||
async consulHealthService (apiArgs: IAPIArgs): Promise<IConsulHealthServiceInfo[]> { | ||
// ### GET https://<context.host>:<context.port>/v1/health/service/<apiArgs.options.serviceId>?passing=true&dc=<apiArgs.options.dc || context.dc> | ||
@@ -219,3 +219,3 @@ const { service: serviceId, dc } = apiArgs.options; | ||
async getServiceInfo(serviceName: string): Promise<Maybe<IConsulServiceInfo>> { | ||
async getServiceInfo (serviceName: string): Promise<Maybe<IConsulServiceInfo>> { | ||
// ### GET https://<context.host>:<context.port>/v1/health/service/<apiArgs.options.serviceId>?passing=true&dc=<apiArgs.options.dc || context.dc> | ||
@@ -227,3 +227,3 @@ const result = await this.consulHealthService({ options: { service: serviceName, passing: true } }); | ||
async getServiceSocket(serviceName: string, defaults: ISocketInfo): Promise<ISocketInfo> { | ||
async getServiceSocket (serviceName: string, defaults: ISocketInfo): Promise<ISocketInfo> { | ||
if (process.env.USE_DEFAULT_SERVICE_SOCKET) { | ||
@@ -254,3 +254,3 @@ return defaults; | ||
// Registers a new service. | ||
async agentServiceRegister(options: IRegisterConfig, withError: boolean = false): Promise<boolean> { | ||
async agentServiceRegister (options: IRegisterConfig, withError: boolean = false): Promise<boolean> { | ||
// ### PUT http://<reg.host>:<reg.port>/v1/agent/service/register | ||
@@ -265,3 +265,3 @@ return common('agent.service.register', { | ||
// Deregister a service. | ||
async agentServiceDeregister(serviceId: string, apiArgs: IAPIArgs = {}): Promise<boolean> { | ||
async agentServiceDeregister (serviceId: string, apiArgs: IAPIArgs = {}): Promise<boolean> { | ||
// ### PUT http://<reg.host>:<reg.port>/v1/agent/service/deregister/<serviceId> | ||
@@ -276,3 +276,3 @@ apiArgs.options = serviceId; | ||
async deregisterIfNeed(serviceId: string, agentOptions?: IConsulAgentOptions): Promise<boolean> { | ||
async deregisterIfNeed (serviceId: string, agentOptions?: IConsulAgentOptions): Promise<boolean> { | ||
const apiArgs: IAPIArgs = { agentOptions }; | ||
@@ -309,3 +309,3 @@ const healthServiceInfo = await this.checkIfServiceRegistered(serviceId, apiArgs); | ||
async checkIfServiceRegistered(serviceIdOrName: string, apiArgs: IAPIArgs = {}): Promise<Maybe<IConsulHealthServiceInfo>> { | ||
async checkIfServiceRegistered (serviceIdOrName: string, apiArgs: IAPIArgs = {}): Promise<Maybe<IConsulHealthServiceInfo>> { | ||
if (!apiArgs.consulInstance && !apiArgs.agentOptions) { | ||
@@ -318,3 +318,3 @@ apiArgs.consulInstance = getConsulInstanceByServiceID(serviceIdOrName); | ||
async registerService(registerConfig: IRegisterConfig, registerOptions: IRegisterOptions): Promise<TRegisterResult> { | ||
async registerService (registerConfig: IRegisterConfig, registerOptions: IRegisterOptions): Promise<TRegisterResult> { | ||
const serviceId = registerConfig.id || registerConfig.name; | ||
@@ -321,0 +321,0 @@ const srv = `Service '${cyan}${serviceId}${reset}'`; |
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
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
312471
18
4537
117
+ Addedasync-mutex@0.4.1(transitive)
- Removedasync-mutex@0.3.2(transitive)
Updatedasync-mutex@^0.4.0
Updateddebug@^4.3.4