@hocuspocus/provider 1.1.1 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2120,7 +2120,12 @@ class HocuspocusProvider extends EventEmitter {
2120
2120
  }
2121
2121
  if (event.code === Unauthorized.code) {
2122
2122
  if (!this.configuration.quiet) {
2123
- console.warn('[HocuspocusProvider] An authentication token is required, but you didn’t send one. Try adding a `token` to your HocuspocusProvider configuration. Won’t try again.');
2123
+ if (event.reason === Unauthorized.reason) {
2124
+ console.warn('[HocuspocusProvider] An authentication token is required, but you didn’t send one. Try adding a `token` to your HocuspocusProvider configuration. Won’t try again.');
2125
+ }
2126
+ else {
2127
+ console.warn(`[HocuspocusProvider] Connection closed with status Unauthorized: ${event.reason}`);
2128
+ }
2124
2129
  }
2125
2130
  this.shouldConnect = false;
2126
2131
  }
@@ -2220,20 +2225,14 @@ class HocuspocusProvider extends EventEmitter {
2220
2225
  }
2221
2226
  }
2222
2227
 
2223
- class HocuspocusCloudProvider extends HocuspocusProvider {
2228
+ class TiptapCollabProvider extends HocuspocusProvider {
2224
2229
  constructor(configuration) {
2225
2230
  if (!configuration.url) {
2226
- configuration.url = 'wss://connect.hocuspocus.cloud';
2227
- }
2228
- if (configuration.key) {
2229
- if (!configuration.parameters) {
2230
- configuration.parameters = {};
2231
- }
2232
- configuration.parameters.key = configuration.key;
2231
+ configuration.url = `wss://${configuration.appId}.tt-collab.de`;
2233
2232
  }
2234
2233
  super(configuration);
2235
2234
  }
2236
2235
  }
2237
2236
 
2238
- export { HocuspocusCloudProvider, HocuspocusProvider, MessageType, WebSocketStatus };
2237
+ export { HocuspocusProvider, MessageType, TiptapCollabProvider, WebSocketStatus };
2239
2238
  //# sourceMappingURL=hocuspocus-provider.esm.js.map