Comparing version 1.0.3 to 1.0.4
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.10.0 | ||
// Generated by CoffeeScript 1.12.2 | ||
(function() { | ||
@@ -28,3 +28,2 @@ var AppEnv, URL, _, cfenv, fs, getApp, getBind, getName, getPort, getServices, getURLs, pkg, ports, throwError, yaml; | ||
function AppEnv(options) { | ||
var error; | ||
if (options == null) { | ||
@@ -119,2 +118,5 @@ options = {}; | ||
delete replacements.url; | ||
if (_.isEmpty(replacements)) { | ||
return url; | ||
} | ||
purl = URL.parse(url); | ||
@@ -147,3 +149,3 @@ for (key in replacements) { | ||
getApp = function(appEnv, options) { | ||
var e, envValue, error, locValue, ref, string; | ||
var e, envValue, locValue, ref, string; | ||
string = process.env.VCAP_APPLICATION; | ||
@@ -170,3 +172,3 @@ envValue = {}; | ||
getServices = function(appEnv, options) { | ||
var e, envValue, error, locValue, ref, string; | ||
var e, envValue, locValue, ref, string; | ||
string = process.env.VCAP_SERVICES; | ||
@@ -209,3 +211,3 @@ envValue = {}; | ||
getName = function(appEnv, options) { | ||
var error, pObject, pString, ref, val, yObject, yString; | ||
var pObject, pString, ref, val, yObject, yString; | ||
if (options.name != null) { | ||
@@ -212,0 +214,0 @@ return options.name; |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.10.0 | ||
// Generated by CoffeeScript 1.12.2 | ||
(function() { | ||
@@ -3,0 +3,0 @@ var JL, JS, cfenv, generateDump, http; |
@@ -5,3 +5,3 @@ { | ||
"description": "easy access to your Cloud Foundry application environment", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"author": "pmuellr", | ||
@@ -15,3 +15,3 @@ "license": "Apache-2.0", | ||
"dependencies": { | ||
"js-yaml": "3.4.x", | ||
"js-yaml": "3.7.x", | ||
"ports": "1.1.x", | ||
@@ -21,6 +21,6 @@ "underscore": "1.8.x" | ||
"devDependencies": { | ||
"coffee-script": "1.10.x", | ||
"mocha": "2.3.x", | ||
"coffee-script": "1.12.x", | ||
"mocha": "3.2.x", | ||
"expect.js": "0.3.x" | ||
} | ||
} |
@@ -101,3 +101,3 @@ cfenv - easy access to your Cloud Foundry application environment | ||
* `url`: first URL in `urls` | ||
* `isLocal`: true if a valid `VCAP_APPLICATION` env var was found, false otherwise | ||
* `isLocal`: false if a valid `VCAP_APPLICATION` env var was found, true otherwise | ||
@@ -264,2 +264,9 @@ The returned object also has the following methods available: | ||
Note that `url.parse()` and the later `url.format()` calls to construct the | ||
result, will not produce pleasing results for "unusual" URLs, especially | ||
those which do not use `http:` or `https:` protocols. The `url` `parse()` | ||
and `format()` methods will not be used though, if you have no replacement | ||
values, or the only replacement property is `url`, and so are safe to | ||
use in that case. | ||
Since the `appEnv.getServiceURL()` method operates against the | ||
@@ -309,2 +316,8 @@ `appEnv.services` property, you can fudge this object if that makes your | ||
**1.0.4** - 2017/01/13 | ||
- fix to getServiceURL() with non-http URLs - [issue #21][] | ||
[issue #21]: https://github.com/cloudfoundry-community/node-cfenv/issues/21 | ||
**1.0.3** - 2014/10/02 | ||
@@ -311,0 +324,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
74657
318
351
+ Addedjs-yaml@3.7.0(transitive)
- Removedinherit@2.2.7(transitive)
- Removedjs-yaml@3.4.6(transitive)
Updatedjs-yaml@3.7.x