Commit Graph

4513 Commits

Author SHA1 Message Date
Nick Martin
ca080b1477 bump mongo and dev bundle version. release/mongo-new-devbundle-1 2013-09-23 20:53:09 -07:00
Avital Oliver
7e8c2f9405 Better error when passing string to {{#each}}
Fixes #722
2013-09-23 17:49:59 -07:00
Naomi Seyfer
4f4e5342eb Remove code to keep around sessions after they are disconnected.
We will deal with reconnects with session resumption someday, but it will not be
using this dead code which has bitrotted in our repository for months on end.
It was never fully implemented, and what we had was a sketch that causes bugs
(and extra cpu usage).
2013-09-23 17:30:34 -07:00
Naomi Seyfer
35e8a04834 Stop offending the message. Dont alias in_queue to out_queue 2013-09-23 15:53:47 -07:00
Maxhodges
8afa4f2c9e typo. "with" repeated twice. 2013-09-23 10:49:53 -07:00
David Glasser
d5ce2502f6 Improve error messages if unipackage load fails.
This mostly affects Meteor core development (since for now, unipackage.load is
only used inside the meteor tools itself and only to load core packages, which
should be properly compiled in any Meteor release).
2013-09-19 13:54:33 -07:00
Slava Kim
9e2d6ed769 Merge branch 'minimongo-fields' into devel
Now supporting fields filtering in subarrays.

Example:

  C.insert({ foo: [ { bar: 1, qux: -1 }, [ { bar: 2, qux: -2 } ] ] });

  C.findOne({}, { 'foo.bar': 1, _id: 0 });

  < { foo: [ { bar: 1 }, [ { bar: 2 } ] ] }
2013-09-16 11:07:51 -07:00
Slava Kim
48eea25d27 Comments on keys sorting.
Suggested by Glasser.
2013-09-16 11:04:08 -07:00
Slava Kim
4345fdbd4b Always sort keys to simplify some cases.
And don't modify the argument.
2013-09-13 16:00:08 -07:00
Slava Kim
4ed373b2b4 Check the equality with _.isEqual
EJSON.stringify doesn't guarantee the order of keys.
2013-09-13 15:59:36 -07:00
Slava Kim
6c448a213f Another test 2013-09-13 15:41:53 -07:00
Slava Kim
2642280977 Put a.b.c and a.b validation into general case. 2013-09-13 01:51:25 -07:00
Slava Kim
eb5d426a7c Fix docs. $slice is not related to fields projection. 2013-09-13 01:51:25 -07:00
Slava Kim
a6643812a8 Same test but for blacklisting 2013-09-13 01:51:24 -07:00
Slava Kim
05a3a22a6b Fields with subsets passes the test. 2013-09-13 01:51:24 -07:00
Slava Kim
83136f64aa Add nested-nested test.
Taken from Glasser's old code-review.
2013-09-13 01:51:24 -07:00
Slava Kim
f6e307e644 Whitespace 2013-09-13 01:51:24 -07:00
Slava Kim
b24066d477 Improve documentation on fields.
- You can mix incl/excl as long as it is `_id`
- Note unsupported `$` and `$slice` operators of minimongo
- Give an advanced example with reference to mongodb docs.
2013-09-13 01:51:24 -07:00
Slava Kim
27fd0d5066 Support subsets fields filtering.
Rewrote the returned closure. Still don't support '$' and '$slice' operators.
2013-09-13 01:51:24 -07:00
Slava Kim
2e10d43041 Simple tests for sub-set projections. 2013-09-13 01:51:24 -07:00
David Glasser
280a9f7179 Merge branch 'pr/1407' into devel 2013-09-12 14:29:58 -07:00
Maxime Quandalle
259fb036c8 Fix syntax 2013-09-12 14:29:50 -07:00
Maxime Quandalle
c66b8e3db5 Style tweaks 2013-09-12 14:29:50 -07:00
Maxime Quandalle
d4186524b8 Support multiple extensions in _getSourceHandler 2013-09-12 14:29:50 -07:00
Maxime Quandalle
8df6553ce2 Add a literate handler in the coffeescript package
Add .coffee.md handling tests
2013-09-12 14:29:50 -07:00
David Glasser
3665b31a82 Remove backwards-compatibility implementation of pre-0.6.5
Package.register_extension API.

It didn't even actually work for producing JavaScript files (eg a
coffeescript-like package): see #1410. Package maintainers should have upgraded
to the more powerful 0.6.5 API by now anyway.
2013-09-12 13:55:15 -07:00
David Winterbottom
a174b549b9 Correct typo in install script error message 2013-09-12 12:31:54 -07:00
Andrew Wilcox
4714f892f5 Check that the argument to EJSON.parse is a string.
Some Android browser versions of JSON.parse can crash when passed null
(https://code.google.com/p/android/issues/detail?id=11973), so it's
better not to pass on a non-string argument to JSON.parse.

Thanks to @raix for raising the issue in #1401.
2013-09-12 12:13:15 -07:00
Emily Stark
00a70b7899 Update History.md for token deletion 2013-09-11 13:48:05 -07:00
Emily Stark
aaf6c8a28a Merge branch 'expire-tokens' into devel 2013-09-11 13:44:58 -07:00
Emily Stark
0bc4bc9c26 Clean up token deletion and tests. 2013-09-11 13:44:27 -07:00
Emily Stark
d9093d6cf8 Test for logging out a user's connections when deleted.
Tests are flaky, not sure why yet.
2013-09-11 13:44:14 -07:00
Emily Stark
4ebdbd9f77 On logout, disassociate connection from token before deleting token. 2013-09-11 13:44:13 -07:00
Emily Stark
dab6df0eb9 Remove DDP disconnected message.
Instead, using a friendlier error message for bad login tokens, and preferring
localStorage tokens to the result of login method in onReconnect (since
onReconnect doesn't get cleared because we don't have a disconnected message to
know when to clean it). Also tried to make tests a little cleaner.
2013-09-11 13:44:13 -07:00
Emily Stark
09ba59c50b Close users' connections when they or their tokens are deleted. 2013-09-11 13:44:13 -07:00
Emily Stark
21dd57c95d Allow DDP client to register onDisconnect callback.
accounts-base uses this to handle disconnects due to users being intentionally
logged out.
2013-09-11 13:44:13 -07:00
Emily Stark
e84f0adb78 Add test for Meteor._logoutAllOthers.
Fix bugs to make it work.
2013-09-11 13:44:13 -07:00
Emily Stark
10d49451d9 Add experimental "disconnected" DDP message.
Client uses this to unset user id when a forced logout happens.
2013-09-11 13:44:13 -07:00
Emily Stark
8621c18bc1 Add token expiration test and fix bugs so it passes.
Also make all token-expiration-related times configurable via Accounts.config.
2013-09-11 13:44:13 -07:00
Emily Stark
2ebdeb0d95 Make token expiration times configurable via Accounts.config. 2013-09-11 13:44:13 -07:00
Emily Stark
d84334a34b Make client aware of token expiration times.
accounts-password will not try to auto-login with (and will clear) a login token
that is going to expire within an hour, to try to avoid abrupt disconnects from
an expiring token. Login handlers return a new tokenExpires field to help the
client do this. Made tokenExpires a separate field on the login handlers' result
object instead of just returning the whole token (token + when fields) in the
result to avoid breaking code that assumes that login handlers return a string
as the token field. The tokenExpires field is optional, so other login handlers
that don't set it aren't broken.
2013-09-11 13:44:13 -07:00
Emily Stark
d39726d737 Store login token on livedata session.
Allows us to remove sessions from sessionsByLoginToken when they are destroyed.
2013-09-11 13:44:13 -07:00
Emily Stark
1887d6960b Expire login tokens periodically.
When a login token expires, all open connections associated with that token will
be closed. It will be up to client code to avoid trying to connect with a login
token that is set to expire soon.
2013-09-11 13:44:13 -07:00
Emily Stark
4b7f052ce0 Wait 10 seconds before closing other logged-in sessions.
Gives other tabs sharing a token with the caller time to find the new token in
localStorage. This is sort of a hack for now; one possibility for making it less
hacky is to add a DDP disconnect message to allow the server to tell clients
that they are being disconnected but can reconnect with the provided token.
2013-09-11 13:44:13 -07:00
Emily Stark
12c0d8ef5e Rename to Meteor._logoutAllOthers 2013-09-11 13:44:12 -07:00
Emily Stark
3403b31c42 Preserve the connection that called logoutAll. 2013-09-11 13:44:12 -07:00
Emily Stark
7dfff264a3 Add method that logs the user out everywhere.
Might need some UI work; currently causes confusing error message "Couldn't find
login token."
2013-09-11 13:44:12 -07:00
Emily Stark
afa8afd9a9 Keep track of open DDP connections by login token. 2013-09-11 13:44:12 -07:00
Andrew Wilcox
ba34b2550b Chrome for iOS supports the appcache 2013-09-04 16:31:52 -07:00
Emily Stark
1c8a5169ed Merge pull request #1387 from peerlibrary/wrapasync-err
Check for err.stack in logErr in wrapAsync
2013-09-01 19:06:22 -07:00