Socket
Socket
Sign inDemoInstall

@smithy/shared-ini-file-loader

Package Overview
Dependencies
Maintainers
2
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@smithy/shared-ini-file-loader - npm Package Compare versions

Comparing version 2.2.6 to 2.2.7

11

dist-cjs/getConfigData.js

@@ -8,10 +8,11 @@ "use strict";

.filter(([key]) => {
const sections = key.split(loadSharedConfigFiles_1.CONFIG_PREFIX_SEPARATOR);
if (sections.length === 2 && Object.values(types_1.IniSectionType).includes(sections[0])) {
return true;
const indexOfSeparator = key.indexOf(loadSharedConfigFiles_1.CONFIG_PREFIX_SEPARATOR);
if (indexOfSeparator === -1) {
return false;
}
return false;
return Object.values(types_1.IniSectionType).includes(key.substring(0, indexOfSeparator));
})
.reduce((acc, [key, value]) => {
const updatedKey = key.startsWith(types_1.IniSectionType.PROFILE) ? key.split(loadSharedConfigFiles_1.CONFIG_PREFIX_SEPARATOR)[1] : key;
const indexOfSeparator = key.indexOf(loadSharedConfigFiles_1.CONFIG_PREFIX_SEPARATOR);
const updatedKey = key.substring(0, indexOfSeparator) === types_1.IniSectionType.PROFILE ? key.substring(indexOfSeparator + 1) : key;
acc[updatedKey] = value;

@@ -18,0 +19,0 @@ return acc;

@@ -5,10 +5,11 @@ import { IniSectionType } from "@smithy/types";

.filter(([key]) => {
const sections = key.split(CONFIG_PREFIX_SEPARATOR);
if (sections.length === 2 && Object.values(IniSectionType).includes(sections[0])) {
return true;
const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR);
if (indexOfSeparator === -1) {
return false;
}
return false;
return Object.values(IniSectionType).includes(key.substring(0, indexOfSeparator));
})
.reduce((acc, [key, value]) => {
const updatedKey = key.startsWith(IniSectionType.PROFILE) ? key.split(CONFIG_PREFIX_SEPARATOR)[1] : key;
const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR);
const updatedKey = key.substring(0, indexOfSeparator) === IniSectionType.PROFILE ? key.substring(indexOfSeparator + 1) : key;
acc[updatedKey] = value;

@@ -15,0 +16,0 @@ return acc;

{
"name": "@smithy/shared-ini-file-loader",
"version": "2.2.6",
"version": "2.2.7",
"dependencies": {

@@ -5,0 +5,0 @@ "@smithy/types": "^2.7.0",

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