Commit Graph

14788 Commits

Author SHA1 Message Date
David Glasser
43b4b30205 Release PLUGINS-PREVIEW@1
This included removing some internal version constraints. It would be
nice if package A could say "use B@2.0.0" (when both have changed), but
when they're both in the release, we need to make a release that has a
B@2.0.0-rc in it, which doesn't match that constraint. Fortunately,
constraints aren't necessary within a release anyway.
release/PLUGINS-PREVIEW@1
2015-07-22 23:19:11 -07:00
David Glasser
4ab5858ab3 Run jsdoc.sh 2015-07-22 22:30:42 -07:00
David Glasser
3da4e611c9 Get JSDoc working again
- Upgrade to a newer (unreleased) version which supports
     function k({} = {}) {}
  and doesn't also crash

- Filter out boring warnings

- Don't use ES7 syntax that JSDoc doesn't support in one file that
  has JSDoc in it
2015-07-22 22:29:08 -07:00
David Glasser
abce1797da fix bad jsdoc 2015-07-22 22:06:38 -07:00
David Glasser
cdd71b8312 fewer negatives in canWriteLegacyBuilds 2015-07-22 21:48:07 -07:00
David Glasser
d4a8c491c1 some more comments on compiler-plugin.js 2015-07-22 21:40:52 -07:00
David Glasser
1c93d09834 add standard-minifiers to examples
clean up some other example package usage
2015-07-22 21:28:49 -07:00
Martijn Walraven
12366fc4dc Remove now unnecessary runLog calls in meteor-npm.js 2015-07-22 21:07:15 -07:00
David Glasser
cab2f6a237 Fix crash on publish with no linters 2015-07-22 20:56:24 -07:00
David Glasser
7b0c4f1950 Stop old tools from taking isopack-2-only versions
I thought we could rely on isobuild:compiler-plugin for this, but it's
not good enough: a package could have dependencies that are satisfiable
without choosing a dependency version with a compiler plugin, yet choose
that dependency version at publish time and become ineligble for legacy
builds.
2015-07-22 20:54:07 -07:00
Martijn Walraven
02cfef50d6 Fix runNpmCommand on Windows 2015-07-22 19:12:37 -07:00
Martijn Walraven
1110a69f43 Improve error reporting in meteor-npm.js 2015-07-22 19:10:45 -07:00
Avital Oliver
0d20041683 Add clarifying comment to ddp rate limit test 2015-07-22 10:49:23 -07:00
Anubhav Jain
59c0bcf1d2 Added very simple API description to Tinytest README 2015-07-22 10:14:21 -07:00
Anubhav Jain
d8bedef10d Merge branch 'anubhav-rate-limit' into devel
Adds rate limiting to Meteor in the form of a default rule in accounts_rate_limit for user creation, login attempts and password resets. It also adds a DDPRateLimiter that allows users to add rules to methods and subscriptions.
2015-07-22 09:54:00 -07:00
Anubhav Jain
ce84258bfd Fixed getLastRateLimitEvent mixup and updated DDPRateLimiter tests to reflect that. 2015-07-22 09:52:10 -07:00
Anubhav Jain
ba77b0f6cc Fixed a bug that prevented DDP Rate Limiter from running in IE8 due to some mysterious variable hoisting. 2015-07-22 09:52:10 -07:00
Anubhav Jain
432bc5b61b Fixed ipAddr -> clientAddress and added tests to ensure testing for existence of clientAddress 2015-07-22 09:52:10 -07:00
Anubhav Jain
ab1dc30623 Added summary to rate-limit-tests.js and fixed Tinytest formatting for ddp-rate-limiter and rate-limit tests 2015-07-22 09:52:10 -07:00
Anubhav Jain
a957e613ed Improved naming to rate limiter tests 2015-07-22 09:52:10 -07:00
Anubhav Jain
b83427e369 Updated DDPRateLimiter Tests thanks to Avi!
Modified testing to be extensible and easy to modify and more thorough
Refactored common code into ddp-rate-limiter-tests-common.js
Explicitly defined timeToReset to be passed back to user from livedata_server.js and appended to error object
2015-07-22 09:52:10 -07:00
Anubhav Jain
6a525fbea7 Updated DDPRateLimiter structure per Avi's suggestions and modified tests.
Updated documentation and default rate limit as well.
2015-07-22 09:52:10 -07:00
Anubhav Jain
759b9a2c19 Updating docs 2015-07-22 09:52:09 -07:00
Anubhav Jain
13331009d0 Making more code fixes and documentation update 2015-07-22 09:52:09 -07:00
Anubhav Jain
4cc907f7e4 Updating docs and fixing code review comments. 2015-07-22 09:52:09 -07:00
Anubhav Jain
50d3437da9 Updated comments and line sizes in markdown and rate limiter package 2015-07-22 09:52:09 -07:00
Anubhav Jain
89afc4a22a Added forgot password to default rate limit 2015-07-22 09:52:09 -07:00
Anubhav Jain
4302ad2219 Fix tests to new naming of valid-->allowed 2015-07-22 09:52:09 -07:00
Anubhav Jain
26f612cb0b Moving DDPRateLimiter to a weak dependency to minimize dependencies on DDP 2015-07-22 09:52:09 -07:00
Anubhav Jain
38fe0d41e4 Changed Rule.resetCounter to delete all keys, allowing for garbage collection 2015-07-22 09:52:09 -07:00
Anubhav Jain
ac1e0355c5 Added in per connection id rule as default, instead of per IP. Removed a console.log 2015-07-22 09:52:08 -07:00
Anubhav Jain
9f9638e3a8 Added DDPRateLimiter to API docs 2015-07-22 09:52:08 -07:00
Anubhav Jain
817ed2904e Added comments and DocBlockr api docs.
Updated DDPRateLimiter's default rule to contain password resets and create new users. Changed valid to allowed in rateLimitResult replies.
2015-07-22 09:52:08 -07:00
Anubhav Jain
39ead027dd Moved default rule adding to accounts_base and added a way to remove the default login rule. Updated ddp rate limiter server tests to test removing the default rule 2015-07-22 09:52:08 -07:00
Anubhav Jain
b54401274e Fixed Rate Limit and DDP Rate Limit packages. Added end to end tests which test removing rules. 2015-07-22 09:52:08 -07:00
Anubhav Jain
d58bf19574 Changed DDPRateLimiter.config to DDPRateLimiter.setRules, which overrides all the rules stored
in the RateLimiter. Added comments above Rule.apply to explain what it does.
2015-07-22 09:52:08 -07:00
Anubhav Jain
fc4b69272f Moved counters to each rule instead of a large dictionary per rate limiter 2015-07-22 09:52:08 -07:00
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