@hocuspocus/provider 1.1.0 → 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.
@@ -2144,7 +2144,12 @@ class HocuspocusProvider extends EventEmitter {
2144
2144
  }
2145
2145
  if (event.code === common.Unauthorized.code) {
2146
2146
  if (!this.configuration.quiet) {
2147
- 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.');
2147
+ if (event.reason === common.Unauthorized.reason) {
2148
+ 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.');
2149
+ }
2150
+ else {
2151
+ console.warn(`[HocuspocusProvider] Connection closed with status Unauthorized: ${event.reason}`);
2152
+ }
2148
2153
  }
2149
2154
  this.shouldConnect = false;
2150
2155
  }
@@ -2244,21 +2249,15 @@ class HocuspocusProvider extends EventEmitter {
2244
2249
  }
2245
2250
  }
2246
2251
 
2247
- class HocuspocusCloudProvider extends HocuspocusProvider {
2252
+ class TiptapCollabProvider extends HocuspocusProvider {
2248
2253
  constructor(configuration) {
2249
2254
  if (!configuration.url) {
2250
- configuration.url = 'wss://connect.hocuspocus.cloud';
2251
- }
2252
- if (configuration.key) {
2253
- if (!configuration.parameters) {
2254
- configuration.parameters = {};
2255
- }
2256
- configuration.parameters.key = configuration.key;
2255
+ configuration.url = `wss://${configuration.appId}.tt-collab.de`;
2257
2256
  }
2258
2257
  super(configuration);
2259
2258
  }
2260
2259
  }
2261
2260
 
2262
- exports.HocuspocusCloudProvider = HocuspocusCloudProvider;
2263
2261
  exports.HocuspocusProvider = HocuspocusProvider;
2262
+ exports.TiptapCollabProvider = TiptapCollabProvider;
2264
2263
  //# sourceMappingURL=hocuspocus-provider.cjs.map