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

falcor-http-ws-datasource

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

falcor-http-ws-datasource - npm Package Compare versions

Comparing version 0.1.6 to 0.1.7

29

dist/falcor-http-ws-datasource.js

@@ -76,10 +76,2 @@ 'use strict';

var wsUrlPath = pushUrl.match(/ws+:\/\/.*?(\/.*)/);
if (wsUrlPath && wsUrlPath[1]) {
config.path = wsUrlPath[1] + "/socket.io";
}
var socket = new _socketIoClient2['default'](pushUrl, config);
if (!config.headers) {

@@ -100,13 +92,26 @@ config.headers = {};

socket.emit('authorization', { bearerToken: config.bearerToken, tabId: sessionStorage.tabId });
var socket = null;
if (pushUrl && pushUrl.length > 0) {
var wsUrlPath = pushUrl.match(/ws+:\/\/.*?(\/.*)/);
if (wsUrlPath && wsUrlPath[1]) {
config.path = wsUrlPath[1] + "/socket.io";
}
socket = new _socketIoClient2['default'](pushUrl, config);
socket.emit('authorization', { bearerToken: config.bearerToken, tabId: sessionStorage.tabId });
}
_get(Object.getPrototypeOf(FalcorHttpPullWebSocketPushDataSource.prototype), 'constructor', this).call(this, pullUrl, config);
this.socket = socket;
this.pushEvent = "falcor-push";
this.socket = socket;
this.requestWatcher = new _delayedFunction2['default'](200); // Delay maxium between 2 falcor requests
this.onError = config.onError || function () {};
}
_createClass(FalcorHttpPullWebSocketPushDataSource, [{
key: 'onError',
value: function onError() {}
}, {
key: 'onRequestStart',

@@ -208,3 +213,3 @@ value: function onRequestStart() {}

value: function onPushNotifications(callback) {
if (callback) {
if (callback && this.socket) {
this.socket.on(this.pushEvent, function (data) {

@@ -211,0 +216,0 @@ callback(data);

{
"name": "falcor-http-ws-datasource",
"version": "0.1.6",
"version": "0.1.7",
"description": "Falcor HTTP and WebSocket datasource",

@@ -19,3 +19,3 @@ "homepage": "",

"dependencies": {
"@synhaptein/falcor-http-datasource": "^0.1.5",
"@synhaptein/falcor-http-datasource": "^0.1.6",
"socket.io-client": "^1.4.8",

@@ -22,0 +22,0 @@ "uuid": "^2.0.1"

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