From 8c004d24184028d062460843ae228c9d31d00248 Mon Sep 17 00:00:00 2001 From: Felix Hammerl Date: Tue, 22 Apr 2014 18:19:28 +0200 Subject: [PATCH] integrate pgpmailer --- Gruntfile.js | 11 +++++++---- package.json | 6 +++--- src/js/app-controller.js | 8 ++++---- src/require-config.js | 1 + 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index ccf6bf9..6e42208 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -130,15 +130,18 @@ module.exports = function(grunt) { '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', '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' + 'pgpbuilder/src/*.js', + 'pgpbuilder/node_modules/mailbuild/src/*.js', + 'pgpbuilder/node_modules/mailbuild/node_modules/mimetypes/src/*.js', + 'pgpbuilder/node_modules/mailbuild/node_modules/punycode/punycode.min.js', + 'pgpmailer/src/*.js', + 'pgpmailer/node_modules/smtpclient/src/*.js', + 'pgpmailer/node_modules/smtpclient/node_modules/stringencoding/dist/stringencoding.js' ], dest: 'src/lib/' }, diff --git a/package.json b/package.json index 2eb2653..78ac54c 100644 --- a/package.json +++ b/package.json @@ -11,10 +11,10 @@ }, "dependencies": { "crypto-lib": "https://github.com/whiteout-io/crypto-lib/tarball/v0.1.1", - "imap-client": "https://github.com/whiteout-io/imap-client/tarball/master", + "imap-client": "https://github.com/whiteout-io/imap-client/tarball/v0.2.1", "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", + "pgpmailer": "https://github.com/whiteout-io/pgpmailer/tarball/dev/browser", + "pgpbuilder": "https://github.com/whiteout-io/pgpbuilder/tarball/v0.2.1", "requirejs": "2.1.10" }, "devDependencies": { diff --git a/src/js/app-controller.js b/src/js/app-controller.js index 30257a4..97f6f97 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); @@ -128,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; diff --git a/src/require-config.js b/src/require-config.js index 424229a..604e2bf 100644 --- a/src/require-config.js +++ b/src/require-config.js @@ -18,6 +18,7 @@ angularSanitize: 'angular/angular-sanitize.min', uuid: 'uuid/uuid', forge: 'forge/forge.min', + punycode: 'punycode.min', openpgp: 'openpgp/openpgp.min', iscroll: 'iscroll/iscroll-min' },