Socket
Socket
Sign inDemoInstall

env-ci

Package Overview
Dependencies
Maintainers
1
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

env-ci - npm Package Compare versions

Comparing version 3.1.1 to 3.1.2

2

package.json
{
"name": "env-ci",
"description": "Get environment variables exposed by CI services",
"version": "3.1.1",
"version": "3.1.2",
"author": "Pierre Vanduynslager (https://github.com/pvdlg)",

@@ -6,0 +6,0 @@ "bugs": {

@@ -8,10 +8,17 @@ // https://confluence.jetbrains.com/display/TCD10/Predefined+Build+Parameters

const getProperties = env => {
const properties = env.TEAMCITY_BUILD_PROPERTIES_FILE
const buildProperties = env.TEAMCITY_BUILD_PROPERTIES_FILE
? javaProperties.of(env.TEAMCITY_BUILD_PROPERTIES_FILE)
: undefined;
const configFile = buildProperties ? buildProperties.get('teamcity.configuration.properties.file') : undefined;
const configProperties = configFile ? javaProperties.of(configFile) : configFile;
return Object.keys(PROPERTIES_MAPPING).reduce((result, key) => {
const property = properties ? properties.get(PROPERTIES_MAPPING[key]) : undefined;
return Object.assign(result, {[key]: typeof property === 'undefined' ? env[PROPERTIES_MAPPING[key]] : property});
}, {});
return Object.keys(PROPERTIES_MAPPING).reduce(
(result, key) =>
Object.assign(result, {
[key]:
(buildProperties ? buildProperties.get(PROPERTIES_MAPPING[key]) : undefined) ||
(configProperties ? configProperties.get(PROPERTIES_MAPPING[key]) : undefined),
}),
{}
);
};

@@ -18,0 +25,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