Reconcile CryptoErrors

Introduces a new package in order to avoid tutanota-crypto depending
on the whole tutanota-utils. With this package we can have one canonical
CryptoError.

We add another entry point to tutanota-crypto in order to be able to
import only error classes from any chunk.

We've adjusted moduleResolution for tsconfig to support export maps
for our new entry point.

We've updated @rollup/plugin-typescript to add support for export maps.

We have reorganized utils to adjust the chunking. Error utils are now
a part of the main chunk.

We have moved ServiceWorkerClient into the main chunk because we need
to handle the errors and also because it is anyway invoked only after
the other initialization is done.

close #6342
This commit is contained in:
ivk 2024-01-08 17:14:09 +01:00 committed by Murilo Rocha Pereira
parent fa01447dcb
commit 9b1e3edbae
116 changed files with 1098 additions and 286 deletions

View file

@ -6,7 +6,6 @@ import type { MailboxDetail } from "../../../src/mail/model/MailModel.js"
import { MailModel } from "../../../src/mail/model/MailModel.js"
import { MailFolderType, OperationType } from "../../../src/api/common/TutanotaConstants.js"
import { MailFolderTypeRef, MailTypeRef } from "../../../src/api/entities/tutanota/TypeRefs.js"
import type { EntityUpdateData } from "../../../src/api/main/EventController.js"
import { EntityClient } from "../../../src/api/common/EntityClient.js"
import { EntityRestClientMock } from "../api/worker/rest/EntityRestClientMock.js"
import nodemocker from "../nodemocker.js"
@ -19,6 +18,7 @@ import { WebsocketConnectivityModel } from "../../../src/misc/WebsocketConnectiv
import { InboxRuleHandler } from "../../../src/mail/model/InboxRuleHandler.js"
import { UserController } from "../../../src/api/main/UserController.js"
import { createTestEntity } from "../TestUtils.js"
import { EntityUpdateData } from "../../../src/api/common/utils/EntityUpdateUtils.js"
o.spec("MailModelTest", function () {
let notifications: Partial<Notifications>