UBERF-7922: Split Server Storage to middlewares (#6464)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev
2024-09-09 13:40:49 +05:00
committed by GitHub
parent 964b8d1ba4
commit 55b51b0fd0
155 changed files with 3892 additions and 3191 deletions
@@ -22,16 +22,8 @@ import core, {
Ref,
Space,
Status,
TxOperations,
generateId
TxOperations
} from '@hcengineering/core'
import { IntlString } from '@hcengineering/platform'
import { LiveQuery } from '@hcengineering/query'
import task, { TaskType } from '@hcengineering/task'
import { MarkupNode, MarkupNodeType, areEqualMarkups, markupToJSON, traverseNode } from '@hcengineering/text'
import tracker, { Issue, IssuePriority } from '@hcengineering/tracker'
import time, { type ToDo } from '@hcengineering/time'
import { ProjectsV2ItemEvent } from '@octokit/webhooks-types'
import github, {
DocSyncInfo,
GithubFieldMapping,
@@ -41,6 +33,13 @@ import github, {
GithubMilestone,
GithubProject
} from '@hcengineering/github'
import { IntlString } from '@hcengineering/platform'
import { LiveQuery } from '@hcengineering/query'
import task, { TaskType } from '@hcengineering/task'
import { MarkupNode, MarkupNodeType, areEqualMarkups, markupToJSON, traverseNode } from '@hcengineering/text'
import time, { type ToDo } from '@hcengineering/time'
import tracker, { Issue, IssuePriority } from '@hcengineering/tracker'
import { ProjectsV2ItemEvent } from '@octokit/webhooks-types'
import { deepEqual } from 'fast-equals'
import { Octokit } from 'octokit'
import {
@@ -393,7 +392,7 @@ export abstract class IssueSyncManagerBase {
return true
})
const updateTodos = this.client.apply('todos' + account)
const updateTodos = this.client.apply()
for (const [k, v] of Object.entries(todos)) {
await updateTodos.updateDoc(time.class.ToDo, time.space.ToDos, k as Ref<ToDo>, {
doneOn: v ? Date.now() : null
@@ -1071,7 +1070,7 @@ export abstract class IssueSyncManagerBase {
url: { $in: issues.map((it) => (it.url ?? '').toLowerCase()) }
})
const ops = derivedClient.apply('sync-issyes' + generateId())
const ops = derivedClient.apply()
for (const issue of issues) {
try {