Commit Graph

5486 Commits

Author SHA1 Message Date
Sashko Stubailo
1ee8f2aff6 Fix issues with meteorid popup release/sso-7 2014-01-08 17:06:15 -08:00
Sashko Stubailo
bd9e5d8057 Add log warning when there is an error with OAuth 2014-01-08 14:42:01 -08:00
Sashko Stubailo
8d6e2c72e5 Fix typo in callback name in Facebook package 2014-01-08 11:36:09 -08:00
Emily Stark
8152969597 Merge remote-tracking branch 'origin/devel' into sso 2014-01-06 15:15:02 -08:00
Emily Stark
c74dd9aa62 Add missing 'random' dependency to retry 2014-01-06 15:14:39 -08:00
David Glasser
4f7d14c1f2 Upgrade websocket-driver to 0.3.2
This lowers the max websocket frame length from 1GB to 64MB.

Note that due to #1648, this may not immediately affect existing
checkouts of meteor (but will get into all release builds).
2014-01-03 17:19:59 -08:00
Emily Stark
f4e3a08bae Print human-friendly error messages for common login failures. 2014-01-03 14:31:18 -08:00
Emily Stark
85d8d5300c Confirm that we hit the right URL when revoking tokens.
Require token revoke endpoints to return JSON with a `tokenRevoked` key,
to avoid being fooled by endpoints that don't understand token
revocation but just happened to return 200 status codes.
2014-01-03 13:42:02 -08:00
David Glasser
feac6f03e3 Merge branch 'minimongo-array-updates' into devel
Actually implement updating field 'x.$.y'! Also some related cleanups.
release/mongo-refactor
2014-01-02 23:51:23 -08:00
David Glasser
82739804b8 Implement '$' update for $elemMatch 2014-01-02 23:49:51 -08:00
David Glasser
2063999ce0 Implement '$' update for $near 2014-01-02 23:36:26 -08:00
David Glasser
e3e9cca12a Implement 'a.$.b' modifier
Does not yet work with $near or $elemMatch
2014-01-02 23:00:18 -08:00
David Glasser
5c9e58f2af clean up findModTarget
convert arguments to options
2014-01-02 22:38:50 -08:00
David Glasser
b2e3b08248 Cleanup/modernization of modify.js 2014-01-02 22:07:37 -08:00
David Glasser
0f7e0b54ca Refactor: optionify LocalCollection._modify arg 2014-01-02 21:47:24 -08:00
David Glasser
a8d1798e88 JSON -> EJSON in test 2014-01-02 21:45:13 -08:00
David Glasser
02aad697d7 remove random type tag in test 2014-01-02 21:42:51 -08:00
David Glasser
31d89599a7 rename args in andSomeMatchers 2014-01-02 21:41:49 -08:00
David Glasser
a1627071a7 set arrayIndex in most places
(not $near or $elemMatch yet)
2014-01-02 21:41:49 -08:00
Emily Stark
83fde36e00 Fix hashed login token test failures caused by merge mishap. release/sso-6 2014-01-02 18:23:56 -08:00
David Glasser
7d448eb0d8 Throw on missing distance 2014-01-02 17:58:07 -08:00
Emily Stark
b296dcbdf2 Merge remote-tracking branch 'origin/devel' into sso
Conflicts:
	packages/accounts-base/accounts_server.js
