@hocuspocus/provider
Advanced tools
Comparing version 2.0.3 to 2.0.4
@@ -6,2 +6,8 @@ export interface CloseEvent { | ||
/** | ||
* The server is terminating the connection because a data frame was received | ||
* that is too large. | ||
* See: https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent/code | ||
*/ | ||
export declare const MessageTooBig: CloseEvent; | ||
/** | ||
* The server successfully processed the request, asks that the requester reset | ||
@@ -8,0 +14,0 @@ * its document view, and is not returning any content. |
export * from './HocuspocusProvider'; | ||
export * from './TiptapCollabProvider'; | ||
export * from './TiptapCollabProviderWebsocket'; | ||
export * from './HocuspocusProviderWebsocket'; | ||
export * from './types'; |
{ | ||
"name": "@hocuspocus/provider", | ||
"version": "2.0.3", | ||
"version": "2.0.4", | ||
"description": "hocuspocus provider", | ||
@@ -31,3 +31,3 @@ "homepage": "https://hocuspocus.dev", | ||
"dependencies": { | ||
"@hocuspocus/common": "^2.0.3", | ||
"@hocuspocus/common": "^2.0.4", | ||
"@lifeomic/attempt": "^3.0.2", | ||
@@ -34,0 +34,0 @@ "lib0": "^0.2.47", |
@@ -322,2 +322,4 @@ import * as Y from 'yjs' | ||
async onOpen(event: Event) { | ||
this.isAuthenticated = false | ||
this.emit('open', { event }) | ||
@@ -324,0 +326,0 @@ |
@@ -7,3 +7,3 @@ import * as time from 'lib0/time' | ||
import { | ||
Forbidden, Unauthorized, WsReadyStates, | ||
Forbidden, MessageTooBig, Unauthorized, WsReadyStates, | ||
} from '@hocuspocus/common' | ||
@@ -429,2 +429,7 @@ import { Event } from 'ws' | ||
if (event.code === MessageTooBig.code) { | ||
console.warn(`[HocuspocusProvider] Connection closed with status MessageTooBig: ${event.reason}`) | ||
this.shouldConnect = false | ||
} | ||
if (this.connectionAttempt) { | ||
@@ -431,0 +436,0 @@ // That connection attempt failed. |
export * from './HocuspocusProvider' | ||
export * from './TiptapCollabProvider' | ||
export * from './TiptapCollabProviderWebsocket' | ||
export * from './HocuspocusProviderWebsocket' | ||
export * from './types' |
@@ -5,6 +5,5 @@ import { | ||
} from './HocuspocusProvider' | ||
import { | ||
HocuspocusProviderWebsocket, | ||
} from './HocuspocusProviderWebsocket' | ||
import { TiptapCollabProviderWebsocket } from './TiptapCollabProviderWebsocket' | ||
export type TiptapCollabProviderConfiguration = | ||
@@ -25,7 +24,7 @@ Required<Pick<HocuspocusProviderConfiguration, 'name'>> & | ||
if (!configuration.websocketProvider) { | ||
configuration.websocketProvider = new HocuspocusProviderWebsocket({ url: `wss://${configuration.appId}.collab.tiptap.cloud` }) | ||
configuration.websocketProvider = new TiptapCollabProviderWebsocket({ appId: configuration.appId }) | ||
} | ||
if (!configuration.token) { | ||
configuration.token = 'notoken' | ||
configuration.token = 'notoken' // need to send a token anyway (which will be ignored) | ||
} | ||
@@ -32,0 +31,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 too big to display
Sorry, the diff of this file is not supported yet
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
678182
7744
Updated@hocuspocus/common@^2.0.4