UBER-62: Maintenance warnings (#3210)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev
2023-05-19 18:46:05 +07:00
committed by GitHub
parent 39e5dd5142
commit f9d2ce4a1e
37 changed files with 688 additions and 221 deletions
+5
View File
@@ -14,6 +14,7 @@
//
import core, {
Account,
Class,
ClientConnection,
Doc,
@@ -65,6 +66,10 @@ class ServerStorageWrapper implements ClientConnection {
})
}
async getAccount (): Promise<Account> {
return (await this.storage.findAll(this.measureCtx, core.class.Account, {}))[0]
}
async tx (tx: Tx): Promise<TxResult> {
const _tx = protoDeserialize(protoSerialize(tx, false), false)
const [result, derived] = await this.storage.tx(this.measureCtx, _tx)
+6 -6
View File
@@ -13,18 +13,18 @@
// limitations under the License.
//
import { createClient, Client } from '@hcengineering/core'
import { getMetadata, getResource } from '@hcengineering/platform'
import { migrateOperations } from '@hcengineering/model-all'
import { connect } from './connection'
import clientPlugin from '@hcengineering/client'
import { AccountClient, createClient } from '@hcengineering/core'
import { migrateOperations } from '@hcengineering/model-all'
import { getMetadata, getResource } from '@hcengineering/platform'
import { connect } from './connection'
let client: Client
let client: AccountClient
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
export default async () => {
return {
function: {
GetClient: async (): Promise<Client> => {
GetClient: async (): Promise<AccountClient> => {
if (client === undefined) {
client = await createClient(connect)
for (const op of migrateOperations) {