1
0
mirror of https://github.com/moparisthebest/mail synced 2024-11-22 00:42:20 -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, expand: true,
flatten: true, flatten: true,
cwd: 'node_modules/', 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/' dest: 'src/lib/'
}, },
npmDev: { npmDev: {

View File

@ -11,7 +11,7 @@
}, },
"dependencies": { "dependencies": {
"crypto-lib": "https://github.com/whiteout-io/crypto-lib/tarball/master", "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" "smtp-client": "git+ssh://git@github.com:whiteout-io/smtp-client.git#master"
}, },
"devDependencies": { "devDependencies": {

View File

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

View File

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

View File

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

View File

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

View File

@ -129,7 +129,7 @@
if (typeof define !== 'undefined' && define.amd) { if (typeof define !== 'undefined' && define.amd) {
// 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); return new RSA(forge, util, app);
}); });
} else if (typeof module !== 'undefined' && module.exports) { } else if (typeof module !== 'undefined' && module.exports) {

View File

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

View File

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

View File

@ -3,8 +3,8 @@ define(function(require) {
var KeychainDAO = require('js/dao/keychain-dao'), var KeychainDAO = require('js/dao/keychain-dao'),
EmailDAO = require('js/dao/email-dao'), EmailDAO = require('js/dao/email-dao'),
SmtpClient = require('SmtpClient'), SmtpClient = require('smtp-client'),
ImapClient = require('ImapClient'), ImapClient = require('imap-client'),
app = require('js/app-config'), app = require('js/app-config'),
expect = chai.expect; 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'; 'use strict';
module("Forge Crypto"); module("Forge Crypto");