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

configdn-js

Package Overview
Dependencies
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

configdn-js - npm Package Compare versions

Comparing version 0.3.1 to 0.3.2

35

lib/esm/index.js

@@ -20,4 +20,6 @@ import { __awaiter, __generator } from "tslib";

this.TimerID = null;
this.firstRefresh = null;
this.hasDoneRefresh = false;
this.settings = new Settings(authKey, apiEndpoint, refreshInterval);
this.refreshConfig(true);
this.firstRefresh = this.refreshConfig(true).then(function (v) { _this.hasDoneRefresh = true; return v; });
this.lastUpdate = Date.now() / 1000;

@@ -105,14 +107,23 @@ this.TimerID = setInterval(function () {

return __generator(this, function (_a) {
if (this.fetchedConfig.has(key)) {
return [2 /*return*/, (this.fetchedConfig.get(key)["v"])];
switch (_a.label) {
case 0:
if (!!this.hasDoneRefresh) return [3 /*break*/, 2];
return [4 /*yield*/, this.firstRefresh];
case 1:
_a.sent();
_a.label = 2;
case 2:
if (this.fetchedConfig.has(key)) {
return [2 /*return*/, (this.fetchedConfig.get(key)["v"])];
}
else {
if (defaultValue !== null) {
return [2 /*return*/, defaultValue];
}
else {
throw new Error("Key not in config");
}
}
return [2 /*return*/];
}
else {
if (defaultValue !== null) {
return [2 /*return*/, defaultValue];
}
else {
throw new Error("Key not in config");
}
}
return [2 /*return*/];
});

@@ -119,0 +130,0 @@ });

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

export default "0.3.1";
export default "0.3.2";

@@ -9,2 +9,4 @@ import { Settings } from "./Settings";

private TimerID;
private firstRefresh;
private hasDoneRefresh;
/**

@@ -11,0 +13,0 @@ * Creates a new instance

@@ -23,4 +23,6 @@ "use strict";

this.TimerID = null;
this.firstRefresh = null;
this.hasDoneRefresh = false;
this.settings = new Settings_1.Settings(authKey, apiEndpoint, refreshInterval);
this.refreshConfig(true);
this.firstRefresh = this.refreshConfig(true).then(function (v) { _this.hasDoneRefresh = true; return v; });
this.lastUpdate = Date.now() / 1000;

@@ -108,14 +110,23 @@ this.TimerID = setInterval(function () {

return tslib_1.__generator(this, function (_a) {
if (this.fetchedConfig.has(key)) {
return [2 /*return*/, (this.fetchedConfig.get(key)["v"])];
switch (_a.label) {
case 0:
if (!!this.hasDoneRefresh) return [3 /*break*/, 2];
return [4 /*yield*/, this.firstRefresh];
case 1:
_a.sent();
_a.label = 2;
case 2:
if (this.fetchedConfig.has(key)) {
return [2 /*return*/, (this.fetchedConfig.get(key)["v"])];
}
else {
if (defaultValue !== null) {
return [2 /*return*/, defaultValue];
}
else {
throw new Error("Key not in config");
}
}
return [2 /*return*/];
}
else {
if (defaultValue !== null) {
return [2 /*return*/, defaultValue];
}
else {
throw new Error("Key not in config");
}
}
return [2 /*return*/];
});

@@ -122,0 +133,0 @@ });

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = "0.3.1";
exports.default = "0.3.2";
{
"name": "configdn-js",
"version": "0.3.1",
"version": "0.3.2",
"description": "ConfigDN lets you change configuration settings without deploying new code.",

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

Sorry, the diff of this file is too big to display

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