Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

g2-ops-config

Package Overview
Dependencies
Maintainers
3
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.24 to 0.0.25

yarn.lock

14

dist/index.js

@@ -30,8 +30,8 @@ 'use strict';

var configParams = exports.configParams = {
application: process.env.SPRING_APPLICATION_NAME || 'opsportal-dtle-uk',
endpoint: (process.env.CONFIGSERVER_NAME || 'c-config-dev4.copart.com').replace(/http.*:\/\//g, ''),
profiles: process.env.PROFILES ? process.env.PROFILES.split(',') : ['c-dev4', 'kubernetes'],
application: process.env.SPRING_APPLICATION_NAME,
endpoint: process.env.CONFIGSERVER_NAME.replace(/http.*:\/\//g, ''),
profiles: process.env.PROFILES.split(','),
auth: {
user: process.env.CONFIGSERVER_USER || 'user',
pass: process.env.CONFIGSERVER_PASSWORD || 'copart'
user: process.env.CONFIGSERVER_USER,
pass: process.env.CONFIGSERVER_PASSWORD
}

@@ -46,2 +46,6 @@

var application = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : configParams.application;
if (!configParams.application || !configParams.endpoint || !configParams.profiles) {
throw new Error('process.env[application || endpoint || profiles] are not present');
}
return 'http://' + configParams.auth.user + ':' + configParams.auth.pass + '@' + configParams.endpoint + '/' + application + '/' + profile;

@@ -48,0 +52,0 @@ };

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

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

@@ -27,3 +27,5 @@ # g2-ops-config

// application.yaml
ENV-SESSION_ID='secret'
ENV:
SESSION_ID = 'secret'
BABEL_ENV = 'development'
```

@@ -44,2 +46,3 @@

console.log(process.env.SESSION_ID) // should print 'secret'
console.log(process.env.BABEL_ENV) // should print 'development'
```

@@ -46,0 +49,0 @@

@@ -18,8 +18,8 @@ // @flow

export const configParams: ConfigServerParamsType = {
application: process.env.SPRING_APPLICATION_NAME || 'opsportal-dtle-uk',
endpoint: (process.env.CONFIGSERVER_NAME || 'c-config-dev4.copart.com').replace(/http.*:\/\//g, ''),
profiles: process.env.PROFILES ? process.env.PROFILES.split(',') : ['c-dev4', 'kubernetes'],
application: process.env.SPRING_APPLICATION_NAME,
endpoint: (process.env.CONFIGSERVER_NAME).replace(/http.*:\/\//g, ''),
profiles: process.env.PROFILES.split(','),
auth: {
user: process.env.CONFIGSERVER_USER || 'user',
pass: process.env.CONFIGSERVER_PASSWORD || 'copart',
user: process.env.CONFIGSERVER_USER,
pass: process.env.CONFIGSERVER_PASSWORD,
},

@@ -33,4 +33,8 @@ }

*/
export const configFileURL = (profile: string, application?: string = configParams.application): string =>
`http://${configParams.auth.user}:${configParams.auth.pass}@${configParams.endpoint}/${application}/${profile}`
export const configFileURL = (profile: string, application?: string = configParams.application): string => {
if (!configParams.application || !configParams.endpoint || !configParams.profiles) {
throw new Error('process.env[application || endpoint || profiles] are not present')
}
return `http://${configParams.auth.user}:${configParams.auth.pass}@${configParams.endpoint}/${application}/${profile}`
}

@@ -37,0 +41,0 @@ function getYamlPromise(profile, application) {

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