@liveblocks/core 3.1.3 → 3.2.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/index.cjs +13 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -2
- package/dist/index.d.ts +5 -2
- package/dist/index.js +13 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -6,7 +6,7 @@ var __export = (target, all) => {
|
|
|
6
6
|
|
|
7
7
|
// src/version.ts
|
|
8
8
|
var PKG_NAME = "@liveblocks/core";
|
|
9
|
-
var PKG_VERSION = "3.
|
|
9
|
+
var PKG_VERSION = "3.2.0";
|
|
10
10
|
var PKG_FORMAT = "cjs";
|
|
11
11
|
|
|
12
12
|
// src/dupe-detection.ts
|
|
@@ -7936,6 +7936,8 @@ function defaultMessageFromContext(context) {
|
|
|
7936
7936
|
return "Could not update room subscription settings";
|
|
7937
7937
|
case "UPDATE_NOTIFICATION_SETTINGS_ERROR":
|
|
7938
7938
|
return "Could not update notification settings";
|
|
7939
|
+
case "LARGE_MESSAGE_ERROR":
|
|
7940
|
+
return "Could not send large message";
|
|
7939
7941
|
default:
|
|
7940
7942
|
return assertNever(context, "Unhandled case");
|
|
7941
7943
|
}
|
|
@@ -8258,7 +8260,16 @@ function createRoom(options, config) {
|
|
|
8258
8260
|
}
|
|
8259
8261
|
switch (strategy) {
|
|
8260
8262
|
case "default": {
|
|
8261
|
-
|
|
8263
|
+
const type = "LARGE_MESSAGE_ERROR";
|
|
8264
|
+
const err = new LiveblocksError("Message is too large for websockets", {
|
|
8265
|
+
type
|
|
8266
|
+
});
|
|
8267
|
+
const didNotify = config.errorEventSource.notify(err);
|
|
8268
|
+
if (!didNotify) {
|
|
8269
|
+
error2(
|
|
8270
|
+
"Message is too large for websockets. Configure largeMessageStrategy option or useErrorListener to handle this."
|
|
8271
|
+
);
|
|
8272
|
+
}
|
|
8262
8273
|
return;
|
|
8263
8274
|
}
|
|
8264
8275
|
case "split": {
|