-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #881 from hcengineering/server-upgrade-update
Server upgrade update (depend from #880)
- Loading branch information
Showing
31 changed files
with
293 additions
and
139 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,14 +3,14 @@ import client from '@anticrm/client' | |
import clientResources from '@anticrm/client-resources' | ||
import { Client } from '@anticrm/core' | ||
import { setMetadata } from '@anticrm/platform' | ||
import { encode } from 'jwt-simple' | ||
import { generateToken } from '@anticrm/server-token' | ||
|
||
// eslint-disable-next-line | ||
const WebSocket = require('ws') | ||
|
||
export async function connect (transactorUrl: string, workspace: string): Promise<Client> { | ||
console.log('connecting to transactor...') | ||
const token = encode({ email: '[email protected]', workspace }, 'secret') | ||
const token = generateToken('[email protected]', workspace) | ||
|
||
// We need to override default factory with 'ws' one. | ||
setMetadata(client.metadata.ClientSocketFactory, (url) => new WebSocket(url)) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,14 +3,14 @@ import client from '@anticrm/client' | |
import clientResources from '@anticrm/client-resources' | ||
import { Client } from '@anticrm/core' | ||
import { setMetadata } from '@anticrm/platform' | ||
import { encode } from 'jwt-simple' | ||
import { generateToken } from '@anticrm/server-token' | ||
|
||
// eslint-disable-next-line | ||
const WebSocket = require('ws') | ||
|
||
export async function connect (transactorUrl: string, workspace: string): Promise<Client> { | ||
console.log('connecting to transactor...') | ||
const token = encode({ email: '[email protected]', workspace }, 'secret') | ||
const token = generateToken('[email protected]', workspace) | ||
|
||
// We need to override default factory with 'ws' one. | ||
setMetadata(client.metadata.ClientSocketFactory, (url) => new WebSocket(url)) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.