@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.
- package/dist/hocuspocus-provider.cjs +9 -10
- package/dist/hocuspocus-provider.cjs.map +1 -1
- package/dist/hocuspocus-provider.esm.js +9 -10
- package/dist/hocuspocus-provider.esm.js.map +1 -1
- package/dist/packages/extension-webhook/src/index.d.ts +1 -2
- package/dist/packages/provider/src/TiptapCollabProvider.d.ts +11 -0
- package/dist/packages/provider/src/index.d.ts +1 -1
- package/package.json +2 -2
- package/src/HocuspocusProvider.ts +5 -1
- package/src/TiptapCollabProvider.ts +26 -0
- package/src/index.ts +1 -1
- package/dist/packages/provider/src/HocuspocusCloudProvider.d.ts +0 -11
- package/src/HocuspocusCloudProvider.ts +0 -34
|
@@ -2120,7 +2120,12 @@ class HocuspocusProvider extends EventEmitter {
|
|
|
2120
2120
|
}
|
|
2121
2121
|
if (event.code === Unauthorized.code) {
|
|
2122
2122
|
if (!this.configuration.quiet) {
|
|
2123
|
-
|
|
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
|
|
2228
|
+
class TiptapCollabProvider extends HocuspocusProvider {
|
|
2224
2229
|
constructor(configuration) {
|
|
2225
2230
|
if (!configuration.url) {
|
|
2226
|
-
configuration.url =
|
|
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 {
|
|
2237
|
+
export { HocuspocusProvider, MessageType, TiptapCollabProvider, WebSocketStatus };
|
|
2239
2238
|
//# sourceMappingURL=hocuspocus-provider.esm.js.map
|