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.12 to 0.0.13

16

dist/index.js

@@ -47,7 +47,13 @@ 'use strict';

function injectProcessEnv(response) {
Object.keys(response).forEach(function (key) {
if (key.startsWith('ENV-') && typeof response[key] === 'string') {
process.env[key.substring(key.indexOf('ENV-') + 4)] = response[key];
}
});
if (response['ENV']) {
Object.keys(response['ENV']).forEach(function (key) {
process.env[key] = response['ENV'][key];
});
} else {
Object.keys(response).forEach(function (key) {
if (key.startsWith('ENV-') && typeof response[key] === 'string') {
process.env[key.substring(key.indexOf('ENV-') + 4)] = response[key];
}
});
}
}

@@ -54,0 +60,0 @@

{
"name": "g2-ops-config",
"version": "0.0.12",
"version": "0.0.13",
"description": "To fetch and maintain cloud configs for difference projects",

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

@@ -37,8 +37,14 @@ // @flow

function injectProcessEnv(response: { [string]: mixed }) {
Object.keys(response).forEach(key => {
if (key.startsWith('ENV-') && typeof response[key] === 'string') {
process.env[key.substring(key.indexOf('ENV-') + 4)] = response[key]
}
})
function injectProcessEnv(response: { [string]: string | { [string]: mixed } }) {
if (response['ENV']) {
Object.keys(response['ENV']).forEach(key => {
process.env[key] = response['ENV'][key]
})
} else {
Object.keys(response).forEach(key => {
if (key.startsWith('ENV-') && typeof response[key] === 'string') {
process.env[key.substring(key.indexOf('ENV-') + 4)] = response[key]
}
})
}
}

@@ -45,0 +51,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