-
Notifications
You must be signed in to change notification settings - Fork 515
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
4837 single user email import #5582
base: master
Are you sure you want to change the base?
Changes from 8 commits
f495760
7f7bb3b
32a14b3
91cf1cb
d22161a
a746670
a9e8aea
e724beb
5ccef48
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,14 +2,12 @@ import path from "node:path" | |
import fs from "fs-extra" | ||
import { build as esbuild } from "esbuild" | ||
import { getTutanotaAppVersion, runStep, sh, writeFile } from "./buildUtils.js" | ||
import { $ } from "zx" | ||
import "zx/globals" | ||
import * as env from "./env.js" | ||
import { externalTranslationsPlugin, keytarNativePlugin, libDeps, preludeEnvPlugin, sqliteNativePlugin } from "./esbuildUtils.js" | ||
import { fileURLToPath } from "node:url" | ||
import * as LaunchHtml from "./LaunchHtml.js" | ||
import os from "node:os" | ||
import { checkOfflineDatabaseMigrations } from "./checkOfflineDbMigratons.js" | ||
import { buildRuntimePackages } from "./packageBuilderFunctions.js" | ||
|
||
export async function runDevBuild({ stage, host, desktop, clean, ignoreMigrations }) { | ||
|
@@ -23,7 +21,7 @@ export async function runDevBuild({ stage, host, desktop, clean, ignoreMigration | |
if (ignoreMigrations) { | ||
console.warn("CAUTION: Offline migrations are not being validated.") | ||
} else { | ||
checkOfflineDatabaseMigrations() | ||
//checkOfflineDatabaseMigrations() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. seems like we only need to add the imapAccountSyncState to the mailboxgrouproot. since it's possible that someone started an import from another machine and then logs into the old client, we probably need to at least delete the mailboxgrouproot (since null as default is not necessarily correct) |
||
} | ||
}) | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,6 @@ import { dirname } from "node:path" | |
import { fileURLToPath } from "node:url" | ||
import { createHtml } from "./buildSrc/createHtml.js" | ||
import { Argument, program } from "commander" | ||
import { checkOfflineDatabaseMigrations } from "./buildSrc/checkOfflineDbMigratons.js" | ||
|
||
const __dirname = dirname(fileURLToPath(import.meta.url)) | ||
|
||
|
@@ -52,7 +51,8 @@ async function doBuild(opts) { | |
measure() | ||
const version = getTutanotaAppVersion() | ||
|
||
await checkOfflineDatabaseMigrations() | ||
// TOOD FIXME activate before release | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixme |
||
//await checkOfflineDatabaseMigrations() | ||
|
||
if (opts.existing) { | ||
console.log("Found existing option (-e). Skipping Webapp build.") | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
{ | ||
"name": "ImapImportFacade", | ||
"type": "facade", | ||
"senders": ["desktop"], | ||
"receivers": ["web"], | ||
"doc": "Facade implemented by the web worker, receiving IMAP import events.", | ||
"methods": { | ||
"onMailbox": { | ||
"doc": "onMailbox IMAP import event.", | ||
"arg": [ | ||
{ | ||
"imapMailbox": "ImapMailbox" | ||
}, | ||
{ | ||
"eventType": "AdSyncEventType" | ||
} | ||
], | ||
"ret": "void" | ||
}, | ||
"onMailboxStatus": { | ||
"doc": "onMailboxStatus IMAP import event.", | ||
"arg": [ | ||
{ | ||
"imapMailboxStatus": "ImapMailboxStatus" | ||
} | ||
], | ||
"ret": "void" | ||
}, | ||
"onMail": { | ||
"doc": "onMail IMAP import event.", | ||
"arg": [ | ||
{ | ||
"imapMail": "ImapMail" | ||
}, | ||
{ | ||
"eventType": "AdSyncEventType" | ||
} | ||
], | ||
"ret": "void" | ||
}, | ||
"onPostpone": { | ||
"doc": "onPostpone IMAP import event.", | ||
"arg": [ | ||
{ | ||
"postponedUntil": "Date" | ||
} | ||
], | ||
"ret": "void" | ||
}, | ||
"onFinish": { | ||
"doc": "onFinish IMAP import event.", | ||
"arg": [ | ||
{ | ||
"downloadedQuota": "number" | ||
} | ||
], | ||
"ret": "void" | ||
}, | ||
"onError": { | ||
"doc": "onError IMAP import event.", | ||
"arg": [ | ||
{ | ||
"imapError": "ImapError" | ||
} | ||
], | ||
"ret": "void" | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"name": "ImapImportSystemFacade", | ||
"type": "facade", | ||
"senders": ["web"], | ||
"receivers": ["desktop"], | ||
"doc": "Facade implemented by the native desktop client starting and stopping an IMAP import.", | ||
"methods": { | ||
"startImport": { | ||
"doc": "Start the IMAP import.", | ||
"arg": [ | ||
{ | ||
"imapSyncState": "ImapSyncState" | ||
} | ||
], | ||
"ret": "void" | ||
}, | ||
"stopImport": { | ||
"doc": "Stop a running IMAP import.", | ||
"arg": [], | ||
"ret": "void" | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"name": "AdSyncEventType", | ||
"type": "typeref", | ||
"location": { | ||
"typescript": "../src/desktop/imapimport/adsync/AdSyncEventListener.js" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"name": "ImapError", | ||
"type": "typeref", | ||
"location": { | ||
"typescript": "../src/desktop/imapimport/adsync/imapmail/ImapError.js" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"name": "ImapMail", | ||
"type": "typeref", | ||
"location": { | ||
"typescript": "../src/desktop/imapimport/adsync/imapmail/ImapMail.js" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"name": "ImapMailbox", | ||
"type": "typeref", | ||
"location": { | ||
"typescript": "../src/desktop/imapimport/adsync/imapmail/ImapMailbox.js" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"name": "ImapMailboxStatus", | ||
"type": "typeref", | ||
"location": { | ||
"typescript": "../src/desktop/imapimport/adsync/imapmail/ImapMailbox.js" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"name": "ImapSyncState", | ||
"type": "typeref", | ||
"location": { | ||
"typescript": "../src/desktop/imapimport/adsync/ImapSyncState.js" | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would it make sense to just add a migration that drops the db if that's what you need?