@liveblocks/yjs
Advanced tools
Comparing version 1.1.1-yjs3 to 1.1.2-beta1
@@ -32,3 +32,2 @@ import { Room, JsonObject, LsonObject, BaseUserMeta, Json } from '@liveblocks/client'; | ||
private room; | ||
private httpEndpoint?; | ||
private doc; | ||
@@ -35,0 +34,0 @@ private unsubscribers; |
@@ -17,22 +17,2 @@ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }var __defProp = Object.defineProperty; | ||
}; | ||
var __async = (__this, __arguments, generator) => { | ||
return new Promise((resolve, reject) => { | ||
var fulfilled = (value) => { | ||
try { | ||
step(generator.next(value)); | ||
} catch (e) { | ||
reject(e); | ||
} | ||
}; | ||
var rejected = (value) => { | ||
try { | ||
step(generator.throw(value)); | ||
} catch (e) { | ||
reject(e); | ||
} | ||
}; | ||
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected); | ||
step((generator = generator.apply(__this, __arguments)).next()); | ||
}); | ||
}; | ||
@@ -206,14 +186,8 @@ // src/index.ts | ||
}; | ||
this.updateHandler = (update, origin) => __async(this, null, function* () { | ||
this.updateHandler = (update, origin) => { | ||
if (origin !== "backend") { | ||
const encodedUpdate = _jsbase64.Base64.fromUint8Array(update); | ||
this.room.updateYDoc(encodedUpdate); | ||
if (this.httpEndpoint) { | ||
yield fetch(this.httpEndpoint, { | ||
method: "POST", | ||
body: encodedUpdate | ||
}); | ||
} | ||
} | ||
}); | ||
}; | ||
this.doc = doc; | ||
@@ -220,0 +194,0 @@ this.room = room; |
{ | ||
"name": "@liveblocks/yjs", | ||
"version": "1.1.1-yjs3", | ||
"version": "1.1.2-beta1", | ||
"description": "An integration with . Liveblocks is the all-in-one toolkit to build collaborative products like Figma, Notion, and more.", | ||
@@ -17,3 +17,3 @@ "license": "Apache-2.0", | ||
"lint": "eslint src/", | ||
"lint:package": "publint --strict && attw /tmp/$( npm pack -q --pack-destination /tmp )", | ||
"lint:package": "publint --strict && attw --pack", | ||
"test": "jest --silent --verbose --color=always", | ||
@@ -36,4 +36,4 @@ "test:types": "tsd", | ||
"dependencies": { | ||
"@liveblocks/client": "1.1.1-yjs3", | ||
"@liveblocks/core": "1.1.1-yjs3", | ||
"@liveblocks/client": "1.1.2-beta1", | ||
"@liveblocks/core": "1.1.2-beta1", | ||
"js-base64": "^3.7.5" | ||
@@ -40,0 +40,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
0
21147
508
+ Added@liveblocks/client@1.1.2-beta1(transitive)
+ Added@liveblocks/core@1.1.2-beta1(transitive)
- Removed@liveblocks/client@1.1.1-yjs3(transitive)
- Removed@liveblocks/core@1.1.1-yjs3(transitive)
Updated@liveblocks/core@1.1.2-beta1