Comparing version 2.0.9 to 2.1.0
@@ -27,2 +27,6 @@ 'use strict'; | ||
var isIP = function(endpoint) { | ||
return /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/.test(endpoint); | ||
}; | ||
function Config() {} | ||
@@ -63,3 +67,7 @@ | ||
} | ||
return this.config.protocol + '://' + projectName + '.' + this.config.project_domain + '/v1/_queries'; | ||
if(isIP(this.config.project_domain)) { | ||
return this.config.protocol + '://' + this.config.project_domain + '/' + projectName + '/v1/_queries'; | ||
} else { | ||
return this.config.protocol + '://' + projectName + '.' + this.config.project_domain + '/v1/_queries'; | ||
} | ||
}; | ||
@@ -71,3 +79,7 @@ | ||
} | ||
return this.config.protocol + '://' + this.config.project_name + '.' + this.config.project_domain + this.config.prefix; | ||
if(isIP(this.config.project_domain)) { | ||
return this.config.protocol + '://' + this.config.project_domain + '/' + this.config.project_name + this.config.prefix; | ||
} else { | ||
return this.config.protocol + '://' + this.config.project_name + '.' + this.config.project_domain + this.config.prefix; | ||
} | ||
}; | ||
@@ -212,2 +224,1 @@ | ||
exports.Config = new Config(); | ||
@@ -9,3 +9,3 @@ { | ||
"description": "Command line utility to download and upload 28.io queries.", | ||
"version": "2.0.9", | ||
"version": "2.1.0", | ||
"keywords": [ | ||
@@ -28,3 +28,3 @@ "jsoniq", | ||
"dependencies": { | ||
"28.io-nodejs": "0.2.1", | ||
"28.io-nodejs": "0.3.0", | ||
"cat-settings": "~1.0.0", | ||
@@ -31,0 +31,0 @@ "colors": "^1.0.3", |
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
182091
1252
+ Added28.io-nodejs@0.3.0(transitive)
- Removed28.io-nodejs@0.2.1(transitive)
Updated28.io-nodejs@0.3.0