These directories are often left around when switching from another
branch; git does not delete the gitignored .build directory (but it will
show up annoyingly in 'git status').
The dev bundle contains a copy of the handlebars NPM module solely for
creating app.html. This is separate from the NPM module used by the
handlebars NPM package.
On the shark branch, we no longer use the handlebars NPM module for
Meteor template (it is being replaced by Spacebars), so in preparation
for that, we'll remove this barely-used build-time dependency on
handlebars.
A subsequent commit will remove it from the dev bundle.
Once the Spacebars API has fully settled (eg, it has been merged to
devel), we should get rid of this ad hoc templating and replace it with
Spacebars, either in webapp_server (driven entirely by program.json) or
by using unipackage.load in bundler.
Add tests to check that account data is cleaned up after a session
closes.
Make `establishConnection` available to account tests.
Remove code duplication between `poll` (now called `simplePoll`) and
the async_multi `pollUntil`.
when the error callback only needs to print the exception.
Replace unsafe references to `err.stack` with
`err && err.stack || err`. This avoids throwing a secondary exception
if the original exception in `err` isn't an object (`throw(null)` and
`throw(undefined)` are legal in JavaScript), and also displays the
error object if the stack trace wasn't included.
Document `Meteor.onConnection` instead of `Meteor.server.onConnection`.
Condense sections about when there is a session reconnect into a
single {{note}}.
Document the `stop` handle returned by `onConnect`.
Document `this.session` in Meteor.methods section.
Poll instead of using Deps.autorun in server test.
When polling the client connection, tests don't have a chance to
disconnect before the stream client automatically reconnects, so add
an option to disable retries for testing.
Callers of `Meteor.bindEnvironment` often have the `onException`
argument print the exception stack trace. To allow for less code
duplication, let the argument be a string providing the context
(e.g. "connection closed callback"), and then on an exception print
the context and the exception stack trace.
`closeSessionsForTokens` doesn't need to clone `sessionsByLoginToken`
because `onClose` callbacks are deferred.
Simplify `closeTokensForUser` by using `_.pluck`.
of connections can be closed without waiting for the close callbacks
on one connection to return before closing the other connections.
Underscore internal Session field `_closeCallbacks`.
Update comment to explain the cause of the problem requiring the use
of `Meteor.bindEnvironment` with Meteor's public API.