mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-09-22 16:26:08 +08:00
c634380ab6
Summary: Prior to this diff it was easy for us to create too many IMAP connections (e.g. by requesting many attachments at once), causing random failures when the server would reject our connection attempts. This diff adds a per-Account IMAP pooling mechanism so that we avoid these failures. Test Plan: Run locally with sync worker and several other clients using the pool, verify correct behavior. Also added a few unit tests. Reviewers: evan, spang, juan Reviewed By: juan Differential Revision: https://phab.nylas.com/D3965 |
||
---|---|---|
.. | ||
spec | ||
src | ||
index.js | ||
package.json | ||
README.md |
Isomorphic Core
Isomorphic refers to javascript that can be run on both the client and the server.
This is shared code for mail and utilities that is designed to run both on deployed cloud servers and from within the Nylas Mail client.
Use through a regular import: import iso-core from 'isomorphic-core'
It is required as a dependency in the package.json of other modules.
This library isn't on the npm registry, but works as a dependency thanks to
lerna bootstrap
See index.js for what gets explicitly exported by this library.
Important Usage Notes:
Since this code runs in both the client and the server, you must be careful with what libraries you use. Some common gotchas:
- You can't use
NylasEnv
orNylasExports
. These are injected only in the client. - If you require a 3rd party library, it must be added to the "dependencies" of
isomorphic-core's
package.json
- You may use modern javascript syntax. Both the client and server get compiled with the same .babelrc setting