release/sso-5
2014-01-02 17:46:01 -08:00
David Glasser
cf78cefc8b Refactor selector-vs-modifier/projection code
Now they are methods on a compiled Matcher rather than doing their own
operator parsing from scratch. This means less work is happening for
each oplog entry, and it also localizes knowledge about selector
parsing.
2014-01-02 17:34:04 -08:00
David Glasser
e48f08cefc NOTES update. 2014-01-02 16:46:23 -08:00
David Glasser
b383f2cd6a Use $near distances as lowest-priority sort key
Previously, $near was only used in the absence of a sort specifier; now,
it's also used as a tie-breaker when there is a sort specifier. (Tested:
this matches MongoDB.)
2014-01-02 15:37:49 -08:00
David Glasser
63b13ff665 Clear distances passed into _getRawObjects
Add comment suggested by Naomi
2014-01-02 15:37:19 -08:00
Emily Stark
fde0a90b9b Add _noYieldsAllowed safety belts to Deps functions.
Because we want to start experimenting with using Deps.autorun on the
server.
2014-01-02 14:45:43 -08:00
Emily Stark
b44855d70d Send user agent info with galaxy logins 2013-12-31 18:38:03 -08:00
David Glasser
cc7249985d Merge branch 'minimongo-array-updates' into devel
Big minimongo refactoring. Lays the groundwork for trusting more
selectors in oplog and implementing the '$' option to updates, though
neither are yet implemented.
2013-12-31 13:58:27 -08:00
David Glasser
a5cd5eb435 add comment about sort vs query 2013-12-31 13:55:20 -08:00
David Glasser
e762fbc045 Finish reorganizing/renaming in selector.js 2013-12-31 13:51:36 -08:00
David Glasser
b80d0df736 Rename Minimongo.Selector -> Minimongo.Matcher
The idea will be that "selector" will always mean the EJSON
representation of a selector, and "matcher" will be some compiled
form (whether Minimongo.Matcher or the various lambdas that make it up)
2013-12-31 13:26:38 -08:00
David Glasser
e3c8bf65ab Start to reorder/rename selector.js 2013-12-31 13:22:34 -08:00
David Glasser
2f9aecc77d Improve lookup function docs and tests 2013-12-31 13:08:17 -08:00
David Glasser
5aa5a5c05e Rename: makeLookupFunction, get rid of legacy one 2013-12-31 12:46:28 -08:00
David Glasser
87a71a9298 Use new lookup function directly in Sorter 2013-12-31 12:13:15 -08:00
David Glasser
3e6ef8580e Can always implement $all-with-$elemMatch later
(It's an error now)
2013-12-31 12:00:16 -08:00
David Glasser
bea993e1cc style 2013-12-31 00:13:04 -08:00
David Glasser
df3223cc05 Get rid of cursor._distance
Now selectors don't have a link to the internals of the cursor; instead,
Selector.documentMatches() return values can include a 'distance' field. (This is
the dress rehearsal for also adding an 'arrayIndex' field.)

Contexts that run selectors and may need to sort later now explicitly
keep around a distances IdMap. Specifically, the handles associated with
observeChanges calls each have a distances IdMap, and the _getRawObjects
call has a temporary one (which might alias one of the
observeChanges-related ones if it's being called from observeChanges,
either for the initial query or to re-compute).
2013-12-31 00:01:44 -08:00
David Glasser
9b9f34bb04 Refactor: compiled selector is a class
For now this just lets us do isGeoQuery as something other than
"reparse", but this should have some better effects later.
2013-12-30 16:04:09 -08:00
David Glasser
a2dba04d78 Move $near to the new model
Implement branching for $near (not quite the way Mongo does it, but
better than nothing)

That was the last $operator to be moved to the new model, so I could
delete a lot of obsolete stuff.
2013-12-30 16:04:09 -08:00
David Glasser
2cc3bf8635 move "no $near under $" check into compiler 2013-12-30 16:04:09 -08:00
David Glasser
a8d10b9a02 Refactor sort/$near distance stuff
Instead of having a semi-implicit dependency on the cursor, specify
distances explicitly when "instantiating" the comparator.

The next refactoring will remove _distance from cursor entirely.
2013-12-30 16:04:08 -08:00
David Glasser
60cd9a67ba Move $all to the new model
Implement $all with regexps.

Note that $all with $elemMatch needs to be separately implemented. It's
an entirely different operation.
2013-12-30 16:04:08 -08:00
David Glasser
c71c5598db Move $elemMatch into the new model
Support {x: {$elemMatch: {$gt: 5}}} syntax where the $elemMatch argument
is a "value selector" and not a "full doc selector".
2013-12-30 16:04:08 -08:00
David Glasser
1a8a45e6b9 Move $regex/$options to the new model
Better type-checking for $regex, and it's an error to provide $options
without $regex.
2013-12-30 16:04:08 -08:00
David Glasser
dafcd0d52c Move $type to the new model
Requires another special option, yay.
2013-12-30 16:04:08 -08:00
David Glasser
a72c2b89a8 Move $exists to the new model
Fixes two incompatibilities:
- {$exists: false} did the wrong logic when there were multiple branches
   (we (poorly) special-cased $not and $nin but not this negative case)
- No longer require the argument to $exists to be a boolean;
  {$exists: 0} and {$exists: 1} should work, eg
2013-12-30 16:04:08 -08:00
David Glasser
38a9b08ff6 Move $size to the new model 2013-12-30 16:04:08 -08:00
David Glasser
d863883e9f Move $nin to the new model
This implement regexp options for $in

Remaining:
- $exists
- $size
- $type
- $regex/$option
- $all
- $elemMatch
- $near/$maxDistance
2013-12-30 16:04:08 -08:00