Commit Graph

14751 Commits

Author SHA1 Message Date
Anubhav Jain
a1db69acbc Refactored errorMessage in DDPRateLimiter 2015-07-22 09:52:08 -07:00
Anubhav Jain
c0d753c8ba Removed uncessary private_field array 2015-07-22 09:52:07 -07:00
Anubhav Jain
7a298ef0d6 Fixed changes from code review and created new Rule class.
Refactored rate-limit package to have a new rule class that organizes the rule attributes appropriately.
Moved all the Rule specific methods from RateLimiter to the Rule prototype. Reformatted code to match Meteor
code style.
2015-07-22 09:52:07 -07:00
Anubhav Jain
03f21b3bb3 Removed dead code and fixed ddp-rate-limiter package.
Cleaned up rate-limit package to remove old methods before refactor. Renamed private
variables inside rate-limit package. Updated livedata_server.js to include rate limiting
for both methods and subscriptions in their respective protocol_handlers. Currently no default
rule for subscriptions in the global DDPRateLimiter.Fixed ddp-rate-limiter tests to work as well.
2015-07-22 09:52:07 -07:00
Anubhav Jain
2fd1c35da1 Generalized rate-limit package and updated livedata_server.js to accept rules on methods and subscriptions.
Need to add checks and throw errors if wrong format / input to rate-limit package. Updated default rule in ddp-rate-limiter
to reflect new rate-limit generic design and moved the location of the DDPRateLimiter in livedata_server.js. Need to fix tests
for both ddp-rate-limiter and rate-limit packages with updated code and clean up rate-limit package.
2015-07-22 09:52:07 -07:00
Anubhav Jain
3e342e04eb Refactored rate-limit package.
Changed rate-limit package to take generic rules and match generic inputs to those rules.
Now, users can use the rate-limit package for whatever they would like. Tests still need to
be updated and need to change location of ddp-rate-limiter to include subscriptions.
Need to remove duplicate code in rate-limit from previous implementation which hardcoded DDP types
into the rate limiting package by making the input be a DDPCommon.MethodInvocation object.
2015-07-22 09:52:07 -07:00
Anubhav Jain
239f806c7d Code cleanup including 80 character limit formatting and refactoring.
Refactored rate-limit.js to remove duplicate code.
Removed commented out code and extra whitespace.
2015-07-22 09:52:07 -07:00
Anubhav Jain
9afcf90503 Fixed line wraps and some basic styling. 2015-07-22 09:52:07 -07:00
Anubhav Jain
9134542675 Updated rate-limit tests to work with setTimeout by using Meteor.setTimeout 2015-07-22 09:52:07 -07:00
Anubhav Jain
b999270ae1 Created default DDPRateLimiter and updated DDPServer to include a rate limiter.
DDPRateLimiter is a global rate limiter with a public API to add rules, set the default
error message and an option to pass in a configuration of rules. It is integrated into
DDP already to check on every method invocation.
2015-07-22 09:52:06 -07:00
Anubhav Jain
aae2d5f454 Added documentation to rate limit package and wrote more tests.
Cleaned up code in rate limit, added appropriate packages to package.js
and refactored rate limit.
2015-07-22 09:52:06 -07:00
Anubhav Jain
4a4b32597a Created a new rate limiter package with working tests and functionality 2015-07-22 09:52:06 -07:00
Ben Newman
09f67395af Fix Match pattern in babel-compiler/babel.js. 2015-07-22 10:21:32 -04:00
William Byrne
36ece1f957 Allow for multiple Accounts.onLogin callbacks on the client.
- Needed to return true in onLoginHook and onLoginFailureHook
iterators.
2015-07-21 20:44:24 -07:00
Ben Newman
b7fad6ba34 Specify version constraint for "check" package. 2015-07-21 22:11:04 -04:00
Ben Newman
155d3aef1a Make ecmascript depend on latest babel-compiler and promise packages. 2015-07-21 22:04:34 -04:00
Ben Newman
d30ffbf114 Upgrade meteor-promise NPM dependency to 0.4.1. 2015-07-21 22:03:55 -04:00
David Glasser
49ff1287c4 Merge branch 'pr/4753' into devel
Fixes #4753.
2015-07-21 19:00:58 -07:00
David Glasser
cc80a5fc18 Fix typo 2015-07-21 19:00:44 -07:00
Kenton Varda
72f445b1e9 Clarify docs about template inclusions + helpers
I'm not sure that this is the best way to document this, but I spent a while confused by this, so it would be nice to mention in the docs somewhere.
2015-07-21 19:00:18 -07:00
David Glasser
6789daf571 Fix stylus bugs and test it
It now runs basically the same caching test as 'less'.

