1
0
mirror of https://github.com/moparisthebest/mail synced 2024-11-25 02:12:17 -05:00

integrated imap-client amd branch

This commit is contained in:
Tankred Hase 2013-09-19 18:35:12 +02:00
parent 5f4c923a09
commit 7b532f780c
11 changed files with 29 additions and 17 deletions

View File

@ -120,7 +120,22 @@ module.exports = function(grunt) {
expand: true,
flatten: true,
cwd: 'node_modules/',
src: ['crypto-lib/node_modules/node-forge/js/*.js'],
src: [
'crypto-lib/node_modules/node-forge/js/*.js',
'imap-client/src/*.js',
'imap-client/node_modules/inbox/src/*.js',
'imap-client/node_modules/setimmediate/setImmediate.js',
'imap-client/node_modules/inbox/node_modules/node-shims/src/*.js',
'imap-client/node_modules/inbox/node_modules/utf7/src/utf7.js',
'imap-client/node_modules/inbox/node_modules/xoauth2/src/xoauth2.js',
'imap-client/node_modules/mimelib/src/mimelib.js',
'imap-client/node_modules/mimelib/node_modules/addressparser/src/addressparser.js',
'imap-client/node_modules/mimelib/node_modules/encoding/src/encoding.js',
'imap-client/node_modules/mimelib/node_modules/encoding/node_modules/iconv-lite/src/*.js',
'imap-client/node_modules/mimelib/node_modules/encoding/node_modules/mime/src/*.js',
'imap-client/node_modules/mailparser/src/*.js',
'imap-client/node_modules/mailparser/node_modules/mime/src/mime.js'
],
dest: 'src/lib/'
},
npmDev: {

View File

@ -11,7 +11,7 @@
},
"dependencies": {
"crypto-lib": "https://github.com/whiteout-io/crypto-lib/tarball/master",
"imap-client": "git+ssh://git@github.com:whiteout-io/imap-client.git#builtins",
"imap-client": "git+ssh://git@github.com:whiteout-io/imap-client.git#amd",
"smtp-client": "git+ssh://git@github.com:whiteout-io/smtp-client.git#master"
},
"devDependencies": {

View File

@ -7,10 +7,6 @@ cd `dirname $0`
cd ..
# build imap/smtp modules and copy
cd ./node_modules/imap-client/
node build.js && cp ./src-gen/*.js ../../src/lib/
cd ../../
cd ./node_modules/smtp-client/
node build.js && cp ./src-gen/*.js ../../src/lib/
cd ../../

View File

@ -5,8 +5,8 @@ define(function(require) {
'use strict';
var $ = require('jquery'),
ImapClient = require('ImapClient'),
SmtpClient = require('SmtpClient'),
ImapClient = require('imap-client'),
SmtpClient = require('smtp-client'),
EmailDAO = require('js/dao/email-dao'),
KeychainDAO = require('js/dao/keychain-dao'),
cloudstorage = require('js/dao/cloudstorage-dao'),

View File

@ -80,7 +80,7 @@
if (typeof define !== 'undefined' && define.amd) {
// AMD
define(['forge'], function(forge) {
define(['node-forge'], function(forge) {
return new AesCBC(forge);
});
} else if (typeof module !== 'undefined' && module.exports) {

View File

@ -1,7 +1,7 @@
/**
* A Wrapper for Forge's PBKDF2 function
*/
define(['forge'], function(forge) {
define(['node-forge'], function(forge) {
'use strict';
var self = {};

View File

@ -129,7 +129,7 @@
if (typeof define !== 'undefined' && define.amd) {
// AMD
define(['forge', 'cryptoLib/util', 'js/app-config'], function(forge, util, app) {
define(['node-forge', 'cryptoLib/util', 'js/app-config'], function(forge, util, app) {
return new RSA(forge, util, app);
});
} else if (typeof module !== 'undefined' && module.exports) {

View File

@ -196,7 +196,7 @@
if (typeof define !== 'undefined' && define.amd) {
// AMD
define(['uuid', 'forge'], function(uuid, forge) {
define(['uuid', 'node-forge'], function(uuid, forge) {
return new Util(forge, uuid, undefined);
});
} else if (typeof module !== 'undefined' && module.exports) {

View File

@ -6,6 +6,8 @@
paths: {
js: '../js',
test: '../../test',
'node-forge': 'forge',
'setimmediate': 'setImmediate',
cryptoLib: '../js/crypto',
jquery: 'jquery-1.8.2.min',
underscore: 'underscore-1.4.4.min',
@ -13,8 +15,7 @@
lawnchairSQL: 'lawnchair/lawnchair-adapter-webkit-sqlite-git',
lawnchairIDB: 'lawnchair/lawnchair-adapter-indexed-db-git',
cordova: 'cordova-2.5.0',
ImapClient: 'imap-client-browserified',
SmtpClient: 'smtp-client-browserified',
'smtp-client': 'smtp-client-browserified',
angular: 'angular/angular.min',
angularRoute: 'angular/angular-route.min',
angularTouch: 'angular/angular-touch.min',

View File

@ -3,8 +3,8 @@ define(function(require) {
var KeychainDAO = require('js/dao/keychain-dao'),
EmailDAO = require('js/dao/email-dao'),
SmtpClient = require('SmtpClient'),
ImapClient = require('ImapClient'),
SmtpClient = require('smtp-client'),
ImapClient = require('imap-client'),
app = require('js/app-config'),
expect = chai.expect;

View File

@ -1,4 +1,4 @@
define(['forge', 'cryptoLib/util', 'test/test-data'], function(forge, util, testData) {
define(['node-forge', 'cryptoLib/util', 'test/test-data'], function(forge, util, testData) {
'use strict';
module("Forge Crypto");