mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-09-18 18:44:52 +08:00
Fix package json
This commit is contained in:
parent
8108a875ee
commit
0f4ed7f4a1
7 changed files with 33 additions and 11 deletions
|
@ -8,11 +8,11 @@
|
|||
"author": "Nylas",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"googleapis": "^9.0.0",
|
||||
"googleapis": "9.0.0",
|
||||
"hapi": "13.4.1",
|
||||
"hapi-auth-basic": "4.2.0",
|
||||
"hapi-swagger": "6.1.0",
|
||||
"hapi-boom-decorators": "1.1.3",
|
||||
"hapi-swagger": "6.1.0",
|
||||
"inert": "4.0.0",
|
||||
"joi": "8.4.2",
|
||||
"nylas-core": "0.x.x",
|
||||
|
|
|
@ -5,7 +5,8 @@
|
|||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"imap": "0.8.x",
|
||||
"sqlite3": "3.1.4"
|
||||
"sqlite3": "3.1.4",
|
||||
"xoauth2": "1.x.x"
|
||||
},
|
||||
"author": "Nylas",
|
||||
"license": "ISC"
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"hapi": "^13.4.1",
|
||||
"hapi-plugin-websocket": "^0.9.2",
|
||||
"inert": "^4.0.0",
|
||||
"hapi": "13.4.1",
|
||||
"hapi-plugin-websocket": "0.9.2",
|
||||
"inert": "4.0.0",
|
||||
"nylas-core": "0.x.x"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,6 +9,9 @@
|
|||
"test": "babel-node spec/run.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"babel-cli": "6.10.1",
|
||||
"babel-preset-es2015": "6.9.0",
|
||||
"jasmine": "2.4.1",
|
||||
"mailparser": "0.6.0",
|
||||
"mimelib": "^0.2.19",
|
||||
"nylas-core": "0.x.x"
|
||||
|
|
|
@ -110,13 +110,12 @@ class SyncWorker {
|
|||
}
|
||||
|
||||
syncbackMessageActions() {
|
||||
return Promise.resolve();
|
||||
// TODO
|
||||
const {SyncbackRequest, accountId, Account} = this._db;
|
||||
return Account.find({where: {id: accountId}}).then((account) => {
|
||||
return this._db.Account.find({where: {id: accountId}}).then((account) => {
|
||||
return Promise.each(SyncbackRequest.findAll().then((reqs = []) =>
|
||||
reqs.map((request) => {
|
||||
const task = SyncbackTaskFactory.create(account, request);
|
||||
if (!task) return Promise.reject("No Task")
|
||||
return this._conn.runOperation(task)
|
||||
})
|
||||
));
|
||||
|
|
|
@ -4,8 +4,13 @@
|
|||
*/
|
||||
class SyncbackTaskFactory {
|
||||
static create(account, syncbackRequest) {
|
||||
if (account) {
|
||||
|
||||
if (syncbackRequest.type === "MoveToFolder") {
|
||||
// TODO: Know it's IMAP from the account object.
|
||||
const Task = require('./syncback_tasks/move-to-folder.imap');
|
||||
return new Task(account, syncbackRequest)
|
||||
}
|
||||
return null
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = SyncbackTaskFactory
|
||||
|
|
14
packages/nylas-sync/syncback_tasks/move-to-folder.imap.js
Normal file
14
packages/nylas-sync/syncback_tasks/move-to-folder.imap.js
Normal file
|
@ -0,0 +1,14 @@
|
|||
class MoveToFolderIMAP {
|
||||
constructor(account, syncbackRequest) {
|
||||
this._account = account;
|
||||
this._syncbackRequest = syncbackRequest;
|
||||
}
|
||||
|
||||
description() {
|
||||
return `MoveToFolder`;
|
||||
}
|
||||
|
||||
run(db, imap) {
|
||||
}
|
||||
}
|
||||
module.exports = MoveToFolderIMAP
|
Loading…
Add table
Reference in a new issue