Socket
Socket
Sign inDemoInstall

@opuscapita/config

Package Overview
Dependencies
Maintainers
25
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opuscapita/config - npm Package Compare versions

Comparing version 3.0.7 to 3.0.8

6

lib/ConfigClient.js

@@ -39,3 +39,3 @@ const ConfigClientBase = require('./ConfigClientBase');

config : config,
logger : config.logger || new Logger({ context : { serviceName : ConfigClientBase.serviceName } }),
logger : config.logger || new Logger({ context : { serviceName : this.serviceName } }),
cache : new Cache({ defaultExpire : Number.MAX_SAFE_INTEGER })

@@ -64,3 +64,3 @@ };

{
return `${ConfigClientBase.serviceName}/${key}`;
return `${this.serviceName}/${key}`;
}

@@ -300,5 +300,5 @@

logger : null,
serviceSecretPath : `/run/secrets/${ConfigClientBase.serviceName}-consul-key`
serviceSecretPath : `/run/secrets/${this.serviceName}-consul-key`
}
module.exports = ConfigClient;

@@ -29,3 +29,3 @@ const EventEmitter = require('events');

*/
static get serviceName()
get serviceName()
{

@@ -62,3 +62,3 @@ return serviceName;

this._watchServices(consul, (allServices) => Promise.all(allServices.map((serviceName) => this._watchServiceHealth(consul, serviceName))).catch(e => this.logger.error(e))),
this._watchKey(consul, ConfigClientBase.serviceName + '/')
this._watchKey(consul, this.serviceName + '/')
]);

@@ -158,3 +158,3 @@

{
const cacheKey = ConfigClientBase.serviceName + '.ep.' + serviceName;
const cacheKey = this.serviceName + '.ep.' + serviceName;

@@ -234,3 +234,3 @@ if(this.watches[cacheKey])

const shortKey = key.substr(key.indexOf(ConfigClientBase.serviceName) + ConfigClientBase.serviceName.length + 1);
const shortKey = key.substr(key.indexOf(this.serviceName) + this.serviceName.length + 1);

@@ -255,3 +255,3 @@ /**

{
const cacheName = ConfigClientBase.serviceName + '.ep.' + serviceName;
const cacheName = this.serviceName + '.ep.' + serviceName;
const results = await this.cache.get(cacheName);

@@ -286,3 +286,3 @@

{
const key = keys[i].substr(keys[i].indexOf(ConfigClientBase.serviceName) + ConfigClientBase.serviceName.length + 1);
const key = keys[i].substr(keys[i].indexOf(this.serviceName) + this.serviceName.length + 1);
results[key] = values[i];

@@ -289,0 +289,0 @@ }

{
"name": "@opuscapita/config",
"version": "3.0.7",
"version": "3.0.8",
"description": "Configuration API connector module for OpusCapita Business Network Portal.",

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

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