mirror of
https://github.com/cudr/slate-collaborative.git
synced 2024-10-27 20:34:06 +00:00
chore: update backend package
This commit is contained in:
parent
68b79736a8
commit
29fcaee1c3
@ -17,10 +17,8 @@
|
||||
"author": "cudr",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"prepublishOnly": "yarn run build:module",
|
||||
"build:module": "yarn run build:types && yarn run build:js",
|
||||
"build:types": "tsc --emitDeclarationOnly",
|
||||
"build:js": "babel src --out-dir lib --extensions \".ts,.tsx\" --source-maps inline",
|
||||
"prepublishOnly": "yarn run build:js",
|
||||
"build:js": "./node_modules/typescript/bin/tsc -p ./tsconfig.json",
|
||||
"watch": "yarn build:js -w"
|
||||
},
|
||||
"dependencies": {
|
||||
|
@ -94,13 +94,13 @@ export default class AutomergeCollaboration {
|
||||
/**
|
||||
* Construct error data and call onError callback
|
||||
*/
|
||||
private handleError(socket: SocketIO.Socket, err: Error, data: any = {}) {
|
||||
private handleError(socket: SocketIO.Socket, err: unknown, data: any = {}) {
|
||||
const { id } = socket
|
||||
const { name: docId } = socket.nsp
|
||||
|
||||
if (this.options.onError) {
|
||||
const document = this.backend.getDocument(docId)
|
||||
this.options.onError(err, {
|
||||
this.options.onError(err as Error, {
|
||||
user: this.userMap[id],
|
||||
docId,
|
||||
automergeDocument: document ? Automerge.save(document) : null,
|
||||
|
@ -1,3 +1,6 @@
|
||||
import AutomergeCollaboration from './AutomergeCollaboration'
|
||||
import AutomergeCollaboration, {
|
||||
IAutomergeMetaData
|
||||
} from './AutomergeCollaboration'
|
||||
import getActiveConnections from 'utils/getActiveConnections'
|
||||
|
||||
export { AutomergeCollaboration }
|
||||
export { AutomergeCollaboration, IAutomergeMetaData, getActiveConnections }
|
||||
|
@ -6,6 +6,8 @@
|
||||
"baseUrl": "./src",
|
||||
"outDir": "./lib",
|
||||
"composite": true,
|
||||
"declaration": true,
|
||||
"declarationMap": true,
|
||||
"paths": {
|
||||
"@hiveteams/collab-bridge": ["../../collab-bridge"]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user