Use @excalidraw/prettier-config
This commit is contained in:
parent
e55bdd93d5
commit
637e0df159
@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"proseWrap": "never"
|
|
||||||
}
|
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "excalidraw-portal",
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@excalidraw/prettier-config": "1.0.1",
|
||||||
"@types/debug": "4.1.5",
|
"@types/debug": "4.1.5",
|
||||||
"@types/express": "4.17.11",
|
"@types/express": "4.17.11",
|
||||||
"@types/node": "14.14.31",
|
"@types/node": "14.14.31",
|
||||||
@ -14,6 +14,8 @@
|
|||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
|
"name": "excalidraw-portal",
|
||||||
|
"prettier": "@excalidraw/prettier-config",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc",
|
"build": "tsc",
|
||||||
"format": "yarn prettier --write",
|
"format": "yarn prettier --write",
|
||||||
|
@ -48,7 +48,7 @@ io.on("connection", (socket) => {
|
|||||||
}
|
}
|
||||||
io.in(roomID).emit(
|
io.in(roomID).emit(
|
||||||
"room-user-change",
|
"room-user-change",
|
||||||
Object.keys(io.sockets.adapter.rooms[roomID].sockets)
|
Object.keys(io.sockets.adapter.rooms[roomID].sockets),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -57,7 +57,7 @@ io.on("connection", (socket) => {
|
|||||||
(roomID: string, encryptedData: ArrayBuffer, iv: Uint8Array) => {
|
(roomID: string, encryptedData: ArrayBuffer, iv: Uint8Array) => {
|
||||||
socketDebug(`${socket.id} sends update to ${roomID}`);
|
socketDebug(`${socket.id} sends update to ${roomID}`);
|
||||||
socket.broadcast.to(roomID).emit("client-broadcast", encryptedData, iv);
|
socket.broadcast.to(roomID).emit("client-broadcast", encryptedData, iv);
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
socket.on(
|
socket.on(
|
||||||
@ -67,14 +67,14 @@ io.on("connection", (socket) => {
|
|||||||
socket.volatile.broadcast
|
socket.volatile.broadcast
|
||||||
.to(roomID)
|
.to(roomID)
|
||||||
.emit("client-broadcast", encryptedData, iv);
|
.emit("client-broadcast", encryptedData, iv);
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
socket.on("disconnecting", () => {
|
socket.on("disconnecting", () => {
|
||||||
const rooms = io.sockets.adapter.rooms;
|
const rooms = io.sockets.adapter.rooms;
|
||||||
for (const roomID in socket.rooms) {
|
for (const roomID in socket.rooms) {
|
||||||
const clients = Object.keys(rooms[roomID].sockets).filter(
|
const clients = Object.keys(rooms[roomID].sockets).filter(
|
||||||
(id) => id !== socket.id
|
(id) => id !== socket.id,
|
||||||
);
|
);
|
||||||
if (clients.length > 0) {
|
if (clients.length > 0) {
|
||||||
socket.broadcast.to(roomID).emit("room-user-change", clients);
|
socket.broadcast.to(roomID).emit("room-user-change", clients);
|
||||||
|
@ -2,6 +2,11 @@
|
|||||||
# yarn lockfile v1
|
# yarn lockfile v1
|
||||||
|
|
||||||
|
|
||||||
|
"@excalidraw/prettier-config@^1.0.1":
|
||||||
|
version "1.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/@excalidraw/prettier-config/-/prettier-config-1.0.1.tgz#e7dd900993fe2f4442196805c124b43d9e361be5"
|
||||||
|
integrity sha512-AktpMzImIKlIfd0WYfuMcBovPL8C56LZdMqc7om05l8F3AjH0lffUctqQr3uu9e3t8NIZM7tEIZsiqZ+XO0fRQ==
|
||||||
|
|
||||||
"@types/body-parser@*":
|
"@types/body-parser@*":
|
||||||
version "1.19.0"
|
version "1.19.0"
|
||||||
resolved "https://registry.yarnpkg.com/@types/body-parser/-/body-parser-1.19.0.tgz#0685b3c47eb3006ffed117cdd55164b61f80538f"
|
resolved "https://registry.yarnpkg.com/@types/body-parser/-/body-parser-1.19.0.tgz#0685b3c47eb3006ffed117cdd55164b61f80538f"
|
||||||
@ -921,7 +926,7 @@ pinkie@^2.0.0:
|
|||||||
resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870"
|
resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870"
|
||||||
integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA=
|
integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA=
|
||||||
|
|
||||||
prettier@2.2.1:
|
prettier@^2.2.1:
|
||||||
version "2.2.1"
|
version "2.2.1"
|
||||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.2.1.tgz#795a1a78dd52f073da0cd42b21f9c91381923ff5"
|
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.2.1.tgz#795a1a78dd52f073da0cd42b21f9c91381923ff5"
|
||||||
integrity sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q==
|
integrity sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q==
|
||||||
|
Loading…
x
Reference in New Issue
Block a user