@hocuspocus/provider 2.13.1 → 2.13.4-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/Hocuspocus.d.ts +1 -1
- package/package.json +3 -3
- package/src/TiptapCollabProviderWebsocket.ts +13 -1
|
@@ -2809,7 +2809,12 @@ const uuidv4 = () => uuidv4Template.replace(/[018]/g, /** @param {number} c */ c
|
|
|
2809
2809
|
class TiptapCollabProviderWebsocket extends HocuspocusProviderWebsocket {
|
|
2810
2810
|
constructor(configuration) {
|
|
2811
2811
|
var _a;
|
|
2812
|
-
|
|
2812
|
+
let url = (_a = configuration.baseUrl) !== null && _a !== void 0 ? _a : `wss://${configuration.appId}.collab.tiptap.cloud`;
|
|
2813
|
+
if (configuration.shardKey) {
|
|
2814
|
+
url += url.includes('?') ? '&' : '?';
|
|
2815
|
+
url += `shard=${configuration.shardKey}`;
|
|
2816
|
+
}
|
|
2817
|
+
super({ ...configuration, url });
|
|
2813
2818
|
}
|
|
2814
2819
|
}
|
|
2815
2820
|
|