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

ap3

Package Overview
Dependencies
Maintainers
2
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ap3 - npm Package Compare versions

Comparing version 0.2.4 to 0.2.5

23

lib/internal/config.js

@@ -5,2 +5,3 @@ var _ = require("underscore");

var os = require("os");
var min = require("jsonminify");

@@ -15,5 +16,6 @@ var env = process.env;

var values = replaceAll(config[mode] || config["development"], env);
var globalValues = replaceAll(config, env);
var modeValues = replaceAll(config[mode] || config["development"], env);
function get(key, envKey, vars) {
function get(values, key, envKey, vars) {
var value = env[envKey] || values[key] || defaults[key];

@@ -26,24 +28,26 @@ if (vars && _.isString(value)) value = replaceStr(value, vars);

// @todo add globalValues accessors
port: function () {
return get("port", "PORT");
return get(modeValues, "port", "PORT");
},
localBaseUrl: function () {
return get("localBaseUrl", "AP3_LOCAL_BASE_URL", {port: this.port()});
return get(modeValues, "localBaseUrl", "AP3_LOCAL_BASE_URL", {port: this.port()});
},
store: function () {
return values["store"] || defaults["store"];
return modeValues["store"] || defaults["store"];
},
hosts: function () {
return get("hosts");
return get(modeValues, "hosts");
},
publicKey: function () {
return get(null, "AP3_PUBLIC_KEY") || publicKey;
return get(modeValues, null, "AP3_PUBLIC_KEY") || publicKey;
},
privateKey: function () {
return get(null, "AP3_PRIVATE_KEY") || privateKey;
return get(modeValues, null, "AP3_PRIVATE_KEY") || privateKey;
},

@@ -60,2 +64,3 @@

var defaults = {
// @todo add globalValues defaults
port: 3000,

@@ -104,3 +109,3 @@ localBaseUrl: "http://" + os.hostname() + ":$port",

var data = loadFile(path);
return data ? JSON.parse(data) : {};
return data ? JSON.parse(min(data)) : {};
}
{
"name": "ap3",
"version": "0.2.4",
"version": "0.2.5",
"description": "Helper package for Atlassian Plugins 3 add-ons running on Express",

@@ -16,3 +16,4 @@ "dependencies": {

"optimist": "~0.4.0",
"colors": "~0.6.0"
"colors": "~0.6.0",
"jsonminify": "~0.1.0"
},

@@ -19,0 +20,0 @@ "main": "index.js",

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