The implementation has been made to be a bit more like 'less'; eg, using
empty string instead of `__app__` to mean the app, and consistently
making pathInPackage not start with a slash.
2015-07-21 18:59:15 -07:00
Ben Newman
937defa9bc Upgrade meteor-babel to 0.4.6 and thus babel-core to 5.8.3. 2015-07-21 21:57:20 -04:00
Martijn Walraven
ceb000d7b2 Add comment about BUNDLE_VERSION 0.5.5 being used 2015-07-21 17:47:34 -07:00
David Glasser
3e70c7319b Separate coffee and less self-tests 2015-07-21 17:29:22 -07:00
Slava Kim
b4e90047f5 fix a misuse of getPackageName in stylus 2015-07-21 17:29:57 -07:00
Martijn Walraven
a862d84142 Fix process.env modify in place bug and extract currentEnvWithPathsAdded and getCurrentNodeBinDir 2015-07-21 17:23:09 -07:00
Slava Kim
a41dcbbd66 Add some Windows-specific paths hacks to less/stylus 2015-07-21 17:15:44 -07:00
Anubhav Jain
567db5605a Changed email text to be optional in password_server.js 2015-07-21 15:22:58 -07:00
David Glasser
b28e8d452b proxy: on error, only send 503 if headers not sent
Otherwise there's an ugly "Can't render headers after they are sent to
the client" crash.

Fixes #4253. Fixes #4750.
2015-07-21 13:52:18 -07:00
David Glasser
d0de782d58 Update npm-shrinkwrap.json files 2015-07-21 13:45:15 -07:00
Ben Newman
b6dee683b6 Upgrade meteor-babel dependency to 0.4.5 2015-07-21 14:43:05 -04:00
Slava Kim
06e38be848 Remove lru-cache dependency from stylus 2015-07-21 11:00:13 -07:00
Slava Kim
807be08456 Less plugin no longer need lru-cache
Because it subclasses the caching compiler that already loads it.
2015-07-21 10:53:51 -07:00
Slava Kim
f8beb3c5ed Disable caching in stylus npm module
We do caching ourselves and the caching in stylus is broken in regards to sourcemaps: https://github.com/stylus/stylus/issues/1953
2015-07-21 10:19:27 -07:00
David Glasser
05f92dd504 Port Stylus to MultiFileCachingCompiler
Now it has a disk cache too!
2015-07-21 03:53:13 -07:00
David Glasser
d66c6b0f0e Fix MultiFileCachingCompiler error handling 2015-07-21 03:53:13 -07:00
David Glasser
efbe277309 Factor cache logic out of less
And improve the cache (now in MultiFileCachingCompiler) to not rewrite
the whole cache on every operation
2015-07-21 02:49:20 -07:00
David Glasser
6acae1df4d document CompileResult for coffeescript 2015-07-21 01:28:39 -07:00
David Glasser
c94c107d2d CachingCompiler: some parallelism 2015-07-21 00:35:54 -07:00
David Glasser
1c6acba777 build plugin doc comment tweaks 2015-07-20 23:46:22 -07:00
Ben Newman
6e018dccb1 Include NPM files for promise package. 2015-07-21 00:31:51 -04:00
Ben Newman
14969a6c5b Decompose a promise package from the ecmascript package. 2015-07-21 00:29:48 -04:00
Ben Newman
3b99659986 Upgrade dev bundle meteor-{promise,babel} to latest versions.
The breaking change in the latest version is that the Fiber constructor is
no longer included as a meteor-promise dependency, but must be supplied by
assigning to Promise.Fiber.
2015-07-20 22:47:34 -04:00
Slava Kim
a359c72509 Public docs comments for register{Compiler,Minifier,Linter} 2015-07-20 19:44:35 -07:00
Slava Kim
685c1cc510 Add a doc comment for getExtension 2015-07-20 19:26:55 -07:00
David Glasser
f7ee0ba385 new caching-compiler package
Implements caching for single-file compilers (those that don't implement
'import' directives) as a superclass, CachingCompiler.

Used in coffeescript and templating.
2015-07-20 15:29:37 -07:00
Martijn Walraven
67c1a3a525 Temporary fix until Cordova respects program.json 2015-07-20 11:41:54 -07:00
Slava Kim
053dfaf4c5 Fix a caching bug in stylus 2015-07-19 22:48:40 -07:00
Slava Kim
d9e047994f Fix bugs in stylus importer
Such as failing to import libs like 'nib'
2015-07-19 22:37:42 -07:00
David Greenspan
d0c192a141 Bring babel-tests unit tests into ecmascript 2015-07-19 16:14:06 -07:00