y-websocket
Advanced tools
Comparing version 1.5.4 to 2.0.0
{ | ||
"name": "y-websocket", | ||
"version": "1.5.4", | ||
"version": "2.0.0", | ||
"description": "Websockets provider for Yjs", | ||
@@ -8,2 +8,3 @@ "main": "./dist/y-websocket.cjs", | ||
"types": "./dist/src/y-websocket.d.ts", | ||
"type": "module", | ||
"sideEffects": false, | ||
@@ -15,3 +16,3 @@ "funding": { | ||
"scripts": { | ||
"start": "node ./bin/server.js", | ||
"start": "node ./bin/server.cjs", | ||
"dist": "rm -rf dist && rollup -c && tsc", | ||
@@ -23,4 +24,4 @@ "lint": "standard && tsc", | ||
"bin": { | ||
"y-websocket-server": "./bin/server.js", | ||
"y-websocket": "./bin/server.js" | ||
"y-websocket-server": "./bin/server.cjs", | ||
"y-websocket": "./bin/server.cjs" | ||
}, | ||
@@ -34,4 +35,4 @@ "files": [ | ||
"./package.json": "./package.json", | ||
"./bin/utils": "./bin/utils.js", | ||
"./bin/callback": "./bin/callback.js", | ||
"./bin/utils": "./bin/utils.cjs", | ||
"./bin/callback": "./bin/callback.cjs", | ||
".": { | ||
@@ -41,3 +42,4 @@ "module": "./src/y-websocket.js", | ||
"require": "./dist/y-websocket.cjs", | ||
"types": "./dist/src/y-websocket.d.ts" | ||
"types": "./dist/src/y-websocket.d.ts", | ||
"default": "./dist/y-websocket.js" | ||
} | ||
@@ -44,0 +46,0 @@ }, |
@@ -5,9 +5,27 @@ | ||
The Websocket Provider implements a classical client server model. Clients connect to a single endpoint over Websocket. The server distributes awareness information and document updates among clients. | ||
The Websocket Provider implements a classical client server model. Clients | ||
connect to a single endpoint over Websocket. The server distributes awareness | ||
information and document updates among clients. | ||
The Websocket Provider is a solid choice if you want a central source that handles authentication and authorization. Websockets also send header information and cookies, so you can use existing authentication mechanisms with this server. | ||
This repository contains a simple in-memory backend that can persist to | ||
databases, but it can't be scaled easily. The | ||
[y-redis](https://github.com/yjs/y-redis/) repository contains an alternative | ||
backend that is scalable, provides auth*, and can persist to different backends. | ||
* Supports cross-tab communication. When you open the same document in the same browser, changes on the document are exchanged via cross-tab communication ([Broadcast Channel](https://developer.mozilla.org/en-US/docs/Web/API/Broadcast_Channel_API) and [localStorage](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage) as fallback). | ||
The Websocket Provider is a solid choice if you want a central source that | ||
handles authentication and authorization. Websockets also send header | ||
information and cookies, so you can use existing authentication mechanisms with | ||
this server. | ||
* Supports cross-tab communication. When you open the same document in the same | ||
browser, changes on the document are exchanged via cross-tab communication | ||
([Broadcast | ||
Channel](https://developer.mozilla.org/en-US/docs/Web/API/Broadcast_Channel_API) | ||
and | ||
[localStorage](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage) | ||
as fallback). | ||
* Supports exchange of awareness information (e.g. cursors). | ||
## Quick Start | ||
@@ -14,0 +32,0 @@ |
87708
13
1444
165
Yes