Socket
Socket
Sign inDemoInstall

@firebase/database

Package Overview
Dependencies
10
Maintainers
3
Versions
3248
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.10-0 to 0.1.10

.nyc_output/1f289ee61b39c64c4502b617010ba9d3.json

2

dist/cjs/src/core/RepoInfo.js

@@ -46,3 +46,3 @@ "use strict";

RepoInfo.prototype.needsQueryParam = function () {
return this.host !== this.internalHost;
return this.host !== this.internalHost || this.isCustomHost();
};

@@ -49,0 +49,0 @@ RepoInfo.prototype.isCacheableHost = function () {

@@ -41,2 +41,23 @@ "use strict";

/**
* @param {!string} queryString
* @return {!{[key:string]:string}} key value hash
*/
function decodeQuery(queryString) {
var results = {};
if (queryString.startsWith('?')) {
queryString = queryString.substring(1);
}
for (var _i = 0, _a = queryString.split('&'); _i < _a.length; _i++) {
var segment = _a[_i];
var kv = segment.split('=');
if (kv.length === 2) {
results[decodeURIComponent(kv[0])] = decodeURIComponent(kv[1]);
}
else {
util_1.warn('Invalid query string segment: ' + segment);
}
}
return results;
}
/**
*

@@ -85,3 +106,3 @@ * @param {!string} dataURL

}
// Parse host and path.
// Parse host, path, and query string.
var slashInd = dataURL.indexOf('/');

@@ -91,4 +112,12 @@ if (slashInd === -1) {

}
host = dataURL.substring(0, slashInd);
pathString = decodePath(dataURL.substring(slashInd));
var questionMarkInd = dataURL.indexOf('?');
if (questionMarkInd === -1) {
questionMarkInd = dataURL.length;
}
host = dataURL.substring(0, Math.min(slashInd, questionMarkInd));
if (slashInd < questionMarkInd) {
// For pathString, questionMarkInd will always come after slashInd
pathString = decodePath(dataURL.substring(slashInd, questionMarkInd));
}
var queryParams = decodeQuery(dataURL.substring(Math.min(dataURL.length, questionMarkInd)));
// If we have a port, use scheme for determining if it's secure.

@@ -115,2 +144,6 @@ colonInd = host.indexOf(':');

}
// Support `ns` query param if subdomain not already set
if (subdomain === '' && 'ns' in queryParams) {
subdomain = queryParams['ns'];
}
}

@@ -117,0 +150,0 @@ return {

@@ -44,3 +44,3 @@ /**

RepoInfo.prototype.needsQueryParam = function () {
return this.host !== this.internalHost;
return this.host !== this.internalHost || this.isCustomHost();
};

@@ -47,0 +47,0 @@ RepoInfo.prototype.isCacheableHost = function () {

@@ -18,3 +18,3 @@ /**

import { RepoInfo } from '../../RepoInfo';
import { warnIfPageIsSecure, fatal } from '../util';
import { warnIfPageIsSecure, warn, fatal } from '../util';
/**

@@ -40,2 +40,23 @@ * @param {!string} pathString

/**
* @param {!string} queryString
* @return {!{[key:string]:string}} key value hash
*/
function decodeQuery(queryString) {
var results = {};
if (queryString.startsWith('?')) {
queryString = queryString.substring(1);
}
for (var _i = 0, _a = queryString.split('&'); _i < _a.length; _i++) {
var segment = _a[_i];
var kv = segment.split('=');
if (kv.length === 2) {
results[decodeURIComponent(kv[0])] = decodeURIComponent(kv[1]);
}
else {
warn('Invalid query string segment: ' + segment);
}
}
return results;
}
/**
*

@@ -84,3 +105,3 @@ * @param {!string} dataURL

}
// Parse host and path.
// Parse host, path, and query string.
var slashInd = dataURL.indexOf('/');

@@ -90,4 +111,12 @@ if (slashInd === -1) {

}
host = dataURL.substring(0, slashInd);
pathString = decodePath(dataURL.substring(slashInd));
var questionMarkInd = dataURL.indexOf('?');
if (questionMarkInd === -1) {
questionMarkInd = dataURL.length;
}
host = dataURL.substring(0, Math.min(slashInd, questionMarkInd));
if (slashInd < questionMarkInd) {
// For pathString, questionMarkInd will always come after slashInd
pathString = decodePath(dataURL.substring(slashInd, questionMarkInd));
}
var queryParams = decodeQuery(dataURL.substring(Math.min(dataURL.length, questionMarkInd)));
// If we have a port, use scheme for determining if it's secure.

@@ -114,2 +143,6 @@ colonInd = host.indexOf(':');

}
// Support `ns` query param if subdomain not already set
if (subdomain === '' && 'ns' in queryParams) {
subdomain = queryParams['ns'];
}
}

@@ -116,0 +149,0 @@ return {

{
"name": "@firebase/database",
"version": "0.1.10-0",
"version": "0.1.10",
"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.9-0",
"@firebase/util": "0.1.9",
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc