@hocuspocus/provider 2.13.2 → 2.13.5-rc.0
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 +6 -1
- package/dist/hocuspocus-provider.cjs.map +1 -1
- package/dist/hocuspocus-provider.esm.js +6 -1
- package/dist/hocuspocus-provider.esm.js.map +1 -1
- package/dist/packages/provider/src/TiptapCollabProviderWebsocket.d.ts +4 -0
- package/dist/packages/server/src/Document.d.ts +2 -2
- package/package.json +3 -3
- package/src/TiptapCollabProviderWebsocket.ts +13 -1
|
@@ -2833,7 +2833,12 @@ const uuidv4 = () => uuidv4Template.replace(/[018]/g, /** @param {number} c */ c
|
|
|
2833
2833
|
class TiptapCollabProviderWebsocket extends HocuspocusProviderWebsocket {
|
|
2834
2834
|
constructor(configuration) {
|
|
2835
2835
|
var _a;
|
|
2836
|
-
|
|
2836
|
+
let url = (_a = configuration.baseUrl) !== null && _a !== void 0 ? _a : `wss://${configuration.appId}.collab.tiptap.cloud`;
|
|
2837
|
+
if (configuration.shardKey) {
|
|
2838
|
+
url += url.includes('?') ? '&' : '?';
|
|
2839
|
+
url += `shard=${configuration.shardKey}`;
|
|
2840
|
+
}
|
|
2841
|
+
super({ ...configuration, url });
|
|
2837
2842
|
}
|
|
2838
2843
|
}
|
|
2839
2844
|
|