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

@hocuspocus/provider

Package Overview
Dependencies
Maintainers
3
Versions
104
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hocuspocus/provider - npm Package Compare versions

Comparing version 1.0.0-alpha.19 to 1.0.0-alpha.20

16

dist/hocuspocus-provider.esm.js

@@ -1899,10 +1899,11 @@ import * as Y from 'yjs';

// Init the WebSocket connection
this.webSocket = new this.options.WebSocketPolyfill(this.url);
this.webSocket.binaryType = 'arraybuffer';
this.webSocket.onmessage = this.onMessage.bind(this);
this.webSocket.onclose = this.onClose.bind(this);
this.webSocket.onopen = this.onOpen.bind(this);
this.webSocket.onerror = () => {
const ws = new this.options.WebSocketPolyfill(this.url);
ws.binaryType = 'arraybuffer';
ws.onmessage = this.onMessage.bind(this);
ws.onclose = this.onClose.bind(this);
ws.onopen = this.onOpen.bind(this);
ws.onerror = () => {
reject();
};
this.webSocket = ws;
// Reset the status

@@ -1936,2 +1937,3 @@ this.synced = false;

checkConnection() {
var _a;
// Don’t check the connection when it’s not even established

@@ -1951,3 +1953,3 @@ if (this.status !== WebSocketStatus.Connected) {

// Awareness updates, which are updated every 15 seconds.
this.webSocket.close();
(_a = this.webSocket) === null || _a === void 0 ? void 0 : _a.close();
}

@@ -1954,0 +1956,0 @@ forceSync() {

@@ -111,3 +111,3 @@ import * as Y from 'yjs';

subscribedToBroadcastChannel: boolean;
webSocket: any;
webSocket: WebSocket | null;
shouldConnect: boolean;

@@ -114,0 +114,0 @@ status: WebSocketStatus;

{
"name": "@hocuspocus/provider",
"version": "1.0.0-alpha.19",
"version": "1.0.0-alpha.20",
"description": "hocuspocus provider",

@@ -31,3 +31,3 @@ "homepage": "https://hocuspocus.dev",

},
"gitHead": "49a520f1b6be37139f5c7243a484dc413640869c",
"gitHead": "d15359746b9d8e6518ef4128a033512ba0a893e6",
"publishConfig": {

@@ -34,0 +34,0 @@ "access": "public"

@@ -170,3 +170,3 @@ import * as Y from 'yjs'

webSocket: any = null
webSocket: WebSocket | null = null

@@ -291,10 +291,11 @@ shouldConnect = true

// Init the WebSocket connection
this.webSocket = new this.options.WebSocketPolyfill(this.url)
this.webSocket.binaryType = 'arraybuffer'
this.webSocket.onmessage = this.onMessage.bind(this)
this.webSocket.onclose = this.onClose.bind(this)
this.webSocket.onopen = this.onOpen.bind(this)
this.webSocket.onerror = () => {
const ws = new this.options.WebSocketPolyfill(this.url)
ws.binaryType = 'arraybuffer'
ws.onmessage = this.onMessage.bind(this)
ws.onclose = this.onClose.bind(this)
ws.onopen = this.onOpen.bind(this)
ws.onerror = () => {
reject()
}
this.webSocket = ws

@@ -350,3 +351,3 @@ // Reset the status

// Awareness updates, which are updated every 15 seconds.
this.webSocket.close()
this.webSocket?.close()
}

@@ -353,0 +354,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

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