mirror of
https://github.com/hcengineering/platform.git
synced 2025-05-19 13:57:50 +00:00
UBERF-10599: Fix ws not found in gmail (#8943)
Signed-off-by: Artem Savchenko <armisav@gmail.com>
This commit is contained in:
parent
ea99f3d074
commit
259b3ff921
@ -19,7 +19,12 @@ import { type ClientSocket, type ClientSocketFactory } from '@hcengineering/clie
|
||||
export const NodeWebSocketFactory: ClientSocketFactory = (url: string): ClientSocket => {
|
||||
// We need to override default factory with 'ws' one.
|
||||
// eslint-disable-next-line
|
||||
const WebSocket = require('ws')
|
||||
let WebSocket
|
||||
try {
|
||||
WebSocket = require('ws')
|
||||
} catch (error) {
|
||||
throw new Error('The "ws" package is required for NodeWebSocketFactory. ')
|
||||
}
|
||||
type WebSocketData = Parameters<typeof ws.on>[1]
|
||||
|
||||
const ws = new WebSocket(url)
|
||||
|
@ -14,10 +14,10 @@
|
||||
"build": "compile",
|
||||
"build:watch": "compile",
|
||||
"test": "jest --passWithNoTests --silent",
|
||||
"_phase:bundle": "rushx bundle --external=ws",
|
||||
"_phase:bundle": "rushx bundle",
|
||||
"_phase:docker-build": "rushx docker:build",
|
||||
"_phase:docker-staging": "rushx docker:staging",
|
||||
"bundle": "node ../../../common/scripts/esbuild.js --external=ws",
|
||||
"bundle": "node ../../../common/scripts/esbuild.js",
|
||||
"docker:build": "../../../common/scripts/docker_build.sh hardcoreeng/gmail",
|
||||
"docker:tbuild": "docker build -t hardcoreeng/gmail . --platform=linux/amd64 && ../../../common/scripts/docker_tag_push.sh hardcoreeng/gmail",
|
||||
"docker:staging": "../../../common/scripts/docker_tag.sh hardcoreeng/gmail staging",
|
||||
|
Loading…
Reference in New Issue
Block a user