diff --git a/Gruntfile.js b/Gruntfile.js index 40f940f..ccf6bf9 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -127,8 +127,17 @@ module.exports = function(grunt) { src: [ 'requirejs/require.js', 'imap-client/src/*.js', + 'imap-client/node_modules/browserbox/src/*.js', + 'imap-client/node_modules/browserbox/node_modules/imap-handler/src/*.js', + 'imap-client/node_modules/browserbox/node_modules/mimefuncs/src/*.js', + 'imap-client/node_modules/browserbox/node_modules/mimefuncs/node_modules/stringencoding/dist/stringencoding.js', + 'imap-client/node_modules/browserbox/node_modules/tcp-socket/src/*.js', + 'imap-client/node_modules/browserbox/node_modules/utf7/src/*.js', 'mailreader/src/*.js', - 'pgpmailer/src/*.js', + 'mailreader/node_modules/mimeparser/src/*.js', + 'mailreader/node_modules/mimeparser/node_modules/addressparser/src/*.js', + + 'pgpmailer/src/*.js', /* TODO: copy sending deps */ 'pgpbuilder/src/*.js' ], dest: 'src/lib/' diff --git a/package.json b/package.json index 5364447..2eb2653 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ }, "dependencies": { "crypto-lib": "https://github.com/whiteout-io/crypto-lib/tarball/v0.1.1", - "imap-client": "https://github.com/whiteout-io/imap-client/tarball/v0.2.0", + "imap-client": "https://github.com/whiteout-io/imap-client/tarball/master", "mailreader": "https://github.com/whiteout-io/mailreader/tarball/v0.2.0", "pgpmailer": "https://github.com/whiteout-io/pgpmailer/tarball/v0.1.0", "pgpbuilder": "https://github.com/whiteout-io/pgpbuilder/tarball/v0.1.0", diff --git a/src/js/app-controller.js b/src/js/app-controller.js index f30cd10..30257a4 100644 --- a/src/js/app-controller.js +++ b/src/js/app-controller.js @@ -6,9 +6,9 @@ define(function(require) { var Auth = require('js/bo/auth'), PGP = require('js/crypto/pgp'), - PgpMailer = require('pgpmailer'), + /* PgpMailer = require('pgpmailer'), */ OAuth = require('js/util/oauth'), - PgpBuilder = require('pgpbuilder'), + /* PgpBuilder = require('pgpbuilder'), */ OutboxBO = require('js/bo/outbox'), mailreader = require('mailreader'), ImapClient = require('imap-client'), @@ -71,7 +71,7 @@ define(function(require) { self._invitationDao = new InvitationDAO(restDao); self._keychain = keychain = new KeychainDAO(lawnchairDao, pubkeyDao); self._crypto = pgp = new PGP(); - self._pgpbuilder = pgpbuilder = new PgpBuilder(); + self._pgpbuilder = pgpbuilder = {}; //new PgpBuilder(); emailSync = new EmailSync(keychain, userStorage); self._emailDao = emailDao = new EmailDAO(keychain, pgp, userStorage, pgpbuilder, mailreader, emailSync); self._outboxBo = new OutboxBO(emailDao, keychain, userStorage); @@ -107,11 +107,8 @@ define(function(require) { var auth, imapOptions, imapClient, smtpOptions, pgpMailer; auth = { - XOAuth2: { - user: credentials.emailAddress, - clientId: config.gmail.clientId, - accessToken: credentials.oauthToken - } + user: credentials.emailAddress, + xoauth2: credentials.oauthToken }; imapOptions = { secure: config.gmail.imap.secure, @@ -131,7 +128,7 @@ define(function(require) { onError: console.error }; - pgpMailer = new PgpMailer(smtpOptions, self._pgpbuilder); + //pgpMailer = new PgpMailer(smtpOptions, self._pgpbuilder); imapClient = new ImapClient(imapOptions, mailreader); imapClient.onError = onImapError;