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

@configdn/configdn-js

Package Overview
Dependencies
Maintainers
2
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@configdn/configdn-js - npm Package Compare versions

Comparing version 0.1.4 to 0.1.5

dist/configdn-js.d.ts

30

package.json
{
"name": "@configdn/configdn-js",
"version": "0.1.4",
"version": "0.1.5",
"description": "ConfigDN JS Client",
"main": "dist.browser/src/index.js",
"types": "dist.browser/src/index.d.ts",
"main": "dist/configdn-js.js",
"module": "dist/configdn-js.esm.js",
"typings": "dist/configdn-js.d.ts",
"browser": {
"./dist/configdn-js.js": "./dist/configdn-js.js",
"./dist/configdn-js.esm.js": "./dist/configdn-js.esm.js"
},
"scripts": {
"build": "tsc -p tsconfig.json",
"browser" : "tsc -p tsconfig.browser.json",
"prepublish": "npm run build && npm run browser"
"prepublishOnly": "npm run build",
"build": "npm run build:clear && rollup -c --bundleConfigAsCjs",
"build:watch": "tsc -w",
"build:clear": "rimraf dist && rimraf tsconfig.tsbuildinfo"
},
"browser": {
"./dist/src/index.js": "./dist.browser/src/index.js",
"./dist/src/index.d.ts": "./dist.browser/src/index.d.ts"
},
"repository": {

@@ -31,4 +33,10 @@ "type": "git",

"devDependencies": {
"typescript": "^5.1.6"
"@rollup/plugin-node-resolve": "^13.3.0",
"rimraf": "^5.0.1",
"rollup-plugin-dts": "^4.2.2",
"rollup-plugin-esbuild": "^4.9.1",
"@rollup/plugin-json": "^6.0.0",
"ts-loader": "^9.4.4",
"typescript": "^4.1.0"
}
}
import { Settings } from './settings';
import version from '../package.json';
import axios from 'axios';

@@ -31,7 +30,6 @@ interface KeyValuePair {

async refreshConfig(errorOnFail: boolean = false): Promise<void> {
await axios.request({
await fetch(this.settings.getEndpoint() + 'public_api/v1/get_config/', {
method: 'GET',
url: this.settings.getEndpoint() + 'public_api/v1/get_config/',
headers: {
'ConfigDN-Client-Version': 'ConfigDN-JS/' + version,
'User-Agent': 'ConfigDN-JS/' + version,
'Authorization': this.settings.getAuthKey(),

@@ -41,3 +39,3 @@ 'Content-Type': 'application/json'

}).then((response) => {
const responseMap = new Map(Object.entries(response.data));
const responseMap = new Map(Object.entries(response.json()));
if (!responseMap.get('s')) {

@@ -58,3 +56,3 @@ if (errorOnFail) {

/**
* Gets the value for a key, if local congif is blank, will attempt to retrieve it first, if it's time to refresh, it will wait for refresh first
* Gets the value for a key, if local config is blank, will attempt to retrieve it first, if it's time to refresh, it will wait for refresh first
* @param key Key to get value for

@@ -61,0 +59,0 @@ * @param defaultValue Default value to return, cannot be null

@@ -7,2 +7,4 @@ {

"module": "es2015",
"declaration": false,
"declarationMap": false,
"moduleResolution": "node",

@@ -9,0 +11,0 @@ "resolveJsonModule": true,

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