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

g2-ops-config

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

g2-ops-config - npm Package Compare versions

Comparing version 0.0.9 to 0.0.10

README.md

9

dist/index.js

@@ -46,4 +46,13 @@ 'use strict';

function injectProcessEnv(response) {
Object.keys(response).forEach(function (key) {
if (key.startsWith('ENV') && typeof response[key] === 'string') {
process.env[key] = response[key];
}
});
}
function transformYamlResponse(responses, profiles) {
return responses.reduce(function (accu, response, index) {
injectProcessEnv(response);
return _extends({}, accu, _defineProperty({}, profiles[index], response));

@@ -50,0 +59,0 @@ }, {});

2

package.json
{
"name": "g2-ops-config",
"version": "0.0.9",
"version": "0.0.10",
"description": "To fetch and maintain cloud configs for difference projects",

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

@@ -34,7 +34,16 @@ // @flow

function getYamlPromise(profile, application) {
return axios.get(configFileURL(profile, application)).then((response) => response.data)
return axios.get(configFileURL(profile, application)).then(response => response.data)
}
function injectProcessEnv(response: { [string]: mixed }) {
Object.keys(response).forEach(key => {
if (key.startsWith('ENV') && typeof response[key] === 'string') {
process.env[key] = response[key]
}
})
}
function transformYamlResponse(responses, profiles) {
return responses.reduce((accu, response, index) => {
injectProcessEnv(response)
return {

@@ -48,4 +57,4 @@ ...accu,

function fetchConfigurations(application: string, profiles: Array<string>): Promise<Array<any>> {
const yamlPromises = profiles.map((profile) => getYamlPromise(profile, application))
return Promise.all(yamlPromises).then((data) => {
const yamlPromises = profiles.map(profile => getYamlPromise(profile, application))
return Promise.all(yamlPromises).then(data => {
return transformYamlResponse(data, profiles)

@@ -56,2 +65,1 @@ })

export default fetchConfigurations
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