Commit Graph

86 Commits

Author SHA1 Message Date
Naomi Seyfer
06a3e23730 The rest of the docs for Meteor.settings 2012-12-12 12:53:39 -08:00
Avital Oliver
5efd9ff4b2 OAuth offline token docs improvement 2012-12-03 22:10:43 -08:00
Avital Oliver
240d6e64f7 Improve offline google oauth token support:
- Use an argument to Meteor.loginWithGoogle and Accounts.ui.config
  rather than a UI-powered configuration option
- Add documentation
- Some cleanup
2012-12-03 22:10:43 -08:00
David Glasser
3a3126568a docs: clarify that the 'fields' option to find/findOne is server-only
and the 'reactive' option is client-only.

Avoid using the term Minimongo to mean "client-only".

Fixes #492.
2012-11-28 13:27:20 -08:00
David Glasser
f8c54c4046 Overhaul quiescence, method callback timing, and login methods on the client.
- Data streamed from the server is quiesced on a per-object basis, not a global
  basis. We track which documents a method stubs modifies, and create individual
  snapshots ("server documents") of those documents rather than whole-Collection
  snapshots. Data writes from the server to documents not modified by stubs are
  applied immediately to the local cache; other writes are applied to the
  "server document" snapshots. Server documents are flushed to the local cache
  when all method stubs that wrote to the document have sent their "data write"
  message.  (We still do "full database" quiescence after a reconnect.)

- Instead of calling method callbacks as soon as the result is received, we wait
  until all data that precedes their "data done" message is flushed to the local
  cache. This way, method callbacks can see all of their results locally. (This
  applies to Collection mutator callbacks as well.) If this delay is
  unacceptable, you can also specify the onResultReceived option to
  Meteor.apply; this callback is given the method result as soon as it comes in,
  and there's no guarantee that the local cache is up to date.
  (This is a client-only change: server-side callbacks do not block on the
  write fence.)

- Methods invoked with the "wait" option to Meteor.apply now wait until all
  preceding methods are fully finished to be *sent*, not just to call their
  callbacks. ie, previous calls block the "wait" method in the same way that
  "wait" methods block subsequent calls.

- Remove Meteor.userLoaded and {{currentUserLoaded}}.
  Meteor.userId() is now set only at the point where Meteor.user() is fully
      loaded.
  Current user data is published via an unnamed subscription, not via
      "meteor.currentUser".
  Replace them with Meteor.loggingIn() and {{loggingIn}}, which become true
      as soon as the login method is sent (instead of only once it succeeds).
  In accounts-ui, move the spinny into the dropdown, because it now shows up
      before error messages would.

- Previously, if we received the "result" message from a method but no "data"
  message, and then disconnected and reconnected, quiescence would be
  permanently blocked. Now, not only do we allow the app to continue working,
  but we even guarantee that the method's callback will be called at the
  "reconnect quiescence" point.

- Remove reset function from the Store API (the interface between
      _LivedataConnection and Collection), and add a boolean "reset" argument to
      beginUpdate instead.
  Add saveOriginals/retrieveOriginals functions to the Store API (pass-through
      to minimongo implementation).
  Allow "replace" messages to be passed to the Store API's update function
      (in addition to set/unset).
  Allow Store API implementations (eg tinytest_client) to not specify all
      functions.

- Server-side tinytest results now stream into the result page instead of
  appearing all at once at the end.

- Rename fields and methods of Meteor._LivedataConnection as camelCase, and
  prepend all internal fields with _.

- Different Meteor._LivedataConnection objects now have separate
  _userIdListeners _ContextSets.

- Remove snapshot/restore functionality from Minimongo collections. (Individual
  queries still have result snapshots.) The "server documents" in
  Meteor._LivedataConnection serve the equivalent purpose.

- Meteor.loginWithToken's callback is now a "call with error on error, call
  with no args on success" callback like the other login callbacks.

