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

node-ral

Package Overview
Dependencies
Maintainers
1
Versions
96
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-ral - npm Package Compare versions

Comparing version 0.0.19 to 0.0.20

test/config/directory/idc.js

13

lib/config.js

@@ -40,3 +40,3 @@ /*

var enableUpdate = function(interval, all, cb){
interval = interval || ctx.CONFIG_UPDATE_INTERVAL;
interval = interval || ctx.updateInterval;
if (updateInterval){

@@ -152,10 +152,17 @@ clearInterval(updateInterval);

var ext = path.extname(confPath);
var name = path.basename(confPath, ext);
var data;
if (ext === '.js') {
logger.trace('load config from ' +confPath);
_.extend(confFromFile, require(confPath));
data = require(confPath);
} else if (ext === '.json') {
logger.trace('load config from ' +confPath);
var content = fs.readFileSync(confPath);
_.extend(confFromFile, JSON.parse(content.toString()));
data = JSON.parse(content.toString());
}
if (name === 'idc'){
ctx.currentIDC = data.idc.toString();
}else{
_.extend(confFromFile, data);
}
}

@@ -162,0 +169,0 @@

@@ -12,2 +12,2 @@ /*

//default config update time is 300s
module.exports.CONFIG_UPDATE_INTERVAL = 300000;
module.exports.updateInterval = 300000;

@@ -289,2 +289,3 @@ /*

ctx.currentIDC = options.currentIDC;
ctx.updateInterval = options.updateInterval;
loggerGen.options = options.logger;

@@ -291,0 +292,0 @@ options.extDir.map(RalModule.load);

{
"name": "node-ral",
"version": "0.0.19",
"version": "0.0.20",
"description": "a rpc client for node",

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

@@ -7,2 +7,3 @@ 'use strict';

var RalModule = require('../lib/ralmodule.js');
var ctx = require('../lib/ctx.js');

@@ -83,3 +84,4 @@ RalModule.load(__dirname + path.sep + '../lib/ext');

confs.should.containEql('bookService', 'bookServiceBNS', 'bookListService', 'bookListServiceWithCUI');
ctx.currentIDC.should.be.equal('tc');
});
});
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