@firebase/database
Advanced tools
Comparing version 0.1.8 to 0.1.9-0
@@ -53,3 +53,4 @@ "use strict"; | ||
// Catch common error of uninitialized namespace value. | ||
if (!namespace || namespace == 'undefined') { | ||
if ((!namespace || namespace == 'undefined') && | ||
parsedUrl.domain !== 'localhost') { | ||
util_1.fatal('Cannot parse Firebase url. Please use https://<YOUR FIREBASE>.firebaseio.com'); | ||
@@ -91,2 +92,11 @@ } | ||
pathString = decodePath(dataURL.substring(slashInd)); | ||
// If we have a port, use scheme for determining if it's secure. | ||
colonInd = host.indexOf(':'); | ||
if (colonInd >= 0) { | ||
secure = scheme === 'https' || scheme === 'wss'; | ||
port = parseInt(host.substring(colonInd + 1), 10); | ||
} | ||
else { | ||
colonInd = dataURL.length; | ||
} | ||
var parts = host.split('.'); | ||
@@ -101,7 +111,4 @@ if (parts.length === 3) { | ||
} | ||
// If we have a port, use scheme for determining if it's secure. | ||
colonInd = host.indexOf(':'); | ||
if (colonInd >= 0) { | ||
secure = scheme === 'https' || scheme === 'wss'; | ||
port = parseInt(host.substring(colonInd + 1), 10); | ||
else if (parts[0].slice(0, colonInd).toLowerCase() === 'localhost') { | ||
domain = 'localhost'; | ||
} | ||
@@ -108,0 +115,0 @@ } |
@@ -305,3 +305,4 @@ "use strict"; | ||
parsedUrl.repoInfo.host.length === 0 || | ||
!exports.isValidKey(parsedUrl.repoInfo.namespace) || | ||
(!exports.isValidKey(parsedUrl.repoInfo.namespace) && | ||
parsedUrl.repoInfo.host.split(':')[0] !== 'localhost') || | ||
(pathString.length !== 0 && !exports.isValidRootPathString(pathString))) { | ||
@@ -308,0 +309,0 @@ throw new Error(util_3.errorPrefix(fnName, argumentNumber, false) + |
@@ -51,3 +51,4 @@ /** | ||
// Catch common error of uninitialized namespace value. | ||
if (!namespace || namespace == 'undefined') { | ||
if ((!namespace || namespace == 'undefined') && | ||
parsedUrl.domain !== 'localhost') { | ||
fatal('Cannot parse Firebase url. Please use https://<YOUR FIREBASE>.firebaseio.com'); | ||
@@ -89,2 +90,11 @@ } | ||
pathString = decodePath(dataURL.substring(slashInd)); | ||
// If we have a port, use scheme for determining if it's secure. | ||
colonInd = host.indexOf(':'); | ||
if (colonInd >= 0) { | ||
secure = scheme === 'https' || scheme === 'wss'; | ||
port = parseInt(host.substring(colonInd + 1), 10); | ||
} | ||
else { | ||
colonInd = dataURL.length; | ||
} | ||
var parts = host.split('.'); | ||
@@ -99,7 +109,4 @@ if (parts.length === 3) { | ||
} | ||
// If we have a port, use scheme for determining if it's secure. | ||
colonInd = host.indexOf(':'); | ||
if (colonInd >= 0) { | ||
secure = scheme === 'https' || scheme === 'wss'; | ||
port = parseInt(host.substring(colonInd + 1), 10); | ||
else if (parts[0].slice(0, colonInd).toLowerCase() === 'localhost') { | ||
domain = 'localhost'; | ||
} | ||
@@ -106,0 +113,0 @@ } |
@@ -303,3 +303,4 @@ /** | ||
parsedUrl.repoInfo.host.length === 0 || | ||
!isValidKey(parsedUrl.repoInfo.namespace) || | ||
(!isValidKey(parsedUrl.repoInfo.namespace) && | ||
parsedUrl.repoInfo.host.split(':')[0] !== 'localhost') || | ||
(pathString.length !== 0 && !isValidRootPathString(pathString))) { | ||
@@ -306,0 +307,0 @@ throw new Error(errorPrefixFxn(fnName, argumentNumber, false) + |
{ | ||
"name": "@firebase/database", | ||
"version": "0.1.8", | ||
"version": "0.1.9-0", | ||
"description": "", | ||
@@ -23,3 +23,3 @@ "author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)", | ||
"@firebase/database-types": "0.1.1", | ||
"@firebase/util": "0.1.7", | ||
"@firebase/util": "0.1.8-0", | ||
"faye-websocket": "0.11.1" | ||
@@ -26,0 +26,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
5258406
522
45760
+ Added@firebase/util@0.1.8-0(transitive)
- Removed@firebase/util@0.1.7(transitive)
Updated@firebase/util@0.1.8-0