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

@thinkmill/devops-env-vars

Package Overview
Dependencies
Maintainers
11
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@thinkmill/devops-env-vars - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

2

package.json
{
"name": "@thinkmill/devops-env-vars",
"version": "1.1.0",
"version": "1.1.1",
"description": "Helper functions that encapsulate our treatment of environment vars for KeystoneJS apps",

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

@@ -40,29 +40,29 @@ Devops: Environment Variables

// If not supplied, Keystone will default to localhost (ie. in dev)
MONGO_URI: { required: !flags.IN_DEVELOPMENT, default: 'mongodb://localhost/admyt-platform' },
MONGO_URI: { required: flags.IN_PRODUCTION, default: 'mongodb://localhost/admyt-platform' },
// Used to encrypt user cookies; not important in dev
JWT_TOKEN_SECRET: { required: !flags.IN_DEVELOPMENT, default: 'gottalovejwts' },
JWT_TOKEN_SECRET: { required: flags.IN_PRODUCTION, default: 'gottalovejwts' },
// When not live, allow to be defaulted to a test key
MANDRILL_API_KEY: { required: flags.IN_LIVE, default: 'testkeygoeshere' },
MANDRILL_API_KEY: { required: flags.IN_PRODUCTION, default: 'testkeygoeshere' },
// Cloudinary creds; used by Types.CloudinaryImage
CLOUDINARY_URL: { required: flags.IN_LIVE || flags.IN_STAGING, default: 'cloudinary://862989489411169:Wp74nFvzkSPGkQHgtCBH7wN4Yik@thinkmill' },
CLOUDINARY_URL: { required: flags.IN_PRODUCTION, default: 'cloudinary://862989489411169:Wp74nFvzkSPGkQHgtCBH7wN4Yik@thinkmill' },
// S3 credentials; used by Types.S3File
S3_BUCKET: { required: flags.IN_LIVE || flags.IN_STAGING },
S3_KEY: { required: flags.IN_LIVE || flags.IN_STAGING },
S3_SECRET: { required: flags.IN_LIVE || flags.IN_STAGING },
S3_BUCKET: { required: flags.IN_PRODUCTION },
S3_KEY: { required: flags.IN_PRODUCTION },
S3_SECRET: { required: flags.IN_PRODUCTION },
// Urban Airship details; used to notify users
UA_APP_KEY: { required: flags.IN_LIVE || flags.IN_STAGING },
UA_SECRET_KEY: { required: flags.IN_LIVE || flags.IN_STAGING },
UA_MASTER_KEY: { required: flags.IN_LIVE || flags.IN_STAGING },
UA_APP_KEY: { required: flags.IN_PRODUCTION },
UA_SECRET_KEY: { required: flags.IN_PRODUCTION },
UA_MASTER_KEY: { required: flags.IN_PRODUCTION },
// NewRelic app monitoring
NEW_RELIC_LICENSE_KEY: { required: flags.IN_LIVE },
NEW_RELIC_APP_NAME: { required: flags.IN_LIVE },
NEW_RELIC_LICENSE_KEY: { required: flags.IN_PRODUCTION },
NEW_RELIC_APP_NAME: { required: flags.IN_PRODUCTION },
// For the eCentric payment gateway
ECENTRIC_MERCHANT_ID: { required: flags.IN_LIVE || flags.IN_STAGING },
ECENTRIC_MERCHANT_ID: { required: flags.IN_PRODUCTION },

@@ -73,3 +73,3 @@ });

config.OTHER_IMPORTANT_VARS = 'blah blah'
config.FORCE_SSL = (flags.IN_LIVE || flags.IN_STAGING);
config.FORCE_SSL = flags.IN_PRODUCTION;

@@ -107,3 +107,3 @@ // ..

This determination is based on the IP address ranges we use for VPCs in our deployed regions,
This determination is based on the IP address ranges we use for VPCs in our deployed regions,
(documented in the Thinkmill Wiki)[https://github.com/Thinkmill/wiki/blob/master/infrastructure/ip-addresses.md].

@@ -140,5 +140,5 @@

This is totally optional but gives us a convenient convention for describing other conditions in the `config.js` file.
This is optional but gives us a convenient convention for describing other conditions in the `config.js` file.
One flag is created for each environment the app supports (usually: 'live', 'staging', 'testing' and 'development')
One flag is created for each environment the app supports (usually 'live', 'staging', 'testing' and 'development')
plus a flag for 'production', which is true if the environment is 'live' or 'staging'.

@@ -148,3 +148,3 @@

```javascript
```javascript
console.log(flags);

@@ -231,6 +231,6 @@ // { IN_LIVE: false, IN_STAGING: true, IN_TESTING: false, IN_DEVELOPMENT: false, IN_PRODUCTION: true }

Many (all?) Thinkmill apps rely on external systems that differ between environments (`APP_ENV`).
This is especially true in for blueshyft, where requests often require the cooperation of shared
This is especially true in for blueshyft, where requests often require the cooperation of shared
internal services (such as the core, transaction engine, etc) and external services (such as remote partner APIs).
Since both these approaches add values directly to the config object (without using `mergeConfig()`),
Since both these approaches add values directly to the config object (without using `mergeConfig()`),
values set in this way can't be overridden/set without code changes.

@@ -240,4 +240,4 @@

For the blueshyft network of apps, the
[`@thinkmill/blueshyft-network` package](https://www.npmjs.com/package/@thinkmill/blueshyft-network)
For the blueshyft network of apps, the
[`@thinkmill/blueshyft-network` package](https://www.npmjs.com/package/@thinkmill/blueshyft-network)
was developed to centralise the addressing of apps across environments.

@@ -292,3 +292,3 @@ Usage of the package looks like this:

The final lines in our example export the `config` object we've created for use by the app after
The final lines in our example export the `config` object we've created for use by the app after
[freezing](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze) it.

@@ -295,0 +295,0 @@ This prevents any other part of the application from accidenally making changes to this object.

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