Mailspring/packages/nylas-core/index.js
Juan Tejada ed749e0f51 Add sync worker error handling
- Handles sync errors in a single place. For now, if error is not a
socket error, will treat as a permanent error, save the error to the
account object, and prevent any other syncing until the error is cleared
from the account object
- Adds a NylasError class that can be extended and serialized. Adds it
to global namespace on all packages and replaces all uses of regular
Error
2016-06-27 16:03:38 -07:00

17 lines
484 B
JavaScript

global.Promise = require('bluebird');
global.NylasError = require('./nylas-error');
module.exports = {
Provider: {
Gmail: 'gmail',
IMAP: 'imap',
},
DatabaseConnector: require('./database-connector'),
PubsubConnector: require('./pubsub-connector'),
IMAPConnection: require('./imap-connection'),
SyncPolicy: require('./sync-policy'),
SchedulerUtils: require('./scheduler-utils'),
Config: require(`./config/${process.env.ENV || 'development'}`),
NylasError,
}