- The test-only Meteor._LivedataConnection.onQuiesce function is removed.
  Every single use of it is now supported by normal method callbacks.
2012-11-14 18:10:08 -08:00
David Glasser
c8a9bc9e5a Fix doc argument type formatting (fixes #432) 2012-11-05 14:55:55 -08:00
David Glasser
7d8f744f15 Some tweaks to dandv's doc cleanups. 2012-11-05 11:36:47 -08:00
Dan Dascalescu
5ccacd1fbd Doc cleanups. Fixes #430. 2012-11-05 11:19:23 -08:00
Avital Oliver
ae68aa22e6 accounts-ui: Hide "Create account" link when signups are forbidden 2012-11-01 18:15:31 -07:00
Avital Oliver
953e509d8d Document {{currentUser}} and {{currentUserLoaded}} 2012-11-01 13:30:05 -07:00
David Glasser
1c70dcef66 Fix a few typos in Meteor.uuid docs.
While we're at it, linkify RFC reference.
2012-10-23 10:57:05 -07:00
Geoff Schmidt
893e37f4d7 #387: Document Meteor.uuid. Thanks @dandv! 2012-10-20 00:56:42 -07:00
Dan Dascalescu
c084e35282 API docs typo and formatting fixes 2012-10-17 16:22:20 -07:00
David Glasser
02f7512da6 Accounts.ui.config should link to accounts-ui 2012-10-15 17:29:47 -07:00
Nick Martin
8460c028b9 Break password-only stuff into a separate section. Reorder a bit. 2012-10-15 16:33:29 -07:00
Avital Oliver
e3a1f7f428 Refer to OAuth less in docs. Small improvements to accounts-ui docs 2012-10-15 16:12:09 -07:00
David Glasser
907b6ee91a Tweak wording of Accounts.ui.config docs and show a more complete example. 2012-10-15 11:55:31 -07:00
David Glasser
72731ddda0 Use jQuery to force all non-#internal links to use target=_blank.
Rewrite <a href> links to use Markdown syntax now that they don't need the <a
href> to get target=_blank.
2012-10-15 11:16:53 -07:00
Dan Dascalescu
0a89f9408d Use better_markdown throughout 2012-10-13 21:31:55 -07:00
Nick Martin
bc6e80073a Merge branch 'support-autorun' into devel 2012-10-12 15:21:48 -07:00
Nick Martin
ada7d81112 Minor tweaks to docs. 2012-10-12 15:20:27 -07:00
Nick Martin
c7b5f51420 Re-order autorun and flush. 2012-10-12 14:55:32 -07:00
Nick Martin
bf8890ffa2 First docs for emailTemplates 2012-10-12 14:42:39 -07:00
David Glasser
bae1a59af6 Publicize Meteor._autorun as Meteor.autorun (with docs and tests). 2012-10-12 00:50:35 -07:00
Nick Martin
0195b291e1 Another pass. Almost everything has at least first-pass docs written. 2012-10-12 00:29:03 -07:00
Nick Martin
78b262741f Another pass through the docs. Almost all XXXs removed. 2012-10-11 15:01:38 -07:00
Nick Martin
99e1ed82c7 Catch up to new APIs. 2012-10-11 15:01:31 -07:00
Nick Martin
17030e572c Rework allow/deny, userId, and setUserId 2012-10-11 15:01:16 -07:00
Nick Martin
5097fc283c Document allow/deny. 2012-10-11 15:01:15 -07:00
Nick Martin
e2023399aa First pass: a place for everything and everything in its place.
We really need to make this easier.
2012-10-11 15:01:15 -07:00
Nick Martin
3f596faf01 Move a section. No functional change. 2012-10-11 15:01:15 -07:00
David Glasser
e733b17d6a Merge branch 'devel' into auth
Pull in the issue #215 fix (Sessions can contain non-scalar objects)
2012-10-08 21:43:54 -07:00
David Glasser
5a01d9fe4d Meteor.Collection now takes its optional parameters ("manager" and some
undocumented ones beginning with _) in an options dictionary.

(For backwards compatibility it still supports passing the manager directly.)
2012-10-08 09:17:54 -07:00
David Glasser
9251edbf8d Allow arbitrary JSON objects to be stored in Session (but not compared with equals). Test Session. Fixes #215. 2012-10-06 14:42:59 -07:00
David Glasser
be4da5fba4 Revert "Support unlimited tabs by working around browser per-hostname connection limits."
This reverts commit 2495cb2f58.

This change made it easy to construct URLs with more than 63 characters in a
label, which is not legal. We will redo this later with generating a smaller
random token (and taking other precautions to limit the total size of the
label).
2012-10-01 13:45:54 -07:00
David Glasser
2495cb2f58 Support unlimited tabs by working around browser per-hostname connection limits.
The URL provided to Meteor.connect may now be a function returning a new URL on
each socket connection, or contain the substring "MeteorWildcard" which is
replaced by a random string (a UUID) on each socket connection.
2012-09-28 11:57:48 -07:00
David Glasser
5470b3f511 Merge branch 'devel' into auth 2012-09-27 13:51:21 -07:00
David Glasser
094546d53b Check that the value to Session.set is scalar (like we already do in Session.equals).
Document this restriction for both functions.

We may later relax this (with deep-copy in and out of the Session); see issue
2012-09-27 11:10:28 -07:00
Avital Oliver
ee922de1c2 Merge branch 'devel' into auth
Conflicts:
	packages/livedata/livedata_server.js
2012-09-21 10:59:48 -07:00
Avital Oliver
b0d181dbcc Add the replaceLocalhost option to Meteor.absoluteUrl 2012-09-20 15:07:52 -07:00
Avital Oliver
de413efe50 Fold the absolute-url package into the meteor package 2012-09-19 16:19:54 -07:00
David Glasser
2fedd2adfc Merge branch 'devel' into auth
Conflicts:
	packages/livedata/livedata_common.js
	packages/livedata/livedata_connection.js
	packages/livedata/livedata_server.js
	packages/mongo-livedata/collection.js
2012-09-17 14:42:10 -07:00
David Glasser
42033a03aa Merge branch 'devel' (early part) into auth
Conflicts:
	packages/email/email.js
	packages/email/email_tests.js
	packages/livedata/livedata_tests.js
2012-09-17 14:31:54 -07:00
David Glasser
5e622215ba Change all publicly documented APIs to use camelCase.
For now, the old names still work as well.

This includes:
  - Meteor.isServer/isClient
  - this.isSimulation in methods
  - Context.onInvalidate
  - Meteor.status().retryCount/retryTime

Remove old backwards-compatibility "Sky" alias for "Meteor".

Update all examples in the docs to use camelCase.

Delete unused docs/client/projects.html file.
2012-09-17 14:26:45 -07:00
David Glasser
f340c35c02 Basic email support. 2012-09-14 18:38:29 -07:00
Nick Martin
24377fc980 Merge branch 'devel' into auth 2012-09-07 19:42:42 -07:00
David Glasser
233626de86 Make Meteor.Cursor.forEach fully synchronous even if the user's callback yields.
Previously, if the callback yields (eg, if it does a DB query), the next
iteration of the callback could run, or the forEach could finish entirely,
because the future we waited on only checked to ensure that the callback was
*started* on all documents, not *finished*.

Fixes #321. Thanks to Scott Anderson for bug report with minimal reproduction
case.
2012-09-06 10:20:22 -07:00
Nick Martin
c514341df8 Merge branch 'master' into auth
Conflicts:
	.gitignore
	examples/todos/client/todos.js
2012-09-04 00:42:35 -07:00
Nick Martin
5a06b8ad12 More docs tweaks. 2012-08-30 18:04:32 -07:00
David Greenspan
5d34cdf1d2 tmpldecl => template in URL fragments 2012-08-30 15:05:41 -07:00